This commit is contained in:
fan 2019-11-14 11:27:24 +08:00
commit 595db4f8b7
10 changed files with 1191 additions and 1204 deletions

1
.gitignore vendored
View File

@ -15,3 +15,4 @@ src/utils/baseUrl.js
*.ntvs*
*.njsproj
*.sln
debug.log

View File

@ -74,189 +74,189 @@ import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteSelection',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
tempData: [],
beforeSectionList: [],
dialogShow: false,
loading: false,
row: null,
operation: '',
display: true,
stationName: '',
signalName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return this.$t('menu.menuSignal.routeSelect');
},
commitDisabled() {
let disabled = true;
if (this.row) {
disabled = !this.row.canSetting;
}
return disabled;
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
getProtectedSectionName(row) {
let name = '';
if (row &&
name: 'RouteSelection',
components: {
ConfirmControl,
NoticeInfo
},
data() {
return {
tempData: [],
beforeSectionList: [],
dialogShow: false,
loading: false,
row: null,
operation: '',
display: true,
stationName: '',
signalName: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return this.$t('menu.menuSignal.routeSelect');
},
commitDisabled() {
let disabled = true;
if (this.row) {
disabled = !this.row.canSetting;
}
return disabled;
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
getProtectedSectionName(row) {
let name = '';
if (row &&
row.overlapSectionList &&
row.overlapSectionList &&
row.overlapSectionList.length > 0) {
const protect = row.overlapSectionList[0];
name = `${protect.name}`;
if (protect.parentName) {
name = `${protect.parentName}${protect.name}`;
}
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) {
name = `${name}(${station.name})`;
}
}
return name;
},
doShow(operate, selected, tempData) {
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
const protect = row.overlapSectionList[0];
name = `${protect.name}`;
if (protect.parentName) {
name = `${protect.parentName}${protect.name}`;
}
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
if (station) {
name = `${name}(${station.name})`;
}
}
return name;
},
doShow(operate, selected, tempData) {
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.restoreBeforeDevices();
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
restoreBeforeDevices() {
//
if (this.beforeSectionList && this.beforeSectionList.length) {
this.beforeSectionList.forEach(elem => {
elem.cutOff = false;
});
}
this.tempData = tempData || [];
this.operation = operate.operation;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.restoreBeforeDevices();
this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh');
},
restoreBeforeDevices() {
//
if (this.beforeSectionList && this.beforeSectionList.length) {
this.beforeSectionList.forEach(elem => {
elem.cutOff = false;
});
}
this.$store.dispatch('training/updateMapState', [... this.beforeSectionList]);
this.beforeSectionList = [];
},
clickEvent(row, event, column) {
this.row = row;
if (row) {
//
this.restoreBeforeDevices();
this.$store.dispatch('training/updateMapState', [... this.beforeSectionList]);
this.beforeSectionList = [];
},
clickEvent(row, event, column) {
this.row = row;
if (row) {
//
this.restoreBeforeDevices();
if (row.canSetting) {
//
if (row.containSectionList && row.containSectionList.length) {
//
row.containSectionList.forEach(elem => {
elem.cutOff = true;
});
}
if (row.canSetting) {
//
if (row.containSectionList && row.containSectionList.length) {
//
row.containSectionList.forEach(elem => {
elem.cutOff = true;
});
}
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
this.beforeSectionList = row.containSectionList || [];
this.$store.dispatch('training/updateMapState', [...row.containSectionList]);
this.beforeSectionList = row.containSectionList || [];
//
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
val: row.code
};
//
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
val: row.code
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
}
},
commit() {
if (this.row && this.row.canSetting) {
let names = '';
if (this.row.overlapSectionList && this.row.overlapSectionList.length > 0) {
names = names + this.row.overlapSectionList.map(elem => { return elem.name; }).join('');
}
if (this.row.overlapSwitchList && this.row.overlapSwitchList.length > 0) {
names = names + this.row.overlapSwitchList.map(elem => { return elem.name; }).join('');
}
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
messages: [this.$t('menu.accessSetting') + this.$t('global.colon') + `${this.row.name}${names}(${this.row.stationName})`]
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
}
}
},
commit() {
if (this.row && this.row.canSetting) {
let names = '';
if (this.row.overlapSectionList && this.row.overlapSectionList.length > 0) {
names = names + this.row.overlapSectionList.map(elem => { return elem.name; }).join('');
}
if (this.row.overlapSwitchList && this.row.overlapSwitchList.length > 0) {
names = names + this.row.overlapSwitchList.map(elem => { return elem.name; }).join('');
}
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
messages: [this.$t('menu.accessSetting') + this.$t('global.colon') + `${this.row.name}${names}(${this.row.stationName})`]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
},
cancel() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
}
},
cancel() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
}
};
</script>

View File

@ -61,130 +61,130 @@ import { OperationEvent, checkOperationIsCurrentOperate } from '@/scripts/ConstD
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
export default {
name: 'PasswordBox',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: null,
model: {
username: '',
password: ''
},
key: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
}
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(operate) {
this.model.username = '';
this.model.password = '';
this.operate = operate || {};
this.operation = operate.operation;
this.model.username = this.$store.state.user.name;
},
doShow(operate) {
/** 如果不是断点激活,而是第一次显示需要初始化数据*/
if (!this.dialogShow) {
this.loadInitData(operate);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.password.operation
};
name: 'PasswordBox',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
operate: null,
operation: null,
model: {
username: '',
password: ''
},
key: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
},
domIdConfirm() {
if (this.dialogShow) {
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
}
}
return '';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(operate) {
this.model.username = '';
this.model.password = '';
this.operate = operate || {};
this.operation = operate.operation;
this.model.username = this.$store.state.user.nickname;
},
doShow(operate) {
/** 如果不是断点激活,而是第一次显示需要初始化数据*/
if (!this.dialogShow) {
this.loadInitData(operate);
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
cancel() {
const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.password.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
type: this.operate.type
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
});
},
commit() {
const operate = {
type: this.operate.type
};
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation;
}
if (checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
/** 强制站控*/
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation;
}
if (this.model.password == '123456') {
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (this.model.password == '123456') {
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$emit('setLoginResult', {
operation: operate.operation,
success: valid
});
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('setLoginResult', {
operation: operate.operation,
success: false
});
});
} else {
this.$refs.noticeInfo.doShow(operate, [this.$t('menu.menuDialog.IncorrectPassword')]);
if (valid) {
this.$emit('setLoginResult', {
operation: operate.operation,
success: valid
});
this.doClose();
}
}).catch(() => {
this.loading = false;
this.$emit('setLoginResult', {
operation: operate.operation,
success: false
});
});
} else {
this.$refs.noticeInfo.doShow(operate, [this.$t('menu.menuDialog.IncorrectPassword')]);
}
},
click(key) {
if (!this.model.password) {
this.model.password = '';
}
this.model.password += key;
},
esc() {
if (this.model.password) {
this.model.password = this.model.password.substring(0, this.model.password.length - 1);
}
},
clr() {
this.model.password = '';
}
}
},
click(key) {
if (!this.model.password) {
this.model.password = '';
}
this.model.password += key;
},
esc() {
if (this.model.password) {
this.model.password = this.model.password.substring(0, this.model.password.length - 1);
}
},
clr() {
this.model.password = '';
}
}
}
};
</script>

