From 249af1897c3c7909bd595231a2e8355ad052912d Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 23 Apr 2025 10:53:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=97=A5=E5=BF=97=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=8F=AD=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_gx/f_mlogs_form.vue | 55 +++++++++++++++--- src/views/wpm_gx/mlog_form.vue | 94 ++++++++++++++++++++++++++----- 2 files changed, 125 insertions(+), 24 deletions(-) diff --git a/src/views/wpm_gx/f_mlogs_form.vue b/src/views/wpm_gx/f_mlogs_form.vue index f15bca2f..3ee3553f 100644 --- a/src/views/wpm_gx/f_mlogs_form.vue +++ b/src/views/wpm_gx/f_mlogs_form.vue @@ -40,23 +40,25 @@ - + + > + + + + + + + + + { + that.teamOptions = res; + }); + }, + teamChange(){ + let that = this; + that.$API.mtm.teammember.list.req({team:that.form.team,page:0}).then((res) => { + that.userOptions = res; + }); + }, //获取操作项 gettestitem(){ let that = this; @@ -404,6 +440,7 @@ export default { that.$API.mtm.mgroup.item.req(that.mgroup).then((res) => { that.deptId = res.belong_dept; that.mgroupName = res.name; + this.getTeam(); that.getEquipment(); that.getUserList(); }); diff --git a/src/views/wpm_gx/mlog_form.vue b/src/views/wpm_gx/mlog_form.vue index 5ae2abfa..dd3fde2d 100644 --- a/src/views/wpm_gx/mlog_form.vue +++ b/src/views/wpm_gx/mlog_form.vue @@ -77,23 +77,19 @@ - + - {{item.name}} - {{item.number}} @@ -137,13 +133,50 @@ - + + + + + + + + + + + {{item.name}} + {{item.number}} + + @@ -341,6 +374,7 @@ export default { visible: false, isSaveing: false, options: [], + teamOptions:[], routeOptions: [], userOptions: [], supplierOptions: [], @@ -348,8 +382,9 @@ export default { }; }, mounted() { + this.getUser(); this.getRoute(); - // this.getUser(); + this.getTeam(); this.getSupplier(); this.getEquipment(); this.gettestitem(); @@ -358,6 +393,21 @@ export default { }, methods: { + getTeam() { + let that = this; + let form = {}; + form.page = 0; + form.belong_dept = this.dept; + that.$API.mtm.team.list.req(form).then((res) => { + that.teamOptions = res; + }); + }, + teamChange(){ + let that = this; + that.$API.mtm.teammember.list.req({team:that.form.team,page:0}).then((res) => { + that.userOptions = res; + }); + }, //获取操作项 gettestitem(){ let that = this; @@ -373,10 +423,24 @@ export default { disabledDateFn(time) { return time.getTime() > new Date().getTime(); }, - //获取 + // //获取 getUser() { - this.$API.system.user.list.req({ depts: this.dept }).then((res) => { - this.userOptions = res.results; + let that = this; + let userInfo = that.$TOOL.data.get("USER_INFO"); + this.$API.system.user.list.req({ depts: that.dept, page: 0 }).then((res) => { + that.userOptions = res; + let arr = res.filter(item=>{ + return item.id==userInfo.id; + }) + if(arr.length>0){ + that.form.handle_user = userInfo.id; + }else{ + let obj = {}; + obj.id = userInfo.id; + obj.name = userInfo.name; + that.userOptions.push(obj) + that.form.handle_user = userInfo.id; + } }); }, getEquipment() {