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) {
|
||||
return request({
|
||||
@ -709,3 +718,4 @@ export function getMemberInfo(group, memberId) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -608,14 +608,13 @@ class SkinCode extends defaultStyle {
|
||||
trainTargetNumberOffset: { x: -4, y: 4 }// 车组号偏移量
|
||||
},
|
||||
trainHead: {
|
||||
trainMoreLength: 0, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
||||
trainHeadTriangleFirst: { x: 7, y: 1 }, // 列车车头三角坐标1偏移量
|
||||
trainHeadTriangleSecond: { x: 13, y: 10 }, // 列车车头三角坐标2偏移量
|
||||
trainHeadTriangleThird: { x: 7, y: 19 }, // 列车车头三角坐标3偏移量
|
||||
trainHeadRectHeight: 20, // 列车车头矩形高度
|
||||
trainConntWidth: 3, // 列车竖杠的宽度
|
||||
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
|
||||
trainHeadArrowWidth: 6, // 列车车头三角宽度
|
||||
trainHeadArrowOffsetX: 2 // 列车车头三角偏移
|
||||
},
|
||||
common: {
|
||||
trainHeight: 20, // 列车高度
|
||||
|
@ -544,14 +544,13 @@ class SkinCode extends defaultStyle {
|
||||
trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量
|
||||
},
|
||||
trainHead: {
|
||||
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
||||
trainHeadTriangleFirst: { x: 7, y: 1}, // 列车车头三角坐标1偏移量
|
||||
trainHeadTriangleSecond: { x: 13, y: 10}, // 列车车头三角坐标2偏移量
|
||||
trainHeadTriangleThird: { x: 7, y: 19}, // 列车车头三角坐标3偏移量
|
||||
trainConntWidth: 4, // 列车竖杠的宽度
|
||||
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
||||
trainHeadRectHeight: 20, // 列车车头矩形高度
|
||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
|
||||
trainHeadArrowWidth: 5, // 列车车头三角宽度
|
||||
trainHeadArrowOffsetX: 2 // 列车车头三角偏移
|
||||
},
|
||||
common: {
|
||||
trainHeight: 20, // 列车高度
|
||||
|
@ -729,14 +729,13 @@ class SkinCode extends defaultStyle {
|
||||
trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量
|
||||
},
|
||||
trainHead: {
|
||||
trainMoreLength: 0, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
||||
trainHeadTriangleFirst: { x: 7, y: 1}, // 列车车头三角坐标1偏移量
|
||||
trainHeadTriangleSecond: { x: 13, y: 10}, // 列车车头三角坐标2偏移量
|
||||
trainHeadTriangleThird: { x: 7, y: 19}, // 列车车头三角坐标3偏移量
|
||||
trainConntWidth: 3, // 列车竖杠的宽度
|
||||
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
||||
trainHeadRectHeight: 20, // 列车车头矩形高度
|
||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
|
||||
trainHeadArrowWidth: 6, // 列车车头三角宽度
|
||||
trainHeadArrowOffsetX: 5 // 列车车头三角偏移
|
||||
},
|
||||
common: {
|
||||
trainHeight: 20, // 列车高度
|
||||
|
@ -413,7 +413,7 @@ class SkinCode extends defaultStyle {
|
||||
},
|
||||
core: {
|
||||
length: 6, // 道岔单边长度
|
||||
graphShow: true // 图形显示
|
||||
graphShow: true // 图形显示
|
||||
},
|
||||
jointImg: { // 道岔 A B C D四元素属性配置
|
||||
trapezoidLength: 8, // 直角梯形元素默认长度
|
||||
@ -582,14 +582,13 @@ class SkinCode extends defaultStyle {
|
||||
trainTargetNumberOffset: {x: -1, y: 1}// 车组号偏移量
|
||||
},
|
||||
trainHead: {
|
||||
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
||||
trainHeadTriangleFirst: { x: 0, y: 0}, // 列车车头三角坐标1偏移量
|
||||
trainHeadTriangleSecond: { x: 5, y: 9}, // 列车车头三角坐标2偏移量
|
||||
trainHeadTriangleThird: { x: 0, y: 18}, // 列车车头三角坐标3偏移量
|
||||
trainHeadRectHeight: 18, // 列车车头矩形高度
|
||||
trainConntWidth: 5, // 列车竖杠的宽度
|
||||
trainHeadFillColor: '#EF0C08', // 列车车头矩形填充颜色
|
||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
trainHeadHeight: 'text', // 列车车头高度取决于trainBox高度
|
||||
trainHeadArrowWidth: 5, // 列车车头三角宽度
|
||||
trainHeadArrowOffsetX: 3 // 列车车头三角偏移
|
||||
},
|
||||
common: {
|
||||
useSelfFormat: true,
|
||||
|
@ -570,14 +570,13 @@ class SkinCode extends defaultStyle {
|
||||
trainTargetNumberOffset: {x: -1, y: 1}// 车组号偏移量
|
||||
},
|
||||
trainHead: {
|
||||
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
||||
trainHeadTriangleFirst: { x: 0, y: 0}, // 列车车头三角坐标1偏移量
|
||||
trainHeadTriangleSecond: { x: 4, y: 7.5}, // 列车车头三角坐标2偏移量
|
||||
trainHeadTriangleThird: { x: 0, y: 15}, // 列车车头三角坐标3偏移量
|
||||
trainHeadRectHeight: 15, // 列车车头矩形高度
|
||||
trainConntWidth: 4, // 列车竖杠的宽度
|
||||
trainHeadFillColor: '#EF0C08', // 列车车头矩形填充颜色
|
||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
trainHeadHeight: 'text', // 列车车头高度取决于trainBox高度
|
||||
trainHeadArrowWidth: 5, // 列车车头三角宽度
|
||||
trainHeadArrowOffsetX: 2 // 列车车头三角偏移
|
||||
},
|
||||
common: {
|
||||
trainHeight: 17, // 列车高度
|
||||
|
@ -630,14 +630,13 @@ class SkinCode extends defaultStyle {
|
||||
trainTargetNumberOffset: { x: 5, y: 25 }// 车组号偏移量
|
||||
},
|
||||
trainHead: {
|
||||
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
||||
trainHeadTriangleFirst: { x: 0, y: 0 }, // 列车车头三角坐标1偏移量
|
||||
trainHeadTriangleSecond: { x: 4, y: 7.5 }, // 列车车头三角坐标2偏移量
|
||||
trainHeadTriangleThird: { x: 0, y: 15 }, // 列车车头三角坐标3偏移量
|
||||
trainHeadRectHeight: 15, // 列车车头矩形高度
|
||||
trainConntWidth: 0, // 列车竖杠的宽度
|
||||
trainHeadFillColor: '#EF0C08', // 列车车头矩形填充颜色
|
||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
|
||||
trainHeadArrowWidth: 5, // 列车车头三角宽度
|
||||
trainHeadArrowOffsetX: 2 // 列车车头三角偏移
|
||||
},
|
||||
common: {
|
||||
hasTravelSigns: true, // 是否有行进标志
|
||||
|
@ -581,14 +581,13 @@ class SkinCode extends defaultStyle {
|
||||
trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量
|
||||
},
|
||||
trainHead: {
|
||||
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
||||
trainHeadTriangleFirst: { x: 4, y: 0}, // 列车车头三角坐标1偏移量
|
||||
trainHeadTriangleSecond: { x: 9, y: 10}, // 列车车头三角坐标2偏移量
|
||||
trainHeadTriangleThird: { x: 4, y: 20}, // 列车车头三角坐标3偏移量
|
||||
trainConntWidth: 2, // 列车竖杠的宽度
|
||||
trainHeadFillColor: '#000000', // 列车车头矩形填充颜色
|
||||
trainHeadRectHeight: 20, // 列车车头矩形高度
|
||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
|
||||
trainHeadArrowWidth: 5, // 列车车头三角宽度
|
||||
trainHeadArrowOffsetX: 2 // 列车车头三角偏移
|
||||
},
|
||||
common: {
|
||||
trainHeight: 20, // 列车高度
|
||||
|
@ -503,22 +503,22 @@ class SkinCode extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.StationTurnBack] = { // 站后折返
|
||||
lamp: {
|
||||
fill: '#FFFF00', // 填充色
|
||||
radiusR: 6, // 控制灯大小
|
||||
},
|
||||
text: {
|
||||
fontWeight: 'normal',
|
||||
fontSize: 12,
|
||||
distance: 10
|
||||
},
|
||||
rect: {
|
||||
fill: 'rgba(0,0,0,0)',
|
||||
lamp: {
|
||||
fill: '#FFFF00', // 填充色
|
||||
radiusR: 6 // 控制灯大小
|
||||
},
|
||||
text: {
|
||||
fontWeight: 'normal',
|
||||
fontSize: 12,
|
||||
distance: 10
|
||||
},
|
||||
rect: {
|
||||
fill: 'rgba(0,0,0,0)',
|
||||
stroke: '#fff',
|
||||
lineWidth: 2,
|
||||
padding: 6
|
||||
}
|
||||
}
|
||||
padding: 6
|
||||
}
|
||||
};
|
||||
this[deviceType.LimitControl] = {
|
||||
text: {
|
||||
fontSize: 10, // 字体大小
|
||||
@ -635,14 +635,13 @@ class SkinCode extends defaultStyle {
|
||||
headTypeColor: '#FF0' // 头码车
|
||||
},
|
||||
trainHead: {
|
||||
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
||||
trainHeadTriangleFirst: { x: 0, y: 0}, // 列车车头三角坐标1偏移量
|
||||
trainHeadTriangleSecond: { x: 4, y: 7.5}, // 列车车头三角坐标2偏移量
|
||||
trainHeadTriangleThird: { x: 0, y: 15}, // 列车车头三角坐标3偏移量
|
||||
trainHeadRectHeight: 15, // 列车车头矩形高度
|
||||
trainConntWidth: 4, // 列车竖杠的宽度
|
||||
trainHeadFillColor: '#EF0C08', // 列车车头矩形填充颜色
|
||||
directionStopType:'normal' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
directionStopType:'normal', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
trainHeadHeight: 'text', // 列车车头高度取决于trainBox高度
|
||||
trainHeadArrowWidth: 4, // 列车车头三角宽度
|
||||
trainHeadArrowOffsetX: 2 // 列车车头三角偏移
|
||||
},
|
||||
common: {
|
||||
trainHeight: 17, // 列车高度
|
||||
|
@ -716,14 +716,13 @@ class SkinCode extends defaultStyle {
|
||||
trainTargetNumberOffset: {x: -4, y: 4}// 车组号偏移量
|
||||
},
|
||||
trainHead: {
|
||||
trainMoreLength: 0, // 列车车头比车身高出的长度,上下相比车体伸出去的边框
|
||||
trainHeadTriangleFirst: { x: -1, y: -1}, // 列车车头三角坐标1偏移量
|
||||
trainHeadTriangleSecond: { x: 15, y: 10}, // 列车车头三角坐标2偏移量
|
||||
trainHeadTriangleThird: { x: -1, y: 21}, // 列车车头三角坐标3偏移量
|
||||
trainConntWidth: 0, // 列车竖杠的宽度
|
||||
trainHeadFillColor: '#2AA32A', // 列车车头矩形填充颜色
|
||||
trainHeadRectHeight: 20, // 列车车头矩形高度
|
||||
directionStopType:'special' // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
directionStopType:'special', // special 西安二号线 停车 列车方向图标不消失 normal 正常
|
||||
trainHeadHeight: 'trainBox', // 列车车头高度取决于trainBox高度
|
||||
trainHeadArrowWidth: 16, // 列车车头三角宽度
|
||||
trainHeadArrowOffsetX: -0.5 // 列车车头三角偏移
|
||||
},
|
||||
common: {
|
||||
trainHeight: 20, // 列车高度
|
||||
|
@ -12,16 +12,16 @@ export default class TrainHead extends Group {
|
||||
create() {
|
||||
const model = this.model;
|
||||
const style = this.model.style;
|
||||
const baseMargin = (model.drect === -1 ? 1 : 0);
|
||||
const baseMargin = (model.drect === -1 ? -1 : 0);
|
||||
if (style.Train.trainHead.trainConntWidth) {
|
||||
this.line = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
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,
|
||||
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: {
|
||||
lineWidth: 0.1,
|
||||
@ -31,12 +31,12 @@ export default class TrainHead extends Group {
|
||||
});
|
||||
this.add(this.line);
|
||||
}
|
||||
const height = model.height / 2;
|
||||
const startX = model.point.x + model.drect * (style.Train.trainHead.trainConntWidth * model.scale);
|
||||
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.trainHeadArrowOffsetX * model.scale);
|
||||
const points = [
|
||||
[startX + model.drect * 2 * model.scale, (model.point.y + height)],
|
||||
[startX + model.drect * -2 * model.scale, (model.point.y + height) + height],
|
||||
[startX + model.drect * -2 * model.scale, (model.point.y + height) - height]
|
||||
[startX + model.drect * style.Train.trainHead.trainHeadArrowWidth * model.scale, (model.point.y + height)],
|
||||
[startX, (model.point.y + height) + height],
|
||||
[startX, (model.point.y + height) - height]
|
||||
];
|
||||
this.arrow = new Polygon({
|
||||
zlevel: model.zlevel,
|
||||
|
@ -90,11 +90,13 @@ export default {
|
||||
roleTypeNew:[
|
||||
{label: '管理员', value: 'ADMIN', enLabel: 'Admin '},
|
||||
{label: '教员', value: 'Instructor', enLabel: 'Instructor '},
|
||||
{label: '行调', value: 'DISPATCHER', enLabel: 'Dispatcher '},
|
||||
{label: '行值', value: 'STATION_SUPERVISOR', enLabel: 'Attendant '},
|
||||
{label: '观众', value: 'AUDIENCE', enLabel: 'Audience '},
|
||||
{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: [
|
||||
{ label: '实训', value: 'Training'},
|
||||
|
@ -98,12 +98,12 @@ export default {
|
||||
};
|
||||
this.iscsDestroy();
|
||||
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({
|
||||
dom: document.getElementById(this.iscsId),
|
||||
config: {
|
||||
renderer: 'canvas',
|
||||
width: this.canvasWidth,
|
||||
width: this.widthCanvas,
|
||||
height: this.canvasHeight
|
||||
},
|
||||
options: {
|
||||
|
@ -14,8 +14,9 @@
|
||||
<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 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="8"><div style="width: 100%; background: #FFF;">{{ deviceType }}</div></el-col>
|
||||
<el-col :span="6"><div style="width: 100%; background: #FFF;">{{ stationName }}</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 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>
|
||||
@ -92,11 +93,20 @@ export default {
|
||||
modeName: '',
|
||||
status: '',
|
||||
operation: 'home',
|
||||
deviceCode: '',
|
||||
deviceMap: {
|
||||
ManualAlarmButton:'手动报警按钮',
|
||||
SmokeDetector: '消火栓按钮',
|
||||
FireHydranAlarmButton: '点型火灾探测器',
|
||||
GasFireControl:'气体灭火控制器'
|
||||
GasFireControl:'气体灭火控制器',
|
||||
LightingGroup: '照明',
|
||||
Electrically: '',
|
||||
VolumeControlDamper: '电动风阀',
|
||||
SmookExhaustFd: '排烟防火阀',
|
||||
Ventilator: '普通风机',
|
||||
AirConditioner: '组合式空调机组',
|
||||
FireDamper: '防火阀',
|
||||
SmookProofFd: '防烟防火阀'
|
||||
},
|
||||
modeMap: {
|
||||
standFAS: '火灾报警',
|
||||
@ -142,17 +152,21 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
doShow(device) {
|
||||
this.deviceCode = '';
|
||||
this.deviceType = this.deviceMap[device._type];
|
||||
this.modeName = this.modeMap[this.$route.params.mode];
|
||||
this.stationName = this.$route.query.stationName;
|
||||
this.dialogShow = true;
|
||||
if (device._type === 'LightingGroup') {
|
||||
this.deviceCode = device.topContext.split(/[(\r\n)\r\n]+/)[0];
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
},
|
||||
clickEvent(type) {
|
||||
this.operation = type;
|
||||
this.operation = type;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -23,11 +23,15 @@ export default {
|
||||
const device = this.$store.state.iscs.selected;
|
||||
if (device && device._type === 'IscsButton' && device.function === 'PublicArea') {
|
||||
this.width = 1520;
|
||||
this.$refs.iscsPlate.show('12');
|
||||
this.$nextTick(() => {
|
||||
this.$refs.iscsPlate.show('12');
|
||||
});
|
||||
console.log(this.width);
|
||||
} else if (device && device._type === 'IscsButton' && device.function === 'GoBack') {
|
||||
this.width = 1100;
|
||||
this.$refs.iscsPlate.show('14');
|
||||
this.$nextTick(() => {
|
||||
this.$refs.iscsPlate.show('14');
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -45,6 +45,21 @@ export default {
|
||||
{graphicEle: 'smokeDetector', 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: {
|
||||
manualAlarm: ManualAlarm,
|
||||
fireHydrant: FireHydrant,
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div style="height: 100%; width: 100%;overflow-y: auto;">
|
||||
<standFAS v-if="mode == 'standFAS'" />
|
||||
<stationHallFAS v-else-if="mode == 'stationHallFAS'" />
|
||||
<systemFAS v-else-if="mode == 'systemFAS'" />
|
||||
<standFAS v-if="mode === 'standFAS'" />
|
||||
<stationHallFAS v-else-if="mode === 'stationHallFAS'" />
|
||||
<systemFAS v-else-if="mode === 'systemFAS'" />
|
||||
<home-screen v-else-if="mode === 'mainScreenPA'" />
|
||||
<main-screen v-else-if="mode === 'MainScreen'" />
|
||||
<lcd-control v-else-if="mode === 'LCDcontrol'" />
|
||||
@ -28,10 +28,10 @@
|
||||
<small-system v-else-if="mode==='smallSystem'" />
|
||||
<water-system v-else-if="mode==='waterSystem'" />
|
||||
<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'" />
|
||||
<water-supply v-else-if="mode === 'waterSupply'" />
|
||||
<graphic-ele ref="graphicEle" />
|
||||
<device-control ref="deviceControl" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -107,7 +107,20 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
mode: 'standFAS',
|
||||
deviceList: ['ManualAlarmButton', 'SmokeDetector', 'FireHydranAlarmButton', 'GasFireControl']
|
||||
deviceList: [
|
||||
'ManualAlarmButton',
|
||||
'SmokeDetector',
|
||||
'FireHydranAlarmButton',
|
||||
'GasFireControl',
|
||||
'LightingGroup',
|
||||
'Electrically',
|
||||
'VolumeControlDamper',
|
||||
'SmookExhaustFd',
|
||||
'Ventilator',
|
||||
'AirConditioner',
|
||||
'FireDamper',
|
||||
'SmookProofFd'
|
||||
]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -116,9 +129,10 @@ export default {
|
||||
},
|
||||
'$store.state.iscs.selectedCount': function() {
|
||||
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();
|
||||
} else if (this.deviceList.includes(device._type)) {
|
||||
} else if (device && this.deviceList.includes(device._type)) {
|
||||
this.$refs.deviceControl.doShow(device);
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
<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%;margin-top: 25px;">
|
||||
<div class="apply_box_title">报名成功!:<br> 您的赛事信息如下:
|
||||
<div class="apply_box_title">报名成功!<br> 您的赛事信息如下:
|
||||
<br>竞赛名称:{{ compition.name }}
|
||||
<br>竞赛时间:{{ compition.startDate }}
|
||||
<br>姓名:{{ formModel.name }}
|
||||
@ -85,7 +85,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template></div></template>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -16,7 +16,9 @@ import { mapGetters } from 'vuex';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import MenuReplay from './menuReplay';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { DeviceMenu, getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
|
||||
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
||||
export default {
|
||||
name:'RefereeDisplay',
|
||||
components: {
|
||||
@ -52,25 +54,49 @@ export default {
|
||||
},
|
||||
height() {
|
||||
return this.$store.state.app.height;
|
||||
},
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.mapViewLoadedCount': function (val) { // 地图视图加载完成标识 开始加载默认状态
|
||||
this.subscribe();
|
||||
this.mapBoxP = document.getElementById(this.canvasId).children[0];
|
||||
this.mapBoxP.style.cursor = '';
|
||||
},
|
||||
// 'size.width': function(val) {
|
||||
// this.setWindowSize();
|
||||
'$store.state.socket.equipmentStatus': function (val) {
|
||||
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() {
|
||||
this.setWindowSize();
|
||||
}
|
||||
},
|
||||
|
||||
async mounted() {
|
||||
window.onbeforeunload = this.clearSubscribe;
|
||||
await this.setWindowSize();
|
||||
await this.initLoadData();
|
||||
},
|
||||
async beforeDestroy() {
|
||||
this.clearSubscribe();
|
||||
await this.clearAllTimer();
|
||||
await this.quit();
|
||||
await this.$store.dispatch('training/reset');
|
||||
@ -81,6 +107,47 @@ export default {
|
||||
async 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() {
|
||||
this.$store.dispatch('training/reset');
|
||||
|
@ -82,7 +82,7 @@ export default {
|
||||
prop: 'theoryScore',
|
||||
width:100,
|
||||
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'; }
|
||||
},
|
||||
{
|
||||
@ -90,7 +90,7 @@ export default {
|
||||
prop: 'practiceScore',
|
||||
width:100,
|
||||
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'; }
|
||||
},
|
||||
{
|
||||
@ -119,13 +119,13 @@ export default {
|
||||
name: '理论结果',
|
||||
handleClick: this.handleTheoryResult,
|
||||
type: '',
|
||||
showControl: (row) => { return row.status == '5' || row.status == '4'; }
|
||||
showControl: (row) => { return row.status == '5' || row.status == '4' || row.theoryScore != undefined; }
|
||||
},
|
||||
{
|
||||
name: '实操回放',
|
||||
handleClick: this.playBack,
|
||||
type: '',
|
||||
showControl: (row) => { return row.status == '4'; }
|
||||
showControl: (row) => { return row.status == '4' || row.status == '6' || row.practiceScore != undefined; }
|
||||
},
|
||||
{
|
||||
name: '修改',
|
||||
@ -183,6 +183,17 @@ export default {
|
||||
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` });
|
||||
},
|
||||
covert(data) {
|
||||
if (data != undefined) {
|
||||
if (data > 0) {
|
||||
return data;
|
||||
} else {
|
||||
return '0';
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
|
@ -1,10 +1,12 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="title" :visible.sync="show" top="150px" width="900px" :before-do-close="doClose" :close-on-click-modal="false">
|
||||
<div v-for="(el,i) in sortedList" :id="'anchor__lst-'+i" :key="i" class="section">
|
||||
<template v-if="el.children.length">
|
||||
<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" />
|
||||
</template>
|
||||
<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">
|
||||
<template v-if="el.children.length">
|
||||
<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" />
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-left: 20px;margin-top: 20px;">
|
||||
<span>考试总分: </span>
|
||||
@ -13,9 +15,13 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import Question from '@/views/jsxt/competition/theory/question';
|
||||
import { getTheroyCompetitionResult } from '@/api/competition';
|
||||
export default {
|
||||
name:'TheroyResult',
|
||||
components:{
|
||||
Question
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title:'',
|
||||
@ -47,7 +53,7 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
doShow({row, raceId}) {
|
||||
this.loadInitData(raceId, row.userId);
|
||||
this.loadInitData(raceId, row.id);
|
||||
this.show = true;
|
||||
this.title = '【' + row.organization + '】' + row.name + ' 理论结果';
|
||||
},
|
||||
@ -55,6 +61,7 @@ export default {
|
||||
this.show = false;
|
||||
},
|
||||
loadInitData(raceId, userId) {
|
||||
this.examQuestions = [];
|
||||
getTheroyCompetitionResult(raceId, userId).then((resp)=>{
|
||||
if (resp.data) {
|
||||
resp.data.forEach((item, i) => {
|
||||
@ -67,3 +74,8 @@ export default {
|
||||
}
|
||||
};
|
||||
</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',
|
||||
practicalTime: 0,
|
||||
countdown: null,
|
||||
questionList: []
|
||||
questionList: [],
|
||||
practicalExamTime: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -392,15 +393,14 @@ export default {
|
||||
const paperResp = await getTestPaperDatail(this.$route.query.raceId);
|
||||
if (paperResp.data && paperResp.data.practicalQuestions) {
|
||||
this.questionList = [];
|
||||
this.practicalExamTime = paperResp.data.practicalExamTime;
|
||||
const storeKey = this.$store.state.user.id + '' + this.$route.query.raceId + 'practical';
|
||||
const startTime = localStore.get(storeKey);
|
||||
if (startTime) {
|
||||
const dt = new Date().getTime() - startTime;
|
||||
this.practicalTime = paperResp.data.practicalExamTime * 60 - Math.floor(dt / 1000);
|
||||
} else {
|
||||
this.practicalTime = paperResp.data.practicalExamTime * 60;
|
||||
const storeValue = new Date().getTime();
|
||||
localStore.set(storeKey, storeValue);
|
||||
this.practicalTime = this.practicalExamTime * 60;
|
||||
}
|
||||
this.countdownTime = this.computationTime(this.practicalTime);
|
||||
paperResp.data.practicalQuestions.forEach(elem => {
|
||||
@ -436,6 +436,12 @@ export default {
|
||||
}
|
||||
},
|
||||
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(() => {
|
||||
if (this.practicalTime <= 0) {
|
||||
if (this.countdown) {
|
||||
|
@ -75,7 +75,7 @@ import Vue from 'vue';
|
||||
import Cookies from 'js-cookie';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
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 {
|
||||
name: 'AddAction',
|
||||
components:{
|
||||
@ -451,20 +451,39 @@ export default {
|
||||
|
||||
} else {
|
||||
const actionId = this.modalData.actionVO.id;
|
||||
modifyScriptAction(group, actionId, 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}`);
|
||||
});
|
||||
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=>{
|
||||
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 {
|
||||
console.log('error submit!!');
|
||||
|
@ -20,7 +20,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<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> -->
|
||||
</div>
|
||||
</el-card>
|
||||
@ -158,8 +158,8 @@ export default {
|
||||
// memberVOList = memberVOList.replace(new RegExp(rolename, 'g'), element.label);
|
||||
// });
|
||||
// memberVOList = JSON.parse(memberVOList);
|
||||
const lastData = JSON.stringify(response.data);
|
||||
const memberVOList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
|
||||
const lastData = JSON.stringify(response.data.memberVOList);
|
||||
const memberVOList = this.covert(lastData, ConstConfig.ConstSelect.roleType);
|
||||
|
||||
const actionList = response.data.actionVOList;
|
||||
|
||||
@ -218,9 +218,7 @@ export default {
|
||||
this.loadInitData();
|
||||
},
|
||||
modifyAction(row) {
|
||||
if (!this.drawWay) {
|
||||
this.$emit('setAction', row);
|
||||
}
|
||||
this.$emit('setAction', row);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user