Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
# Conflicts: # src/jmapNew/theme/xian_02/menus/index.vue
This commit is contained in:
commit
9ea5cefdc0
@ -232,7 +232,7 @@ export default {
|
||||
position: fixed;
|
||||
padding: 5px 0px;
|
||||
border: 1px solid gray;
|
||||
z-index: 2;
|
||||
z-index: 9999;
|
||||
|
||||
.dsp-block {
|
||||
display: block;
|
||||
|
213
src/jmapNew/theme/xian_02/menus/dialog/stopProfile.vue
Normal file
213
src/jmapNew/theme/xian_02/menus/dialog/stopProfile.vue
Normal file
@ -0,0 +1,213 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="xian-02__system warning-confirm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
center
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="120px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="车站" prop="location">
|
||||
<el-input v-model="addModel.stationName" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="14">
|
||||
<el-form-item label="">
|
||||
<el-input v-model="addModel.direction" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<hr style="height:1px;border:none;border-top:1px solid #555555;width: 492px; position: absolute;left: 3px; margin-top: 0">
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="原停车曲线">
|
||||
<el-input v-model="addModel.oldStopProfileLabel" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="停车曲线">
|
||||
<el-radio-group v-model="addModel.stopProfile" size="small">
|
||||
<template v-for="item in stopProfileList">
|
||||
<el-radio :key="item.value" :label="item.value">{{ item.label }}</el-radio><br>
|
||||
</template>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10%">
|
||||
<el-form-item label-width="0" prop="notes">
|
||||
<el-input v-model="addModel.notes" type="textarea" :rows="3" />
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="20" :offset="2">
|
||||
<el-button :id="domIdConfirm" style="margin-right: 50px;" @click="commit">确定</el-button>
|
||||
<el-button :id="domIdCancel" style="margin-right: 50px;" @click="cancel">取消</el-button>
|
||||
<el-button>帮助</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'PlatformDwell',
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
addModel: {
|
||||
stationName: '',
|
||||
standCode: '',
|
||||
direction: '',
|
||||
oldStopProfile: '',
|
||||
oldStopProfileLabel: '',
|
||||
stopProfile: '',
|
||||
notes: ''
|
||||
},
|
||||
stopProfileList: [
|
||||
{label: '1 - 0.8 m/s/s Normal Braking Profile', value: '0.8'},
|
||||
{label: '2 - 0.76 m/s/s', value: '0.76'},
|
||||
{label: '3 - 0.72 m/s/s', value: '0.72'},
|
||||
{label: '4 - 0.68 m/s/s', value: '0.68'},
|
||||
{label: '5 - 0.64 m/s/s', value: '0.64'},
|
||||
{label: '6 - 0.60 m/s/s', value: '0.60'},
|
||||
{label: '7 - 0.56 m/s/s', value: '0.56'},
|
||||
{label: '8 - 0.52 m/s/s', value: '0.52'},
|
||||
{label: '9 - 0.48 m/s/s Min Braking Profile', value: '0.48'}
|
||||
],
|
||||
loading: false,
|
||||
rules: {},
|
||||
dialogShow: false,
|
||||
leftSelect: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList',
|
||||
'mapConfig'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose1.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '站停曲线';
|
||||
},
|
||||
speedList() {
|
||||
const list = [];
|
||||
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
|
||||
list.push(i * this.speedSpace);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectedLeftRow(index) {
|
||||
this.leftSelect = index;
|
||||
},
|
||||
updateData() {
|
||||
this.testData2.push(this.testData1[this.leftSelect]);
|
||||
this.testData1.splice(this.leftSelect, 1);
|
||||
},
|
||||
rest() {
|
||||
this.leftSelect = null;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doShow(step, selected, direction ) {
|
||||
this.dialogShow = true;
|
||||
this.selected = selected;
|
||||
this.addModel.standCode = selected.code;
|
||||
this.addModel.direction = direction === 'up' ? '上行方向' : '下行方向';
|
||||
this.addModel.oldStopProfile = '';
|
||||
this.oldStopProfileLabel = '';
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if ((this.mapConfig.upDirection === 'right' && this.selected.right) || (this.mapConfig.upDirection === 'left' && !this.selected.right)) {
|
||||
this.addModel.stationName = station.name + '-上行站台';
|
||||
} else {
|
||||
this.addModel.stationName = station.name + '-下行站台';
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
this.doClose();
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation:{ code: OperationEvent.StationStand.setStopTime.menu.operation, name: '设置站台停站时间'}});
|
||||
}
|
||||
// if (valid) {
|
||||
// const operate = {
|
||||
// send: true,
|
||||
// operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
||||
// };
|
||||
// this.loading = true;
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
|
||||
// this.loading = false;
|
||||
// if (valid) {
|
||||
// this.doClose();
|
||||
// } else {
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// this.loading = false;
|
||||
// this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
// });
|
||||
// } else {
|
||||
// return false;
|
||||
// }
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.transfer_header {
|
||||
text-align: center;
|
||||
color: #000;
|
||||
font-size: 16px;
|
||||
}
|
||||
.transfer_body {
|
||||
height: 180px;
|
||||
/*overflow-y: scroll;*/
|
||||
border-top: 2px solid #2F4F50;
|
||||
border-left: 2px solid #2F4F50;
|
||||
border-bottom: 2px solid #B7D4D5;
|
||||
border-right: 2px solid #B7D4D5;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
@ -44,8 +44,8 @@
|
||||
<el-col :span="10">
|
||||
<div class="transfer_body">
|
||||
<template v-for="(item, index) in testData1">
|
||||
<el-row :key="index">
|
||||
<el-col :span="8"><div>{{ item.plannedStop }}</div></el-col>
|
||||
<el-row :key="index" :style="{background: index === leftSelect ? '#C0C0C0': '#5F9EA0'}" @click.native="selectedLeftRow(index)">
|
||||
<el-col :span="8"><div>{{ item.planned }}</div></el-col>
|
||||
<el-col :span="8"><div>{{ item.plannedArrival }}</div></el-col>
|
||||
<el-col :span="8"><div>{{ item.scheduledArrival }}</div></el-col>
|
||||
</el-row>
|
||||
@ -53,13 +53,17 @@
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button>穿梭</el-button>
|
||||
<div style="height: 180px; text-align: center; padding-top: 60px">
|
||||
<el-button @click="updateData">>></el-button>
|
||||
<br>
|
||||
<el-button style="margin-top: 10px" />
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<div class="transfer_body">
|
||||
<template v-for="(item, index) in testData2">
|
||||
<el-row :key="index">
|
||||
<el-col :span="8"><div>{{ item.plannedSkip }}</div></el-col>
|
||||
<el-col :span="8"><div>{{ item.planned }}</div></el-col>
|
||||
<el-col :span="8"><div>{{ item.plannedArrival }}</div></el-col>
|
||||
<el-col :span="8"><div>{{ item.scheduledArrival }}</div></el-col>
|
||||
</el-row>
|
||||
@ -67,7 +71,7 @@
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin: 20px 0"><el-col :span="24"><div style="text-align: center"><el-button>复位</el-button></div></el-col></el-row>
|
||||
<el-row style="margin: 20px 0"><el-col :span="24"><div style="text-align: center"><el-button @click="rest">复位</el-button></div></el-col></el-row>
|
||||
<el-row>
|
||||
<el-form-item label-width="0" prop="notes">
|
||||
<el-input v-model="addModel.notes" type="textarea" :rows="3" />
|
||||
@ -75,7 +79,7 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="12" :offset="7">
|
||||
<el-col :span="12" :offset="9">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确认</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
||||
<el-button>帮助</el-button>
|
||||
@ -106,11 +110,12 @@ export default {
|
||||
standDirection: '',
|
||||
notes: ''
|
||||
},
|
||||
testData1: [{plannedStop: '测试1', plannedArrival: '05:33:22', scheduledArrival: '06:11:31'}, {plannedStop: '测试2', plannedArrival: '07:33:22', scheduledArrival: '08:11:31'}],
|
||||
testData2: [{plannedSkip: '测试3', plannedArrival: '09:44:57', scheduledArrival: '10:00:00'}],
|
||||
testData1: [{planned: '测试1', plannedArrival: '05:33:22', scheduledArrival: '06:11:31'}, {planned: '测试2', plannedArrival: '07:33:22', scheduledArrival: '08:11:31'}],
|
||||
testData2: [{planned: '测试3', plannedArrival: '09:44:57', scheduledArrival: '10:00:00'}],
|
||||
loading: false,
|
||||
rules: {},
|
||||
dialogShow: false
|
||||
dialogShow: false,
|
||||
leftSelect: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -139,6 +144,16 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectedLeftRow(index) {
|
||||
this.leftSelect = index;
|
||||
},
|
||||
updateData() {
|
||||
this.testData2.push(this.testData1[this.leftSelect]);
|
||||
this.testData1.splice(this.leftSelect, 1);
|
||||
},
|
||||
rest() {
|
||||
this.leftSelect = null;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
|
215
src/jmapNew/theme/xian_02/menus/dialog/warningConfirm.vue
Normal file
215
src/jmapNew/theme/xian_02/menus/dialog/warningConfirm.vue
Normal file
@ -0,0 +1,215 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="xian-02__system warning-confirm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
center
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="120px" :model="addModel" :rules="rules" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div style="width: 100%; text-align: center; color: #000;">{{ warningMessage }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="外部名" prop="location">
|
||||
<el-input v-model="addModel.outsideName" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="14">
|
||||
<el-form-item label="设备识别号">
|
||||
<el-input v-model="addModel.deviceId" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="9" :offset="1">
|
||||
<div style="margin-top: 4px;"><el-button>确认</el-button></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 50px;">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="确认ID">
|
||||
<el-input v-model="addModel.confirmId" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<hr style="height:1px;border:none;border-top:1px solid #555555;width: 492px; position: absolute;left: 3px; margin-top: 0">
|
||||
<el-row style="margin-top: 20px;">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="设备识别号">
|
||||
<el-input v-model="addModel.deviceId2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="设备识别号">
|
||||
<el-input v-model="addModel.confirmId2" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="24">
|
||||
<div style="width: 100%; text-align: center;"><el-button>确认</el-button></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10%">
|
||||
<el-form-item label-width="0" prop="notes">
|
||||
<el-input v-model="addModel.notes" type="textarea" :rows="3" />
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="12" :offset="8">
|
||||
<el-button :id="domIdCancel" @click="cancel">取消</el-button>
|
||||
<el-button>帮助</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'PlatformDwell',
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
addModel: {
|
||||
outsideName: '',
|
||||
deviceId: '',
|
||||
confirmId: '',
|
||||
deviceId2: '',
|
||||
confirmId2: '',
|
||||
notes: ''
|
||||
},
|
||||
warningMessage: '无报警数据',
|
||||
loading: false,
|
||||
rules: {},
|
||||
dialogShow: false,
|
||||
leftSelect: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList',
|
||||
'mapConfig'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose1.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.choose2.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '报警确认';
|
||||
},
|
||||
speedList() {
|
||||
const list = [];
|
||||
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
|
||||
list.push(i * this.speedSpace);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectedLeftRow(index) {
|
||||
this.leftSelect = index;
|
||||
},
|
||||
updateData() {
|
||||
this.testData2.push(this.testData1[this.leftSelect]);
|
||||
this.testData1.splice(this.leftSelect, 1);
|
||||
},
|
||||
rest() {
|
||||
this.leftSelect = null;
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doShow(step, selected) {
|
||||
this.dialogShow = true;
|
||||
this.selected = selected;
|
||||
this.addModel.standCode = selected.code;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
this.addModel.stationName = station.name;
|
||||
if ((this.mapConfig.upDirection === 'right' && this.selected.right) || (this.mapConfig.upDirection === 'left' && !this.selected.right)) {
|
||||
this.addModel.standDirection = '上行站台';
|
||||
} else {
|
||||
this.addModel.standDirection = '下行站台';
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
this.doClose();
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/pushRequestList', {device: this.selected, operation:{ code: OperationEvent.StationStand.setStopTime.menu.operation, name: '设置站台停站时间'}});
|
||||
}
|
||||
// if (valid) {
|
||||
// const operate = {
|
||||
// send: true,
|
||||
// operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
||||
// };
|
||||
// this.loading = true;
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
|
||||
// this.loading = false;
|
||||
// if (valid) {
|
||||
// this.doClose();
|
||||
// } else {
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// this.loading = false;
|
||||
// this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
// });
|
||||
// } else {
|
||||
// return false;
|
||||
// }
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.transfer_header {
|
||||
text-align: center;
|
||||
color: #000;
|
||||
font-size: 16px;
|
||||
}
|
||||
.transfer_body {
|
||||
height: 180px;
|
||||
/*overflow-y: scroll;*/
|
||||
border-top: 2px solid #2F4F50;
|
||||
border-left: 2px solid #2F4F50;
|
||||
border-bottom: 2px solid #B7D4D5;
|
||||
border-right: 2px solid #B7D4D5;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
@ -14,7 +14,7 @@
|
||||
<menu-limit ref="menuLimit" :selected="selected" />
|
||||
<passive-contorl ref="passiveControl" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" @popMenuStationStand="popMenuStationStand" />
|
||||
<pop-station-stand ref="popStationStand" :selected="selected" @closeMenuStationStand="closeMenuStationStand" />
|
||||
<pop-station-stand ref="popStationStand" :selected="selected" @closeMenuStationStand="closeMenuStationStand" @standOperationCallback="standOperationCallback" />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
@ -95,6 +95,9 @@ export default {
|
||||
},
|
||||
closeMenuStationStand() {
|
||||
this.$refs.menuStationStand.doClose();
|
||||
},
|
||||
standOperationCallback(val) {
|
||||
this.$refs.menuStationStand.callback(val);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -168,7 +171,6 @@ export default {
|
||||
background: #5F9EA0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.xian-02__system .el-dialog .el-dialog__title {
|
||||
font-size: 16px;
|
||||
color: #fff;
|
||||
@ -176,7 +178,14 @@ export default {
|
||||
top: 4px;
|
||||
left:25px;
|
||||
}
|
||||
|
||||
.xian-02__menus .stand-stop-time .el-dialog .el-dialog__title {
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left:550px;
|
||||
}
|
||||
.xian-02__system .el-dialog .el-dialog__headerbtn {
|
||||
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
|
||||
border: 1px solid #fff;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<pop-menu ref="popMenu" :menu="menu" trigger="click" pop-class="xian-02__pop_tip_station" />
|
||||
<route-selection ref="routeSelection" />
|
||||
<route-lock ref="routeLock" />
|
||||
<route-un-lock ref="routeUnLock" />
|
||||
@ -13,7 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import PopMenu from '@/components/PopMenu/popTip';
|
||||
import RouteControl from './dialog/routeControl';
|
||||
import RouteSelection from './dialog/routeSelection';
|
||||
import RouteLock from './dialog/routeLock';
|
||||
@ -66,21 +66,11 @@ export default {
|
||||
handler: this.cancelTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '信号机引导办理',
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
{
|
||||
label: '人工解锁进路', // 信号机引导取消
|
||||
handler: this.humanTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
handler: this.lock,
|
||||
@ -119,7 +109,7 @@ export default {
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '排列进路',
|
||||
label: '始端/终端选择',
|
||||
handler: this.arrangementRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
@ -129,37 +119,48 @@ export default {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
{
|
||||
label: '人工解锁进路', // 信号机引导取消
|
||||
handler: this.humanTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '进路交人工控',
|
||||
handler: this.humanControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '进路交自动控',
|
||||
label: '开放自动进路',
|
||||
handler: this.atsAutoControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '设置通过模式',
|
||||
handler: this.singalPassModel,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
label: '关闭自动进路',
|
||||
handler: this.humanControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '取消通过模式',
|
||||
handler: this.singalCancelPassModel,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
label: '终端信号封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
},
|
||||
{
|
||||
label: '查询进路控制状态',
|
||||
label: '终端信号解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '设备标签',
|
||||
children: [
|
||||
{
|
||||
label: '创建设备标签',
|
||||
handler: this.atsAutoControlALL
|
||||
},
|
||||
{
|
||||
label: '查看设备标签',
|
||||
handler: this.atsAutoControlALL
|
||||
},
|
||||
{
|
||||
label: '更改设备标签',
|
||||
handler: this.atsAutoControlALL
|
||||
},
|
||||
{
|
||||
label: '删除设备标签',
|
||||
handler: this.atsAutoControlALL
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '帮助',
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||
}
|
||||
@ -216,7 +217,8 @@ export default {
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
this.menu = this.menuNormal.Center;
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
@ -321,14 +323,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
@ -377,14 +371,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 人工解锁进路(信号机取消引导)
|
||||
humanTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelGuide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routerCommand.doShow(operate, this.selected, '是否执行人解列车进路命令?');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 进路引导
|
||||
guide() {
|
||||
commitOperate(menuOperate.Signal.guide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
|
@ -26,7 +26,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="center-table-cell" style="height: 90px;">
|
||||
<span @click="clickEvent('adjustDwell')">站停时间调整</span><br><span>站台屏蔽门信息确认</span><br><span @contextmenu="menuEvent('updateStandPlan')">更新站台计划</span>
|
||||
<span @click="clickEvent('adjustDwell')">站停时间调整</span><br><span @contextmenu="menuEvent('psdInfoConfirm')">站台屏蔽门信息确认</span><br><span @contextmenu="menuEvent('updateStandPlan')">更新站台计划</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -35,10 +35,10 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="left-table-cell" style="height: 68px;"><span @click="clickEvent('stoppingProfile')">停站曲线</span></div>
|
||||
<div class="left-table-cell" style="height: 68px;"><span>停站曲线</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="center-table-cell" style="height: 68px;"><span @click="clickEvent('northbound')">上行方向</span><br><span @click="clickEvent('southbound')">下行方向</span></div>
|
||||
<div class="center-table-cell" style="height: 68px;"><span @contextmenu="menuEvent('upStopProfile')">上行方向</span><br><span @contextmenu="menuEvent('downStopProfile')">下行方向</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="right-table-cell" style="height: 68px;"><span> </span></div>
|
||||
@ -46,13 +46,13 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="left-table-cell"><span @click="clickEvent()">跳停</span></div>
|
||||
<div class="left-table-cell"><span>跳停</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="center-table-cell"><span @click="clickEvent('stopJumping')">设置/取消 所有列车跳停本站</span></div>
|
||||
<div class="center-table-cell"><span :style="{color: stopJumpColor}" @contextmenu="menuEvent('stopJumping')">设置/取消 所有列车跳停本站</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="right-table-cell"><span @click="clickEvent('allTrainStopJump')">所有列车跳停本站</span></div>
|
||||
<div class="right-table-cell"><span :style="{color: allStopJumpColor}" @contextmenu="menuEvent('allTrainStopJump')">所有列车跳停本站</span></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@ -60,10 +60,10 @@
|
||||
<div class="left-table-cell"><span @click="clickEvent()">ATS站台扣车</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="center-table-cell"><span @click="clickEvent('standDetain')">设置/取消 所有列车本站扣车</span></div>
|
||||
<div class="center-table-cell"><span :style="{color:standDetainColor}" @contextmenu="menuEvent('standDetain')">设置/取消 所有列车本站扣车</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="right-table-cell"><span @click="clickEvent()">所有列车本站扣车</span></div>
|
||||
<div class="right-table-cell"><span :style="{color:allDetainColor}" @click="clickEvent()">所有列车本站扣车</span></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@ -79,20 +79,20 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<div class="left-table-cell" style="height: 90px;"><span @click="clickEvent()">上行方向驾驶模式禁止</span></div>
|
||||
<div class="left-table-cell" style="height: 90px;"><span>上行方向驾驶模式禁止</span></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="center-table-cell" style="height: 90px;">
|
||||
<span @click="clickEvent()">禁止/释放 ATPM模式</span><br>
|
||||
<span @click="clickEvent()">禁止/释放 AM模式</span><br>
|
||||
<span @click="clickEvent()">禁止/释放 ATB模式</span>
|
||||
<span @contextmenu="setRuningMode('ATPM', 'up')">禁止/释放 ATPM模式</span><br>
|
||||
<span @contextmenu="setRuningMode('AM', 'up')">禁止/释放 AM模式</span><br>
|
||||
<span @contextmenu="setRuningMode('ATB', 'up')">禁止/释放 ATB模式</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="right-table-cell" style="height: 90px;">
|
||||
<span @click="clickEvent()">ATPM模式已禁止</span><br>
|
||||
<span @click="clickEvent()">AM模式已禁止</span><br>
|
||||
<span @click="clickEvent()">ATB模式已禁止</span>
|
||||
<span>ATPM模式已禁止</span><br>
|
||||
<span>AM模式已禁止</span><br>
|
||||
<span>ATB模式已禁止</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -102,16 +102,16 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="center-table-cell" style="height: 90px;">
|
||||
<span @click="clickEvent()">禁止/释放 ATPM模式</span><br>
|
||||
<span @click="clickEvent()">禁止/释放 AM模式</span><br>
|
||||
<span @click="clickEvent()">禁止/释放 ATB模式</span>
|
||||
<span @contextmenu="setRuningMode('ATPM', 'down')">禁止/释放 ATPM模式</span><br>
|
||||
<span @contextmenu="setRuningMode('AM', 'down')">禁止/释放 AM模式</span><br>
|
||||
<span @contextmenu="setRuningMode('ATB', 'down')">禁止/释放 ATB模式</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="right-table-cell" style="height: 90px;">
|
||||
<span @click="clickEvent()">ATPM模式已禁止</span><br>
|
||||
<span @click="clickEvent()">AM模式已禁止</span><br>
|
||||
<span @click="clickEvent()">ATB模式已禁止</span>
|
||||
<span>ATPM模式已禁止</span><br>
|
||||
<span>AM模式已禁止</span><br>
|
||||
<span>ATB模式已禁止</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -144,7 +144,11 @@ export default {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
position: '',
|
||||
title: ''
|
||||
title: '',
|
||||
standDetainColor: '#FFF',
|
||||
allDetainColor: '#FFF',
|
||||
stopJumpColor: '#FFF',
|
||||
allStopJumpColor: '#FFF'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -201,6 +205,12 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
if (this.detainInterval) {
|
||||
clearTimeout(this.detainInterval);
|
||||
}
|
||||
if (this.stopJumpInterval) {
|
||||
clearTimeout(this.stopJumpInterval);
|
||||
}
|
||||
},
|
||||
menuEvent(val) {
|
||||
this.$emit('popMenuStationStand', {position:{x: event.clientX, y: event.clientY}, type:val});
|
||||
@ -262,6 +272,54 @@ export default {
|
||||
// }
|
||||
// });
|
||||
},
|
||||
callback(val) {
|
||||
if (val === 'standDetain') {
|
||||
this.setStandDetain(true);
|
||||
} else if (val === 'stopJumping') {
|
||||
this.setStopJumping(true);
|
||||
}
|
||||
},
|
||||
setStopJumping(flag) {
|
||||
this.stopJumpColor = '#FF0';
|
||||
if (flag && !this.stopJumpInterval) {
|
||||
this.stopJumpInterval = setInterval(() => {
|
||||
if (this.stopJumpColor !== '#FF0') {
|
||||
this.stopJumpColor = '#FF0';
|
||||
} else {
|
||||
this.stopJumpColor = '#000';
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
setStandDetain(flag) {
|
||||
this.standDetainColor = '#FF0';
|
||||
if (flag && !this.detainInterval) {
|
||||
this.detainInterval = setInterval(() => {
|
||||
if (this.standDetainColor !== '#FF0') {
|
||||
this.standDetainColor = '#FF0';
|
||||
} else {
|
||||
this.standDetainColor = '#000';
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
setRuningMode(mode, direction) {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: OperationEvent.StationStand.setJumpStop.menu.operation});
|
||||
// this.$refs.standControl.doShow(step, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
|
@ -1,15 +1,19 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<pop-menu ref="popMenu" :menu="menu" trigger="click" pop-class="xian-02__pop_tip_station" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<update-stand-plan ref="updateStandPlan" :selected="selected" />
|
||||
<warning-confirm ref="warningConfirm" :selected="selected" />
|
||||
<stop-profile ref="stopProfile" :selected="selected" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import PopMenu from '@/components/PopMenu/popTip';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import UpdateStandPlan from './dialog/updateStandPlan';
|
||||
import WarningConfirm from './dialog/warningConfirm';
|
||||
import StopProfile from './dialog/stopProfile';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
@ -20,7 +24,9 @@ export default {
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
UpdateStandPlan
|
||||
UpdateStandPlan,
|
||||
WarningConfirm,
|
||||
StopProfile
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -123,7 +129,7 @@ export default {
|
||||
Center: [
|
||||
{
|
||||
label: '列车跳停本站',
|
||||
handler: this.setStopTime,
|
||||
handler: this.setJumpStop,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
{
|
||||
@ -170,7 +176,7 @@ export default {
|
||||
},
|
||||
{
|
||||
label: '扣车',
|
||||
handler: this.setStopTime,
|
||||
handler: this.setStandDetain,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
{
|
||||
@ -190,12 +196,72 @@ export default {
|
||||
},
|
||||
{
|
||||
label: '站台停站',
|
||||
handler: '',
|
||||
handler: this.setStopTime,
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '帮助',
|
||||
handler: '',
|
||||
handler: this.setStopTime,
|
||||
cmdType: ''
|
||||
}
|
||||
]
|
||||
},
|
||||
psdInfoConfirm: {
|
||||
Local: [],
|
||||
Center: [
|
||||
{
|
||||
label: '站台屏蔽门报警-站台屏蔽门信息确认',
|
||||
handler: this.setStopTime,
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '站台屏蔽门报警确认',
|
||||
handler: this.confirmPsdWarning,
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '帮助',
|
||||
handler: this.setStopTime,
|
||||
cmdType: ''
|
||||
}
|
||||
]
|
||||
},
|
||||
upStopProfile: {
|
||||
Local: [],
|
||||
Center: [
|
||||
{
|
||||
label: '站台停站曲线',
|
||||
handler: this.setStopTime,
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '站台停站曲线',
|
||||
handler: this.setUpStopProfile,
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '帮助',
|
||||
handler: this.setUpStopProfile,
|
||||
cmdType: ''
|
||||
}
|
||||
]
|
||||
},
|
||||
downStopProfile: {
|
||||
Local: [],
|
||||
Center: [
|
||||
{
|
||||
label: '站台停站曲线',
|
||||
handler: this.setDownStopProfile,
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '站台停站曲线',
|
||||
handler: this.setDownStopProfile,
|
||||
cmdType: ''
|
||||
},
|
||||
{
|
||||
label: '帮助',
|
||||
handler: this.setDownStopProfile,
|
||||
cmdType: ''
|
||||
}
|
||||
]
|
||||
@ -249,9 +315,18 @@ export default {
|
||||
case 'standDetain':
|
||||
this.menu = this.standDetain.Center;
|
||||
break;
|
||||
case 'psdInfoConfirm':
|
||||
this.menu = this.psdInfoConfirm.Center;
|
||||
break;
|
||||
case 'upStopProfile':
|
||||
this.menu = this.upStopProfile.Center;
|
||||
break;
|
||||
case 'downStopProfile':
|
||||
this.menu = this.downStopProfile.Center;
|
||||
break;
|
||||
}
|
||||
// this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
console.log(this.menu, type);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
@ -335,6 +410,7 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: OperationEvent.StationStand.setJumpStop.menu.operation});
|
||||
// this.$refs.standControl.doShow(step, this.selected);
|
||||
this.$emit('standOperationCallback', 'stopJumping');
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -374,6 +450,75 @@ export default {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
confirmPsdWarning() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.warningConfirm.doShow(step, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
setStandDetain() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.warningConfirm.doShow(step, this.selected);
|
||||
this.$emit('standOperationCallback', 'standDetain');
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(step);
|
||||
});
|
||||
},
|
||||
setUpStopProfile() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
param: {
|
||||
standCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stopProfile.doShow(step, this.selected, 'up');
|
||||
}
|
||||
});
|
||||
},
|
||||
setDownStopProfile() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||
param: {
|
||||
standCode: this.selected.code
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(( {valid}) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true});
|
||||
this.$refs.stopProfile.doShow(step, this.selected, 'down');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="autoSignal" :title="$t('map.automaticSignalList')" :visible.sync="show" width="85%" :before-do-close="doClose">
|
||||
<el-dialog v-dialogDrag class="autoSignal" title="停站时间列表" :visible.sync="show" width="85%" :before-do-close="doClose">
|
||||
<div>
|
||||
<QueryListPage
|
||||
ref="queryListPage"
|
||||
@ -13,7 +13,6 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { listMap } from '@/api/jmap/mapdraft';
|
||||
import { getStationParkTimeList, deleteStationParkTime, getStationParkTime } from '@/api/jmap/mapdraft';
|
||||
|
||||
export default {
|
||||
@ -29,7 +28,6 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
mapList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
@ -37,16 +35,9 @@ export default {
|
||||
queryForm: {
|
||||
labelWidth: '120px',
|
||||
queryObject: {
|
||||
code: {
|
||||
type: 'text',
|
||||
label: this.$t('map.autoSignalCode'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
signalCode: {
|
||||
stationCode: {
|
||||
type: 'select',
|
||||
label: this.$t('map.signal'),
|
||||
label: '经停车站',
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
@ -95,24 +86,17 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList',
|
||||
'signalList',
|
||||
'stationStandList'
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
signalList: function (val, old) {
|
||||
const list = [];
|
||||
if (val && val.length) {
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
list.push({ label: val[i].uniqueName, value: val[i].code });
|
||||
}
|
||||
this.queryForm.queryObject.signalCode.config.data = list;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.acquireMapList();
|
||||
const list = [];
|
||||
if (this.stationList && this.stationList.length) {
|
||||
for (let i = 0; i < this.stationList.length; i++) {
|
||||
list.push({ label: this.stationList[i].name, value: this.stationList[i].code });
|
||||
}
|
||||
this.queryForm.queryObject.stationCode.config.data = list;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
@ -143,26 +127,6 @@ export default {
|
||||
return getStationParkTimeList(this.mapInfo.id, params);
|
||||
}
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap({ drawWay:true}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
afterQuery(data) {
|
||||
if (data && data.list) {
|
||||
const that = this;
|
||||
const list = data.list;
|
||||
if (list) {
|
||||
list.map(elem => {
|
||||
that.$convertSpecifiedField(elem, that.mapList, 'id', 'name', ['mapId']);
|
||||
elem.code = elem.signalCode;
|
||||
elem.signalCode = that.formatName(elem.signalCode);
|
||||
});
|
||||
}
|
||||
}
|
||||
return data;
|
||||
},
|
||||
editObj(index, row) {
|
||||
getStationParkTime(row.id).then(response => {
|
||||
const data = response.data;
|
||||
|
@ -4,7 +4,7 @@
|
||||
<el-form ref="form" :model="addModel" :rules="rules" label-width="80px" size="mini">
|
||||
<div class="definition">
|
||||
<el-form-item label="停站车站" prop="stationCode">
|
||||
<el-select v-model="addModel.stationCode" clearable :filterable="true">
|
||||
<el-select v-model="addModel.stationCode" clearable :filterable="true" :disabled="editShow">
|
||||
<el-option
|
||||
v-for="item in stationList"
|
||||
:key="item.code"
|
||||
@ -13,6 +13,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:disabled="editShow"
|
||||
:type=" field === 'parkStationCode' ? 'danger' : 'primary'"
|
||||
@click="hover('parkStationCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
@ -60,7 +61,7 @@
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.prevent="deleteSection(addModel.routingSectionList, scope.$index)"
|
||||
@click.native.prevent="deleteSection(addModel.parkingTimeVOList, scope.$index)"
|
||||
>
|
||||
{{ $t('map.remove') }}
|
||||
</el-button>
|
||||
@ -162,7 +163,6 @@ export default {
|
||||
this.sectionCode = val.parkingTimeVOList[0].sectionCode;
|
||||
this.parkingTime = val.parkingTimeVOList[0].parkingTime;
|
||||
}
|
||||
this.editShow = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -175,8 +175,17 @@ export default {
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
editData() {
|
||||
this.isSave = false;
|
||||
this.editShow = true;
|
||||
},
|
||||
pushSection(list, data) {
|
||||
list.push(data);
|
||||
const index = list.findIndex(elem => { return elem.sectionCode == data.sectionCode; });
|
||||
if (index < 0) {
|
||||
list.push(data);
|
||||
} else {
|
||||
this.$messageBox('该区段已经在列表中存在');
|
||||
}
|
||||
},
|
||||
setSelected(selected) {
|
||||
if (selected) {
|
||||
@ -191,6 +200,9 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
deleteSection(list, index) {
|
||||
list.splice(index, 1);
|
||||
},
|
||||
buildModel(code) {
|
||||
const model = Object.assign({}, this.addModel);
|
||||
if (code) { model['code'] = code; }
|
||||
@ -236,9 +248,10 @@ export default {
|
||||
this.addModel.stationCode = '';
|
||||
this.addModel.parkingTimeVOList = [];
|
||||
this.sectionCode = '';
|
||||
this.parkingTime = 0;
|
||||
this.parkingTime = 30;
|
||||
this.addModel.code = '';
|
||||
this.isSave = true;
|
||||
this.editShow = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ export default {
|
||||
autoMaticoSelected: function (data) {
|
||||
this.routeData = data;
|
||||
if (this.$refs && this.$refs.routeEdit) {
|
||||
this.$refs.routeEdit.isSave = false;
|
||||
this.$refs.routeEdit.editData();
|
||||
}
|
||||
},
|
||||
previewRouteEvent: function () {
|
||||
|
@ -55,6 +55,20 @@ export default {
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
startSectionCode: {
|
||||
type: 'select',
|
||||
label: '起始区段',
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
endSectionCode: {
|
||||
type: 'select',
|
||||
label: '终到区段',
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -74,7 +88,7 @@ export default {
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('map.startStationCode'),
|
||||
title: '起始区段',
|
||||
prop: 'startSectionCode'
|
||||
},
|
||||
{
|
||||
@ -82,7 +96,7 @@ export default {
|
||||
prop: 'endStationCode'
|
||||
},
|
||||
{
|
||||
title: this.$t('map.endStationCode'),
|
||||
title: '终到区段',
|
||||
prop: 'endSectionCode'
|
||||
},
|
||||
{
|
||||
@ -151,6 +165,16 @@ export default {
|
||||
this.queryForm.queryObject.startStationCode.config.data = list;
|
||||
this.queryForm.queryObject.endStationCode.config.data = list;
|
||||
}
|
||||
},
|
||||
sectionList: function (val, old) {
|
||||
const list = [];
|
||||
if (val && val.length) {
|
||||
val.forEach(elem => {
|
||||
list.push({ label: this.formatName(elem.code), value: elem.code });
|
||||
});
|
||||
this.queryForm.queryObject.startSectionCode.config.data = list;
|
||||
this.queryForm.queryObject.endSectionCode.config.data = list;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -218,13 +242,19 @@ export default {
|
||||
},
|
||||
deleteObj(index, row) {
|
||||
if (this.mapInfo && this.mapInfo.id && row) {
|
||||
// 删除
|
||||
deleteRoutingData(row.id).then(response => {
|
||||
this.$message.success(this.$t('map.successfullyDelete'));
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('map.failDelete'));
|
||||
});
|
||||
this.$confirm('是否确认删除交路', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// 删除
|
||||
deleteRoutingData(row.id).then(response => {
|
||||
this.$message.success(this.$t('map.successfullyDelete'));
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('map.failDelete'));
|
||||
});
|
||||
}).catch();
|
||||
}
|
||||
},
|
||||
generateData(index, row) {
|
||||
@ -234,16 +264,15 @@ export default {
|
||||
this.$message.success(this.$t('map.generateStationRunDataSuccess'));
|
||||
// 站间运行数据生成成功
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
// 站间运行数据生成失败
|
||||
this.$messageBox(this.$t('map.generateStationRunDataFailed'));
|
||||
this.$messageBox(this.$t('map.generateStationRunDataFailed') + ': ' + error.message);
|
||||
});
|
||||
}
|
||||
},
|
||||
sectionDetail(index, row) {
|
||||
const sectionDict = {};
|
||||
const stationDict = {};
|
||||
|
||||
this.sectionList.forEach(elem => { sectionDict[elem.code] = elem.name; });
|
||||
this.stationList.forEach(elem => { stationDict[elem.code] = elem.name; });
|
||||
|
||||
@ -257,7 +286,7 @@ export default {
|
||||
items: [
|
||||
{ prop: 'stationCode', label: this.$t('map.stationCodeClomn'), type: 'text' },
|
||||
{
|
||||
prop: 'stationCode', label: this.$t('map.sectionName'), type: 'select', options: stationDict
|
||||
prop: 'stationCode', label: '车站名称', type: 'select', options: stationDict
|
||||
},
|
||||
{ prop: 'sectionCode', label: this.$t('map.blockCodingClomn'), type: 'text' },
|
||||
{
|
||||
@ -266,7 +295,7 @@ export default {
|
||||
]
|
||||
}
|
||||
};
|
||||
this.$refs.previewField.doShow(fieldList, row.routingSectionList);
|
||||
this.$refs.previewField.doShow(fieldList, row.parkSectionCodeList);
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
|
@ -60,7 +60,7 @@ export default {
|
||||
routingSelected: function (data) {
|
||||
this.routeData = data;
|
||||
if (this.$refs && this.$refs.routeEdit) {
|
||||
this.$refs.routeEdit.isSave = false;
|
||||
this.$refs.routeEdit.editData();
|
||||
}
|
||||
},
|
||||
previewRouteEvent: function () {
|
||||
|
@ -20,8 +20,8 @@
|
||||
@click="hover('startStationCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.startSectionColon')" prop="startSectionCode" @change="changeStartSection()">
|
||||
<el-select v-model="addModel.startSectionCode" clearable :filterable="true">
|
||||
<el-form-item :label="$t('map.startSectionColon')" prop="startSectionCode">
|
||||
<el-select v-model="addModel.startSectionCode" clearable :filterable="true" :disabled="editShow" @change="changeStartSection()">
|
||||
<el-option
|
||||
v-for="item in filterSectionList"
|
||||
:key="item.code"
|
||||
@ -30,12 +30,13 @@
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:disabled="editShow"
|
||||
:type=" field === 'startSectionCode' ? 'danger' : 'primary'"
|
||||
@click="hover('startSectionCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.endStationColon')" prop="endStationCode" @change="changeEndStation()">
|
||||
<el-select v-model="addModel.endStationCode" clearable :filterable="true">
|
||||
<el-form-item :label="$t('map.endStationColon')" prop="endStationCode">
|
||||
<el-select v-model="addModel.endStationCode" clearable :filterable="true" :disabled="!isStartSelected" @change="changeEndStation()">
|
||||
<el-option
|
||||
v-for="item in filterStationList"
|
||||
:key="item.code"
|
||||
@ -44,12 +45,13 @@
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:disabled="!isStartSelected"
|
||||
:type=" field === 'endStationCode' ? 'danger' : 'primary'"
|
||||
@click="hover('endStationCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.endSectionColon')" prop="endSectionCode" @change="changeEndSection()">
|
||||
<el-select v-model="addModel.endSectionCode" clearable :filterable="true">
|
||||
<el-form-item :label="$t('map.endSectionColon')" prop="endSectionCode">
|
||||
<el-select v-model="addModel.endSectionCode" clearable :filterable="true" :disabled="editShow || !isStartSelected" @change="changeEndSection()">
|
||||
<el-option
|
||||
v-for="item in filterSectionList"
|
||||
:key="item.code"
|
||||
@ -58,11 +60,12 @@
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:disabled="editShow || !isStartSelected"
|
||||
:type=" field === 'endSectionCode' ? 'danger' : 'primary'"
|
||||
@click="hover('endSectionCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.destinationCode')" prop="destinationCode">
|
||||
<el-form-item :label="$t('map.destinationCode')" prop="destinationCode" :disabled="editShow">
|
||||
<el-input v-model="addModel.destinationCode" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.routingDirection')" prop="directionCode">
|
||||
@ -202,6 +205,7 @@ export default {
|
||||
ViewMode: ViewMode,
|
||||
field: '',
|
||||
allowSelect:false,
|
||||
isStartSelected:false,
|
||||
stationCode: '',
|
||||
sectionCode: '',
|
||||
isSave: true,
|
||||
@ -272,7 +276,6 @@ export default {
|
||||
routeData(val, old) {
|
||||
if (val) {
|
||||
this.addModel = val;
|
||||
this.editShow = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -293,21 +296,27 @@ export default {
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
editData() {
|
||||
this.isSave = false;
|
||||
this.allowSelect = true;
|
||||
this.isStartSelected = true;
|
||||
this.editShow = true;
|
||||
},
|
||||
changeStartStation() {
|
||||
this.judgeAllowSelected();
|
||||
this.addStartSectionData();
|
||||
this.addStartSectionData(true);
|
||||
},
|
||||
changeStartSection() {
|
||||
this.judgeAllowSelected();
|
||||
this.addStartSectionData();
|
||||
this.addStartSectionData(false);
|
||||
},
|
||||
changeEndStation() {
|
||||
this.judgeAllowSelected();
|
||||
this.addEndSectionData();
|
||||
this.addEndSectionData(true);
|
||||
},
|
||||
changeEndSection() {
|
||||
this.judgeAllowSelected();
|
||||
this.addEndSectionData();
|
||||
this.addEndSectionData(false);
|
||||
},
|
||||
judgeAllowSelected() {
|
||||
if (this.addModel.startStationCode != '' && this.addModel.startSectionCode != '' && this.addModel.endStationCode != '' && this.addModel.endSectionCode != '') {
|
||||
@ -316,14 +325,15 @@ export default {
|
||||
this.allowSelect = false;
|
||||
}
|
||||
},
|
||||
addStartSectionData() {
|
||||
addStartSectionData(isStation) {
|
||||
if (this.addModel.startStationCode != '' && this.addModel.startSectionCode != '') {
|
||||
this.pushSection({stationCode: this.addModel.startStationCode, sectionCode: this.addModel.startSectionCode}, 'top');
|
||||
this.isStartSelected = true;
|
||||
this.pushSection({stationCode: this.addModel.startStationCode, sectionCode: this.addModel.startSectionCode}, 'top', isStation);
|
||||
}
|
||||
},
|
||||
addEndSectionData() {
|
||||
addEndSectionData(isStation) {
|
||||
if (this.addModel.endStationCode != '' && this.addModel.endSectionCode != '') {
|
||||
this.pushSection({stationCode: this.addModel.endStationCode, sectionCode: this.addModel.endSectionCode}, 'bottom');
|
||||
this.pushSection({stationCode: this.addModel.endStationCode, sectionCode: this.addModel.endSectionCode}, 'bottom', isStation);
|
||||
}
|
||||
},
|
||||
hover(field) {
|
||||
@ -337,19 +347,19 @@ export default {
|
||||
if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'startStationCode'.toUpperCase()) {
|
||||
this.addModel.startStationCode = selected.code;
|
||||
this.judgeAllowSelected();
|
||||
this.addStartSectionData();
|
||||
this.addStartSectionData(true);
|
||||
} else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() === 'endStationCode'.toUpperCase()) {
|
||||
this.addModel.endStationCode = selected.code;
|
||||
this.judgeAllowSelected();
|
||||
this.addEndSectionData();
|
||||
this.addEndSectionData(true);
|
||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'startSectionCode'.toUpperCase()) {
|
||||
this.addModel.startSectionCode = selected.code;
|
||||
this.judgeAllowSelected();
|
||||
this.addStartSectionData();
|
||||
this.addStartSectionData(false);
|
||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'endSectionCode'.toUpperCase()) {
|
||||
this.addModel.endSectionCode = selected.code;
|
||||
this.judgeAllowSelected();
|
||||
this.addEndSectionData();
|
||||
this.addEndSectionData(false);
|
||||
this.addModel.destinationCode = selected.destinationCode || '';
|
||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() == 'routingSection'.toUpperCase()) {
|
||||
this.sectionCode = selected.code;
|
||||
@ -358,7 +368,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
pushSection(data, type) {
|
||||
pushSection(data, type, isStation) {
|
||||
const list = this.addModel.parkSectionCodeList;
|
||||
if (data && data.stationCode && data.sectionCode) {
|
||||
const index = list.findIndex(elem => { return elem.sectionCode == data.sectionCode; });
|
||||
@ -367,16 +377,52 @@ export default {
|
||||
if (index < 0) {
|
||||
list.splice(list.length - 1, 0, data);
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.routeSameID'));
|
||||
this.$messageBox('该区段已经在交路区段中存在');
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'top': {
|
||||
list.splice(0, 1, data);
|
||||
if (isStation) {
|
||||
list.splice(0, 1, data);
|
||||
} else {
|
||||
if (index < 0) {
|
||||
list.splice(0, 1, data);
|
||||
} else {
|
||||
if (index == list.length - 1) {
|
||||
this.$messageBox('起始区段和终到区段不能相同');
|
||||
this.addModel.startSectionCode = list[0].sectionCode;
|
||||
} else {
|
||||
this.$messageBox('该区段已经在交路区段中存在');
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'bottom': {
|
||||
list.splice(list.length, 1, data);
|
||||
if (isStation) {
|
||||
if (list.length >= 2) {
|
||||
list.splice(list.length - 1, 1, data);
|
||||
} else {
|
||||
if (index < 0) {
|
||||
list.push(data);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (index < 0) {
|
||||
if (list.length >= 2) {
|
||||
list.splice(list.length - 1, 1, data);
|
||||
} else {
|
||||
list.push(data);
|
||||
}
|
||||
} else {
|
||||
if (index == 0) {
|
||||
this.$messageBox('起始区段和终到区段不能相同');
|
||||
this.addModel.endSectionCode = list[list.length - 1].sectionCode;
|
||||
} else {
|
||||
this.$messageBox('该区段已经在交路区段中存在');
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
@ -448,6 +494,9 @@ export default {
|
||||
this.stationCode = '';
|
||||
this.sectionCode = '';
|
||||
this.isSave = true;
|
||||
this.allowSelect = false;
|
||||
this.isStartSelected = false;
|
||||
this.editShow = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ export default {
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('map.startStationCode'),
|
||||
title: '起始区段',
|
||||
prop: 'startSectionCode'
|
||||
},
|
||||
{
|
||||
@ -77,7 +77,7 @@ export default {
|
||||
prop: 'endStationCode'
|
||||
},
|
||||
{
|
||||
title: this.$t('map.endStationCode'),
|
||||
title: '终到区段',
|
||||
prop: 'endSectionCode'
|
||||
},
|
||||
{
|
||||
@ -89,7 +89,10 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '站间距离',
|
||||
prop: 'distance'
|
||||
prop: 'distance',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return row.distance + ' m'; },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: '第一等级时间',
|
||||
|
@ -60,7 +60,7 @@ export default {
|
||||
routingSelected: function (data) {
|
||||
this.routeData = data;
|
||||
if (this.$refs && this.$refs.routeEdit) {
|
||||
this.$refs.routeEdit.isSave = false;
|
||||
this.$refs.routeEdit.editData();
|
||||
}
|
||||
},
|
||||
previewRouteEvent: function () {
|
||||
|
@ -19,7 +19,7 @@
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.startSectionColon')" prop="startSectionCode">
|
||||
<el-select v-model="addModel.startSectionCode" clearable :filterable="true">
|
||||
<el-select v-model="addModel.startSectionCode" clearable :filterable="true" :disabled="editShow">
|
||||
<el-option
|
||||
v-for="item in filterSectionList"
|
||||
:key="item.code"
|
||||
@ -28,6 +28,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:disabled="editShow"
|
||||
:type=" field === 'startSectionCode' ? 'danger' : 'primary'"
|
||||
@click="hover('startSectionCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
@ -47,7 +48,7 @@
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.endSectionColon')" prop="endSectionCode">
|
||||
<el-select v-model="addModel.endSectionCode" clearable :filterable="true">
|
||||
<el-select v-model="addModel.endSectionCode" clearable :filterable="true" :disabled="editShow">
|
||||
<el-option
|
||||
v-for="item in filterSectionList"
|
||||
:key="item.code"
|
||||
@ -56,6 +57,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:disabled="editShow"
|
||||
:type=" field === 'endSectionCode' ? 'danger' : 'primary'"
|
||||
@click="hover('endSectionCode')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
@ -206,8 +208,6 @@ export default {
|
||||
routeData(val, old) {
|
||||
if (val) {
|
||||
this.addModel = val;
|
||||
this.display = true;
|
||||
this.editShow = true;
|
||||
this.runLevelId = '';
|
||||
if (val.id) {
|
||||
this.runLevelId = val.id;
|
||||
@ -247,12 +247,16 @@ export default {
|
||||
const endStation = this.$store.getters['map/getDeviceByCode'](this.addModel.endStationCode);
|
||||
this.addModel.distance = Math.abs(startStation.kmRange - endStation.kmRange);
|
||||
},
|
||||
editData() {
|
||||
this.isSave = false;
|
||||
this.editShow = true;
|
||||
this.display = true;
|
||||
},
|
||||
generateLevel() { // 生成运行等级
|
||||
this.$refs.form.validate(async (valid) => {
|
||||
if (valid) {
|
||||
postGenerateLevel(this.addModel).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.display = 2;
|
||||
this.addModel.l1 = res.data.l1;
|
||||
this.addModel.l2 = res.data.l2;
|
||||
this.addModel.l3 = res.data.l3;
|
||||
@ -321,8 +325,7 @@ export default {
|
||||
clear() {
|
||||
if (this.$refs && this.$refs.form && this.mapInfo) {
|
||||
this.$refs.form.resetFields();
|
||||
this.display = 1;
|
||||
this.editShow = false;
|
||||
this.display = false;
|
||||
this.addModel = {
|
||||
mapId: this.mapInfo.id,
|
||||
code: setUID('RunLevel'),
|
||||
@ -339,6 +342,7 @@ export default {
|
||||
l5: 0
|
||||
};
|
||||
this.loading = false;
|
||||
this.editShow = false;
|
||||
}
|
||||
},
|
||||
hover(field) {
|
||||
|
Loading…
Reference in New Issue
Block a user