diff --git a/src/views/wpm_gx/mtask.vue b/src/views/wpm_gx/mtask.vue index 6fd2d0e4..4223eb7a 100644 --- a/src/views/wpm_gx/mtask.vue +++ b/src/views/wpm_gx/mtask.vue @@ -146,16 +146,17 @@ export default { that.$API.mtm.mgroup.list .req({ page: 0, name: that.mgroupName }) .then((res) => { - if(res.length != 1){ + if(res.length>0){ + that.mgroupId = res[0].id; + that.deptId = res[0].belong_dept; + that.processId = res[0].process; + that.processCate = res[0].process_cate; + that.params.mgroup = res[0].id; + that.apiObj = this.$API.pm.mtask.list; + }else{ that.$message.error("获取工段错误"); return; } - that.mgroupId = res[0].id; - that.deptId = res[0].belong_dept; - that.processId = res[0].process; - that.processCate = res[0].process_cate; - that.params.mgroup = res[0].id; - that.apiObj = this.$API.pm.mtask.list; }); }, methods: {