@@ -207,16 +200,10 @@
-
{{scope.row.seqNo}} {{scope.row.menuName}}
+
{{scope.row.seqNo}} {{scope.row.menuName}}
-
-
-
-
-
-
-
-
+
+
@@ -444,7 +431,7 @@
import { mapGetters } from 'vuex'
export default {
- props:['selProject','xmIteration','xmProduct','disabledMng'],
+ props:['selProject','xmIteration','xmProduct','disabledMng','parentMenu'],
computed: {
...mapGetters([
'userInfo','roles'
@@ -469,6 +456,10 @@
selProject:function(){
this.getXmMenus();
}
+ ,
+ "parentMenu.menuId":function(){
+ this.searchXmMenus();
+ }
},
data() {
const beginDate = new Date();
@@ -489,7 +480,7 @@
dtype:'',
priority:'',
source:'',
- dclasss:[],
+ dclasss:['3'],
menuId:'',//需求编号
productId:'',//产品编号
},
@@ -533,8 +524,7 @@
//编辑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'
- },
- parentMenu:null,
+ },
menuTemplateVisible:false,
valueChangeRows:[],
menuDetailVisible:false,
@@ -671,6 +661,9 @@
if(this.filters.productId){
params.productId=this.filters.productId
}
+ if(this.parentMenu && this.parentMenu.menuId){
+ params.pmenuId=this.parentMenu.menuId
+ }
return params;
},
loadXmMenusLazy(tree, treeNode, resolve) {
@@ -713,8 +706,7 @@
if( this.filters.product && this.filters.product.id){
params.productId=this.filters.product.id
}
- params=this.getParams(params);
- params.withParents="1"
+ params=this.getParams(params);
let callback= (res)=>{
var tips=res.data.tips;
if(tips.isOk){
@@ -742,14 +734,12 @@
//显示新增界面 XmMenu xm_project_menu
showAdd: function (dclass) {
this.addForm={...this.addFormInit}
- if(this.filters.product && this.filters.product.id){
- this.parentMenu=null;
+ 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.parentMenu=null;
+ }else 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
@@ -764,10 +754,9 @@
//this.addForm=Object.assign({}, this.editForm);
},
showSubAdd:function(row){
-
+
this.addForm={...this.addFormInit}
- this.editForm=row
- this.parentMenu=row
+ this.editForm=row
this.expandRowKeysCpd.push(row.pmenuId);
this.addForm.productId=row.productId
if(this.filters.product && row.productId==this.filters.product.id){
@@ -788,21 +777,14 @@
},
afterAddSubmit(row){
this.addFormVisible=false;
- this.pageInfo.count=true;
- //this.getXmMenus();
+ this.pageInfo.count=true;
this.xmMenus.push(row);
if(this.parentMenu){
this.parentMenu.childrenCnt=this.parentMenu.childrenCnt?this.parentMenu.childrenCnt+1:1;
- }
- treeTool.reloadAllChildren(this.$refs.table,this.maps,[row,{...this.parentMenu}],'pmenuId',this.loadXmMenusLazy)
-
- this.parentMenu=null;
-
+ }
},
afterEditSubmit(row){
- this.editFormVisible=false;
- //this.getXmMenus();
- treeTool.reloadChildren(this.$refs.table,this.maps,row.pmenuId,'pmenuId',this.loadXmMenusLazy)
+ this.editFormVisible=false;
},
//选择行xmMenu
selsChange: function (sels) {
@@ -841,10 +823,8 @@
this.load.del=false;
var tips=res.data.tips;
if(tips.isOk){
- this.pageInfo.count=true;
-
- treeTool.reloadChildren(this.$refs.table,this.maps,row.pmenuId,'pmenuId',this.loadXmMenusLazy)
- this.getXmMenus();
+ this.pageInfo.count=true;
+ this.getXmMenus();
}
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' });
@@ -867,8 +847,7 @@
if( tips.isOk ){
this.pageInfo.count=true;
this.getXmMenus();
- treeTool.reloadAllChildren(this.$refs.table,this.maps,this.sels,'pmenuId',this.loadXmMenusLazy)
- }
+ }
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error'});
}).catch( err => this.load.del=false );
});
@@ -984,10 +963,7 @@
this.load.add=false
var tips =res.data.tips
if(tips.isOk){
- this.getXmMenus()
- if(this.parentMenu && this.parentMenu.menuId){
- treeTool.reloadAllChildren(this.$refs.table,this.maps,this.parentMenu.menuId,'pmenuId',this.loadXmMenusLazy)
- }
+ this.getXmMenus()
}else{
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: 'error' });
}
@@ -1131,9 +1107,7 @@
batchChangeParentMenu(params).then(res=>{
var tips = res.data.tips;
if(tips.isOk){
- this.searchXmMenus();
- var rows=[...this.sels,{menuId:'',pmenuId:menu.menuId}]
- treeTool.reloadAllChildren(this.$refs.table,this.maps,rows,'pmenuId',this.loadXmMenusLazy)
+ this.searchXmMenus();
}
this.$notify({position:'bottom-left',showClose:true,message:tips.msg,type:tips.isOk?'success':'error'})
})
@@ -1339,8 +1313,7 @@
onEditSomeFields(params){
Object.assign(this.editForm,params)
},
- onAddSubMenu(row){
- treeTool.reloadAllChildren(this.$refs.table,this.maps,[this.editForm,row],'pmenuId',this.loadXmMenusLazy)
+ onAddSubMenu(row){
}
},//end methods
diff --git a/src/views/xm/core/xmProduct/XmProductInfo.vue b/src/views/xm/core/xmProduct/XmProductInfo.vue
index e8adb246..3ac996c9 100644
--- a/src/views/xm/core/xmProduct/XmProductInfo.vue
+++ b/src/views/xm/core/xmProduct/XmProductInfo.vue
@@ -159,7 +159,7 @@
-
+
@@ -211,8 +211,7 @@
import xmBudget from '../xmProject/XmProjectBudgetCost';
import xmContract from '../xmContract/XmContractMng';
import xmEnvList from '../xmProjectEnvList/XmProjectEnvListMng';
- import xmPhaseForProduct from '../xmPhase/xmPhaseForProduct';
- import xmMenuMng from '../xmMenu/XmMenuMng';
+ import xmPhaseForProduct from '../xmPhase/xmPhaseForProduct';
import xmMenuWithPlan from '../xmMenu/XmMenuWithPlan';
import xmProjectStateMng from '../xmProjectState/XmProjectStateMng';
import xmTestCaseExecMng from '../xmTestCaseExec/XmTestCaseExecMng';
@@ -222,6 +221,7 @@
import XmProjectForLink from '../xmProject/XmProjectForLink.vue';
import XmReport from '@/views/xm/rpt/reportIndex';
+import XmMenuBox from '../xmMenu/XmMenuBox.vue';
export default {
@@ -442,7 +442,7 @@
xmBudget,
xmContract,
xmEnvList,
- xmMenuMng,
+ XmMenuBox,
xmMenuWithPlan,
xmProjectStateMng,
xmTestCaseExecMng,
@@ -454,6 +454,7 @@
XmProjectForLink,
XmReport,
xmPlan,
+XmMenuBox,
//在下面添加其它组件
},
mounted() {