成都三调整

This commit is contained in:
joylink_fanyuhong 2020-02-11 18:26:45 +08:00
parent b529b0ad94
commit 97320cc8ca
5 changed files with 211 additions and 127 deletions

View File

@ -216,15 +216,15 @@ export default {
//
lock() {
const operate = {
operation: OperationEvent.Signal.lock.menu.operation,
operateNext: OperationEvent.Signal.lock.confirm.operation
over: true,
operation: OperationEvent.Signal.lock.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
this.$refs.password.doShow(operate);
this.doClose();
}
}).catch(() => {
});

View File

@ -31,28 +31,35 @@
highlight-current-row
:height="140"
>
<el-table-column type="index" label="Id" width="40" />
<el-table-column label="描述" width="140">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column label="方向" width="60">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column label="完整性">
<template slot-scope="scope">
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="控制">
<template slot-scope="scope">
<span v-if="scope.row.controlType == '01'">自动</span>
<span v-else>人工</span>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}" style="width: 120px">
{{ handleRouteName(scope.row.name) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleDirection(scope.row.startSignalCode) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.turnBack ? '折返': '直通' }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.controlType ? controlTypeMap[scope.row.controlType] : '自动' }}
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group">
@ -86,7 +93,11 @@ export default {
selected: null,
tempData: [],
stationName: '',
signalName: ''
signalName: '',
controlTypeMap: {
'01': '自动',
'02': '人工'
}
};
},
computed: {
@ -133,6 +144,19 @@ export default {
this.$store.dispatch('training/emitTipFresh');
});
},
handleRouteName(name) {
return name.replace(/-/, '-->');
},
handleDirection(signalCode) {
let signalDirection = '';
this.signalList.some(item => {
if (item.code === signalCode) {
signalDirection = item.right;
return true;
}
});
return '';
},
doClose() {
this.loading = false;
this.dialogShow = false;

View File

@ -23,13 +23,34 @@
<div class="route-table-box">
<span class="route-table-tip">进路列表</span>
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini" height="90" highlight-current-row @row-click="clickEvent">
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px" />
<el-table-column :id="domIdChoose" prop="controlType" label="进路属性" style="margin-left:30px">
<template slot-scope="scope">{{ controlTypeNameMap[scope.row.controlType] }} </template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="进路描述" style="margin-left:30px">
<template></template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}" style="width: 120px">
{{ handleRouteName(scope.row.name) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleDirection(scope.row.startSignalCode) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.turnBack ? '折返': '直通' }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.controlType ? controlTypeMap[scope.row.controlType] : '自动' }}
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" style="margin-top: 40px">
@ -45,7 +66,7 @@
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
<password-box ref="passwordBox" @checkOver="passWordCommit" />
<!--<password-box ref="passwordBox" @checkOver="passWordCommit" />-->
</el-dialog>
</template>
@ -53,14 +74,15 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CancelMouseState from '@/mixin/CancelMouseState';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import PasswordBox from './childDialog/passwordInputBox.vue';
// import PasswordBox from './childDialog/passwordInputBox.vue';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
export default {
name: 'RouteSelection',
components: {
NoticeInfo,
PasswordBox
// PasswordBox
},
mixins: [
CancelMouseState
@ -83,7 +105,11 @@ export default {
'01': '折返',
'02': '直通'
},
row: ''
row: '',
controlTypeMap: {
'01': '自动',
'02': '人工'
}
};
},
computed: {
@ -108,7 +134,10 @@ export default {
disabled = !this.row.canSetting;
}
return disabled;
}
},
...mapGetters('map', [
'signalList'
])
},
mounted() {
this.$nextTick(() => {
@ -132,6 +161,19 @@ export default {
}
return name;
},
handleRouteName(name) {
return name.replace(/-/, '-->');
},
handleDirection(signalCode) {
let signalDirection = '';
this.signalList.some(item => {
if (item.code === signalCode) {
signalDirection = item.right;
return true;
}
});
return '';
},
doShow(operate, selected, tempData) {
this.selected = selected;
//
@ -154,27 +196,6 @@ export default {
this.$store.dispatch('training/emitTipFresh');
});
},
passWordCommit(data) {
const operate = {
over: true,
operation: data.operateNext,
cmdType: data.cmdType,
val: data.val,
param: data.param
};
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);
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
@ -200,8 +221,13 @@ export default {
commit() {
if (this.row && this.row.canSetting) {
const operate = {
operation: OperationEvent.Signal.guide.menu.operation,
operateNext: OperationEvent.Signal.guide.confirm.operation
over: true,
operation: OperationEvent.Signal.guide.confirm.operation,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
val: this.row.code,
param: {
routeCode: this.row.code
}
};
this.loading = true;
@ -209,12 +235,7 @@ export default {
this.loading = false;
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate.cmdType = CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
operate.val = this.row.code;
operate.param = {
Route_Code: this.row.code
};
this.$refs.passwordBox.doShow(operate);
this.doClose();
} else {
this.doClose();
this.$refs.noticeInfo.doShow(operate);

View File

@ -15,26 +15,34 @@
</el-row>
<div class="table">
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" :highlight-current-row="highlight" :height="140" @row-click="clickEvent">
<el-table-column :id="domIdChoose" prop="name" width="155" 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-column :id="domIdChoose" prop="name" label="方向" style="">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">111</span>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="name" label="属性" style="">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">1111</span>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="name" label="控制" style="">
<template slot-scope="scope">
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.controlType == '01' ? '自动' : '人工' }}</span>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}" style="width: 120px">
{{ handleRouteName(scope.row.name) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ handleDirection(scope.row.startSignalCode) }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.turnBack ? '折返': '直通' }}
</div>
</template>
</el-table-column>
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
<template slot-scope="scope">
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
{{ scope.row.controlType ? controlTypeMap[scope.row.controlType] : '自动' }}
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group">
@ -81,7 +89,11 @@ export default {
signalName: '',
allSelect: false,
highlight: true,
row: ''
row: '',
controlTypeMap: {
'01': '自动',
'02': '人工'
}
};
},
computed: {
@ -163,6 +175,19 @@ export default {
this.$store.dispatch('training/emitTipFresh');
});
},
handleRouteName(name) {
return name.replace(/-/, '-->');
},
handleDirection(signalCode) {
let signalDirection = '';
this.signalList.some(item => {
if (item.code === signalCode) {
signalDirection = item.right;
return true;
}
});
return '';
},
doClose() {
this.loading = false;
this.dialogShow = false;

View File

@ -7,7 +7,7 @@
<route-guide ref="routeGuide" />
<route-hand-control ref="routeHandControl" />
<notice-info ref="noticeInfo" />
<password-box ref="passwordBox" @checkOver="passWordCommit" />
<password-box ref="passwordBox" @checkOver="passWordCommit"/>
</div>
</template>
@ -80,6 +80,11 @@ export default {
label: '进路交自动控',
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
},
{
label: '进路信息',
handler: this.detail,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
}
],
Center: [
@ -129,9 +134,9 @@ export default {
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
},
{
label: '查询进路控制状态',
label: '进路信息',
handler: this.detail,
cmdType: ''
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
}
]
},
@ -314,7 +319,7 @@ export default {
routes.push(elem);
}
});
this.$refs.passwordBox.doShow({operation: step.operation, selected: this.selected, routesList: routes});
this.$refs.passwordBox.doShow({step: step, selected: this.selected, routesList: routes});
}
});
},
@ -348,8 +353,7 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
this.$refs.passwordBox.doShow({operation: step.operation, selected: this.selected});
// this.$refs.routeControl.doShow(step, this.selected);
this.$refs.passwordBox.doShow({step: step, selected: this.selected});
}
});
},
@ -420,30 +424,13 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.routeHandControl.doShow(step, this.selected, tempData);
});
}
});
},
//
atsAutoControl() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
param: {
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.routeHandControl.doShow(step, this.selected, tempData);
const routes = [];
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
this.$refs.routeHandControl.doShow(step, this.selected, routes);
}
});
},
@ -460,18 +447,45 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
const tempData = resp.data;
this.$refs.routeDetail.doShow(step, this.selected, tempData);
const routes = [];
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
this.$refs.routeDetail.doShow(step, this.selected, routes);
}
});
}
},
passWordCommit(data) {
console.log(data, '============');
if (data.operation === OperationEvent.Signal.guide.menu.operation) {
this.$refs.routeGuide.doShow(data.operation, data.selected, data.routesList);
},
//
atsAutoControl() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
param: {
signalCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
const routes = [];
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.selected.code) {
routes.push(elem);
}
});
this.$refs.routeHandControl.doShow(step, this.selected, routes);
}
});
},
passWordCommit(data) {
if (data.step.operation === OperationEvent.Signal.guide.menu.operation) {
this.$refs.routeGuide.doShow(data.step.operation, data.selected, data.routesList);
} else if (data.step.operation === OperationEvent.Signal.humanTrainRoute.menu.operation) {
this.$refs.routeControl.doShow(data.step, data.selected);
}
}
}
};