Merge branch 'master' of git.code.tencent.com:beijing-rtss-test/bj-rtss-client
This commit is contained in:
commit
31e5048880
@ -62,16 +62,14 @@ watch(
|
||||
);
|
||||
|
||||
function setNewRelayState(relay: Relay) {
|
||||
if (relay && relay instanceof Relay) {
|
||||
relayState.value = {
|
||||
id: relay.datas.id,
|
||||
code: relay.datas.code,
|
||||
xh: relay.states.xh || false,
|
||||
};
|
||||
operateOptions = relay.states.xh
|
||||
? [{ label: '驱动落下', value: false }]
|
||||
: [{ label: '驱动吸起', value: true }];
|
||||
}
|
||||
relayState.value = {
|
||||
id: relay.datas.id,
|
||||
code: relay.datas.code,
|
||||
xh: relay.states.xh || false,
|
||||
};
|
||||
operateOptions = relay.states.xh
|
||||
? [{ label: '驱动落下', value: false }]
|
||||
: [{ label: '驱动吸起', value: true }];
|
||||
subscribeState(relay);
|
||||
}
|
||||
|
||||
@ -94,10 +92,10 @@ function unSubscribeState(g: Relay) {
|
||||
}
|
||||
|
||||
function updateState(newVal: RelayState) {
|
||||
(relayState.value.xh = newVal.states.xh || false),
|
||||
(operateOptions = newVal.states.xh
|
||||
? [{ label: '驱动落下', value: false }]
|
||||
: [{ label: '驱动吸起', value: true }]);
|
||||
relayState.value.xh = newVal.states.xh || false;
|
||||
operateOptions = newVal.states.xh
|
||||
? [{ label: '驱动落下', value: false }]
|
||||
: [{ label: '驱动吸起', value: true }];
|
||||
}
|
||||
|
||||
function changePosition(td: boolean) {
|
||||
|
Loading…
Reference in New Issue
Block a user