Browse Source

优化

master
陈裕财 3 years ago
parent
commit
c8362a0762
  1. 5
      src/views/xm/core/xmMenu/XmMenuAdd.vue
  2. 16
      src/views/xm/core/xmMenu/XmMenuBox.vue
  3. 24
      src/views/xm/core/xmMenu/XmMenuMng.vue
  4. 1
      src/views/xm/core/xmTask/XmTaskAdd.vue

5
src/views/xm/core/xmMenu/XmMenuAdd.vue

@ -13,7 +13,7 @@
</template>
<el-input v-model="addForm.menuName" placeholder="名称" title="名称">
</el-input>
<el-row class="label-font-color">归属产品{{ addForm.productName}} &nbsp;&nbsp;产品编号{{ addForm.productId }}</el-row>
<el-row class="label-font-color"><span v-if="addForm.productName">归属产品{{ addForm.productName}} &nbsp;&nbsp;|&nbsp;&nbsp;</span><span v-if="addForm.productId"> 产品编号{{ addForm.productId }}&nbsp;&nbsp;|&nbsp;&nbsp;</span><span v-if=" addForm.iterationName ">迭代名称:{{addForm.iterationName}}&nbsp;&nbsp;|&nbsp;&nbsp;</span><span v-if="addForm.iterationId">迭代编号{{addForm.iterationId}}</span></el-row>
</el-form-item>
<el-row class="padding">
<el-col :span="8">
@ -159,7 +159,7 @@
//
addForm: {
menuId:'',menuName:'',pmenuId:'',productId:'',remark:'',status:'0',online:'',demandUrl:'',codeUrl:'',designUrl:'',docUrl:'',helpUrl:'',operDocUrl:'',seqNo:'1',mmUserid:'',mmUsername:'',ntype:'0',childrenCnt:0,sinceVersion:'',
proposerId:'',proposerName:'',dlvl:'0',dtype:'0',priority:'0',source:'1',dclass:'3',
proposerId:'',proposerName:'',dlvl:'0',dtype:'0',priority:'0',source:'1',dclass:'3',productName:'',iterationName:''
},
proposerSelectVisible:false,
mmUserSelectVisible:false,
@ -252,6 +252,7 @@
},
/**end 在上面加自定义方法**/
initData(){
debugger;
Object.assign(this.addForm, this.xmMenu);
this.addForm.mmUserid=this.userInfo.userid
this.addForm.mmUsername=this.userInfo.username

16
src/views/xm/core/xmMenu/XmMenuBox.vue

@ -7,10 +7,10 @@
<xm-product-select ref="xmProductSelect1" style="display:inline;" :auto-select="true" :link-project-id="selProject?selProject.id:null" @row-click="onProductSelected" @clear="onProductClearSelect" ></xm-product-select>
</el-row>
-->
<xm-epic-features :xm-product="xmProduct" :sel-project="selProject" @row-click="onEpicFeaturesRowClick" :disabled-mng="xmIteration&&xmIteration.id?true:false" @product-selected="onProductSelected" @product-clear="onProductClearSelect"></xm-epic-features>
<xm-epic-features :xm-product="xmProduct" :sel-project="selProject" @row-click="onEpicFeaturesRowClick" @product-selected="onProductSelected" @product-clear="onProductClearSelect"></xm-epic-features>
</el-col>
<el-col :span="16" v-if="filters.xmProduct && filters.xmProduct.id">
<xm-menu-mng class="padding-left" :xm-product="filters.xmProduct" :sel-project="selProject" :parent-menu="parentMenu" :xm-iteration="xmIteration" :disabled-mng="xmIteration&&xmIteration.id?true:false"></xm-menu-mng>
<xm-menu-mng class="padding-left" :xm-product="filters.xmProduct" :sel-project="selProject" :parent-menu="parentMenu" :xm-iteration="xmIteration" ></xm-menu-mng>
</el-col>
</el-row>
</section>
@ -39,12 +39,15 @@
watch: {
xmProduct:{
handler(){
this.filters.xmProduct=this.xmProduct
this.filters.xmProduct={...this.xmProduct}
},
deep:true,
},
xmIteration:{
handler(){
if(this.xmProduct && this.xmProduct.id){
return;
}
this.filters.xmProduct={id:this.xmIteration.productId,productName:this.xmIteration.productName}
},
deep:true,
@ -73,7 +76,12 @@
}
},//end method
mounted() {
this.filters.xmProduct=this.xmProduct
this.filters.xmProduct={...this.xmProduct}
if(this.xmIteration && this.xmIteration.id){
if(!this.xmProduct || !this.xmProduct.id){
this.filters.xmProduct={id:this.xmIteration.productId,productName:this.xmIteration.productName}
}
}
}//end mounted
}

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

