Merge branch 'dev' into test
This commit is contained in:
commit
a0899720b6
@ -469,3 +469,11 @@ export function getRouteNewList(mapId, params) {
|
||||
params
|
||||
});
|
||||
}
|
||||
// 获取自动折返分组列表
|
||||
export function getAutoReentryGroupList(mapId, params) {
|
||||
return request({
|
||||
url: `/api/mapBuild/${mapId}/autoReentry/group/reentryTrack`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
@ -28,6 +28,7 @@
|
||||
@select="onSelect"
|
||||
@select-all="onSelectAll"
|
||||
@selection-change="onSelectionChange"
|
||||
@sort-change="sortChange"
|
||||
>
|
||||
<el-table-column v-if="queryList.selectCheckShow" type="selection" width="55" />
|
||||
<el-table-column v-if="queryList.indexShow" type="index" width="50" :label="this.$t('global.index')" />
|
||||
@ -45,6 +46,7 @@
|
||||
:width="column.width"
|
||||
show-overflow-tooltip
|
||||
:sortable="column.sortable"
|
||||
:sort-by="column.sortBy"
|
||||
/>
|
||||
<el-table-column
|
||||
v-else-if="checkColumnTyep(column, 'basicText')"
|
||||
@ -52,6 +54,7 @@
|
||||
:label="column.title"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
:sort-by="column.sortBy"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span class="hideOutContent">{{ column.columnValue(scope.row, scope.$index) }}</span>
|
||||
@ -63,6 +66,7 @@
|
||||
:label="column.title"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
:sort-by="column.sortBy"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="column.columnValue(scope.row, scope.$index)" :type="column.tagType(scope.row, scope.$index)">{{ column.columnValue(scope.row, scope.$index) }}</el-tag>
|
||||
@ -74,6 +78,7 @@
|
||||
:label="column.title"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
:sort-by="column.sortBy"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ column.columnValue(scope.row, scope.$index) }}</span>
|
||||
@ -85,6 +90,7 @@
|
||||
:label="column.title"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
:sort-by="column.sortBy"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<template v-for="tag in column.columnValue(scope.row)">
|
||||
@ -103,6 +109,7 @@
|
||||
:label="column.title"
|
||||
:formatter="column.formatter"
|
||||
:sortable="column.sortable"
|
||||
:sort-by="column.sortBy"
|
||||
/>
|
||||
<el-table-column
|
||||
v-else-if="checkColumnTyep(column, 'button') && !(column.hide && column.hide(column))"
|
||||
@ -189,7 +196,8 @@ export default {
|
||||
pageIndex: 1,
|
||||
pageOffset: 0,
|
||||
canQuery: true, // 查询按钮是否可点
|
||||
thirdQRCodeMakeUrl: 'http://s.jiathis.com/qrcode.php?url='
|
||||
thirdQRCodeMakeUrl: 'http://s.jiathis.com/qrcode.php?url=',
|
||||
sortBy:''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -461,6 +469,36 @@ export default {
|
||||
this.commitQuery();
|
||||
}
|
||||
this.queryList.data = [...this.queryList.data];
|
||||
},
|
||||
sortChange(data) {
|
||||
const self = this;
|
||||
if (data.order && data.column.sortable == 'custom') {
|
||||
switch (data.order) {
|
||||
case 'ascending': {
|
||||
if (data.column.sortBy) {
|
||||
const temp = {};
|
||||
temp[data.column.sortBy] = data.prop;
|
||||
self.queryData = { ...self.queryData, ...temp };
|
||||
self.sortBy = data.column.sortBy;
|
||||
self.refresh(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'descending': {
|
||||
if (data.column.sortBy) {
|
||||
const temp = {};
|
||||
temp[data.column.sortBy] = data.prop + ' desc';
|
||||
self.queryData = { ...self.queryData, ...temp };
|
||||
self.sortBy = data.column.sortBy;
|
||||
self.refresh(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
delete self.queryData[self.sortBy];
|
||||
self.refresh(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
lamp: {
|
||||
count: 4, // 控制模式的个数
|
||||
offset: {x: 0, y: 0}, // 偏移量
|
||||
offset: {x: 20, y: 0}, // 偏移量
|
||||
radiusR: 4, // 控制模式灯的半径
|
||||
distance: 46, // 控制模式之间灯之间的距离
|
||||
grayColor: '#C0C0C0', // 控制模式灰色
|
||||
|
@ -271,6 +271,17 @@ class MouseController extends Eventful {
|
||||
includeDeviceList.push(item);
|
||||
}
|
||||
}
|
||||
if (item.instance && item.instance._type == deviceType.Signal) {
|
||||
const deviceBoundingRect = {
|
||||
x1: item.position.x,
|
||||
y1: item.position.y,
|
||||
x2: item.position.x,
|
||||
y2: item.position.y
|
||||
};
|
||||
if (this.whetherInclude(boundingRect, deviceBoundingRect )) {
|
||||
includeDeviceList.push(item);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.deviceList = includeDeviceList;
|
||||
store.dispatch('map/setSeclectDeviceList', this.deviceList);
|
||||
|
@ -2,7 +2,7 @@ class Options {
|
||||
constructor(opts, trigger) {
|
||||
this.scaleIndex = 0;
|
||||
this.scaleList = [
|
||||
0.8, 0.9,
|
||||
0.2, 0.4, 0.6, 0.8, 0.9,
|
||||
1, 1.2, 1.4, 1.6, 1.8,
|
||||
2, 2.2, 2.4, 2.6, 2.8,
|
||||
3, 3.2, 3.4, 3.6, 3.8,
|
||||
|
@ -11,11 +11,11 @@ export default class EMouse extends Group {
|
||||
create() {
|
||||
if (this.device && this.device.model.visible) {
|
||||
const stationTextRect = this.device.stationText.getBoundingRect();
|
||||
const path = window.location.href;
|
||||
if (this.device.style.Station.kmPostShow || path.includes('/map/draw')) {
|
||||
const mileageTextRect = this.device.mileageText.getBoundingRect();
|
||||
stationTextRect.union(mileageTextRect);
|
||||
}
|
||||
// const path = window.location.href;
|
||||
// if (this.device.style.Station.kmPostShow || path.includes('/map/draw')) {
|
||||
// const mileageTextRect = this.device.mileageText.getBoundingRect();
|
||||
// stationTextRect.union(mileageTextRect);
|
||||
// }
|
||||
this.lineBorder = new Rect({
|
||||
zlevel: this.device.zlevel,
|
||||
z: this.device.z + 1,
|
||||
|
@ -53,12 +53,17 @@ export default class Station extends Group {
|
||||
if (this.style.Station.kilometerPosition == 'up') {
|
||||
direction = -1;
|
||||
}
|
||||
const offset = { x: 0, y: 0 };
|
||||
if (model.kilometerPosition) {
|
||||
offset.x = model.kilometerPosition.x;
|
||||
offset.y = model.kilometerPosition.y;
|
||||
}
|
||||
this.mileageText = new ETextName({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
position: [0, 0],
|
||||
x: model.position.x,
|
||||
y: model.position.y + ((parseInt(model.nameFont) + 2) * direction),
|
||||
x: model.position.x + offset.x,
|
||||
y: model.position.y + ((parseInt(model.nameFont) + 2) * direction) + offset.y,
|
||||
fontWeight: model.fontWeight,
|
||||
fontSize: model.kmPostFont || 18,
|
||||
fontFamily: style.fontFamily,
|
||||
|
@ -87,8 +87,7 @@ export default class StationControl extends Group {
|
||||
x: model.position.x + this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x,
|
||||
y: model.position.y + this.style.StationControl.lamp.offset.y
|
||||
},
|
||||
// context: model.lskContent || '联锁控',
|
||||
context:this.style.StationControl.text.interconnectedControlText || '联锁控',
|
||||
context: this.style.StationControl.text.interconnectedControlText || '联锁控',
|
||||
pop: false
|
||||
});
|
||||
this.add(this.interconnectedControl);
|
||||
|
@ -2,37 +2,37 @@ import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
|
||||
export default class EMouse extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.zlevel = device.zlevel;
|
||||
this.style = device.style;
|
||||
this.create();
|
||||
}
|
||||
constructor(device) {
|
||||
super();
|
||||
this.device = device;
|
||||
this.zlevel = device.zlevel;
|
||||
this.style = device.style;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
this.border = new Rect({
|
||||
silent: true,
|
||||
zlevel: this.zlevel,
|
||||
z: 0,
|
||||
shape: this.device.getBoundingRect(),
|
||||
style: {
|
||||
lineDash: this.style.StationStand.mouseOverStyle.borderLineDash,
|
||||
stroke: this.style.StationStand.mouseOverStyle.borderLineColor,
|
||||
fill: this.style.transparentColor
|
||||
}
|
||||
});
|
||||
this.border.hide();
|
||||
this.add(this.border);
|
||||
}
|
||||
create() {
|
||||
this.border = new Rect({
|
||||
silent: true,
|
||||
zlevel: this.zlevel,
|
||||
z: 0,
|
||||
shape: this.device.getBoundingRect(),
|
||||
style: {
|
||||
lineDash: this.style.StationStand.mouseOverStyle.borderLineDash,
|
||||
stroke: this.style.StationStand.mouseOverStyle.borderLineColor,
|
||||
fill: this.style.transparentColor
|
||||
}
|
||||
});
|
||||
this.border.hide();
|
||||
this.add(this.border);
|
||||
}
|
||||
|
||||
mouseover(e) {
|
||||
this.border.show();
|
||||
}
|
||||
mouseover(e) {
|
||||
this.border.show();
|
||||
}
|
||||
|
||||
mouseout(e) {
|
||||
if (!this.device.model.down) {
|
||||
this.border.hide();
|
||||
}
|
||||
}
|
||||
mouseout(e) {
|
||||
if (!this.device.model.down) {
|
||||
this.border.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ export default {
|
||||
{ code: 'FangSong', name: '仿宋' }
|
||||
],
|
||||
sizeList: [
|
||||
{ code: '0px', name: '0px' },
|
||||
{ code: '4px', name: '4px' },
|
||||
{ code: '6px', name: '6px' },
|
||||
{ code: '8px', name: '8px' },
|
||||
|
@ -99,7 +99,7 @@ export default {
|
||||
this.loading = true;
|
||||
this.treeData = this.treeList = [];
|
||||
try {
|
||||
const res = await listMap({ drawWay:'0'});
|
||||
const res = await listMap({ drawWay:false});
|
||||
res.data && res.data.forEach(elem=>{
|
||||
elem.type = 'map';
|
||||
elem.children = [
|
||||
|
@ -134,7 +134,7 @@ export default {
|
||||
this.lineCodeList = response.data;
|
||||
});
|
||||
|
||||
const drawWay = 0;
|
||||
const drawWay = false;
|
||||
getMapListByProject(drawWay).then(response => {
|
||||
this.publishMapList = response.data;
|
||||
}).catch(() => {
|
||||
@ -146,7 +146,7 @@ export default {
|
||||
this.$refs['newForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
this.newModel['drawWay'] = '0';
|
||||
this.newModel['drawWay'] = false;
|
||||
newMap(this.newModel).then(response => {
|
||||
this.loading = false;
|
||||
this.$emit('refresh');
|
||||
|
@ -143,7 +143,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap({ drawWay:'0'}).then(response => {
|
||||
listMap({ drawWay:false}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -152,7 +152,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap({ drawWay:'0'}).then(response => {
|
||||
listMap({ drawWay:false}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -162,7 +162,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap({ drawWay:'0'}).then(response => {
|
||||
listMap({ drawWay:false}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -245,7 +245,7 @@ export default {
|
||||
}
|
||||
},
|
||||
acquireMapList() {
|
||||
listMap({ drawWay:'0'}).then(response => {
|
||||
listMap({ drawWay:false}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -175,7 +175,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap({ drawWay:'0'}).then(response => {
|
||||
listMap({ drawWay:false}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -127,7 +127,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap({ drawWay:'0'}).then(response => {
|
||||
listMap({ drawWay:false}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="zoom-box" :style="{top: offset+'px'}">
|
||||
<el-button class="shrink zoom" :disabled="scaleRate == 0.8" @click="setShrinkCanvas">
|
||||
<el-button class="shrink zoom" :disabled="scaleRate == 0.2" @click="setShrinkCanvas">
|
||||
<i class="el-icon-minus" />
|
||||
</el-button>
|
||||
<el-button class="magnify zoom" :disabled="scaleRate == 8" @click="setMagnifyCanvas">
|
||||
|
@ -99,7 +99,7 @@ export default {
|
||||
this.loading = true;
|
||||
this.treeData = this.treeList = [];
|
||||
try {
|
||||
const res = await listMap({ drawWay:'1'});
|
||||
const res = await listMap({ drawWay:true});
|
||||
res.data && res.data.forEach(elem=>{
|
||||
elem.type = 'map';
|
||||
elem.children = [
|
||||
|
@ -135,7 +135,7 @@ export default {
|
||||
});
|
||||
|
||||
// 新地图
|
||||
const drawWay = 1;
|
||||
const drawWay = true;
|
||||
getMapListByProject(drawWay).then(response => {
|
||||
this.publishMapList = response.data;
|
||||
}).catch(() => {
|
||||
@ -147,7 +147,7 @@ export default {
|
||||
this.$refs['newForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
this.newModel['drawWay'] = '1';
|
||||
this.newModel['drawWay'] = true;
|
||||
newMap(this.newModel).then(response => {
|
||||
this.loading = false;
|
||||
this.$emit('refresh');
|
||||
|
@ -143,7 +143,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap({ drawWay:'1'}).then(response => {
|
||||
listMap({ drawWay:true}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -152,7 +152,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap({ drawWay:'1'}).then(response => {
|
||||
listMap({ drawWay:true}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -162,7 +162,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap({ drawWay:'1'}).then(response => {
|
||||
listMap({ drawWay:true}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -263,7 +263,7 @@ export default {
|
||||
}
|
||||
},
|
||||
acquireMapList() {
|
||||
listMap({ drawWay:'1'}).then(response => {
|
||||
listMap({ drawWay:true}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -175,7 +175,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap({drawWay: '1'}).then(response => {
|
||||
listMap({drawWay: true}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -127,7 +127,7 @@ export default {
|
||||
},
|
||||
acquireMapList() {
|
||||
// 地图名称列表
|
||||
listMap({ drawWay:'1'}).then(response => {
|
||||
listMap({ drawWay:true}).then(response => {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
|
@ -80,6 +80,9 @@ export default {
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '设置优先级', handler: this.setPriority }
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -148,6 +151,10 @@ export default {
|
||||
getRouteNewList(this.$route.params.mapId, {pageSize:9999, pageNum:1}).then((resp) => {
|
||||
this.routeList = resp.data.list;
|
||||
});
|
||||
},
|
||||
setPriority() {
|
||||
this.show = false;
|
||||
this.$emit('setPriority');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,23 +1,26 @@
|
||||
<template>
|
||||
<div style="height: 100%;">
|
||||
<route-draft
|
||||
ref="routeEdit"
|
||||
<turned-draft
|
||||
ref="turnedEdit"
|
||||
:selected="selected"
|
||||
:map-info="mapInfo"
|
||||
:route-data="routeData"
|
||||
/>
|
||||
<route-detail ref="routeDetail" :map-info="mapInfo" @autoReentrySelected="autoReentrySelected" />
|
||||
<turned-detail ref="turnedDetail" :map-info="mapInfo" @autoReentrySelected="autoReentrySelected" @setPriority="setPriority" />
|
||||
<turned-priority ref="turnedPriority" :map-info="mapInfo" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import RouteDraft from './route';
|
||||
import RouteDetail from './detail';
|
||||
import TurnedDraft from './route';
|
||||
import TurnedDetail from './detail';
|
||||
import TurnedPriority from './priority';
|
||||
|
||||
export default {
|
||||
name: 'TurnedOperate',
|
||||
components: {
|
||||
RouteDraft,
|
||||
RouteDetail
|
||||
TurnedDraft,
|
||||
TurnedDetail,
|
||||
TurnedPriority
|
||||
},
|
||||
props: {
|
||||
mapInfo: {
|
||||
@ -59,25 +62,28 @@ export default {
|
||||
},
|
||||
autoReentrySelected: function (data) {
|
||||
this.routeData = data;
|
||||
if (this.$refs && this.$refs.routeEdit) {
|
||||
this.$refs.routeEdit.isSave = false;
|
||||
if (this.$refs && this.$refs.turnedEdit) {
|
||||
this.$refs.turnedEdit.isSave = false;
|
||||
}
|
||||
},
|
||||
previewRouteEvent: function () {
|
||||
if (this.$refs && this.$refs.routeDetail) {
|
||||
this.$refs.routeDetail.doShow();
|
||||
if (this.$refs && this.$refs.turnedDetail) {
|
||||
this.$refs.turnedDetail.doShow();
|
||||
}
|
||||
},
|
||||
createRouteEvent: function () {
|
||||
if (this.$refs && this.$refs.routeEdit) {
|
||||
this.$refs.routeEdit.clear();
|
||||
if (this.$refs && this.$refs.turnedEdit) {
|
||||
this.$refs.turnedEdit.clear();
|
||||
}
|
||||
},
|
||||
setSelected(selected) {
|
||||
this.$refs.routeEdit.setSelected(selected);
|
||||
this.$refs.turnedEdit.setSelected(selected);
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$emit('setCenter', code);
|
||||
},
|
||||
setPriority() {
|
||||
this.$refs.turnedPriority.doShow();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag title="自动折返分组列表" :visible.sync="show" width="85%" :before-do-close="doClose">
|
||||
<div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:span-method="objectSpanMethod"
|
||||
border
|
||||
style="width: 100%; margin-top: 20px"
|
||||
>
|
||||
<el-table-column
|
||||
prop="reentryTrackCode"
|
||||
label="折返区段"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ handelSpecifiedField(scope.row.reentryTrackCode, sectionList, 'code', 'name') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="折返名称"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="basicRouteCode"
|
||||
label="基础进路"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ handelSpecifiedField(scope.row.basicRouteCode, routeList, 'code', 'name') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="turnBackRouteCode"
|
||||
label="折返进路"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ handelSpecifiedField(scope.row.turnBackRouteCode, routeList, 'code', 'name') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="priority"
|
||||
label="优先级"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.priority" size="small" :min="0" :max="10" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click.native.prevent="updateRow(scope.$index, scope.row)"
|
||||
>保存</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getAutoReentryGroupList, getRouteNewList, putAutoReentry} from '@/api/jmap/mapdraft';
|
||||
export default {
|
||||
name: 'Priority',
|
||||
props: {
|
||||
mapInfo: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
spanArr: [],
|
||||
tableData:[],
|
||||
routeList:[]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList'
|
||||
])
|
||||
},
|
||||
methods:{
|
||||
async initData() {
|
||||
const resp = await getAutoReentryGroupList(this.mapInfo.id);
|
||||
const response = await getRouteNewList(this.$route.params.mapId, {pageSize:9999, pageNum:1});
|
||||
this.routeList = response.data.list;
|
||||
const keyList = Object.keys(resp.data);
|
||||
let data = [];
|
||||
if (keyList) {
|
||||
keyList.map(elem => {
|
||||
for (var i = 0; i < resp.data[elem].length; i++) {
|
||||
if (i === 0) {
|
||||
this.spanArr.push(resp.data[elem].length);
|
||||
} else {
|
||||
this.spanArr.push(0);
|
||||
}
|
||||
}
|
||||
data = [...data, ...resp.data[elem]];
|
||||
});
|
||||
// data.map(elem => {
|
||||
// this.$convertSpecifiedField(elem, this.sectionList, 'code', 'name', ['reentryTrackCode']);
|
||||
// this.$convertSpecifiedField(elem, this.routeList, 'code', 'name', ['turnBackRouteCode', 'basicRouteCode']);
|
||||
// });
|
||||
}
|
||||
this.tableData = data;
|
||||
},
|
||||
doShow() {
|
||||
this.show = true;
|
||||
this.initData();
|
||||
},
|
||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
if (columnIndex === 0) {
|
||||
return {
|
||||
rowspan: this.spanArr[rowIndex],
|
||||
colspan: this.spanArr[rowIndex] ? 1 : 0
|
||||
};
|
||||
}
|
||||
},
|
||||
updateRow(index, row) {
|
||||
putAutoReentry(row).then(resp => {
|
||||
this.$message.success('更新折返成功!');
|
||||
this.loading = false;
|
||||
this.initData();
|
||||
}).catch(() => {
|
||||
this.$messageBox('更新折返失败!');
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handelSpecifiedField(value, list, code, name ) {
|
||||
let needName = '';
|
||||
list.forEach(item => {
|
||||
if (item[code] === value) {
|
||||
needName = item[name];
|
||||
}
|
||||
});
|
||||
return needName;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -91,7 +91,7 @@ export default {
|
||||
basicRouteName:'',
|
||||
turnBackRouteCode: '',
|
||||
basicRouteCode:'',
|
||||
priority: '',
|
||||
priority: 0,
|
||||
reentryTrackCode: ''
|
||||
},
|
||||
editShow: false,
|
||||
|
@ -56,6 +56,11 @@ export default {
|
||||
type: 'Switch',
|
||||
name: '道岔列表',
|
||||
list: []
|
||||
},
|
||||
{
|
||||
type: 'Signal',
|
||||
name: '信号机列表',
|
||||
list: []
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -86,6 +91,8 @@ export default {
|
||||
this.modelList[0].list.push(item);
|
||||
} else if (item._type == 'Switch') {
|
||||
this.modelList[1].list.push(item);
|
||||
} else if (item._type == 'Signal') {
|
||||
this.modelList[2].list.push(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -135,7 +135,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.trainDirection')" prop="trainPosType">
|
||||
<el-radio-group v-model="addModel.trainPosType">
|
||||
<el-radio v-for="item in TrainPositionTypeList" :key="item.code" :label="item.name" :value="item.code" border size="mini" />
|
||||
<el-radio v-for="item in TrainPositionTypeList" :key="item.code" :label="item.code" border size="mini">{{ item.name }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -270,7 +270,7 @@ export default {
|
||||
addModel: {
|
||||
code: '',
|
||||
splitNumber: 2,
|
||||
trainPosType: '上方', // 列车所在方向
|
||||
trainPosType: '01', // 列车所在方向
|
||||
splitOffsetMax: 15
|
||||
},
|
||||
operationModel: { // 区段集中站列表
|
||||
@ -445,7 +445,7 @@ 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: 'select', optionLabel: 'name', optionValue: 'code', options: this.TrainPositionTypeList, isHidden: !this.isSwitchSectionType }
|
||||
{ prop: 'trainPosType', label: this.$t('map.trainDirection'), type: 'radio', optionLabel: 'name', optionValue: 'code', border: true, radioList: this.TrainPositionTypeList }
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div style="height: calc(100% - 46px);">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<el-form ref="make" label-width="130px" :model="addModel" size="mini" :rules="mergeRules">
|
||||
<el-form-item :label="$t('map.physicalSegmentName')" prop="sectionCode">
|
||||
<el-form-item :label="$t('map.section')" prop="sectionCode">
|
||||
<el-select v-model="addModel.sectionCode" filterable>
|
||||
<el-option
|
||||
v-for="item in signalSectionList"
|
||||
|
@ -235,7 +235,7 @@ export default {
|
||||
this.editModel.potLampType = selected.potLampType || '01';
|
||||
this.editModel.rotate = selected.rotate || 0; // 角度
|
||||
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'selectSingalCode'.toUpperCase()) {
|
||||
if (selected.type == '01') {
|
||||
if (selected.type == '01' || selected.type === '03') {
|
||||
this.$refs.createSignal.setSectionCode(selected.code);
|
||||
} else if (selected.type == '02') {
|
||||
this.$refs.createSignal.setSectionCode(selected.parentCode);
|
||||
|
@ -31,7 +31,6 @@
|
||||
<el-table :data="addModel.modelList" style="width: 100%">
|
||||
<el-table-column label="计轴区段" prop="sectionName" width="160">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-input v-model="scope.row.stationName" placeholder="请输入内容" size="mini" /> -->
|
||||
<el-select v-model="scope.row.sectionCode" filterable size="mini" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in PhysicalSectionList"
|
||||
@ -112,6 +111,7 @@ export default {
|
||||
isShowControlMode: '',
|
||||
chargeStationCodeList:[],
|
||||
position: { x: 0, y: 0 },
|
||||
kilometerPosition: { x: 0, y: 0 }, // 公里标偏移坐标
|
||||
controlled:false,
|
||||
isCreateControlMode:false,
|
||||
isCreateTurnBack:false,
|
||||
@ -158,6 +158,10 @@ export default {
|
||||
{ prop: 'visible', label: this.$t('map.stationstandShowName'), type: 'checkbox' },
|
||||
{ prop: 'nameFont', label: this.$t('map.stationNameFont'), type: 'font', placeholder: this.$t('tip.stationFont') },
|
||||
{ prop: 'nameFontColor', label: this.$t('map.stationNameFontColor'), type: 'color' },
|
||||
{ prop: 'kilometerPosition', label: '公里标偏移坐标:', type: 'coordinate', width: '120px', children: [
|
||||
{ prop: 'kilometerPosition.x', firstLevel: 'kilometerPosition', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||
{ prop: 'kilometerPosition.y', firstLevel: 'kilometerPosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
] },
|
||||
{ prop: 'kmRange', label: this.$t('map.stationKmRange'), type: 'number', min: 0, placeholder: this.$t('tip.meter') },
|
||||
{ prop: 'kmPost', label: this.$t('map.stationKmPost'), type: 'input' },
|
||||
{ prop: 'kmPostFont', label: this.$t('map.stationKmPostFont'), type: 'font', placeholder: this.$t('tip.kilometerFont') },
|
||||
@ -344,6 +348,7 @@ export default {
|
||||
kmPostShow: true,
|
||||
kmPostFont: '8px consolas',
|
||||
kmPostFontColor: '#FFFFFF',
|
||||
kilometerPosition: { x: 0, y: 0 },
|
||||
centralized: false,
|
||||
concentrateStationCode: '',
|
||||
controlled: false,
|
||||
|
@ -61,29 +61,32 @@ export default {
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
sortOrder:{
|
||||
type: 'select',
|
||||
label: this.$t('permission.sortType'),
|
||||
default:'id desc',
|
||||
noClearable:true,
|
||||
config: {
|
||||
data: [
|
||||
{value:'id desc', label:'ID倒序'},
|
||||
{value:'userName', label:'用户名正序'}
|
||||
]
|
||||
}
|
||||
}
|
||||
// sortOrder:{
|
||||
// type: 'select',
|
||||
// label: this.$t('permission.sortType'),
|
||||
// default:'id desc',
|
||||
// noClearable:true,
|
||||
// config: {
|
||||
// data: [
|
||||
// {value:'id desc', label:'ID倒序'},
|
||||
// {value:'userName', label:'用户名正序'}
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
defaultSort:{prop:'sortOrder', order:''},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('permission.userName'),
|
||||
prop: 'userName'
|
||||
prop: 'userName',
|
||||
sortable:'custom',
|
||||
sortBy:'sortOrder'
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.permissionName'),
|
||||
@ -184,6 +187,22 @@ export default {
|
||||
]
|
||||
}
|
||||
],
|
||||
// sortChange:function(data) {
|
||||
// switch (data.order) {
|
||||
// case 'ascending': {
|
||||
// this.data=[];
|
||||
// break;
|
||||
// }
|
||||
// case 'descending': {
|
||||
// break;
|
||||
// }
|
||||
// default: {
|
||||
// // sortOrder
|
||||
// debugger;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
actions: [
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user