From 29d2fda6a7265db7750d39a6f3beae70d6b9e2a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Tue, 15 Mar 2022 16:55:27 +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/XmGroupSelect.vue | 50 +++++++++++---------- src/views/xm/core/xmTask/XmTaskEdit.vue | 18 ++++---- src/views/xm/core/xmTask/XmTaskMng.vue | 24 +++++++--- src/views/xm/core/xmTask/XmTaskMngBatch.vue | 2 + 4 files changed, 55 insertions(+), 39 deletions(-) diff --git a/src/views/xm/core/xmGroup/XmGroupSelect.vue b/src/views/xm/core/xmGroup/XmGroupSelect.vue index 050845b5..010fd7de 100644 --- a/src/views/xm/core/xmGroup/XmGroupSelect.vue +++ b/src/views/xm/core/xmGroup/XmGroupSelect.vue @@ -1,17 +1,21 @@ @@ -43,7 +47,7 @@ //import Sticky from '@/components/Sticky' // 粘性header组件 import { initSimpleDicts } from '@/api/mdp/meta/item';//下拉框数据查询 import { getGroups } from '@/api/xm/core/xmGroup'; - import XmProjectList from '../xmProject/XmProjectList'; + import XmProjectSelect from '../xmProject/XmProjectSelect'; import {mapGetters} from 'vuex' import XmProductSelect from '../xmProduct/XmProductSelect.vue'; @@ -55,7 +59,7 @@ import XmProductSelect from '../xmProduct/XmProductSelect.vue'; ]) }, // - props: ['visible','selProject','isSelectSingleUser','isSelectMultiUser','xmProduct'], + props: ['visible','selProject','isSelectSingleUser','isSelectMultiUser','xmProduct','pgClass'], watch: { "selGroups": function(selGroups) { if(this.selGroups){ @@ -153,14 +157,14 @@ import XmProductSelect from '../xmProduct/XmProductSelect.vue'; if(this.filters.xmProduct && this.filters.xmProduct.id){ params.productId=this.filters.xmProduct.id } - if(!params.projectId && !params.productId){ - this.$notify({showClose:true,message:'产品团队或者项目团队最少选中一个',type:'error'}) + if(this.pgClass==='1' && !params.productId){ + this.$notify({showClose:true,message:'请选择产品',type:'error'}) return; } - if(params.projectId && params.productId){ + if((this.pgClass==='0' || !this.pgClass )&& !params.projectId){ params.productId=null - this.$notify({showClose:true,message:'产品团队或者项目团队只能选中一个,两个都选以项目团队为准',type:'warning'}) + this.$notify({showClose:true,message:'请选择项目',type:'warning'}) } getGroups(params).then(res=>{ var tips = res.data.tips; @@ -172,7 +176,7 @@ import XmProductSelect from '../xmProduct/XmProductSelect.vue'; }) }, - onPorjectConfirm:function(project){ + onProjectRowClick:function(project){ this.filters.selProject=project this.filters.xmProduct=null; this.selectProjectVisible=false; @@ -180,7 +184,7 @@ import XmProductSelect from '../xmProduct/XmProductSelect.vue'; }, - onProductConfirm:function(product){ + onProductRowClick:function(product){ this.filters.xmProduct=product this.filters.selProject=null this.selectProductVisible=false; @@ -199,7 +203,7 @@ import XmProductSelect from '../xmProduct/XmProductSelect.vue'; }, //end methods components: { - XmProjectList,XmProductSelect + XmProjectSelect,XmProductSelect }, mounted() { this.$nextTick(() => { diff --git a/src/views/xm/core/xmTask/XmTaskEdit.vue b/src/views/xm/core/xmTask/XmTaskEdit.vue index 102f635a..a4580e27 100644 --- a/src/views/xm/core/xmTask/XmTaskEdit.vue +++ b/src/views/xm/core/xmTask/XmTaskEdit.vue @@ -82,12 +82,7 @@ - - - - - - + {{editForm.createUsername}} 设置负责人 @@ -96,6 +91,11 @@ {{editForm.executorUsername}} 设置执行人 + + + + + @@ -201,10 +201,10 @@ --> - + - + @@ -215,7 +215,7 @@ - + diff --git a/src/views/xm/core/xmTask/XmTaskMng.vue b/src/views/xm/core/xmTask/XmTaskMng.vue index 5c45a4da..a09825e7 100644 --- a/src/views/xm/core/xmTask/XmTaskMng.vue +++ b/src/views/xm/core/xmTask/XmTaskMng.vue @@ -920,6 +920,7 @@ :visible="menuGroupUser" :sel-project="selProject" :isSelectSingleUser="1" + :ptype="ptype" @user-confirm="seleConfirm" > @@ -934,6 +935,7 @@ :visible="menuExecutor" :sel-project="selProject" :isSelectSingleUser="1" + :ptype="ptype" @user-confirm="seleExecutor" > @@ -961,6 +963,7 @@ :visible="groupUserSelectVisible" :sel-project="selProject" :isSelectSingleUser="1" + :ptype="ptype" @user-confirm="groupUserSelectConfirm" > @@ -2423,15 +2426,22 @@ export default { }, showParentTaskList(){ - if(this.filters.selProject && this.filters.selProject.id){ - if(this.sels.length==0){ - this.$notify({showClose:true,message:"请先选择一个或者多个需要更换上级的计划/任务",type:'warning'}) - return; + if(this.sels.length==0){ + this.$notify({showClose:true,message:"请先选择一个或者多个需要更换上级的计划/任务",type:'warning'}) + return; + } + if(this.ptype==='0'){ + if( !this.filters.selProject|| !this.filters.selProject.id){ + this.$notify({showClose:true,message:"请先选择项目",type:'warning'}) + return; + } + }else if(this.ptype==='1'){ + if( !this.filters.product|| !this.filters.product.id){ + this.$notify({showClose:true,message:"请先选择产品",type:'warning'}) + return; } - this.selectParentTaskVisible=true - }else{ - this.$notify({showClose:true,message:"请先选择项目",type:'warning'}) } + this.selectParentTaskVisible=true }, onSelectedParentTask(task){ diff --git a/src/views/xm/core/xmTask/XmTaskMngBatch.vue b/src/views/xm/core/xmTask/XmTaskMngBatch.vue index 445bfeab..9b57e21c 100644 --- a/src/views/xm/core/xmTask/XmTaskMngBatch.vue +++ b/src/views/xm/core/xmTask/XmTaskMngBatch.vue @@ -225,6 +225,7 @@ :visible="batchExecUserSelectVisible" :sel-project="selProject" :isSelectSingleUser="1" + :ptype="ptype" @user-confirm="batchExecUserSelectConfirm" > @@ -240,6 +241,7 @@ :visible="batchGroupUserSelectVisible" :sel-project="selProject" :isSelectSingleUser="1" + :ptype="ptype" @user-confirm="batchCreateUserSelectConfirm" >