From 33cc928f3f8359998d787db33a8257dcdf2a8834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Fri, 17 Jun 2022 13:43:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xm/core/xmTask/XmPhase.vue | 32 ++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/views/xm/core/xmTask/XmPhase.vue b/src/views/xm/core/xmTask/XmPhase.vue index 9945f322..1817d9fd 100644 --- a/src/views/xm/core/xmTask/XmPhase.vue +++ b/src/views/xm/core/xmTask/XmPhase.vue @@ -185,15 +185,15 @@ {{ (scope.row.rate != null ? scope.row.rate : 0) + "%" }}
- - + +
@@ -636,6 +636,10 @@ export default { //显示编辑界面 XmTask xm_task showEdit: function (row, index) { this.editFormVisible = true; + if(this.editForm && row.id!=this.editForm.id){ + this.$refs.table.setCurrentRow(row); + this.$emit("row-click",row) + } this.editForm=row }, showTaskTemplate: function (row) { @@ -688,10 +692,14 @@ export default { showSubAdd(row,index,ntype) { if(!this.checkCanAdd(row)){ return; + } + if(this.editForm && row.id!=this.editForm.id){ + this.$refs.table.setCurrentRow(row); + this.$emit("row-click",row) } this.parentTask = row; this.editForm = row; - this.addForm.ntype=ntype; + this.addForm.ntype=ntype; this.addFormVisible = true; }, //显示新增界面 XmTask xm_task @@ -780,14 +788,24 @@ export default { .catch((err) => (this.load.del = false)); }); }, - rowClick: function (row) { + rowClick: function (row,column) { + + if(this.editForm && row.id===this.editForm.id && column.label!='状态'){ + this.editForm=null; + this.$emit('row-click',null) + this.$refs.table.setCurrentRow(); + return; + } this.editForm = row; this.editFormBak=Object.assign({},row) this.$emit('row-click',row,);// @row-click="rowClick" }, selectVisible(row,visible){ - if(visible==true){ - this.rowClick(row); + if(visible==true){ + this.$refs.table.setCurrentRow(row); + this.editForm = row; + this.editFormBak=Object.assign({},row) + this.$emit('row-click',row,);// @row-click="rowClick" } }, showSkill(row) {