From 120cf05bfd146a9bd1c011c9dd0244a57d0dea64 Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期五, 12 一月 2024 17:35:43 +0800
Subject: [PATCH] 1、优化代码:mdc全局页面表格区域内容若需滚动无需翻至最底部且部分页面竖向滚动会滚动整个页面调整为仅滚动表格区域,表格操作列右固定以满足不同分辨率下操作列始终显示不被遮挡 2、优化代码:mdc全局左侧树组件所在区域的滚动条将不再进行全部内容滚动,调整为仅只有树组件内容滚动 3、优化代码:报警分析、利用率走势分析以及利用率分段分析页面在浏览器窗口尺寸变化后重绘图表以适应页面新尺寸 4、设备综合效率分析页面取消分页器以便能一次性导出所有表格数据 5、mdc全局左侧树区域宽度增大,右侧数据展示区域宽度减小
---
src/views/eam/DailyInspectionOrderList.vue | 165 +++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 112 insertions(+), 53 deletions(-)
diff --git a/src/views/eam/DailyInspectionOrderList.vue b/src/views/eam/DailyInspectionOrderList.vue
index d94dec3..2beb98a 100644
--- a/src/views/eam/DailyInspectionOrderList.vue
+++ b/src/views/eam/DailyInspectionOrderList.vue
@@ -120,6 +120,7 @@
:loading="loading"
class="j-table-force-nowrap"
@change="handleTableChange"
+ :rowClassName="tableRowClass"
>
<!-- :rowSelection="rowSelection" -->
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
@@ -150,7 +151,7 @@
v-if="record.status == '2'"
type="vertical"
/>
- <a-popconfirm
+ <!-- <a-popconfirm
title="纭畾鎭㈠宸ュ崟鍚�?"
@confirm="() => handleOrderRecover(record)"
v-has="'dailyInspectionOrder:recover'"
@@ -160,8 +161,8 @@
<a-divider
v-if="record.status == '7'"
type="vertical"
- />
- <a-popconfirm
+ /> -->
+ <!-- <a-popconfirm
title="纭畾浣滃簾宸ュ崟鍚�?"
@confirm="() => handleOrderCancel(record)"
v-has="'dailyInspectionOrder:recover'"
@@ -171,7 +172,7 @@
<a-divider
v-if="record.status == '2'"
type="vertical"
- />
+ /> -->
<a-popconfirm
title="纭畾棰嗗彇宸ュ崟鍚�?"
@confirm="() => handleOrderGet(record)"
@@ -179,12 +180,12 @@
>
<a v-if="record.status == '2' && record.assignMode == '1'">棰嗗彇</a>
</a-popconfirm>
- <a
+ <!-- <a
v-if="record.status == '2' && record.assignMode == '2' "
@click="handleAssignOrder(record)"
v-has="'dailyInspectionOrder:assign'"
- >娲惧伐</a>
- <a
+ >娲惧伐</a> -->
+ <!-- <a
v-if="record.status == '2'&& record.assignMode == '3' && record.inspectionUserName != null "
@click="handleAssignOrder(record)"
v-has="'dailyInspectionOrder:assign'"
@@ -193,7 +194,7 @@
v-if="record.status == '3'"
@click="handleAssignOrder(record)"
v-has="'dailyInspectionOrder:assign'"
- >鏀规淳</a>
+ >鏀规淳</a>-->
<a-divider
v-if="record.status == '2'"
type="vertical"
@@ -209,6 +210,17 @@
>鎵ц</a>
<a-divider
v-if="record.status === '3' || record.status === '4' "
+ type="vertical"
+ />
+ <a-popconfirm
+ title="缁翠慨浜虹‘璁ゅ畬宸ュ悧?"
+ @confirm="() => handleOrderRepairConfirm(record)"
+ v-has="'dailyInspectionOrder:repairConfirm'"
+ >
+ <a v-if="record.status == '5'">缁翠慨纭</a>
+ </a-popconfirm>
+ <a-divider
+ v-if="record.status == '5'"
type="vertical"
/>
<a
@@ -244,7 +256,7 @@
slot-scope="text, record"
>
<a
- v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' "
+ v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '6' "
class="lot"
@click="handleOrderExe(record)"
>{{record.num}}</a>
@@ -321,7 +333,14 @@
{
title: '鐘舵��',
align: "center",
+ width: 100,
dataIndex: 'statusName'
+ },
+ {
+ title: '鐐规鍛ㄦ湡',
+ align: "center",
+ width: 100,
+ dataIndex: 'inspectionCycleName'
},
// {
// title: '鐐规鏃ユ湡',
@@ -331,19 +350,19 @@
// return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
// }
// },
- {
- title: '鐐规鏃堕棿',
- align: "center",
- dataIndex: 'inspectionTime',
- // customRender: function (text) {
- // return !text ? "" : (text.length > 10 ? text.substr(11, 20) : text)
- // }
- },
- {
- title: '鎴鏃堕棿',
- align: "center",
- dataIndex: 'inspectionDeadline',
- },
+ // {
+ // title: '鐐规鏃堕棿',
+ // align: "center",
+ // dataIndex: 'inspectionTime',
+ // // customRender: function (text) {
+ // // return !text ? "" : (text.length > 10 ? text.substr(11, 20) : text)
+ // // }
+ // },
+ // {
+ // title: '鎴鏃堕棿',
+ // align: "center",
+ // dataIndex: 'inspectionDeadline',
+ // },
{
title: '缁熶竴缂栫爜',
align: "center",
@@ -381,33 +400,29 @@
// }
// },
// },
- {
- title: '鐐规鏍囧噯缂栫爜',
- align: "center",
- dataIndex: 'inspectionStandardNum'
- },
- {
- title: '鐐规鍛ㄦ湡',
- align: "center",
- dataIndex: 'inspectionCycleName'
- },
- {
- title: '娲惧伐鏂瑰紡',
- align: "center",
- dataIndex: 'assignModeName'
- },
- {
- title: '鐐规缁撴灉',
- align: "center",
- dataIndex: 'result'
- },
+ // {
+ // title: '鐐规鏍囧噯缂栫爜',
+ // align: "center",
+ // dataIndex: 'inspectionStandardNum'
+ // },
+
+ // {
+ // title: '娲惧伐鏂瑰紡',
+ // align: "center",
+ // dataIndex: 'assignModeName'
+ // },
+ // {
+ // title: '鐐规缁撴灉',
+ // align: "center",
+ // dataIndex: 'result'
+ // },
{
title: '鐐规浜�',
align: "center",
dataIndex: 'inspectionUserName'
},
{
- title: '瀹屾垚鏃堕棿',
+ title: '鐐规鏃堕棿',
align: "center",
dataIndex: 'actualEndTime',
// customRender: function (text) {
@@ -415,10 +430,23 @@
// }
},
{
- title: '鍒涘缓浜�',
+ title: '缁翠慨纭浜�',
align: "center",
- dataIndex: 'createBy'
+ dataIndex: 'repairConfirmPerson'
},
+ {
+ title: '纭鏃堕棿',
+ align: "center",
+ dataIndex: 'repairConfirmDate',
+ // customRender: function (text) {
+ // return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
+ // }
+ },
+ // {
+ // title: '鍒涘缓浜�',
+ // align: "center",
+ // dataIndex: 'createBy'
+ // },
{
title: '鍒涘缓鏃ユ湡',
align: "center",
@@ -482,7 +510,7 @@
},
handleOrderExe(record) {
this.$refs.DailyInspectionOrderExeDrawer.visible = true
- this.$refs.DailyInspectionOrderExeDrawer.title = '鏃ュ父鐐规宸ュ崟鎵ц'
+ this.$refs.DailyInspectionOrderExeDrawer.title = '鑷富缁存姢鐐规鎵ц'
this.$refs.DailyInspectionOrderExeDrawer.handleShow(record)
if (record.status === '3') {
this.$refs.DailyInspectionOrderExeDrawer.buttonDistable = true//淇濆瓨銆佹殏瀛樸�佹姤宸�
@@ -496,7 +524,7 @@
this.$refs.DailyInspectionOrderExeDrawer.buttonDistable = true
this.$refs.DailyInspectionOrderExeDrawer.revocationDistable = false
this.$refs.DailyInspectionOrderExeDrawer.SWbuttonDistable = true
- } else if (record.status === '7') {
+ } else if (record.status === '6') {
this.$refs.DailyInspectionOrderExeDrawer.buttonDistable = true
this.$refs.DailyInspectionOrderExeDrawer.revocationDistable = true
this.$refs.DailyInspectionOrderExeDrawer.SWbuttonDistable = true
@@ -541,15 +569,15 @@
}
})
},
- //浣滃簾
- handleOrderCancel(record) {
+ //缁翠慨纭
+ handleOrderRepairConfirm(record) {
const that = this;
- requestPut(that.url.edit, { id: record.id, status: '7' }).then((res) => {
+ requestPut(that.url.edit, { id: record.id, status: '6' }).then((res) => {
if (res.success) {
- that.$message.success("宸ュ崟浣滃簾鎴愬姛锛�")
+ that.$message.success("宸ュ崟瀹屽伐鎴愬姛锛�")
that.loadData()
} else {
- that.$message.warning("宸ュ崟浣滃簾澶辫触锛�")
+ that.$message.warning("宸ュ崟瀹屽伐澶辫触锛�")
}
})
},
@@ -567,10 +595,41 @@
})
},
+ //棰勮棰滆壊
+ tableRowClass(record, index) {
+ if (("1" == record.status || "2" == record.status) && "1鏃�" == record.inspectionCycleName) {
+ if (record.redWarningTime < record.currentDateTime) {
+ return 'error'
+ }
+ }
+ },
+
}
}
</script>
-<style scoped>
+<style>
@import '~@assets/less/common.less';
+.frozenRowClass {
+ color: #c9c9c9;
+ font-weight: bold;
+}
+.success {
+ color: green;
+}
+.error {
+ color: red;
+ font-weight: bold;
+}
+.yellow {
+ color: rgba(255, 255, 0, 0.443);
+ font-weight: bold;
+}
+.fontweight {
+ font-weight: bold;
+}
+
+.ant-table-tbody .red {
+ background-color: red !important;
+}
</style>
\ No newline at end of file
--
Gitblit v1.9.3