From 08bb85ea6e67dcef3c378fa73db060d4e279e7d6 Mon Sep 17 00:00:00 2001 From: “linengliang” <vanSuperEnergy@163.com> Date: 星期一, 18 十二月 2023 14:28:44 +0800 Subject: [PATCH] 三级保养 --- src/views/eam/RepairOrderList.vue | 187 +++++++++++++++++++++++++++++----------------- 1 files changed, 118 insertions(+), 69 deletions(-) diff --git a/src/views/eam/RepairOrderList.vue b/src/views/eam/RepairOrderList.vue index 1bdc3de..882ac0d 100644 --- a/src/views/eam/RepairOrderList.vue +++ b/src/views/eam/RepairOrderList.vue @@ -17,7 +17,7 @@ > <a-form-item label="缁熶竴缂栧彿缇�"> <a-textarea - placeholder="璇疯緭鍏ユ墍鏈夌粺涓�缂栫爜,椤荤敤鈥�,鈥濋殧寮�,鍚﹀垯鍙兘鏌ヨ鍑洪敊璇俊鎭�" + placeholder="璇疯緭鍏ユ墍鏈夌粺涓�缂栫爜,椤荤敤绌烘牸闅斿紑,鍚﹀垯鍙兘鏌ヨ鍑洪敊璇俊鎭�" v-model="queryParam.nums" :auto-size="{ minRows: 2, maxRows:2 }" ></a-textarea> @@ -36,7 +36,7 @@ allow-clear placeholder="璇烽�夋嫨宸ュ崟鐘舵��" :triggerChange="true" - dictCode="repair_order_status" + dictCode="true_repair_status" v-model="queryParam.status" /> </a-form-item> @@ -147,6 +147,22 @@ /> </a-form-item> </a-col> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" + > + <a-form-item label="缁翠慨鐘舵��"> + <j-dict-select-tag + allow-clear + placeholder="璇烽�夋嫨缁翠慨鐘舵��" + :triggerChange="true" + dictCode="repair_status" + v-model="queryParam.repairOrderUda1" + /> + </a-form-item> + </a-col> </a-row> <!-- <a-row :gutter="24"> <a-col @@ -173,10 +189,10 @@ <div class="table-operator"> <a-dropdown> <a-menu slot="overlay"> - <a-menu-item + <!-- <a-menu-item key="1" @click="handleAddPre(1)" - ><a-icon type="smile" />鑷缓</a-menu-item> + ><a-icon type="smile" />鑷缓</a-menu-item> --> <!-- <a-menu-item key="2" @click="handleAddPre(2)" @@ -213,6 +229,7 @@ type="primary" icon="plus" @click="getReports" + v-has="'repair:accept'" >棰嗗彇</a-button> <!-- <a-button type="primary" icon="download" @click="handleExportXls('缁翠慨宸ュ崟')">瀵煎嚭</a-button> <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> @@ -248,6 +265,7 @@ :loading="loading" @change="handleTableChange" :customRow="clickThenSelect" + :rowClassName="tableRowClass" > <span slot="jell" slot-scope="text"> <j-ellipsis :value="text" :length="8" /> @@ -315,6 +333,7 @@ <a v-if="record.status === '2' || record.status === '3' " @click="handleOrderExe(record)" + v-has="'repair:excute'" >鎵ц</a> <a-divider v-if="record.status === '2' || record.status === '3' " @@ -442,6 +461,7 @@ </repair-order-excute-drawer> <fault-report-repair ref="FaultReportRepair" + @ok="modalFormOk" ></fault-report-repair> </a-card> </template> @@ -464,16 +484,7 @@ import FaultDescriptionList from './FaultDescriptionList' import FaultReportRepair from './modules/repairorder/moudles/select/FaultReportRepair.vue' import store from '@/store' -import { - ACCESS_TOKEN, - USER_NAME, - USER_INFO, - USER_AUTH, - SYS_BUTTON_AUTH, - UI_CACHE_DB_DICT_DATA, - TENANT_ID, - CACHE_INCLUDED_ROUTES -} from '@/store/mutation-types' +import dayjs from 'dayjs' export default { name: "RepairOrderList", mixins: [JeecgListMixin], @@ -493,6 +504,11 @@ FaultReportRepair, store }, + mounted(){ + let intervalId = setInterval(() => { + this.loadData(); + }, 600*1000); // 1000姣锛屽嵆1绉� + }, data() { return { description: '缁翠慨宸ュ崟绠$悊椤甸潰', @@ -509,7 +525,7 @@ } }, { - title: '鍏抽敭璁惧?', + title: '鍏抽敭璁惧', align: "center", dataIndex: 'specificEquipment', scopedSlots: { customRender: 'specificEquipment' } @@ -518,6 +534,14 @@ title: '鐘舵��', align: "center", dataIndex: 'status_dictText' + }, + { + title: '缁翠慨鐘舵��', + align: "center", + dataIndex: 'repairOrderUda1_dictText', + customRender:function (t,r,index) { + return t===null||r.repairOrderUda1===null?'/':t; + } }, { title: '鍗曟嵁鍙�', @@ -578,16 +602,26 @@ align: "center", dataIndex: 'responsibilityId_dictText' }, - { - title: '娲惧伐鏂瑰紡', - align: "center", - dataIndex: 'dispatchMethod_dictText' - }, + // { + // title: '娲惧伐鏂瑰紡', + // align: "center", + // dataIndex: 'dispatchMethod_dictText' + // }, // { // title: '鐗圭璁惧', // align: "center", // dataIndex: 'specificEquipment_dictText' // }, + { + title: '鏁呴殰鏃堕棿', + align: "center", + dataIndex: 'faultTime' + }, + { + title: '鎶ヤ慨浜�', + align: "center", + dataIndex: 'errUda2' + }, { title: '鏁呴殰鎻忚堪', align: "center", @@ -596,30 +630,25 @@ customRender: 'jell' } }, - { - title: '鏁呴殰鍘熷洜', - align: "center", - dataIndex: 'faultReason' - }, - { - title: '鏁呴殰鐜拌薄', - align: "center", - dataIndex: 'faultPhenomenon' - }, - { - title: '鏁呴殰鎺掗櫎', - align: "center", - dataIndex: 'faultRemove' - }, - { - title: '棰勯槻鎺柦', - align: "center", - dataIndex: 'preventiveMeasure' - }, // { - // title: '鏁呴殰鏃堕棿', + // title: '鏁呴殰鍘熷洜', // align: "center", - // dataIndex: 'faultTime' + // dataIndex: 'faultReason' + // }, + // { + // title: '鏁呴殰鐜拌薄', + // align: "center", + // dataIndex: 'faultPhenomenon' + // }, + // { + // title: '鏁呴殰鎺掗櫎', + // align: "center", + // dataIndex: 'faultRemove' + // }, + // { + // title: '棰勯槻鎺柦', + // align: "center", + // dataIndex: 'preventiveMeasure' // }, // { // title: '鏁呴殰鐓х墖', @@ -637,31 +666,31 @@ // align: "center", // dataIndex: 'workingHourQuota' // }, - { - title: '瀹為檯宸ユ椂', - align: "center", - dataIndex: 'actualHour' - }, - { - title: '璁″垝寮�濮嬫椂闂�', - align: "center", - dataIndex: 'planStartTime' - }, - { - title: '璁″垝缁撴潫鏃堕棿', - align: "center", - dataIndex: 'planEndTime' - }, - { - title: '瀹為檯寮�濮嬫椂闂�', - align: "center", - dataIndex: 'actualStartTime' - }, - { - title: '瀹為檯缁撴潫鏃堕棿', - align: "center", - dataIndex: 'actualEndTime' - }, + // { + // title: '瀹為檯宸ユ椂', + // align: "center", + // dataIndex: 'actualHour' + // }, + // { + // title: '璁″垝寮�濮嬫椂闂�', + // align: "center", + // dataIndex: 'planStartTime' + // }, + // { + // title: '璁″垝缁撴潫鏃堕棿', + // align: "center", + // dataIndex: 'planEndTime' + // }, + // { + // title: '瀹為檯寮�濮嬫椂闂�', + // align: "center", + // dataIndex: 'actualStartTime' + // }, + // { + // title: '瀹為檯缁撴潫鏃堕棿', + // align: "center", + // dataIndex: 'actualEndTime' + // }, { title: '鍒涘缓浜�', align: "center", @@ -915,12 +944,32 @@ }, getReports(){ this.$refs.FaultReportRepair.title = '鏁呴殰鎶ヤ慨鍗�'; + this.$refs.FaultReportRepair.loadData(); this.$refs.FaultReportRepair.visible = true; - } + }, + tableRowClass(record, index) { + if ("2" === record.status) { + if (record.specificEquipment==='0'&&dayjs(record.faultTime).add(12,'hour')<dayjs()) { + return 'error' + } else if(dayjs(record.faultTime).add(7,'day')<dayjs()){ + return 'primary' + } + } + }, }, } </script> -<style scoped> +<style lang="less" scoped> @import '~@assets/less/common.less'; + +/deep/.error { + color: red; + font-weight: bold; +} + +/deep/.primary { + color: rgb(255, 0, 251); + font-weight: bold; +} </style> \ No newline at end of file -- Gitblit v1.9.3