diff --git a/src/views/specialEquipment/basic/FireFighthing.vue b/src/views/specialEquipment/basic/FireFighthing.vue index f9128ae5..fdee29af 100644 --- a/src/views/specialEquipment/basic/FireFighthing.vue +++ b/src/views/specialEquipment/basic/FireFighthing.vue @@ -91,13 +91,13 @@ pageSize: 10, }, tableBtn: [ - this.$auth.hasPermi('base:core-equipment-attr:update') + this.$auth.hasPermi('base:core-equipment-attr:update') // ('se:firefight-attr:update') // TODO 此处需用firefight-attr权限还是core-equipment-attr 权限? ? { type: 'edit', btnName: '修改', } : undefined, - this.$auth.hasPermi('base:core-equipment-attr:delete') + this.$auth.hasPermi('base:core-equipment-attr:delete') // ('se:firefight-attr:delete') ? { type: 'delete', btnName: '删除', @@ -142,19 +142,19 @@ export default { return { searchBarKeys: ['name', 'code'], tableBtn: [ - this.$auth.hasPermi(`base:core-equipment:update`) + this.$auth.hasPermi(`se:firefight:update`) ? { type: 'detail', btnName: '详情', } : undefined, - this.$auth.hasPermi('base:core-equipment:update') + this.$auth.hasPermi('se:firefight:update') ? { type: 'edit', btnName: '修改', } : undefined, - this.$auth.hasPermi('base:core-equipment:delete') + this.$auth.hasPermi('se:firefight:delete') ? { type: 'delete', btnName: '删除', @@ -208,18 +208,14 @@ export default { type: 'separate', }, { - type: this.$auth.hasPermi('base:core-equipment:export') - ? 'button' - : '', + type: this.$auth.hasPermi('se:firefight:export') ? 'button' : '', btnName: '导出', name: 'export', plain: true, color: 'primary', }, { - type: this.$auth.hasPermi('base:core-equipment:create') - ? 'button' - : '', + type: this.$auth.hasPermi('se:firefight:create') ? 'button' : '', btnName: '新增', name: 'add', plain: true, @@ -350,9 +346,6 @@ export default { mounted() { this.getList(); }, - activated() { - this.getList(); - }, methods: { /** 查询列表 */ getList() { diff --git a/src/views/specialEquipment/basic/Manage.vue b/src/views/specialEquipment/basic/Manage.vue index 2fe9c9fc..ac915a88 100644 --- a/src/views/specialEquipment/basic/Manage.vue +++ b/src/views/specialEquipment/basic/Manage.vue @@ -142,19 +142,19 @@ export default { return { searchBarKeys: ['name', 'code'], tableBtn: [ - this.$auth.hasPermi(`base:core-equipment:update`) + this.$auth.hasPermi(`se:manage:update`) ? { type: 'detail', btnName: '详情', } : undefined, - this.$auth.hasPermi('base:core-equipment:update') + this.$auth.hasPermi('se:manage:update') ? { type: 'edit', btnName: '修改', } : undefined, - this.$auth.hasPermi('base:core-equipment:delete') + this.$auth.hasPermi('se:manage:delete') ? { type: 'delete', btnName: '删除', @@ -207,7 +207,7 @@ export default { type: 'separate', }, { - type: this.$auth.hasPermi('base:core-equipment:export') + type: this.$auth.hasPermi('se:manage:export') ? 'button' : '', btnName: '导出', @@ -216,7 +216,7 @@ export default { color: 'primary', }, { - type: this.$auth.hasPermi('base:core-equipment:create') + type: this.$auth.hasPermi('se:manage:create') ? 'button' : '', btnName: '新增', @@ -340,9 +340,6 @@ export default { mounted() { this.getList(); }, - activated() { - this.getList(); - }, methods: { /** 查询列表 */ getList() { diff --git a/src/views/specialEquipment/basic/Safety.vue b/src/views/specialEquipment/basic/Safety.vue index 5d8c3a9b..ed27cda9 100644 --- a/src/views/specialEquipment/basic/Safety.vue +++ b/src/views/specialEquipment/basic/Safety.vue @@ -91,13 +91,13 @@ pageSize: 10, }, tableBtn: [ - this.$auth.hasPermi('base:core-equipment-attr:update') + this.$auth.hasPermi('se:safety-attr:update') ? { type: 'edit', btnName: '修改', } : undefined, - this.$auth.hasPermi('base:core-equipment-attr:delete') + this.$auth.hasPermi('se:safety-attr:delete') ? { type: 'delete', btnName: '删除', @@ -130,7 +130,7 @@ import AssetsUpload from '../components/AssetsUpload.vue'; import BaseDialogWrapper from '../components/BaseDialogWrapper.vue'; export default { - name: 'SpecialEquipmentForSafety', + name: 'specialEquipmentForSafety', components: { Editor, EquipmentDrawer, @@ -141,19 +141,19 @@ export default { return { searchBarKeys: ['name', 'code'], tableBtn: [ - this.$auth.hasPermi(`base:core-equipment:update`) + this.$auth.hasPermi(`se:safety:update`) ? { type: 'detail', btnName: '详情', } : undefined, - this.$auth.hasPermi('base:core-equipment:update') + this.$auth.hasPermi('se:safety:update') ? { type: 'edit', btnName: '修改', } : undefined, - this.$auth.hasPermi('base:core-equipment:delete') + this.$auth.hasPermi('se:safety:delete') ? { type: 'delete', btnName: '删除', @@ -206,7 +206,7 @@ export default { type: 'separate', }, { - type: this.$auth.hasPermi('base:core-equipment:export') + type: this.$auth.hasPermi('se:safety:export') ? 'button' : '', btnName: '导出', @@ -215,7 +215,7 @@ export default { color: 'primary', }, { - type: this.$auth.hasPermi('base:core-equipment:create') + type: this.$auth.hasPermi('se:safety:create') ? 'button' : '', btnName: '新增', @@ -338,9 +338,6 @@ export default { mounted() { this.getList(); }, - activated() { - this.getList(); - }, methods: { /** 查询列表 */ getList() { diff --git a/src/views/specialEquipment/check/Config.vue b/src/views/specialEquipment/check/Config.vue index a2fd2e95..e4af1199 100644 --- a/src/views/specialEquipment/check/Config.vue +++ b/src/views/specialEquipment/check/Config.vue @@ -46,7 +46,10 @@ @close="cancel" @cancel="cancel" @confirm="handleConfirm"> - + - // 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: [ { @@ -200,26 +144,6 @@ 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: 'button', btnName: '查询', @@ -230,7 +154,7 @@ export default { type: 'separate', }, { - type: this.$auth.hasPermi('base:quality-inspection-type:export') + type: this.$auth.hasPermi('se:maintain-plan:export') ? 'button' : '', btnName: '导出', diff --git a/src/views/specialEquipment/maintain/PlanConfig.vue b/src/views/specialEquipment/maintain/PlanConfig.vue index f703b05e..a7a0cc26 100644 --- a/src/views/specialEquipment/maintain/PlanConfig.vue +++ b/src/views/specialEquipment/maintain/PlanConfig.vue @@ -70,7 +70,7 @@ import PlanConfigAddContent from './PlanConfig--addContent.vue'; import BaseDialogWrapper from '../components/BaseDialogWrapper.vue'; export default { - name: 'SpecialEquipmentPlanConfig', + name: 'SpecialEquipmentMaintainPlanConfig', components: { BaseDialog: BaseDialogWrapper, DialogForm: PlanConfigAdd, @@ -81,23 +81,21 @@ export default { const t = new Date(); const [y, m, d] = [t.getFullYear(), t.getMonth(), t.getDate()]; return { - searchBarKeys: ['planName'], // 'specialType', 'equipmentName', 'createTime'], + searchBarKeys: ['planName'], tableBtn: [ - // { - // type: 'detail', - // btnName: '保养记录', - // }, - { - type: 'addContent', - btnName: '添加内容', - }, - this.$auth.hasPermi('equipment:plan-config:update') + this.$auth.hasPermi('se:maintain:update') + ? { + type: 'addContent', + btnName: '添加内容', + } + : undefined, + this.$auth.hasPermi('se:maintain:update') ? { type: 'edit', btnName: '修改', } : undefined, - this.$auth.hasPermi('equipment:plan-config:delete') + this.$auth.hasPermi('se:maintain:delete') ? { type: 'delete', btnName: '删除', @@ -171,9 +169,7 @@ export default { type: 'separate', }, { - type: this.$auth.hasPermi('equipment:plan-config:create') - ? 'button' - : '', + type: this.$auth.hasPermi('se:maintain:create') ? 'button' : '', btnName: '新增', name: 'add', plain: true, diff --git a/src/views/specialEquipment/maintain/Record--detail.vue b/src/views/specialEquipment/maintain/Record--detail.vue index 1b94bb12..dbddf8ba 100644 --- a/src/views/specialEquipment/maintain/Record--detail.vue +++ b/src/views/specialEquipment/maintain/Record--detail.vue @@ -30,8 +30,12 @@
-
- +
+ - - {{ form.planMaintainWorker }} + + {{ form.planMaintainWorker || '---' }} - - {{ form.maintainWorker }} + + {{ form.maintainWorker || '---' }} diff --git a/src/views/specialEquipment/maintain/Record.vue b/src/views/specialEquipment/maintain/Record.vue index 7b2b12ba..639d9798 100644 --- a/src/views/specialEquipment/maintain/Record.vue +++ b/src/views/specialEquipment/maintain/Record.vue @@ -21,15 +21,7 @@ :limit="queryParams.pageSize" :max-height="tableH" :table-data="list" - @emitFun="handleEmitFun"> - - + @emitFun="handleEmitFun"> v), tableProps: [ - // { - // prop: 'createTime', - // label: '添加时间', - // fixed: true, - // width: 150, - // filter: timeFilter, - // }, { prop: 'maintainOrderNumber', label: '设备保养单号', @@ -246,7 +224,7 @@ export default { type: 'separate', }, { - type: this.$auth.hasPermi('equipment:maintain-record:export') + type: this.$auth.hasPermi('se:maintain-record:export') ? 'button' : '', btnName: '导出', @@ -254,15 +232,6 @@ export default { plain: true, color: 'primary', }, - // { - // type: this.$auth.hasPermi('equipment:maintain-record:create') - // ? 'button' - // : '', - // btnName: '新增', - // name: 'add', - // plain: true, - // color: 'success', - // }, ], rows: [ [ diff --git a/src/views/specialEquipment/maintain/Repair.vue b/src/views/specialEquipment/maintain/Repair.vue index 45dc7654..f4867771 100644 --- a/src/views/specialEquipment/maintain/Repair.vue +++ b/src/views/specialEquipment/maintain/Repair.vue @@ -88,25 +88,19 @@ export default { 'specialType', ], tableBtn: [ - this.$auth.hasPermi('equipment:repair:finish') + this.$auth.hasPermi('se:repair:finish') ? { type: 'finish', btnName: '完成', } : undefined, - this.$auth.hasPermi('equipment:repair:update') + this.$auth.hasPermi('se:repair:update') ? { type: 'detail', btnName: '详情', } : undefined, - // this.$auth.hasPermi('equipment:repair:update') - // ? { - // type: 'edit', - // btnName: '修改', - // } - // : undefined, - this.$auth.hasPermi('equipment:repair:delete') + this.$auth.hasPermi('se:repair:delete') ? { type: 'delete', btnName: '删除', @@ -114,13 +108,6 @@ export default { : undefined, ].filter((v) => v), tableProps: [ - // { - // prop: 'createTime', - // label: '添加时间', - // fixed: true, - // width: 150, - // filter: parseTime, - // }, { prop: 'repairOrderNumber', label: '设备维修单号', @@ -186,52 +173,8 @@ export default { minWidth: 120, showOverflowtooltip: true, }, - // { - // prop: 'maintenanceStatus', - // label: '维修状态', - // filter: (v) => (v != null ? ['未完成', '完成', '进行中'][v] : ''), - // }, - // { prop: 'maintenanceDuration', label: '维修时长(h)', width: 110 }, - // { - // prop: 'equipmentName', - // label: '设备名称', - // minWidth: 100, - // showOverflowtooltip: true, - // }, - // { - // prop: 'maintenanceDetail', - // label: '维修明细', - // subcomponent: htmls, - // minWidth: 100, - // showOverflowtooltip: true, - // }, - // { - // prop: 'repairman', - // label: '维修工', - // minWidth: 100, - // showOverflowtooltip: true, - // }, - // { - // prop: 'repairmanPhone', - // label: '联系方式', - // minWidth: 100, - // showOverflowtooltip: true, - // }, ], searchBarFormConfig: [ - // { - // type: 'select', - // label: '设备大类', - // placeholder: '请选择设备大类', - // param: 'specialType', - // onchange: true, - // selectOptions: [ - // { id: 1, name: '安全设备' }, - // { id: 2, name: '消防设备' }, - // { id: 3, name: '特种设备' }, - // ], - // filterable: true, - // }, { type: 'select', label: '设备', @@ -256,7 +199,6 @@ export default { dateType: 'daterange', // datetimerange format: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd HH:mm:ss', - // valueFormat: 'timestamp', rangeSeparator: '-', startPlaceholder: '开始日期', endPlaceholder: '结束日期', @@ -273,14 +215,14 @@ export default { type: 'separate', }, { - type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '', + type: this.$auth.hasPermi('se:repair:export') ? 'button' : '', btnName: '导出', name: 'export', plain: true, color: 'primary', }, { - type: this.$auth.hasPermi('equipment:repair:create') ? 'button' : '', + type: this.$auth.hasPermi('se:repair:create') ? 'button' : '', btnName: '新增', name: 'add', plain: true, diff --git a/src/views/specialEquipment/maintain/WaitingList.vue b/src/views/specialEquipment/maintain/WaitingList.vue index 16cbf936..c52ba25d 100644 --- a/src/views/specialEquipment/maintain/WaitingList.vue +++ b/src/views/specialEquipment/maintain/WaitingList.vue @@ -14,22 +14,6 @@ @select-changed="handleSearchBarChange" @headBtnClick="handleSearchBarBtnClick" /> - - - + - + 关闭 @@ -107,32 +98,8 @@ import WaitingListTable from './WaitingListTable.vue'; import RecordDetail from './Record--detail.vue'; import BaseDialogWrapper from '../components/BaseDialogWrapper.vue'; -// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'); -// const btn = { -// name: 'tableBtn', -// props: ['injectData'], -// data() { -// return {}; -// }, -// methods: { -// handleClick() { -// this.$emit('emitData', { -// action: this.injectData.label, -// value: this.injectData, -// }); -// }, -// }, -// render: function (h) { -// return ( -// -// {this.injectData.name} -// -// ); -// }, -// }; - export default { - name: 'SpecialEquipmentMaintainRecord', + name: 'SpecialEquipmentMaintainRecordUnconfirmed', components: { DialogFormUnplanned, WaitingListTable, @@ -146,235 +113,9 @@ export default { data() { return { recordDetailVisible: false, - searchBarKeys: [ - 'maintainPlanId', - 'startTime', - 'special', - // 'relatePlan', - // 'equipmentId', - // 'specialType', - ], + searchBarKeys: ['maintainPlanId', 'startTime', 'special'], tobeConfirmedIdList: [], - // tableBtn: [ - // // this.$auth.hasPermi('equipment:maintain-record:update') - // // ? { - // // type: 'detail', - // // btnName: '详情', - // // } - // // : undefined, - // { - // type: 'confirm', - // btnName: '确认', - // }, - // { - // type: 'edit', - // btnName: '编辑', - // }, - // { - // type: 'delete', - // btnName: '删除', - // }, - // ], - // tableProps: [ - // // { - // // prop: 'createTime', - // // label: '添加时间', - // // fixed: true, - // // width: 150, - // // filter: timeFilter, - // // }, - // { - // type: 'selection', - // // prop: '_selection', - // // label: '批量选择', - // width: 48, - // subcomponent: { - // props: ['injectData'], - // data() { - // return { - // outside: false, - // selected: false, - // }; - // }, - // watch: { - // selected(val) { - // if (!this.outside) { - // console.log('emit row-selected...'); - // this.$emit('emitData', { - // action: 'row-selected', - // value: { - // row: this.injectData, - // selected: val, - // }, - // }); - // } - // }, - // injectData: { - // deep: true, - // immediate: true, - // handler: function (val) { - // this.outside = true; - // this.selected = !!((val._selection & 0b01) != 0); - // this.$nextTick(() => { - // this.outside = false; - // }); - // }, - // }, - // }, - // render(h) { - // const enabled = 0b10 & this.injectData._selection; - // // return this.injectData?._selection ? h('h1', null, 'hello') : h('h1', null, '1'); - // return ( - //
- // {this.selected} - // - //
- // ); - // }, - // }, - // }, - // { - // prop: 'maintainOrderNumber', - // label: '设备保养单号', - // width: 110, - // showOverflowtooltip: true, - // }, - // { - // prop: 'planName', - // label: '保养计划名称', - // width: 110, - // showOverflowtooltip: true, - // }, - // { - // prop: 'departmentName', - // label: '部门', - // width: 110, - // showOverflowtooltip: true, - // }, - // { - // prop: 'lineName', - // label: '产线名', - // width: 110, - // showOverflowtooltip: true, - // }, - // { - // prop: 'planStartTime', - // label: '计划开始时间', - // filter: timeFilter, - // minWidth: 150, - // showOverflowtooltip: true, - // }, - // { - // prop: 'planEndTime', - // label: '计划结束时间', - // filter: timeFilter, - // minWidth: 150, - // showOverflowtooltip: true, - // }, - // { - // prop: 'startTime', - // label: '实际开始时间', - // filter: timeFilter, - // minWidth: 150, - // showOverflowtooltip: true, - // }, - // { - // prop: 'endTime', - // label: '实际结束时间', - // filter: timeFilter, - // minWidth: 150, - // showOverflowtooltip: true, - // }, - // { - // prop: 'confirmDueTime', - // label: '确认截止时间', - // filter: timeFilter, - // minWidth: 150, - // showOverflowtooltip: true, - // }, - // { - // prop: 'relatePlan', - // label: '保养计划类型', - // minWidth: 150, - // showOverflowtooltip: true, - // filter: (val) => - // val != null ? ['-', '计划型', '非计划型'][val] : '-', - // }, - // { - // prop: '_detail', - // label: '详情', - // name: '详情', - // minWidth: 60, - // subcomponent: btn, - // }, - // // { - // // prop: 'equipmentCategory', - // // label: '设备大类', - // // minWidth: 100, - // // showOverflowtooltip: true, - // // filter: (val) => - // // val != null ? ['-', '安全设备', '消防设备', '特种设备'][val] : '-', - // // }, - // // { - // // prop: 'equipmentName', - // // label: '设备名称', - // // minWidth: 100, - // // showOverflowtooltip: true, - // // }, - // // { - // // prop: 'maintainWorker', - // // label: '保养人员', - // // minWidth: 100, - // // showOverflowtooltip: true, - // // }, - // // { - // // prop: 'relatePlan', - // // label: '是否计划保养', - // // width: 120, - // // filter: (v) => (v != null ? ['', '是', '否'][v] : ''), - // // }, - // // { - // // prop: 'planName', - // // label: '保养计划名称', - // // minWidth: 120, - // // showOverflowtooltip: true, - // // }, - // // { - // // prop: 'maintainDuration', - // // label: '计划保养用时(h)', - // // minWidth: 130, - // // showOverflowtooltip: true, - // // }, - // // { prop: 'timeUsed', label: '实际保养用时(h)', minWidth: 130 }, - // // { - // // prop: 'remark', - // // label: '备注', - // // minWidth: 100, - // // showOverflowtooltip: true, - // // }, - // ], searchBarFormConfig: [ - // { - // type: 'select', - // label: '设备大类', - // placeholder: '请选择设备大类', - // param: 'specialType', - // onchange: true, - // selectOptions: [ - // { id: 1, name: '安全设备' }, - // { id: 2, name: '消防设备' }, - // { id: 3, name: '特种设备' }, - // ], - // filterable: true, - // defaultSelect: null - // }, - // { - // type: 'select', - // label: '设备', - // placeholder: '请选择设备', - // param: 'equipmentId', - // defaultSelect: null - // }, { type: 'select', label: '保养计划名称', @@ -399,16 +140,6 @@ export default { defaultSelect: null, // width: 350, }, - // { - // type: 'select', - // label: '是否计划保养', - // selectOptions: [ - // { name: '是', id: 1 }, - // { name: '否', id: 2 }, - // ], - // defaultSelect: null, - // param: 'relatePlan', - // }, { type: 'button', btnName: '查询', @@ -419,21 +150,25 @@ export default { type: 'separate', }, { - type: 'button', + type: this.$auth.hasPermi('se:maintain-record-pre:create') + ? 'button' + : '', btnName: '新增', name: 'add', plain: true, color: 'success', }, { - type: 'button', + type: this.$auth.hasPermi('se:maintain-record-pre:confirm-all') + ? 'button' + : '', btnName: '批量确认', name: 'batchConfirm', color: 'primary', plain: true, }, { - type: this.$auth.hasPermi('equipment:maintain-record:export') + type: this.$auth.hasPermi('se:maintain-record-pre:export') ? 'button' : '', btnName: '导出', @@ -441,15 +176,6 @@ export default { plain: true, color: 'primary', }, - // { - // type: this.$auth.hasPermi('equipment:maintain-record:create') - // ? 'button' - // : '', - // btnName: '新增', - // name: 'add', - // plain: true, - // color: 'success', - // }, ], // 是否显示弹出层 open: false, @@ -483,30 +209,7 @@ export default { }, created() { this.initSearchBar(); - // if (this.$route.query) { - // this.queryParams.specialType = - // this.$route.query?.specialType ?? undefined; - // this.queryParams.equipmentId = - // this.$route.query?.equipmentId ?? undefined; - // this.queryParams.maintainPlanId = - // this.$route.query?.maintainPlanId ?? undefined; - // this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined; - // this.queryParams.startTime = this.$route.query?.createTime ?? undefined; - // this.searchBarFormConfig[0].defaultSelect = - // this.$route.query.specialType ?? undefined; - // this.searchBarFormConfig[1].defaultSelect = - // this.$route.query.equipmentId ?? undefined; - // this.searchBarFormConfig[2].defaultSelect = - // this.$route.query.maintainPlanId ?? undefined; - // this.searchBarFormConfig[3].defaultSelect = - // this.$route.query?.createTime ?? undefined; - // this.searchBarFormConfig[4].defaultSelect = - // Number(this.$route.query.relatePlan) ?? undefined; - // } this.getList(); - // if (this.$route.query.addRecord) { - // this.handleAdd(); - // } }, methods: { /** 批量确认 */ @@ -531,60 +234,6 @@ export default { break; } }, - handleSelectionChange(list) { - if (this.tobeConfirmedIdList.length) { - this.tobeConfirmedIdList = []; - this.list.forEach((item) => { - this.handleEmitFun({ - action: 'row-selected', - value: { row: item, selected: false }, - }); - }); - console.log( - '清空选择列表', - this.list.map((item) => item._selection) - ); - } else { - this.tobeConfirmedIdList = list.map((item) => item.id); - this.list.forEach((item) => { - this.handleEmitFun({ - action: 'row-selected', - value: { row: item, selected: true }, - }); - }); - console.log( - '全选', - this.list.map((item) => item._selection) - ); - } - }, - - handleEmitFun({ action, value }) { - switch (action) { - case '详情': - this.recordDetailVisible = true; - this.$nextTick(() => { - this.$refs.recordDetailDrawer.show({ - id: value.id, - planMaintainWorker: value.planMaintainWorker, - maintainWorker: value.maintainWorker, - }); - }); - break; - case 'row-selected': - if (value.selected) { - this.tobeConfirmedIdList.push(value.row.id); - value.row._selection = 0b11; - } else { - const index = this.tobeConfirmedIdList.indexOf(value.row.id); - if (index != -1) { - this.tobeConfirmedIdList.splice(index, 1); - } - } - console.log('tobeConfirmedIdList', this.tobeConfirmedIdList); - break; - } - }, handleSearchBarChange({ param, value }) { if ('specialType' === param) { @@ -598,10 +247,6 @@ export default { } }, initSearchBar() { - // this.http('/base/core-equipment/listAll', 'get').then(({ data }) => { - // this.allSpecialEquipments = data.filter((item) => item.special); - // this.setSearchBarEquipmentList(data.filter((item) => item.special)); - // }); this.http('/base/equipment-maintain-plan/page', 'get', { pageNo: 1, pageSize: 100, @@ -609,7 +254,6 @@ export default { }).then(({ data }) => { this.$set( this.searchBarFormConfig[0], - // this.searchBarFormConfig[2], 'selectOptions', (data?.list || []).map((item) => ({ name: item.name, @@ -625,7 +269,6 @@ export default { this.recv({ ...this.queryParams, special: true, - // relatePlan: 2, confirmed: false, }).then((response) => { this.list = response.data.list; @@ -730,35 +373,6 @@ export default { }, 450); }); } - - // 添加的提交 - // this.getConfirmed() - // .then((confirmed) => { - // this.post({ - // ...this.form, - // maintainWorker: this.form.maintainWorker.join(','), - // special: true, - // relatePlan: 2, - // confirmed: true, - // }).then((response) => { - // this.$modal.msgSuccess('新增成功'); - // this.open = false; - // this.getList(); - // }); - // }) - // .catch((err) => { - // this.post({ - // ...this.form, - // maintainWorker: this.form.maintainWorker.join(','), - // special: true, - // relatePlan: 2, - // confirmed: false, - // }).then((response) => { - // this.$modal.msgSuccess('新增成功'); - // this.open = false; - // this.getList(); - // }); - // }); }); }, /** 确认 */ diff --git a/src/views/specialEquipment/maintain/WaitingListTable.vue b/src/views/specialEquipment/maintain/WaitingListTable.vue index e27c731e..3413df82 100644 --- a/src/views/specialEquipment/maintain/WaitingListTable.vue +++ b/src/views/specialEquipment/maintain/WaitingListTable.vue @@ -144,6 +144,7 @@ label="操作">