View File

@ -20,283 +20,283 @@ import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
export default {
name: 'StationMenu',
components: {
PopMenu,
StationCmdControl,
StationHumanControlAll,
StationSetRouteControlAll,
NoticeInfo
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
{
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
handler: this.setAutoTrigger,
disabledCallback: MenuDisabledState.Station.setAutoTrigger,
auth: { station: true, center: false }
},
{
label: this.$t('menu.menuStation.fullSiteCancelInterlockAutoTrigger'),
handler: this.cancelAutoTrigger,
disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
auth: { station: true, center: false }
},
{
label: this.$t('menu.menuStation.powerUnLock'),
handler: this.powerUnLock,
disabledCallback: MenuDisabledState.Station.powerUnLock,
auth: { station: true, center: false }
},
{
label: this.$t('menu.menuStation.execKeyOperationTest'),
handler: this.execKeyOperationTest,
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
auth: { station: true, center: false }
}
],
central: [
{
label: this.$t('menu.menuStation.allHumanControl'),
handler: this.humanControlALL,
disabledCallback: MenuDisabledState.Station.humanControlALL,
auth: { station: false, center: true }
},
{
label: this.$t('menu.menuStation.allATSAutoControl'),
handler: this.atsAutoControlALL,
disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
auth: { station: false, center: true }
},
{
label: this.$t('menu.menuStation.execKeyOperationTest'),
handler: this.execKeyOperationTest,
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
auth: { station: false, center: true }
}
]
},
menuForce: [
{
label: this.$t('menu.menuStation.setStoppage'),
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Station.setStoppage
},
{
label: this.$t('menu.menuStation.cancelStoppage'),
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Station.cancelStoppage
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menu = [];
if (this.selected.concentrateStationCode == this.selected.code) {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
}
name: 'StationMenu',
components: {
PopMenu,
StationCmdControl,
StationHumanControlAll,
StationSetRouteControlAll,
NoticeInfo
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
menu: [],
menuNormal: {
local: [
{
label: this.$t('menu.menuStation.fullSiteSetInterlockAutoTrigger'),
handler: this.setAutoTrigger,
disabledCallback: MenuDisabledState.Station.setAutoTrigger,
auth: { station: true, center: false }
},
{
label: this.$t('menu.menuStation.fullSiteCancelInterlockAutoTrigger'),
handler: this.cancelAutoTrigger,
disabledCallback: MenuDisabledState.Station.cancelAutoTrigger,
auth: { station: true, center: false }
},
{
label: this.$t('menu.menuStation.powerUnLock'),
handler: this.powerUnLock,
disabledCallback: MenuDisabledState.Station.powerUnLock,
auth: { station: true, center: false }
},
{
label: this.$t('menu.menuStation.execKeyOperationTest'),
handler: this.execKeyOperationTest,
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
auth: { station: true, center: false }
}
],
central: [
{
label: this.$t('menu.menuStation.allHumanControl'),
handler: this.humanControlALL,
disabledCallback: MenuDisabledState.Station.humanControlALL,
auth: { station: false, center: true }
},
{
label: this.$t('menu.menuStation.allATSAutoControl'),
handler: this.atsAutoControlALL,
disabledCallback: MenuDisabledState.Station.atsAutoControlALL,
auth: { station: false, center: true }
},
{
label: this.$t('menu.menuStation.execKeyOperationTest'),
handler: this.execKeyOperationTest,
disabledCallback: MenuDisabledState.Station.execKeyOperationTest,
auth: { station: false, center: true }
}
]
},
menuForce: [
{
label: this.$t('menu.menuStation.setStoppage'),
handler: this.setStoppage,
disabledCallback: MenuDisabledState.Station.setStoppage
},
{
label: this.$t('menu.menuStation.cancelStoppage'),
handler: this.cancelStoppage,
disabledCallback: MenuDisabledState.Station.cancelStoppage
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
initMenu() {
this.menu = [];
if (this.selected.concentrateStationCode == this.selected.code) {
//
this.menu = menuFiltration(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
}
if (this.selected.centralized) {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];
}
}
if (this.selected.centralized) {
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce];
}
}
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.stoppage.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.cancelStoppage.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
setAutoTrigger() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.setAutoTrigger.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelAutoTrigger() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
powerUnLock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.powerUnLock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(operate, this.selected);
}
});
},
//
execKeyOperationTest() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(operate, this.selected);
}
});
},
//
humanControlALL() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.humanControlALL.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationHumanControlAll.doShow(operate);
}
});
},
//
atsAutoControlALL() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
}
});
}
}
this.menu = menuConvert(this.menu);
},
doShow(point) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
},
//
setStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.stoppage.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelStoppage() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.cancelStoppage.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
setAutoTrigger() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.setAutoTrigger.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelAutoTrigger() {
const operate = {
start: true,
send: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
//
powerUnLock() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.powerUnLock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(operate, this.selected);
}
});
},
//
execKeyOperationTest() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(operate, this.selected);
}
});
},
//
humanControlALL() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.humanControlALL.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationHumanControlAll.doShow(operate);
}
});
},
//
atsAutoControlALL() {
const operate = {
start: true,
code: this.selected.code,
type: MapDeviceType.Station.type,
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
}
});
}
}
};
</script>

