Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
# Conflicts: # src/utils/baseUrl.js
This commit is contained in:
commit
c5dbd2b141
@ -193,6 +193,14 @@ export function saveScriptData(group) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 保存录制任务数据(新版)*/
|
||||||
|
export function saveScriptDataNew(group) {
|
||||||
|
return request({
|
||||||
|
url: `/api/scriptSimulation/${group}/saveData`,
|
||||||
|
method: 'put'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 更新任务地图定位信息*/
|
/** 更新任务地图定位信息*/
|
||||||
export function updateMapLocation(group, data) {
|
export function updateMapLocation(group, data) {
|
||||||
return request({
|
return request({
|
||||||
@ -310,6 +318,15 @@ export function addScriptAction(group, data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 添加剧本动作(新版) */
|
||||||
|
export function addScriptActionNew(group, data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/scriptSimulation/${group}/addAction`,
|
||||||
|
method: 'PUT',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 删除剧本动作 */
|
/** 删除剧本动作 */
|
||||||
export function deleteScriptAction(group, actionId) {
|
export function deleteScriptAction(group, actionId) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -270,15 +270,11 @@ class SkinCode extends defaultStyle {
|
|||||||
},
|
},
|
||||||
standEmergent: { // 紧急关闭
|
standEmergent: { // 紧急关闭
|
||||||
mergentR: 4, // 站台紧急关闭半径
|
mergentR: 4, // 站台紧急关闭半径
|
||||||
offset: { x: 0, y: 0 }, // 站台紧急关闭偏移量
|
insideOffset: { x: 0, y: -40 }, // 内站台紧急关闭偏移量
|
||||||
|
outsideOffset: { x: 0, y: 20 }, // 外站台紧急关闭偏移量
|
||||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||||
},
|
},
|
||||||
reentry: { // 站台折返策略
|
reentry: {}, // 站台折返策略
|
||||||
position: 0, // 折返方向
|
|
||||||
offset: { x: -16, y: 18 }, // 折返偏移量
|
|
||||||
noHumanColor: '#0F16DA', // 站台无人折返
|
|
||||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
|
||||||
},
|
|
||||||
detainCar: { // 扣车
|
detainCar: { // 扣车
|
||||||
text: 'H', // 扣车显示内容
|
text: 'H', // 扣车显示内容
|
||||||
offset: { x: -8, y: 13 }, // 扣车偏移量
|
offset: { x: -8, y: 13 }, // 扣车偏移量
|
||||||
|
@ -219,15 +219,11 @@ class SkinCode extends defaultStyle {
|
|||||||
},
|
},
|
||||||
standEmergent: { // 紧急关闭
|
standEmergent: { // 紧急关闭
|
||||||
mergentR: 4, // 站台紧急关闭半径
|
mergentR: 4, // 站台紧急关闭半径
|
||||||
offset: {x: 0, y: 40}, // 站台紧急关闭偏移量
|
insideOffset: { x: 0, y: 25 }, // 内站台紧急关闭偏移量
|
||||||
|
outsideOffset: { x: 0, y: -25}, // 外站台紧急关闭偏移量
|
||||||
closeColor: 'red' // 站台紧急关闭颜色
|
closeColor: 'red' // 站台紧急关闭颜色
|
||||||
},
|
},
|
||||||
reentry: { // 站台折返策略
|
reentry: {}, // 站台折返策略
|
||||||
position: 0, // 折返方向
|
|
||||||
offset: {x: -16, y: 20}, // 折返偏移量
|
|
||||||
noHumanColor: '#0F16DA', // 站台无人折返
|
|
||||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
|
||||||
},
|
|
||||||
detainCar: { // 扣车
|
detainCar: { // 扣车
|
||||||
text: 'H', // 扣车显示内容
|
text: 'H', // 扣车显示内容
|
||||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||||
|
@ -225,15 +225,11 @@ class SkinCode extends defaultStyle {
|
|||||||
standEmergent: { // 紧急关闭
|
standEmergent: { // 紧急关闭
|
||||||
flicker: true, // 闪烁
|
flicker: true, // 闪烁
|
||||||
mergentR: 5, // 站台紧急关闭半径
|
mergentR: 5, // 站台紧急关闭半径
|
||||||
offset: {x: 0, y: 15}, // 站台紧急关闭偏移量
|
insideOffset: { x: 0, y: 30 }, // 内站台紧急关闭偏移量
|
||||||
|
outsideOffset: { x: 0, y: -30}, // 外站台紧急关闭偏移量
|
||||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||||
},
|
},
|
||||||
reentry: { // 站台折返策略
|
reentry: {}, // 站台折返策略
|
||||||
position: 0, // 折返方向
|
|
||||||
offset: {x: -16, y: 20}, // 折返偏移量
|
|
||||||
noHumanColor: '#0F16DA', // 站台无人折返
|
|
||||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
|
||||||
},
|
|
||||||
detainCar: { // 扣车
|
detainCar: { // 扣车
|
||||||
text: '扣', // 扣车显示内容
|
text: '扣', // 扣车显示内容
|
||||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||||
|
@ -214,16 +214,11 @@ class SkinCode extends defaultStyle {
|
|||||||
},
|
},
|
||||||
standEmergent: { // 紧急关闭
|
standEmergent: { // 紧急关闭
|
||||||
mergentR: 4, // 站台紧急关闭半径
|
mergentR: 4, // 站台紧急关闭半径
|
||||||
position: -1,
|
insideOffset: { x: 0, y: 25}, // 内站台紧急关闭偏移量
|
||||||
offset: {x: -6, y: -15}, // 站台紧急关闭偏移量
|
outsideOffset: { x: 0, y: 15}, // 外站台紧急关闭偏移量
|
||||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
closeColor: '#F61107' // 站台紧急关闭颜色
|
||||||
},
|
},
|
||||||
reentry: { // 站台折返策略
|
reentry: {}, // 站台折返策略
|
||||||
position: 0, // 折返方向
|
|
||||||
offset: {x: -16, y: 20}, // 折返偏移量
|
|
||||||
noHumanColor: '#0F16DA', // 站台无人折返
|
|
||||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
|
||||||
},
|
|
||||||
detainCar: { // 扣车
|
detainCar: { // 扣车
|
||||||
text: 'H', // 扣车显示内容
|
text: 'H', // 扣车显示内容
|
||||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||||
@ -234,7 +229,7 @@ class SkinCode extends defaultStyle {
|
|||||||
fontWeight: 'normal'
|
fontWeight: 'normal'
|
||||||
},
|
},
|
||||||
stopTime: { // 停站时间
|
stopTime: { // 停站时间
|
||||||
offset: {x: -8, y: -4}, // 运行时间偏移量
|
offset: {x: 37, y: 5}, // 停站时间偏移量
|
||||||
textColor: '#C0C0C0', // 停站时间字体颜色
|
textColor: '#C0C0C0', // 停站时间字体颜色
|
||||||
textFontSize: 11
|
textFontSize: 11
|
||||||
},
|
},
|
||||||
|
@ -219,15 +219,13 @@ class SkinCode extends defaultStyle {
|
|||||||
},
|
},
|
||||||
standEmergent: { // 紧急关闭
|
standEmergent: { // 紧急关闭
|
||||||
mergentR: 4, // 站台紧急关闭半径
|
mergentR: 4, // 站台紧急关闭半径
|
||||||
offset: { x: 0, y: 40 }, // 站台紧急关闭偏移量
|
insideOffset: { x: -10, y: -20 }, // 内站台紧急关闭偏移量
|
||||||
closeColor: '#F61107' // 站台紧急关闭颜色
|
outsideOffset: { x: -10, y: -10}, // 外站台紧急关闭偏移量
|
||||||
},
|
closeColor: '#F61107', // 站台紧急关闭颜色
|
||||||
reentry: { // 站台折返策略
|
width: 4,
|
||||||
position: 0, // 折返方向
|
radiusR: 6
|
||||||
offset: { x: -16, y: 20 }, // 折返偏移量
|
|
||||||
noHumanColor: '#0F16DA', // 站台无人折返
|
|
||||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
|
||||||
},
|
},
|
||||||
|
reentry: {}, // 站台折返策略
|
||||||
detainCar: { // 扣车
|
detainCar: { // 扣车
|
||||||
text: 'H', // 扣车显示内容
|
text: 'H', // 扣车显示内容
|
||||||
fontSize: 18, // 扣车字体大小
|
fontSize: 18, // 扣车字体大小
|
||||||
@ -244,8 +242,7 @@ class SkinCode extends defaultStyle {
|
|||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
fontSize: 18
|
fontSize: 18
|
||||||
},
|
},
|
||||||
stopTime: { // 停站时间
|
stopTime: {}, // 停站时间
|
||||||
},
|
|
||||||
level: { // 运行等级
|
level: { // 运行等级
|
||||||
position: 1, // 运行等级方向
|
position: 1, // 运行等级方向
|
||||||
offset: { x: -8, y: 6 }, // 运行等级偏移量
|
offset: { x: -8, y: 6 }, // 运行等级偏移量
|
||||||
|
@ -323,15 +323,11 @@ class SkinCode extends defaultStyle {
|
|||||||
},
|
},
|
||||||
standEmergent: { // 紧急关闭
|
standEmergent: { // 紧急关闭
|
||||||
mergentR: 4, // 站台紧急关闭半径
|
mergentR: 4, // 站台紧急关闭半径
|
||||||
offset: { x: 0, y: 3 }, // 站台紧急关闭偏移量
|
insideOffset: { x: 0, y: 25 }, // 内站台紧急关闭偏移量
|
||||||
|
outsideOffset: { x: 0, y: -25 }, // 外站台紧急关闭偏移量
|
||||||
closeColor: 'red' // 站台紧急关闭颜色
|
closeColor: 'red' // 站台紧急关闭颜色
|
||||||
},
|
},
|
||||||
reentry: { // 站台折返策略
|
reentry: {}, // 站台折返策略
|
||||||
position: 0, // 折返方向
|
|
||||||
offset: { x: -16, y: 20 }, // 折返偏移量
|
|
||||||
noHumanColor: '#0F16DA', // 站台无人折返
|
|
||||||
autoChangeEndsColor: '#0BF400' // 站台自动换端
|
|
||||||
},
|
|
||||||
detainCar: { // 扣车
|
detainCar: { // 扣车
|
||||||
text: 'H', // 扣车显示内容
|
text: 'H', // 扣车显示内容
|
||||||
offset: { x: -8, y: 0 }, // 扣车偏移量
|
offset: { x: -8, y: 0 }, // 扣车偏移量
|
||||||
|
@ -10,7 +10,7 @@ class EDetain extends Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
if (this.isNew) {
|
if (!this.isNew) {
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
const style = this.model.style;
|
const style = this.model.style;
|
||||||
this.isNew = true;
|
this.isNew = true;
|
||||||
@ -38,11 +38,11 @@ class EDetain extends Group {
|
|||||||
this.detain.setStyle('textFill', color);
|
this.detain.setStyle('textFill', color);
|
||||||
}
|
}
|
||||||
|
|
||||||
hide() {
|
hideMode() {
|
||||||
this.detain && this.detain.hide();
|
this.detain && this.detain.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
show() {
|
showMode() {
|
||||||
this.create();
|
this.create();
|
||||||
this.detain && this.detain.show();
|
this.detain && this.detain.show();
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ class EJump extends Group {
|
|||||||
this.isNew = false;
|
this.isNew = false;
|
||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
if (this.isNew) {
|
if (!this.isNew) {
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
const style = this.model.style;
|
const style = this.model.style;
|
||||||
this.isNew = true;
|
this.isNew = true;
|
||||||
@ -54,12 +54,12 @@ class EJump extends Group {
|
|||||||
this.jump.setStyle('textFill', color);
|
this.jump.setStyle('textFill', color);
|
||||||
}
|
}
|
||||||
|
|
||||||
hide() {
|
hideMode() {
|
||||||
this.jump && this.jump.hide();
|
this.jump && this.jump.hide();
|
||||||
this.jumpArc && this.jumpArc.hide();
|
this.jumpArc && this.jumpArc.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
show(isAllJump) {
|
showMode(isAllJump) {
|
||||||
this.create();
|
this.create();
|
||||||
if (isAllJump) { // 站台跳停
|
if (isAllJump) { // 站台跳停
|
||||||
this.jump.show();
|
this.jump.show();
|
||||||
|
@ -44,11 +44,11 @@ class ELevel extends Group {
|
|||||||
this.level.setStyle('textFill', color);
|
this.level.setStyle('textFill', color);
|
||||||
}
|
}
|
||||||
|
|
||||||
hide() {
|
hideMode() {
|
||||||
this.level && this.level.hide();
|
this.level && this.level.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
show() {
|
showMode() {
|
||||||
this.create();
|
this.create();
|
||||||
this.level.show();
|
this.level.show();
|
||||||
}
|
}
|
||||||
|
@ -34,11 +34,11 @@ class EReentry extends Group {
|
|||||||
this.reentry.setStyle('textFill', color);
|
this.reentry.setStyle('textFill', color);
|
||||||
}
|
}
|
||||||
|
|
||||||
hide() {
|
hideMode() {
|
||||||
this.reentry && this.reentry.hide();
|
this.reentry && this.reentry.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
show() {
|
showMode() {
|
||||||
this.create();
|
this.create();
|
||||||
this.reentry.show();
|
this.reentry.show();
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group';
|
||||||
import Isogon from 'zrender/src/graphic/shape/Isogon';
|
import Isogon from 'zrender/src/graphic/shape/Isogon';
|
||||||
import Polyline from 'zrender/src/graphic/shape/Polyline';
|
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||||
|
import {arrow} from '../utils/ShapePoints';
|
||||||
|
|
||||||
class ESafeEmergent extends Group {
|
class ESafeEmergent extends Group {
|
||||||
constructor(model) {
|
constructor(model) {
|
||||||
super();
|
super();
|
||||||
this.model = model;
|
this.model = model;
|
||||||
this.isNew = false;
|
this.isNew = false;
|
||||||
if (this.model.style.StationStand.common.special) {
|
|
||||||
this.create();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
create() {
|
create() {
|
||||||
@ -18,48 +16,19 @@ class ESafeEmergent extends Group {
|
|||||||
const style = this.model.style;
|
const style = this.model.style;
|
||||||
|
|
||||||
this.isNew = true;
|
this.isNew = true;
|
||||||
if (style.StationStand.common.special) {
|
if (style.StationStand.standEmergent.radiusR) {
|
||||||
const gagT = 19;
|
const rotation = model.right == 1 ? Math.PI / 2 : Math.PI * 3 / 2;
|
||||||
const gagB = 26;
|
this.emergent = new Polygon({
|
||||||
let cy = model.inside ? model.y + 22 : model.y - 22;
|
|
||||||
let cx = model.inside ? model.x + model.width / 8 : model.x - model.width / 8;
|
|
||||||
if (model.right) {
|
|
||||||
if (model.inside) {
|
|
||||||
cy = model.y - gagB;
|
|
||||||
cx = model.x - model.width / 8;
|
|
||||||
} else {
|
|
||||||
cy = model.y + gagT;
|
|
||||||
cx = model.x + model.width / 8;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (model.inside) {
|
|
||||||
cy = model.y + gagT;
|
|
||||||
cx = model.x + model.width / 8;
|
|
||||||
} else {
|
|
||||||
cy = model.y - gagB;
|
|
||||||
cx = model.x - model.width / 8;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.emergent = new Polyline({
|
|
||||||
zlevel: model.zlevel,
|
zlevel: model.zlevel,
|
||||||
z: model.z,
|
z: model.z,
|
||||||
|
origin: [model.x, model.y],
|
||||||
|
rotation: rotation,
|
||||||
shape: {
|
shape: {
|
||||||
points: [
|
points: arrow(model.x, model.y, style.StationStand.standEmergent.width, style.StationStand.standEmergent.radiusR * 0.8)
|
||||||
[cx, cy - 2],
|
|
||||||
[cx + 5, cy],
|
|
||||||
[cx + 5, cy + 2],
|
|
||||||
[cx + 2, cy + 2],
|
|
||||||
[cx + 2, cy + 6],
|
|
||||||
[cx - 2, cy + 6],
|
|
||||||
[cx - 2, cy + 2],
|
|
||||||
[cx - 5, cy + 2],
|
|
||||||
[cx - 5, cy],
|
|
||||||
[cx, cy - 2]
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
stroke: 'red',
|
stroke: style.StationStand.standEmergent.closeColor,
|
||||||
fill: 'red'
|
fill: style.StationStand.standEmergent.closeColor
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.add(this.emergent);
|
this.add(this.emergent);
|
||||||
@ -84,12 +53,11 @@ class ESafeEmergent extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hide() {
|
hideMode() {
|
||||||
this.create();
|
this.emergent && this.emergent.hide();
|
||||||
this.emergent.hide();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
show() {
|
showMode() {
|
||||||
this.create();
|
this.create();
|
||||||
this.emergent.show();
|
this.emergent.show();
|
||||||
}
|
}
|
||||||
|
@ -20,13 +20,13 @@ class ETime extends Group {
|
|||||||
style: {
|
style: {
|
||||||
x: model.x,
|
x: model.x,
|
||||||
y: model.y,
|
y: model.y,
|
||||||
fontWeight: 'normal',
|
fontWeight: style.textStyle.fontWeight,
|
||||||
fontSize: style.StationStand.common.textFontSize,
|
fontSize: style.StationStand.common.textFontSize,
|
||||||
fontFamily: style.fontFamily,
|
fontFamily: style.fontFamily,
|
||||||
text: model.name,
|
text: model.name,
|
||||||
textFill: style.StationStand.stopTime.textColor,
|
textFill: style.StationStand.stopTime.textColor,
|
||||||
textAlign: 'center',
|
textAlign: style.textStyle.textAlign,
|
||||||
textVerticalAlign: 'middle'
|
textVerticalAlign: style.textStyle.textVerticalAlign
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -44,12 +44,12 @@ class ETime extends Group {
|
|||||||
this.time.setStyle('textFill', color);
|
this.time.setStyle('textFill', color);
|
||||||
}
|
}
|
||||||
|
|
||||||
hide() {
|
hideMode() {
|
||||||
this.create();
|
this.create();
|
||||||
this.time.hide();
|
this.time.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
show() {
|
showMode() {
|
||||||
this.create();
|
this.create();
|
||||||
this.time.show();
|
this.time.show();
|
||||||
}
|
}
|
||||||
|
@ -60,17 +60,10 @@ class StationStand extends Group {
|
|||||||
this.add(this.safeStand);
|
this.add(this.safeStand);
|
||||||
|
|
||||||
/** 站台紧急关闭*/
|
/** 站台紧急关闭*/
|
||||||
const emergentH = model.inside ? model.right ? 1 : -1 : model.right ? -1 : 1;
|
const emergentOffset = model.inside ? style.StationStand.standEmergent.insideOffset : style.StationStand.standEmergent.outsideOffset;
|
||||||
let emergentWidth = 0;
|
const emergentH = model.right ? 1 : -1;
|
||||||
if (style.StationStand.stopTime.position) {
|
const emergentX = model.position.x + emergentH * emergentOffset.x;
|
||||||
emergentWidth = model.width / 2;
|
const emergentY = model.position.y + emergentH * emergentOffset.y;
|
||||||
}
|
|
||||||
let emergentX = model.position.x + (style.StationStand.stopTime.position || emergentH) * style.StationStand.standEmergent.offset.x - emergentWidth;
|
|
||||||
let emergentY = model.position.y + emergentH * (model.height / 2 + style.StationStand.standEmergent.offset.y);
|
|
||||||
if (style.StationStand.common.special) {
|
|
||||||
emergentX = model.position.x;
|
|
||||||
emergentY = model.position.y;
|
|
||||||
}
|
|
||||||
this.emergent = new ESafeEmergent({
|
this.emergent = new ESafeEmergent({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
z: this.z + 1,
|
z: this.z + 1,
|
||||||
@ -118,6 +111,7 @@ class StationStand extends Group {
|
|||||||
this.add(this.trainDepart);
|
this.add(this.trainDepart);
|
||||||
|
|
||||||
/** 站台折返策略*/
|
/** 站台折返策略*/
|
||||||
|
if (style.StationStand.reentry.offset) {
|
||||||
const reentryH = style.StationStand.standEmergent.mergentR;
|
const reentryH = style.StationStand.standEmergent.mergentR;
|
||||||
const reentryX = model.position.x - (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.x - model.width / 2);
|
const reentryX = model.position.x - (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.x - model.width / 2);
|
||||||
const reentryY = model.position.y + (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.y) + drict * reentryH;
|
const reentryY = model.position.y + (style.StationStand.reentry.position || drict) * (style.StationStand.reentry.offset.y) + drict * reentryH;
|
||||||
@ -132,6 +126,7 @@ class StationStand extends Group {
|
|||||||
fill: style.StationStand.reentry.noHumanColor
|
fill: style.StationStand.reentry.noHumanColor
|
||||||
});
|
});
|
||||||
this.add(this.reentry);
|
this.add(this.reentry);
|
||||||
|
}
|
||||||
|
|
||||||
/** 站台扣车*/
|
/** 站台扣车*/
|
||||||
const detainD = model.right ? 1 : -1;
|
const detainD = model.right ? 1 : -1;
|
||||||
@ -152,7 +147,7 @@ class StationStand extends Group {
|
|||||||
/** 停站时间*/
|
/** 停站时间*/
|
||||||
if (style.StationStand.stopTime.offset) {
|
if (style.StationStand.stopTime.offset) {
|
||||||
const timeDrict = model.right ? 1 : -1;
|
const timeDrict = model.right ? 1 : -1;
|
||||||
const timeX = model.position.x - timeDrict * (style.StationStand.stopTime.offset.x - model.width / 2);
|
const timeX = model.position.x + timeDrict * style.StationStand.stopTime.offset.x;
|
||||||
const timeY = model.position.y + timeDrict * style.StationStand.stopTime.offset.y;
|
const timeY = model.position.y + timeDrict * style.StationStand.stopTime.offset.y;
|
||||||
this.time = new ETime({
|
this.time = new ETime({
|
||||||
zlevel: this.zlevel,
|
zlevel: this.zlevel,
|
||||||
@ -344,14 +339,14 @@ class StationStand extends Group {
|
|||||||
|
|
||||||
/** 恢复初始状态*/
|
/** 恢复初始状态*/
|
||||||
recover() {
|
recover() {
|
||||||
this.time && this.time.hide();
|
this.time && this.time.hideMode();
|
||||||
this.level && this.level.hide();
|
this.level && this.level.hideMode();
|
||||||
this.detain && this.detain.hide();
|
this.detain && this.detain.hideMode();
|
||||||
this.emergent && this.emergent.hide();
|
this.emergent && this.emergent.hideMode();
|
||||||
this.trainStop && this.trainStop.hide(); // 列车停站
|
this.trainStop && this.trainStop.hide(); // 列车停站
|
||||||
this.trainDepart && this.trainDepart.hide();
|
this.trainDepart && this.trainDepart.hide();
|
||||||
this.reentry && this.reentry.hide();
|
this.reentry && this.reentry.hideMode();
|
||||||
this.jump && this.jump.hide();
|
this.jump && this.jump.hideMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 空闲*/
|
/** 空闲*/
|
||||||
@ -376,11 +371,7 @@ class StationStand extends Group {
|
|||||||
if (!this.style.StationStand.common.special) {
|
if (!this.style.StationStand.common.special) {
|
||||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.spareColor);
|
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.spareColor);
|
||||||
}
|
}
|
||||||
if (this.style.StationStand.common.special) {
|
this.emergent && this.emergent.showMode();
|
||||||
this.detain && this.detain.show('E');
|
|
||||||
this.detain && this.detain.setColor('#fff');
|
|
||||||
}
|
|
||||||
this.emergent && this.emergent.show();
|
|
||||||
if (this.style.StationStand.standEmergent.flicker) {
|
if (this.style.StationStand.standEmergent.flicker) {
|
||||||
this.emergent.getElement().animateStyle(true)
|
this.emergent.getElement().animateStyle(true)
|
||||||
.when(0, { fill: this.style.backgroundColor })
|
.when(0, { fill: this.style.backgroundColor })
|
||||||
@ -393,70 +384,58 @@ class StationStand extends Group {
|
|||||||
/** 指定列车跳站*/
|
/** 指定列车跳站*/
|
||||||
designatedJumpStop() {
|
designatedJumpStop() {
|
||||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.designatedJumpStopColor);
|
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.designatedJumpStopColor);
|
||||||
this.jump && this.jump.show(0);
|
this.jump && this.jump.showMode(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 站台跳停*/
|
/** 站台跳停*/
|
||||||
jumpStop() {
|
jumpStop() {
|
||||||
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.jumpStopColor);
|
this.safeStand && this.safeStand.setColor(this.style.StationStand.stand.jumpStopColor);
|
||||||
this.jump && this.jump.show(1);
|
this.jump && this.jump.showMode(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 车站扣车*/
|
/** 车站扣车*/
|
||||||
standDetainTrain() {
|
standDetainTrain() {
|
||||||
if (this.style.StationStand.common.special) {
|
this.detain && this.detain.showMode();
|
||||||
this.detain && this.detain.show('H');
|
|
||||||
} else {
|
|
||||||
this.detain && this.detain.show();
|
|
||||||
}
|
|
||||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.detainTrainTextColor);
|
this.detain && this.detain.setColor(this.style.StationStand.detainCar.detainTrainTextColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 中心扣车*/
|
/** 中心扣车*/
|
||||||
centerDetainTrain() {
|
centerDetainTrain() {
|
||||||
if (this.style.StationStand.common.special) {
|
this.detain && this.detain.showMode();
|
||||||
this.detain && this.detain.show('H');
|
|
||||||
} else {
|
|
||||||
this.detain && this.detain.show();
|
|
||||||
}
|
|
||||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.centerTrainColor);
|
this.detain && this.detain.setColor(this.style.StationStand.detainCar.centerTrainColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 中心+车站扣车*/
|
/** 中心+车站扣车*/
|
||||||
standAndCenterDetainTrain() {
|
standAndCenterDetainTrain() {
|
||||||
if (this.style.StationStand.common.special) {
|
this.detain && this.detain.showMode();
|
||||||
this.detain && this.detain.show('H');
|
|
||||||
} else {
|
|
||||||
this.detain && this.detain.show();
|
|
||||||
}
|
|
||||||
this.detain && this.detain.setColor(this.style.StationStand.detainCar.andCenterTrainColor);
|
this.detain && this.detain.setColor(this.style.StationStand.detainCar.andCenterTrainColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 人工设置停战时间*/
|
/** 人工设置停战时间*/
|
||||||
setManuallyArmisticeTime(val) {
|
setManuallyArmisticeTime(val) {
|
||||||
this.time && this.time.show();
|
this.time && this.time.showMode();
|
||||||
this.time && this.time.setName(val);
|
this.time && this.time.setName(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 人工设置运行等级*/
|
/** 人工设置运行等级*/
|
||||||
setManuallyOperationLevel(val) {
|
setManuallyOperationLevel(val) {
|
||||||
this.level && this.level.show();
|
this.level && this.level.showMode();
|
||||||
this.level && this.level.setName(val);
|
this.level && this.level.setName(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 无折返(默认)*/
|
/** 无折返(默认)*/
|
||||||
noReentry() {
|
noReentry() {
|
||||||
this.reentry && this.reentry.hide();
|
this.reentry && this.reentry.hideMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 无人折返*/
|
/** 无人折返*/
|
||||||
noHumanReentry() {
|
noHumanReentry() {
|
||||||
this.reentry && this.reentry.show();
|
this.reentry && this.reentry.showMode();
|
||||||
this.reentry && this.reentry.setColor(this.style.StationStand.reentry.noHumanColor);
|
this.reentry && this.reentry.setColor(this.style.StationStand.reentry.noHumanColor);
|
||||||
}
|
}
|
||||||
/** 自动换端*/
|
/** 自动换端*/
|
||||||
autoChangeEnds() {
|
autoChangeEnds() {
|
||||||
this.reentry && this.reentry.show();
|
this.reentry && this.reentry.showMode();
|
||||||
this.reentry && this.reentry.setColor(this.style.StationStand.reentry.autoChangeEndsColor);
|
this.reentry && this.reentry.setColor(this.style.StationStand.reentry.autoChangeEndsColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
// import { deepAssign } from '@/utils/index';
|
// import { deepAssign } from '@/utils/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -341,6 +341,7 @@ export default {
|
|||||||
selectedChange() {
|
selectedChange() {
|
||||||
const model = this.$store.state.menuOperation.selected;
|
const model = this.$store.state.menuOperation.selected;
|
||||||
if (model && model._type) {
|
if (model && model._type) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Handler.clear();
|
Handler.clear();
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
<div v-quickMenuDrag class="reminder-drag">
|
<div v-quickMenuDrag class="reminder-drag">
|
||||||
<div ref="drapBox" class="reminder-box">
|
<div ref="drapBox" class="reminder-box">
|
||||||
<div class="tip-title">
|
<div class="tip-title">
|
||||||
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
|
<i v-show="!isShrink" class="icon el-icon-minus" @click="shrink" />
|
||||||
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
|
<i v-show="isShrink" class="icon el-icon-plus" @click="shrink" />
|
||||||
<p v-if="isShrink" style="color: #fff;">
|
<p v-if="isShrink" style="color: #fff;">
|
||||||
<span>{{ lessonName }}</span>
|
<span>{{ lessonName }}</span>
|
||||||
</p>
|
</p>
|
||||||
@ -131,12 +131,12 @@ export default {
|
|||||||
const height = this.$refs.dragBody.offsetHeight + 40;
|
const height = this.$refs.dragBody.offsetHeight + 40;
|
||||||
const top = this.$refs.drapBox.style.top;
|
const top = this.$refs.drapBox.style.top;
|
||||||
if (this.isShrink) {
|
if (this.isShrink) {
|
||||||
this.$refs.drapBox.style.height = '40px';
|
|
||||||
this.$refs.drapBox.style.top = '';
|
|
||||||
this.isShrink = false;
|
|
||||||
} else {
|
|
||||||
this.$refs.drapBox.style.height = height + 'px';
|
this.$refs.drapBox.style.height = height + 'px';
|
||||||
this.$refs.drapBox.style.top = top;
|
this.$refs.drapBox.style.top = top;
|
||||||
|
this.isShrink = false;
|
||||||
|
} else {
|
||||||
|
this.$refs.drapBox.style.height = '40px';
|
||||||
|
this.$refs.drapBox.style.top = '';
|
||||||
this.isShrink = true;
|
this.isShrink = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -160,6 +160,7 @@ export default {
|
|||||||
json.type = '';
|
json.type = '';
|
||||||
json.prdType = '';
|
json.prdType = '';
|
||||||
json.operateType = '';
|
json.operateType = '';
|
||||||
|
this.typeChoose(this.$refs.queryListPage.queryData);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
|
@ -61,7 +61,7 @@ export default {
|
|||||||
name: '',
|
name: '',
|
||||||
remarks: ''
|
remarks: ''
|
||||||
},
|
},
|
||||||
isShrink: false,
|
isShrink: true,
|
||||||
lessonName: '',
|
lessonName: '',
|
||||||
courseModel: {
|
courseModel: {
|
||||||
id: '',
|
id: '',
|
||||||
|
@ -31,7 +31,7 @@ import Vue from 'vue';
|
|||||||
import AddAction from '../scriptRecord/addAction';
|
import AddAction from '../scriptRecord/addAction';
|
||||||
import GetAction from '../scriptRecord/getAction';
|
import GetAction from '../scriptRecord/getAction';
|
||||||
import AddRole from '../scriptRecord/addRole';
|
import AddRole from '../scriptRecord/addRole';
|
||||||
import {saveScriptScenes, saveScriptData, dumpScriptData, updateMapLocation, scriptPause, executeScript} from '@/api/simulation';
|
import {saveScriptScenes, saveScriptData, saveScriptDataNew, dumpScriptData, updateMapLocation, scriptPause, executeScript} from '@/api/simulation';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TipScriptRecord',
|
name: 'TipScriptRecord',
|
||||||
@ -134,6 +134,22 @@ export default {
|
|||||||
},
|
},
|
||||||
saveScenesData() {
|
saveScenesData() {
|
||||||
this.isSavingScript = true;
|
this.isSavingScript = true;
|
||||||
|
|
||||||
|
if (this.$route.query.drawWay == 'true') {
|
||||||
|
saveScriptDataNew(this.group).then(resp => {
|
||||||
|
this.$message.success(this.$t('scriptRecord.saveDataSucess'));
|
||||||
|
this.isSavingScript = false;
|
||||||
|
this.initAutoSaveScript();
|
||||||
|
}).catch(error => {
|
||||||
|
this.$messageBox(`${this.$t('scriptRecord.saveDataFail')}: ${error.message}`);
|
||||||
|
this.isSavingScript = false;
|
||||||
|
if (error.code === 40004 || error.code === 40005 || error.code === 40003) {
|
||||||
|
this.clearAutoSave();
|
||||||
|
} else {
|
||||||
|
this.initAutoSaveScript();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
saveScriptData(this.group).then(resp => {
|
saveScriptData(this.group).then(resp => {
|
||||||
this.$message.success(this.$t('scriptRecord.saveDataSucess'));
|
this.$message.success(this.$t('scriptRecord.saveDataSucess'));
|
||||||
this.isSavingScript = false;
|
this.isSavingScript = false;
|
||||||
@ -147,6 +163,7 @@ export default {
|
|||||||
this.initAutoSaveScript();
|
this.initAutoSaveScript();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
dumpScenesData() {
|
dumpScenesData() {
|
||||||
this.clearAutoSave();
|
this.clearAutoSave();
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
<div class="itemGroup">
|
<div class="itemGroup">
|
||||||
<el-form-item :label="$t('scriptRecord.narrator')" class="conditionVO" prop="actionVO.memberId">
|
<el-form-item :label="$t('scriptRecord.narrator')" class="conditionVO" prop="actionVO.memberId">
|
||||||
<el-select v-model="modalData.actionVO.memberId" :placeholder="$t('scriptRecord.narratorRules')" :disabled="isPause&&isNotModify">
|
<el-select v-model="modalData.actionVO.memberId" :placeholder="$t('scriptRecord.narratorRules')" :disabled="isPause&&isNotModify">
|
||||||
<el-option v-for="member in memberList" :key="member.id" :label="member.role+(member.name==undefined?'':member.name)" :value="member.id" />
|
<el-option v-for="member in memberList" :key="member.id" :label="member.name" :value="member.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('scriptRecord.receiver')" class="conditionVO" prop="actionVO.targetId">
|
<el-form-item :label="$t('scriptRecord.receiver')" class="conditionVO" prop="actionVO.targetId">
|
||||||
<el-select v-model="modalData.actionVO.targetId" :placeholder="$t('scriptRecord.receiverRules')" :disabled="isPause&&isNotModify">
|
<el-select v-model="modalData.actionVO.targetId" :placeholder="$t('scriptRecord.receiverRules')" :disabled="isPause&&isNotModify">
|
||||||
<el-option v-for="member in memberList" :key="member.id" :label="member.role+(member.name==undefined?'':member.name)" :value="member.id" />
|
<el-option v-for="member in memberList" :key="member.id" :label="member.name" :value="member.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
<el-form ref="commandData" size="mini" :model="commandData" :rules="commandRules" label-width="120px" class="actionInfo" label-position="right">
|
<el-form ref="commandData" size="mini" :model="commandData" :rules="commandRules" label-width="120px" class="actionInfo" label-position="right">
|
||||||
<el-form-item :label="$t('scriptRecord.executor')" class="conditionVO" prop="action.memberId">
|
<el-form-item :label="$t('scriptRecord.executor')" class="conditionVO" prop="action.memberId">
|
||||||
<el-select v-model="commandData.action.memberId" :placeholder="$t('scriptRecord.executorRules')" :disabled="isPause" @change="changeRole">
|
<el-select v-model="commandData.action.memberId" :placeholder="$t('scriptRecord.executorRules')" :disabled="isPause" @change="changeRole">
|
||||||
<el-option v-for="member in memberList" :key="member.id" :label="member.role+(member.name==undefined?'':member.name)" :value="member.id" />
|
<el-option v-for="member in memberList" :key="member.id" :label="member.name" :value="member.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('scriptRecord.executeCommand')" class="conditionVO" prop="action.deviceCommand">
|
<el-form-item :label="$t('scriptRecord.executeCommand')" class="conditionVO" prop="action.deviceCommand">
|
||||||
@ -58,7 +58,7 @@ import Vue from 'vue';
|
|||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
import CommandOperation from './command';
|
import CommandOperation from './command';
|
||||||
import {addScriptAction, modifyScriptAction, getAvailableDeviceCommand, getScriptPlayMember} from '@/api/simulation';
|
import {addScriptAction, addScriptActionNew, modifyScriptAction, getAvailableDeviceCommand, getScriptPlayMember, getScriptPlayMemberNew} from '@/api/simulation';
|
||||||
export default {
|
export default {
|
||||||
name: 'AddAction',
|
name: 'AddAction',
|
||||||
components:{
|
components:{
|
||||||
@ -175,6 +175,16 @@ export default {
|
|||||||
initData() {
|
initData() {
|
||||||
this.buttonName = this.$t('scriptRecord.addConversitionButton');
|
this.buttonName = this.$t('scriptRecord.addConversitionButton');
|
||||||
this.operateType = 'add';
|
this.operateType = 'add';
|
||||||
|
if (this.$route.query.drawWay == 'true') {
|
||||||
|
getScriptPlayMemberNew(this.group).then(resp => {
|
||||||
|
this.orginMemberList = resp.data;
|
||||||
|
this.memberList = resp.data;
|
||||||
|
this.resetDisabled();
|
||||||
|
this.initCommandActionData();
|
||||||
|
}).catch(error => {
|
||||||
|
this.$message(error.message);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
getScriptPlayMember(this.group).then(resp => {
|
getScriptPlayMember(this.group).then(resp => {
|
||||||
const roleTypeList = ConstConfig.ConstSelect.roleType;
|
const roleTypeList = ConstConfig.ConstSelect.roleType;
|
||||||
this.orginMemberList = resp.data;
|
this.orginMemberList = resp.data;
|
||||||
@ -188,12 +198,17 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
lastData = JSON.parse(lastData);
|
lastData = JSON.parse(lastData);
|
||||||
|
lastData.forEach(each=>{
|
||||||
|
each.name = each.role + (each.name == undefined ? '' : each.name);
|
||||||
|
});
|
||||||
this.memberList = lastData;
|
this.memberList = lastData;
|
||||||
this.resetDisabled();
|
this.resetDisabled();
|
||||||
this.initCommandActionData();
|
this.initCommandActionData();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$message(error.message);
|
this.$message(error.message);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
changeRole(index) {
|
changeRole(index) {
|
||||||
const role = this.orginMemberList.find(elem=>{ return elem.id == index; }).role;
|
const role = this.orginMemberList.find(elem=>{ return elem.id == index; }).role;
|
||||||
@ -279,6 +294,19 @@ export default {
|
|||||||
const data = this.modalData.actionVO;
|
const data = this.modalData.actionVO;
|
||||||
this.modifying = true;
|
this.modifying = true;
|
||||||
if (this.operateType == 'add') {
|
if (this.operateType == 'add') {
|
||||||
|
if (this.$route.query.drawWay == 'true') {
|
||||||
|
addScriptActionNew(group, data).then(response=>{
|
||||||
|
this.modifying = false;
|
||||||
|
this.$message.success(this.$t('scriptRecord.addConversitionSuccess'));
|
||||||
|
this.$emit('create');
|
||||||
|
// [this.modalData.actionVO.memberId]
|
||||||
|
// this.initActionData();
|
||||||
|
// this.$parent.$parent.$refs['addRole'].resetData([this.modalData.actionVO.memberId,this.modalData.actionVO.targetId]);
|
||||||
|
}).catch(error => {
|
||||||
|
this.modifying = false;
|
||||||
|
this.$messageBox(`${this.$t('scriptRecord.addConversitionFail')}: ${error.message}`);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
addScriptAction(group, data).then(response=>{
|
addScriptAction(group, data).then(response=>{
|
||||||
this.modifying = false;
|
this.modifying = false;
|
||||||
this.$message.success(this.$t('scriptRecord.addConversitionSuccess'));
|
this.$message.success(this.$t('scriptRecord.addConversitionSuccess'));
|
||||||
@ -290,6 +318,8 @@ export default {
|
|||||||
this.modifying = false;
|
this.modifying = false;
|
||||||
this.$messageBox(`${this.$t('scriptRecord.addConversitionFail')}: ${error.message}`);
|
this.$messageBox(`${this.$t('scriptRecord.addConversitionFail')}: ${error.message}`);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
const actionId = this.modalData.actionVO.id;
|
const actionId = this.modalData.actionVO.id;
|
||||||
modifyScriptAction(group, actionId, data).then(response=>{
|
modifyScriptAction(group, actionId, data).then(response=>{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<el-card class="scriptTop">
|
<el-card class="scriptTop">
|
||||||
<el-transfer v-model="selectRoleData" :data="allRoleData" class="script-player-choose" :titles="[$t('scriptRecord.allRoles'), $t('scriptRecord.actors')]" @change="handleChange">
|
<el-transfer v-model="selectRoleData" :data="allRoleData" class="script-player-choose" :titles="[$t('scriptRecord.allRoles'), $t('scriptRecord.actors')]" @change="handleChange">
|
||||||
<span slot-scope="{option}">
|
<span slot-scope="{option}">
|
||||||
<span>{{ option.role+(option.name==undefined?'':option.name) }}</span>
|
<span>{{ option.name }}</span>
|
||||||
<el-radio-group v-model="option.gender" size="mini" class="sexGroup" @change="changeSex($event,option.key)">
|
<el-radio-group v-model="option.gender" size="mini" class="sexGroup" @change="changeSex($event,option.key)">
|
||||||
<el-radio-button label="Male">{{ $t('scriptRecord.roleSexMale') }}</el-radio-button>
|
<el-radio-button label="Male">{{ $t('scriptRecord.roleSexMale') }}</el-radio-button>
|
||||||
<el-radio-button label="Female">{{ $t('scriptRecord.roleSexFemale') }}</el-radio-button>
|
<el-radio-button label="Female">{{ $t('scriptRecord.roleSexFemale') }}</el-radio-button>
|
||||||
@ -45,9 +45,10 @@ export default {
|
|||||||
const group = this.$props.group;
|
const group = this.$props.group;
|
||||||
if (this.$route.query.drawWay == 'true') {
|
if (this.$route.query.drawWay == 'true') {
|
||||||
getScriptMemberDataNew(group).then(response=>{
|
getScriptMemberDataNew(group).then(response=>{
|
||||||
debugger;
|
let lastData = JSON.stringify(response.data);
|
||||||
const lastData = JSON.stringify(response.data);
|
lastData = lastData.replace(new RegExp('id', 'g'), 'key');
|
||||||
this.allRoleData = this.coverDataNew(lastData);
|
lastData = JSON.parse(lastData);
|
||||||
|
this.allRoleData = lastData;
|
||||||
getScriptPlayMemberNew(group).then(response=>{
|
getScriptPlayMemberNew(group).then(response=>{
|
||||||
const last = response.data;
|
const last = response.data;
|
||||||
// let userdata=JSON.stringify(response.data)
|
// let userdata=JSON.stringify(response.data)
|
||||||
@ -89,21 +90,9 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
lastData = JSON.parse(lastData);
|
lastData = JSON.parse(lastData);
|
||||||
return lastData;
|
lastData.forEach(each=>{
|
||||||
},
|
each.name = each.role + (each.name == undefined ? '' : each.name);
|
||||||
coverDataNew(data) {
|
|
||||||
const roleTypeList = ConstConfig.ConstSelect.roleTypeNew;
|
|
||||||
let lastData = data.replace(new RegExp('id', 'g'), 'key');
|
|
||||||
roleTypeList.forEach(function(element) {
|
|
||||||
const rolename = element.value;
|
|
||||||
if (Cookies.get('user_lang') == 'en') {
|
|
||||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.enLabel);
|
|
||||||
} else {
|
|
||||||
|
|
||||||
lastData = lastData.replace(new RegExp(rolename, 'g'), element.label);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
lastData = JSON.parse(lastData);
|
|
||||||
return lastData;
|
return lastData;
|
||||||
},
|
},
|
||||||
handleChange(value, direction, movedKeys) {
|
handleChange(value, direction, movedKeys) {
|
||||||
|
@ -29,7 +29,8 @@
|
|||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {getScriptRecord, deleteScriptAction, getAvailableDeviceCommand } from '@/api/simulation';
|
import {deleteScriptAction, getAvailableDeviceCommand } from '@/api/simulation';
|
||||||
|
// getScriptRecord
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
export default {
|
export default {
|
||||||
name: 'GetAction',
|
name: 'GetAction',
|
||||||
@ -75,57 +76,57 @@ export default {
|
|||||||
},
|
},
|
||||||
loadOtherData(obj) {
|
loadOtherData(obj) {
|
||||||
const group = obj.group;
|
const group = obj.group;
|
||||||
getScriptRecord(group).then(response=>{
|
// getScriptRecord(group).then(response=>{
|
||||||
this.$store.dispatch('scriptRecord/updateBgSet', response.data.bgSet);
|
// this.$store.dispatch('scriptRecord/updateBgSet', response.data.bgSet);
|
||||||
this.actionInfoList = [];
|
// this.actionInfoList = [];
|
||||||
const roleTypeList = ConstConfig.ConstSelect.roleType;
|
// const roleTypeList = ConstConfig.ConstSelect.roleType;
|
||||||
|
|
||||||
let memberVOList = JSON.stringify(response.data.memberVOList);
|
// let memberVOList = JSON.stringify(response.data.memberVOList);
|
||||||
roleTypeList.forEach(function(element) {
|
// roleTypeList.forEach(function(element) {
|
||||||
const rolename = element.value;
|
// const rolename = element.value;
|
||||||
memberVOList = memberVOList.replace(new RegExp(rolename, 'g'), element.label);
|
// memberVOList = memberVOList.replace(new RegExp(rolename, 'g'), element.label);
|
||||||
});
|
// });
|
||||||
memberVOList = JSON.parse(memberVOList);
|
// memberVOList = JSON.parse(memberVOList);
|
||||||
const actionList = response.data.actionVOList;
|
// const actionList = response.data.actionVOList;
|
||||||
|
|
||||||
actionList.forEach(element => {
|
// actionList.forEach(element => {
|
||||||
|
|
||||||
const member = memberVOList.find(elem=>{ return elem.id == element.memberId; });
|
// const member = memberVOList.find(elem=>{ return elem.id == element.memberId; });
|
||||||
|
|
||||||
const memberName = member.name ? ' - ' + member.name : '';
|
// const memberName = member.name ? ' - ' + member.name : '';
|
||||||
switch (element.type) {
|
// switch (element.type) {
|
||||||
case 'Conversation':
|
// case 'Conversation':
|
||||||
{
|
|
||||||
const target = memberVOList.find(elem=>{ return elem.id == element.targetId; });
|
|
||||||
const targetName = target.name ? ' - ' + target.name : '';
|
|
||||||
this.actionInfoList.push({id: element.id, isCoversition: true, memberName: member.role + memberName, targetName: target.role + targetName, reply: element.reply, row: element, visible: true});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'Command':
|
|
||||||
{
|
|
||||||
const deviceCommand = this.deviceCommandList.find(elem=>{ return elem.deviceCommand == element.deviceCommand; });
|
|
||||||
this.actionInfoList.push({id: element.id, isCoversition: false, memberName: member.role + memberName, command: deviceCommand.label, row: element, visible: false});
|
|
||||||
// switch (element.deviceCommand) {
|
|
||||||
// case 'Train_Manual_Route_Blocking_Drive':
|
|
||||||
// {
|
// {
|
||||||
// this.actionInfoList.push({id: element.id, isCoversition: false, memberName: member.role + memberName, command: deviceCommand.label, row: element, visible: false});
|
// const target = memberVOList.find(elem=>{ return elem.id == element.targetId; });
|
||||||
|
// const targetName = target.name ? ' - ' + target.name : '';
|
||||||
|
// this.actionInfoList.push({id: element.id, isCoversition: true, memberName: member.role + memberName, targetName: target.role + targetName, reply: element.reply, row: element, visible: true});
|
||||||
// break;
|
// break;
|
||||||
// }
|
// }
|
||||||
// case 'Train_Manual_Limit_Drive':
|
// case 'Command':
|
||||||
// {
|
// {
|
||||||
|
// const deviceCommand = this.deviceCommandList.find(elem=>{ return elem.deviceCommand == element.deviceCommand; });
|
||||||
// this.actionInfoList.push({id: element.id, isCoversition: false, memberName: member.role + memberName, command: deviceCommand.label, row: element, visible: false});
|
// this.actionInfoList.push({id: element.id, isCoversition: false, memberName: member.role + memberName, command: deviceCommand.label, row: element, visible: false});
|
||||||
// break;
|
// // switch (element.deviceCommand) {
|
||||||
|
// // case 'Train_Manual_Route_Blocking_Drive':
|
||||||
|
// // {
|
||||||
|
// // this.actionInfoList.push({id: element.id, isCoversition: false, memberName: member.role + memberName, command: deviceCommand.label, row: element, visible: false});
|
||||||
|
// // break;
|
||||||
|
// // }
|
||||||
|
// // case 'Train_Manual_Limit_Drive':
|
||||||
|
// // {
|
||||||
|
// // this.actionInfoList.push({id: element.id, isCoversition: false, memberName: member.role + memberName, command: deviceCommand.label, row: element, visible: false});
|
||||||
|
// // break;
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
}
|
// });
|
||||||
}
|
// if (response.data.mapLocation) {
|
||||||
});
|
// const mapLocation = {'offsetX': response.data.mapLocation.x, 'offsetY': response.data.mapLocation.y, 'scaleRate': response.data.mapLocation.scale};
|
||||||
if (response.data.mapLocation) {
|
// this.$store.dispatch('scriptRecord/updateMapLocation', mapLocation);
|
||||||
const mapLocation = {'offsetX': response.data.mapLocation.x, 'offsetY': response.data.mapLocation.y, 'scaleRate': response.data.mapLocation.scale};
|
// }
|
||||||
this.$store.dispatch('scriptRecord/updateMapLocation', mapLocation);
|
// this.loading = false;
|
||||||
}
|
// });
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
deleteAction(row) {
|
deleteAction(row) {
|
||||||
const group = this.$props.group;
|
const group = this.$props.group;
|
||||||
|
Loading…
Reference in New Issue
Block a user