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() {