Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
465da976d8
@ -385,6 +385,15 @@ export function modifyScriptAction(group, actionId, data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 修改剧本动作(新版) */
|
||||||
|
export function modifyScriptActionNew(group, data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/scriptSimulation/${group}/action/update`,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 分页查询存在的仿真 */
|
/** 分页查询存在的仿真 */
|
||||||
export function getExistingSimulation(params) {
|
export function getExistingSimulation(params) {
|
||||||
return request({
|
return request({
|
||||||
@ -709,3 +718,4 @@ export function getMemberInfo(group, memberId) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -608,14 +608,13 @@ class SkinCode extends defaultStyle {
|
|||||||
trainTargetNumberOffset: { x: -4, y: 4 }// 车组号偏移量
|
trainTargetNumberOffset: { x: -4, y: 4 }// 车组号偏移量
|
||||||
},
|
},
|
||||||
trainHead: {
|
trainHead: {
|
||||||
trainMoreLength: 0, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
|
||||||
trainHeadTriangleFirst: { x: 7, y: 1 }, // 列车车头三角坐标1偏移量
|
|
||||||
trainHeadTriangleSecond: { x: 13, y: 10 }, // 列车车头三角坐标2偏移量
|
|
||||||
trainHeadTriangleThird: { x: 7, y: 19 }, // 列车车头三角坐标3偏移量
|
|
||||||
trainHeadRectHeight: 20, // 列车车头矩形高度
|
trainHeadRectHeight: 20, // 列车车头矩形高度
|
||||||
trainConntWidth: 3, // 列车竖杠的宽度
|
trainConntWidth: 3, // 列车竖杠的宽度
|
||||||
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
||||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||||
|
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
|
||||||
|
trainHeadArrowWidth: 6, // 列车车头三角宽度
|
||||||
|
trainHeadArrowOffsetX: 2 // 列车车头三角偏移
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
trainHeight: 20, // 列车高度
|
trainHeight: 20, // 列车高度
|
||||||
|
@ -544,14 +544,13 @@ class SkinCode extends defaultStyle {
|
|||||||
trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量
|
trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量
|
||||||
},
|
},
|
||||||
trainHead: {
|
trainHead: {
|
||||||
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
|
||||||
trainHeadTriangleFirst: { x: 7, y: 1}, // 列车车头三角坐标1偏移量
|
|
||||||
trainHeadTriangleSecond: { x: 13, y: 10}, // 列车车头三角坐标2偏移量
|
|
||||||
trainHeadTriangleThird: { x: 7, y: 19}, // 列车车头三角坐标3偏移量
|
|
||||||
trainConntWidth: 4, // 列车竖杠的宽度
|
trainConntWidth: 4, // 列车竖杠的宽度
|
||||||
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
||||||
trainHeadRectHeight: 20, // 列车车头矩形高度
|
trainHeadRectHeight: 20, // 列车车头矩形高度
|
||||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||||
|
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
|
||||||
|
trainHeadArrowWidth: 5, // 列车车头三角宽度
|
||||||
|
trainHeadArrowOffsetX: 2 // 列车车头三角偏移
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
trainHeight: 20, // 列车高度
|
trainHeight: 20, // 列车高度
|
||||||
|
@ -729,14 +729,13 @@ class SkinCode extends defaultStyle {
|
|||||||
trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量
|
trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量
|
||||||
},
|
},
|
||||||
trainHead: {
|
trainHead: {
|
||||||
trainMoreLength: 0, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
|
||||||
trainHeadTriangleFirst: { x: 7, y: 1}, // 列车车头三角坐标1偏移量
|
|
||||||
trainHeadTriangleSecond: { x: 13, y: 10}, // 列车车头三角坐标2偏移量
|
|
||||||
trainHeadTriangleThird: { x: 7, y: 19}, // 列车车头三角坐标3偏移量
|
|
||||||
trainConntWidth: 3, // 列车竖杠的宽度
|
trainConntWidth: 3, // 列车竖杠的宽度
|
||||||
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
||||||
trainHeadRectHeight: 20, // 列车车头矩形高度
|
trainHeadRectHeight: 20, // 列车车头矩形高度
|
||||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||||
|
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
|
||||||
|
trainHeadArrowWidth: 6, // 列车车头三角宽度
|
||||||
|
trainHeadArrowOffsetX: 5 // 列车车头三角偏移
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
trainHeight: 20, // 列车高度
|
trainHeight: 20, // 列车高度
|
||||||
|
@ -582,14 +582,13 @@ class SkinCode extends defaultStyle {
|
|||||||
trainTargetNumberOffset: {x: -1, y: 1}// 车组号偏移量
|
trainTargetNumberOffset: {x: -1, y: 1}// 车组号偏移量
|
||||||
},
|
},
|
||||||
trainHead: {
|
trainHead: {
|
||||||
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
|
||||||
trainHeadTriangleFirst: { x: 0, y: 0}, // 列车车头三角坐标1偏移量
|
|
||||||
trainHeadTriangleSecond: { x: 5, y: 9}, // 列车车头三角坐标2偏移量
|
|
||||||
trainHeadTriangleThird: { x: 0, y: 18}, // 列车车头三角坐标3偏移量
|
|
||||||
trainHeadRectHeight: 18, // 列车车头矩形高度
|
trainHeadRectHeight: 18, // 列车车头矩形高度
|
||||||
trainConntWidth: 5, // 列车竖杠的宽度
|
trainConntWidth: 5, // 列车竖杠的宽度
|
||||||
trainHeadFillColor: '#EF0C08', // 列车车头矩形填充颜色
|
trainHeadFillColor: '#EF0C08', // 列车车头矩形填充颜色
|
||||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||||
|
trainHeadHeight: 'text', // 列车车头高度取决于trainBox高度
|
||||||
|
trainHeadArrowWidth: 5, // 列车车头三角宽度
|
||||||
|
trainHeadArrowOffsetX: 3 // 列车车头三角偏移
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
useSelfFormat: true,
|
useSelfFormat: true,
|
||||||
|
@ -570,14 +570,13 @@ class SkinCode extends defaultStyle {
|
|||||||
trainTargetNumberOffset: {x: -1, y: 1}// 车组号偏移量
|
trainTargetNumberOffset: {x: -1, y: 1}// 车组号偏移量
|
||||||
},
|
},
|
||||||
trainHead: {
|
trainHead: {
|
||||||
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
|
||||||
trainHeadTriangleFirst: { x: 0, y: 0}, // 列车车头三角坐标1偏移量
|
|
||||||
trainHeadTriangleSecond: { x: 4, y: 7.5}, // 列车车头三角坐标2偏移量
|
|
||||||
trainHeadTriangleThird: { x: 0, y: 15}, // 列车车头三角坐标3偏移量
|
|
||||||
trainHeadRectHeight: 15, // 列车车头矩形高度
|
trainHeadRectHeight: 15, // 列车车头矩形高度
|
||||||
trainConntWidth: 4, // 列车竖杠的宽度
|
trainConntWidth: 4, // 列车竖杠的宽度
|
||||||
trainHeadFillColor: '#EF0C08', // 列车车头矩形填充颜色
|
trainHeadFillColor: '#EF0C08', // 列车车头矩形填充颜色
|
||||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||||
|
trainHeadHeight: 'text', // 列车车头高度取决于trainBox高度
|
||||||
|
trainHeadArrowWidth: 5, // 列车车头三角宽度
|
||||||
|
trainHeadArrowOffsetX: 2 // 列车车头三角偏移
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
trainHeight: 17, // 列车高度
|
trainHeight: 17, // 列车高度
|
||||||
|
@ -630,14 +630,13 @@ class SkinCode extends defaultStyle {
|
|||||||
trainTargetNumberOffset: { x: 5, y: 25 }// 车组号偏移量
|
trainTargetNumberOffset: { x: 5, y: 25 }// 车组号偏移量
|
||||||
},
|
},
|
||||||
trainHead: {
|
trainHead: {
|
||||||
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
|
||||||
trainHeadTriangleFirst: { x: 0, y: 0 }, // 列车车头三角坐标1偏移量
|
|
||||||
trainHeadTriangleSecond: { x: 4, y: 7.5 }, // 列车车头三角坐标2偏移量
|
|
||||||
trainHeadTriangleThird: { x: 0, y: 15 }, // 列车车头三角坐标3偏移量
|
|
||||||
trainHeadRectHeight: 15, // 列车车头矩形高度
|
trainHeadRectHeight: 15, // 列车车头矩形高度
|
||||||
trainConntWidth: 0, // 列车竖杠的宽度
|
trainConntWidth: 0, // 列车竖杠的宽度
|
||||||
trainHeadFillColor: '#EF0C08', // 列车车头矩形填充颜色
|
trainHeadFillColor: '#EF0C08', // 列车车头矩形填充颜色
|
||||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||||
|
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
|
||||||
|
trainHeadArrowWidth: 5, // 列车车头三角宽度
|
||||||
|
trainHeadArrowOffsetX: 2 // 列车车头三角偏移
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
hasTravelSigns: true, // 是否有行进标志
|
hasTravelSigns: true, // 是否有行进标志
|
||||||
|
@ -581,14 +581,13 @@ class SkinCode extends defaultStyle {
|
|||||||
trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量
|
trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量
|
||||||
},
|
},
|
||||||
trainHead: {
|
trainHead: {
|
||||||
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
|
||||||
trainHeadTriangleFirst: { x: 4, y: 0}, // 列车车头三角坐标1偏移量
|
|
||||||
trainHeadTriangleSecond: { x: 9, y: 10}, // 列车车头三角坐标2偏移量
|
|
||||||
trainHeadTriangleThird: { x: 4, y: 20}, // 列车车头三角坐标3偏移量
|
|
||||||
trainConntWidth: 2, // 列车竖杠的宽度
|
trainConntWidth: 2, // 列车竖杠的宽度
|
||||||
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
||||||
trainHeadRectHeight: 20, // 列车车头矩形高度
|
trainHeadRectHeight: 20, // 列车车头矩形高度
|
||||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||||
|
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
|
||||||
|
trainHeadArrowWidth: 5, // 列车车头三角宽度
|
||||||
|
trainHeadArrowOffsetX: 2 // 列车车头三角偏移
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
trainHeight: 20, // 列车高度
|
trainHeight: 20, // 列车高度
|
||||||
|
@ -505,7 +505,7 @@ class SkinCode extends defaultStyle {
|
|||||||
this[deviceType.StationTurnBack] = { // 站后折返
|
this[deviceType.StationTurnBack] = { // 站后折返
|
||||||
lamp: {
|
lamp: {
|
||||||
fill: '#FFFF00', // 填充色
|
fill: '#FFFF00', // 填充色
|
||||||
radiusR: 6, // 控制灯大小
|
radiusR: 6 // 控制灯大小
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
fontWeight: 'normal',
|
fontWeight: 'normal',
|
||||||
@ -518,7 +518,7 @@ class SkinCode extends defaultStyle {
|
|||||||
lineWidth: 2,
|
lineWidth: 2,
|
||||||
padding: 6
|
padding: 6
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
this[deviceType.LimitControl] = {
|
this[deviceType.LimitControl] = {
|
||||||
text: {
|
text: {
|
||||||
fontSize: 10, // 字体大小
|
fontSize: 10, // 字体大小
|
||||||
@ -635,14 +635,13 @@ class SkinCode extends defaultStyle {
|
|||||||
headTypeColor: '#FF0' // 头码车
|
headTypeColor: '#FF0' // 头码车
|
||||||
},
|
},
|
||||||
trainHead: {
|
trainHead: {
|
||||||
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
|
||||||
trainHeadTriangleFirst: { x: 0, y: 0}, // 列车车头三角坐标1偏移量
|
|
||||||
trainHeadTriangleSecond: { x: 4, y: 7.5}, // 列车车头三角坐标2偏移量
|
|
||||||
trainHeadTriangleThird: { x: 0, y: 15}, // 列车车头三角坐标3偏移量
|
|
||||||
trainHeadRectHeight: 15, // 列车车头矩形高度
|
trainHeadRectHeight: 15, // 列车车头矩形高度
|
||||||
trainConntWidth: 4, // 列车竖杠的宽度
|
trainConntWidth: 4, // 列车竖杠的宽度
|
||||||
trainHeadFillColor: '#EF0C08', // 列车车头矩形填充颜色
|
trainHeadFillColor: '#EF0C08', // 列车车头矩形填充颜色
|
||||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||||
|
trainHeadHeight: 'text', // 列车车头高度取决于trainBox高度
|
||||||
|
trainHeadArrowWidth: 4, // 列车车头三角宽度
|
||||||
|
trainHeadArrowOffsetX: 2 // 列车车头三角偏移
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
trainHeight: 17, // 列车高度
|
trainHeight: 17, // 列车高度
|
||||||
|
@ -716,14 +716,13 @@ class SkinCode extends defaultStyle {
|
|||||||
trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量
|
trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量
|
||||||
},
|
},
|
||||||
trainHead: {
|
trainHead: {
|
||||||
trainMoreLength: 0, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
|
||||||
trainHeadTriangleFirst: { x: -1, y: -1}, // 列车车头三角坐标1偏移量
|
|
||||||
trainHeadTriangleSecond: { x: 15, y: 10}, // 列车车头三角坐标2偏移量
|
|
||||||
trainHeadTriangleThird: { x: -1, y: 21}, // 列车车头三角坐标3偏移量
|
|
||||||
trainConntWidth: 0, // 列车竖杠的宽度
|
trainConntWidth: 0, // 列车竖杠的宽度
|
||||||
trainHeadFillColor: '#2AA32A', // 列车车头矩形填充颜色
|
trainHeadFillColor: '#2AA32A', // 列车车头矩形填充颜色
|
||||||
trainHeadRectHeight: 20, // 列车车头矩形高度
|
trainHeadRectHeight: 20, // 列车车头矩形高度
|
||||||
directionStopType:'special' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
directionStopType:'special', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||||
|
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
|
||||||
|
trainHeadArrowWidth: 16, // 列车车头三角宽度
|
||||||
|
trainHeadArrowOffsetX: -0.5 // 列车车头三角偏移
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
trainHeight: 20, // 列车高度
|
trainHeight: 20, // 列车高度
|
||||||
|
@ -12,16 +12,16 @@ export default class TrainHead extends Group {
|
|||||||
create() {
|
create() {
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
const style = this.model.style;
|
const style = this.model.style;
|
||||||
const baseMargin = (model.drect === -1 ? 1 : 0);
|
const baseMargin = (model.drect === -1 ? -1 : 0);
|
||||||
if (style.Train.trainHead.trainConntWidth) {
|
if (style.Train.trainHead.trainConntWidth) {
|
||||||
this.line = new Rect({
|
this.line = new Rect({
|
||||||
zlevel: model.zlevel,
|
zlevel: model.zlevel,
|
||||||
z: model.z,
|
z: model.z,
|
||||||
shape: {
|
shape: {
|
||||||
x: model.point.x - baseMargin * (style.Train.trainHead.trainConntWidth * model.scale),
|
x: model.point.x + baseMargin * ((style.Train.trainHead.trainConntWidth + style.Train.trainBody.trainBodyLineWidth) * model.scale),
|
||||||
y: model.point.y,
|
y: model.point.y,
|
||||||
width: style.Train.trainHead.trainConntWidth * model.scale,
|
width: style.Train.trainHead.trainConntWidth * model.scale,
|
||||||
height: model.height || style.Train.trainHead.trainHeadRectHeight * model.scale
|
height: style.Train.trainHead.trainHeadHeight === 'trainBox' ? style.Train.common.trainHeight : model.height
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
lineWidth: 0.1,
|
lineWidth: 0.1,
|
||||||
@ -31,12 +31,12 @@ export default class TrainHead extends Group {
|
|||||||
});
|
});
|
||||||
this.add(this.line);
|
this.add(this.line);
|
||||||
}
|
}
|
||||||
const height = model.height / 2;
|
const height = style.Train.trainHead.trainHeadHeight === 'trainBox' ? style.Train.common.trainHeight / 2 : model.height / 2;
|
||||||
const startX = model.point.x + model.drect * (style.Train.trainHead.trainConntWidth * model.scale);
|
const startX = model.point.x + model.drect * (style.Train.trainHead.trainHeadArrowOffsetX * model.scale);
|
||||||
const points = [
|
const points = [
|
||||||
[startX + model.drect * 2 * model.scale, (model.point.y + height)],
|
[startX + model.drect * style.Train.trainHead.trainHeadArrowWidth * model.scale, (model.point.y + height)],
|
||||||
[startX + model.drect * -2 * model.scale, (model.point.y + height) + height],
|
[startX, (model.point.y + height) + height],
|
||||||
[startX + model.drect * -2 * model.scale, (model.point.y + height) - height]
|
[startX, (model.point.y + height) - height]
|
||||||
];
|
];
|
||||||
this.arrow = new Polygon({
|
this.arrow = new Polygon({
|
||||||
zlevel: model.zlevel,
|
zlevel: model.zlevel,
|
||||||
|
@ -90,11 +90,13 @@ export default {
|
|||||||
roleTypeNew:[
|
roleTypeNew:[
|
||||||
{label: '管理员', value: 'ADMIN', enLabel: 'Admin '},
|
{label: '管理员', value: 'ADMIN', enLabel: 'Admin '},
|
||||||
{label: '教员', value: 'Instructor', enLabel: 'Instructor '},
|
{label: '教员', value: 'Instructor', enLabel: 'Instructor '},
|
||||||
{label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '},
|
|
||||||
{label: '行值', value: 'STATION_SUPERVISOR', enLabel: 'Attendant '},
|
{label: '行值', value: 'STATION_SUPERVISOR', enLabel: 'Attendant '},
|
||||||
{label: '观众', value: 'AUDIENCE', enLabel: 'Audience '},
|
{label: '观众', value: 'AUDIENCE', enLabel: 'Audience '},
|
||||||
{label: '司机', value: 'DRIVER', enLabel: 'Driver '},
|
{label: '司机', value: 'DRIVER', enLabel: 'Driver '},
|
||||||
{label: '通号', value: 'MAINTAINER', enLabel: 'Repairman '}
|
{label: '通号', value: 'MAINTAINER', enLabel: 'Repairman '},
|
||||||
|
{label: '车辆段调度', value: 'DEPOT_DISPATCHER', enLabel: 'Depot dispatcher '},
|
||||||
|
{label: '工电调度', value: 'ELECTRIC_DISPATCHER', enLabel: 'Electric dispatcher'},
|
||||||
|
{label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '}
|
||||||
],
|
],
|
||||||
SimulationType: [
|
SimulationType: [
|
||||||
{ label: '实训', value: 'Training'},
|
{ label: '实训', value: 'Training'},
|
||||||
|
@ -98,12 +98,12 @@ export default {
|
|||||||
};
|
};
|
||||||
this.iscsDestroy();
|
this.iscsDestroy();
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const data = parser(iscsData[deviceCode], {width: this.canvasWidth, height: this.canvasHeight});
|
const data = parser(iscsData[deviceCode], {width: this.widthCanvas, height: this.canvasHeight});
|
||||||
this.$iscs = new Iscs({
|
this.$iscs = new Iscs({
|
||||||
dom: document.getElementById(this.iscsId),
|
dom: document.getElementById(this.iscsId),
|
||||||
config: {
|
config: {
|
||||||
renderer: 'canvas',
|
renderer: 'canvas',
|
||||||
width: this.canvasWidth,
|
width: this.widthCanvas,
|
||||||
height: this.canvasHeight
|
height: this.canvasHeight
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
|
@ -14,8 +14,9 @@
|
|||||||
<el-row style="font-size: 14px;color: #6F49FE; height: 30px; line-height: 30px;">
|
<el-row style="font-size: 14px;color: #6F49FE; height: 30px; line-height: 30px;">
|
||||||
<el-col :span="4"><div>设备名称</div></el-col>
|
<el-col :span="4"><div>设备名称</div></el-col>
|
||||||
<el-col :span="4"><div style="width: 100%; background: #FFF; padding-left: 5px;">{{ modeName }}</div></el-col>
|
<el-col :span="4"><div style="width: 100%; background: #FFF; padding-left: 5px;">{{ modeName }}</div></el-col>
|
||||||
<el-col :span="8"><div style="width: 100%; background: #FFF;">{{ stationName }}</div></el-col>
|
<el-col :span="6"><div style="width: 100%; background: #FFF;">{{ stationName }}</div></el-col>
|
||||||
<el-col :span="8"><div style="width: 100%; background: #FFF;">{{ deviceType }}</div></el-col>
|
<el-col :span="6"><div style="width: 100%; background: #FFF;">{{ deviceType }}</div></el-col>
|
||||||
|
<el-col :span="4"><div style="width: 100%; background: #FFF;">{{ deviceCode|| ' ' }}</div></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-if="operation==='home'" style="margin-top: 10px;font-size: 14px;color: #6F49FE; height: 30px; line-height: 30px;">
|
<el-row v-if="operation==='home'" style="margin-top: 10px;font-size: 14px;color: #6F49FE; height: 30px; line-height: 30px;">
|
||||||
<el-col :span="4"><div>状态</div></el-col>
|
<el-col :span="4"><div>状态</div></el-col>
|
||||||
@ -92,11 +93,20 @@ export default {
|
|||||||
modeName: '',
|
modeName: '',
|
||||||
status: '',
|
status: '',
|
||||||
operation: 'home',
|
operation: 'home',
|
||||||
|
deviceCode: '',
|
||||||
deviceMap: {
|
deviceMap: {
|
||||||
ManualAlarmButton:'手动报警按钮',
|
ManualAlarmButton:'手动报警按钮',
|
||||||
SmokeDetector: '消火栓按钮',
|
SmokeDetector: '消火栓按钮',
|
||||||
FireHydranAlarmButton: '点型火灾探测器',
|
FireHydranAlarmButton: '点型火灾探测器',
|
||||||
GasFireControl:'气体灭火控制器'
|
GasFireControl:'气体灭火控制器',
|
||||||
|
LightingGroup: '照明',
|
||||||
|
Electrically: '',
|
||||||
|
VolumeControlDamper: '电动风阀',
|
||||||
|
SmookExhaustFd: '排烟防火阀',
|
||||||
|
Ventilator: '普通风机',
|
||||||
|
AirConditioner: '组合式空调机组',
|
||||||
|
FireDamper: '防火阀',
|
||||||
|
SmookProofFd: '防烟防火阀'
|
||||||
},
|
},
|
||||||
modeMap: {
|
modeMap: {
|
||||||
standFAS: '火灾报警',
|
standFAS: '火灾报警',
|
||||||
@ -142,10 +152,14 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(device) {
|
doShow(device) {
|
||||||
|
this.deviceCode = '';
|
||||||
this.deviceType = this.deviceMap[device._type];
|
this.deviceType = this.deviceMap[device._type];
|
||||||
this.modeName = this.modeMap[this.$route.params.mode];
|
this.modeName = this.modeMap[this.$route.params.mode];
|
||||||
this.stationName = this.$route.query.stationName;
|
this.stationName = this.$route.query.stationName;
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
|
if (device._type === 'LightingGroup') {
|
||||||
|
this.deviceCode = device.topContext.split(/[(\r\n)\r\n]+/)[0];
|
||||||
|
}
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -23,11 +23,15 @@ export default {
|
|||||||
const device = this.$store.state.iscs.selected;
|
const device = this.$store.state.iscs.selected;
|
||||||
if (device && device._type === 'IscsButton' && device.function === 'PublicArea') {
|
if (device && device._type === 'IscsButton' && device.function === 'PublicArea') {
|
||||||
this.width = 1520;
|
this.width = 1520;
|
||||||
|
this.$nextTick(() => {
|
||||||
this.$refs.iscsPlate.show('12');
|
this.$refs.iscsPlate.show('12');
|
||||||
|
});
|
||||||
console.log(this.width);
|
console.log(this.width);
|
||||||
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
|
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
|
||||||
this.width = 1100;
|
this.width = 1100;
|
||||||
|
this.$nextTick(() => {
|
||||||
this.$refs.iscsPlate.show('14');
|
this.$refs.iscsPlate.show('14');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -45,6 +45,21 @@ export default {
|
|||||||
{graphicEle: 'smokeDetector', deviceType: '点型火灾探测器'},
|
{graphicEle: 'smokeDetector', deviceType: '点型火灾探测器'},
|
||||||
{graphicEle: 'gasFireControl', deviceType: '气体灭火控制器'}
|
{graphicEle: 'gasFireControl', deviceType: '气体灭火控制器'}
|
||||||
],
|
],
|
||||||
|
basData: [
|
||||||
|
{graphicEle: 'AirConditioner', deviceType: '组合式空调机组、空调器'},
|
||||||
|
{graphicEle: 'Ventilator', deviceType: '普通风机'},
|
||||||
|
{graphicEle: '', deviceType: '隧道风机'},
|
||||||
|
{graphicEle: '', deviceType: '排热风机'},
|
||||||
|
{graphicEle: 'FireDamper', deviceType: '防火阀'},
|
||||||
|
{graphicEle: 'SmookExhaustFd', deviceType: '排烟防火阀'},
|
||||||
|
{graphicEle: 'VolumeControlDamper', deviceType: '电动风阀'},
|
||||||
|
{graphicEle: 'SmookProofFd', deviceType: '防烟防火阀'},
|
||||||
|
{graphicEle: '', deviceType: '冷却塔'},
|
||||||
|
{graphicEle: '', deviceType: '冷水机组'},
|
||||||
|
{graphicEle: '', deviceType: '电动蝶阀'},
|
||||||
|
{graphicEle: '', deviceType: '动态平衡电动调节阀'},
|
||||||
|
{graphicEle: '', deviceType: '冷冻泵、冷却泵'}
|
||||||
|
],
|
||||||
graphicEleMap: {
|
graphicEleMap: {
|
||||||
manualAlarm: ManualAlarm,
|
manualAlarm: ManualAlarm,
|
||||||
fireHydrant: FireHydrant,
|
fireHydrant: FireHydrant,
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="height: 100%; width: 100%;overflow-y: auto;">
|
<div style="height: 100%; width: 100%;overflow-y: auto;">
|
||||||
<standFAS v-if="mode == 'standFAS'" />
|
<standFAS v-if="mode === 'standFAS'" />
|
||||||
<stationHallFAS v-else-if="mode == 'stationHallFAS'" />
|
<stationHallFAS v-else-if="mode === 'stationHallFAS'" />
|
||||||
<systemFAS v-else-if="mode == 'systemFAS'" />
|
<systemFAS v-else-if="mode === 'systemFAS'" />
|
||||||
<home-screen v-else-if="mode === 'mainScreenPA'" />
|
<home-screen v-else-if="mode === 'mainScreenPA'" />
|
||||||
<main-screen v-else-if="mode === 'MainScreen'" />
|
<main-screen v-else-if="mode === 'MainScreen'" />
|
||||||
<lcd-control v-else-if="mode === 'LCDcontrol'" />
|
<lcd-control v-else-if="mode === 'LCDcontrol'" />
|
||||||
@ -28,10 +28,10 @@
|
|||||||
<small-system v-else-if="mode==='smallSystem'" />
|
<small-system v-else-if="mode==='smallSystem'" />
|
||||||
<water-system v-else-if="mode==='waterSystem'" />
|
<water-system v-else-if="mode==='waterSystem'" />
|
||||||
<lighting-system v-else-if="mode === 'lighting'" />
|
<lighting-system v-else-if="mode === 'lighting'" />
|
||||||
<graphic-ele v-else-if="mode === 'graphicEle'" />
|
|
||||||
<device-control v-else-if="mode === 'deviceControl'" />
|
|
||||||
<electric-escalator v-else-if="mode === 'electricEscalator'" />
|
<electric-escalator v-else-if="mode === 'electricEscalator'" />
|
||||||
<water-supply v-else-if="mode === 'waterSupply'" />
|
<water-supply v-else-if="mode === 'waterSupply'" />
|
||||||
|
<graphic-ele ref="graphicEle" />
|
||||||
|
<device-control ref="deviceControl" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -107,7 +107,20 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
mode: 'standFAS',
|
mode: 'standFAS',
|
||||||
deviceList: ['ManualAlarmButton', 'SmokeDetector', 'FireHydranAlarmButton', 'GasFireControl']
|
deviceList: [
|
||||||
|
'ManualAlarmButton',
|
||||||
|
'SmokeDetector',
|
||||||
|
'FireHydranAlarmButton',
|
||||||
|
'GasFireControl',
|
||||||
|
'LightingGroup',
|
||||||
|
'Electrically',
|
||||||
|
'VolumeControlDamper',
|
||||||
|
'SmookExhaustFd',
|
||||||
|
'Ventilator',
|
||||||
|
'AirConditioner',
|
||||||
|
'FireDamper',
|
||||||
|
'SmookProofFd'
|
||||||
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -116,9 +129,10 @@ export default {
|
|||||||
},
|
},
|
||||||
'$store.state.iscs.selectedCount': function() {
|
'$store.state.iscs.selectedCount': function() {
|
||||||
const device = this.$store.state.iscs.selected;
|
const device = this.$store.state.iscs.selected;
|
||||||
if (device._type === 'IscsButton' && device.function === 'GraphicEle') {
|
console.log(device, '11111111111111');
|
||||||
|
if (device && device._type === 'IscsButton' && device.function === 'GraphicEle') {
|
||||||
this.$refs.graphicEle.doShow();
|
this.$refs.graphicEle.doShow();
|
||||||
} else if (this.deviceList.includes(device._type)) {
|
} else if (device && this.deviceList.includes(device._type)) {
|
||||||
this.$refs.deviceControl.doShow(device);
|
this.$refs.deviceControl.doShow(device);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
<div class="img_box"><img :src="SAFS" alt=""></div>
|
<div class="img_box"><img :src="SAFS" alt=""></div>
|
||||||
<div style="width: 100%;text-align:center;margin-top:120px;"><i class="el-icon-success" style="color: green; font-size: 100px;" /></div>
|
<div style="width: 100%;text-align:center;margin-top:120px;"><i class="el-icon-success" style="color: green; font-size: 100px;" /></div>
|
||||||
<div style="width: 100%;margin-top: 25px;">
|
<div style="width: 100%;margin-top: 25px;">
|
||||||
<div class="apply_box_title">报名成功!:<br> 您的赛事信息如下:
|
<div class="apply_box_title">报名成功!<br> 您的赛事信息如下:
|
||||||
<br>竞赛名称:{{ compition.name }}
|
<br>竞赛名称:{{ compition.name }}
|
||||||
<br>竞赛时间:{{ compition.startDate }}
|
<br>竞赛时间:{{ compition.startDate }}
|
||||||
<br>姓名:{{ formModel.name }}
|
<br>姓名:{{ formModel.name }}
|
||||||
@ -85,7 +85,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template></div></template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -16,7 +16,9 @@ import { mapGetters } from 'vuex';
|
|||||||
import { checkLoginLine } from '@/api/login';
|
import { checkLoginLine } from '@/api/login';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import MenuReplay from './menuReplay';
|
import MenuReplay from './menuReplay';
|
||||||
|
import { getToken } from '@/utils/auth';
|
||||||
import { DeviceMenu, getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
|
import { DeviceMenu, getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
|
||||||
|
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
||||||
export default {
|
export default {
|
||||||
name:'RefereeDisplay',
|
name:'RefereeDisplay',
|
||||||
components: {
|
components: {
|
||||||
@ -52,25 +54,49 @@ export default {
|
|||||||
},
|
},
|
||||||
height() {
|
height() {
|
||||||
return this.$store.state.app.height;
|
return this.$store.state.app.height;
|
||||||
|
},
|
||||||
|
group() {
|
||||||
|
return this.$route.query.group;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态
|
'$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态
|
||||||
|
this.subscribe();
|
||||||
this.mapBoxP = document.getElementById(this.canvasId).children[0];
|
this.mapBoxP = document.getElementById(this.canvasId).children[0];
|
||||||
this.mapBoxP.style.cursor = '';
|
this.mapBoxP.style.cursor = '';
|
||||||
},
|
},
|
||||||
// 'size.width': function(val) {
|
'$store.state.socket.equipmentStatus': function (val) {
|
||||||
// this.setWindowSize();
|
if (val.length) {
|
||||||
|
this.statusMessage(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'$store.state.socket.trainStationList': function (val) {
|
||||||
|
if (val.length) {
|
||||||
|
this.runFactMessage(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// '$store.state.socket.simulationError': function (val) {
|
||||||
|
// if (val) {
|
||||||
|
// this.simulationError(val);
|
||||||
|
// }
|
||||||
// },
|
// },
|
||||||
|
'$store.state.socket.simulationReset': function (val) {
|
||||||
|
if (val) {
|
||||||
|
this.simulationReset(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
'$store.state.app.windowSizeCount': function() {
|
'$store.state.app.windowSizeCount': function() {
|
||||||
this.setWindowSize();
|
this.setWindowSize();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async mounted() {
|
async mounted() {
|
||||||
|
window.onbeforeunload = this.clearSubscribe;
|
||||||
await this.setWindowSize();
|
await this.setWindowSize();
|
||||||
await this.initLoadData();
|
await this.initLoadData();
|
||||||
},
|
},
|
||||||
async beforeDestroy() {
|
async beforeDestroy() {
|
||||||
|
this.clearSubscribe();
|
||||||
await this.clearAllTimer();
|
await this.clearAllTimer();
|
||||||
await this.quit();
|
await this.quit();
|
||||||
await this.$store.dispatch('training/reset');
|
await this.$store.dispatch('training/reset');
|
||||||
@ -81,6 +107,47 @@ export default {
|
|||||||
async back() {
|
async back() {
|
||||||
// await this.$refs.menuScript.back();
|
// await this.$refs.menuScript.back();
|
||||||
},
|
},
|
||||||
|
clearSubscribe() {
|
||||||
|
clearSubscribe(`${displayTopic}\/${this.group}`);
|
||||||
|
},
|
||||||
|
async subscribe() {
|
||||||
|
this.clearSubscribe();
|
||||||
|
const header = { group: this.group || '', 'X-Token': getToken() };
|
||||||
|
creatSubscribe(`${displayTopic}\/${this.group}`, header);
|
||||||
|
|
||||||
|
await this.$store.dispatch('training/setHasSubscribed');
|
||||||
|
},
|
||||||
|
async statusMessage(list) {
|
||||||
|
await this.$store.dispatch('training/updateMapState', list);
|
||||||
|
await this.$store.dispatch('socket/setEquipmentStatus');
|
||||||
|
},
|
||||||
|
async runFactMessage(list) {
|
||||||
|
await this.$store.dispatch('runPlan/updateRunPlanData', list);
|
||||||
|
await this.$store.dispatch('socket/setTrainStationList');
|
||||||
|
},
|
||||||
|
async simulationReset() {
|
||||||
|
await this.$store.dispatch('map/clearJlmapTrainView');
|
||||||
|
await this.$store.dispatch('map/setTrainWindowShow', false);
|
||||||
|
await this.$store.dispatch('training/over');
|
||||||
|
await this.$store.dispatch('socket/setSimulationReset');
|
||||||
|
await this.$store.dispatch('socket/setSimulationStart');
|
||||||
|
await this.$store.dispatch('training/setMapDefaultState');
|
||||||
|
},
|
||||||
|
// async simulationError() {
|
||||||
|
// await this.$store.dispatch('map/clearJlmapTrainView');
|
||||||
|
// await this.$store.dispatch('map/setTrainWindowShow', false);
|
||||||
|
// await this.$store.dispatch('socket/setSimulationError');
|
||||||
|
// await this.$store.dispatch('training/setMapDefaultState');
|
||||||
|
// this.clearSubscribe();
|
||||||
|
// this.$confirm(this.$t('tip.getMapStateDataException'), this.$t('tip.hint'), {
|
||||||
|
// confirmButtonText: this.$t('global.confirm'),
|
||||||
|
// showCancelButton: false,
|
||||||
|
// type: 'warning'
|
||||||
|
// }).then(() => {
|
||||||
|
// this.$emit('back');
|
||||||
|
// }).catch(() => {
|
||||||
|
// });
|
||||||
|
// },
|
||||||
// 加载数据
|
// 加载数据
|
||||||
async initLoadData() {
|
async initLoadData() {
|
||||||
this.$store.dispatch('training/reset');
|
this.$store.dispatch('training/reset');
|
||||||
|
@ -82,7 +82,7 @@ export default {
|
|||||||
prop: 'theoryScore',
|
prop: 'theoryScore',
|
||||||
width:100,
|
width:100,
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return row.artificialTheoryScore ? `${row.theoryScore}(${row.artificialTheoryScore})` : row.theoryScore || '0'; },
|
columnValue: (row) => { return row.artificialTheoryScore ? `${row.theoryScore}(${row.artificialTheoryScore})` : this.covert(row.theoryScore); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -90,7 +90,7 @@ export default {
|
|||||||
prop: 'practiceScore',
|
prop: 'practiceScore',
|
||||||
width:100,
|
width:100,
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return row.artificialPracticeScore ? `${row.practiceScore}(${row.artificialPracticeScore})` : row.practiceScore || '0'; },
|
columnValue: (row) => { return row.artificialPracticeScore ? `${row.practiceScore}(${row.artificialPracticeScore})` : this.covert(row.practiceScore); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -119,13 +119,13 @@ export default {
|
|||||||
name: '理论结果',
|
name: '理论结果',
|
||||||
handleClick: this.handleTheoryResult,
|
handleClick: this.handleTheoryResult,
|
||||||
type: '',
|
type: '',
|
||||||
showControl: (row) => { return row.status == '5' || row.status == '4'; }
|
showControl: (row) => { return row.status == '5' || row.status == '4' || row.theoryScore != undefined; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '实操回放',
|
name: '实操回放',
|
||||||
handleClick: this.playBack,
|
handleClick: this.playBack,
|
||||||
type: '',
|
type: '',
|
||||||
showControl: (row) => { return row.status == '4'; }
|
showControl: (row) => { return row.status == '4' || row.status == '6' || row.practiceScore != undefined; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '修改',
|
name: '修改',
|
||||||
@ -183,6 +183,17 @@ export default {
|
|||||||
this.$refs.theoryResult.doShow({row:row, raceId:this.$route.query.raceId});
|
this.$refs.theoryResult.doShow({row:row, raceId:this.$route.query.raceId});
|
||||||
// this.$router.replace({ path: `/jsxt/theory/result?raceId=${this.$route.query.raceId}&result=true` });
|
// this.$router.replace({ path: `/jsxt/theory/result?raceId=${this.$route.query.raceId}&result=true` });
|
||||||
},
|
},
|
||||||
|
covert(data) {
|
||||||
|
if (data != undefined) {
|
||||||
|
if (data > 0) {
|
||||||
|
return data;
|
||||||
|
} else {
|
||||||
|
return '0';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
const loading = this.$loading({
|
const loading = this.$loading({
|
||||||
lock: true,
|
lock: true,
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-dialogDrag :title="title" :visible.sync="show" top="150px" width="900px" :before-do-close="doClose" :close-on-click-modal="false">
|
<el-dialog v-dialogDrag :title="title" :visible.sync="show" class="TheroyResult" top="150px" width="900px" :before-do-close="doClose" :close-on-click-modal="false">
|
||||||
|
<div style="max-height:500px;overflow:auto;">
|
||||||
<div v-for="(el,i) in sortedList" :id="'anchor__lst-'+i" :key="i" class="section">
|
<div v-for="(el,i) in sortedList" :id="'anchor__lst-'+i" :key="i" class="section">
|
||||||
<template v-if="el.children.length">
|
<template v-if="el.children.length">
|
||||||
<div class="caption">{{ index2UnicodeList[i] }}、{{ el.title }}</div>
|
<div class="caption">{{ index2UnicodeList[i] }}、{{ el.title }}</div>
|
||||||
<question v-for="(item,j) in el.children" :id="'anchor__lst-'+item.type+'-'+item.index" :key="j" v-model="item.answer" class="context" :option="item" />
|
<question v-for="(item,j) in el.children" :id="'anchor__lst-'+item.type+'-'+item.index" :key="j" v-model="item.answer" class="context" :option="item" />
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div style="padding-left: 20px;margin-top: 20px;">
|
<div style="padding-left: 20px;margin-top: 20px;">
|
||||||
<span>考试总分: </span>
|
<span>考试总分: </span>
|
||||||
<span style="font-size: 20px">{{ totalScore }}分</span>
|
<span style="font-size: 20px">{{ totalScore }}分</span>
|
||||||
@ -13,9 +15,13 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import Question from '@/views/jsxt/competition/theory/question';
|
||||||
import { getTheroyCompetitionResult } from '@/api/competition';
|
import { getTheroyCompetitionResult } from '@/api/competition';
|
||||||
export default {
|
export default {
|
||||||
name:'TheroyResult',
|
name:'TheroyResult',
|
||||||
|
components:{
|
||||||
|
Question
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title:'',
|
title:'',
|
||||||
@ -47,7 +53,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
doShow({row, raceId}) {
|
doShow({row, raceId}) {
|
||||||
this.loadInitData(raceId, row.userId);
|
this.loadInitData(raceId, row.id);
|
||||||
this.show = true;
|
this.show = true;
|
||||||
this.title = '【' + row.organization + '】' + row.name + ' 理论结果';
|
this.title = '【' + row.organization + '】' + row.name + ' 理论结果';
|
||||||
},
|
},
|
||||||
@ -55,6 +61,7 @@ export default {
|
|||||||
this.show = false;
|
this.show = false;
|
||||||
},
|
},
|
||||||
loadInitData(raceId, userId) {
|
loadInitData(raceId, userId) {
|
||||||
|
this.examQuestions = [];
|
||||||
getTheroyCompetitionResult(raceId, userId).then((resp)=>{
|
getTheroyCompetitionResult(raceId, userId).then((resp)=>{
|
||||||
if (resp.data) {
|
if (resp.data) {
|
||||||
resp.data.forEach((item, i) => {
|
resp.data.forEach((item, i) => {
|
||||||
@ -67,3 +74,8 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.TheroyResult .el-dialog .el-dialog__body{
|
||||||
|
padding-top:10px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -117,7 +117,8 @@ export default {
|
|||||||
countdownTime: '00:00:00',
|
countdownTime: '00:00:00',
|
||||||
practicalTime: 0,
|
practicalTime: 0,
|
||||||
countdown: null,
|
countdown: null,
|
||||||
questionList: []
|
questionList: [],
|
||||||
|
practicalExamTime: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -392,15 +393,14 @@ export default {
|
|||||||
const paperResp = await getTestPaperDatail(this.$route.query.raceId);
|
const paperResp = await getTestPaperDatail(this.$route.query.raceId);
|
||||||
if (paperResp.data && paperResp.data.practicalQuestions) {
|
if (paperResp.data && paperResp.data.practicalQuestions) {
|
||||||
this.questionList = [];
|
this.questionList = [];
|
||||||
|
this.practicalExamTime = paperResp.data.practicalExamTime;
|
||||||
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'practical';
|
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'practical';
|
||||||
const startTime = localStore.get(storeKey);
|
const startTime = localStore.get(storeKey);
|
||||||
if (startTime) {
|
if (startTime) {
|
||||||
const dt = new Date().getTime() - startTime;
|
const dt = new Date().getTime() - startTime;
|
||||||
this.practicalTime = paperResp.data.practicalExamTime * 60 - Math.floor(dt / 1000);
|
this.practicalTime = paperResp.data.practicalExamTime * 60 - Math.floor(dt / 1000);
|
||||||
} else {
|
} else {
|
||||||
this.practicalTime = paperResp.data.practicalExamTime * 60;
|
this.practicalTime = this.practicalExamTime * 60;
|
||||||
const storeValue = new Date().getTime();
|
|
||||||
localStore.set(storeKey, storeValue);
|
|
||||||
}
|
}
|
||||||
this.countdownTime = this.computationTime(this.practicalTime);
|
this.countdownTime = this.computationTime(this.practicalTime);
|
||||||
paperResp.data.practicalQuestions.forEach(elem => {
|
paperResp.data.practicalQuestions.forEach(elem => {
|
||||||
@ -436,6 +436,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
startCounting() {
|
startCounting() {
|
||||||
|
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'practical';
|
||||||
|
const startTime = localStore.get(storeKey);
|
||||||
|
if (!startTime) {
|
||||||
|
const storeValue = new Date().getTime();
|
||||||
|
localStore.set(storeKey, storeValue);
|
||||||
|
}
|
||||||
this.countdown = setInterval(() => {
|
this.countdown = setInterval(() => {
|
||||||
if (this.practicalTime <= 0) {
|
if (this.practicalTime <= 0) {
|
||||||
if (this.countdown) {
|
if (this.countdown) {
|
||||||
|
@ -75,7 +75,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, addScriptActionNew, modifyScriptAction, getAvailableDeviceCommand, getScriptPlayMember, getScriptPlayMemberNew} from '@/api/simulation';
|
import {addScriptAction, addScriptActionNew, modifyScriptAction, modifyScriptActionNew, getAvailableDeviceCommand, getScriptPlayMember, getScriptPlayMemberNew} from '@/api/simulation';
|
||||||
export default {
|
export default {
|
||||||
name: 'AddAction',
|
name: 'AddAction',
|
||||||
components:{
|
components:{
|
||||||
@ -451,6 +451,23 @@ export default {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
const actionId = this.modalData.actionVO.id;
|
const actionId = this.modalData.actionVO.id;
|
||||||
|
if (this.drawWay) {
|
||||||
|
data.id = actionId;
|
||||||
|
modifyScriptActionNew(group, data).then(response=>{
|
||||||
|
this.modifying = false;
|
||||||
|
this.isNotModify = true;
|
||||||
|
this.$emit('setDisabled', this.isNotModify);
|
||||||
|
this.buttonName = this.$t('scriptRecord.addConversitionButton');
|
||||||
|
this.operateType = 'add';
|
||||||
|
this.$message.success(this.$t('scriptRecord.modifyConversitionSuccess'));
|
||||||
|
this.$emit('create');
|
||||||
|
// this.$parent.$parent.$refs['addRole'].resetData([this.modalData.action.memberId,this.modalData.action.targetId]);
|
||||||
|
this.initActionData();
|
||||||
|
}).catch(error => {
|
||||||
|
this.modifying = false;
|
||||||
|
this.$messageBox(`${this.$t('scriptRecord.modifyConversitionFail')}: ${error.message}`);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
modifyScriptAction(group, actionId, data).then(response=>{
|
modifyScriptAction(group, actionId, data).then(response=>{
|
||||||
this.modifying = false;
|
this.modifying = false;
|
||||||
this.isNotModify = true;
|
this.isNotModify = true;
|
||||||
@ -466,6 +483,8 @@ export default {
|
|||||||
this.$messageBox(`${this.$t('scriptRecord.modifyConversitionFail')}: ${error.message}`);
|
this.$messageBox(`${this.$t('scriptRecord.modifyConversitionFail')}: ${error.message}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log('error submit!!');
|
console.log('error submit!!');
|
||||||
return false;
|
return false;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnGroup">
|
<div class="btnGroup">
|
||||||
<el-button v-if="actionInfo.visible && !drawWay" type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)">{{ $t('scriptRecord.modifyConversitionButton') }}</el-button>
|
<el-button v-if="actionInfo.visible" type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)">{{ $t('scriptRecord.modifyConversitionButton') }}</el-button>
|
||||||
<!-- <el-button type="danger" size="mini" @click="deleteAction(actionInfo.id)">删除</el-button> -->
|
<!-- <el-button type="danger" size="mini" @click="deleteAction(actionInfo.id)">删除</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -158,8 +158,8 @@ export default {
|
|||||||
// 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 lastData = JSON.stringify(response.data);
|
const lastData = JSON.stringify(response.data.memberVOList);
|
||||||
const memberVOList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
|
const memberVOList = this.covert(lastData, ConstConfig.ConstSelect.roleType);
|
||||||
|
|
||||||
const actionList = response.data.actionVOList;
|
const actionList = response.data.actionVOList;
|
||||||
|
|
||||||
@ -218,11 +218,9 @@ export default {
|
|||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
modifyAction(row) {
|
modifyAction(row) {
|
||||||
if (!this.drawWay) {
|
|
||||||
this.$emit('setAction', row);
|
this.$emit('setAction', row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
Loading…
Reference in New Issue
Block a user