调整进路预览
This commit is contained in:
parent
49c1eba347
commit
2b338ba0de
@ -412,9 +412,16 @@ export function putRouteNew(data) {
|
|||||||
data:data
|
data:data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
export function delRouteNew(id) {
|
// export function delRouteNew(id) {
|
||||||
|
// return request({
|
||||||
|
// url: `/api/mapBuild/routeNew/${id}`,
|
||||||
|
// method: 'delete'
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// 删除指定code进路
|
||||||
|
export function delRouteNew(mapId, code) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapBuild/routeNew/${id}`,
|
url: `/api/draftMap/${mapId}/route/${code}`,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -424,13 +431,30 @@ export function getRouteNewById(id) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// // 分页查询进路数据(old)
|
||||||
|
// export function getRouteNewList(mapId, params) {
|
||||||
|
// return request({
|
||||||
|
// url: `/api/mapBuild/${mapId}/routeNew`,
|
||||||
|
// method: 'get',
|
||||||
|
// params
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// 分页查询进路数据(new)
|
||||||
export function getRouteNewList(mapId, params) {
|
export function getRouteNewList(mapId, params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapBuild/${mapId}/routeNew`,
|
url: `/api/draftMap/${mapId}/route/paging`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// 修改进路属性对象
|
||||||
|
export function putSetDraftMapRouteById(mapId, data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/draftMap/${mapId}/route/${data.code} `,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
// 新建进路侧防
|
// 新建进路侧防
|
||||||
export function postFlankProtection(data) {
|
export function postFlankProtection(data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -45,13 +45,22 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
v-if="checkColumnTyep(column, 'basic')"
|
v-if="checkColumnTyep(column, 'basic')"
|
||||||
:key="index"
|
:key="index"
|
||||||
:prop="column.prop"
|
|
||||||
:label="column.title"
|
:label="column.title"
|
||||||
:width="column.width"
|
:width="column.width"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
:sort-by="column.sortBy"
|
:sort-by="column.sortBy"
|
||||||
/>
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<template v-if="!column.edit">
|
||||||
|
<span class="hideOutContent">{{ scope.row[column.prop] }}</span>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div v-show="!scope.row.isEdit" class="hideOutContent" @click="handleEdit(scope.row, column, scope.$index)">{{ scope.row[column.prop] }}</div>
|
||||||
|
<el-input v-show="scope.row.isEdit" ref="customerInput" v-model="scope.row[column.prop]" placeholder="请输入内容" size="mini" autofocus @blur="handleEditBlur(scope.row, column)" />
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-else-if="checkColumnTyep(column, 'html')"
|
v-else-if="checkColumnTyep(column, 'html')"
|
||||||
:key="index"
|
:key="index"
|
||||||
@ -87,8 +96,13 @@
|
|||||||
:sort-by="column.sortBy"
|
:sort-by="column.sortBy"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<template v-if="!column.edit">
|
||||||
<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>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-checkbox v-model="scope.row[column.prop]" />
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-else-if="checkColumnTyep(column, 'replicText')"
|
v-else-if="checkColumnTyep(column, 'replicText')"
|
||||||
@ -295,6 +309,16 @@ export default {
|
|||||||
// this.tableHeight = this.$refs.table2.$el.offsetHeight + 23;
|
// this.tableHeight = this.$refs.table2.$el.offsetHeight + 23;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleEdit(row, column, index) {
|
||||||
|
this.$set(row, 'isEdit', true);
|
||||||
|
// console.log(this.$refs);
|
||||||
|
// if (this.$refs.customerInput.length) {
|
||||||
|
// this.$refs.customerInput[index].$el.querySelector('input').focus();
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
handleEditBlur(row, column) {
|
||||||
|
this.$set(row, 'isEdit', false);
|
||||||
|
},
|
||||||
// 根据类型显示
|
// 根据类型显示
|
||||||
checkColumnTyep(column, typeName) {
|
checkColumnTyep(column, typeName) {
|
||||||
if (column.show === false) {
|
if (column.show === false) {
|
||||||
@ -379,6 +403,7 @@ export default {
|
|||||||
});
|
});
|
||||||
if (fv.type === 'date') {
|
if (fv.type === 'date') {
|
||||||
const format = fv.format || 'yyyy-MM-dd';
|
const format = fv.format || 'yyyy-MM-dd';
|
||||||
|
// eslint-disable-next-line new-cap
|
||||||
return new Date(obj).Format(format);
|
return new Date(obj).Format(format);
|
||||||
} else if (fv.formatter instanceof Function) {
|
} else if (fv.formatter instanceof Function) {
|
||||||
return fv.formatter(v);
|
return fv.formatter(v);
|
||||||
|
@ -2,9 +2,9 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// 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.107:9000'; // 袁琪
|
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线
|
BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线
|
||||||
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线
|
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线
|
||||||
// BASE_API = 'http://192.168.3.120:9000'; // 张赛
|
// BASE_API = 'http://192.168.3.120:9000'; // 张赛
|
||||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-show="show">
|
<div v-show="show">
|
||||||
<el-dialog v-dialogDrag :title="$t('map.routePreview')" :visible.sync="show" width="95%" :before-do-close="doClose" append-to-body>
|
<el-dialog v-dialogDrag :title="$t('map.routePreview')" :visible.sync="show" width="95%" top="1vh" class="dialog_content_box" :before-do-close="doClose" append-to-body>
|
||||||
<div>
|
<div>
|
||||||
<QueryListPage
|
<QueryListPage
|
||||||
ref="queryListPage"
|
ref="queryListPage"
|
||||||
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { listMap, getRouteNewList, delRouteNew, getRouteNewById, putRouteNew, getContinueProtectList, delContinueProtect } from '@/api/jmap/mapdraft';
|
import { listMap, getRouteNewList, delRouteNew, getRouteNewById, putRouteNew, getContinueProtectList, delContinueProtect, putSetDraftMapRouteById } from '@/api/jmap/mapdraft';
|
||||||
import ProtectDetail from './protectDetail';
|
import ProtectDetail from './protectDetail';
|
||||||
import PreViewField from './preview';
|
import PreViewField from './preview';
|
||||||
import Related from './related';
|
import Related from './related';
|
||||||
@ -99,6 +99,7 @@ export default {
|
|||||||
{
|
{
|
||||||
title: this.$t('map.pathName'),
|
title: this.$t('map.pathName'),
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
|
edit: true,
|
||||||
width: 180
|
width: 180
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -108,7 +109,28 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('map.routeStationName'),
|
title: this.$t('map.routeStationName'),
|
||||||
prop: 'stationCode'
|
prop: 'stationCode',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$convertField(row.stationCode, this.stationList, ['code', 'name']); },
|
||||||
|
tagType: (row) => { return ''; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '是否自动追踪/联锁自动触发',
|
||||||
|
edit: true,
|
||||||
|
type: 'tag',
|
||||||
|
prop: 'arc'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '自排',
|
||||||
|
edit: true,
|
||||||
|
type: 'tag',
|
||||||
|
prop: 'ars'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('map.whetherAutoRoute'),
|
||||||
|
edit: true,
|
||||||
|
type: 'tag',
|
||||||
|
prop: 'flt'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('map.accessType'),
|
title: this.$t('map.accessType'),
|
||||||
@ -119,10 +141,24 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('map.whetherAutoRoute'),
|
title: 'atp进路',
|
||||||
prop: 'flt',
|
prop: 'atp',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.flt, this.turnBackList, ['value', 'label']); },
|
columnValue: (row) => { return this.$convertField(row.atp, this.turnBackList, ['value', 'label']); },
|
||||||
|
tagType: (row) => { return ''; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '联锁进路',
|
||||||
|
prop: 'ground',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$convertField(row.ground, this.turnBackList, ['value', 'label']); },
|
||||||
|
tagType: (row) => { return ''; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '引导进路',
|
||||||
|
prop: 'guide',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$convertField(row.guide, this.turnBackList, ['value', 'label']); },
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -133,57 +169,57 @@ export default {
|
|||||||
title: this.$t('map.endingSignalName'),
|
title: this.$t('map.endingSignalName'),
|
||||||
prop: 'endSignalCode'
|
prop: 'endSignalCode'
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
type: 'button',
|
// type: 'button',
|
||||||
title: this.$t('map.continueProtect'),
|
// title: this.$t('map.continueProtect'),
|
||||||
buttons: [
|
// buttons: [
|
||||||
{
|
// {
|
||||||
name: this.$t('map.preview'),
|
// name: this.$t('map.preview'),
|
||||||
handleClick: this.overlapSwitchDetail,
|
// handleClick: this.overlapSwitchDetail,
|
||||||
showControl: (row) => { return row.overlapCode; }
|
// showControl: (row) => { return row.overlapCode; }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
type: 'button',
|
// type: 'button',
|
||||||
title: this.$t('map.accessSideTurnoutData'),
|
// title: this.$t('map.accessSideTurnoutData'),
|
||||||
buttons: [
|
// buttons: [
|
||||||
{
|
// {
|
||||||
name: this.$t('map.preview'),
|
// name: this.$t('map.preview'),
|
||||||
handleClick: this.flankProtectionSwitchDetail,
|
// handleClick: this.flankProtectionSwitchDetail,
|
||||||
showControl: (row) => { return row.routeFlankProtectionList && row.routeFlankProtectionList.length > 0; }
|
// showControl: (row) => { return row.routeFlankProtectionList && row.routeFlankProtectionList.length > 0; }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
type: 'button',
|
// type: 'button',
|
||||||
title: this.$t('map.physicalSection'), // 物理区段list
|
// title: this.$t('map.physicalSection'), // 物理区段list
|
||||||
buttons: [
|
// buttons: [
|
||||||
{
|
// {
|
||||||
name: this.$t('map.preview'),
|
// name: this.$t('map.preview'),
|
||||||
handleClick: this.sectionDetail
|
// handleClick: this.sectionDetail
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
type: 'button',
|
// type: 'button',
|
||||||
title: this.$t('map.routeRouteTurnoutData'),
|
// title: this.$t('map.routeRouteTurnoutData'),
|
||||||
buttons: [
|
// buttons: [
|
||||||
{
|
// {
|
||||||
name: this.$t('map.preview'),
|
// name: this.$t('map.preview'),
|
||||||
handleClick: this.routeSwitchDetail,
|
// handleClick: this.routeSwitchDetail,
|
||||||
showControl: (row) => { return row.routeSwitchList.length > 0; }
|
// showControl: (row) => { return row.routeSwitchList.length > 0; }
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
title: this.$t('map.hostileData'),
|
// title: this.$t('map.hostileData'),
|
||||||
prop: 'conflictingSignalList',
|
// prop: 'conflictingSignalList',
|
||||||
type: 'tagMore',
|
// type: 'tagMore',
|
||||||
width: '250',
|
// width: '250',
|
||||||
columnValue: (row) => { return this.showConflictingSignalList(row.conflictingSignalList); },
|
// columnValue: (row) => { return this.showConflictingSignalList(row.conflictingSignalList); },
|
||||||
tagType: (row) => { return ''; }
|
// tagType: (row) => { return ''; }
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: this.$t('map.operation'),
|
title: this.$t('map.operation'),
|
||||||
@ -194,12 +230,12 @@ export default {
|
|||||||
handleClick: this.edit,
|
handleClick: this.edit,
|
||||||
showControl: () => { return this.showType !== 'select'; }
|
showControl: () => { return this.showType !== 'select'; }
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: '复制',
|
// name: '复制',
|
||||||
handleClick: this.copyObj,
|
// handleClick: this.copyObj,
|
||||||
type: 'warning',
|
// type: 'warning',
|
||||||
showControl: () => { return this.showType !== 'select'; }
|
// showControl: () => { return this.showType !== 'select'; }
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
name: this.$t('map.deleteObj'),
|
name: this.$t('map.deleteObj'),
|
||||||
handleClick: this.deleteObj,
|
handleClick: this.deleteObj,
|
||||||
@ -210,6 +246,11 @@ export default {
|
|||||||
name: this.$t('global.select'),
|
name: this.$t('global.select'),
|
||||||
handleClick: this.selectedObj,
|
handleClick: this.selectedObj,
|
||||||
showControl: () => { return this.showType === 'select'; }
|
showControl: () => { return this.showType === 'select'; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '更新',
|
||||||
|
handleClick: this.handleUpdate,
|
||||||
|
showControl: () => { return this.showType !== 'select'; }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -294,116 +335,121 @@ export default {
|
|||||||
that.$convertSpecifiedField(elem, that.RouteAutoTypeList, 'code', 'name', ['autoType']);
|
that.$convertSpecifiedField(elem, that.RouteAutoTypeList, 'code', 'name', ['autoType']);
|
||||||
that.$convertSpecifiedField(elem, that.RouteNatureTypeList, 'code', 'name', ['natureType']);
|
that.$convertSpecifiedField(elem, that.RouteNatureTypeList, 'code', 'name', ['natureType']);
|
||||||
that.$convertSpecifiedField(elem, that.SwitchLocateTypeList, 'code', 'name', ['overlapSwitchLocateType']);
|
that.$convertSpecifiedField(elem, that.SwitchLocateTypeList, 'code', 'name', ['overlapSwitchLocateType']);
|
||||||
that.$convertSpecifiedField(elem, that.mapList, 'id', 'name', ['mapId']);
|
|
||||||
that.$convertSpecifiedField(elem, that.switchList, 'code', 'name', ['routeOverlapSwitchList']);
|
that.$convertSpecifiedField(elem, that.switchList, 'code', 'name', ['routeOverlapSwitchList']);
|
||||||
that.$convertSpecifiedField(elem, that.signalList, 'code', 'name', ['startSignalCode', 'endSignalCode']);
|
that.$convertSpecifiedField(elem, that.signalList, 'code', 'name', ['startSignalCode', 'endSignalCode']);
|
||||||
that.$convertSpecifiedField(elem, that.stationList, 'code', 'name', ['stationCode']);
|
|
||||||
that.$convertSpecifiedField(elem, that.sectionList, 'code', 'name', ['nearSectionCode', 'autoTriggerSectionCode', 'turnBackSectionCode']);
|
that.$convertSpecifiedField(elem, that.sectionList, 'code', 'name', ['nearSectionCode', 'autoTriggerSectionCode', 'turnBackSectionCode']);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
async routeOverlap(index, row) { // 延续保护区段数据列表
|
// async routeOverlap(index, row) { // 延续保护区段数据列表
|
||||||
if (this.$refs && this.$refs.previewField && row) {
|
// if (this.$refs && this.$refs.previewField && row) {
|
||||||
const sectionDict = {};
|
// const sectionDict = {};
|
||||||
this.sectionList.map(elem => { sectionDict[elem.code] = elem.name; });
|
// this.sectionList.map(elem => { sectionDict[elem.code] = elem.name; });
|
||||||
const routeOverlapSectionList = row.routeOverlapSectionList.map(elem => { return {sectionCode : elem}; });
|
// const routeOverlapSectionList = row.routeOverlapSectionList.map(elem => { return {sectionCode : elem}; });
|
||||||
const fieldList = {
|
// const fieldList = {
|
||||||
id: row.id,
|
// id: row.id,
|
||||||
mapId: this.$route.params.mapId,
|
// mapId: this.$route.params.mapId,
|
||||||
title: this.$t('map.routeContinuesToProtectSectorData'),
|
// title: this.$t('map.routeContinuesToProtectSectorData'),
|
||||||
name: row.name,
|
// name: row.name,
|
||||||
model: {
|
// model: {
|
||||||
items: [
|
// items: [
|
||||||
{ prop: 'sectionCode', label: this.$t('map.physicalSectionID'), type: 'text' },
|
// { prop: 'sectionCode', label: this.$t('map.physicalSectionID'), type: 'text' },
|
||||||
{ prop: 'sectionCode', label: this.$t('map.physicalSectionName'), type: 'select', options: sectionDict }
|
// { prop: 'sectionCode', label: this.$t('map.physicalSectionName'), type: 'select', options: sectionDict }
|
||||||
]
|
// ]
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
this.$refs.previewField.doShow(fieldList, routeOverlapSectionList);
|
// this.$refs.previewField.doShow(fieldList, routeOverlapSectionList);
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
async sectionDetail(index, row) { // 进路物理区段
|
// async sectionDetail(index, row) { // 进路物理区段
|
||||||
if (this.$refs && this.$refs.previewField && row) {
|
// if (this.$refs && this.$refs.previewField && row) {
|
||||||
const sectionDict = {};
|
// const sectionDict = {};
|
||||||
this.sectionList.map(elem => { sectionDict[elem.code] = elem.name; });
|
// this.sectionList.map(elem => { sectionDict[elem.code] = elem.name; });
|
||||||
const routeSectionList = row.routeSectionList.map(elem => { return {sectionCode : elem}; });
|
// const routeSectionList = row.routeSectionList.map(elem => { return {sectionCode : elem}; });
|
||||||
const fieldList = {
|
// const fieldList = {
|
||||||
id: row.id,
|
// id: row.id,
|
||||||
mapId: this.$route.params.mapId,
|
// mapId: this.$route.params.mapId,
|
||||||
title: this.$t('map.routePhysicalSectionData'),
|
// title: this.$t('map.routePhysicalSectionData'),
|
||||||
name: row.name,
|
// name: row.name,
|
||||||
model: {
|
// model: {
|
||||||
items: [
|
// items: [
|
||||||
{ prop: 'sectionCode', label: this.$t('map.physicalSectionID'), type: 'text' },
|
// { prop: 'sectionCode', label: this.$t('map.physicalSectionID'), type: 'text' },
|
||||||
{ prop: 'sectionCode', label: this.$t('map.physicalSectionName'), type: 'select', options: sectionDict }
|
// { prop: 'sectionCode', label: this.$t('map.physicalSectionName'), type: 'select', options: sectionDict }
|
||||||
]
|
// ]
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
this.$refs.previewField.doShow(fieldList, routeSectionList);
|
// this.$refs.previewField.doShow(fieldList, routeSectionList);
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
async overlapSwitchDetail(index, row) { // 延续保护道岔
|
// async overlapSwitchDetail(index, row) { // 延续保护道岔
|
||||||
if (this.$refs && this.$refs.protectDetail && row) {
|
// if (this.$refs && this.$refs.protectDetail && row) {
|
||||||
const param = {
|
// const param = {
|
||||||
code: row.overlapCode,
|
// code: row.overlapCode,
|
||||||
pageNum: 10,
|
// pageNum: 10,
|
||||||
pageSize:1
|
// pageSize:1
|
||||||
};
|
// };
|
||||||
getContinueProtectList(this.$route.params.mapId, param).then(resp => {
|
// getContinueProtectList(this.$route.params.mapId, param).then(resp => {
|
||||||
this.$refs.protectDetail.doShow(resp.data.list[0]);
|
// this.$refs.protectDetail.doShow(resp.data.list[0]);
|
||||||
}).catch((error) => {
|
// }).catch((error) => {
|
||||||
console.log(error);
|
// console.log(error);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// async flankProtectionSwitchDetail(index, row) { // 进路侧防道岔
|
||||||
|
// if (this.$refs && this.$refs.previewField && row) {
|
||||||
|
// const switchDict = {};
|
||||||
|
// this.switchList.map(elem => { switchDict[elem.code] = elem.name; });
|
||||||
|
// const fieldList = {
|
||||||
|
// id: row.id,
|
||||||
|
// mapId: this.$route.params.mapId,
|
||||||
|
// title: this.$t('map.routeSideDefenseSwitch'),
|
||||||
|
// name: row.name,
|
||||||
|
// model: {
|
||||||
|
// items: [
|
||||||
|
// { prop: 'switchCode', label: this.$t('map.switchID'), type: 'text' },
|
||||||
|
// { prop: 'switchCode', label: this.$t('map.switchName'), type: 'select', options: switchDict },
|
||||||
|
// { prop: 'switchType', label: this.$t('map.switchType'), type: 'text'}
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
// row.routeFlankProtectionList.forEach( item => {
|
||||||
|
// item.switchType = item.normal ? this.$t('map.normalPosition') : this.$t('map.reversePosition');
|
||||||
|
// });
|
||||||
|
// this.$refs.previewField.doShow(fieldList, row.routeFlankProtectionList);
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// async routeSwitchDetail(index, row) { // 道岔段数据列表
|
||||||
|
// if (this.$refs && this.$refs.previewField && row) {
|
||||||
|
// const switchDict = {};
|
||||||
|
// this.switchList.map(elem => { switchDict[elem.code] = elem.name; });
|
||||||
|
// const fieldList = {
|
||||||
|
// id: row.id,
|
||||||
|
// mapId: this.$route.params.mapId,
|
||||||
|
// title: this.$t('map.entryTurnout'),
|
||||||
|
// name: row.name,
|
||||||
|
// model: {
|
||||||
|
// field: 'routeSwitchList',
|
||||||
|
// items: [
|
||||||
|
// { prop: 'switchCode', label: this.$t('map.switchID'), type: 'text' },
|
||||||
|
// { prop: 'switchCode', label: this.$t('map.switchName'), type: 'select', options: switchDict },
|
||||||
|
// { prop: 'switchType', label: this.$t('map.switchType'), type: 'text'}
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
// row.routeSwitchList.forEach( item => {
|
||||||
|
// item.switchType = item.normal ? this.$t('map.normalPosition') : this.$t('map.reversePosition');
|
||||||
|
// });
|
||||||
|
// this.$refs.previewField.doShow(fieldList, row.routeSwitchList);
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
handleUpdate(index, row) {
|
||||||
|
putSetDraftMapRouteById(this.$route.params.mapId, row).then(res => {
|
||||||
|
this.$message.success('更新成功');
|
||||||
|
}).catch(() => {
|
||||||
|
this.$messageBox('操作异常');
|
||||||
});
|
});
|
||||||
}
|
|
||||||
},
|
|
||||||
async flankProtectionSwitchDetail(index, row) { // 进路侧防道岔
|
|
||||||
if (this.$refs && this.$refs.previewField && row) {
|
|
||||||
const switchDict = {};
|
|
||||||
this.switchList.map(elem => { switchDict[elem.code] = elem.name; });
|
|
||||||
const fieldList = {
|
|
||||||
id: row.id,
|
|
||||||
mapId: this.$route.params.mapId,
|
|
||||||
title: this.$t('map.routeSideDefenseSwitch'),
|
|
||||||
name: row.name,
|
|
||||||
model: {
|
|
||||||
items: [
|
|
||||||
{ prop: 'switchCode', label: this.$t('map.switchID'), type: 'text' },
|
|
||||||
{ prop: 'switchCode', label: this.$t('map.switchName'), type: 'select', options: switchDict },
|
|
||||||
{ prop: 'switchType', label: this.$t('map.switchType'), type: 'text'}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
row.routeFlankProtectionList.forEach( item => {
|
|
||||||
item.switchType = item.normal ? this.$t('map.normalPosition') : this.$t('map.reversePosition');
|
|
||||||
});
|
|
||||||
this.$refs.previewField.doShow(fieldList, row.routeFlankProtectionList);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async routeSwitchDetail(index, row) { // 道岔段数据列表
|
|
||||||
if (this.$refs && this.$refs.previewField && row) {
|
|
||||||
const switchDict = {};
|
|
||||||
this.switchList.map(elem => { switchDict[elem.code] = elem.name; });
|
|
||||||
const fieldList = {
|
|
||||||
id: row.id,
|
|
||||||
mapId: this.$route.params.mapId,
|
|
||||||
title: this.$t('map.entryTurnout'),
|
|
||||||
name: row.name,
|
|
||||||
model: {
|
|
||||||
field: 'routeSwitchList',
|
|
||||||
items: [
|
|
||||||
{ prop: 'switchCode', label: this.$t('map.switchID'), type: 'text' },
|
|
||||||
{ prop: 'switchCode', label: this.$t('map.switchName'), type: 'select', options: switchDict },
|
|
||||||
{ prop: 'switchType', label: this.$t('map.switchType'), type: 'text'}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
row.routeSwitchList.forEach( item => {
|
|
||||||
item.switchType = item.normal ? this.$t('map.normalPosition') : this.$t('map.reversePosition');
|
|
||||||
});
|
|
||||||
this.$refs.previewField.doShow(fieldList, row.routeSwitchList);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
saveRelated(row) {
|
saveRelated(row) {
|
||||||
@ -414,36 +460,36 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
edit(index, row) {
|
edit(index, row) {
|
||||||
this.mapList.forEach(elem => {
|
// this.mapList.forEach(elem => {
|
||||||
if (elem.name === row.mapId) {
|
// if (elem.name === row.mapId) {
|
||||||
const model = {
|
// const model = {
|
||||||
mapId: elem.id,
|
// mapId: elem.id,
|
||||||
id: row.id
|
// id: row.id
|
||||||
};
|
// };
|
||||||
getRouteNewById(model.id).then(response => {
|
getRouteNewById(row.mapId).then(response => {
|
||||||
const data = response.data;
|
const data = response.data;
|
||||||
this.$emit('routeSelected', data);
|
this.$emit('routeSelected', data);
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
},
|
|
||||||
copyObj(index, row) {
|
|
||||||
this.mapList.forEach(elem => {
|
|
||||||
if (elem.name === row.mapId) {
|
|
||||||
const model = {
|
|
||||||
mapId: elem.id,
|
|
||||||
id: row.id
|
|
||||||
};
|
|
||||||
getRouteNewById(model.id).then(response => {
|
|
||||||
const data = response.data;
|
|
||||||
delete data.id;
|
|
||||||
this.$emit('routeSelected', data);
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
// copyObj(index, row) {
|
||||||
|
// this.mapList.forEach(elem => {
|
||||||
|
// if (elem.name === row.mapId) {
|
||||||
|
// const model = {
|
||||||
|
// mapId: elem.id,
|
||||||
|
// id: row.id
|
||||||
|
// };
|
||||||
|
// getRouteNewById(model.id).then(response => {
|
||||||
|
// const data = response.data;
|
||||||
|
// delete data.id;
|
||||||
|
// this.$emit('routeSelected', data);
|
||||||
|
// this.doClose();
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// },
|
||||||
deleteObj(index, row) {
|
deleteObj(index, row) {
|
||||||
if (row) {
|
if (row) {
|
||||||
this.$confirm('是否确认删除?', '提示', {
|
this.$confirm('是否确认删除?', '提示', {
|
||||||
@ -451,19 +497,19 @@ export default {
|
|||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
delRouteNew(row.id).then(response => {
|
delRouteNew(this.$route.params.mapId, row.code).then(response => {
|
||||||
const param = {
|
// const param = {
|
||||||
code: row.overlapCode,
|
// code: row.overlapCode,
|
||||||
pageNum: 10,
|
// pageNum: 10,
|
||||||
pageSize:1
|
// pageSize:1
|
||||||
};
|
// };
|
||||||
getContinueProtectList(this.$route.params.mapId, param).then(resp => {
|
// getContinueProtectList(this.$route.params.mapId, param).then(resp => {
|
||||||
if (resp.data.list[0]) {
|
// if (resp.data.list[0]) {
|
||||||
delContinueProtect(resp.data.list[0].id).then( res => {
|
// delContinueProtect(resp.data.list[0].id).then( res => {
|
||||||
this.$message.success('删除成功');
|
// this.$message.success('删除成功');
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox('删除失败');
|
this.$messageBox('删除失败');
|
||||||
@ -481,39 +527,47 @@ export default {
|
|||||||
selectedObj(index, row) {
|
selectedObj(index, row) {
|
||||||
this.$emit('setRouteCode', row, this.codeType);
|
this.$emit('setRouteCode', row, this.codeType);
|
||||||
this.show = false;
|
this.show = false;
|
||||||
},
|
|
||||||
showConflictingSignalList(data) {
|
|
||||||
const nameList = [];
|
|
||||||
data.forEach(ele => {
|
|
||||||
let signalName = '';
|
|
||||||
this.signalList.some(item => {
|
|
||||||
if (item.code === ele.signalCode) {
|
|
||||||
signalName = item.name;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
let switchName = '';
|
|
||||||
ele.switchPositionList.forEach((item, index) => {
|
|
||||||
this.switchList.some(it => {
|
|
||||||
if (it.code === item.switchCode) {
|
|
||||||
const pos = item.normal ? 'N' : 'R';
|
|
||||||
if (index === 0) {
|
|
||||||
switchName = switchName + it.name + pos;
|
|
||||||
} else {
|
|
||||||
switchName = switchName + '/' + it.name + pos;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
if (switchName) {
|
|
||||||
nameList.push(signalName + ' ' + 'WITH' + ' ' + switchName);
|
|
||||||
} else {
|
|
||||||
nameList.push(signalName);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return nameList;
|
|
||||||
}
|
}
|
||||||
|
// showConflictingSignalList(data) {
|
||||||
|
// const nameList = [];
|
||||||
|
// data.forEach(ele => {
|
||||||
|
// let signalName = '';
|
||||||
|
// this.signalList.some(item => {
|
||||||
|
// if (item.code === ele.signalCode) {
|
||||||
|
// signalName = item.name;
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// let switchName = '';
|
||||||
|
// ele.switchPositionList.forEach((item, index) => {
|
||||||
|
// this.switchList.some(it => {
|
||||||
|
// if (it.code === item.switchCode) {
|
||||||
|
// const pos = item.normal ? 'N' : 'R';
|
||||||
|
// if (index === 0) {
|
||||||
|
// switchName = switchName + it.name + pos;
|
||||||
|
// } else {
|
||||||
|
// switchName = switchName + '/' + it.name + pos;
|
||||||
|
// }
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// if (switchName) {
|
||||||
|
// nameList.push(signalName + ' ' + 'WITH' + ' ' + switchName);
|
||||||
|
// } else {
|
||||||
|
// nameList.push(signalName);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// return nameList;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.dialog_content_box{
|
||||||
|
.el-dialog__body{
|
||||||
|
padding-top: 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user