Merge branch 'dev' into test
This commit is contained in:
commit
a0899720b6
@ -469,3 +469,11 @@ export function getRouteNewList(mapId, params) {
|
|||||||
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="onSelect"
|
||||||
@select-all="onSelectAll"
|
@select-all="onSelectAll"
|
||||||
@selection-change="onSelectionChange"
|
@selection-change="onSelectionChange"
|
||||||
|
@sort-change="sortChange"
|
||||||
>
|
>
|
||||||
<el-table-column v-if="queryList.selectCheckShow" type="selection" width="55" />
|
<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')" />
|
<el-table-column v-if="queryList.indexShow" type="index" width="50" :label="this.$t('global.index')" />
|
||||||
@ -45,6 +46,7 @@
|
|||||||
:width="column.width"
|
:width="column.width"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
|
:sort-by="column.sortBy"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-else-if="checkColumnTyep(column, 'basicText')"
|
v-else-if="checkColumnTyep(column, 'basicText')"
|
||||||
@ -52,6 +54,7 @@
|
|||||||
:label="column.title"
|
:label="column.title"
|
||||||
:width="column.width"
|
:width="column.width"
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
|
:sort-by="column.sortBy"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span class="hideOutContent">{{ column.columnValue(scope.row, scope.$index) }}</span>
|
<span class="hideOutContent">{{ column.columnValue(scope.row, scope.$index) }}</span>
|
||||||
@ -63,6 +66,7 @@
|
|||||||
:label="column.title"
|
:label="column.title"
|
||||||
:width="column.width"
|
:width="column.width"
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
|
:sort-by="column.sortBy"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<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>
|
<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"
|
:label="column.title"
|
||||||
:width="column.width"
|
:width="column.width"
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
|
:sort-by="column.sortBy"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ column.columnValue(scope.row, scope.$index) }}</span>
|
<span>{{ column.columnValue(scope.row, scope.$index) }}</span>
|
||||||
@ -85,6 +90,7 @@
|
|||||||
:label="column.title"
|
:label="column.title"
|
||||||
:width="column.width"
|
:width="column.width"
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
|
:sort-by="column.sortBy"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<template v-for="tag in column.columnValue(scope.row)">
|
<template v-for="tag in column.columnValue(scope.row)">
|
||||||
@ -103,6 +109,7 @@
|
|||||||
:label="column.title"
|
:label="column.title"
|
||||||
:formatter="column.formatter"
|
:formatter="column.formatter"
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
|
:sort-by="column.sortBy"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-else-if="checkColumnTyep(column, 'button') && !(column.hide && column.hide(column))"
|
v-else-if="checkColumnTyep(column, 'button') && !(column.hide && column.hide(column))"
|
||||||
@ -189,7 +196,8 @@ export default {
|
|||||||
pageIndex: 1,
|
pageIndex: 1,
|
||||||
pageOffset: 0,
|
pageOffset: 0,
|
||||||
canQuery: true, // 查询按钮是否可点
|
canQuery: true, // 查询按钮是否可点
|
||||||
thirdQRCodeMakeUrl: 'http://s.jiathis.com/qrcode.php?url='
|
thirdQRCodeMakeUrl: 'http://s.jiathis.com/qrcode.php?url=',
|
||||||
|
sortBy:''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -461,6 +469,36 @@ export default {
|
|||||||
this.commitQuery();
|
this.commitQuery();
|
||||||
}
|
}
|
||||||
this.queryList.data = [...this.queryList.data];
|
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: {
|
lamp: {
|
||||||
count: 4, // 控制模式的个数
|
count: 4, // 控制模式的个数
|
||||||
offset: {x: 0, y: 0}, // 偏移量
|
offset: {x: 20, y: 0}, // 偏移量
|
||||||
radiusR: 4, // 控制模式灯的半径
|
radiusR: 4, // 控制模式灯的半径
|
||||||
distance: 46, // 控制模式之间灯之间的距离
|
distance: 46, // 控制模式之间灯之间的距离
|
||||||
grayColor: '#C0C0C0', // 控制模式灰色
|
grayColor: '#C0C0C0', // 控制模式灰色
|
||||||
|
@ -271,6 +271,17 @@ class MouseController extends Eventful {
|
|||||||
includeDeviceList.push(item);
|
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;
|
this.deviceList = includeDeviceList;
|
||||||
store.dispatch('map/setSeclectDeviceList', this.deviceList);
|
store.dispatch('map/setSeclectDeviceList', this.deviceList);
|
||||||
|
@ -2,7 +2,7 @@ class Options {
|
|||||||
constructor(opts, trigger) {
|
constructor(opts, trigger) {
|
||||||
this.scaleIndex = 0;
|
this.scaleIndex = 0;
|
||||||
this.scaleList = [
|
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,
|
1, 1.2, 1.4, 1.6, 1.8,
|
||||||
2, 2.2, 2.4, 2.6, 2.8,
|
2, 2.2, 2.4, 2.6, 2.8,
|
||||||
3, 3.2, 3.4, 3.6, 3.8,
|
3, 3.2, 3.4, 3.6, 3.8,
|
||||||
|
@ -11,11 +11,11 @@ export default class EMouse extends Group {
|
|||||||
create() {
|
create() {
|
||||||
if (this.device && this.device.model.visible) {
|
if (this.device && this.device.model.visible) {
|
||||||
const stationTextRect = this.device.stationText.getBoundingRect();
|
const stationTextRect = this.device.stationText.getBoundingRect();
|
||||||
const path = window.location.href;
|
// const path = window.location.href;
|
||||||
if (this.device.style.Station.kmPostShow || path.includes('/map/draw')) {
|
// if (this.device.style.Station.kmPostShow || path.includes('/map/draw')) {
|
||||||
const mileageTextRect = this.device.mileageText.getBoundingRect();
|
// const mileageTextRect = this.device.mileageText.getBoundingRect();
|
||||||
stationTextRect.union(mileageTextRect);
|
// stationTextRect.union(mileageTextRect);
|
||||||
}
|
// }
|
||||||
this.lineBorder = new Rect({
|
this.lineBorder = new Rect({
|
||||||
zlevel: this.device.zlevel,
|
zlevel: this.device.zlevel,
|
||||||
z: this.device.z + 1,
|
z: this.device.z + 1,
|
||||||
|
@ -53,12 +53,17 @@ export default class Station extends Group {
|
|||||||
if (this.style.Station.kilometerPosition == 'up') {
|
if (this.style.Station.kilometerPosition == 'up') {
|
||||||
direction = -1;
|
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({
|
this.mileageText = new ETextName({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z,
|
z: this.z,
|
||||||
position: [0, 0],
|
position: [0, 0],
|
||||||
x: model.position.x,
|
x: model.position.x + offset.x,
|
||||||
y: model.position.y + ((parseInt(model.nameFont) + 2) * direction),
|
y: model.position.y + ((parseInt(model.nameFont) + 2) * direction) + offset.y,
|
||||||
fontWeight: model.fontWeight,
|
fontWeight: model.fontWeight,
|
||||||
fontSize: model.kmPostFont || 18,
|
fontSize: model.kmPostFont || 18,
|
||||||
fontFamily: style.fontFamily,
|
fontFamily: style.fontFamily,
|
||||||
|
@ -87,7 +87,6 @@ export default class StationControl extends Group {
|
|||||||
x: model.position.x + this.style.StationControl.lamp.distance * 3 / 2 + this.style.StationControl.lamp.offset.x,
|
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
|
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
|
pop: false
|
||||||
});
|
});
|
||||||
|
@ -27,6 +27,7 @@ export default {
|
|||||||
{ code: 'FangSong', name: '仿宋' }
|
{ code: 'FangSong', name: '仿宋' }
|
||||||
],
|
],
|
||||||
sizeList: [
|
sizeList: [
|
||||||
|
{ code: '0px', name: '0px' },
|
||||||
{ code: '4px', name: '4px' },
|
{ code: '4px', name: '4px' },
|
||||||
{ code: '6px', name: '6px' },
|
{ code: '6px', name: '6px' },
|
||||||
{ code: '8px', name: '8px' },
|
{ code: '8px', name: '8px' },
|
||||||
|
@ -99,7 +99,7 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.treeData = this.treeList = [];
|
this.treeData = this.treeList = [];
|
||||||
try {
|
try {
|
||||||
const res = await listMap({ drawWay:'0'});
|
const res = await listMap({ drawWay:false});
|
||||||
res.data && res.data.forEach(elem=>{
|
res.data && res.data.forEach(elem=>{
|
||||||
elem.type = 'map';
|
elem.type = 'map';
|
||||||
elem.children = [
|
elem.children = [
|
||||||
|
@ -134,7 +134,7 @@ export default {
|
|||||||
this.lineCodeList = response.data;
|
this.lineCodeList = response.data;
|
||||||
});
|
});
|
||||||
|
|
||||||
const drawWay = 0;
|
const drawWay = false;
|
||||||
getMapListByProject(drawWay).then(response => {
|
getMapListByProject(drawWay).then(response => {
|
||||||
this.publishMapList = response.data;
|
this.publishMapList = response.data;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@ -146,7 +146,7 @@ export default {
|
|||||||
this.$refs['newForm'].validate((valid) => {
|
this.$refs['newForm'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.newModel['drawWay'] = '0';
|
this.newModel['drawWay'] = false;
|
||||||
newMap(this.newModel).then(response => {
|
newMap(this.newModel).then(response => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
|
@ -143,7 +143,7 @@ export default {
|
|||||||
},
|
},
|
||||||
acquireMapList() {
|
acquireMapList() {
|
||||||
// 地图名称列表
|
// 地图名称列表
|
||||||
listMap({ drawWay:'0'}).then(response => {
|
listMap({ drawWay:false}).then(response => {
|
||||||
this.mapList = response.data;
|
this.mapList = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -152,7 +152,7 @@ export default {
|
|||||||
},
|
},
|
||||||
acquireMapList() {
|
acquireMapList() {
|
||||||
// 地图名称列表
|
// 地图名称列表
|
||||||
listMap({ drawWay:'0'}).then(response => {
|
listMap({ drawWay:false}).then(response => {
|
||||||
this.mapList = response.data;
|
this.mapList = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -162,7 +162,7 @@ export default {
|
|||||||
},
|
},
|
||||||
acquireMapList() {
|
acquireMapList() {
|
||||||
// 地图名称列表
|
// 地图名称列表
|
||||||
listMap({ drawWay:'0'}).then(response => {
|
listMap({ drawWay:false}).then(response => {
|
||||||
this.mapList = response.data;
|
this.mapList = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -245,7 +245,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
acquireMapList() {
|
acquireMapList() {
|
||||||
listMap({ drawWay:'0'}).then(response => {
|
listMap({ drawWay:false}).then(response => {
|
||||||
this.mapList = response.data;
|
this.mapList = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -175,7 +175,7 @@ export default {
|
|||||||
},
|
},
|
||||||
acquireMapList() {
|
acquireMapList() {
|
||||||
// 地图名称列表
|
// 地图名称列表
|
||||||
listMap({ drawWay:'0'}).then(response => {
|
listMap({ drawWay:false}).then(response => {
|
||||||
this.mapList = response.data;
|
this.mapList = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -127,7 +127,7 @@ export default {
|
|||||||
},
|
},
|
||||||
acquireMapList() {
|
acquireMapList() {
|
||||||
// 地图名称列表
|
// 地图名称列表
|
||||||
listMap({ drawWay:'0'}).then(response => {
|
listMap({ drawWay:false}).then(response => {
|
||||||
this.mapList = response.data;
|
this.mapList = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="zoom-box" :style="{top: offset+'px'}">
|
<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" />
|
<i class="el-icon-minus" />
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button class="magnify zoom" :disabled="scaleRate == 8" @click="setMagnifyCanvas">
|
<el-button class="magnify zoom" :disabled="scaleRate == 8" @click="setMagnifyCanvas">
|
||||||
|
@ -99,7 +99,7 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.treeData = this.treeList = [];
|
this.treeData = this.treeList = [];
|
||||||
try {
|
try {
|
||||||
const res = await listMap({ drawWay:'1'});
|
const res = await listMap({ drawWay:true});
|
||||||
res.data && res.data.forEach(elem=>{
|
res.data && res.data.forEach(elem=>{
|
||||||
elem.type = 'map';
|
elem.type = 'map';
|
||||||
elem.children = [
|
elem.children = [
|
||||||
|
@ -135,7 +135,7 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 新地图
|
// 新地图
|
||||||
const drawWay = 1;
|
const drawWay = true;
|
||||||
getMapListByProject(drawWay).then(response => {
|
getMapListByProject(drawWay).then(response => {
|
||||||
this.publishMapList = response.data;
|
this.publishMapList = response.data;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
@ -147,7 +147,7 @@ export default {
|
|||||||
this.$refs['newForm'].validate((valid) => {
|
this.$refs['newForm'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.newModel['drawWay'] = '1';
|
this.newModel['drawWay'] = true;
|
||||||
newMap(this.newModel).then(response => {
|
newMap(this.newModel).then(response => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
|
@ -143,7 +143,7 @@ export default {
|
|||||||
},
|
},
|
||||||
acquireMapList() {
|
acquireMapList() {
|
||||||
// 地图名称列表
|
// 地图名称列表
|
||||||
listMap({ drawWay:'1'}).then(response => {
|
listMap({ drawWay:true}).then(response => {
|
||||||
this.mapList = response.data;
|
this.mapList = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -152,7 +152,7 @@ export default {
|
|||||||
},
|
},
|
||||||
acquireMapList() {
|
acquireMapList() {
|
||||||
// 地图名称列表
|
// 地图名称列表
|
||||||
listMap({ drawWay:'1'}).then(response => {
|
listMap({ drawWay:true}).then(response => {
|
||||||
this.mapList = response.data;
|
this.mapList = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -162,7 +162,7 @@ export default {
|
|||||||
},
|
},
|
||||||
acquireMapList() {
|
acquireMapList() {
|
||||||
// 地图名称列表
|
// 地图名称列表
|
||||||
listMap({ drawWay:'1'}).then(response => {
|
listMap({ drawWay:true}).then(response => {
|
||||||
this.mapList = response.data;
|
this.mapList = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -263,7 +263,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
acquireMapList() {
|
acquireMapList() {
|
||||||
listMap({ drawWay:'1'}).then(response => {
|
listMap({ drawWay:true}).then(response => {
|
||||||
this.mapList = response.data;
|
this.mapList = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -175,7 +175,7 @@ export default {
|
|||||||
},
|
},
|
||||||
acquireMapList() {
|
acquireMapList() {
|
||||||
// 地图名称列表
|
// 地图名称列表
|
||||||
listMap({drawWay: '1'}).then(response => {
|
listMap({drawWay: true}).then(response => {
|
||||||
this.mapList = response.data;
|
this.mapList = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -127,7 +127,7 @@ export default {
|
|||||||
},
|
},
|
||||||
acquireMapList() {
|
acquireMapList() {
|
||||||
// 地图名称列表
|
// 地图名称列表
|
||||||
listMap({ drawWay:'1'}).then(response => {
|
listMap({ drawWay:true}).then(response => {
|
||||||
this.mapList = response.data;
|
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) => {
|
getRouteNewList(this.$route.params.mapId, {pageSize:9999, pageNum:1}).then((resp) => {
|
||||||
this.routeList = resp.data.list;
|
this.routeList = resp.data.list;
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
setPriority() {
|
||||||
|
this.show = false;
|
||||||
|
this.$emit('setPriority');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,23 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="height: 100%;">
|
<div style="height: 100%;">
|
||||||
<route-draft
|
<turned-draft
|
||||||
ref="routeEdit"
|
ref="turnedEdit"
|
||||||
:selected="selected"
|
:selected="selected"
|
||||||
:map-info="mapInfo"
|
:map-info="mapInfo"
|
||||||
:route-data="routeData"
|
: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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import RouteDraft from './route';
|
import TurnedDraft from './route';
|
||||||
import RouteDetail from './detail';
|
import TurnedDetail from './detail';
|
||||||
|
import TurnedPriority from './priority';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TurnedOperate',
|
name: 'TurnedOperate',
|
||||||
components: {
|
components: {
|
||||||
RouteDraft,
|
TurnedDraft,
|
||||||
RouteDetail
|
TurnedDetail,
|
||||||
|
TurnedPriority
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
mapInfo: {
|
mapInfo: {
|
||||||
@ -59,25 +62,28 @@ export default {
|
|||||||
},
|
},
|
||||||
autoReentrySelected: function (data) {
|
autoReentrySelected: function (data) {
|
||||||
this.routeData = data;
|
this.routeData = data;
|
||||||
if (this.$refs && this.$refs.routeEdit) {
|
if (this.$refs && this.$refs.turnedEdit) {
|
||||||
this.$refs.routeEdit.isSave = false;
|
this.$refs.turnedEdit.isSave = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
previewRouteEvent: function () {
|
previewRouteEvent: function () {
|
||||||
if (this.$refs && this.$refs.routeDetail) {
|
if (this.$refs && this.$refs.turnedDetail) {
|
||||||
this.$refs.routeDetail.doShow();
|
this.$refs.turnedDetail.doShow();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
createRouteEvent: function () {
|
createRouteEvent: function () {
|
||||||
if (this.$refs && this.$refs.routeEdit) {
|
if (this.$refs && this.$refs.turnedEdit) {
|
||||||
this.$refs.routeEdit.clear();
|
this.$refs.turnedEdit.clear();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setSelected(selected) {
|
setSelected(selected) {
|
||||||
this.$refs.routeEdit.setSelected(selected);
|
this.$refs.turnedEdit.setSelected(selected);
|
||||||
},
|
},
|
||||||
setCenter(code) {
|
setCenter(code) {
|
||||||
this.$emit('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:'',
|
basicRouteName:'',
|
||||||
turnBackRouteCode: '',
|
turnBackRouteCode: '',
|
||||||
basicRouteCode:'',
|
basicRouteCode:'',
|
||||||
priority: '',
|
priority: 0,
|
||||||
reentryTrackCode: ''
|
reentryTrackCode: ''
|
||||||
},
|
},
|
||||||
editShow: false,
|
editShow: false,
|
||||||
|
@ -56,6 +56,11 @@ export default {
|
|||||||
type: 'Switch',
|
type: 'Switch',
|
||||||
name: '道岔列表',
|
name: '道岔列表',
|
||||||
list: []
|
list: []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'Signal',
|
||||||
|
name: '信号机列表',
|
||||||
|
list: []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -86,6 +91,8 @@ export default {
|
|||||||
this.modelList[0].list.push(item);
|
this.modelList[0].list.push(item);
|
||||||
} else if (item._type == 'Switch') {
|
} else if (item._type == 'Switch') {
|
||||||
this.modelList[1].list.push(item);
|
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>
|
||||||
<el-form-item :label="$t('map.trainDirection')" prop="trainPosType">
|
<el-form-item :label="$t('map.trainDirection')" prop="trainPosType">
|
||||||
<el-radio-group v-model="addModel.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-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -270,7 +270,7 @@ export default {
|
|||||||
addModel: {
|
addModel: {
|
||||||
code: '',
|
code: '',
|
||||||
splitNumber: 2,
|
splitNumber: 2,
|
||||||
trainPosType: '上方', // 列车所在方向
|
trainPosType: '01', // 列车所在方向
|
||||||
splitOffsetMax: 15
|
splitOffsetMax: 15
|
||||||
},
|
},
|
||||||
operationModel: { // 区段集中站列表
|
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: '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: '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: '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);">
|
<div style="height: calc(100% - 46px);">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
<el-form ref="make" label-width="130px" :model="addModel" size="mini" :rules="mergeRules">
|
<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-select v-model="addModel.sectionCode" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in signalSectionList"
|
v-for="item in signalSectionList"
|
||||||
|
@ -235,7 +235,7 @@ export default {
|
|||||||
this.editModel.potLampType = selected.potLampType || '01';
|
this.editModel.potLampType = selected.potLampType || '01';
|
||||||
this.editModel.rotate = selected.rotate || 0; // 角度
|
this.editModel.rotate = selected.rotate || 0; // 角度
|
||||||
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'selectSingalCode'.toUpperCase()) {
|
} 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);
|
this.$refs.createSignal.setSectionCode(selected.code);
|
||||||
} else if (selected.type == '02') {
|
} else if (selected.type == '02') {
|
||||||
this.$refs.createSignal.setSectionCode(selected.parentCode);
|
this.$refs.createSignal.setSectionCode(selected.parentCode);
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
<el-table :data="addModel.modelList" style="width: 100%">
|
<el-table :data="addModel.modelList" style="width: 100%">
|
||||||
<el-table-column label="计轴区段" prop="sectionName" width="160">
|
<el-table-column label="计轴区段" prop="sectionName" width="160">
|
||||||
<template slot-scope="scope">
|
<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-select v-model="scope.row.sectionCode" filterable size="mini" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in PhysicalSectionList"
|
v-for="item in PhysicalSectionList"
|
||||||
@ -112,6 +111,7 @@ export default {
|
|||||||
isShowControlMode: '',
|
isShowControlMode: '',
|
||||||
chargeStationCodeList:[],
|
chargeStationCodeList:[],
|
||||||
position: { x: 0, y: 0 },
|
position: { x: 0, y: 0 },
|
||||||
|
kilometerPosition: { x: 0, y: 0 }, // 公里标偏移坐标
|
||||||
controlled:false,
|
controlled:false,
|
||||||
isCreateControlMode:false,
|
isCreateControlMode:false,
|
||||||
isCreateTurnBack:false,
|
isCreateTurnBack:false,
|
||||||
@ -158,6 +158,10 @@ export default {
|
|||||||
{ prop: 'visible', label: this.$t('map.stationstandShowName'), type: 'checkbox' },
|
{ prop: 'visible', label: this.$t('map.stationstandShowName'), type: 'checkbox' },
|
||||||
{ prop: 'nameFont', label: this.$t('map.stationNameFont'), type: 'font', placeholder: this.$t('tip.stationFont') },
|
{ prop: 'nameFont', label: this.$t('map.stationNameFont'), type: 'font', placeholder: this.$t('tip.stationFont') },
|
||||||
{ prop: 'nameFontColor', label: this.$t('map.stationNameFontColor'), type: 'color' },
|
{ 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: '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: 'kmPost', label: this.$t('map.stationKmPost'), type: 'input' },
|
||||||
{ prop: 'kmPostFont', label: this.$t('map.stationKmPostFont'), type: 'font', placeholder: this.$t('tip.kilometerFont') },
|
{ prop: 'kmPostFont', label: this.$t('map.stationKmPostFont'), type: 'font', placeholder: this.$t('tip.kilometerFont') },
|
||||||
@ -344,6 +348,7 @@ export default {
|
|||||||
kmPostShow: true,
|
kmPostShow: true,
|
||||||
kmPostFont: '8px consolas',
|
kmPostFont: '8px consolas',
|
||||||
kmPostFontColor: '#FFFFFF',
|
kmPostFontColor: '#FFFFFF',
|
||||||
|
kilometerPosition: { x: 0, y: 0 },
|
||||||
centralized: false,
|
centralized: false,
|
||||||
concentrateStationCode: '',
|
concentrateStationCode: '',
|
||||||
controlled: false,
|
controlled: false,
|
||||||
|
@ -61,29 +61,32 @@ export default {
|
|||||||
config: {
|
config: {
|
||||||
data: []
|
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: {
|
queryList: {
|
||||||
query: this.queryFunction,
|
query: this.queryFunction,
|
||||||
selectCheckShow: false,
|
selectCheckShow: false,
|
||||||
indexShow: true,
|
indexShow: true,
|
||||||
|
defaultSort:{prop:'sortOrder', order:''},
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('permission.userName'),
|
title: this.$t('permission.userName'),
|
||||||
prop: 'userName'
|
prop: 'userName',
|
||||||
|
sortable:'custom',
|
||||||
|
sortBy:'sortOrder'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('permission.permissionName'),
|
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: [
|
actions: [
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user