This commit is contained in:
joylink_cuiweidong 2020-08-06 19:34:46 +08:00
commit 849770ab0e
10 changed files with 87 additions and 39 deletions

View File

@ -103,7 +103,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
return; return;
} }
if(data.type == "Train_Hmi_3D"){ if(data.type == "Train_Hmi_3D"){
console.log(data.body);
updatestatus(data.body); updatestatus(data.body);
// if(data.body.trust){ // if(data.body.trust){

View File

@ -149,6 +149,15 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
moveanima.initlistnew(scope.modelmanager.switchmodel.mesh); moveanima.initlistnew(scope.modelmanager.switchmodel.mesh);
daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA"); daochamodel = scope.modelmanager.switchmodel.mesh.getObjectByName("DAOCHA");
if(scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao") && scope.stationtexture["devicelist"]){
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["devicelist"];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
}
if(scope.modelmanager.standmodel.mesh.getObjectByName("menkuangyanse") && scope.stationtexture["pingbimen"]){
scope.modelmanager.standmodel.mesh.getObjectByName("menkuangyanse").material.map =scope.stationtexture["pingbimen"];
scope.modelmanager.standmodel.mesh.getObjectByName("menkuangyanse").material.map.needsUpdate = true;
}
// scope.stationtexture // scope.stationtexture
animate(); animate();
}) })
@ -243,9 +252,13 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
scope.modelmanager.standmodel.action.time = 0; scope.modelmanager.standmodel.action.time = 0;
scope.modelmanager.standmodel.action.timeScale = 1; scope.modelmanager.standmodel.action.timeScale = 1;
scope.modelmanager.standmodel.action.play(); scope.modelmanager.standmodel.action.play();
console.log(data.standCode);
console.log(psdtexturemap);
if(psdtexturemap[data.code]){
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.code]];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]]; }
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
} }
if (data.type == "SECTION") { if (data.type == "SECTION") {
@ -316,6 +329,12 @@ export function Jl3dfaultdevice(dom,group,token,skinCode) {
scope.modelmanager.standmodel.action.time = 0; scope.modelmanager.standmodel.action.time = 0;
scope.modelmanager.standmodel.action.timeScale = 1; scope.modelmanager.standmodel.action.timeScale = 1;
scope.modelmanager.standmodel.action.play(); scope.modelmanager.standmodel.action.play();
if(psdtexturemap[data.code]){
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.code]];
scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;
}
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]]; // scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map =scope.stationtexture[psdtexturemap[data.standCode]];
// scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true; // scope.modelmanager.standmodel.mesh.getObjectByName("zhantaiming").material.map.needsUpdate = true;

View File

@ -69,7 +69,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
let signaldata = JSON.parse(netdata.signals); let signaldata = JSON.parse(netdata.signals);
let standsdata = JSON.parse(netdata.stands); let standsdata = JSON.parse(netdata.stands);
let psddata = data.psdList; let psddata = data.psdList;
console.log(standsdata);
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList); assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList);
// assetloader.setmodellistnew(netdata.assets); // assetloader.setmodellistnew(netdata.assets);

View File

@ -579,8 +579,8 @@ class SkinCode extends defaultStyle {
trainHSDATextFontSize: 8// 列车HDSA字号 trainHSDATextFontSize: 8// 列车HDSA字号
}, },
trainNumber: { trainNumber: {
targetCodePrefix: '000', // 目的地码前缀 targetCodePrefix: '00', // 目的地码前缀
defaultTargetCode: 'AAA', // 默认目的地码 defaultTargetCode: 'AA', // 默认目的地码
trainTargetTextAlign: 'left', // 车次号文字显示位置 trainTargetTextAlign: 'left', // 车次号文字显示位置
trainNumberOffset: { x: 1, y: 1}// 目的地码偏移量 trainNumberOffset: { x: 1, y: 1}// 目的地码偏移量
}, },

View File

