Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
This commit is contained in:
commit
7a7690e898
@ -407,7 +407,17 @@ class SkinCode extends defaultStyle {
|
|||||||
trainBody: {
|
trainBody: {
|
||||||
trainBodyLineWidth: 0.1, // 车身line宽
|
trainBodyLineWidth: 0.1, // 车身line宽
|
||||||
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||||
specialTrainType: [], // 特殊列车类型需设置显示格式
|
specialTrainType: [
|
||||||
|
{
|
||||||
|
type: '03',
|
||||||
|
serviceNumber: 'M0',
|
||||||
|
nameFormat: 'serviceNumber:groupNumber'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: '02',
|
||||||
|
nameFormat: 'targetCode:groupNumber'
|
||||||
|
}
|
||||||
|
], // 特殊列车类型需设置显示格式
|
||||||
lrPadding: 4, // 两边间隔
|
lrPadding: 4, // 两边间隔
|
||||||
upPadding: 4, // 上边距离
|
upPadding: 4, // 上边距离
|
||||||
trainBodyFillColor: '#725A64', // 列车车身填充颜色
|
trainBodyFillColor: '#725A64', // 列车车身填充颜色
|
||||||
|
@ -369,7 +369,13 @@ class SkinCode extends defaultStyle {
|
|||||||
trainBody: {
|
trainBody: {
|
||||||
trainBodyLineWidth: 1, // 车身line宽
|
trainBodyLineWidth: 1, // 车身line宽
|
||||||
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||||
specialTrainType: [], // 特殊列车类型需设置显示格式
|
specialTrainType: [
|
||||||
|
{
|
||||||
|
type: '03',
|
||||||
|
serviceNumber: '---',
|
||||||
|
nameFormat: 'groupNumber:serviceNumber'
|
||||||
|
}
|
||||||
|
], // 特殊列车类型需设置显示格式
|
||||||
lrPadding: 4, // 两边间隔
|
lrPadding: 4, // 两边间隔
|
||||||
upPadding: 4, // 上边距离
|
upPadding: 4, // 上边距离
|
||||||
trainBodyFillColor: '#000099', // 列车车身填充颜色
|
trainBodyFillColor: '#000099', // 列车车身填充颜色
|
||||||
|
@ -320,6 +320,10 @@ class SkinCode extends defaultStyle {
|
|||||||
type: '03',
|
type: '03',
|
||||||
serviceNumber: 'MM',
|
serviceNumber: 'MM',
|
||||||
nameFormat: 'serviceNumber:groupNumber'
|
nameFormat: 'serviceNumber:groupNumber'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: '02',
|
||||||
|
nameFormat: 'targetCode:groupNumber'
|
||||||
}
|
}
|
||||||
], // 特殊列车类型需设置显示格式
|
], // 特殊列车类型需设置显示格式
|
||||||
lrPadding: 1, // 两边间隔
|
lrPadding: 1, // 两边间隔
|
||||||
|
@ -17,6 +17,13 @@ class EMouse extends Group {
|
|||||||
case '05': destinationText = '严重晚点'; break;
|
case '05': destinationText = '严重晚点'; break;
|
||||||
default: destinationText = '未知'; break;
|
default: destinationText = '未知'; break;
|
||||||
}
|
}
|
||||||
|
let trainType = '';
|
||||||
|
switch (this.device.model.type) {
|
||||||
|
case '01': trainType = '计划车'; break;
|
||||||
|
case '02': trainType = '头码车'; break;
|
||||||
|
case '03': trainType = '人工车'; break;
|
||||||
|
default: trainType = '未知'; break;
|
||||||
|
}
|
||||||
// 文字描述
|
// 文字描述
|
||||||
this.arrowText = new Text({
|
this.arrowText = new Text({
|
||||||
zlevel: this.device.model.zlevel,
|
zlevel: this.device.model.zlevel,
|
||||||
@ -24,7 +31,7 @@ class EMouse extends Group {
|
|||||||
style: {
|
style: {
|
||||||
x: this.device.model.point.x + 50,
|
x: this.device.model.point.x + 50,
|
||||||
y: this.device.model.point.y + 25,
|
y: this.device.model.point.y + 25,
|
||||||
text: `列车类型: 计划车\n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.runControlStatus == '01' ? '正常' : this.device.model.runControlStatus == '03' ? '跳停' : '扣车'}\n停稳状态: ${this.device.model.runStatus == '02' ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`,
|
text: `列车类型: ${trainType} \n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.runControlStatus == '01' ? '正常' : this.device.model.runControlStatus == '03' ? '跳停' : '扣车'}\n停稳状态: ${this.device.model.runStatus == '02' ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`,
|
||||||
textFill: '#000',
|
textFill: '#000',
|
||||||
textAlign: 'letf',
|
textAlign: 'letf',
|
||||||
textFont: 10 + 'px consolas',
|
textFont: 10 + 'px consolas',
|
||||||
|
@ -96,7 +96,7 @@ export default class TrainBody extends Group {
|
|||||||
textAlign: 'middle',
|
textAlign: 'middle',
|
||||||
textVerticalAlign: 'top'
|
textVerticalAlign: 'top'
|
||||||
}) : '';
|
}) : '';
|
||||||
let serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || style.Train.trainServer.defaultServiceNumber) + '';// 服务号(表号)
|
const serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || style.Train.trainServer.defaultServiceNumber) + '';// 服务号(表号)
|
||||||
const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode
|
const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode
|
||||||
?(model.directionCode||style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber)
|
?(model.directionCode||style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber)
|
||||||
:model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号
|
:model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号
|
||||||
@ -155,16 +155,6 @@ export default class TrainBody extends Group {
|
|||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
textVerticalAlign: 'top'
|
textVerticalAlign: 'top'
|
||||||
});
|
});
|
||||||
// 根据列车类型设置显示格式
|
|
||||||
if ( style.Train.trainBody.specialTrainType.length > 0) {
|
|
||||||
style.Train.trainBody.specialTrainType.some((item) =>{
|
|
||||||
if (model.type === item.type) {
|
|
||||||
serviceNumber = item.serviceNumber;
|
|
||||||
this.nameFormat = item.nameFormat;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.formatChangePosition(model, style);
|
this.formatChangePosition(model, style);
|
||||||
this.add(this.trainBodyBox);
|
this.add(this.trainBodyBox);
|
||||||
if (style.Train.common.haveTextHSDA) {
|
if (style.Train.common.haveTextHSDA) {
|
||||||
|
@ -19,6 +19,15 @@ export default class Train extends Group {
|
|||||||
this.fontSize = style.Train.common.useSelfText?style.Train.common.nameFontSize || style.Train.common.trainTextFontSize:model.nameFontSize || style.Train.common.nameFontSize || style.Train.common.trainTextFontSize;
|
this.fontSize = style.Train.common.useSelfText?style.Train.common.nameFontSize || style.Train.common.trainTextFontSize:model.nameFontSize || style.Train.common.nameFontSize || style.Train.common.trainTextFontSize;
|
||||||
this.newScale = this.fontSize / style.Train.common.trainTextFontSize;
|
this.newScale = this.fontSize / style.Train.common.trainTextFontSize;
|
||||||
this.nameFormat = style.Train.common.useSelfFormat?style.Train.trainBody.trainNameFormat:model.nameFormat || style.Train.trainBody.trainNameFormat;
|
this.nameFormat = style.Train.common.useSelfFormat?style.Train.trainBody.trainNameFormat:model.nameFormat || style.Train.trainBody.trainNameFormat;
|
||||||
|
if ( style.Train.trainBody.specialTrainType.length > 0) {
|
||||||
|
style.Train.trainBody.specialTrainType.some((item) =>{
|
||||||
|
if (model.type === item.type) {
|
||||||
|
this.nameFormat = item.nameFormat;
|
||||||
|
model.serviceNumber = item.serviceNumber?item.serviceNumber : model.serviceNumber;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
this.create();
|
this.create();
|
||||||
this.setState(model);
|
this.setState(model);
|
||||||
}
|
}
|
||||||
|
@ -291,7 +291,6 @@ export default {
|
|||||||
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
|
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.loading.close();
|
|
||||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -180,7 +180,6 @@ export default {
|
|||||||
await this.$store.dispatch('exam/setTotalTime', this.userExam.duration);
|
await this.$store.dispatch('exam/setTotalTime', this.userExam.duration);
|
||||||
await this.$store.dispatch('trainingList/setTrainingList', list);
|
await this.$store.dispatch('trainingList/setTrainingList', list);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.loading.close();
|
|
||||||
// 判断是否有考试权限,如果没有权限则跳到购买页面,否则报错
|
// 判断是否有考试权限,如果没有权限则跳到购买页面,否则报错
|
||||||
if (error.code === 500004) {
|
if (error.code === 500004) {
|
||||||
this.$confirm('无此课程的考试权限,请前往购买!', '提示', {
|
this.$confirm('无此课程的考试权限,请前往购买!', '提示', {
|
||||||
|
@ -258,12 +258,6 @@ export default {
|
|||||||
this.$refs.draftTrain.show({ event: '03', title: '删除自动生成实训' });
|
this.$refs.draftTrain.show({ event: '03', title: '删除自动生成实训' });
|
||||||
},
|
},
|
||||||
demoDisplay(index, node) {
|
demoDisplay(index, node) {
|
||||||
this.loading = this.$loading({
|
|
||||||
lock: true,
|
|
||||||
text: 'Loading',
|
|
||||||
spinner: 'el-icon-loading',
|
|
||||||
background: 'rgba(0, 0, 0, 0.7)'
|
|
||||||
});
|
|
||||||
trainingNotify({ trainingId: node.id }).then(resp => {
|
trainingNotify({ trainingId: node.id }).then(resp => {
|
||||||
/** 区分演示和正式,需要在演示时设置lessonId为0*/
|
/** 区分演示和正式,需要在演示时设置lessonId为0*/
|
||||||
const query = { group: resp.data, trainingId: node.id, lessonId: 0 };
|
const query = { group: resp.data, trainingId: node.id, lessonId: 0 };
|
||||||
@ -271,7 +265,6 @@ export default {
|
|||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||||
this.loading.close();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user