This commit is contained in:
joylink_cuiweidong 2020-07-31 16:03:48 +08:00
commit 48cd28bd88
31 changed files with 351 additions and 311 deletions

View File

@ -167,3 +167,11 @@ export function setVrPsdConfig(id, data) {
});
}
/** 添加/修改PLC配置 */
export function setPlcConfig(id, data) {
return request({
url: `/api/device/${id}/config/plcgateway`,
method: 'put',
data: data
});
}

View File

@ -152,10 +152,9 @@
>
<el-option
v-for="option in item.options"
:key="option.value"
:label="option.label"
:value="option.value"
:disabled="option.disabled"
:key="option[item.optionValue|| 'value']"
:label="option[item.optionLabel || 'label']"
:value="option[item.optionValue || 'value']"
/>
</el-select>
</template>
@ -171,9 +170,9 @@
>
<el-option
v-for="option in item.options"
:key="option.value"
:label="option.label"
:value="option.value"
:key="option[item.optionValue|| 'value']"
:label="option[item.optionLabel || 'label']"
:value="option[item.optionValue || 'value']"
:disabled="option.disabled"
/>
</el-select>
@ -187,9 +186,9 @@
>
<el-option
v-for="option in item.options"
:key="option.value"
:label="option.label"
:value="option.value"
:key="option[item.optionValue|| 'value']"
:label="option[item.optionLabel || 'label']"
:value="option[item.optionValue || 'value']"
:disabled="option.disabled"
/>
</el-select>
@ -204,9 +203,9 @@
>
<el-option
v-for="option in item.options"
:key="option.value"
:label="option.label"
:value="option.value"
:key="option[item.optionValue|| 'value']"
:label="option[item.optionLabel || 'label']"
:value="option[item.optionValue || 'value']"
:disabled="option.disabled"
/>
</el-select>
@ -217,12 +216,13 @@
filterable
:placeholder="item.placeholder"
:disabled="item.disabled"
@change="((val)=>{deviceChange(val, item)})"
>
<el-option
v-for="option in item.options"
:key="option.value"
:label="option.label"
:value="option.value"
:key="option[item.optionValue|| 'value']"
:label="option[item.optionLabel || 'label']"
:value="option[item.optionValue || 'value']"
:disabled="option.disabled"
/>
</el-select>
@ -386,6 +386,11 @@ export default {
},
clearValidate() {
this.$refs.form.clearValidate();
},
deviceChange(data, item) {
if (item.deviceChange) {
item.deviceChange(data);
}
}
}
};

View File