@ -526,15 +526,15 @@
addFormVisible: false,//xmMenu
//xmMenu
addForm: {
menuId:'',menuName:'',pmenuId:'',productId:'',remark:'',status:'0',online:'',demandUrl:'',codeUrl:'',designUrl:'',docUrl:'',helpUrl:'',operDocUrl:'',ntype:'0',childrenCnt:0,sinceVersion:'',proposerId:'',proposerName:'',dlvl:'0',dtype:'0',priority:'0',source:'1'
menuId:'',menuName:'',pmenuId:'',productId:'',remark:'',status:'0',online:'',demandUrl:'',codeUrl:'',designUrl:'',docUrl:'',helpUrl:'',operDocUrl:'',ntype:'0',childrenCnt:0,sinceVersion:'',proposerId:'',proposerName:'',dlvl:'0',dtype:'0',priority:'0',source:'1',productName:'',iterationName:''
},
addFormInit: {
menuId:'',menuName:'',pmenuId:'',productId:'',remark:'',status:'',online:'',demandUrl:'',codeUrl:'',designUrl:'',docUrl:'',helpUrl:'',operDocUrl:'',ntype:'0',childrenCnt:0,sinceVersion:'',proposerId:'',proposerName:'',dlvl:'0',dtype:'0',priority:'0',source:'1'
menuId:'',menuName:'',pmenuId:'',productId:'',remark:'',status:'',online:'',demandUrl:'',codeUrl:'',designUrl:'',docUrl:'',helpUrl:'',operDocUrl:'',ntype:'0',childrenCnt:0,sinceVersion:'',proposerId:'',proposerName:'',dlvl:'0',dtype:'0',priority:'0',source:'1',productName:'',iterationName:''
},
editFormVisible: false,//
//xmMenu
editForm: {
menuId:'',menuName:'',pmenuId:'',productId:'',remark:'',status:'',online:'',demandUrl:'',codeUrl:'',designUrl:'',docUrl:'',helpUrl:'',operDocUrl:'',ntype:'0',childrenCnt:0,sinceVersion:'',proposerId:'',proposerName:'',dlvl:'0',dtype:'0',priority:'0',source:'1'
menuId:'',menuName:'',pmenuId:'',productId:'',remark:'',status:'',online:'',demandUrl:'',codeUrl:'',designUrl:'',docUrl:'',helpUrl:'',operDocUrl:'',ntype:'0',childrenCnt:0,sinceVersion:'',proposerId:'',proposerName:'',dlvl:'0',dtype:'0',priority:'0',source:'1',productName:'',iterationName:''
},
menuTemplateVisible:false,
valueChangeRows:[],
@ -758,23 +758,27 @@
this.editFormVisible = true;
},
// XmMenu xm_project_menu
showAdd: function (dclass) {
showAdd: function (dclass) {
this.addForm={...this.addFormInit}
if(this.filters.product && this.filters.product.id){
this.addForm.productId=this.filters.product.id
this.addForm.productName=this.filters.product.productName
this.addForm.dclass=dclass
this.addFormVisible = true;
}else if(this.filters.iteration && this.filters.iteration.id){
this.addForm.productId=this.filters.iteration.productId
this.addForm.dclass=dclass
}
if(this.filters.iteration && this.filters.iteration.id){
this.addForm.productId=this.filters.iteration.productId
this.addForm.iterationId=this.filters.iteration.id
this.addForm.iterationName=this.filters.iteration.iterationName
this.addForm.dclass=dclass
this.addFormVisible = true;
}else{
}
if(!this.addForm.productId){
this.$refs.xmProductSelect1.productVisible=true;
this.$refs.xmProductSelect1.searchXmProducts();
this.$notify({position:'bottom-left',showClose:true,message: "请先选择一个产品", type: 'warning'});
}else{
this.addFormVisible = true;
}
//this.addForm=Object.assign({}, this.editForm);

1
src/views/xm/core/xmTask/XmTaskAdd.vue

@ -344,6 +344,7 @@
if(this.xmIteration && this.xmIteration.id){
if(!this.addForm.menuId){
this.$notify({position:'bottom-left',showClose:true,message:'在迭代视图中添加任务需要关联需求!请选择需求',type: 'error'})
this.activateTabPaneName="3"
this.menuVisible=true;
return;
}

Loading…
Cancel
Save