控制权转移调整

This commit is contained in:
fan 2020-06-28 14:50:09 +08:00
parent fd2347e4e7
commit 1fc6bd7058
3 changed files with 5 additions and 11 deletions

View File

@ -41,12 +41,10 @@ export default {
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && elem.type == 'resp' && (elem.timeout || !elem.agree)) {
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
const station = this.$store.getters['map/getDeviceByCode'](elem.stationCodes[0]);
const newOperate = {
name: station.name
};
if (elem.timeout) {
newOperate['msg'] = this.$t('menu.passiveDialog.requestTimedOut');
this.doShow(newOperate);

View File

@ -41,8 +41,7 @@ export default {
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && elem.type == 'resp' && (elem.timeout || !elem.agree)) {
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
const station = this.$store.getters['map/getDeviceByCode'](elem.stationCodes[0]);
const newOperate = {
name: station.name
};
@ -83,7 +82,6 @@ export default {
const operate = {
operation: OperationEvent.Command.close.notice.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {

View File

@ -41,12 +41,10 @@ export default {
watch: {
'$store.state.socket.msgHead': function (elem) {
if (elem && elem.type == 'resp' && (elem.timeout || !elem.agree)) {
const control = this.$store.getters['map/getDeviceByCode'](elem.stationControlCode);
const station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
const station = this.$store.getters['map/getDeviceByCode'](elem.stationCodes[0]);
const newOperate = {
name: station.name
};
if (elem.timeout) {
newOperate['msg'] = this.$t('menu.passiveDialog.requestTimedOut');
this.doShow(newOperate);
@ -84,7 +82,7 @@ export default {
operation: OperationEvent.Command.close.notice.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();
@ -95,7 +93,7 @@ export default {
const operate = {
operation: OperationEvent.Command.close.notice.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.doClose();