Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
c2bda14c4f
8
.env.heb
8
.env.heb
@ -3,7 +3,7 @@ NODE_ENV = 'production'
|
||||
VUE_APP_PRO = 'local'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
|
||||
VUE_APP_VOICE_API = 'https://joylink.club/oss/joylink'
|
||||
VUE_APP_UPLOAD_API = 'https://upload.joylink.club'
|
||||
VUE_APP_BASE_SITE='https://joylink.club/cbtc'
|
||||
VUE_APP_BASE_API = 'http://160.20.60.15:9000'
|
||||
VUE_APP_VOICE_API = 'http://160.20.60.15/oss/joylink'
|
||||
VUE_APP_UPLOAD_API = 'http://160.20.60.15'
|
||||
VUE_APP_BASE_SITE='http://160.20.60.15'
|
||||
|
@ -317,10 +317,11 @@ export function getApproachSectionDetail(id) {
|
||||
});
|
||||
}
|
||||
|
||||
// 更新信号机接近区段
|
||||
export function putApproachSection(data) {
|
||||
// 更新信号机接近区段 修改信号机接近区段
|
||||
export function putApproachSection(mapId, data) {
|
||||
return request({
|
||||
url: `/api/mapBuild/approachSection/${data.id}`,
|
||||
// url: `/api/mapBuild/approachSection/${data.id}`,
|
||||
url: `/api/draftMap/${mapId}/signalApproachSection/${data.signalCode}`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
@ -329,36 +330,54 @@ export function putApproachSection(data) {
|
||||
// 分页查询信号机接近区段列表
|
||||
export function getApproachSectionList(mapId, params) {
|
||||
return request({
|
||||
url: `/api/mapBuild/${mapId}/approachSection/paging`,
|
||||
// url: `/api/mapBuild/${mapId}/approachSection/paging`,
|
||||
url: `/api/draftMap/${mapId}/signalApproachSection/paging`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
// 延续保护相关接口 创建,修改,删除,根据id查询, 分页查询
|
||||
export function postContinueProtect(data) {
|
||||
// 查询所有信号机接近区段数据
|
||||
export function getSignalApproachSectionList(mapId) {
|
||||
return request({
|
||||
url: `/api/mapBuild/overlap`,
|
||||
method: 'post',
|
||||
data: data
|
||||
url: `/api/draftMap/${mapId}/signalApproachSection/all`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
export function putContinueProtect(data) {
|
||||
|
||||
// 延续保护相关接口 创建,修改,删除,根据id查询, 分页查询
|
||||
// export function postContinueProtect(data) {
|
||||
// return request({
|
||||
// url: `/api/mapBuild/overlap`,
|
||||
// method: 'post',
|
||||
// data: data
|
||||
// });
|
||||
// }
|
||||
// 获取所有延续保护 list
|
||||
export function getOverlapAllList(mapId) {
|
||||
return request({
|
||||
url: `/api/mapBuild/overlap/${data.id}`,
|
||||
url: `/api/draftMap/${mapId}/overlap/all`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
export function putContinueProtect(mapId, data) {
|
||||
return request({
|
||||
// url: `/api/mapBuild/overlap/${data.id}`,
|
||||
url: `/api/draftMap/${mapId}/overlap/${data.code}`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
export function delContinueProtect(id) {
|
||||
export function delContinueProtect(mapId, code) {
|
||||
return request({
|
||||
url: `/api/mapBuild/overlap/${id}`,
|
||||
// url: `/api/mapBuild/overlap/${id}`,
|
||||
url: `/api/draftMap/${mapId}/overlap/${code}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
export function getContinueProtectList(mapId, params) {
|
||||
return request({
|
||||
url: `/api/mapBuild/${mapId}/overlap/paging`,
|
||||
// url: `/api/mapBuild/${mapId}/overlap/paging`,
|
||||
url: `/api/draftMap/${mapId}/overlap/paging`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
@ -412,9 +431,16 @@ export function putRouteNew(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({
|
||||
url: `/api/mapBuild/routeNew/${id}`,
|
||||
url: `/api/draftMap/${mapId}/route/${code}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
@ -424,13 +450,30 @@ export function getRouteNewById(id) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
// // 分页查询进路数据(old)
|
||||
// export function getRouteNewList(mapId, params) {
|
||||
// return request({
|
||||
// url: `/api/mapBuild/${mapId}/routeNew`,
|
||||
// method: 'get',
|
||||
// params
|
||||
// });
|
||||
// }
|
||||
// 分页查询进路数据(new)
|
||||
export function getRouteNewList(mapId, params) {
|
||||
return request({
|
||||
url: `/api/mapBuild/${mapId}/routeNew`,
|
||||
url: `/api/draftMap/${mapId}/route/paging`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
// 修改进路属性对象
|
||||
export function putSetDraftMapRouteById(mapId, data) {
|
||||
return request({
|
||||
url: `/api/draftMap/${mapId}/route/${data.code} `,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
// 新建进路侧防
|
||||
export function postFlankProtection(data) {
|
||||
return request({
|
||||
|
@ -45,13 +45,43 @@
|
||||
<el-table-column
|
||||
v-if="checkColumnTyep(column, 'basic')"
|
||||
:key="index"
|
||||
:label="column.title"
|
||||
:width="column.width"
|
||||
show-overflow-tooltip
|
||||
:sortable="column.sortable"
|
||||
:sort-by="column.sortBy"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<template v-if="column.edit">
|
||||
<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 v-else>
|
||||
<span class="hideOutContent">{{ scope.row[column.prop] }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-else-if="checkColumnTyep(column, 'select')"
|
||||
:key="index"
|
||||
:prop="column.prop"
|
||||
:label="column.title"
|
||||
:width="column.width"
|
||||
show-overflow-tooltip
|
||||
:sortable="column.sortable"
|
||||
:sort-by="column.sortBy"
|
||||
/>
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row[column.prop]" placeholder="请选择" size="mini">
|
||||
<el-option
|
||||
v-for="item in column.options"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-else-if="checkColumnTyep(column, 'html')"
|
||||
:key="index"
|
||||
@ -87,7 +117,12 @@
|
||||
: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>
|
||||
<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>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-checkbox v-model="scope.row[column.prop]" />
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@ -295,6 +330,16 @@ export default {
|
||||
// this.tableHeight = this.$refs.table2.$el.offsetHeight + 23;
|
||||
},
|
||||
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) {
|
||||
if (column.show === false) {
|
||||
@ -379,6 +424,7 @@ export default {
|
||||
});
|
||||
if (fv.type === 'date') {
|
||||
const format = fv.format || 'yyyy-MM-dd';
|
||||
// eslint-disable-next-line new-cap
|
||||
return new Date(obj).Format(format);
|
||||
} else if (fv.formatter instanceof Function) {
|
||||
return fv.formatter(v);
|
||||
|
@ -7,6 +7,12 @@ export default {
|
||||
runPlanManage: 'Run plan',
|
||||
productEdit: 'Product editor',
|
||||
|
||||
newDesignEditor: 'Editor',
|
||||
newDesignEditorList: 'Editor List',
|
||||
newDesignDraftEditorList: 'Draft Editor List',
|
||||
uploadPdf: 'Upload Pdf',
|
||||
fileManage:'File Manage',
|
||||
|
||||
designhomePage: 'Public map',
|
||||
designUserPage: 'Personal map',
|
||||
newDesignUserPage: 'Personal map',
|
||||
|
@ -8,6 +8,7 @@ export default {
|
||||
newDesignEditorList: '图文列表',
|
||||
newDesignDraftEditorList: '文章草稿',
|
||||
uploadPdf: 'PDF上传',
|
||||
fileManage:'文件管理',
|
||||
|
||||
mapManage: '地图管理',
|
||||
skinManage: '皮肤管理',
|
||||
|
@ -226,7 +226,7 @@ export default class TrainBody extends Group {
|
||||
z: model.z + 1,
|
||||
x: parseInt(model.point.x + style.Train.crewNum.trainCrewNumOffset.x),
|
||||
y: parseInt(model.point.y + style.Train.crewNum.trainCrewNumOffset.y),
|
||||
text: 'BBB',
|
||||
text: model.model.crewNumber ? model.model.crewNumber : 'BBB',
|
||||
textFill: style.trainTextColor,
|
||||
textStroke: style.trainTextColor,
|
||||
textStrokeWidth: 0,
|
||||
|
@ -17,7 +17,7 @@
|
||||
<el-form ref="form" :model="formModel" :rules="rules">
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="targetDeviceCode" label="目的地:">
|
||||
<el-select v-model="formModel.targetDeviceCode" size="small" style="width: 165px;height: 32px;line-height: 32px;" placeholder="请选择">
|
||||
<el-select ref="faultSelect1" v-model="formModel.targetDeviceCode" size="small" style="width: 165px;height: 32px;line-height: 32px;" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in selectedList"
|
||||
:key="item.code"
|
||||
@ -49,7 +49,7 @@
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-form-item prop="faultType">
|
||||
<el-select v-model="form.faultType" size="small" style="height: 32px;line-height: 32px;" placeholder="请选择">
|
||||
<el-select ref="faultSelect2" v-model="form.faultType" size="small" style="height: 32px;line-height: 32px;" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in faultList"
|
||||
:key="item.value"
|
||||
@ -189,6 +189,12 @@ export default {
|
||||
this.deviceName = deviceType[selected._type];
|
||||
}
|
||||
this.faultList = deviceFaultType[selected._type];
|
||||
if (selected._type == 'Switch' && this.popClass == 'xian-01__systerm' ) {
|
||||
// && this.$route.query.lineCode == '11'
|
||||
this.faultList = this.faultList.filter(fault=>{
|
||||
return fault.value != 'NORMAL_SPLIT' && fault.value != 'REVERSE_SPLIT';
|
||||
});
|
||||
}
|
||||
if (this.faultList && this.faultList.length) {
|
||||
this.form.faultType = this.faultList[0].value;
|
||||
}
|
||||
@ -209,6 +215,8 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.form.faultType = '';
|
||||
this.$refs.faultSelect1 && this.$refs.faultSelect1.blur();
|
||||
this.$refs.faultSelect2 && this.$refs.faultSelect2.blur();
|
||||
this.$refs.form.resetFields();
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
|
@ -17,7 +17,7 @@
|
||||
<el-form ref="form" :model="formModel" :rules="rules">
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="targetDeviceCode" label="目的地:">
|
||||
<el-select v-model="formModel.targetDeviceCode" size="small" style="width: 165px;height: 32px;line-height: 32px;" placeholder="请选择">
|
||||
<el-select ref="faultSelect1" v-model="formModel.targetDeviceCode" size="small" style="width: 165px;height: 32px;line-height: 32px;" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in selectedList"
|
||||
:key="item.code"
|
||||
@ -49,7 +49,7 @@
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-form-item prop="faultType">
|
||||
<el-select v-model="form.faultType" size="small" style="height: 32px;line-height: 32px;" placeholder="请选择">
|
||||
<el-select ref="faultSelect2" v-model="form.faultType" size="small" style="height: 32px;line-height: 32px;" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in faultList"
|
||||
:key="item.value"
|
||||
@ -229,6 +229,8 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.form.faultType = '';
|
||||
this.$refs.faultSelect1 && this.$refs.faultSelect1.blur();
|
||||
this.$refs.faultSelect2 && this.$refs.faultSelect2.blur();
|
||||
this.$refs.form.resetFields();
|
||||
this.$root.$emit('dialogClose', this.selected);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
|
@ -8,16 +8,24 @@
|
||||
<el-row>
|
||||
<div style="padding: 0 10px;">
|
||||
<span>所选区段:</span>
|
||||
<el-input v-model="sectionCode" style="display: inline-block;width: 200px;" :disabled="true" size="small" />
|
||||
<el-select v-if="controlMode === 'create'" v-model="newSectionCode" filterable placeholder="请选择" size="mini">
|
||||
<el-option
|
||||
v-for="item in selectSectionList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-else v-model="sectionCode" style="display: inline-block;width: 200px;" :disabled="true" size="mini" />
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div style="display: flex;justify-content: space-between;padding: 10px 20px;border: 1px solid #DCDAC9;border-radius: 6px;">
|
||||
<el-button size="small" @click="changeMode('show')">显示列车</el-button>
|
||||
<el-button size="small" @click="changeMode('edit')">编辑列车</el-button>
|
||||
<el-button size="small" :disabled="true">创建列车</el-button>
|
||||
<el-button size="small" :disabled="true">删除列车</el-button>
|
||||
<el-button size="small" :disabled="true">步进列车</el-button>
|
||||
<el-button size="small" :disabled="controlMode === 'show'" @click="changeMode('show')">显示列车</el-button>
|
||||
<el-button size="small" :disabled="controlMode === 'edit'" @click="changeMode('edit')">编辑列车</el-button>
|
||||
<el-button size="small" :disabled="controlMode === 'create'" @click="changeMode('create')">创建列车</el-button>
|
||||
<el-button size="small" :disabled="controlMode === 'delete'" @click="changeMode('delete')">删除列车</el-button>
|
||||
<el-button size="small" :disabled="controlMode === 'move'" @click="changeMode('move')">步进列车</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row v-if="controlMode === 'show'" style="padding: 10px;">
|
||||
@ -29,7 +37,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="tripNumber" label="车次号">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.serviceNumber+scope.row.destinationCode+(scope.row.tripNumber.substring(1)) }}</span>
|
||||
<span>{{ scope.row.destinationCode+scope.row.serviceNumber+scope.row.tripNumber }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="groupNumber" label="车组号" />
|
||||
@ -42,9 +50,9 @@
|
||||
<el-table-column prop="dt" label="晚点(秒)" />
|
||||
</el-table>
|
||||
</el-row>
|
||||
<el-row v-if="controlMode === 'edit'">
|
||||
<el-row v-else>
|
||||
<el-col :span="6">
|
||||
<el-table :data="tempTableData" style="width: 100%" height="300">
|
||||
<el-table v-if="controlMode === 'edit' || controlMode === 'delete' || controlMode === 'move'" :data="tempTableData" style="width: 100%" height="300">
|
||||
<el-table-column prop="date" label="方向">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.right? '>':'<' }}</span>
|
||||
@ -52,34 +60,63 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="tripNumber" label="车次号">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.destinationCode+scope.row.serviceNumber+(scope.row.tripNumber.substring(1)) }}</span>
|
||||
<span>{{ scope.row.destinationCode+scope.row.serviceNumber+scope.row.tripNumber }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="17" :offset="1">
|
||||
<div style="margin-top: 30px;">
|
||||
<div style="display: inline-block;width: 150px;">选择的车次号:</div>
|
||||
<el-input v-model="tripNum" style="display: inline-block;width: 200px;" :disabled="true" size="small" />
|
||||
<el-col :span="17" :offset="controlMode === 'create'? 7: 1" style="min-height: 300px;">
|
||||
<div v-if="controlMode === 'edit' || controlMode === 'delete' || controlMode === 'move'" style="margin-top: 30px;">
|
||||
<div style="display: inline-block;width: 150px;">{{ controlMode === 'delete'?'车次号:':'选择的车次号:' }}</div>
|
||||
<el-input v-model="tripNum" style="display: inline-block;width: 200px;" :disabled="true" size="mini" />
|
||||
</div>
|
||||
<div>
|
||||
<div v-if="controlMode === 'create'" style="margin-top: 30px;">
|
||||
<div style="display: inline-block;width: 150px">区段位置:</div>
|
||||
<el-select v-model="newSectionCode" filterable placeholder="请选择" :disabled="true" size="mini">
|
||||
<el-option
|
||||
v-for="item in selectSectionList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div v-if="controlMode === 'move'" style="margin-top: 10px;">
|
||||
<div style="display: inline-block;width: 150px;">区段位置:</div>
|
||||
<el-input v-model="sectionCode" style="display: inline-block;width: 200px;" :disabled="true" size="mini" />
|
||||
</div>
|
||||
<div v-if="controlMode === 'move'" style="margin-top: 10px;">
|
||||
<div style="display: inline-block;width: 150px;">新区段位置:</div>
|
||||
<el-select v-model="newSectionCode" filterable placeholder="请选择" size="mini">
|
||||
<el-option
|
||||
v-for="item in selectSectionList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div v-if="controlMode === 'edit' || controlMode === 'create'" style="margin-top: 10px;">
|
||||
<div style="display: inline-block;width: 150px;">新的车次号:</div>
|
||||
<el-input v-model="newTripNum" style="display: inline-block;width: 200px;" size="small" />
|
||||
<el-input v-model="newTripNum" maxlength="8" style="display: inline-block;width: 200px;" size="mini" />
|
||||
<div v-if="newTripNumError" style="font-size: 10px;color: #F00;margin-left: 160px;height: 10px;line-height: 10px;"> 请输入正确的车次号</div>
|
||||
</div>
|
||||
<div>
|
||||
<div v-if="controlMode === 'edit' || controlMode === 'create'" style="margin-top: 10px;">
|
||||
<div style="display: inline-block;width: 150px;">自动排列:</div>
|
||||
<el-radio v-model="autoArrange" style="display: inline-block;" :label="true" :disabled="true">开</el-radio>
|
||||
<el-radio v-model="autoArrange" style="display: inline-block;" :label="false" :disabled="true">关</el-radio>
|
||||
</div>
|
||||
<div>
|
||||
<div v-if="controlMode === 'edit' || controlMode === 'create'" style="margin-top: 10px;">
|
||||
<div style="display: inline-block;width: 150px;">车组号:</div>
|
||||
<el-input v-model="groupNum" style="display: inline-block;width: 200px;" :disabled="true" size="small" />
|
||||
<el-input v-if="controlMode === 'edit'" v-model="groupNum" style="display: inline-block;width: 200px;" :disabled="true" size="mini" />
|
||||
<el-input v-if="controlMode === 'create'" v-model="newGroupNum" style="display: inline-block;width: 80px;" maxlength="3" size="mini" />
|
||||
<span v-if="controlMode === 'create'">--</span>
|
||||
<el-input v-if="controlMode === 'create'" v-model="newGrewNum" style="display: inline-block;width: 80px;" maxlength="3" size="mini" />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="text-align: right;">
|
||||
<el-button v-if="controlMode==='edit'" size="small" @click="commit">执行</el-button>
|
||||
<el-button v-if="controlMode!=='show'" size="small" :disabled="!commitDisabled" @click="commit">执行</el-button>
|
||||
<el-button size="small" @click="doClose">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@ -93,6 +130,7 @@
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name: 'FaultChoose',
|
||||
components: {
|
||||
@ -113,28 +151,8 @@ export default {
|
||||
autoArrange: true,
|
||||
deviceMap: {},
|
||||
sectionCode: '',
|
||||
newSectionCode: '',
|
||||
simulationFault:{},
|
||||
faultList: [],
|
||||
faultRule:{
|
||||
targetDeviceCode:'',
|
||||
targetDeviceType:'',
|
||||
faultType:'',
|
||||
condition:{
|
||||
triggerDeviceCode:'',
|
||||
triggerDeviceStatus:'',
|
||||
triggerDeviceType :'',
|
||||
type:'DEVICE',
|
||||
triggerTime: '',
|
||||
triggerAssociatedDeviceCode: ''
|
||||
}
|
||||
},
|
||||
triggerDevice:'',
|
||||
triggerAssociatedDevice: '',
|
||||
triggerMode: 'DEVICE',
|
||||
triggerModeList: [
|
||||
{label: '设备触发', value: 'DEVICE'},
|
||||
{label: '时间触发', value: 'TIME'}
|
||||
],
|
||||
field:'',
|
||||
triggerStatusList:[],
|
||||
faultTypeList:[],
|
||||
@ -142,24 +160,50 @@ export default {
|
||||
tempTableData: [],
|
||||
tripNum: '',
|
||||
groupNum: '',
|
||||
newGroupNum: '',
|
||||
newGrewNum: '',
|
||||
newTripNum: '',
|
||||
newTripNumError: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList'
|
||||
]),
|
||||
title() {
|
||||
return '列车监控和追踪';
|
||||
},
|
||||
commitDisabled() {
|
||||
return (this.controlMode === 'edit' && this.newTripNum.length === 8 ) || (this.controlMode === 'delete') ||
|
||||
(this.controlMode === 'create' && this.newTripNum.length === 8 && this.newSectionCode && this.newGroupNum.length === 3 && this.newGrewNum.length === 3) ||
|
||||
(this.controlMode === 'move' && this.newSectionCode);
|
||||
},
|
||||
selectSectionList() {
|
||||
const list = [];
|
||||
this.sectionList.forEach(item => {
|
||||
if (item.type === '01' || item.type === '04') {
|
||||
list.push(item);
|
||||
}
|
||||
});
|
||||
return list;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'$store.state.menuOperation.selectedCount':function(em) {
|
||||
const device = this.$store.state.menuOperation.selected;
|
||||
if (device && device.code && device.deviceType === 'TRAIN') {
|
||||
if (device && device.code && device.deviceType === 'TRAIN' && this.$store.state.training.prdType === '02') {
|
||||
if (!this.dialogShow) {
|
||||
this.controlMode = 'edit';
|
||||
this.dialogShow = true;
|
||||
}
|
||||
this.tempTableData = [device];
|
||||
this.sectionCode = device.sectionModel.name;
|
||||
this.tripNum = device.destinationCode + device.serviceNumber + (device.tripNumber.substring(1));
|
||||
this.tripNum = device.destinationCode + device.serviceNumber + device.tripNumber;
|
||||
this.groupNum = device.groupNumber;
|
||||
}
|
||||
if (this.dialogShow && device && device.code && device.deviceType === 'SECTION') {
|
||||
this.newSectionCode = device.code;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -172,6 +216,9 @@ export default {
|
||||
this.controlMode = 'show';
|
||||
this.tripNum = '';
|
||||
this.groupNum = '';
|
||||
this.newGroupNum = '';
|
||||
this.newGrewNum = '';
|
||||
this.newSectionCode = '';
|
||||
this.newTripNum = '';
|
||||
this.newTripNumError = false;
|
||||
this.$nextTick(()=>{
|
||||
@ -182,39 +229,62 @@ export default {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
changeMode(val) {
|
||||
this.newSectionCode = '';
|
||||
this.controlMode = val;
|
||||
},
|
||||
commit() {
|
||||
this.newTripNumError = false;
|
||||
if (this.newTripNum && this.newTripNum.length === 8) {
|
||||
const params = {
|
||||
groupNumber: this.groupNum,
|
||||
tripNumber: '0' + this.newTripNum.slice(6, 8),
|
||||
serviceNumber: this.newTripNum.slice(3, 6)
|
||||
};
|
||||
const step = {
|
||||
over: true,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN,
|
||||
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
|
||||
param: params
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.tempTableData = [];
|
||||
this.sectionCode = '';
|
||||
this.tripNum = '';
|
||||
this.groupNum = '';
|
||||
this.newTripNum = '';
|
||||
this.newTripNumError = false;
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
this.newTripNumError = true;
|
||||
const params = {};
|
||||
const step = {
|
||||
over: true
|
||||
};
|
||||
if (this.controlMode === 'edit') {
|
||||
params.groupNumber = this.groupNum;
|
||||
params.serviceNumber = this.newTripNum.slice(3, 6);
|
||||
params.tripNumber = this.newTripNum.slice(6, 8);
|
||||
step.cmdType = CMD.TrainWindow.CMD_TRAIN_SET_PLAN;
|
||||
step.operation = OperationEvent.Train.setPlanTrainId.menu.operation;
|
||||
step.param = params;
|
||||
} else if (this.controlMode === 'create') {
|
||||
params.sectionCode = this.newSectionCode;
|
||||
params.groupNumber = this.newGroupNum;
|
||||
params.dn = this.newTripNum.slice(0, 3);
|
||||
params.sn = this.newTripNum.slice(3, 6);
|
||||
params.tn = this.newTripNum.slice(6, 8);
|
||||
params.cn = this.newGrewNum;
|
||||
step.cmdType = CMD.TrainWindow.CMD_TRAIN_ADD_TRAIN_TRACE;
|
||||
step.operation = OperationEvent.Train.addTrainId.menu.operation;
|
||||
step.param = params;
|
||||
} else if (this.controlMode === 'delete') {
|
||||
params.groupNumber = this.groupNum;
|
||||
step.cmdType = CMD.TrainWindow.CMD_TRAIN_REMOVE_TRAIN_TRACE;
|
||||
step.operation = OperationEvent.Train.delTrainId.menu.operation;
|
||||
step.param = params;
|
||||
} else if (this.controlMode === 'move') {
|
||||
params.groupNumber = this.groupNum;
|
||||
params.sectionCode = this.newSectionCode;
|
||||
step.cmdType = CMD.TrainWindow.CMD_TRAIN_MOVE_TRAIN_TRACE;
|
||||
step.operation = OperationEvent.Train.moveTrainId.menu.operation;
|
||||
step.param = params;
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.tempTableData = [];
|
||||
this.sectionCode = '';
|
||||
this.tripNum = '';
|
||||
this.groupNum = '';
|
||||
this.newTripNum = '';
|
||||
this.newGroupNum = '';
|
||||
this.newGrewNum = '';
|
||||
this.newSectionCode = '';
|
||||
this.newTripNumError = false;
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
this.$refs.noticeInfo.doShow(error.msg);
|
||||
});
|
||||
|
||||
},
|
||||
dragEvent() {
|
||||
const offset = this.offset;
|
||||
|
@ -101,8 +101,8 @@
|
||||
<el-row style="display: flex;align-items: center;">
|
||||
<el-col :span="7" style="height: 25px;line-height: 25px;">车次号</el-col>
|
||||
<el-col :span="17">
|
||||
<el-input v-if="trainOperateType!=='create'" v-model="formModelTripNum" :maxlength="7" size="mini" style="height: 20px;" :disabled="true" />
|
||||
<el-input v-if="trainOperateType==='create'" v-model="formModelNewTrip" :maxlength="7" size="mini" style="height: 20px;" />
|
||||
<el-input v-if="trainOperateType!=='create'" v-model="formModelTripNum" :maxlength="8" size="mini" style="height: 20px;" :disabled="true" />
|
||||
<el-input v-if="trainOperateType==='create'" v-model="formModelNewTrip" :maxlength="8" size="mini" style="height: 20px;" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="display: flex;align-items: center;">
|
||||
@ -250,8 +250,8 @@ export default {
|
||||
return (this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED) && this.speedShowCon;
|
||||
},
|
||||
trainCommitDisabled() {
|
||||
return (this.trainOperateType === 'create' && this.formModelNewTrip && this.formModelNewTrip.length === 7 && this.formModelNewGroup && this.formModelNewGroup.length === 6) ||
|
||||
(this.trainOperateType === 'update' && this.formModelNewTrip && this.formModelNewTrip.length === 7) || (this.trainOperateType === 'delete') ||
|
||||
return (this.trainOperateType === 'create' && this.formModelNewTrip && this.formModelNewTrip.length === 8 && this.formModelNewGroup && this.formModelNewGroup.length === 6) ||
|
||||
(this.trainOperateType === 'update' && this.formModelNewTrip && this.formModelNewTrip.length === 8) || (this.trainOperateType === 'delete') ||
|
||||
(this.trainOperateType === 'move' && this.formModelNewSection);
|
||||
},
|
||||
handleSectionList() {
|
||||
@ -276,7 +276,7 @@ export default {
|
||||
if (this.selected._type && !this.trainOperationShow) {
|
||||
const control = this.getStationControl(this.selected);
|
||||
const type = State2SimulationMap[this.$store.state.training.prdType];
|
||||
if (control.controlMode != type) {
|
||||
if (control && control.controlMode != type) {
|
||||
this.clearAllMenuShow();
|
||||
if (type == 'Center' && this.selected._type == 'Station') {
|
||||
this.selectedObj = this.actualSelected;
|
||||
@ -787,7 +787,7 @@ export default {
|
||||
this.$store.state.map.activeTrainList.forEach(trainCode => {
|
||||
const trainModel = this.$store.getters['map/getDeviceByCode'](trainCode);
|
||||
if (trainModel && trainModel.sectionCode === this.selectedObj.code) {
|
||||
this.formModelTripNum = trainModel.destinationCode + (trainModel.serviceNumber.substring(1)) + (trainModel.tripNumber.substring(1));
|
||||
this.formModelTripNum = trainModel.destinationCode + trainModel.serviceNumber + trainModel.tripNumber;
|
||||
this.trainModel = trainModel;
|
||||
this.formModelNewTrip = '';
|
||||
}
|
||||
@ -815,17 +815,18 @@ export default {
|
||||
};
|
||||
if (this.trainOperateType === 'update') {
|
||||
params.groupNumber = this.trainModel.groupNumber;
|
||||
params.serviceNumber = '0' + this.formModelNewTrip.slice(3, 5);
|
||||
params.tripNumber = '0' + this.formModelNewTrip.slice(5, 7);
|
||||
params.serviceNumber = '0' + this.formModelNewTrip.slice(3, 6);
|
||||
params.tripNumber = this.formModelNewTrip.slice(6, 8);
|
||||
step.cmdType = CMD.TrainWindow.CMD_TRAIN_SET_PLAN;
|
||||
step.operation = OperationEvent.Train.setPlanTrainId.menu.operation;
|
||||
step.param = params;
|
||||
} else if (this.trainOperateType === 'create') {
|
||||
params.sectionCode = this.selectedObj.code;
|
||||
params.groupNumber = this.formModelNewGroup;
|
||||
params.groupNumber = this.formModelNewGroup.slice(0, 3);
|
||||
params.dn = this.formModelNewTrip.slice(0, 3);
|
||||
params.sn = '0' + this.formModelNewTrip.slice(3, 5);
|
||||
params.tn = '0' + this.formModelNewTrip.slice(5, 7);
|
||||
params.sn = this.formModelNewTrip.slice(3, 6);
|
||||
params.tn = this.formModelNewTrip.slice(6, 8);
|
||||
params.cn = this.formModelNewGroup.slice(3, 6);
|
||||
step.cmdType = CMD.TrainWindow.CMD_TRAIN_ADD_TRAIN_TRACE;
|
||||
step.operation = OperationEvent.Train.addTrainId.menu.operation;
|
||||
step.param = params;
|
||||
|
@ -83,6 +83,7 @@
|
||||
|
||||
<script>
|
||||
import {getAlarmList, confirmAlarm} from '@/api/simulation';
|
||||
import {deviceFaultMap} from '@/scripts/cmdPlugin/Config';
|
||||
export default {
|
||||
name: 'AlarmHmi',
|
||||
data() {
|
||||
@ -142,6 +143,11 @@ export default {
|
||||
handleDeviceName(code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return device.name;
|
||||
},
|
||||
handleFaultDescription(row) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](row.deviceCode);
|
||||
const faultName = deviceFaultMap[device._type][row.description];
|
||||
return `${device.name}-${faultName}`;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -38,7 +38,11 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="code" label="故障号" />
|
||||
<el-table-column prop="description" label="故障描述" />
|
||||
<el-table-column prop="description" label="故障描述" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ handleFaultDescription(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="recover" label="已恢复">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="scope.row.recovered" :disabled="true" />
|
||||
@ -60,7 +64,7 @@
|
||||
|
||||
<script>
|
||||
import {getAlarmList} from '@/api/simulation';
|
||||
import {deviceType} from '@/scripts/cmdPlugin/Config';
|
||||
import {deviceType, deviceFaultMap} from '@/scripts/cmdPlugin/Config';
|
||||
import {confirmAlarm} from '@/api/simulation';
|
||||
export default {
|
||||
name: 'AlarmLow',
|
||||
@ -112,6 +116,11 @@ export default {
|
||||
handleDeviceName(code) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return device.name;
|
||||
},
|
||||
handleFaultDescription(row) {
|
||||
const device = this.$store.getters['map/getDeviceByCode'](row.deviceCode);
|
||||
const faultName = deviceFaultMap[device._type][row.description];
|
||||
return `${device.name}-${faultName}`;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
150
src/jmapNew/theme/nanjing_02/menus/dialog/ttl.vue
Normal file
150
src/jmapNew/theme/nanjing_02/menus/dialog/ttl.vue
Normal file
@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
class="haerbin-01__systerm ttl"
|
||||
:title="title"
|
||||
:modal="false"
|
||||
:width="'900px'"
|
||||
:visible.sync="show"
|
||||
:before-close="doClose"
|
||||
>
|
||||
<div class="actualTimetable">
|
||||
<div class="actualTimetableT">
|
||||
<div class="actualTimetableTtext">实效时刻表</div>
|
||||
<div class="actualTimetableTLine" />
|
||||
</div>
|
||||
<div class="actualTimetableForm">
|
||||
<div class="actualTimeFormEach">
|
||||
<span>日期: </span>
|
||||
<span class="actualTimeFormValue">28.08.2008</span>
|
||||
</div>
|
||||
<div class="actualTimeFormEach">
|
||||
<span>名称: </span>
|
||||
<span class="actualTimeFormValue">SX0807</span>
|
||||
</div>
|
||||
<div class="actualTimeFormEach">
|
||||
<span>描述: </span>
|
||||
<span class="actualTimeFormValue">changed minimum of dwell time</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="defaultTimetable">
|
||||
<div class="defaultTimetableT">
|
||||
<div class="defaultTimetableTtext">预设时刻表</div>
|
||||
<div class="defaultTimetableTLine" />
|
||||
</div>
|
||||
<div class="defaultTimetableM">
|
||||
<el-table :data="tableData" style="width: 100%;" height="300" border class="defaultTimetab">
|
||||
<el-table-column prop="date" label="日期" width="110" />
|
||||
<el-table-column prop="name" label="名称" />
|
||||
<el-table-column prop="description" label="描述" />
|
||||
<el-table-column prop="status" label=" 状态" width="70" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="defaultTimetableB">
|
||||
<div id="defaultClearSele" class="defaultTimetableBtn disabled">清除所选</div>
|
||||
<div id="defaultClearAll" class="defaultTimetableBtn disabled">清除全部</div>
|
||||
<div id="defaultShowTime" class="defaultTimetableBtn">显示时刻表</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ttlButtonGroup">
|
||||
<div id="changeActual" class="defaultTimetableBtn">更换实效时刻表</div>
|
||||
<div id="changeDefault" class="defaultTimetableBtn">更换预设时刻表</div>
|
||||
<div id="settingTimetable" class="defaultTimetableBtn disabled">设定</div>
|
||||
<div id="resetTimetable" class="defaultTimetableBtn disabled">重设</div>
|
||||
<div id="closeTimetable" class="defaultTimetableBtn" @click="doClose">关闭</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name:'TTLDialog',
|
||||
data() {
|
||||
return {
|
||||
dialogShow:false,
|
||||
tableData:[
|
||||
{date:'28.08.2008', name:'SX0807', description:'changed minimum of dwell time', status:'有效'},
|
||||
{date:'29.08.2008', name:'SX0807', description:'changed minimum of dwell time', status:'无效'},
|
||||
{date:'30.08.2008', name:'SX0807', description:'changed minimum of dwell time', status:'无效'},
|
||||
{date:'31.08.2008', name:'SX0807', description:'changed minimum of dwell time', status:'无效'},
|
||||
{date:'01.09.2008', name:'SX0807', description:'changed minimum of dwell time', status:'无效'}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '时刻表';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.actualTimetable{padding:0px 15px;}
|
||||
.actualTimetableT{width:100%;position: relative;}
|
||||
.defaultTimetableT{width:100%;position: relative;overflow:hidden;}
|
||||
.actualTimetableTtext,.defaultTimetableTtext{position:absolute;height: 20px;padding-right:5px;font-size:15px;color: #676767;background:#e2e2e2;font-weight: bold;}
|
||||
.actualTimetableTLine,.defaultTimetableTLine{display:inline-block;margin-left:10px;width:100%;border-bottom: 1px #A0A0A0 solid;vertical-align: top;height: 9px;}
|
||||
.actualTimetableForm{}
|
||||
.actualTimeFormEach{margin-top: 10px;}
|
||||
.actualTimeFormEach span{font-size:15px;color: #151515;}
|
||||
.actualTimeFormValue{
|
||||
font-size:15px;
|
||||
color: #151515;
|
||||
display: inline-block;
|
||||
padding: 5px 10px;
|
||||
border: 1px #A2A2A2 solid;
|
||||
width: 810px;
|
||||
}
|
||||
.defaultTimetable{
|
||||
padding:15px 15px 0px 15px;
|
||||
}
|
||||
// .defaultTimetab{
|
||||
// padding: 10px 15px 10px 15px;
|
||||
// }
|
||||
.defaultTimetableM{margin-top:10px;}
|
||||
.defaultTimetableB{display:inline-block;width:100%;margin-top: 10px;}
|
||||
#defaultClearSele{margin-right:10px;width:90px;}
|
||||
#defaultClearAll{width:90px;}
|
||||
#defaultShowTime{float:right;width:90px;}
|
||||
.defaultTimetableBtn{
|
||||
background:transparent;
|
||||
border:1px#9C9C9C solid ;
|
||||
height:auto ;
|
||||
outline:none;
|
||||
text-align:center;
|
||||
display: inline-block;
|
||||
padding:4px 0px;
|
||||
color:#090909;
|
||||
cursor: pointer;
|
||||
}
|
||||
.defaultTimetableBtn.disabled{border:1px #A9A9A9 solid ;color: #A7A7A7; cursor: no-drop;}
|
||||
.ttlButtonGroup{
|
||||
border-top: 1px #6d6d6d solid;
|
||||
margin-top: 10px;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
#changeActual{margin-right:10px;width:120px}
|
||||
#changeDefault{width:120px;margin-right:175px;}
|
||||
#settingTimetable{width:130px;margin-right:10px;}
|
||||
#resetTimetable{width:130px;margin-right:10px;}
|
||||
#closeTimetable{width:130px;}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.ttl.haerbin-01__systerm .el-dialog .el-dialog__body{
|
||||
background: #E2E2E2;
|
||||
padding:20px 0px 10px 0px;
|
||||
}
|
||||
.defaultTimetab.el-table .cell{
|
||||
padding-top:5px;padding-bottom:5px;
|
||||
}
|
||||
</style>
|
@ -101,7 +101,7 @@
|
||||
<div class="div-simulate-button" style="width: 40px;">联锁</div>
|
||||
<div class="div-simulate-button" style="width: 40px;">列监</div>
|
||||
<div class="div-simulate-button" style="width: 40px;">运图</div>
|
||||
<div class="div-simulate-button" style="width: 55px;">时刻表</div>
|
||||
<div class="div-simulate-button" style="width: 55px;" @click="ttlClick">时刻表</div>
|
||||
<div class="div-simulate-button" style="width: 40px;">编表</div>
|
||||
<div class="div-simulate-button" style="width: 40px;">调度</div>
|
||||
<div class="div-simulate-button" style="width: 40px;">站控</div>
|
||||
@ -172,6 +172,7 @@
|
||||
<log-detail ref="logDetail" />
|
||||
<rps-dialog ref="rpsDialog" />
|
||||
<tra-dialog ref="traDialog" />
|
||||
<ttl-dialog ref="ttlDialog" />
|
||||
<tro-dialog ref="troDialog" @goTroDetail="goTroDetail" />
|
||||
<tro-detail-dialog ref="troDetailDialog" :station-list="stationList" @goTroDialog="troClick" />
|
||||
<audio id="buzzer" controls loop="loop" style="width: 0;height: 0">
|
||||
@ -191,6 +192,7 @@ import AlarmTableLow from './menuDialog/alarmTableLow';
|
||||
import TrainControl from './dialog/trainControl';
|
||||
import RpsDialog from './dialog/rps';
|
||||
import TraDialog from './dialog/tra';
|
||||
import TtlDialog from './dialog/ttl';
|
||||
|
||||
import TroDialog from './dialog/tro';
|
||||
import TroDetailDialog from './dialog/troDetail';
|
||||
@ -206,6 +208,7 @@ export default {
|
||||
RpsDialog,
|
||||
TroDialog,
|
||||
TraDialog,
|
||||
TtlDialog,
|
||||
TroDetailDialog
|
||||
},
|
||||
props: {
|
||||
@ -499,6 +502,9 @@ export default {
|
||||
traClick() {
|
||||
this.$refs.traDialog.doShow();
|
||||
},
|
||||
ttlClick() {
|
||||
this.$refs.ttlDialog.doShow();
|
||||
},
|
||||
goTroDetail(deviceCode) {
|
||||
this.$refs.troDetailDialog.doShow(deviceCode);
|
||||
},
|
||||
|
@ -466,8 +466,8 @@ export default {
|
||||
if (this.selectedObj._type && (val._event == MouseEvent.Left || (val._event == MouseEvent.Right && this.$store.state.training.prdType === '01'))) {
|
||||
const type = this.State2SimulationMap[this.$store.state.training.prdType];
|
||||
this.modeMatch = this.stationContorl.controlMode == type;
|
||||
// 道岔区段 道岔计轴区段 都是道岔操作
|
||||
if (this.selectedObj._type == 'Section' && (this.selectedObj.type == '03' || this.selectedObj.type == '04')) {
|
||||
// 道岔区段 是道岔操作
|
||||
if (this.selectedObj._type == 'Section' && this.selectedObj.type == '03') {
|
||||
this.selectedObj = this.selectedObj.switch;
|
||||
}
|
||||
this.canCommand = true;
|
||||
|
@ -9,9 +9,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import Jlmap from '@/jmapNew/map';
|
||||
import { parser } from '@/jmapNew/utils/parser';
|
||||
import { parserFactory, ParserType } from '@/jmapNew/parser';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import deviceType from '@/jmapNew/constant/deviceType';
|
||||
|
||||
@ -113,7 +112,8 @@ export default {
|
||||
};
|
||||
|
||||
if (this.mapData.skinVO) {
|
||||
this.mapDevice = parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
|
||||
const parser = parserFactory(ParserType.Graph.value);
|
||||
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
|
||||
}
|
||||
},
|
||||
loadData() {
|
||||
@ -199,22 +199,11 @@ export default {
|
||||
// this.map.updatePrdType(list, showMode, val);
|
||||
// },
|
||||
setShowStation(stationCode, setCenter) {
|
||||
const nameList = Object.keys(this.$store.state.map.map);
|
||||
let list = [];
|
||||
nameList.forEach((item) => {
|
||||
if (
|
||||
this.$store.state.map.map[item] &&
|
||||
this.$store.state.map.map[item].constructor === Array
|
||||
) {
|
||||
if (item === 'trainList') {
|
||||
this.$store.state.map.map[item].forEach((elem) => {
|
||||
elem && list.push(elem);
|
||||
});
|
||||
} else {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
}
|
||||
}
|
||||
});
|
||||
const list = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
this.map.updateShowStation(list, stationCode);
|
||||
!setCenter && this.setCenter(stationCode);
|
||||
}
|
||||
|
@ -162,9 +162,10 @@ export default {
|
||||
this.tableData.forEach(item => {
|
||||
const centralizedStationCode = this.stationCentralizedMap[item.code];
|
||||
const centralizedStation = this.$store.getters['map/getDeviceByCode'](centralizedStationCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](item.code);
|
||||
if (this.$store.state.training.prdType === '01' && centralizedStation.controlMode === 'Center') {
|
||||
item.apply = false;
|
||||
} else if (item.controller !== this.memberId) {
|
||||
} else if (station.controller !== this.memberId) {
|
||||
item.apply = true;
|
||||
}
|
||||
});
|
||||
@ -178,9 +179,10 @@ export default {
|
||||
this.tableData.forEach(item => {
|
||||
const centralizedStationCode = this.stationCentralizedMap[item.code];
|
||||
const centralizedStation = this.$store.getters['map/getDeviceByCode'](centralizedStationCode);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](item.code);
|
||||
if (this.$store.state.training.prdType === '01' && centralizedStation.controlMode === 'Center') {
|
||||
item.apply = false;
|
||||
} else if (item.controller === this.memberId) {
|
||||
} else if (station.controller === this.memberId) {
|
||||
item.release = true;
|
||||
}
|
||||
});
|
||||
|
@ -11,10 +11,12 @@
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" pop-class="xian-01__systerm" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-class="preview_new_pop" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
@ -27,6 +29,7 @@ import MenuStationTurnBack from './menuStationTurnBack';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
@ -41,7 +44,8 @@ export default {
|
||||
PassiveAlarm,
|
||||
MenuStationTurnBack,
|
||||
PassiveContorl,
|
||||
PassiveTimeout
|
||||
PassiveTimeout,
|
||||
PopMenu
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -51,6 +55,12 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('config', [
|
||||
'width'
|
||||
@ -62,6 +72,13 @@ export default {
|
||||
watch: {
|
||||
isShowBar(val) {
|
||||
val && this.$store.dispatch('config/updateMenuBar');
|
||||
},
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel) && this.$store.state.training.prdType == '02') {
|
||||
this.popDoShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.popDoClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -84,6 +101,61 @@ export default {
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.onclick = function (e) {};
|
||||
},
|
||||
methods:{
|
||||
popClickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.popDoClose();
|
||||
};
|
||||
},
|
||||
popDoShow(point) {
|
||||
this.popClickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
initMenu() {
|
||||
this.menuNormal = [];
|
||||
this.$store.state.map.map.stationList.forEach(station => {
|
||||
if (station.relStationCodeList && station.relStationCodeList.length) {
|
||||
const node = {
|
||||
label: station.name,
|
||||
children: []
|
||||
};
|
||||
const relStationCodeList = [...station.relStationCodeList];
|
||||
relStationCodeList.push(station.code);
|
||||
relStationCodeList.sort((a, b) => {
|
||||
const stationA = this.$store.getters['map/getDeviceByCode'](a);
|
||||
const stationB = this.$store.getters['map/getDeviceByCode'](b);
|
||||
return stationA.kmRange - stationB.kmRange;
|
||||
});
|
||||
relStationCodeList.forEach(item => {
|
||||
const next = this.$store.getters['map/getDeviceByCode'](item);
|
||||
node.children.push({
|
||||
code: next.code,
|
||||
label: next.name,
|
||||
handler: this.mapLocation
|
||||
});
|
||||
});
|
||||
this.menuNormal.push(node);
|
||||
}
|
||||
});
|
||||
this.menu = [...this.menuNormal];
|
||||
},
|
||||
popDoClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置地图定位
|
||||
mapLocation(item) {
|
||||
if (item) {
|
||||
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: item.code });
|
||||
this.popDoClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -156,6 +156,26 @@ export default {
|
||||
handler: this.reopenSignal,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '设置联锁自动进路',
|
||||
handler: this.setAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: '取消联锁自动进路',
|
||||
handler: this.cancelAutoInterlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: '设置联锁自动触发',
|
||||
handler: this.setAutoTrigger,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER
|
||||
},
|
||||
{
|
||||
label: '取消联锁自动触发',
|
||||
handler: this.cancelAutoTrigger,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER
|
||||
},
|
||||
{
|
||||
label: '进路引导',
|
||||
handler: this.guide,
|
||||
|
@ -1143,7 +1143,7 @@ export const asyncRouter = [
|
||||
path: '/editor',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.newDesignEditor',
|
||||
i18n: 'router.fileManage',
|
||||
roles: [admin, user]
|
||||
},
|
||||
children: [
|
||||
@ -1162,24 +1162,14 @@ export const asyncRouter = [
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
path: 'draft',
|
||||
component: Ueditor,
|
||||
meta: {
|
||||
i18n: 'router.newDesignEditor'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/uploading',
|
||||
component: Layout,
|
||||
meta: {
|
||||
i18n: 'router.uploadPdf',
|
||||
roles: [admin, user]
|
||||
},
|
||||
children: [
|
||||
},
|
||||
{
|
||||
path: 'list',
|
||||
path: 'uploading/list',
|
||||
component: UploadPdfList,
|
||||
meta: {
|
||||
i18n: 'router.uploadPdf'
|
||||
@ -1187,6 +1177,23 @@ export const asyncRouter = [
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/uploading',
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// i18n: 'router.uploadPdf',
|
||||
// roles: [admin, user]
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: 'list',
|
||||
// component: UploadPdfList,
|
||||
// meta: {
|
||||
// i18n: 'router.uploadPdf'
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{ // 新个人地图
|
||||
path: '/design',
|
||||
component: Layout,
|
||||
|
@ -64,6 +64,42 @@ export const deviceFaultType = {
|
||||
{label: '供电故障', value: 'FAULT'}
|
||||
]
|
||||
};
|
||||
/** 设备故障类型map */
|
||||
export const deviceFaultMap = {
|
||||
Section: {
|
||||
FAULT: '计轴故障',
|
||||
CBTC_OCCUPIED_FAULT: '通信车占用'
|
||||
},
|
||||
Signal: {
|
||||
MAIN_FILAMENT_BROKEN: '熔断'
|
||||
},
|
||||
Switch: {
|
||||
SPLIT: '失表',
|
||||
NORMAL_SPLIT: '定位失表',
|
||||
REVERSE_SPLIT: '反位失表',
|
||||
SQUEEZE: '挤岔',
|
||||
CBTC_OCCUPIED_FAULT: '通信车占用',
|
||||
AXLE_FAULT: '计轴故障'
|
||||
},
|
||||
StationStand: {
|
||||
PSD_CANNOT_BE_CLOSED: '屏蔽门无法关闭',
|
||||
PSD_CANNOT_BE_OPENED: '屏蔽门无法开启'
|
||||
},
|
||||
ZcControl: {
|
||||
FAULT: 'zc故障'
|
||||
},
|
||||
Station: {
|
||||
INTERLOCK_MACHINE_FAULT: '联锁机故障',
|
||||
ATS_FAULT: 'ATS故障'
|
||||
},
|
||||
Train: {
|
||||
COMMUNICATION_ABNORMAL: '通信异常',
|
||||
DRIVE_FAULT: '驾驶故障'
|
||||
},
|
||||
Power: {
|
||||
FAULT: '供电故障'
|
||||
}
|
||||
};
|
||||
/** 设备类型 */
|
||||
export const deviceType = {
|
||||
Section: '区段',
|
||||
|
@ -56,12 +56,13 @@ StompClient.prototype = {
|
||||
that.status = false;
|
||||
console.info(`通信连接已断开!`);
|
||||
checkLoginLine().then((resp) => {
|
||||
if (resp.code == 200) {
|
||||
if (resp.code !== 40004 && resp.code !== 40005) {
|
||||
that.count++;
|
||||
that.reconnect(that.count);
|
||||
}
|
||||
}).catch((err) => {
|
||||
that.logOut(err);
|
||||
}).catch(() => {
|
||||
that.count++;
|
||||
that.reconnect(that.count);
|
||||
});
|
||||
};
|
||||
},
|
||||
|
@ -89,7 +89,8 @@ export default {
|
||||
|
||||
this.editor.create(); // 创建富文本实例
|
||||
|
||||
this.handleEdit();
|
||||
if (this.draft) { this.handleEdit(); }
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 调用销毁 API 对当前编辑器实例进行销毁
|
||||
|
@ -215,16 +215,11 @@ export default {
|
||||
showMode = '02';
|
||||
}
|
||||
|
||||
const nameList = Object.keys(this.$store.state.map.map || {});
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
if (item !== 'skinVO') {
|
||||
const data = this.$store.state.map.map[item];
|
||||
if (data && data.constructor === Array) {
|
||||
list = [...list, ...data];
|
||||
}
|
||||
}
|
||||
});
|
||||
const list = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
|
||||
if (swch == '01') {
|
||||
this.$jlmap.updateShowStation(list, this.$store.state.training.centerStationCode); // 显示全部元素
|
||||
|
@ -195,19 +195,11 @@ export default {
|
||||
});
|
||||
const deviceId = member ? member.deviceId : '';
|
||||
if (deviceId) {
|
||||
const nameList = Object.keys(this.$store.state.map.map || {});
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
|
||||
if (item === 'trainList') {
|
||||
this.$store.state.map.map[item].forEach(elem => {
|
||||
elem && list.push(elem);
|
||||
});
|
||||
} else {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
}
|
||||
}
|
||||
});
|
||||
const list = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
this.$jlmap.updateShowStation(list, deviceId);
|
||||
}
|
||||
this.$jlmap.setCenter(deviceId);
|
||||
|
@ -226,16 +226,11 @@ export default {
|
||||
showMode = '02';
|
||||
}
|
||||
|
||||
const nameList = Object.keys(this.$store.state.map.map || {});
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
if (item !== 'skinVO') {
|
||||
const data = this.$store.state.map.map[item];
|
||||
if (data && data.constructor === Array) {
|
||||
list = [...list, ...data];
|
||||
}
|
||||
}
|
||||
});
|
||||
const list = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
|
||||
if (swch == '01') {
|
||||
this.$jlmap.updateShowStation(list, this.$store.state.training.centerStationCode); // 显示全部元素
|
||||
|
@ -55,8 +55,6 @@ export default {
|
||||
switchStationMode(val) {
|
||||
assignUsersPlayRoles([{ userId: this.$store.state.user.id, memberId: val}], this.$route.query.group).then(resp => {
|
||||
this.showMemberId = val;
|
||||
const nameList = Object.keys(this.$store.state.map.map || {});
|
||||
let list = [];
|
||||
const member = this.$store.state.training.memberData[val];
|
||||
const station = this.$store.getters['map/getDeviceByCode'](member.deviceCode);
|
||||
const lineCode = this.$store.getters['map/lineCode'];
|
||||
@ -67,17 +65,11 @@ export default {
|
||||
} else if (station) {
|
||||
this.showStation = station.code;
|
||||
const showStationCode = this.stationCentralizedMap[station.code];
|
||||
nameList.forEach(item => {
|
||||
if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
|
||||
if (item === 'trainList') {
|
||||
this.$store.state.map.map[item].forEach(elem => {
|
||||
elem && list.push(elem);
|
||||
});
|
||||
} else {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
}
|
||||
}
|
||||
});
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
const list = [];
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
|
||||
this.$jlmap.updateShowStation(list, showStationCode);
|
||||
this.setCenter(showStationCode);
|
||||
|
@ -503,19 +503,11 @@ export default {
|
||||
if (lineCode === '02' || lineCode === '05') {
|
||||
!setCenter && this.setCenter(stationCode);
|
||||
} else {
|
||||
const nameList = Object.keys(this.$store.state.map.map);
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
|
||||
if (item === 'trainList') {
|
||||
this.$store.state.map.map[item].forEach(elem => {
|
||||
elem && list.push(elem);
|
||||
});
|
||||
} else {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
}
|
||||
}
|
||||
});
|
||||
const list = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
|
||||
this.$jlmap.updateShowStation(list, stationCode);
|
||||
!setCenter && this.setCenter(stationCode);
|
||||
|
@ -556,19 +556,11 @@ export default {
|
||||
if (lineCode === '02' || lineCode === '05') {
|
||||
this.$jlmap.setCenter(showStation);
|
||||
} else {
|
||||
const nameList = Object.keys(this.$store.state.map.map);
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
|
||||
if (item === 'trainList') {
|
||||
this.$store.state.map.map[item].forEach(elem => {
|
||||
elem && list.push(elem);
|
||||
});
|
||||
} else {
|
||||
list = [...list, ...this.$store.state.map.map[item]];
|
||||
}
|
||||
}
|
||||
});
|
||||
const list = [];
|
||||
const mapDevice = this.$store.state.map.mapDevice;
|
||||
for (const key in mapDevice) {
|
||||
list.push(mapDevice[key]);
|
||||
}
|
||||
this.$jlmap.updateShowStation(list, showStation);
|
||||
this.$jlmap.setCenter(showStation);
|
||||
}
|
||||
|
@ -119,6 +119,7 @@ export default {
|
||||
this.clearSubscribe();
|
||||
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
|
||||
creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header);
|
||||
creatSubscribe(getTopic('STATE', this.$route.query.group), header);
|
||||
await this.$store.dispatch('training/setHasSubscribed');
|
||||
},
|
||||
async subscribeNew() {
|
||||
@ -136,6 +137,7 @@ export default {
|
||||
},
|
||||
clearSubscribe() {
|
||||
clearSubscribe(`${displayTopic}\/${this.groupModel}`);
|
||||
clearSubscribe(getTopic('STATE', this.$route.query.group));
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$refs.mapCommon && this.$refs.mapCommon.setCenter(code);
|
||||
|
@ -0,0 +1,196 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="autoSignal" title="延续保护列表" :visible.sync="show" width="85%" top="2vh" :before-do-close="doClose" append-to-body>
|
||||
<div>
|
||||
<QueryListPage
|
||||
ref="queryListPage"
|
||||
:pager-config="pagerConfig"
|
||||
:query-form="queryForm"
|
||||
:query-list="queryList"
|
||||
/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { mapGetters } from 'vuex';
|
||||
// import { listMap } from '@/api/jmap/mapdraft';
|
||||
import { getContinueProtectList, delContinueProtect, putContinueProtect } from '@/api/jmap/mapdraft';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
props: {
|
||||
mapInfo: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
// mapList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '120px',
|
||||
queryObject: {
|
||||
// stationCode: {
|
||||
// type: 'select',
|
||||
// label: '联锁车站',
|
||||
// config: {
|
||||
// data: []
|
||||
// }
|
||||
// },
|
||||
name: {
|
||||
type: 'text',
|
||||
label: '延续保护名称'
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
afterQuery: this.afterQuery,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '延续保护名称',
|
||||
prop: 'name',
|
||||
edit: true
|
||||
},
|
||||
{
|
||||
title: '延续保护code',
|
||||
prop: 'code'
|
||||
},
|
||||
{
|
||||
title: '延续保护解锁区段',
|
||||
prop: 'unlockSectionCode'
|
||||
},
|
||||
{
|
||||
title: '延续保护解锁时间',
|
||||
prop: 'unlockTime',
|
||||
edit: true
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('map.operation'),
|
||||
width: '300',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('map.compile'),
|
||||
handleClick: this.editObj
|
||||
},
|
||||
{
|
||||
name: this.$t('map.deleteObj'),
|
||||
handleClick: this.deleteObj,
|
||||
type: 'danger'
|
||||
},
|
||||
{
|
||||
name: '更新',
|
||||
handleClick: this.handleUpload
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// ...mapGetters('map', [
|
||||
// 'stationList'
|
||||
// ])
|
||||
},
|
||||
watch: {
|
||||
// stationList: function (val, old) {
|
||||
// const list = [];
|
||||
// if (val && val.length) {
|
||||
// for (let i = 0; i < val.length; i++) {
|
||||
// if (val[i].ciStation) {
|
||||
// list.push({ label: val[i].name, value: val[i].code });
|
||||
// }
|
||||
// }
|
||||
// this.queryForm.queryObject.stationCode.config.data = list;
|
||||
// }
|
||||
// }
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.show = true;
|
||||
this.reloadTable();
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
queryFunction(params) {
|
||||
if (this.mapInfo && this.mapInfo.id) {
|
||||
return getContinueProtectList(this.mapInfo.id, params);
|
||||
}
|
||||
},
|
||||
afterQuery(data) {
|
||||
if (data && data.list) {
|
||||
// const that = this;
|
||||
// const list = data.list;
|
||||
// if (list) {
|
||||
// list.map(elem => {
|
||||
// that.$convertSpecifiedField(elem, that.mapList, 'id', 'name', ['mapId']);
|
||||
// that.$convertSpecifiedField(elem, that.stationList, 'code', 'name', ['stationCode']);
|
||||
// });
|
||||
// }
|
||||
}
|
||||
return data;
|
||||
},
|
||||
handleUpload(index, row) {
|
||||
putContinueProtect(this.$route.params.mapId, row).then(res => {
|
||||
this.$message.success('更新成功');
|
||||
}).catch(() => {
|
||||
this.$messageBox('操作异常');
|
||||
});
|
||||
},
|
||||
editObj(index, row) {
|
||||
this.$emit('routeSelected', row);
|
||||
this.doClose();
|
||||
},
|
||||
deleteObj(index, row) {
|
||||
if (this.mapInfo && this.mapInfo.id && row) {
|
||||
this.$confirm('是否确认删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// 删除
|
||||
delContinueProtect(this.mapInfo.id, row.code).then(response => {
|
||||
this.$message.success('删除成功!');
|
||||
// this.$store.dispatch('map/delFlankProtectList', row);
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('map.failDelete'));
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$message.info('已取消删除');
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.autoSignal .el-dialog__body {
|
||||
padding: 0px 20px 10px 20px;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
}
|
||||
.autoSignal .el-dialog{
|
||||
margin-top: 5vh !important;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<div style="height: 100%;">
|
||||
<big-route-draft
|
||||
ref="routeEdit"
|
||||
:selected="selected"
|
||||
:map-info="mapInfo"
|
||||
:route-data="routeData"
|
||||
@setCenter="setCenter"
|
||||
/>
|
||||
<big-route-detail ref="routeDetail" :map-info="mapInfo" @routeSelected="routeSelected" @refresh="refresh" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import BigRouteDraft from './route';
|
||||
import BigRouteDetail from './detail';
|
||||
|
||||
export default {
|
||||
name: 'BigRouteOperate',
|
||||
components: {
|
||||
BigRouteDraft,
|
||||
BigRouteDetail
|
||||
},
|
||||
props: {
|
||||
mapInfo: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
enabledTab: 'Route',
|
||||
routeData: null,
|
||||
routeList:[]
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// filterRouteList() {
|
||||
// return this.routeList.filter(route=>{ return !route.multiRoute; });
|
||||
// } 'routeList',
|
||||
},
|
||||
methods: {
|
||||
clickEvent(e, model) {
|
||||
this.onSelect(model);
|
||||
},
|
||||
onSelect(model) {
|
||||
if (model) {
|
||||
this.selected = model;
|
||||
} else {
|
||||
this.selected = null;
|
||||
}
|
||||
},
|
||||
setDelayUnlockStatus(data, status) {
|
||||
if (data && data.delayShowList) {
|
||||
data.delayShowList.forEach(elem => {
|
||||
elem.status = status;
|
||||
});
|
||||
}
|
||||
},
|
||||
routeSelected: function (data) {
|
||||
this.routeData = data;
|
||||
if (this.$refs && this.$refs.routeEdit) {
|
||||
this.$refs.routeEdit.isModify = data.id;
|
||||
this.$refs.routeEdit.selectedData(data);
|
||||
}
|
||||
},
|
||||
previewRouteEvent: function () {
|
||||
if (this.$refs && this.$refs.routeDetail) {
|
||||
this.$refs.routeDetail.doShow();
|
||||
}
|
||||
},
|
||||
initLoad() {
|
||||
this.$refs.routeEdit && this.$refs.routeEdit.initLoad();
|
||||
},
|
||||
createRouteEvent: function () {
|
||||
if (this.$refs && this.$refs.routeEdit) {
|
||||
this.$refs.routeEdit.clear();
|
||||
}
|
||||
},
|
||||
setSelected(selected) {
|
||||
this.$refs.routeEdit.setSelected(selected);
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$emit('setCenter', code);
|
||||
},
|
||||
batchSectionListFocus(flag) {
|
||||
this.$refs.routeEdit.batchSectionListFocus(flag);
|
||||
},
|
||||
refresh() {
|
||||
this.$refs.routeEdit.initPage();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,44 +1,51 @@
|
||||
<template>
|
||||
<div style="height: 100%; border: 1px solid #EBEEF5; position: relative; left: 8%; width: 88%">
|
||||
<el-form ref="form" :model="addModel" label-width="150px" size="mini" style="margin-top: 10px">
|
||||
<div class="definition">
|
||||
<el-form-item label="延续保护解锁区段:" prop="unlockSectionCode">
|
||||
<el-select v-model="addModel.unlockSectionCode" clearable :disabled="true">
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="延续保护解锁时间(s):" prop="unlockTime">
|
||||
<el-input-number v-model="addModel.unlockTime" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="延续保护线路:" prop="relSectionSwitchList">
|
||||
<el-table :data="addModel.relSectionSwitchList" border style="width: 80%">
|
||||
<el-table-column type="index" label="序号" width="100" />
|
||||
<el-table-column fixed="right" :label="$t('map.operation')">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.prevent="deleteOverlab(addModel.relSectionSwitchList, scope.$index)"
|
||||
>
|
||||
移出
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.prevent="editOverlab(addModel.relSectionSwitchList, scope.$index)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="height: 100%; position: relative; left: 8%; width: 88%">
|
||||
<el-form ref="form" :model="addModel" :rules="rules" label-width="150px" size="mini" style="margin-top: 10px">
|
||||
<el-form-item label="延续保护名称:" prop="name">
|
||||
<el-input v-model="addModel.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="方向:" prop="right">
|
||||
<el-radio-group v-model="addModel.right">
|
||||
<el-radio :label="true">向右</el-radio>
|
||||
<el-radio :label="false">向左</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="延续保护解锁区段:" prop="unlockSectionCode">
|
||||
<el-select v-model="addModel.unlockSectionCode" clearable>
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="延续保护解锁时间(s):" prop="unlockTime">
|
||||
<el-input-number v-model="addModel.unlockTime" :min="0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="延续保护线路:" prop="pathList">
|
||||
<el-table :data="addModel.pathList" border style="width: 80%">
|
||||
<el-table-column type="index" label="序号" width="100" />
|
||||
<el-table-column fixed="right" :label="$t('map.operation')">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.prevent="deleteOverlab(addModel.pathList, scope.$index)"
|
||||
>
|
||||
移出
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.prevent="editOverlab(addModel.pathList, scope.$index)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
@ -51,8 +58,8 @@
|
||||
</div>
|
||||
<div>
|
||||
<el-form ref="overlabForm" :model="addOverlapModel" :rules="overLapRules" label-width="135px" size="mini" style="margin-top: 15px">
|
||||
<el-form-item :label="$t('map.routeProtectsData') + ':'" prop="routeOverlapSectionList">
|
||||
<el-select v-model="addOverlapModel.routeOverlapSectionList" multiple clearable :filterable="true">
|
||||
<el-form-item :label="$t('map.routeProtectsData') + ':'" prop="sectionList">
|
||||
<el-select v-model="addOverlapModel.sectionList" multiple clearable :filterable="true">
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
:key="item.code"
|
||||
@ -65,7 +72,7 @@
|
||||
@click="hover('routeOverlapSectionList')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.continueProtectSwitchData') + ':'" prop="routeOverlapSwitchList">
|
||||
<el-form-item :label="$t('map.continueProtectSwitchData') + ':'" prop="switchPositionList">
|
||||
<el-select v-model="overlapCode" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in switchList"
|
||||
@ -75,12 +82,12 @@
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type=" field === 'routeOverlapSwitchList' ? 'danger' : 'primary'"
|
||||
@click="hover('routeOverlapSwitchList')"
|
||||
:type=" field === 'switchPositionList' ? 'danger' : 'primary'"
|
||||
@click="hover('switchPositionList')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="pushSwitch(addOverlapModel.routeOverlapSwitchList, {switchCode: overlapCode, normal: overlapType, switchType: overlapType ? '定位' : '反位'})"
|
||||
@click="pushSwitch(addOverlapModel.switchPositionList, {switchCode: overlapCode, normal: overlapType, switchType: overlapType ? '定位' : '反位'})"
|
||||
>{{ $t('map.add') }}
|
||||
</el-button>
|
||||
<el-select v-model="overlapType" :filterable="true" :placeholder="$t('map.pleaseSelect')">
|
||||
@ -91,7 +98,7 @@
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-table :data="addOverlapModel.routeOverlapSwitchList" border style="width: 97%">
|
||||
<el-table :data="addOverlapModel.switchPositionList" border style="width: 97%">
|
||||
<el-table-column prop="switchCode" :label="$t('map.switchId')" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ swictchName(scope.row.switchCode) }}</span>
|
||||
@ -103,7 +110,7 @@
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.prevent="deleteSwitch(addOverlapModel.routeOverlapSwitchList, scope.$index)"
|
||||
@click.native.prevent="deleteSwitch(addOverlapModel.switchPositionList, scope.$index)"
|
||||
>
|
||||
{{ $t('map.remove') }}
|
||||
</el-button>
|
||||
@ -118,8 +125,8 @@
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { setUID } from '@/jmapNew/utils/Uid';
|
||||
import { postContinueProtect, putContinueProtect, delContinueProtect } from '@/api/jmap/mapdraft';
|
||||
// import { setUID } from '@/jmapNew/utils/Uid';
|
||||
// import { postContinueProtect, putContinueProtect, delContinueProtect } from '@/api/jmap/mapdraft';
|
||||
import { ViewMode } from '@/scripts/ConstDic';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
|
||||
@ -155,15 +162,17 @@ export default {
|
||||
addModel: {
|
||||
id: '',
|
||||
code: '',
|
||||
name: '',
|
||||
right: '',
|
||||
mapId: '',
|
||||
unlockSectionCode:'',
|
||||
unlockTime: 0,
|
||||
relSectionSwitchList: []
|
||||
pathList: []
|
||||
},
|
||||
addOverlapModel: {
|
||||
parentIndex: '',
|
||||
routeOverlapSectionList: [], // 进路延续保护区段数据列表
|
||||
routeOverlapSwitchList: [] // 进路延续保护道岔数据列表
|
||||
sectionList: [], // 进路延续保护区段数据列表
|
||||
switchPositionList: [] // 进路延续保护道岔数据列表
|
||||
},
|
||||
overlapType: '',
|
||||
SwitchLocateTypeList: [
|
||||
@ -192,7 +201,15 @@ export default {
|
||||
}
|
||||
},
|
||||
newRouteOverlapSectionList() {
|
||||
return JSON.stringify(this.addOverlapModel.routeOverlapSectionList);
|
||||
return JSON.stringify(this.addOverlapModel.sectionList);
|
||||
},
|
||||
rules() {
|
||||
const baseRules = {
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterPathName'), trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
return baseRules;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -202,13 +219,15 @@ export default {
|
||||
}
|
||||
},
|
||||
protectData(val, old) {
|
||||
console.log(val, 'val');
|
||||
if (val) {
|
||||
this.addModel = val;
|
||||
this.addModel.relSectionSwitchList && this.addModel.relSectionSwitchList.forEach(item => {
|
||||
item.routeOverlapSwitchList.length && item.routeOverlapSwitchList.forEach( ele => {
|
||||
this.addModel.pathList && this.addModel.pathList.forEach(item => {
|
||||
item.switchPositionList.length && item.switchPositionList.forEach( ele => {
|
||||
ele.switchType = ele.normal ? '定位' : '反位';
|
||||
});
|
||||
});
|
||||
this.clearOverlab();
|
||||
this.editShow = true;
|
||||
}
|
||||
},
|
||||
@ -232,9 +251,6 @@ export default {
|
||||
methods: {
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
if (this.field) {
|
||||
this.$emit('clearHover');
|
||||
}
|
||||
},
|
||||
pushSwitch(list, data) {
|
||||
const index = list.findIndex(elem => { return elem.switchCode == data.switchCode; });
|
||||
@ -260,71 +276,69 @@ export default {
|
||||
setSelected(selected) {
|
||||
if (selected) {
|
||||
if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'routeOverlapSectionList'.toUpperCase()) {
|
||||
const sectionIndex = this.addOverlapModel.routeOverlapSectionList.indexOf(selected.code);
|
||||
const sectionIndex = this.addOverlapModel.sectionList.indexOf(selected.code);
|
||||
if ((selected.type === '01' || selected.type === '03' || selected.type === '02') && sectionIndex === -1) {
|
||||
this.addOverlapModel.routeOverlapSectionList.push(selected.code);
|
||||
this.addOverlapModel.sectionList.push(selected.code);
|
||||
} else if ( sectionIndex !== -1 ) {
|
||||
this.addOverlapModel.routeOverlapSectionList.splice(sectionIndex, 1);
|
||||
this.addOverlapModel.sectionList.splice(sectionIndex, 1);
|
||||
}
|
||||
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase() && this.field.toUpperCase() === 'routeOverlapSwitchList'.toUpperCase()) {
|
||||
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase() && this.field.toUpperCase() === 'switchPositionList'.toUpperCase()) {
|
||||
this.overlapCode = selected.code;
|
||||
}
|
||||
}
|
||||
},
|
||||
buildModel(code) {
|
||||
const model = Object.assign({}, this.addModel);
|
||||
if (code) { model['code'] = code; }
|
||||
model['mapId'] = this.$route.params.mapId;
|
||||
return model;
|
||||
},
|
||||
save() {
|
||||
this.createProtect('saveProtectSuccess');
|
||||
},
|
||||
update() {
|
||||
if (this.addModel.code && this.addModel.unlockSectionCode && this.addModel.relSectionSwitchList.length && this.addModel.unlockTime) {
|
||||
const model = this.buildModel();
|
||||
putContinueProtect(model).then(resp => {
|
||||
this.$emit('updateProtectSuccess', model.code);
|
||||
}).catch(() => {
|
||||
this.$messageBox('更新延续保护失败!');
|
||||
});
|
||||
} else if (this.addModel.code && !this.addModel.relSectionSwitchList.length) {
|
||||
delContinueProtect(this.addModel.id).then(resp => {
|
||||
this.$emit('updateProtectSuccess', '');
|
||||
});
|
||||
} else if (this.addModel.code && !this.addModel.unlockSectionCode) {
|
||||
this.$messageBox('请填写延续保护解锁区段或清除延续保护线路相关数据!');
|
||||
} else if (this.addModel.code && this.addModel.unlockTime) {
|
||||
this.$messageBox('请填写延续保护解锁时间或清除延续保护线路相关数据!');
|
||||
} else {
|
||||
this.createProtect('updateProtectSuccess');
|
||||
}
|
||||
},
|
||||
createProtect(parentFunction) {
|
||||
if (this.addModel.unlockSectionCode && this.addModel.relSectionSwitchList.length && this.addModel.unlockTime) {
|
||||
const model = this.buildModel(setUID('Protect'));
|
||||
postContinueProtect(model).then(resp => {
|
||||
this.$emit(parentFunction, model.code);
|
||||
}).catch(() => {
|
||||
this.$messageBox('创建延续保护失败!');
|
||||
});
|
||||
} else if (!this.addModel.relSectionSwitchList.length) {
|
||||
this.$emit(parentFunction, '');
|
||||
} else {
|
||||
if (!this.addModel.unlockSectionCode) {
|
||||
this.$messageBox('请填写延续保护解锁区段或清除延续保护线路相关数据!');
|
||||
} else if (!this.addModel.unlockTime.length) {
|
||||
this.$messageBox('请填写延续保护解锁时间或清除延续保护线路相关数据!');
|
||||
}
|
||||
}
|
||||
},
|
||||
// buildModel(code) {
|
||||
// const model = Object.assign({}, this.addModel);
|
||||
// if (code) { model['code'] = code; }
|
||||
// model['mapId'] = this.$route.params.mapId;
|
||||
// return model;
|
||||
// },
|
||||
// update() {
|
||||
// if (this.addModel.code && this.addModel.unlockSectionCode && this.addModel.pathList.length && this.addModel.unlockTime) {
|
||||
// const model = this.buildModel();
|
||||
// putContinueProtect(model).then(resp => {
|
||||
// this.$emit('updateProtectSuccess', model.code);
|
||||
// }).catch(() => {
|
||||
// this.$messageBox('更新延续保护失败!');
|
||||
// });
|
||||
// } else if (this.addModel.code && !this.addModel.pathList.length) {
|
||||
// delContinueProtect(this.addModel.id).then(resp => {
|
||||
// this.$emit('updateProtectSuccess', '');
|
||||
// });
|
||||
// } else if (this.addModel.code && !this.addModel.unlockSectionCode) {
|
||||
// this.$messageBox('请填写延续保护解锁区段或清除延续保护线路相关数据!');
|
||||
// } else if (this.addModel.code && this.addModel.unlockTime) {
|
||||
// this.$messageBox('请填写延续保护解锁时间或清除延续保护线路相关数据!');
|
||||
// } else {
|
||||
// this.createProtect('updateProtectSuccess');
|
||||
// }
|
||||
// },
|
||||
// createProtect(parentFunction) {
|
||||
// if (this.addModel.unlockSectionCode && this.addModel.pathList.length && this.addModel.unlockTime) {
|
||||
// const model = this.buildModel(setUID('Protect'));
|
||||
// postContinueProtect(model).then(resp => {
|
||||
// this.$emit(parentFunction, model.code);
|
||||
// }).catch(() => {
|
||||
// this.$messageBox('创建延续保护失败!');
|
||||
// });
|
||||
// } else if (!this.addModel.pathList.length) {
|
||||
// this.$emit(parentFunction, '');
|
||||
// } else {
|
||||
// if (!this.addModel.unlockSectionCode) {
|
||||
// this.$messageBox('请填写延续保护解锁区段或清除延续保护线路相关数据!');
|
||||
// } else if (!this.addModel.unlockTime.length) {
|
||||
// this.$messageBox('请填写延续保护解锁时间或清除延续保护线路相关数据!');
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
clear() {
|
||||
if (this.$refs && this.$refs.form) {
|
||||
delete this.addModel.id;
|
||||
this.$refs.form.resetFields();
|
||||
this.addModel.mapId = this.$route.params.mapId;
|
||||
this.addModel.relSectionSwitchList = [];
|
||||
this.addModel.mapId = '';
|
||||
this.addModel.pathList = [];
|
||||
this.addModel.code = '';
|
||||
this.addModel.name = '';
|
||||
this.addModel.right = '';
|
||||
this.addModel.unlockTime = 0;
|
||||
this.addModel.unlockSectionCode = '';
|
||||
this.addModel.id = '';
|
||||
@ -346,9 +360,9 @@ export default {
|
||||
},
|
||||
updateOverlab() {
|
||||
if (this.addOverlapModel.parentIndex || this.addOverlapModel.parentIndex === 0 ) {
|
||||
this.addModel.relSectionSwitchList[this.addOverlapModel.parentIndex] = {
|
||||
routeOverlapSectionList:this.addOverlapModel.routeOverlapSectionList,
|
||||
routeOverlapSwitchList:this.addOverlapModel.routeOverlapSwitchList
|
||||
this.addModel.pathList[this.addOverlapModel.parentIndex] = {
|
||||
sectionList:this.addOverlapModel.sectionList,
|
||||
switchPositionList:this.addOverlapModel.switchPositionList
|
||||
};
|
||||
this.clearOverlab();
|
||||
this.cardMode = 'generate';
|
||||
@ -359,12 +373,12 @@ export default {
|
||||
this.cardMode = 'generate';
|
||||
},
|
||||
generateOverlab() {
|
||||
if (!this.addOverlapModel.routeOverlapSectionList.length) {
|
||||
if (!this.addOverlapModel.sectionList.length) {
|
||||
this.$messageBox('请选择进路延续保护区段!');
|
||||
} else {
|
||||
this.addModel.relSectionSwitchList.push({
|
||||
routeOverlapSectionList:this.addOverlapModel.routeOverlapSectionList,
|
||||
routeOverlapSwitchList:this.addOverlapModel.routeOverlapSwitchList
|
||||
this.addModel.pathList.push({
|
||||
sectionList:this.addOverlapModel.sectionList,
|
||||
switchPositionList:this.addOverlapModel.switchPositionList
|
||||
});
|
||||
this.$refs.overlabForm.resetFields();
|
||||
this.clearOverlab();
|
||||
@ -373,8 +387,8 @@ export default {
|
||||
clearOverlab() {
|
||||
this.addOverlapModel = {
|
||||
parentIndex: '',
|
||||
routeOverlapSectionList:[],
|
||||
routeOverlapSwitchList:[]
|
||||
sectionList:[],
|
||||
switchPositionList:[]
|
||||
};
|
||||
this.overlapCode = '';
|
||||
this.overlapType = '';
|
||||
@ -392,8 +406,12 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
batchSectionListFocus(flag) {
|
||||
this.changeSectionSelected(this.addOverlapModel.routeOverlapSectionList, flag, 'continueProtectSection');
|
||||
validate(cb) {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
cb(this.addModel);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -417,10 +435,10 @@ export default {
|
||||
}
|
||||
.el-card__header{
|
||||
border-bottom: 1px solid #EBEEF5;
|
||||
border-top: 1px solid #EBEEF5;
|
||||
border-top: 0 solid #EBEEF5;
|
||||
}
|
||||
.el-card{
|
||||
border:0 solid #EBEEF5;
|
||||
border:1px solid #EBEEF5;
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<div class="BigRouteInfo">
|
||||
<protect-operate ref="protect" :protect-data="protectData" />
|
||||
<div class="bigDraft">
|
||||
<el-button-group class="bigDraftBtn">
|
||||
<el-button v-if="isModify" type="warning" size="small" :loading="loading" @click="update">更新延续保护</el-button>
|
||||
<el-button v-else type="primary" size="small" :loading="loading" @click="save">保存延续保护</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { putContinueProtect } from '@/api/jmap/mapdraft';
|
||||
import ProtectOperate from './protect';
|
||||
export default {
|
||||
name:'BigRouteInfo',
|
||||
components: {
|
||||
ProtectOperate
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
mapInfo: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
routeData: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
field: '',
|
||||
loading: false,
|
||||
isModify:false,
|
||||
protectData:null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
mounted() {
|
||||
this.initPage();
|
||||
},
|
||||
methods:{
|
||||
initPage() {
|
||||
this.routeList = [];
|
||||
|
||||
},
|
||||
selectedData(data) {
|
||||
this.protectData = data;
|
||||
},
|
||||
setSelected(selected) {
|
||||
if (selected) {
|
||||
this.$refs.protect.setSelected(selected);
|
||||
}
|
||||
},
|
||||
save() {
|
||||
const that = this;
|
||||
that.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
console.log('保存');
|
||||
}
|
||||
});
|
||||
},
|
||||
clear() {
|
||||
if (this.$refs && this.$refs.form && this.mapInfo) {
|
||||
this.$refs.form.resetFields();
|
||||
}
|
||||
},
|
||||
update() {
|
||||
this.$refs.protect.validate((data) => {
|
||||
putContinueProtect(this.$route.params.mapId, data).then(res => {
|
||||
this.$message.success('更新成功!');
|
||||
this.$refs.protect.clear();
|
||||
this.isModify = false;
|
||||
}).catch(() => {
|
||||
this.$message.error('更新失败!');
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.BigRouteInfo{
|
||||
height: 100%;
|
||||
overflow:auto;
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
.bigDefinition{
|
||||
|
||||
}
|
||||
.bigDraft{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
box-shadow: 4px 5px 10px #565656;
|
||||
width: 100%;
|
||||
padding: 8px 10px;
|
||||
}
|
||||
.bigDraftBtn{float: right;}
|
||||
</style>
|
@ -40,6 +40,7 @@ import TurnedOperate from './turnedoperate/index';
|
||||
import FlankProtectOperate from './flankProtectOperate/index';
|
||||
import DwellTimeOperate from './dwellTimeOperate/index';
|
||||
import DestinationOperate from './destinationOperate/index';
|
||||
import ContinueProtectOperate from './continueProtectOperate/index';
|
||||
|
||||
export default {
|
||||
name: 'DataRelation',
|
||||
@ -53,7 +54,8 @@ export default {
|
||||
// PathOperate,
|
||||
SignalOperate,
|
||||
TurnedOperate,
|
||||
DwellTimeOperate
|
||||
DwellTimeOperate,
|
||||
ContinueProtectOperate
|
||||
// DestinationOperate
|
||||
},
|
||||
props: {
|
||||
@ -100,10 +102,11 @@ export default {
|
||||
} else {
|
||||
this.tabList = [
|
||||
{label: this.$t('map.routeID'), name:'route', menus:RouteOperate},
|
||||
{label: '延续保护', name: 'overlap', menus: ContinueProtectOperate},
|
||||
{label: this.$t('map.signalApprochSection'), name:'signal', menus:SignalOperate}, // 信号机接近区段
|
||||
{label: '自动折返', name:'turned', menus:TurnedOperate},
|
||||
{label: '目的地码', name:'destination', menus:DestinationOperate},
|
||||
{label: this.$t('map.automaticSignal'), name:'automatic', menus:AutomaticOperate},
|
||||
{label: this.$t('map.signalApprochSection'), name:'signal', menus:SignalOperate},
|
||||
{label: '侧防', name:'flankProtect', menus:FlankProtectOperate},
|
||||
{label: this.$t('map.routing'), name:'routing', menus:RoutingOperate},
|
||||
{label: '停站时间', name:'dwellTime', menus:DwellTimeOperate},
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<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>
|
||||
<QueryListPage
|
||||
ref="queryListPage"
|
||||
@ -10,7 +10,7 @@
|
||||
/>
|
||||
</div>
|
||||
<pre-view-field ref="previewField" :map-info="mapInfo" />
|
||||
<protect-detail ref="protectDetail" :map-info="mapInfo" />
|
||||
<!-- <protect-detail ref="protectDetail" :map-info="mapInfo" /> -->
|
||||
</el-dialog>
|
||||
<related ref="related" :map-info="mapInfo" />
|
||||
</div>
|
||||
@ -18,8 +18,8 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { listMap, getRouteNewList, delRouteNew, getRouteNewById, putRouteNew, getContinueProtectList, delContinueProtect } from '@/api/jmap/mapdraft';
|
||||
import ProtectDetail from './protectDetail';
|
||||
import { listMap, getRouteNewList, delRouteNew, putRouteNew, putSetDraftMapRouteById, getOverlapAllList } from '@/api/jmap/mapdraft';
|
||||
// import ProtectDetail from './protectDetail';
|
||||
import PreViewField from './preview';
|
||||
import Related from './related';
|
||||
|
||||
@ -27,7 +27,7 @@ export default {
|
||||
name: 'RouteDetail',
|
||||
components: {
|
||||
PreViewField,
|
||||
ProtectDetail,
|
||||
// ProtectDetail,
|
||||
Related
|
||||
},
|
||||
props: {
|
||||
@ -48,6 +48,7 @@ export default {
|
||||
RouteAutoTypeList: [],
|
||||
SwitchLocateTypeList: [],
|
||||
ContinueProtectList: [],
|
||||
overlapList: [], // 延续保护列表
|
||||
turnBackList: [
|
||||
{ label: '是', value: true },
|
||||
{ label: '否', value: false }
|
||||
@ -89,8 +90,19 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'switchList',
|
||||
'sectionList',
|
||||
'stationList',
|
||||
'stationStandList'
|
||||
]),
|
||||
queryList() {
|
||||
return {
|
||||
query: this.queryFunction,
|
||||
afterQuery: this.afterQuery,
|
||||
selectCheckShow: false,
|
||||
@ -99,6 +111,7 @@ export default {
|
||||
{
|
||||
title: this.$t('map.pathName'),
|
||||
prop: 'name',
|
||||
edit: true,
|
||||
width: 180
|
||||
},
|
||||
{
|
||||
@ -108,7 +121,28 @@ export default {
|
||||
},
|
||||
{
|
||||
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'),
|
||||
@ -119,10 +153,24 @@ export default {
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('map.whetherAutoRoute'),
|
||||
prop: 'flt',
|
||||
title: 'atp进路',
|
||||
prop: 'atp',
|
||||
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 ''; }
|
||||
},
|
||||
{
|
||||
@ -134,55 +182,11 @@ export default {
|
||||
prop: 'endSignalCode'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('map.continueProtect'),
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('map.preview'),
|
||||
handleClick: this.overlapSwitchDetail,
|
||||
showControl: (row) => { return row.overlapCode; }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('map.accessSideTurnoutData'),
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('map.preview'),
|
||||
handleClick: this.flankProtectionSwitchDetail,
|
||||
showControl: (row) => { return row.routeFlankProtectionList && row.routeFlankProtectionList.length > 0; }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('map.physicalSection'), // 物理区段list
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('map.preview'),
|
||||
handleClick: this.sectionDetail
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('map.routeRouteTurnoutData'),
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('map.preview'),
|
||||
handleClick: this.routeSwitchDetail,
|
||||
showControl: (row) => { return row.routeSwitchList.length > 0; }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: this.$t('map.hostileData'),
|
||||
prop: 'conflictingSignalList',
|
||||
type: 'tagMore',
|
||||
width: '250',
|
||||
columnValue: (row) => { return this.showConflictingSignalList(row.conflictingSignalList); },
|
||||
tagType: (row) => { return ''; }
|
||||
title: '延续保护',
|
||||
prop: 'overlapCode',
|
||||
type: 'select',
|
||||
options: this.overlapList,
|
||||
width: 190
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
@ -194,12 +198,6 @@ export default {
|
||||
handleClick: this.edit,
|
||||
showControl: () => { return this.showType !== 'select'; }
|
||||
},
|
||||
{
|
||||
name: '复制',
|
||||
handleClick: this.copyObj,
|
||||
type: 'warning',
|
||||
showControl: () => { return this.showType !== 'select'; }
|
||||
},
|
||||
{
|
||||
name: this.$t('map.deleteObj'),
|
||||
handleClick: this.deleteObj,
|
||||
@ -210,21 +208,17 @@ export default {
|
||||
name: this.$t('global.select'),
|
||||
handleClick: this.selectedObj,
|
||||
showControl: () => { return this.showType === 'select'; }
|
||||
},
|
||||
{
|
||||
name: '更新',
|
||||
handleClick: this.handleUpdate,
|
||||
showControl: () => { return this.showType !== 'select'; }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'switchList',
|
||||
'sectionList',
|
||||
'stationList',
|
||||
'stationStandList'
|
||||
])
|
||||
};
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
signalList: function (val, old) {
|
||||
@ -262,6 +256,7 @@ export default {
|
||||
this.SwitchLocateTypeList = list;
|
||||
});
|
||||
this.acquireMapList();
|
||||
this.initProtectData();
|
||||
},
|
||||
methods: {
|
||||
doShow(showType, codeType) {
|
||||
@ -275,6 +270,11 @@ export default {
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
initProtectData() {
|
||||
getOverlapAllList(this.$route.params.mapId).then(resp => {
|
||||
this.overlapList = resp.data;
|
||||
});
|
||||
},
|
||||
queryFunction(params) {
|
||||
if (this.mapInfo && this.mapInfo.id) {
|
||||
return getRouteNewList(this.mapInfo.id, params);
|
||||
@ -294,116 +294,20 @@ export default {
|
||||
that.$convertSpecifiedField(elem, that.RouteAutoTypeList, 'code', 'name', ['autoType']);
|
||||
that.$convertSpecifiedField(elem, that.RouteNatureTypeList, 'code', 'name', ['natureType']);
|
||||
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.signalList, 'code', 'name', ['startSignalCode', 'endSignalCode']);
|
||||
that.$convertSpecifiedField(elem, that.stationList, 'code', 'name', ['stationCode']);
|
||||
that.$convertSpecifiedField(elem, that.sectionList, 'code', 'name', ['nearSectionCode', 'autoTriggerSectionCode', 'turnBackSectionCode']);
|
||||
});
|
||||
}
|
||||
}
|
||||
return data;
|
||||
},
|
||||
async routeOverlap(index, row) { // 延续保护区段数据列表
|
||||
if (this.$refs && this.$refs.previewField && row) {
|
||||
const sectionDict = {};
|
||||
this.sectionList.map(elem => { sectionDict[elem.code] = elem.name; });
|
||||
const routeOverlapSectionList = row.routeOverlapSectionList.map(elem => { return {sectionCode : elem}; });
|
||||
const fieldList = {
|
||||
id: row.id,
|
||||
mapId: this.$route.params.mapId,
|
||||
title: this.$t('map.routeContinuesToProtectSectorData'),
|
||||
name: row.name,
|
||||
model: {
|
||||
items: [
|
||||
{ prop: 'sectionCode', label: this.$t('map.physicalSectionID'), type: 'text' },
|
||||
{ prop: 'sectionCode', label: this.$t('map.physicalSectionName'), type: 'select', options: sectionDict }
|
||||
]
|
||||
}
|
||||
};
|
||||
this.$refs.previewField.doShow(fieldList, routeOverlapSectionList);
|
||||
}
|
||||
},
|
||||
async sectionDetail(index, row) { // 进路物理区段
|
||||
if (this.$refs && this.$refs.previewField && row) {
|
||||
const sectionDict = {};
|
||||
this.sectionList.map(elem => { sectionDict[elem.code] = elem.name; });
|
||||
const routeSectionList = row.routeSectionList.map(elem => { return {sectionCode : elem}; });
|
||||
const fieldList = {
|
||||
id: row.id,
|
||||
mapId: this.$route.params.mapId,
|
||||
title: this.$t('map.routePhysicalSectionData'),
|
||||
name: row.name,
|
||||
model: {
|
||||
items: [
|
||||
{ prop: 'sectionCode', label: this.$t('map.physicalSectionID'), type: 'text' },
|
||||
{ prop: 'sectionCode', label: this.$t('map.physicalSectionName'), type: 'select', options: sectionDict }
|
||||
]
|
||||
}
|
||||
};
|
||||
this.$refs.previewField.doShow(fieldList, routeSectionList);
|
||||
}
|
||||
},
|
||||
async overlapSwitchDetail(index, row) { // 延续保护道岔
|
||||
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) { // 进路侧防道岔
|
||||
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('操作异常');
|
||||
});
|
||||
},
|
||||
// 保存
|
||||
saveRelated(row) {
|
||||
@ -414,35 +318,11 @@ export default {
|
||||
});
|
||||
},
|
||||
edit(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;
|
||||
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();
|
||||
});
|
||||
}
|
||||
});
|
||||
// getRouteNewById(row.mapId).then(response => {
|
||||
// const data = response.data;
|
||||
this.$emit('routeSelected', row);
|
||||
this.doClose();
|
||||
// });
|
||||
},
|
||||
deleteObj(index, row) {
|
||||
if (row) {
|
||||
@ -451,19 +331,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delRouteNew(row.id).then(response => {
|
||||
const param = {
|
||||
code: row.overlapCode,
|
||||
pageNum: 10,
|
||||
pageSize:1
|
||||
};
|
||||
getContinueProtectList(this.$route.params.mapId, param).then(resp => {
|
||||
if (resp.data.list[0]) {
|
||||
delContinueProtect(resp.data.list[0].id).then( res => {
|
||||
this.$message.success('删除成功');
|
||||
});
|
||||
}
|
||||
});
|
||||
delRouteNew(this.$route.params.mapId, row.code).then(response => {
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
this.$messageBox('删除失败');
|
||||
@ -481,39 +349,47 @@ export default {
|
||||
selectedObj(index, row) {
|
||||
this.$emit('setRouteCode', row, this.codeType);
|
||||
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>
|
||||
|
||||
<style lang="scss">
|
||||
.dialog_content_box{
|
||||
.el-dialog__body{
|
||||
padding-top: 3px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -22,10 +22,10 @@
|
||||
<el-radio :label="false">{{ $t('map.deny') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.delayUnlockingTime') + ':'" prop="delayReleaseTime">
|
||||
<!-- <el-form-item :label="$t('map.delayUnlockingTime') + ':'" prop="delayReleaseTime">
|
||||
<el-input-number v-model="addModel.delayReleaseTime" :min="0" />
|
||||
<span>s</span>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item :label="$t('map.accessType') + ':'" prop="turnBack">
|
||||
<el-radio-group v-model="addModel.turnBack">
|
||||
<el-radio :label="true">{{ $t('map.are') }}</el-radio>
|
||||
@ -115,6 +115,16 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
<el-form-item label="延续保护:">
|
||||
<el-select v-model="addModel.overlapCode" clearable filterable :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="(item,index) in overlapList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="侧防列表:">
|
||||
<el-select v-model="addModel.flankProtectionList" clearable multiple filterable :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
@ -142,7 +152,6 @@
|
||||
</el-form>
|
||||
<hostile-data ref="hostile" :conflicting-signal-list="addModel.conflictingSignalList" @hover="hover" />
|
||||
<br>
|
||||
<protect-operate ref="protect" :protect-data="protectData" @saveProtectSuccess="saveProtectSuccess" @updateProtectSuccess="updateProtectSuccess" @clearHover="clearHover" />
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button v-if="isSave" type="primary" size="small" :loading="loading" @click="save">{{ $t('map.saveRoute') }}
|
||||
@ -155,15 +164,12 @@
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { setUID } from '@/jmapNew/utils/Uid';
|
||||
import { postRouteNew, putRouteNew, getRouteNewList, getContinueProtectList, getFlankProtectionList } from '@/api/jmap/mapdraft';
|
||||
import ProtectOperate from './protect';
|
||||
import { getRouteNewList, getFlankProtectionList, getOverlapAllList, putSetDraftMapRouteById } from '@/api/jmap/mapdraft';
|
||||
import HostileData from './hostileData';
|
||||
|
||||
export default {
|
||||
name: 'RouteOperation',
|
||||
components: {
|
||||
ProtectOperate,
|
||||
HostileData
|
||||
},
|
||||
props: {
|
||||
@ -200,7 +206,6 @@ export default {
|
||||
{ name: '定位', code: true },
|
||||
{ name: '反位', code: false }
|
||||
],
|
||||
// flankProtectList: [], // 侧防列表
|
||||
addModel: {
|
||||
mapId: '',
|
||||
code: '',
|
||||
@ -209,7 +214,7 @@ export default {
|
||||
arc: false, // 是否自动追踪/联锁自动触发
|
||||
flt: false, // 是否车队/联锁自动进路
|
||||
lockFirst:false, // 是否先锁闭——办理过程直接先锁闭区段
|
||||
delayReleaseTime: '', // 延时解锁时间
|
||||
// delayReleaseTime: '', // 延时解锁时间
|
||||
turnBack: false, // 是否折返进路
|
||||
startSignalCode: '', // 始端信号机
|
||||
endSignalCode: '', // 终端信号机
|
||||
@ -222,7 +227,7 @@ export default {
|
||||
overlapCode:'',
|
||||
conflictingSignalList: [] // 敌对信号数据列表
|
||||
},
|
||||
protectData:null,
|
||||
overlapList: [], // 延续保护列表
|
||||
routeList: [] // 进路列表
|
||||
};
|
||||
},
|
||||
@ -284,9 +289,7 @@ export default {
|
||||
},
|
||||
routeData(val, old) {
|
||||
if (val) {
|
||||
this.$refs.protect.clear();
|
||||
this.addModel = val;
|
||||
val.overlapCode && this.initProtectData(val);
|
||||
this.addModel.routeSwitchList.forEach(item => {
|
||||
item.normal ? item.switchType = '定位' : item.switchType = '反位';
|
||||
});
|
||||
@ -305,7 +308,6 @@ export default {
|
||||
this.changeSectionSelected(objOld, false, 'routePhysicalSection');
|
||||
}
|
||||
if (obj && obj.length) {
|
||||
this.$refs.protect.addModel.unlockSectionCode = obj[obj.length - 1];
|
||||
this.changeSectionSelected(obj, true, 'routePhysicalSection');
|
||||
}
|
||||
},
|
||||
@ -334,6 +336,7 @@ export default {
|
||||
mounted() {
|
||||
this.getRouteList();
|
||||
this.getFlankProtectList();
|
||||
this.initProtectData();
|
||||
},
|
||||
methods: {
|
||||
initLoad() { // 加载联锁车站列表
|
||||
@ -366,12 +369,8 @@ export default {
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
this.$refs.protect.hover('');
|
||||
this.$refs.hostile.setField(this.field);
|
||||
},
|
||||
clearHover() {
|
||||
this.field = '';
|
||||
},
|
||||
pushSwitch(list, data) {
|
||||
const index = list.findIndex(elem => { return elem.switchCode == data.switchCode; });
|
||||
if (index < 0) {
|
||||
@ -391,39 +390,16 @@ export default {
|
||||
return model;
|
||||
},
|
||||
save() {
|
||||
this.$refs.protect.save();
|
||||
},
|
||||
saveProtectSuccess(overlapCode) {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
postRouteNew(this.buildModel(overlapCode, setUID('Route'))).then(response => {
|
||||
this.$message.success(this.$t('tip.creatingSuccessful'));
|
||||
this.loading = false;
|
||||
this.routeList.push(this.buildModel(setUID('Route')));
|
||||
this.clear();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.operationAbnormal'));
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
console.log('暂无接口');
|
||||
},
|
||||
update() {
|
||||
this.$refs.protect.update();
|
||||
},
|
||||
updateProtectSuccess(overlapCode) {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
putRouteNew(this.buildModel(overlapCode)).then(response => {
|
||||
this.$message.success(this.$t('map.updateSuccessfully'));
|
||||
this.loading = false;
|
||||
putSetDraftMapRouteById(this.mapInfo.id, this.addModel).then(res => {
|
||||
this.$message.success('更新进路成功!');
|
||||
this.clear();
|
||||
this.getRouteList();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.operationAbnormal'));
|
||||
this.loading = false;
|
||||
this.$message.error('更新进路失败!');
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -440,28 +416,21 @@ export default {
|
||||
this.addModel.code = '';
|
||||
this.addModel.conflictingSignalList = [];
|
||||
this.isSave = true;
|
||||
this.$refs.protect.clear();
|
||||
this.routeCode = '';
|
||||
this.routeType = '';
|
||||
this.addModel.stationCode = this.routeList[this.routeList.length - 1].stationCode;
|
||||
this.addModel.delayReleaseTime = this.routeList[this.routeList.length - 1].delayReleaseTime;
|
||||
// this.addModel.delayReleaseTime = this.routeList[this.routeList.length - 1].delayReleaseTime;
|
||||
}
|
||||
},
|
||||
initProtectData(val) {
|
||||
const param = {
|
||||
code: val.overlapCode,
|
||||
pageNum: 10,
|
||||
pageSize:1
|
||||
};
|
||||
getContinueProtectList(this.$route.params.mapId, param).then(resp => {
|
||||
this.protectData = resp.data.list[0];
|
||||
initProtectData() {
|
||||
getOverlapAllList(this.$route.params.mapId).then(resp => {
|
||||
this.overlapList = resp.data;
|
||||
});
|
||||
},
|
||||
batchSectionListFocus(flag) {
|
||||
this.changeSectionSelected(this.addModel.routeSectionList, flag, 'routePhysicalSection');
|
||||
this.changeSignalSelected(this.addModel.startSignalCode, flag, 'routeSignal');
|
||||
this.changeSignalSelected(this.addModel.endSignalCode, flag, 'routeSignal');
|
||||
this.$refs['protect'].batchSectionListFocus(flag);
|
||||
},
|
||||
changeSectionSelected(list, flag, type) {
|
||||
list && list.forEach((item) => {
|
||||
@ -507,8 +476,6 @@ export default {
|
||||
this.$refs.hostile.setHostileSignal(selected.code);
|
||||
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase() && this.field.toUpperCase() === 'switchPositionList'.toUpperCase()) {
|
||||
this.$refs.hostile.hostileSwitchCode = selected.code;
|
||||
} else {
|
||||
this.$refs.protect.setSelected(selected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="$t('map.signalApprochSection')" :visible.sync="show" width="85%" :before-do-close="doClose" append-to-body>
|
||||
<el-dialog v-dialogDrag :title="$t('map.signalApprochSection')" :visible.sync="show" width="85%" top="2vh" :before-do-close="doClose" append-to-body>
|
||||
<div>
|
||||
<QueryListPage
|
||||
ref="queryListPage"
|
||||
@ -14,7 +14,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { listMap } from '@/api/jmap/mapdraft';
|
||||
import { getApproachSectionList, deleteApproachSection, getApproachSectionDetail } from '@/api/jmap/mapdraft';
|
||||
import { getApproachSectionList, deleteApproachSection } from '@/api/jmap/mapdraft';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
@ -55,30 +55,40 @@ export default {
|
||||
{
|
||||
title: this.$t('map.signalCodeName'),
|
||||
prop: 'signalCode',
|
||||
width: '120'
|
||||
},
|
||||
{
|
||||
title: this.$t('map.nearSectionCodeColon'),
|
||||
prop: 'routeSectionList',
|
||||
type: 'tagMore',
|
||||
columnValue: (row) => { return this.$convertField(row.routeSectionList, this.sectionList, ['code', 'name'], true); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '接近区段(后备)',
|
||||
prop: 'blockSectionList',
|
||||
type: 'tagMore',
|
||||
columnValue: (row) => { return this.$convertField(row.blockSectionList || [], this.sectionList, ['code', 'name'], true); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '是否是引导信号机',
|
||||
prop: 'releaseTime',
|
||||
type: 'tag',
|
||||
width: '80',
|
||||
columnValue: (row) => { return row.releaseTime; },
|
||||
columnValue: (row) => { return this.$convertField(row.signalCode, this.signalList, ['code', 'name']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '信号机code',
|
||||
prop: 'signalCode'
|
||||
},
|
||||
{
|
||||
title: '进路解锁时间',
|
||||
prop: 'releaseTime'
|
||||
},
|
||||
// {
|
||||
// title: this.$t('map.nearSectionCodeColon'),
|
||||
// prop: 'routeSectionList',
|
||||
// type: 'tagMore',
|
||||
// columnValue: (row) => { return this.$convertField(row.routeSectionList, this.sectionList, ['code', 'name'], true); },
|
||||
// tagType: (row) => { return ''; }
|
||||
// },
|
||||
// {
|
||||
// title: '接近区段(后备)',
|
||||
// prop: 'blockSectionList',
|
||||
// type: 'tagMore',
|
||||
// columnValue: (row) => { return this.$convertField(row.blockSectionList || [], this.sectionList, ['code', 'name'], true); },
|
||||
// tagType: (row) => { return ''; }
|
||||
// },
|
||||
// {
|
||||
// title: '是否是引导信号机',
|
||||
// prop: 'releaseTime',
|
||||
// type: 'tag',
|
||||
// width: '80',
|
||||
// columnValue: (row) => { return row.releaseTime; },
|
||||
// tagType: (row) => { return ''; }
|
||||
// },
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('map.operation'),
|
||||
@ -147,27 +157,12 @@ export default {
|
||||
this.mapList = response.data;
|
||||
});
|
||||
},
|
||||
afterQuery(data) {
|
||||
if (data && data.list) {
|
||||
const that = this;
|
||||
const list = data.list;
|
||||
if (list) {
|
||||
list.map(elem => {
|
||||
elem.code = elem.signalCode;
|
||||
that.$convertSpecifiedField(elem, that.mapList, 'id', 'name', ['mapId']);
|
||||
that.$convertSpecifiedField(elem, this.signalList, 'code', 'name', ['signalCode']);
|
||||
elem.signalCode = `${elem.signalCode}(${elem.code})`;
|
||||
});
|
||||
}
|
||||
}
|
||||
return data;
|
||||
},
|
||||
editObj(index, row) {
|
||||
getApproachSectionDetail(row.id).then(response => {
|
||||
const data = response.data;
|
||||
this.$emit('autoMaticoSelected', data);
|
||||
this.doClose();
|
||||
});
|
||||
// getApproachSectionDetail(row.id).then(response => {
|
||||
// const data = response.data;
|
||||
this.$emit('autoMaticoSelected', row);
|
||||
this.doClose();
|
||||
// });
|
||||
},
|
||||
deleteObj(index, row) {
|
||||
if (this.mapInfo && this.mapInfo.id && row) {
|
||||
|
@ -15,39 +15,106 @@
|
||||
<el-button :type="field === 'signalCode' ? 'danger' : 'primary'" @click="hover('signalCode')">{{ $t('map.activate') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.nearSectionCodeColon')" prop="routeSectionList">
|
||||
<el-select v-model="addModel.routeSectionList" multiple clearable :filterable="true">
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type=" field === 'routeSectionList' ? 'danger' : 'primary'"
|
||||
@click="hover('routeSectionList')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="接近区段(后备):" prop="blockSectionList">
|
||||
<el-select v-model="addModel.blockSectionList" multiple clearable :filterable="true">
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type=" field === 'blockSectionList' ? 'danger': 'primary'"
|
||||
@click="hover('blockSectionList')"
|
||||
>
|
||||
{{ $t('map.activate') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="进路解锁时间:" prop="releaseTime">
|
||||
<el-input-number v-model="addModel.releaseTime" />
|
||||
</el-form-item>
|
||||
<el-form-item label="延续保护线路:" prop="sectionPathList">
|
||||
<el-table :data="addModel.sectionPathList" border style="width: 80%">
|
||||
<el-table-column type="index" label="序号" width="100" />
|
||||
<el-table-column fixed="right" :label="$t('map.operation')">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.prevent="deleteOverlab(addModel.sectionPathList, scope.$index)"
|
||||
>
|
||||
移出
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.prevent="editOverlab(addModel.sectionPathList, scope.$index)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
<el-card class="box-card" shadow="never" style="width: 88%; margin-left: 6%;">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-size: 14px;">{{ cardTitle }}</span>
|
||||
<el-button v-if="cardMode === 'generate'" style="float: right; padding: 3px 0" type="text" @click="generateOverlab">生成</el-button>
|
||||
<el-button-group v-else-if="cardMode === 'edit'" style="float: right;">
|
||||
<el-button type="text" style="padding:3px 3px" @click="updateOverlab">修改</el-button>
|
||||
<el-button type="text" style="padding:3px 0" @click="cancelOverlab">取消</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<div>
|
||||
<el-form ref="overlabForm" :model="addOverlapModel" :rules="overLapRules" label-width="135px" size="mini" style="margin-top: 15px">
|
||||
<el-form-item :label="$t('map.routeProtectsData') + ':'" prop="sectionList">
|
||||
<el-select v-model="addOverlapModel.sectionList" multiple clearable :filterable="true">
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
:key="item.code"
|
||||
:label="item.name + ' (' + item.code+ ')'"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="field === 'routeOverlapSectionList' ? 'danger' : 'primary'"
|
||||
@click="hover('routeOverlapSectionList')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.continueProtectSwitchData') + ':'" prop="switchPositionList">
|
||||
<el-select v-model="overlapCode" clearable :filterable="true" :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in switchList"
|
||||
:key="item.code"
|
||||
:label="`${item.name}(${item.code})`"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button
|
||||
:type="field === 'switchPositionList' ? 'danger' : 'primary'"
|
||||
@click="hover('switchPositionList')"
|
||||
>{{ $t('map.activate') }}</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="pushSwitch(addOverlapModel.switchPositionList, {switchCode: overlapCode, normal: overlapType, switchType: overlapType ? '定位' : '反位'})"
|
||||
>{{ $t('map.add') }}
|
||||
</el-button>
|
||||
<el-select v-model="overlapType" :filterable="true" :placeholder="$t('map.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in SwitchLocateTypeList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<el-table :data="addOverlapModel.switchPositionList" border style="width: 97%">
|
||||
<el-table-column prop="switchCode" :label="$t('map.switchId')" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ swictchName(scope.row.switchCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="switchType" :label="$t('map.switchType')" />
|
||||
<el-table-column fixed="right" :label="$t('map.operation')" width="50">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.prevent="deleteSwitch(addOverlapModel.switchPositionList, scope.$index)"
|
||||
>
|
||||
{{ $t('map.remove') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button v-if="isSave" type="primary" size="small" :loading="loading" @click="save">{{ $t('map.save') }}
|
||||
@ -64,7 +131,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { setUID } from '@/jmapNew/utils/Uid';
|
||||
import { postApproachSection, putApproachSection, getApproachSectionList } from '@/api/jmap/mapdraft';
|
||||
import { postApproachSection, putApproachSection } from '@/api/jmap/mapdraft';
|
||||
import { ViewMode } from '@/scripts/ConstDic';
|
||||
import { formatName } from '@/jmapNew/theme/parser/util';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
@ -98,38 +165,50 @@ export default {
|
||||
isSave: true,
|
||||
loading: false,
|
||||
editModel: {},
|
||||
overlapCode: '',
|
||||
overlapType: '',
|
||||
cardMode: 'generate',
|
||||
addModel: {
|
||||
id: '',
|
||||
code: '',
|
||||
mapId: '',
|
||||
signalCode: '',
|
||||
routeSectionList: [],
|
||||
blockSectionList: [],
|
||||
releaseTime: 0
|
||||
releaseTime: 0,
|
||||
sectionPathList: []
|
||||
},
|
||||
addOverlapModel: {
|
||||
parentIndex: '',
|
||||
sectionList: [], // 进路延续保护区段数据列表
|
||||
switchPositionList: [] // 进路延续保护道岔数据列表
|
||||
},
|
||||
rules: {
|
||||
signalCode: [
|
||||
{ required: true, message: this.$t('map.pleaseSelectSignal'), trigger: 'change' }
|
||||
],
|
||||
routeSectionList: [
|
||||
{ required: true, message: this.$t('map.triggerSegmentData'), trigger: 'change' }
|
||||
],
|
||||
blockSectionList: [
|
||||
{ required: true, message: '请选择接近区段(后备)!', trigger: 'change'}
|
||||
]
|
||||
}
|
||||
},
|
||||
overLapRules: {
|
||||
|
||||
},
|
||||
SwitchLocateTypeList: [
|
||||
{ name: '定位', code: true },
|
||||
{ name: '反位', code: false }
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList',
|
||||
'switchList',
|
||||
'sectionList'
|
||||
]),
|
||||
newRouteSectionList() {
|
||||
return JSON.stringify(this.addModel.routeSectionList);
|
||||
},
|
||||
newBlockSectionList() {
|
||||
return JSON.stringify(this.addModel.blockSectionList);
|
||||
cardTitle() {
|
||||
if (this.cardMode === 'generate') {
|
||||
return '生成信号机接近区段';
|
||||
} else if (this.cardMode === 'edit') {
|
||||
return '编辑信号机接近区段';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -141,41 +220,20 @@ export default {
|
||||
routeData(val, old) {
|
||||
if (val) {
|
||||
this.addModel = deepAssign(this.addModel, val);
|
||||
this.addModel.sectionPathList && this.addModel.sectionPathList.forEach(item => {
|
||||
item.switchPositionList.length && item.switchPositionList.forEach( ele => {
|
||||
ele.switchType = ele.normal ? '定位' : '反位';
|
||||
});
|
||||
});
|
||||
this.clearOverlab();
|
||||
}
|
||||
},
|
||||
newRouteSectionList: {
|
||||
handler: function(val, old) {
|
||||
const obj = JSON.parse(val);
|
||||
const objOld = JSON.parse(old);
|
||||
if (objOld && objOld.length) {
|
||||
this.changeSectionSelected(objOld, true);
|
||||
}
|
||||
if (obj && obj.length) {
|
||||
this.changeSectionSelected(obj, true);
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
newBlockSectionList: {
|
||||
handler: function(val, old) {
|
||||
const obj = JSON.parse(val);
|
||||
const objOld = JSON.parse(old);
|
||||
if (objOld && objOld.length) {
|
||||
this.changeSectionSelected(objOld, true);
|
||||
}
|
||||
if (obj && obj.length) {
|
||||
this.changeSectionSelected(obj, true);
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'addModel.signalCode': function (val, old) {
|
||||
if (old) {
|
||||
this.changeSignalSelected(old, false, 'routeSignal');
|
||||
}
|
||||
if (val) {
|
||||
this.changeSignalSelected(val, true, 'routeSignal');
|
||||
this.changeSignal(val);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -189,44 +247,40 @@ export default {
|
||||
formatName(code) {
|
||||
return formatName(code);
|
||||
},
|
||||
changeSignal(val) {
|
||||
if (val && this.mapInfo && this.mapInfo.id) {
|
||||
const params = {
|
||||
signalCode : val,
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
};
|
||||
getApproachSectionList(this.mapInfo.id, params).then( resp => {
|
||||
if (resp.data && resp.data.list && resp.data.list.length) {
|
||||
this.routeData = resp.data.list[0];
|
||||
this.isSave = false;
|
||||
} else {
|
||||
this.addModel.id = '';
|
||||
this.addModel.code = '';
|
||||
this.addModel.mapId = '';
|
||||
this.addModel.routeSectionList = [];
|
||||
this.addModel.blockSectionList = [];
|
||||
this.isSave = true;
|
||||
}
|
||||
}).catch(error=> {
|
||||
console.log(error);
|
||||
});
|
||||
pushSwitch(list, data) {
|
||||
const index = list.findIndex(elem => { return elem.switchCode == data.switchCode; });
|
||||
if (index < 0) {
|
||||
list.push(data);
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.routeSameID'));
|
||||
}
|
||||
},
|
||||
swictchName(code) {
|
||||
let name = '';
|
||||
if (code) {
|
||||
const swch = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (swch) {
|
||||
name = `${swch.name}(${swch.code})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
deleteSwitch(list, index) {
|
||||
list.splice(index, 1);
|
||||
},
|
||||
setSelected(selected) {
|
||||
if (selected) {
|
||||
if (selected._type.toUpperCase() === 'Signal'.toUpperCase() && this.field.toUpperCase() === 'signalCode'.toUpperCase()) {
|
||||
this.addModel.signalCode = selected.code;
|
||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'routeSectionList'.toUpperCase()) {
|
||||
if ((selected.type === '01' || selected.type === '03' || selected.type === '02') && this.addModel.routeSectionList.indexOf(selected.code) === -1) {
|
||||
this.addModel.routeSectionList.push(selected.code);
|
||||
}
|
||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'blockSectionList'.toUpperCase()) {
|
||||
if ((selected.type === '01' || selected.type === '03') && this.addModel.blockSectionList.indexOf(selected.code) === -1) {
|
||||
this.addModel.blockSectionList.push(selected.code);
|
||||
} else if (selected.type === '02' && this.addModel.blockSectionList.indexOf(selected.parentCode) === -1) {
|
||||
this.addModel.blockSectionList.push(selected.parentCode);
|
||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'routeOverlapSectionList'.toUpperCase()) {
|
||||
const sectionIndex = this.addOverlapModel.sectionList.indexOf(selected.code);
|
||||
if ((selected.type === '01' || selected.type === '03' || selected.type === '02') && sectionIndex === -1) {
|
||||
this.addOverlapModel.sectionList.push(selected.code);
|
||||
} else if ( sectionIndex !== -1 ) {
|
||||
this.addOverlapModel.sectionList.splice(sectionIndex, 1);
|
||||
}
|
||||
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase() && this.field.toUpperCase() === 'switchPositionList'.toUpperCase()) {
|
||||
this.overlapCode = selected.code;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -255,7 +309,8 @@ export default {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
putApproachSection(this.buildModel()).then(resp => {
|
||||
console.log(this.addModel, '====');
|
||||
putApproachSection(this.mapInfo.id, this.addModel).then(resp => {
|
||||
this.$message.success(this.$t('map.signalSectionUpdateSucceeded'));
|
||||
this.loading = false;
|
||||
this.clear();
|
||||
@ -271,56 +326,65 @@ export default {
|
||||
delete this.addModel.id;
|
||||
this.$refs.form.resetFields();
|
||||
this.addModel.mapId = this.mapInfo.id;
|
||||
this.addModel.routeSectionList = [];
|
||||
this.addModel.blockSectionList = [];
|
||||
this.addModel.signalCode = '';
|
||||
this.addModel.sectionPathList = [];
|
||||
this.addModel.code = '';
|
||||
this.isSave = true;
|
||||
this.cardMode = 'generate';
|
||||
}
|
||||
},
|
||||
deleteOverlab(list, index) {
|
||||
list.splice(index, 1);
|
||||
this.$refs.overlabForm.resetFields();
|
||||
this.clearOverlab();
|
||||
this.cardMode = 'generate';
|
||||
},
|
||||
editOverlab(list, index) {
|
||||
this.addOverlapModel = deepAssign({}, list[index]);
|
||||
this.addOverlapModel.parentIndex = index;
|
||||
this.cardMode = 'edit';
|
||||
},
|
||||
generateOverlab() {
|
||||
if (!this.addOverlapModel.sectionList.length) {
|
||||
this.$messageBox('请选择进路延续保护区段!');
|
||||
} else {
|
||||
this.addModel.sectionPathList.push({
|
||||
sectionList:this.addOverlapModel.sectionList,
|
||||
switchPositionList:this.addOverlapModel.switchPositionList
|
||||
});
|
||||
this.$refs.overlabForm.resetFields();
|
||||
this.clearOverlab();
|
||||
}
|
||||
},
|
||||
updateOverlab() {
|
||||
if (this.addOverlapModel.parentIndex || this.addOverlapModel.parentIndex === 0 ) {
|
||||
this.addModel.sectionPathList[this.addOverlapModel.parentIndex] = {
|
||||
sectionList:this.addOverlapModel.sectionList,
|
||||
switchPositionList:this.addOverlapModel.switchPositionList
|
||||
};
|
||||
this.clearOverlab();
|
||||
this.cardMode = 'generate';
|
||||
}
|
||||
},
|
||||
cancelOverlab() {
|
||||
this.clearOverlab();
|
||||
this.cardMode = 'generate';
|
||||
},
|
||||
clearOverlab() {
|
||||
this.addOverlapModel = {
|
||||
parentIndex: '',
|
||||
sectionList:[],
|
||||
switchPositionList:[]
|
||||
};
|
||||
this.overlapCode = '';
|
||||
this.overlapType = '';
|
||||
},
|
||||
batchSectionListFocus(flag) {
|
||||
this.changeSectionSelected(this.addModel.routeSectionList, flag);
|
||||
this.changeSectionSelected(this.addModel.blockSectionList, flag);
|
||||
this.changeSignalSelected(this.addModel.signalCode, flag, 'routeSignal');
|
||||
},
|
||||
changeSignalSelected(val, flag, type) {
|
||||
const signal = this.$store.getters['map/getDeviceByCode'](val);
|
||||
signal && signal.instance.drawBatchSelected(flag, flag ? type : '');
|
||||
},
|
||||
changeSectionSelected(list, cutOut) {
|
||||
let flag = true;
|
||||
let type = '';
|
||||
list && list.forEach((item) => {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](item);
|
||||
if (!cutOut) {
|
||||
this.setSectionSelectedType(section, cutOut, '');
|
||||
return;
|
||||
}
|
||||
if (this.addModel.routeSectionList.indexOf(item) !== -1 && this.addModel.blockSectionList.indexOf(item) !== -1) {
|
||||
type = 'signalNearSection';
|
||||
flag = true;
|
||||
} else if (this.addModel.routeSectionList.indexOf(item) !== -1) {
|
||||
type = 'signalNearSectionCBTC';
|
||||
flag = true;
|
||||
} else if (this.addModel.blockSectionList.indexOf(item) !== -1) {
|
||||
type = 'signalNearSectionReserve';
|
||||
flag = true;
|
||||
} else {
|
||||
type = '';
|
||||
flag = false;
|
||||
}
|
||||
this.setSectionSelectedType(section, flag, type);
|
||||
});
|
||||
},
|
||||
setSectionSelectedType(section, flag, type) {
|
||||
if (section && section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||
section.logicSectionCodeList.forEach( (logicSectionCode) => {
|
||||
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
|
||||
logicSection && logicSection.instance.drawBatchSelected(flag, flag ? type : '');
|
||||
});
|
||||
} else {
|
||||
section && section.instance.drawBatchSelected(flag, flag ? type : '');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -107,7 +107,8 @@ export default {
|
||||
'stationPreResetBeforeAxlePreReset',
|
||||
'generateDestination',
|
||||
'switchTurnOperationCanRecoverSplitFault',
|
||||
'holdCommandIgnoreControlMode'
|
||||
'holdCommandIgnoreControlMode',
|
||||
'delayWhenCancelRouteWithAbnormalInterlock'
|
||||
],
|
||||
selectList: ['runMode'],
|
||||
generalConfig: [
|
||||
@ -145,11 +146,14 @@ export default {
|
||||
'stationPreResetBeforeAxlePreReset',
|
||||
'generateDestination',
|
||||
'switchTurnOperationCanRecoverSplitFault',
|
||||
'holdCommandIgnoreControlMode'
|
||||
'holdCommandIgnoreControlMode',
|
||||
'delayWhenCancelRouteWithAbnormalInterlock',
|
||||
'figuresOfTripNumber',
|
||||
'figuresOfServiceNumber'
|
||||
],
|
||||
rangeList: ['noParkingSM', 'parkingSM'],
|
||||
speedList: ['rmAtpSpeed', 'urmAtpSpeed'],
|
||||
numberList: [],
|
||||
numberList: ['figuresOfTripNumber', 'figuresOfServiceNumber'],
|
||||
optionsMap: {
|
||||
runMode:[{label: 'CBTC级别', value: 'CBTC'}, {label: '点式通信', value: 'ITC'}, {label: '联锁级', value: 'IL'}]
|
||||
},
|
||||
@ -188,7 +192,10 @@ export default {
|
||||
stationPreResetBeforeAxlePreReset: '计轴预复位前需要车站预复位',
|
||||
generateDestination: '是否生成目的地码定义(泰雷兹)',
|
||||
switchTurnOperationCanRecoverSplitFault: '道岔转动操作可以使失表故障恢复',
|
||||
holdCommandIgnoreControlMode: '扣车命令不区分控制模式'
|
||||
holdCommandIgnoreControlMode: '扣车命令不区分控制模式',
|
||||
delayWhenCancelRouteWithAbnormalInterlock: '取消联锁条件不满足的进路时需要延时解锁',
|
||||
figuresOfTripNumber: '车次号的位数',
|
||||
figuresOfServiceNumber: '服务号的位数'
|
||||
}
|
||||
};
|
||||
},
|
||||
|
@ -37,6 +37,10 @@ export default {
|
||||
type: 'text',
|
||||
label: this.$t('system.name')
|
||||
},
|
||||
id: {
|
||||
type: 'text',
|
||||
label: 'id'
|
||||
},
|
||||
roles: {
|
||||
type: 'select',
|
||||
label: this.$t('system.roles'),
|
||||
@ -71,6 +75,11 @@ export default {
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: 'id',
|
||||
prop: 'id',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: this.$t('system.name'),
|
||||
prop: 'name'
|
||||
|
Loading…
Reference in New Issue
Block a user