This commit is contained in:
joylink_cuiweidong 2022-07-21 17:25:59 +08:00
commit a9bd7ef945

View File

@ -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) {