@ -254,7 +254,7 @@ class Signal extends Group {
textVerticalAlign: 'middle' textVerticalAlign: 'middle'
}); });
if (isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) { if (this.style.Signal.lowButton.display) {
// 北京一号线现地 信号机点击按钮 // 北京一号线现地 信号机点击按钮
let lowButtonH = this.count * style.Signal.lamp.radiusR * 2; let lowButtonH = this.count * style.Signal.lamp.radiusR * 2;
if (drict == 1) { if (drict == 1) {
@ -595,13 +595,14 @@ class Signal extends Group {
setState(model) { setState(model) {
if (!this.isShowShape) return; if (!this.isShowShape) return;
const path = window.location.href;
this.recover(); this.recover();
/** 信号机进路按钮显示 */ /** 信号机进路按钮显示 */
if (isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) { if (isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) {
/** 终端信号机按钮 */ /** 终端信号机按钮 */
if (model.isRouteActive) { if (model.isRouteActive) {
this.setLowButtonActive(); this.setLowButtonActive();
} else if (!model.isRouteActive && isShowThePrdType(model.prdType, '03') && this.style.Signal.lowButton.display) { } else {
this.setLowButtonRecover(); this.setLowButtonRecover();
} }
model.isRouteSignal && this.setLowButtonShow(); model.isRouteSignal && this.setLowButtonShow();
@ -615,14 +616,15 @@ class Signal extends Group {
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(model.logicLight); // 信号正向开放 model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(model.logicLight); // 信号正向开放
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(model.logicLight); // 信号侧向开放 model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(model.logicLight); // 信号侧向开放
model.fault && this.fault();// 信号机故障 model.fault && this.fault();// 信号机故障
if (!path.includes('/map/draw')) {
// 联锁自动进路通过 // 联锁自动进路通过
model.fleetMode && this.setAutoRouteOpen(); model.fleetMode && this.setAutoRouteOpen();
// 联锁自动触发 // 联锁自动触发
if (model.ciControl) { if (model.ciControl) {
this.setAutoTriggerOpen(); this.setAutoTriggerOpen();
} else { } else {
!model.atsControl && this.setArtificialRouteClose(); /** 进路交人工控或自动控 */ !model.atsControl && this.setArtificialRouteClose(); /** 进路交人工控或自动控 */
}
} }
// 设置点灯类型 必须在最后设置不能放前面 logicLight 0 物理点灯 1 逻辑点灯 // 设置点灯类型 必须在最后设置不能放前面 logicLight 0 物理点灯 1 逻辑点灯
if (model.logicLight) { if (model.logicLight) {
@ -652,11 +654,16 @@ class Signal extends Group {
if (model.isRequestGuide) { if (model.isRequestGuide) {
this.lamps && this.lamps[0] && this.lamps[0].setAnimationStart(this.style.Signal.lamp.yellowColor); this.lamps && this.lamps[0] && this.lamps[0].setAnimationStart(this.style.Signal.lamp.yellowColor);
} }
const path = window.location.href; if (path.includes('/map/draw')) {
if (model.type == 'PASSING' && path.includes('/map/draw')) { if (model.type == 'PASSING') {
this.lamps && this.lamps.length && this.lamps.forEach(elem => { this.lamps && this.lamps.length && this.lamps.forEach(elem => {
elem.setColor(this.style.Signal.lamp.greenColor); elem.setColor(this.style.Signal.lamp.greenColor);
}); });
} else {
this.lamps && this.lamps.length && this.lamps.forEach(elem => {
elem.setColor(this.style.Signal.lamp.redColor);
});
}
} }
} }

View File

@ -93,7 +93,7 @@ export default {
focus: false, focus: false,
booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'signalApproachOnlyOne', 'signalApproachOnlyNpSwitch', booleanList: ['upRight', 'lockFirst', 'switchSingleHandle', 'signalApproachOnlyOne', 'signalApproachOnlyNpSwitch',
'routeNameUseEndOppositeSignalName', 'generateTbRoute', 'tbRouteNameUseEndOppositeSignalName', 'routeSignalAlwaysGreen', 'routeNameUseEndOppositeSignalName', 'generateTbRoute', 'tbRouteNameUseEndOppositeSignalName', 'routeSignalAlwaysGreen',
'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle', 'routeButton', 'overlapSettingByTrigger'], 'routeApartByOverlap', 'overlapOnlySwitch', 'overlapSwitchNpOnly', 'overlapSignalOppositeSwitchNpOnly', 'overlapOnlyOneSwitch', 'generateCycle', 'routeButton', 'overlapSettingByTrigger', 'generateFls'],
selectList: [], selectList: [],
numberList: ['overlapReleaseTime', 'routeReleaseTime'], numberList: ['overlapReleaseTime', 'routeReleaseTime'],
optionsMap: { optionsMap: {
@ -118,7 +118,8 @@ export default {
routeReleaseTime: '默认进路解锁时间', routeReleaseTime: '默认进路解锁时间',
generateCycle: '是否生成自动折返', generateCycle: '是否生成自动折返',
routeButton: '是否生成进路结束按钮', routeButton: '是否生成进路结束按钮',
overlapSettingByTrigger: '延续保护的建立方式:是-通过触发建立,否-随进路建立' overlapSettingByTrigger: '延续保护的建立方式:是-通过触发建立,否-随进路建立',
generateFls: '是否生成侧防:是-生成侧防,不要联动道岔,否-不生成侧防,用联动道岔'
} }
}; };
}, },
@ -209,7 +210,7 @@ export default {
instance.confirmButtonLoading = false; instance.confirmButtonLoading = false;
instance.confirmButtonText = '确定'; instance.confirmButtonText = '确定';
instance.dangerouslyUseHTMLString = true; instance.dangerouslyUseHTMLString = true;
instance.message = ` instance.message = `
<strong>生成并保存联锁关系成功</strong><br/> <strong>生成并保存联锁关系成功</strong><br/>
<span>生成自动信号数据${resp.data.autoSignalCount}</span><br/> <span>生成自动信号数据${resp.data.autoSignalCount}</span><br/>
<span>生成进路数据${resp.data.routeCount}</span><br/> <span>生成进路数据${resp.data.routeCount}</span><br/>

View File

@ -16,7 +16,7 @@
<jlmap-visual ref="jlmapVisual" :draft-show="draftShow" @onSelect="clickEvent" @onMenu="onContextmenu" /> <jlmap-visual ref="jlmapVisual" :draft-show="draftShow" @onSelect="clickEvent" @onMenu="onContextmenu" />
</div> </div>
<div class="map-draft" :class="{'hide': draftShow}"> <div class="map-draft" :class="{'hide': draftShow}">
<div class="btn_left_box" @click="clickRightBtn"><i class="el-icon-arrow-left" /></div> <div class="btn_left_box" @click="clickRightBtn"><i :class="draftShow?'el-icon-arrow-right':'el-icon-arrow-left'" /></div>
<div v-show="viewDraft == 'draft'" class="box"> <div v-show="viewDraft == 'draft'" class="box">
<map-operate <map-operate
ref="mapOperate" ref="mapOperate"

View File

@ -98,6 +98,11 @@
<el-button style="margin-left: 150px" type="primary" size="small" @click="setLogicOffset">设置</el-button> <el-button style="margin-left: 150px" type="primary" size="small" @click="setLogicOffset">设置</el-button>
</el-button-group> </el-button-group>
</el-collapse-item> </el-collapse-item>
<el-collapse-item title="设置道岔区段名称" name="6">
<el-button-group>
<el-button style="margin-left: 150px" type="primary" size="small" @click="setSwitchSectionName">设置</el-button>
</el-button-group>
</el-collapse-item>
</el-collapse> </el-collapse>
</div> </div>
</template> </template>
@ -162,6 +167,7 @@ export default {
...mapGetters('map', [ ...mapGetters('map', [
'sectionList', 'sectionList',
'stationList', 'stationList',
'switchList',
'stationStandList' 'stationStandList'
]) ])
}, },
@ -309,6 +315,22 @@ export default {
}); });
this.$emit('updateMapModel', models); this.$emit('updateMapModel', models);
this.$message.success('数据构建成功!'); this.$message.success('数据构建成功!');
},
setSwitchSectionName() {
const models = [];
this.switchList.forEach(item => {
const sectionAModel = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item.sectionACode));
const sectionBModel = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item.sectionBCode));
const sectionCModel = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item.sectionCCode));
sectionAModel.name = `${item.name}_A`;
sectionBModel.name = `${item.name}_B`;
sectionCModel.name = `${item.name}_C`;
models.push(sectionAModel);
models.push(sectionBModel);
models.push(sectionCModel);
});
this.$emit('updateMapModel', models);
this.$message.success('道岔区段设置成功!');
} }
} }
}; };