@ -41,7 +41,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
this.teststomp = new StompClient();
this.topic = '/user/queue/simulation/drive/'+routegroup;
let header = {'X-Token': getToken() };
this.updatamap = function(newsectionlist,newlinklist,newsignallist,newstationstandlist,newtrainlisttest,newrealsectionlist,newrails, materiallist, nowaction, scene) {
// console.log(mapdata);
// console.log(newtrainlisttest);
@ -104,13 +103,17 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
return;
}
if(data.type == "Train_Hmi_3D"){
// console.log(data.body);
updatestatus(data.body);
if(data.body.trust == '1'){
updateDriverTrust(data.body.code,true);
}else{
updateDriverTrust(data.body.code,false);
}
// trainhmi(data.body);
// if(data.body.trust){
// if(data.body.trust == '1'){
// updateDriverTrust(data.body.code,true);
// }else{
// updateDriverTrust(data.body.code,false);
// }
// }
return;
}
// if (event.data.type== 'SIGNAL' && signallist) {
@ -338,8 +341,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
}
}else{
console.log(trainmodel.children[0].position.z);
console.log(pos.z);
//
if(trainmodel.children[0].position.z < pos.z){
trainmodel.children[0].up = new THREE.Vector3(-1,0,0);
let tangent = trainmodel.curve.getTangentAt(data.offset).normalize();
@ -427,18 +429,6 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta
}
}
function trainhmi(data){
// for(let i=0,leni=data.length;i<leni;i++){
// if(trainmodel.code == data[0].code){
// console.log(data[i]);
//
// updatestatus(data[0]);
// return;
// }
// }
}
function traindoorupdate(data){
// console.log(data);

View File

@ -228,6 +228,10 @@ export default {
label: '越引导信号行驶',
handler: this.handleOverFuideSignal
},
{
label: 'URM模式驾驶',
handler: this.handleURMTrain
},
{
label: '越红灯行驶',
handler: this.handleOverEedLight
@ -365,6 +369,18 @@ export default {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleURMTrain() {
const group = this.$route.query.group;
const param = {
commandType: 'Drive_In_Urm_Mode',
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
params: {}
};
commitTrainSend(group, param).then(({valid, operate})=>{
}).catch((error) => {
this.$refs.noticeInfo.doShow(error.message);
});
},
handleSpeedLimit() { //
this.$refs.speedLimit.doShow(this.selected);
},

View File

@ -62,7 +62,7 @@ export function parser(data, skinCode, showConfig) {
zrUtil.each(data.sectionList || [], elem => {
if (elem.type == '02' || elem.type == '03') {
mapDevice[elem.code].parentName = mapDevice[elem.parentCode] ? mapDevice[elem.parentCode].name : '';
} else if (elem.type == '01' && (elem.standTrack || elem.reentryTrack)) {
} else if (elem.type == '01' && (elem.standTrack || elem.reentryTrack) && elem.belongStation) {
mapDevice[elem.belongStation].sectionCode = elem.code;
}
}, this);

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

@ -148,7 +148,14 @@ export default {
}
this.getExpandList(this.courseModel.id);
}).catch(()=>{
this.$messageBox('获取考试信息失败!');
this.$alert('获取考试信息失败!', '提示', {
confirmButtonText: '确定',
type: 'error',
center: true,
callback: action => {
this.backLessonList();
}
});
});
},
buy() {

View File

@ -121,7 +121,7 @@ import axios from 'axios';
if(netdata.data.type == "SCRIPT_MAKING"){
this.tuoguanbutton = true;
}
this.updatetrainlist();
this.inittrainlist();
});
}
@ -193,7 +193,7 @@ import axios from 'axios';
this.$store.dispatch('training/updateMemberTrust', {deviceCode:code,trust:trustStatus});
}
},
updatetrainlist(){
inittrainlist(){
getSimulationTrainlistNew(this.group).then(netdata => {
this.options = [];
this.trainlist = netdata.data;
@ -240,6 +240,62 @@ import axios from 'axios';
this.options.push(option);
}
this.options.sort(
function(obj1,obj2) {
let val1 = obj1.value;
let val2 = obj2.value;
return val1 - val2;
}
);
});
//
if(this.tuoguanbutton == true){
let netdata = this.$store.state.training.memberData;
for(let k in netdata){
if(netdata[k].userId == this.userId){
// console.log(this.$store.state.scriptRecord.type);
this.userrole = netdata[k].type;
if(netdata[k].trust){
this.tuoguanstatus = netdata[k].trust;
if(this.tuoguanstatus){
this.tuoguanbuttonmsg = "取消托管";
}else{
this.tuoguanbuttonmsg = "托管";
}
}
break;
}
}
}
},
updatetrainlist(){
getSimulationTrainlistNew(this.group).then(netdata => {
this.options = [];
this.trainlist = netdata.data;
for(let i=0;i<netdata.data.length;i++){
let option= {
value: netdata.data[i].groupNumber,
label: netdata.data[i].groupNumber,
name:null,
}
option.disabled = false;
if(netdata.data[i].name){
option.label = netdata.data[i].name+"正在驾驶"+netdata.data[i].groupNumber;
this.initMsg = netdata.data[i].name+"正在驾驶"+netdata.data[i].groupNumber;
this.groupNumber = netdata.data[i].groupNumber;
option.disabled = true;
}
if(netdata.data[i].driverId){
if(netdata.data[i].driverId == this.userId){
this.selVal = netdata.data[i].groupNumber;
this.groupnum = netdata.data[i].groupNumber;
}
}
this.options.push(option);
}
this.options.sort(
function(obj1,obj2) {
let val1 = obj1.value;
@ -268,9 +324,6 @@ import axios from 'axios';
}
}
// getSimulationMembersNew(this.group).then(netdata => {
// for(let i=0,leni=netdata.data.length;i<leni;i++){

View File

@ -179,11 +179,11 @@
driverlighttf:"rotate(0deg)",
headlighttf:"rotate(0deg)",
atoOn:null,
// atoOn:null,
atobuttonimg:"/static/jl3d/control/green.png",
driveMode:null,
// driveMode:null,
rmbuttonimg:"/static/jl3d/control/green.png",
runLevel:null,
// runLevel:null,
cbtcbuttonimg:"/static/jl3d/control/green.png",
doorleftstatus:false,
doorrightstatus:false,
@ -390,24 +390,25 @@
// console.log(netdata);
});
},
updatedoorlight: function (doorleftmode,doorrightmode){
if(doorleftmode != this.doorleftstatus){
this.doorleftstatus = doorleftmode;
if(doorleftmode == true){
updatedoorlight: function (newdata){
if(newdata.leftDoorCanClose != undefined){
// this.doorleftstatus = newdata.leftDoorCanClose;
if(newdata.leftDoorCanClose == true){
this.doorleftimg = this.greenlimg;
}else{
this.doorleftimg = this.greenimg;
}
}
if(doorrightmode != this.doorrightstatus){
this.doorrightstatus = doorrightmode;
if(doorrightmode == true){
if(newdata.rightDoorCanClose != undefined){
// this.doorrightstatus = newdata.rightDoorCanClose;
if(newdata.rightDoorCanClose == true){
this.doorrightimg = this.greenlimg;
}else{
this.doorrightimg = this.greenimg;
}
}
},
dloclick: function (e){
let data = {
@ -473,24 +474,24 @@
},
updatabuttonlight: function (data){
// console.log(data);
if(data.runLevel!= this.runLevel){
this.runLevel = data.runLevel;
if(data.runLevel){
// this.runLevel = data.runLevel;
if(data.runLevel == "CBTC"){
this.cbtcbuttonimg = this.greenlimg;
}else{
this.cbtcbuttonimg = this.greenimg;
}
}
if(data.driveMode!= this.driveMode){
this.driveMode = data.driveMode;
if(data.driveMode){
// this.driveMode = data.driveMode;
if(data.driveMode == "RM"){
this.rmbuttonimg = this.greenlimg;
}else{
this.rmbuttonimg = this.greenimg;
}
}
if(data.atoOn!= this.atoOn){
this.atoOn = data.atoOn;
if(data.atoOn){
// this.atoOn = data.atoOn;
if(data.atoOn){
this.atobuttonimg = this.greenlimg;
}else{

View File

@ -285,10 +285,12 @@ export default {
},
updatestatus(newdata){
this.trainnum = newdata.groupNumber;
if(newdata.groupNumber){
this.trainnum = newdata.groupNumber;
}
updatedoorlight(newdata);
this.$refs.mmiui.updatetrainstatus(newdata);
updatabuttonlight(newdata);
updatedoorlight(newdata.leftDoorCanClose,newdata.rightDoorCanClose);
},
warningmsg(nowmsg){
this.controlmsg = nowmsg;

View File

@ -4,16 +4,14 @@ export function mmirender(dom) {
let scope = this;
let scene = new THREE.Scene();
scene.background = new THREE.Color( 0xcce0ff );
scene.fog = new THREE.Fog( 0xcce0ff, 500, 10000 );
scene.add( new THREE.AmbientLight( 0xffffff ) );
// camera
let camera = new THREE.PerspectiveCamera( 30, 360 / 200, 1, 10000 );
let camera = new THREE.PerspectiveCamera( 30, 360 / 200, 1, 100 );
camera.position.set( 0, 0, 80 );
let renderer = new THREE.WebGLRenderer( { antialias: true } );
renderer.setPixelRatio( window.devicePixelRatio );
let renderer = new THREE.WebGLRenderer( );
// renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( 360, 200 );
var geometry = new THREE.PlaneBufferGeometry( 80, 80, 2 );
@ -91,16 +89,18 @@ export function mmirender(dom) {
dom.appendChild( renderer.domElement);
animate();
renderer.render( scene, camera );
// animate();
function animate() {
//zc.rotation.z -= 0.01;
renderer.render( scene, camera );
requestAnimationFrame(animate);
// requestAnimationFrame(animate);
}
this.updatezz = function(speed){
zc.rotation.z = -Math.PI*(65.8+169*speed/110)/100;
renderer.render( scene, camera );
}
this.updateatp = function(atpspeed){
if(atpspeed<0){
@ -110,6 +110,7 @@ export function mmirender(dom) {
atp.rotation.z = -Math.PI*(65.8+169*atpspeed/110)/100;
}
// renderer.render( scene, camera );
}
this.updateato = function(atospeed){
@ -120,5 +121,6 @@ export function mmirender(dom) {
ato.rotation.z = -Math.PI*(65.8+169*atospeed/110)/100;
}
// renderer.render( scene, camera );
}
}

View File

@ -211,9 +211,12 @@ export default {
},
updatetrainstatus(newdata){
//
this.updatemmispeedview(newdata.v,newdata.pv,newdata.tv);
this.updateMmiSpeedView(newdata.v,newdata.pv,newdata.tv);
if(newdata.maLen){
this.updateMmiLen(newdata.maLen);
}
this.updatemmilen(newdata.maLen);
this.updatemmidrivemodelevel(newdata.runLevel,newdata.driveMode,newdata.atoOn,newdata.atpOn);
// this.updatammirunlevel(newdata.runLevel);
@ -221,30 +224,38 @@ export default {
// this.updatemmidrivemode(newdata.driveMode);
//
// this.updatemmiatoatp(newdata.atoOn,newdata.atpOn);
if(newdata.nextStation){
this.updateMmiNextStation(newdata.nextStation);
}
if(newdata.endStation){
this.updateMmiEndStation(newdata.endStation);
}
this.updatemmistation(newdata.endStation,newdata.nextStation);
this.updatemmidoormode(newdata.leftDoorCanClose,newdata.rightDoorCanClose);
},
updatemmistate(aaa){
},
updatemmispeedview(speed,atpspeed,atospeed) {
updateMmiSpeedView(speed,atpspeed,atospeed) {
this.nowspeed = parseInt(speed);
if(this.mmimodel.updatezz){
this.mmimodel.updatezz(speed);
}
this.nowatpspeed = parseInt(atpspeed);
if(this.mmimodel.updateatp){
this.mmimodel.updateatp(atpspeed);
}
this.nowatospeed = parseInt(atospeed);
if(this.mmimodel.updateato){
this.mmimodel.updateato(atospeed);
}
if(this.m9state1 == false){
if(speed>atospeed){
if(this.nowspeed>this.nowatospeed){
this.newa1state = "yellow";
}else{
this.newa1state = "black";
@ -327,7 +338,7 @@ export default {
// }
},
updatemmidrivemodelevel(runlevel,dirvemode,atoon,atpon){
if(runlevel != this.m2state){
if(runlevel){
if(runlevel == "CBTC"){
this.m2state = runlevel;
this.m2image = this.images.m2['cbtc'];
@ -340,7 +351,7 @@ export default {
}
}
if(dirvemode != this.m1state){
if(dirvemode){
if(dirvemode == "CM"){
this.m1state = dirvemode;
this.m1image = this.images.m1['cm'];
@ -356,7 +367,7 @@ export default {
}
}
//
if(this.m9state1 != atoon){
if(this.m9state1){
this.m9state1 = atoon;
if(atoon){
@ -396,7 +407,7 @@ export default {
}
},
updatemmilen(len) {
updateMmiLen(len) {
//this.malen = 150+"px";
if(len>=750){
this.malen = 158+"px";
@ -449,13 +460,18 @@ export default {
this.c1image = this.images.c1[this.c1state];
}
},
updatemmistation(end,next){
if(next != this.nextstation || end != this.endstation){
this.endstation = end;
updateMmiNextStation(next){
if(next){
this.nextstation = next;
}
},
updateMmiEndStation(end){
if(end){
this.endstation = end;
}
},
},
beforeDestroy() {
}

View File

@ -16,7 +16,7 @@ import { checkLoginLine } from '@/api/login';
import { EventBus } from '@/scripts/event-bus';
import MenuReplay from './menuReplay';
import { getToken } from '@/utils/auth';
import { DeviceMenu, getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
import { getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
export default {
name:'RefereeDisplay',
@ -151,7 +151,6 @@ export default {
async initLoadData() {
this.$store.dispatch('training/reset');
try {
// await this.loadSimulationInfo();
await this.initLoadRecordData();
this.checkLoginLineTimer();
} catch (error) {
@ -219,29 +218,6 @@ export default {
this.endViewLoading();
}
},
// 仿
// async loadSimulationInfo() {
// this.dataError = false;
// const resp = await getSimulationInfoNew(this.group);
// if (resp && resp.code == 200 && resp.data && !resp.data.dataError) {
// this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause);
// this.questId = Number(resp.data.questId) || 0;
// this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
// if (resp.data.planRunning) {
// this.planRunning = resp.data.planRunning;
// } else {
// this.$store.dispatch('training/over');
// }
// if (this.isDemon) {
// this.$refs.menuDemon.initPlannedDriving(resp.data.planRunning);
// } else if (this.isScript) {
// this.$refs.menuScript.initPlannedDriving(resp.data.planRunning);
// }
// } else if (resp && resp.code == 200 && resp.data && resp.data.dataError) {
// this.dataError = true;
// this.$messageBox(',');
// }
// },
setWindowSize() {
this.$nextTick(() => {
const width = this.width;

View File

@ -141,10 +141,6 @@ export default {
}
},
watch:{
// $store.state.config.menuBarLoadedCount
// 'offset': function (val) {
// this.dialogShow && this.dragEvent();
// },
'$store.state.socket.autoFaultTrigger':function(val) {
this.dialogShow && this.getSimulationFaultRules();
}

View File

@ -52,7 +52,7 @@ import Cookies from 'js-cookie';
//
// import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
// import Jl3dDrive from '@/views/jlmap3d/drive/jl3ddrive';
import { timeFormat } from '@/utils/date';
export default {
@ -63,8 +63,8 @@ export default {
ScriptPreviewChat,
MapSystemDraft,
MenuSchema,
MenuSystemTime,
Jl3dDrive
MenuSystemTime
// Jl3dDrive
},
data() {
return {
@ -100,8 +100,8 @@ export default {
'canvasHeight'
]),
...mapGetters('map', [
'map',
'stationList'
'map',
'stationList'
]),
// ...mapGetters('training', [
// 'offsetStationCode'
@ -146,8 +146,8 @@ export default {
}
},
'$store.state.training.prdType':function(val) {
this.setPosition();
this.setMode();
this.setPosition();
this.setMode();
},
// '$store.state.training.prdType': function(val) {
// debugger;
@ -160,7 +160,7 @@ export default {
},
'stationList': function () {
this.setStationList();
},
},
$route() {
// this.$nextTick(() => {
this.initLoadData();
@ -246,11 +246,11 @@ export default {
},
setPosition() {
this.$nextTick(() => {
const menuBar = document.getElementById('menuBar');
const menuTool = document.getElementById('menuTool');
const menuBottom = document.getElementById('menuButton');
this.offset = 15 + (menuBar ? menuBar.offsetHeight || 0 : 0) + (menuTool ? menuTool.offsetHeight || 0 : 0);
this.offsetBottom = 15 + (menuBottom ? menuBottom.offsetHeight || 0 : 0);
const menuBar = document.getElementById('menuBar');
const menuTool = document.getElementById('menuTool');
const menuBottom = document.getElementById('menuButton');
this.offset = 15 + (menuBar ? menuBar.offsetHeight || 0 : 0) + (menuTool ? menuTool.offsetHeight || 0 : 0);
this.offsetBottom = 15 + (menuBottom ? menuBottom.offsetHeight || 0 : 0);
});
},
async back() {
@ -295,8 +295,8 @@ export default {
lastData = Object.values(lastData);
const lastMemberList = [];
const dispatcherList = [];
const electricDispatcherList = [];
const depotDispatcherList = [];
// const electricDispatcherList = [];
// const depotDispatcherList = [];
const stationSupervisorList = [];
const driverList = [];
const maintainerList = [];
@ -386,10 +386,10 @@ export default {
},
switchMode(prdType) {
this.$store.dispatch('training/setPrdType', prdType);
},
setMode() {
this.showSelectStation = this.$store.state.map.map.skinVO.code === '06' && this.$store.state.training.prdType === '01';
},
},
setMode() {
this.showSelectStation = this.$store.state.map.map.skinVO.code === '06' && this.$store.state.training.prdType === '01';
},
// hidepanel() {
// if (this.isDrive) {
// this.panelShow = false;

View File

@ -12,12 +12,14 @@
:offset-bottom="offsetBottom"
:data-error="dataError"
:script-id="scriptId"
:show-station="showStation"
@hidepanel="hidepanel"
@passflow="passflow"
@quitQuest="quitQuest"
@jl3dstation="jl3dstation"
@devicemodel="devicemodel"
@showScheduling="showScheduling"
@switchStationMode="switchStationMode"
/>
<menu-lesson
v-if="isLesson"
@ -142,7 +144,7 @@ export default {
offset: 15,
offsetBottom: 15,
tipBottom: 0,
scriptId:0,
scriptId: 0,
dataError: false,
group:'',
showStation: '',
@ -212,7 +214,7 @@ export default {
}
},
watch: {
'$store.state.config.menuBarLoadedCount': function (val) {
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar
this.setPosition();
},
'$store.state.training.prdType': function (val) { //
@ -356,10 +358,9 @@ export default {
this.endViewLoading();
}
},
// 仿
// 仿group仿
async loadSimulationInfo() {
// 仿
getSimulationMemberList(this.$route.query.group).then(resp => {
getSimulationMemberList(this.$route.query.group).then(resp => { // 仿
this.$store.dispatch('training/setMemberList', {memberList:resp.data, userId: this.$store.state.user.id});
}).catch(() => {
this.$messageBox('获取仿真成员列表失败!');
@ -372,11 +373,11 @@ export default {
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
this.planRunning = resp.data.planRunning;
this.$store.dispatch('map/setRunPlanStatus', this.planRunning);
if (!resp.data.planRunning) {
if (!this.planRunning) {
this.$store.dispatch('training/over');
}
if (this.isDemon) {
this.$refs.menuDemon.initPlannedDriving(resp.data.planRunning);
this.$refs.menuDemon.initPlannedDriving(this.planRunning); //
} else if (this.isScript) {
// this.$refs.menuScript.initPlannedDriving(resp.data.planRunning);
}

View File

@ -11,12 +11,11 @@
<el-button type="primary" size="small" @click="back">{{ projectDevice?'退出':$t('display.demon.back') }}</el-button>
<template v-if="!dataError">
<template v-if="isShowQuest">
<!-- && !isDesignPlatform -->
<el-button v-if="!isDesignPlatform" type="danger" size="small" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>
<el-button v-if="!isDesignPlatform" type="danger" size="small" @click="handleQuitQuest">退出剧本</el-button>
</template>
<template v-else-if="!projectDevice">
<el-button type="danger" size="small" @click="end">{{ $t('display.demon.initialize') }}</el-button>
<el-button type="success" :disabled="isDisable || dataError" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
<el-button type="success" :disabled="isDisable" size="small" @click="selectBeginTime">{{ $t('display.demon.drivingByPlan') }}</el-button>
</template>
<!-- 设备视图 -->
<el-button v-if="isShow3dmodel && !isShowScheduling" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
@ -67,6 +66,12 @@ export default {
return 0;
}
},
showStation: {
type: String,
default() {
return '';
}
},
dataError: {
type: Boolean,
default() {
@ -129,13 +134,6 @@ export default {
'$store.state.training.subscribeCount': function () {
this.group && this.initLoadPage();
},
'$store.state.socket.tipOperateCount': function (val) {
this.$alert(this.$t('display.demon.taskOperateSuccess'), this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
callback: action => {
}
});
},
'$store.state.socket.simulationRoleList':function(val) {
(val || []).forEach(item => {
if (item.messageType === 'KICK_OUT' && item.userId == this.$store.state.user.id) {
@ -192,7 +190,7 @@ export default {
selectBeginTime() {
this.$refs.setTime.doShow();
},
start(model) {
start(model) { // 仿
this.isDisable = true;
const data = {
time: model.initTime
@ -205,6 +203,9 @@ export default {
this.$store.dispatch('map/setRunPlanStatus', true);
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
this.$store.dispatch('map/setShowCentralizedStationNum');
if (this.$route.query.lineCode == '06') {
this.$emit('switchStationMode', this.showStation); // 线
}
});
}).catch(error => {
this.isDisable = false;
@ -249,7 +250,7 @@ export default {
},
handleQuitQuest() {
quitScriptNew(this.group).then(resp => {
getSimulationInfoNew(this.group).then(()=>{
getSimulationInfoNew(this.group).then((res)=>{
this.quitQuest();
this.initLoadPage();
this.clearAllData();

View File

@ -10,8 +10,6 @@
</div>
<div class="practice-bottom" :style="{bottom: offsetBottom + 'px'}">
<el-button-group>
<!-- v-if="!isScriptCommand" -->
<!-- v-if="!isScriptCommand" -->
<el-button type="success" :disabled="isDisable || dataError" @click="selectBeginTime">按计划行车</el-button>
<el-button type="danger" :disabled="dataError" @click="end">初始化</el-button>
<el-button type="primary" @click="back">返回</el-button>
@ -98,14 +96,7 @@ export default {
this.isDisable = true;
const data = {
time: model.initTime
// loadNumber:this.trainList.length
};
// const data = {
// time: model.initTime
// };
// if (this.$route.query.prdType === '04') {
// data.loadNumber = model.loadNum;
// }
ranAsPlan(data, this.group).then(res => {
this.$store.dispatch('training/simulationStart').then(() => {
this.$store.dispatch('map/setRunPlanStatus', true);

View File

@ -1,28 +1,27 @@
<template>
<div>
<div class="schema" :style="{top: offset+'px'}">
<!-- (isScript&&!isScriptCommand) || -->
<el-select v-if="isDesignPlatform" v-model="swch" size="small" :placeholder="$t('display.schema.selectProduct')" @change="switchMode">
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
</el-select>
<!-- showSelectStation&&((!isScriptCommand&&swch=='01')||(isScriptCommand && isLocalStation)) -->
<el-select v-if="showSelectStation && isLocalStation && !isScript" v-model="showStationContent" style="width: 100px;" size="small" @change="switchStationModeInfo">
<el-option v-for="item in stationList" :key="item.value" :label="item.name" :value="item.value" />
</el-select>
<el-button-group>
<el-button v-if="isDemon && isDesignPlatform && !dataError" size="small" :disabled="viewDisabled" type="success" @click="viewScriptRoles">{{ $t('display.schema.selectRoles') }}</el-button>
<!-- 加载剧本 -->
<el-button v-if="isDemon && !isDesignPlatform && !isScheduling && !dataError" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
<!-- 运行图加载 -->
<el-button v-if="notScript && runing && !dataError" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
<el-button v-if="!runing && notScript && !dataError" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
<el-button v-if="mode==OperateMode.FAULT && !dataError" size="small" type="danger" @click="setFault">自动故障设置</el-button>
</el-button-group>
<el-radio-group v-if="!isScheduling && !dataError" v-model="mode" size="small" @change="changeOperateMode(mode)">
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('display.schema.normalOperation') }}</el-radio-button>
<el-radio-button class="mode" :label="OperateMode.FAULT">故障模式</el-radio-button>
</el-radio-group>
<template v-if="!dataError">
<el-button-group>
<el-button v-if="isDemon && isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewScriptRoles">{{ $t('display.schema.selectRoles') }}</el-button>
<!-- 加载剧本 -->
<el-button v-if="isDemon && !isDesignPlatform && !isScheduling" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
<!-- 运行图加载 -->
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
<el-button v-if="notScript && !runing" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">自动故障设置</el-button>
</el-button-group>
<el-radio-group v-if="!isScheduling" v-model="mode" size="small" @change="changeOperateMode(mode)">
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('display.schema.normalOperation') }}</el-radio-button>
<el-radio-button class="mode" :label="OperateMode.FAULT">故障模式</el-radio-button>
</el-radio-group>
</template>
</div>
<fault-choose v-if="isDemon || isScript" ref="faultChoose" :group="group" :offset="offset" />
<run-plan-Load ref="runPlanLoad" :group="group" />
@ -36,9 +35,7 @@ import RunPlanLoad from './demon/runPlanLoad';
import RunPlanView from './demon/runPlanView';
import FaultChoose from './demon/faultChoose';
import AddQuest from './demon/addQuest';
import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic';
// import { getStationList } from '@/api/runplan';
import { getByGroupStationList } from '@/api/jmap/map';
import {loadDraftScript, loadDraftScriptNew} from '@/api/designPlatform';
import { getEveryDayRunPlanNew, loadScriptNew } from '@/api/simulation';
@ -99,9 +96,6 @@ export default {
};
},
computed: {
...mapGetters('runPlan', [
'stations'
]),
group() {
return this.$route.query.group;
},
@ -134,9 +128,8 @@ export default {
},
'$store.state.training.switchcount': async function () {
if (this.group) {
const started = this.$store.state.training.started;
if (started) {
await this.loadRunData(this.$route.query);
if (this.$store.state.training.started) {
await this.loadRunData();
}
}
},
@ -154,17 +147,17 @@ export default {
}
},
async mounted() {
await this.loadRunData(this.$route.query);
await this.loadRunData();
},
methods: {
loadRunData(opt) {
loadRunData() {
this.$store.dispatch('runPlan/clear').then(() => {
if (opt && opt.mapId) {
if (this.group) {
this.viewDisabled = true;
getByGroupStationList(this.$route.query.group).then(response => {
// getStationList(opt.mapId).then(response => {
//
getByGroupStationList(this.group).then(response => {
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
getEveryDayRunPlanNew(this.group).then(resp => {
getEveryDayRunPlanNew(this.group).then(resp => { // 仿
this.$store.dispatch('runPlan/setPlanData', resp.data);
this.$store.dispatch('runPlan/setInitialPlanData', resp.data);
this.viewDisabled = false;

View File

@ -46,7 +46,6 @@ export default {
return {
isDisable: false,
isScriptCommand:false
// isSaveStage: true,
};
},
computed: {
@ -91,14 +90,7 @@ export default {
this.isDisable = true;
const data = {
time: model.initTime
// loadNumber:this.trainList.length
};
// const data = {
// time: model.initTime
// };
// if (this.$route.query.prdType === '04') {
// data.loadNumber = model.loadNum;
// }
ranAsPlan(data, this.group).then(res => {
this.$store.dispatch('training/simulationStart').then(() => {
this.$store.dispatch('map/setRunPlanStatus', true);

View File

@ -270,7 +270,6 @@ export default {
resetSize() {
this.$nextTick(() => {
this.$jlmap && this.$jlmap.resize({ width: this.width, height: this.height });
// this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
setTimeout(() => {
this.$store.dispatch('config/resetCanvasOffset');
this.$store.dispatch('training/emitTipFresh');

View File

@ -30,9 +30,7 @@ export default {
},
watch: {
'$store.state.config.menuBarLoadedCount': function (val) {
this.$nextTick(() => {
this.setPosition();
});
this.setPosition();
},
'$route' () {
this.setOffsetX();

View File

@ -28,9 +28,7 @@ export default {
},
watch: {
'$store.state.config.menuBarLoadedCount': function (val) {
this.$nextTick(() => {
this.setPosition();
});
this.setPosition();
},
'$route' () {
this.setOffsetX();

View File

@ -38,26 +38,22 @@ export default {
methods: {
setPosition() {
this.$nextTick(() => {
let offset = (this.$route.path.includes('displayNew') || this.$route.path.includes('scriptDisplayNew')) && (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) ? 73 : 15;
const offset = (this.$route.path.includes('displayNew') || this.$route.path.includes('scriptDisplayNew')) && (this.$route.query.lineCode == 10 || this.$route.query.lineCode == 11) ? 73 : 15;
const menuBar = document.getElementById('menuBar');
const menuTool = document.getElementById('menuTool');
if (menuBar) {
offset += (menuBar.offsetHeight || 0);
this.offset = (menuBar.offsetHeight || 0) + offset;
}
if (menuTool) {
offset += (menuTool.offsetHeight || 0);
}
if (this.offset != offset) {
this.offset = offset;
this.offset = (menuTool.offsetHeight || 0) + offset;
}
});
},
setShrinkCanvas() {
setShrinkCanvas() { //
this.$emit('setShrink');
},
setMagnifyCanvas() {
setMagnifyCanvas() { //
this.$emit('setMagnify');
}
}

View File

@ -163,7 +163,7 @@ export default {
}
},
watch: {
'$store.state.config.menuBarLoadedCount': function (val) {
'$store.state.config.menuBarLoadedCount': function (val) { // menuBar
this.setPosition();
},
'$store.state.training.prdType': function (prdType) {
@ -417,8 +417,8 @@ export default {
case 'AUDIENCE':
this.$store.dispatch('training/setPrdType', '');
this.$store.dispatch('training/setRoles', 'AUDIENCE');
this.jl3dmaintainershow = false;
this.drivingShow = false;
// this.jl3dmaintainershow = false;
// this.drivingShow = false;
this.hideIbp();
break;
case 'DRIVER':

View File

@ -47,7 +47,6 @@ import { getSimulationQrcode } from '@/api/jointSimulation';
import { getSessionStorage } from '@/utils/auth';
import { refereeExitSimulation, quitCurrentRace, startPracticalCompetition, submitPracticalCompetition } from '@/api/competition';
import { NoQrcodeList } from '@/scripts/ProjectConfig';
// import { prefixIntrger } from '@/utils/date';
import localStore from 'storejs';
export default {
@ -140,10 +139,16 @@ export default {
});
}
},
'$store.state.socket.simulationStart': async function (val) {
// '$store.state.socket.simulationStart': async function (val) {
// if (val) {
// // this.$store.dispatch('training/setInitTime', +new Date(val));
// // this.$store.dispatch('training/simulationStart');
// }
// },
'$store.state.training.started': function (val) {
this.isDisable = false;
if (val) {
this.$store.dispatch('training/setInitTime', +new Date(val));
this.$store.dispatch('training/simulationStart');
this.isDisable = true;
}
},
'$store.state.socket.simulationOver':function(val) {
@ -227,7 +232,6 @@ export default {
},
// 仿
start(model) {
this.isDisable = true;
const data = {
time: model.initTime
};

View File

@ -261,8 +261,8 @@ export default {
this.$messageBox(`${this.$t('approval.revokeScriptFailed')}: ${error.message}`);
});
}).catch(() => { });
},
//
},
//
previewScript(index, row) {
const drawWay = this.$route.query.drawWay;
if (drawWay && JSON.parse(drawWay)) {

View File

@ -56,14 +56,8 @@ export default {
getScriptMemberDataNew(group).then(response=>{
const lastData = JSON.stringify(response.data);
this.allRoleData = this.coverData(lastData, ConstConfig.ConstSelect.roleTypeNew);
// lastData = lastData.replace(new RegExp('id', 'g'), 'key');
// lastData = JSON.parse(lastData);
// this.allRoleData = lastData;
getScriptPlayMemberNew(group).then(response=>{
const last = response.data;
// let userdata=JSON.stringify(response.data)
// let reg=new RegExp('\"id\":\"(.*?)\\\"','g');
// let datalist=userdata.match(reg);
const data = [];
last.forEach(function(element) { data.push(element.id); });
this.selectRoleData = data;
@ -76,9 +70,6 @@ export default {
this.allRoleData = this.coverData(lastData, ConstConfig.ConstSelect.roleType);
getScriptPlayMember(group).then(response=>{
const last = response.data;
// let userdata=JSON.stringify(response.data)
// let reg=new RegExp('\"id\":\"(.*?)\\\"','g');
// let datalist=userdata.match(reg);
const data = [];
last.forEach(function(element) { data.push(element.id); });
this.selectRoleData = data;

View File

@ -1,67 +1,6 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="500px" :before-close="handleClose" center :close-on-click-modal="false">
<el-form ref="form" :model="formData" label-width="100px" :rules="rules">
<el-form-item label="教员机:" prop="deviceCode">
<el-select v-model="formData.deviceCode" placeholder="请选择" size="small">
<el-option
v-for="item in deviceList"
:key="item.code"
:label="item.code"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item v-show="data.type === 'LSW'" label="屏目配置:" prop="quadrant" size="small">
<el-select v-model="formData.quadrant" placeholder="请选择" size="small">
<el-option
v-for="item in screenList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item v-show="data.type === 'VR_PSD'" label="关联地图:" prop="mapId">
<el-select v-model="mapId" placeholder="请选择" size="small" @change="mapIdChange">
<el-option
v-for="item in mapList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item v-show="data.type === 'VR_PSD'" label="关联车站:" prop="stationCode">
<el-select v-model="stationCode" placeholder="请选择" size="small" @change="stationCodeChange">
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item v-show="data.type === 'VR_PSD'" label="关联站台:" prop="standCode">
<el-select v-model="standCode" placeholder="请选择" size="small" @change="standCodeChange">
<el-option
v-for="item in standList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item v-show="data.type === 'VR_PSD'" label="关联屏蔽门:" prop="psdCode">
<el-select v-model="formData.psdCode" placeholder="请选择" size="small">
<el-option
v-for="item in psdList"
:key="item.code"
:label="item.code"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-form>
<data-form ref="dataForm" :form="formItem" :form-model="formData" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
@ -70,7 +9,7 @@
</template>
<script>
import { getDevicesByType, getDeviceDetail, setLswConfig, setCctvConfig, setVrPsdConfig } from '@/api/project';
import { getDevicesByType, getDeviceDetail, setLswConfig, setCctvConfig, setVrPsdConfig, setPlcConfig } from '@/api/project';
import { getAllMapOnline, getStationListNeedAttendant, getPsdListByStandCode, getStandListByStationCode } from '@/api/jmap/map';
export default {
@ -90,11 +29,22 @@ export default {
],
deviceList: [],
formData: {
addr: '',
quantity: '',
quadrant: '',
deviceCode: '',
psdCode: ''
psdCode: '',
mapId: '',
stationCode: '',
standCode: ''
},
rules: {
addr: [
{ required: true, message: '请填写读取开始位地址', trigger: 'blur'}
],
quantity: [
{ required: true, message: '请填写数量', trigger: 'blur'}
],
quadrant: [
{ required: true, message: '请选择显示屏幕', trigger: 'change' }
],
@ -105,18 +55,54 @@ export default {
{ required: true, message: '请选择关联屏蔽门', trigger: 'change'}
]
},
mapId: '',
mapList: [],
stationCode: '',
stationList: [],
standList: [],
standCode: '',
psdList: []
};
},
computed: {
title() {
return '编辑设备配置';
},
formItem() {
let form = {labelWidth: '150px', item: []};
if (this.data.type === 'PLC_GATEWAY') {
form = {
labelWidth: '150px',
items: [
{ prop:'addr', label: '读取开始位地址:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, noControls: true},
{ prop: 'quantity', label: '位数量:', type: 'number', min: 0, max: 20000, step: 1, precisionFlag: true, precision: 0, noControls: true }
]
};
} else if (this.data.type === 'VR_PSD') {
form = {
labelWidth: '150px',
items: [
{ prop: 'deviceCode', label: '教研机:', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code' },
{ prop: 'mapId', label: '关联地图:', type: 'select', options: this.mapList, optionLabel: 'name', optionValue: 'id', deviceChange: this.mapIdChange},
{ prop: 'stationCode', label: '关联车站:', type: 'select', options: this.stationList, optionLabel: 'name', optionValue: 'code', deviceChange: this.stationCodeChange},
{ prop: 'standCode', label: '关联站台:', type: 'select', options: this.standList, optionLabel: 'name', optionValue: 'code', deviceChange: this.standCodeChange},
{ prop: 'psdCode', label: '关联屏蔽门:', type: 'select', options: this.psdList, optionLabel: 'name', optionValue: 'code' }
]
};
} else if (this.data.type === 'LSW') {
form = {
labelWidth: '150px',
items: [
{ prop: 'deviceCode', label: '教研机:', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code' },
{ prop: 'quadrant', label: '屏幕配置:', type: 'select', options: this.screenList, optionLabel: 'label', optionValue: 'value'}
]
};
} else if (this.data.type === 'CCTV') {
form = {
labelWidth: '150px',
items: [
{ prop: 'deviceCode', label: '教研机:', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code' }
]
};
}
return form;
}
},
methods: {
@ -136,14 +122,16 @@ export default {
this.formData = {
quadrant: data.quadrant,
deviceCode: data.deviceCode,
psdCode: data.psdCode
psdCode: data.psdCode,
addr: data.addr,
quantity: data.quantity
};
});
if (row.type === 'VR_PSD') {
getAllMapOnline().then(resp => {
if (resp.data && resp.data.length) {
this.mapList = resp.data;
this.mapId = this.mapList[0].id;
this.formData.mapId = this.mapList[0].id;
this.mapIdChange(this.mapList[0].id);
}
}).catch(() => {
@ -166,7 +154,7 @@ export default {
stationCodeChange(stationCode) {
this.standList = [];
if (stationCode) {
getStandListByStationCode(this.mapId, stationCode).then(resp => {
getStandListByStationCode(this.formData.mapId, stationCode).then(resp => {
if (resp.data && resp.data.length) {
this.standList = resp.data;
}
@ -178,7 +166,7 @@ export default {
standCodeChange(standCode) {
this.psdList = [];
if (standCode) {
getPsdListByStandCode(this.mapId, standCode).then(resp => {
getPsdListByStandCode(this.formData.mapId, standCode).then(resp => {
if (resp.data && resp.data.length) {
this.psdList = resp.data;
}
@ -190,7 +178,7 @@ export default {
doSave() {
const self = this;
if (this.data.type == 'LSW') {
this.$refs.form.validate(() => {
this.$refs.dataForm.validateForm(() => {
const param = {
deviceCode: this.formData.deviceCode,
quadrant: this.formData.quadrant
@ -204,7 +192,7 @@ export default {
});
});
} else if (this.data.type == 'CCTV') {
this.$refs.form.validate(() => {
this.$refs.dataForm.validateForm(() => {
const param = {
deviceCode: this.formData.deviceCode
};
@ -217,7 +205,7 @@ export default {
});
});
} else if (this.data.type == 'VR_PSD') {
this.$refs.form.validate(() => {
this.$refs.dataForm.validateForm(() => {
const param = {
deviceCode: this.formData.deviceCode,
psdCode: this.formData.psdCode
@ -230,6 +218,20 @@ export default {
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
});
});
} else if (this.data.type == 'PLC_GATEWAY') {
this.$refs.dataForm.validateForm(() => {
const param = {
addr: this.formData.addr,
quantity: this.formData.quantity
};
setPlcConfig(this.data.id, param).then(() => {
self.$message.success('设置PLC配置成功');
self.handleClose();
self.$emit('reloadTable');
}).catch(error => {
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
});
});
}
},
handleClose() {
@ -243,7 +245,7 @@ export default {
this.stationCode = '';
this.standCode = '';
this.deviceList = [];
this.$refs.form.resetFields();
this.$refs.dataForm.resetForm();
}
}
};

View File

@ -183,7 +183,7 @@ export default {
this.$refs.editConfig.doShow(row);
} else if (row.type === 'SWITCH' || row.type === 'SIGNAL' || row.type === 'PSD' || row.type === 'PSL' || row.type === 'PSC') {
this.$refs.editConfigGateway.doShow(row);
} else if (row.type == 'LSW' || row.type == 'CCTV' || row.type == 'VR_PSD') {
} else if (row.type == 'LSW' || row.type == 'CCTV' || row.type == 'VR_PSD' || row.type === 'PLC_GATEWAY') {
this.$refs.editConfigScreen.doShow(row);
} else if (row.type === 'IBP') {
this.$refs.editConfigIbp.doShow(row);

View File

@ -182,8 +182,10 @@ export default {
this.$nextTick(() => {
const checkId = localStore.get('trainingPlatformCheckId' + filterSelect + this.userId + this.project) || null;
this.$refs.tree && this.$refs.tree.setCurrentKey(checkId);
checkId && this.findTree(this.treeList, checkId);
!checkId && this.treeList && this.treeList.length && this.clickEvent(this.treeList[0], {data: this.treeList[0]});
if (!this.$route.path.includes('result')) {
checkId && this.findTree(this.treeList, checkId);
!checkId && this.treeList && this.treeList.length && this.clickEvent(this.treeList[0], {data: this.treeList[0]});
}
this.loading = false;
});
} catch (error) {