Browse Source

设备按钮权限

master
zhaoyiran 7 months ago
parent
commit
dc75ed8c68
  1. 9
      src/views/eam/device/deviceAccounts/index.vue
  2. 10
      src/views/eam/device/deviceInternalAudit/index.vue
  3. 6
      src/views/eam/device/deviceMaintainPlan/index.vue
  4. 8
      src/views/eam/device/deviceRepair/index.vue
  5. 4
      src/views/eam/device/deviceSpotInspectionRecordMain/index.vue
  6. 12
      src/views/eam/device/deviceinspectionjob/index.vue
  7. 11
      src/views/eam/device/devicemaintainjob/index.vue
  8. 12
      src/views/eam/device/devicemaintenancejob/index.vue
  9. 8
      src/views/eam/device/problemSolving/index.vue

9
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) //

10
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'}), //
]
// -

6
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), //

8
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 )}), //
]
}

4
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) => {

12
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))
}) //
]

11
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))
}) //

12
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')
)

8
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'}) //
]
// -

Loading…
Cancel
Save