View File

@ -199,12 +199,12 @@ export default {
name: this.$t('map.mapData'), name: this.$t('map.mapData'),
item: [ item: [
{ prop: 'ciStation', label: this.$t('map.isCIStation'), type: 'checkbox'}, { prop: 'ciStation', label: this.$t('map.isCIStation'), type: 'checkbox'},
{ prop: 'centralized', label: this.$t('map.centralized'), type: 'checkbox', disabled:this.controlled }, { prop: 'centralized', label: '是否集中站', type: 'checkbox', disabled:this.controlled },
{ prop: 'zcCode', label: this.$t('map.zcCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList, isHidden: !this.isZcCode, disabled:true }, { prop: 'zcCode', label: this.$t('map.zcCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList, isHidden: !this.isZcCode, disabled:true },
{ prop: 'chargeStationCodeList', label: '管理车站列表:', type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.chargeStation, isHidden: !this.isZcCode }, { prop: 'chargeStationCodeList', label: '管理车站列表:', type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.chargeStation, isHidden: !this.isZcCode },
{ prop: 'relStationCodeList', label: '联锁站关联车站:', type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.relStationList, isHidden: !this.idCiStation}, { prop: 'relStationCodeList', label: '联锁站关联车站:', type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.relStationList, isHidden: !this.idCiStation},
{ prop: 'runPlanName', label: this.$t('map.stationRunPlanName'), type: 'input' }, { prop: 'runPlanName', label: this.$t('map.stationRunPlanName'), type: 'input' },
{ prop: 'jp', label: '车站编码', type: 'input' } { prop: 'jp', label: '车站简称', type: 'input' }
] ]
} }
} }
@ -308,22 +308,24 @@ export default {
} }
return lists; return lists;
}, },
changeCentralized(data) { changeCentralized(centralized) {
let list = []; let list = [];
if (!data) { // if (centralized) { //
this.editModel.chargeStationCodeList = []; const arr = this.setStationStand(this.editModel, this.editModel.code);
const arr = this.modifyChargeStation(); const arr1 = this.modifyChargeStation(this.editModel.code);
const arr1 = this.setStationStand(this.editModel, '');
list = [...arr, ...arr1]; list = [...arr, ...arr1];
} else { } else {
list = list.concat(this.setStationStand(this.editModel, this.editModel.code)); this.editModel.chargeStationCodeList = [];
// const arr = this.modifyChargeStation();
// const arr1 = this.setStationStand(this.editModel, '');
// list = [...arr, ...arr1];
} }
return list; return list;
}, },
modifyChargeStation() { modifyChargeStation(code = '') {
let list = []; let list = [];
this.chargeStation.forEach(station=>{ this.chargeStation.forEach(station=>{
list = list.concat(this.setStationStand(station, '')); list = list.concat(this.setStationStand(station, code));
}); });
return list; return list;
}, },
@ -383,9 +385,7 @@ export default {
this.$refs['dataform'].validate((valid) => { this.$refs['dataform'].validate((valid) => {
if (valid) { if (valid) {
const list = this.changeChargeStation(this.editModel.chargeStationCodeList); const list = this.changeChargeStation(this.editModel.chargeStationCodeList);
// if (this.editModel.centralized != this.selected.centralized) {
const centralizedList = this.changeCentralized(this.editModel.centralized); const centralizedList = this.changeCentralized(this.editModel.centralized);
// }
const models = [this.editModel, ...list, ...centralizedList]; const models = [this.editModel, ...list, ...centralizedList];
this.$emit('updateMapModel', models); this.$emit('updateMapModel', models);
} }

View File

@ -154,8 +154,8 @@ export default {
map: { map: {
name: this.$t('map.mapData'), name: this.$t('map.mapData'),
item: [ item: [
{ prop: 'deviceStationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList, disabled:true}, { prop: 'deviceStationCode', label: '所属设备集中站', type: 'select', optionLabel: 'name', optionValue: 'code', options: this.stationList, disabled:true},
{ prop: 'stationCode', label: this.$t('map.belongsStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, deviceChange: this.changeStation } { prop: 'stationCode', label: '所属车站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, deviceChange: this.changeStation }
] ]
} }
} }