Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
BIN
src/assets/home_exam/exam1.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
src/assets/home_simulation/simulation1.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
src/assets/home_simulation/simulation2.png
Normal file
After Width: | Height: | Size: 200 KiB |
BIN
src/assets/home_simulation/simulation3.png
Normal file
After Width: | Height: | Size: 121 KiB |
BIN
src/assets/home_simulation/simulation4.png
Normal file
After Width: | Height: | Size: 270 KiB |
BIN
src/assets/home_simulation/simulation5.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
src/assets/home_teach/teach1.png
Normal file
After Width: | Height: | Size: 102 KiB |
@ -801,7 +801,7 @@ class Signal extends Group {
|
||||
});
|
||||
}
|
||||
}
|
||||
if ( model.level === 3 && !model.fleetMode) {
|
||||
if ( model.level === 3 && this.style.Signal.post.mainSignalVerColor && !model.fleetMode) {
|
||||
this.sigPost.setVerColor(this.style.Signal.post.mainSignalVerColor);
|
||||
} else if (model.level === 1 && this.style.Signal.post.closeSignalVerColor && !model.fleetMode) {
|
||||
this.sigPost.setVerColor(this.style.Signal.post.closeSignalVerColor);
|
||||
|
@ -141,6 +141,7 @@ const BoardManage = () => import('@/views/messageBoard/manage');
|
||||
const DraftLessonManage = () => import('@/views/teach/draftLessonManage');
|
||||
const OrganizationManage = () => import('@/views/organization/index');
|
||||
const RunPlanViewWindow = () => import('@/views/newMap/displayNew/demon/runPlanViewWindow');
|
||||
const SecondaryHome = () => import('@/views/trainingPlatform/secondaryHome');
|
||||
|
||||
// import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
|
||||
// import { getSessionStorage } from '@/utils/auth';
|
||||
@ -625,6 +626,11 @@ export const asyncRouter = [
|
||||
path: 'permission/:mapId',
|
||||
component: Package,
|
||||
hidden: true
|
||||
},
|
||||
{ // 二级home页面
|
||||
path: 'secondaryHome',
|
||||
component: SecondaryHome,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -2,10 +2,10 @@
|
||||
* 鼠标事件
|
||||
*/
|
||||
export const MouseEvent = {
|
||||
Left: 1,
|
||||
Right: 2,
|
||||
Wheel: 3
|
||||
}
|
||||
Left: 1,
|
||||
Right: 2,
|
||||
Wheel: 3
|
||||
};
|
||||
/**
|
||||
* 权限类型
|
||||
*/
|
||||
@ -194,7 +194,8 @@ export const UrlConfig = {
|
||||
course: '/trainingPlatform/course',
|
||||
practical: '/trainingPlatform/practical',
|
||||
permission: '/trainingPlatform/permission',
|
||||
pay: '/trainingPlatform/pay'
|
||||
pay: '/trainingPlatform/pay',
|
||||
secondaryHome: '/trainingPlatform/secondaryHome'
|
||||
},
|
||||
bank: {
|
||||
questionCreate: '/design/race/questionCreate',
|
||||
|
@ -102,10 +102,12 @@
|
||||
<el-input-number v-model="formModel[item.prop]" :min="item.min" :max="item.max" :label="item.label" :disabled="item.disabled" style="width: 140px" @change="((val)=>{deviceChange(val,item)})" />
|
||||
</template>
|
||||
<span style="padding-left: 1px;">{{ item.placeholder }}</span>
|
||||
<el-button v-if="item.button" type="primary" size="mini" style="margin-left: 20px;" @click="item.clickFunction">{{ item.buttonText }}</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-input-number v-model="formModel[item.firstLevel][item.secondLevel]" :min="item.min" :max="item.max" :label="item.label" :disabled="item.disabled" />
|
||||
<span style="padding-left: 1px;">{{ item.placeholder }}</span>
|
||||
<el-button v-if="item.button" type="primary" size="mini" style="margin-left: 20px;" @click="item.clickFunction">{{ item.buttonText }}</el-button>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@ -279,6 +281,21 @@
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="checkFieldType(item, 'lengthFact')">
|
||||
<div v-if="!item.isHidden" :key="item.prop" class="coordinate">
|
||||
<span class="title" :style="{width: item.width}">{{ item.label }}</span>
|
||||
<div class="point-section">
|
||||
<template v-for="(elem, j) in formModel[item.prop]">
|
||||
<div :key="j" style="overflow: hidden;">
|
||||
<el-form-item :label="elem.name" :prop="'logicLengthList[' + j + '].lengthFact'" label-width="20px">
|
||||
<el-input-number v-model="elem.lengthFact" :min="0" :precision="3" style="width: 120px;" /><span>米</span>
|
||||
<el-button v-if="!j" type="primary" size="mini" style="margin-left: 20px;" @click="item.mergeLength">合并长度</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</fieldset>
|
||||
</template>
|
||||
|
@ -53,6 +53,7 @@ class Model {
|
||||
this.belongStation = ''; // 所属车站
|
||||
this.rightAxleOffset = { x: 0, y: 0 };
|
||||
this.leftAxleOffset = { x: 0, y: 0 };
|
||||
this.logicLengthList = [];
|
||||
}
|
||||
SignalModel() {
|
||||
this._type = 'Signal';
|
||||
|
@ -315,19 +315,12 @@ export default {
|
||||
let startOffset = 0;
|
||||
const sectionMap = {};
|
||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||
const sectionModel = deepAssign({}, section);
|
||||
sectionModel.lengthFact = Number(sectionModel.logicSectionCodeList.reduce((pre, code) => pre + Number(this.$store.getters['map/getDeviceByCode'](code).lengthFact), 0).toFixed(3));
|
||||
models.push(sectionModel);
|
||||
section.logicSectionCodeList.forEach(sectionCode => {
|
||||
const logicSection = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
||||
sectionMap[logicSection.points[0].x + 's' + logicSection.points[0].y] = logicSection;
|
||||
});
|
||||
while (sectionMap[startPoint]) {
|
||||
const model = deepAssign({}, sectionMap[startPoint]);
|
||||
if (!model.lengthFact) {
|
||||
const length = section.lengthFact / section.logicSectionCodeList.length;
|
||||
model.lengthFact = length.toFixed(3);
|
||||
}
|
||||
model.logicSectionStartOffset = startOffset;
|
||||
model.logicSectionEndOffset = (model.lengthFact * 1000 + startOffset * 1000) / 1000;
|
||||
models.push(model);
|
||||
|
@ -7,7 +7,7 @@
|
||||
<div class="button_box">
|
||||
<el-button-group class="map-draft-group">
|
||||
<el-button type="primary" size="small" @click="edit">{{ $t('map.updateObj') }}</el-button>
|
||||
<el-button type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||
<el-button :disabled="editModel.type == '02'" type="danger" size="small" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
@ -206,13 +206,12 @@ export default {
|
||||
item: [
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.centralizedStationList, isHidden: this.isStationCodeDisabled },
|
||||
{ prop: 'belongStation', label: '所属车站:', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, isHidden: !this.editModel.standTrack && !this.editModel.reentryTrack && !this.editModel.transferTrack },
|
||||
{ prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter'), disabled: this.isStationCodeDisabled, isHidden: !this.isSwitchSectionType || !this.isCrossSectionType },
|
||||
{ prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter'), disabled: this.isStationCodeDisabled, isHidden: !this.isSwitchSectionType || !this.isCrossSectionType, button:true, clickFunction: this.divideLength, buttonText: '均分长度' },
|
||||
{ prop: 'logicLengthList', label: '逻辑区段实际长度:', type: 'lengthFact', isHidden: !this.isHasLogicPhysicalSection, mergeLength: this.mergeLength, width: '160px'},
|
||||
{ prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, max: this.maxLengthFact, isHidden: !this.isStopPointOffset }, // 左向停车点偏移量
|
||||
{ prop: 'rightStopPointOffset', label: this.$t('map.rightStopPointOffset'), type: 'number', min: 0, max: this.maxLengthFact, isHidden: !this.isStopPointOffset }, // 右向停车点偏移量
|
||||
{ prop: 'region', label: this.$t('map.sectionColon'), type: 'select', optionLabel: 'label', optionValue: 'value', options: this.regionList, isHidden: !this.sectionColonShow },
|
||||
{ prop: 'trainWindowCode', label: '关联车次窗', type: 'input', disabled: true, isHidden: !this.isSwitchSectionShow || !this.isCrossSectionType }
|
||||
// { prop: 'kmRangeLeft', label: this.$t('map.leftKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') },
|
||||
// { prop: 'kmRangeRight', label: this.$t('map.rightKilometerMark'), type: 'number', min: 0, placeholder: this.$t('map.meter') }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -228,20 +227,6 @@ export default {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
// var validateLeftStopPointOffset = (rule, value, callback) => {
|
||||
// if (value != this.editModel.rightStopPointOffset) {
|
||||
// callback();
|
||||
// } else {
|
||||
// callback(new Error('不能与右侧停车点一致'));
|
||||
// }
|
||||
// };
|
||||
// var validateRightStopPointOffset = (rule, value, callback) => {
|
||||
// if (value != this.editModel.leftStopPointOffset) {
|
||||
// callback();
|
||||
// } else {
|
||||
// callback(new Error('不能与左侧停车点一致'));
|
||||
// }
|
||||
// };
|
||||
const rules = {
|
||||
code: [
|
||||
{ required: true, message: this.$t('rules.selectEquipment'), trigger: 'change' }
|
||||
@ -252,14 +237,6 @@ export default {
|
||||
type: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterSectionType'), trigger: 'blur' }
|
||||
],
|
||||
// leftStopPointOffset: [
|
||||
// { required: true, message: this.$t('rules.pleaseEnterLeftStopPointOffset'), trigger: 'blur' },
|
||||
// { validator: validateLeftStopPointOffset, trigger: 'blur' }
|
||||
// ],
|
||||
// rightStopPointOffset: [
|
||||
// { required: true, message: this.$t('rules.rightStopPointOffset'), trigger: 'blur' },
|
||||
// { validator: validateRightStopPointOffset, trigger: 'blur' }
|
||||
// ],
|
||||
'destinationCodePoint.x': [
|
||||
{ required: true, message: this.$t('rules.destinationCodePointX'), trigger: 'blur' }
|
||||
],
|
||||
@ -367,7 +344,9 @@ export default {
|
||||
isStopPointOffset() {
|
||||
return this.editModel.type !== '04' && (this.editModel.reentryTrack || this.editModel.standTrack || this.editModel.transferTrack);
|
||||
},
|
||||
|
||||
isHasLogicPhysicalSection() { // 有逻辑区段的物理区段
|
||||
return this.editModel.type == '01' && this.editModel.logicSectionCodeList && this.editModel.logicSectionCodeList.length;
|
||||
},
|
||||
isLeftSectionButtonShow() {
|
||||
return this.field === 'leftSection';
|
||||
},
|
||||
@ -446,6 +425,7 @@ export default {
|
||||
this.clear();
|
||||
this.handleInit();
|
||||
this.activeName = 'first';
|
||||
this.handleLogicLengthList(selected);
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.oldPoint = JSON.parse(JSON.stringify(selected.points));
|
||||
this.oldLeftSectionCode = selected.leftSectionCode;
|
||||
@ -505,6 +485,30 @@ export default {
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
},
|
||||
handleLogicLengthList(selected) {
|
||||
if (selected.type === '01' && selected.logicSectionCodeList && selected.logicSectionCodeList.length) {
|
||||
const logicLengthList = [];
|
||||
selected.logicSectionCodeList.forEach(sectionCode => {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
||||
logicLengthList.push({code: section.code, name: section.name, lengthFact: section.lengthFact});
|
||||
});
|
||||
// this.$set(this.editModel, 'logicLengthList', logicLengthList);
|
||||
this.editModel.logicLengthList = [...logicLengthList];
|
||||
}
|
||||
},
|
||||
divideLength() {
|
||||
const logicLength = this.editModel.lengthFact / this.editModel.logicSectionCodeList.length;
|
||||
this.editModel.logicLengthList.forEach(logic => {
|
||||
logic.lengthFact = logicLength.toFixed(3);
|
||||
});
|
||||
},
|
||||
mergeLength() {
|
||||
let physicalLength = 0;
|
||||
this.editModel.logicLengthList.forEach(logic => {
|
||||
physicalLength += logic.lengthFact * 1000;
|
||||
});
|
||||
this.editModel.lengthFact = (physicalLength / 1000).toFixed(3);
|
||||
},
|
||||
addPoint(index) {
|
||||
const data = { x: 0, y: 0 };
|
||||
this.editModel.points.splice(index + 1, 0, data);
|
||||
@ -529,7 +533,6 @@ export default {
|
||||
const changeSectionList = this.handleOtherSectionChange(model);
|
||||
const changeStandList = this.handleRelevanceStand(model);
|
||||
models = [...changeSectionList, ...changeStandList];
|
||||
|
||||
this.$emit('updateMapModel', models);
|
||||
this.oldPoint = JSON.parse(JSON.stringify(model.points));
|
||||
this.oldLeftSectionCode = model.leftSectionCode;
|
||||
@ -540,6 +543,7 @@ export default {
|
||||
this.$message('还有属性未填写,修改未生效!');
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
// debugger;
|
||||
});
|
||||
},
|
||||
handleRelevanceStand(model) { // 站台轨关联站台调整 所属集中站
|
||||
@ -559,12 +563,13 @@ export default {
|
||||
let models = [model];
|
||||
const pointModel = [];
|
||||
const slope1 = (this.oldPoint[this.oldPoint.length - 1].y - this.oldPoint[0].y) / (this.oldPoint[this.oldPoint.length - 1].x - this.oldPoint[0].x);
|
||||
const logicLengthMap = {};
|
||||
this.editModel.logicLengthList.forEach(item => { logicLengthMap[item.code] = item.lengthFact; });
|
||||
this.sectionList.forEach(section => {
|
||||
if (section.parentCode == model.code && section.type == '02') { // 逻辑区段
|
||||
const copySection = deepAssign({}, section);
|
||||
copySection.stationCode = model.stationCode; // 给元素 子逻辑区段设置 设备集中站
|
||||
// const length = model.lengthFact / model.logicSectionCodeList.length;
|
||||
// copySection.lengthFact = length.toFixed(3);
|
||||
copySection.lengthFact = logicLengthMap[copySection.code];
|
||||
if (this.checkPointsCoincide(this.oldPoint[0], copySection.points[0])) {
|
||||
copySection.points[0] = model.points[0];
|
||||
}
|
||||
@ -595,24 +600,6 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (model.parentCode == copySection.code) { // 物理区段
|
||||
let lengthFact = copySection.logicSectionCodeList.filter(code => model.code != code).reduce((pre, code) => {
|
||||
const length = this.$store.getters['map/getDeviceByCode'](code).lengthFact;
|
||||
return pre + Number(length);
|
||||
}, 0);
|
||||
lengthFact += model.lengthFact;
|
||||
copySection.lengthFact = Number(lengthFact.toFixed(3)); // 自动获取 物理区段的 实际长度 是由逻辑区段相加
|
||||
const logicSectionCodeList = copySection.logicSectionCodeList;
|
||||
const last = deepAssign({}, this.$store.getters['map/getDeviceByCode'](logicSectionCodeList[logicSectionCodeList.length - 1]));
|
||||
last.logicSectionEndOffset = copySection.lengthFact;
|
||||
models.push(last);
|
||||
if (copySection.lengthFact > 5) {
|
||||
copySection.leftStopPointOffset = copySection.leftStopPointOffset || 5;
|
||||
copySection.rightStopPointOffset = copySection.rightStopPointOffset || copySection.lengthFact - 5;
|
||||
}
|
||||
updataFlag = true;
|
||||
}
|
||||
if (this.checkPointsCoincide(this.oldPoint[0], section.points[section.points.length - 1])) {
|
||||
pointModel.push(copySection);
|
||||
}
|
||||
@ -643,20 +630,10 @@ export default {
|
||||
}
|
||||
});
|
||||
|
||||
if (!model.parentCode) {
|
||||
if (model.type === '01') {
|
||||
const arr = this.setLogicOffset(model, models);
|
||||
models = [...models, ...arr];
|
||||
} else {
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](model.parentCode);
|
||||
let arr = [];
|
||||
if (sectionModel) {
|
||||
arr = this.setLogicOffset(sectionModel, models);
|
||||
} else {
|
||||
arr = this.setLogicOffset(model, models);
|
||||
}
|
||||
models = [...models, ...arr];
|
||||
}
|
||||
|
||||
return models;
|
||||
},
|
||||
selectSectionCode(code, list) {
|
||||
@ -681,10 +658,6 @@ export default {
|
||||
});
|
||||
while (sectionMap[startPoint]) {
|
||||
const model = sectionMap[startPoint].deepFlag ? sectionMap[startPoint] : deepAssign({}, sectionMap[startPoint]);
|
||||
if (!model.lengthFact) {
|
||||
const length = section.lengthFact / section.logicSectionCodeList.length;
|
||||
model.lengthFact = length.toFixed(3);
|
||||
}
|
||||
model.logicSectionStartOffset = startOffset;
|
||||
const lastData = Object.keys(sectionMap);
|
||||
const temp = lastData[lastData.length - 1];
|
||||
|
101
src/views/trainingPlatform/secondaryHome.vue
Normal file
@ -0,0 +1,101 @@
|
||||
<template>
|
||||
<div class="joylink-card">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<div class="content_box">
|
||||
<h1 class="title">{{ title }}</h1>
|
||||
<div class="card-box">
|
||||
<el-carousel :interval="4000" type="card" height="380px">
|
||||
<el-carousel-item v-for="(item, index) in listImg" :key="index">
|
||||
<img :src="item.src" alt="" height="100%" width="100%">
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</div>
|
||||
<!--<div class="brief-box">{{ $t('demonstration.simulationSystemDescription') }}</div>-->
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import simulation1 from '@/assets/home_simulation/simulation1.png';
|
||||
import simulation2 from '@/assets/home_simulation/simulation2.png';
|
||||
import simulation3 from '@/assets/home_simulation/simulation3.png';
|
||||
import simulation4 from '@/assets/home_simulation/simulation4.png';
|
||||
import simulation5 from '@/assets/home_simulation/simulation5.png';
|
||||
import teach1 from '@/assets/home_teach/teach1.png';
|
||||
import exam1 from '@/assets/home_exam/exam1.png';
|
||||
|
||||
export default {
|
||||
name: 'SecondaryHome',
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
simulationImgList: [
|
||||
{ src: simulation1 },
|
||||
{ src: simulation2 },
|
||||
{ src: simulation3 },
|
||||
{ src: simulation4 },
|
||||
{ src: simulation5 }
|
||||
],
|
||||
teachImgList: [
|
||||
{ src: teach1 }
|
||||
],
|
||||
examImgList: [
|
||||
{ src: exam1 }
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
listImg() {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
/deep/ .el-carousel {
|
||||
overflow: hidden;
|
||||
width:100%;
|
||||
}
|
||||
.joylink-card{
|
||||
height: 100%;
|
||||
font-family: 'Microsoft YaHei';
|
||||
overflow: hidden;
|
||||
.content_box{
|
||||
padding: 0 100px 15px;
|
||||
}
|
||||
.title {
|
||||
font-size: 35px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
margin-top: 55px;
|
||||
border-bottom: 2px dashed #333;
|
||||
padding-bottom: 15px;
|
||||
margin-bottom: 70px;
|
||||
position: relative;
|
||||
|
||||
.logo-img {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 55px;
|
||||
}
|
||||
}
|
||||
|
||||
.card-box {
|
||||
width: 100%;
|
||||
padding: 0 50px;
|
||||
}
|
||||
|
||||
.brief-box {
|
||||
font-size: 18px;
|
||||
text-indent: 2em;
|
||||
line-height: 32px;
|
||||
padding: 40px 20px 0;
|
||||
font-family: unset;
|
||||
}
|
||||
}
|
||||
</style>
|