From f2e89d37e8be15dfcadbe63cf32c79ecf7108753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Tue, 22 Mar 2022 06:42:38 +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 --- .../xm/core/xmIteration/XmIterationAdd.vue | 62 ++++++++++++------- .../xm/core/xmIteration/XmIterationEdit.vue | 1 - .../xmIteration/XmIterationForLinkComplex.vue | 6 -- src/views/xm/core/xmMenu/XmMenuMng.vue | 30 ++++++++- .../xmProduct/XmProductForLinkComplex.vue | 4 +- .../xmProject/XmProjectOverviewComplex.vue | 5 +- 6 files changed, 71 insertions(+), 37 deletions(-) diff --git a/src/views/xm/core/xmIteration/XmIterationAdd.vue b/src/views/xm/core/xmIteration/XmIterationAdd.vue index 2b7bca94..16019711 100644 --- a/src/views/xm/core/xmIteration/XmIterationAdd.vue +++ b/src/views/xm/core/xmIteration/XmIterationAdd.vue @@ -3,6 +3,16 @@ + + + + {{addForm.productId?addForm.productName:'选择产品'}} + + 格式如下: 上线日期+主题+V版本号 例如: 2021.6.15购书商城V1.0.9 @@ -44,6 +54,7 @@ import { mapGetters } from 'vuex' import UsersSelect from "@/views/mdp/sys/user/UsersSelect"; + import XmProductSelect from '../xmProduct/XmProductSelect.vue'; export default { computed: { @@ -51,7 +62,7 @@ 'userInfo','roles' ]) }, - props:['xmIteration','visible','parentIteration','selProject','xmProduct'], + props:['xmIteration','visible', 'selProject','xmProduct'], watch: { 'xmIteration':function( xmIteration ) { this.addForm = xmIteration; @@ -62,6 +73,11 @@ this.addForm.cusername=this.userInfo.username this.addForm.adminUserid=this.userInfo.userid this.addForm.adminUsername=this.userInfo.username; + if(this.xmProduct && this.xmProduct.id){ + + this.addForm.productId=this.xmProduct.id + this.addForm.productName=this.xmProduct.productName; + } } } }, @@ -76,14 +92,18 @@ ], seqNo: [ { required: true, message: '序号不能为空', trigger: 'change' } + ], + productId: [ + { required: true, message: '产品编号不能为空', trigger: 'change' } ] }, //新增界面数据 迭代定义 addForm: { - id:'',branchId:'',iterationName:'',startTime:'',endTime:'',onlineTime:'',pid:'',adminUserid:'',adminUsername:'',ctime:'',budgetCost:'',budgetWorkload:'',distBudgetCost:'',distBudgetWorkload:'',actCost:'',actWorkload:'',actStaffNum:'',seqNo:'', + id:'',branchId:'',iterationName:'',startTime:'',endTime:'',onlineTime:'',pid:'',adminUserid:'',adminUsername:'',ctime:'',budgetCost:'',budgetWorkload:'',distBudgetCost:'',distBudgetWorkload:'',actCost:'',actWorkload:'',actStaffNum:'',seqNo:'',productName:'',productId:'', }, /**begin 在下面加自定义属性,记得补上面的一个逗号**/ userSelectVisible:false, + productSelectVisible:false, /**end 在上面加自定义属性**/ }//end return },//end data @@ -95,24 +115,9 @@ //新增提交XmIteration 迭代定义 父组件监听@submit="afterAddSubmit" addSubmit: function () { this.$refs.addForm.validate((valid) => { - if (valid) { - var links=[]; - var msg=""; - if(this.xmProduct){ - links.push({proId:this.xmProduct.id,ltype:'1'}) - msg="产品【"+this.xmProduct.productName+"】" - - } - - if(this.selProject){ - links.push({proId:this.selProject.id,ltype:'0'}) - if(msg.length>0){ - msg=msg+",项目【"+this.selProject.name+"】" - } - } - var params={...this.addForm} - params.links=links; - this.$confirm('确认提交迭代吗?'+(msg.length>0?'将自动关联'+msg:''), '提示', {}).then(() => { + if (valid) { + var params={...this.addForm} + this.$confirm('确认提交迭代吗?', '提示', {}).then(() => { this.load.add=true addXmIteration(params).then((res) => { this.load.add=false @@ -140,12 +145,22 @@ this.addForm.adminUsername=user.username this.userSelectVisible = false; }, + onProductRowClick(product){ + this.addForm.productId=product.id + this.addForm.productName=product.productName + this.productSelectVisible=false; + }, + onProductClearSelect(){ + this.addForm.productId='' + this.addForm.productName='' + this.productSelectVisible=false; + } /**end 在上面加自定义方法**/ },//end method components: { //在下面添加其它组件 'xm-iteration-edit':XmIterationEdit - UsersSelect + UsersSelect,XmProductSelect, }, mounted() { @@ -154,6 +169,11 @@ this.addForm.cusername=this.userInfo.username this.addForm.adminUserid=this.userInfo.userid this.addForm.adminUsername=this.userInfo.username; + if(this.xmProduct && this.xmProduct.id){ + + this.addForm.productId=this.xmProduct.id + this.addForm.productName=this.xmProduct.productName; + } /**在下面写其它函数***/ }//end mounted diff --git a/src/views/xm/core/xmIteration/XmIterationEdit.vue b/src/views/xm/core/xmIteration/XmIterationEdit.vue index 7fdbb877..1a4a9f98 100644 --- a/src/views/xm/core/xmIteration/XmIterationEdit.vue +++ b/src/views/xm/core/xmIteration/XmIterationEdit.vue @@ -128,7 +128,6 @@ this.load.edit=false var tips=res.data.tips; if(tips.isOk){ - this.$refs['editForm'].resetFields(); this.$emit('submit');// @submit="afterAddSubmit" } this.$notify({showClose: true, message: tips.msg, type: tips.isOk?'success':'error' }); diff --git a/src/views/xm/core/xmIteration/XmIterationForLinkComplex.vue b/src/views/xm/core/xmIteration/XmIterationForLinkComplex.vue index 1b7004c1..6a1528b8 100644 --- a/src/views/xm/core/xmIteration/XmIterationForLinkComplex.vue +++ b/src/views/xm/core/xmIteration/XmIterationForLinkComplex.vue @@ -35,15 +35,9 @@ - - - - - - diff --git a/src/views/xm/core/xmMenu/XmMenuMng.vue b/src/views/xm/core/xmMenu/XmMenuMng.vue index 94212608..8af6fb99 100644 --- a/src/views/xm/core/xmMenu/XmMenuMng.vue +++ b/src/views/xm/core/xmMenu/XmMenuMng.vue @@ -138,8 +138,22 @@ + +
+ +
+ +
+ +
+ +
+ +
+ {{scope.row.seqNo}}   {{scope.row.menuName}} + + +
@@ -1105,5 +1119,15 @@ .align-right{ float: right; } - +.icon { + color: #fff; + height: 20px; + width: 20px; + border-radius: 15px; + text-align: center; + line-height: 20px; + font-size: 14px; + display: inline-block; + margin-right: 5px; +} \ No newline at end of file diff --git a/src/views/xm/core/xmProduct/XmProductForLinkComplex.vue b/src/views/xm/core/xmProduct/XmProductForLinkComplex.vue index d37c3fc0..b5f058d0 100644 --- a/src/views/xm/core/xmProduct/XmProductForLinkComplex.vue +++ b/src/views/xm/core/xmProduct/XmProductForLinkComplex.vue @@ -37,8 +37,8 @@ - - + + diff --git a/src/views/xm/core/xmProject/XmProjectOverviewComplex.vue b/src/views/xm/core/xmProject/XmProjectOverviewComplex.vue index 952bffe7..66f4c967 100644 --- a/src/views/xm/core/xmProject/XmProjectOverviewComplex.vue +++ b/src/views/xm/core/xmProject/XmProjectOverviewComplex.vue @@ -9,10 +9,7 @@ 关联产品 - - - 关联迭代 - + 执行项目数据统计计划