|
@@ -0,0 +1,132 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-button size="mini" type="text" @click="detailBtn">明细</el-button>
|
|
|
+ <el-dialog title="新 增" append-to-body :visible.sync="dialogFormVisible" width="65%">
|
|
|
+ <div slot="title" style="font-size: 15px">
|
|
|
+ 阶段任务明细
|
|
|
+ </div>
|
|
|
+ <el-input placeholder="请输入搜索内容" v-model="params.content.where.condition" @keyup.native.enter="getStageDetail(params.content.pageNumber = 1)" @clear="getStageDetail(params.content.pageNumber = 1)" style="width:350px" size="mini" class="input-with-select" clearable>
|
|
|
+ <add slot="append" :data="data" @onSuccess="getStageDetail" v-if="tool.checkAuth($route.name,'insert')"/>
|
|
|
+ </el-input>
|
|
|
+ <tableLayout style="margin-top:16px" v-if="stageDetail" :layout="tablecols" :data="stageDetail" :custom="true" height="50vh">
|
|
|
+ <template v-slot:customcol="scope">
|
|
|
+ <div v-if="scope.column.columnname == 'mutextags'">
|
|
|
+ <span v-if="scope.column.data[scope.column.columnname].length > 0">
|
|
|
+ <span v-for="(item,index) in scope.column.data[scope.column.columnname]" :key="index">
|
|
|
+ {{item.tag}}
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </div>
|
|
|
+ <div v-else>{{scope.column.data[scope.column.columnname]}}</div>
|
|
|
+ </template>
|
|
|
+ <template v-slot:opreation="scope">
|
|
|
+ <edit class="inline-16" @onSuccess="getStageDetail()" :data="scope.data"/>
|
|
|
+ <delete-btn :id="scope.data.sa_projstagetemp_workid" @deleteSuccess="getStageDetail()" nameId="20221019090604" nameKey="sa_projstagetemp_workids"/>
|
|
|
+ </template>
|
|
|
+ </tableLayout>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
|
|
|
+ <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width btn-warning">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import add from './add'
|
|
|
+import edit from './edit'
|
|
|
+import { log } from '@antv/g2plot/lib/utils'
|
|
|
+export default {
|
|
|
+ name: "detail",
|
|
|
+ props:['data'],
|
|
|
+ components:{add,edit},
|
|
|
+ data(){
|
|
|
+ return {
|
|
|
+ dialogFormVisible:false,
|
|
|
+ form:{
|
|
|
+
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ "id":20221019090404,
|
|
|
+ "content": {
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageSize": 99999,
|
|
|
+ "sa_projstagetempid":0,
|
|
|
+ "sa_projstagetemp_stageid":0,
|
|
|
+ "where":{
|
|
|
+ "stagename":"",
|
|
|
+ "workname":"",
|
|
|
+ "remarks":"",
|
|
|
+ "projecttype":"",
|
|
|
+ "condition":""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ tablecols:'',
|
|
|
+ stageDetail:'',
|
|
|
+ currentData:'',
|
|
|
+ rules:{
|
|
|
+ accountno:[
|
|
|
+ { required: true, message: '输入账户编号', trigger: 'blur'},
|
|
|
+ ],
|
|
|
+ accountname:[
|
|
|
+ { required: true, message: '输入账户名称', trigger: 'blur'}
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ this.tablecols = this.tool.tabelCol(this.$route.name).projectStageTaskTable.tablecols
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ detailBtn () {
|
|
|
+ this.dialogFormVisible = true
|
|
|
+ this.currentData = this.data
|
|
|
+ this.getStageDetail()
|
|
|
+ },
|
|
|
+ onSubmit(){
|
|
|
+ console.log(this.form)
|
|
|
+ this.$refs['form'].validate(async (valid) => {
|
|
|
+ if (!valid) return false
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": "20221008134703",
|
|
|
+ "version":1,
|
|
|
+ "content": this.form
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ this.$refs['form'].resetFields();
|
|
|
+ this.dialogFormVisible = false
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async deleteRow (data) {
|
|
|
+ console.log(data);
|
|
|
+ let res = await this.$api.requested({
|
|
|
+ "id": 20221013104601,
|
|
|
+ "content": {
|
|
|
+ "sys_systemtagid": this.data.sys_systemtagid,
|
|
|
+ "tags":[data.tag]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(res);
|
|
|
+ this.tool.showMessage(res,() => {
|
|
|
+ this.getStageDetail()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async getStageDetail () {
|
|
|
+ this.params.content.sa_projstagetempid = this.currentData.sa_projstagetempid
|
|
|
+ this.params.content.sa_projstagetemp_stageid = this.currentData.sa_projstagetemp_stageid
|
|
|
+ let res = await this.$api.requested(this.params)
|
|
|
+ this.stageDetail = res.data
|
|
|
+ console.log(this.stageDetail);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+
|
|
|
+</style>
|