This commit is contained in:
helloDy
2024-03-22 10:27:57 +08:00
parent e211e585af
commit 99fd016703
20 changed files with 417 additions and 212 deletions

View File

@@ -92,23 +92,34 @@ export default {
});
if (code == 0) {
this.listLine = data;
return;
} else {
this.listLine.splice(0);
}
this.listLine.splice(0);
},
async getEquipmentByLineId(id) {
const { data, code } = await this.$axios({
url: '/base/core-equipment/listByLine',
params: {
id,
},
// 获得全部设备
const res = await this.$axios({
url: '/base/core-equipment/listAll',
});
if (code == 0) {
this.listEq = data;
if (res.code == 0) {
this.listEq = res.data;
return;
}
this.listEq.splice(0);
},
async getEquipmentByLineId(id) {
if (id) {
const { data, code } = await this.$axios({
url: '/base/core-equipment/listByLine',
params: {
id,
},
});
if (code == 0) {
this.listEq = data;
return;
}
this.listEq.splice(0);
}
},
handleSearch() {
this.$emit('action', {
action: 'search',