diff --git a/src/utils/enums.js b/src/utils/enums.js index 0df5e47..df18105 100644 --- a/src/utils/enums.js +++ b/src/utils/enums.js @@ -30,12 +30,11 @@ export const ChannelType = { // 渠道API类型 export const ChannelApiType = { - WECHAT: "1", // 微信 - ALI_PAY: "2", // 支付宝 - BANK: "3", // 银行卡 - TL_WX: "5", // 通联微信 - TM_WX: "6", // 太米微信 - XY_WX: "7", // 国通星驿微信 + WECHAT: "WX", // 微信 + ALI_PAY: "ALI", // 支付宝 + BANK: "BANK", // 银行卡 + BALANCE: "BALANCE", // 余额 + TM_WX: "TM_WX", // 太米微信 } // 运营区状态 @@ -123,6 +122,12 @@ export const DeviceStatus = { }, } +// 设备锁状态 +export const DeviceLockStatus = { + LOCKED: "0", // 锁车 + UNLOCKED: "1", // 开锁 +} + // 加盟类型 export const AreaJoinType = { JOIN: "1", // 加盟 diff --git a/src/views/bst/device/index.vue b/src/views/bst/device/index.vue index fa28a2a..048fab0 100644 --- a/src/views/bst/device/index.vue +++ b/src/views/bst/device/index.vue @@ -276,7 +276,7 @@ icon="el-icon-unlock" @click="handleUnlock(scope.row)" v-has-permi="['bst:device:unlock']" - v-show="DeviceStatus.canAdminUnlock().includes(scope.row.status)" + v-show="canUnlock(scope.row)" >开锁 锁车 { + return DeviceStatus.canAdminUnlock().includes(row.status) + && DeviceLockStatus.LOCKED == row.lockStatus + } + }, + canLock() { + return (row) => { + return DeviceStatus.canLock().includes(row.status) + && DeviceLockStatus.UNLOCKED == row.lockStatus + } + }, + } +} \ No newline at end of file diff --git a/src/views/bst/suit/components/SuitEditDialog.vue b/src/views/bst/suit/components/SuitEditDialog.vue index 31dfa49..15916c8 100644 --- a/src/views/bst/suit/components/SuitEditDialog.vue +++ b/src/views/bst/suit/components/SuitEditDialog.vue @@ -26,9 +26,14 @@ - - - + @@ -74,80 +79,96 @@ - +