Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
4611c4b74b
@ -187,6 +187,15 @@ export function gernateRoutingSection(data) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 生成交路区段数据(运行图中)(新版)*/
|
||||
export function gernateRoutingSectionInRunplan(data) {
|
||||
return request({
|
||||
url: `/api/runPlan/userData/routing/path/generate`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/** 更新交路(新版)*/
|
||||
export function updateRoutingData(data) {
|
||||
return request({
|
||||
|
191
src/jlmap3d/edit/connect/specilDataSave.js
Normal file
191
src/jlmap3d/edit/connect/specilDataSave.js
Normal file
@ -0,0 +1,191 @@
|
||||
//import request from '@/utils/request';
|
||||
export function specilDataSave(data) {
|
||||
console.log(data);
|
||||
let postmap = {
|
||||
id:data.mapdata.id,
|
||||
mapId:data.mapdata.mapId,
|
||||
assets:"null",
|
||||
sections:"null",
|
||||
signals:"null",
|
||||
trains:"null",
|
||||
stands:"null",
|
||||
switchs:"null",
|
||||
others:"null",
|
||||
};
|
||||
|
||||
if(data.mapdata.sectionlist.sections== undefined){
|
||||
return postmap;
|
||||
}
|
||||
|
||||
|
||||
if(data == undefined){
|
||||
|
||||
return postmap;
|
||||
}else{
|
||||
|
||||
let specilModel = [
|
||||
{
|
||||
id:"1",
|
||||
name:"天府广场站",
|
||||
code:"Station72223",
|
||||
deviceType:"SimulationStation",
|
||||
type:"Station72223",
|
||||
url:"/MODEL/2020-12-23/119-45721.FBX"
|
||||
},
|
||||
{
|
||||
id:"2",
|
||||
name:"孵化园站",
|
||||
code:"Station95125",
|
||||
deviceType:"SimulationStation",
|
||||
type:"Station95125",
|
||||
url:"/MODEL/2020-12-23/117-12889.FBX"
|
||||
},
|
||||
{
|
||||
id:"3",
|
||||
name:"四河站",
|
||||
code:"Station62009",
|
||||
deviceType:"SimulationStation",
|
||||
type:"Station62009",
|
||||
url:"/MODEL/2020-12-23/118-99249.FBX"
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
data.assetManager.others = specilModel;
|
||||
|
||||
|
||||
let models = data.assetManager;
|
||||
console.log(data.assetManager);
|
||||
postmap.assets = JSON.stringify(models);
|
||||
|
||||
|
||||
//section隧道
|
||||
let sections = [];
|
||||
for(let i in data.mapdata.sectionlist.sections.datalist){
|
||||
|
||||
let section = {
|
||||
// uuid:data.mapdata.sectionlist.sections.modellist[i].uuid,
|
||||
code:data.mapdata.sectionlist.sections.datalist[i].code,
|
||||
name:data.mapdata.sectionlist.sections.datalist[i].name,
|
||||
lengthFact:null,
|
||||
standTrack:data.mapdata.sectionlist.sections.datalist[i].standTrack,
|
||||
rp:data.mapdata.sectionlist.sections.datalist[i].rp,
|
||||
lp:data.mapdata.sectionlist.sections.datalist[i].lp,
|
||||
railpoint:null,
|
||||
rail:data.mapdata.sectionlist.sections.datalist[i].rail,
|
||||
position:null,
|
||||
rotation:null,
|
||||
scale:null,
|
||||
}
|
||||
if(data.mapdata.sectionlist.sections.datalist[i].mesh){
|
||||
let nowmesh = data.mapdata.sectionlist.sectiongroup.getObjectByProperty("code",section.code);
|
||||
section.railpoint = nowmesh.railpoint;
|
||||
section.lengthFact = data.mapdata.sectionlist.sections.datalist[i].mesh.lengthFact;
|
||||
section.position = data.mapdata.sectionlist.sections.datalist[i].mesh.position;
|
||||
section.rotation = data.mapdata.sectionlist.sections.datalist[i].mesh.rotation;
|
||||
section.scale = data.mapdata.sectionlist.sections.datalist[i].mesh.scale;
|
||||
sections.push(section);
|
||||
}
|
||||
|
||||
// if(data.mapdata.sectionlist.sections.datalist[i].rsection){
|
||||
// section.rsection = data.mapdata.sectionlist.sections.datalist[i].rsection;
|
||||
// }
|
||||
// if(data.mapdata.sectionlist.sections.datalist[i].lsection){
|
||||
// section.lsection = data.mapdata.sectionlist.sections.datalist[i].lsection;
|
||||
// }
|
||||
// if(data.mapdata.sectionlist.sections.datalist[i].csection){
|
||||
// section.csection = data.mapdata.sectionlist.sections.datalist[i].csection;
|
||||
// }
|
||||
|
||||
// testmesh1.position.z = link.position.z;
|
||||
|
||||
|
||||
}
|
||||
let arrray = {
|
||||
section:sections,
|
||||
};
|
||||
postmap.sections = JSON.stringify(arrray);
|
||||
//道岔
|
||||
let switchs = [];
|
||||
|
||||
for(let i=0;i<data.mapdata.switchlist.switchs.datalist.length;i++){
|
||||
let switcha = {
|
||||
// uuid:data.mapdata.switchlist.switchs.modellist[i].uuid,
|
||||
code:data.mapdata.switchlist.switchs.datalist[i].code,
|
||||
name:data.mapdata.switchlist.switchs.datalist[i].name,
|
||||
pa:data.mapdata.switchlist.switchs.datalist[i].pa,
|
||||
pb:data.mapdata.switchlist.switchs.datalist[i].pb,
|
||||
pc:data.mapdata.switchlist.switchs.datalist[i].pc,
|
||||
position:data.mapdata.switchlist.switchs.modellist[i].position,
|
||||
rotation:data.mapdata.switchlist.switchs.modellist[i].rotation,
|
||||
scale:data.mapdata.switchlist.switchs.modellist[i].scale
|
||||
}
|
||||
switchs.push(switcha);
|
||||
}
|
||||
postmap.switchs = JSON.stringify(switchs);
|
||||
//信号
|
||||
let signals = [];
|
||||
for(let i=0;i<data.mapdata.signallist.list.length;i++){
|
||||
|
||||
|
||||
let signal = {
|
||||
// uuid:data.mapdata.signallist.list[i].mesh.uuid,
|
||||
name:data.mapdata.signallist.list[i].mesh.name,
|
||||
modelid:data.mapdata.signallist.list[i].mesh.modelid,
|
||||
code:data.mapdata.signallist.list[i].mesh.code,
|
||||
right:data.mapdata.signallist.list[i].mesh.right,
|
||||
position:data.mapdata.signallist.list[i].mesh.position,
|
||||
rotation:data.mapdata.signallist.list[i].mesh.rotation,
|
||||
scale:data.mapdata.signallist.list[i].mesh.scale
|
||||
}
|
||||
|
||||
signals.push(signal);
|
||||
}
|
||||
postmap.signals = JSON.stringify(signals);
|
||||
//车站
|
||||
let stands = [];
|
||||
|
||||
for(let i=0;i<data.mapdata.stationstandlist.list.length;i++){
|
||||
let station = {
|
||||
// uuid:data.mapdata.stationstandlist.list[i].uuid,
|
||||
code:data.mapdata.stationstandlist.list[i].code,
|
||||
name:data.mapdata.stationstandlist.list[i].name,
|
||||
// modelid:data.mapdata.stationstandlist.list[i].modelid,
|
||||
position:data.mapdata.stationstandlist.list[i].mesh.position,
|
||||
rotation:data.mapdata.stationstandlist.list[i].mesh.rotation,
|
||||
scale:data.mapdata.stationstandlist.list[i].mesh.scale,
|
||||
inside:data.mapdata.stationstandlist.list[i].inside,
|
||||
stands:data.mapdata.stationstandlist.list[i].stands,
|
||||
// direction1:{
|
||||
// name:data.mapdata.stationstandlist.list[i].direction1.name,
|
||||
// code:data.mapdata.stationstandlist.list[i].direction1.code
|
||||
// },
|
||||
// direction2:{
|
||||
// name:data.mapdata.stationstandlist.list[i].direction2.name,
|
||||
// code:data.mapdata.stationstandlist.list[i].direction2.code
|
||||
// }
|
||||
}
|
||||
stands.push(station);
|
||||
}
|
||||
postmap.stands = JSON.stringify(stands);
|
||||
//列车
|
||||
let trains = [];
|
||||
for(let i=0;i<data.assetloader.modellist.length;i++){
|
||||
if(data.assetloader.modellist[i].deviceType == "train"){
|
||||
let train = {
|
||||
id:data.assetloader.modellist[i].id,
|
||||
name:data.assetloader.modellist[i].name,
|
||||
deviceType:data.assetloader.modellist[i].deviceType,
|
||||
type:data.assetloader.modellist[i].type,
|
||||
assetUrl:data.assetloader.modellist[i].assetUrl
|
||||
}
|
||||
|
||||
trains.push(train);
|
||||
}
|
||||
}
|
||||
postmap.trains = JSON.stringify(trains);
|
||||
|
||||
return postmap;
|
||||
}
|
||||
|
||||
}
|
@ -114,7 +114,7 @@ export function jl3dEditorLoader(mapid,scope){
|
||||
jlmap3ddata.switchlist = new SwitchList();
|
||||
|
||||
jlmap3ddata.raillist = new RailList();
|
||||
|
||||
console.log(netdata);
|
||||
let sectiondata = JSON.parse(netdata.sections);
|
||||
let switchdata = JSON.parse(netdata.switchs);
|
||||
let signaldata = JSON.parse(netdata.signals);
|
||||
@ -150,11 +150,11 @@ export function jl3dEditorLoader(mapid,scope){
|
||||
});
|
||||
}else{
|
||||
loadEditAllAsset(jlmap3dasset);
|
||||
assetloader.setModelListOver(jlmap3dasset.sceneAssetList,5);
|
||||
assetloader.setModelListOver(jlmap3dasset.sceneAssetList,5,jlmap3dasset.others);
|
||||
assetloader.assetPromiseOver(scene)
|
||||
.then(function(data){
|
||||
// return jlmap3ddata.stationstandlist.initpromise(jlmap3ddata,mapdata.stationList,mapdata.stationStandList,scene,assetloader);
|
||||
return jlmap3ddata.stationstandlist.loadpromise(jlmap3ddata,standsdata,mapdata,scene,assetloader);
|
||||
return jlmap3ddata.stationstandlist.loadpromise(jlmap3ddata,standsdata,mapdata,scene,assetloader,jlmap3dasset.others);
|
||||
})
|
||||
.then(function(data){
|
||||
//console.log(data);
|
||||
|
@ -87,15 +87,13 @@ export function StationStandList() {
|
||||
resolve("loadedstation");
|
||||
});
|
||||
}
|
||||
this.loadpromise = function(jlmap3ddata,standsdata,jlmapdata,scene,assetloader){
|
||||
this.loadpromise = function(jlmap3ddata,standsdata,jlmapdata,scene,assetloader,otherStation){
|
||||
return new Promise(function(resolve, reject){
|
||||
// console.log(jlmap3ddata);
|
||||
let jlmapstationdata = jlmapdata.stationList;
|
||||
let jlmapstanddata = jlmapdata.stationStandList;
|
||||
// jlmapstationdata.splice(0,1);
|
||||
console.log(jlmapstationdata);
|
||||
// console.log(jlmapstationdata);
|
||||
for(let i=0;i<jlmapstationdata.length;i++){
|
||||
//|| jlmapstationdata[i].subheadDisplay == false
|
||||
if(jlmapstationdata[i].visible == false || jlmapstationdata[i].depot == true){
|
||||
jlmapstationdata.splice(i,1);
|
||||
i--;
|
||||
@ -103,10 +101,10 @@ export function StationStandList() {
|
||||
standsdata[i].code = jlmapstationdata[i].code;
|
||||
standsdata[i].name = jlmapstationdata[i].name;
|
||||
}
|
||||
// console.log(jlmapstationdata[i].subheadDisplay);
|
||||
}
|
||||
|
||||
console.log(standsdata);
|
||||
console.log(otherStation);
|
||||
// console.log(standsdata);
|
||||
console.log(assetloader.modellist);
|
||||
let stations = jlmap3ddata.stationstandlist.list;
|
||||
let num;
|
||||
let num2;
|
||||
@ -156,52 +154,81 @@ export function StationStandList() {
|
||||
}
|
||||
}
|
||||
newstationstand.stands = stands;
|
||||
if(newstationstand.stands.length<=2){
|
||||
let nowModelType = "normal";
|
||||
if(otherStation){
|
||||
for(let o=0;o<otherStation.length;o++){
|
||||
if(standsdata[i].code == otherStation[o].code){
|
||||
newstationmesh = assetloader.modelgroup[ otherStation[o].code];
|
||||
newstationstand.code = standsdata[i].code;
|
||||
newstationstand.name = standsdata[i].name;
|
||||
newstationstand.inside = standsdata[i].inside;
|
||||
|
||||
if(standsdata[i].inside == true){
|
||||
newstationmesh = assetloader.modellist[num].mesh.clone(true);
|
||||
}else{
|
||||
newstationmesh = assetloader.modellist[num2].mesh.clone(true);
|
||||
// console.log(standsdata[i]);
|
||||
newstationmesh.code = standsdata[i].code;
|
||||
newstationmesh.name = standsdata[i].name;
|
||||
newstationmesh.meshtype = "station";
|
||||
newstationmesh.position.x = standsdata[i].position.x;
|
||||
newstationmesh.position.y = standsdata[i].position.y;
|
||||
newstationmesh.position.z = standsdata[i].position.z;
|
||||
// newstationmesh.rotation.x = standsdata[i].rotation._x;
|
||||
// newstationmesh.rotation.y = standsdata[i].rotation._y;
|
||||
// newstationmesh.rotation.z = standsdata[i].rotation._z;
|
||||
newstationstand.mesh = newstationmesh;
|
||||
scope.group.add(newstationmesh);
|
||||
scope.list.push(newstationstand);
|
||||
nowModelType = "specil";
|
||||
}
|
||||
}
|
||||
// console.log(jlmapstanddata[j]);
|
||||
|
||||
newstationstand.code = standsdata[i].code;
|
||||
newstationstand.name = standsdata[i].name;
|
||||
newstationstand.inside = standsdata[i].inside;
|
||||
|
||||
// console.log(standsdata[i]);
|
||||
newstationmesh.code = standsdata[i].code;
|
||||
newstationmesh.name = standsdata[i].name;
|
||||
newstationmesh.meshtype = "station";
|
||||
newstationmesh.position.x = standsdata[i].position.x;
|
||||
newstationmesh.position.y = standsdata[i].position.y;
|
||||
newstationmesh.position.z = standsdata[i].position.z;
|
||||
// newstationmesh.rotation.x = standsdata[i].rotation._x;
|
||||
// newstationmesh.rotation.y = standsdata[i].rotation._y;
|
||||
// newstationmesh.rotation.z = standsdata[i].rotation._z;
|
||||
newstationstand.mesh = newstationmesh;
|
||||
scope.group.add(newstationmesh);
|
||||
scope.list.push(newstationstand);
|
||||
}else{
|
||||
newstationmesh = assetloader.modellist[num3].mesh.clone(true);
|
||||
// console.log(jlmapstanddata[j]);
|
||||
newstationstand.code = standsdata[i].code;
|
||||
newstationstand.name = standsdata[i].name;
|
||||
newstationstand.inside = standsdata[i].inside;
|
||||
// console.log(standsdata[i]);
|
||||
newstationmesh.code = standsdata[i].code;
|
||||
newstationmesh.name = standsdata[i].name;
|
||||
newstationmesh.position.x = standsdata[i].position.x;
|
||||
newstationmesh.position.y = standsdata[i].position.y;
|
||||
newstationmesh.position.z = standsdata[i].position.z;
|
||||
// newstationmesh.rotation.x = standsdata[i].rotation._x;
|
||||
// newstationmesh.rotation.y = standsdata[i].rotation._y;
|
||||
// newstationmesh.rotation.z = standsdata[i].rotation._z;
|
||||
newstationstand.mesh = newstationmesh;
|
||||
|
||||
scope.group.add(newstationmesh);
|
||||
scope.list.push(newstationstand);
|
||||
}
|
||||
if(nowModelType == "normal"){
|
||||
if(newstationstand.stands.length<=2){
|
||||
|
||||
if(standsdata[i].inside == true){
|
||||
newstationmesh = assetloader.modellist[num].mesh.clone(true);
|
||||
}else{
|
||||
newstationmesh = assetloader.modellist[num2].mesh.clone(true);
|
||||
}
|
||||
// console.log(jlmapstanddata[j]);
|
||||
|
||||
newstationstand.code = standsdata[i].code;
|
||||
newstationstand.name = standsdata[i].name;
|
||||
newstationstand.inside = standsdata[i].inside;
|
||||
|
||||
// console.log(standsdata[i]);
|
||||
newstationmesh.code = standsdata[i].code;
|
||||
newstationmesh.name = standsdata[i].name;
|
||||
newstationmesh.meshtype = "station";
|
||||
newstationmesh.position.x = standsdata[i].position.x;
|
||||
newstationmesh.position.y = standsdata[i].position.y;
|
||||
newstationmesh.position.z = standsdata[i].position.z;
|
||||
// newstationmesh.rotation.x = standsdata[i].rotation._x;
|
||||
// newstationmesh.rotation.y = standsdata[i].rotation._y;
|
||||
// newstationmesh.rotation.z = standsdata[i].rotation._z;
|
||||
newstationstand.mesh = newstationmesh;
|
||||
scope.group.add(newstationmesh);
|
||||
scope.list.push(newstationstand);
|
||||
}else{
|
||||
newstationmesh = assetloader.modellist[num3].mesh.clone(true);
|
||||
// console.log(jlmapstanddata[j]);
|
||||
newstationstand.code = standsdata[i].code;
|
||||
newstationstand.name = standsdata[i].name;
|
||||
newstationstand.inside = standsdata[i].inside;
|
||||
// console.log(standsdata[i]);
|
||||
newstationmesh.code = standsdata[i].code;
|
||||
newstationmesh.name = standsdata[i].name;
|
||||
newstationmesh.position.x = standsdata[i].position.x;
|
||||
newstationmesh.position.y = standsdata[i].position.y;
|
||||
newstationmesh.position.z = standsdata[i].position.z;
|
||||
// newstationmesh.rotation.x = standsdata[i].rotation._x;
|
||||
// newstationmesh.rotation.y = standsdata[i].rotation._y;
|
||||
// newstationmesh.rotation.z = standsdata[i].rotation._z;
|
||||
newstationstand.mesh = newstationmesh;
|
||||
|
||||
scope.group.add(newstationmesh);
|
||||
scope.list.push(newstationstand);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
scene.add(scope.group);
|
||||
resolve("loadedstation");
|
||||
|
@ -116,6 +116,7 @@ export function AssetLoader(){
|
||||
this.trainoffset = 0;
|
||||
|
||||
this.modellist = [];
|
||||
this.modelgroup = [];
|
||||
|
||||
this.materiallist = [];
|
||||
//初始化资源加载器
|
||||
@ -168,13 +169,22 @@ export function AssetLoader(){
|
||||
}
|
||||
|
||||
}
|
||||
this.setModelListOver = function (data,trainoffset){
|
||||
this.setModelListOver = function (data,trainoffset,others){
|
||||
if(trainoffset){
|
||||
scope.trainoffset = trainoffset;
|
||||
}
|
||||
if(others){
|
||||
let otherData = others;
|
||||
// console.log(data);
|
||||
for(let j=0;j<otherData.length;j++){
|
||||
let model = new AssetModel(otherData[j]);
|
||||
scope.modellist.push(otherData[j]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let modeldata = data;
|
||||
// console.log(data);
|
||||
|
||||
for(let j=0;j<modeldata.length;j++){
|
||||
let had = false;
|
||||
for(let i=0;i<scope.modellist.length;i++){
|
||||
@ -305,17 +315,17 @@ export function AssetLoader(){
|
||||
fbxpromise(signal)
|
||||
.then(function(data){
|
||||
////console.log(data);
|
||||
console.log("test");
|
||||
// console.log("test");
|
||||
return fbxpromise(train);
|
||||
})
|
||||
.then(function(data){
|
||||
////console.log(data);
|
||||
console.log("test");
|
||||
// console.log("test");
|
||||
return fbxpromise(station);
|
||||
})
|
||||
.then(function(data){
|
||||
////console.log(data);
|
||||
console.log("test");
|
||||
// console.log("test");
|
||||
return fbxpromise(wstation);
|
||||
})
|
||||
// .then(function(data){
|
||||
@ -328,17 +338,17 @@ export function AssetLoader(){
|
||||
// })
|
||||
.then(function(data){
|
||||
////console.log(data);
|
||||
console.log("defaultswitch1");
|
||||
// console.log("defaultswitch1");
|
||||
return fbxpromise(defaultswitch1);
|
||||
})
|
||||
.then(function(data){
|
||||
console.log("defaultswitch2");
|
||||
// console.log("defaultswitch2");
|
||||
////console.log(data);
|
||||
return fbxpromise(defaultswitch2);
|
||||
})
|
||||
.then(function(data){
|
||||
////console.log(data);
|
||||
console.log("autoswitchs");
|
||||
// console.log("autoswitchs");
|
||||
return fbxpromise(autoswitchs);
|
||||
})
|
||||
.then(function(data){
|
||||
@ -599,7 +609,6 @@ export function AssetLoader(){
|
||||
function fbxpromiseold(asset){
|
||||
return new Promise(function(resolve, reject){
|
||||
var loader = new THREE.FBXLoader();
|
||||
console.log(asset);
|
||||
loader.load( asset.assetUrl, function ( object ) {
|
||||
let mixer = new THREE.AnimationMixer( object );
|
||||
//object.traverse(function (node) {//获取其中对象
|
||||
@ -643,31 +652,34 @@ export function AssetLoader(){
|
||||
//object.traverse(function (node) {//获取其中对象
|
||||
// node.frustumCulled = true;
|
||||
//});
|
||||
console.log(asset);
|
||||
if(asset.type == "train"){
|
||||
if(asset.code){
|
||||
scope.modelgroup[asset.code] = object;
|
||||
}else{
|
||||
if(asset.type == "train"){
|
||||
|
||||
let realtrain = new THREE.Group();
|
||||
let j = object.children.length;
|
||||
for(j;j>0;j--){
|
||||
let name = "C"+j;
|
||||
for(let i=0;i<object.children.length;i++){
|
||||
if(object.children[i].name == name){
|
||||
let realtrain = new THREE.Group();
|
||||
let j = object.children.length;
|
||||
for(j;j>0;j--){
|
||||
let name = "C"+j;
|
||||
for(let i=0;i<object.children.length;i++){
|
||||
if(object.children[i].name == name){
|
||||
|
||||
object.children[i].position.x = object.children[i].position.x+scope.trainoffset;
|
||||
//object.children[i].position.y = j*10;
|
||||
realtrain.add(object.children[i]);
|
||||
i--;
|
||||
object.children[i].position.x = object.children[i].position.x+scope.trainoffset;
|
||||
//object.children[i].position.y = j*10;
|
||||
realtrain.add(object.children[i]);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
asset.mesh = realtrain;
|
||||
asset.animations = object.animations[0].tracks;
|
||||
|
||||
}else{
|
||||
asset.mesh = object;
|
||||
|
||||
}
|
||||
}
|
||||
console.log(realtrain);
|
||||
asset.mesh = realtrain;
|
||||
asset.animations = object.animations[0].tracks;
|
||||
|
||||
}else{
|
||||
asset.mesh = object;
|
||||
|
||||
}
|
||||
//object.scale.set(0.1,0.1,0.1);
|
||||
|
||||
resolve("fbxload");
|
||||
|
@ -70,11 +70,11 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
|
||||
let signaldata = JSON.parse(netdata.signals);
|
||||
let standsdata = JSON.parse(netdata.stands);
|
||||
let psddata = data.psdList;
|
||||
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,0);
|
||||
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,0,JSON.parse(netdata.assets).others);
|
||||
|
||||
assetloader.assetPromiseOver(sceneload)
|
||||
.then(function(data){
|
||||
return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"01");
|
||||
return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"01",JSON.parse(netdata.assets).others);
|
||||
})
|
||||
.then(function(data){
|
||||
return sectionlist.loadpromise(mapdata.sectionList,sectiondata.section,rails,scene,assetloader);
|
||||
|
@ -77,8 +77,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,1.3);
|
||||
assetloader.setModelListOver(JSON.parse(netdata.assets).sceneAssetList,1.3,JSON.parse(netdata.assets).others);
|
||||
// assetloader.setmodellistnew(netdata.assets);
|
||||
|
||||
|
||||
@ -88,7 +87,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
||||
//console.log(data);
|
||||
//,netdata.stands,mixers,actions,"0"
|
||||
|
||||
return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"02");
|
||||
return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"02",JSON.parse(netdata.assets).others);
|
||||
})
|
||||
.then(function(data){
|
||||
//console.log(data);
|
||||
|
@ -24,9 +24,6 @@ export function StationStandListN() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
for(let i=0;i<standsdata.length;i++){
|
||||
let newstationstand = new StationStandModel(standsdata[i]);
|
||||
|
||||
@ -136,13 +133,14 @@ export function StationStandListN() {
|
||||
});
|
||||
|
||||
}
|
||||
this.loadpromise = function(stationdata,standsdata,psddata,scene,assetloader,mixers,actionss,mode){
|
||||
this.loadpromise = function(stationdata,standsdata,psddata,scene,assetloader,mixers,actionss,mode,otherStation){
|
||||
return new Promise(function(resolve, reject){
|
||||
|
||||
let stations = stationdata;
|
||||
let selectmesh1;
|
||||
let selectmesh2;
|
||||
let selectmesh3;
|
||||
|
||||
for(let j=0;j<assetloader.modellist.length;j++){
|
||||
if(assetloader.modellist[j].type == "stationInside"){
|
||||
selectmesh1 = assetloader.modellist[j].mesh;
|
||||
@ -202,6 +200,8 @@ export function StationStandListN() {
|
||||
//
|
||||
// console.log(psddata);
|
||||
for(let i=0;i<standsdata.length;i++){
|
||||
|
||||
|
||||
let newstationstand = new StationStandModel(standsdata[i]);
|
||||
|
||||
|
||||
@ -220,21 +220,42 @@ export function StationStandListN() {
|
||||
let newstationmesh = null;
|
||||
let newclip =null;
|
||||
|
||||
if(standsdata[i].stands.length<=2){
|
||||
if(standsdata[i].inside == undefined){
|
||||
newstationmesh = selectmesh1.clone(true);
|
||||
newclip = selectmesh1.animations[ 0 ];
|
||||
}else if(standsdata[i].inside == true){
|
||||
newstationmesh = selectmesh1.clone(true);
|
||||
newclip = selectmesh1.animations[ 0 ];
|
||||
}else{
|
||||
newstationmesh = selectmesh2.clone(true);
|
||||
newclip = selectmesh2.animations[ 0 ];
|
||||
let nowModelType = "normal";
|
||||
if(otherStation){
|
||||
for(let o=0;o<otherStation.length;o++){
|
||||
if(standsdata[i].code == otherStation[o].code){
|
||||
let selectmeshother = assetloader.modelgroup[ otherStation[o].code];
|
||||
newstationmesh = selectmeshother;
|
||||
newclip = selectmeshother.animations[ 0 ];
|
||||
nowModelType = "specil";
|
||||
newstationmesh.traverse( function ( child ) {
|
||||
|
||||
if ( child.isMesh ) {
|
||||
child.renderOrder = 9;
|
||||
}
|
||||
|
||||
} );
|
||||
}
|
||||
}
|
||||
}else{
|
||||
newstationmesh = selectmesh3.clone(true);
|
||||
newclip = selectmesh3.animations[ 0 ];
|
||||
}
|
||||
if(nowModelType == "normal"){
|
||||
if(standsdata[i].stands.length<=2){
|
||||
if(standsdata[i].inside == undefined){
|
||||
newstationmesh = selectmesh1.clone(true);
|
||||
newclip = selectmesh1.animations[ 0 ];
|
||||
}else if(standsdata[i].inside == true){
|
||||
newstationmesh = selectmesh1.clone(true);
|
||||
newclip = selectmesh1.animations[ 0 ];
|
||||
}else{
|
||||
newstationmesh = selectmesh2.clone(true);
|
||||
newclip = selectmesh2.animations[ 0 ];
|
||||
}
|
||||
}else{
|
||||
newstationmesh = selectmesh3.clone(true);
|
||||
newclip = selectmesh3.animations[ 0 ];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
newstationmesh.code = standsdata[i].code;
|
||||
newstationmesh.name = standsdata[i].code;
|
||||
|
@ -35,12 +35,12 @@ export function TdtList() {
|
||||
if(stationData[k].stands[i].right == true){
|
||||
newmesh.rotation.y = -Math.PI/2;
|
||||
let pos = railData[sectionCode].lineleft.getPointAt(stopSections[sectionCode].rightStopPointOffset/stopSections[sectionCode].lengthFact);
|
||||
newmesh.position.set(pos.x+10,0,pos.z-3);
|
||||
newmesh.position.set(pos.x+10,0,pos.z-1.8);
|
||||
|
||||
}else{
|
||||
newmesh.rotation.y = Math.PI/2;
|
||||
let pos = railData[sectionCode].lineright.getPointAt(stopSections[sectionCode].rightStopPointOffset/stopSections[sectionCode].lengthFact);
|
||||
newmesh.position.set(pos.x-10,0,pos.z+3);
|
||||
newmesh.position.set(pos.x-10,0,pos.z+1.8);
|
||||
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '办理进路';
|
||||
@ -262,10 +262,10 @@ export default {
|
||||
commit() {
|
||||
if (this.row && this.row.canSetting) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode: this.row.code}, 1).then(({valid, operate})=>{
|
||||
commitOperate({operation:OperationEvent.Signal.arrangementRoute.confirm.operation}, {routeCode: this.row.code}, 1).then(({valid, operate})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$refs.passwordBox.doShow(operate);
|
||||
this.$refs.passwordBox.doShow({operation:OperationEvent.Signal.arrangementRoute.menu.operation});
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
|
@ -24,7 +24,7 @@ export default {
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '301', tip: '鼠标右键菜单选择【办理进路】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3011', tip: '鼠标左键选择进路名称【{3}】', val: '{4}' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【执行】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '3012', tip: '鼠标左键点击【执行】按钮' },
|
||||
{ deviceType: '04', orderNum: 4, operateCode: '301', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
@ -101,7 +101,7 @@ export default {
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2994', tip: '鼠标左键点击【总取消】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '2994', tip: '鼠标左键点击【{5}】按钮', codeType:'SIGNAL' }
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '2994', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
{ // 不生成实训
|
||||
@ -173,8 +173,7 @@ export default {
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '306', tip: '鼠标右键菜单选择【信号封锁】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '306', tip: '输入密码123,点击【确定】按钮' }
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '306', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -187,7 +186,7 @@ export default {
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键菜单选择【封锁】' },
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【封锁】' },
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
@ -202,8 +201,8 @@ export default {
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '307', tip: '鼠标右键菜单选择【信号解封】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '307', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '307', tip: '输入密码123,点击【确认】按钮' }
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '3072', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '307', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -216,8 +215,8 @@ export default {
|
||||
trainingType: 'Signal',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2992', tip: '鼠标左键菜单选择【解封】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确认】按钮' },
|
||||
{ deviceType: '04', orderNum: 1, operateCode: '2992', tip: '鼠标左键点击【解封】' },
|
||||
{ deviceType: '04', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '04', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{5}】', codeType:'SIGNAL' }
|
||||
]
|
||||
},
|
||||
@ -318,7 +317,7 @@ export default {
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1010', tip: '鼠标左键菜单选择【道岔定操】' },
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1010', tip: '鼠标左键点击【道岔定操】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1010', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
@ -346,8 +345,8 @@ export default {
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1020', tip: '鼠标左键菜单选择【道岔反操】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1020', tip: '鼠标左键点击【{7}】按钮', codeType:'SWITCH' }
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1020', tip: '鼠标左键点击【道岔反操】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1020', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -374,8 +373,8 @@ export default {
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'], // 现地操作
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键菜单选择【道岔单锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{{7}}】', codeType:'SWITCH' }
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键点击【道岔单锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -402,9 +401,9 @@ export default {
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1040', tip: '鼠标左键菜单选择【道岔解锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确认】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '1040', tip: '鼠标左键点击【{7}】按钮', codeType:'SWITCH' }
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '1040', tip: '鼠标左键点击【道岔解锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '1040', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -418,7 +417,7 @@ export default {
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '105', tip: '鼠标右键菜单选择【道岔封锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '105', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1051', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '105', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
@ -432,8 +431,8 @@ export default {
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '2991', tip: '鼠标左键菜单选择【封锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '2991', tip: '鼠标左键点击【{7}】按钮', codeType:'SWITCH' }
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【封锁】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '2991', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -447,8 +446,8 @@ export default {
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '106', tip: '鼠标右键菜单选择【道岔解封】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '106', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '106', tip: '输入密码123,点击【确认】按钮' }
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1062', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '106', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -461,9 +460,9 @@ export default {
|
||||
trainingType: 'Switch',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '2992', tip: '鼠标左键菜单选择【解封】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确认】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{7}】按钮', codeType:'SWITCH' }
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '2992', tip: '鼠标左键点击【解封】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{7}】', codeType:'SWITCH' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -477,8 +476,8 @@ export default {
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '02', orderNum: 1, operateCode: '109', tip: '鼠标右键菜单选择【区故解】' },
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '109', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '109', tip: '输入密码123,点击【确认】按钮' }
|
||||
{ deviceType: '02', orderNum: 2, operateCode: '1092', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '02', orderNum: 3, operateCode: '109', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 区段列表
|
||||
@ -493,8 +492,8 @@ export default {
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '402', tip: '鼠标右键菜单选择【区故解】' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '402', tip: '鼠标左键点击【确认】按钮' },
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '402', tip: '输入密码123,点击【确认】按钮' }
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '4023', tip: '鼠标左键点击【确定】按钮' },
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '402', tip: '输入密码123,点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -502,14 +501,14 @@ export default {
|
||||
minDuration: 8,
|
||||
operateType: CMD.Section.CMD_SECTION_FAULT_UNLOCK.value,
|
||||
skinCode: '04',
|
||||
trainingName: '区故解({9})',
|
||||
trainingName: '区故解({8}{9})',
|
||||
trainingRemark: '故障解锁功能',
|
||||
trainingType: 'Section',
|
||||
productTypes: ['01'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '4020', tip: '鼠标右键菜单选择【区故解】' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确认】按钮' },
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '4020', tip: '鼠标左键点击【{9}】', codeType:'SECTION' }
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '4020', tip: '鼠标左键点击【区故解】'},
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '0011', tip: '输入密码123,点击【确定】按钮' },
|
||||
{ deviceType: '03', orderNum: 3, operateCode: '4020', tip: '鼠标左键点击【{8}{9}】', codeType:'SECTION' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -523,7 +522,7 @@ export default {
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '03', orderNum: 1, operateCode: '410', tip: '鼠标右键菜单选择【属性】' },
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确认】按钮' }
|
||||
{ deviceType: '03', orderNum: 2, operateCode: '410', tip: '鼠标左键点击【确定】按钮' }
|
||||
]
|
||||
},
|
||||
// 站台列表
|
||||
|
@ -83,6 +83,9 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
return OperationEvent.Signal.unlock.confirm.domId;
|
||||
}
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
@ -276,8 +279,8 @@ export default {
|
||||
unlock() {
|
||||
switch (this.popClass) {
|
||||
case 'chengdou-03__systerm':
|
||||
this.sendCommandNext(menuOperate.Signal.unlock).then(operate => {
|
||||
this.$refs.password.doShow(operate);
|
||||
this.sendCommandNext({operation:OperationEvent.Signal.unlock.confirm.operation}).then(operate => {
|
||||
this.$refs.password.doShow({operation:OperationEvent.Signal.unlock.menu.operation});
|
||||
});
|
||||
break;
|
||||
default: this.sendCommand(menuOperate.Signal.unlock);
|
||||
|
@ -85,6 +85,9 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return OperationEvent.Section.fault.confirm.domId;
|
||||
}
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
@ -187,7 +190,7 @@ export default {
|
||||
// 区故解
|
||||
fault() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Section.fault.menu.operation
|
||||
operation: OperationEvent.Section.fault.confirm.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
@ -195,7 +198,7 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
this.$refs.passwordBox.doShow(operate);
|
||||
this.$refs.passwordBox.doShow({operation: OperationEvent.Section.fault.menu.operation});
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
|
@ -110,6 +110,13 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
||||
return OperationEvent.Switch.fault.confirm.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
return OperationEvent.Switch.unblock.confirm.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
||||
return OperationEvent.Switch.block.confirm.domId;
|
||||
}
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
@ -226,11 +233,10 @@ export default {
|
||||
block() {
|
||||
switch (this.popClass) {
|
||||
case 'chengdou-03__systerm':
|
||||
this.openPasswordBox(this.operation);
|
||||
this.openPasswordBox(OperationEvent.Switch.block);
|
||||
break;
|
||||
default: this.sendCommand(menuOperate.Switch.block);
|
||||
}
|
||||
|
||||
},
|
||||
// 道岔定位
|
||||
locate() {
|
||||
@ -260,7 +266,7 @@ export default {
|
||||
unblock() {
|
||||
switch (this.popClass) {
|
||||
case 'chengdou-03__systerm':
|
||||
this.openPasswordBox(this.operation);
|
||||
this.openPasswordBox(OperationEvent.Switch.unblock);
|
||||
break;
|
||||
default: this.sendCommand(menuOperate.Switch.unblock);
|
||||
}
|
||||
@ -269,7 +275,7 @@ export default {
|
||||
fault() {
|
||||
switch (this.popClass) {
|
||||
case 'chengdou-03__systerm':
|
||||
this.openPasswordBox(this.operation);
|
||||
this.openPasswordBox(OperationEvent.Switch.fault);
|
||||
break;
|
||||
default: this.sendCommand(menuOperate.Switch.fault);
|
||||
}
|
||||
@ -280,9 +286,9 @@ export default {
|
||||
},
|
||||
|
||||
// 打开密码输入框
|
||||
openPasswordBox(operation) {
|
||||
openPasswordBox(operator) {
|
||||
const operate = {
|
||||
operation: operation
|
||||
operation: operator.confirm.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
@ -290,7 +296,7 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.passwordBox.doShow(operate);
|
||||
this.$refs.passwordBox.doShow({operation:operator.menu.operation});
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
|
@ -38,7 +38,7 @@
|
||||
import axios from 'axios';
|
||||
import { update3dMapData } from '@/api/jlmap3d/load3ddata'
|
||||
import { initDataSave } from '@/jlmap3d/edit/connect/initDataSave';
|
||||
import { testgetmodels } from '@/jlmap3d/edit/connect/testgetmodels';
|
||||
import { specilDataSave } from '@/jlmap3d/edit/connect/specilDataSave';
|
||||
//components
|
||||
import EditProperty from '@/views/jlmap3d/edit/component/property';
|
||||
import EditAction from '@/views/jlmap3d/edit/component/action';
|
||||
@ -220,7 +220,7 @@
|
||||
savetest(){
|
||||
console.log(this.jlmap3dedit.assetManager);
|
||||
|
||||
let param = testgetmodels(this.jlmap3dedit);
|
||||
let param = specilDataSave(this.jlmap3dedit);
|
||||
console.log(param);
|
||||
update3dMapData(param).then(data => {
|
||||
//console.log(data);
|
||||
|
@ -19,7 +19,6 @@
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import { addTrainingRulesList } from '@/api/management/operation';
|
||||
// import { OperationList } from '@/scripts/OperationConfig';
|
||||
import { getLineCodeList } from '@/api/management/mapline';
|
||||
|
||||
export default {
|
||||
|
@ -485,12 +485,16 @@ export default {
|
||||
async handleTestRunPlan() {
|
||||
const data = { planId: this.$route.query.planId || this.loadRunPlanId };
|
||||
runPlanNotify(data).then(resp => {
|
||||
const query = {
|
||||
prdType: '01', group: resp.data, mapId: this.$route.query.mapId, planId: this.$route.query.planId
|
||||
};
|
||||
// this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
|
||||
this.$router.push({ path: UrlConfig.design.testRunPlan, query: query });
|
||||
launchFullscreen();
|
||||
if (resp.data) {
|
||||
const query = {
|
||||
prdType: '01', group: resp.data, mapId: this.$route.query.mapId, planId: this.$route.query.planId
|
||||
};
|
||||
// this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
|
||||
this.$router.push({ path: UrlConfig.design.testRunPlan, query: query });
|
||||
launchFullscreen();
|
||||
} else {
|
||||
this.$messageBox(this.$t('error.checkTheValidityFirst'));
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('tip.createSimulationFaild') + this.$t('global.colon') + error.message);
|
||||
});
|
||||
|
@ -41,7 +41,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.endStationColon')" prop="endStationCode">
|
||||
<!-- :disabled="!isStartSelected" -->
|
||||
<el-select v-model="addModel.endStationCode" clearable :filterable="true" disabled @change="changeEndStation">
|
||||
<el-select v-model="addModel.endStationCode" :filterable="true" disabled @change="changeEndStation">
|
||||
<el-option
|
||||
v-for="item in filterStationList"
|
||||
:key="item.code"
|
||||
@ -56,7 +56,7 @@
|
||||
>{{ $t('map.activate') }}</el-button> -->
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.endSectionColon')" prop="endSectionCode">
|
||||
<el-select v-model="addModel.endSectionCode" clearable :filterable="true" :disabled="editShow || !isStartSelected" @change="changeEndSection">
|
||||
<el-select v-model="addModel.endSectionCode" :filterable="true" clearable :disabled="editShow || !isStartSelected" @change="changeEndSection">
|
||||
<el-option
|
||||
v-for="item in filterSectionList"
|
||||
:key="item.code"
|
||||
@ -90,6 +90,7 @@
|
||||
<el-input v-model="addModel.remarks" type="textarea" :rows="4" :placeholder="$t('map.pleaseSelect')" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.trafficSegmentData')" prop="parkSectionCodeList">
|
||||
<el-button type="primary" size="small" :loading="generating" style="margin-bottom:10px" @click.native.prevent="generateParkSection">生成交路区段</el-button>
|
||||
<el-table
|
||||
:data="addModel.parkSectionCodeList"
|
||||
border
|
||||
@ -177,7 +178,7 @@
|
||||
<script>
|
||||
import RouteOperate from './routeOperate';
|
||||
import { setUID } from '@/jmapNew/utils/Uid';
|
||||
import { addRoutingData, updateRoutingData } from '@/api/jmap/mapdraft';
|
||||
import { addRoutingData, updateRoutingData, gernateRoutingSectionInRunplan } from '@/api/jmap/mapdraft';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { formatName } from '@/utils/runPlan';
|
||||
import Sortable from 'sortablejs';
|
||||
@ -194,6 +195,7 @@ export default {
|
||||
isStartSelected:false,
|
||||
allowSelect:false,
|
||||
loading: false,
|
||||
generating:false,
|
||||
stationCode: '',
|
||||
sectionCode: '',
|
||||
DirectionCodeList: [{label: '右行', value: true}, {label: '左行', value: false}],
|
||||
@ -368,6 +370,10 @@ export default {
|
||||
} else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() === 'endSectionCode'.toUpperCase()) {
|
||||
// selected.reentryTrack ||
|
||||
if (selected.standTrack || selected.transferTrack) {
|
||||
if (this.addModel.startSectionCode == selected.code) {
|
||||
this.$message.error('起始区段和终到区段不能相同');
|
||||
return false;
|
||||
}
|
||||
if (selected.belongStation) {
|
||||
this.addModel.endStationCode = selected.belongStation;
|
||||
}
|
||||
@ -451,12 +457,19 @@ export default {
|
||||
this.addEndSectionData(true);
|
||||
},
|
||||
changeEndSection(data) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](data);
|
||||
if (section.belongStation) {
|
||||
this.addModel.endStationCode = section.belongStation;
|
||||
if (data) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](data);
|
||||
if (section.belongStation) {
|
||||
this.addModel.endStationCode = section.belongStation;
|
||||
}
|
||||
this.addModel.destinationCode = section.destinationCode || '';
|
||||
this.judgeAllowSelected();
|
||||
this.addEndSectionData(false);
|
||||
} else {
|
||||
this.addModel.endStationCode = '';
|
||||
this.addModel.endSectionCode = '';
|
||||
this.addModel.parkSectionCodeList.pop();
|
||||
}
|
||||
this.judgeAllowSelected();
|
||||
this.addEndSectionData(false);
|
||||
},
|
||||
judgeAllowSelected() {
|
||||
if (this.addModel.startStationCode != '' && this.addModel.startSectionCode != '' && this.addModel.endStationCode != '' && this.addModel.endSectionCode != '') {
|
||||
@ -507,7 +520,7 @@ export default {
|
||||
});
|
||||
},
|
||||
save() {
|
||||
this.addModel;
|
||||
// this.addModel;
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
@ -603,11 +616,12 @@ export default {
|
||||
}
|
||||
} else {
|
||||
if (index < 0) {
|
||||
if (list.length >= 2) {
|
||||
list.splice(list.length - 1, 1, data);
|
||||
} else {
|
||||
list.push(data);
|
||||
}
|
||||
// debugger;
|
||||
// if (list.length >= 2) {
|
||||
// list.splice(list.length - 1, 1, data);
|
||||
// } else {
|
||||
list.push(data);
|
||||
// }
|
||||
} else {
|
||||
if (index == 0 && list.length >= 2) {
|
||||
this.addModel.endSectionCode = list[list.length - 1].sectionCode;
|
||||
@ -632,6 +646,22 @@ export default {
|
||||
this.sectionCode = '';
|
||||
this.stationCode = '';
|
||||
}
|
||||
},
|
||||
generateParkSection() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.generating = true;
|
||||
gernateRoutingSectionInRunplan(this.buildModel(setUID('Routing'))).then(resp => {
|
||||
this.generating = false;
|
||||
if (resp.data.parkSectionCodeList && resp.data.parkSectionCodeList.length > 2) {
|
||||
this.addModel.parkSectionCodeList = resp.data.parkSectionCodeList;
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$messageBox('生成交路区段数据失败: ' + error.message);
|
||||
this.generating = false;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -78,11 +78,11 @@ export default {
|
||||
handleClick: this.createCrewScheduling,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: '地图拷贝',
|
||||
handleClick: this.copyMapToOther,
|
||||
type: ''
|
||||
},
|
||||
// {
|
||||
// name: '地图拷贝',
|
||||
// handleClick: this.copyMapToOther,
|
||||
// type: ''
|
||||
// },
|
||||
{
|
||||
name: this.$t('global.delete'),
|
||||
handleClick: this.handleDelete,
|
||||
@ -157,9 +157,9 @@ export default {
|
||||
this.$message.success(this.$t('publish.addEveryRunjihuaSuccess'));
|
||||
}).catch(() => { });
|
||||
},
|
||||
copyMapToOther(index, row) {
|
||||
this.$refs.copyMap.doShow(row, this.queryForm.queryObject.mapId.config.data);
|
||||
},
|
||||
// copyMapToOther(index, row) {
|
||||
// this.$refs.copyMap.doShow(row, this.queryForm.queryObject.mapId.config.data);
|
||||
// },
|
||||
// 预览
|
||||
handleView(index, row) {
|
||||
const data = this.mapList.filter(elem => { return elem.id == row.mapId; })[0];
|
||||
|
@ -88,6 +88,13 @@ export default {
|
||||
return data.name.includes(value);
|
||||
},
|
||||
clickEvent(obj, data, ele, isReplace = false) {
|
||||
if (ele) {
|
||||
if ( ele.expanded) {
|
||||
ele.expanded = false;
|
||||
} else {
|
||||
ele.expanded = true;
|
||||
}
|
||||
}
|
||||
localStore.set('trainingPlatformCheckId' + this.filterSelect + this.userId + this.project, obj.key);
|
||||
this.mapId = obj.key.split('-')[0];
|
||||
if ( obj.type === 'Map') {
|
||||
|
Loading…
Reference in New Issue
Block a user