update waitinglist table

This commit is contained in:
lb 2024-02-19 11:11:09 +08:00
parent ade0f6745e
commit 66337f4aca
4 changed files with 87 additions and 25 deletions

View File

@ -238,7 +238,7 @@ export default {
detailTableProps: [ detailTableProps: [
{ prop: 'equipmentName', label: '设备名称' }, { prop: 'equipmentName', label: '设备名称' },
{ prop: 'program', label: '保养项目' }, { prop: 'program', label: '保养项目' },
{ prop: 'remark', label: '备注' }, { prop: 'maintenanceDes', label: '保养描述' },
], ],
detailTableQuery: { detailTableQuery: {
pageNo: 1, pageNo: 1,

View File

@ -361,11 +361,10 @@ export default {
); );
}, },
initSearchBar() { initSearchBar() {
this.$watch('current', {}); // this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => { // this.allSpecialEquipments = data.filter((item) => item.special);
this.allSpecialEquipments = data.filter((item) => item.special); // this.setSearchBarEquipmentList(data.filter((item) => item.special));
this.setSearchBarEquipmentList(data.filter((item) => item.special)); // });
});
this.http('/base/equipment-maintain-plan/page', 'get', { this.http('/base/equipment-maintain-plan/page', 'get', {
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
@ -382,7 +381,7 @@ export default {
}); });
}, },
handleEmitFun({ action, value }) { handleEmitFun({ action, value }) {
console.log('handleEmitFun .... ', action, value); // console.log('handleEmitFun .... ', action, value);
switch (action) { switch (action) {
case '保养内容': case '保养内容':
this.monitorDetailVisible = true; this.monitorDetailVisible = true;

View File

@ -15,7 +15,7 @@
@headBtnClick="handleSearchBarBtnClick" /> @headBtnClick="handleSearchBarBtnClick" />
<!-- 列表 --> <!-- 列表 -->
<base-table <!-- <base-table
:table-props="tableProps" :table-props="tableProps"
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
@ -29,7 +29,8 @@
:width="120" :width="120"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleTableBtnClick" /> @clickBtn="handleTableBtnClick" />
</base-table> </base-table> -->
<WaitingListTable :table-data="list" :page="queryParams.pageNo" :limit="queryParams.pageSize" />
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination <pagination
@ -61,7 +62,6 @@
</el-row> </el-row>
</base-dialog> </base-dialog>
<WaitingListTable />
<!-- 编辑 --> <!-- 编辑 -->
<!-- <RecordDetail <!-- <RecordDetail

View File

@ -7,8 +7,8 @@
<template> <template>
<el-table <el-table
:data="tableData" :data="tableDataWithIndex"
:border="false" :border="true"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
style="width: 100%" style="width: 100%"
:header-cell-style="{ :header-cell-style="{
@ -33,22 +33,19 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="selectedBox[0]" v-if="selectedBox[0]"
width="110" width="128"
label="设备保养单号" label="设备保养单号"
prop="maintainOrderNumber"></el-table-column> prop="maintainOrderNumber"></el-table-column>
<el-table-column <el-table-column
v-if="selectedBox[1]" v-if="selectedBox[1]"
width="110"
label="保养计划名称" label="保养计划名称"
prop="planName"></el-table-column> prop="planName"></el-table-column>
<el-table-column <el-table-column
v-if="selectedBox[2]" v-if="selectedBox[2]"
width="110"
label="部门" label="部门"
prop="departmentName"></el-table-column> prop="departmentName"></el-table-column>
<el-table-column <el-table-column
v-if="selectedBox[3]" v-if="selectedBox[3]"
width="110"
label="产线名" label="产线名"
prop="lineName"></el-table-column> prop="lineName"></el-table-column>
<el-table-column <el-table-column
@ -105,14 +102,24 @@
{{ scope.row.relatePlan | relatePlanFilter }} {{ scope.row.relatePlan | relatePlanFilter }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="selectedBox[10]" width="60" label="详情"> <!-- <el-table-column v-if="selectedBox[10]" width="60" label="详情">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="handelDetail(scope.row)">详情</el-button> <el-button type="text" @click="handelDetail(scope.row)">详情</el-button>
</template> </template>
</el-table-column> </el-table-column> -->
<!-- btns --> <!-- btns -->
<el-table-column width="200" label="操作"> <el-table-column width="188" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip content="确认" placement="top">
<el-button
type="text"
style="margin: 5px 0; padding: 0"
@click="handleConfirm(scope.row)">
确认
</el-button>
</el-tooltip>
<!-- line -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-tooltip content="查看详情" placement="top"> <el-tooltip content="查看详情" placement="top">
<el-button <el-button
type="text" type="text"
@ -127,7 +134,7 @@
<el-button <el-button
type="text" type="text"
style="margin: 5px 0; padding: 0" style="margin: 5px 0; padding: 0"
@click="handelDetail(scope.row)"> @click="handleEdit(scope.row)">
<i class="iconfont icon-edit primary-color" /> <i class="iconfont icon-edit primary-color" />
</el-button> </el-button>
</el-tooltip> </el-tooltip>
@ -137,7 +144,7 @@
<el-button <el-button
type="text" type="text"
style="margin: 5px 0; padding: 0" style="margin: 5px 0; padding: 0"
@click="handelDetail(scope.row)"> @click="handleDelete(scope.row)">
<i class="iconfont icon-delete delete-color" /> <i class="iconfont icon-delete delete-color" />
</el-button> </el-button>
</el-tooltip> </el-tooltip>
@ -152,7 +159,7 @@ import moment from 'moment';
export default { export default {
name: 'WaitingListTable', name: 'WaitingListTable',
components: {}, components: {},
props: {}, props: ['tableData', 'page', 'limit'],
filters: { filters: {
timeFilter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), timeFilter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
relatePlanFilter: (val) => relatePlanFilter: (val) =>
@ -160,7 +167,6 @@ export default {
}, },
data() { data() {
return { return {
tableData: [],
tableProps: [ tableProps: [
{ {
label: '设备保养单号', label: '设备保养单号',
@ -209,11 +215,25 @@ export default {
true, true,
true, true,
], ],
selectedPlan: []
}; };
}, },
computed: {}, computed: {
tableDataWithIndex() {
return this.tableData.map((item, index) => ({
...item,
_pageIndex: (this.page - 1) * this.limit + index + 1
}))
}
},
methods: { methods: {
handleSelectionChange() {}, handleSelectionChange(val) {
this.selectedPlan = val;
},
handleDelete(row) {},
handleDetail(row) {},
handleEdit(row) {},
handleConfirm(row) {},
}, },
}; };
</script> </script>
@ -226,4 +246,47 @@ export default {
.primary-color { .primary-color {
color: #0b58ff; color: #0b58ff;
} }
.baseTable .show-col-btn {
margin-right: 5px;
line-height: inherit;
cursor: pointer;
}
.baseTable .el-icon-refresh {
cursor: pointer;
}
</style>
<style>
.waiting-list-table .el-table__body tr.current-row > td.el-table__cell {
background-color: #eaf1fc;
}
.waiting-list-table.el-table .el-table__cell {
padding: 0;
height: 35px;
}
.waiting-list-table .addButton {
width: 100%;
height: 35px;
border-top: none;
color: #0b58ff;
border-color: #ebeef5;
border-radius: 0;
}
.waiting-list-table .addButton:hover {
color: #0b58ff;
border-color: #ebeef5;
background-color: #fff;
}
.waiting-list-table .addButton:focus {
border-color: #ebeef5;
background-color: #fff;
}
.el-tooltip__popper.is-dark {
background: rgba(0, 0, 0, 0.6) !important;
}
.el-tooltip__popper .popper__arrow,
.el-tooltip__popper .popper__arrow::after {
border-top-color: rgba(0, 0, 0, 0.4) !important;
}
</style> </style>