From dc75ed8c68f13ea7bb231d5b2b7c94f3790bfce8 Mon Sep 17 00:00:00 2001 From: zhaoyiran Date: Sun, 28 Apr 2024 13:14:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=8C=89=E9=92=AE=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/eam/device/deviceAccounts/index.vue | 9 +++++---- src/views/eam/device/deviceInternalAudit/index.vue | 10 +++++----- src/views/eam/device/deviceMaintainPlan/index.vue | 6 +++--- src/views/eam/device/deviceRepair/index.vue | 8 ++++---- .../device/deviceSpotInspectionRecordMain/index.vue | 4 +++- src/views/eam/device/deviceinspectionjob/index.vue | 12 ++++++++---- src/views/eam/device/devicemaintainjob/index.vue | 11 ++++++++--- src/views/eam/device/devicemaintenancejob/index.vue | 12 ++++++++++-- src/views/eam/device/problemSolving/index.vue | 8 +++++--- 9 files changed, 51 insertions(+), 29 deletions(-) diff --git a/src/views/eam/device/deviceAccounts/index.vue b/src/views/eam/device/deviceAccounts/index.vue index b5d2230..4e973b5 100644 --- a/src/views/eam/device/deviceAccounts/index.vue +++ b/src/views/eam/device/deviceAccounts/index.vue @@ -80,6 +80,7 @@ DeviceMaintenanceDetail } from '../devicemaintenancejob/deviceMaintenanceMain.data' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' + import {hasPermi} from "@/directives/permission/hasPermi"; defineOptions({ name: 'DeviceAccounts' }) @@ -126,10 +127,10 @@ // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn(null), // 新增 + defaultButtons.defaultAddBtn({hasPermi:'eam:device-accounts:create'}), // 新增 defaultButtons.selectQrCodeBatchBtn(null), //批量生成二维码 - // defaultButtons.defaultImportBtn(null), // 导入 - // defaultButtons.defaultExportBtn(null), // 导出 + defaultButtons.defaultImportBtn({hasPermi:'eam:device-accounts:import'}), // 导入 + defaultButtons.defaultExportBtn({hasPermi:'eam:device-accounts:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null) // 设置 @@ -170,7 +171,7 @@ // 列表-操作按钮 const butttondata = [ - defaultButtons.mainListEditBtn(null), // 编辑 + defaultButtons.mainListEditBtn({hasPermi:'eam:device-accounts:update'}), // 编辑 // defaultButtons.mainListDeleteBtn(null), // 删除 defaultButtons.selectQrCodeBtn(null), //二维码 defaultButtons.selectItemBtn(null) //备件 diff --git a/src/views/eam/device/deviceInternalAudit/index.vue b/src/views/eam/device/deviceInternalAudit/index.vue index aee747f..64f9355 100644 --- a/src/views/eam/device/deviceInternalAudit/index.vue +++ b/src/views/eam/device/deviceInternalAudit/index.vue @@ -99,9 +99,9 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn(null), // 新增 - defaultButtons.defaultImportBtn({hasPermi:'eam:deviceInternalAudit:import'}), // 导入 - defaultButtons.defaultExportBtn({hasPermi:'eam:deviceInternalAudit:export'}), // 导出 + defaultButtons.defaultAddBtn({hasPermi:'eam:device-Internal-Audit:create'}), // 新增 + defaultButtons.defaultImportBtn({hasPermi:'eam:device-Internal-Audit:import'}), // 导入 + defaultButtons.defaultExportBtn({hasPermi:'eam:device-Internal-Audit:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -133,8 +133,8 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = [ - defaultButtons.mainListEditBtn(null), // 编辑 - defaultButtons.mainListDeleteBtn(null), // 删除 + defaultButtons.mainListEditBtn({hasPermi:'eam:device-Internal-Audit:update'}), // 编辑 + defaultButtons.mainListDeleteBtn({hasPermi:'eam:device-Internal-Audit:delete'}), // 删除 ] // 列表-操作按钮事件 diff --git a/src/views/eam/device/deviceMaintainPlan/index.vue b/src/views/eam/device/deviceMaintainPlan/index.vue index a5b9edf..08d916e 100644 --- a/src/views/eam/device/deviceMaintainPlan/index.vue +++ b/src/views/eam/device/deviceMaintainPlan/index.vue @@ -99,9 +99,9 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({hasPermi:'eam:deviceMaintainPlan:create'}), // 新增 - defaultButtons.defaultImportBtn({hasPermi:'eam:deviceMaintainPlan:import'}), // 导入 - defaultButtons.defaultExportBtn({hasPermi:'eam:deviceMaintainPlan:export'}), // 导出 + defaultButtons.defaultAddBtn({hasPermi:'eam:device-Maintain-Plan:create'}), // 新增 + defaultButtons.defaultImportBtn({hasPermi:'eam:device-Maintain-Plan:import'}), // 导入 + defaultButtons.defaultExportBtn({hasPermi:'eam:device-Maintain-Plan:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 diff --git a/src/views/eam/device/deviceRepair/index.vue b/src/views/eam/device/deviceRepair/index.vue index f23218c..475a3f3 100644 --- a/src/views/eam/device/deviceRepair/index.vue +++ b/src/views/eam/device/deviceRepair/index.vue @@ -115,9 +115,9 @@ const HeadButttondata = [ // defaultButtons.defaultAddBtn({hasPermi:'eam:deviceRepair:create'}), // 新增 // defaultButtons.defaultImportBtn({hasPermi:'eam:deviceRepair:import'}), // 导入 // defaultButtons.defaultExportBtn({ hasPermi: 'eam:deviceRepair:export' }), // 导出 - defaultButtons.defaultAddBtn(null), // 新增 - // defaultButtons.defaultImportBtn(null), // 导入 - // defaultButtons.defaultExportBtn(null), // 导出 + defaultButtons.defaultAddBtn({hasPermi:'eam:device-repair-request:create'}), // 新增 + defaultButtons.defaultImportBtn({hasPermi:'eam:device-repair-request:import'}), // 导入 + defaultButtons.defaultExportBtn({hasPermi:'eam:device-repair-request:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -153,7 +153,7 @@ const butttondata = (row) => { // defaultButtons.mainListEditBtn({hasPermi:'eam:deviceRepair:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({ hasPermi: 'eam:deviceRepair:delete' }), // 删除 - defaultButtons.backoutBtn({ hide: !(row.result == 'PENDING' && row.declarer == userStore.getUser.id )}), // 撤销 + defaultButtons.backoutBtn({hasPermi:'eam:device-repair-request:rejected', hide: !(row.result == 'PENDING' && row.declarer == userStore.getUser.id )}), // 撤销 ] } diff --git a/src/views/eam/device/deviceSpotInspectionRecordMain/index.vue b/src/views/eam/device/deviceSpotInspectionRecordMain/index.vue index 03575ed..160ee2f 100644 --- a/src/views/eam/device/deviceSpotInspectionRecordMain/index.vue +++ b/src/views/eam/device/deviceSpotInspectionRecordMain/index.vue @@ -218,6 +218,8 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ // defaultButtons.defaultAddBtn(null), // 新增 + defaultButtons.defaultImportBtn({hasPermi:'eam:device-spot-inspection-record-main:import'}), + defaultButtons.defaultExportBtn({hasPermi:'eam:device-spot-inspection-record-main:export'}), defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null) // 设置 @@ -261,7 +263,7 @@ const isShowMainButton = (row, val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.approveBtn({ hide: !(row.status == 'COMPLETED' && judgeIfDeviceRole())}), // 审批 + defaultButtons.approveBtn({ hasPermi:'eam:device-spot-inspection-record-main:approve', hide: !(row.status == 'COMPLETED')}), // 审批 ] } const onChange = (field, cur, item) => { diff --git a/src/views/eam/device/deviceinspectionjob/index.vue b/src/views/eam/device/deviceinspectionjob/index.vue index 6aed69e..58856c4 100644 --- a/src/views/eam/device/deviceinspectionjob/index.vue +++ b/src/views/eam/device/deviceinspectionjob/index.vue @@ -194,7 +194,9 @@ const judgeHasAddFunc = () => { // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({ hide: !(judgeHasAddFunc()) }), // 新增 + defaultButtons.defaultAddBtn({ hasPermi:'eam:device-inspection-job-main:create'}), // 新增 + defaultButtons.defaultImportBtn({ hasPermi:'eam:device-inspection-job-main:import'}), // 导入 + defaultButtons.defaultExportBtn({ hasPermi:'eam:device-inspection-job-main:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -237,12 +239,14 @@ const butttondata = (row) => { // defaultButtons.mainListEditBtn({hasPermi:'eam:deviceInspectionMain:update'}), // 编辑 // defaultButtons.mainListDeleteBtn({hasPermi:'eam:deviceInspectionMain:delete'}), // 删除 // defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED' && isReceiver(row.maintenance))}), // 编辑 - defaultButtons.mainInspectionOrderBtn({ hide: !(row.status == 'PECEIVED' && (userStore.getUser.id == row.maintenance)) }), //检修 - defaultButtons.finishOrderBtn({ hide: !(row.status == 'PECEIVED' && (userStore.getUser.id == row.maintenance)) }), //完成 + defaultButtons.mainInspectionOrderBtn({hasPermi:'eam:device-inspection-job-main:inspection', hide: !(row.status == 'PECEIVED' && (userStore.getUser.id == row.maintenance)) }), //检修 + defaultButtons.finishOrderBtn({ hasPermi:'eam:device-inspection-job-main:orderClickFinish', hide: !(row.status == 'PECEIVED' && (userStore.getUser.id == row.maintenance)) }), //完成 defaultButtons.verifyOrderBtn({ - hide: !(row.status == 'COMPLETED' && judgeIsTheClassEngineer(row)) + hasPermi:'eam:device-inspection-job-main:orderClickVerify', + hide: !(row.status == 'COMPLETED' ) }), // 验证 defaultButtons.orderPrintBtn({ + hasPermi:'eam:device-inspection-job-main:print', hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) || !((row.status == 'COMPLETED' || row.status == 'PECEIVED') && judgeIsTheClassEngineer(row)) }) // 打印 ] diff --git a/src/views/eam/device/devicemaintainjob/index.vue b/src/views/eam/device/devicemaintainjob/index.vue index e43f807..81df738 100644 --- a/src/views/eam/device/devicemaintainjob/index.vue +++ b/src/views/eam/device/devicemaintainjob/index.vue @@ -221,6 +221,8 @@ const { getList, setSearchParams } = tableMethods const HeadButttondata = [ // defaultButtons.defaultAddBtn({ // }), // 新增 + defaultButtons.defaultImportBtn({hasPermi:'eam:device-maintain-job-main:import'}), + defaultButtons.defaultExportBtn({hasPermi:'eam:device-maintain-job-main:export'}), defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null) // 设置 @@ -260,20 +262,23 @@ const butttondata = (row) => { return [ // defaultButtons.mainListEditBtn(null), // 编辑 defaultButtons.acceptOrderBtn({ - hide: !( - row.status == 'PENDING' && judgeIsTheClass(row) - ) + hasPermi:'eam:device-maintain-job-main:orderClick', + hide: !(row.status == 'PENDING') }), // 接单 defaultButtons.maintainBtn({ + hasPermi:'eam:device-maintain-job-main:maintain', hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) }),// 保养 defaultButtons.finishOrderBtn({ + hasPermi:'eam:device-maintain-job-main:orderClickFinish', hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) }), // 完成 defaultButtons.verifyOrderBtn({ + hasPermi:'eam:device-maintain-job-main:orderClickVerify', hide: !(row.status == 'COMPLETED' && judgeIsTheClassEngineer(row)) }), // 验证 defaultButtons.orderPrintBtn({ + hasPermi:'eam:device-maintain-job-main:print', hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) || !((row.status == 'COMPLETED' || row.status == 'PECEIVED') && judgeIsTheClassEngineer(row)) }) // 打印 diff --git a/src/views/eam/device/devicemaintenancejob/index.vue b/src/views/eam/device/devicemaintenancejob/index.vue index aea78c2..04259eb 100644 --- a/src/views/eam/device/devicemaintenancejob/index.vue +++ b/src/views/eam/device/devicemaintenancejob/index.vue @@ -439,7 +439,9 @@ const judgeIsTheClassWorker = (row) => { // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({ hide: !(judgeHasAddFunc()) }), // 新增 + defaultButtons.defaultAddBtn({ hasPermi:'eam:device-maintenance-job-main:create'}), // 新增 + defaultButtons.defaultImportBtn({hasPermi:'eam:device-maintenance-job-main:import'}), + defaultButtons.defaultExportBtn({hasPermi:'eam:device-maintenance-job-main:export'}), defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null) // 设置 @@ -486,27 +488,33 @@ const isShowMainButton = (row, val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED' && row.status != 'APPLYPASS' && isReceiver(row.maintenance) )}), // 编辑 + defaultButtons.mainListEditBtn({hasPermi:'eam:device-maintenance-job-main:update', hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED' && row.status != 'APPLYPASS' && isReceiver(row.maintenance) )}), // 编辑 defaultButtons.acceptOrderBtn({ + hasPermi:'eam:device-maintenance-job-main:orderClick', hide: !( row.status == 'PENDING' && judgeIsTheClass(row) && judgeIsTheFactory(row) ) }), // 接单 defaultButtons.turnOrderBtn({ + hasPermi:'eam:device-maintenance-job-main:turnTo', hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id && !row.hasDetails ) }), // 转办 defaultButtons.repairBtn({ + hasPermi:'eam:device-maintenance-job-main:repair', hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) }), // 维修 defaultButtons.verifyOrderBtn({ + hasPermi:'eam:device-maintenance-job-main:orderClickVerify', hide: !( judgeIsTheClassEngineerAndApply(row,'VERIFY') && judgeIsTheFactory(row) ) }), // 验证 defaultButtons.finishOrderBtn({ + hasPermi:'eam:device-maintenance-job-main:orderClickFinish', hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id && row.hasDetails) }), // 完成 defaultButtons.confirmOrderBtn({ + hasPermi:'eam:device-maintenance-job-main:orderClickConfirm', hide: !( judgeIsTheClassEngineerAndApply(row,'CONFIRM') ) diff --git a/src/views/eam/device/problemSolving/index.vue b/src/views/eam/device/problemSolving/index.vue index dae632f..a1423fa 100644 --- a/src/views/eam/device/problemSolving/index.vue +++ b/src/views/eam/device/problemSolving/index.vue @@ -108,7 +108,9 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn(null) // 新增 + defaultButtons.defaultAddBtn({hasPermi:'eam:problem-solving:create'}), // 新增 + defaultButtons.defaultImportBtn({hasPermi:'eam:problem-solving:import'}), + defaultButtons.defaultExportBtn({hasPermi:'eam:problem-solving:export'}) // { // label: '自定义扩展按钮', // name: 'zdy', @@ -143,8 +145,8 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = [ - defaultButtons.mainListEditBtn(null), // 编辑 - defaultButtons.mainListDeleteBtn(null) // 删除 + defaultButtons.mainListEditBtn({hasPermi:'eam:problem-solving:update'}), // 编辑 + defaultButtons.mainListDeleteBtn({hasPermi:'eam:problem-solving:delete'}) // 删除 ] // 列表-操作按钮事件