修改接口

master
夜笙歌 11 months ago
parent 2099abb970
commit 57c74529e3

@ -285,11 +285,25 @@ export default {
findStationList: [], findStationList: [],
}; };
}, },
created() { async created() {
if (this.$route.params != null) { if (this.$route.params != null) {
this.queryParams.productLineCode = this.$route.params && this.$route.params.productLineCode; 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: { methods: {
/** 查询生产工序/工位信息列表 */ /** 查询生产工序/工位信息列表 */
@ -297,16 +311,15 @@ export default {
this.loading = true; this.loading = true;
await findProductLineList({productLineType: 1}).then(response => { await findProductLineList({productLineType: 1}).then(response => {
this.productLineList = response.data; 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 => { await listProcessStation(this.queryParams).then(response => {
this.processStationList = response.rows; this.processStationList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
findProductLineList({productLineType: 2}).then(response => {
this.findStationList = response.data;
});
}, },
// //
cancel() { cancel() {

Loading…
Cancel
Save