Merge branch 'test_dispaly' of https://git.code.tencent.com/lian-cbtc/jl-client into test_dispaly1
This commit is contained in:
commit
b98efabc7f
@ -5,7 +5,7 @@
|
|||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="show"
|
:visible.sync="show"
|
||||||
width="650px"
|
width="650px"
|
||||||
:before-close="doClose"
|
:before-close="() => show=false"
|
||||||
:show-close="true"
|
:show-close="true"
|
||||||
:z-index="2000"
|
:z-index="2000"
|
||||||
:modal="false"
|
:modal="false"
|
||||||
@ -43,14 +43,14 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-button style="width: 125px;margin-left: 10px;" @click="applyAll">全部申请</el-button>
|
<el-button :id="getDomId('applyAll')" style="width: 125px;margin-left: 10px;" @click="applyAll">全部申请</el-button>
|
||||||
<el-button style="width: 125px;margin-top: 10px;" @click="cancelApplyAll">取消全部申请</el-button>
|
<el-button :id="getDomId('cancelApplyAll')" style="width: 125px;margin-top: 10px;" @click="cancelApplyAll">取消全部申请</el-button>
|
||||||
<el-button style="width: 125px;margin-top: 10px;" @click="releaseAll">全部释放</el-button>
|
<el-button :id="getDomId('releaseAll')" style="width: 125px;margin-top: 10px;" @click="releaseAll">全部释放</el-button>
|
||||||
<el-button style="width: 125px;margin-top: 10px;" @click="cancelReleaseAll">取消全部释放</el-button>
|
<el-button :id="getDomId('cancelReleaseAll')" style="width: 125px;margin-top: 10px;" @click="cancelReleaseAll">取消全部释放</el-button>
|
||||||
<el-button style="width: 125px;margin-top: 10px;" :disabled="true" @click="distributionAll">全部强制分配</el-button>
|
<el-button :id="getDomId('distributionAll')" style="width: 125px;margin-top: 10px;" :disabled="true" @click="distributionAll">全部强制分配</el-button>
|
||||||
<el-button style="width: 125px;margin-top: 10px;" :disabled="true" @click="cancelDistributionAll">取消全部强制分配</el-button>
|
<el-button :id="getDomId('cancelDistributionAll')" style="width: 125px;margin-top: 10px;" :disabled="true" @click="cancelDistributionAll">取消全部强制分配</el-button>
|
||||||
<el-button style="width: 125px;margin-top: 10px;" @click="commit">应用</el-button>
|
<el-button :id="commitDomId" style="width: 125px;margin-top: 10px;" @click="commit">应用</el-button>
|
||||||
<el-button style="width: 125px;margin-top: 10px;" @click="doClose">退出</el-button>
|
<el-button :id="getDomId('doClose')" style="width: 125px;margin-top: 10px;" @click="doClose">退出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||||
@ -87,7 +87,10 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'stationList'
|
'stationList'
|
||||||
])
|
]),
|
||||||
|
commitDomId() {
|
||||||
|
return this.show ? OperationEvent.Station.areaSelection.confirm.domId : '';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.map.mapStateLoadedCount': function () {
|
'$store.state.map.mapStateLoadedCount': function () {
|
||||||
@ -107,6 +110,12 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getDomId(key) {
|
||||||
|
return this.show ? OperationEvent.Command.commandNingBo1[key].domId : '';
|
||||||
|
},
|
||||||
|
getOperation(key) {
|
||||||
|
return OperationEvent.Command.commandNingBo1[key] ? OperationEvent.Command.commandNingBo1[key].operation : '';
|
||||||
|
},
|
||||||
doShow() {
|
doShow() {
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
this.$store.state.training.simulationUserList.forEach(item => {
|
this.$store.state.training.simulationUserList.forEach(item => {
|
||||||
@ -138,7 +147,14 @@ export default {
|
|||||||
this.show = true;
|
this.show = true;
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.show = false;
|
const operate = {
|
||||||
|
operation: this.getOperation('doClose')
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.show = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getControlStatus(code) {
|
getControlStatus(code) {
|
||||||
const newStation = this.$store.getters['map/getDeviceByCode'](code);
|
const newStation = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
@ -167,49 +183,91 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
applyAll() {
|
applyAll() {
|
||||||
this.tableData.forEach(item => {
|
const operate = {
|
||||||
const centralizedStationCode = this.stationCentralizedMap[item.code];
|
operation: this.getOperation('applyAll')
|
||||||
const centralizedStation = this.$store.getters['map/getDeviceByCode'](centralizedStationCode);
|
};
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](item.code);
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
if (this.work === 'localWork' && centralizedStation.controlMode === 'Center') {
|
if (valid) {
|
||||||
item.apply = false;
|
this.tableData.forEach(item => {
|
||||||
} else if (station.controller !== this.memberId) {
|
const centralizedStationCode = this.stationCentralizedMap[item.code];
|
||||||
item.apply = true;
|
const centralizedStation = this.$store.getters['map/getDeviceByCode'](centralizedStationCode);
|
||||||
|
const station = this.$store.getters['map/getDeviceByCode'](item.code);
|
||||||
|
if (this.work === 'localWork' && centralizedStation.controlMode === 'Center') {
|
||||||
|
item.apply = false;
|
||||||
|
} else if (station.controller !== this.memberId) {
|
||||||
|
item.apply = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancelApplyAll() {
|
cancelApplyAll() {
|
||||||
this.tableData.forEach(item => {
|
const operate = {
|
||||||
item.apply = false;
|
operation: this.getOperation('cancelApplyAll')
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
item.apply = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
releaseAll() {
|
releaseAll() {
|
||||||
this.tableData.forEach(item => {
|
const operate = {
|
||||||
const centralizedStationCode = this.stationCentralizedMap[item.code];
|
operation: this.getOperation('releaseAll')
|
||||||
const centralizedStation = this.$store.getters['map/getDeviceByCode'](centralizedStationCode);
|
};
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](item.code);
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
if (this.work === 'localWork' && centralizedStation.controlMode === 'Center') {
|
if (valid) {
|
||||||
item.apply = false;
|
this.tableData.forEach(item => {
|
||||||
} else if (station.controller === this.memberId) {
|
const centralizedStationCode = this.stationCentralizedMap[item.code];
|
||||||
item.release = true;
|
const centralizedStation = this.$store.getters['map/getDeviceByCode'](centralizedStationCode);
|
||||||
|
const station = this.$store.getters['map/getDeviceByCode'](item.code);
|
||||||
|
if (this.work === 'localWork' && centralizedStation.controlMode === 'Center') {
|
||||||
|
item.apply = false;
|
||||||
|
} else if (station.controller === this.memberId) {
|
||||||
|
item.release = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancelReleaseAll() {
|
cancelReleaseAll() {
|
||||||
this.tableData.forEach(item => {
|
const operate = {
|
||||||
item.release = false;
|
operation: this.getOperation('cancelReleaseAll')
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
item.release = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
distributionAll() {
|
distributionAll() {
|
||||||
this.tableData.forEach(item => {
|
const operate = {
|
||||||
if (item.controller !== this.memberId) {
|
operation: this.getOperation('distributionAll')
|
||||||
item.distribution = true;
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
if (item.controller !== this.memberId) {
|
||||||
|
item.distribution = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancelDistributionAll() {
|
cancelDistributionAll() {
|
||||||
this.tableData.forEach(item => {
|
const operate = {
|
||||||
item.distribution = false;
|
operation: this.getOperation('cancelDistributionAll')
|
||||||
|
};
|
||||||
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
item.distribution = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
|
@ -219,7 +219,7 @@ export default {
|
|||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
@ -4,22 +4,22 @@
|
|||||||
<el-col :span="sure? 18: 24">
|
<el-col :span="sure? 18: 24">
|
||||||
<el-table :id="domIdChoose" ref="table" :data="tempList" highlight-current-row height="300px" @current-change="handleChangeLine">
|
<el-table :id="domIdChoose" ref="table" :data="tempList" highlight-current-row height="300px" @current-change="handleChangeLine">
|
||||||
<el-table-column prop="name" width="90" label="闭塞区段" />
|
<el-table-column prop="name" width="90" label="闭塞区段" />
|
||||||
<el-table-column width="90" label="PMI">
|
<el-table-column width="90" label="PMI">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ getStationPIM(scope.row) }}</span>
|
<span>{{ getStationPIM(scope.row) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="90" label="信号模式">
|
<el-table-column width="90" label="信号模式">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ getSectionMode(scope.row.code) }}</span>
|
<span>{{ getSectionMode(scope.row.code) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="120" label="过岔锁闭可取消">
|
<el-table-column width="120" label="过岔锁闭可取消">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ getSectionCanStatus(scope.row.code) }}</span>
|
<span>{{ getSectionCanStatus(scope.row.code) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="120" label="过岔锁闭已取消">
|
<el-table-column width="120" label="过岔锁闭已取消">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ getSectionHasStatus(scope.row.code) }}</span>
|
<span>{{ getSectionHasStatus(scope.row.code) }}</span>
|
||||||
</template>
|
</template>
|
||||||
@ -31,7 +31,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" :offset="1" v-if="sure">
|
<el-col v-if="sure" :span="5" :offset="1">
|
||||||
<fieldset style="position: absolute;top: 40%;">
|
<fieldset style="position: absolute;top: 40%;">
|
||||||
<legend class="card_title">命令</legend>
|
<legend class="card_title">命令</legend>
|
||||||
<el-radio-group v-model="command">
|
<el-radio-group v-model="command">
|
||||||
@ -69,27 +69,27 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
initCacheMap: {
|
initCacheMap: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {}
|
return {};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
initInfo: {
|
initInfo: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {}
|
return {};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateDone: {
|
updateDone: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0
|
default: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
status: false,
|
status: false,
|
||||||
standStatus: true,
|
standStatus: true,
|
||||||
allChecked: false,
|
allChecked: false,
|
||||||
@ -100,31 +100,31 @@ export default {
|
|||||||
radio: '1',
|
radio: '1',
|
||||||
operate: null,
|
operate: null,
|
||||||
command: true,
|
command: true,
|
||||||
sure: false,
|
sure: false,
|
||||||
currentSelect: null,
|
currentSelect: null,
|
||||||
noInit: true,
|
noInit: true,
|
||||||
changeIgnore: false,
|
changeIgnore: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'sectionList'
|
'sectionList'
|
||||||
]),
|
]),
|
||||||
cmdType() {
|
cmdType() {
|
||||||
return ''
|
return '';
|
||||||
},
|
},
|
||||||
initSelect() {
|
initSelect() {
|
||||||
return this.initInfo.initSelect||{};
|
return this.initInfo.initSelect || {};
|
||||||
},
|
},
|
||||||
disabled() {
|
disabled() {
|
||||||
return !this.currentSelect || this.currentSelect.blockade || this.noInit;
|
return !this.currentSelect || this.currentSelect.blockade || this.noInit;
|
||||||
},
|
},
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
tempList() {
|
tempList() {
|
||||||
return this.sectionList.filter(el => ['01', '04'].includes(el.type) )
|
return this.sectionList.filter(el => ['01', '04'].includes(el.type) );
|
||||||
},
|
},
|
||||||
domIdChoose() {
|
domIdChoose() {
|
||||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
||||||
},
|
},
|
||||||
@ -144,105 +144,105 @@ export default {
|
|||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateDone() {
|
updateDone() {
|
||||||
if (this.currentSelect) {
|
if (this.currentSelect) {
|
||||||
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code]||{}).done != 'one';
|
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCacheMap() {
|
getCacheMap() {
|
||||||
return this.initCacheMap[this.cmdType.value]||{};
|
return this.initCacheMap[this.cmdType.value] || {};
|
||||||
},
|
},
|
||||||
doShow(operate, sure) {
|
doShow(operate, sure) {
|
||||||
this.operate = operate;
|
this.operate = operate;
|
||||||
this.sure = sure;
|
this.sure = sure;
|
||||||
if (!sure) this.command = true;
|
if (!sure) this.command = true;
|
||||||
this.title = `${sure? '确认/取消过岔锁闭取消': '初始化过岔锁闭取消'}`;
|
this.title = `${sure ? '确认/取消过岔锁闭取消' : '初始化过岔锁闭取消'}`;
|
||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.changeIgnore = sure
|
this.changeIgnore = sure;
|
||||||
this.$refs.table.setCurrentRow(sure? this.tempList.find(el => el.code == this.initSelect.code): null);
|
this.$refs.table.setCurrentRow(sure ? this.tempList.find(el => el.code == this.initSelect.code) : null);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.sure && (this.currentSelect = null);
|
this.sure && (this.currentSelect = null);
|
||||||
this.sure && this.$refs.table.setCurrentRow();
|
this.sure && this.$refs.table.setCurrentRow();
|
||||||
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
||||||
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
||||||
)
|
);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit(isClose = true) {
|
commit(isClose = true) {
|
||||||
if (this.currentSelect &&
|
if (this.currentSelect &&
|
||||||
this.currentSelect.code == this.initSelect.code) {
|
this.currentSelect.code == this.initSelect.code) {
|
||||||
const cacheMap= this.getCacheMap();
|
const cacheMap = this.getCacheMap();
|
||||||
const isOK = this.command&&(!this.sure || this.sure&&cacheMap[this.currentSelect.code])
|
const isOK = this.command && (!this.sure || this.sure && cacheMap[this.currentSelect.code]);
|
||||||
const operate = {
|
const operate = {
|
||||||
cmdType: this.sure&&isOK? this.cmdType: null,
|
cmdType: this.sure && isOK ? this.cmdType : null,
|
||||||
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
||||||
over: this.sure,
|
over: this.sure,
|
||||||
param: {sectionCode: this.currentSelect.code}
|
param: {sectionCode: this.currentSelect.code}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (isOK) {
|
if (isOK) {
|
||||||
this.$root.$emit('appendCache', this.cmdType.value, this.currentSelect.code, { done: this.sure? 'two': 'one'});
|
this.$root.$emit('appendCache', this.cmdType.value, this.currentSelect.code, { done: this.sure ? 'two' : 'one'});
|
||||||
} else {
|
} else {
|
||||||
this.$root.$emit('removeCache', this.cmdType.value, this.currentSelect.code);
|
this.$root.$emit('removeCache', this.cmdType.value, this.currentSelect.code);
|
||||||
}
|
}
|
||||||
this.$emit('updateDone')
|
this.$emit('updateDone');
|
||||||
this.$store.dispatch('map/flushMapRef');
|
this.$store.dispatch('map/flushMapRef');
|
||||||
isClose && this.doClose();
|
isClose && this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
isClose && this.isClose();
|
isClose && this.isClose();
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox('两次选择不一致');
|
this.$messageBox('两次选择不一致');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleChangeLine(val) {
|
handleChangeLine(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
this.$emit('updateDone')
|
this.$emit('updateDone');
|
||||||
if (this.changeIgnore) { return; }
|
if (this.changeIgnore) { return; }
|
||||||
|
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
|
||||||
this.changeIgnore = false;
|
this.changeIgnore = false;
|
||||||
this.$emit('updateDone')
|
this.$emit('updateDone');
|
||||||
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
|
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.sure || this.$emit('initSelect', this.currentSelect);
|
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getProcess(code) {
|
getProcess(code) {
|
||||||
const cacheMap = this.getCacheMap();
|
const cacheMap = this.getCacheMap();
|
||||||
const cache = cacheMap[code];
|
const cache = cacheMap[code];
|
||||||
if (cache) {
|
if (cache) {
|
||||||
if (this.sure) {
|
if (this.sure) {
|
||||||
return cache.done == 'two' ? '确认过岔锁闭取消完成' : '等待确认/取消';
|
return cache.done == 'two' ? '确认过岔锁闭取消完成' : '等待确认/取消';
|
||||||
} else {
|
} else {
|
||||||
return cache.done == 'one' ? '已初始化' : ''
|
return cache.done == 'one' ? '已初始化' : '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
getStationPIM(code) {
|
getStationPIM(code) {
|
||||||
return '16-NSW';
|
return '16-NSW';
|
||||||
@ -250,12 +250,12 @@ export default {
|
|||||||
getSectionMode(code) {
|
getSectionMode(code) {
|
||||||
return '后备';
|
return '后备';
|
||||||
},
|
},
|
||||||
getSectionCanStatus(code) {
|
getSectionCanStatus(code) {
|
||||||
return '否'
|
return '否';
|
||||||
},
|
},
|
||||||
getSectionHasStatus(code) {
|
getSectionHasStatus(code) {
|
||||||
return '否'
|
return '否';
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: OperationEvent.Command.common.close.operation
|
operation: OperationEvent.Command.common.close.operation
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<span>{{ getSectionMode(scope.row.code) }}</span>
|
<span>{{ getSectionMode(scope.row.code) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column width="90" label="转换锁闭">
|
<el-table-column width="90" label="转换锁闭">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ getSectionLock(scope.row.code) }}</span>
|
<span>{{ getSectionLock(scope.row.code) }}</span>
|
||||||
</template>
|
</template>
|
||||||
@ -26,7 +26,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" :offset="1" v-if="sure">
|
<el-col v-if="sure" :span="5" :offset="1">
|
||||||
<fieldset style="position: absolute;top: 40%;">
|
<fieldset style="position: absolute;top: 40%;">
|
||||||
<legend class="card_title">命令</legend>
|
<legend class="card_title">命令</legend>
|
||||||
<el-radio-group v-model="command">
|
<el-radio-group v-model="command">
|
||||||
@ -64,27 +64,27 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
initCacheMap: {
|
initCacheMap: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {}
|
return {};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
initInfo: {
|
initInfo: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {}
|
return {};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateDone: {
|
updateDone: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0
|
default: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
status: false,
|
status: false,
|
||||||
standStatus: true,
|
standStatus: true,
|
||||||
allChecked: false,
|
allChecked: false,
|
||||||
@ -95,31 +95,31 @@ export default {
|
|||||||
radio: '1',
|
radio: '1',
|
||||||
operate: null,
|
operate: null,
|
||||||
command: true,
|
command: true,
|
||||||
sure: false,
|
sure: false,
|
||||||
currentSelect: null,
|
currentSelect: null,
|
||||||
noInit: true,
|
noInit: true,
|
||||||
changeIgnore: false
|
changeIgnore: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'sectionList'
|
'sectionList'
|
||||||
]),
|
]),
|
||||||
cmdType() {
|
cmdType() {
|
||||||
return ''
|
return '';
|
||||||
},
|
},
|
||||||
initSelect() {
|
initSelect() {
|
||||||
return this.initInfo.initSelect||{};
|
return this.initInfo.initSelect || {};
|
||||||
},
|
},
|
||||||
disabled() {
|
disabled() {
|
||||||
return !this.currentSelect || this.currentSelect.blockade || this.noInit;
|
return !this.currentSelect || this.currentSelect.blockade || this.noInit;
|
||||||
},
|
},
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
tempList() {
|
tempList() {
|
||||||
return this.sectionList.filter(el => ['01', '04'].includes(el.type) )
|
return this.sectionList.filter(el => ['01', '04'].includes(el.type) );
|
||||||
},
|
},
|
||||||
domIdChoose() {
|
domIdChoose() {
|
||||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
||||||
},
|
},
|
||||||
@ -139,105 +139,105 @@ export default {
|
|||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateDone() {
|
updateDone() {
|
||||||
if (this.currentSelect) {
|
if (this.currentSelect) {
|
||||||
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code]||{}).done != 'one';
|
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCacheMap() {
|
getCacheMap() {
|
||||||
return this.initCacheMap[this.cmdType.value]||{};
|
return this.initCacheMap[this.cmdType.value] || {};
|
||||||
},
|
},
|
||||||
doShow(operate, sure) {
|
doShow(operate, sure) {
|
||||||
this.operate = operate;
|
this.operate = operate;
|
||||||
this.sure = sure;
|
this.sure = sure;
|
||||||
if (!sure) this.command = true;
|
if (!sure) this.command = true;
|
||||||
this.title = `${sure? '确认/取消转换锁闭取消': '初始化转换锁闭取消'}`;
|
this.title = `${sure ? '确认/取消转换锁闭取消' : '初始化转换锁闭取消'}`;
|
||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.changeIgnore = sure;
|
this.changeIgnore = sure;
|
||||||
this.$refs.table.setCurrentRow(sure? this.tempList.find(el => el.code == this.initSelect.code): null);
|
this.$refs.table.setCurrentRow(sure ? this.tempList.find(el => el.code == this.initSelect.code) : null);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.sure && (this.currentSelect = null);
|
this.sure && (this.currentSelect = null);
|
||||||
this.sure && this.$refs.table.setCurrentRow();
|
this.sure && this.$refs.table.setCurrentRow();
|
||||||
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
||||||
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
||||||
)
|
);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit(isClose = true) {
|
commit(isClose = true) {
|
||||||
if (this.currentSelect &&
|
if (this.currentSelect &&
|
||||||
this.currentSelect.code == this.initSelect.code) {
|
this.currentSelect.code == this.initSelect.code) {
|
||||||
const cacheMap= this.getCacheMap();
|
const cacheMap = this.getCacheMap();
|
||||||
const isOK = this.command&&(!this.sure || this.sure&&cacheMap[this.currentSelect.code])
|
const isOK = this.command && (!this.sure || this.sure && cacheMap[this.currentSelect.code]);
|
||||||
const operate = {
|
const operate = {
|
||||||
cmdType: this.sure&&isOK? this.cmdType: null,
|
cmdType: this.sure && isOK ? this.cmdType : null,
|
||||||
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
||||||
over: this.sure,
|
over: this.sure,
|
||||||
param: {sectionCode: this.currentSelect.code}
|
param: {sectionCode: this.currentSelect.code}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (isOK) {
|
if (isOK) {
|
||||||
this.$root.$emit('appendCache', this.cmdType.value, this.currentSelect.code, { done: this.sure? 'two': 'one'});
|
this.$root.$emit('appendCache', this.cmdType.value, this.currentSelect.code, { done: this.sure ? 'two' : 'one'});
|
||||||
} else {
|
} else {
|
||||||
this.$root.$emit('removeCache', this.cmdType.value, this.currentSelect.code);
|
this.$root.$emit('removeCache', this.cmdType.value, this.currentSelect.code);
|
||||||
}
|
}
|
||||||
this.$emit('updateDone')
|
this.$emit('updateDone');
|
||||||
this.$store.dispatch('map/flushMapRef');
|
this.$store.dispatch('map/flushMapRef');
|
||||||
isClose && this.doClose();
|
isClose && this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
isClose && this.isClose();
|
isClose && this.isClose();
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox('两次选择不一致');
|
this.$messageBox('两次选择不一致');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleChangeLine(val) {
|
handleChangeLine(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
this.$emit('updateDone')
|
this.$emit('updateDone');
|
||||||
if (this.changeIgnore) { return; }
|
if (this.changeIgnore) { return; }
|
||||||
|
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
|
||||||
this.changeIgnore = false;
|
this.changeIgnore = false;
|
||||||
this.$emit('updateDone')
|
this.$emit('updateDone');
|
||||||
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
|
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.sure || this.$emit('initSelect', this.currentSelect);
|
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getProcess(code) {
|
getProcess(code) {
|
||||||
const cacheMap = this.getCacheMap();
|
const cacheMap = this.getCacheMap();
|
||||||
const cache = cacheMap[code];
|
const cache = cacheMap[code];
|
||||||
if (cache) {
|
if (cache) {
|
||||||
if (this.sure) {
|
if (this.sure) {
|
||||||
return cache.done == 'two' ? '确认转换锁闭取消完成' : '等待确认/取消';
|
return cache.done == 'two' ? '确认转换锁闭取消完成' : '等待确认/取消';
|
||||||
} else {
|
} else {
|
||||||
return cache.done == 'one' ? '已初始化' : ''
|
return cache.done == 'one' ? '已初始化' : '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
getStationPIM(code) {
|
getStationPIM(code) {
|
||||||
return '16-NSW';
|
return '16-NSW';
|
||||||
@ -245,10 +245,10 @@ export default {
|
|||||||
getSectionMode(code) {
|
getSectionMode(code) {
|
||||||
return '后备';
|
return '后备';
|
||||||
},
|
},
|
||||||
getSectionLock(code) {
|
getSectionLock(code) {
|
||||||
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
return elem.blockade ? '关闭' : '打开';
|
return elem.blockade ? '关闭' : '打开';
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: OperationEvent.Command.common.close.operation
|
operation: OperationEvent.Command.common.close.operation
|
||||||
|
@ -171,7 +171,7 @@ export default {
|
|||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
const step = {
|
const step = {
|
||||||
code: `${val.code}`,
|
// code: `${val.code}`,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code,
|
val: val.code,
|
||||||
param: {
|
param: {
|
||||||
|
@ -278,7 +278,7 @@ export default {
|
|||||||
if (this.changeIgnore) { return; }
|
if (this.changeIgnore) { return; }
|
||||||
|
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
@ -238,7 +238,7 @@ export default {
|
|||||||
if (this.changeIgnore) { return; }
|
if (this.changeIgnore) { return; }
|
||||||
|
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
@ -237,7 +237,7 @@ export default {
|
|||||||
if (this.changeIgnore) { return; }
|
if (this.changeIgnore) { return; }
|
||||||
|
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
@ -222,7 +222,7 @@ export default {
|
|||||||
if (this.changeIgnore) { return; }
|
if (this.changeIgnore) { return; }
|
||||||
|
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
@ -227,7 +227,7 @@ export default {
|
|||||||
if (this.changeIgnore) { return; }
|
if (this.changeIgnore) { return; }
|
||||||
|
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<el-table-column v-if="!isCbtc" prop="status" label="后备模式进程" />
|
<el-table-column v-if="!isCbtc" prop="status" label="后备模式进程" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5" :offset="1" v-if="sure">
|
<el-col v-if="sure" :span="5" :offset="1">
|
||||||
<div class="set-status-title">命令</div>
|
<div class="set-status-title">命令</div>
|
||||||
<div class="set-status-box">
|
<div class="set-status-box">
|
||||||
<el-radio v-model="command" :label="true">确认</el-radio>
|
<el-radio v-model="command" :label="true">确认</el-radio>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
<el-button :id="domIdConfirm" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
<el-button :id="domIdConfirm" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdConfirm" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(false)">应用(A)</el-button>
|
<el-button :id="domIdConfirm" type="primary" :disabled="!!disabled" :loading="loading" @click="commit(false)">应用(A)</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4" :offset="2">
|
<el-col :span="4" :offset="2">
|
||||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
||||||
@ -52,40 +52,40 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
|
||||||
initCacheMap: {
|
|
||||||
type: Object,
|
|
||||||
default() {
|
|
||||||
return {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
initInfo: {
|
|
||||||
type: Object,
|
|
||||||
default() {
|
|
||||||
return {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
updateDone: {
|
|
||||||
type: Number,
|
|
||||||
default: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
initCacheMap: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initInfo: {
|
||||||
|
type: Object,
|
||||||
|
default() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
updateDone: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
status: false,
|
status: false,
|
||||||
command: true,
|
command: true,
|
||||||
allChecked: false,
|
allChecked: false,
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
operate: {},
|
operate: {},
|
||||||
sure: false,
|
sure: false,
|
||||||
currentSelect: null,
|
currentSelect: null,
|
||||||
noInit: true,
|
noInit: true,
|
||||||
changeIgnore: false
|
changeIgnore: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -95,21 +95,21 @@ export default {
|
|||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
tempList() {
|
tempList() {
|
||||||
return this.signalList;
|
return this.signalList;
|
||||||
},
|
},
|
||||||
initSelect() {
|
initSelect() {
|
||||||
return this.initInfo.initSelect||{};
|
return this.initInfo.initSelect || {};
|
||||||
},
|
},
|
||||||
isCbtc() {
|
isCbtc() {
|
||||||
return true //this.operate.operation.includes(OperationEvent.Command.mBar.cbtcMode.operation);
|
return true; // this.operate.operation.includes(OperationEvent.Command.mBar.cbtcMode.operation);
|
||||||
|
},
|
||||||
|
cmdType() {
|
||||||
|
return this.isCbtc ? CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING : CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING;
|
||||||
|
},
|
||||||
|
disabled() {
|
||||||
|
return !this.currentSelect || this.noInit;
|
||||||
},
|
},
|
||||||
cmdType() {
|
|
||||||
return this.isCbtc ? CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING : CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING;
|
|
||||||
},
|
|
||||||
disabled() {
|
|
||||||
return !this.currentSelect || this.noInit;
|
|
||||||
},
|
|
||||||
domIdChoose() {
|
domIdChoose() {
|
||||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
||||||
},
|
},
|
||||||
@ -129,97 +129,97 @@ export default {
|
|||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateDone() {
|
updateDone() {
|
||||||
if (this.currentSelect) {
|
if (this.currentSelect) {
|
||||||
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code]||{}).done != 'one';
|
this.noInit = this.sure && (this.getCacheMap()[this.currentSelect.code] || {}).done != 'one';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCacheMap() {
|
getCacheMap() {
|
||||||
return this.initCacheMap[this.cmdType.value]||{};
|
return this.initCacheMap[this.cmdType.value] || {};
|
||||||
},
|
},
|
||||||
doShow(operate, sure) {
|
doShow(operate, sure) {
|
||||||
this.operate = operate;
|
this.operate = operate;
|
||||||
this.sure = sure;
|
this.sure = sure;
|
||||||
|
|
||||||
if (sure) {
|
if (sure) {
|
||||||
this.title = `${this.isCbtc ? '确认/取消CBTC模式' : '确认/取消后备模式'}`;
|
this.title = `${this.isCbtc ? '确认/取消CBTC模式' : '确认/取消后备模式'}`;
|
||||||
} else {
|
} else {
|
||||||
this.title = `${this.isCbtc ? '初始化CBTC模式' : '初始化后备模式'}`;
|
this.title = `${this.isCbtc ? '初始化CBTC模式' : '初始化后备模式'}`;
|
||||||
this.command = true;
|
this.command = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](this.initSelect.code);
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.changeIgnore = sure;
|
this.changeIgnore = sure;
|
||||||
this.$refs.table.setCurrentRow(sure? this.tempList.find(el => el.code == this.initSelect.code): null);
|
this.$refs.table.setCurrentRow(sure ? this.tempList.find(el => el.code == this.initSelect.code) : null);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.sure && (this.currentSelect = null);
|
this.sure && (this.currentSelect = null);
|
||||||
this.sure && this.$refs.table.setCurrentRow();
|
this.sure && this.$refs.table.setCurrentRow();
|
||||||
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
this.sure && this.$root.$emit('iniCacheMap', this.cmdType.value,
|
||||||
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
Object.fromEntries(Object.entries(this.getCacheMap()).filter(el => el[1].done == 'done'))
|
||||||
)
|
);
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
this.currentSelect = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||||
this.$emit('updateDone')
|
this.$emit('updateDone');
|
||||||
if (this.changeIgnore) { return; }
|
if (this.changeIgnore) { return; }
|
||||||
|
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
|
||||||
this.changeIgnore = false;
|
this.changeIgnore = false;
|
||||||
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
|
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.sure || this.$emit('initSelect', this.currentSelect);
|
this.sure || this.$emit('initSelect', this.currentSelect);
|
||||||
}
|
}
|
||||||
}).catch(_ => {
|
}).catch(_ => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
commit(isClose = false) {
|
commit(isClose = false) {
|
||||||
if (this.currentSelect &&
|
if (this.currentSelect &&
|
||||||
this.currentSelect.code == this.initSelect.code) {
|
this.currentSelect.code == this.initSelect.code) {
|
||||||
const cacheMap= this.getCacheMap();
|
const cacheMap = this.getCacheMap();
|
||||||
const isOK = this.command&&(!this.sure || this.sure&&cacheMap[this.currentSelect.code])
|
const isOK = this.command && (!this.sure || this.sure && cacheMap[this.currentSelect.code]);
|
||||||
const step = {
|
const step = {
|
||||||
cmdType: this.sure&&isOK? this.cmdType: null,
|
cmdType: this.sure && isOK ? this.cmdType : null,
|
||||||
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
||||||
over: this.sure,
|
over: this.sure,
|
||||||
param: { signalCode: this.currentSelect.code }
|
param: { signalCode: this.currentSelect.code }
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
|
this.$store.dispatch('trainingNew/next', step).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (isOK) {
|
if (isOK) {
|
||||||
this.$root.$emit('appendCache', this.cmdType.value, this.currentSelect.code, { done: this.sure? 'two': 'one'});
|
this.$root.$emit('appendCache', this.cmdType.value, this.currentSelect.code, { done: this.sure ? 'two' : 'one'});
|
||||||
} else {
|
} else {
|
||||||
this.$root.$emit('removeCache', this.cmdType.value, this.currentSelect.code);
|
this.$root.$emit('removeCache', this.cmdType.value, this.currentSelect.code);
|
||||||
}
|
}
|
||||||
this.$store.dispatch('map/flushMapRef');
|
this.$store.dispatch('map/flushMapRef');
|
||||||
isClose && this.doClose();
|
isClose && this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
isClose && this.doClose();
|
isClose && this.doClose();
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox('两次选择不一致');
|
this.$messageBox('两次选择不一致');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
|
@ -122,7 +122,7 @@ export default {
|
|||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
@ -176,7 +176,7 @@ export default {
|
|||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
@ -193,7 +193,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
@ -204,7 +204,7 @@ export default {
|
|||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
@ -214,7 +214,7 @@ export default {
|
|||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
@ -155,7 +155,7 @@ export default {
|
|||||||
handleCurrentChange(val) {
|
handleCurrentChange(val) {
|
||||||
if (!val) { return; }
|
if (!val) { return; }
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
@ -240,7 +240,7 @@ export default {
|
|||||||
if (this.changeIgnore) { return; }
|
if (this.changeIgnore) { return; }
|
||||||
|
|
||||||
const step = {
|
const step = {
|
||||||
code: val.code,
|
// code: val.code,
|
||||||
operation: OperationEvent.Command.common.choose.operation,
|
operation: OperationEvent.Command.common.choose.operation,
|
||||||
val: val.code
|
val: val.code
|
||||||
};
|
};
|
||||||
|
@ -674,6 +674,54 @@ export const OperationEvent = {
|
|||||||
operation: '00b',
|
operation: '00b',
|
||||||
domId: ''
|
domId: ''
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 宁波一
|
||||||
|
commandNingBo1: {
|
||||||
|
// 区域选择
|
||||||
|
areaSelection: {
|
||||||
|
operation: '00c',
|
||||||
|
domId: '_Tips-ningBo1-areaSelection'
|
||||||
|
},
|
||||||
|
// 全部申请
|
||||||
|
applyAll: {
|
||||||
|
operation: '00c1',
|
||||||
|
domId: '_Tips-ningBo1-areaSelection-applyAll'
|
||||||
|
},
|
||||||
|
// 取消全部申请
|
||||||
|
cancelApplyAll: {
|
||||||
|
operation: '00c2',
|
||||||
|
domId: '_Tips-ningBo1-areaSelection-cancelApplyAll'
|
||||||
|
},
|
||||||
|
// 全部释放
|
||||||
|
releaseAll: {
|
||||||
|
operation: '00c3',
|
||||||
|
domId: '_Tips-ningBo1-areaSelection-releaseAll'
|
||||||
|
},
|
||||||
|
// 取消全部释放
|
||||||
|
cancelReleaseAll: {
|
||||||
|
operation: '00c4',
|
||||||
|
domId: '_Tips-ningBo1-areaSelection-cancelReleaseAll'
|
||||||
|
},
|
||||||
|
// 全部强制分配
|
||||||
|
distributionAll: {
|
||||||
|
operation: '00c5',
|
||||||
|
domId: '_Tips-ningBo1-areaSelection-distributionAll'
|
||||||
|
},
|
||||||
|
// 取消全部强制分配
|
||||||
|
cancelDistributionAll: {
|
||||||
|
operation: '00c6',
|
||||||
|
domId: '_Tips-ningBo1-areaSelection-cancelDistributionAll'
|
||||||
|
},
|
||||||
|
// 应用
|
||||||
|
commit: {
|
||||||
|
operation: '00c7',
|
||||||
|
domId: '_Tips-ningBo1-areaSelection-commit'
|
||||||
|
},
|
||||||
|
// 退出
|
||||||
|
doClose: {
|
||||||
|
operation: '00c8',
|
||||||
|
domId: '_Tips-ningBo1-areaSelection-doClose'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 站台概要表
|
// 站台概要表
|
||||||
@ -2966,7 +3014,7 @@ export const OperationEvent = {
|
|||||||
// 区域选择 申请控制权
|
// 区域选择 申请控制权
|
||||||
areaSelection: {
|
areaSelection: {
|
||||||
menu: {
|
menu: {
|
||||||
operation: '616',
|
c: '616',
|
||||||
domId: '_Tips-Station-areaSelection-Menu'
|
domId: '_Tips-Station-areaSelection-Menu'
|
||||||
},
|
},
|
||||||
mbar: {
|
mbar: {
|
||||||
|
Loading…
Reference in New Issue
Block a user