From 57c74529e385717119a4d81eae28508dc3be3a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Sat, 6 Jan 2024 17:38:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/base/processStation/index.vue | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/views/base/processStation/index.vue b/src/views/base/processStation/index.vue index b43a10f..96fcaab 100644 --- a/src/views/base/processStation/index.vue +++ b/src/views/base/processStation/index.vue @@ -285,11 +285,25 @@ export default { findStationList: [], }; }, - created() { + async created() { if (this.$route.params != null) { this.queryParams.productLineCode = this.$route.params && this.$route.params.productLineCode; } - this.getList(); + + this.loading = true; + await findProductLineList({productLineType: 1}).then(response => { + this.productLineList = response.data; + this.queryParams.productLineCode = 'CX_02' + }) + await findProductLineList({productLineType: 2}).then(response => { + this.findStationList = response.data; + }); + await listProcessStation(this.queryParams).then(response => { + this.processStationList = response.rows; + this.total = response.total; + this.loading = false; + }); + }, methods: { /** 查询生产工序/工位信息列表 */ @@ -297,16 +311,15 @@ export default { this.loading = true; await findProductLineList({productLineType: 1}).then(response => { this.productLineList = response.data; - this.queryParams.productLineCode = response.data.find(val => val.productLineName === '一产线')?.productLineCode }) + await findProductLineList({productLineType: 2}).then(response => { + this.findStationList = response.data; + }); await listProcessStation(this.queryParams).then(response => { this.processStationList = response.rows; this.total = response.total; this.loading = false; }); - findProductLineList({productLineType: 2}).then(response => { - this.findStationList = response.data; - }); }, // 取消按钮 cancel() {