供电线调整
This commit is contained in:
parent
9dc3a4528d
commit
e3689773b2
174
src/jmapNew/theme/components/menus/dialog/loadSpareTrain.vue
Normal file
174
src/jmapNew/theme/components/menus/dialog/loadSpareTrain.vue
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-dialogDrag
|
||||||
|
:class="systemName+' train-set-plan'"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="360px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="11">车组号</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-input v-model="addModel.groupNumber" size="mini" :disabled="true" />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="11">上下行</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-select v-model="addModel.right" size="mini">
|
||||||
|
<el-option :value="true" :label="rightTrueLabel" />
|
||||||
|
<el-option :value="false" :label="rightFalseLabel" />
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row justify="center" class="button-group">
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="5">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
|
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 {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TrainSetPlan',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
|
props:{
|
||||||
|
systemName:{
|
||||||
|
type:String,
|
||||||
|
required:true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
trainNoList: [],
|
||||||
|
selected: null,
|
||||||
|
messageTip1:'',
|
||||||
|
addModel: {
|
||||||
|
groupNumber: '',
|
||||||
|
right: '',
|
||||||
|
sectionCode: ''
|
||||||
|
},
|
||||||
|
dialogShow: false,
|
||||||
|
loading: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('map', [
|
||||||
|
'mapConfig'
|
||||||
|
]),
|
||||||
|
show() {
|
||||||
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
|
},
|
||||||
|
domIdCancel() {
|
||||||
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
|
},
|
||||||
|
domIdConfirm() {
|
||||||
|
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||||
|
},
|
||||||
|
title() {
|
||||||
|
return '设置计划车';
|
||||||
|
},
|
||||||
|
rightTrueLabel() {
|
||||||
|
return this.mapConfig.upRight ? '上行' : '下行';
|
||||||
|
},
|
||||||
|
rightFalseLabel() {
|
||||||
|
return this.mapConfig.upRight ? '下行' : '上行';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch:{},
|
||||||
|
mounted() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$store.dispatch('training/tipReload');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(operate, selected) {
|
||||||
|
this.selected = selected;
|
||||||
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
|
// if (!this.dialogShow) {
|
||||||
|
// }
|
||||||
|
this.addModel.sectionCode = selected.code;
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(function () {
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.loading = false;
|
||||||
|
this.dialogShow = false;
|
||||||
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
|
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||||
|
mouseCancelState(this.selected);
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
if (!this.addModel.groupNumber) {
|
||||||
|
this.messageTip1 = '请输入车组号';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const params = {
|
||||||
|
groupNumber: this.addModel.groupNumber,
|
||||||
|
sectionCode: this.addModel.sectionCode,
|
||||||
|
right: this.addModel.right
|
||||||
|
};
|
||||||
|
this.messageTip1 = '';
|
||||||
|
this.loading = true;
|
||||||
|
commitOperate(menuOperate.Section.loadSpareTrain, params, 2).then(({valid})=>{
|
||||||
|
this.loading = false;
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
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>
|
||||||
|
/deep/ .el-row {
|
||||||
|
margin: 10px
|
||||||
|
}
|
||||||
|
|
||||||
|
.ningbo-01__systerm .el-dialog .base-label {
|
||||||
|
// background: rgba(0, 0, 0, x);
|
||||||
|
position: relative;
|
||||||
|
left: -5px;
|
||||||
|
top: -18px;
|
||||||
|
padding: 0 5px;
|
||||||
|
background-color: #F0F0F0;
|
||||||
|
}
|
||||||
|
</style>
|
@ -64,6 +64,11 @@ export const menuOperate = {
|
|||||||
// 区段详情
|
// 区段详情
|
||||||
operation: OperationEvent.Section.detail.menu.operation,
|
operation: OperationEvent.Section.detail.menu.operation,
|
||||||
cmdType: CMD.Section.CMD_SECTION_DETAILS
|
cmdType: CMD.Section.CMD_SECTION_DETAILS
|
||||||
|
},
|
||||||
|
loadSpareTrain: {
|
||||||
|
// 添加备用车
|
||||||
|
operation: OperationEvent.Section.loadSpareTrain.menu.operation,
|
||||||
|
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Signal:{
|
Signal:{
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||||
<train-add-plan ref="trainAddPlan" pop-class="ningbo-01__systerm" />
|
<train-add-plan ref="trainAddPlan" pop-class="ningbo-01__systerm" />
|
||||||
|
<load-spare-train ref="loadSpareTrain" pop-class="ningbo-01__systerm" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -15,6 +16,7 @@
|
|||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||||
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
|
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
|
||||||
|
import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain';
|
||||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||||
import SectionUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock';
|
import SectionUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock';
|
||||||
import SpeedLimitControl from '@/jmapNew/theme/components/menus/dialog/speedCmdControl';
|
import SpeedLimitControl from '@/jmapNew/theme/components/menus/dialog/speedCmdControl';
|
||||||
@ -36,7 +38,8 @@ export default {
|
|||||||
AlxeEffective,
|
AlxeEffective,
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
TrainAddPlan,
|
TrainAddPlan,
|
||||||
SetFault
|
SetFault,
|
||||||
|
LoadSpareTrain
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -102,6 +105,11 @@ export default {
|
|||||||
label: '取消临时限速',
|
label: '取消临时限速',
|
||||||
handler: this.cancelSpeed,
|
handler: this.cancelSpeed,
|
||||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '加载备用车',
|
||||||
|
handler: this.loadSpare,
|
||||||
|
cmdType: CMD.Section.CMD_TRAIN_LOAD_SPARE_TRAIN
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -270,6 +278,13 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
loadSpare() {
|
||||||
|
commitOperate(menuOperate.Section.loadSpareTrain, {sectionCode:this.selected.code}).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.loadSpareTrain.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
|
@ -1464,6 +1464,12 @@ export const OperationEvent = {
|
|||||||
operation: '414',
|
operation: '414',
|
||||||
domId: '_Tips-Section-Confirm-Limit-Menu'
|
domId: '_Tips-Section-Confirm-Limit-Menu'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
loadSpareTrain: {
|
||||||
|
menu: {
|
||||||
|
operation: '415',
|
||||||
|
domId: '_Tips-Section-Load-Spare-Train'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ export function getBaseUrl() {
|
|||||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.169:9000'; // 旭强
|
// BASE_API = 'http://192.168.8.144:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.175:9000'; // 张赛
|
// BASE_API = 'http://192.168.3.175:9000'; // 张赛
|
||||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
|
@ -19,6 +19,12 @@
|
|||||||
@create="create"
|
@create="create"
|
||||||
/>
|
/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane class="view-control" :label="$t('map.batchSettings')" name="third" :lazy="lazy">
|
||||||
|
<div style="width: 100%;text-align: center;">
|
||||||
|
<div style="margin-bottom: 10px;font-size: 12px;">根据左右端点区段重置供电线坐标</div>
|
||||||
|
<el-button type="primary" @click="batchSetPosition">批量设置</el-button>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -169,10 +175,34 @@ export default {
|
|||||||
this.field = field == this.field ? '' : field;
|
this.field = field == this.field ? '' : field;
|
||||||
if (this.field) {
|
if (this.field) {
|
||||||
this.$emit('deviceSelect', 'Power');
|
this.$emit('deviceSelect', 'Power');
|
||||||
|
} else {
|
||||||
|
this.$emit('deviceSelect', '');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
batchSetPosition() {
|
||||||
|
const models = [];
|
||||||
|
this.powerLineList.forEach(item => {
|
||||||
|
if (item.leftSectionCode && item.leftTerminal) {
|
||||||
|
const section = this.$store.getters['map/getDeviceByCode'](item.leftSectionCode);
|
||||||
|
item.points[0].x = section.points[0].x + 10;
|
||||||
|
} else if (item.leftSectionCode && !item.leftTerminal) {
|
||||||
|
const section = this.$store.getters['map/getDeviceByCode'](item.leftSectionCode);
|
||||||
|
item.points[0].x = section.points[0].x;
|
||||||
|
}
|
||||||
|
if (item.rightSectionCode) {
|
||||||
|
const section = this.$store.getters['map/getDeviceByCode'](item.rightSectionCode);
|
||||||
|
item.points[item.points.length - 1].x = section.points[section.points.length - 1].x;
|
||||||
|
}
|
||||||
|
if (item.rightSectionCode || item.leftSectionCode) {
|
||||||
|
models.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log(models);
|
||||||
|
this.$emit('updateMapModel', models);
|
||||||
|
},
|
||||||
tabClick() {
|
tabClick() {
|
||||||
this.field = '';
|
this.field = '';
|
||||||
|
this.$emit('deviceSelect', '');
|
||||||
},
|
},
|
||||||
deviceChange(code) {
|
deviceChange(code) {
|
||||||
this.$emit('setCenter', code);
|
this.$emit('setCenter', code);
|
||||||
@ -183,14 +213,21 @@ export default {
|
|||||||
this.$refs.form && this.$refs.form.resetFields();
|
this.$refs.form && this.$refs.form.resetFields();
|
||||||
this.$refs.make && this.$refs.make.resetFields();
|
this.$refs.make && this.$refs.make.resetFields();
|
||||||
this.activeName = 'first';
|
this.activeName = 'first';
|
||||||
|
this.initEditModel();
|
||||||
this.editModel = deepAssign(this.editModel, selected);
|
this.editModel = deepAssign(this.editModel, selected);
|
||||||
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field === 'leftSectionCode' && this.activeName === 'first') {
|
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field === 'leftSectionCode' && this.activeName === 'first') {
|
||||||
this.editModel.leftSectionCode = selected.code;
|
this.editModel.leftSectionCode = selected.code;
|
||||||
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field === 'leftSectionCode' && this.activeName === 'second') {
|
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field === 'leftSectionCode' && this.activeName === 'second') {
|
||||||
this.addModel.leftSectionCode = selected.code;
|
this.addModel.leftSectionCode = selected.code;
|
||||||
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field === 'rightSectionCode' && this.activeName === 'first') {
|
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field === 'rightSectionCode' && this.activeName === 'first') {
|
||||||
|
if (selected.lengthFact) {
|
||||||
|
this.editModel.rightOffset = selected.lengthFact;
|
||||||
|
}
|
||||||
this.editModel.rightSectionCode = selected.code;
|
this.editModel.rightSectionCode = selected.code;
|
||||||
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field === 'rightSectionCode' && this.activeName === 'second') {
|
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field === 'rightSectionCode' && this.activeName === 'second') {
|
||||||
|
if (selected.lengthFact) {
|
||||||
|
this.addModel.rightOffset = selected.lengthFact;
|
||||||
|
}
|
||||||
this.addModel.rightSectionCode = selected.code;
|
this.addModel.rightSectionCode = selected.code;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -240,6 +277,20 @@ export default {
|
|||||||
// 修改对象
|
// 修改对象
|
||||||
edit() {
|
edit() {
|
||||||
this.$refs.dataform.edit();
|
this.$refs.dataform.edit();
|
||||||
|
},
|
||||||
|
initEditModel() {
|
||||||
|
this.editModel = {
|
||||||
|
code: '',
|
||||||
|
width: 1,
|
||||||
|
leftTerminal: true, // 左端点显示
|
||||||
|
rightTerminal: true,
|
||||||
|
showConditions: '01', // 显示条件
|
||||||
|
points: [],
|
||||||
|
leftSectionCode: '',
|
||||||
|
leftOffset: 0,
|
||||||
|
rightSectionCode: '',
|
||||||
|
rightOffset: 0
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user