修改三维通号车站值班员钩锁

This commit is contained in:
sunzhenyu 2020-08-13 16:50:54 +08:00
parent 6294b02990
commit 58366e737b
10 changed files with 87 additions and 16 deletions

View File

@ -74,7 +74,7 @@ export function getPublish3dMapDetail(id) {
return datad.then();
}
/** 更新地图3d数据*/
/** 录制托管*/
export function tuoguan3ddrive(group,data) {
return request({
url: `/api/scriptSimulation/${group}/trust`,
@ -82,3 +82,12 @@ export function tuoguan3ddrive(group,data) {
data: data
});
}
/** 三维设备故障钩锁操作*/
export function gousuo3dAction(group, data) {
return request({
url: `/simulation/${group}/operate/Switch_Hook_Lock`,
method: 'post',
data: data
});
}

View File

@ -122,9 +122,9 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
DeviceDestroy(event.data);
resetfaultlist();
let fault = event.data.body.faultInfoList;
console.log(fault);
for(let i=0,leni= fault.length;i<leni;i++){
for(let i=0,leni= fault.length;i<leni;i++){
console.log(fault[i]);
let newfault = {
code:fault[i].code,
name:'',
@ -136,7 +136,7 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
if(fault[i].type == "SIGNAL"){
newfault.name = lablecodemap.signal[newfault.code];
newfault.typetext = "信号机";
if(fault[i].fault[1] == "MAIN_FILAMENT_BROKEN"){
if(fault[i].fault == "MAIN_FILAMENT_BROKEN"){
newfault.text = "主灯丝断丝故障";
}
}
@ -144,7 +144,7 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
if(fault[i].type == "SWITCH"){
newfault.name = lablecodemap.switch[newfault.code];
newfault.typetext = "道岔";
if(fault[i].fault[1] == "SPLIT"){
if(fault[i].fault == "SPLIT"){
newfault.text = "道岔挤岔";
}
@ -153,7 +153,7 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
if(fault[i].type == "SECTION"){
newfault.name = lablecodemap.section[newfault.code];
newfault.typetext = "区段";
if(fault[i].fault[1] == "FAULT"){
if(fault[i].fault == "FAULT"){
newfault.text = "计轴故障";
}
@ -162,7 +162,7 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
if(fault[i].type == "STAND"){
newfault.name = newfault.code;
newfault.typetext = "屏蔽门";
if(fault[i].fault[1] == "FAULT_PSD_OPEN"){
if(fault[i].fault == "FAULT_PSD_OPEN"){
newfault.text = "屏蔽门无法关闭故障";
}

View File

@ -2,9 +2,9 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';

View File

@ -9,7 +9,9 @@
<el-button type="primary" @click="switchhide">{{switchshow}}</el-button>
</el-button-group>
</div> -->
<div id="jl3ddevicerepir" class="repirbutton" :style="repirBG" @click="devicerepir"></div>
<div id="jl3ddevicerepir" class="repirbutton" v-show="repirShow" @click="devicerepir"></div>
<div id="jl3ddevicerepir" class="gousuobutton1" v-show="gousuoShow" @click="gousuoDingWei"></div>
<div id="jl3ddevicerepir" class="gousuobutton2" v-show="gousuoShow" @click="gousuoFanWei"></div>
<div id="jl3dclose" class="backbutton" @click="close3ddeviceview"></div>
<Jl3ddevice-Msg v-show="isswitch">
@ -33,7 +35,10 @@
import Jl3ddeviceMsg from '@/views/jlmap3d/maintainer/component/devicemsg';
import Jl3ddeviceList from '@/views/jlmap3d/maintainer/component/devicelist';
import { getSimulationInfoNew } from '@/api/simulation';
import { getSimulationInfoNew,getSimulationUserInfo } from '@/api/simulation';
import { gousuo3dAction } from '@/api/jlmap3d/load3ddata';
import { sendCommandNew } from '@/api/jmap/training';
import Command from '@/scripts/cmdPlugin/Command';
import Handler from '@/scripts/cmdPlugin/Handler';
@ -51,7 +56,8 @@
jl3d: null,
windowstatus:false,
nowdevice:null,
repirBG:null,
repirShow:true,
gousuoShow:false,
//
equiplist:[],
switchstatus:true,
@ -140,10 +146,14 @@
this.initnewdata(group,header);
if(group){
getSimulationInfoNew(group).then(netdata => {
if(netdata.data.type == "SCRIPT_MAKING"){
this.repirBG = {backgroundImage:'url("/static/texture/gousuo.png")'}
getSimulationUserInfo(group).then(netdata => {
if(netdata.data.type == "STATION_SUPERVISOR"){
this.repirShow = false;
this.gousuoShow = true;
}
// repirShow:true,
// gousuoShow:true,
});
}
},
@ -178,6 +188,36 @@
this.jl3d.domresize();
}
},
gousuoDingWei(){
let command = {
switchCode:this.nowdevice.code,
normal:true,
};
this.gousuoAction(command);
},
gousuoFanWei(){
let command = {
switchCode:this.nowdevice.code,
normal:false,
};
this.gousuoAction(command);
},
gousuoAction(command){
if(this.nowdevice &&this.nowdevice.type == "SWITCH"){
gousuo3dAction(this.group,command).then((response) => {
if(response.code == "200"){
if(command.normal == true){
warningmsg("已钩锁到定位")
}else{
warningmsg("已钩锁到反位")
}
}
}).catch(error => {
warningmsg("钩锁失败")
});
}
},
devicerepir(){
console.log(this.nowdevice);
if(this.nowdevice){
@ -307,6 +347,28 @@
background-repeat:no-repeat;
background-size:100%;
}
.gousuobutton1{
width:160px;
height:160px;
position: absolute;
right:345px;
bottom:5px;
background-image:url("/static/texture/gousuodingwei.png");
background-repeat:no-repeat;
background-size:100%;
}
.gousuobutton2{
width:160px;
height:160px;
position: absolute;
right:180px;
bottom:5px;
background-image:url("/static/texture/gousuofanwei.png");
background-repeat:no-repeat;
background-size:100%;
}
.backbutton{
width:50px;
height:50px;

View File

@ -125,7 +125,7 @@ export default {
text-align: center;
font-size: 20px;
line-height:100px;
cursor:pointer;
}
.selectButtonImg1{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 112 KiB