This commit is contained in:
fan 2022-08-29 11:06:31 +08:00
commit 3fe6e2076c
18 changed files with 622 additions and 73 deletions

View File

@ -750,11 +750,15 @@ export const menuOperate = {
operation: OperationEvent.CTCCommand.setEndRunplan.menu.operation, operation: OperationEvent.CTCCommand.setEndRunplan.menu.operation,
cmdType: CMD.CTC.CTC_LOG_SET_END_RUN_PLAN cmdType: CMD.CTC.CTC_LOG_SET_END_RUN_PLAN
}, },
// 修改列车固定径路
modifyTrainFixedPath:{
operation: OperationEvent.CTCCommand.modifyTrainFixedPath.menu.operation,
cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_EDIT
},
// 增加列车固定径路 // 增加列车固定径路
addTrainFixedPath:{ addTrainFixedPath:{
operation: OperationEvent.CTCCommand.addTrainFixedPath.menu.operation, operation: OperationEvent.CTCCommand.addTrainFixedPath.menu.operation,
cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_EDIT cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_SAVE
}, },
// 批量增加列车固定径路 // 批量增加列车固定径路
batchTrainFixedPath:{ batchTrainFixedPath:{

View File

@ -0,0 +1,128 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
title="封锁操作对话框"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="3000"
:append-to-body="true"
:modal="true"
>
<div class="content">
<el-tree
style="height: 50%; overflow-y: scroll;"
:data="treeData"
node-key="id"
show-checkbox
:expand-on-click-node="true"
default-expand-all
>
<span class="custom-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
<span v-if="data.id <= 2">封锁状态</span>
<span v-else>{{ getBlockState(data.id) ? '' : '' }}</span>
</span>
</el-tree>
<div class="info">
<div class="item">14:36:18 操作成功</div>
<div class="item">14:36:18 操作成功</div>
</div>
</div>
<div class="btn-bar">
<el-button>设置封锁</el-button>
<el-button>解除封锁</el-button>
<el-button>保存</el-button>
<el-button @click="doClose">关闭</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
name: 'BlockDevice',
data() {
return {
show: false,
treeData: [
{
label: '沈阳',
id: 1,
children: [
{
id: 3,
label: '股道',
children: [
{
id: 5,
label: '11G',
},
{
id: 6,
label: '12G',
},
{
id: 7,
label: 'XIIIG',
},
{
id: 8,
label: '14G',
},
{
id: 9,
label: '15G',
},
{
id: 10,
label: 'XVIG',
},
{
id: 11,
label: 'XVIIG',
},
],
},
],
},
],
}
},
methods: {
doShow() {
this.show = true
},
doClose() {
this.show = false
},
getBlockState(id) {
return true
},
},
}
</script>
<style lang="scss" scoped>
.content {
height: 400px;
.custom-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 2rem;
}
.info {
background-color: #fff;
margin-top: 6px;
padding: 8px;
height: 50%;
}
}
.btn-bar {
display: flex;
justify-content: space-between;
margin-top: 16px;
}
</style>

View File

@ -113,6 +113,7 @@ export default {
if (this.mapData && this.mapData.skinVO) { if (this.mapData && this.mapData.skinVO) {
const parser = parserFactory(ParserType.Graph.value); const parser = parserFactory(ParserType.Graph.value);
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig()); this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
console.log('parsed mapDevice', this.mapDevice)
} }
}, },
loadData() { loadData() {
@ -154,7 +155,7 @@ export default {
const type = elem._type; const type = elem._type;
// //
type != deviceType.Train && type != deviceType.Train &&
list.push({ code, _type: type, _free: true }); list.push({ code, _type: type, _free: true });
}); });
this.map.update(list, false); this.map.update(list, false);

View File

