diff --git a/src/views/xm/core/xmProjectState/XmProjectStateMng.vue b/src/views/xm/core/xmProjectState/XmProjectStateMng.vue index 777c3c0a..ba2c83a7 100644 --- a/src/views/xm/core/xmProjectState/XmProjectStateMng.vue +++ b/src/views/xm/core/xmProjectState/XmProjectStateMng.vue @@ -1,14 +1,11 @@ @@ -134,7 +131,7 @@ props:['selProject'], watch:{ selProject:function(selProject,old){ - this.filters.selProject=this.selProject + this.filters.selProject={...this.selProject} this.getXmProjectStates() } }, @@ -142,7 +139,7 @@ return { filters: { key: '', - selProject:null, + selProject:{name:'',id:''}, }, xmProjectStates: [],//查询结果 pageInfo:{//分页数据 @@ -174,6 +171,7 @@ selectProjectVisible:false, /**begin 自定义属性请在下面加 请加备注**/ maxTableHeight:300, + nextCommand:null, /**end 自定义属性请在上面加 请加备注**/ } },//end data @@ -297,8 +295,9 @@ }); }, loadProjectToXmProjectState: function () { - if(!this.filters.selProject){ - this.$notify({showClose: true, message: '请选择一个项目', type: 'error'}); + if(!this.filters.selProject||!this.filters.selProject.id){ + this.$notify({showClose: true, message: '请选择一个项目', type: 'warning'}); + this.showProjectList(this.loadBugsToXmProjectState); return; } @@ -315,8 +314,9 @@ }).catch( err => this.load.edit=false ); }, loadBugsToXmProjectState: function () { - if(!this.filters.selProject){ - this.$notify({showClose: true, message: '请选择一个项目', type: 'error'}); + if(!this.filters.selProject||!this.filters.selProject.id){ + this.$notify({showClose: true, message: '请选择一个项目', type: 'warning'}); + this.showProjectList(this.loadBugsToXmProjectState); return; } @@ -333,8 +333,10 @@ }).catch( err => this.load.edit=false ); }, loadTasksToXmProjectState: function () { - if(!this.filters.selProject){ - this.$notify({showClose: true, message: '请选择一个项目', type: 'error'}); + if(!this.filters.selProject||!this.filters.selProject.id){ + this.$notify({showClose: true, message: '请选择一个项目', type: 'warning'}); + + this.showProjectList(this.loadTasksToXmProjectState); return; } @@ -350,9 +352,10 @@ this.$notify({showClose: true, message: tips.msg, type: tips.isOk?'success':'error'}); }).catch( err => this.load.edit=false ); }, - loadTasksSettleToXmProjectState: function () { - if(!this.filters.selProject){ - this.$notify({showClose: true, message: '请选择一个项目', type: 'error'}); + loadTasksSettleToXmProjectState: function () { + if(!this.filters.selProject||!this.filters.selProject.id){ + this.$notify({showClose: true, message: '请选择一个项目', type: 'warning'}); + this.showProjectList(this.loadTasksSettleToXmProjectState); return; } @@ -374,15 +377,25 @@ /**begin 自定义函数请在下面加**/ onPorjectConfirm:function(project){ - this.filters.selProject=project - this.selectProjectVisible=false; - this.getXmProjectStates(); + this.filters.selProject={...project} + this.selectProjectVisible=false; + if(this.nextCommand){ + this.nextCommand(); + }else{ + this.searchXmProjectStates(); + } + }, + + onProjectInputClick:function(){ + this.selectProjectVisible=true; + this.nextCommand=null; }, - showProjectList:function(){ + showProjectList:function(nextCommand){ this.selectProjectVisible=true; + this.nextCommand=nextCommand; }, - closeSelectProject:function(){ - this.filters.selProject=null + closeSelectProject:function(){ + this.filters.selProject={name:'',id:''} }, formatterOption: function(row,column,cellValue, index){