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,
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:{
operation: OperationEvent.CTCCommand.addTrainFixedPath.menu.operation,
cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_EDIT
cmdType: CMD.CTC.CTC_REGULAR_TRAIN_LINE_SAVE
},
// 批量增加列车固定径路
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) {
const parser = parserFactory(ParserType.Graph.value);
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
console.log('parsed mapDevice', this.mapDevice)
}
},
loadData() {

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 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 class="wrapper">
<div class="list" style="width: 60%;">
@ -92,6 +95,9 @@ export default {
data() {
return {
show: false,
form: {
station: 'shenyang',
},
}
},
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() {
commitOperate(menuOperate.CTC.loadUpdateStationTrainFixedPath, { stationCode: this.stationCode }, 3).then(({valid, response}) => {
if (valid) {
this.$message.success('加载成功!');
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
}
}).catch(()=>{
this.$message.error('加载失败');
});
},
//

View File

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

View File

@ -71,6 +71,7 @@ export default {
},
methods: {
init() {
console.log(123)
document.getElementById(this.canvasId).oncontextmenu = function (e) {
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_LIST:{value: 'STATION_IO_GATE_LIST', 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_STATION_UPDATE:{value: 'REGULAR_TRAIN_LINE_STATION_UPDATE', label: '固定列车径路从生效区更新'},

View File

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

View File

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

View File

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

View File

@ -162,7 +162,7 @@
width="40"
>
<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>
</el-table-column>
<!-- crossZero -->
@ -172,7 +172,7 @@
width="40"
>
<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>
</el-table-column>
<el-table-column
@ -181,7 +181,7 @@
width="40"
>
<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>
</el-table-column>
<!-- columnEnd -->
@ -191,7 +191,7 @@
width="40"
>
<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>
</el-table-column>
<!-- locomotive -->
@ -201,7 +201,7 @@
width="40"
>
<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>
</el-table-column>
<!-- goodsInspection -->
@ -211,7 +211,7 @@
width="40"
>
<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>
</el-table-column>
<!-- multiplyDown -->
@ -221,7 +221,7 @@
width="40"
>
<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>
</el-table-column>
<!-- sailUpstream -->
@ -231,7 +231,7 @@
width="40"
>
<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>
</el-table-column>
<!-- pickUp -->
@ -241,7 +241,7 @@
width="40"
>
<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>
</el-table-column>
<!-- transfer -->
@ -251,7 +251,7 @@
width="40"
>
<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>
</el-table-column>
<!-- handling -->
@ -261,7 +261,7 @@
width="40"
>
<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>
</el-table-column>
<!-- pollution -->
@ -271,7 +271,7 @@
width="40"
>
<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>
</el-table-column>
<!-- crossing-->
@ -281,7 +281,7 @@
width="40"
>
<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>
</el-table-column>
<!-- trainNumber -->
@ -291,7 +291,7 @@
width="40"
>
<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>
</el-table-column>
<!-- affair -->
@ -301,7 +301,7 @@
width="40"
>
<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>
</el-table-column>
<el-table-column
@ -310,7 +310,7 @@
width="40"
>
<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>
</el-table-column>
</el-table>
@ -396,18 +396,27 @@ export default {
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() {
if (this.currentRow) {
this.$refs.trainFxPath.doShow({
stationCode:this.currentStationCode,
filterSectionMap:this.filterSectionMap,
mapStationDirectionMap:this.mapStationDirectionData,
row:this.currentRow
row:JSON.parse(JSON.stringify(this.currentRow))
});
}
},
deleteTrainFxPath() {
if (this.currentRow) {
// debugger;
const that = this;
this.$confirm('确定删除该条列车路径数据?', '警告', {
confirmButtonText: '确定',
@ -420,6 +429,7 @@ export default {
commitOperate(menuOperate.CTC.deleteTrainFixedPath, param, 3).then(({valid})=>{
if (valid) {
that.$message.success('删除成功!');
this.handleData();
}
}).catch(() => {
that.$message.error('删除失败');
@ -523,7 +533,6 @@ export default {
handleData() {
commitOperate(menuOperate.CTC.getTrainFixedPath, { stationCode: this.currentStationCode }, 3).then(({valid, response}) => {
if (valid) {
debugger;
this.tableData = response.data;
}
});

View File

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

View File

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

View File

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

View File

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