@ -0,0 +1,114 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
title="电力臂状态操作"
:visible.sync="show"
width="600px"
:before-close="doClose"
:z-index="3000"
:append-to-body="true"
:modal="true"
>
<el-tree :data="treeData" node-key="id" show-checkbox :expand-on-click-node="true" default-expand-all>
<span class="custom-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
<span v-if="data.id <= 2">状态</span>
<span v-else>{{ getPowerState(data.id) ? '有电' : '无电' }}</span>
</span>
</el-tree>
<div class="btn-bar">
<el-button>设置有电</el-button>
<el-button>设置停电</el-button>
<el-button>刷新状态</el-button>
<el-button @click="doClose">关闭</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
name: 'PowerSupplyArmSetting',
data() {
return {
show: false,
treeData: [
{
id: 1,
label: '沈阳',
children: [
{
id: 3,
label: '三线14、15、16道',
},
{
id: 4,
label: '浑下、17、18、19道、机务段、机26、揽、皇',
},
{
id: 5,
label: '浑上、11、12、13道',
},
{
id: 6,
label: '沈北下行',
},
{
id: 7,
label: '沈北上行',
},
{
id: 8,
label: '沈阳站库线',
},
],
},
{
id: 2,
label: '沈阳北',
children: [
{
id: 9,
label: '沈北下行',
},
{
id: 10,
label: '沈北上行',
},
{
id: 11,
label: '沈阳北客技库',
},
],
},
],
}
},
methods: {
doShow() {
this.show = true
},
doClose() {
this.show = false
},
getPowerState(id) {
return true
},
},
}
</script>
<style lang="scss" scoped>
.custom-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 2rem;
}
.btn-bar {
display: flex;
justify-content: space-between;
margin-top: 10px;
}
</style>

View File

@ -31,7 +31,10 @@
</div> </div>
<div class="row"> <div class="row">
车站 车站
<el-select style="width: 60%;"></el-select> <el-select v-model="form.station" style="width: 60%;">
<el-option value="shenyang" label="沈阳"></el-option>
<el-option value="shenyangbei" label="沈阳北"></el-option>
</el-select>
</div> </div>
<div class="wrapper"> <div class="wrapper">
<div class="list" style="width: 60%;"> <div class="list" style="width: 60%;">
@ -92,6 +95,9 @@ export default {
data() { data() {
return { return {
show: false, show: false,
form: {
station: 'shenyang',
},
} }
}, },
methods: { methods: {

View File

@ -0,0 +1,159 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm train-set-plan"
title="区域批量操作"
:visible.sync="show"
width="1400px"
:before-close="doClose"
:z-index="3000"
:append-to-body="true"
:modal="true"
>
<el-row>
<el-col :span="16">
<map-visual :mapData="mapData" :width="870" :height="600" ref="mapVisual" />
</el-col>
<el-col :span="8">
<div class="form-area">
<div class="top">
<el-select v-model="workspaceName"></el-select>
<el-button>重命名</el-button>
<el-checkbox v-model="isEdit">编辑</el-checkbox>
</div>
<div class="mid">
<el-tree :data="treeData" node-key="id" show-checkbox :expand-on-click-node="true" default-expand-all>
<span class="custom-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
<span v-if="data.id <= 2">操作</span>
<span v-if="data.id <= 2">状态</span>
<span v-if="data.id > 2">{{ data.operation }}</span>
<span v-if="data.id > 2">{{ data.state }}</span>
</span>
</el-tree>
</div>
<div class="bottom">
<div class="line">
<el-button>增加分区</el-button>
<el-button>删除分区</el-button>
<el-button>保存分区</el-button>
<el-button>上传分区定义</el-button>
</div>
<div class="line">
<el-button>封锁/单锁</el-button>
<el-button>解封/解锁</el-button>
<el-button>刷新状态</el-button>
<el-button @click="doClose">关闭</el-button>
</div>
</div>
</div>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import MapVisual from './mapVisual.vue'
export default {
name: 'RegionBatchOperation',
components: { MapVisual },
data() {
return {
show: false,
workspaceName: '',
isEdit: false,
treeData: [
{
label: '临时批量工作区',
id: 1,
children: [
{
id: 3,
label: '道岔',
operation: '定',
state: '反位',
},
{
id: 4,
label: '股道/无岔',
},
{
id: 5,
label: '区间',
},
{
id: 6,
label: '信号机',
},
],
},
],
mapData: null,
}
},
created() {
this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map))
// console.log(this.mapData.pictureList)
},
methods: {
doShow(stationCode) {
this.show = true
this.$nextTick(() => {
this.$store.dispatch('map/setPictureDeviceMap', {})
const picData = this.mapData.pictureList.find(pic => pic.stationCode === stationCode && pic.type === 'regionBatchOperation')
this.$store.dispatch('map/setPictureDeviceMap', picData.deviceMap)
const mapDevice = this.$store.state.map.mapDevice
const list = []
for (const deviceCode in mapDevice) {
list.push(deviceCode)
}
// debugger
this.$refs.mapVisual.loadData()
this.$refs.mapVisual.map.updatePicture(list)
this.$refs.mapVisual.map.updateTransform(picData.scaling, picData.origin)
// console.log(this.mapData)
// console.log('picData mapDevice len', picData.deviceMap.length)
// console.log(this.$store.state.map.mapDevice)
// this.$refs.mapVisual.setMap(this.mapData, this.$store.state.map.mapDevice)
})
},
doClose() {
this.show = false
},
},
}
</script>
<style lang="scss" scoped>
.form-area {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 600px;
.top {
display: flex;
width: 100%;
justify-content: space-between;
}
.mid {
flex: 1;
padding: 10px 0;
.el-tree {
height: 100%;
.custom-node {
flex: 1;
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 2rem;
}
}
}
.bottom {
.line {
display: flex;
justify-content: space-between;
}
}
}
</style>

View File

@ -207,10 +207,13 @@ export default {
loadUpdateTrainFixedPath() { loadUpdateTrainFixedPath() {
commitOperate(menuOperate.CTC.loadUpdateStationTrainFixedPath, { stationCode: this.stationCode }, 3).then(({valid, response}) => { commitOperate(menuOperate.CTC.loadUpdateStationTrainFixedPath, { stationCode: this.stationCode }, 3).then(({valid, response}) => {
if (valid) { if (valid) {
this.$message.success('加载成功!');
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}); });
} }
}).catch(()=>{
this.$message.error('加载失败');
}); });
}, },
// //
@ -222,7 +225,7 @@ export default {
if (valid) { if (valid) {
const title = '固定径路信息'; const title = '固定径路信息';
this.trainFixedPathList = response.data.data; this.trainFixedPathList = response.data.data;
this.title = title + ' 版本:' + response.data.version; this.title = title + ' 版本 :' + response.data.version;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}); });

