From 955ff2c168962ebd47a686f949c05a683d177b21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Sat, 12 Mar 2022 00:10:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xm/core/xmGroup/XmGroupMng.vue | 35 ++++++++---------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/src/views/xm/core/xmGroup/XmGroupMng.vue b/src/views/xm/core/xmGroup/XmGroupMng.vue index eac3782c..362ca087 100644 --- a/src/views/xm/core/xmGroup/XmGroupMng.vue +++ b/src/views/xm/core/xmGroup/XmGroupMng.vue @@ -72,8 +72,7 @@ 加载下一级小组 - 新增产品小组 - 新增项目小组 + 新增项目小组 @@ -481,22 +480,18 @@ XmProductSelect,XmProjectSelect, }, //显示新增界面 XmGroup xm_group showAdd: function () { + if(!this.filters.selProject || !this.filters.selProject.id){ + this.$notify({ showClose:true, message: "请先选择项目", type: 'warning' }); + return; + } this.addForm={...this.addFormInit} - if(this.currNodeType=='product'){ - this.addForm.pgroupId=null - this.addForm.pgroupName=null - this.addForm.productId=this.xmProduct.id - this.addForm.pgClass="1" - this.addForm.projectId=null - this.addForm.groupName=this.xmProduct.productName+"-产品管理组" - this.addFormVisible = true; - }else if(this.currNodeType=='project'){ + if(this.currNodeType=='project'){ this.addForm.pgroupId=null this.addForm.pgroupName=null this.addForm.productId=null this.addForm.pgClass="0" - this.addForm.projectId=this.selProject.id - this.addForm.groupName=this.selProject.name+"-项目管理组" + this.addForm.projectId=this.filters.selProject.id + this.addForm.groupName=this.filters.selProject.name+"-项目管理组" this.addFormVisible = true; }else{ return; @@ -510,16 +505,10 @@ XmProductSelect,XmProjectSelect, if(!row){ return; } - this.addForm={...row} - if("1"==row.pgClass){ - this.addForm.productId=row.productId - this.addForm.pgClass="1" - this.addForm.projectId=null - }else{ - this.addForm.productId=null - this.addForm.pgClass="0" - this.addForm.projectId=row.projectId - } + this.addForm={...row} + this.addForm.productId=null + this.addForm.pgClass="0" + this.addForm.projectId=row.projectId this.addForm.pgroupId=row.id this.addForm.pgroupName=row.groupName this.addForm.groupName=row.groupName+"-"+"下级小组xx"