From 56d9c88deb00626a312bc06a7243f9be14eec1df Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期日, 08 十月 2023 17:30:22 +0800
Subject: [PATCH] 不同类型设备设备台账
---
src/views/eam/DailyMaintenanceOrderList.vue | 165 +++++++++++++++++++++++++------------------------------
1 files changed, 75 insertions(+), 90 deletions(-)
diff --git a/src/views/eam/DailyMaintenanceOrderList.vue b/src/views/eam/DailyMaintenanceOrderList.vue
index 0c3b90a..9b77df9 100644
--- a/src/views/eam/DailyMaintenanceOrderList.vue
+++ b/src/views/eam/DailyMaintenanceOrderList.vue
@@ -66,6 +66,13 @@
icon="plus"
v-has="'dailyMaintenanceOrder:add'"
>鏂板</a-button>
+ <a-button
+ v-if="selectedRowKeys.length == 1 && selectionRows[0].status == '8'"
+ @click="handlePrintInfo(selectionRows[0])"
+ type="primary"
+ style="margin-left: 8px"
+ >绉讳氦鍗曟墦鍗�
+ </a-button>
<!-- <a-button
v-if="selectedRowKeys.length > 0"
type="primary"
@@ -117,7 +124,7 @@
<a-table
ref="table"
size="middle"
- :scroll="{ x: 'calc(2500px + 50%)', y: 900 }"
+ :scroll="{ x: 'calc(2800px + 50%)', y: 900 }"
bordered
rowKey="id"
:columns="columns"
@@ -127,95 +134,8 @@
class="j-table-force-nowrap"
@change="handleTableChange"
:rowSelection="rowSelection"
+ :rowClassName="tableRowClass"
>
- <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
- <!-- <span
- slot="action"
- slot-scope="text, record"
- >
- <a-popconfirm
- title="纭畾涓嬪彂宸ュ崟鍚�?"
- @confirm="() => handleOrderIssue(record)"
- >
- <a v-if="record.status === '1'">涓嬪彂</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status === '1'"
- type="vertical"
- />
- <a-popconfirm
- title="纭畾鎾ゅ洖宸ュ崟鍚�?"
- @confirm="() => handleOrderReset(record)"
- >
- <a v-if="record.status === '2'">鎾ゅ洖</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status === '2'"
- type="vertical"
- />
- <a-popconfirm
- title="纭畾鎭㈠宸ュ崟鍚�?"
- @confirm="() => handleOrderRecover(record)"
- >
- <a v-if="record.status === '7'">鎭㈠</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status === '7'"
- type="vertical"
- />
- <a-popconfirm
- title="纭畾浣滃簾宸ュ崟鍚�?"
- @confirm="() => handleOrderCancel(record)"
- >
- <a v-if="record.status === '2'">浣滃簾</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status === '2'"
- type="vertical"
- />
- <a-popconfirm
- title="纭畾棰嗗彇宸ュ崟鍚�?"
- @confirm="() => handleOrderGet(record)"
- >
- <a v-if="record.status === '2'">棰嗗彇</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status === '2'"
- type="vertical"
- />
- <a
- v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' "
- @click="handleOrderExe(record)"
- >鎵ц</a>
- <a-divider
- v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' "
- type="vertical"
- />
- <a
- v-if="record.status === '1'"
- @click="handleEdit(record)"
- >缂栬緫</a>
- <a-divider
- v-if="record.status === '1'"
- type="vertical"
- />
- <a-dropdown>
- <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
- <a-menu slot="overlay">
- <a-menu-item>
- <a @click="handleDetail(record)">璇︽儏</a>
- </a-menu-item>
- <a-menu-item>
- <a-popconfirm
- title="纭畾鍒犻櫎鍚�?"
- @confirm="() => handleDelete(record.id)"
- >
- <a v-if="record.status === '1'">鍒犻櫎</a>
- </a-popconfirm>
- </a-menu-item>
- </a-menu>
- </a-dropdown>
- </span> -->
<span
slot="action"
@@ -312,6 +232,14 @@
v-if="record.status === '1'"
type="vertical"
/>
+ <a
+ v-if="record.status === '5'"
+ @click="handleFinish(record)"
+ >纭</a>
+ <a-divider
+ v-if="record.status === '5'"
+ type="vertical"
+ />
<a-dropdown>
<a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
<a-menu slot="overlay">
@@ -350,6 +278,10 @@
ref="modalForm"
@ok="modalFormOk"
></maintenance-order-modal>
+ <finish-devolution-modal
+ ref="FinishDevolutionModal"
+ @ok="modalFormOk"
+ ></finish-devolution-modal>
<maintenance-order-assign-modal
ref="MaintenanceOrderAssignModal"
@ok="modalFormOk"
@@ -367,6 +299,7 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import MaintenanceOrderModal from './modules/dailyMaintenanceOrder/MaintenanceOrderModal'
+import FinishDevolutionModal from './modules/dailyMaintenanceOrder/FinishDevolutionModal'
import MaintenanceOrderAssignModal from './modules/dailyMaintenanceOrder/MaintenanceOrderAssignModal'
import DailyMaintenanceOrderExeDrawer from './modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer'
import { getAction, postAction, requestPut } from '@/api/manage'
@@ -376,6 +309,7 @@
mixins: [JeecgListMixin, mixinDevice],
components: {
MaintenanceOrderModal,
+ FinishDevolutionModal,
MaintenanceOrderAssignModal,
DailyMaintenanceOrderExeDrawer
},
@@ -486,6 +420,11 @@
dataIndex: 'maintenanceUserName'
},
{
+ title: '闂鍙婄浉搴斿鐞嗘帾鏂芥弿杩�',
+ align: "center",
+ dataIndex: 'description'
+ },
+ {
title: '鍒涘缓浜�',
align: "center",
dataIndex: 'createBy'
@@ -551,6 +490,11 @@
this.selectionRows = selectionRows;
},
+ handlePrintInfo(record) {
+ let href = `${window._CONFIG['domianURL']}/jmreport/view/857408393168490496?id=`+record.id; //缃戠珯閾炬帴
+ window.open(href, "_blank");
+ },
+
handleOrderExe(record) {
this.$refs.DailyMaintenanceOrderExeDrawer.visible = true
this.$refs.DailyMaintenanceOrderExeDrawer.title = '鏃ュ父淇濆吇宸ュ崟鎵ц'
@@ -572,6 +516,12 @@
this.$refs.DailyMaintenanceOrderExeDrawer.revocationDistable = true
this.$refs.DailyMaintenanceOrderExeDrawer.SWbuttonDistable = true
}
+ },
+
+ handleFinish: function (record) {
+ this.$refs.FinishDevolutionModal.edit(record);
+ this.$refs.FinishDevolutionModal.title = "鐢熶骇璁惧浜岀骇淇濆吇瀹屽伐绉讳氦鍗�";
+ this.$refs.FinishDevolutionModal.disableSubmit = false;
},
handleOrderIssue(record) {
@@ -647,9 +597,44 @@
// //娓呯┖鍒楄〃閫変腑
// this.onClearSelected()
// },
+
+ //棰勮棰滆壊
+ tableRowClass(record, index) {
+ if ("1" == record.status || "2" == record.status) {
+ if (record.yellowWarningTime < record.currentDateTime && record.currentDateTime < record.redWarningTime) {
+ return 'yellow'
+ } else if (record.redWarningTime < record.currentDateTime && record.currentDateTime < record.planStartTime) {
+ return 'error'
+ } else if (record.planStartTime < record.currentDateTime) {
+ return 'frozenRowClass'
+ }
+ }
+ },
}
}
</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: yellow;
+ 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