大铁线路调整6 联锁数据调整
This commit is contained in:
parent
a90fbd6f67
commit
c5d60323e2
@ -18,7 +18,7 @@ export function queryAssistById(id){
|
||||
// 保存指示灯关联信息
|
||||
export function saveAssist(data, mapId) {
|
||||
return request({
|
||||
url: `/api/assist/indicator/section/save${mapId}`,
|
||||
url: `/api/assist/indicator/section/save/${mapId}`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -30,6 +30,7 @@ export function handlerUrl(data) {
|
||||
// BASE_API = 'http://192.168.8.172:9200'; // 旭强
|
||||
// BASE_API = 'http://192.168.8.109:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
BASE_API = 'http://192.168.3.37:9000'; // 卫志宏
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
|
@ -11,7 +11,8 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { getBigRouteList, deleteBigRoute } from '@/api/jmap/mapdraft';
|
||||
import { getBigRouteList } from '@/api/jmap/mapdraft';
|
||||
import { queryAssistListPaged, deleteAssist } from '@/api/assist';
|
||||
export default {
|
||||
name:'BigRouteDetail',
|
||||
props: {
|
||||
@ -31,96 +32,70 @@
|
||||
},
|
||||
filterRouteMap:{},
|
||||
queryForm: {
|
||||
// labelWidth: '120px',
|
||||
// queryObject: {
|
||||
// }
|
||||
show:false
|
||||
},
|
||||
signalAspectList:[
|
||||
{label:'红', value:1},
|
||||
{label:'绿', value:2},
|
||||
{label:'黄', value:3},
|
||||
{label:'黄红', value:4},
|
||||
{label:'绿绿', value:5},
|
||||
{label:'绿黄', value:6},
|
||||
{label:'黄黄', value:7},
|
||||
{label:'黄闪黄', value:8},
|
||||
{label:'白红', value:9},
|
||||
{label:'蓝', value:10},
|
||||
{label:'白', value:11},
|
||||
{label:'红闪', value:12}
|
||||
],
|
||||
switchLocateTypeList: [
|
||||
{ label: '定位', value: true },
|
||||
{ label: '反位', value: false }
|
||||
modelTypeList: [{value: 'indicator', label: '指示灯'}, {value: 'button', label: '按钮'}],
|
||||
typeList: [
|
||||
{value: 'receive', label:'接'},
|
||||
{value: 'deliver', label: '发'},
|
||||
{value: 'section', label: '区间'},
|
||||
{value: 'assist', label: '辅助'},
|
||||
{value: 'main_assist', label: '总辅助'},
|
||||
{value: 'receive_assist', label: '接辅助'},
|
||||
{value: 'deliver_assist', label: '发辅助'},
|
||||
{value: 'change_direction', label: '换方'}
|
||||
],
|
||||
queryList: {
|
||||
// query: this.queryFunction,
|
||||
data:[],
|
||||
// afterQuery: this.afterQuery,
|
||||
query: this.queryFunction,
|
||||
height:'500px',
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
paginationHiden:true,
|
||||
columns: [
|
||||
{
|
||||
title: '进路名称',
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '始端信号机',
|
||||
prop: 'startSignalCode',
|
||||
title: '主设备',
|
||||
prop: 'code',
|
||||
width: 150,
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.getSignalName(row.startSignalCode, row.multiRoute); },
|
||||
columnValue: (row) => { return this.getMainDeviceName(row.code); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '信号显示',
|
||||
prop: 'signalAspect',
|
||||
title: '设备分型',
|
||||
prop: 'modelType',
|
||||
width: 150,
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.getSignalAspect(row.signalAspect, row.multiRoute); },
|
||||
columnValue: (row) => { return this.getModelType(row.modelType); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '起始区段',
|
||||
prop: 'startSectionCode',
|
||||
title: '类型',
|
||||
prop: 'type',
|
||||
width: 150,
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.getSectionName(row.startSectionCode, row.multiRoute); },
|
||||
columnValue: (row) => { return this.getType(row.type); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '终到区段',
|
||||
prop: 'endSectionCode',
|
||||
width: 150,
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.getSectionName(row.endSectionCode, row.multiRoute); },
|
||||
title: '关联区段列表',
|
||||
prop: 'sectionList',
|
||||
type: 'tagMore',
|
||||
columnValue: (row) => { return this.getSectionName(row.sectionList); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '途经道岔位置',
|
||||
prop: 'pathSwitchPosition',
|
||||
title: '关联进路',
|
||||
prop: 'routeCode',
|
||||
width: 200,
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.getPathSwitchPosition(row.pathSwitchPosition, row.multiRoute); },
|
||||
columnValue: (row) => { return this.getRouteName(row.routeCode); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '多进路引用进路',
|
||||
prop: 'routeAspectList',
|
||||
width: 300,
|
||||
type: 'tagMore',
|
||||
columnValue: (row) => { return this.getRouteAspectList(row.routeAspectList, row.multiRoute); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '排列进路按钮',
|
||||
prop: 'btnCodeList',
|
||||
width: 300,
|
||||
type: 'tagMore',
|
||||
columnValue: (row) => { return this.getBtnCodeList(row.btnCodeList); },
|
||||
title: '关联站台',
|
||||
prop: 'standCode',
|
||||
width: 150,
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.getStandName(row.standCode); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
@ -133,132 +108,75 @@
|
||||
handleClick: this.deleteRoute,
|
||||
type: 'danger'
|
||||
}
|
||||
// {
|
||||
// name: this.$t('global.cancel'),
|
||||
// handleClick: this.taskCancel,
|
||||
// type: '',
|
||||
// showControl: (row) => { return row.status == '04'; }
|
||||
// },
|
||||
// {
|
||||
// name: this.$t('lesson.toPerform'),
|
||||
// handleClick: this.taskStart,
|
||||
// type: '',
|
||||
// showControl: (row) => { return row.status == '03' || row.status == '05'; }
|
||||
// }
|
||||
]
|
||||
}
|
||||
// multiRoute
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods:{
|
||||
doShow() {
|
||||
this.show = true;
|
||||
this.reloadData();
|
||||
if (this.mapInfo && this.mapInfo.id) {
|
||||
getBigRouteList(this.mapInfo.id).then(response => {
|
||||
response.data.forEach(route=>{
|
||||
this.filterRouteMap[route.code] = route.name;
|
||||
});
|
||||
this.reloadTable();
|
||||
}).catch(()=>{});
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
// queryFunction(params) {
|
||||
// if (this.mapInfo && this.mapInfo.id) {
|
||||
// debugger;
|
||||
// // this.queryList.query(this.queryData).then(response => {
|
||||
// return getBigRouteList(this.mapInfo.id);
|
||||
// }
|
||||
// },
|
||||
// reloadTable() {
|
||||
// if (this.queryList && this.queryList.reload) {
|
||||
// this.queryList.reload();
|
||||
// }
|
||||
// },
|
||||
reloadData() {
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
queryFunction(params) {
|
||||
if (this.mapInfo && this.mapInfo.id) {
|
||||
this.queryList.data = [];
|
||||
getBigRouteList(this.mapInfo.id).then(response => {
|
||||
this.queryList.data = response.data;
|
||||
response.data.forEach(route=>{
|
||||
if (!route.multiRoute) {
|
||||
this.filterRouteMap[route.code] = route.name;
|
||||
}
|
||||
});
|
||||
}).catch(()=>{
|
||||
this.queryList.data = [];
|
||||
});
|
||||
return queryAssistListPaged(params, this.mapInfo.id);
|
||||
}
|
||||
},
|
||||
getSignalName(code, multiRoute) {
|
||||
if (multiRoute) {
|
||||
return '';
|
||||
} else {
|
||||
return this.formatName(code);
|
||||
}
|
||||
},
|
||||
getSectionName(code, multiRoute) {
|
||||
if (multiRoute) {
|
||||
return '';
|
||||
} else {
|
||||
return this.formatName(code);
|
||||
}
|
||||
},
|
||||
getSignalAspect(code, multiRoute) {
|
||||
if (multiRoute) {
|
||||
return '';
|
||||
} else {
|
||||
return this.$convertField(code, this.signalAspectList, ['value', 'label']);
|
||||
}
|
||||
},
|
||||
getPathSwitchPosition(pathSwitchPosition, multiRoute) {
|
||||
if (multiRoute) {
|
||||
return '';
|
||||
} else {
|
||||
if (pathSwitchPosition) {
|
||||
const position = this.$convertField(pathSwitchPosition.normal, this.switchLocateTypeList, ['value', 'label']);
|
||||
return '' + this.formatName(pathSwitchPosition.switchCode) + ' (' + position + ')';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
getBtnCodeList(btnCodeList) {
|
||||
const nameList = [];
|
||||
btnCodeList && btnCodeList.forEach(item => {
|
||||
nameList.push(this.formatName(item));
|
||||
});
|
||||
return nameList;
|
||||
},
|
||||
formatName(code) {
|
||||
let name = '';
|
||||
getMainDeviceName(code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (device) {
|
||||
name = device.name || '';
|
||||
}
|
||||
return name;
|
||||
return device.name + '[' + code + ']';
|
||||
},
|
||||
getRouteAspectList(routeAspectList, multiRoute) {
|
||||
const nameList = [];
|
||||
if (multiRoute) {
|
||||
routeAspectList.forEach(item => {
|
||||
const route = this.filterRouteMap[item.routeCode];
|
||||
if (route) {
|
||||
const signalAspect = this.$convertField(item.signalAspect, this.signalAspectList, ['value', 'label']) || '';
|
||||
nameList.push(route + '(' + signalAspect + ')');
|
||||
}
|
||||
});
|
||||
getModelType(modelType) {
|
||||
if (modelType === 'indicator') {
|
||||
return '指示灯';
|
||||
} else if (modelType === 'button') {
|
||||
return '按钮';
|
||||
}
|
||||
return nameList;
|
||||
},
|
||||
getType(type) {
|
||||
const typeElem = this.typeList.find(item => item.value === type);
|
||||
return typeElem.label;
|
||||
},
|
||||
getRouteName(routeCode) {
|
||||
return this.filterRouteMap[routeCode] + '[' + routeCode + ']'
|
||||
},
|
||||
getStandName(standCode) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](standCode);
|
||||
return device ? device.name : '';
|
||||
},
|
||||
getSectionName(sectionList) {
|
||||
const sectionName = [];
|
||||
sectionList.forEach(item => {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](item.code);
|
||||
sectionName.push(device.name);
|
||||
});
|
||||
return sectionName;
|
||||
},
|
||||
deleteRoute(index, row) {
|
||||
deleteBigRoute(this.mapInfo.id, row.code).then(res=>{
|
||||
this.$message.success('删除进路成功');
|
||||
// this.mapInfo.id,
|
||||
deleteAssist( row.id).then(res=>{
|
||||
this.$message.success('删除指示灯关联信息成功');
|
||||
this.reloadData();
|
||||
delete this.filterRouteMap[row.code];
|
||||
this.$emit('refresh');
|
||||
}).catch(error=>{
|
||||
this.$messageBox('删除进路失败:' + error.meessage);
|
||||
this.$messageBox('删除指示灯关联信息失败:' + error.meessage);
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备分型:" prop="modelType">
|
||||
<el-select v-model="addModel.modelType" :disabled="true">
|
||||
<el-select v-model="addModel.modelType">
|
||||
<el-option
|
||||
v-for="item in modelTypeList"
|
||||
:key="item.value"
|
||||
@ -31,8 +31,8 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型:" prop="type" :disabled="true">
|
||||
<el-select>
|
||||
<el-form-item label="设备类型:" prop="type">
|
||||
<el-select v-model="addModel.type">
|
||||
<el-option
|
||||
v-for="item in typeList"
|
||||
:key="item.value"
|
||||
@ -56,7 +56,7 @@
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="['assist', 'main_assist', 'receive_assist', 'deliver_assist', 'change_direction'].includes(addModel.type)" label="关联站台:" prop="standCode">
|
||||
<el-select v-model="standCode" clearable filterable>
|
||||
<el-select v-model="addModel.standCode" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in standList"
|
||||
:key="item.code"
|
||||
@ -70,7 +70,7 @@
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="addModel.type === 'receive' || addModel.type === 'deliver'" label="关联进路:" prop="routeCode">
|
||||
<el-select v-model="routeCode" clearable filterable>
|
||||
<el-select v-model="addModel.routeCode" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in routeList"
|
||||
:key="item.code"
|
||||
@ -80,7 +80,6 @@
|
||||
</el-select>
|
||||
<!--<el-button type="primary" @click="pushRouteAspect">查看</el-button>-->
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div class="bigDraft">
|
||||
<el-button-group class="bigDraftBtn">
|
||||
@ -186,16 +185,10 @@
|
||||
setSelected(selected) {
|
||||
if (selected) {
|
||||
const deviceTypeList = ['SectionOccupied'.toUpperCase(), 'AssistStatus'.toUpperCase(), 'TotalAssist'.toUpperCase(), 'DepartAssist'.toUpperCase(),
|
||||
'PickAssist'.toUpperCase(), 'Recovery'.toUpperCase(), 'Accident'.toUpperCase(), 'Occlusion'.toUpperCase(), 'PickOrDepartArrow'.toUpperCase(),
|
||||
'PickAssist'.toUpperCase(), 'PickOrDepartArrow'.toUpperCase(),
|
||||
'SignalButton'.toUpperCase()];
|
||||
if (deviceTypeList.includes(selected._type.toUpperCase()) && this.field.toUpperCase() === 'code'.toUpperCase()) {
|
||||
this.addModel.code = selected.code;
|
||||
switch (selected._type) {
|
||||
case 'SectionOccupied':
|
||||
this.addModel.type = 'section';
|
||||
this.addModel.modelType = 'indicator';
|
||||
break;
|
||||
}
|
||||
this.field = '';
|
||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'sectionList'.toUpperCase()) {
|
||||
this.addModel.sectionList.push(selected.code);
|
||||
|
@ -208,7 +208,10 @@ export default {
|
||||
this.$emit('showMap');
|
||||
},
|
||||
handleSelectControlPage(device) {
|
||||
const controlLampTypeList = ['AtsControl', 'CenterCommunication', 'ChainControl', 'IntersiteControl', 'LeuControl', 'LocalControl', 'Maintain', 'SwitchFault', 'PowerSupply', 'NoOneReturn', 'MaintenanceLamps', 'ZcCommunication', 'FaultStatusGroup', 'ModeStatusGroup', 'LampFilament', 'ReturnModeGroup', 'ControlSwitch', 'Axle', 'IndicatorLight'];
|
||||
const controlLampTypeList = ['AtsControl', 'CenterCommunication', 'ChainControl', 'IntersiteControl', 'LeuControl', 'LocalControl', 'Maintain',
|
||||
'SwitchFault', 'PowerSupply', 'NoOneReturn', 'MaintenanceLamps', 'ZcCommunication', 'FaultStatusGroup', 'ModeStatusGroup', 'LampFilament',
|
||||
'ReturnModeGroup', 'ControlSwitch', 'Axle', 'IndicatorLight', 'SectionOccupied', 'AssistStatus', 'TotalAssist', 'DepartAssist', 'PickAssist',
|
||||
'Recovery', 'Accident', 'Occlusion', 'PickOrDepartArrow'];
|
||||
const type = device._type;
|
||||
if (this.selectDevice) {
|
||||
this.enabledTab = this.selectDevice;
|
||||
|
Loading…
Reference in New Issue
Block a user