Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
45cac99681
@ -1,9 +0,0 @@
|
|||||||
import request from '@/utils/request';
|
|
||||||
|
|
||||||
export function getList(params) {
|
|
||||||
return request({
|
|
||||||
url: '/table/list',
|
|
||||||
method: 'get',
|
|
||||||
params
|
|
||||||
});
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
@ -38,6 +38,7 @@ class KeyboardController extends Eventful {
|
|||||||
|
|
||||||
keydown(e) {
|
keydown(e) {
|
||||||
if (this._keyOnDownUp && !e.repeat) {
|
if (this._keyOnDownUp && !e.repeat) {
|
||||||
|
if (e.key) {
|
||||||
const currentEvent = keyboardEvents[e.key.toUpperCase()];
|
const currentEvent = keyboardEvents[e.key.toUpperCase()];
|
||||||
let str = '';
|
let str = '';
|
||||||
if (currentEvent && currentEvent.altKey === e.altKey && currentEvent.ctrlKey === e.ctrlKey && currentEvent.shiftKey === e.shiftKey) {
|
if (currentEvent && currentEvent.altKey === e.altKey && currentEvent.ctrlKey === e.ctrlKey && currentEvent.shiftKey === e.shiftKey) {
|
||||||
@ -46,6 +47,7 @@ class KeyboardController extends Eventful {
|
|||||||
this.trigger(this.events.Keyboard, str);
|
this.trigger(this.events.Keyboard, str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default KeyboardController;
|
export default KeyboardController;
|
||||||
|
@ -63,6 +63,8 @@ export default class TrainHead extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
setArrowShow(isShow) {
|
setArrowShow(isShow) {
|
||||||
|
if (this.arrow) {
|
||||||
isShow ? this.arrow.show() : this.arrow.hide();
|
isShow ? this.arrow.show() : this.arrow.hide();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-dialogDrag
|
v-dialogDrag
|
||||||
class="xian-01__systerm station-cmd-control"
|
class="station-cmd-control"
|
||||||
|
:class="popClass"
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="show"
|
:visible.sync="show"
|
||||||
width="840px"
|
width="840px"
|
||||||
@ -83,6 +84,12 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationCmdControl',
|
name: 'StationCmdControl',
|
||||||
|
props: {
|
||||||
|
popClass: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-dialogDrag
|
v-dialogDrag
|
||||||
class="xian-01__systerm station-human-control-all"
|
class="station-human-control-all"
|
||||||
|
:class="popClass"
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="show"
|
:visible.sync="show"
|
||||||
width="430px"
|
width="430px"
|
||||||
@ -22,7 +23,7 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo" pop-class="xian-01__systerm" />
|
<notice-info ref="noticeInfo" :pop-class="popClass" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -36,6 +37,12 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
popClass: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-dialogDrag
|
v-dialogDrag
|
||||||
class="xian-01__systerm station-set-route-control-all"
|
class="station-set-route-control-all"
|
||||||
|
:class="popClass"
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="show"
|
:visible.sync="show"
|
||||||
width="450px"
|
width="450px"
|
||||||
@ -34,7 +35,7 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo" pop-class="xian-01__systerm" />
|
<notice-info ref="noticeInfo" :pop-class="popClass" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -48,6 +49,12 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
popClass: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
@ -1,407 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="fuzhou-01__systerm station-cmd-control"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="840px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
|
||||||
<span class="base-label">{{ $t('menu.commandInformation') }}</span>
|
|
||||||
<el-form label-position="center" size="mini">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-form-item :label="this.$t('menu.type')" label-width="40px">
|
|
||||||
<el-select v-model="operation" size="small" disabled style="width:230px">
|
|
||||||
<el-option
|
|
||||||
v-for="option in typeList"
|
|
||||||
:key="option.code"
|
|
||||||
:label="option.name"
|
|
||||||
:value="option.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-form-item :label="this.$t('menu.stationName')" label-width="100px">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<el-table
|
|
||||||
ref="tempData"
|
|
||||||
class="table"
|
|
||||||
:data="tempData"
|
|
||||||
border
|
|
||||||
style="width: 100%"
|
|
||||||
size="mini"
|
|
||||||
highlight-current-row
|
|
||||||
height="200"
|
|
||||||
>
|
|
||||||
<el-table-column prop="order" :width="110" :label="this.$t('menu.serialNumber2')" />
|
|
||||||
<el-table-column prop="date" :width="160" :label="this.$t('menu.time')" />
|
|
||||||
<el-table-column prop="context" :width="180" :label="this.$t('menu.implementationProcess')" />
|
|
||||||
<el-table-column prop="result" :label="this.$t('menu.executionResult')" />
|
|
||||||
</el-table>
|
|
||||||
<span class="notice">{{ message }}</span>
|
|
||||||
<el-row class="button-group">
|
|
||||||
<el-col :span="2" :offset="3">
|
|
||||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">{{ $t('menu.release') }}<span
|
|
||||||
v-show="timeCountCommand>0"
|
|
||||||
>({{ timeCountCommand }})</span></el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="1">
|
|
||||||
<el-button :id="domIdConfirm1" type="primary" style="width:120px;" :disabled="cmdDisabled[1]" @click="confirm1">{{ $t('menu.firstConfirm') }}
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm2" type="primary" style="width:120px;" :disabled="cmdDisabled[2]" @click="confirm2">{{ $t('menu.secondConfirm') }}<span
|
|
||||||
v-show="timeCountConfirm>0"
|
|
||||||
>({{ timeCountConfirm }})</span></el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">{{ $t('menu.suspend') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="1">
|
|
||||||
<el-button :id="domIdClose" @click="close">{{ $t('global.close') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import { now } from '@/utils/date';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'StationCmdControl',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
backOperate: '',
|
|
||||||
order: 0,
|
|
||||||
row: null,
|
|
||||||
timer: null,
|
|
||||||
operation: '',
|
|
||||||
cmdDisabled: [true, true, true],
|
|
||||||
stpDisabled: true,
|
|
||||||
tempData: [],
|
|
||||||
message: '',
|
|
||||||
timeCountCommand: -1,
|
|
||||||
timeCountConfirm: -1,
|
|
||||||
stationName: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
typeList() {
|
|
||||||
return [
|
|
||||||
{ code: OperationEvent.Station.powerUnLock.menu.operation, name: this.$t('menu.menuStation.powerUnLock') },
|
|
||||||
{ code: OperationEvent.Station.execKeyOperationTest.menu.operation, name: this.$t('menu.menuStation.execKeyOperationTest') }
|
|
||||||
];
|
|
||||||
},
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCommand() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
return OperationEvent.Station.powerUnLock.order.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 执行关键操作测试*/
|
|
||||||
return OperationEvent.Station.execKeyOperationTest.order.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
domIdConfirm1() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
return OperationEvent.Station.powerUnLock.confirm1.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 执行关键操作测试*/
|
|
||||||
return OperationEvent.Station.execKeyOperationTest.confirm1.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
domIdConfirm2() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
return OperationEvent.Station.powerUnLock.confirm2.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 执行关键操作测试*/
|
|
||||||
return OperationEvent.Station.execKeyOperationTest.confirm2.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
domIdStop() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
return OperationEvent.Station.powerUnLock.stop.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 执行关键操作测试*/
|
|
||||||
return OperationEvent.Station.execKeyOperationTest.stop.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
domIdClose() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
return OperationEvent.Command.close.menu.domId;
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
return this.$t('menu.signalDeblocking');
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
return this.$t('menu.menuStation.execKeyOperationTest');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
cmdDisabled: {
|
|
||||||
handler(val, oldVal) {
|
|
||||||
this.stpDisabled = true;
|
|
||||||
val.forEach((elem, index) => {
|
|
||||||
// 在确定1之前的操作才可以终止
|
|
||||||
if (elem == false && index >= 1 && index <= 2) {
|
|
||||||
this.stpDisabled = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
this.timer = setInterval(() => {
|
|
||||||
if (!this.$store.state.menuOperation.break) {
|
|
||||||
if (this.timeCountCommand > 0) {
|
|
||||||
this.timeCountCommand--;
|
|
||||||
} else if (this.timeCountCommand == 0) {
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
}
|
|
||||||
if (this.timeCountConfirm > 0) {
|
|
||||||
this.timeCountConfirm--;
|
|
||||||
} else if (this.timeCountConfirm == 0) {
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
clearInterval(this.timer);
|
|
||||||
this.timer = null;
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
|
||||||
this.stationName = selected.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.order = 0;
|
|
||||||
this.operation = operate.operation;
|
|
||||||
this.tempData = [];
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.cmdDisabled = [false, true, true];
|
|
||||||
}
|
|
||||||
this.stpDisabled = true;
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.setMessage(this.$t('tip.releaseTip'));
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
command() {
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation ||
|
|
||||||
this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 第一步不带弹框处理*/
|
|
||||||
this.commandNoPopUp();
|
|
||||||
} else {
|
|
||||||
/** 第一步带弹框处理*/
|
|
||||||
this.commandHasPopUp();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
commandHasPopUp() {
|
|
||||||
},
|
|
||||||
commandNoPopUp() {
|
|
||||||
const operate = {
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
operate.operation = OperationEvent.Station.powerUnLock.order.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 执行关键操作测试*/
|
|
||||||
operate.operation = OperationEvent.Station.execKeyOperationTest.order.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setMessage(this.$t('tip.firstConfirmTip'));
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: '' });
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.setButtonEnable({ step: 1 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionSucceed') });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionFailed') });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickReleaseCommand'), result: this.$t('tip.executionException') });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
confirm1() {
|
|
||||||
const operate = {
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
operate.operation = OperationEvent.Station.powerUnLock.confirm1.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 执行关键操作测试*/
|
|
||||||
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm1.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setMessage(this.$t('tip.secondConfirmTip'));
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: '' });
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = 10;
|
|
||||||
this.setButtonEnable({ step: 2 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionSucceed') });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionFailed') });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickFirstConfirm'), result: this.$t('tip.executionException') });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
confirm2() {
|
|
||||||
const operate = {
|
|
||||||
over: true
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation;
|
|
||||||
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.CMD_STATION_KEY_OPERATION_TEST;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setMessage('');
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: '' });
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.setButtonEnable({ step: -1 });
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionSucceed') });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionFailed') });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.setButtonEnable({ step: -1 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSecondConfirm'), result: this.$t('tip.executionException') });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
stop() {
|
|
||||||
const operate = {
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
operate.operation = OperationEvent.Station.powerUnLock.stop.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 执行关键操作测试*/
|
|
||||||
operate.operation = OperationEvent.Station.execKeyOperationTest.stop.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: this.$t('menu.clickSuspend'), result: '' });
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionSucceed') });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionFailed') });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: this.$t('menu.clickSuspend'), result: this.$t('tip.executionException') });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getOperate(operate) {
|
|
||||||
/** 弹框返回值处理*/
|
|
||||||
},
|
|
||||||
setButtonEnable(param) {
|
|
||||||
this.cmdDisabled = [true, true, true];
|
|
||||||
if (param && param.step >= 0) {
|
|
||||||
this.cmdDisabled[param.step] = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setMessage(message) {
|
|
||||||
this.message = message;
|
|
||||||
},
|
|
||||||
writeRecord(param) {
|
|
||||||
this.tempData.push(param);
|
|
||||||
},
|
|
||||||
editRecord(param) {
|
|
||||||
this.tempData.forEach(elem => {
|
|
||||||
if (elem.order == param.order) {
|
|
||||||
for (var prop in param) {
|
|
||||||
elem[prop] = param[prop];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,123 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="fuzhou-01__systerm station-human-control-all"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="430px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<div class="context">
|
|
||||||
<span>{{ title }}</span>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" pop-class="fuzhou-01__systerm" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'StationHumanControlAll',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
operation: null
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return this.$t('menu.fullConcentrationStationAccessManualControl');
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate) {
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.loading = false;
|
|
||||||
this.operation = operate.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Station.humanControlALL.menu.operation,
|
|
||||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
.station-human-control-all .context {
|
|
||||||
padding-bottom: 40px !important;
|
|
||||||
border: 1px solid lightgray;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,145 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="fuzhou-01__systerm station-set-route-control-all"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="450px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<div style="padding: 0px 10px">
|
|
||||||
<el-form ref="form" size="small" label-width="110px" label-position="left">
|
|
||||||
<el-form-item :label="this.$t('menu.concentratedStationName')" prop="stationName">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<el-radio-group v-model="mode">
|
|
||||||
<el-row>
|
|
||||||
<el-radio :label="true">{{ $t('menu.checkConflict') }}</el-radio>
|
|
||||||
</el-row>
|
|
||||||
<el-row style="margin-top: 20px">
|
|
||||||
<el-radio :label="false">{{ $t('menu.notCheckConflict') }}</el-radio>
|
|
||||||
</el-row>
|
|
||||||
</el-radio-group>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" pop-class="fuzhou-01__systerm" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'StationSetRouteControlAll',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
operation: null,
|
|
||||||
stationName: '',
|
|
||||||
mode: true
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return this.$t('menu.fullConcentrationStationSettingAccessControlMode');
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.loading = false;
|
|
||||||
this.operation = operate.operation;
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected) {
|
|
||||||
this.stationName = selected.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
|
|
||||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
|
|
||||||
val: this.mode,
|
|
||||||
param: {
|
|
||||||
CheckConflict: this.mode
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
.station-set-route-control-all .context {
|
|
||||||
padding-bottom: 40px !important;
|
|
||||||
border: 1px solid lightgray;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,18 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<station-cmd-control ref="stationCmdControl" />
|
<station-cmd-control ref="stationCmdControl" pop-class="fuzhou-01__systerm" />
|
||||||
<station-human-control-all ref="stationHumanControlAll" />
|
<station-human-control-all ref="stationHumanControlAll" pop-class="fuzhou-01__systerm" />
|
||||||
<station-set-route-control-all ref="stationSetRouteControlAll" />
|
<station-set-route-control-all ref="stationSetRouteControlAll" pop-class="fuzhou-01__systerm" />
|
||||||
<notice-info ref="noticeInfo" pop-class="fuzhou-01__systerm" />
|
<notice-info ref="noticeInfo" pop-class="fuzhou-01__systerm" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import StationCmdControl from './dialog/stationCmdControl';
|
import StationCmdControl from '@/jmapNew/theme/components/menus/dialog/stationCmdControl';
|
||||||
import StationHumanControlAll from './dialog/stationHumanControlAll';
|
import StationHumanControlAll from '@/jmapNew/theme/components/menus/dialog/stationHumanControlAll';
|
||||||
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
|
import StationSetRouteControlAll from '@/jmapNew/theme/components/menus/dialog/stationSetRouteControlAll';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
@ -25,9 +25,7 @@ import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
|||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
// import { querySignalStatus } from '@/api/simulation';
|
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -1,401 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="ningbo-01__systerm station-cmd-control"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="800px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
|
||||||
<span class="base-label">命令信息</span>
|
|
||||||
<el-form label-position="center" size="mini">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="类型" label-width="40px">
|
|
||||||
<el-select v-model="operation" size="small" disabled>
|
|
||||||
<el-option
|
|
||||||
v-for="option in typeList"
|
|
||||||
:key="option.code"
|
|
||||||
:label="option.name"
|
|
||||||
:value="option.code"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="车站名称" label-width="100px">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
<el-table
|
|
||||||
ref="tempData"
|
|
||||||
class="table"
|
|
||||||
:data="tempData"
|
|
||||||
border
|
|
||||||
style="width: 100%"
|
|
||||||
size="mini"
|
|
||||||
highlight-current-row
|
|
||||||
height="200"
|
|
||||||
>
|
|
||||||
<el-table-column prop="order" :width="50" label="序号" />
|
|
||||||
<el-table-column prop="date" :width="160" label="时间" />
|
|
||||||
<el-table-column prop="context" :width="180" label="执行过程" />
|
|
||||||
<el-table-column prop="result" label="执行结果" />
|
|
||||||
</el-table>
|
|
||||||
<span class="notice">{{ message }}</span>
|
|
||||||
<el-row class="button-group">
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
|
||||||
v-show="timeCountCommand>0"
|
|
||||||
>({{ timeCountCommand }})</span></el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
|
||||||
v-show="timeCountConfirm>0"
|
|
||||||
>({{ timeCountConfirm }})</span></el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
import { now } from '@/utils/date';
|
|
||||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'StationCmdControl',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
backOperate: '',
|
|
||||||
selected: null,
|
|
||||||
order: 0,
|
|
||||||
row: null,
|
|
||||||
timer: null,
|
|
||||||
operation: '',
|
|
||||||
cmdDisabled: [true, true, true],
|
|
||||||
stpDisabled: true,
|
|
||||||
tempData: [],
|
|
||||||
message: '',
|
|
||||||
timeCountCommand: -1,
|
|
||||||
timeCountConfirm: -1,
|
|
||||||
stationName: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
typeList() {
|
|
||||||
return [
|
|
||||||
{ code: OperationEvent.Station.powerUnLock.menu.operation, name: '上电解锁' },
|
|
||||||
{ code: OperationEvent.Station.execKeyOperationTest.menu.operation, name: '执行关键操作测试' }
|
|
||||||
];
|
|
||||||
},
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCommand() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
return OperationEvent.Station.powerUnLock.order.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 执行关键操作测试*/
|
|
||||||
return OperationEvent.Station.execKeyOperationTest.order.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdConfirm1() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
return OperationEvent.Station.powerUnLock.confirm1.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 执行关键操作测试*/
|
|
||||||
return OperationEvent.Station.execKeyOperationTest.confirm1.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdConfirm2() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
return OperationEvent.Station.powerUnLock.confirm2.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 执行关键操作测试*/
|
|
||||||
return OperationEvent.Station.execKeyOperationTest.confirm2.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdStop() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
return OperationEvent.Station.powerUnLock.stop.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 执行关键操作测试*/
|
|
||||||
return OperationEvent.Station.execKeyOperationTest.stop.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdClose() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
return OperationEvent.Command.close.menu.domId;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
return '上电解锁';
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
return '执行关键操作测试';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
cmdDisabled: {
|
|
||||||
handler(val, oldVal) {
|
|
||||||
this.stpDisabled = true;
|
|
||||||
val.forEach((elem, index) => {
|
|
||||||
// 在确定1之前的操作才可以终止
|
|
||||||
if (elem == false && index >= 1 && index <= 2) {
|
|
||||||
this.stpDisabled = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
this.timer = setInterval(() => {
|
|
||||||
if (!this.$store.state.menuOperation.break) {
|
|
||||||
if (this.timeCountCommand > 0) {
|
|
||||||
this.timeCountCommand--;
|
|
||||||
} else if (this.timeCountCommand == 0) {
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
}
|
|
||||||
if (this.timeCountConfirm > 0) {
|
|
||||||
this.timeCountConfirm--;
|
|
||||||
} else if (this.timeCountConfirm == 0) {
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
clearInterval(this.timer);
|
|
||||||
this.timer = null;
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
|
||||||
this.stationName = selected.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.order = 0;
|
|
||||||
this.operation = operate.operation;
|
|
||||||
this.tempData = [];
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.cmdDisabled = [false, true, true];
|
|
||||||
}
|
|
||||||
this.stpDisabled = true;
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.setMessage('请点击“下达”按钮,下达命令!');
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
command() {
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation ||
|
|
||||||
this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 第一步不带弹框处理*/
|
|
||||||
this.commandNoPopUp();
|
|
||||||
} else {
|
|
||||||
/** 第一步带弹框处理*/
|
|
||||||
this.commandHasPopUp();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
commandHasPopUp() {
|
|
||||||
},
|
|
||||||
commandNoPopUp() {
|
|
||||||
const operate = {};
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
operate.operation = OperationEvent.Station.powerUnLock.order.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 执行关键操作测试*/
|
|
||||||
operate.operation = OperationEvent.Station.execKeyOperationTest.order.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.setButtonEnable({ step: 1 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
confirm1() {
|
|
||||||
const operate = {};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
operate.operation = OperationEvent.Station.powerUnLock.confirm1.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 执行关键操作测试*/
|
|
||||||
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm1.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setMessage('请点击“确认2”按钮,确认命令!');
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = 10;
|
|
||||||
this.setButtonEnable({ step: 2 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
confirm2() {
|
|
||||||
const operate = {
|
|
||||||
send: true
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation;
|
|
||||||
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.CMD_STATION_KEY_OPERATION_TEST;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setMessage('');
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.setButtonEnable({ step: -1 });
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.setButtonEnable({ step: -1 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
stop() {
|
|
||||||
const operate = {};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
|
||||||
/** 上电解锁*/
|
|
||||||
operate.operation = OperationEvent.Station.powerUnLock.stop.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
|
||||||
/** 执行关键操作测试*/
|
|
||||||
operate.operation = OperationEvent.Station.execKeyOperationTest.stop.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
|
|
||||||
});
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
getOperate(operate) {
|
|
||||||
/** 弹框返回值处理*/
|
|
||||||
},
|
|
||||||
setButtonEnable(param) {
|
|
||||||
this.cmdDisabled = [true, true, true];
|
|
||||||
if (param && param.step >= 0) {
|
|
||||||
this.cmdDisabled[param.step] = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setMessage(message) {
|
|
||||||
this.message = message;
|
|
||||||
},
|
|
||||||
writeRecord(param) {
|
|
||||||
this.tempData.push(param);
|
|
||||||
},
|
|
||||||
editRecord(param) {
|
|
||||||
this.tempData.forEach(elem => {
|
|
||||||
if (elem.order == param.order) {
|
|
||||||
for (var prop in param) {
|
|
||||||
elem[prop] = param[prop];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,118 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="ningbo-01__systerm station-human-control-all"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="360px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<div class="context">
|
|
||||||
<span>{{ title }}</span>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
|
||||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'StationHumanControlAll',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '全集中站进路交人工控';
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.loading = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Station.humanControlALL, {}, 2).then(({valid, operate})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error=>{
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
.station-human-control-all .context {
|
|
||||||
padding-bottom: 40px !important;
|
|
||||||
border: 1px solid lightgray;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,136 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="ningbo-01__systerm station-set-route-control-all"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="320px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
append-to-body
|
|
||||||
>
|
|
||||||
<div style="padding: 0px 10px">
|
|
||||||
<el-form ref="form" size="small" label-width="90px" label-position="left">
|
|
||||||
<el-form-item label="集中站名称:" prop="stationName">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<el-radio-group v-model="mode">
|
|
||||||
<el-row>
|
|
||||||
<el-radio :label="true">检查冲突</el-radio>
|
|
||||||
</el-row>
|
|
||||||
<el-row style="margin-top: 20px">
|
|
||||||
<el-radio :label="false">不检查冲突</el-radio>
|
|
||||||
</el-row>
|
|
||||||
</el-radio-group>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
|
||||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'StationSetRouteControlAll',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
stationName: '',
|
|
||||||
mode: true
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '全集中站设置进路控制模式';
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.loading = false;
|
|
||||||
this.stationName = '';
|
|
||||||
if (selected) {
|
|
||||||
this.stationName = selected.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Station.atsAutoControlALL, {CheckConflict: this.mode}, 2, this.mode).then(({valid, operate})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error=>{
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
.station-set-route-control-all .context {
|
|
||||||
padding-bottom: 40px !important;
|
|
||||||
border: 1px solid lightgray;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,18 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<station-cmd-control ref="stationCmdControl" />
|
<station-cmd-control ref="stationCmdControl" pop-class="ningbo-01__systerm" />
|
||||||
<station-human-control-all ref="stationHumanControlAll" />
|
<station-human-control-all ref="stationHumanControlAll" pop-class="ningbo-01__systerm" />
|
||||||
<station-set-route-control-all ref="stationSetRouteControlAll" />
|
<station-set-route-control-all ref="stationSetRouteControlAll" pop-class="ningbo-01__systerm" />
|
||||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import StationCmdControl from './dialog/stationCmdControl';
|
import StationCmdControl from '@/jmapNew/theme/components/menus/dialog/stationCmdControl';
|
||||||
import StationHumanControlAll from './dialog/stationHumanControlAll';
|
import StationHumanControlAll from '@/jmapNew/theme/components/menus/dialog/stationHumanControlAll';
|
||||||
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
|
import StationSetRouteControlAll from '@/jmapNew/theme/components/menus/dialog/stationSetRouteControlAll';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
@ -85,12 +85,12 @@ export default {
|
|||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '设置ZC故障',
|
label: '设置ZC故障',
|
||||||
handler: this.setStoppage,
|
handler: this.undeveloped,
|
||||||
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
|
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消ZC故障',
|
label: '取消ZC故障',
|
||||||
handler: this.cancelStoppage,
|
handler: this.undeveloped,
|
||||||
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
|
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -225,6 +225,14 @@ export default {
|
|||||||
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
undeveloped() {
|
||||||
|
this.doClose();
|
||||||
|
this.$alert('实现中......', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
callback: action => {
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -198,12 +198,12 @@ export default {
|
|||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '设置通信故障',
|
label: '设置故障',
|
||||||
handler: this.setStoppage
|
handler: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消通信故障',
|
label: '取消故障',
|
||||||
handler: this.cancelStoppage
|
handler: this.undeveloped
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuSpeed: [
|
menuSpeed: [
|
||||||
|
@ -281,7 +281,6 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
debugger;
|
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
|
@ -423,7 +423,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
|
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
|
||||||
<station-cmd-control ref="stationCmdControl" />
|
<station-cmd-control ref="stationCmdControl" pop-class="xian-01__systerm" />
|
||||||
<station-human-control-all ref="stationHumanControlAll" />
|
<station-human-control-all ref="stationHumanControlAll" pop-class="xian-01__systerm" />
|
||||||
<station-set-route-control-all ref="stationSetRouteControlAll" />
|
<station-set-route-control-all ref="stationSetRouteControlAll" pop-class="xian-01__systerm" />
|
||||||
<notice-info ref="noticeInfo" pop-class="xian-01__systerm" />
|
<notice-info ref="noticeInfo" pop-class="xian-01__systerm" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import StationCmdControl from './dialog/stationCmdControl';
|
import StationCmdControl from '@/jmapNew/theme/components/menus/dialog/stationCmdControl';
|
||||||
import StationHumanControlAll from './dialog/stationHumanControlAll';
|
import StationHumanControlAll from '@/jmapNew/theme/components/menus/dialog/stationHumanControlAll';
|
||||||
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
|
import StationSetRouteControlAll from '@/jmapNew/theme/components/menus/dialog/stationSetRouteControlAll';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
@ -95,13 +95,13 @@ export default {
|
|||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '设置ZC故障',
|
label: '设置故障',
|
||||||
handler: this.setStoppage,
|
handler: this.undeveloped,
|
||||||
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
|
cmdType: CMD.Station.CMD_STATION_ADD_FAULT
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消ZC故障',
|
label: '取消故障',
|
||||||
handler: this.cancelStoppage,
|
handler: this.undeveloped,
|
||||||
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
|
cmdType: CMD.Station.CMD_STATION_REMOVE_FAULT
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -238,6 +238,14 @@ export default {
|
|||||||
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
undeveloped() {
|
||||||
|
this.doClose();
|
||||||
|
this.$alert('实现中......', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
callback: action => {
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
<switch-cmd-control ref="switchCmdControl" />
|
<switch-cmd-control ref="switchCmdControl" />
|
||||||
<speed-cmd-control ref="speedCmdControl" />
|
<speed-cmd-control ref="speedCmdControl" />
|
||||||
<notice-info ref="noticeInfo" pop-class="xian-01__systerm" />
|
<notice-info ref="noticeInfo" pop-class="xian-01__systerm" />
|
||||||
|
<set-fault ref="setFault" pop-class="xian-01__systerm" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -101,13 +101,13 @@ export default {
|
|||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuTrain.setCommunicationFault'),
|
label: '设置故障',
|
||||||
handler: this.setStoppage,
|
handler: this.undeveloped,
|
||||||
cmdType:CMD.Train.CMD_TRAIN_ADD_FAULT
|
cmdType:CMD.Train.CMD_TRAIN_ADD_FAULT
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('menu.menuTrain.cancelCommunicationFault'),
|
label: '取消故障',
|
||||||
handler: this.cancelStoppage,
|
handler: this.undeveloped,
|
||||||
cmdType:CMD.Train.CMD_TRAIN_REMOVE_FAULT
|
cmdType:CMD.Train.CMD_TRAIN_REMOVE_FAULT
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -1,306 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="xian-02__system route-hand-control"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="300px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="11"><span>集中站</span></el-col>
|
|
||||||
<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<div class="table">
|
|
||||||
<el-table
|
|
||||||
ref="tempTable"
|
|
||||||
:data="tempData"
|
|
||||||
border
|
|
||||||
style="width: 100%"
|
|
||||||
size="mini"
|
|
||||||
highlight-current-row
|
|
||||||
:height="140"
|
|
||||||
>
|
|
||||||
<el-table-column prop="name" label="选择" width="55" style="margin-left:50px; text-align: right;">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-checkbox
|
|
||||||
v-model="changeList[scope.$index]"
|
|
||||||
style="text-align: center; display: block;"
|
|
||||||
:disabled="scope.row.disabled"
|
|
||||||
@change="changeCheck(changeList[scope.$index], scope.row.code)"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.name }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="22" :offset="1">
|
|
||||||
<el-checkbox v-model="allSelect" size="small" @change="allSelectChange">全选</el-checkbox>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button
|
|
||||||
:id="domIdConfirm"
|
|
||||||
type="primary"
|
|
||||||
:disabled="commitDisabled"
|
|
||||||
:loading="loading"
|
|
||||||
@click="commit"
|
|
||||||
>确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<confirm-control ref="confirmControl" />
|
|
||||||
<notice-info ref="noticeInfo" pop-class="xian-02__systerm" />
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteHandControl',
|
|
||||||
components: {
|
|
||||||
ConfirmControl,
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
tempData: [],
|
|
||||||
operation: null,
|
|
||||||
selection: [],
|
|
||||||
stationName: '',
|
|
||||||
signalName: '',
|
|
||||||
allSelect: false,
|
|
||||||
changeList:[],
|
|
||||||
commitDisabled: true,
|
|
||||||
disabledLength: 0
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'signalList'
|
|
||||||
]),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdChoose() {
|
|
||||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
|
||||||
return OperationEvent.Signal.humanControl.choose.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
|
||||||
return OperationEvent.Signal.atsAutoControl.choose.domId;
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
|
||||||
return '进路交人工控';
|
|
||||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
|
||||||
return '进路交自动控';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected, tempData) {
|
|
||||||
this.selected = selected;
|
|
||||||
this.allSelect = false;
|
|
||||||
this.changeList = [];
|
|
||||||
this.commitDisabled = true;
|
|
||||||
this.selection = [];
|
|
||||||
this.disabledLength = 0;
|
|
||||||
// 如果不是断点激活,而是第一次显示则初始化
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tempData && tempData.length > 0) {
|
|
||||||
tempData.forEach(elem => {
|
|
||||||
this.changeList.push(false);
|
|
||||||
elem.disabled = false;
|
|
||||||
// 设置禁用状态
|
|
||||||
if (operate.operation == OperationEvent.Signal.humanControl.menu.operation && elem.atsControl == 0) {
|
|
||||||
elem.disabled = true;
|
|
||||||
this.disabledLength++;
|
|
||||||
} if (operate.operation == OperationEvent.Signal.atsAutoControl.menu.operation && elem.atsControl == 1) {
|
|
||||||
elem.disabled = true;
|
|
||||||
this.disabledLength++;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
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.$refs.tempTable.setCurrentRow();
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
changeCheck(check, code) {
|
|
||||||
if (check) {
|
|
||||||
this.selection.push(code);
|
|
||||||
} else {
|
|
||||||
this.selection.splice(this.selection.indexOf(code), 1);
|
|
||||||
}
|
|
||||||
if (this.selection.length >= (this.tempData.length - this.disabledLength) ) {
|
|
||||||
this.allSelect = true;
|
|
||||||
} else {
|
|
||||||
this.allSelect = false;
|
|
||||||
}
|
|
||||||
if (this.selection.length > 0) {
|
|
||||||
this.commitDisabled = false;
|
|
||||||
this.handleChooseChange();
|
|
||||||
} else {
|
|
||||||
this.commitDisabled = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
allSelectChange() {
|
|
||||||
this.changeList = [];
|
|
||||||
if (this.allSelect) {
|
|
||||||
this.tempData.forEach((item, index)=> {
|
|
||||||
if (!item.disabled) {
|
|
||||||
this.changeList.push(true);
|
|
||||||
this.selection.push(item.code);
|
|
||||||
} else {
|
|
||||||
this.changeList.push('');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.allSelect = true;
|
|
||||||
if (this.selection.length > 0) {
|
|
||||||
this.commitDisabled = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.tempData.forEach((item, index) => {
|
|
||||||
if (!item.disabled) {
|
|
||||||
this.changeList.push(false);
|
|
||||||
this.selection.splice(this.selection.indexOf(item.code), 1);
|
|
||||||
} else {
|
|
||||||
this.changeList = [];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.allSelect = false;
|
|
||||||
this.commitDisabled = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleChooseChange() {
|
|
||||||
const codeList = this.selection.map(elem => { return elem; });
|
|
||||||
const operate = {
|
|
||||||
operation: '',
|
|
||||||
val: codeList.join('::')
|
|
||||||
};
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
|
||||||
/** 进路交人工控*/
|
|
||||||
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
|
||||||
/** 进路交自动控*/
|
|
||||||
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
|
||||||
/** 进路交人工控*/
|
|
||||||
this.humanControl();
|
|
||||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
|
||||||
/** 进路交自动控*/
|
|
||||||
this.atsAutoControl();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 进路交人工控
|
|
||||||
humanControl() {
|
|
||||||
this.sendCommand(menuOperate.Signal.humanControl);
|
|
||||||
},
|
|
||||||
// 进路交自动控
|
|
||||||
atsAutoControl() {
|
|
||||||
this.sendCommand(menuOperate.Signal.atsAutoControl);
|
|
||||||
},
|
|
||||||
sendCommand(operate) {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(operate, {routeCodeList:this.selection}, 2).then(({valid})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow({}, error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,170 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="xian-02__system route-lock"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="340px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="10"><span>集中站</span></el-col>
|
|
||||||
<el-col :span="10" :offset="2"><span>信号设备</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="10">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<!-- <div class="table">
|
|
||||||
<span>信号按钮列表</span>
|
|
||||||
<el-table
|
|
||||||
ref="table"
|
|
||||||
:data="tempData"
|
|
||||||
border
|
|
||||||
style="width: 100%"
|
|
||||||
size="mini"
|
|
||||||
highlight-current-row
|
|
||||||
:height="140"
|
|
||||||
>
|
|
||||||
<el-table-column prop="name" label="按钮名称" />
|
|
||||||
<el-table-column prop="status" label="按钮状态" />
|
|
||||||
</el-table>
|
|
||||||
</div> -->
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" pop-class="xian-02__systerm" />
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteLock',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
// tempData: [],
|
|
||||||
operate: null,
|
|
||||||
stationName: '',
|
|
||||||
signalName: ''
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'signalList'
|
|
||||||
]),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Signal.lock.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '封锁信号';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
this.operate = operate.operation;
|
|
||||||
// 入股不是断点激活,而是第一次显示需要初始化
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** status 04:封锁*/
|
|
||||||
// const signal = (selected || {}).state;
|
|
||||||
// this.tempData = [{ code: selected.code, name: selected.name, status: !selected.blockade ? '未封锁' : '封锁' }];
|
|
||||||
// const timer = setInterval(() => {
|
|
||||||
// if (this.$refs.table) {
|
|
||||||
// this.$refs.table.setCurrentRow(this.tempData[0]);
|
|
||||||
// clearInterval(timer);
|
|
||||||
// }
|
|
||||||
// }, 300);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: this.operate,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
|
||||||
};
|
|
||||||
|
|
||||||
this.loading = true;
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,212 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-dialogDrag class="xian-02__system route-setting" :title="title" :visible.sync="show" width="350px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
|
||||||
<el-row class="header">
|
|
||||||
<el-col :span="11"><span>集中站</span></el-col>
|
|
||||||
<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-input v-model="stationName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<el-input v-model="signalName" size="small" disabled />
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row style="margin-top: 10px; line-height: 30px;">
|
|
||||||
<el-col :span="11"><span>进路列表</span></el-col>
|
|
||||||
<el-col :span="11" :offset="2">
|
|
||||||
<!-- <el-button class="expand" @click="expandPath">展开进路预览</el-button> -->
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; height: 120px; margin-top:10px" size="mini" highlight-current-row :show-header="false" @row-click="clickEvent">
|
|
||||||
<el-table-column :id="domIdChoose" prop="name" style="margin-left:30px" />
|
|
||||||
</el-table>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" pop-class="xian-02__systerm" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
|
||||||
import { deepAssign } from '@/utils/index';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteSelection',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
tempData: [],
|
|
||||||
beforeSectionList: [],
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
row: null,
|
|
||||||
operation: '',
|
|
||||||
display: true,
|
|
||||||
stationName: '',
|
|
||||||
signalName: '',
|
|
||||||
tableStyle: {
|
|
||||||
'border-bottom': 'none'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
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 '进路设置';
|
|
||||||
},
|
|
||||||
commitDisabled() {
|
|
||||||
let disabled = true;
|
|
||||||
if (this.row) {
|
|
||||||
disabled = !this.row.canSetting;
|
|
||||||
}
|
|
||||||
return disabled;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
expandPath() {
|
|
||||||
console.log('展开进路预览');
|
|
||||||
},
|
|
||||||
doShow(operate, selected, tempData) {
|
|
||||||
this.selected = selected;
|
|
||||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
|
||||||
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.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
|
||||||
this.beforeSectionList = [];
|
|
||||||
},
|
|
||||||
clickEvent(row, event, column) {
|
|
||||||
this.row = row;
|
|
||||||
if (row) {
|
|
||||||
// 恢复进路区段的切除状态
|
|
||||||
this.row.canSetting = true;
|
|
||||||
this.restoreBeforeDevices();
|
|
||||||
const containSectionList = [];
|
|
||||||
if (!row.setting) {
|
|
||||||
// 设置选中区段为切除状态
|
|
||||||
if (row.routeSectionList && row.routeSectionList.length) {
|
|
||||||
// 设置新选的进路区段为切除状态
|
|
||||||
row.routeSectionList.forEach(elem => {
|
|
||||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
|
||||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
|
||||||
section.logicSectionCodeList.forEach(item => {
|
|
||||||
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
|
|
||||||
sec.cutOff = true;
|
|
||||||
containSectionList.push(sec);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
section.cutOff = true;
|
|
||||||
containSectionList.push(section);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/updateMapState', [...containSectionList]);
|
|
||||||
this.beforeSectionList = containSectionList || [];
|
|
||||||
|
|
||||||
// 设置选中指令
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
|
||||||
val: row.code
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.$refs.noticeInfo.doShow('当前进路不允许排列, 与其他进路可能发生冲突');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.row && this.row.canSetting) {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:this.row.code}, 2).then(({valid})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow({}, error.message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,303 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="xian-02__system stand-detain-train"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="380px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<div class="content cotnent_body">
|
|
||||||
<span class="base-label" style="left: 2px;">操作</span>
|
|
||||||
<div style="overflow: hidden;">
|
|
||||||
<div>操作设备</div>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-input :value="messageText1" placeholder="" size="mini" disabled />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="1">
|
|
||||||
<el-button :id="confirmId1" class="status_btn" :disabled="disabledConfirm1" @click="confirm1">确认
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="content cotnent_body">
|
|
||||||
<span class="base-label" style="left: 2px;">确认</span>
|
|
||||||
<div style="overflow: hidden;">
|
|
||||||
<div>操作设备</div>
|
|
||||||
<el-col :span="11">
|
|
||||||
<el-select :id="domIdChoose" v-model="messageText2" filterable size="mini" :disabled="disabledConfirm2" @change="SelectChange">
|
|
||||||
<el-option v-for="option in signalList" :key="option.code" :label="option.name" :value="option.code" />
|
|
||||||
</el-select>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="1">
|
|
||||||
<el-button :id="confirmId2" class="status_btn" :disabled="disabledConfirm2" @click="confirm2">确认
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="body_cont">
|
|
||||||
<el-col :span="7">
|
|
||||||
<div class="text">操作倒计时</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="17">
|
|
||||||
<div style="border: 2px inset #E9E9E9; height: 30px; width: 100%;">
|
|
||||||
{{ timeCountConfirm == -1 ? '' : timeCountConfirm }}</div>
|
|
||||||
</el-col>
|
|
||||||
</div>
|
|
||||||
<div class="body_cont">
|
|
||||||
<div class="status_text">状态</div>
|
|
||||||
<div class="textarea_content">
|
|
||||||
{{ message }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<el-button :id="domIdConfirm" class="close_btn" type="primary" @click="commit">关闭</el-button>
|
|
||||||
<notice-info ref="noticeInfo" pop-class="xian-02__systerm" />
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'StandDetainTrain',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
selected: null,
|
|
||||||
operation: null,
|
|
||||||
message: '',
|
|
||||||
|
|
||||||
messageText1: '',
|
|
||||||
signalCode: '',
|
|
||||||
messageText2: '',
|
|
||||||
timeCountConfirm: -1,
|
|
||||||
disabledConfirm1: false,
|
|
||||||
disabledConfirm2: true
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'signalList'
|
|
||||||
]),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdChoose() {
|
|
||||||
return this.dialogShow ? OperationEvent.Signal.unlock.choose.domId : '';
|
|
||||||
},
|
|
||||||
confirmId1() {
|
|
||||||
return this.dialogShow ? OperationEvent.Signal.unlock.confirm1.domId : '';
|
|
||||||
},
|
|
||||||
confirmId2() {
|
|
||||||
return this.dialogShow ? OperationEvent.Signal.unlock.confirm2.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Signal.unlock.confirm.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
return '解除封锁';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
this.timer = setInterval(() => {
|
|
||||||
if (this.timeCountConfirm > 0) {
|
|
||||||
this.timeCountConfirm--;
|
|
||||||
} else if (this.timeCountConfirm == 0) { // 关闭会话
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.disabledConfirm2 = true;
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
this.message = '';
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.messageText1 = selected.name;
|
|
||||||
this.signalCode = selected.code;
|
|
||||||
|
|
||||||
this.operation = operate.operation;
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.messageText1 = '';
|
|
||||||
this.messageText2 = '';
|
|
||||||
this.message = '';
|
|
||||||
this.signalCode = '';
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.disabledConfirm1 = false;
|
|
||||||
this.disabledConfirm2 = true;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
|
|
||||||
SelectChange() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Signal.unlock.choose.operation,
|
|
||||||
val: this.messageText2
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
confirm1() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Signal.unlock.confirm1.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.messageText1 = '*****';
|
|
||||||
this.messageText2 = '';
|
|
||||||
this.disabledConfirm1 = true;
|
|
||||||
this.disabledConfirm2 = false;
|
|
||||||
this.timeCountConfirm = 60; // 倒计时
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
confirm2() {
|
|
||||||
if (this.messageText2 == this.signalCode) {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Signal.unlock.confirm2.operation,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.messageText2 = '*****';
|
|
||||||
this.disabledConfirm2 = true;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
}
|
|
||||||
}).catch((error) => {
|
|
||||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.message = '选择信号机错误';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
const operate = {
|
|
||||||
over: true,
|
|
||||||
operation: OperationEvent.Signal.unlock.confirm.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.doClose();
|
|
||||||
}).catch((error) => {
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.stand-detain-train {
|
|
||||||
|
|
||||||
.content {
|
|
||||||
width: 100%;
|
|
||||||
border: 1px solid lightgray;
|
|
||||||
padding: 18px 5px;
|
|
||||||
position: relative;
|
|
||||||
height: 80px !important;
|
|
||||||
|
|
||||||
.base-label {
|
|
||||||
position: absolute;
|
|
||||||
top: -8px;
|
|
||||||
left: 20px;
|
|
||||||
background-color: #F0F0F0;
|
|
||||||
padding: 0 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-button {
|
|
||||||
width: 100%;
|
|
||||||
line-height: 28px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status_btn {
|
|
||||||
width: 110px;
|
|
||||||
margin: 15px auto 0;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.head_content {
|
|
||||||
height: 110px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cotnent_body {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
|
|
||||||
.text {
|
|
||||||
line-height: 30px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status_btn {
|
|
||||||
width: 80px;
|
|
||||||
margin: 0 auto
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.close_btn {
|
|
||||||
margin: 0 auto;
|
|
||||||
width: 80px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.body_cont {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
padding: 0 3px;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.text {
|
|
||||||
line-height: 30px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status_text {
|
|
||||||
margin-bottom: 3px;
|
|
||||||
font-size: 14px;
|
|
||||||
padding-left: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.textarea_content {
|
|
||||||
height: 85px;
|
|
||||||
width: 100%;
|
|
||||||
border: 2px solid #E9E9E9;
|
|
||||||
box-shadow: 2px 2px #959595 inset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,135 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<el-dialog
|
|
||||||
v-dialogDrag
|
|
||||||
class="xian-02__system route-lock"
|
|
||||||
:title="title"
|
|
||||||
:visible.sync="show"
|
|
||||||
width="340px"
|
|
||||||
:before-close="doClose"
|
|
||||||
:z-index="2000"
|
|
||||||
:modal="false"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
>
|
|
||||||
<el-row class="header" style="line-height: 44px;">
|
|
||||||
{{ message }}
|
|
||||||
</el-row>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="4">
|
|
||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<notice-info ref="noticeInfo" pop-class="xian-02__systerm" />
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
|
||||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'RouteLock',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
message: '',
|
|
||||||
selected: null,
|
|
||||||
operate: null
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'signalList'
|
|
||||||
]),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.Signal.cancelGuide.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
if (this.operate == OperationEvent.Signal.cancelGuide.menu.operation) {
|
|
||||||
return '人解进路';
|
|
||||||
} else if (this.operate == OperationEvent.Signal.guide.menu.operation) {
|
|
||||||
return '办理引导进路';
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(operate, selected, message) {
|
|
||||||
this.selected = selected;
|
|
||||||
this.operate = operate.operation;
|
|
||||||
this.message = message;
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
if (this.operate == OperationEvent.Signal.cancelGuide.menu.operation) {
|
|
||||||
this.cancelGuide();
|
|
||||||
} else if (this.operate == OperationEvent.Signal.guide.menu.operation) {
|
|
||||||
this.guide();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 人解进路 / 取消进路引导
|
|
||||||
cancelGuide() {
|
|
||||||
this.sendCommand(menuOperate.Signal.cancelGuide);
|
|
||||||
},
|
|
||||||
// 引导进路
|
|
||||||
guide() {
|
|
||||||
this.sendCommand(menuOperate.Signal.guide);
|
|
||||||
},
|
|
||||||
sendCommand(operate) {
|
|
||||||
this.loading = true;
|
|
||||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
|
||||||
this.loading = false;
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow({}, error.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
const operate = {
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
|
||||||
};
|
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,12 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu" :tip-msg="topTip" :tip-subhead="tipSubhead" pop-class="xian-02__pop_tip_station" />
|
<pop-menu ref="popMenu" :menu="menu" :tip-msg="topTip" :tip-subhead="tipSubhead" pop-class="xian-02__pop_tip_station" />
|
||||||
<route-selection ref="routeSelection" />
|
|
||||||
<route-lock ref="routeLock" />
|
|
||||||
<route-un-lock ref="routeUnLock" />
|
|
||||||
<route-hand-control ref="routeHandControl" />
|
|
||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" />
|
||||||
<router-command ref="routerCommand" />
|
|
||||||
<notice-info ref="noticeInfo" pop-class="xian-02__systerm" />
|
<notice-info ref="noticeInfo" pop-class="xian-02__systerm" />
|
||||||
<set-fault ref="setFault" pop-class="xian-02__systerm" />
|
<set-fault ref="setFault" pop-class="xian-02__systerm" />
|
||||||
</div>
|
</div>
|
||||||
@ -14,11 +9,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu/index';
|
import PopMenu from '@/components/PopMenu/index';
|
||||||
import RouteSelection from './dialog/routeSelection';
|
|
||||||
import RouteLock from './dialog/routeLock';
|
|
||||||
import RouteUnLock from './dialog/routeUnLock';
|
|
||||||
import RouteHandControl from './dialog/routeHandControl';
|
|
||||||
import RouterCommand from './dialog/routerCommand';
|
|
||||||
import RouteDetail from './dialog/routeDetail';
|
import RouteDetail from './dialog/routeDetail';
|
||||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||||
@ -33,12 +23,7 @@ export default {
|
|||||||
name: 'SignalMenu',
|
name: 'SignalMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
RouteSelection,
|
|
||||||
RouteLock,
|
|
||||||
RouteUnLock,
|
|
||||||
RouteHandControl,
|
|
||||||
RouteDetail,
|
RouteDetail,
|
||||||
RouterCommand,
|
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
SetFault
|
SetFault
|
||||||
},
|
},
|
||||||
@ -58,7 +43,7 @@ export default {
|
|||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [
|
Local: [
|
||||||
{
|
{
|
||||||
label: '排列进路',
|
label: '始端/终端选择',
|
||||||
handler: this.arrangementRoute,
|
handler: this.arrangementRoute,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||||
},
|
},
|
||||||
@ -68,42 +53,53 @@ export default {
|
|||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '信号机引导办理',
|
label: '开放自动进路',
|
||||||
handler: this.guide,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '信号封锁',
|
|
||||||
handler: this.lock,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '信号解封',
|
|
||||||
handler: this.unlock,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Fleet进路办理',
|
|
||||||
handler: this.singalPassModel,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'Fleet进路取消',
|
|
||||||
handler: this.singalCancelPassModel,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '进路交人工控',
|
|
||||||
handler: this.humanControl,
|
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '进路交自动控',
|
|
||||||
handler: this.atsAutoControl,
|
handler: this.atsAutoControl,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '查询进路控制状态',
|
label: '关闭自动进路',
|
||||||
|
handler: this.humanControl,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '终端信号封锁',
|
||||||
|
handler: this.lock,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '终端信号解封',
|
||||||
|
handler: this.unlock,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '引导信号',
|
||||||
|
handler: this.guideSignal,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '设备标签',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
label: '创建设备标签',
|
||||||
|
handler: this.undeveloped
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '查看设备标签',
|
||||||
|
handler: this.undeveloped
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '更改设备标签',
|
||||||
|
handler: this.undeveloped
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '删除设备标签',
|
||||||
|
handler: this.undeveloped
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '帮助',
|
||||||
handler: this.detail,
|
handler: this.detail,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||||
}
|
}
|
||||||
@ -521,14 +517,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 进路引导
|
|
||||||
guide() {
|
|
||||||
commitOperate(menuOperate.Signal.guide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
|
||||||
if (valid) {
|
|
||||||
this.$refs.routerCommand.doShow(operate, this.selected, '是否执行引导命令?');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
resetRouteSignal() {
|
resetRouteSignal() {
|
||||||
const startSignalCode = this.$store.state.menuOperation.startSignalCode;
|
const startSignalCode = this.$store.state.menuOperation.startSignalCode;
|
||||||
const endSignalRouteList = this.$store.state.menuOperation.endSignalRouteList;
|
const endSignalRouteList = this.$store.state.menuOperation.endSignalRouteList;
|
||||||
|
@ -148,12 +148,12 @@ export default {
|
|||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '设置ZC故障',
|
label: '设置故障',
|
||||||
handler: this.setStoppage
|
handler: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消ZC故障',
|
label: '取消故障',
|
||||||
handler: this.cancelStoppage
|
handler: this.undeveloped
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
@ -212,12 +212,12 @@ export default {
|
|||||||
},
|
},
|
||||||
menuForce: [
|
menuForce: [
|
||||||
{
|
{
|
||||||
label: '设置通信故障',
|
label: '设置故障',
|
||||||
handler: this.setStoppage
|
handler: this.undeveloped
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消通信故障',
|
label: '取消故障',
|
||||||
handler: this.cancelStoppage
|
handler: this.undeveloped
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuSpeed: [
|
menuSpeed: [
|
||||||
|
@ -57,7 +57,9 @@ const scriptRecord = {
|
|||||||
state.scriptCommand = scriptCommand;
|
state.scriptCommand = scriptCommand;
|
||||||
},
|
},
|
||||||
updateRole:(state, userRole) => {
|
updateRole:(state, userRole) => {
|
||||||
|
if (state.userRole == userRole) {
|
||||||
state.updateRoleStatus += 1;
|
state.updateRoleStatus += 1;
|
||||||
|
}
|
||||||
state.userRole = userRole;
|
state.userRole = userRole;
|
||||||
},
|
},
|
||||||
updateCoversitionInfo:(state) => {
|
updateCoversitionInfo:(state) => {
|
||||||
|
@ -81,20 +81,34 @@ export default {
|
|||||||
{
|
{
|
||||||
name: 'FAS界面',
|
name: 'FAS界面',
|
||||||
mode: 'fas',
|
mode: 'fas',
|
||||||
id: '1',
|
id: 'fas',
|
||||||
type: 'system',
|
type: 'system',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
name: '站厅报警',
|
name: '站厅报警',
|
||||||
mode: 'fas',
|
mode: 'fas',
|
||||||
id: '11',
|
id: 'stationHall',
|
||||||
|
type: 'system',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: '站厅报警',
|
||||||
|
mode: 'fas',
|
||||||
|
id: 'stationHall',
|
||||||
type: 'interface'
|
type: 'interface'
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '站台报警',
|
name: '站台报警',
|
||||||
mode: 'fas',
|
mode: 'fas',
|
||||||
id: '14',
|
id: 'stand',
|
||||||
|
type: 'system',
|
||||||
|
children: {
|
||||||
|
name: '站台报警',
|
||||||
|
mode: 'fas',
|
||||||
|
id: 'stand',
|
||||||
type: 'interface'
|
type: 'interface'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '站台报警-公共',
|
name: '站台报警-公共',
|
||||||
|
@ -18,7 +18,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('61');
|
this.$refs.iscsPlate.show('acs', 'acs', 'stand');
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {}
|
||||||
};
|
};
|
||||||
|
@ -18,7 +18,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('62');
|
this.$refs.iscsPlate.show('acs', 'acs', 'stationHall');
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {}
|
||||||
};
|
};
|
||||||
|
@ -18,7 +18,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('51');
|
this.$refs.iscsPlate.show('afc', 'afc', 'afc');
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {}
|
||||||
};
|
};
|
||||||
|
@ -18,7 +18,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('21');
|
this.$refs.iscsPlate.show('bas', 'bigSystem', 'bigSystem');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('26');
|
this.$refs.iscsPlate.show('bas', 'electricEscalator', 'electricEscalator');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
@ -23,15 +23,15 @@ export default {
|
|||||||
const device = this.$store.state.iscs.selected;
|
const device = this.$store.state.iscs.selected;
|
||||||
if (device && device._type === 'IscsButton' && device.function === 'GoEPS') {
|
if (device && device._type === 'IscsButton' && device.function === 'GoEPS') {
|
||||||
this.width = 1520;
|
this.width = 1520;
|
||||||
this.$refs.iscsPlate.iscsLoadData('25');
|
this.$refs.iscsPlate.iscsLoadData('bas', 'lightingSystem', 'epsSystem');
|
||||||
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
|
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
|
||||||
this.width = 1220;
|
this.width = 1220;
|
||||||
this.$refs.iscsPlate.iscsLoadData('24');
|
this.$refs.iscsPlate.iscsLoadData('bas', 'lightingSystem', 'lightingSystem');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('24');
|
this.$refs.iscsPlate.show('bas', 'lightingSystem', 'lightingSystem');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
@ -23,18 +23,18 @@ export default {
|
|||||||
const device = this.$store.state.iscs.selected;
|
const device = this.$store.state.iscs.selected;
|
||||||
if (device && device._type === 'IscsButton' && device.function === 'GoBMiniSystem') { // 至B端小系统
|
if (device && device._type === 'IscsButton' && device.function === 'GoBMiniSystem') { // 至B端小系统
|
||||||
this.width = 1400;
|
this.width = 1400;
|
||||||
this.$refs.iscsPlate.iscsLoadData('22-1');
|
this.$refs.iscsPlate.iscsLoadData('bas', 'smallSystem', 'bSide');
|
||||||
} else if (device && device._type === 'IscsButton' && device.function === 'GoAMiniSystem1') { // 至A端小系统(一) 默认
|
} else if (device && device._type === 'IscsButton' && device.function === 'GoAMiniSystem1') { // 至A端小系统(一) 默认
|
||||||
this.width = 1200;
|
this.width = 1200;
|
||||||
this.$refs.iscsPlate.iscsLoadData('22');
|
this.$refs.iscsPlate.iscsLoadData('bas', 'smallSystem', 'aSideOne');
|
||||||
} else if (device && device._type === 'IscsButton' && device.function === 'GoAMiniSystem2') { // 至A端小系统(二)
|
} else if (device && device._type === 'IscsButton' && device.function === 'GoAMiniSystem2') { // 至A端小系统(二)
|
||||||
this.width = 1200;
|
this.width = 1200;
|
||||||
this.$refs.iscsPlate.iscsLoadData('22-2');
|
this.$refs.iscsPlate.iscsLoadData('bas', 'smallSystem', 'aSideTwo');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('22');
|
this.$refs.iscsPlate.show('bas', 'smallSystem', 'aSideOne');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('210');
|
this.$refs.iscsPlate.show('bas', 'stationNet', 'stationNet');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
@ -22,16 +22,15 @@ export default {
|
|||||||
const device = this.$store.state.iscs.selected;
|
const device = this.$store.state.iscs.selected;
|
||||||
if (device && device._type === 'IscsButton' && device.function === 'GoJetFan') {
|
if (device && device._type === 'IscsButton' && device.function === 'GoJetFan') {
|
||||||
this.width = 1150;
|
this.width = 1150;
|
||||||
this.$refs.iscsPlate.iscsLoadData('29');
|
this.$refs.iscsPlate.iscsLoadData('bas', 'tunnelVentilation', 'jetFan');
|
||||||
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
|
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
|
||||||
this.width = 1300;
|
this.width = 1300;
|
||||||
this.$refs.iscsPlate.iscsLoadData('28');
|
this.$refs.iscsPlate.iscsLoadData('bas', 'tunnelVentilation', 'tunnelVentilation');
|
||||||
}
|
}
|
||||||
// console.log(this.width, '宽度');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('28');
|
this.$refs.iscsPlate.show('bas', 'tunnelVentilation', 'tunnelVentilation');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('27');
|
this.$refs.iscsPlate.show('bas', 'waterSupply', 'waterSupply');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('23');
|
this.$refs.iscsPlate.show('bas', 'waterSystem', 'waterSystem');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import Iscs from '@/iscs/iscs';
|
import Iscs from '@/iscs/iscs';
|
||||||
import { parser } from '@/iscs/utils/parser';
|
import { parser } from '@/iscs/utils/parser';
|
||||||
import iscsData from '@/iscs/constant/iscsData';
|
import {getIscsData} from '@/iscs/constant/iscsData';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Iscs',
|
name: 'Iscs',
|
||||||
@ -78,8 +78,8 @@ export default {
|
|||||||
this.iscsDestroy();
|
this.iscsDestroy();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
show (deviceCode) {
|
show (mode, system, part) {
|
||||||
if (!deviceCode) {
|
if (!mode || !system || !part) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
document.getElementById(this.iscsId).oncontextmenu = function (e) {
|
document.getElementById(this.iscsId).oncontextmenu = function (e) {
|
||||||
@ -87,7 +87,7 @@ export default {
|
|||||||
};
|
};
|
||||||
this.iscsDestroy();
|
this.iscsDestroy();
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const data = parser(iscsData[deviceCode], {width: this.widthCanvas, height: this.canvasHeight});
|
const data = parser(getIscsData(mode, system, part), {width: this.widthCanvas, height: this.canvasHeight});
|
||||||
this.$iscs = new Iscs({
|
this.$iscs = new Iscs({
|
||||||
dom: document.getElementById(this.iscsId),
|
dom: document.getElementById(this.iscsId),
|
||||||
config: {
|
config: {
|
||||||
@ -109,8 +109,8 @@ export default {
|
|||||||
if (this.$route.params.mode) {
|
if (this.$route.params.mode) {
|
||||||
this.$iscs.on('selected', this.onSelected, this);
|
this.$iscs.on('selected', this.onSelected, this);
|
||||||
}
|
}
|
||||||
this.setIscs(data, iscsData[deviceCode]);
|
this.setIscs(data, getIscsData(mode, system, part));
|
||||||
this.$store.dispatch('iscs/setIscsData', iscsData[deviceCode]);
|
this.$store.dispatch('iscs/setIscsData', getIscsData(mode, system, part));
|
||||||
window.document.oncontextmenu = function () {
|
window.document.oncontextmenu = function () {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
@ -118,8 +118,8 @@ export default {
|
|||||||
setIscs(data, oldData) {
|
setIscs(data, oldData) {
|
||||||
this.$iscs.setIscs(oldData, data);
|
this.$iscs.setIscs(oldData, data);
|
||||||
},
|
},
|
||||||
iscsLoadData(deviceCode) {
|
iscsLoadData(mode, system, part) {
|
||||||
this.$iscs.loadData(parser(iscsData[deviceCode], {width: this.widthCanvas, height: this.canvasHeight}));
|
this.$iscs.loadData(parser(getIscsData(mode, system, part), {width: this.widthCanvas, height: this.canvasHeight}));
|
||||||
},
|
},
|
||||||
// 点击选择事件
|
// 点击选择事件
|
||||||
onSelected(em) {
|
onSelected(em) {
|
||||||
|
@ -17,7 +17,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('43');
|
this.$refs.iscsPlate.show('cctv', 'centralDeviceState', 'centralDeviceState');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
@ -102,9 +102,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="cctv-box-content">
|
<div class="cctv-box-content">
|
||||||
<div style="position: relative;width: 75px;left: 10px;">
|
<div style="position: relative;width: 75px;left: 10px;">
|
||||||
<div id="cctv-41" class="cctv-box-content-btn" @click="changeCCTV('41')">站厅</div>
|
<div id="cctv-stationHall" class="cctv-box-content-btn" @click="changeCCTV('stationHall')">站厅</div>
|
||||||
<div id="cctv-42" class="cctv-box-content-btn" @click="changeCCTV('42')">站台</div>
|
<div id="cctv-stand" class="cctv-box-content-btn" @click="changeCCTV('stand')">站台</div>
|
||||||
<div id="cctv-44" class="cctv-box-content-btn" @click="changeCCTV('44')">云台</div>
|
<div id="cctv-holder" class="cctv-box-content-btn" @click="changeCCTV('holder')">云台</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cctv-box-content-draw" :style="{marginLeft: left, marginTop: top}">
|
<div class="cctv-box-content-draw" :style="{marginLeft: left, marginTop: top}">
|
||||||
<iscsSystem ref="iscsPlate" :width-canvas="width" :canvas-height="height" />
|
<iscsSystem ref="iscsPlate" :width-canvas="width" :canvas-height="height" />
|
||||||
@ -132,7 +132,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selectedCCTV: '41',
|
selectedCCTV: 'stationHall',
|
||||||
descriptionList: [],
|
descriptionList: [],
|
||||||
textarea: '',
|
textarea: '',
|
||||||
value: '',
|
value: '',
|
||||||
@ -184,8 +184,8 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('41');
|
this.$refs.iscsPlate.show('cctv', 'cctv', 'stationHall');
|
||||||
const cctvBtn = document.getElementById('cctv-41');
|
const cctvBtn = document.getElementById('cctv-stationHall');
|
||||||
cctvBtn.setAttribute('class', 'cctv-box-content-btn active');
|
cctvBtn.setAttribute('class', 'cctv-box-content-btn active');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -197,13 +197,13 @@ export default {
|
|||||||
this.selectedCCTV = id;
|
this.selectedCCTV = id;
|
||||||
this.left = '0px';
|
this.left = '0px';
|
||||||
this.top = '0px';
|
this.top = '0px';
|
||||||
if (id == '41') {
|
if (id == 'stationHall') {
|
||||||
this.width = 1490;
|
this.width = 1490;
|
||||||
this.height = 330;
|
this.height = 330;
|
||||||
this.left = '-22px';
|
this.left = '-22px';
|
||||||
this.top = '-20px';
|
this.top = '-20px';
|
||||||
}
|
}
|
||||||
this.$refs.iscsPlate.iscsLoadData(id);
|
this.$refs.iscsPlate.iscsLoadData('cctv', 'cctv', id);
|
||||||
},
|
},
|
||||||
handleFrames(item) {
|
handleFrames(item) {
|
||||||
this.selectedFlag = item.value;
|
this.selectedFlag = item.value;
|
||||||
|
@ -24,19 +24,19 @@ export default {
|
|||||||
if (device && device._type === 'IscsButton' && device.function === 'PublicArea') {
|
if (device && device._type === 'IscsButton' && device.function === 'PublicArea') {
|
||||||
this.width = 1520;
|
this.width = 1520;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.iscsPlate.iscsLoadData('12');
|
this.$refs.iscsPlate.iscsLoadData('fas', 'stand', 'standPublicArea');
|
||||||
});
|
});
|
||||||
console.log(this.width);
|
console.log(this.width);
|
||||||
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
|
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
|
||||||
this.width = 1100;
|
this.width = 1100;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.iscsPlate.iscsLoadData('14');
|
this.$refs.iscsPlate.iscsLoadData('fas', 'stand', 'stand');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('14');
|
this.$refs.iscsPlate.show('fas', 'stand', 'stand');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('11');
|
this.$refs.iscsPlate.show('fas', 'stationHall', 'stationHall');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('13');
|
this.$refs.iscsPlate.show('fas', 'systemState', 'systemState');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('71');
|
this.$refs.iscsPlate.show('net', 'netState', 'netState');
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {}
|
||||||
};
|
};
|
||||||
|
@ -18,7 +18,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$refs.iscsPlate.show('31');
|
this.$refs.iscsPlate.show('psd', 'psd', 'psd');
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {}
|
||||||
};
|
};
|
||||||
|
@ -175,7 +175,7 @@ export default {
|
|||||||
this.$refs.queryListPage.refresh(true);
|
this.$refs.queryListPage.refresh(true);
|
||||||
},
|
},
|
||||||
lessonCreate() {
|
lessonCreate() {
|
||||||
this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`, query: {mapId: this.$route.params.mapId, cityCode: this.$route.query.cityCode, drawWay: this.$route.query.drawWay} });
|
this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`, query: {mapId: this.$route.params.mapId, cityCode: this.$route.query.cityCode, drawWay: this.$route.query.drawWay, lineCode: this.$route.query.lineCode} });
|
||||||
},
|
},
|
||||||
lessonCreateByPublish() {
|
lessonCreateByPublish() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -180,7 +180,6 @@ export default {
|
|||||||
getPublishMapListOnline().then(response => {
|
getPublishMapListOnline().then(response => {
|
||||||
this.mapIdList = response.data;
|
this.mapIdList = response.data;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.$route.query.drawWay + '' === 'true') {
|
if (this.$route.query.drawWay + '' === 'true') {
|
||||||
this.trainingOperateTypeMap = {
|
this.trainingOperateTypeMap = {
|
||||||
Switch: [],
|
Switch: [],
|
||||||
|
@ -271,11 +271,6 @@ export default {
|
|||||||
this.sessionId = response.data.sessionId;
|
this.sessionId = response.data.sessionId;
|
||||||
this.loginUrl = response.data.url;
|
this.loginUrl = response.data.url;
|
||||||
this.loadingCode = false;
|
this.loadingCode = false;
|
||||||
// this.clearTimer(this.checkTimeout);
|
|
||||||
// this.checkTimeout = setTimeout(() => {
|
|
||||||
// this.loadingCode = true;
|
|
||||||
// this.loginUrl = '';
|
|
||||||
// }, 3 * 60 * 1000);
|
|
||||||
this.checkLoginStatus();
|
this.checkLoginStatus();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loadingCode = false;
|
this.loadingCode = false;
|
||||||
@ -446,7 +441,6 @@ export default {
|
|||||||
}
|
}
|
||||||
.el-loading-spinner .el-loading-text {
|
.el-loading-spinner .el-loading-text {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
color: #FFF;
|
|
||||||
}
|
}
|
||||||
.login-code-box {
|
.login-code-box {
|
||||||
.el-loading-spinner i {
|
.el-loading-spinner i {
|
||||||
@ -454,7 +448,6 @@ export default {
|
|||||||
}
|
}
|
||||||
.el-loading-spinner .el-loading-text {
|
.el-loading-spinner .el-loading-text {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #409EFF;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,8 +134,10 @@ export default {
|
|||||||
},
|
},
|
||||||
'userRole':function(val) {
|
'userRole':function(val) {
|
||||||
this.isHasCoversition = false;
|
this.isHasCoversition = false;
|
||||||
|
},
|
||||||
|
'$store.state.scriptRecord.updateCoversitionStatus':function(val) {
|
||||||
|
this.isHasCoversition = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initPage();
|
this.initPage();
|
||||||
|
@ -30,10 +30,10 @@ export default {
|
|||||||
watch:{
|
watch:{
|
||||||
'userRole':function(val) {
|
'userRole':function(val) {
|
||||||
this.initPage(true);
|
this.initPage(true);
|
||||||
|
},
|
||||||
|
'$store.state.scriptRecord.updateRoleStatus':function(val) {
|
||||||
|
this.initPage(true);
|
||||||
}
|
}
|
||||||
// '$store.state.scriptRecord.updateRoleStatus':function(val) {
|
|
||||||
// this.initPage(true);
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
|
@ -96,7 +96,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.clearAutoSave();
|
// this.clearAutoSave();
|
||||||
this.$store.dispatch('scriptRecord/updateBgSet', false);
|
this.$store.dispatch('scriptRecord/updateBgSet', false);
|
||||||
this.$store.dispatch('scriptRecord/updateRole', null);
|
this.$store.dispatch('scriptRecord/updateRole', null);
|
||||||
},
|
},
|
||||||
@ -192,14 +192,14 @@ export default {
|
|||||||
saveScriptDataNew(this.group).then(resp => {
|
saveScriptDataNew(this.group).then(resp => {
|
||||||
this.$message.success(this.$t('scriptRecord.saveDataSucess'));
|
this.$message.success(this.$t('scriptRecord.saveDataSucess'));
|
||||||
this.isSavingScript = false;
|
this.isSavingScript = false;
|
||||||
this.initAutoSaveScript();
|
// this.initAutoSaveScript();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`${this.$t('scriptRecord.saveDataFail')}: ${error.message}`);
|
this.$messageBox(`${this.$t('scriptRecord.saveDataFail')}: ${error.message}`);
|
||||||
this.isSavingScript = false;
|
this.isSavingScript = false;
|
||||||
if (error.code === 40004 || error.code === 40005 || error.code === 40003) {
|
if (error.code === 40004 || error.code === 40005 || error.code === 40003) {
|
||||||
this.clearAutoSave();
|
// this.clearAutoSave();
|
||||||
} else {
|
} else {
|
||||||
// this.initAutoSaveScript();
|
// // this.initAutoSaveScript();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user