Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
64cbe4c857
@ -57,8 +57,10 @@ export default class Section extends Group {
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
this.zlevel = model.zlevel;
|
||||
model.points = store.getters['map/amendPoints'](this._code, model.points);
|
||||
// console.log(store.getters['map/amendPoints'](this._code, model.points), '5555555');
|
||||
const amendData = store.getters['map/amendPoints'](this._code);
|
||||
if (amendData) {
|
||||
model.points = amendData.points;
|
||||
}
|
||||
this.z = 5 + parseInt(model.layer || 0);
|
||||
this.model = model;
|
||||
this.style = style;
|
||||
|
@ -189,6 +189,11 @@ class Signal extends Group {
|
||||
super();
|
||||
this._code = model.code;
|
||||
this._type = model._type;
|
||||
const amendData = store.getters['map/amendPoints'](this._code);
|
||||
if (amendData) {
|
||||
model.position = amendData.position;
|
||||
model.rotate = amendData.rotate;
|
||||
}
|
||||
this.model = model;
|
||||
this.mapDevice = mapDevice;
|
||||
this.style = style;
|
||||
|
@ -666,23 +666,21 @@ const map = {
|
||||
|
||||
return device;
|
||||
},
|
||||
amendPoints: state => (code, points) => {
|
||||
amendPoints: state => (code) => {
|
||||
let amendData = null;
|
||||
if (state.map && state.map.displayList && state.map.displayList.length && store.state.training.prdType) {
|
||||
let returnPoints = points;
|
||||
state.map.displayList.forEach(item => {
|
||||
const section = findElement(item.amendPointsList || [], code);
|
||||
if (store.state.training.prdType === '01' && item.type === 'LOCAL' && section) {
|
||||
returnPoints = section.points;
|
||||
} else if (['02', '04', '05'].includes(store.state.training.prdType) && item.type === 'CENTER' && section) {
|
||||
returnPoints = section.points;
|
||||
} else if (store.state.training.prdType === '09' && item.type === 'DEPOT_IL' && section) {
|
||||
returnPoints = section.points;
|
||||
const tepData = findElement(item.amendPointsList || [], code);
|
||||
if (store.state.training.prdType === '01' && item.type === 'LOCAL' && tepData) {
|
||||
amendData = tepData;
|
||||
} else if (['02', '04', '05'].includes(store.state.training.prdType) && item.type === 'CENTER' && tepData) {
|
||||
amendData = tepData;
|
||||
} else if (store.state.training.prdType === '09' && item.type === 'DEPOT_IL' && tepData) {
|
||||
amendData = tepData;
|
||||
}
|
||||
});
|
||||
return returnPoints;
|
||||
} else {
|
||||
return points;
|
||||
}
|
||||
return amendData;
|
||||
},
|
||||
checkDeviceShow: state => deviceCode => {
|
||||
if (state.map && state.map.displayList && state.map.displayList.length && store.state.training.prdType) {
|
||||
|
@ -2,10 +2,10 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.152:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.8.177:9000'; // 旭强
|
||||
BASE_API = 'http://192.168.8.109:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.172:9200'; // 旭强
|
||||
// BASE_API = 'http://192.168.8.109:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
|
@ -124,6 +124,7 @@ export default {
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearSimulation(this.group);
|
||||
this.$store.dispatch('training/setSimulationUserList', []);
|
||||
this.$store.dispatch('training/reset');
|
||||
// this.$store.dispatch('map/mapClear');
|
||||
},
|
||||
|
@ -19,7 +19,7 @@
|
||||
<div style="padding: 10px;font-size: 14px;">
|
||||
<div class="content-box-list" style="margin-top: 10px">
|
||||
<div style="height: 30px;line-height: 30px;margin-bottom: 10px;">
|
||||
<span class="title-box">修正区段列表</span>
|
||||
<span class="title-box">修正设备列表</span>
|
||||
<el-button icon="el-icon-plus" size="mini" style="float:right;" circle @click="addAmendPoints" />
|
||||
</div>
|
||||
<template v-for="(elem, i) in amendPointsList">
|
||||
@ -29,21 +29,21 @@
|
||||
</el-row>
|
||||
<el-row style="height: 28px;line-height: 28px">
|
||||
<el-col :span="5">
|
||||
<span>修正区段:</span>
|
||||
<span>修正设备:</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-select v-model="elem.code" filterable size="mini" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
v-for="item in [...sectionList, ...signalList]"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:label="item.name + '(' + item.code + ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;height: 28px;line-height: 28px">
|
||||
<el-col :span="5">
|
||||
<el-row v-if="checkDeviceType(elem, 'points')" style="margin-top: 10px;">
|
||||
<el-col :span="5" style="height: 28px;line-height: 28px">
|
||||
<span>坐标点:</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
@ -58,6 +58,24 @@
|
||||
</template>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="checkDeviceType(elem, 'position')" style="margin-top: 10px;height: 28px;line-height: 28px">
|
||||
<el-col :span="5">
|
||||
<span>坐标点:</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-input-number v-model="elem.position.x" style="width: 100px" size="mini" controls-position="right" />
|
||||
<span style="line-height: 28px;">, </span>
|
||||
<el-input-number v-model="elem.position.y" style="width: 100px" size="mini" controls-position="right" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="checkDeviceType(elem, 'rotate')" style="margin-top: 10px;height: 28px;line-height: 28px">
|
||||
<el-col :span="5">
|
||||
<span>旋转角度:</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-input-number v-model="elem.rotate" style="width: 100px" size="mini" :min="-360" :max="360" controls-position="right" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
</div>
|
||||
@ -155,6 +173,17 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
checkDeviceType(data, prop) {
|
||||
if (data.code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](data.code);
|
||||
if (device._type === 'Section' && prop === 'points') {
|
||||
return true;
|
||||
} else if (device._type === 'Signal' && (prop === 'position' || prop === 'rotate')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
getDeviceName(code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return device.name || device.code;
|
||||
@ -192,7 +221,7 @@ export default {
|
||||
});
|
||||
},
|
||||
addAmendPoints() {
|
||||
this.amendPointsList.push({ code: '', points: [{ x: 0, y: 0 }, { x:0, y:0 }] });
|
||||
this.amendPointsList.push({ code: '', points: [{ x: 0, y: 0 }, { x:0, y:0 }], position: {x: 0, y: 0}, rotate:0 });
|
||||
},
|
||||
delAmendPoints(index) {
|
||||
this.amendPointsList.splice(index, 1);
|
||||
@ -226,28 +255,33 @@ export default {
|
||||
type: 'CENTER',
|
||||
elementList: []
|
||||
};
|
||||
const station = this.stationList.find(item => item.depot);
|
||||
const stationCodes = [];
|
||||
this.stationList.forEach(item => {
|
||||
if (item.depot) {
|
||||
stationCodes.push(item.code);
|
||||
}
|
||||
});
|
||||
|
||||
[...this.sectionList, ...this.signalList, ...this.stationStandList, ...this.switchList, ...this.automaticRouteButtonList,
|
||||
...this.axleCounterResetButtonList, ...this.cycleButtonList, ...this.indicatorLightList, ...this.lineList, ...this.outerFrameList,
|
||||
...this.responderList, ...this.tbStrategyList, ...this.tempSpeedLimitList, ...this.textList, ...this.totalGuideLockButtonVOList].forEach(item => {
|
||||
if (item.stationCode !== station.code) {
|
||||
if (!stationCodes.includes(item.stationCode)) {
|
||||
this.addModel.elementList.push(item.code);
|
||||
}
|
||||
});
|
||||
[...this.directionRodList].forEach(item => {
|
||||
if (item.deviceStationCode !== station.code) {
|
||||
if (!stationCodes.includes(item.deviceStationCode)) {
|
||||
this.addModel.elementList.push(item.code);
|
||||
}
|
||||
});
|
||||
this.stationList.forEach(item => {
|
||||
if (item.code !== station.code) {
|
||||
if (!stationCodes.includes(item.code)) {
|
||||
this.addModel.elementList.push(item.code);
|
||||
}
|
||||
});
|
||||
this.psdList.forEach(item => {
|
||||
const stand = this.$store.getters['map/getDeviceByCode'](item.standCode);
|
||||
if (stand.stationCode !== station.code) {
|
||||
if (!stationCodes.includes(stand.stationCode)) {
|
||||
this.addModel.elementList.push(item.code);
|
||||
}
|
||||
});
|
||||
|
@ -70,16 +70,16 @@
|
||||
<el-col :span="19">
|
||||
<el-select v-model="elem.code" filterable size="mini" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
v-for="item in [...sectionList, ...signalList]"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:label="item.name + '(' + item.code + ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;height: 28px;line-height: 28px">
|
||||
<el-col :span="5">
|
||||
<el-row v-if="checkDeviceType(elem, 'points')" style="margin-top: 10px;">
|
||||
<el-col :span="5" style="height: 28px;line-height: 28px">
|
||||
<span>坐标点:</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
@ -94,6 +94,24 @@
|
||||
</template>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="checkDeviceType(elem, 'position')" style="margin-top: 10px;height: 28px;line-height: 28px">
|
||||
<el-col :span="5">
|
||||
<span>坐标点:</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-input-number v-model="elem.position.x" style="width: 100px" size="mini" controls-position="right" />
|
||||
<span style="line-height: 28px;">, </span>
|
||||
<el-input-number v-model="elem.position.y" style="width: 100px" size="mini" controls-position="right" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="checkDeviceType(elem, 'rotate')" style="margin-top: 10px;height: 28px;line-height: 28px">
|
||||
<el-col :span="5">
|
||||
<span>旋转角度:</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-input-number v-model="elem.rotate" style="width: 100px" size="mini" :min="-360" :max="360" controls-position="right" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
</div>
|
||||
@ -211,6 +229,17 @@ export default {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return device.name || device.code;
|
||||
},
|
||||
checkDeviceType(data, prop) {
|
||||
if (data.code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](data.code);
|
||||
if (device._type === 'Section' && prop === 'points') {
|
||||
return true;
|
||||
} else if (device._type === 'Signal' && (prop === 'position' || prop === 'rotate')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
deleteModel(list, index) {
|
||||
list.splice(index, 1);
|
||||
this.list.pop();
|
||||
@ -300,7 +329,7 @@ export default {
|
||||
this.cardMode = 'generate';
|
||||
},
|
||||
addAmendPoints() {
|
||||
this.amendPointsList.push({ code: '', points: [{ x: 0, y: 0 }, { x:0, y:0 }] });
|
||||
this.amendPointsList.push({ code: '', points: [{ x: 0, y: 0 }, { x:0, y:0 }], position: {x: 0, y: 0}, rotate:0 });
|
||||
},
|
||||
delAmendPoints(index) {
|
||||
this.amendPointsList.splice(index, 1);
|
||||
|
@ -81,7 +81,7 @@
|
||||
<el-col :span="19">
|
||||
<el-select v-model="elem.code" filterable size="mini" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
v-for="item in [...sectionList, ...signalList]"
|
||||
:key="item.code"
|
||||
:label="item.name + '(' + item.code + ')'"
|
||||
:value="item.code"
|
||||
@ -89,8 +89,8 @@
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;height: 28px;line-height: 28px">
|
||||
<el-col :span="5">
|
||||
<el-row v-if="checkDeviceType(elem, 'points')" style="margin-top: 10px;">
|
||||
<el-col :span="5" style="height: 28px;line-height: 28px;">
|
||||
<span>坐标点:</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
@ -105,6 +105,24 @@
|
||||
</template>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="checkDeviceType(elem, 'position')" style="margin-top: 10px;height: 28px;line-height: 28px">
|
||||
<el-col :span="5">
|
||||
<span>坐标点:</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-input-number v-model="elem.position.x" style="width: 100px" size="mini" controls-position="right" />
|
||||
<span style="line-height: 28px;">, </span>
|
||||
<el-input-number v-model="elem.position.y" style="width: 100px" size="mini" controls-position="right" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="checkDeviceType(elem, 'rotate')" style="margin-top: 10px;height: 28px;line-height: 28px">
|
||||
<el-col :span="5">
|
||||
<span>旋转角度:</span>
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<el-input-number v-model="elem.rotate" style="width: 100px" size="mini" :min="-360" :max="360" controls-position="right" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
</div>
|
||||
@ -232,6 +250,17 @@ export default {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return device.name || device.code;
|
||||
},
|
||||
checkDeviceType(data, prop) {
|
||||
if (data.code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](data.code);
|
||||
if (device._type === 'Section' && prop === 'points') {
|
||||
return true;
|
||||
} else if (device._type === 'Signal' && (prop === 'position' || prop === 'rotate')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
deleteModel(list, index) {
|
||||
list.splice(index, 1);
|
||||
this.list.pop();
|
||||
@ -373,7 +402,7 @@ export default {
|
||||
});
|
||||
},
|
||||
addAmendPoints() {
|
||||
this.amendPointsList.push({ code: '', points: [{ x: 0, y: 0 }, { x:0, y:0 }] });
|
||||
this.amendPointsList.push({ code: '', points: [{ x: 0, y: 0 }, { x:0, y:0 }], position: {x: 0, y: 0}, rotate:0 });
|
||||
},
|
||||
delAmendPoints(index) {
|
||||
this.amendPointsList.splice(index, 1);
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag title="导出地图" :visible.sync="dialogVisible" width="20%" center>
|
||||
<el-checkbox-group v-model="checkList">
|
||||
<el-checkbox v-for="(item, indexs) in checksModels" :key="indexs" :label="item.value" style="margin-bottom: 7px;" :disabled="item.selected">{{ item.label }}</el-checkbox>
|
||||
<el-checkbox v-for="(item, indexs) in checksModels" :key="indexs" :label="item.value" style="margin-bottom: 7px;">{{ item.label }}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="confirm">{{ $t('global.confirm') }}</el-button>
|
||||
@ -20,16 +20,16 @@ export default {
|
||||
index: '',
|
||||
row: '',
|
||||
idx: '',
|
||||
checkList: ['MAP_DATA', 'REAL_LINE_CONFIG'],
|
||||
checkList: [],
|
||||
checksModels: [
|
||||
{ label: '地图数据', value: 'MAP_DATA', selected: true },
|
||||
{ label: '地图数据', value: 'MAP_DATA' },
|
||||
{ label: '运行图数据', value: 'RUN_PLAN' },
|
||||
{ label: '3d数据', value: 'MAP_3D_DATA' },
|
||||
{ label: 'ibp数据', value: 'ibp' },
|
||||
{ label: 'iscs数据', value: 'iscs' },
|
||||
{ label: '指令定义', value: 'COMMAND_DEFINITION' },
|
||||
{ label: '剧本数据', value: 'script' },
|
||||
{ label: '线路配置', value: 'REAL_LINE_CONFIG', selected: true }
|
||||
{ label: '线路配置', value: 'REAL_LINE_CONFIG'}
|
||||
]
|
||||
};
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user