延续保护预览
This commit is contained in:
parent
05a4ca76dc
commit
fbbee9324a
@ -3,11 +3,11 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
} else {
|
||||
BASE_API = process.env.VUE_APP_BASE_API;
|
||||
}
|
||||
|
@ -9,18 +9,21 @@
|
||||
/>
|
||||
</div>
|
||||
<pre-view-field ref="previewField" :map-info="mapInfo" />
|
||||
<protect-detail ref="protectDetail" :map-info="mapInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { listMap, getRouteNewList, delRouteNew, getRouteNewById, putRouteNew, getContinueProtectList, delContinueProtect } from '@/api/jmap/mapdraft'; /** listRouteMapRoute*/
|
||||
import ProtectDetail from './protectDetail';
|
||||
import PreViewField from './preview';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
components: {
|
||||
PreViewField
|
||||
PreViewField,
|
||||
ProtectDetail
|
||||
},
|
||||
props: {
|
||||
mapInfo: {
|
||||
@ -328,41 +331,17 @@ export default {
|
||||
}
|
||||
},
|
||||
async overlapSwitchDetail(index, row) { // 延续保护道岔
|
||||
if (this.$refs && this.$refs.previewField && row) {
|
||||
// const param = {
|
||||
// code: row.overlapCode,
|
||||
// pageNum: 10,
|
||||
// pageSize:1
|
||||
// };
|
||||
// getContinueProtectList(this.$route.params.mapId, param).then(resp => {
|
||||
// if (resp.data.list[0]) {
|
||||
// const data = resp.data.list[0];
|
||||
// const overlabList = [];
|
||||
// data.relSectionSwitchList.forEach( (item) =>{
|
||||
// if (item.routeOverlapSwitchList.length) {
|
||||
//
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// const switchDict = {};
|
||||
// const switchTypeDict = {};
|
||||
// this.switchList.map(elem => { switchDict[elem.code] = elem.name; });
|
||||
// this.SwitchLocateTypeList.map(elem => { switchTypeDict[elem.code] = elem.name; });
|
||||
// const fieldList = {
|
||||
// id: row.id,
|
||||
// mapId: this.$route.params.mapId,
|
||||
// title: '延续保护道岔数据',
|
||||
// name: row.name,
|
||||
// model: {
|
||||
// items: [
|
||||
// { prop: 'switchCode', label: '道岔ID', type: 'text' },
|
||||
// { prop: 'switchCode', label: '道岔名称', type: 'select', options: switchDict },
|
||||
// { prop: 'switchLocateType', label: '道岔类型', type: 'select', options: switchTypeDict }
|
||||
// ]
|
||||
// }
|
||||
// };
|
||||
// this.$refs.previewField.doShow(fieldList, row.routeOverlapSwitchList);
|
||||
if (this.$refs && this.$refs.protectDetail && row) {
|
||||
const param = {
|
||||
code: row.overlapCode,
|
||||
pageNum: 10,
|
||||
pageSize:1
|
||||
};
|
||||
getContinueProtectList(this.$route.params.mapId, param).then(resp => {
|
||||
this.$refs.protectDetail.doShow(resp.data.list[0]);
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
async flankProtectionSwitchDetail(index, row) { // 进路侧防道岔
|
||||
|
@ -8,7 +8,7 @@
|
||||
center
|
||||
append-to-body
|
||||
>
|
||||
<el-table :data="data" :span-method="objectSpanMethod" border style="width: 100%">
|
||||
<el-table :data="data" border style="width: 100%">
|
||||
<template v-for="(item, index) in form">
|
||||
<el-table-column :key="index" :label="item.label">
|
||||
<template slot-scope="scope">
|
||||
@ -67,12 +67,6 @@ export default {
|
||||
},
|
||||
doClose(done) {
|
||||
this.show = false;
|
||||
},
|
||||
objectSpanMethod() {
|
||||
return {
|
||||
rowspan: 1,
|
||||
colspan: 1
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -297,7 +297,7 @@ export default {
|
||||
if (this.$refs && this.$refs.form) {
|
||||
delete this.addModel.id;
|
||||
this.$refs.form.resetFields();
|
||||
this.addModel.mapId = this.mapInfo.id;
|
||||
this.addModel.mapId = this.$route.params.mapId;
|
||||
this.addModel.relSectionSwitchList = [];
|
||||
this.addModel.code = '';
|
||||
this.addModel.unlockTime = 0;
|
||||
|
@ -0,0 +1,112 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
:title="mapInfo.name + ' / ' + '延续保护'"
|
||||
:visible.sync="show"
|
||||
width="30%"
|
||||
:before-close="doClose"
|
||||
center
|
||||
append-to-body
|
||||
>
|
||||
|
||||
<el-table ref="protetTable" border :data="data">
|
||||
<el-table-column key="1" label="解锁区段" prop="unlockSectionCode" />
|
||||
<el-table-column key="2" label="解锁时间(s)" prop="unlockTime" />
|
||||
<el-table-column key="3" label="延时保护线路" prop="">
|
||||
<el-table-column key="4" label="进路延续保护区段" prop="routeOverlapSectionList">
|
||||
<template slot-scope="scope">
|
||||
<template v-for="tag in scope.row.routeOverlapSectionList">
|
||||
<el-tag
|
||||
:key="tag"
|
||||
type="primary"
|
||||
style="margin-right: 10px; margin-bottom: 5px;"
|
||||
>{{ tag }}
|
||||
</el-tag></template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column key="5" label="延续保护道岔" prop="">
|
||||
<el-table-column key="6" label="道岔" prop="switchCode" />
|
||||
<el-table-column key="7" label="道岔类型" prop="switchType" />
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name: 'ProtectDetail',
|
||||
props: {
|
||||
mapInfo: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
title: '',
|
||||
data: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'switchList',
|
||||
'sectionList'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
doShow(data) {
|
||||
this.data = [];
|
||||
data.relSectionSwitchList.forEach(item => {
|
||||
const unlockSectionName = this.handleRouteOverlapSectionList(item, data.unlockSectionCode);
|
||||
if (item.routeOverlapSwitchList.length) {
|
||||
item.routeOverlapSwitchList.forEach( ele => {
|
||||
const column = {
|
||||
unlockSectionCode: unlockSectionName,
|
||||
unlockTime: data.unlockTime,
|
||||
routeOverlapSectionList: item.routeOverlapSectionList,
|
||||
switchCode: ele.switchCode,
|
||||
switchType: ele.normal ? '定位' : '反位'
|
||||
};
|
||||
this.$convertSpecifiedField(column, this.switchList, 'code', 'name', ['switchCode']);
|
||||
this.data.push(column);
|
||||
} );
|
||||
} else {
|
||||
const column = {
|
||||
unlockSectionCode: unlockSectionName,
|
||||
unlockTime: data.unlockTime,
|
||||
routeOverlapSectionList: item.routeOverlapSectionList,
|
||||
switchCode: '',
|
||||
switchType: ''
|
||||
};
|
||||
this.data.push(column);
|
||||
}
|
||||
});
|
||||
this.show = true;
|
||||
},
|
||||
handleRouteOverlapSectionList(data, unlockSectionCode) {
|
||||
this.sectionList.forEach(item => {
|
||||
const index = data.routeOverlapSectionList.indexOf(item.code);
|
||||
if (index >= 0) {
|
||||
data.routeOverlapSectionList[index] = item.name + '(' + item.code + ')';
|
||||
}
|
||||
if (item.code === unlockSectionCode) {
|
||||
unlockSectionCode = item.name + '(' + item.code + ')';
|
||||
}
|
||||
});
|
||||
return unlockSectionCode;
|
||||
},
|
||||
doClose(done) {
|
||||
this.show = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user