File diff suppressed because it is too large Load Diff

View File

@ -110,9 +110,6 @@ export default {
this.queryList.reload();
}
},
goDetail() {
this.$router.push({path:``});
},
async loadInitData() {
try {
//

View File

@ -33,74 +33,74 @@
<script>
export default {
name: 'Digit',
props: {
zoom: {
type: Number,
required: true
},
number: {
type: Number,
required: true
},
fine: {
type: Number,
required: true
},
color: {
type: String,
required: true
}
},
computed: {
isShowOne() {
return [2, 3, 5, 6, 7, 8, 9, 0].indexOf(this.number) != -1;
},
isShowTwo() {
return [1, 2, 3, 4, 7, 8, 9, 0].indexOf(this.number) != -1;
},
isShowThee() {
return [1, 3, 4, 5, 6, 7, 8, 9, 0].indexOf(this.number) != -1;
},
isShowFour() {
return [2, 3, 5, 6, 8, 9, 0].indexOf(this.number) != -1;
},
isShowFive() {
return [2, 6, 8, 0].indexOf(this.number) != -1;
},
isShowSix() {
return [4, 5, 6, 8, 9, 0].indexOf(this.number) != -1;
},
isShowSeven() {
return [2, 3, 4, 5, 6, 8, 9].indexOf(this.number) != -1;
},
b1() {
return this.fine * 2;
},
b2() {
return this.fine * 4;
},
z1() {
return this.zoom * 4;
},
z2() {
return this.zoom * 8;
},
p() {
return this.fine * 1;
},
w() {
return this.zoom * 4 + this.fine * 6 + this.p*2;
},
h() {
return this.zoom * 8 + this.fine * 6 + this.p*2;
}
},
methods: {
opacity(show) {
return show ? 1 : 0.2;
}
}
name: 'Digit',
props: {
zoom: {
type: Number,
required: true
},
number: {
type: Number,
required: true
},
fine: {
type: Number,
required: true
},
color: {
type: String,
required: true
}
},
computed: {
isShowOne() {
return [2, 3, 5, 6, 7, 8, 9, 0].indexOf(this.number) != -1;
},
isShowTwo() {
return [1, 2, 3, 4, 7, 8, 9, 0].indexOf(this.number) != -1;
},
isShowThee() {
return [1, 3, 4, 5, 6, 7, 8, 9, 0].indexOf(this.number) != -1;
},
isShowFour() {
return [2, 3, 5, 6, 8, 9, 0].indexOf(this.number) != -1;
},
isShowFive() {
return [2, 6, 8, 0].indexOf(this.number) != -1;
},
isShowSix() {
return [4, 5, 6, 8, 9, 0].indexOf(this.number) != -1;
},
isShowSeven() {
return [2, 3, 4, 5, 6, 8, 9].indexOf(this.number) != -1;
},
b1() {
return this.fine * 2;
},
b2() {
return this.fine * 4;
},
z1() {
return this.zoom * 4;
},
z2() {
return this.zoom * 8;
},
p() {
return this.fine * 1;
},
w() {
return this.zoom * 4 + this.fine * 6 + this.p * 2;
},
h() {
return this.zoom * 8 + this.fine * 6 + this.p * 2;
}
},
methods: {
opacity(show) {
return show ? 1 : 0.2;
}
}
};
</script>

View File

@ -3,7 +3,6 @@
<menu-bar ref="menuBar" :plan-convert="PlanConvert" @dispatchDialog="dispatchDialog" />
<schedule
ref="schedule"
:line-code="lineCode"
:plan-convert="PlanConvert"
:max-height="height"
:max-width="width"
@ -108,7 +107,7 @@ export default {
mounted() {
this.timeDemon = setInterval(() => {
checkLoginLine();
}, 3000 * 60);
}, 5000 * 60);
},
beforeDestroy() {
if (this.timeDemon) {
@ -116,11 +115,6 @@ export default {
}
},
methods: {
setPosition() {
this.$nextTick(() => {
this.$refs.schedule.setPosition();
});
},
dispatchDialog(dialogObj) {
this.$nextTick(() => {
if (this.$refs[dialogObj.name]) {

View File

@ -31,44 +31,44 @@
<script>
export default {
name: 'DataTable',
props: {
height: {
type: Number,
required: true
},
config: {
type: Object,
required: true
}
},
data() {
return {
show: true,
maxmini: true,
touchStrategy: {
'Close': [false, true],
'Minim': [true, false],
'Maxim': [true, true]
}
};
},
methods: {
handleChange(row) {
if (this.config.handleChange) {
this.config.handleChange(row);
}
},
setCurrentRow(row) {
this.$refs.table.setCurrentRow(row);
},
touch(operate) {
this.$nextTick(() => {
[this.show, this.maxmini] = this.touchStrategy[operate];
this.$emit('touch', this.maxmini);
});
}
}
name: 'DataTable',
props: {
height: {
type: Number,
required: true
},
config: {
type: Object,
required: true
}
},
data() {
return {
show: true,
maxmini: true,
touchStrategy: {
'Close': [false, true],
'Minim': [true, false],
'Maxim': [true, true]
}
};
},
methods: {
handleChange(row) {
if (this.config.handleChange) {
this.config.handleChange(row);
}
},
setCurrentRow(row) {
this.$refs.table.setCurrentRow(row);
},
touch(operate) {
this.$nextTick(() => {
[this.show, this.maxmini] = this.touchStrategy[operate];
this.$emit('touch', this.maxmini);
});
}
}
};
</script>

View File

@ -38,14 +38,10 @@ export default {
DataTable
},
props: {
lineCode: {
type: String,
planConvert: {
type: Object,
required: true
},
// planConvert: {
// type: Object,
// required: true
// },
maxWidth: {
type: Number,
required: true
@ -57,7 +53,6 @@ export default {
},
data() {
return {
planConvert: null,
top: 0,
height: 0,
mapName: '',
@ -368,7 +363,7 @@ export default {
this.mapName = `${resp.data.name} (${this.$route.query.planName || ''})`;
});
}
this.planConvert = this.$theme.loadPlanConvert(this.lineCode);
this.$store.dispatch('runPlan/clear').then(() => {
this.loadInitChart().then(() => {
if (this.$route.query.mapId) {