From 8729905299ed300999c5e584abc440fef18af20a Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Tue, 3 Mar 2020 12:57:26 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=B4=E6=97=B6=E9=99=90?=
=?UTF-8?q?=E9=80=9F=E7=BB=98=E5=9B=BE=E9=80=BB=E8=BE=91=EF=BC=8C=E8=B0=83?=
=?UTF-8?q?=E6=95=B4=E5=AE=81=E6=B3=A2=E7=BA=BF=E8=BD=A6=E6=AC=A1=E7=AA=97?=
=?UTF-8?q?=E6=B5=81=E7=A8=8B=E6=93=8D=E4=BD=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/jmapNew/config/skinCode/ningbo_01.js | 2 +-
src/jmapNew/shape/Section/ELimitLines.js | 15 +-
src/jmapNew/shape/Section/index.js | 3 +
.../ningbo_01/menus/dialog/trainDefine.vue | 2 +-
.../ningbo_01/menus/dialog/trainMove.vue | 2 +-
.../ningbo_01/menus/dialog/trainSetHead.vue | 14 +-
.../ningbo_01/menus/dialog/trainSetPlan.vue | 16 +-
.../ningbo_01/menus/dialog/trainSetWork.vue | 2 +-
.../menus/dialog/trainSetWorkATP.vue | 175 ++++++++++++
.../theme/ningbo_01/menus/menuTrain.vue | 257 +++++++-----------
10 files changed, 304 insertions(+), 184 deletions(-)
create mode 100644 src/jmapNew/theme/ningbo_01/menus/dialog/trainSetWorkATP.vue
diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js
index abee79120..52bab649e 100644
--- a/src/jmapNew/config/skinCode/ningbo_01.js
+++ b/src/jmapNew/config/skinCode/ningbo_01.js
@@ -118,7 +118,7 @@ class SkinCode extends defaultStyle {
distance: 5, // 限速线距离区段距离
lineColor: '#C0C000', // 限速线颜色 (黄色透明光)
nameBackground: '#C0C000', // 限速名称背景颜色
- nameShow: true, // 名称显示
+ nameShow: false, // 名称显示
nameNumberColor: '#C00808', // 限速值颜色
nameNumberFontSize: 11, // 限速值大小
kilometerColor: '#fff', // 公里标颜色
diff --git a/src/jmapNew/shape/Section/ELimitLines.js b/src/jmapNew/shape/Section/ELimitLines.js
index 6056db14d..1d1d35f39 100644
--- a/src/jmapNew/shape/Section/ELimitLines.js
+++ b/src/jmapNew/shape/Section/ELimitLines.js
@@ -2,10 +2,11 @@ import Group from 'zrender/src/container/Group';
import BezierCurve from 'zrender/src/graphic/shape/BezierCurve';
import Line from 'zrender/src/graphic/shape/Line';
import JTriangle from '../../utils/JTriangle';
+import Vue from 'vue';
// import Path from 'zrender/src/graphic/Path';
// 创建区段限速限集合
-// export const ELimitLines = Path.extend({
+// export default const ELimitLines = Path.extend({
// type: 'ELimitLines',
// shape: {
// points: null
@@ -114,23 +115,21 @@ export default class ELimitLines extends Group {
}
}));
} else {
- // const beg = Object.assign({}, model.points[0]);
- // const end = Object.assign({}, model.points[model.points.length - 1]);
-
const swPadding = model.style.Switch.core.length; // 定位和反位时区段距离岔芯的距离
var switchWidth = model.style.Section.line.width + model.style.Section.line.beyondWidth; // 道岔宽度
const beg = Object.assign({}, model.points[0]);
const end = Object.assign({}, model.points[model.points.length - 1]);
if (model.isSwitchSection && beg.y !== end.y) {
- const swch = model.switch;
- if (swch) {
+ const swch = Vue.prototype.$jlmap.mapDevice[model.switch.code]; // 获取道岔model 及状态数据
+
+ if (swch && swch.instance) {
const traingle = new JTriangle(swch.intersection, swch.skew);
- if ((swch.intersection.x === beg.x) && (swch.intersection.y === beg.y)) {
+ if ((swch.intersection.x === beg.x) && (swch.intersection.y === beg.y) && !swch.normalPosition && swch.sectionCCode == model.code) {
beg.x = beg.x + traingle.drictx * (swPadding + switchWidth) * traingle.getCotRate();
beg.y = beg.y + traingle.dricty * (swPadding + switchWidth);
}
- if ((swch.intersection.x === end.x) && (swch.intersection.y === end.y)) {
+ if ((swch.intersection.x === end.x) && (swch.intersection.y === end.y) && swch.normalPosition && swch.sectionCCode == model.code) {
end.x = end.x + traingle.drictx * (swPadding + switchWidth) * traingle.getCotRate();
end.y = end.y + traingle.dricty * (swPadding + switchWidth);
}
diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js
index d72c36636..8c6142f3c 100644
--- a/src/jmapNew/shape/Section/index.js
+++ b/src/jmapNew/shape/Section/index.js
@@ -192,6 +192,7 @@ export default class Section extends Group {
position: [x, -y],
style: style,
switch: model.switch,
+ code: model.code,
isSwitchSection: model.switchSection,
relSwitchCode: model.relSwitchCode,
isCurve: model.curve, // 是否曲线
@@ -203,6 +204,7 @@ export default class Section extends Group {
position: [-x, y],
style: style,
switch: model.switch,
+ code: model.code,
isSwitchSection: model.switchSection,
relSwitchCode: model.relSwitchCode,
isCurve: model.curve, // 是否曲线
@@ -801,6 +803,7 @@ export default class Section extends Group {
/** 区段切除*/
model.cutOff && this.sectionCutOff();
/** 是否限速*/
+ // model.speedUpLimit = 1;
model.speedUpLimit && this.setSpeedUpperLimit();
/** 道岔区段更新岔心颜色 */
if (model.type === '03' && model.switch) {
diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/trainDefine.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/trainDefine.vue
index 292182cdb..821001381 100644
--- a/src/jmapNew/theme/ningbo_01/menus/dialog/trainDefine.vue
+++ b/src/jmapNew/theme/ningbo_01/menus/dialog/trainDefine.vue
@@ -82,7 +82,7 @@ export default {
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
},
title() {
- return '定义车组号';
+ return '设置车体号';
}
},
mounted() {
diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/trainMove.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/trainMove.vue
index b2118d71c..fca33d07b 100644
--- a/src/jmapNew/theme/ningbo_01/menus/dialog/trainMove.vue
+++ b/src/jmapNew/theme/ningbo_01/menus/dialog/trainMove.vue
@@ -82,7 +82,7 @@ export default {
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
},
title() {
- return '平移车组号';
+ return '移动车组号';
}
},
mounted() {
diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/trainSetHead.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/trainSetHead.vue
index ec102b4d0..35cfbb7b8 100644
--- a/src/jmapNew/theme/ningbo_01/menus/dialog/trainSetHead.vue
+++ b/src/jmapNew/theme/ningbo_01/menus/dialog/trainSetHead.vue
@@ -11,23 +11,23 @@
:close-on-click-modal="false"
>
- 车组号
+ 车组号
+ 服务号
-
+
+
+
+
目的地号
- 车次号
-
-
-
-
+
diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/trainSetPlan.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/trainSetPlan.vue
index 6311939e1..8fe4fc0e3 100644
--- a/src/jmapNew/theme/ningbo_01/menus/dialog/trainSetPlan.vue
+++ b/src/jmapNew/theme/ningbo_01/menus/dialog/trainSetPlan.vue
@@ -11,14 +11,22 @@
:close-on-click-modal="false"
>
- 车组号
- 车次号
+ 车组号
-
+
-
+
+
+ 服务号
+ 序列号
+
+
+
+
+
+
diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/trainSetWork.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/trainSetWork.vue
index 4a22bde2d..baafc7f25 100644
--- a/src/jmapNew/theme/ningbo_01/menus/dialog/trainSetWork.vue
+++ b/src/jmapNew/theme/ningbo_01/menus/dialog/trainSetWork.vue
@@ -11,7 +11,7 @@
:close-on-click-modal="false"
>
- 车组号:
+ 车组号:
diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/trainSetWorkATP.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/trainSetWorkATP.vue
new file mode 100644
index 000000000..756dc9bc2
--- /dev/null
+++ b/src/jmapNew/theme/ningbo_01/menus/dialog/trainSetWorkATP.vue
@@ -0,0 +1,175 @@
+
+
+
+ 车组号:
+
+
+
+
+
+
+
+
+ 标记ATP切除
+
+
+ 标记APT恢复
+
+
+
+
+ 确定
+
+
+ 取 消
+
+
+
+
+
+
+
+
diff --git a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue
index 81d811201..88122348e 100644
--- a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue
+++ b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue
@@ -5,14 +5,14 @@
-
+
-
-
+
+
-
+
@@ -23,14 +23,15 @@ import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/men
import TrainDelete from './dialog/trainDelete';
import TrainDefine from './dialog/trainDefine';
import TrainMove from './dialog/trainMove';
-import TrainEdit from './dialog/trainEdit';
+// import TrainEdit from './dialog/trainEdit';
import TrainSetPlan from './dialog/trainSetPlan';
import TrainAddPlan from './dialog/trainAddPlan';
-import TrainMoveEvently from './dialog/trainMoveEvently';
-import TrainDeletePlan from './dialog/trainDeletePlan';
+// import TrainMoveEvently from './dialog/trainMoveEvently';
+// import TrainDeletePlan from './dialog/trainDeletePlan';
import TrainSetHead from './dialog/trainSetHead';
import TrainSetWork from './dialog/trainSetWork';
-import TrainFlag from './dialog/trainFlag';
+import trainSetWorkATP from './dialog/trainSetWorkATP';
+// import TrainFlag from './dialog/trainFlag';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
@@ -46,14 +47,14 @@ export default {
TrainDelete,
TrainDefine,
TrainMove,
- TrainEdit,
+ // TrainEdit,
TrainSetPlan,
TrainAddPlan,
- TrainMoveEvently,
- TrainDeletePlan,
+ // TrainMoveEvently,
+ // TrainDeletePlan,
TrainSetHead,
TrainSetWork,
- TrainFlag
+ trainSetWorkATP
},
props: {
selected: {
@@ -68,101 +69,19 @@ export default {
menu: [],
menuNormal: {
Local: [
- {
+ {
label: '设置车组号',
handler: this.addTrainId,
- cmdType: ''
- },
- {
- label: '删除车组号',
- handler: this.delTrainId,
- cmdType: ''
- },
- // {
- // label: '修改车组号',
- // handler: this.editTrainId,
- // cmdType: ''
- // },
- {
- label: '移动车组号',
- handler: this.moveTrainId,
- cmdType: ''
- },
- {
- type: 'separator'
- },
- {
- label: '设置计划车',
- handler: this.setPlanTrain,
- cmdType: ''
- },
- // {
- // label: '设置头码车',
- // handler: this.setHeadTrain,
- // cmdType: ''
- // },
- // {
- // label: '设置人工车',
- // handler: this.setWorkTrain,
- // cmdType: ''
- // },
- // {
- // type: 'separator'
- // },
- {
- label: '新建计划车',
- handler: this.addPlanTrain,
- cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
- },
- // {
- // label: '删除计划车',
- // handler: this.deletePlanTrain,
- // cmdType: ''
- // },
- // {
- // label: '平移计划车',
- // handler: this.moveEventlyTrain,
- // cmdType: ''
- // },
- // {
- // type: 'separator'
- // },
- // {
- // label: '标记重点列车',
- // handler: this.trainToFlag,
- // cmdType: ''
- // },
- // {
- // label: '取消标记重点列车',
- // handler: this.trainUnFlag,
- // cmdType: ''
- // },
- // {
- // type: 'separator'
- // },
- // {
- // label: '列车信息',
- // handler: this.undeveloped,
- // cmdType: ''
- // }
- ],
- Center: [
- {
- label: '设置车组号',
- handler: this.addTrainId,
- // handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
label: '删除车组号',
handler: this.delTrainId,
- // handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
label: '移动车组号',
handler: this.moveTrainId,
- // handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
@@ -176,24 +95,20 @@ export default {
{
label: '设置计划车',
handler: this.setPlanTrain,
- // handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
label: '设置头码车',
handler: this.setHeadTrain,
- // handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
label: '设置人工车',
handler: this.setWorkTrain,
- // handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
label: '设乘务组号',
- // handler: this.setHeadTrain,
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
@@ -202,14 +117,85 @@ export default {
},
{
label: '标记ATP切除',
- handler: this.undeveloped,
+ handler: this.setTrainATPdel,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
{
label: '标记ATP恢复',
+ handler: this.setTrainATPRec,
+ cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
+ },
+ {
+ type: 'separator'
+ },
+ {
+ label: '旅行冲突列车',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
},
+ {
+ label: '列车信息',
+ handler: this.undeveloped,
+ cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
+ }
+ ],
+ Center: [
+ {
+ label: '设置车组号',
+ handler: this.addTrainId,
+ cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
+ },
+ {
+ label: '删除车组号',
+ handler: this.delTrainId,
+ cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
+ },
+ {
+ label: '移动车组号',
+ handler: this.moveTrainId,
+ cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
+ },
+ {
+ label: '新建计划车',
+ handler: this.addPlanTrain,
+ cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
+ },
+ {
+ type: 'separator'
+ },
+ {
+ label: '设置计划车',
+ handler: this.setPlanTrain,
+ cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
+ },
+ {
+ label: '设置头码车',
+ handler: this.setHeadTrain,
+ cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
+ },
+ {
+ label: '设置人工车',
+ handler: this.setWorkTrain,
+ cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
+ },
+ {
+ label: '设乘务组号',
+ handler: this.undeveloped,
+ cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
+ },
+ {
+ type: 'separator'
+ },
+ {
+ label: '标记ATP切除',
+ handler: this.setTrainATPdel,
+ cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
+ },
+ {
+ label: '标记ATP恢复',
+ handler: this.setTrainATPRec,
+ cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
+ },
{
type: 'separator'
},
@@ -365,7 +351,7 @@ export default {
}
});
},
- // 添加列车识别号
+ // 设置车体号
addTrainId() {
const operate = {
start: true,
@@ -383,7 +369,7 @@ export default {
}
});
},
- // 删除列车识别号
+ // 删除车组号
delTrainId() {
const operate = {
start: true,
@@ -400,7 +386,7 @@ export default {
}
});
},
- // 移动列车识别号
+ // 移动车组号
moveTrainId() {
const operate = {
start: true,
@@ -417,23 +403,6 @@ export default {
}
});
},
- // 修改列车识别号
- editTrainId() {
- const operate = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.Train.editTrainId.menu.operation,
- param: {
- sectionCode: this.$store.state.map.trainWindowSectionCode
- }
- };
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.trainEdit.doShow(operate, this.selected);
- }
- });
- },
// 设置计划车
setPlanTrain() {
const operate = {
@@ -451,7 +420,7 @@ export default {
}
});
},
- // 添加计划车
+ // 新建计划车(开发专用)
addPlanTrain() {
const step = {
start: true,
@@ -469,40 +438,6 @@ export default {
}
});
},
- // 平移计划车
- moveEventlyTrain() {
- const operate = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.Train.moveEventlyTrainId.menu.operation,
- param: {
- sectionCode: this.$store.state.map.trainWindowSectionCode
- }
- };
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.trainMoveEvently.doShow(operate, this.selected);
- }
- });
- },
- // 删除计划车
- deletePlanTrain() {
- const operate = {
- start: true,
- code: this.selected.code,
- operation: OperationEvent.Train.deletePlanTrainId.menu.operation,
- param: {
- sectionCode: this.$store.state.map.trainWindowSectionCode
- }
- };
- this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
- if (valid) {
- this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.trainDeletePlan.doShow(operate, this.selected);
- }
- });
- },
// 设置头码车
setHeadTrain() {
const operate = {
@@ -537,8 +472,8 @@ export default {
}
});
},
- // 标记重点车
- trainToFlag() {
+ // 标记ATP切除
+ setTrainATPdel() {
const operate = {
start: true,
code: this.selected.code,
@@ -550,12 +485,12 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.trainFlag.doShow(operate, this.selected);
+ this.$refs.trainSetWorkATP.doShow(operate, this.selected);
}
});
},
- // 取消标记重点车
- trainUnFlag() {
+ // 标记ATP恢复
+ setTrainATPRec() {
const operate = {
start: true,
code: this.selected.code,
@@ -567,7 +502,7 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$refs.trainFlag.doShow(operate, this.selected);
+ this.$refs.trainSetWorkATP.doShow(operate, this.selected);
}
});
}