diff --git a/src/jmapNew/theme/datie_tky/menus/menuSignal.vue b/src/jmapNew/theme/datie_tky/menus/menuSignal.vue index 9dd74dd02..58a4ec918 100644 --- a/src/jmapNew/theme/datie_tky/menus/menuSignal.vue +++ b/src/jmapNew/theme/datie_tky/menus/menuSignal.vue @@ -13,6 +13,7 @@ import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordIn import { DeviceMenu } from '@/scripts/ConstDic'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; +import CMD from '@/scripts/cmdPlugin/CommandEnum'; export default { name: 'SignalMenu', components: { @@ -61,8 +62,13 @@ export default { }, { label: '加封', - handler: this.seal - // cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE + handler: this.lock, + cmdType: CMD.Signal.CMD_SIGNAL_BLOCK + }, + { + label: '解封', + handler: this.unlock, + cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK } ] } @@ -153,8 +159,22 @@ export default { }, // 加封 - seal() { - + lock() { + const model = this.selected; // 选择设备 + commitOperate(menuOperate.Signal.lock, {signalCode: model._type === 'Signal' ? model.code : model.signalCode}, 3).then(({valid, operate}) => { + if (valid) { + // + } + }); + }, + // 解封 + unlock() { + const model = this.selected; // 选择设备 + commitOperate(menuOperate.Signal.unlock, {signalCode: model._type === 'Signal' ? model.code : model.signalCode}, 3).then(({valid, operate}) => { + if (valid) { + // + } + }); }, doClose() { if (this.$refs && this.$refs.popMenu) {