From 71aab2df9a5d5324ae2d8f2de925a9349f736186 Mon Sep 17 00:00:00 2001 From: lb Date: Sun, 4 Feb 2024 15:43:33 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BF=9D=E5=85=BB=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../maintain/Monitor--detail.vue | 461 ++++++++++++++++++ .../specialEquipment/maintain/Monitor.vue | 235 +++++---- .../maintain/PlanConfig--add.vue | 12 +- 3 files changed, 616 insertions(+), 92 deletions(-) create mode 100644 src/views/specialEquipment/maintain/Monitor--detail.vue diff --git a/src/views/specialEquipment/maintain/Monitor--detail.vue b/src/views/specialEquipment/maintain/Monitor--detail.vue new file mode 100644 index 00000000..704c6ba2 --- /dev/null +++ b/src/views/specialEquipment/maintain/Monitor--detail.vue @@ -0,0 +1,461 @@ + + + + + + + diff --git a/src/views/specialEquipment/maintain/Monitor.vue b/src/views/specialEquipment/maintain/Monitor.vue index 2223ac45..64b79b93 100644 --- a/src/views/specialEquipment/maintain/Monitor.vue +++ b/src/views/specialEquipment/maintain/Monitor.vue @@ -52,6 +52,11 @@ :has-files="false" :rows="rows" /> + + @@ -62,6 +67,8 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin'; import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record'; import { parseTime } from '@/utils/ruoyi'; +import MonitorDetail from './Monitor--detail.vue'; + const remainBox = { name: 'RemainBox', props: ['injectData'], @@ -120,22 +127,28 @@ const btn = { export default { name: 'SpecialEquipmentMaintainMonitor', - components: {}, + components: { MonitorDetail }, mixins: [basicPageMixin], data() { return { - searchBarKeys: ['planId', 'specialType', 'equipmentId'], + monitorDetailVisible: false, + searchBarKeys: ['planId'], tableProps: [ - // { - // prop: 'createTime', - // label: '添加时间', - // fixed: true, - // width: 180, - // filter: parseTime(createTime), - // }, + { + prop: 'code', + label: '保养计划单号', + minWidth: 118, + showOverflowtooltip: true, + }, { prop: 'name', - label: '保养计划', + label: '保养计划名称', + minWidth: 118, + showOverflowtooltip: true, + }, + { + prop: 'departmentName', + label: '部门', minWidth: 100, showOverflowtooltip: true, }, @@ -146,61 +159,101 @@ export default { showOverflowtooltip: true, }, { - prop: 'equipmentCategory', - label: '设备大类', - minWidth: 100, + prop: 'lastPlanMaintainTime', + label: '上次计划保养时间', + filter: parseTime, + minWidth: 158, showOverflowtooltip: true, - filter: (val) => - val != null ? ['-', '安全设备', '消防设备', '特种设备'][val] : '-', - }, - { - prop: 'equipmentName', - label: '设备名称', - minWidth: 100, - showOverflowtooltip: true, - }, - { prop: 'maintenancePeriod', label: '保养频率' }, - { - prop: 'maintainType', - label: '保养类型', - showOverflowtooltip: true, - filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE), }, { prop: 'lastMaintainTime', - label: '上次保养时间', + label: '上次实际保养时间', filter: parseTime, - minWidth: 150, + minWidth: 158, showOverflowtooltip: true, }, { - prop: 'nextMaintainTime', - label: '计划下次保养时间', + prop: 'nextPlanMaintainTime', + label: '下次计划保养时间', filter: parseTime, - minWidth: 150, + minWidth: 158, showOverflowtooltip: true, }, { - prop: 'remainDays', - label: '距离保养时间(天)', - subcomponent: remainBox, - minWidth: 150, - // showOverflowtooltip: true - }, - { - prop: 'opt1', - label: '设备保养', - name: '操作', - subcomponent: btn, - width: 100, + prop: 'maintainer', + label: '计划保养人员', + minWidth: 158, + showOverflowtooltip: true, }, { prop: 'opt2', - label: '保养记录', - name: '查看详情', + label: '保养内容', + name: '详情', subcomponent: btn, width: 100, }, + { + prop: 'remainDays', + label: '距离下次保养剩余时间(天)', + subcomponent: remainBox, + minWidth: 210, + }, + // { + // prop: 'createTime', + // label: '添加时间', + // fixed: true, + // width: 180, + // filter: parseTime(createTime), + // }, + // { + // prop: 'equipmentCategory', + // label: '设备大类', + // minWidth: 100, + // showOverflowtooltip: true, + // filter: (val) => + // val != null ? ['-', '安全设备', '消防设备', '特种设备'][val] : '-', + // }, + // { + // prop: 'equipmentName', + // label: '设备名称', + // minWidth: 100, + // showOverflowtooltip: true, + // }, + // { prop: 'maintenancePeriod', label: '保养频率' }, + // { + // prop: 'maintainType', + // label: '保养类型', + // showOverflowtooltip: true, + // filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE), + // }, + // { + // prop: 'lastMaintainTime', + // label: '上次保养时间', + // filter: parseTime, + // minWidth: 150, + // showOverflowtooltip: true, + // }, + // { + // prop: 'remainDays', + // label: '距离保养时间(天)', + // subcomponent: remainBox, + // minWidth: 150, + // // showOverflowtooltip: true + // }, + // { + // prop: 'opt1', + // label: '设备保养', + // name: '操作', + // subcomponent: btn, + // width: 100, + // }, + // { + // prop: 'opt2', + // label: '保养记录', + // name: '查看详情', + // subcomponent: btn, + // width: 100, + // }, ], searchBarFormConfig: [ { @@ -210,26 +263,26 @@ export default { param: 'planId', filterable: true, }, - { - type: 'select', - label: '设备大类', - placeholder: '请选择设备大类', - param: 'specialType', - onchange: true, - selectOptions: [ - { id: 1, name: '安全设备' }, - { id: 2, name: '消防设备' }, - { id: 3, name: '特种设备' }, - ], - filterable: true, - }, - { - type: 'select', - label: '设备名', - placeholder: '请选择设备', - param: 'equipmentId', - filterable: true, - }, + // { + // type: 'select', + // label: '设备大类', + // placeholder: '请选择设备大类', + // param: 'specialType', + // onchange: true, + // selectOptions: [ + // { id: 1, name: '安全设备' }, + // { id: 2, name: '消防设备' }, + // { id: 3, name: '特种设备' }, + // ], + // filterable: true, + // }, + // { + // type: 'select', + // label: '设备名', + // placeholder: '请选择设备', + // param: 'equipmentId', + // filterable: true, + // }, { type: 'button', btnName: '查询', @@ -255,10 +308,8 @@ export default { queryParams: { pageNo: 1, pageSize: 10, - equipmentName: null, - createTime: null, + planId: null, special: true, - specialType: null, }, // 表单参数 form: {}, @@ -331,28 +382,34 @@ export default { }); }, handleEmitFun({ action, value }) { + console.log('handleEmitFun .... ', action, value); switch (action) { - // 查看详情 - case '设备保养': - this.$router.push({ - path: '/equipment/base/maintain/record', - query: { - addRecord: 1, - row: value, - }, - }); - break; - case '保养记录': - const queryData = { - equipmentId: value.equipmentId, - maintainPlanId: value.id, - relatePlan: value.lastMaintainTime ? 1 : 2, - }; - this.$router.push({ - path: '/equipment/base/maintain/record', - query: queryData, + case '保养内容': + this.monitorDetailVisible = true; + this.$nextTick(() => { + this.$refs.monitorDetailDrawer.show(value); }); break; + // case '设备保养': + // this.$router.push({ + // path: '/equipment/base/maintain/record', + // query: { + // addRecord: 1, + // row: value, + // }, + // }); + // break; + // case '保养记录': + // const queryData = { + // equipmentId: value.equipmentId, + // maintainPlanId: value.id, + // relatePlan: value.lastMaintainTime ? 1 : 2, + // }; + // this.$router.push({ + // path: '/equipment/base/maintain/record', + // query: queryData, + // }); + // break; } }, /** 查询列表 */ diff --git a/src/views/specialEquipment/maintain/PlanConfig--add.vue b/src/views/specialEquipment/maintain/PlanConfig--add.vue index 34f9f437..0d2e016d 100644 --- a/src/views/specialEquipment/maintain/PlanConfig--add.vue +++ b/src/views/specialEquipment/maintain/PlanConfig--add.vue @@ -199,7 +199,12 @@ - + { this.equipmentOptions = this.equipmentList