Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
# Conflicts: # src/views/newMap/newMapdraft/dataRelation/routeoperate/route.vue
This commit is contained in:
commit
e300164580
@ -370,6 +370,8 @@ class SkinCode extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.ZcControl] = {
|
||||
// 是否显示
|
||||
visible:true,
|
||||
text: {
|
||||
fontSize: 11, // 字体大小
|
||||
fontWeight: 'normal', // 字体粗细
|
||||
|
@ -10,7 +10,7 @@ export default class EMouse extends Group {
|
||||
}
|
||||
create() {
|
||||
if (this.device && this.device.model.visible) {
|
||||
const stationTextRect = this.device.stationText.getBoundingRect();
|
||||
const stationTextRect = this.device.stationText.getBoundingRect().clone();
|
||||
// const path = window.location.href;
|
||||
// if (this.device.style.Station.kmPostShow || path.includes('/map/draw')) {
|
||||
// const mileageTextRect = this.device.mileageText.getBoundingRect();
|
||||
|
@ -259,14 +259,14 @@ export default class Station extends Group {
|
||||
|
||||
getBoundingRect() {
|
||||
if (this.model.visible) {
|
||||
const rect = this.stationText.getBoundingRect();
|
||||
// if (this.model.subheadDisplay) {
|
||||
// const subheadText = this.subheadText.getBoundingRect();
|
||||
// rect.union(subheadText);
|
||||
// return rect;
|
||||
// } else {
|
||||
return rect;
|
||||
// }
|
||||
const rect = this.stationText.getBoundingRect().clone();
|
||||
if (this.model.subheadDisplay) {
|
||||
const subheadText = this.subheadText.getBoundingRect();
|
||||
rect.union(subheadText);
|
||||
return rect;
|
||||
} else {
|
||||
return rect;
|
||||
}
|
||||
} else {
|
||||
return new BoundingRect(0, 0, 0, 0);
|
||||
}
|
||||
|
@ -25,20 +25,20 @@ export function getUID(type, list) {
|
||||
// else if (type == 'W') {
|
||||
// name = list.length ? Number(list[list.length - 1].code.replace('W', '')) + 1 : list.length + 1;
|
||||
// }
|
||||
function checkUid() {
|
||||
let count = 0;
|
||||
function checkUid(name) {
|
||||
for (let index = 0; index < list.length; index++) {
|
||||
count++;
|
||||
if (list[index].code == [(type || ''), name].join('')) {
|
||||
name++;
|
||||
return checkUid();
|
||||
return checkUid(name);
|
||||
}
|
||||
}
|
||||
return count == list.length;
|
||||
return name;
|
||||
}
|
||||
if (checkUid()) {
|
||||
return [(type || ''), name].join('');
|
||||
const nameNum = checkUid(name);
|
||||
if (nameNum) {
|
||||
return [(type || ''), nameNum].join('');
|
||||
}
|
||||
|
||||
// } else {
|
||||
// return [(type || ''), Math.floor((Math.random() * 100000) + 1)].join('');
|
||||
// }
|
||||
|
@ -3,11 +3,11 @@ 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.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
} else {
|
||||
BASE_API = process.env.VUE_APP_BASE_API;
|
||||
}
|
||||
|
@ -45,7 +45,6 @@
|
||||
<div class="btn-buy">
|
||||
<el-button :disabled="disabled" type="success" @click="buy">{{ $t('exam.buy') }}</el-button>
|
||||
<el-button v-if="hasPermssion" :disabled="disabled" type="primary" @click="distribute">{{ $t('exam.distributePermission') }}</el-button>
|
||||
<!-- <el-button v-if="hasPermssion" :disabled="disabled" type="primary" @click="transfer">{{ $t('global.transferQRCode') }}</el-button> -->
|
||||
<el-button v-if="hasPermssion" :disabled="disabled" type="primary" @click="checkCourse">{{ $t('exam.viewCoursePapers') }}</el-button>
|
||||
<el-button type="primary" :disabled="disabled" @click="backLessonList">{{ $t('exam.returnCourseList') }}</el-button>
|
||||
</div>
|
||||
@ -155,14 +154,6 @@ export default {
|
||||
});
|
||||
}, 100);
|
||||
},
|
||||
transfer() { // 转增
|
||||
this.disabled = true;
|
||||
if (this.$refs) {
|
||||
this.activeName = 'second';
|
||||
this.$refs.limitList.transfer(this.courseModel);
|
||||
}
|
||||
this.disabled = false;
|
||||
},
|
||||
distribute() { // 分发
|
||||
this.disabled = true;
|
||||
if (this.$refs) {
|
||||
|
@ -216,29 +216,23 @@ export default {
|
||||
initCancelMenu() {
|
||||
this.menuNormal = [];
|
||||
this.stationList.forEach(station => {
|
||||
if (station.code === station.concentrateStationCode) {
|
||||
if (station.centralized) {
|
||||
const node = {
|
||||
label: station.name,
|
||||
children: []
|
||||
children: [{
|
||||
code: station.code,
|
||||
label: station.name,
|
||||
handler: this.mapLocation
|
||||
}]
|
||||
};
|
||||
|
||||
this.stationList.forEach(elem => {
|
||||
if (elem.visible) {
|
||||
let next = elem;
|
||||
while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
|
||||
next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
|
||||
}
|
||||
|
||||
if (station.code == next.code) {
|
||||
node.children.push({
|
||||
code: elem.code,
|
||||
label: elem.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
}
|
||||
}
|
||||
station.chargeStationCodeList.forEach(item => {
|
||||
const stationModel = this.$store.getters['map/getDeviceByCode'](item);
|
||||
node.children.push({
|
||||
code: stationModel.code,
|
||||
label: stationModel.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
});
|
||||
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
|
@ -64,19 +64,19 @@ export default {
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('map.psdList'),
|
||||
prop: 'psdList',
|
||||
title: '关联站台列表',
|
||||
prop: 'stationStandList',
|
||||
type: 'tagMore',
|
||||
columnValue: (row) => { return this.$convertField(row.psdList, this.psdList, ['code', 'name'], true); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('map.espList'),
|
||||
prop: 'espList',
|
||||
type: 'tagMore',
|
||||
columnValue: (row) => { return this.$convertField(row.espList, this.espList, ['code', 'name'], true); },
|
||||
columnValue: (row) => { return this.$convertField(row.stationStandList, this.stationStandList, ['code', 'name'], true); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
// {
|
||||
// title: this.$t('map.espList'),
|
||||
// prop: 'espList',
|
||||
// type: 'tagMore',
|
||||
// columnValue: (row) => { return this.$convertField(row.espList, this.espList, ['code', 'name'], true); },
|
||||
// tagType: (row) => { return ''; }
|
||||
// },
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('map.operation'),
|
||||
@ -101,8 +101,7 @@ export default {
|
||||
...mapGetters('map', [
|
||||
'sectionList',
|
||||
'signalList',
|
||||
'espList',
|
||||
'psdList'
|
||||
'stationStandList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
|
@ -29,25 +29,19 @@
|
||||
@click="hover('sectionList')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.psdList') + ':'" prop="psdList">
|
||||
<el-select v-model="addModel.psdList" multiple clearable :filterable="true">
|
||||
<el-form-item label="关联站台列表:" prop="stationStandList">
|
||||
<el-select v-model="addModel.stationStandList" multiple clearable :filterable="true" style="width: 220px;">
|
||||
<el-option
|
||||
v-for="item in psdList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.espList') + ':'" prop="espList">
|
||||
<el-select v-model="addModel.espList" multiple clearable :filterable="true">
|
||||
<el-option
|
||||
v-for="item in espList"
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type=" field === 'routeStationStandList' ? 'danger' : 'primary'"
|
||||
@click="hover('routeStationStandList')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.alwaysRed') + ':'" prop="alwaysRed">
|
||||
<el-radio-group v-model="addModel.alwaysRed">
|
||||
@ -111,8 +105,7 @@ export default {
|
||||
signalCode: '',
|
||||
alwaysRed: true,
|
||||
sectionList: [],
|
||||
psdList: [],
|
||||
espList: []
|
||||
stationStandList: []
|
||||
},
|
||||
editShow: false,
|
||||
rules: {
|
||||
@ -128,7 +121,8 @@ export default {
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'sectionList'
|
||||
'sectionList',
|
||||
'stationStandList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
@ -162,6 +156,10 @@ export default {
|
||||
if (this.addModel.sectionList.indexOf(selected.code) === -1) {
|
||||
this.addModel.sectionList.push(selected.code);
|
||||
}
|
||||
} else if (selected._type.toUpperCase() === 'StationStand'.toUpperCase() && this.field.toUpperCase() === 'routeStationStandList'.toUpperCase()) {
|
||||
if (this.addModel.stationStandList.indexOf(selected.code) === -1) {
|
||||
this.addModel.stationStandList.push(selected.code);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -168,30 +168,20 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.psdList') + ':'" prop="psdList">
|
||||
<el-select v-model="addModel.psdList" multiple clearable :filterable="true">
|
||||
<el-form-item label="关联站台列表:" prop="stationStandList">
|
||||
<el-select v-model="addModel.stationStandList" multiple clearable :filterable="true" style="width: 220px;">
|
||||
<el-option
|
||||
v-for="item in psdList"
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type=" field === 'routePsdList' ? 'danger' : 'primary'"
|
||||
@click="hover('routePsdList')"
|
||||
:type=" field === 'routeStationStandList' ? 'danger' : 'primary'"
|
||||
@click="hover('routeStationStandList')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.espList') + ':'" prop="espList">
|
||||
<el-select v-model="addModel.espList" multiple clearable :filterable="true">
|
||||
<el-option
|
||||
v-for="item in espList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.hostileApproachData') + ':'" prop="conflictingRouteList">
|
||||
<el-select v-model="addModel.conflictingRouteList" multiple clearable :filterable="true">
|
||||
<el-option
|
||||
@ -201,11 +191,6 @@
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<!-- <el-button type="primary" @click="selectedConflictingRouteList">选择</el-button> -->
|
||||
<!-- <el-button
|
||||
:type=" field === 'conflictingRouteList' ? 'danger' : 'primary'"
|
||||
@click="hover('conflictingRouteList')"
|
||||
>{{ $t('map.activate') }}</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<protect-operate ref="protect" :protect-data="protectData" @saveProtectSuccess="saveProtectSuccess" @updateProtectSuccess="updateProtectSuccess" />
|
||||
@ -283,9 +268,8 @@ export default {
|
||||
routeSectionList: [], // 进路物理区段
|
||||
routeSwitchList: [], // 进路道岔列表
|
||||
routeFlankProtectionList: [], // 进路侧防道岔列表
|
||||
psdList: [], // 站台屏蔽门数据列表
|
||||
espList: [], // 站台紧急停车按钮数据
|
||||
overlapCode:'', // 关联延续保护进路
|
||||
stationStandList: [], // 站台数据列表
|
||||
overlapCode:'',
|
||||
conflictingRouteList: [] // 敌对进路
|
||||
},
|
||||
protectData:null,
|
||||
@ -298,8 +282,6 @@ export default {
|
||||
'switchList',
|
||||
'sectionList',
|
||||
'stationList',
|
||||
'espList',
|
||||
'psdList',
|
||||
'stationStandList'
|
||||
]),
|
||||
routeName: {
|
||||
@ -375,9 +357,6 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.$Dictionary.normal().then(list => {
|
||||
// this.SwitchLocateTypeList = list;
|
||||
// });
|
||||
this.getRouteList();
|
||||
},
|
||||
methods: {
|
||||
@ -464,9 +443,7 @@ export default {
|
||||
this.addModel.mapId = this.mapInfo.id;
|
||||
this.addModel.routeSwitchList = [];
|
||||
this.addModel.routeFlankProtectionList = [];
|
||||
// if (this.selected && this.selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
||||
// this.addModel.stationCode = this.selected.code;
|
||||
// }
|
||||
this.addModel.overlapCode = '';
|
||||
this.isSave = true;
|
||||
this.$refs.protect.clear();
|
||||
}
|
||||
@ -503,8 +480,10 @@ export default {
|
||||
this.routeCode = selected.code;
|
||||
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase() && this.field.toUpperCase() === 'routeFlankProtectionList'.toUpperCase()) {
|
||||
this.flankCode = selected.code;
|
||||
} else if (selected._type.toUpperCase() === 'Psd'.toUpperCase() && this.field.toUpperCase() === 'routePsdList'.toUpperCase()) {
|
||||
this.addModel.psdList.push(selected.code);
|
||||
} else if (selected._type.toUpperCase() === 'StationStand'.toUpperCase() && this.field.toUpperCase() === 'routeStationStandList'.toUpperCase()) {
|
||||
if (this.addModel.stationStandList.indexOf(selected.code) === -1) {
|
||||
this.addModel.stationStandList.push(selected.code);
|
||||
}
|
||||
} else {
|
||||
this.$refs.protect.setSelected(selected);
|
||||
}
|
||||
|
@ -248,7 +248,6 @@ export default {
|
||||
reentryTrackName: '',
|
||||
reentryTrackNamePosition: { x: 0, y: 0 },
|
||||
transferTrack: false, // 是否转换轨
|
||||
// segmentation: false, // 是否分割
|
||||
segmentationPosition: { x: 0, y: 0 },
|
||||
transferTrackName: '',
|
||||
transferTrackNamePosition: { x: 0, y: 0 },
|
||||
@ -425,11 +424,6 @@ export default {
|
||||
{value: true, label: this.$t('map.fromSmallToLarge')},
|
||||
{value: false, label: this.$t('map.fromLargeToSmall')}
|
||||
] }, // 1
|
||||
// { prop: 'segmentation', label: this.$t('map.isSegmentation'), type: 'checkbox', isHidden: !this.isSwitchSectionType },
|
||||
// { prop: 'segmentationPosition', label: this.$t('map.segmentationPosition'), type: 'coordinate', width: '150px', isHidden: !this.issegmentationPosition, children: [
|
||||
// { prop: 'segmentationPosition.x', firstLevel: 'segmentationPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: true },
|
||||
// { prop: 'segmentationPosition.y', firstLevel: 'segmentationPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: true }
|
||||
// ] },
|
||||
{ prop: 'curve', label: this.$t('map.isCurve'), type: 'checkbox', isHidden: !this.isSwitchSectionType },
|
||||
{ prop: 'relevanceSectionList', label: '关联道岔区段:', type: 'multiSelect', optionLabel: 'name&&code', optionValue: 'code', options: this.switchSectionList, isHidden: this.isSwitchSectionType }
|
||||
]
|
||||
@ -444,7 +438,6 @@ export default {
|
||||
{ prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList, isHidden: !this.sectionColonShow },
|
||||
{ prop: 'kmRangeLeft', label: this.$t('map.leftKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') },
|
||||
{ prop: 'kmRangeRight', label: this.$t('map.rightKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') }
|
||||
// { prop: 'trainPosType', label: this.$t('map.trainDirection'), type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.TrainPositionTypeList }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -581,9 +574,6 @@ export default {
|
||||
isLogicSectionNameSort() { // 逻辑区段排序 判断
|
||||
return this.editModel.type == '01' && !this.editModel.switchSection;
|
||||
},
|
||||
// issegmentationPosition() {
|
||||
// return this.editModel.type !== '04' && this.editModel.segmentation;
|
||||
// },
|
||||
isPointsShow() {
|
||||
return this.editModel.type !== '04' && this.editModel.points.length > 0;
|
||||
},
|
||||
@ -670,7 +660,6 @@ export default {
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.editModel.logicSectionNum = selected.type === '01' ? selected.logicSectionNum : [0];
|
||||
// this.editModel.segmentation = selected.segmentation || false;
|
||||
this.editModel.points = JSON.parse(JSON.stringify(selected.points));
|
||||
this.oldPoint = JSON.parse(JSON.stringify(selected.points));
|
||||
this.oldLeftSectionCode = selected.leftSectionCode;
|
||||
@ -752,7 +741,6 @@ export default {
|
||||
transferTrackName: '',
|
||||
transferTrackNamePosition: { x: 0, y: 0 },
|
||||
switchSection: false, // 是否道岔管理区段
|
||||
// segmentation: false,
|
||||
segmentationPosition: { x: 0, y: 0 },
|
||||
relSwitchCode: '',
|
||||
rightSectionCode: '',
|
||||
@ -766,7 +754,6 @@ export default {
|
||||
logicSectionNameSort: true,
|
||||
sepTypeLeft: '01', // 分隔符类型
|
||||
sepTypeRight: '01',
|
||||
// trainPosType: '', // 默认不填写 列车所在方向
|
||||
lengthFact: 0,
|
||||
parentCode: '',
|
||||
relStandCode: '',
|
||||
@ -1030,7 +1017,6 @@ export default {
|
||||
transferTrackName: '',
|
||||
transferTrackNamePosition: { x: 0, y: 0 },
|
||||
switchSection: false,
|
||||
// segmentation: false,
|
||||
segmentationPosition: { x: 0, y: 0 },
|
||||
relSwitchCode: '',
|
||||
trainWindowCode: '',
|
||||
@ -1040,7 +1026,6 @@ export default {
|
||||
sepTypeLeft: index == 0 ? selected.sepTypeLeft : '01', // 左侧分隔符类型 (起始左侧按原来区段类型走 其余 默认 01)
|
||||
sepTypeRight: index == this.addModel.splitNumber ? selected.sepTypeRight : '01', // 右侧分隔符类型 (终点右侧按原来区段类型走 其余 默认 01)
|
||||
offsetRight: selected.offsetRight,
|
||||
// trainPosType: this.addModel.trainPosType,
|
||||
curve: selected.curve,
|
||||
lengthFact: 0,
|
||||
points: [
|
||||
@ -1119,7 +1104,6 @@ export default {
|
||||
standTrack: false,
|
||||
standTrackName: '',
|
||||
standTrackNamePosition: { x: 0, y: 0 },
|
||||
// segmentation: false,
|
||||
segmentationPosition: { x: 0, y: 0 },
|
||||
reentryTrack: false,
|
||||
reentryTrackName: '',
|
||||
|
@ -118,6 +118,7 @@ export default {
|
||||
{ x: beg.x + triangle.getCos(offset * (i + 1)), y: beg.y + triangle.getSin(offset * (i + 1)) }
|
||||
];
|
||||
const param = this.addLogicalSection(model, points, counts + i, offset, i, lineLength);
|
||||
param.lengthFact = Number(model.lengthFact) / num;
|
||||
models.push(param);
|
||||
this.addList.push(param);
|
||||
}
|
||||
|
@ -17,11 +17,16 @@
|
||||
<create-signal ref="createSignal" :field="field" @signalSectionCode="signalSectionCode" @updateMapModel="updateMapModel" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane class="view-control" label="批量操作" name="three">
|
||||
<el-form ref="mark" label-width="130px" :model="addModel" size="mini" :rules="addRules">
|
||||
<el-form-item label="左右偏移值" prop="number">
|
||||
<el-input v-model="addModel.number" style="width: 178px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="flex_box">
|
||||
<el-button type="primary" style="margin-right: 10px;" @click="editAll">构建信号机偏移量</el-button>
|
||||
<el-button type="" style="margin: 0;" @click="questionList = []">{{ $t('map.clearHint') }}</el-button>
|
||||
</div>
|
||||
<div style="height: calc(100% - 46px);">
|
||||
<div style="height: calc(100% - 90px);">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-card v-if="questionList.length" class="box-card">
|
||||
<div v-for="(item, index) in questionList" :key="index" class="text item">{{ item }}</div>
|
||||
@ -91,6 +96,14 @@ export default {
|
||||
position: { x: 0, y: 0 },
|
||||
buttonPosition: { x: 0, y: 0 },
|
||||
guidePosition: { x: 0, y: 0 }
|
||||
},
|
||||
addModel: {
|
||||
number: 2
|
||||
},
|
||||
addRules: {
|
||||
number: [
|
||||
{ required: true, message: '请输入左右偏移量', trigger: 'blur', min: 0 }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -295,26 +308,31 @@ export default {
|
||||
},
|
||||
// 构建信号机偏移量
|
||||
editAll() {
|
||||
const models = [];
|
||||
this.questionList = [];
|
||||
this.signalList.forEach(item => {
|
||||
const signalModel = deepAssign({}, item);
|
||||
const section = this.findSection(signalModel);
|
||||
if (section.code && item.sectionCode != section.code) {
|
||||
item.sectionCode = section.code;
|
||||
this.$refs['mark'].validate((valid) => {
|
||||
if (valid) {
|
||||
const models = [];
|
||||
this.questionList = [];
|
||||
this.signalList.forEach(item => {
|
||||
const signalModel = deepAssign({}, item);
|
||||
const section = this.findSection(signalModel);
|
||||
if (section.code && item.sectionCode != section.code) {
|
||||
signalModel.sectionCode = section.code;
|
||||
}
|
||||
if (!section.code) {
|
||||
this.questionList.push(`${item.name} 信号机位置可能不正确,请手动调试归属区段及偏移量.`);
|
||||
}
|
||||
signalModel.sectionOffset = this.addModel.number;
|
||||
if (signalModel.right) {
|
||||
if (section.lengthFact) {
|
||||
signalModel.sectionOffset = Math.abs(Number(section.lengthFact) - this.addModel.number);
|
||||
}
|
||||
}
|
||||
models.push(signalModel);
|
||||
});
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$message.success('数据构建成功!');
|
||||
}
|
||||
if (!section.code) {
|
||||
this.questionList.push(`${item.name} 信号机位置可能不正确,请手动调试归属区段及偏移量.`);
|
||||
}
|
||||
signalModel.sectionOffset = 2;
|
||||
if (signalModel.right) {
|
||||
if (section.lengthFact) {
|
||||
signalModel.sectionOffset = Math.abs(Number(section.lengthFact) - 2);
|
||||
}
|
||||
}
|
||||
models.push(signalModel);
|
||||
});
|
||||
this.$emit('updateMapModel', models);
|
||||
},
|
||||
// 寻找信号机关联区段
|
||||
findSection(signal) {
|
||||
|
@ -330,6 +330,8 @@ export default {
|
||||
}
|
||||
models.push(param);
|
||||
}
|
||||
section.standTrack = true;
|
||||
models.push(section);
|
||||
this.$emit('updateMapModel', models);
|
||||
}
|
||||
});
|
||||
|
@ -551,8 +551,8 @@ export default {
|
||||
sectiona.switchSection = true;
|
||||
sectionb.switchSection = true;
|
||||
sectionc.switchSection = true;
|
||||
sectionb.sepTypeLeft = '00';
|
||||
sectionb.sepTypeRight = '00';
|
||||
// sectionb.sepTypeLeft = '00';
|
||||
// sectionb.sepTypeRight = '00';
|
||||
models.push(sectiona);
|
||||
models.push(sectionb);
|
||||
models.push(sectionc);
|
||||
|
@ -220,6 +220,8 @@ export default {
|
||||
this.setStationStand(stationCode, model.code);
|
||||
});
|
||||
this.$emit('updateMapModel', model);
|
||||
this.getConcertrateStation();
|
||||
this.$refs.make.resetForm();
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -255,6 +257,16 @@ export default {
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.concertrateStation.forEach(station=>{
|
||||
selected.concentrateStationList.forEach(stationCode=>{
|
||||
switch (stationCode) {
|
||||
case station.code: {
|
||||
this.setStationStand(station.code, '');
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
_that.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user