Browse Source

优化

master
陈裕财 4 years ago
parent
commit
f2e89d37e8
  1. 62
      src/views/xm/core/xmIteration/XmIterationAdd.vue
  2. 1
      src/views/xm/core/xmIteration/XmIterationEdit.vue
  3. 6
      src/views/xm/core/xmIteration/XmIterationForLinkComplex.vue
  4. 30
      src/views/xm/core/xmMenu/XmMenuMng.vue
  5. 4
      src/views/xm/core/xmProduct/XmProductForLinkComplex.vue
  6. 5
      src/views/xm/core/xmProject/XmProjectOverviewComplex.vue

62
src/views/xm/core/xmIteration/XmIterationAdd.vue

@ -3,6 +3,16 @@
<el-row>
<!--新增界面 XmIteration 迭代定义-->
<el-form :model="addForm" label-width="120px" :rules="addFormRules" ref="addForm">
<el-form-item label="归属产品" prop="productId">
<el-popover
placement="bottom"
width="400"
v-model="productSelectVisible"
trigger="manual">
<xm-product-select ref="xmProductSelect" :auto-select="true" :sel-project="selProject" @row-click="onProductRowClick" @clear-select="onProductClearSelect" @close="productSelectVisible=false"></xm-product-select>
<el-link type="warning" @click="productSelectVisible=true" slot="reference" icon="el-icon-search"><font style="font-size:14px;">{{addForm.productId?addForm.productName:'选择产品'}}</font></el-link>
</el-popover>
</el-form-item>
<el-form-item label="迭代名称" prop="iterationName">
<el-input v-model="addForm.iterationName" placeholder="迭代名称" minlength="10"></el-input>
<font color="red">格式如下 上线日期+主题+V版本号 例如 2021.6.15购书商城V1.0.9</font>
@ -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

1
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' });

6
src/views/xm/core/xmIteration/XmIterationForLinkComplex.vue

@ -35,15 +35,9 @@
<el-tab-pane label="迭代详情" lazy name="detail" v-if="xmIteration&&xmIteration.id">
<xm-iteration-edit v-if="showPanel=='detail'" :xm-iteration="xmIteration"></xm-iteration-edit>
</el-tab-pane>
<el-tab-pane label="配置关联产品" lazy name="iterationProductLink" v-if="xmIteration&&xmIteration.id">
<xm-iteration-link-for-product v-if="showPanel=='iterationProductLink'" :xm-iteration="xmIteration" :sel-project="selProject"></xm-iteration-link-for-product>
</el-tab-pane>
<el-tab-pane label="配置需求范围" lazy name="iterationMenuMng" v-if="xmIteration&&xmIteration.id">
<xm-iteration-menu-mng v-if="showPanel=='iterationMenuMng'" :xm-iteration="xmIteration"></xm-iteration-menu-mng>
</el-tab-pane>
<el-tab-pane label="配置关联项目" lazy name="iterationProjectLink" v-if="xmIteration&&xmIteration.id">
<xm-iteration-link-for-project v-if="showPanel=='iterationProjectLink'" :xm-iteration="xmIteration" :xm-product="xmProduct"></xm-iteration-link-for-project>
</el-tab-pane>
<el-tab-pane label="需求列表" lazy name="menus" v-if="xmIteration&&xmIteration.id">
<xm-menu-mng v-if="xmIteration && showPanel=='menus'" :xm-product="xmProduct" :xm-iteration="xmIteration" :sel-project="selProject" :disabled-mng="false"></xm-menu-mng>
</el-tab-pane>

30
src/views/xm/core/xmMenu/XmMenuMng.vue

@ -138,8 +138,22 @@
<el-table-column prop="menuName" label="需求名称" min-width="260" show-overflow-tooltip>
<template slot-scope="scope">
<span class="vlink" @click="showEdit(scope.row)" :class="scope.row.ntype==='1'?'el-icon-folder-opened':''">{{scope.row.seqNo}} &nbsp; {{scope.row.menuName}} </span>
</template>
<div v-if="scope.row.ntype=='0'" class="icon" style="background-color: rgb(79, 140, 255);">
<i class="el-icon-loading"></i>
</div>
<div v-if="scope.row.ntype=='1'" class="icon" style="background-color: rgb(255, 153, 51);">
<i class="el-icon-discover"></i>
</div>
<div v-if="scope.row.ntype=='2'" class="icon" style="background-color: rgb(0, 153, 51);">
<i class="el-icon-s-operation"></i>
</div>
<span class="vlink" @click="showEdit(scope.row)" >{{scope.row.seqNo}} &nbsp; {{scope.row.menuName}} </span>
</template>
</el-table-column>
<el-table-column prop="productId" label="产品" width="100" show-overflow-tooltip>
</el-table-column>
@ -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;
}
</style>

4
src/views/xm/core/xmProduct/XmProductForLinkComplex.vue

@ -37,8 +37,8 @@
</el-tab-pane>
<el-tab-pane label="配置关联的迭代" name="iterationProductLink" v-if="xmProduct && xmProduct.id" >
<xm-iteration-link-for-product v-if="showPanel=='iterationProductLink'" :xm-product="xmProduct"></xm-iteration-link-for-product>
<el-tab-pane label="迭代" name="iterationProductLink" v-if="xmProduct && xmProduct.id" >
<xm-iteration-mng v-if="showPanel=='iterationProductLink'" :xm-product="xmProduct"></xm-iteration-mng>
</el-tab-pane>
<el-tab-pane label="配置关联的项目" lazy name="productProjectLink" v-if="xmProduct && xmProduct.id">
<xm-product-project-link-mng v-if="showPanel=='productProjectLink'" :xm-product="xmProduct"></xm-product-project-link-mng>

5
src/views/xm/core/xmProject/XmProjectOverviewComplex.vue

@ -9,10 +9,7 @@
</el-menu-item>
<el-menu-item index="productProjectLink">
<span slot="title">关联产品</span>
</el-menu-item>
<el-menu-item index="iterationProjectLink">
<span slot="title">关联迭代</span>
</el-menu-item>
</el-menu-item>
<el-menu-item index="projectCalc">
<span slot="title">执行项目数据统计计划</span>
</el-menu-item>

Loading…
Cancel
Save