From b7580a0fd666707977dac0ae05c88621e00c2c63 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 7 Aug 2026 16:24:46 +0800 Subject: [PATCH] feat(wpm): use recommended equipment selector --- src/api/model/wpm.js | 9 +++++++ src/views/wpm/mlog6_form.vue | 31 ++++++++---------------- src/views/wpm_bx/mlog_form.vue | 37 ++++++++--------------------- src/views/wpm_bx/mlog_form2.vue | 37 ++++++++--------------------- src/views/wpm_gx/f_mlogs_form.vue | 38 ++++++++---------------------- src/views/wpm_gx/mlog_form.vue | 39 +++++++++---------------------- 6 files changed, 60 insertions(+), 131 deletions(-) diff --git a/src/api/model/wpm.js b/src/api/model/wpm.js index 382986cc..090d4312 100644 --- a/src/api/model/wpm.js +++ b/src/api/model/wpm.js @@ -177,6 +177,15 @@ export default { } }, mlog: { + equipmentOptions: { + name: "日志设备选项", + req: async function (data) { + return await http.get( + `${config.API_URL}/wpm/mlog/equipment_options/`, + data + ); + }, + }, list: { name: "列表", req: async function (data) { diff --git a/src/views/wpm/mlog6_form.vue b/src/views/wpm/mlog6_form.vue index 53b2f8c7..a8faf55d 100644 --- a/src/views/wpm/mlog6_form.vue +++ b/src/views/wpm/mlog6_form.vue @@ -127,20 +127,19 @@ - - - + + + + + @@ -427,7 +423,6 @@ export default { userList:[], visible: false, isSaveing: false, - options: [], testitems:[], mlogdefect:[], qct_defects:[], @@ -506,7 +501,6 @@ export default { that.deptId = res.belong_dept; that.mgroupName = res.name; this.getTeam(); - that.getEquipment(); that.getUserList(); }); }, @@ -564,18 +558,6 @@ export default { } } }, - getEquipment() { - let that = this; - that.options = []; - that.$API.em.equipment.list.req({ page: 0, type: 10,mgroup:that.mgroup }).then((res) => { - res.forEach((item) => { - let obj = {}; - Object.assign(obj, item); - obj.label = item.name+'-'+item.number; - that.options.push(obj); - }); - }); - }, getRoute() { let that = this; if(!that.is_fix){//正常生产 diff --git a/src/views/wpm_gx/mlog_form.vue b/src/views/wpm_gx/mlog_form.vue index 1956e00f..e74e7d60 100644 --- a/src/views/wpm_gx/mlog_form.vue +++ b/src/views/wpm_gx/mlog_form.vue @@ -157,24 +157,20 @@ - - - {{item.name}} - {{item.number}} - - + + + + + @@ -375,7 +371,6 @@ export default { is_fix:false, visible: false, isSaveing: false, - options: [], teamOptions:[], routeOptions: [], userOptions: [], @@ -390,7 +385,6 @@ export default { this.getRoute(); this.getTeam(); this.getSupplier(); - this.getEquipment(); this.gettestitem(); let date = new Date(); this.form.work_start_time = this.form.work_end_time = this.$TOOL.dateFormat(date); @@ -447,17 +441,6 @@ export default { } }); }, - getEquipment() { - let that = this; - this.$API.em.equipment.list.req({ page: 0, type: 10,mgroup:that.mgroup}).then((res) => { - res.forEach((item) => { - let obj = {}; - Object.assign(obj, item); - obj.label = item.name+'-'+item.number; - that.options.push(obj); - }); - }); - }, getSupplier() { let that = this; let obj = {};