24h,设备

This commit is contained in:
helloDy
2023-11-15 14:30:28 +08:00
parent e6158cd59b
commit 952490f0d4
12 changed files with 230 additions and 120 deletions

View File

@@ -45,6 +45,8 @@ import {
getCorePLPage,
deleteCorePL
} from '@/api/base/coreProductionLine';
import { getStatus } from '@/api/core/base/productionLine';
import codeFilter from '../../core/mixins/code-filter';
const tableProps = [
{
@@ -67,7 +69,7 @@ const tableProps = [
{
prop: 'enabled',
label: '当前状态',
filter: (val) => ['停用', '启用'][val]
filter: codeFilter('lineStatus')
},
{
prop: 'description',
@@ -135,14 +137,28 @@ export default {
created() {},
methods: {
// 获取数据列表
// getDataList() {
// this.dataListLoading = true;
// this.urlOptions.getDataListURL(this.listQuery).then(response => {
// this.tableData = response.data.list;
// this.listQuery.total = response.data.total;
// this.dataListLoading = false;
// });
// },
getDataList() {
this.dataListLoading = true;
this.urlOptions.getDataListURL(this.listQuery).then(response => {
// this.tableData = response.data.list;
this.getStatus(response.data.list)
this.listQuery.total = response.data.total;
this.dataListLoading = false;
});
},
getStatus(list) {
const ids = list.map((i) => {
return i.id;
});
getStatus(ids).then((response) => {
response.forEach((a) => {
list.forEach((b) => {
if (b.id === a.id) b.enabled = a.status;
});
});
this.tableData = list;
});
},
buttonClick(val) {
switch (val.btnName) {
case 'search':