diff --git a/src/views/xm/core/xmIteration/XmIterationForProjectComplex.vue b/src/views/xm/core/xmIteration/XmIterationForProjectComplex.vue index 59d21ba3..786902b2 100644 --- a/src/views/xm/core/xmIteration/XmIterationForProjectComplex.vue +++ b/src/views/xm/core/xmIteration/XmIterationForProjectComplex.vue @@ -3,17 +3,31 @@ - +
- + {{xmIteration?xmIteration.iterationName:'选择迭代'}}
+ + + +
+ + + 迭代 + +
+
@@ -59,6 +73,7 @@ import XmQuestionMng from '../xmQuestion/XmQuestionMng.vue'; import XmIterationOverview from "./XmIterationOverview"; + import XmIterationAdd from './XmIterationAdd';//新增界面 export default { computed: { @@ -128,7 +143,7 @@ moduleType : '1' // 模块类型,1-系统类模块 2-系统外模块 } ], - iterationVisible:true, + iterationAddVisible:false, /**end 自定义属性请在上面加 请加备注**/ } },//end data @@ -143,30 +158,14 @@ onIterationClearSelect(){ this.xmIteration=null; }, - tabClick(tab){ - if(this.xmIteration==null || !this.xmIteration.id){ - this.iterationVisible=true; - this.$notify({showClose: true, message:"请先选中左边迭代", type: 'warning' }); - return; - } - - if(tab.name=='iterations'){ - this.iterationVisible=!this.iterationVisible; - return; - } - this.showPanel=tab.name + afterIterationAddSubmit(iteration){ + this.$refs.xmIterationSelect.xmIterations.push(iteration) + this.$refs.xmIterationSelect.rowClick(iteration); + this.iterationAddVisible=false; }, - doDelXmIterationLink(){ - this.$confirm('移出后,迭代试图将看不到该产品信息,确认将产品【'+this.xmProduct.productName+'】从迭代【'+this.xmIteration.iterationName+'】移出吗?', '提示', {}).then(() => { - var params={iterationId:this.xmIteration.id,productId:this.xmProduct.id} - delXmIterationLink(params).then(res=>{ - var tips = res.data.tips; - if(tips.isOk){ - this.$notify({showClose: true, message:"移出成功", type: tips.isOk?'success':'error' }); - } - }) - }) - } + tabClick(tab){ + this.showPanel=tab.name + }, },//end methods components: { XmIterationOverview, @@ -178,6 +177,7 @@ XmTaskMng, XmQuestionMng, XmProjectForLink, + XmIterationAdd, }, mounted() { this.$nextTick(() => { diff --git a/src/views/xm/core/xmProduct/XmProductAdd.vue b/src/views/xm/core/xmProduct/XmProductAdd.vue index cc530f11..ad5f3946 100644 --- a/src/views/xm/core/xmProduct/XmProductAdd.vue +++ b/src/views/xm/core/xmProduct/XmProductAdd.vue @@ -66,14 +66,17 @@ 'userInfo','roles' ]) }, - props:['xmProduct','visible'], + props:['xmProduct','visible','selProject'], watch: { 'xmProduct':function( xmProduct ) { this.addForm = xmProduct; }, 'visible':function(visible) { - if(visible==true){ - //从新打开页面时某些数据需要重新加载,可以在这里添加 + if(visible==true){ + this.addForm.pmUserid=this.userInfo.userid + this.addForm.pmUsername=this.userInfo.username + this.addForm.admUserid=this.userInfo.userid + this.addForm.admUsername=this.userInfo.username } } }, @@ -111,15 +114,10 @@ methods: { // 取消按钮点击 父组件监听@cancel="addFormVisible=false" 监听 handleCancel:function(){ - this.$refs['addForm'].resetFields(); this.$emit('cancel'); }, //新增提交XmProduct 产品表 父组件监听@submit="afterAddSubmit" addSubmit: function () { - if(!this.roles.some(i=>i.roleid=='productAdmin')){ - this.$notify({showClose: true, message: "只有产品经理能够创建产品", type: 'error'}); - return false; - } this.$refs.addForm.validate((valid) => { if (valid) { @@ -127,6 +125,9 @@ this.$confirm('确认提交吗?', '提示', {}).then(() => { this.load.add=true let params = Object.assign({}, this.addForm); + if(this.selProject &&this.selProject.id){ + params.links=[{projectId:this.selProject.id}] + } params.branchId=this.userInfo.branchId addXmProduct(params).then((res) => { this.load.add=false @@ -138,6 +139,8 @@ this.$notify({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' }); }).catch( err => this.load.add=false); }); + }else{ + this.$notify({showClose: true, message: "表单检查不通过", type: 'error' }); } }); }, @@ -188,6 +191,8 @@ this.addForm=Object.assign(this.addForm, this.xmProduct); this.addForm.pmUserid=this.userInfo.userid this.addForm.pmUsername=this.userInfo.username + this.addForm.admUserid=this.userInfo.userid + this.addForm.admUsername=this.userInfo.username /**在下面写其它函数***/ }//end mounted diff --git a/src/views/xm/core/xmProduct/XmProductForProjectComplex.vue b/src/views/xm/core/xmProduct/XmProductForProjectComplex.vue index 823e8a0a..d72ecb66 100644 --- a/src/views/xm/core/xmProduct/XmProductForProjectComplex.vue +++ b/src/views/xm/core/xmProduct/XmProductForProjectComplex.vue @@ -9,11 +9,23 @@ placement="right" width="400" trigger="click"> - + {{xmProduct?xmProduct.productName:'选择产品'}}
+ +
+ + + 产品 + +
+
@@ -62,6 +74,7 @@ import XmProductSelect from './XmProductSelect.vue'; import XmProductProjectForLink from './XmProductProjectForLink.vue'; import XmProductOverview from "./XmProductOverview"; + import XmProductAdd from './XmProductAdd';//新增界面 export default { computed: { @@ -132,6 +145,7 @@ import XmProductOverview from "./XmProductOverview"; } ], productVisible:true, + addProductVisible:false, /**end 自定义属性请在上面加 请加备注**/ } },//end data @@ -142,7 +156,11 @@ import XmProductOverview from "./XmProductOverview"; this.xmProduct=xmProduct }, - + afterAddProductSubmit(product){ + this.$refs.xmProductSelect.xmProducts.push(product) + this.$refs.xmProductSelect.rowClick(product) + this.addProductVisible=false; + }, onProductClearSelect(){ this.xmProduct=null; }, @@ -166,7 +184,7 @@ import XmProductOverview from "./XmProductOverview"; XmProjectList, XmProjectForLink, XmProductProjectForLink, - XmProductOverview, + XmProductOverview,XmProductAdd, }, mounted() { this.$nextTick(() => {