Merge branch 'test'
@ -68,7 +68,6 @@ export function Jlmap3ddata(mapid,scope){
|
||||
//
|
||||
jlmap3ddata.raillist = new RailList();
|
||||
jlmap3ddata.raillist.setrail();
|
||||
console.log(mapdata);
|
||||
assetloader.assetinit(scene)
|
||||
.then(function(data){
|
||||
//console.log(data);
|
||||
@ -100,7 +99,6 @@ export function Jlmap3ddata(mapid,scope){
|
||||
console.log(netdata);
|
||||
// console.log(netdata)
|
||||
getMapDetail(mapid).then(data => {
|
||||
console.log(data);
|
||||
jlmap3ddata.id = netdata.id;
|
||||
jlmap3ddata.mapId = mapid;
|
||||
let mapdata = data.data;
|
||||
@ -121,7 +119,7 @@ export function Jlmap3ddata(mapid,scope){
|
||||
let signaldata = JSON.parse(netdata.signals);
|
||||
let standsdata = JSON.parse(netdata.stands);
|
||||
// console.log(mapdata);
|
||||
assetloader.setmodellist(netdata.assets,5);
|
||||
assetloader.setmodellistnew(netdata.assets,5);
|
||||
assetloader.assetpromise(scene)
|
||||
.then(function(data){
|
||||
// return jlmap3ddata.stationstandlist.initpromise(jlmap3ddata,mapdata.stationList,mapdata.stationStandList,scene,assetloader);
|
||||
|
@ -148,6 +148,7 @@ export function getmodels(data) {
|
||||
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,
|
||||
direction1:{
|
||||
name:data.mapdata.stationstandlist.list[i].direction1.name,
|
||||
code:data.mapdata.stationstandlist.list[i].direction1.code
|
||||
|
@ -873,7 +873,6 @@ export function SectionList() {
|
||||
autorail.leftlist = leftlist;
|
||||
scene.add(scope.sectiongroup);
|
||||
return new Promise(function(resolve, reject){
|
||||
console.log(sectiondata);
|
||||
for(let i=0,leni = sectiondata.length;i<leni;i++){
|
||||
let newsection = {
|
||||
code:sectiondata[i].code,
|
||||
|
@ -29,10 +29,8 @@ export function SignalList() {
|
||||
}
|
||||
}
|
||||
for(let i=0;i<data.length;i++){
|
||||
console.log(data[i]);
|
||||
if(data[i].virtual == false){
|
||||
let newsignal = new SignalModel(data[i]);
|
||||
console.log();
|
||||
if(haddata == false){
|
||||
// console.log(data[i])
|
||||
let newmesh = assetloader.modellist[num].mesh.clone(true);
|
||||
@ -132,8 +130,6 @@ export function SignalList() {
|
||||
|
||||
this.loadpromise = function(signaldata,scene,assetloader,data){
|
||||
return new Promise(function(resolve, reject){
|
||||
console.log("+++++++++++++++++++++++++++++++++++++");
|
||||
console.log(signaldata);
|
||||
let num;
|
||||
for(let j=0;j<assetloader.modellist.length;j++){
|
||||
if(assetloader.modellist[j].id == signaldata[0].modelid){
|
||||
@ -177,7 +173,6 @@ export function SignalList() {
|
||||
}
|
||||
|
||||
}
|
||||
console.log(scope.group.children);
|
||||
scene.add(scope.group);
|
||||
resolve("loadedsignal");
|
||||
});
|
||||
|
@ -157,10 +157,14 @@ export function StationStandList() {
|
||||
}
|
||||
this.loadpromise = function(jlmap3ddata,standsdata,jlmapstanddata,scene,assetloader){
|
||||
return new Promise(function(resolve, reject){
|
||||
|
||||
console.log("............");
|
||||
console.log(jlmap3ddata);
|
||||
console.log(standsdata);
|
||||
console.log(jlmapstanddata);
|
||||
let stations = jlmap3ddata.stationstandlist.list;
|
||||
let num;
|
||||
let num2;
|
||||
let num3;
|
||||
for(let j=0;j<assetloader.modellist.length;j++){
|
||||
if(assetloader.modellist[j].deviceType == "stand"){
|
||||
num = j;
|
||||
@ -169,6 +173,10 @@ export function StationStandList() {
|
||||
num2 = j;
|
||||
// assetloader.modellist[num2].mesh.rotation.y = Math.PI/2;
|
||||
}
|
||||
if(assetloader.modellist[j].deviceType == "station3"){
|
||||
num3 = j;
|
||||
// assetloader.modellist[num2].mesh.rotation.y = Math.PI/2;
|
||||
}
|
||||
}
|
||||
// console.log("+++++++++++++");
|
||||
// console.log(jlmapstanddata);
|
||||
@ -177,31 +185,60 @@ export function StationStandList() {
|
||||
let newstationstand = new StationStandModel(standsdata[i]);
|
||||
let newstationmesh;
|
||||
for(let j=0;j<jlmapstanddata.length;j++){
|
||||
if(jlmapstanddata[j].code == standsdata[i].direction1.code){
|
||||
if(jlmapstanddata[j].inside == true){
|
||||
newstationmesh = assetloader.modellist[num].mesh.clone(true);
|
||||
}else{
|
||||
console.log(jlmapstanddata[j]);
|
||||
newstationmesh = assetloader.modellist[num2].mesh.clone(true);
|
||||
}
|
||||
// console.log(jlmapstanddata[j]);
|
||||
newstationstand.code = standsdata[i].code;
|
||||
newstationstand.name = standsdata[i].name;
|
||||
newstationstand.direction1.code = standsdata[i].direction1.code;
|
||||
newstationstand.direction1.name = standsdata[i].direction1.name;
|
||||
newstationstand.direction2.code = standsdata[i].direction2.code;
|
||||
newstationstand.direction2.name = standsdata[i].direction2.name;
|
||||
// console.log(standsdata[i]);
|
||||
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);
|
||||
j = jlmapstanddata.length;
|
||||
|
||||
|
||||
if(jlmapstanddata[j].code == standsdata[i].direction1.code){
|
||||
if(standsdata[i].code != "Station96090"){
|
||||
if(jlmapstanddata[j].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.direction1.code = standsdata[i].direction1.code;
|
||||
newstationstand.direction1.name = standsdata[i].direction1.name;
|
||||
newstationstand.direction2.code = standsdata[i].direction2.code;
|
||||
newstationstand.direction2.name = standsdata[i].direction2.name;
|
||||
newstationstand.inside = jlmapstanddata[j].inside;
|
||||
// console.log(standsdata[i]);
|
||||
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);
|
||||
j = jlmapstanddata.length;
|
||||
}else{
|
||||
if(jlmapstanddata[j].code == standsdata[i].direction1.code){
|
||||
|
||||
newstationmesh = assetloader.modellist[num3].mesh.clone(true);
|
||||
// console.log(jlmapstanddata[j]);
|
||||
newstationstand.code = standsdata[i].code;
|
||||
newstationstand.name = standsdata[i].name;
|
||||
newstationstand.direction1.code = standsdata[i].direction1.code;
|
||||
newstationstand.direction1.name = standsdata[i].direction1.name;
|
||||
newstationstand.direction2.code = standsdata[i].direction2.code;
|
||||
newstationstand.direction2.name = standsdata[i].direction2.name;
|
||||
newstationstand.inside = jlmapstanddata[j].inside;
|
||||
// console.log(standsdata[i]);
|
||||
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);
|
||||
j = jlmapstanddata.length;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,6 @@ export function SwitchList() {
|
||||
|
||||
}
|
||||
|
||||
console.log(scope.switchs.modellist);
|
||||
resolve("loadedswitch");
|
||||
});
|
||||
|
||||
|
@ -74,6 +74,8 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
this.assetloader = new AssetLoader();
|
||||
// 替换材质组,例:信号机不同灯光
|
||||
this.materiallist = [];
|
||||
//替换材质组(站台的)
|
||||
this.stationtexture = [];
|
||||
// 初始化场景线框和灯光 暂时
|
||||
SetLights(scene);
|
||||
// 点击选中的模型
|
||||
@ -138,7 +140,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
// controls3.getObject().rotation.x = Math.PI/2;
|
||||
scene.add(controls3.getObject());
|
||||
|
||||
let cameracctv = new THREE.PerspectiveCamera(70, dom.clientWidth/dom.clientHeight, 1, 50);
|
||||
let cameracctv = new THREE.PerspectiveCamera(60, dom.clientWidth/dom.clientHeight, 1, 40);
|
||||
cameracctv.position.set( 2, -1,27 );
|
||||
|
||||
cameracctv.rotation.y = Math.PI/2;
|
||||
|
@ -365,49 +365,93 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
|
||||
function traindoorupdate(data){
|
||||
|
||||
if(trainmodel.code == data.code){
|
||||
if(trainmodel.right == "0"){
|
||||
if(data.doorCode == "2"){
|
||||
|
||||
if(data.doorCode == "0"){
|
||||
if(trainmodel.open != data.open && data.open == "0"){
|
||||
trainmodel.open = "0";
|
||||
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
|
||||
actions["traindoor"].top[an].reset();
|
||||
actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration;
|
||||
actions["traindoor"].top[an].timeScale = -1;
|
||||
actions["traindoor"].top[an].play();
|
||||
}
|
||||
}else if(trainmodel.open != data.open && data.open == "1"){
|
||||
trainmodel.open = "1";
|
||||
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
|
||||
actions["traindoor"].top[an].reset();
|
||||
actions["traindoor"].top[an].time = 0;
|
||||
actions["traindoor"].top[an].timeScale = 1;
|
||||
actions["traindoor"].top[an].play();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
||||
if(trainmodel.open != data.open && data.open == "0"){
|
||||
trainmodel.open = "0";
|
||||
for(let an=actions["traindoor"].down.length-1;an>=0;an--){
|
||||
actions["traindoor"].down[an].reset();
|
||||
actions["traindoor"].down[an].time = actions["traindoor"].top[an]._clip.duration;
|
||||
actions["traindoor"].down[an].timeScale = -1;
|
||||
actions["traindoor"].down[an].play();
|
||||
}
|
||||
}else if(trainmodel.open != data.open && data.open == "1"){
|
||||
trainmodel.open = "1";
|
||||
for(let an=actions["traindoor"].down.length-1;an>=0;an--){
|
||||
actions["traindoor"].down[an].reset();
|
||||
actions["traindoor"].down[an].time = 0;
|
||||
actions["traindoor"].down[an].timeScale = 1;
|
||||
actions["traindoor"].down[an].play();
|
||||
|
||||
if (trainmodel.open != data.open && data.open == '0') {
|
||||
trainmodel.open = '0';
|
||||
for (let an=actions["traindoor"].down.length-1; an>=0; an--) {
|
||||
actions["traindoor"].down[an].reset();
|
||||
actions["traindoor"].down[an].time = actions["traindoor"].down[an]._clip.duration;
|
||||
actions["traindoor"].down[an].timeScale = -1;
|
||||
actions["traindoor"].down[an].play();
|
||||
}
|
||||
} else if (trainmodel.open != data.open && data.open == '1') {
|
||||
trainmodel.open = "1";
|
||||
for(let an=actions["traindoor"].down.length-1;an>=0;an--){
|
||||
actions["traindoor"].down[an].reset();
|
||||
actions["traindoor"].down[an].time = 0;
|
||||
actions["traindoor"].down[an].timeScale = 1;
|
||||
actions["traindoor"].down[an].play();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
if(data.doorCode == "1"){
|
||||
|
||||
if(trainmodel.open != data.open && data.open == "0"){
|
||||
trainmodel.open = "0";
|
||||
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
|
||||
actions["traindoor"].top[an].reset();
|
||||
actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration;
|
||||
actions["traindoor"].top[an].timeScale = -1;
|
||||
actions["traindoor"].top[an].play();
|
||||
}
|
||||
}else if(trainmodel.open != data.open && data.open == "1"){
|
||||
trainmodel.open = "1";
|
||||
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
|
||||
actions["traindoor"].top[an].reset();
|
||||
actions["traindoor"].top[an].time = 0;
|
||||
actions["traindoor"].top[an].timeScale = 1;
|
||||
actions["traindoor"].top[an].play();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
||||
|
||||
if (trainmodel.open != data.open && data.open == '0') {
|
||||
trainmodel.open = '0';
|
||||
for (let an=actions["traindoor"].top.length-1; an>=0; an--) {
|
||||
actions["traindoor"].top[an].reset();
|
||||
actions["traindoor"].top[an].time = actions["traindoor"].top[an]._clip.duration;
|
||||
actions["traindoor"].top[an].timeScale = -1;
|
||||
actions["traindoor"].top[an].play();
|
||||
}
|
||||
} else if (trainmodel.open != data.open && data.open == '1') {
|
||||
trainmodel.open = "1";
|
||||
for(let an=actions["traindoor"].top.length-1;an>=0;an--){
|
||||
actions["traindoor"].top[an].reset();
|
||||
actions["traindoor"].top[an].time = 0;
|
||||
actions["traindoor"].top[an].timeScale = 1;
|
||||
actions["traindoor"].top[an].play();
|
||||
if (trainmodel.open != data.open && data.open == '0') {
|
||||
trainmodel.open = '0';
|
||||
for (let an=actions["traindoor"].down.length-1; an>=0; an--) {
|
||||
actions["traindoor"].down[an].reset();
|
||||
actions["traindoor"].down[an].time = actions["traindoor"].down[an]._clip.duration;
|
||||
actions["traindoor"].down[an].timeScale = -1;
|
||||
actions["traindoor"].down[an].play();
|
||||
}
|
||||
} else if (trainmodel.open != data.open && data.open == '1') {
|
||||
trainmodel.open = "1";
|
||||
for(let an=actions["traindoor"].down.length-1;an>=0;an--){
|
||||
actions["traindoor"].down[an].reset();
|
||||
actions["traindoor"].down[an].time = 0;
|
||||
actions["traindoor"].down[an].timeScale = 1;
|
||||
actions["traindoor"].down[an].play();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
if(trainlisttest.list[code].dispose == "0"){
|
||||
if(trainlisttest.list[code].curve == null){
|
||||
if (data.right == '1') { // 向右
|
||||
|
||||
trainlisttest.list[code].right = '1';
|
||||
trainlisttest.list[code].progress = data.offset;
|
||||
trainlisttest.list[code].isstandsection = rails.sectionrail[data.section].standTrack;
|
||||
if(rails.sectionrail[data.section].standTrack){
|
||||
@ -175,6 +175,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
trainlisttest.list[code].status = '1';
|
||||
|
||||
} else if (data.right == '0') { // 向左
|
||||
trainlisttest.list[code].right = '0';
|
||||
trainlisttest.list[code].progress = 1-data.offset;
|
||||
trainlisttest.list[code].isstandsection = rails.sectionrail[data.section].standTrack;
|
||||
if(rails.sectionrail[data.section].standTrack){
|
||||
@ -205,6 +206,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
//后端数据驱动车的位置更新与代码驱动车的移动相结合
|
||||
if(data.code != trainlisttest.list[code].code){
|
||||
if (data.right == '1') { // 向右
|
||||
trainlisttest.list[code].right = '1';
|
||||
trainlisttest.list[code].nowcode = data.code;
|
||||
trainlisttest.list[code].curve = rails.sectionrail[data.section].lineleft;
|
||||
trainlisttest.list[code].progress = data.offset;
|
||||
@ -213,6 +215,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
trainlisttest.list[code].nextlen = rails.sectionrail[data.next].lengthfact;
|
||||
trainlisttest.list[code].nextissection = rails.sectionrail[data.next].standTrack;
|
||||
} else if (data.right == '0') { // 向左
|
||||
trainlisttest.list[code].right = '0';
|
||||
trainlisttest.list[code].nowcode = data.code;
|
||||
trainlisttest.list[code].curve = rails.sectionrail[data.section].lineright;
|
||||
trainlisttest.list[code].progress = 1-data.offset;
|
||||
@ -251,7 +254,6 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
}
|
||||
|
||||
function DeviceDestroy(data){
|
||||
console.log(data);
|
||||
for(let i=0,leni=data.body.length;i<leni;i++){
|
||||
|
||||
if(data.body[i].type == "TRAIN"){
|
||||
@ -311,44 +313,90 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
|
||||
function traindoorupdate(data){
|
||||
let code = data.code;
|
||||
if(data.doorCode == "0"){
|
||||
if(trainlisttest.list[code].right == "0"){
|
||||
if(data.doorCode == "2"){
|
||||
|
||||
if(trainlisttest.list[code].open != data.open && data.open == "0"){
|
||||
trainlisttest.list[code].open = "0";
|
||||
for(let an=actions[code].down.length-1;an>=0;an--){
|
||||
actions[code].down[an].reset();
|
||||
actions[code].down[an].time = actions[code].top[an]._clip.duration;
|
||||
actions[code].down[an].timeScale = -1;
|
||||
actions[code].down[an].play();
|
||||
if(trainlisttest.list[code].open != data.open && data.open == "0"){
|
||||
trainlisttest.list[code].open = "0";
|
||||
for(let an=actions[code].top.length-1;an>=0;an--){
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = actions[code].top[an]._clip.duration;
|
||||
actions[code].top[an].timeScale = -1;
|
||||
actions[code].top[an].play();
|
||||
}
|
||||
}else if(trainlisttest.list[code].open != data.open && data.open == "1"){
|
||||
trainlisttest.list[code].open = "1";
|
||||
for(let an=actions[code].top.length-1;an>=0;an--){
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = 0;
|
||||
actions[code].top[an].timeScale = 1;
|
||||
actions[code].top[an].play();
|
||||
}
|
||||
}
|
||||
}else if(trainlisttest.list[code].open != data.open && data.open == "1"){
|
||||
trainlisttest.list[code].open = "1";
|
||||
for(let an=actions[code].down.length-1;an>=0;an--){
|
||||
actions[code].down[an].reset();
|
||||
actions[code].down[an].time = 0;
|
||||
actions[code].down[an].timeScale = 1;
|
||||
actions[code].down[an].play();
|
||||
}else{
|
||||
|
||||
|
||||
if (trainlisttest.list[code].open != data.open && data.open == '0') {
|
||||
trainlisttest.list[code].open = '0';
|
||||
for (let an=actions[code].down.length-1; an>=0; an--) {
|
||||
actions[code].down[an].reset();
|
||||
actions[code].down[an].time = actions[code].down[an]._clip.duration;
|
||||
actions[code].down[an].timeScale = -1;
|
||||
actions[code].down[an].play();
|
||||
}
|
||||
} else if (trainlisttest.list[code].open != data.open && data.open == '1') {
|
||||
trainlisttest.list[code].open = "1";
|
||||
for(let an=actions[code].down.length-1;an>=0;an--){
|
||||
actions[code].down[an].reset();
|
||||
actions[code].down[an].time = 0;
|
||||
actions[code].down[an].timeScale = 1;
|
||||
actions[code].down[an].play();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
if (trainlisttest.list[code].open != data.open && data.open == '0') {
|
||||
trainlisttest.list[code].open = '0';
|
||||
for (let an=actions[code].top.length-1; an>=0; an--) {
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = actions[code].top[an]._clip.duration;
|
||||
actions[code].top[an].timeScale = -1;
|
||||
actions[code].top[an].play();
|
||||
}
|
||||
} else if (trainlisttest.list[code].open != data.open && data.open == '1') {
|
||||
trainlisttest.list[code].open = "1";
|
||||
for(let an=actions[code].top.length-1;an>=0;an--){
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = 0;
|
||||
actions[code].top[an].timeScale = 1;
|
||||
actions[code].top[an].play();
|
||||
}
|
||||
}
|
||||
if(data.doorCode == "1"){
|
||||
|
||||
if(trainlisttest.list[code].open != data.open && data.open == "0"){
|
||||
trainlisttest.list[code].open = "0";
|
||||
for(let an=actions[code].top.length-1;an>=0;an--){
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = actions[code].top[an]._clip.duration;
|
||||
actions[code].top[an].timeScale = -1;
|
||||
actions[code].top[an].play();
|
||||
}
|
||||
}else if(trainlisttest.list[code].open != data.open && data.open == "1"){
|
||||
trainlisttest.list[code].open = "1";
|
||||
for(let an=actions[code].top.length-1;an>=0;an--){
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = 0;
|
||||
actions[code].top[an].timeScale = 1;
|
||||
actions[code].top[an].play();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
|
||||
|
||||
if (trainlisttest.list[code].open != data.open && data.open == '0') {
|
||||
trainlisttest.list[code].open = '0';
|
||||
for (let an=actions[code].down.length-1; an>=0; an--) {
|
||||
actions[code].down[an].reset();
|
||||
actions[code].down[an].time = actions[code].down[an]._clip.duration;
|
||||
actions[code].down[an].timeScale = -1;
|
||||
actions[code].down[an].play();
|
||||
}
|
||||
} else if (trainlisttest.list[code].open != data.open && data.open == '1') {
|
||||
trainlisttest.list[code].open = "1";
|
||||
for(let an=actions[code].down.length-1;an>=0;an--){
|
||||
actions[code].down[an].reset();
|
||||
actions[code].down[an].time = 0;
|
||||
actions[code].down[an].timeScale = 1;
|
||||
actions[code].down[an].play();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -56,13 +56,15 @@ export function JLmap3d(dom, data,skinCode,storemod,routegroup,project) {
|
||||
//定义镜头操作
|
||||
let controls = new THREE.OrbitControls(camera);
|
||||
controls.maxPolarAngle = Math.PI/2;
|
||||
controls.screenSpacePanning = true;
|
||||
// controls.screenSpacePanning = true;
|
||||
//controls.minPolarAngle = Math.PI/8;
|
||||
controls.maxDistance = 2000;
|
||||
controls.maxDistance = 1000;
|
||||
//模型加载器
|
||||
this.assetloader = new AssetLoader();
|
||||
//替换材质组,例:信号机不同灯光
|
||||
this.materiallist = [];
|
||||
//替换材质组(站台的)
|
||||
this.stationtexture = [];
|
||||
//初始化场景线框和灯光 暂时
|
||||
SetLights(scene);
|
||||
//点击选中的模型
|
||||
|
@ -37,7 +37,7 @@ let defaultstation = {
|
||||
type:"num4",
|
||||
picUrl:"",
|
||||
assetUrl:"../../static/model/station/fuzhou.FBX"
|
||||
}//modelurl+"/station/fuzhou/fuzhou.FBX"
|
||||
}//"../../static/model/station/fuzhou/fuzhou.FBX"
|
||||
let waicestation = {
|
||||
id:"10",
|
||||
name:"外侧车站",
|
||||
@ -46,15 +46,15 @@ let waicestation = {
|
||||
picUrl:"",
|
||||
assetUrl:"../../static/model/station/waicestation.FBX"
|
||||
}
|
||||
let defaulttopstation = {
|
||||
id:"104",
|
||||
name:"福州车站1",
|
||||
deviceType:"topstand",
|
||||
type:"num5",
|
||||
let station3 = {
|
||||
id:"10000",
|
||||
name:"三站台",
|
||||
deviceType:"station3",
|
||||
type:"num4",
|
||||
picUrl:"",
|
||||
assetUrl:modelurl+"/station/fuzhou/topstation.FBX"
|
||||
assetUrl:"../../static/model/station/station3.FBX"
|
||||
}
|
||||
//modelurl+"/station/fuzhou/fuzhou.FBX"
|
||||
//"../../static/model/station/fuzhou/fuzhou.FBX"
|
||||
//https://test.joylink.club/oss/station/fuzhou/fuzhou.FBX
|
||||
//https://joylink.club/oss/station/fuzhou/fuzhou.FBX
|
||||
//../../static/model/station/zhantai715(2).FBX
|
||||
@ -65,17 +65,9 @@ let defaultswitch = {
|
||||
deviceType:"switch",
|
||||
type:"fuzhou",
|
||||
picUrl:"",
|
||||
assetUrl:modelurl+"/daocha/daocha.FBX"
|
||||
assetUrl:"../../static/model/daocha/daocha.FBX"
|
||||
}
|
||||
|
||||
let defaultdriver = {
|
||||
id:"15",
|
||||
name:"驾驶台",
|
||||
deviceType:"driver",
|
||||
type:"driver",
|
||||
picUrl:"",
|
||||
assetUrl:modelurl+"/driver/driver.FBX"
|
||||
}
|
||||
|
||||
let defaultsuidao = {
|
||||
id:"16",
|
||||
@ -83,7 +75,16 @@ let defaultsuidao = {
|
||||
deviceType:"suidao",
|
||||
type:"suidao",
|
||||
picUrl:"",
|
||||
assetUrl:modelurl+"/suidao/suidao.FBX"
|
||||
assetUrl:"../../static/model/suidao/suidao.FBX"
|
||||
}
|
||||
|
||||
let hebsuidao = {
|
||||
id:"1010",
|
||||
name:"hebsuidao",
|
||||
deviceType:"hebsuidao",
|
||||
type:"hebsuidao",
|
||||
picUrl:"",
|
||||
assetUrl:"../../static/model/suidao/hebsuidao.FBX"
|
||||
}
|
||||
|
||||
let defaultbackground = {
|
||||
@ -92,9 +93,9 @@ let defaultbackground = {
|
||||
deviceType:"background",
|
||||
type:"background",
|
||||
picUrl:"",
|
||||
assetUrl:modelurl+"/suidao/background.FBX"
|
||||
assetUrl:"../../static/model/suidao/background.FBX"
|
||||
}
|
||||
//modelurl+"/suidao/suidao.FBX"
|
||||
//"../../static/model/suidao/suidao.FBX"
|
||||
//https://test.joylink.club/oss/suidao/suidao.FBX
|
||||
//https://joylink.club/oss/suidao/suidao.FBX
|
||||
//../../static/model/suidao/suidao.FBX
|
||||
@ -108,15 +109,6 @@ let defaultautorail = {
|
||||
assetUrl:"../../static/model/auto/rail.FBX"
|
||||
}
|
||||
|
||||
let defaultautosuidao = {
|
||||
id:"101",
|
||||
name:"autosuidao",
|
||||
deviceType:"autosuidao",
|
||||
type:"autosuidao",
|
||||
picUrl:"",
|
||||
assetUrl:"../../static/model/auto/suidao.FBX"
|
||||
}
|
||||
|
||||
let autoswitch = {
|
||||
id:"104",
|
||||
name:"道岔",
|
||||
@ -132,7 +124,7 @@ let autoswitch1 = {
|
||||
deviceType:"autoswitch1",
|
||||
type:"fuzhou",
|
||||
picUrl:"",
|
||||
assetUrl:modelurl+"/auto/switch1.FBX"
|
||||
assetUrl:"../../static/model/auto/switch1.FBX"
|
||||
}
|
||||
|
||||
let autoswitch2 = {
|
||||
@ -141,7 +133,7 @@ let autoswitch2 = {
|
||||
deviceType:"autoswitch2",
|
||||
type:"fuzhou",
|
||||
picUrl:"",
|
||||
assetUrl:modelurl+"/auto/switch2.FBX"
|
||||
assetUrl:"../../static/model/auto/switch2.FBX"
|
||||
}
|
||||
|
||||
export function AssetLoader(){
|
||||
@ -160,7 +152,6 @@ export function AssetLoader(){
|
||||
if(trainoffset){
|
||||
scope.trainoffset = trainoffset;
|
||||
}
|
||||
// console.log("setmodellist");
|
||||
let defaultmodel1 = new AssetModel(defaultsignal);
|
||||
scope.modellist.push(defaultmodel1);
|
||||
|
||||
@ -170,17 +161,10 @@ export function AssetLoader(){
|
||||
let station = new AssetModel(defaultstation);
|
||||
scope.modellist.push(station);
|
||||
|
||||
let wstation = new AssetModel(waicestation);
|
||||
scope.modellist.push(wstation);
|
||||
// let topstation = new AssetModel(defaulttopstation);
|
||||
// scope.modellist.push(topstation);
|
||||
|
||||
// let driver = new AssetModel(defaultdriver);
|
||||
// scope.modellist.push(driver);
|
||||
|
||||
let suidao = new AssetModel(defaultsuidao);
|
||||
scope.modellist.push(suidao);
|
||||
|
||||
|
||||
let background = new AssetModel(defaultbackground);
|
||||
scope.modellist.push(defaultbackground);
|
||||
|
||||
@ -215,6 +199,58 @@ export function AssetLoader(){
|
||||
|
||||
}
|
||||
|
||||
this.setmodellistnew = function (data,trainoffset){
|
||||
if(trainoffset){
|
||||
scope.trainoffset = trainoffset;
|
||||
}
|
||||
let defaultmodel1 = new AssetModel(defaultsignal);
|
||||
scope.modellist.push(defaultmodel1);
|
||||
|
||||
let defaultmodel2 = new AssetModel(defaulttrain);
|
||||
scope.modellist.push(defaultmodel2);
|
||||
|
||||
let station = new AssetModel(defaultstation);
|
||||
scope.modellist.push(station);
|
||||
|
||||
let wstation = new AssetModel(waicestation);
|
||||
scope.modellist.push(wstation);
|
||||
|
||||
let s3 = new AssetModel(station3);
|
||||
scope.modellist.push(s3);
|
||||
|
||||
let hebsd = new AssetModel(hebsuidao);
|
||||
scope.modellist.push(hebsd);
|
||||
|
||||
let defaultswitch1 = new AssetModel(autoswitch1);
|
||||
scope.modellist.push(defaultswitch1);
|
||||
|
||||
let defaultswitch2 = new AssetModel(autoswitch2);
|
||||
scope.modellist.push(defaultswitch2);
|
||||
|
||||
let modeldata = JSON.parse(data);
|
||||
|
||||
for(let j=0;j<modeldata.length;j++){
|
||||
let had = false;
|
||||
for(let i=0;i<scope.modellist.length;i++){
|
||||
|
||||
|
||||
if(scope.modellist[i].id == modeldata[j].id){
|
||||
|
||||
had = true;
|
||||
|
||||
i = scope.modellist.length;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(had == false){
|
||||
let model = new AssetModel(modeldata[j]);
|
||||
scope.modellist.push(modeldata[j]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
this.assetpromise = function (scene){
|
||||
let initlist = [];
|
||||
@ -248,15 +284,10 @@ export function AssetLoader(){
|
||||
|
||||
let wstation = new AssetModel(waicestation);
|
||||
scope.modellist.push(wstation);
|
||||
// let topstation = new AssetModel(defaulttopstation);
|
||||
// scope.modellist.push(topstation);
|
||||
|
||||
let autorail = new AssetModel(defaultautorail);
|
||||
scope.modellist.push(autorail);
|
||||
|
||||
// let autosuidao = new AssetModel(defaultautosuidao);
|
||||
// scope.modellist.push(autosuidao);
|
||||
|
||||
let defaultswitch1 = new AssetModel(autoswitch1);
|
||||
scope.modellist.push(defaultswitch1);
|
||||
|
||||
|
@ -72,7 +72,7 @@ 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.setmodellist(netdata.assets);
|
||||
assetloader.setmodellistnew(netdata.assets);
|
||||
|
||||
assetloader.assetpromise(sceneload)
|
||||
// .then(function(data){
|
||||
@ -107,7 +107,36 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
|
||||
|
||||
});
|
||||
})
|
||||
.then(function(data){
|
||||
return new Promise(function(resolve, reject){
|
||||
|
||||
|
||||
if(stationstandlist.group.children[0].name == "Station18398"){
|
||||
for(let mm=0;mm< stationstandlist.group.children.length;mm++){
|
||||
if(stationstandlist.group.children[mm].name != "Station96090"){
|
||||
let stationname = stationstandlist.group.children[mm].name;
|
||||
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map =scope.stationtexture["haerbinlist"];
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
|
||||
|
||||
let newmaterial = stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.clone();
|
||||
newmaterial.map =scope.stationtexture[stationname];
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantaiming").material = newmaterial;
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
for(let mn=0;mn<scope.assetloader.modellist.length;mn++){
|
||||
if(scope.assetloader.modellist[mn].name && scope.assetloader.modellist[mn].name == "hebsuidao"){
|
||||
scope.assetloader.modellist[mn].mesh.name = "hebsuidao";
|
||||
scene.add(scope.assetloader.modellist[mn].mesh);
|
||||
}
|
||||
}
|
||||
}
|
||||
resolve("mergemodel");
|
||||
});
|
||||
})
|
||||
.then(function(data){
|
||||
// for(let mn=0;mn<scope.assetloader.modellist.length;mn++){
|
||||
// if(scope.assetloader.modellist[mn].name && scope.assetloader.modellist[mn].name == "suidao"){
|
||||
@ -125,7 +154,6 @@ export function DriverLoadNew(data,scope,netdata,mapdata,sectionlist,signallist,
|
||||
backdata.loaderdata(sectionlist,linklist,signallist,stationstandlist,trainlisttest,realsectionlist,rails);
|
||||
scope.Subscribe.updatamap(sectionlist,linklist,signallist,stationstandlist,trainlisttest,realsectionlist,rails,scope.materiallist,scope.actions,scope.sceneload);
|
||||
scope.webwork.postMessage("on");
|
||||
console.log(scene);
|
||||
// updatemenulist(stationstandlist.list,trainlisttest.list);
|
||||
loadingInstance.close();
|
||||
});
|
||||
|
@ -8,6 +8,33 @@ export function Materialload(jlmap3dedit){
|
||||
settexture( jlmap3dedit.materiallist,"green",'../../static/material/signal/3.jpg');
|
||||
|
||||
settexture( jlmap3dedit.materiallist,"black",'../../static/material/signal/5.jpg');
|
||||
if(jlmap3dedit.stationtexture){
|
||||
setstationtexture(jlmap3dedit.stationtexture,"haerbinlist",'../../static/texture/heb/haerbinlist.jpg');
|
||||
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station5361",'../../static/texture/heb/Station5361.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station11094",'../../static/texture/heb/Station11094.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station11136",'../../static/texture/heb/Station11136.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station17293",'../../static/texture/heb/Station17293.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station18398",'../../static/texture/heb/Station18398.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station22163",'../../static/texture/heb/Station22163.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station25464",'../../static/texture/heb/Station25464.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station28090",'../../static/texture/heb/Station28090.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station41999",'../../static/texture/heb/Station41999.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station44338",'../../static/texture/heb/Station44338.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station46464",'../../static/texture/heb/Station46464.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station50565",'../../static/texture/heb/Station50565.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station60068",'../../static/texture/heb/Station60068.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station62429",'../../static/texture/heb/Station62429.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station64444",'../../static/texture/heb/Station64444.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station71700",'../../static/texture/heb/Station71700.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station72132",'../../static/texture/heb/Station72132.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station78164",'../../static/texture/heb/Station78164.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station79537",'../../static/texture/heb/Station79537.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station82618",'../../static/texture/heb/Station82618.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station85520",'../../static/texture/heb/Station85520.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station89483",'../../static/texture/heb/Station89483.jpg');
|
||||
setstationtexture(jlmap3dedit.stationtexture,"Station96090",'../../static/texture/heb/Station96090.jpg');
|
||||
}
|
||||
//console.log(jlmap3dedit.materiallist);
|
||||
}
|
||||
|
||||
@ -34,3 +61,26 @@ function settexture(materiallist,name,textureurl){
|
||||
}
|
||||
);
|
||||
}
|
||||
function setstationtexture(stationtexture,name,textureurl){
|
||||
var loader = new THREE.TextureLoader();
|
||||
|
||||
// 加载一个资源
|
||||
loader.load(
|
||||
// 资源URL
|
||||
textureurl,
|
||||
|
||||
// onLoad回调
|
||||
function ( texture ) {
|
||||
texture.name = name;
|
||||
stationtexture[name] = texture;
|
||||
},
|
||||
|
||||
// 目前暂不支持onProgress的回调
|
||||
undefined,
|
||||
|
||||
// onError回调
|
||||
function ( err ) {
|
||||
console.error( 'An error happened.' );
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
||||
let signaldata = JSON.parse(netdata.signals);
|
||||
let standsdata = JSON.parse(netdata.stands);
|
||||
let psddata = data.psdList;
|
||||
assetloader.setmodellist(netdata.assets);
|
||||
assetloader.setmodellistnew(netdata.assets);
|
||||
|
||||
assetloader.assetpromise(sceneload)
|
||||
// .then(function(data){
|
||||
@ -78,6 +78,7 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
||||
.then(function(data){
|
||||
//console.log(data);
|
||||
//,netdata.stands,mixers,actions,"0"
|
||||
|
||||
return stationstandlist.loadpromise(mapdata.stationList,standsdata,psddata,sceneload,assetloader,mixers,actions,"02");
|
||||
})
|
||||
.then(function(data){
|
||||
@ -104,7 +105,34 @@ export function SimulationLoadNew(data,scope,netdata,mapdata,camera,controls,sce
|
||||
|
||||
});
|
||||
})
|
||||
.then(function(data){
|
||||
return new Promise(function(resolve, reject){
|
||||
|
||||
//
|
||||
if(stationstandlist.group.children[0].name == "Station18398"){
|
||||
for(let mm=0;mm< stationstandlist.group.children.length;mm++){
|
||||
if(stationstandlist.group.children[mm].name != "Station96090"){
|
||||
let stationname = stationstandlist.group.children[mm].name;
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map =scope.stationtexture["haerbinlist"];
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantailiebiao").material.map.needsUpdate = true;
|
||||
let newmaterial = stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.clone();
|
||||
newmaterial.map =scope.stationtexture[stationname];
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantaiming").material = newmaterial;
|
||||
stationstandlist.group.children[mm].getObjectByName("zhantaiming").material.map.needsUpdate = true;
|
||||
}
|
||||
}
|
||||
for(let mn=0;mn<scope.assetloader.modellist.length;mn++){
|
||||
if(scope.assetloader.modellist[mn].name && scope.assetloader.modellist[mn].name == "hebsuidao"){
|
||||
scope.assetloader.modellist[mn].mesh.name = "hebsuidao";
|
||||
scene.add(scope.assetloader.modellist[mn].mesh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
resolve("mergemodel");
|
||||
});
|
||||
})
|
||||
.then(function(data){
|
||||
// for(let mn=0;mn<scope.assetloader.modellist.length;mn++){
|
||||
// if(scope.assetloader.modellist[mn].name && scope.assetloader.modellist[mn].name == "suidao"){
|
||||
|
@ -191,7 +191,8 @@ export function StationStandList() {
|
||||
let textmaterial = new THREE.MeshBasicMaterial( { side: THREE.DoubleSide,map:textt ,transparent: true} );
|
||||
let textplane = new THREE.Mesh( textgeometry, textmaterial );
|
||||
textplane.name = stationdata[map[k].num].code;
|
||||
textplane.position.y = 300;
|
||||
textplane.position.y = 50;
|
||||
textplane.position.z = 250;
|
||||
textplane.rotation.x = Math.PI/2;
|
||||
//textplane.position.x = -30;
|
||||
scope.textlist.push(textplane);
|
||||
|
@ -16,11 +16,11 @@ export function StationStandListN() {
|
||||
return new Promise(function(resolve, reject){
|
||||
|
||||
let stations = stationdata;
|
||||
let selectmesh;
|
||||
let selectmesh1;
|
||||
|
||||
for(let j=0;j<assetloader.modellist.length;j++){
|
||||
if(assetloader.modellist[j].deviceType == "stand"){
|
||||
selectmesh = assetloader.modellist[j].mesh;
|
||||
selectmesh1 = assetloader.modellist[j].mesh;
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ export function StationStandListN() {
|
||||
newstationstand.direction2.name = standsdata[i].direction2.name;
|
||||
newstationstand.direction2.screenDoorOpenStatus = "01";
|
||||
|
||||
let newstationmesh = selectmesh.clone(true);
|
||||
let newstationmesh = selectmesh1.clone(true);
|
||||
newstationmesh.position.x = standsdata[i].position.x;
|
||||
newstationmesh.position.y = standsdata[i].position.y;
|
||||
newstationmesh.position.z = standsdata[i].position.z;
|
||||
@ -52,7 +52,7 @@ export function StationStandListN() {
|
||||
|
||||
scope.list[standsdata[i].code] = newstationstand;
|
||||
|
||||
let newclip = selectmesh.animations[ 0 ];
|
||||
let newclip = selectmesh1.animations[ 0 ];
|
||||
for(let j=0;j<newstationmesh.children.length;j++){
|
||||
|
||||
if(newstationmesh.children[j].name == "top"){
|
||||
@ -136,111 +136,222 @@ export function StationStandListN() {
|
||||
return new Promise(function(resolve, reject){
|
||||
|
||||
let stations = stationdata;
|
||||
let selectmesh;
|
||||
|
||||
let selectmesh1;
|
||||
let selectmesh2;
|
||||
let selectmesh3;
|
||||
for(let j=0;j<assetloader.modellist.length;j++){
|
||||
if(assetloader.modellist[j].deviceType == "stand"){
|
||||
selectmesh = assetloader.modellist[j].mesh;
|
||||
selectmesh1 = assetloader.modellist[j].mesh;
|
||||
}
|
||||
if(assetloader.modellist[j].deviceType == "standwaice"){
|
||||
selectmesh2 = assetloader.modellist[j].mesh;
|
||||
// assetloader.modellist[num2].mesh.rotation.y = Math.PI/2;
|
||||
}
|
||||
if(assetloader.modellist[j].deviceType == "station3"){
|
||||
selectmesh3 = assetloader.modellist[j].mesh;
|
||||
// assetloader.modellist[num2].mesh.rotation.y = Math.PI/2;
|
||||
}
|
||||
}
|
||||
|
||||
for(let i=0;i<standsdata.length;i++){
|
||||
let newstationstand = new StationStandModel(standsdata[i]);
|
||||
if(standsdata[i].code != "Station96090"){
|
||||
newstationstand.code = standsdata[i].code;
|
||||
newstationstand.name = standsdata[i].name;
|
||||
newstationstand.type = "station";
|
||||
newstationstand.num = i;
|
||||
|
||||
newstationstand.code = standsdata[i].code;
|
||||
newstationstand.name = standsdata[i].name;
|
||||
newstationstand.type = "station";
|
||||
newstationstand.num = i;
|
||||
|
||||
newstationstand.direction1.code = standsdata[i].direction1.code;
|
||||
newstationstand.direction1.name = standsdata[i].direction1.name;
|
||||
newstationstand.direction1.screenDoorOpenStatus = "01";
|
||||
|
||||
newstationstand.direction2.code = standsdata[i].direction2.code;
|
||||
newstationstand.direction2.name = standsdata[i].direction2.name;
|
||||
newstationstand.direction2.screenDoorOpenStatus = "01";
|
||||
|
||||
let newstationmesh = selectmesh.clone(true);
|
||||
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[standsdata[i].code] = newstationstand;
|
||||
//
|
||||
let newclip = selectmesh.animations[ 0 ];
|
||||
for(let j=0;j<newstationmesh.children.length;j++){
|
||||
|
||||
if(newstationmesh.children[j].name == "top"){
|
||||
newstationmesh.children[j].animations = [];
|
||||
newstationmesh.children[j].animations.push(newclip.clone());
|
||||
|
||||
let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
if(psddata[n].standCode == newstationstand.direction2.code){
|
||||
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
mixers.push(mixer);
|
||||
n = psddata.length;
|
||||
}
|
||||
}
|
||||
newstationstand.direction1.code = standsdata[i].direction1.code;
|
||||
newstationstand.direction1.name = standsdata[i].direction1.name;
|
||||
newstationstand.direction1.screenDoorOpenStatus = "01";
|
||||
|
||||
newstationstand.direction2.code = standsdata[i].direction2.code;
|
||||
newstationstand.direction2.name = standsdata[i].direction2.name;
|
||||
newstationstand.direction2.screenDoorOpenStatus = "01";
|
||||
let newstationmesh = null;
|
||||
if(standsdata[i].inside == true){
|
||||
newstationmesh = selectmesh1.clone(true);
|
||||
}else{
|
||||
newstationmesh = selectmesh2.clone(true);
|
||||
}
|
||||
newstationmesh.code = standsdata[i].code;
|
||||
newstationmesh.name = standsdata[i].code;
|
||||
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[standsdata[i].code] = newstationstand;
|
||||
//
|
||||
let newclip =null;
|
||||
if(standsdata[i].inside == true){
|
||||
newclip = selectmesh1.animations[ 0 ];
|
||||
}else{
|
||||
newclip = selectmesh2.animations[ 0 ];
|
||||
}
|
||||
if(newstationmesh.children[j].name == "down"){
|
||||
newstationmesh.children[j].animations = [];
|
||||
newstationmesh.children[j].animations.push(newclip.clone());
|
||||
|
||||
let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
if(psddata[n].standCode == newstationstand.direction1.code){
|
||||
for(let j=0;j<newstationmesh.children.length;j++){
|
||||
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
mixers.push(mixer);
|
||||
n = psddata.length;
|
||||
if(newstationmesh.children[j].name == "top"){
|
||||
newstationmesh.children[j].animations = [];
|
||||
newstationmesh.children[j].animations.push(newclip.clone());
|
||||
|
||||
let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
if(psddata[n].standCode == newstationstand.direction2.code){
|
||||
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
mixers.push(mixer);
|
||||
n = psddata.length;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if(newstationmesh.children[j].name == "down"){
|
||||
newstationmesh.children[j].animations = [];
|
||||
newstationmesh.children[j].animations.push(newclip.clone());
|
||||
|
||||
let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
if(psddata[n].standCode == newstationstand.direction1.code){
|
||||
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
mixers.push(mixer);
|
||||
n = psddata.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// console.log(newstationmesh);
|
||||
if(mode){
|
||||
if(mode == "02"){
|
||||
let textgeometry = new THREE.PlaneBufferGeometry( 65, 90, 1 );
|
||||
let textt = new THREE.CanvasTexture(getTextCanvas(stationdata[i]));
|
||||
let textmaterial = new THREE.MeshBasicMaterial( { side: THREE.DoubleSide,map:textt ,transparent: true} );
|
||||
let textplane = new THREE.Mesh( textgeometry, textmaterial );
|
||||
textplane.name = stationdata[i].code;
|
||||
textplane.position.y = 70;
|
||||
textplane.rotation.x = Math.PI/2;
|
||||
//textplane.position.x = -30;
|
||||
scope.textlist.push(textplane);
|
||||
newstationmesh.add(textplane);
|
||||
textgeometry.dispose();
|
||||
textmaterial.dispose();
|
||||
textt.dispose();
|
||||
// let newtopstation = topstationmesh.clone(true);
|
||||
// newtopstation.position.x = map[k].mesh.position.x;
|
||||
// newtopstation.position.z = map[k].mesh.position.z;
|
||||
// scene.add(newtopstation);
|
||||
if(mode){
|
||||
if(mode == "02"){
|
||||
let textgeometry = new THREE.PlaneBufferGeometry( 65, 90, 1 );
|
||||
let textt = new THREE.CanvasTexture(getTextCanvas(standsdata[i]));
|
||||
let textmaterial = new THREE.MeshBasicMaterial( { side: THREE.DoubleSide,map:textt ,transparent: true} );
|
||||
let textplane = new THREE.Mesh( textgeometry, textmaterial );
|
||||
textplane.name = standsdata[i].code;
|
||||
textplane.position.y = 70;
|
||||
textplane.rotation.x = Math.PI/2;
|
||||
textplane.position.z = 50;
|
||||
scope.textlist.push(textplane);
|
||||
newstationmesh.add(textplane);
|
||||
textgeometry.dispose();
|
||||
textmaterial.dispose();
|
||||
textt.dispose();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
newstationstand.code = standsdata[i].code;
|
||||
newstationstand.name = standsdata[i].name;
|
||||
newstationstand.type = "station";
|
||||
newstationstand.num = i;
|
||||
|
||||
newstationstand.direction1.code = standsdata[i].direction1.code;
|
||||
newstationstand.direction1.name = standsdata[i].direction1.name;
|
||||
newstationstand.direction1.screenDoorOpenStatus = "01";
|
||||
|
||||
newstationstand.direction2.code = standsdata[i].direction2.code;
|
||||
newstationstand.direction2.name = standsdata[i].direction2.name;
|
||||
newstationstand.direction2.screenDoorOpenStatus = "01";
|
||||
let newstationmesh = null;
|
||||
newstationmesh = selectmesh3.clone(true);
|
||||
newstationmesh.code = standsdata[i].code;
|
||||
newstationmesh.name = standsdata[i].code;
|
||||
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[standsdata[i].code] = newstationstand;
|
||||
//
|
||||
let newclip =null;
|
||||
newclip = selectmesh3.animations[ 0 ];
|
||||
for(let j=0;j<newstationmesh.children.length;j++){
|
||||
|
||||
if(newstationmesh.children[j].name == "top"){
|
||||
newstationmesh.children[j].animations = [];
|
||||
newstationmesh.children[j].animations.push(newclip.clone());
|
||||
|
||||
let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
if(psddata[n].standCode == newstationstand.direction2.code){
|
||||
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
mixers.push(mixer);
|
||||
n = psddata.length;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if(newstationmesh.children[j].name == "down"){
|
||||
newstationmesh.children[j].animations = [];
|
||||
newstationmesh.children[j].animations.push(newclip.clone());
|
||||
|
||||
let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
if(psddata[n].standCode == newstationstand.direction1.code){
|
||||
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
mixers.push(mixer);
|
||||
n = psddata.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(mode){
|
||||
if(mode == "02"){
|
||||
let textgeometry = new THREE.PlaneBufferGeometry( 65, 90, 1 );
|
||||
let textt = new THREE.CanvasTexture(getTextCanvas(standsdata[i]));
|
||||
let textmaterial = new THREE.MeshBasicMaterial( { side: THREE.DoubleSide,map:textt ,transparent: true} );
|
||||
let textplane = new THREE.Mesh( textgeometry, textmaterial );
|
||||
textplane.name = standsdata[i].code;
|
||||
textplane.position.y = 70;
|
||||
textplane.rotation.x = Math.PI/2;
|
||||
textplane.position.z = 50;
|
||||
scope.textlist.push(textplane);
|
||||
newstationmesh.add(textplane);
|
||||
textgeometry.dispose();
|
||||
textmaterial.dispose();
|
||||
textt.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ export function StationStandModel(opts) {
|
||||
this.name = null;
|
||||
this.modelid = null;
|
||||
this.type = null;
|
||||
|
||||
this.inside = null;
|
||||
this.ismodel = false;
|
||||
this.istexture = false;
|
||||
this.modelurl = null;
|
||||
|
@ -171,7 +171,7 @@ export function TrainListN() {
|
||||
for(let i=0;i<data.length;i++){
|
||||
|
||||
|
||||
actionss[data[i].code] = {
|
||||
actionss[data[i].groupNumber] = {
|
||||
top:[],
|
||||
down:[]
|
||||
};
|
||||
@ -198,7 +198,7 @@ export function TrainListN() {
|
||||
//action.play();
|
||||
action.setLoop(THREE.LoopOnce);
|
||||
action.clampWhenFinished = true;
|
||||
actionss[data[i].code].top.push(action);
|
||||
actionss[data[i].groupNumber].top.push(action);
|
||||
|
||||
}
|
||||
|
||||
@ -214,7 +214,7 @@ export function TrainListN() {
|
||||
//action.play();
|
||||
action.setLoop(THREE.LoopOnce);
|
||||
action.clampWhenFinished = true;
|
||||
actionss[data[i].code].down.push(action);
|
||||
actionss[data[i].groupNumber].down.push(action);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
@ -230,7 +230,7 @@ export function TrainListN() {
|
||||
//action.play();
|
||||
action.setLoop(THREE.LoopOnce);
|
||||
action.clampWhenFinished = true;
|
||||
actionss[data[i].code].top.push(action);
|
||||
actionss[data[i].groupNumber].top.push(action);
|
||||
}
|
||||
|
||||
if(newmesh.children[j].children[n].name == "down"){
|
||||
@ -244,12 +244,12 @@ export function TrainListN() {
|
||||
//action.play();
|
||||
action.setLoop(THREE.LoopOnce);
|
||||
action.clampWhenFinished = true;
|
||||
actionss[data[i].code].down.push(action);
|
||||
actionss[data[i].groupNumber].down.push(action);
|
||||
}
|
||||
}
|
||||
}
|
||||
//newmesh.children[j].name = data[i].code;
|
||||
newmesh.children[j].code = data[i].code;
|
||||
newmesh.children[j].groupNumber = data[i].groupNumber;
|
||||
newmesh.children[j].axis = new THREE.Vector3();
|
||||
newmesh.children[j].up = new THREE.Vector3(1, 0, 0);
|
||||
// newmesh.axis = new THREE.Vector3();
|
||||
@ -281,7 +281,7 @@ export function TrainListN() {
|
||||
alphaTest:0.1
|
||||
} );
|
||||
let textplane = new THREE.Mesh( textgeometry, textmaterial );
|
||||
textplane.name = data[i].code;
|
||||
textplane.name = data[i].groupNumber;
|
||||
textplane.position.x = 0;
|
||||
textplane.position.y = 0;
|
||||
textplane.position.z = 20;
|
||||
@ -300,7 +300,7 @@ export function TrainListN() {
|
||||
|
||||
//group.add(textplane);
|
||||
newmesh.first = false;
|
||||
newmesh.name = data[i].code;
|
||||
newmesh.name = data[i].groupNumber;
|
||||
newmesh.rname = data[i].groupNumber;
|
||||
newmesh.groupNumber = data[i].groupNumber;
|
||||
|
||||
@ -321,7 +321,7 @@ export function TrainListN() {
|
||||
newmesh.open = null;
|
||||
newmesh.statsstop = 0;
|
||||
|
||||
scope.list[data[i].code] = newmesh;
|
||||
scope.list[data[i].groupNumber] = newmesh;
|
||||
//scene.add(newmesh);
|
||||
}
|
||||
// console.log(selectmesh);
|
||||
|
@ -8,7 +8,7 @@ class Status {
|
||||
constructor(device) {
|
||||
// 保存kVue实例
|
||||
this.statusObj = {};
|
||||
if (device && device._type) {
|
||||
if (device && device._type && this['handle' + device._type]) {
|
||||
// 执行编译
|
||||
this['handle' + device._type](device);
|
||||
}
|
||||
@ -105,69 +105,9 @@ class Status {
|
||||
handleLcControl(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleTrainWindow(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleLine(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleLimitControl(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleAutoTurnBack(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleAutomaticRoute(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleOutFrame(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleText(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleAxleReset(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleGuideLock(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleResource(device) {
|
||||
this.statusObj = { };
|
||||
}
|
||||
handleAtsControl(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleCenterCommunication(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleChainControl(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleIntersiteControl(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleLeuControl(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleLocalControl(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleMaintain(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handlePowerSupply(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleNoOneReturn(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleMaintenanceLamps(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
handleZcCommunication(device) {
|
||||
this.statusObj = {};
|
||||
}
|
||||
getStatus() {
|
||||
return this.statusObj;
|
||||
}
|
||||
|
@ -1,148 +1,154 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="540px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{message}}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm confirm-control-speed"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="540px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{ message }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControlSpeed',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
type: '',
|
||||
operation: '',
|
||||
message: '',
|
||||
}
|
||||
export default {
|
||||
name: 'ConfirmControlSpeed',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: '',
|
||||
message: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
return "区段设置限速";
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
return "区段取消限速";
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
return "道岔设置限速";
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
return "道岔取消限速";
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
return OperationEvent.Section.cancelSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
return OperationEvent.Switch.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
return OperationEvent.Switch.cancelSpeed.confirm.domId;
|
||||
}
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
return '区段设置限速';
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
return '区段取消限速';
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
return '道岔设置限速';
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
return '道岔取消限速';
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.type = operate.type;
|
||||
this.operation = operate.operation;
|
||||
this.message = operate.message;
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
type: this.type
|
||||
}
|
||||
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
|
||||
return OperationEvent.Section.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
|
||||
return OperationEvent.Section.cancelSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
|
||||
return OperationEvent.Switch.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
|
||||
return OperationEvent.Switch.cancelSpeed.confirm.domId;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
this.message = operate.message;
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
};
|
||||
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
@ -150,4 +156,4 @@
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -214,6 +214,21 @@ export default {
|
||||
} else {
|
||||
this.commitDisabled = true;
|
||||
}
|
||||
|
||||
const operate = {val:code};
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路交人工控*/
|
||||
operate.operation = OperationEvent.Signal.humanControl.choose.operation;
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交自动控*/
|
||||
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
allSelectChange() {
|
||||
this.changeList = [];
|
||||
|
@ -102,7 +102,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControlSpeed from './childDialog/confirmControlSpeed';
|
||||
import { now } from '@/utils/date';
|
||||
|
||||
@ -378,7 +378,6 @@ export default {
|
||||
this.cmdDisabled = [true, true, true];
|
||||
this.stpDisabled = true;
|
||||
this.order = 0;
|
||||
this.type = operate.type;
|
||||
this.operation = operate.operation;
|
||||
this.setMessage('请选择限速值后,点击“下达”按钮,下达命令!');
|
||||
if (this.isCancelSpeed) {
|
||||
@ -400,7 +399,6 @@ export default {
|
||||
},
|
||||
speedSelectChange(val) {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
val: val
|
||||
};
|
||||
|
||||
@ -422,7 +420,6 @@ export default {
|
||||
},
|
||||
command() {
|
||||
const operate = {
|
||||
type: this.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
@ -459,7 +456,6 @@ export default {
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {
|
||||
type: this.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
@ -495,8 +491,6 @@ export default {
|
||||
confirm2() {
|
||||
const operate = {
|
||||
over:true,
|
||||
type: this.type,
|
||||
val: this.speed,
|
||||
param: {
|
||||
speedLimitValue: `${this.speed}`
|
||||
}
|
||||
@ -539,7 +533,6 @@ export default {
|
||||
},
|
||||
stop() {
|
||||
const operate = {
|
||||
type: this.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
@ -571,7 +564,6 @@ export default {
|
||||
},
|
||||
close() {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击关闭', result: '' });
|
||||
|
@ -318,7 +318,8 @@ export default {
|
||||
? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
|
||||
this.model.val1 = '';
|
||||
const operate = {
|
||||
operation: operation
|
||||
operation: operation,
|
||||
val:val
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
|
@ -39,7 +39,7 @@
|
||||
:min="0"
|
||||
size="mini"
|
||||
style="width: 130px; padding-left:30px;display: block; float: left; margin-top: 15px;"
|
||||
@change="inputTime"
|
||||
@change="changeInputTime"
|
||||
/>
|
||||
<div style="float: left;margin-top: 22px; margin-left: 5px;">秒</div>
|
||||
</div>
|
||||
@ -196,7 +196,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
inputTime(time) {
|
||||
changeInputTime(time) {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
||||
val: `${time}`
|
||||
|
@ -21,6 +21,7 @@ class Model {
|
||||
transferTrackNameShow: true // 转换轨名称显示
|
||||
};
|
||||
this['private'][deviceType.Signal] = {
|
||||
nameShow: true, // 信号机名称显示
|
||||
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
|
||||
atsAutoTriggerShow: true // ATS自动触发表示灯显示
|
||||
};
|
||||
|
@ -21,6 +21,7 @@ class Model {
|
||||
transferTrackNameShow: true // 转换轨名称显示
|
||||
};
|
||||
this['private'][deviceType.Signal] = {
|
||||
nameShow: true, // 信号机名称显示
|
||||
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
|
||||
atsAutoTriggerShow: true // ATS自动触发表示灯显示
|
||||
};
|
||||
|
@ -103,13 +103,13 @@ export default {
|
||||
},
|
||||
domIdCancel: {
|
||||
get: function () {
|
||||
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.password.domId : '';
|
||||
},
|
||||
set: function () {
|
||||
}
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operate.operateNext) : '';
|
||||
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -21,6 +21,7 @@ class Model {
|
||||
transferTrackNameShow: true // 转换轨名称显示
|
||||
};
|
||||
this['private'][deviceType.Signal] = {
|
||||
nameShow: true, // 信号机名称显示
|
||||
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
|
||||
atsAutoTriggerShow: true // ATS自动触发表示灯显示
|
||||
};
|
||||
|
@ -21,6 +21,7 @@ class Model {
|
||||
transferTrackNameShow: true // 转换轨名称显示
|
||||
};
|
||||
this['private'][deviceType.Signal] = {
|
||||
nameShow: true, // 信号机名称显示
|
||||
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
|
||||
atsAutoTriggerShow: true // ATS自动触发表示灯显示
|
||||
};
|
||||
|
@ -16,7 +16,7 @@ export default {
|
||||
beginCol: 0,
|
||||
fieldNum: 10,
|
||||
sepField: '行车间隔',
|
||||
trainId: 'TrainID',
|
||||
trainId: 'TRAINID',
|
||||
columns: ['折返线', 'TrainID', '行车间隔']
|
||||
},
|
||||
|
||||
@ -25,91 +25,58 @@ export default {
|
||||
var dataList = convertSheetToList(Sheet, true);
|
||||
if (dataList && dataList.length) {
|
||||
if (dataList && dataList.length && dataList[1] && dataList[0]) {
|
||||
// const tIndex = dataList.findIndex(it => { return it[0]; }); // 设置不用过滤行数
|
||||
const tIndex = 9; // 设置不用过滤行数
|
||||
|
||||
/** 解析二维数组为json对象*/
|
||||
const reg3 = /^(\d+:\d+:\d+|)/; // 06:12:00
|
||||
const reg = /^[0-9]{5}/;
|
||||
const positionList = []; // trainId所在行
|
||||
let columnNum; // trainId所在列
|
||||
dataList.forEach((elem, i) => {
|
||||
var begin = -1;
|
||||
/** 跳过名称所在的行*/
|
||||
if (i != tIndex && elem && elem.length > 0) {
|
||||
let flag = false;
|
||||
let count = 0;
|
||||
let param = { begTime: '', endTime: '' };
|
||||
if (i > tIndex) { elem.reverse(); }
|
||||
if (elem.includes(this.ExcelConfig.trainId)) {
|
||||
columnNum = i;
|
||||
elem.forEach((item, j) => {
|
||||
/** 过滤空值*/
|
||||
if (item) {
|
||||
let title = '';
|
||||
var value = `${item}`.trim();
|
||||
if (i > tIndex) { // 上行线
|
||||
title = `${dataList[tIndex][dataList[tIndex].length - j - 1]}`.replace(/\s*/g, '');
|
||||
if (title == 'undefined') {
|
||||
title = `${dataList[tIndex][dataList[tIndex].length - j - 2]}`.replace(/\s*/g, '');
|
||||
}
|
||||
} else { // 下行线
|
||||
title = `${dataList[tIndex][j]}`.replace(/\s*/g, '');
|
||||
if (title == 'undefined') {
|
||||
title = `${dataList[tIndex][j - 1]}`.replace(/\s*/g, '');
|
||||
}
|
||||
}
|
||||
|
||||
/** 匹配到开始位置或者结束位置*/
|
||||
if (title == this.ExcelConfig.trainId) {
|
||||
if (begin == -1) {
|
||||
flag = true;
|
||||
begin = value; // 设置初始索引
|
||||
JsonData.push({
|
||||
code: value,
|
||||
destinationCode: '',
|
||||
arrivalList: []
|
||||
});
|
||||
} else if (flag) {
|
||||
begin = -1; // 清空初始索引
|
||||
JsonData[JsonData.length - 1].destinationCode = value;
|
||||
flag = false;
|
||||
}
|
||||
} else if (begin !== -1) {
|
||||
/** 匹配到中间位置*/
|
||||
var stationName = title.replace(/\s/, '');
|
||||
if (this.ExcelConfig.columns.indexOf(stationName) == -1 && reg3.test(value)) {
|
||||
let need = false;
|
||||
if (value.split(':')[0] == '24') { // 24:XX:XX 类似这种数据 变24为00
|
||||
const arr = value.split(':');
|
||||
arr[0] = '00';
|
||||
value = arr.join(':');
|
||||
}
|
||||
if (count == 1) {
|
||||
count = 0;
|
||||
param.endTime = value;
|
||||
}
|
||||
if (count == 0) {
|
||||
count = 1;
|
||||
param.begTime = param.begTime || value;
|
||||
}
|
||||
|
||||
if (param.begTime && param.endTime) {
|
||||
need = true;
|
||||
}
|
||||
|
||||
/** 添加json数据*/
|
||||
if (need) { // 储存非空 数据
|
||||
var stationObj = {
|
||||
stationName: stationName
|
||||
};
|
||||
stationObj['arriveTime'] = prefixTime(param.begTime);
|
||||
stationObj['departureTime'] = prefixTime(param.endTime);
|
||||
JsonData[JsonData.length - 1].arrivalList.push(stationObj);
|
||||
param = { begTime: '', endTime: '' };
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item === this.ExcelConfig.trainId) {
|
||||
positionList.push(j);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
for (let i = 0; i < dataList.length; i++) {
|
||||
positionList.forEach((item, index)=> {
|
||||
if ((index + 1) % 2 !== 0 ) {
|
||||
const trainIdDown = dataList[i][item];
|
||||
const trainIdUp = dataList[i][positionList[index + 1]];
|
||||
if (reg.test(trainIdDown)) {
|
||||
const arrivalList = [];
|
||||
for (let j = 1; item + j < positionList[index + 1]; j = j + 2) {
|
||||
arrivalList.push({
|
||||
stationName: dataList[columnNum][item + j],
|
||||
arriveTime: reg3.test(dataList[i][item + j]) ? prefixTime(dataList[i][item + j]) : '',
|
||||
departureTime: reg3.test(dataList[i][item + j + 1]) ? prefixTime(dataList[i][item + j + 1]) : ''
|
||||
});
|
||||
}
|
||||
JsonData.push({
|
||||
code: trainIdDown,
|
||||
destinationCode: '1',
|
||||
arrivalList: arrivalList
|
||||
});
|
||||
} else if (reg.test(trainIdUp)) {
|
||||
const arrivalList = [];
|
||||
for (let j = 1; positionList[index + 1] - j > item; j = j + 2) {
|
||||
arrivalList.push({
|
||||
stationName: dataList[columnNum][item + j],
|
||||
arriveTime: reg3.test(dataList[i][item + j]) ? prefixTime(dataList[i][item + j]) : '',
|
||||
departureTime: reg3.test(dataList[i][item + j + 1]) ? prefixTime(dataList[i][item + j + 1]) : ''
|
||||
});
|
||||
}
|
||||
JsonData.push({
|
||||
code: trainIdUp,
|
||||
destinationCode: '2',
|
||||
arrivalList: arrivalList
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return JsonData;
|
||||
|
@ -21,6 +21,7 @@ class Model {
|
||||
transferTrackNameShow: true // 转换轨名称显示
|
||||
};
|
||||
this['private'][deviceType.Signal] = {
|
||||
nameShow: true, // 信号机名称显示
|
||||
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
|
||||
atsAutoTriggerShow: true // ATS自动触发表示灯显示
|
||||
};
|
||||
|
@ -26,9 +26,8 @@
|
||||
:data="tempData"
|
||||
border
|
||||
:cell-style="tableStyle"
|
||||
style="width: 100%;background: #E0E0E0;border: none;outline: none;"
|
||||
style="width: 100%;background: #E0E0E0;border: none;outline: none; height: 56px"
|
||||
size="mini"
|
||||
height="56"
|
||||
class="haerbin_table"
|
||||
highlight-current-row
|
||||
:show-header="false"
|
||||
@ -107,7 +106,7 @@ export default {
|
||||
{ name: '重复开放', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menu, show: false },
|
||||
{ name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menu, show: false },
|
||||
{ name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menu, show: false },
|
||||
{ name: '关单信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.cancelAutoTrigger.menu, show: false }
|
||||
{ name: '关单信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menu, show: false }
|
||||
],
|
||||
routeParamList: [
|
||||
{ name: 'ATP进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menu, show: false },
|
||||
|
@ -42,34 +42,7 @@ export default {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
// {
|
||||
// label: '区段故障解锁',
|
||||
// handler: this.fault,
|
||||
// cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
// },
|
||||
{
|
||||
label: '区段封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
},
|
||||
{
|
||||
label: '区段解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: '区段设置限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
|
||||
},
|
||||
{
|
||||
label: '区段取消限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
],
|
||||
Local: [],
|
||||
Center: [
|
||||
// {
|
||||
// label: '区段故障解锁',
|
||||
|
@ -42,36 +42,6 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '单操到定位',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
{
|
||||
label: '单操到反位',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
{
|
||||
label: '道岔单锁',
|
||||
handler: this.lock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: '道岔单解',
|
||||
handler: this.unlock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔封锁',
|
||||
handler: this.block,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔解封',
|
||||
handler: this.unblock,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
@ -210,6 +180,7 @@ export default {
|
||||
lock() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Switch.lock.menu.operation,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
@ -227,6 +198,7 @@ export default {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.unlock.menu.operation,
|
||||
code: `${this.selected.code}`,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
@ -243,6 +215,7 @@ export default {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.block.menu.operation,
|
||||
code: `${this.selected.code}`,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
@ -259,6 +232,7 @@ export default {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.unblock.menu.operation,
|
||||
code: `${this.selected.code}`,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
@ -275,6 +249,7 @@ export default {
|
||||
const operate = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.locate.menu.operation,
|
||||
code: `${this.selected.code}`,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
@ -291,6 +266,7 @@ export default {
|
||||
const operate = {
|
||||
start: true,
|
||||
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||
code: `${this.selected.code}`,
|
||||
param: {
|
||||
switchCode: this.selected.code
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ class Model {
|
||||
transferTrackNameShow: true // 转换轨名称显示
|
||||
};
|
||||
this['private'][deviceType.Signal] = {
|
||||
nameShow: true, // 信号机名称显示
|
||||
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
|
||||
atsAutoTriggerShow: true // ATS自动触发表示灯显示
|
||||
};
|
||||
|
@ -1,148 +1,156 @@
|
||||
<template>
|
||||
<el-dialog class="ningbo-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="540px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{message}}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm confirm-control-speed"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="540px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{ message }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControlSpeed',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
type: '',
|
||||
operation: '',
|
||||
message: '',
|
||||
export default {
|
||||
name: 'ConfirmControlSpeed',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
type: '',
|
||||
operation: '',
|
||||
message: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
return '区段设置限速';
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
return '区段取消限速';
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
return '道岔设置限速';
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
return '道岔取消限速';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
return "区段设置限速";
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
return "区段取消限速";
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
return "道岔设置限速";
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
return "道岔取消限速";
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
return OperationEvent.Section.cancelSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
return OperationEvent.Switch.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
return OperationEvent.Switch.cancelSpeed.confirm.domId;
|
||||
}
|
||||
}
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
return OperationEvent.Section.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
return OperationEvent.Section.cancelSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
return OperationEvent.Switch.setSpeed.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
return OperationEvent.Switch.cancelSpeed.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.type = operate.type;
|
||||
this.operation = operate.operation;
|
||||
this.message = operate.message;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.type = operate.type;
|
||||
this.operation = operate.operation;
|
||||
this.message = operate.message;
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
type: this.type
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
operation: ''
|
||||
};
|
||||
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
if (this.operation === OperationEvent.Section.setSpeed.order.operation) {
|
||||
/** 区段设置限速*/
|
||||
operate.operation = OperationEvent.Section.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Section.cancelSpeed.order.operation) {
|
||||
/** 区段取消限速*/
|
||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.setSpeed.order.operation) {
|
||||
/** 道岔设置限速*/
|
||||
operate.operation = OperationEvent.Switch.setSpeed.confirm.operation;
|
||||
} else if (this.operation === OperationEvent.Switch.cancelSpeed.order.operation) {
|
||||
/** 道岔取消限速*/
|
||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
@ -150,4 +158,4 @@
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -22,7 +22,8 @@
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-if="passModel" style="margin: 12px 0;">
|
||||
<div v-if="passModel">
|
||||
<div style="height: 12px" />
|
||||
<el-radio :id="upRadioId" v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'" @change="changeRadio">设置自动通过</el-radio>
|
||||
<el-radio :id="upRadioId" v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'" @change="changeRadio">取消自动通过</el-radio>
|
||||
</div>
|
||||
|
@ -41,8 +41,6 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="控制状态" width="180">
|
||||
<template slot-scope="scope">
|
||||
<!-- <span v-if="scope.row.controlType == '01'">自动(不进行冲突检测)</span>
|
||||
<span v-else>人工</span> -->
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -134,7 +132,7 @@ export default {
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.detail.menu.operation,
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
|
@ -175,6 +175,8 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow('当前进路不允许排列, 与其他进路可能发生冲突');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -93,16 +93,36 @@ export default {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Section.unlock.choose.domId : '';
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
return OperationEvent.Section.unlock.choose.domId;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return OperationEvent.Section.fault.choose.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
confirmId1() {
|
||||
return this.dialogShow ? OperationEvent.Section.unlock.confirm1.domId : '';
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
return OperationEvent.Section.unlock.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return OperationEvent.Section.fault.confirm1.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
confirmId2() {
|
||||
return this.dialogShow ? OperationEvent.Section.unlock.confirm2.domId : '';
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
return OperationEvent.Section.unlock.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return OperationEvent.Section.fault.confirm2.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Section.unlock.confirm.domId : '';
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
return OperationEvent.Section.unlock.confirm.domId;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return OperationEvent.Section.fault.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||
@ -218,6 +238,7 @@ export default {
|
||||
confirm2() {
|
||||
if (this.messageText2 == this.sectionCode) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: '',
|
||||
cmdType: ''
|
||||
};
|
||||
@ -246,7 +267,6 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: ''
|
||||
};
|
||||
|
||||
|
@ -238,7 +238,7 @@ export default {
|
||||
return '';
|
||||
},
|
||||
domIdClose() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||
},
|
||||
isCancelSpeed() {
|
||||
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation || this.operation == OperationEvent.Switch.cancelSpeed.menu.operation;
|
||||
@ -350,7 +350,8 @@ export default {
|
||||
},
|
||||
speedSelectChange(val) {
|
||||
const operate = {
|
||||
operation: ''
|
||||
operation: '',
|
||||
val: val
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||
@ -529,7 +530,6 @@ export default {
|
||||
},
|
||||
close() {
|
||||
const operate = {
|
||||
type: this.type,
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击关闭', result: '' });
|
||||
|
@ -76,7 +76,12 @@ export default {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
chooseId() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setBulkBuckleTrain.choose.domId : '';
|
||||
if (this.operation == OperationEvent.StationStand.setBulkBuckleTrain.menu.operation) {
|
||||
return OperationEvent.StationStand.setBulkBuckleTrain.choose.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation) {
|
||||
return OperationEvent.StationStand.cancelBulkBuckleTrain.choose.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.setBulkBuckleTrain.menu.operation) {
|
||||
|
@ -93,16 +93,36 @@ export default {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.Switch.unlock.choose.domId : '';
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
return OperationEvent.Switch.unlock.choose.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
return OperationEvent.Switch.unblock.choose.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
confirmId1() {
|
||||
return this.dialogShow ? OperationEvent.Switch.unlock.confirm1.domId : '';
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
return OperationEvent.Switch.unlock.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
return OperationEvent.Switch.unblock.confirm1.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
confirmId2() {
|
||||
return this.dialogShow ? OperationEvent.Switch.unlock.confirm2.domId : '';
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
return OperationEvent.Switch.unlock.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
return OperationEvent.Switch.unblock.confirm2.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Switch.unlock.confirm.domId : '';
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
return OperationEvent.Switch.unlock.confirm.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||
return OperationEvent.Switch.unblock.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||
|
@ -21,6 +21,7 @@ class Model {
|
||||
transferTrackNameShow: true // 转换轨名称显示
|
||||
};
|
||||
this['private'][deviceType.Signal] = {
|
||||
nameShow: true, // 信号机名称显示
|
||||
linkageAutoRouteShow: true, // 联锁自动进路表示灯显示
|
||||
atsAutoTriggerShow: true // ATS自动触发表示灯显示
|
||||
};
|
||||
|
@ -94,7 +94,8 @@ export default {
|
||||
designxty: '/xty/login',
|
||||
gzb: '/designgzb/login',
|
||||
designgzb: '/gzb/login',
|
||||
hyd: '/design/login'
|
||||
hyd: '/design/login',
|
||||
designhyd: '/login'
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -131,7 +132,12 @@ export default {
|
||||
window.open(routeData.href, '_blank');
|
||||
},
|
||||
goToHelp() {
|
||||
const href = 'https://joylink.club/helps/help1.pdf';
|
||||
let href = '';
|
||||
if (getSessionStorage('project').startsWith('design')) {
|
||||
href = 'https://joylink.club/docs-design';
|
||||
} else {
|
||||
href = 'https://joylink.club/docs';
|
||||
}
|
||||
window.open(href, '_blank');
|
||||
},
|
||||
goEmpty() {},
|
||||
|
@ -14,7 +14,7 @@ function hasPermission(roles, permissionRoles) {
|
||||
return roles.some(role => permissionRoles.indexOf(role) >= 0);
|
||||
}
|
||||
|
||||
const whiteList = ['/login', '/design/login', '/xty/login', '/designxty/login', '/gzb/login', '/designgzb/login', '/gzzbxy/relay', '/hyd/login']; // 不重定向白名单
|
||||
const whiteList = ['/login', '/design/login', '/xty/login', '/designxty/login', '/gzb/login', '/designgzb/login', '/gzzbxy/relay']; // 不重定向白名单
|
||||
|
||||
const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/iscs/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/, /^\/displayNew\/record/, /^\/displayNew\/manage/, /^\/displayNew\/plan/];
|
||||
|
||||
@ -30,17 +30,17 @@ const loginXtyPage = whiteList[2];
|
||||
const loginDesignXtyPage = whiteList[3];
|
||||
const loginGzbPage = whiteList[4];
|
||||
const loginDesignGzbPage = whiteList[5];
|
||||
const loginHydPage = whiteList[7];
|
||||
const loginDesignPageMenu = {
|
||||
design: loginDesignPage,
|
||||
designxty: loginDesignXtyPage,
|
||||
designgzb: loginDesignGzbPage
|
||||
designgzb: loginDesignGzbPage,
|
||||
designhyd: loginDesignPage
|
||||
};
|
||||
const loginPageMenu = {
|
||||
login: loginPage,
|
||||
xty: loginXtyPage,
|
||||
gzb: loginGzbPage,
|
||||
hyd: loginHydPage
|
||||
hyd: loginPage
|
||||
};
|
||||
// 获取路径数据
|
||||
function getRouteInfo(to) {
|
||||
@ -66,14 +66,6 @@ function getRouteInfo(to) {
|
||||
} else if ( /^\/gzb/.test(toRoutePath)) {
|
||||
loginPath = loginGzbPage;
|
||||
clientId = null;
|
||||
} else if (/^\/hyd/.test(toRoutePath)) {
|
||||
if (process.env.VUE_APP_PRO === 'local') {
|
||||
loginPath = loginPage;
|
||||
} else {
|
||||
loginPath = loginHydPage;
|
||||
}
|
||||
clientId = null;
|
||||
|
||||
} else {
|
||||
loginPath = loginPageMenu[current_session] || loginPath;
|
||||
clientId = null;
|
||||
@ -135,17 +127,16 @@ router.beforeEach((to, from, next) => {
|
||||
handleRoute(to, from, next, routeInfo);
|
||||
}
|
||||
} else {
|
||||
//继电器使用
|
||||
// 继电器使用
|
||||
|
||||
console.log(to);
|
||||
// 未登录情况下
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
// 在免登录白名单,直接进入
|
||||
next();
|
||||
} else if(to.path.substr(0,13) == whiteList[6]){
|
||||
} else if (to.path.substr(0, 13) == whiteList[6]) {
|
||||
next();
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
// 否则全部重定向到登录页
|
||||
next(routeInfo.loginPath);
|
||||
}
|
||||
|
@ -185,16 +185,6 @@ export const constantRoutes = [
|
||||
redirect: '/gzb/login',
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/hyd/login',
|
||||
component: Login,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/hyd',
|
||||
redirect: '/hyd/login',
|
||||
hidden: true
|
||||
},
|
||||
// 设计平台登录
|
||||
{
|
||||
path: '/design/login',
|
||||
|
@ -2244,7 +2244,11 @@ export const loginInfo = {
|
||||
},
|
||||
hyd: {
|
||||
title: '城市轨道交通实训平台',
|
||||
loginPath: '/hyd/login'
|
||||
loginPath: '/login'
|
||||
},
|
||||
designhyd: {
|
||||
title: '城市轨道交通设计平台',
|
||||
loginPath: '/design/login'
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -86,9 +86,9 @@ export default {
|
||||
CMD_SIGNAL_OPEN_AUTO_SETTING: {value:'Signal_Open_Auto_Setting', label: '进路自排开'},
|
||||
/** 进路自排关 */
|
||||
CMD_SIGNAL_CLOSE_AUTO_SETTING: {value:'Signal_Close_Auto_Setting', label: '进路自排关'},
|
||||
/** 设置联锁自动进路*/ // 设置/取消通过模式
|
||||
/** 设置联锁自动进路*/ // 设置通过模式
|
||||
CMD_SIGNAL_SET_CI_AUTO: {value:'Signal_Set_CI_Auto', label: '设置联锁自动进路'},
|
||||
/** 取消联锁自动进路*/
|
||||
/** 取消联锁自动进路*/ // 取消通过模式
|
||||
CMD_SIGNAL_CANCEL_CI_AUTO: {value:'Signal_Cancel_CI_Auto', label: '取消联锁自动进路'},
|
||||
/** 设置联锁自动触发 */
|
||||
CMD_SIGNAL_SET_CI_AUTO_TRIGGER: {value:'Signal_Set_CI_Auto_Trigger', label: '设置联锁自动触发'},
|
||||
|
@ -7,6 +7,10 @@ export const OperationEvent = {
|
||||
operation: '000',
|
||||
domId: '_Tips-Cancel-Menu'
|
||||
},
|
||||
password: {
|
||||
operation: '0001',
|
||||
domId: '_Tips-Cancel-Password'
|
||||
},
|
||||
clearMbm: {
|
||||
operation: '00012',
|
||||
domId: '_Tips-mbm_clear{TOP}'
|
||||
@ -834,6 +838,10 @@ export const OperationEvent = {
|
||||
menu: {
|
||||
operation: '309',
|
||||
domId: '_Tips-Signal-SetAutoInterlock-Menu'
|
||||
},
|
||||
confirm: {
|
||||
operation: '3091',
|
||||
domId: '_Tips-Signal-SetAutoInterlock-Confirm'
|
||||
}
|
||||
},
|
||||
// 取消联锁自动进路
|
||||
@ -841,6 +849,10 @@ export const OperationEvent = {
|
||||
menu: {
|
||||
operation: '310',
|
||||
domId: '_Tips-Signal-CancelAutoInterlock-Menu'
|
||||
},
|
||||
confirm: {
|
||||
operation: '3101',
|
||||
domId: '_Tips-Signal-CancelAutoInterlock-Confirm'
|
||||
}
|
||||
},
|
||||
// 设置联锁自动触发
|
||||
@ -848,6 +860,10 @@ export const OperationEvent = {
|
||||
menu: {
|
||||
operation: '311',
|
||||
domId: '_Tips-Signal-SetAutoTrigger-Menu{TOP}'
|
||||
},
|
||||
confirm: {
|
||||
operation: '3111',
|
||||
domId: '_Tips-Signal-SetAutoTrigger-Confirm'
|
||||
}
|
||||
},
|
||||
// 取消联锁自动触发
|
||||
@ -855,6 +871,10 @@ export const OperationEvent = {
|
||||
menu: {
|
||||
operation: '312',
|
||||
domId: '_Tips-Signal-CancelAutoTrigger-Menu{TOP}'
|
||||
},
|
||||
confirm: {
|
||||
operation: '3121',
|
||||
domId: '_Tips-Signal-CancelAutoTrigger-Confirm'
|
||||
}
|
||||
},
|
||||
// 信号关灯
|
||||
@ -928,7 +948,7 @@ export const OperationEvent = {
|
||||
},
|
||||
menu: {
|
||||
operation: '318',
|
||||
domId: '_Tips-Signal-cancelGuide-Menu'
|
||||
domId: '_Tips-Signal-cancelGuide-Menu{TOP}'
|
||||
},
|
||||
confirm: {
|
||||
operation: '3181',
|
||||
@ -1540,6 +1560,10 @@ export const OperationEvent = {
|
||||
menu: {
|
||||
operation: '516',
|
||||
domId: '_Tips-Stand-cancelBulkBuckleTrain-Menu'
|
||||
},
|
||||
choose: {
|
||||
operation: '5161',
|
||||
domId: '_Tips-Stand-cancelBulkBuckleTrain-Choose'
|
||||
}
|
||||
},
|
||||
// 区间列车数量限制
|
||||
|
@ -50,9 +50,7 @@ class ValidateHandler {
|
||||
judge (operate) {
|
||||
const steps = Handler.getSteps();
|
||||
const order = Handler.getOrder();
|
||||
|
||||
let valid = false;
|
||||
debugger;
|
||||
if (operate.over && steps.length == 1) { // 右键菜单直接发送校验
|
||||
if (operate && steps[0] &&
|
||||
operate.code == steps[0].code &&
|
||||
|
@ -4,8 +4,8 @@
|
||||
<span>{{ $t('map.publishedMapList') }}</span>
|
||||
</div>
|
||||
<div class="text_item">
|
||||
<filter-city v-if="project==='design'" ref="filerCity" filter-empty :query-function="queryFunction" :local-param-name="localParamName" @filterSelectChange="refresh" />
|
||||
<el-input v-if="project==='design'" v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<filter-city v-if="project==='design'|| project==='designhyd'" ref="filerCity" filter-empty :query-function="queryFunction" :local-param-name="localParamName" @filterSelectChange="refresh" />
|
||||
<el-input v-if="project==='design'|| project==='designhyd'" v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<div class="tree_mian_box">
|
||||
<el-tree ref="tree" class="tree_box" :data="treeList" node-key="id" :props="defaultProps" highlight-current :span="22" :filter-node-method="filterNode" @node-click="clickEvent">
|
||||
<span slot-scope="{ node:tnode, data }">
|
||||
@ -71,7 +71,7 @@ export default {
|
||||
removeSessionStorage('demonList');
|
||||
},
|
||||
mounted() {
|
||||
if (this.project === 'designxty' || this.project === 'designgzb') {
|
||||
if (this.project === 'designxty' || this.project === 'designgzb' || this.project === 'designhyd') {
|
||||
this.refresh();
|
||||
}
|
||||
},
|
||||
|
@ -147,8 +147,8 @@ export default {
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('global.add'), handler: this.handleAdd },
|
||||
{ text: this.$t('lesson.generation'), handler: this.handleBatchAdd},
|
||||
{ text: this.$t('lesson.copy'), handler: this.handleSaveAs }
|
||||
{ text: this.$t('lesson.generation'), handler: this.handleBatchAdd}
|
||||
// { text: this.$t('lesson.copy'), handler: this.handleSaveAs }
|
||||
]
|
||||
},
|
||||
currentModel: {}
|
||||
@ -261,7 +261,7 @@ export default {
|
||||
this.$refs.addBatch.show(this.totals);
|
||||
},
|
||||
|
||||
handleSaveAs() {
|
||||
handleSaveAs() { // 暂时先不用
|
||||
this.$refs.saveAs.show(this.$route.query.mapId);
|
||||
},
|
||||
|
||||
|
@ -23,6 +23,7 @@ import { pageQueryTraining, pageQueryTrainingNew } from '@/api/jmap/training';
|
||||
import { trainingNotify, trainingNotifyNew } from '@/api/simulation';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
import { getOperateTrainingList } from '@/api/management/operation';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import TrainingDraft from './draft';
|
||||
import localStore from 'storejs';
|
||||
@ -37,6 +38,7 @@ export default {
|
||||
mapIdList: [],
|
||||
trainingTypeList: [],
|
||||
trainingOperateTypeMap: {},
|
||||
trainingTypeMap: {},
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
@ -155,15 +157,12 @@ export default {
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.loadInitData();
|
||||
const json = localStore.get(this.$route.path);
|
||||
json.type = '';
|
||||
json.prdType = '';
|
||||
json.operateType = '';
|
||||
this.typeChoose(this.$refs.queryListPage.queryData);
|
||||
await this.loadInitData(json);
|
||||
this.typeChoose(json);
|
||||
},
|
||||
methods: {
|
||||
async loadInitData() {
|
||||
async loadInitData(queryData) {
|
||||
this.mapIdList = [];
|
||||
this.queryForm.queryObject.prdType.config.data = [];
|
||||
getPublishMapListOnline().then(response => {
|
||||
@ -175,9 +174,6 @@ export default {
|
||||
this.trainingTypeList = [];
|
||||
this.$Dictionary.trainingType().then(list => {
|
||||
this.trainingTypeList = list;
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
});
|
||||
|
||||
this.trainingOperateTypeMap = {};
|
||||
@ -197,18 +193,55 @@ export default {
|
||||
this.trainingOperateTypeMap['07'] = list07; // 列车实训
|
||||
const list08 = await this.$Dictionary.limitOperation();
|
||||
this.trainingOperateTypeMap['08'] = list08; // 限速实训
|
||||
await this.prdChoose(queryData);
|
||||
|
||||
this.reloadTable();
|
||||
},
|
||||
prdChoose(form) {
|
||||
form.type = '';
|
||||
form.operateType = '';
|
||||
async prdChoose(queryData) {
|
||||
this.trainingTypeMap = {};
|
||||
const mapId = this.$route.query.mapId;
|
||||
const res = await getOperateTrainingList({ mapId: mapId, productType: queryData.prdType });
|
||||
if (res && res.code == 200) {
|
||||
const trainingTypeLists = res.data;
|
||||
this.trainingTypeList.forEach(elem => {
|
||||
trainingTypeLists.forEach(item => {
|
||||
if (item.id == elem.code) {
|
||||
item.label = elem.name;
|
||||
item.value = elem.code;
|
||||
}
|
||||
if (this.trainingOperateTypeMap[item.id].length) {
|
||||
this.trainingOperateTypeMap[item.id].forEach(i => {
|
||||
item.children.forEach(v => {
|
||||
if (i.code == v.id) {
|
||||
v.name = i.name;
|
||||
v.code = i.code;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
trainingTypeLists.forEach(item => {
|
||||
item.children.forEach(v => {
|
||||
if (!this.trainingTypeMap[item.id]) {
|
||||
this.trainingTypeMap[item.id] = [];
|
||||
}
|
||||
|
||||
this.trainingTypeMap[item.id].push({
|
||||
label: v.name,
|
||||
value: v.code
|
||||
});
|
||||
});
|
||||
});
|
||||
this.queryForm.queryObject.type.config.data = trainingTypeLists;
|
||||
}
|
||||
},
|
||||
typeChoose(form) {
|
||||
this.queryForm.queryObject.operateType.config.data = [];
|
||||
form.operateType = '';
|
||||
if (form && form.type) {
|
||||
this.trainingOperateTypeMap[form.type].forEach(elem => {
|
||||
this.queryForm.queryObject.operateType.config.data.push({ value: elem.code, label: elem.name });
|
||||
if (form && form.type && this.trainingTypeMap[form.type]) {
|
||||
this.trainingTypeMap[form.type].forEach(elem => {
|
||||
this.queryForm.queryObject.operateType.config.data.push({ value: elem.value, label: elem.label });
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -163,7 +163,7 @@ export default {
|
||||
this.modelType = 'design';
|
||||
this.loginClient = 'Design';
|
||||
this.path = UrlConfig.design.prefix;
|
||||
sessionVal = 'design';
|
||||
sessionVal = 'designhyd';
|
||||
}
|
||||
|
||||
const nowLang = LangStorage.getLang('zh');
|
||||
|
@ -4,9 +4,30 @@
|
||||
<transition name="el-zoom-in-bottom">
|
||||
<map-system-draft ref="mapCanvas" @back="back" />
|
||||
</transition>
|
||||
<menu-exam v-if="isExam" ref="menuExam" :offset="offset" :offset-bottom="offsetBottom" :group="group" />
|
||||
<menu-exam
|
||||
v-if="isExam"
|
||||
ref="menuExam"
|
||||
:offset="offset"
|
||||
:offset-bottom="offsetBottom"
|
||||
:group="group"
|
||||
:show-station="showStation"
|
||||
:station-list="stationList"
|
||||
:show-select-station="showSelectStation"
|
||||
@switchStationMode="switchStationMode"
|
||||
/>
|
||||
|
||||
<menu-lesson v-if="isLesson" ref="lessonMenu" :offset="offset" :offset-bottom="offsetBottom" :group="group" :training-obj="trainingObj" />
|
||||
<menu-lesson
|
||||
v-if="isLesson"
|
||||
ref="lessonMenu"
|
||||
:offset="offset"
|
||||
:offset-bottom="offsetBottom"
|
||||
:group="group"
|
||||
:training-obj="trainingObj"
|
||||
:show-station="showStation"
|
||||
:station-list="stationList"
|
||||
:show-select-station="showSelectStation"
|
||||
@switchStationMode="switchStationMode"
|
||||
/>
|
||||
|
||||
<menu-demon
|
||||
v-if="isDemon"
|
||||
@ -240,6 +261,32 @@ export default {
|
||||
'$store.state.map.map': function (val) {
|
||||
this.showSelectStation = val.skinVO.code === '06' && this.$store.state.training.prdType === '01';
|
||||
this.showSelectStation && this.setStationList(val);
|
||||
},
|
||||
'$store.state.training.offsetStationCode': function(code) {
|
||||
if (code) {
|
||||
this.setCenter(code);
|
||||
}
|
||||
if (code && this.showSelectStation) {
|
||||
const deviceModel = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (deviceModel._type == 'Section' || deviceModel._type == 'Switch' || deviceModel._type == 'Signal' || deviceModel._type == 'Switch') {
|
||||
const stationModel = this.$store.getters['map/getDeviceByCode'](deviceModel.stationCode);
|
||||
this.switchStationMode(stationModel.code, true);
|
||||
} else if (deviceModel._type === 'Station') {
|
||||
let stationModel = '';
|
||||
if (deviceModel.centralized) {
|
||||
stationModel = deviceModel;
|
||||
} else {
|
||||
this.$store.state.map.map.stationList || [].forEach(item => {
|
||||
item.chargeStationCodeList || [].forEach(it => {
|
||||
if (it === deviceModel.code) {
|
||||
stationModel = item;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
this.switchStationMode(stationModel.code, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
@ -565,9 +612,9 @@ export default {
|
||||
panel.setAttribute('style', '');
|
||||
}
|
||||
},
|
||||
switchStationMode(val) {
|
||||
switchStationMode(val, isTraining) {
|
||||
this.showStation = val;
|
||||
this.$refs.mapCanvas && this.$refs.mapCanvas.setShowStation(this.showStation);
|
||||
this.$refs.mapCanvas && this.$refs.mapCanvas.setShowStation(this.showStation, isTraining);
|
||||
},
|
||||
setStationList(val) {
|
||||
this.stationList = [];
|
||||
|
@ -3,6 +3,9 @@
|
||||
<div class="display-card" :style="{top: offset + 'px'}">
|
||||
<el-row style="vertical-align:middle; ">
|
||||
<span class="display-time">{{ formatUsedTime }}</span>
|
||||
<el-select v-if="showSelectStation" v-model="showStation" style="width: 100px;position: fixed; right: 10px;" size="small" @change="switchStationMode">
|
||||
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="display-draft" :style="{bottom: offsetBottom + 'px'}">
|
||||
@ -41,6 +44,24 @@ export default {
|
||||
offsetBottom: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
showSelectStation: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
stationList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
showStation: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -152,6 +173,9 @@ export default {
|
||||
refresh() {
|
||||
this.isDisable = false;
|
||||
this.$store.dispatch('training/end', null);
|
||||
},
|
||||
switchStationMode(val) {
|
||||
this.$emit('switchStationMode', val);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -9,6 +9,9 @@
|
||||
</el-radio-group>
|
||||
<span class="display-time">{{ formatUsedTime }}</span>
|
||||
<span v-if="demoMode === TrainingMode.TEST" class="display-score">{{ $t('display.lesson.score') }}{{ formatScore }}</span>
|
||||
<el-select v-if="showSelectStation" v-model="showStation" style="width: 100px; position: fixed; right: 10px;" size="small" @change="switchStationMode">
|
||||
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
</el-row>
|
||||
</div>
|
||||
<div id="teachGroupButton" class="display-draft" :style="{bottom: offsetBottom + 'px'}">
|
||||
@ -55,6 +58,24 @@ export default {
|
||||
offsetBottom: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
showSelectStation: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
stationList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
showStation: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -201,6 +222,9 @@ export default {
|
||||
} else {
|
||||
buttons.setAttribute('style', '');
|
||||
}
|
||||
},
|
||||
switchStationMode(val) {
|
||||
this.$emit('switchStationMode', val);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -376,7 +376,7 @@ export default {
|
||||
});
|
||||
this.$jlmap.updateShowMode(list, showMode);
|
||||
},
|
||||
setShowStation(stationCode) {
|
||||
setShowStation(stationCode, isTraining) {
|
||||
const nameList = Object.keys(this.$store.state.map.map);
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
@ -385,7 +385,7 @@ export default {
|
||||
}
|
||||
});
|
||||
this.$jlmap.updateShowStation(list, stationCode);
|
||||
this.setCenter(stationCode);
|
||||
!isTraining && this.setCenter(stationCode);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -165,8 +165,8 @@ export default {
|
||||
mapViewLoaded(loading) {
|
||||
this.$refs.jlmapVisual && this.$refs.jlmapVisual.mapViewLoaded(loading);
|
||||
},
|
||||
setShowStation(stationCode) {
|
||||
this.$refs.jlmapVisual && this.$refs.jlmapVisual.setShowStation(stationCode);
|
||||
setShowStation(stationCode, isTraining) {
|
||||
this.$refs.jlmapVisual && this.$refs.jlmapVisual.setShowStation(stationCode, isTraining);
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$refs.jlmapVisual && this.$refs.jlmapVisual.setCenter(code);
|
||||
|
@ -111,8 +111,8 @@ export default {
|
||||
clearSubscribe() {
|
||||
clearSubscribe(`${displayTopic}\/${this.group}`);
|
||||
},
|
||||
setShowStation(stationCode) {
|
||||
this.$refs.mapCommon && this.$refs.mapCommon.setShowStation(stationCode);
|
||||
setShowStation(stationCode, isTraining) {
|
||||
this.$refs.mapCommon && this.$refs.mapCommon.setShowStation(stationCode, isTraining);
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$refs.mapCommon && this.$refs.mapCommon.setCenter(code);
|
||||
|
@ -133,7 +133,7 @@ export default {
|
||||
const domId = OperationHandler.getDomIdByOperation(step.operation);
|
||||
const btnDom = document.getElementById(domId);
|
||||
if (btnDom) {
|
||||
const offset = getDomOffset(btnDom, true);
|
||||
const offset = getDomOffset(btnDom);
|
||||
if (offset.x == 0 && offset.y == 0) {
|
||||
return null;
|
||||
}
|
||||
|
BIN
static/model/station/station3.FBX
Normal file
BIN
static/model/suidao/hebsuidao.FBX
Normal file
BIN
static/model/suidao/hebsuidao1.FBX
Normal file
BIN
static/texture/heb/Station11094.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
static/texture/heb/Station11136.jpg
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
static/texture/heb/Station17293.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
static/texture/heb/Station18398.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
static/texture/heb/Station22163.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
static/texture/heb/Station25464.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
static/texture/heb/Station28090.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
static/texture/heb/Station41999.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
static/texture/heb/Station44338.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
static/texture/heb/Station46464.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
static/texture/heb/Station50565.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
static/texture/heb/Station5361.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
static/texture/heb/Station60068.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
static/texture/heb/Station62429.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
static/texture/heb/Station64444.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
static/texture/heb/Station71700.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
static/texture/heb/Station72132.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
static/texture/heb/Station78164.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
static/texture/heb/Station79537.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
static/texture/heb/Station82618.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
static/texture/heb/Station85520.jpg
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
static/texture/heb/Station89483.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
static/texture/heb/Station96090.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
static/texture/heb/haerbinlist.jpg
Normal file
After Width: | Height: | Size: 416 KiB |
BIN
static/texture/heb/kongbai.jpg
Normal file
After Width: | Height: | Size: 22 KiB |