2022-11-07 08:45:49 +08:00
|
|
|
<template>
|
|
|
|
<div class="left-content-equipment-check">
|
|
|
|
<!-- <TechyFakeTable :table-props="tableProps" :table-data="tableData" />
|
|
|
|
<TechyFakeTable :table-props="tableProps2" :table-data="tableData2" /> -->
|
2022-11-08 14:40:04 +08:00
|
|
|
<div class="el-table-wrapper fix-table">
|
2022-11-07 08:45:49 +08:00
|
|
|
<!-- <TechyTable key="table-1" :showIndex="false" :table-config="tableProps" :table-data="tableData"></TechyTable> -->
|
|
|
|
<el-table
|
|
|
|
key="LeftContentEquipmentCheck1"
|
|
|
|
border
|
|
|
|
:data="tableData"
|
|
|
|
:header-cell-style="{ background: 'rgba(79,114,136,0.29)' }"
|
|
|
|
>
|
2022-11-08 14:40:04 +08:00
|
|
|
<el-table-column label="设备名称" prop="eqName" align="center" />
|
|
|
|
<el-table-column label="所属产线" prop="pl" align="center" />
|
2022-11-09 09:51:14 +08:00
|
|
|
<el-table-column label="提示等级" prop="warningLevel" align="center">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<!-- <component :is="PriorityComponent"></component> -->
|
|
|
|
<PriorityComponent :injectData="scope.row"></PriorityComponent>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="巡检内容" prop="checkContent" align="center" />
|
2022-11-07 08:45:49 +08:00
|
|
|
</el-table>
|
|
|
|
</div>
|
|
|
|
<!-- <div class="el-table-wrapper">
|
|
|
|
<el-table
|
|
|
|
key="LeftContentEquipmentCheck2"
|
|
|
|
border
|
|
|
|
:data="tableData2"
|
|
|
|
:header-cell-style="{ background: 'rgba(79,114,136,0.29)' }"
|
|
|
|
>
|
|
|
|
<el-table-column label="设备名称" prop="eqName" />
|
|
|
|
<el-table-column label="所属产线" prop="pl" />
|
|
|
|
<el-table-column label="提示等级" prop="warningLevel" />
|
|
|
|
<el-table-column label="提示等级" prop="checkContent" />
|
|
|
|
</el-table>
|
|
|
|
</div> -->
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
// import TechyFakeTable from './TechyFakeTable.vue'
|
|
|
|
// import TechyTable from './TechyTable.vue'
|
2022-11-09 09:51:14 +08:00
|
|
|
const PriorityComponent = {
|
|
|
|
name: 'PriorityComponent',
|
|
|
|
props: {
|
|
|
|
injectData: Object
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
bgColor() {
|
|
|
|
const colors = ['#9c4048', '#ffbd43', '#0b58ff', '#90dd48', '#449028', '#091238']
|
|
|
|
return colors[this.injectData.priority - 1]
|
|
|
|
},
|
|
|
|
priorityText() {
|
|
|
|
return ['一级', '二级', '三级', '四级', '五级'][this.injectData.priority - 1]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {},
|
|
|
|
render: function(h) {
|
|
|
|
return h(
|
|
|
|
'span',
|
|
|
|
{
|
|
|
|
style: {
|
|
|
|
display: 'inline-block',
|
|
|
|
borderRadius: '2px',
|
|
|
|
padding: '2px 6px',
|
|
|
|
color: '#fff',
|
|
|
|
opacity: '0.6',
|
|
|
|
fontSize: '12px',
|
|
|
|
lineHeight: 1,
|
|
|
|
backgroundColor: this.bgColor
|
|
|
|
}
|
|
|
|
},
|
|
|
|
this.priorityText
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
2022-11-07 08:45:49 +08:00
|
|
|
|
2022-11-09 09:51:14 +08:00
|
|
|
// const tableProps = [
|
|
|
|
// { prop: 'eqName', label: '设备名称', width: 120, resizable: false },
|
|
|
|
// { prop: 'pl', label: '所属产线', width: 120, resizable: false },
|
|
|
|
// { prop: 'warningLevel', label: '提示等级', width: 120, resizable: false },
|
|
|
|
// { prop: 'checkContent', label: '提示等级', width: 120, resizable: false }
|
|
|
|
// ]
|
2022-11-07 08:45:49 +08:00
|
|
|
const tableData = [
|
2022-11-09 09:51:14 +08:00
|
|
|
{ eqName: 'A下片机', pl: '产线1', priority: 1, checkContent: '巡检内容' },
|
|
|
|
{ eqName: 'A下片机', pl: '产线1', priority: 2, checkContent: '巡检内容' },
|
|
|
|
{ eqName: 'A下片机', pl: '产线1', priority: 3, checkContent: '巡检内容' },
|
|
|
|
{ eqName: 'A下片机', pl: '产线1', priority: 4, checkContent: '巡检内容' },
|
|
|
|
{ eqName: 'A下片机', pl: '产线1', priority: 4, checkContent: '巡检内容' },
|
|
|
|
{ eqName: 'A下片机', pl: '产线1', priority: 3, checkContent: '巡检内容' },
|
|
|
|
{ eqName: '设备B', pl: '产线1', priority: 2, checkContent: '巡检内容' }
|
2022-11-07 08:45:49 +08:00
|
|
|
// { eqName: '下片机', pl: '产线3', warningLevel: 3, checkContent: '巡检内容' },
|
|
|
|
// { eqName: '磨片机', pl: '产线2', warningLevel: 2, checkContent: '巡检内容' }
|
|
|
|
]
|
2022-11-09 09:51:14 +08:00
|
|
|
// const tableData2 = [
|
|
|
|
// { eqName: 'A下片机', pl: '产线1', warningLevel: 1, checkContent: '巡检内容' },
|
|
|
|
// { eqName: '设备B', pl: '产线1', warningLevel: 1, checkContent: '巡检内容' }
|
|
|
|
// { eqName: '下片机', pl: '产线3', warningLevel: 3, checkContent: '巡检内容' },
|
|
|
|
// { eqName: '磨片机', pl: '产线2', warningLevel: 2, checkContent: '巡检内容' }
|
|
|
|
// ]
|
2022-11-07 08:45:49 +08:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'LeftContentEquipmentCheck',
|
2022-11-09 09:51:14 +08:00
|
|
|
components: { PriorityComponent },
|
2022-11-07 08:45:49 +08:00
|
|
|
data() {
|
2022-11-09 09:51:14 +08:00
|
|
|
return { tableData }
|
2022-11-07 08:45:49 +08:00
|
|
|
},
|
|
|
|
created() {},
|
|
|
|
mounted() {},
|
|
|
|
methods: {}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
2022-11-08 14:40:04 +08:00
|
|
|
.fix-table >>> .el-table td .cell {
|
|
|
|
width: 60% !important;
|
|
|
|
margin: auto;
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
|
2022-11-07 08:45:49 +08:00
|
|
|
.left-content-equipment-check {
|
2022-11-07 17:08:05 +08:00
|
|
|
height: calc(100% - 32px);
|
2022-11-07 08:45:49 +08:00
|
|
|
display: flex;
|
|
|
|
gap: calc(100vmin / 1920 * 36);
|
2022-11-07 17:08:05 +08:00
|
|
|
overflow: hidden;
|
2022-11-07 08:45:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.el-table-wrapper {
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.left-content-equipment-check > div {
|
|
|
|
overflow: hidden;
|
2022-11-07 17:08:05 +08:00
|
|
|
/* overflow-x: scroll; */
|
2022-11-07 08:45:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.el-table-wrapper >>> * {
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
.el-table-wrapper >>> .el-table::before,
|
|
|
|
.el-table-wrapper >>> .el-table--group::after,
|
|
|
|
.el-table-wrapper >>> .el-table--border::after {
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-table-wrapper >>> .el-table {
|
|
|
|
font-size: 8px;
|
|
|
|
background-color: transparent;
|
|
|
|
color: #fff9;
|
|
|
|
border: 0;
|
2022-11-07 17:08:05 +08:00
|
|
|
height: 100%;
|
2022-11-08 09:19:40 +08:00
|
|
|
overflow-y: auto;
|
2022-11-07 08:45:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.el-table-wrapper >>> .el-table th.is-leaf,
|
|
|
|
.el-table-wrapper >>> .el-table td {
|
|
|
|
border-color: #0d1728;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-table__row--striped:hover > td,
|
|
|
|
.el-table-wrapper >>> .el-table__row:hover > td {
|
|
|
|
background-color: rgba(79, 114, 136, 0.29) !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-table-wrapper >>> table {
|
|
|
|
border: unset;
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-table-wrapper >>> thead {
|
|
|
|
color: #fff;
|
|
|
|
}
|
|
|
|
.el-table-wrapper >>> tr {
|
|
|
|
background: unset;
|
|
|
|
}
|
|
|
|
.el-table-wrapper >>> tbody td > div,
|
|
|
|
.el-table-wrapper >>> thead th > div {
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
.el-table-wrapper >>> th,
|
|
|
|
.el-table-wrapper >>> td {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-table-wrapper >>> tbody > tr:nth-child(even) {
|
|
|
|
background: rgba(76, 97, 123, 0.2);
|
|
|
|
}
|
|
|
|
</style>
|