diff --git a/src/views/xm/core/components/MdpSelectUserXm/index.vue b/src/views/xm/core/components/MdpSelectUserXm/index.vue index 98629705..f54f7df3 100644 --- a/src/views/xm/core/components/MdpSelectUserXm/index.vue +++ b/src/views/xm/core/components/MdpSelectUserXm/index.vue @@ -257,6 +257,10 @@ this.deptUserVisible=false; var notHad=false; users.forEach(u=>{ + if(u.obranchId && !u.branchId){ + u.branchId=u.obranchId + u.branchName=u.obranchName + } if(!this.users.some(k=>k.userid==u.userid)){ notHad=true; this.users.unshift(u) diff --git a/src/views/xm/core/xmMenu/XmMenuAdd.vue b/src/views/xm/core/xmMenu/XmMenuAdd.vue index 46210500..85eef2e0 100644 --- a/src/views/xm/core/xmMenu/XmMenuAdd.vue +++ b/src/views/xm/core/xmMenu/XmMenuAdd.vue @@ -16,9 +16,13 @@ 归属产品:{{ addForm.productName}}   |   产品编号:{{ addForm.productId }}  |  迭代名称:{{addForm.iterationName}}  |  迭代编号:{{addForm.iterationId}} - - - + + + 选择上级 + - + - + @@ -83,15 +87,7 @@ - - - - - - - - - + @@ -101,6 +97,10 @@ + + + + @@ -119,6 +119,15 @@ 'userInfo','roles' ]), + xmProductCpd(){ + if(this.parentMenu && this.parentMenu.menuId){ + return {id:this.parentMenu.productId,productName:this.parentMenu.productName} + } + if( this.xmMenu && this.xmMenu.productId){ + return {id:this.xmMenu.productId,productName:this.xmMenu.productName} + } + return null; + }, calcMenuLabel(){ ; var params={label:'用户故事',icon:'el-icon-document',color:' rgb(79, 140, 255)'}; @@ -138,7 +147,7 @@ if(visible==true){ this.initData(); } - } + }, }, data() { return { @@ -164,8 +173,11 @@ addForm: { startTime:'',menuId:'',menuName:'',pmenuId:'',productId:'',remark:'',status:'0',online:'0',demandUrl:'',codeUrl:'',designUrl:'',docUrl:'',helpUrl:'',operDocUrl:'',seqNo:'',mmUserid:'',mmUsername:'',ctime:'',ntype:'0',sinceVersion:'',childrenCnt:'0',ltime:'',tagIds:'',tagNames:'',pidPaths:'',lvl:'0',isTpl:'0',phaseId:'',iterationId:'',source:'1',proposerId:'',proposerName:'',dlvl:'0',dtype:'0',priority:'0',dclass:'',iterationName:'',endTime:'',funcId:'',funcName:'',comments:'',ups:'0',reads:'0' }, - proposerSelectVisible:false, + addFormInit: { + startTime:'',menuId:'',menuName:'',pmenuId:'',productId:'',remark:'',status:'0',online:'0',demandUrl:'',codeUrl:'',designUrl:'',docUrl:'',helpUrl:'',operDocUrl:'',seqNo:'',mmUserid:'',mmUsername:'',ctime:'',ntype:'0',sinceVersion:'',childrenCnt:'0',ltime:'',tagIds:'',tagNames:'',pidPaths:'',lvl:'0',isTpl:'0',phaseId:'',iterationId:'',source:'1',proposerId:'',proposerName:'',dlvl:'0',dtype:'0',priority:'0',dclass:'',iterationName:'',endTime:'',funcId:'',funcName:'',comments:'',ups:'0',reads:'0' + }, mmUserSelectVisible:false, + parentMenuSelectVisible:false, dateRanger:[], /**begin 在下面加自定义属性,记得补上面的一个逗号**/ @@ -183,6 +195,10 @@ this.$notify({position:'bottom-left',showClose:true,message: '请选择产品/或者上级需求进行新增', type:'error' }); return; } + if(this.addForm.dclass==='3' && !this.addForm.pmenuId){ + this.$notify({position:'bottom-left',showClose:true,message: '请选择上级(归属史诗、特性)', type:'error' }); + return; + } this.$refs.addForm.validate((valid) => { if (valid) { @@ -218,32 +234,7 @@ this.$notify({position:'bottom-left',showClose:true,message:"表单检查不通过,请修改后提交", type: 'error' }); } }); - }, - selectProposer(){ - this.proposerSelectVisible=true; - }, - onProposerSelected(users){ - if(users && users.length>0){ - this.addForm.proposerId=users[0].userid - this.addForm.proposerName=users[0].username - } - this.proposerSelectVisible=false - }, - clearProposer:function(){ - this.addForm.proposerId='' - this.addForm.proposerName='' - }, - onMmUserSelected(users){ - if(users && users.length>0){ - this.addForm.mmUserid=users[0].userid - this.addForm.mmUsername=users[0].username - } - this.mmUserSelectVisible=false - }, - clearMmUser:function(){ - this.addForm.mmUserid='' - this.addForm.mmUsername='' - }, + }, /**begin 在下面加自定义方法,记得补上面的一个逗号**/ toFixed(floatValue){ @@ -254,8 +245,8 @@ } }, /**end 在上面加自定义方法**/ - initData(){ - debugger; + initData(){ + this.addForm={...this.addFormInit} Object.assign(this.addForm, this.xmMenu); this.addForm.mmUserid=this.userInfo.userid this.addForm.mmUsername=this.userInfo.username @@ -288,12 +279,18 @@ } } + }, + onParentMenuSelected(pmenu){ + this.addForm.pmenuId=pmenu.menuId + this.addForm.pmenuName=pmenu.menuName + this.parentMenuSelectVisible=false; } },//end method components: { //在下面添加其它组件 'xm-menu-edit':XmMenuEdit - UsersSelect,MdpSelectUserXm, + MdpSelectUserXm, 'xm-menu-edit':()=>import("./XmMenuDetail"), + 'xm-epic-features-select':()=>import("./XmEpicFeaturesSelect"), }, mounted() { diff --git a/src/views/xm/core/xmMenu/XmMenuMng.vue b/src/views/xm/core/xmMenu/XmMenuMng.vue index 5268f828..1e746679 100644 --- a/src/views/xm/core/xmMenu/XmMenuMng.vue +++ b/src/views/xm/core/xmMenu/XmMenuMng.vue @@ -758,13 +758,7 @@ this.editFormVisible = true; }, //显示新增界面 XmMenu xm_project_menu - showAdd: function (dclass) { - if(dclass=='3'){ - if(!this.parentMenu||!this.parentMenu.menuId){ - this.$notify({position:'bottom-left',showClose:true,message: "请先选择上级", type: 'warning'}); - return; - } - } + showAdd: function (dclass) { this.addForm={...this.addFormInit} if(this.filters.product && this.filters.product.id){ this.addForm.productId=this.filters.product.id