View File

@ -31,6 +31,9 @@
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" /> <notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
<BoardViewSetting ref="boardViewSetting" /> <BoardViewSetting ref="boardViewSetting" />
<RailViewSetting ref="railViewSetting" /> <RailViewSetting ref="railViewSetting" />
<PowerSupplyArmSetting ref="powerSupplyArmSetting" />
<BlockDevice ref="blockDevice" />
<RegionBatchOperation ref="regionBatchOperation" />
</div> </div>
</template> </template>
@ -49,6 +52,9 @@ import { EventBus } from '@/scripts/event-bus'
import SettingsMenu from './components/menu.vue' import SettingsMenu from './components/menu.vue'
import BoardViewSetting from './dialog/boardViewSetting.vue' import BoardViewSetting from './dialog/boardViewSetting.vue'
import RailViewSetting from './dialog/railViewSetting.vue' import RailViewSetting from './dialog/railViewSetting.vue'
import PowerSupplyArmSetting from './dialog/powerSupplyArmSetting.vue'
import BlockDevice from './dialog/blockDevice'
import RegionBatchOperation from './dialog/regionBatchOperation'
export default { export default {
name: 'MenuPanel', name: 'MenuPanel',
@ -57,6 +63,9 @@ export default {
SettingsMenu, SettingsMenu,
BoardViewSetting, BoardViewSetting,
RailViewSetting, RailViewSetting,
PowerSupplyArmSetting,
BlockDevice,
RegionBatchOperation,
}, },
data() { data() {
return { return {
@ -82,22 +91,38 @@ export default {
{ {
label: '调车参数配置', label: '调车参数配置',
id: 'shuntingParam', id: 'shuntingParam',
children: [{ label: '标准站', id: 'std' }, { label: '标准甲站', id: 'std1' }, { label: '标准乙站', id: 'std2' }], children: [
{ label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' },
],
}, },
{ {
label: '调车优先级配置', label: '调车优先级配置',
id: 'shuntingPriority', id: 'shuntingPriority',
children: [{ label: '标准站', id: 'std' }, { label: '标准甲站', id: 'std1' }, { label: '标准乙站', id: 'std2' }], children: [
{ label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' },
],
}, },
{ {
label: '调车规则配置', label: '调车规则配置',
id: 'shuntingRule', id: 'shuntingRule',
children: [{ label: '标准站', id: 'std' }, { label: '标准甲站', id: 'std1' }, { label: '标准乙站', id: 'std2' }], children: [
{ label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' },
],
}, },
{ {
label: '功能按钮设置', label: '功能按钮设置',
id: 'functionButton', id: 'functionButton',
children: [{ label: '标准站', id: 'std' }, { label: '标准甲站', id: 'std1' }, { label: '标准乙站', id: 'std2' }], children: [
{ label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' },
],
}, },
{ label: '站场界面显示设置', id: 'UIDisplay' }, { label: '站场界面显示设置', id: 'UIDisplay' },
{ label: '报警提示设置', id: 'alarm' }, { label: '报警提示设置', id: 'alarm' },
@ -106,12 +131,42 @@ export default {
T3MenuItems: [ T3MenuItems: [
{ label: '设置供电臂状态', id: 'powerSupplyArm', ctc: true }, { label: '设置供电臂状态', id: 'powerSupplyArm', ctc: true },
{ label: '封锁设备操作', id: 'blockedDeviceOperation', ctc: true }, { label: '封锁设备操作', id: 'blockedDeviceOperation', ctc: true },
{ label: '区域批量设备操作', id: 'regionBatchOperation', children: [{}], ctc: true }, {
{ label: '站存车管理', id: 'stationTrainManage', children: [{}], ctc: true }, label: '区域批量设备操作',
{ label: '设备影响分析', id: 'deviceAffectAnalyze', children: [{}], ctc: true }, id: 'regionBatchOperation',
{ label: '操作日志查询', id: 'operationLog', ctc: true }, children: [{}],
{ label: '防溜设置查询', id: 'deviceAffectAnalyze', ctc: true }, ctc: true,
{ label: '设备影响分析', id: 'deviceAffectAnalyze', ctc: true }, children: [
{ label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' },
],
},
{
label: '站存车管理',
id: 'stationTrainManage',
children: [{}],
ctc: true,
children: [
{ label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' },
],
},
{
label: '设备影响分析',
id: 'deviceAffectAnalyze',
children: [{}],
ctc: true,
children: [
{ label: '标准站', id: 'Station58852' },
{ label: '标准甲站', id: 'Station32295' },
{ label: '标准丙站', id: 'Station47980' },
],
},
{ label: '操作日志查询', id: 'operationLog' },
{ label: '防溜设置查询', id: 'deviceAffectAnalyze' },
{ label: '设备影响分析', id: 'deviceAffectAnalyze' },
], ],
} }
}, },
@ -188,6 +243,19 @@ export default {
}, },
handleT3MenuSelect(id) { handleT3MenuSelect(id) {
console.log(id) console.log(id)
this.closeMenus()
const params = id.split('-')
switch (params[0]) {
case 'powerSupplyArm':
this.$refs.powerSupplyArmSetting.doShow()
break
case 'blockedDeviceOperation':
this.$refs.blockDevice.doShow()
break
case 'regionBatchOperation':
if (!params[1]) return
this.$refs.regionBatchOperation.doShow(params[1])
}
}, },
dragEvent() { dragEvent() {
const offset = this.offset const offset = this.offset

View File

@ -71,6 +71,7 @@ export default {
}, },
methods: { methods: {
init() { init() {
console.log(123)
document.getElementById(this.canvasId).oncontextmenu = function (e) { document.getElementById(this.canvasId).oncontextmenu = function (e) {
return false; return false;
}; };

View File

@ -455,7 +455,9 @@ export default {
CTC_STATION_IO_GATE_PUBLISH:{value: 'STATION_IO_GATE_PUBLISH', label: '出入口发布生效区'}, CTC_STATION_IO_GATE_PUBLISH:{value: 'STATION_IO_GATE_PUBLISH', label: '出入口发布生效区'},
CTC_STATION_IO_GATE_LIST:{value: 'STATION_IO_GATE_LIST', label: '获取出入口列表'}, CTC_STATION_IO_GATE_LIST:{value: 'STATION_IO_GATE_LIST', label: '获取出入口列表'},
CTC_STATION_IO_GATE_EDIT:{value: 'STATION_IO_GATE_EDIT', label: '修改出入口'}, CTC_STATION_IO_GATE_EDIT:{value: 'STATION_IO_GATE_EDIT', label: '修改出入口'},
CTC_REGULAR_TRAIN_LINE_EDIT:{value: 'REGULAR_TRAIN_LINE_EDIT', label: '增加列车固定径路'}, CTC_REGULAR_TRAIN_LINE_EDIT:{value: 'REGULAR_TRAIN_LINE_EDIT', label: '修改列车固定径路'},
CTC_REGULAR_TRAIN_LINE_SAVE:{value: 'REGULAR_TRAIN_LINE_SAVE', label: '增加列车固定径路'},
CTC_REGULAR_TRAIN_LINE_BATCH:{value: 'REGULAR_TRAIN_LINE_BATCH', label: '批量增加列车固定径路'}, CTC_REGULAR_TRAIN_LINE_BATCH:{value: 'REGULAR_TRAIN_LINE_BATCH', label: '批量增加列车固定径路'},
CTC_REGULAR_TRAIN_LINE_STATION_UPDATE:{value: 'REGULAR_TRAIN_LINE_STATION_UPDATE', label: '固定列车径路从生效区更新'}, CTC_REGULAR_TRAIN_LINE_STATION_UPDATE:{value: 'REGULAR_TRAIN_LINE_STATION_UPDATE', label: '固定列车径路从生效区更新'},

View File

@ -4042,6 +4042,13 @@ export const OperationEvent = {
operation: '1161', operation: '1161',
domId: '_Tips-CTC-loadUpdateStationTrainFixedPath-Menu{TOP}' domId: '_Tips-CTC-loadUpdateStationTrainFixedPath-Menu{TOP}'
} }
},
// 修改列车固定径路
modifyTrainFixedPath:{
menu: {
operation: '1161',
domId: '_Tips-CTC-loadUpdateStationTrainFixedPath-Menu{TOP}'
}
} }
// CTC_ZONE_SAVE_TRIP_NUMBER // CTC_ZONE_SAVE_TRIP_NUMBER
// CTC_ZONE_SAVE_STATION // CTC_ZONE_SAVE_STATION

View File

@ -144,6 +144,7 @@ export default {
loading: false, loading: false,
title:'', title:'',
// mapStationDirectionList:[], // mapStationDirectionList:[],
isAdd:false,
mapStationDirectionMap:{}, mapStationDirectionMap:{},
enterDirList:[], // enterDirList:[], //
outDirList:[], outDirList:[],
@ -231,7 +232,9 @@ export default {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.CTCCommand.addTrainFixedPath.menu.domId : ''; return this.dialogShow
? (this.isAdd ? OperationEvent.CTCCommand.addTrainFixedPath.menu.domId : OperationEvent.CTCCommand.modifyTrainFixedPath.menu.domId)
: '';
} }
}, },
methods:{ methods:{
@ -239,16 +242,18 @@ export default {
this.mapStationDirectionMap = mapStationDirectionMap; this.mapStationDirectionMap = mapStationDirectionMap;
const mapStationDirectionList = Object.values(mapStationDirectionMap); const mapStationDirectionList = Object.values(mapStationDirectionMap);
this.enterDirList = mapStationDirectionList.filter(stationDirection=>{ this.enterDirList = mapStationDirectionList.filter(stationDirection=>{
return stationDirection.runStatus == 'R'; return stationDirection.runStatus == 'R' && stationDirection.stationCode == stationCode;
}); });
this.outDirList = mapStationDirectionList.filter(stationDirection=>{ this.outDirList = mapStationDirectionList.filter(stationDirection=>{
return stationDirection.runStatus == 'D'; return stationDirection.runStatus == 'D' && stationDirection.stationCode == stationCode;
}); });
if (row) { if (row) {
this.addModel = Object.assign({}, row); this.addModel = Object.assign({}, row);
this.title = '修改列车固定径路'; this.title = '修改列车固定径路';
this.isAdd = false;
} else { } else {
this.title = '增加列车固定径路'; this.title = '增加列车固定径路';
this.isAdd = true;
this.addModel.stationCode = stationCode; this.addModel.stationCode = stationCode;
} }
this.filterSectionList = Object.values(filterSectionMap); this.filterSectionList = Object.values(filterSectionMap);
@ -311,16 +316,29 @@ export default {
if (valid) { if (valid) {
this.loading = true; this.loading = true;
const param = Object.assign({}, this.addModel); const param = Object.assign({}, this.addModel);
if (this.title == '增加列车固定径路') { delete param.code; } if (this.isAdd) {
commitOperate(menuOperate.CTC.addTrainFixedPath, param, 3).then(({valid})=>{ delete param.code;
if (valid) { commitOperate(menuOperate.CTC.addTrainFixedPath, param, 3).then(({valid})=>{
if (valid) {
this.doClose();
this.$emit('refresh');
}
}).catch(() => {
this.doClose(); this.doClose();
this.$emit('refresh'); this.$emit('noticeInfo');
} });
}).catch(() => { } else {
this.doClose(); commitOperate(menuOperate.CTC.modifyTrainFixedPath, param, 3).then(({valid})=>{
this.$emit('noticeInfo'); if (valid) {
}); this.doClose();
this.$emit('refresh');
}
}).catch(() => {
this.doClose();
this.$emit('noticeInfo');
});
}
} }
}); });
}, },

View File

@ -68,6 +68,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
// import { deepAssign } from '@/utils/index';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default { export default {
@ -114,7 +115,7 @@ export default {
}, },
methods:{ methods:{
doShow({row, stationCode}) { doShow({row, stationCode}) {
this.model = Object.assign({}, row); this.model = row;
this.stationCode = stationCode; this.stationCode = stationCode;
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
@ -127,7 +128,7 @@ export default {
}, },
commit() { commit() {
this.loading = true; this.loading = true;
const param = Object.assign({stationCode:this.stationCode}, this.model); const param = Object.assign({stationCode:this.stationCode}, JSON.parse(JSON.stringify(this.model)));
delete param.ioName; delete param.ioName;
delete param.ioDirection; delete param.ioDirection;
commitOperate(menuOperate.CTC.modifyStationDirection, param, 3).then(({valid})=>{ commitOperate(menuOperate.CTC.modifyStationDirection, param, 3).then(({valid})=>{

View File

@ -157,12 +157,12 @@
</el-table-column> </el-table-column>
<!-- trainInspection --> <!-- trainInspection -->
<el-table-column <el-table-column
prop="appendData.LIEJIAN " prop="appendData.LIEJIAN"
label="列检" label="列检"
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.LIEJIAN" /> <el-checkbox v-model="scope.row.appendData.LIEJIAN" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<!-- crossZero --> <!-- crossZero -->
@ -172,7 +172,7 @@
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.JIAO_LING" /> <el-checkbox v-model="scope.row.appendData.JIAO_LING" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -181,7 +181,7 @@
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.JIAOPIAO" /> <el-checkbox v-model="scope.row.appendData.JIAOPIAO" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<!-- columnEnd --> <!-- columnEnd -->
@ -191,7 +191,7 @@
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.LIEWEI" /> <el-checkbox v-model="scope.row.appendData.LIEWEI" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<!-- locomotive --> <!-- locomotive -->
@ -201,7 +201,7 @@
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.JICHE" /> <el-checkbox v-model="scope.row.appendData.JICHE" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<!-- goodsInspection --> <!-- goodsInspection -->
@ -211,7 +211,7 @@
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.HUOJIAN" /> <el-checkbox v-model="scope.row.appendData.HUOJIAN" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<!-- multiplyDown --> <!-- multiplyDown -->
@ -221,7 +221,7 @@
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.CHENGJIANG" /> <el-checkbox v-model="scope.row.appendData.CHENGJIANG" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<!-- sailUpstream --> <!-- sailUpstream -->
@ -231,7 +231,7 @@
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.SHANGSHUI" /> <el-checkbox v-model="scope.row.appendData.SHANGSHUI" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<!-- pickUp --> <!-- pickUp -->
@ -241,7 +241,7 @@
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.ZHAIGUA" /> <el-checkbox v-model="scope.row.appendData.ZHAIGUA" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<!-- transfer --> <!-- transfer -->
@ -251,7 +251,7 @@
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.HUANCHENG" /> <el-checkbox v-model="scope.row.appendData.HUANCHENG" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<!-- handling --> <!-- handling -->
@ -261,7 +261,7 @@
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.ZHUANGXIE" /> <el-checkbox v-model="scope.row.appendData.ZHUANGXIE" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<!-- pollution --> <!-- pollution -->
@ -271,7 +271,7 @@
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.XIWU" /> <el-checkbox v-model="scope.row.appendData.XIWU" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<!-- crossing--> <!-- crossing-->
@ -281,7 +281,7 @@
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.DAOKOU" /> <el-checkbox v-model="scope.row.appendData.DAOKOU" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<!-- trainNumber --> <!-- trainNumber -->
@ -291,7 +291,7 @@
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.CHEHAO" /> <el-checkbox v-model="scope.row.appendData.CHEHAO" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<!-- affair --> <!-- affair -->
@ -301,7 +301,7 @@
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.ZHANWU" /> <el-checkbox v-model="scope.row.appendData.ZHANWU" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -310,7 +310,7 @@
width="40" width="40"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.appendData.ZONGKONG" /> <el-checkbox v-model="scope.row.appendData.ZONGKONG" @change="changeData(scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -396,18 +396,27 @@ export default {
mapStationDirectionMap:this.mapStationDirectionData mapStationDirectionMap:this.mapStationDirectionData
}); });
}, },
changeData(row) {
this.$refs.trainFxPath.doShow({
stationCode:this.currentStationCode,
filterSectionMap:this.filterSectionMap,
mapStationDirectionMap:this.mapStationDirectionData,
row:JSON.parse(JSON.stringify(row))
});
},
modifyTrainFxPath() { modifyTrainFxPath() {
if (this.currentRow) { if (this.currentRow) {
this.$refs.trainFxPath.doShow({ this.$refs.trainFxPath.doShow({
stationCode:this.currentStationCode, stationCode:this.currentStationCode,
filterSectionMap:this.filterSectionMap, filterSectionMap:this.filterSectionMap,
mapStationDirectionMap:this.mapStationDirectionData, mapStationDirectionMap:this.mapStationDirectionData,
row:this.currentRow row:JSON.parse(JSON.stringify(this.currentRow))
}); });
} }
}, },
deleteTrainFxPath() { deleteTrainFxPath() {
if (this.currentRow) { if (this.currentRow) {
// debugger;
const that = this; const that = this;
this.$confirm('确定删除该条列车路径数据?', '警告', { this.$confirm('确定删除该条列车路径数据?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -420,6 +429,7 @@ export default {
commitOperate(menuOperate.CTC.deleteTrainFixedPath, param, 3).then(({valid})=>{ commitOperate(menuOperate.CTC.deleteTrainFixedPath, param, 3).then(({valid})=>{
if (valid) { if (valid) {
that.$message.success('删除成功!'); that.$message.success('删除成功!');
this.handleData();
} }
}).catch(() => { }).catch(() => {
that.$message.error('删除失败'); that.$message.error('删除失败');
@ -523,7 +533,6 @@ export default {
handleData() { handleData() {
commitOperate(menuOperate.CTC.getTrainFixedPath, { stationCode: this.currentStationCode }, 3).then(({valid, response}) => { commitOperate(menuOperate.CTC.getTrainFixedPath, { stationCode: this.currentStationCode }, 3).then(({valid, response}) => {
if (valid) { if (valid) {
debugger;
this.tableData = response.data; this.tableData = response.data;
} }
}); });

View File

@ -14,6 +14,7 @@
<el-option label="站间透明" value="lucency" /> <el-option label="站间透明" value="lucency" />
<el-option label="连锁车站" value="chainStation" /> <el-option label="连锁车站" value="chainStation" />
<el-option label="大屏显示" value="bigScreen" /> <el-option label="大屏显示" value="bigScreen" />
<el-option label="区域批量操作" value="regionBatchOperation" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="ruleForm.type !== 'bigScreen'" label="所属车站:" prop="stationCode"> <el-form-item v-if="ruleForm.type !== 'bigScreen'" label="所属车站:" prop="stationCode">

View File

@ -121,10 +121,10 @@
handleClick: this.deleteRoute, handleClick: this.deleteRoute,
type: 'danger' type: 'danger'
}, },
// { {
// name: '', name: '修改',
// handleClick: this.handleUpdate, handleClick: this.handleUpdate,
// } }
] ]
} }
] ]
@ -175,11 +175,13 @@
}); });
}, },
handleUpdate(index, row) { handleUpdate(index, row) {
saveAssist(row, this.$route.params.mapId).then(res => { this.$emit('updateData',row);
this.$message.success('更新成功'); this.doClose();
}).catch(() => { // saveAssist(row, this.$route.params.mapId).then(res => {
this.$messageBox('操作异常'); // this.$message.success('');
}); // }).catch(() => {
// this.$messageBox('');
// });
}, },
} }
}; };

View File

@ -6,7 +6,8 @@
:map-info="mapInfo" :map-info="mapInfo"
@setCenter="setCenter" @setCenter="setCenter"
/> />
<indicator-associated-info-detail ref="routeDetail" :map-info="mapInfo" @routeSelected="routeSelected" @refresh="refresh" /> <!-- @routeSelected="routeSelected" -->
<indicator-associated-info-detail ref="routeDetail" :map-info="mapInfo" @refresh="refresh" @updateData="updateData"/>
</div> </div>
</template> </template>
<script> <script>
@ -59,12 +60,12 @@
}); });
} }
}, },
routeSelected: function (data) { // routeSelected: function (data) {
this.routeData = data; // this.routeData = data;
if (this.$refs && this.$refs.routeEdit) { // if (this.$refs && this.$refs.routeEdit) {
this.$refs.routeEdit.isModify = data.id; // this.$refs.routeEdit.isModify = data.id;
} // }
}, // },
previewRouteEvent: function () { previewRouteEvent: function () {
if (this.$refs && this.$refs.routeDetail) { if (this.$refs && this.$refs.routeDetail) {
this.$refs.routeDetail.doShow(); this.$refs.routeDetail.doShow();
@ -89,6 +90,9 @@
}, },
refresh() { refresh() {
this.$refs.routeEdit.initPage(); this.$refs.routeEdit.initPage();
},
updateData(row){
this.$refs.routeEdit.initPage(row);
} }
} }
}; };

