删除宁波3 无用文件
This commit is contained in:
parent
1a1745d49c
commit
8481e2d927
@ -1,306 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1000px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-table :id="domIdChoose" ref="table1" :data="tempData" highlight-current-row height="300px" @current-change="handleChangeLine">
|
||||
<el-table-column prop="name" width="100" label="轨道" />
|
||||
<el-table-column prop="blockStatus" width="120" label="MAU">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getStationName(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="blockProcess" width="80" label="临时限速">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getLimitSpeed(scope.row.code) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unblockProcess" label="PM临时限速" width="110">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getIsLimit(scope.row.code) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="blockProcess" label="设置临时限速进程" width="140">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getProcess(scope.row.code) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unblockProcess" label="用户里程起点" width="110" />
|
||||
<el-table-column prop="unblockProcess" label="用户里程终点" width="110" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-table :id="domIdChoose1" ref="table2" :data="limitList" highlight-current-row height="300px" @current-change="handleChangeLine2">
|
||||
<el-table-column prop="name" label="速度" />
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || speedLimitValue<0" @click="commit">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdApply" type="primary" :disabled="!selected || speedLimitValue<0" :loading="loading" @click="apply">应用(A)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>帮助(H)</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
<section-limit-speed ref="sectionLimitSpeed" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SectionLimitSpeed from './sectionLimitSpeed';
|
||||
|
||||
export default {
|
||||
name: 'SwitchActive',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
SectionLimitSpeed
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
status: false,
|
||||
standStatus: true,
|
||||
allChecked: false,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
active: false,
|
||||
activeName: 'first',
|
||||
tempData: [],
|
||||
radio: '1',
|
||||
limitList: [
|
||||
{ name: '5', value: 5 },
|
||||
{ name: '10', value: 10 },
|
||||
{ name: '15', value: 15 },
|
||||
{ name: '20', value: 20 },
|
||||
{ name: '25', value: 25 },
|
||||
{ name: '30', value: 30 },
|
||||
{ name: '35', value: 35 },
|
||||
{ name: '40', value: 40 },
|
||||
{ name: '45', value: 45 },
|
||||
{ name: '50', value: 50 },
|
||||
{ name: '55', value: 55 },
|
||||
{ name: '60', value: 60 },
|
||||
{ name: '65', value: 65 },
|
||||
{ name: '70', value: 70 },
|
||||
{ name: '75', value: 75 },
|
||||
{ name: '80', value: 80 }
|
||||
],
|
||||
initEle: null,
|
||||
commandEleCode:null,
|
||||
speedLimitValue: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
selected() {
|
||||
return this.$store.state.menuOperation.selected;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
||||
},
|
||||
domIdChoose1() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.choose1.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.confirm.domId : '';
|
||||
},
|
||||
domIdApply() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.apply.domId : '';
|
||||
},
|
||||
domIdClose() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.close.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '初始化设置临时限速区域';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.tempData = [];
|
||||
this.operate = operate;
|
||||
this.sectionList.forEach(item => {
|
||||
if (item.type === '01' || item.type === '04') {
|
||||
this.tempData.push(item);
|
||||
}
|
||||
});
|
||||
this.initEle = null;
|
||||
this.commandEleCode = null;
|
||||
this.speedLimitValue = 0;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$refs.table1.setCurrentRow(null);
|
||||
this.$refs.table2.setCurrentRow(null);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$refs.table1.setCurrentRow();
|
||||
this.$refs.table2.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
handleChangeLine(val) {
|
||||
if (!val) { return; }
|
||||
this.initEle = null;
|
||||
this.commandEleCode = null;
|
||||
const step = {
|
||||
code: val.code,
|
||||
operation: OperationEvent.Command.common.choose.operation,
|
||||
val: val.code
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: val});
|
||||
// const elem = this.$store.getters['map/getDeviceByCode'](val.code);
|
||||
// this.speedLimitValue = elem.speedUpLimit;
|
||||
// if (this.speedLimitValue > 0) {
|
||||
// this.$refs.table2.setCurrentRow(this.limitList[this.speedLimitValue / 5 - 1]);
|
||||
// } else {
|
||||
// this.$refs.table2.setCurrentRow();
|
||||
// }
|
||||
this.$refs.table2.setCurrentRow()
|
||||
this.speedLimitValue = 0;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleChangeLine2(val) {
|
||||
if (!val) { return; }
|
||||
this.initEle = null;
|
||||
this.commandEleCode = null;
|
||||
|
||||
const step = {
|
||||
operation: OperationEvent.Command.common.choose1.operation,
|
||||
val: val.value,
|
||||
param: {speedLimitValue: val.value}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.speedLimitValue = val.value;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
getStationName(val) {
|
||||
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
|
||||
return stationElm.name;
|
||||
},
|
||||
getIsLimit(code) {
|
||||
if (this.commandEleCode === code) {
|
||||
return this.speedLimitValue > 0 ? '开启' : '关闭';
|
||||
}
|
||||
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return elem.speedUpLimit > 0 ? '开启' : '关闭';
|
||||
},
|
||||
getLimitSpeed(code) {
|
||||
if (this.commandEleCode === code) {
|
||||
return this.speedLimitValue > 0 ? this.speedLimitValue : 0;
|
||||
}
|
||||
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return elem.speedUpLimit > 0 ? elem.speedUpLimit : 0;
|
||||
},
|
||||
getProcess(code) {
|
||||
if (this.commandEleCode && this.commandEleCode === code) {
|
||||
return '完成';
|
||||
} else if (this.initEle && this.initEle.code === code) {
|
||||
return '已初始化';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
commit(isClose = true) {
|
||||
const step = {
|
||||
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
||||
param: { sectionCode: this.selected.code }
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionLimitSpeed.doShow(step, this.selected, this.speedLimitValue);
|
||||
this.initEle = this.selected;
|
||||
isClose && this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
apply() {
|
||||
this.commit(false);
|
||||
},
|
||||
commandSuccess(code, val) {
|
||||
this.commandEleCode = code;
|
||||
if (!val) {
|
||||
this.speedLimitValue = 0;
|
||||
this.$refs.table2.setCurrentRow();
|
||||
}
|
||||
},
|
||||
cancelCommand() {
|
||||
this.initEle = null;
|
||||
},
|
||||
handleClick() {
|
||||
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.common.close.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.menu-li {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: left;
|
||||
list-style:none;
|
||||
padding-left: 5px;
|
||||
border-right: 2px solid #696969;
|
||||
color: #000;
|
||||
}
|
||||
/deep/ {
|
||||
.el-radio {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
.el-cascader-node>.el-radio, .el-radio:last-child{
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,233 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row>
|
||||
<el-table :id="domIdChoose" ref="table" :data="tempData" highlight-current-row height="300px" @current-change="handleChangeLine">
|
||||
<el-table-column prop="name" label="轨道" />
|
||||
<el-table-column prop="blockStatus" label="MAU">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getStationName(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="blockProcess" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getSectionStatus(scope.row.code) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unblockProcess" :label="isBlock?'关闭进程':'打开进程'">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getProcess(scope.row.code) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected" @click="commit">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdApply" type="primary" :loading="loading" :disabled="!selected" @click="apply">应用(A)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>帮助(H)</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
<section-open ref="sectionOpen" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SectionOpen from './sectionOpen';
|
||||
|
||||
export default {
|
||||
name: 'SwitchActive',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
SectionOpen
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
status: false,
|
||||
operate: {},
|
||||
standStatus: true,
|
||||
allChecked: false,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
active: false,
|
||||
selectShow: false,
|
||||
activeName: 'first',
|
||||
tempData: [],
|
||||
radio: '1',
|
||||
initEle: null,
|
||||
commandEleCode: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList'
|
||||
]),
|
||||
isBlock() {
|
||||
return !!this.operate && this.operate.operation === OperationEvent.Command.commandNingBo3.line_section_close.operation;
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
selected() {
|
||||
return this.$store.state.menuOperation.selected;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.confirm.domId : '';
|
||||
},
|
||||
domIdApply() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.apply.domId : '';
|
||||
},
|
||||
domIdClose() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.close.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.isBlock ? '初始化关闭轨道' : '初始化开放轨道';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.tempData = [];
|
||||
this.sectionList.forEach(item => {
|
||||
if (item.type === '01' || item.type === '04') {
|
||||
this.tempData.push(item);
|
||||
}
|
||||
});
|
||||
this.initEle = null;
|
||||
this.commandEleCode = null;
|
||||
this.operate = operate;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
apply() {
|
||||
this.commit(false);
|
||||
},
|
||||
handleChangeLine(val) {
|
||||
if (!val) { return; }
|
||||
this.initEle = null;
|
||||
this.commandEleCode = null;
|
||||
const step = {
|
||||
code: val.code,
|
||||
operation: OperationEvent.Command.common.choose.operation,
|
||||
val: val.code
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: val});
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
getProcess(code) {
|
||||
if (this.commandEleCode && this.commandEleCode === code) {
|
||||
return this.isBlock ? '已完成关闭' : '已完成打开';
|
||||
} else if (this.initEle && this.initEle.code === code) {
|
||||
return '已初始化';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
getStationName(val) {
|
||||
const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode);
|
||||
return stationElm.name;
|
||||
},
|
||||
getSectionStatus(code) {
|
||||
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (this.commandEleCode && this.commandEleCode === code && this.isBlock) {
|
||||
return '关闭双向:所有列车';
|
||||
} else if (this.commandEleCode && this.commandEleCode === code && !this.isBlock) {
|
||||
return '打开';
|
||||
}
|
||||
return elem.blockade ? '关闭双向:所有列车' : '打开';
|
||||
},
|
||||
commit(isClose = true) {
|
||||
const step = {
|
||||
isBlock: this.isBlock,
|
||||
operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation,
|
||||
param: { sectionCode: this.selected.code }
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionOpen.doShow(step, this.selected);
|
||||
this.initEle = this.selected;
|
||||
isClose && this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
commandSuccess(code) {
|
||||
this.commandEleCode = code;
|
||||
},
|
||||
cancelCommand() {
|
||||
this.initEle = null;
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.common.close.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.menu-li {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: left;
|
||||
list-style:none;
|
||||
padding-left: 5px;
|
||||
border-right: 2px solid #696969;
|
||||
color: #000;
|
||||
}
|
||||
/deep/ {
|
||||
.el-radio {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
.el-cascader-node>.el-radio, .el-radio:last-child{
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -1,233 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row>
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="filterSignalList"
|
||||
highlight-current-row
|
||||
height="350px"
|
||||
:id="domIdChoose"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column prop="name" label="信号机" />
|
||||
<el-table-column prop="status" label="信号机封锁状态">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getSignalStatus(scope.row.code) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="blockProcess" label="设置封锁进程">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getProcess(scope.row.code, 'lock') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unblockProcess" label="解除封锁进程">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getProcess(scope.row.code, 'unlock') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(true)">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdApply" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(false)">应用(A)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>帮助(H)</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
<signal-block ref="signalBlock" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SignalBlock from './signalBlock';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'InitSignalBlock',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
SignalBlock
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
status: false,
|
||||
signalModel: true,
|
||||
allChecked: false,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
initEle: null,
|
||||
commandEleCode: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList'
|
||||
]),
|
||||
filterSignalList() {
|
||||
return this.signalList.map(el => {
|
||||
return this.$store.getters['map/getDeviceByCode'](el.code);
|
||||
})
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
selected() {
|
||||
return this.$store.state.menuOperation.selected;
|
||||
},
|
||||
isBlock() {
|
||||
return this.operate && this.operate.operation === OperationEvent.Command.commandNingBo3.line_signal_unblock.operation;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.choose.domId : ''
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.confirm.domId : '';
|
||||
},
|
||||
domIdClose() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.close.domId : '';
|
||||
},
|
||||
domIdApply() {
|
||||
return this.dialogShow ? OperationEvent.Command.common.apply.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.operate && this.operation === OperationEvent.Signal.lock.menu.operation ? '初始化信号机封锁' : '初始化信号机解除封锁';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.initEle = null;
|
||||
this.commandEleCode = null;
|
||||
this.operate = operate;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit(isClose = false) {
|
||||
const step = {
|
||||
operation: isClose ? OperationEvent.Command.common.confirm.operation: OperationEvent.Command.common.apply.operation,
|
||||
needBlock: !this.isBlock,
|
||||
param: { signalCode: this.selected.code }
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.signalBlock.doShow(step, this.selected);
|
||||
this.initEle = this.selected;
|
||||
isClose && this.isClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
if (!val) { return; }
|
||||
this.initEle = null;
|
||||
this.commandEleCode = null;
|
||||
const step = {
|
||||
code: val.code,
|
||||
operation: OperationEvent.Command.common.choose.operation,
|
||||
val: val.code
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: val});
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
getSignalStatus(code) {
|
||||
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (elem.blockade) {
|
||||
return '锁闭的';
|
||||
} else {
|
||||
return '未设锁闭';
|
||||
}
|
||||
},
|
||||
commandSuccess(code) {
|
||||
this.commandEleCode = code;
|
||||
},
|
||||
cancelCommand() {
|
||||
this.initEle = null;
|
||||
},
|
||||
getProcess(code, type) {
|
||||
if (this.commandEleCode && this.commandEleCode === code && ((type === 'lock' && this.isBlock) || (type === 'unlock' && !this.isBlock))) {
|
||||
return this.isBlock ? '已完成解封' : '已完成封锁';
|
||||
} else if (this.initEle && this.initEle.code === code && ((type === 'lock' && this.isBlock) || (type === 'unlock' && !this.isBlock))) {
|
||||
return '已初始化';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.common.close.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.menu-li {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: left;
|
||||
list-style:none;
|
||||
padding-left: 5px;
|
||||
border-right: 2px solid #696969;
|
||||
color: #000;
|
||||
}
|
||||
.set-status-box {
|
||||
position: relative;
|
||||
top: 100px;
|
||||
border: 1px solid #AFAFAF;
|
||||
padding-left: 10px;
|
||||
padding-top: 8px;
|
||||
}
|
||||
.set-status-title{
|
||||
position: relative;
|
||||
top: 108px;
|
||||
background: #F0F0F0;
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
z-index: 22;
|
||||
left: 10px;
|
||||
}
|
||||
</style>
|
@ -1,145 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="600px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row>
|
||||
<el-table ref="table" :data="signalList" height="300px">
|
||||
<el-table-column prop="code" label="ID" />
|
||||
<el-table-column prop="mode" label="信号模式" />
|
||||
<el-table-column v-if="isCbtc" prop="status" label="CBTC可命令" />
|
||||
<el-table-column v-if="isCbtc" prop="status" label="CBTC模式进程" />
|
||||
<el-table-column v-if="!isCbtc" prop="status" label="后备模式可命令" />
|
||||
<el-table-column v-if="!isCbtc" prop="status" label="后备模式进程" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit(true)">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :loading="loading" @click="commit(false)">应用(A)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>帮助(H)</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__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 { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'InitCbtcMode',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
status: false,
|
||||
signalModel: true,
|
||||
allChecked: false,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
selected() {
|
||||
return this.$store.state.menuOperation.selected;
|
||||
},
|
||||
isCbtc() {
|
||||
return this.operate.operation === OperationEvent.Command.mBar.cbtcMode.operation;
|
||||
},
|
||||
domIdClose() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.isCbtc ? '初始化CBTC' : '初始化后备模式';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit(isClose = false) {
|
||||
|
||||
},
|
||||
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 rel="stylesheet/scss" lang="scss" scoped>
|
||||
.menu-li {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: left;
|
||||
list-style:none;
|
||||
padding-left: 5px;
|
||||
border-right: 2px solid #696969;
|
||||
color: #000;
|
||||
}
|
||||
.set-status-box {
|
||||
position: relative;
|
||||
top: 100px;
|
||||
border: 1px solid #AFAFAF;
|
||||
padding-left: 10px;
|
||||
padding-top: 8px;
|
||||
}
|
||||
.set-status-title{
|
||||
position: relative;
|
||||
top: 108px;
|
||||
background: #F0F0F0;
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
z-index: 22;
|
||||
left: 10px;
|
||||
}
|
||||
</style>
|
@ -1,225 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="700px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row>
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="switchList"
|
||||
highlight-current-row
|
||||
height="350px"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column prop="name" label="道岔" />
|
||||
<el-table-column prop="blockStatus" label="道岔封锁状态">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getSwitchStatus(scope.row.code) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="blockProcess" label="设置封锁进程">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getProcess(scope.row.code, 'block') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unblockProcess" label="解除封锁进程">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getProcess(scope.row.code, 'unblock') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(true)">确定(O)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!selected || !!initEle" @click="commit(false)">应用(A)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button :id="domIdClose" @click="cancel">关闭(C)</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="2">
|
||||
<el-button>帮助(H)</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
<switch-block ref="switchBlock" @commandSuccess="commandSuccess" @cancelCommand="cancelCommand" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SwitchBlock from './switchBlock';
|
||||
|
||||
export default {
|
||||
name: 'StandDetain',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
SwitchBlock
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
status: false,
|
||||
standStatus: true,
|
||||
allChecked: false,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
mode: '',
|
||||
position: '',
|
||||
reserved: '',
|
||||
operate: '',
|
||||
initEle: null,
|
||||
commandEleCode: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'switchList'
|
||||
]),
|
||||
isBlock() {
|
||||
return this.operate && this.operate.operation === OperationEvent.Switch.block.button.operation;
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
selected() {
|
||||
return this.$store.state.menuOperation.selected;
|
||||
},
|
||||
domIdClose() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return this.isBlock ? '初始化道岔封锁' : '初始化道岔解除封锁';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.initEle = null;
|
||||
this.commandEleCode = null;
|
||||
this.operate = operate;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit(isClose = false) {
|
||||
const step = {
|
||||
code: `${this.selected.code}`,
|
||||
operation: this.isBlock ? OperationEvent.Switch.block.confirm.operation : OperationEvent.Switch.unblock.confirm.operation,
|
||||
param: {}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.switchBlock.doShow(step, this.selected);
|
||||
this.initEle = this.selected;
|
||||
isClose && this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
isClose && this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
if (!val) { return; }
|
||||
this.initEle = null;
|
||||
this.commandEleCode = null;
|
||||
const step = {
|
||||
code: val.code,
|
||||
operation: this.isBlock ? OperationEvent.Switch.block.choose.operation : OperationEvent.Switch.unblock.choose.operation,
|
||||
param: {}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: val});
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
getSwitchStatus(code) {
|
||||
const elem = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (this.commandEleCode === code) {
|
||||
return this.isBlock ? '锁闭的' : '未锁闭的';
|
||||
}
|
||||
if (elem.blockade) {
|
||||
return '锁闭的';
|
||||
} else {
|
||||
return '未锁闭的';
|
||||
}
|
||||
},
|
||||
getProcess(code, type) {
|
||||
if (this.commandEleCode && this.commandEleCode === code && ((type === 'block' && this.isBlock) || (type === 'unblock' && !this.isBlock))) {
|
||||
return this.isBlock ? '已完成封锁' : '已完成解封';
|
||||
} else if (this.initEle && this.initEle.code === code && ((type === 'block' && this.isBlock) || (type === 'unblock' && !this.isBlock))) {
|
||||
return '已初始化';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
commandSuccess(code) {
|
||||
this.commandEleCode = code;
|
||||
this.$refs.table.setCurrentRow();
|
||||
},
|
||||
cancelCommand() {
|
||||
this.initEle = null;
|
||||
},
|
||||
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 rel="stylesheet/scss" lang="scss" scoped>
|
||||
.menu-li {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: left;
|
||||
list-style:none;
|
||||
padding-left: 5px;
|
||||
border-right: 2px solid #696969;
|
||||
color: #000;
|
||||
}
|
||||
/deep/ {
|
||||
.el-radio {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
.el-cascader-node>.el-radio, .el-radio:last-child{
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user