From ab30f3859d73caa2d668b5bb6dbdff942d89c3db Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期二, 21 十一月 2023 15:43:13 +0800 Subject: [PATCH] 车间看板页面调整设备状态位置至页头右侧,原页头右侧功能按钮区域移至页头左侧 --- src/views/eam/DailyMaintenanceOrderList.vue | 209 +++++++++++++++++++++++++++------------------------- 1 files changed, 108 insertions(+), 101 deletions(-) diff --git a/src/views/eam/DailyMaintenanceOrderList.vue b/src/views/eam/DailyMaintenanceOrderList.vue index 60ac8a4..3d0edaf 100644 --- a/src/views/eam/DailyMaintenanceOrderList.vue +++ b/src/views/eam/DailyMaintenanceOrderList.vue @@ -1,7 +1,7 @@ <template> <a-card :bordered="false" - title="鏃ュ父淇濆吇宸ュ崟" + title="浜岀骇淇濆吇" > <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> @@ -64,7 +64,15 @@ @click="handleAdd" type="primary" 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" @@ -116,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" @@ -126,105 +134,19 @@ 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" slot-scope="text, record" > <a-popconfirm - title="纭畾涓嬪彂宸ュ崟鍚�?" + title="纭畾鎺ユ敹宸ュ崟鍚�?" @confirm="() => handleOrderIssue(record)" + v-has="'dailyMaintenanceOrder:issue'" > - <a v-if="record.status == '1'">涓嬪彂</a> + <a v-if="record.status == '1'">鎺ユ敹</a> </a-popconfirm> <a-divider v-if="record.status == '1'" @@ -233,6 +155,7 @@ <a-popconfirm title="纭畾鎾ゅ洖宸ュ崟鍚�?" @confirm="() => handleOrderReset(record)" + v-has="'dailyMaintenanceOrder:issue'" > <a v-if="record.status == '2'">鎾ゅ洖</a> </a-popconfirm> @@ -243,6 +166,7 @@ <a-popconfirm title="纭畾鎭㈠宸ュ崟鍚�?" @confirm="() => handleOrderRecover(record)" + v-has="'dailyMaintenanceOrder:recover'" > <a v-if="record.status == '7'">鎭㈠</a> </a-popconfirm> @@ -253,6 +177,7 @@ <a-popconfirm title="纭畾浣滃簾宸ュ崟鍚�?" @confirm="() => handleOrderCancel(record)" + v-has="'dailyMaintenanceOrder:recover'" > <a v-if="record.status == '2'">浣滃簾</a> </a-popconfirm> @@ -263,16 +188,19 @@ <a-popconfirm title="纭畾棰嗗彇宸ュ崟鍚�?" @confirm="() => handleOrderGet(record)" + v-has="'dailyMaintenanceOrder:get'" > <a v-if="record.status == '2' && record.assignMode == '1'">棰嗗彇</a> </a-popconfirm> <a v-if="record.status == '2' && record.assignMode == '2' " @click="handleAssignOrder(record)" + v-has="'dailyMaintenanceOrder:assign'" >娲惧伐</a> <a v-if="record.status == '3'&& record.assignMode == '2' && record.maintenanceUserName != null " @click="handleAssignOrder(record)" + v-has="'dailyMaintenanceOrder:assign'" >鏀规淳</a> <!-- <a v-if="record.status == '3'" @@ -289,6 +217,7 @@ <a v-if="record.status === '3' || record.status === '4' " @click="handleOrderExe(record)" + v-has="'dailyMaintenanceOrder:exe'" >鎵ц</a> <a-divider v-if="record.status === '3' || record.status === '4' " @@ -297,9 +226,18 @@ <a v-if="record.status === '1'" @click="handleEdit(record)" + v-has="'dailyMaintenanceOrder:edit'" >缂栬緫</a> <a-divider v-if="record.status === '1'" + type="vertical" + /> + <a + v-if="record.status === '5' || record.status === '8'" + @click="handleFinish(record)" + >瀹屽伐绉讳氦鍗�</a> + <a-divider + v-if="record.status === '5' || record.status === '8'" type="vertical" /> <a-dropdown> @@ -312,6 +250,7 @@ <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)" + v-has="'dailyMaintenanceOrder:delete'" > <a v-if="record.status === '1'">鍒犻櫎</a> </a-popconfirm> @@ -339,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" @@ -356,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' @@ -365,12 +309,14 @@ mixins: [JeecgListMixin, mixinDevice], components: { MaintenanceOrderModal, + FinishDevolutionModal, MaintenanceOrderAssignModal, DailyMaintenanceOrderExeDrawer }, data() { return { - description: '鏃ュ父淇濆吇宸ュ崟', + description: '浜岀骇淇濆吇宸ュ崟', + queryParam: { maintenanceType: '2' }, // 琛ㄥご columns: [ { @@ -384,16 +330,21 @@ } }, { - title: '鐘舵��', - align: "center", - dataIndex: 'statusName' - }, - { title: '淇濆吇宸ュ崟鍙�', align: "center", dataIndex: 'num', scopedSlots: { customRender: 'num' } }, + { + title: '鐘舵��', + align: "center", + dataIndex: 'statusName' + }, + // { + // title: '淇濆吇绫诲瀷', + // align: "center", + // dataIndex: 'maintenanceTypeName', + // }, { title: '淇濆吇鍛ㄦ湡', align: "center", @@ -405,7 +356,7 @@ dataIndex: 'assignModeName' }, { - title: '璁惧缂栫爜', + title: '缁熶竴缂栫爜', align: "center", dataIndex: 'equipmentNum', }, @@ -475,6 +426,11 @@ dataIndex: 'maintenanceUserName' }, { + title: '闂鍙婄浉搴斿鐞嗘帾鏂芥弿杩�', + align: "center", + dataIndex: 'description' + }, + { title: '鍒涘缓浜�', align: "center", dataIndex: 'createBy' @@ -540,9 +496,14 @@ 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 = '鏃ュ父淇濆吇宸ュ崟鎵ц' + this.$refs.DailyMaintenanceOrderExeDrawer.title = '浜岀骇淇濆吇宸ュ崟鎵ц' this.$refs.DailyMaintenanceOrderExeDrawer.handleShow(record) if (record.status === '3') { this.$refs.DailyMaintenanceOrderExeDrawer.buttonDistable = true//淇濆瓨銆佹殏瀛樸�佹姤宸� @@ -561,6 +522,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) { @@ -629,6 +596,11 @@ this.$refs.MaintenanceOrderAssignModal.title = '宸ュ崟鏀规淳' this.$refs.MaintenanceOrderAssignModal.disableSubmit = false }, + + searchReset() { + this.queryParam = { maintenanceType: '2' } + this.loadData(1); + }, // modalFormOk() { // alert(0) // // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃 @@ -636,9 +608,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: 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