View File

@ -158,7 +158,8 @@ export default {
directionLabelList: ConstConfig.ConstSelect.directionLabelList, directionLabelList: ConstConfig.ConstSelect.directionLabelList,
ioDirectionList: ConstConfig.ConstSelect.ioDirectionList, ioDirectionList: ConstConfig.ConstSelect.ioDirectionList,
addModel:{ addModel:{
id: '', id:'',
code: '',
name:'', name:'',
stationCode: '', stationCode: '',
labelEnum:'', labelEnum:'',
@ -222,11 +223,17 @@ export default {
this.initPage(); this.initPage();
}, },
methods:{ methods:{
initPage() { initPage(row) {
if (this.mapInfo) { if (this.mapInfo) {
queryAssistListPaged({pageNum: 1, pageSize: 999}, this.mapInfo.id).then(resp => { if (row) {
this.relativeList = resp.data.list; this.isModify = true;
}); this.addModel = Object.assign({}, row);
} else {
this.isModify = false;
}
// queryAssistListPaged({pageNum: 1, pageSize: 999}, this.mapInfo.id).then(resp => {
// this.relativeList = resp.data.list;
// });
} }
}, },
hover(field) { hover(field) {
@ -251,15 +258,25 @@ export default {
} }
} }
}, },
update() {
this.save();
},
save() { save() {
const that = this; const that = this;
that.$refs.form.validate((valid) => { that.$refs.form.validate((valid) => {
if (valid) { if (valid) {
const newModel = deepAssign({}, that.addModel); const newModel = deepAssign({}, that.addModel);
if (!that.isModify) {
delete newModel.id;
}
// newModel.code = setUID('Route'); // newModel.code = setUID('Route');
that.loading = true; that.loading = true;
saveAssist(newModel, that.mapInfo.id).then(res=>{ saveAssist(newModel, that.mapInfo.id).then(res=>{
that.$message.success(that.$t('tip.creatingSuccessful')); if (that.isModify) {
that.$message.success('更新成功');
} else {
that.$message.success(that.$t('tip.creatingSuccessful'));
}
that.loading = false; that.loading = false;
this.initPage(); this.initPage();
that.clear(); that.clear();
@ -273,8 +290,10 @@ export default {
clear() { clear() {
if (this.$refs && this.$refs.form && this.mapInfo) { if (this.$refs && this.$refs.form && this.mapInfo) {
this.$refs.form.resetFields(); this.$refs.form.resetFields();
this.isModify = false;
this.addModel = { this.addModel = {
id: '', id:'',
code: '',
name:'', name:'',
stationCode: '', stationCode: '',
labelEnum:'', labelEnum:'',
@ -283,7 +302,9 @@ export default {
signalCode: '', signalCode: '',
runModel: '', runModel: '',
runStatus: '', runStatus: '',
relativeCode: '' relativeStationCode: '',
relativeLabelEnum: ''
}; };
} }
} }