This commit is contained in:
fan 2020-05-22 13:05:36 +08:00
commit acfab51e85
33 changed files with 100 additions and 110 deletions

View File

@ -32,8 +32,7 @@ export default {
data() {
return {
dialogShow: false,
messages: [this.$t('tip.commandFailed')],
operate: null
messages: [this.$t('tip.commandFailed')]
};
},
computed: {
@ -53,8 +52,7 @@ export default {
});
},
methods: {
doShow(operate, messages) {
this.operate = operate || {};
doShow(messages) {
this.dialogShow = true;
this.messages = [this.$t('tip.commandFailed')];
if (messages && messages != 'null') {

View File

@ -170,7 +170,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -187,10 +187,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
this.$refs.noticeInfo.doShow();
});
},
//
@ -207,10 +207,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
this.$refs.noticeInfo.doShow();
});
},
//
@ -230,7 +230,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -250,7 +250,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
// ATS
@ -270,7 +270,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -291,7 +291,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -312,7 +312,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -333,7 +333,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -152,7 +152,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -151,10 +151,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
this.$refs.noticeInfo.doShow();
});
},
//
@ -206,7 +206,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -226,7 +226,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -246,7 +246,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -267,7 +267,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -281,7 +281,7 @@ export default {
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
}
}

View File

@ -143,7 +143,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -297,10 +297,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
this.$refs.noticeInfo.doShow();
});
},
//
@ -311,10 +311,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -138,10 +138,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
this.$refs.noticeInfo.doShow();
});
},
cancel() {
@ -154,7 +154,7 @@ export default {
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
}
}

View File

@ -232,10 +232,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
this.$refs.noticeInfo.doShow();
});
}
},

View File

@ -129,10 +129,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -117,10 +117,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
this.$refs.noticeInfo.doShow();
});
},

View File

@ -214,7 +214,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
} else {
this.doClose();

View File

@ -153,10 +153,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -170,7 +170,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -79,6 +79,7 @@
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { now } from '@/utils/date';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StationCmdControl',
@ -311,11 +312,11 @@ export default {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
/** 上电解锁*/
operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation;
// operate.cmdType = CMD.Station.powerUnLock;
operate.cmdType = CMD.Station.CMD_STATION_POWER_ON_UNLOCK;
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
/** 执行关键操作测试*/
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm2.operation;
// operate.cmdType = CMD.Station.execKeyOperationTest;
operate.cmdType = CMD.Station.CMD_STATION_KEY_OPERATION_TEST;
}
this.setMessage('');

View File

@ -95,7 +95,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -117,7 +117,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -144,10 +144,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
this.$refs.noticeInfo.doShow();
});
},

View File

@ -186,9 +186,9 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.$refs.noticeInfo.doShow(operate, error.message);
this.$refs.noticeInfo.doShow();
this.doClose();
});
} else {

View File

@ -413,7 +413,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
} else {
return false;
@ -444,7 +444,7 @@ export default {
// }).catch(() => {
// this.loading = false;
// this.doClose();
// this.$refs.noticeInfo.doShow(operate);
// this.$refs.noticeInfo.doShow();
// });
const params = {
groupNumber: this.formModel.groupNumber,
@ -466,10 +466,10 @@ export default {
if (valid) {
this.doClose();
}
}).catch((error) => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow({}, error.message);
this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -133,7 +133,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
cancel() {

View File

@ -143,7 +143,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -167,7 +167,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -172,7 +172,7 @@ export default {
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -66,7 +66,13 @@ export default {
if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
const node = {
label: station.name,
children: []
children: [
{
code: station.code,
label: station.name,
handler: this.mapLocation
}
]
};
station.chargeStationCodeList.forEach(item => {
const next = this.$store.getters['map/getDeviceByCode'](item);

View File

@ -121,8 +121,8 @@ export default {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
}).catch(() => {
this.$refs.noticeInfo.doShow();
});
}
}

View File

@ -164,7 +164,7 @@ export default {
});
});
} else {
this.$refs.noticeInfo.doShow(operate, [this.$t('menu.menuDialog.IncorrectPassword')]);
this.$refs.noticeInfo.doShow(this.$t('menu.menuDialog.IncorrectPassword'));
}
},

View File

@ -136,12 +136,12 @@ export default {
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
// this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -118,12 +118,12 @@ export default {
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
// this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -135,12 +135,12 @@ export default {
if (valid) {
this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
// this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
// this.$refs.noticeInfo.doShow();
});
} else {
return false;

View File

@ -56,46 +56,30 @@ export default {
// {
// label: '',
// handler: this.powerUnLock,
// cmdType: CMD.Station.active,
// cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
// },
// {
// label: '',
// handler: this.execKeyOperationTest,
// cmdType: CMD.Station.active,
// cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST,
// }
],
Center: [
{
label: '所有进路自排关',
label: '所有进路交人工控',
handler: this.humanControlALL,
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
},
{
label: '所有进路自排开',
label: '所有进路交ATS自动控',
handler: this.atsAutoControlALL,
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
},
{
label: '上电解锁',
handler: this.powerUnLock,
cmdType: CMD.Station.active
label: '执行关键操作测试',
handler: this.execKeyOperationTest,
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
}
// {
// label: '',
// handler: this.humanControlALL,
// cmdType: ''
// },
// {
// label: 'ATS',
// handler: this.atsAutoControlALL,
// cmdType: ''
// }
// {
// label: '',
// handler: this.execKeyOperationTest,
// cmdType: CMD.Station.active,
// auth: { station: false, center: true }
// }
]
},
menuForce: [
@ -140,9 +124,6 @@ export default {
initMenu() {
//
this.menu = MenuContextHandler.covert(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
//
if (this.operatemode === OperateMode.FAULT) {
@ -174,10 +155,10 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -193,10 +174,10 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -212,7 +193,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -228,7 +209,7 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
//
@ -259,7 +240,7 @@ export default {
}
});
},
//
//
humanControlALL() {
const operate = {
start: true,
@ -273,7 +254,7 @@ export default {
}
});
},
//
// ATS
atsAutoControlALL() {
const operate = {
start: true,

View File

@ -184,10 +184,10 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
this.$refs.noticeInfo.doShow();
});
},
//
@ -205,10 +205,10 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
this.$refs.noticeInfo.doShow();
});
},
//
@ -226,10 +226,10 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(step);
this.$refs.noticeInfo.doShow();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(step);
this.$refs.noticeInfo.doShow();
});
},
//

View File

@ -268,7 +268,7 @@ export default {
this.doClose();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
},
refuse() {
@ -292,7 +292,7 @@ export default {
this.doClose();
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
this.$refs.noticeInfo.doShow();
});
}
}

View File

@ -198,7 +198,11 @@ export default {
/** 取消引导总锁 */
CMD_STATION_CANCEL_MASTER_GUIDE_LOCK: {value: 'Station_Cancel_Master_Guide_Lock', label: '取消引导总锁'},
/** 封锁车站所有信号机 */
CMD_STATION_CANCEL_MASTER_GUIDE: {value: 'Station_Cancel_Master_Guide_Lock', label: '封锁集中站信号'}
CMD_STATION_CANCEL_MASTER_GUIDE: {value: 'Station_Cancel_Master_Guide_Lock', label: '封锁集中站信号'},
/** 上电解锁 */
CMD_STATION_POWER_ON_UNLOCK: {value: ' Station_Power_On_Unlock', label: '上电解锁'},
/** 执行关键操作测试 */
CMD_STATION_KEY_OPERATION_TEST: {value: 'Station_Key_Operation_Test', label: '执行关键操作测试'}
},
// 列车