修改宁波3 检测selected的方式

This commit is contained in:
lVAL 2021-02-02 10:49:25 +08:00
parent 3acdfc95fd
commit dbdfe26e86
6 changed files with 8 additions and 6 deletions

View File

@ -158,7 +158,7 @@ export default {
this.commit(); this.commit();
} }
}, },
'$store.state.menuOperation.selectedCount': function(val) { 'selected': function(val) {
if (this.selected) { if (this.selected) {
const stand = this.$store.getters['map/getDeviceByCode'](this.selected.code); const stand = this.$store.getters['map/getDeviceByCode'](this.selected.code);
this.currentTime = stand.parkingTime this.currentTime = stand.parkingTime

View File

@ -68,7 +68,6 @@ export default {
allChecked: false, allChecked: false,
dialogShow: false, dialogShow: false,
loading: false, loading: false,
isBlock: true,
initEle: null, initEle: null,
commandEleCode: null commandEleCode: null
}; };
@ -88,6 +87,9 @@ export default {
selected() { selected() {
return this.$store.state.menuOperation.selected; return this.$store.state.menuOperation.selected;
}, },
isBlock() {
return this.operate && this.operate.operation === OperationEvent.Signal.block.button.operation;
},
domIdChoose() { domIdChoose() {
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '' return this.dialogShow ? OperationEvent.Command.common.choose.domId : ''
}, },

View File

@ -105,7 +105,7 @@ export default {
this.commit(); this.commit();
} }
}, },
'$store.state.menuOperation.selectedCount': function(val) { 'selected': function(val) {
console.log(this.selected) console.log(this.selected)
if (this.selected) { if (this.selected) {
const signal = this.$store.getters['map/getDeviceByCode'](this.selected.code); const signal = this.$store.getters['map/getDeviceByCode'](this.selected.code);

View File

@ -98,7 +98,7 @@ export default {
this.commit(); this.commit();
} }
}, },
'$store.state.menuOperation.selectedCount': function(val) { 'selected': function(val) {
if (this.selected) { if (this.selected) {
const stand = this.$store.getters['map/getDeviceByCode'](this.selected.code); const stand = this.$store.getters['map/getDeviceByCode'](this.selected.code);
this.status = !!stand.allSkip this.status = !!stand.allSkip

View File

@ -115,7 +115,7 @@ export default {
this.commit(); this.commit();
} }
}, },
'$store.state.menuOperation.selectedCount': function(val) { 'selected': function(val) {
if (this.selected) { if (this.selected) {
const stand = this.$store.getters['map/getDeviceByCode'](this.selected.code); const stand = this.$store.getters['map/getDeviceByCode'](this.selected.code);
if (stand && !stand.stationHoldTrain && !stand.centerHoldTrain) { if (stand && !stand.stationHoldTrain && !stand.centerHoldTrain) {

View File

@ -96,7 +96,7 @@ export default {
this.commit(); this.commit();
} }
}, },
'$store.state.menuOperation.selectedCount': function(val) { 'selected': function(val) {
if (this.selected) { if (this.selected) {
const swch = this.$store.getters['map/getDeviceByCode'](this.selected.code); const swch = this.$store.getters['map/getDeviceByCode'](this.selected.code);
if (swch) { if (swch) {