From 1d41095b46edee6e558bedf3f2e032e791d47515 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 22 Feb 2021 10:13:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E5=9B=BE=20=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E5=87=BD=E6=95=B0=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= =?UTF-8?q?=20=E5=AE=81=E6=B3=A2=E4=B8=89=E5=8F=B7=E7=BA=BF=20=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E6=9D=83=E8=BD=AC=E7=A7=BB=20=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E6=8E=A7=E5=88=B6=E4=BB=A3=E7=A0=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/ningbo_03.js | 3 +- src/jmapNew/theme/beijing_01/planConvert.js | 5 ++- src/jmapNew/theme/chengdu_01/planConvert.js | 5 ++- src/jmapNew/theme/chengdu_03/planConvert.js | 5 ++- src/jmapNew/theme/foshan_01/planConvert.js | 5 ++- src/jmapNew/theme/fuzhou_01/planConvert.js | 5 ++- src/jmapNew/theme/haerbin_01/planConvert.js | 5 ++- src/jmapNew/theme/nanjing_02/planConvert.js | 5 ++- src/jmapNew/theme/ningbo_01/planConvert.js | 4 ++- .../menus/menuDialog/standDetain.vue | 7 +++- .../menus/menuDialog/stationRequest.vue | 33 ++++++++++--------- src/jmapNew/theme/ningbo_03/planConvert.js | 5 ++- src/jmapNew/theme/race_01/planConvert.js | 5 ++- src/jmapNew/theme/xian_01/planConvert.js | 5 ++- src/jmapNew/theme/xian_02/planConvert.js | 5 ++- 15 files changed, 72 insertions(+), 30 deletions(-) diff --git a/src/jmapNew/config/skinCode/ningbo_03.js b/src/jmapNew/config/skinCode/ningbo_03.js index 57517f7cf..ac57e4a03 100644 --- a/src/jmapNew/config/skinCode/ningbo_03.js +++ b/src/jmapNew/config/skinCode/ningbo_03.js @@ -241,7 +241,8 @@ class SkinCode extends defaultStyle { borderColor:'', // 字体边框颜色 textBorderWidth:0, // 字体边框宽度 isSpecialType:true, // 特雷兹特殊类型 - noneModeColor:'#ff0' // 无模式时字体颜色 + noneModeColor:'#ff0', // 无模式时字体颜色 + currentModeColor:'#0f0' // 当前被控制时字体颜色 }, kmPostShow: false, // 公里标显示 diff --git a/src/jmapNew/theme/beijing_01/planConvert.js b/src/jmapNew/theme/beijing_01/planConvert.js index 8b191f6ab..204947410 100644 --- a/src/jmapNew/theme/beijing_01/planConvert.js +++ b/src/jmapNew/theme/beijing_01/planConvert.js @@ -152,7 +152,10 @@ export default { /** 如果是备用车,按车次添加线*/ if (train.backup) { /** 创建一条完成的服务数据*/ - opt.name += j; + // opt.name += j; + const length = opt.name.length; + const optName = parseInt(opt.name) + j; + opt.name = optName.toString().padStart(length, '0'); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); if (model) { models.push(model); diff --git a/src/jmapNew/theme/chengdu_01/planConvert.js b/src/jmapNew/theme/chengdu_01/planConvert.js index efd829f05..5dc1696f8 100644 --- a/src/jmapNew/theme/chengdu_01/planConvert.js +++ b/src/jmapNew/theme/chengdu_01/planConvert.js @@ -152,7 +152,10 @@ export default { /** 如果是备用车,按车次添加线*/ if (train.backup) { /** 创建一条完成的服务数据*/ - opt.name += j; + // opt.name += j; + const length = opt.name.length; + const optName = parseInt(opt.name) + j; + opt.name = optName.toString().padStart(length, '0'); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); if (model) { models.push(model); diff --git a/src/jmapNew/theme/chengdu_03/planConvert.js b/src/jmapNew/theme/chengdu_03/planConvert.js index 05c33d047..b401381ac 100644 --- a/src/jmapNew/theme/chengdu_03/planConvert.js +++ b/src/jmapNew/theme/chengdu_03/planConvert.js @@ -127,7 +127,10 @@ export default { /** 如果是备用车,按车次添加线*/ if (train.backup) { /** 创建一条完成的服务数据*/ - opt.name += j; + // opt.name += j; + const length = opt.name.length; + const optName = parseInt(opt.name) + j; + opt.name = optName.toString().padStart(length, '0'); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); if (model) { models.push(model); diff --git a/src/jmapNew/theme/foshan_01/planConvert.js b/src/jmapNew/theme/foshan_01/planConvert.js index 41fa7a3ba..c1645c6b1 100644 --- a/src/jmapNew/theme/foshan_01/planConvert.js +++ b/src/jmapNew/theme/foshan_01/planConvert.js @@ -147,7 +147,10 @@ export default { /** 如果是备用车,按车次添加线*/ if (train.backup) { /** 创建一条完成的服务数据*/ - opt.name += j; + // opt.name += j; + const length = opt.name.length; + const optName = parseInt(opt.name) + j; + opt.name = optName.toString().padStart(length, '0'); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); if (model) { models.push(model); diff --git a/src/jmapNew/theme/fuzhou_01/planConvert.js b/src/jmapNew/theme/fuzhou_01/planConvert.js index 8121b8f53..885344ca4 100644 --- a/src/jmapNew/theme/fuzhou_01/planConvert.js +++ b/src/jmapNew/theme/fuzhou_01/planConvert.js @@ -327,7 +327,10 @@ export default { /** 如果是备用车,按车次添加线*/ if (train.backup) { /** 创建一条完成的服务数据*/ - opt.name += j; + // opt.name += j; + const length = opt.name.length; + const optName = parseInt(opt.name) + j; + opt.name = optName.toString().padStart(length, '0'); // var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle)); if (model) { diff --git a/src/jmapNew/theme/haerbin_01/planConvert.js b/src/jmapNew/theme/haerbin_01/planConvert.js index 15244247a..8dc000647 100644 --- a/src/jmapNew/theme/haerbin_01/planConvert.js +++ b/src/jmapNew/theme/haerbin_01/planConvert.js @@ -209,7 +209,10 @@ export default { /** 如果是备用车,按车次添加线*/ if (train.backup) { /** 创建一条完成的服务数据*/ - opt.name += j; + // opt.name += j; + const length = opt.name.length; + const optName = parseInt(opt.name) + j; + opt.name = optName.toString().padStart(length, '0'); // var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle)); if (model) { diff --git a/src/jmapNew/theme/nanjing_02/planConvert.js b/src/jmapNew/theme/nanjing_02/planConvert.js index ab805878b..dc9c54f56 100644 --- a/src/jmapNew/theme/nanjing_02/planConvert.js +++ b/src/jmapNew/theme/nanjing_02/planConvert.js @@ -217,7 +217,10 @@ export default { /** 如果是备用车,按车次添加线*/ if (train.backup) { /** 创建一条完成的服务数据*/ - opt.name += j; + // opt.name += j; + const length = opt.name.length; + const optName = parseInt(opt.name) + j; + opt.name = optName.toString().padStart(length, '0'); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); // var model = createSeriesModel(opt, Object.assign({ color: '#000' }, lineStyle)); if (model) { diff --git a/src/jmapNew/theme/ningbo_01/planConvert.js b/src/jmapNew/theme/ningbo_01/planConvert.js index 89f9f257d..7a2b3ba9c 100644 --- a/src/jmapNew/theme/ningbo_01/planConvert.js +++ b/src/jmapNew/theme/ningbo_01/planConvert.js @@ -174,7 +174,9 @@ export default { /** 如果是备用车,按车次添加线*/ if (train.backup) { /** 创建一条完成的服务数据*/ - opt.name += j; + const length = opt.name.length; + const optName = parseInt(opt.name) + j; + opt.name = optName.toString().padStart(length, '0'); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); if (model) { models.push(model); diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/standDetain.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/standDetain.vue index 4f38c81b1..7a7cc1c7b 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/standDetain.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/standDetain.vue @@ -186,8 +186,13 @@ export default { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); if (isClose) { this.$store.dispatch('menuOperation/setSelected', {device: {}}); + this.doClose(); + } else { + if (this.activeName == 'second') { + // this.judgeStatus(); + this.status = !this.status; + } } - isClose && this.doClose(); } }).catch(() => { isClose && this.doClose(); diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/stationRequest.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/stationRequest.vue index db1a063e5..d9e99cca2 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/stationRequest.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/stationRequest.vue @@ -21,10 +21,10 @@
{{ message }}
- 确定(O) + 确定(O) - 应用(A) + 应用(A) 关闭(C) @@ -50,7 +50,7 @@ export default { }, data() { return { - status: '', + status: true, operate: null, loading: false, dialogShow: false, @@ -107,16 +107,13 @@ export default { 'selected': function(val) { if (val) { const sationEle = this.$store.getters['map/getDeviceByCode'](val.code); - if (this.prdType == '01' && sationEle && sationEle.controlMode == 'Center') { - this.status = 'Center'; - } else if (this.prdType == '02' && sationEle && sationEle.controlMode != 'Center') { - this.status = 'Local'; + if (sationEle) { + if (sationEle.controller != this.$store.state.user.id) { + this.status = false; + } else { + this.status = true; + } } - // if (this.prdType == '02') { - // - // } else { - // this.status = sationEle && sationEle.controlMode == 'Center'; - // } } } }, @@ -165,20 +162,24 @@ export default { }); }, commit(isClose = true) { - debugger; const val = this.selected || {}; const steps = { operation: isClose ? OperationEvent.Command.common.confirm.operation : OperationEvent.Command.common.apply.operation, over: true, param: {stationCodes:[val.code]} }; - + // CMD_STATION_CONTROL_TRANSFER + // CMD_STATION_CONTROL_DEVOLVE + // CMD_STATION_CONTROL_REVOKE // steps.cmdType = this.status ? CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL : CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL; - steps.cmdType = this.status == 'Center' ? CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL : CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL; + steps.cmdType = CMD.Station.CMD_STATION_CONTROL_APPLY; this.$store.dispatch('training/nextNew', steps).then(({ valid }) => { if (valid) { - isClose && this.doClose(); + if (isClose) { + this.$store.dispatch('menuOperation/setSelected', {device: {}}); + this.doClose(); + } this.$emit('commandSuccess', val.code); } }).catch(() => { diff --git a/src/jmapNew/theme/ningbo_03/planConvert.js b/src/jmapNew/theme/ningbo_03/planConvert.js index f6a32c79d..7fc493075 100644 --- a/src/jmapNew/theme/ningbo_03/planConvert.js +++ b/src/jmapNew/theme/ningbo_03/planConvert.js @@ -212,7 +212,10 @@ export default { /** 如果是备用车,按车次添加线*/ if (train.backup) { /** 创建一条完成的服务数据*/ - opt.name += j; + // opt.name += j; + const length = opt.name.length; + const optName = parseInt(opt.name) + j; + opt.name = optName.toString().padStart(length, '0'); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); if (model) { models.push(model); diff --git a/src/jmapNew/theme/race_01/planConvert.js b/src/jmapNew/theme/race_01/planConvert.js index 0571f01d7..859ae8d99 100644 --- a/src/jmapNew/theme/race_01/planConvert.js +++ b/src/jmapNew/theme/race_01/planConvert.js @@ -149,7 +149,10 @@ export default { /** 如果是备用车,按车次添加线*/ if (train.backup) { /** 创建一条完成的服务数据*/ - opt.name += j; + // opt.name += j; + const length = opt.name.length; + const optName = parseInt(opt.name) + j; + opt.name = optName.toString().padStart(length, '0'); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); if (model) { models.push(model); diff --git a/src/jmapNew/theme/xian_01/planConvert.js b/src/jmapNew/theme/xian_01/planConvert.js index 316b24446..c4728cbd9 100644 --- a/src/jmapNew/theme/xian_01/planConvert.js +++ b/src/jmapNew/theme/xian_01/planConvert.js @@ -162,7 +162,10 @@ export default { /** 如果是备用车,按车次添加线*/ if (train.backup) { /** 创建一条完成的服务数据*/ - opt.name += j; + // opt.name += j; + const length = opt.name.length; + const optName = parseInt(opt.name) + j; + opt.name = optName.toString().padStart(length, '0'); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); if (model) { models.push(model); diff --git a/src/jmapNew/theme/xian_02/planConvert.js b/src/jmapNew/theme/xian_02/planConvert.js index 1d9f23f58..945bc8fbd 100644 --- a/src/jmapNew/theme/xian_02/planConvert.js +++ b/src/jmapNew/theme/xian_02/planConvert.js @@ -216,7 +216,10 @@ export default { /** 如果是备用车,按车次添加线*/ if (train.backup) { /** 创建一条完成的服务数据*/ - opt.name += j; + // opt.name += j; + const length = opt.name.length; + const optName = parseInt(opt.name) + j; + opt.name = optName.toString().padStart(length, '0'); var model = createSeriesModel(opt, Object.assign({ color: hexColor.toCreate() }, lineStyle)); if (model) { models.push(model);