Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
c7f7f0bc6f
11
package.json
11
package.json
@ -17,11 +17,14 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "0.18.0",
|
||||
"echarts": "^4.7.0",
|
||||
"element-ui": "^2.12.0",
|
||||
"file-saver": "^1.3.3",
|
||||
"js-cookie": "2.2.0",
|
||||
"js-md5": "^0.7.3",
|
||||
"lodash": "^4.17.11",
|
||||
"normalize.css": "7.0.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"path-to-regexp": "2.4.0",
|
||||
"qrcode.vue": "^1.6.2",
|
||||
"script-loader": "^0.7.2",
|
||||
@ -30,8 +33,11 @@
|
||||
"stompjs": "^2.3.3",
|
||||
"storejs": "^1.0.25",
|
||||
"three": "^0.107.0",
|
||||
"vue": "^2.6.10",
|
||||
"vue-i18n": "^8.12.0",
|
||||
"vue-router": "^3.1.6",
|
||||
"vuedraggable": "^2.23.2",
|
||||
"vuex": "^3.1.0",
|
||||
"xlsx": "^0.14.2",
|
||||
"zrender": "^4.0.4"
|
||||
},
|
||||
@ -51,10 +57,9 @@
|
||||
"babel-preset-env": "1.6.1",
|
||||
"babel-preset-stage-2": "6.24.1",
|
||||
"chalk": "2.4.2",
|
||||
"compression-webpack-plugin": "^3.0.0",
|
||||
"compression-webpack-plugin": "^3.1.0",
|
||||
"connect": "3.6.6",
|
||||
"copy-webpack-plugin": "^4.5.2",
|
||||
|
||||
"eslint": "5.15.3",
|
||||
"eslint-plugin-vue": "5.2.2",
|
||||
"file-loader": "^3.0.1",
|
||||
@ -68,7 +73,7 @@
|
||||
"serve-static": "^1.13.2",
|
||||
"svg-sprite-loader": "4.1.3",
|
||||
"svgo": "1.2.2",
|
||||
"vue-template-compiler": "2.6.10"
|
||||
"vue-template-compiler": "2.6.11"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9",
|
||||
|
@ -6,21 +6,22 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.png">
|
||||
<!-- cdn.bootcss.com替换成cdnjs.cloudflare.com/ajax/libs -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/theme-chalk/index.css">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">
|
||||
|
||||
<title><%= webpackConfig.name %></title>
|
||||
<script src="/static/inflate.min.js"></script>
|
||||
<script src="/static/three.min.js"></script>
|
||||
<% if (process.env.VUE_APP_PRO !== 'local') { %>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/theme-chalk/index.css">
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/4.4.0-rc.1/echarts-en.common.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vuex/3.1.0/vuex.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-router/3.1.2/vue-router.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.js"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/index.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/locale/en.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.7.2/locale/zh-CN.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.12.0/index.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.12.0/locale/en.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/element-ui/2.12.0/locale/zh-CN.min.js"></script>
|
||||
<% } %>
|
||||
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/sockjs-client/1.4.0/sockjs.min.js"></script>-->
|
||||
</head>
|
||||
<body>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
|
||||
export default {
|
||||
bind(el) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import en from './langs/en/index';
|
||||
import zh from './langs/zh/index';
|
||||
import en from './langs/en/index_APP_TARGET';
|
||||
import zh from './langs/zh/index_APP_TARGET';
|
||||
|
||||
export default {
|
||||
en,
|
||||
|
@ -204,5 +204,6 @@ export default {
|
||||
perpetual: 'perpetual',
|
||||
buyingTips: 'Function upgrade, stay tuned!',
|
||||
permissionAllNum:'Total permissions',
|
||||
set: 'Set'
|
||||
set: 'Set',
|
||||
joinNewRoom: 'Join new room'
|
||||
};
|
||||
|
@ -1,4 +1,3 @@
|
||||
// import enLocale from 'element-ui/lib/locale/lang/en';
|
||||
import ELEMENT from 'element-ui';
|
||||
import map from './map';
|
||||
import global from './global';
|
63
src/i18n/langs/en/index_HYD.js
Normal file
63
src/i18n/langs/en/index_HYD.js
Normal file
@ -0,0 +1,63 @@
|
||||
import enLocale from 'element-ui/lib/locale/lang/en';
|
||||
import map from './map';
|
||||
import global from './global';
|
||||
import router from './router';
|
||||
import lesson from './lesson';
|
||||
import error from './error';
|
||||
import rules from './rules';
|
||||
import scriptRecord from './scriptRecord';
|
||||
import tip from './tip';
|
||||
import system from './system';
|
||||
import orderAuthor from './orderAuthor';
|
||||
import teach from './teach';
|
||||
import publish from './publish';
|
||||
import permission from './permission';
|
||||
import replay from './replay';
|
||||
import planMonitor from './planMonitor';
|
||||
import screenMonitor from './screenMonitor';
|
||||
import demonstration from './demonstration';
|
||||
import exam from './exam';
|
||||
import dashboard from './dashboard';
|
||||
import jlmap3d from './jlmap3d';
|
||||
import display from './display';
|
||||
import joinTraining from './joinTraining';
|
||||
import trainRoom from './trainRoom';
|
||||
import menu from './menu';
|
||||
import ibp from './ibp';
|
||||
import approval from './approval';
|
||||
import systemGenerate from './systemGenerate';
|
||||
import login from './login';
|
||||
import designPlatform from './designPlatform';
|
||||
|
||||
export default {
|
||||
enLocale,
|
||||
map,
|
||||
global,
|
||||
router,
|
||||
lesson,
|
||||
teach,
|
||||
error,
|
||||
rules,
|
||||
scriptRecord,
|
||||
tip,
|
||||
system,
|
||||
orderAuthor,
|
||||
publish,
|
||||
permission,
|
||||
replay,
|
||||
planMonitor,
|
||||
screenMonitor,
|
||||
demonstration,
|
||||
exam,
|
||||
dashboard,
|
||||
jlmap3d,
|
||||
display,
|
||||
joinTraining,
|
||||
trainRoom,
|
||||
menu,
|
||||
ibp,
|
||||
approval,
|
||||
systemGenerate,
|
||||
login,
|
||||
designPlatform
|
||||
};
|
@ -19,5 +19,69 @@ export default {
|
||||
stationInfoDisplay: 'Station information — display',
|
||||
stationInfoHidden: 'Station information — hidden',
|
||||
trainInfoDisplay: 'Train information — display',
|
||||
trainInfoHidden: 'Train information — hidden'
|
||||
trainInfoHidden: 'Train information — hidden',
|
||||
|
||||
drive: 'Driving a car',
|
||||
train: 'Train',
|
||||
driver: 'Driver',
|
||||
newInformation: 'A new message',
|
||||
driving: 'Driving in',
|
||||
unselectedVehicle: 'Unselected vehicle',
|
||||
returnDriving: 'Return to driving',
|
||||
accordingChat: 'According to the chat',
|
||||
displayControl: 'Display controller',
|
||||
haveBus: 'Have got on the bus',
|
||||
busUnrideable: 'The bus is unrideable',
|
||||
|
||||
highSpeedCircuitBreaker: 'High speed circuit breaker',
|
||||
washCarModel: 'Wash',
|
||||
forcedAirCompressor: 'Compressor Forced Start',
|
||||
ATBStart: 'ATB',
|
||||
forcedRelieve: 'Forced Relief',
|
||||
closeLeftDoor: 'L Door Close',
|
||||
openLeftDoor: 'L Door Open',
|
||||
ATOStart: 'ATO',
|
||||
electricHornButton: 'Whistle',
|
||||
roomLightingControl: 'Compartment light',
|
||||
sivsControl: 'SIV',
|
||||
driverRoomLights: 'Cab light',
|
||||
passingBeam: 'Low',
|
||||
headLamp: 'Headlight',
|
||||
distanceLight: 'High',
|
||||
leftDoorOpen: 'Left door open',
|
||||
leftDoorClose: 'Port door closed',
|
||||
openRightDoor: 'R Door Open',
|
||||
closeRightDoor: 'R Door Close',
|
||||
sprayWater: 'Open',
|
||||
waterSwitch: 'Water Spray',
|
||||
slow: 'Slow',
|
||||
highSpeed: 'Fast',
|
||||
wiperSwitch: 'Wiper',
|
||||
emergencyBraking: 'Emergency Braking',
|
||||
leftSide: 'Left',
|
||||
location0: '0',
|
||||
rightSide: 'Right',
|
||||
doorSideChoose: 'Door Selection',
|
||||
doorModel: 'Door Model',
|
||||
rightDoorOpen: 'Right side door open',
|
||||
rightDoorClose: 'Door on right',
|
||||
|
||||
close: 'Close',
|
||||
shut: 'Close',
|
||||
open: 'Open',
|
||||
front: 'front',
|
||||
later: 'back',
|
||||
electricGongSheng: 'The electric GongSheng',
|
||||
pantographFall: 'Pantograph fall',
|
||||
lampButton: 'Try the lamp button',
|
||||
removalATP: 'ATP Removal of',
|
||||
infliction: 'applying',
|
||||
mesoPosition: 'The median',
|
||||
remission: 'ease',
|
||||
parkingBrakeMode: 'Parking brake mode',
|
||||
traction: 'Traction',
|
||||
braking: 'Braking',
|
||||
quick: 'Quick Braking',
|
||||
noComponent: 'No session',
|
||||
|
||||
};
|
||||
|
@ -233,5 +233,6 @@ export default {
|
||||
stopPointOffsetTip: 'Set block stop offset in bulk successfully!',
|
||||
mapSortSuccessfully: 'Map sort successfully!',
|
||||
mapSortFailed: 'Map sort failed',
|
||||
enterTrainingRoomFailed: 'Failed to enter the comprehensive drill, please consult the administrator is still in the room!'
|
||||
enterTrainingRoomFailed: 'Failed to enter the comprehensive drill, please consult the administrator is still in the room!',
|
||||
failedToAddNewRoom: 'Failed to add new room'
|
||||
};
|
||||
|
@ -33,5 +33,7 @@ export default {
|
||||
plcGatewayOffline: '[PLC gateway offline]',
|
||||
uplinkPlatform: 'Uplink platform',
|
||||
downlinkPlatform: 'Downlink platform',
|
||||
ibp:'IBP'
|
||||
ibp:'IBP',
|
||||
getGroupId: 'Get group Id',
|
||||
groupId: 'Group id'
|
||||
};
|
||||
|
@ -204,5 +204,6 @@ export default {
|
||||
perpetual: '永久',
|
||||
buyingTips: '功能升级中, 敬请期待!',
|
||||
permissionAllNum:'权限总数',
|
||||
set: '设 置'
|
||||
set: '设 置',
|
||||
joinNewRoom: '加入新房间'
|
||||
};
|
||||
|
@ -1,4 +1,3 @@
|
||||
// import cnLocale from 'element-ui/lib/locale/lang/zh-CN';
|
||||
import ELEMENT from 'element-ui';
|
||||
import map from './map';
|
||||
import global from './global';
|
63
src/i18n/langs/zh/index_HYD.js
Normal file
63
src/i18n/langs/zh/index_HYD.js
Normal file
@ -0,0 +1,63 @@
|
||||
import cnLocale from 'element-ui/lib/locale/lang/zh-CN';
|
||||
import map from './map';
|
||||
import global from './global';
|
||||
import router from './router';
|
||||
import lesson from './lesson';
|
||||
import error from './error';
|
||||
import rules from './rules';
|
||||
import scriptRecord from './scriptRecord';
|
||||
import tip from './tip';
|
||||
import system from './system';
|
||||
import orderAuthor from './orderAuthor';
|
||||
import teach from './teach';
|
||||
import publish from './publish';
|
||||
import permission from './permission';
|
||||
import replay from './replay';
|
||||
import planMonitor from './planMonitor';
|
||||
import screenMonitor from './screenMonitor';
|
||||
import demonstration from './demonstration';
|
||||
import exam from './exam';
|
||||
import dashboard from './dashboard';
|
||||
import jlmap3d from './jlmap3d';
|
||||
import display from './display';
|
||||
import joinTraining from './joinTraining';
|
||||
import trainRoom from './trainRoom';
|
||||
import menu from './menu';
|
||||
import ibp from './ibp';
|
||||
import approval from './approval';
|
||||
import systemGenerate from './systemGenerate';
|
||||
import login from './login';
|
||||
import designPlatform from './designPlatform';
|
||||
|
||||
export default {
|
||||
cnLocale,
|
||||
map,
|
||||
global,
|
||||
router,
|
||||
lesson,
|
||||
error,
|
||||
teach,
|
||||
rules,
|
||||
scriptRecord,
|
||||
tip,
|
||||
system,
|
||||
orderAuthor,
|
||||
publish,
|
||||
permission,
|
||||
replay,
|
||||
planMonitor,
|
||||
screenMonitor,
|
||||
demonstration,
|
||||
exam,
|
||||
dashboard,
|
||||
jlmap3d,
|
||||
display,
|
||||
joinTraining,
|
||||
trainRoom,
|
||||
menu,
|
||||
ibp,
|
||||
approval,
|
||||
systemGenerate,
|
||||
login,
|
||||
designPlatform
|
||||
};
|
@ -19,5 +19,69 @@ export default {
|
||||
stationInfoDisplay: '站台信息——显示',
|
||||
stationInfoHidden: '站台信息——隐藏',
|
||||
trainInfoDisplay: '列车信息——显示',
|
||||
trainInfoHidden: '列车信息——隐藏'
|
||||
trainInfoHidden: '列车信息——隐藏',
|
||||
|
||||
drive: '开车',
|
||||
train: '列车',
|
||||
driver: '司机',
|
||||
newInformation: '新的消息',
|
||||
driving: '驾驶中',
|
||||
unselectedVehicle: '未选择车辆',
|
||||
returnDriving: '返回驾驶',
|
||||
accordingChat: '显示聊天',
|
||||
displayControl: '显示控制器',
|
||||
haveBus: '已上车',
|
||||
busUnrideable: '该车无法搭乘',
|
||||
|
||||
highSpeedCircuitBreaker: '高速断路器分',
|
||||
washCarModel: '洗车模式',
|
||||
forcedAirCompressor: '空压机强迫启动',
|
||||
ATBStart: 'ATB启动',
|
||||
forcedRelieve: '强迫缓解',
|
||||
closeLeftDoor: '关左门',
|
||||
openLeftDoor: '开左门',
|
||||
ATOStart: 'ATO启动',
|
||||
electricHornButton: '电笛按钮',
|
||||
roomLightingControl: '客室照明控制',
|
||||
sivsControl: 'SIV',
|
||||
driverRoomLights: '司机室灯',
|
||||
passingBeam: '近光',
|
||||
distanceLight: '远光',
|
||||
headLamp: '头灯',
|
||||
leftDoorOpen: '左侧车门开',
|
||||
leftDoorClose: '左侧车门关',
|
||||
openRightDoor: '开右门',
|
||||
closeRightDoor: '关右门',
|
||||
sprayWater: '喷水',
|
||||
waterSwitch: '喷水开关',
|
||||
slow: '低速',
|
||||
highSpeed: '高速',
|
||||
wiperSwitch: '刮雨器开关',
|
||||
emergencyBraking: '紧急制动',
|
||||
leftSide: '左侧',
|
||||
location0: '0位',
|
||||
rightSide: '右侧',
|
||||
doorSideChoose: '门侧选择',
|
||||
doorModel: '门模式',
|
||||
rightDoorOpen: '右侧车门开',
|
||||
rightDoorClose: '右侧车门关',
|
||||
|
||||
close: '关',
|
||||
shut: '关闭',
|
||||
open: '开',
|
||||
front: '前',
|
||||
later: '后',
|
||||
electricGongSheng: '受电弓升',
|
||||
pantographFall: '受电弓降',
|
||||
lampButton: '试灯按钮',
|
||||
removalATP: 'ATP切除',
|
||||
infliction: '施加',
|
||||
mesoPosition: '中位',
|
||||
remission: '缓解',
|
||||
parkingBrakeMode: '停放制动模式',
|
||||
|
||||
traction: '牵引',
|
||||
braking: '制动',
|
||||
quick: '快制',
|
||||
noComponent: '暂无会话',
|
||||
};
|
||||
|
@ -233,5 +233,6 @@ export default {
|
||||
stopPointOffsetTip: '批量设置区段停车点偏移量成功!',
|
||||
mapSortSuccessfully: '地图排序成功!',
|
||||
mapSortFailed: '地图排序失败!',
|
||||
enterTrainingRoomFailed: '进入综合演练失败,请咨询管理员是否还在房间内!'
|
||||
enterTrainingRoomFailed: '进入综合演练失败,请咨询管理员是否还在房间内!',
|
||||
failedToAddNewRoom: '加入新房间失败'
|
||||
};
|
||||
|
@ -33,5 +33,7 @@ export default {
|
||||
plcGatewayOffline: '[PLC网关离线]',
|
||||
uplinkPlatform: '上行站台',
|
||||
downlinkPlatform: '下行站台',
|
||||
ibp:'IBP'
|
||||
ibp:'IBP',
|
||||
getGroupId: '获取房间号',
|
||||
groupId: '房间号'
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
import deviceType from './constant/deviceType';
|
||||
import Eventful from 'zrender/src/mixin/Eventful';
|
||||
import * as eventTool from 'zrender/src/core/event';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
|
||||
class EventModel {
|
||||
constructor(e) {
|
||||
|
@ -2,7 +2,7 @@ import * as zrUtil from 'zrender/src/core/util';
|
||||
import * as matrix from 'zrender/src/core/matrix';
|
||||
import deviceType from '../constant/deviceType';
|
||||
import deviceRender from '../constant/deviceRender';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
|
||||
export function createTransform(opts) {
|
||||
let transform = matrix.create();
|
||||
|
@ -6,7 +6,7 @@ import Painter from './painter';
|
||||
import deviceType from './constant/deviceType';
|
||||
import {calculateDCenter, createBoundingRect, deviceFactory} from './utils/parser';
|
||||
import { updateIscsData } from './utils/parser';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
|
||||
const renderer = 'canvas';
|
||||
const devicePixelRatio = 1;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import deviceType from './constant/deviceType';
|
||||
import Eventful from 'zrender/src/mixin/Eventful';
|
||||
import * as eventTool from 'zrender/src/core/event';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
|
||||
class EventModel {
|
||||
constructor(e) {
|
||||
|
@ -2,7 +2,7 @@ import * as zrUtil from 'zrender/src/core/util';
|
||||
import * as matrix from 'zrender/src/core/matrix';
|
||||
import deviceType from '../constant/deviceType';
|
||||
import deviceRender from '../constant/deviceRender';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import { deepClone } from '@/utils/index';
|
||||
|
||||
export function createTransform(opts) {
|
||||
|
@ -53,7 +53,7 @@ export function JLmap3dEdit(dom, data, mapid) {
|
||||
dom.appendChild(this.renderer.domElement);
|
||||
|
||||
//定义相机
|
||||
this.camera = new THREE.PerspectiveCamera(70, dom.clientWidth/dom.clientHeight, 1, 20000);
|
||||
this.camera = new THREE.PerspectiveCamera(70, dom.clientWidth/dom.clientHeight, 1, 1000);
|
||||
this.camera.aspect = window.innerWidth / window.innerHeight;
|
||||
this.camera.updateProjectionMatrix();
|
||||
this.camera.position.set(0,0,1800);
|
||||
@ -163,7 +163,7 @@ export function JLmap3dEdit(dom, data, mapid) {
|
||||
this.export = function(){
|
||||
let exporter = new THREE.OBJExporter();
|
||||
console.log(scope.mapdata);
|
||||
let exportmodels = scope.mapdata.linklist.linksgroup;
|
||||
let exportmodels = scope.mapdata.stationstandlist.group;
|
||||
// let exportmodels = scope.mapdata.sectionlist.switchgroup;
|
||||
// let exportmodels = scope.mapdata.stationstandlist.group;
|
||||
let result = exporter.parse( exportmodels );
|
||||
|
99
src/jlmap3d/jl3ddrive/drivecontrol/simulation.js
Normal file
99
src/jlmap3d/jl3ddrive/drivecontrol/simulation.js
Normal file
@ -0,0 +1,99 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
|
||||
// 获取仿真成员列表(新版地图)
|
||||
export function getSimulationMembersNew(group) {
|
||||
return request({
|
||||
url: `/simulation/${group}/members`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取仿真成员(新版地图)
|
||||
export function getSimulationMemberNew(group) {
|
||||
return request({
|
||||
url: `/simulation/${group}/member`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取仿真会话列表(新版地图)
|
||||
export function getSimulationConversationListNew(group) {
|
||||
return request({
|
||||
url: `/simulation/${group}/conversations`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取仿真会话消息列表(新版地图)
|
||||
export function getSimulationContextListNew(group, conversationId) {
|
||||
return request({
|
||||
url: `/simulation/${group}/conversation/${conversationId}`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取客户端已经进入仿真的用户仿真所在group(新版地图)
|
||||
export function getSimulationRunningNew(params) {
|
||||
return request({
|
||||
url: `/simulation/running`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 根据group获取仿真对象(新版地图)
|
||||
export function getSimulationByGroupNew(group) {
|
||||
return request({
|
||||
url: `/simulation/${group}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取/创建仿真会话(新版地图)
|
||||
export function getSimulationConversationIdNew(params, group) {
|
||||
return request({
|
||||
url: `/simulation/${group}/wx/conversation`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
// 仿真驾驶车辆列表(新版地图)
|
||||
export function getSimulationTrainlistNew(group) {
|
||||
return request({
|
||||
url: `/simulation/driving/${group}/trainList`,
|
||||
method: 'get',
|
||||
params: ''
|
||||
})
|
||||
}
|
||||
|
||||
//新版仿真驾驶发送命令
|
||||
export function bindSimulationTrain(group,groupNumber) {
|
||||
return request({
|
||||
url: `/simulation/driving/${group}/bindTrain/${groupNumber}`,
|
||||
method: 'post',
|
||||
params: ''
|
||||
})
|
||||
}
|
||||
export function trainSimulationEb(group,groupNumber) {
|
||||
return request({
|
||||
url: `/simulation/driving/${group}/train/${groupNumber}/eb`,
|
||||
method: 'put',
|
||||
params: ''
|
||||
})
|
||||
}
|
||||
export function trainSimulationForce(group,groupNumber,percent) {
|
||||
return request({
|
||||
url: `/simulation/driving/${group}/train/${groupNumber}/force/${percent}`,
|
||||
method: 'put',
|
||||
params: ''
|
||||
})
|
||||
}
|
||||
export function trainSimulationGear(group,groupNumber,gear) {
|
||||
return request({
|
||||
url: `/simulation/driving/${group}/train/${groupNumber}/gear/${gear}`,
|
||||
method: 'put',
|
||||
params: ''
|
||||
})
|
||||
}
|
@ -134,7 +134,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
// });
|
||||
|
||||
let controls3 = new MouseControls(camera, 1.6);
|
||||
controls3.enabled = true;
|
||||
controls3.enabled = false;
|
||||
// controls3.getObject().rotation.x = Math.PI/2;
|
||||
scene.add(controls3.getObject());
|
||||
|
||||
@ -202,7 +202,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
scope.datatype = "new";
|
||||
scope.Subscribe = new Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,stats);
|
||||
|
||||
|
||||
datanew();
|
||||
// scope.jsonwebworknew = new Worker("../../static/workertest/jsonworkernew.js");
|
||||
// scope.Subscribe = new Jlmap3dSubscribeNew(scope,routegroup,scope.jsonwebworknew);
|
||||
// scope.Subscribe.socketon(scope.Subscribe.topic);
|
||||
@ -229,8 +229,9 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
// getPublish3dMapDetail(mapId).then(netdata => {
|
||||
// DriverLoad(data, scope, netdata.data, sectionlist,linklist,signallist,stationstandlist,trainlisttest,realsectionlist,rails, camera, controls3, scene,mixers,storemod);
|
||||
// });
|
||||
let stats = new Stats();
|
||||
dom.appendChild( stats.dom );
|
||||
let stats =null;
|
||||
// let stats = new Stats();
|
||||
// dom.appendChild( stats.dom );
|
||||
// 开启渲染
|
||||
animate();
|
||||
startWorker();
|
||||
@ -314,7 +315,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
};
|
||||
|
||||
updatemmi.updatedrivingcode = function(code) {
|
||||
console.log(trainlisttest);
|
||||
// console.log(trainlisttest);
|
||||
drivingcode = code;
|
||||
trainlisttest.group.children[0].children[0].add(controls3.getObject());
|
||||
controls3.getObject().position.x = 10;
|
||||
|
@ -4,14 +4,13 @@ import { getTrainingCbtcDemon, runDiagramStart, runDiagramOver, setTrainingCbtcI
|
||||
|
||||
import { creatSubscribe, clearSubscribe, displayTopic, screenTopic } from '@/utils/stomp';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
|
||||
// 定于仿真socket接口
|
||||
export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,stats) {
|
||||
|
||||
const scope = this;
|
||||
let scope = this;
|
||||
this.map = null;
|
||||
const toppic = '/app/topic/simulation/client/' + routegroup + '/drive';
|
||||
let toppic = '/app/topic/simulation/client/'+routegroup+'/drive';
|
||||
var trainlisttest = null;
|
||||
var sectionlist = null;
|
||||
var signallist = null;
|
||||
@ -31,17 +30,17 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
var drivingspeed = null;
|
||||
var drivingaptspeed = null;
|
||||
|
||||
const driverswitch = false;
|
||||
let driverswitch = false;
|
||||
|
||||
const stoptimer = null;
|
||||
const num = 30;
|
||||
const pointstand = null;
|
||||
let stoptimer = null;
|
||||
let num = 30;
|
||||
let pointstand = null;
|
||||
// run as plane = 01;
|
||||
// reset = 02;
|
||||
var datatype = '00';
|
||||
this.teststomp = new StompClient();
|
||||
this.topic = '/user/queue/simulation/drive/'+routegroup;
|
||||
const header = {'X-Token': getToken() };
|
||||
let header = {'X-Token': getToken() };
|
||||
|
||||
this.updatamap = function(newsectionlist,newlinklist,newsignallist,newstationstandlist,newtrainlisttest,newrealsectionlist,newrails, materiallist, nowaction, scene) {
|
||||
// console.log(mapdata);
|
||||
@ -94,15 +93,16 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
// console.log(Response);
|
||||
// 对象化数据
|
||||
|
||||
const data = JSON.parse(Response.body);
|
||||
let data = JSON.parse(Response.body);
|
||||
// 遍历后台数据
|
||||
// console.log(data);
|
||||
if (data.type == 'Train_Position') {
|
||||
stats.update();
|
||||
if(data.type == "Train_Position"){
|
||||
// stats.update();
|
||||
trainrun(data.body);
|
||||
return;
|
||||
}
|
||||
if (data.type == 'Train_Hmi_3D') {
|
||||
if(data.type == "Train_Hmi_3D"){
|
||||
console.log(data.body);
|
||||
trainhmi(data.body);
|
||||
return;
|
||||
}
|
||||
@ -112,17 +112,17 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
// }
|
||||
//
|
||||
|
||||
if (data.type == 'DeviceCtrl_3D') {
|
||||
if(data.type == "DeviceCtrl_3D"){
|
||||
if (data.body.type== 'SIGNAL' && signallist) {
|
||||
signalupdate(data.body);
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.body.type == 'PSD' && actions) {
|
||||
if (data.body.type== "PSD" && actions) {
|
||||
standupdate(data.body);
|
||||
return;
|
||||
}
|
||||
if (data.body.type == 'SWITCH') {
|
||||
if (data.body.type == "SWITCH") {
|
||||
switchupdate(data.body);
|
||||
return;
|
||||
}
|
||||
@ -132,7 +132,7 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
}
|
||||
}
|
||||
|
||||
if (data.type == 'Device_Load_Destroy_3D') {
|
||||
if(data.type == "Device_Load_Destroy_3D"){
|
||||
DeviceDestroy(data.body);
|
||||
return;
|
||||
}
|
||||
@ -163,16 +163,16 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
// console.log(data);
|
||||
for(let i=0,leni=data.length;i<leni;i++){
|
||||
|
||||
if (data[i].type == 'SIGNAL') {
|
||||
if(data[i].type == "SIGNAL"){
|
||||
signalupdate(data[i]);
|
||||
}
|
||||
if (data[i].type == 'SWITCH') {
|
||||
if(data[i].type == "SWITCH"){
|
||||
switchupdate(data[i]);
|
||||
}
|
||||
if (data[i].type == 'PSD') {
|
||||
if(data[i].type == "PSD"){
|
||||
standupdate(data[i]);
|
||||
}
|
||||
if (data[i].type == 'TRAIN_DOOR') {
|
||||
if(data[i].type == "TRAIN_DOOR"){
|
||||
traindoorupdate(data[i]);
|
||||
}
|
||||
}
|
||||
@ -192,18 +192,18 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
// console.log(trainmodel.right);
|
||||
if(trainmodel.right != data.right){
|
||||
|
||||
if (data.right == '0') {
|
||||
trainmodel.right = '0';
|
||||
if(data.right == "0"){
|
||||
trainmodel.right = "0";
|
||||
trainmodel.rotation.y = Math.PI;
|
||||
const point = trainmodel.curve.getPointAt(data.offset);
|
||||
let point = trainmodel.curve.getPointAt(data.offset);
|
||||
trainmodel.position.x = point.x;
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
trainmodel.children[tl].position.z = point.z;
|
||||
}
|
||||
}else{
|
||||
trainmodel.right = '1';
|
||||
trainmodel.right = "1";
|
||||
trainmodel.rotation.y = 0;
|
||||
const point = trainmodel.curve.getPointAt(data.offset);
|
||||
let point = trainmodel.curve.getPointAt(data.offset);
|
||||
trainmodel.position.x = point.x;
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
trainmodel.children[tl].position.z = point.z;
|
||||
@ -213,26 +213,26 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
|
||||
if(trainmodel.curve && trainmodel.offset != data.offset){
|
||||
trainmodel.offset = data.offset;
|
||||
const pos = trainmodel.curve.getPointAt(data.offset);
|
||||
let pos = trainmodel.curve.getPointAt(data.offset);
|
||||
trainmodel.position.x = pos.x;
|
||||
// trainmodel.children[0].position.z = pos.z;
|
||||
if (data.right == '0') {
|
||||
if(data.right == "0"){
|
||||
if(-trainmodel.children[0].position.z != pos.z){
|
||||
trainmodel.children[0].up = new THREE.Vector3(1,0,0);
|
||||
const tangent = trainmodel.curve.getTangentAt(data.offset).normalize();
|
||||
let tangent = trainmodel.curve.getTangentAt(data.offset).normalize();
|
||||
trainmodel.children[0].axis.crossVectors(trainmodel.children[0].up, tangent).normalize();
|
||||
const radians = Math.acos(trainmodel.children[0].up.dot(tangent));
|
||||
let radians = Math.acos(trainmodel.children[0].up.dot(tangent));
|
||||
trainmodel.children[0].quaternion.setFromAxisAngle(trainmodel.children[0].axis, radians);
|
||||
trainmodel.children[0].rotation.x = -Math.PI/2;
|
||||
trainmodel.children[0].rotation.z = trainmodel.children[0].rotation.y;
|
||||
trainmodel.children[0].rotation.y = 0;
|
||||
|
||||
const rotas = {
|
||||
let rotas = {
|
||||
posr:pos,
|
||||
rota:trainmodel.children[0].rotation.z
|
||||
};
|
||||
}
|
||||
trainmodel.children[1].rotalist.push(rotas);
|
||||
const offsetz = pos.z + trainmodel.children[0].position.z;
|
||||
let offsetz = pos.z + trainmodel.children[0].position.z;
|
||||
trainmodel.children[0].position.z -= offsetz;
|
||||
// trainmodel.position.z = point.z;
|
||||
|
||||
@ -243,21 +243,21 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
//console.log(rs);
|
||||
if(trainmodel.children[rs].rotalist[0]){
|
||||
|
||||
const offsetz = parseFloat(trainmodel.children[rs].rotalist[0].posr.z) + parseFloat(trainmodel.children[rs].position.z);
|
||||
let offsetz = parseFloat(trainmodel.children[rs].rotalist[0].posr.z) + parseFloat(trainmodel.children[rs].position.z);
|
||||
trainmodel.children[rs].position.z -= offsetz;
|
||||
|
||||
for(let xh=0;xh<trainmodel.children[rs].rotalist.length;xh++){
|
||||
if((trainmodel.children[rs].matrixWorld.elements[12]+10)>=trainmodel.children[rs].rotalist[0].posr.x){
|
||||
|
||||
if(rs != 5){
|
||||
const asd = trainmodel.children[rs].rotalist[0];
|
||||
let asd = trainmodel.children[rs].rotalist[0];
|
||||
trainmodel.children[rs+1].rotalist.push(asd);
|
||||
|
||||
}
|
||||
//let offsetx = trainmodel.children[1].matrixWorld.elements[12]-trainmodel.children[0].children[3].matrixWorld.elements[12];
|
||||
|
||||
trainmodel.children[rs].rotation.z = trainmodel.children[rs].rotalist[0].rota;
|
||||
trainmodel.children[rs].rotalist.splice(0, 1);
|
||||
trainmodel.children[rs].rotalist.splice(0,1)
|
||||
xh--;
|
||||
}else{
|
||||
xh = trainmodel.children[rs].rotalist.length;
|
||||
@ -267,6 +267,7 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// console.log(trainmodel.rotalist);
|
||||
}
|
||||
@ -274,27 +275,28 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
}else{
|
||||
if(trainmodel.children[0].position.z != pos.z){
|
||||
trainmodel.children[0].up = new THREE.Vector3(-1,0,0);
|
||||
const tangent = trainmodel.curve.getTangentAt(data.offset).normalize();
|
||||
let tangent = trainmodel.curve.getTangentAt(data.offset).normalize();
|
||||
trainmodel.children[0].axis.crossVectors(trainmodel.children[0].up, tangent).normalize();
|
||||
const radians = Math.acos(trainmodel.children[0].up.dot(tangent));
|
||||
let radians = Math.acos(trainmodel.children[0].up.dot(tangent));
|
||||
trainmodel.children[0].quaternion.setFromAxisAngle(trainmodel.children[0].axis, radians);
|
||||
trainmodel.children[0].rotation.x = -Math.PI/2;
|
||||
trainmodel.children[0].rotation.z = trainmodel.children[0].rotation.y;
|
||||
trainmodel.children[0].rotation.y = 0;
|
||||
const rotas = {
|
||||
let rotas = {
|
||||
posr:pos,
|
||||
rota:trainmodel.children[0].rotation.z
|
||||
};
|
||||
}
|
||||
trainmodel.children[1].rotalist.push(rotas);
|
||||
|
||||
const offsetz = parseFloat(pos.z) - parseFloat(trainmodel.children[0].position.z);
|
||||
|
||||
let offsetz = parseFloat(pos.z) - parseFloat(trainmodel.children[0].position.z);
|
||||
trainmodel.children[0].position.z += offsetz;
|
||||
}
|
||||
if(trainmodel.children[1].rotalist.length > 0 || trainmodel.children[2].rotalist.length > 0 || trainmodel.children[3].rotalist.length > 0 || trainmodel.children[4].rotalist.length > 0|| trainmodel.children[5].rotalist.length > 0){
|
||||
for(let rs = 1;rs<6;rs++){
|
||||
//console.log(rs);
|
||||
if(trainmodel.children[rs].rotalist[0]){
|
||||
const offsetz = parseFloat(trainmodel.children[rs].rotalist[0].posr.z) - parseFloat(trainmodel.children[rs].matrixWorld.elements[14]);
|
||||
let offsetz = parseFloat(trainmodel.children[rs].rotalist[0].posr.z) - parseFloat(trainmodel.children[rs].matrixWorld.elements[14]);
|
||||
|
||||
trainmodel.children[rs].position.z += offsetz;
|
||||
|
||||
@ -302,13 +304,13 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
if((trainmodel.children[rs].matrixWorld.elements[12]-10)<=trainmodel.children[rs].rotalist[0].posr.x){
|
||||
|
||||
if(rs != 5){
|
||||
const asd = trainmodel.children[rs].rotalist[0];
|
||||
let asd = trainmodel.children[rs].rotalist[0];
|
||||
trainmodel.children[rs+1].rotalist.push(asd);
|
||||
|
||||
}
|
||||
|
||||
trainmodel.children[rs].rotation.z = trainmodel.children[rs].rotalist[0].rota;
|
||||
trainmodel.children[rs].rotalist.splice(0, 1);
|
||||
trainmodel.children[rs].rotalist.splice(0,1)
|
||||
xh--;
|
||||
}else{
|
||||
xh = trainmodel.children[rs].rotalist.length;
|
||||
@ -323,14 +325,16 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
|
||||
// let pos = ;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function initall(data){
|
||||
for(let i=0,leni=data.length;i<leni;i++){
|
||||
if (data[i].deviceType == 'SWITCH') {
|
||||
if(data[i].deviceType == "SWITCH"){
|
||||
initswitch(data[i]);
|
||||
}
|
||||
if (data[i].deviceType == 'PSD') {
|
||||
if(data[i].deviceType == "PSD"){
|
||||
initstand(data[i]);
|
||||
}
|
||||
}
|
||||
@ -341,9 +345,9 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
if(trainmodel.code == data[i].code){
|
||||
// console.log(data[i]);
|
||||
//更新车组号
|
||||
updatemmi.updatetrainnum(data[i].code);
|
||||
updatemmi.updatetrainnum(data[i].groupNumber);
|
||||
|
||||
updatemmi.updatestoptime(data[i].atoOn);
|
||||
// updatemmi.updatestoptime(data[i].atoOn);
|
||||
|
||||
updatemmi.updatenowspeed(data[i].v);
|
||||
|
||||
@ -351,7 +355,7 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
|
||||
updatemmi.updateatospeed(data[i].tv);
|
||||
|
||||
updatemmi.updatenowlen(data[i].destinationCode);
|
||||
updatemmi.updatenowlen(data[i].maLen);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -362,42 +366,43 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
|
||||
if(trainmodel.code == data.code){
|
||||
|
||||
if (data.doorCode == '0') {
|
||||
if(data.doorCode == "0"){
|
||||
|
||||
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();
|
||||
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();
|
||||
}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 (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();
|
||||
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();
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
@ -420,14 +425,15 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
trainmodel.status = data.right;
|
||||
// 车门开关验证
|
||||
|
||||
|
||||
// 遍历获取所在轨道
|
||||
if (trainmodel.dispose != data.dispose && data.dispose == '0') {
|
||||
if (trainmodel.dispose != data.dispose && data.dispose == "0") {
|
||||
if (rails.sectionrail[data.sectionCode]) {
|
||||
|
||||
trainlisttest.group.add(trainmodel);
|
||||
trainmodel.position.y = 0;
|
||||
// trainmodel.progress = 0;
|
||||
trainmodel.dispose = '0';
|
||||
trainmodel.dispose = "0";
|
||||
trainmodel.nowcode = data.sectionCode;
|
||||
trainmodel.nextcode = null;
|
||||
trainmodel.curve = null;
|
||||
@ -441,11 +447,11 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
trainmodel.mixerpush = true;
|
||||
}
|
||||
}
|
||||
} else if (trainmodel.dispose != data.dispose && data.dispose == '1') {
|
||||
} else if (trainmodel.dispose != data.dispose && data.dispose == "1") {
|
||||
trainmodel.status = 1;
|
||||
trainlisttest.group.remove(trainmodel);
|
||||
trainmodel.progress = null;
|
||||
trainmodel.dispose = '1';
|
||||
trainmodel.dispose = "1";
|
||||
code = trainlisttest.group.children[i].name;
|
||||
trainmodel.rotation.y = 0;
|
||||
trainmodel.open = '1';
|
||||
@ -501,30 +507,30 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
function signalupdate(data) {
|
||||
code = data.code;
|
||||
if(data.red == 1){
|
||||
signallist.list[code].mesh.getObjectByName('red').material.map = materials[0];
|
||||
signallist.list[code].mesh.getObjectByName('red').material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map = materials[0];
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
|
||||
}else{
|
||||
signallist.list[code].mesh.getObjectByName('green').material.map = materials[3];
|
||||
signallist.list[code].mesh.getObjectByName('green').material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.getObjectByName("green").material.map = materials[3];
|
||||
signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true;
|
||||
}
|
||||
|
||||
if(data.yellow == 1){
|
||||
signallist.list[code].mesh.getObjectByName('yellow').material.map = materials[1];
|
||||
signallist.list[code].mesh.getObjectByName('yellow').material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[1];
|
||||
signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true;
|
||||
|
||||
}else{
|
||||
signallist.list[code].mesh.getObjectByName('yellow').material.map = materials[3];
|
||||
signallist.list[code].mesh.getObjectByName('yellow').material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[3];
|
||||
signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
|
||||
if(data.green == 1){
|
||||
signallist.list[code].mesh.getObjectByName('green').material.map = materials[2];
|
||||
signallist.list[code].mesh.getObjectByName('green').material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.getObjectByName("green").material.map = materials[2];
|
||||
signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true;
|
||||
|
||||
}else{
|
||||
signallist.list[code].mesh.getObjectByName('green').material.map = materials[3];
|
||||
signallist.list[code].mesh.getObjectByName('green').material.map.needsUpdate = true;
|
||||
signallist.list[code].mesh.getObjectByName("green").material.map = materials[3];
|
||||
signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true;
|
||||
|
||||
}
|
||||
|
||||
@ -538,14 +544,14 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
actions[code].action.time = 0;
|
||||
actions[code].action.timeScale = 1;
|
||||
actions[code].action.play();
|
||||
actions[code].normal = '02';
|
||||
actions[code].normal = "02";
|
||||
} else if (data.routeLock == '1') {
|
||||
// sectionlist.switchs.modellist[j].normal = data.normal;
|
||||
actions[code].action.reset();
|
||||
actions[code].action.time = actions[code].action._clip.duration;
|
||||
actions[code].action.timeScale = -1;
|
||||
actions[code].action.play();
|
||||
actions[code].normal = '01';
|
||||
actions[code].normal = "01";
|
||||
}
|
||||
}
|
||||
|
||||
@ -558,14 +564,14 @@ export function Jl3dDrivingNew(mixers, updatemmi, sound, translation, routegroup
|
||||
actions[code].action.time = 0;
|
||||
actions[code].action.timeScale = 1;
|
||||
actions[code].action.play();
|
||||
actions[code].normal = '02';
|
||||
actions[code].normal = "02";
|
||||
} else if (data.normal == '01') {
|
||||
// sectionlist.switchs.modellist[j].normal = data.normal;
|
||||
actions[code].action.reset();
|
||||
actions[code].action.time = actions[code].action._clip.duration;
|
||||
actions[code].action.timeScale = -1;
|
||||
actions[code].action.play();
|
||||
actions[code].normal = '01';
|
||||
actions[code].normal = "01";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,13 +4,13 @@ import { getBaseUrl } from '@/utils/baseUrl';
|
||||
import { Loading } from 'element-ui';
|
||||
const BASE_API = getBaseUrl();
|
||||
let modelurl = "../../static/model";
|
||||
if(BASE_API == 'https://joylink.club/jlcloud'){
|
||||
modelurl = "https://joylink.club/oss";
|
||||
}else if(BASE_API == 'https://test.joylink.club/jlcloud'){
|
||||
modelurl = "https://test.joylink.club/oss";
|
||||
}else {
|
||||
modelurl = "https://test.joylink.club/oss";
|
||||
}
|
||||
// if(BASE_API == 'https://joylink.club/jlcloud'){
|
||||
// modelurl = "https://joylink.club/oss";
|
||||
// }else if(BASE_API == 'https://test.joylink.club/jlcloud'){
|
||||
// modelurl = "https://test.joylink.club/oss";
|
||||
// }else {
|
||||
// modelurl = "https://test.joylink.club/oss";
|
||||
// }
|
||||
let defaultsignal = {
|
||||
id:"3",
|
||||
name:"低位三灯",
|
||||
@ -37,7 +37,7 @@ let defaultstation = {
|
||||
type:"num4",
|
||||
picUrl:"",
|
||||
assetUrl:"../../static/model/station/fuzhou.FBX"
|
||||
}//modelurl+"/models/station/fuzhou/fuzhou.FBX"
|
||||
}//modelurl+"/station/fuzhou/fuzhou.FBX"
|
||||
let waicestation = {
|
||||
id:"10",
|
||||
name:"外侧车站",
|
||||
@ -52,11 +52,11 @@ let defaulttopstation = {
|
||||
deviceType:"topstand",
|
||||
type:"num5",
|
||||
picUrl:"",
|
||||
assetUrl:modelurl+"/models/station/fuzhou/topstation.FBX"
|
||||
assetUrl:modelurl+"/station/fuzhou/topstation.FBX"
|
||||
}
|
||||
//modelurl+"/models/station/fuzhou/fuzhou.FBX"
|
||||
//https://test.joylink.club/oss/models/station/fuzhou/fuzhou.FBX
|
||||
//https://joylink.club/oss/models/station/fuzhou/fuzhou.FBX
|
||||
//modelurl+"/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
|
||||
|
||||
let defaultswitch = {
|
||||
@ -65,7 +65,7 @@ let defaultswitch = {
|
||||
deviceType:"switch",
|
||||
type:"fuzhou",
|
||||
picUrl:"",
|
||||
assetUrl:modelurl+"/models/daocha/daocha.FBX"
|
||||
assetUrl:modelurl+"/daocha/daocha.FBX"
|
||||
}
|
||||
|
||||
let defaultdriver = {
|
||||
@ -74,7 +74,7 @@ let defaultdriver = {
|
||||
deviceType:"driver",
|
||||
type:"driver",
|
||||
picUrl:"",
|
||||
assetUrl:modelurl+"/models/driver/driver.FBX"
|
||||
assetUrl:modelurl+"/driver/driver.FBX"
|
||||
}
|
||||
|
||||
let defaultsuidao = {
|
||||
@ -83,7 +83,7 @@ let defaultsuidao = {
|
||||
deviceType:"suidao",
|
||||
type:"suidao",
|
||||
picUrl:"",
|
||||
assetUrl:modelurl+"/models/suidao/suidao.FBX"
|
||||
assetUrl:modelurl+"/suidao/suidao.FBX"
|
||||
}
|
||||
|
||||
let defaultbackground = {
|
||||
@ -92,11 +92,11 @@ let defaultbackground = {
|
||||
deviceType:"background",
|
||||
type:"background",
|
||||
picUrl:"",
|
||||
assetUrl:modelurl+"/models/suidao/background.FBX"
|
||||
assetUrl:modelurl+"/suidao/background.FBX"
|
||||
}
|
||||
//modelurl+"/models/suidao/suidao.FBX"
|
||||
//https://test.joylink.club/oss/models/suidao/suidao.FBX
|
||||
//https://joylink.club/oss/models/suidao/suidao.FBX
|
||||
//modelurl+"/suidao/suidao.FBX"
|
||||
//https://test.joylink.club/oss/suidao/suidao.FBX
|
||||
//https://joylink.club/oss/suidao/suidao.FBX
|
||||
//../../static/model/suidao/suidao.FBX
|
||||
|
||||
let defaultautorail = {
|
||||
@ -132,7 +132,7 @@ let autoswitch1 = {
|
||||
deviceType:"autoswitch1",
|
||||
type:"fuzhou",
|
||||
picUrl:"",
|
||||
assetUrl:modelurl+"/models/auto/switch1.FBX"
|
||||
assetUrl:modelurl+"/auto/switch1.FBX"
|
||||
}
|
||||
|
||||
let autoswitch2 = {
|
||||
@ -141,7 +141,7 @@ let autoswitch2 = {
|
||||
deviceType:"autoswitch2",
|
||||
type:"fuzhou",
|
||||
picUrl:"",
|
||||
assetUrl:modelurl+"/models/auto/switch2.FBX"
|
||||
assetUrl:modelurl+"/auto/switch2.FBX"
|
||||
}
|
||||
|
||||
export function AssetLoader(){
|
||||
@ -226,7 +226,7 @@ export function AssetLoader(){
|
||||
|
||||
|
||||
Promise.all(initlist).then((result) => {
|
||||
////console.log(result);
|
||||
|
||||
resolve("loaderassets"); //['成功了', 'success']
|
||||
}).catch((error) => {
|
||||
//console.log(error);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import deviceType from './constant/deviceType';
|
||||
import Eventful from 'zrender/src/mixin/Eventful';
|
||||
import * as eventTool from 'zrender/src/core/event';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
|
||||
class EventModel {
|
||||
constructor(e) {
|
||||
|
@ -2,7 +2,7 @@ import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
// import Vue from 'vue';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
class EMouse extends Group {
|
||||
constructor(device, code) {
|
||||
super();
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
class EMouse extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
|
@ -3,7 +3,7 @@ import TrainBodyBox from './TrainBodyBox';
|
||||
import '../StationStand/EDetain';
|
||||
import ETextName from '../element/ETextName'; // 名称文字 (共有)
|
||||
import EMouse from './EMouse';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
|
||||
/** 车身*/
|
||||
export default class TrainBody extends Group {
|
||||
|
@ -2,7 +2,7 @@
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import EMouse from './EMouse';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
|
||||
class TrainWindow extends Group {
|
||||
constructor(model, style) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import deviceState from '@/jmap/constant/deviceState';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Vue from 'vue';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import deviceState from '@/jmap/constant/deviceState';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import deviceState from '@/jmap/constant/deviceState';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import deviceState from '@/jmap/constant/deviceState';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import deviceState from '@/jmap/constant/deviceState';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
|
@ -285,7 +285,7 @@ class SkinCode extends defaultStyle {
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
offset: { x: -8, y: 3 }, // 运行时间偏移量
|
||||
offset: { x: -40, y: 10 }, // 运行时间偏移量
|
||||
textColor: '#FFFFFF', // 停站时间字体颜色
|
||||
textFontSize: 8
|
||||
},
|
||||
|
@ -240,8 +240,8 @@ class SkinCode extends defaultStyle {
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
offset: {x: -8, y: -4}, // 运行时间偏移量
|
||||
textColor: '#C0C0C0', // 停站时间字体颜色
|
||||
offset: {x: -50, y: 10}, // 运行时间偏移量
|
||||
textColor: '#FFFFFF', // 停站时间字体颜色
|
||||
textFontSize: 10
|
||||
},
|
||||
jump: {
|
||||
|
@ -338,7 +338,7 @@ class SkinCode extends defaultStyle {
|
||||
fontWeight: 'normal'
|
||||
},
|
||||
stopTime: { // 停站时间
|
||||
offset: { x: -8, y: -4 }, // 运行时间偏移量
|
||||
offset: { x: -40, y: -5 }, // 运行时间偏移量
|
||||
textColor: 'white', // 停站时间字体颜色
|
||||
textFontSize: 10 // 停站时间字体大小
|
||||
},
|
||||
|
@ -10,7 +10,7 @@ import deviceType from './constant/deviceType';
|
||||
import { selectLineCode } from './config/deviceStyle';
|
||||
import { deviceFactory, createBoundingRect, calculateDCenter } from './utils/parser';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
|
||||
const renderer = 'canvas';
|
||||
const devicePixelRatio = 1;
|
||||
@ -371,6 +371,10 @@ class Jlmap {
|
||||
this.$painter.update(oDevice);
|
||||
}
|
||||
} else {
|
||||
if (elem.deviceType === 'TRAIN') {
|
||||
store.dispatch('map/updateTrainState', elem);
|
||||
store.dispatch('map/setTrainListUpdate', elem);
|
||||
}
|
||||
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
|
||||
if (elem.dispose) {
|
||||
this.$painter.delete(oDevice);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import deviceType from './constant/deviceType';
|
||||
import Eventful from 'zrender/src/mixin/Eventful';
|
||||
import * as eventTool from 'zrender/src/core/event';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
|
||||
class EventModel {
|
||||
constructor(e) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
class EMouse extends Group {
|
||||
constructor(device, code) {
|
||||
super();
|
||||
|
@ -11,7 +11,7 @@ import { EBackArrow, EBackArrowTriangle } from './EBackArrow'; // 折返进路
|
||||
import ELimitName from './ELimitName'; // 成都三号线 限速名称
|
||||
import JTriangle from '../../utils/JTriangle';
|
||||
import { drawSectionStyle } from '../../config/defaultStyle';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import Vue from 'vue';
|
||||
|
||||
/** 区段*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
class EMouse extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
|
@ -13,7 +13,7 @@ import EMouse from './EMouse';
|
||||
import EHighlight from '../element/EHighlight';
|
||||
import ERhomboid from './ERhomboid';
|
||||
import ETriangle from './ETriangle';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import Vue from 'vue';
|
||||
|
||||
export default class Switch extends Group {
|
||||
|
@ -36,18 +36,6 @@ class EDirection extends Group {
|
||||
this.create();
|
||||
this.arrow.setStyle('fill', color);
|
||||
}
|
||||
|
||||
// 隐藏
|
||||
hide() {
|
||||
this.create();
|
||||
this.arrow.hide();
|
||||
}
|
||||
|
||||
// 显示
|
||||
show() {
|
||||
this.create();
|
||||
this.arrow.show();
|
||||
}
|
||||
}
|
||||
|
||||
export default EDirection;
|
||||
|
@ -3,7 +3,7 @@ import TrainBodyBox from './TrainBodyBox';
|
||||
import '../StationStand/EDetain';
|
||||
import ETextName from '../element/ETextName'; // 名称文字 (共有)
|
||||
import EMouse from './EMouse';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
|
||||
|
@ -4,7 +4,7 @@ import TrainBody from './TrainBody';
|
||||
import BoundingRect from 'zrender/src/core/BoundingRect';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
import ETriangle from '../Train/ETriangle';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import EDirection from './EDirection';
|
||||
|
||||
/** 列车 */
|
||||
|
@ -2,7 +2,7 @@
|
||||
import Polygon from 'zrender/src/graphic/shape/Polygon';
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import EMouse from './EMouse';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
|
||||
class TrainWindow extends Group {
|
||||
constructor(model, style) {
|
||||
|
@ -444,33 +444,6 @@ export default {
|
||||
Handler.clear();
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
|
||||
// 按钮按下时
|
||||
// if (this.$store.state.menuOperation.buttonOperation) {
|
||||
// const model = this.$store.state.menuOperation.selected;
|
||||
// if (model && model._type) {
|
||||
// // const deviceType = MapDeviceType[model._type];
|
||||
// const operate = {
|
||||
// send: true,
|
||||
// model: model,
|
||||
// code: model.code,
|
||||
// // type: deviceType.type,
|
||||
// operation: this.$store.state.menuOperation.buttonOperation,
|
||||
// tempData: this.tempData
|
||||
// };
|
||||
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
// if (valid) {
|
||||
// if (response) {
|
||||
// this.tempData = response.data;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// Handler.clear();
|
||||
// this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Vue from 'vue';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import deviceState from '@/jmap/constant/deviceState';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import deviceState from '@/jmap/constant/deviceState';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
|
@ -93,7 +93,8 @@ export default {
|
||||
selected: null,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
signalName: ''
|
||||
signalName: '',
|
||||
domIdChoose: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import deviceState from '@/jmap/constant/deviceState';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
|
@ -51,6 +51,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lineCode: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -16,7 +16,6 @@ import SpeedLimitControl from './dialog/speedLimitControl';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
|
@ -29,7 +29,6 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import {menuOperate, commitOperate} from './utils/menuOperate';
|
||||
// import { querySignalStatus } from '@/api/simulation';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
|
@ -22,7 +22,6 @@ import StandRunLevel from './dialog/standRunLevel';
|
||||
import StandStopTime from './dialog/standStopTime';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import StandDetainTrainAll from './dialog/standDetainTrainAll';
|
||||
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Vue from 'vue';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import deviceState from '@/jmap/constant/deviceState';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import deviceState from '@/jmap/constant/deviceState';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import deviceState from '@/jmap/constant/deviceState';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Vue from 'vue';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import deviceState from '@/jmap/constant/deviceState';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
|
@ -23,14 +23,14 @@
|
||||
</el-dropdown>
|
||||
<span v-else style="color: white;">{{ $t(item.name) }}</span>
|
||||
</el-menu-item>
|
||||
<deomon-list ref="deomonList" />
|
||||
<deomon-list ref="deomonList" @enterQcode="qcodeEntry" />
|
||||
<qcode ref="qcode" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DeomonList from '@/views/demonstration/deomonList';
|
||||
import DeomonList from '@/views/demonstration/deomonList/index_APP_TARGET';
|
||||
import Qcode from './Qcode';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import LangStorage from '@/utils/lang';
|
||||
@ -57,7 +57,7 @@ export default {
|
||||
},
|
||||
{
|
||||
name: 'global.caseShow',
|
||||
// handle: this.goToCaseShow,
|
||||
handle: this.goEmpty,
|
||||
isHelp:true,
|
||||
style:'padding-right:0px;',
|
||||
hidden:getSessionStorage('project').endsWith('hyd')
|
||||
@ -65,7 +65,7 @@ export default {
|
||||
{
|
||||
name: 'global.scan',
|
||||
handle: this.qcodeEntry,
|
||||
hidden: process.env.NODE_ENV != 'development' || getSessionStorage('project').startsWith('design')
|
||||
hidden: process.env.NODE_ENV != 'development' || getSessionStorage('project').startsWith('design') || process.env.VUE_APP_PRO === 'local'
|
||||
},
|
||||
{
|
||||
name: 'global.quickEntry',
|
||||
@ -134,6 +134,7 @@ export default {
|
||||
const href = 'https://joylink.club/helps/help1.pdf';
|
||||
window.open(href, '_blank');
|
||||
},
|
||||
goEmpty() {},
|
||||
goToCaseShow() {
|
||||
const href = 'https://joylink.club/helps/西安铁路职业技术学院.pdf';
|
||||
window.open(href, '_blank');
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="$t('global.chooseRoom')" :visible.sync="dialogShow" width="30%" center>
|
||||
<el-input v-model="input" :placeholder="$t('global.inputRoomNumber')" />
|
||||
<el-checkbox v-model="isNewMap">是否新版地图房间</el-checkbox>
|
||||
<el-checkbox v-if="!isShow" v-model="isNewMap">是否新版地图房间</el-checkbox>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button v-loading="loading" :disabled="!input.length" type="primary" @click="comit">{{ $t('global.confirm') }}</el-button>
|
||||
@ -25,7 +25,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
isShow() {
|
||||
return process.env.NODE_ENV == 'development';
|
||||
return process.env.VUE_APP_PRO === 'local';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -38,14 +38,15 @@ export default {
|
||||
async comit() {
|
||||
try {
|
||||
this.loading = true;
|
||||
if (this.isNewMap) {
|
||||
if (this.isNewMap || this.isShow) {
|
||||
await getPermissionJointNew(`${this.input}`);
|
||||
} else {
|
||||
await getPermissionJoint(`${this.input}`);
|
||||
}
|
||||
this.dialogShow = false;
|
||||
} catch (error) {
|
||||
this.$messageBox(`${this.$t('error.scanningError')}:${error.message}`);
|
||||
const errorMessage = this.isShow ? this.$t('tip.failedToAddNewRoom') : this.$t('error.scanningError');
|
||||
this.$messageBox(`${errorMessage}:${error.message}`);
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
|
||||
const { body } = document;
|
||||
const WIDTH = 1024;
|
||||
|
12
src/main.js
12
src/main.js
@ -1,18 +1,17 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
import 'normalize.css/normalize.css'; // A modern alternative to CSS resets
|
||||
import ELEMENT from 'element-ui';
|
||||
|
||||
import ElementUI from 'element-ui';
|
||||
import 'element-ui/lib/theme-chalk/index.css';
|
||||
import '@/styles/index.scss'; // global css
|
||||
|
||||
import LangStorage from '@/utils/lang';
|
||||
import App from './App';
|
||||
import VueI18n from 'vue-i18n';
|
||||
|
||||
import store from './store';
|
||||
import store from './store/index_APP_TARGET';
|
||||
import router from './router/index_APP_TARGET';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState.js';
|
||||
|
||||
Vue.mixin(CancelMouseState);
|
||||
|
||||
import '@/icons'; // icon
|
||||
@ -27,7 +26,7 @@ import '@/directive/quickMenuDrag/index.js';
|
||||
import '@/directive/waves/index.js';
|
||||
import messages from '@/i18n/index';
|
||||
|
||||
Vue.use(ELEMENT);
|
||||
Vue.use(ElementUI);
|
||||
Vue.use(VueI18n);
|
||||
Vue.config.devtools = true; // 开发环境显示vue控制台
|
||||
Vue.config.productionTip = false;
|
||||
@ -36,8 +35,7 @@ export const i18n = new VueI18n({
|
||||
locale: LangStorage.getLang('zh'),
|
||||
messages
|
||||
});
|
||||
|
||||
ELEMENT.i18n((key, value) => i18n.t(key, value));
|
||||
Vue.use(ElementUI, {i18n: (key, value) => i18n.t(key, value)});
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Vue from 'vue';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import router from './router/index_APP_TARGET';
|
||||
import NProgress from 'nprogress';
|
||||
import { admin} from './router/index_APP_TARGET';
|
||||
@ -67,7 +67,7 @@ function getRouteInfo(to) {
|
||||
loginPath = loginGzbPage;
|
||||
clientId = null;
|
||||
} else if (/^\/hyd/.test(toRoutePath)) {
|
||||
if (process.env.NODE_ENV === 'Local') {
|
||||
if (process.env.VUE_APP_PRO === 'local') {
|
||||
loginPath = loginPage;
|
||||
} else {
|
||||
loginPath = loginHydPage;
|
||||
|
@ -1,8 +1,8 @@
|
||||
// import Vue from 'vue';
|
||||
import Router from 'vue-router';
|
||||
import Vue from 'vue';
|
||||
import VueRouter from 'vue-router';
|
||||
// import VueRouter from 'vue-router';
|
||||
|
||||
// Vue.use(Router);
|
||||
Vue.use(VueRouter);
|
||||
|
||||
/* Layout */
|
||||
const Layout = () => import('@/layout');
|
||||
@ -756,7 +756,7 @@ export const asyncRouter = [
|
||||
}
|
||||
];
|
||||
|
||||
const createRouter = () => new Router({
|
||||
const createRouter = () => new VueRouter({
|
||||
mode: 'history', // require service support
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRoutes
|
||||
@ -771,8 +771,8 @@ router.beforeEach((to, from, next) => {
|
||||
});
|
||||
|
||||
// 兼容 vue-router在3.1.0版本以上的路由跳转使用的是 promise 的方式
|
||||
const originalPush = Router.prototype.push;
|
||||
Router.prototype.push = function push(location) {
|
||||
const originalPush = VueRouter.prototype.push;
|
||||
VueRouter.prototype.push = function push(location) {
|
||||
return originalPush.call(this, location).catch(err => err);
|
||||
};
|
||||
|
||||
|
@ -39,11 +39,11 @@ Vue.prototype.$addWindowResizeListener = function(cb) {
|
||||
};
|
||||
|
||||
Vue.prototype.$theme = new Theme();
|
||||
Vue.prototype.$messageBox = function(msge) {
|
||||
Vue.prototype.$messageBox = function(msge, title, type) {
|
||||
if (this.$confirm) {
|
||||
this.$confirm(`${msge || this.$t('global.processFailure')}`, this.$t('global.tips'), {
|
||||
this.$confirm(`${msge || this.$t('global.processFailure')}`, title || this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
type: 'warning',
|
||||
type: type || 'warning',
|
||||
showCancelButton: false,
|
||||
center: true
|
||||
}).then(() => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
import CommandHandler from './CommandHandler.js';
|
||||
import ValidateHandler from './ValidateHandler.js';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import CommandHandler from './CommandHandler';
|
||||
import { State2SimulationMap, State2ControlMap } from './Config';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
@ -33,35 +33,6 @@ class MenuContextHandler {
|
||||
return store.state.training.prdType;
|
||||
}
|
||||
|
||||
// menuFiltration(menuList) {
|
||||
// const selected = this.getCurrentStateObject();
|
||||
// let menu = [];
|
||||
// const control = this.getStationControl(selected);
|
||||
// if (control) {
|
||||
// if ( this.getPrdType() != '') {
|
||||
// const type = State2SimulationMap[this.getPrdType()];
|
||||
// const status = State2ControlMap[control.status];
|
||||
// menu = [...menuList[type]];
|
||||
// if (menu.constructor === Array) {
|
||||
// menu.forEach(elem => {
|
||||
// if (elem.type === 'separator') {
|
||||
// elem.show = true;
|
||||
// return;
|
||||
// }
|
||||
// if (elem.auth.constructor === Object) {
|
||||
// elem.show = true;
|
||||
// if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
|
||||
// elem.show = false;
|
||||
// }
|
||||
// elem.defaultDisabled = !elem.auth[status];
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return menu;
|
||||
// }
|
||||
|
||||
// 判断指令是否隐藏
|
||||
checkDisabled(data, selected) {
|
||||
let result = false;
|
||||
@ -82,8 +53,6 @@ class MenuContextHandler {
|
||||
}
|
||||
}
|
||||
});
|
||||
// 特殊处理哈尔滨线的虚拟信号机操作( 因为哈尔滨虚拟信号机有些操作没有 )
|
||||
// 待处理
|
||||
result = !result;
|
||||
}
|
||||
return result;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import LangStorage from '@/utils/lang';
|
||||
import Handler from './Handler.js';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { OperationEvent, getOperateTypeBy, MapDeviceType } from '@/scripts/ConstDic';
|
||||
import localStore from 'storejs';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
|
||||
const SectionOperation = OperationEvent.Section;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { OperationEvent, getOperateTypeBy, MapDeviceType } from '@/scripts/ConstDic';
|
||||
// import localStore from 'storejs';
|
||||
// import store from '@/store';
|
||||
|
||||
const SignalOperation = OperationEvent.Signal;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
import OperateHandler from '@/scripts/plugin/OperateHandler';
|
||||
import { sendCommand } from '@/api/jmap/training';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import router from '@/router/index_APP_TARGET';
|
||||
import OperateConverter from '@/scripts/plugin/OperateConvert2Command';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
|
@ -1,4 +1,4 @@
|
||||
// import Vue from 'vue';
|
||||
import Vue from 'vue';
|
||||
import Vuex from 'vuex';
|
||||
import app from './modules/app';
|
||||
import settings from './modules/settings';
|
||||
@ -19,7 +19,7 @@ import iscs from './modules/iscs';
|
||||
|
||||
import getters from './getters';
|
||||
|
||||
// Vue.use(Vuex);
|
||||
Vue.use(Vuex);
|
||||
|
||||
const store = new Vuex.Store({
|
||||
modules: {
|
46
src/store/index_HYD.js
Normal file
46
src/store/index_HYD.js
Normal file
@ -0,0 +1,46 @@
|
||||
import Vuex from 'vuex';
|
||||
import Vue from 'vue';
|
||||
import app from './modules/app';
|
||||
import settings from './modules/settings';
|
||||
import user from './modules/user';
|
||||
import config from './modules/config';
|
||||
import permission from './modules/permission';
|
||||
import map from './modules/map';
|
||||
import menuOperation from './modules/menuoperation';
|
||||
import training from './modules/training';
|
||||
import trainingList from './modules/trainingList';
|
||||
import exam from './modules/exam';
|
||||
import runPlan from './modules/runplan';
|
||||
import socket from './modules/socket';
|
||||
import scriptRecord from './modules/scriptRecord';
|
||||
import ibp from './modules/ibp';
|
||||
import order from './modules/order';
|
||||
import iscs from './modules/iscs';
|
||||
|
||||
import getters from './getters';
|
||||
|
||||
Vue.use(Vuex);
|
||||
|
||||
const store = new Vuex.Store({
|
||||
modules: {
|
||||
app,
|
||||
settings,
|
||||
user,
|
||||
permission,
|
||||
config,
|
||||
map,
|
||||
menuOperation,
|
||||
training,
|
||||
trainingList,
|
||||
exam,
|
||||
runPlan,
|
||||
socket,
|
||||
scriptRecord,
|
||||
ibp,
|
||||
order,
|
||||
iscs
|
||||
},
|
||||
getters
|
||||
});
|
||||
|
||||
export default store;
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
|
||||
const exam = {
|
||||
namespaced: true,
|
||||
|
@ -201,7 +201,9 @@ const map = {
|
||||
deleteCount: 0, // 绘图快捷删除标识
|
||||
updateCount: 0, // 绘图快捷修改标识
|
||||
mousemove: 0, // 实训战场图移动标识
|
||||
version: '' // 地图版本
|
||||
version: '', // 地图版本,
|
||||
trainListUpdate:0, // 列车列表更新标识,
|
||||
runPlanStatus:false // 是否正处于按计划行车
|
||||
},
|
||||
|
||||
getters: {
|
||||
@ -662,6 +664,9 @@ const map = {
|
||||
}
|
||||
});
|
||||
},
|
||||
setTrainListUpdate:(state) => {
|
||||
state.trainListUpdate++;
|
||||
},
|
||||
setDeleteCount: (state) => {
|
||||
state.deleteCount++;
|
||||
},
|
||||
@ -701,8 +706,14 @@ const map = {
|
||||
updateAutoReentryState: (state, status) => {
|
||||
state.autoReentryData[status.code] = deepAssign(state.autoReentryData[status.code], status);
|
||||
},
|
||||
updateTrainState:(state, status) =>{
|
||||
state.map.trainList[parseInt(status.code) - 1] = deepAssign(state.map.trainList[parseInt(status.code) - 1], status);
|
||||
},
|
||||
setMapVersion:(state, version) => {
|
||||
state.version = version;
|
||||
},
|
||||
setRunPlanStatus:(state, runPlanStatus) => {
|
||||
state.runPlanStatus = runPlanStatus;
|
||||
}
|
||||
},
|
||||
|
||||
@ -744,6 +755,9 @@ const map = {
|
||||
updateAutoReentryState: ({ commit }, status) => {
|
||||
commit('updateAutoReentryState', status);
|
||||
},
|
||||
updateTrainState:({ commit }, status) => {
|
||||
commit('updateTrainState', status);
|
||||
},
|
||||
getRouteDataListByCode: ({ state, commit }, code) => { // 获取进路数据
|
||||
return new Promise((resolve) => {
|
||||
const list = [];
|
||||
@ -851,7 +865,9 @@ const map = {
|
||||
setDeleteCount: ({ commit }) => {
|
||||
commit('setDeleteCount');
|
||||
},
|
||||
|
||||
setTrainListUpdate: ({ commit }) => {
|
||||
commit('setTrainListUpdate');
|
||||
},
|
||||
setUpdateCount: ({ commit }) => {
|
||||
commit('setUpdateCount');
|
||||
},
|
||||
@ -861,8 +877,10 @@ const map = {
|
||||
},
|
||||
setMapVersion: ({commit}, version) => {
|
||||
commit('setMapVersion', version);
|
||||
},
|
||||
setRunPlanStatus:({commit}, runPlanStatus) => {
|
||||
commit('setRunPlanStatus', runPlanStatus);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import { Notification } from 'element-ui';
|
||||
|
||||
function handle(state, data) {
|
||||
console.log(data, 'socket订阅');
|
||||
// console.log(data, 'socket订阅');
|
||||
const msg = data.body;
|
||||
const path = window.location.href;
|
||||
switch (data.type) {
|
||||
@ -29,7 +29,7 @@ function handle(state, data) {
|
||||
// runFactMsg = [msg];
|
||||
// }
|
||||
if (!Array.isArray(msg)) {
|
||||
console.log([msg], '列车实际到发车站消息');
|
||||
// console.log([msg], '列车实际到发车站消息');
|
||||
state.trainStationList = [msg];
|
||||
}
|
||||
break;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import { getPublishMapVersionById, getPublishMapDetailById} from '@/api/jmap/map';
|
||||
import { getNewMapDataByGroup } from '@/api/simulation';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import axios from 'axios';
|
||||
import store from '../store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import { i18n } from '@/main.js';
|
||||
import { MessageBox } from 'element-ui';
|
||||
import { getToken } from '@/utils/auth';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
|
||||
/** 创建一个车次数据点*/
|
||||
|
@ -2,7 +2,7 @@ import { getToken } from '@/utils/auth';
|
||||
import { checkLoginLine } from '@/api/login';
|
||||
import { getBaseUrl } from '@/utils/baseUrl';
|
||||
import { MessageBox, Message } from 'element-ui';
|
||||
import store from '../store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
import SockJS from 'sockjs-client';
|
||||
import Stomp from 'stompjs';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Vue from 'vue';
|
||||
import StompClient from '@/utils/sock';
|
||||
import store from '@/store';
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
|
||||
export const displayTopic = '/user/queue/simulation'; // 其他仿真topic
|
||||
export const perpetualTopic = '/user/topic/message'; // 公用topic
|
||||
|
153
src/views/demonstration/deomonList/index_HYD.vue
Normal file
153
src/views/demonstration/deomonList/index_HYD.vue
Normal file
@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
v-dialogLoading="pageLoading"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="600px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: height+'px'}">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
node-key="group"
|
||||
class="filter-tree"
|
||||
default-expand-all
|
||||
:data="trainingList"
|
||||
:props="defaultProps"
|
||||
:filter-node-method="filterNode"
|
||||
:style="{height: height+'px'}"
|
||||
>
|
||||
<div slot-scope="{ node, data }" class="list-elem custom-tree-node">
|
||||
<span v-if="data.state=='01'">{{ '['+data.mapName+']'+($t('global.trainingNotStart').replace('{name}', data.creator.nickName)) }}</span>
|
||||
<span v-else>{{ '['+data.mapName+']'+($t('global.trainingHasStart').replace('{name}', data.creator.nickName)) }}</span>
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="handleJoinRoom(data)"
|
||||
>进入</el-button>
|
||||
</div>
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
<span
|
||||
slot="footer"
|
||||
class="dialog-footer"
|
||||
>
|
||||
<el-button v-loading="loading" type="primary" @click="handleJoin">{{ $t('global.joinNewRoom') }}</el-button>
|
||||
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getjointTrainListNew, putJointTrainingSimulationEntranceNew, getjointTrainingNew } from '@/api/jointTraining';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
|
||||
export default {
|
||||
name: 'DeomonList',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
height: 120,
|
||||
trainingList: [],
|
||||
defaultProps: {
|
||||
label: 'roomName'
|
||||
},
|
||||
group: '',
|
||||
loading: false,
|
||||
pageLoading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow;
|
||||
},
|
||||
title() {
|
||||
return this.$t('global.synthesisTrainingTitle');
|
||||
},
|
||||
isWatch() {
|
||||
return true;
|
||||
},
|
||||
isjoin() {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
async doShow() {
|
||||
try {
|
||||
this.pageLoading = true;
|
||||
this.dialogShow = true;
|
||||
this.loading = false;
|
||||
const resp = await getjointTrainListNew();
|
||||
this.trainingList = resp.data || [];
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
this.pageLoading = false;
|
||||
}
|
||||
},
|
||||
async doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
async handleJoinRoom(data) {
|
||||
try {
|
||||
const rest = await getPublishMapInfo(data.mapId);
|
||||
await getjointTrainingNew(data.group);
|
||||
if (data.state == '02') {
|
||||
launchFullscreen();
|
||||
const query = { lineCode: rest.data.lineCode, mapId: data.mapId, group: data.group, drawWay: true };
|
||||
await putJointTrainingSimulationEntranceNew(data.group);
|
||||
this.$router.push({ path: `/jointTrainingNew`, query: query });
|
||||
} else if (data.state == '01') {
|
||||
const query = { group: data.group, drawWay: true };
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
handleJoin() {
|
||||
this.$emit('enterQcode');
|
||||
this.dialogShow = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
/deep/ {
|
||||
.el-dialog__body {
|
||||
padding: 0px 30px !important;
|
||||
}
|
||||
|
||||
.el-tree {
|
||||
overflow: hidden !important;
|
||||
.list-elem {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-tree-node.is-current>.el-tree-node__content {
|
||||
background-color: #e4e3e3 !important;
|
||||
}
|
||||
}
|
||||
.custom-tree-node {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
</style>
|
411
src/views/jlmap3d/drive/drivecontrol/centerpane.vue
Normal file
411
src/views/jlmap3d/drive/drivecontrol/centerpane.vue
Normal file
@ -0,0 +1,411 @@
|
||||
<template>
|
||||
<div style="width:25%;height:100%;position:absolute;left:50%;">
|
||||
<div id="start" class="panebutton2" style="bottom:1%;left:5%;">
|
||||
<img class="buttonimg2" :src="start" />
|
||||
</div>
|
||||
|
||||
<div id="direct" class="panebutton2" style="bottom:1%;left:25%;">
|
||||
<img class="buttonimg2" :src="direct" />
|
||||
<img id="directimg" class="buttonimg2" :src="directoffpng" :style="{transform:toutransform}" @mousedown="touchstart" />
|
||||
<div class="directbutton" style="top:0px;right:0;">{{ $t('jlmap3d.front') }}</div>
|
||||
<div class="directbutton" style="top:18px;right:0;">0</div>
|
||||
<div class="directbutton" style="top:36px;right:0;">{{ $t('jlmap3d.later') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="div1" class ="pane-box">
|
||||
<img class="paneimg" :src="pane"/>
|
||||
<div class="panelb" :style="{right: isZh? '80px': '80px', top: isZh? '0px': '0px'}">{{ $t('jlmap3d.traction') }}</div>
|
||||
<div class="panelb" :style="{right: isZh? '80px': '80px', top: '70px'}">0</div>
|
||||
<div class="panelb" :style="{right: isZh? '80px': '80px', top: isZh? '130px': '130px'}">{{ $t('jlmap3d.braking') }}</div>
|
||||
<div class="panelb" :style="{right: isZh? '80px': '80px', top: isZh? '145px': '145px'}">{{ $t('jlmap3d.quick') }}</div>
|
||||
<img id="div2" class="lgimg" :src="lg" :style="{top:movex}" @mousedown="speedstart" />
|
||||
<!-- @mouseup="speedend" -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { trainSimulationForce,trainSimulationGear } from '@/jlmap3d/jl3ddrive/drivecontrol/simulation.js';
|
||||
import { throttle } from '@/utils/throttle.js';
|
||||
export default {
|
||||
name: 'CentercPane',
|
||||
components: {
|
||||
|
||||
},
|
||||
props: {
|
||||
drawWay: {
|
||||
type: String,
|
||||
default: 'false'
|
||||
},
|
||||
groupNum: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
userRole: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
move:0,
|
||||
movex:"73px",
|
||||
apoimg:"",
|
||||
touchcontrol:true,
|
||||
touchstate:"Neutral",
|
||||
toutransform:"rotate(175deg)",
|
||||
start:"/static/jl3d/control/start.png",
|
||||
direct:"/static/jl3d/control/direct.png",
|
||||
directz:"/static/jl3d/control/directfront.png",
|
||||
directoffpng:"/static/jl3d/control/directoff.png",
|
||||
pane:"/static/jl3d/control/pane.png",
|
||||
lg:"/static/jl3d/control/lg.png",
|
||||
|
||||
iconrotate:45,//旋转deg
|
||||
icontranslateX:100,//沿x轴位移px
|
||||
icontranslateY:100,//沿y轴位移px
|
||||
mouseX:0,
|
||||
mouseY:0,
|
||||
objX:0,
|
||||
objY:0,
|
||||
isDown:false,
|
||||
|
||||
angleoffset: {
|
||||
x: null,
|
||||
y: null
|
||||
},
|
||||
movelimit: {
|
||||
x: null,
|
||||
y: null
|
||||
},
|
||||
moveheight:null,
|
||||
speedlimit:160,
|
||||
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
move:function(val,oldval) {
|
||||
if(val != oldval){
|
||||
let command ={
|
||||
code:this.groupNum,
|
||||
operation:"602",
|
||||
type:"07",
|
||||
param:val
|
||||
};
|
||||
// if(this.drawWay == 'true'){
|
||||
throttle(trainSimulationForce(this.group,this.groupNum,val),200,true);
|
||||
//
|
||||
// }else{
|
||||
// throttle(sendSimulationCommand(this.group,command),200,true);
|
||||
// }
|
||||
|
||||
}
|
||||
},
|
||||
touchstate:function(val,oldval){
|
||||
if(val != oldval){
|
||||
// if(this.userRole == "DRIVER"){
|
||||
// trainSimulationGear(this.group,this.groupNum,this.touchstate).then(netdata => {
|
||||
//
|
||||
// });
|
||||
// }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
code() {
|
||||
return this.$store.state.app.code;
|
||||
},
|
||||
traincode() {
|
||||
return this.$store.state.app.driverTrain;
|
||||
},
|
||||
atostate(){
|
||||
return this.$store.state.app.atostate;
|
||||
},
|
||||
iconstyle:function(){//图标动态样式
|
||||
let arr = new Array();
|
||||
arr.push('transform:');//注意:先移动后旋转,实现原地旋转;先旋转后移动,位置按照旋转后的新坐标系确定
|
||||
arr.push('translateX('+this.icontranslateX+'px) ');
|
||||
arr.push('translateY('+this.icontranslateY+'px) ');
|
||||
arr.push('rotate('+this.iconrotate+'deg) ');
|
||||
return arr.join("");
|
||||
},
|
||||
isZh() {
|
||||
return this._i18n.locale == 'zh';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
centerstate : function(gear){
|
||||
this.touchstate = gear;
|
||||
if(this.touchstate == "Drive"){
|
||||
this.toutransform = "rotate(140deg)";
|
||||
}else if(this.touchstate == "Neutral"){
|
||||
this.toutransform = "rotate(175deg)";
|
||||
}else if(this.touchstate == "Reverse"){
|
||||
this.toutransform = "rotate(205deg)";
|
||||
}
|
||||
},
|
||||
centercontrol : function(){
|
||||
|
||||
},
|
||||
setData : function(){
|
||||
this.msgshow = false;
|
||||
},
|
||||
showcontrolmsg:function(data,callback){
|
||||
this.controlmsg = data;
|
||||
this.msgshow = true;
|
||||
|
||||
callback = callback || function(){
|
||||
this.setData();
|
||||
};
|
||||
setTimeout( callback.bind(this),2000);
|
||||
|
||||
},
|
||||
startclick: function (e){
|
||||
this.showcontrolmsg(this.$t('jlmap3d.drive'));
|
||||
},
|
||||
onChange: function(e){
|
||||
this.move = e.detail.x;
|
||||
},
|
||||
|
||||
controlsend:function(traincode,operation,type,param){
|
||||
if(this.userRole == "Driver"){
|
||||
let command ={
|
||||
code:traincode,
|
||||
operation:operation,
|
||||
type:type,
|
||||
param:param
|
||||
};
|
||||
sendSimulationCommand(this.group,command);
|
||||
}else{
|
||||
|
||||
}
|
||||
},
|
||||
speedstart: function(event){
|
||||
let domoffset = document.getElementById("div1").getBoundingClientRect();
|
||||
// movelimit
|
||||
this.movelimit.x = domoffset.x;
|
||||
this.movelimit.y = domoffset.y;
|
||||
event.preventDefault();
|
||||
document.getElementById("div1").onmousemove = this.speedchange;
|
||||
document.getElementById("div2").onmouseup = this.speedend;
|
||||
},
|
||||
speedchange: function(event){
|
||||
this.moveheight = event.pageY-this.movelimit.y;
|
||||
this.movex = this.moveheight-7 +"px";
|
||||
// if(this.atostate == true){
|
||||
// this.$store.dispatch('app/setAtoState', false);
|
||||
// }
|
||||
if(this.moveheight<=1){
|
||||
this.moveheight=1;
|
||||
this.movex=-6+"px";
|
||||
}
|
||||
if(this.moveheight>=159){
|
||||
this.moveheight=159;
|
||||
this.movex=153+"px";
|
||||
}
|
||||
if(this.moveheight>85&&this.moveheight<76){
|
||||
this.movex=73+"px";
|
||||
this.move = 0;
|
||||
}else if(this.moveheight<0&&this.moveheight>159){
|
||||
|
||||
}else{
|
||||
|
||||
if(this.moveheight>=85){
|
||||
this.move = -(this.moveheight-85)/65;
|
||||
}
|
||||
if(this.moveheight<=75){
|
||||
this.move = (75 - this.moveheight)/75;
|
||||
}
|
||||
this.movex=this.moveheight-7+"px";
|
||||
if(this.moveheight>=145){
|
||||
this.movex= 153+"px";
|
||||
this.move = -2;
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
speedend: function(event){
|
||||
document.getElementById("div1").onmousemove = null;
|
||||
document.getElementById("div2").onmouseup = null;
|
||||
},
|
||||
|
||||
|
||||
|
||||
click:function(){//图标点击事件
|
||||
if (this.iconrotate==0) {
|
||||
this.iconrotate=315;
|
||||
}else {
|
||||
this.iconrotate=0;
|
||||
}
|
||||
},
|
||||
touchstart:function(e){
|
||||
|
||||
|
||||
let domoffset = document.getElementById("directimg").getBoundingClientRect();
|
||||
// movelimit
|
||||
this.angleoffset.x = domoffset.x;
|
||||
this.angleoffset.y = domoffset.y;
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
document.getElementById("directimg").onmousemove = this.touchmove;
|
||||
document.getElementById("directimg").onmouseup = this.touchend;
|
||||
|
||||
|
||||
},
|
||||
touchmove:function(e){//finger move 触发
|
||||
// console.log(e);
|
||||
this.getAngle(e.pageX-this.angleoffset.x ,e.pageY-this.angleoffset.y);
|
||||
},
|
||||
touchend:function(e){
|
||||
document.getElementById("directimg").onmousemove = null;
|
||||
document.getElementById("directimg").onmouseup = null;
|
||||
},
|
||||
getAngle:function(mx,my){
|
||||
//圆心坐标
|
||||
// console.log(mx);
|
||||
// console.log(my);
|
||||
let px=30;
|
||||
let py=30;
|
||||
let x = Math.abs(px-mx);
|
||||
let y = Math.abs(py-my);
|
||||
let z = Math.sqrt(Math.pow(x,2)+Math.pow(y,2));
|
||||
let cos = y/z;
|
||||
let radina = Math.acos(cos);//用反三角函数求弧度
|
||||
let angle = Math.floor(180/(Math.PI/radina));//将弧度转换成角度
|
||||
|
||||
if(mx>px&&my>py){//鼠标在第四象限
|
||||
angle = 180 - angle;
|
||||
}
|
||||
|
||||
if(mx==px&&my>py){//鼠标在y轴负方向上
|
||||
angle = 180;
|
||||
}
|
||||
|
||||
if(mx>px&&my==py){//鼠标在x轴正方向上
|
||||
angle = 90;
|
||||
}
|
||||
|
||||
if(mx<px&&my>py){//鼠标在第三象限
|
||||
angle = 180+angle;
|
||||
}
|
||||
|
||||
if(mx<px&&my==py){//鼠标在x轴负方向
|
||||
angle = 270;
|
||||
}
|
||||
|
||||
if(mx<px&&my<py){//鼠标在第二象限
|
||||
angle = 360 - angle;
|
||||
}
|
||||
|
||||
if(angle<127 && angle>46){
|
||||
if(this.userRole == "DRIVER"){
|
||||
if(angle<63 && angle>46){
|
||||
if(this.touchstate != "Drive"){
|
||||
trainSimulationGear(this.group,this.groupNum,"Drive").then(netdata => {
|
||||
if(netdata.code == "200"){
|
||||
this.toutransform = "rotate(140deg)";
|
||||
this.touchstate = "Drive";
|
||||
document.getElementById("directimg").onmousemove = null;
|
||||
document.getElementById("directimg").onmouseup = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}else if(angle<93 && angle>68){
|
||||
if(this.touchstate != "Neutral"){
|
||||
trainSimulationGear(this.group,this.groupNum,"Neutral").then(netdata => {
|
||||
if(netdata.code == "200"){
|
||||
this.toutransform = "rotate(175deg)";
|
||||
this.touchstate = "Neutral";
|
||||
document.getElementById("directimg").onmousemove = null;
|
||||
document.getElementById("directimg").onmouseup = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}else if(angle<127 && angle>101){
|
||||
if(this.touchstate != "Reverse"){
|
||||
trainSimulationGear(this.group,this.groupNum,"Reverse").then(netdata => {
|
||||
if(netdata.code == "200"){
|
||||
this.toutransform = "rotate(205deg)";
|
||||
this.touchstate = "Reverse";
|
||||
document.getElementById("directimg").onmousemove = null;
|
||||
document.getElementById("directimg").onmouseup = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style >
|
||||
.pane-box{
|
||||
right: 30px;
|
||||
top: 0px;
|
||||
width:120px;
|
||||
height:160px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
|
||||
}
|
||||
.lgimg{
|
||||
width: 60px;
|
||||
right:4px;
|
||||
bottom:0px;
|
||||
height: 15px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.panelb {
|
||||
position: absolute;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
/* transform: rotate(90deg); */
|
||||
}
|
||||
.paneimg{
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
width:100px;
|
||||
height:160px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
|
||||
.directbutton{
|
||||
color:#FFFFFF;
|
||||
font-size: 13px;
|
||||
position:absolute;
|
||||
}
|
||||
|
||||
.tfbutton{
|
||||
color:#000000;
|
||||
font-size: 1px;
|
||||
position:absolute;
|
||||
}
|
||||
|
||||
</style>
|
0
src/views/jlmap3d/drive/drivecontrol/dirvespee.js
Normal file
0
src/views/jlmap3d/drive/drivecontrol/dirvespee.js
Normal file
230
src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue
Normal file
230
src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue
Normal file
@ -0,0 +1,230 @@
|
||||
<template>
|
||||
<div class="drivepane">
|
||||
|
||||
<div style="position: absolute;left:50%;top:10%;z-index:10;background: #EBEBEB;">
|
||||
<el-select v-model="value" placeholder="请选择列车" @change="currentsel" @visible-change="clickselect">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<Centerc-Pane ref="centercontrol" :draw-way="drawWay" :group-num="groupnum" :user-role="userrole" />
|
||||
|
||||
<Left-Pane ref="leftcontrol" />
|
||||
|
||||
<Right-Pane ref="rightcontrol" />
|
||||
|
||||
<TopRight-Pane ref="topcontrol" />
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
<div class="msg" v-show ="msgshow">
|
||||
<div class="msgtext">
|
||||
{{controlmsg}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="switchpane" style="left:0;top:47.5%;transform: rotate(90deg);" v-show="switchleft" @tap="switchl">
|
||||
<image class="switchimg" :src="jiantou" />
|
||||
</div>
|
||||
|
||||
<div class="switchpane" style="left:47.5%;top:0;transform: rotate(180deg);" v-show="switchtop" @tap="switcht">
|
||||
<image class="switchimg" :src="jiantou" />
|
||||
</div>
|
||||
|
||||
<div class="switchpane" style="right:0;top:47.5%;transform: rotate(270deg);" v-show="switchright" @tap="switchr">
|
||||
<image class="switchimg" :src="jiantou" />
|
||||
</div>
|
||||
|
||||
<div class="switchpane" style="right:47.5%;bottom:0;" v-show="switchbottom" @tap="switchb">
|
||||
<image class="switchimg" :src="jiantou" />
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
//
|
||||
// import { sendSimulationCommand,getSimulationTrainlist,getSimulationTrainlistNew,getSimulationMember, getSimulationMemberNew,bindSimulationTrain,trainSimulationEb,trainSimulationForce,trainSimulationGear} from '@/api/simulation.js';
|
||||
// import { creatSubscribe, clearSubscribe, SocketStatusMap } from '@/utils/subscribe.js';
|
||||
// import { hideLoading } from '@/utils/loading.js';
|
||||
import CentercPane from '@/views/jlmap3d/drive/drivecontrol/centerpane';
|
||||
import LeftPane from '@/views/jlmap3d/drive/drivecontrol/leftpane';
|
||||
import RightPane from '@/views/jlmap3d/drive/drivecontrol/rightpane';
|
||||
import TopRightPane from '@/views/jlmap3d/drive/drivecontrol/toprightpane';
|
||||
|
||||
import StompClient from '@/utils/sock';
|
||||
|
||||
import { creatSubscribe, clearSubscribe, displayTopic, screenTopic } from '@/utils/stomp';
|
||||
import { bindSimulationTrain,getSimulationTrainlistNew,getSimulationMemberNew,trainSimulationEb,trainSimulationForce,trainSimulationGear} from '@/jlmap3d/jl3ddrive/drivecontrol/simulation.js';
|
||||
import { getToken } from '@/utils/auth';
|
||||
// import Vue from 'vue';
|
||||
// import StompClient from '@/utils/stompclient.js';
|
||||
import axios from 'axios';
|
||||
export default {
|
||||
name: 'DriveControl',
|
||||
components: {
|
||||
CentercPane,
|
||||
LeftPane,
|
||||
RightPane,
|
||||
TopRightPane,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
options: [],
|
||||
value: '',
|
||||
teststomp:null,
|
||||
topid:null,
|
||||
trainlist:null,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
onLoad(e) {
|
||||
},
|
||||
onReady() {
|
||||
|
||||
},
|
||||
computed: {
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
// this.teststomp = new StompClient();
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
},
|
||||
methods: {
|
||||
currentsel(selVal){
|
||||
this.selVal = selVal;
|
||||
this.dialogVisible = true;
|
||||
this.groupnum = selVal;
|
||||
for(let i=0;i<this.trainlist.length;i++){
|
||||
if(this.trainlist[i].groupNumber == this.groupnum){
|
||||
this.$refs.centercontrol.centerstate(this.trainlist[i].gear);
|
||||
}
|
||||
}
|
||||
|
||||
bindSimulationTrain(this.group,this.groupnum);
|
||||
|
||||
},
|
||||
clickselect(e){
|
||||
if(e == true){
|
||||
getSimulationMemberNew(this.group).then(netdata => {
|
||||
this.userrole = netdata.data.role;
|
||||
});
|
||||
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
|
||||
}
|
||||
if(netdata.data[i].name){
|
||||
option.label = netdata.data[i].name+"正在驾驶"+netdata.data[i].groupNumber;
|
||||
}
|
||||
|
||||
|
||||
this.options.push(option);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.drivepane{
|
||||
width:100%;
|
||||
height:160px;
|
||||
left:0;
|
||||
bottom:0;
|
||||
position: absolute;
|
||||
background-size: 100% 100%;
|
||||
background-image: url('/static/jl3d/control/scene.png');
|
||||
}
|
||||
.panebutton{
|
||||
height: 73px;
|
||||
width: 60px;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.panebutton2{
|
||||
height: 73px;
|
||||
width: 80px;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.buttonimg{
|
||||
top:0;
|
||||
/* position: absolute; */
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.buttonimg2{
|
||||
top:0;
|
||||
left:10px;
|
||||
position: absolute;
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.buttontext{
|
||||
width:100%;
|
||||
bottom:0px;
|
||||
|
||||
/* position: absolute; */
|
||||
color: #FFFFFF;
|
||||
font-size: 4px;
|
||||
}
|
||||
.buttontext2{
|
||||
width:100%;
|
||||
bottom:0px;
|
||||
|
||||
position: absolute;
|
||||
color: #FFFFFF;
|
||||
font-size: 4px;
|
||||
}
|
||||
|
||||
.msgtext{
|
||||
width:200px;
|
||||
height:50px;
|
||||
border-radius:5px;
|
||||
background:#C0C0C0;
|
||||
color:#FFFFFF;
|
||||
font-size: 40px;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.switchpane{
|
||||
width:30px;
|
||||
height:30px;
|
||||
position:absolute;
|
||||
}
|
||||
|
||||
.switchimg{
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
.selecttraintext{
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
</style>
|
425
src/views/jlmap3d/drive/drivecontrol/leftpane.vue
Normal file
425
src/views/jlmap3d/drive/drivecontrol/leftpane.vue
Normal file
@ -0,0 +1,425 @@
|
||||
<template>
|
||||
<div style="width:25%;height:100%;position:absolute;bottom:0;left:0;">
|
||||
<div id="breaker" class="panebutton" style="top:3%;left:3%;" @tap="breakerclick">
|
||||
<img class="buttonimg" :src="greenzimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.highSpeedCircuitBreaker') }}</div>
|
||||
</div>
|
||||
<div id="carwash" class="panebutton" style="top:3%;left:14%;" @tap="carwashclick">
|
||||
<img class="buttonimg" :src="redzimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.washCarModel') }}</div>
|
||||
</div>
|
||||
<div id="aircom" class="panebutton" style="top:3%;left:28%;" @tap="aircomclick">
|
||||
<img class="buttonimg" :src="aircomimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.forcedAirCompressor') }}</div>
|
||||
</div>
|
||||
<div id="atb" class="panebutton" style="top:3%;left:42%;" @tap="atbclick">
|
||||
<img class="buttonimg" :src="greenimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.ATBStart') }}</div>
|
||||
</div>
|
||||
<div id="bmcbtc" class="panebutton" style="top:3%;left:56%;" @tap="bmcbtcclick">
|
||||
<img class="buttonimg" :src="greenimg" />
|
||||
<div class="buttontext">BM/CBTC</div>
|
||||
</div>
|
||||
<div id="rm" class="panebutton" style="top:3%;left:70%;" @tap="rmclick">
|
||||
<img class="buttonimg" :src="greenimg" />
|
||||
<div class="buttontext">RM</div>
|
||||
</div>
|
||||
<div id="relieve" class="panebutton" style="top:3%;left:84%;" @tap="relieveclick">
|
||||
<img class="buttonimg" :src="aircomimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.forcedRelieve') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="dlclose" class="panebutton" style="bottom:3%;left:3%;" @tap="dlcclick">
|
||||
<img class="buttonimg" :src="greenimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.closeLeftDoor') }}</div>
|
||||
</div>
|
||||
<div id="dlopen" class="panebutton" style="bottom:3%;left:14%;" @tap="dloclick">
|
||||
<img class="buttonimg" :src="redimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.openLeftDoor') }}</div>
|
||||
</div>
|
||||
<div id="dlopen" class="panebutton" style="bottom:3%;left:28%;" @tap="dloclick">
|
||||
<img class="buttonimg" :src="redimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.openLeftDoor') }}</div>
|
||||
</div>
|
||||
<div id="atoa" class="panebutton" style="bottom:3%;left:42%;" @tap="atoaclick">
|
||||
<img class="buttonimg" :src="apoimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.ATOStart') }}</div>
|
||||
</div>
|
||||
<div id="atob" class="panebutton" style="bottom:3%;left:56%;" @tap="atobclick">
|
||||
<img class="buttonimg" :src="apoimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.ATOStart') }}</div>
|
||||
</div>
|
||||
<div id="cbtc" class="panebutton" style="bottom:3%;left:70%;" @tap="cbtcclick">
|
||||
<img class="buttonimg" :src="greenimg" />
|
||||
<div class="buttontext">CBTC</div>
|
||||
</div>
|
||||
<div id="elflute" class="panebutton" style="bottom:3%;left:84%;" @tap="elfluteclick">
|
||||
<img class="buttonimg" :src="grayimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.electricHornButton') }}</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import Vue from 'vue';
|
||||
// import { sendSimulationCommand } from '@/api/simulation.js';
|
||||
|
||||
export default {
|
||||
name: 'LeftPane',
|
||||
components: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
apoimg:"/static/jl3d/control/green.png",
|
||||
greenzimg:"/static/jl3d/control/greenz.png",
|
||||
redzimg:"/static/jl3d/control/redz.png",
|
||||
greenimg:"/static/jl3d/control/green.png",
|
||||
redimg:"/static/jl3d/control/red.png",
|
||||
greenlimg:"/static/jl3d/control/greenl.png",
|
||||
grayimg:"/static/jl3d/control/gray.png",
|
||||
zuoimg:"/static/jl3d/control/zuo.png",
|
||||
niuimg:"/static/jl3d/control/niu.png",
|
||||
aircomimg:"/static/jl3d/control/aircom.png",
|
||||
passlighttf:"rotate(0deg)",
|
||||
sivtf:"rotate(0deg)",
|
||||
driverlighttf:"rotate(0deg)",
|
||||
headlighttf:"rotate(0deg)",
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.app.atostate': function (val,newval) {
|
||||
if(val != newval){
|
||||
if(newval == true){
|
||||
this.apoimg = this.greenimg;
|
||||
this.$store.dispatch('app/setAtoState', false);
|
||||
}else{
|
||||
this.apoimg = this.greenlimg;
|
||||
this.$store.dispatch('app/setAtoState', true);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
group() {
|
||||
return this.$store.state.app.group;
|
||||
},
|
||||
code() {
|
||||
return this.$store.state.app.code;
|
||||
},
|
||||
traincode() {
|
||||
return this.$store.state.app.driverTrain;
|
||||
},
|
||||
movespeed() {
|
||||
return this.$store.state.app.movespeed;
|
||||
},
|
||||
drivedirect() {
|
||||
return this.$store.state.app.drivedirect;
|
||||
},
|
||||
atostate(){
|
||||
return this.$store.state.app.atostate;
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
leftstate : function(lefts){
|
||||
if(lefts.ato == true){
|
||||
this.apoimg = this.greenlimg;
|
||||
this.$store.dispatch('app/setAtoState', true);
|
||||
}else{
|
||||
this.apoimg = this.greenimg;
|
||||
this.$store.dispatch('app/setAtoState', false);
|
||||
|
||||
}
|
||||
},
|
||||
leftcontrol : function(){
|
||||
|
||||
},
|
||||
showmsg:function(data){
|
||||
wx.showToast({
|
||||
title: data,
|
||||
icon: 'loading',
|
||||
duration: 2000
|
||||
});
|
||||
},
|
||||
setData : function(){
|
||||
this.msgshow = false;
|
||||
},
|
||||
showcontrolmsg:function(data,callback){
|
||||
this.controlmsg = data;
|
||||
this.msgshow = true;
|
||||
|
||||
callback = callback || function(){
|
||||
this.setData();
|
||||
};
|
||||
setTimeout( callback.bind(this),2000);
|
||||
|
||||
},
|
||||
//左侧车门开
|
||||
dloclick: function (e){
|
||||
console.log(this.$t('jlmap3d.leftDoorOpen'));
|
||||
if(this.movespeed == 0){
|
||||
//this.showcontrolmsg("左侧车门开");
|
||||
this.controlsend(this.traincode,"603","07","");
|
||||
}
|
||||
},
|
||||
//左侧车门关
|
||||
dlcclick: function (e){
|
||||
console.log(this.$t('jlmap3d.leftDoorClose'));
|
||||
if(this.movespeed == 0){
|
||||
//this.showcontrolmsg("左侧车门关");
|
||||
this.controlsend(this.traincode,"605","07","");
|
||||
}
|
||||
},
|
||||
//断路器
|
||||
breakerclick: function (e){
|
||||
Vue.prototype.$stomp.send("/app/topic/simulation/drive","breaker");
|
||||
},
|
||||
//洗车模式
|
||||
carwashclick: function (e){
|
||||
Vue.prototype.$stomp.send("/app/topic/simulation/drive","carwash");
|
||||
},
|
||||
//空压机
|
||||
aircomclick : function (e){
|
||||
Vue.prototype.$stomp.send("/app/topic/simulation/drive","aircom");
|
||||
},
|
||||
//ATB
|
||||
atbclick : function (e){
|
||||
Vue.prototype.$stomp.send("/app/topic/simulation/drive","atb");
|
||||
},
|
||||
//BMCBTC
|
||||
bmcbtcclick : function (e){
|
||||
Vue.prototype.$stomp.send("/app/topic/simulation/drive","bm");
|
||||
},
|
||||
//RM
|
||||
rmclick : function (e){
|
||||
Vue.prototype.$stomp.send("/app/topic/simulation/drive","rm");
|
||||
},
|
||||
//强迫缓解
|
||||
relieveclick : function (e){
|
||||
Vue.prototype.$stomp.send("/app/topic/simulation/drive","relieve");
|
||||
},
|
||||
//ATOA
|
||||
atoaclick : function (e){
|
||||
//console.log("ato自动驾驶");
|
||||
if(this.movespeed == 0){
|
||||
if(this.drivedirect == "Drive"){
|
||||
this.controlsend(this.traincode,"601","07","");
|
||||
this.apoimg = this.greenlimg;
|
||||
this.showcontrolmsg(this.$t('jlmap3d.ATOStart'));
|
||||
this.$store.dispatch('app/setAtoState', true);
|
||||
}
|
||||
}
|
||||
},
|
||||
//ATOB
|
||||
atobclick : function (e){
|
||||
if(this.movespeed == 0){
|
||||
if(this.drivedirect == "Drive"){
|
||||
this.controlsend(this.traincode,"601","07","");
|
||||
this.apoimg = this.greenimg;
|
||||
this.showcontrolmsg(this.$t('jlmap3d.ATOStart'));
|
||||
this.$store.dispatch('app/setAtoState', true);
|
||||
}
|
||||
}
|
||||
},
|
||||
//CBTC
|
||||
cbtcclick : function (e){
|
||||
Vue.prototype.$stomp.send("/app/topic/simulation/drive","cbtc");
|
||||
},
|
||||
//电笛
|
||||
elfluteclick : function (e){
|
||||
Vue.prototype.$stomp.send("/app/topic/simulation/drive","elflute");
|
||||
},
|
||||
controlsend:function(traincode,operation,type,param){
|
||||
if(this.$store.state.app.userRole == "Driver"){
|
||||
let command ={
|
||||
code: traincode,
|
||||
operation: operation,
|
||||
type: type,
|
||||
param: param
|
||||
};
|
||||
// sendSimulationCommand(this.group,command);
|
||||
}else{
|
||||
|
||||
}
|
||||
},
|
||||
passlighttouchstart:function(e){
|
||||
// let command ={
|
||||
// code:this.traincode,
|
||||
// operation:"607",
|
||||
// type:"07",
|
||||
// param:""
|
||||
// };
|
||||
// command.param = this.touchstate;
|
||||
// sendSimulationCommand(this.group,command).then(netdata => {
|
||||
// if(netdata.data == true){
|
||||
this.touchcontrol = true;
|
||||
// }
|
||||
// });
|
||||
},
|
||||
passlighttouchmove:function(e){//finger move 触发
|
||||
if(this.touchcontrol == true){
|
||||
let px=75;
|
||||
let py=155;
|
||||
let angle = this.getAngle(px,py,e.changedTouches[0].clientX,e.changedTouches[0].clientY);
|
||||
if(angle<360 && angle>245){
|
||||
if(angle<327 && angle>245){
|
||||
this.passlighttf = "rotate(359deg)";
|
||||
}else if(angle<360 && angle>327){
|
||||
this.passlighttf = "rotate(90deg)";
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
passlighttouchend:function(e){
|
||||
this.touchcontrol = false;
|
||||
},
|
||||
sivtouchstart:function(e){
|
||||
// let command ={
|
||||
// code:this.traincode,
|
||||
// operation:"607",
|
||||
// type:"07",
|
||||
// param:""
|
||||
// };
|
||||
// command.param = this.touchstate;
|
||||
// sendSimulationCommand(this.group,command).then(netdata => {
|
||||
// if(netdata.data == true){
|
||||
this.touchcontrol = true;
|
||||
// }
|
||||
// });
|
||||
},
|
||||
sivtouchmove:function(e){//finger move 触发
|
||||
if(this.touchcontrol == true){
|
||||
let px=75;
|
||||
let py=255;
|
||||
let angle = this.getAngle(px,py,e.changedTouches[0].clientX,e.changedTouches[0].clientY);
|
||||
if(angle<360 && angle>245){
|
||||
if(angle<327 && angle>245){
|
||||
this.sivtf = "rotate(359deg)";
|
||||
}else if(angle<360 && angle>327){
|
||||
this.sivtf = "rotate(90deg)";
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
sivtouchend:function(e){
|
||||
this.touchcontrol = false;
|
||||
},
|
||||
driverlighttouchstart:function(e){
|
||||
// let command ={
|
||||
// code:this.traincode,
|
||||
// operation:"607",
|
||||
// type:"07",
|
||||
// param:""
|
||||
// };
|
||||
// command.param = this.touchstate;
|
||||
// sendSimulationCommand(this.group,command).then(netdata => {
|
||||
// if(netdata.data == true){
|
||||
this.touchcontrol = true;
|
||||
// }
|
||||
// });
|
||||
},
|
||||
driverlighttouchmove:function(e){//finger move 触发
|
||||
if(this.touchcontrol == true){
|
||||
let px=75;
|
||||
let py=355;
|
||||
let angle = this.getAngle(px,py,e.changedTouches[0].clientX,e.changedTouches[0].clientY);
|
||||
if(angle<360 && angle>245){
|
||||
if(angle<327 && angle>245){
|
||||
this.driverlighttf = "rotate(359deg)";
|
||||
}else if(angle<360 && angle>327){
|
||||
this.driverlighttf = "rotate(90deg)";
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
driverlighttouchend:function(e){
|
||||
this.touchcontrol = false;
|
||||
},
|
||||
headlighttouchstart:function(e){
|
||||
// let command ={
|
||||
// code:this.traincode,
|
||||
// operation:"607",
|
||||
// type:"07",
|
||||
// param:""
|
||||
// };
|
||||
// command.param = this.touchstate;
|
||||
// sendSimulationCommand(this.group,command).then(netdata => {
|
||||
// if(netdata.data == true){
|
||||
this.touchcontrol = true;
|
||||
// }
|
||||
// });
|
||||
},
|
||||
headlighttouchmove:function(e){//finger move 触发
|
||||
if(this.touchcontrol == true){
|
||||
let px=75;
|
||||
let py=455;
|
||||
let angle = this.getAngle(px,py,e.changedTouches[0].clientX,e.changedTouches[0].clientY);
|
||||
if(angle<360 && angle>245){
|
||||
if(angle<295 && angle>245){
|
||||
this.headlighttf = "rotate(359deg)";
|
||||
}else if(angle<338 && angle>295){
|
||||
this.headlighttf = "rotate(405deg)";
|
||||
}else if(angle<360 && angle>338){
|
||||
this.headlighttf = "rotate(90deg)";
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
headlighttouchend:function(e){
|
||||
this.touchcontrol = false;
|
||||
},
|
||||
getAngle:function(px,py,mx,my){
|
||||
//圆心坐标
|
||||
let x = Math.abs(px-mx);
|
||||
let y = Math.abs(py-my);
|
||||
let z = Math.sqrt(Math.pow(x,2)+Math.pow(y,2));
|
||||
let cos = y/z;
|
||||
let radina = Math.acos(cos);//用反三角函数求弧度
|
||||
let angle = Math.floor(180/(Math.PI/radina));//将弧度转换成角度
|
||||
|
||||
if(mx>px&&my>py){//鼠标在第四象限
|
||||
angle = 180 - angle;
|
||||
}
|
||||
|
||||
if(mx==px&&my>py){//鼠标在y轴负方向上
|
||||
angle = 180;
|
||||
}
|
||||
|
||||
if(mx>px&&my==py){//鼠标在x轴正方向上
|
||||
angle = 90;
|
||||
}
|
||||
|
||||
if(mx<px&&my>py){//鼠标在第三象限
|
||||
angle = 180+angle;
|
||||
}
|
||||
|
||||
if(mx<px&&my==py){//鼠标在x轴负方向
|
||||
angle = 270;
|
||||
}
|
||||
|
||||
if(mx<px&&my<py){//鼠标在第二象限
|
||||
angle = 360 - angle;
|
||||
}
|
||||
return angle;
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
338
src/views/jlmap3d/drive/drivecontrol/rightpane.vue
Normal file
338
src/views/jlmap3d/drive/drivecontrol/rightpane.vue
Normal file
@ -0,0 +1,338 @@
|
||||
<template>
|
||||
<div style="width:25%;height:100%;position:absolute;left:75%;">
|
||||
|
||||
<div id="dropen" class="panebutton" style="bottom:1%;left:1%;" @tap="droclick">
|
||||
<img class="buttonimg" :src="redlimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.openRightDoor') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="dropen" class="panebutton" style="bottom:1%;left:21%;" @tap="droclick">
|
||||
<img class="buttonimg" :src="redlimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.openRightDoor') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="drclose" class="panebutton" style="bottom:1%;left:41%;" @tap="drcclick">
|
||||
<img class="buttonimg" :src="greenimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.closeRightDoor') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="waterswitch" class="panebutton2" style="bottom:1%;left:61%;" @tap="waterclick">
|
||||
<img class="buttonimg2" :src="zuoimg" />
|
||||
<img class="buttonimg2" :src="niuimg" :style="{transform:watertou}" @touchstart='watertouchstart' @touchmove='watertouchmove' @touchend='watertouchend'/>
|
||||
<div class="tfbutton" style="font-size:1px;top:5px;left:33px;">{{ $t('jlmap3d.close') }}</div>
|
||||
<div class="tfbutton" style="font-size:1px;top:15px;left:50px;">{{ $t('jlmap3d.sprayWater') }}</div>
|
||||
<div class="buttontext2">{{ $t('jlmap3d.waterSwitch') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="wiper" class="panebutton2" style="bottom:1%;left:81%;">
|
||||
<img class="buttonimg2" :src="zuoimg" />
|
||||
<img class="buttonimg2" :src="niuimg" :style="{transform:washtou}" @touchstart='washtouchstart' @touchmove='washtouchmove' @touchend='washtouchend'/>
|
||||
<div class="tfbutton" style="font-size:1px;top:5px;left:33px;">{{ $t('jlmap3d.close') }}</div>
|
||||
<div class="tfbutton" style="font-size:1px;top:13px;left:50px;">{{ $t('jlmap3d.slow') }}</div>
|
||||
<div class="tfbutton" style="font-size:1px;top:23px;left:50px;">{{ $t('jlmap3d.highSpeed') }}</div>
|
||||
<div class="buttontext2">{{ $t('jlmap3d.wiperSwitch') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="urgestop" class="panebutton" style="top:1%;left:1%;">
|
||||
<img class="buttonimg" :src="urgestopimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.emergencyBraking') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="doorpick" class="panebutton2" style="top:1%;left:33%;">
|
||||
<img class="buttonimg2" :src="zuoimg" />
|
||||
<img class="buttonimg2" :src="niuimg" :style="{transform:doordirecttou}" @touchstart='doordirecttouchstart' @touchmove='doordirecttouchmove' @touchend='doordirecttouchend'/>
|
||||
<div class="tfbutton" style="font-size:1px;top:13px;left:5px;">{{ $t('jlmap3d.leftSide') }}</div>
|
||||
<div class="tfbutton" style="font-size:1px;top:5px;left:33px;">{{ $t('jlmap3d.location0') }}</div>
|
||||
<div class="tfbutton" style="font-size:1px;top:13px;left:50px;">{{ $t('jlmap3d.rightSide') }}</div>
|
||||
<div class="buttontext2">{{ $t('jlmap3d.doorSideChoose') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="doormode" class="panebutton2" style="top:1%;left:66%;">
|
||||
<img class="buttonimg2" :src="zuoimg" />
|
||||
<img class="buttonimg2" :src="niuimg" :style="{transform:doormodetou}" @touchstart='doormodetouchstart' @touchmove='doormodetouchmove' @touchend='doormodetouchend'/>
|
||||
<div class="tfbutton" style="font-size:1px;top:13px;left:5px;">AA</div>
|
||||
<div class="tfbutton" style="font-size:1px;top:5px;left:33px;">AM</div>
|
||||
<div class="tfbutton" style="font-size:1px;top:13px;left:50px;">MM</div>
|
||||
<div class="buttontext2">{{ $t('jlmap3d.doorModel') }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import Vue from 'vue';
|
||||
import { sendSimulationCommand } from '@/api/simulation.js';
|
||||
|
||||
export default {
|
||||
name: 'RightPane',
|
||||
components: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
redlimg:"/static/jl3d/control/redl.png",
|
||||
greenimg:"/static/jl3d/control/green.png",
|
||||
zuoimg:"/static/jl3d/control/zuo.png",
|
||||
niuimg:"/static/jl3d/control/niu.png",
|
||||
urgestopimg:"/static/jl3d/control/urgestop.png",
|
||||
doordirecttou:"rotate(0deg)",
|
||||
doormodetou:"rotate(0deg)",
|
||||
watertou:"rotate(0deg)",
|
||||
washtou:"rotate(0deg)",
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
computed: {
|
||||
group() {
|
||||
return this.$store.state.app.group;
|
||||
},
|
||||
code() {
|
||||
return this.$store.state.app.code;
|
||||
},
|
||||
traincode() {
|
||||
return this.$store.state.app.driverTrain;
|
||||
},
|
||||
movespeed() {
|
||||
return this.$store.state.app.movespeed;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
rightstate : function(rights){
|
||||
|
||||
},
|
||||
rightcontrol : function(){
|
||||
|
||||
},
|
||||
showmsg:function(data){
|
||||
wx.showToast({
|
||||
title: data,
|
||||
icon: 'loading',
|
||||
duration: 2000
|
||||
});
|
||||
},
|
||||
showcontrolmsg:function(data,callback){
|
||||
this.controlmsg = data;
|
||||
this.msgshow = true;
|
||||
|
||||
callback = callback || function(){
|
||||
this.setData();
|
||||
};
|
||||
setTimeout( callback.bind(this),2000);
|
||||
|
||||
},
|
||||
droclick: function (e){
|
||||
//console.log("右侧车门开");
|
||||
if(this.movespeed == 0){
|
||||
this.showcontrolmsg(this.$t('jlmap3d.rightDoorOpen'));
|
||||
this.controlsend(this.traincode,"604","07","");
|
||||
}
|
||||
},
|
||||
drcclick: function (e){
|
||||
//console.log("右侧车门关");
|
||||
if(this.movespeed == 0){
|
||||
this.showcontrolmsg(this.$t('jlmap3d.rightDoorClose'));
|
||||
this.controlsend(this.traincode,"606","07","");
|
||||
}
|
||||
},
|
||||
urgestopclick: function (e){
|
||||
|
||||
},
|
||||
controlsend:function(traincode,operation,type,param){
|
||||
if(this.$store.state.app.userRole == "Driver"){
|
||||
let command ={
|
||||
code: traincode,
|
||||
operation: operation,
|
||||
type: type,
|
||||
param: param
|
||||
};
|
||||
sendSimulationCommand(this.group,command);
|
||||
}else{
|
||||
|
||||
}
|
||||
},
|
||||
watertouchstart:function(e){
|
||||
// let command ={
|
||||
// code:this.traincode,
|
||||
// operation:"607",
|
||||
// type:"07",
|
||||
// param:""
|
||||
// };
|
||||
// command.param = this.touchstate;
|
||||
// sendSimulationCommand(this.group,command).then(netdata => {
|
||||
// if(netdata.data == true){
|
||||
this.touchcontrol = true;
|
||||
// }
|
||||
// });
|
||||
},
|
||||
watertouchmove:function(e){//finger move 触发
|
||||
if(this.touchcontrol == true){
|
||||
let px=140;
|
||||
let py=400;
|
||||
let angle = this.getAngle(px,py,e.changedTouches[0].clientX,e.changedTouches[0].clientY);
|
||||
if(angle<338 && angle>245){
|
||||
if(angle<295 && angle>245){
|
||||
this.watertou = "rotate(359deg)";
|
||||
}else if(angle<338 && angle>295){
|
||||
this.watertou = "rotate(412deg)";
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
watertouchend:function(e){
|
||||
this.touchcontrol = false;
|
||||
},
|
||||
washtouchstart:function(e){
|
||||
// let command ={
|
||||
// code:this.traincode,
|
||||
// operation:"607",
|
||||
// type:"07",
|
||||
// param:""
|
||||
// };
|
||||
// command.param = this.touchstate;
|
||||
// sendSimulationCommand(this.group,command).then(netdata => {
|
||||
// if(netdata.data == true){
|
||||
this.touchcontrol = true;
|
||||
// }
|
||||
// });
|
||||
},
|
||||
washtouchmove:function(e){//finger move 触发
|
||||
if(this.touchcontrol == true){
|
||||
let px=140;
|
||||
let py=510;
|
||||
let angle = this.getAngle(px,py,e.changedTouches[0].clientX,e.changedTouches[0].clientY);
|
||||
// console.log(angle);
|
||||
// this.washtou = "rotate("+(angle+85)+"deg)";
|
||||
if(angle<360 && angle>245){
|
||||
if(angle<295 && angle>245){
|
||||
this.washtou = "rotate(359deg)";
|
||||
}else if(angle<338 && angle>295){
|
||||
this.washtou = "rotate(412deg)";
|
||||
}else if(angle<360 && angle>338){
|
||||
this.washtou = "rotate(90deg)";
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
washtouchend:function(e){
|
||||
this.touchcontrol = false;
|
||||
},
|
||||
doordirecttouchstart:function(e){
|
||||
// let command ={
|
||||
// code:this.traincode,
|
||||
// operation:"607",
|
||||
// type:"07",
|
||||
// param:""
|
||||
// };
|
||||
// command.param = this.touchstate;
|
||||
// sendSimulationCommand(this.group,command).then(netdata => {
|
||||
// if(netdata.data == true){
|
||||
this.touchcontrol = true;
|
||||
// }
|
||||
// });
|
||||
},
|
||||
doordirecttouchmove:function(e){//finger move 触发
|
||||
if(this.touchcontrol == true){
|
||||
let px=230;
|
||||
let py=180;
|
||||
let angle = this.getAngle(px,py,e.changedTouches[0].clientX,e.changedTouches[0].clientY);
|
||||
if(angle<338 && angle>219){
|
||||
if(angle<245 && angle>219){
|
||||
this.doordirecttou = "rotate(305deg)";
|
||||
}else if(angle<295 && angle>245){
|
||||
this.doordirecttou = "rotate(359deg)";
|
||||
}else if(angle<338 && angle>295){
|
||||
this.doordirecttou = "rotate(412deg)";
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
doordirecttouchend:function(e){
|
||||
this.touchcontrol = false;
|
||||
},
|
||||
doormodetouchstart:function(e){
|
||||
// let command ={
|
||||
// code:this.traincode,
|
||||
// operation:"607",
|
||||
// type:"07",
|
||||
// param:""
|
||||
// };
|
||||
// command.param = this.touchstate;
|
||||
// sendSimulationCommand(this.group,command).then(netdata => {
|
||||
// if(netdata.data == true){
|
||||
this.touchcontrol = true;
|
||||
// }
|
||||
// });
|
||||
},
|
||||
doormodetouchmove:function(e){//finger move 触发
|
||||
if(this.touchcontrol == true){
|
||||
let px=230;
|
||||
let py=280;
|
||||
let angle = this.getAngle(px,py,e.changedTouches[0].clientX,e.changedTouches[0].clientY);
|
||||
if(angle<338 && angle>219){
|
||||
if(angle<245 && angle>219){
|
||||
this.doormodetou = "rotate(305deg)";
|
||||
Vue.prototype.$stomp.send("/app/topic/simulation/drive","AA");
|
||||
}else if(angle<295 && angle>245){
|
||||
this.doormodetou = "rotate(359deg)";
|
||||
Vue.prototype.$stomp.send("/app/topic/simulation/drive","AM");
|
||||
}else if(angle<338 && angle>295){
|
||||
this.doormodetou = "rotate(412deg)";
|
||||
Vue.prototype.$stomp.send("/app/topic/simulation/drive","MM");
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
doormodetouchend:function(e){
|
||||
this.touchcontrol = false;
|
||||
},
|
||||
getAngle:function(px,py,mx,my){
|
||||
//圆心坐标
|
||||
let x = Math.abs(px-mx);
|
||||
let y = Math.abs(py-my);
|
||||
let z = Math.sqrt(Math.pow(x,2)+Math.pow(y,2));
|
||||
let cos = y/z;
|
||||
let radina = Math.acos(cos);//用反三角函数求弧度
|
||||
let angle = Math.floor(180/(Math.PI/radina));//将弧度转换成角度
|
||||
|
||||
if(mx>px&&my>py){//鼠标在第四象限
|
||||
angle = 180 - angle;
|
||||
}
|
||||
|
||||
if(mx==px&&my>py){//鼠标在y轴负方向上
|
||||
angle = 180;
|
||||
}
|
||||
|
||||
if(mx>px&&my==py){//鼠标在x轴正方向上
|
||||
angle = 90;
|
||||
}
|
||||
|
||||
if(mx<px&&my>py){//鼠标在第三象限
|
||||
angle = 180+angle;
|
||||
}
|
||||
|
||||
if(mx<px&&my==py){//鼠标在x轴负方向
|
||||
angle = 270;
|
||||
}
|
||||
|
||||
if(mx<px&&my<py){//鼠标在第二象限
|
||||
angle = 360 - angle;
|
||||
}
|
||||
return angle;
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
225
src/views/jlmap3d/drive/drivecontrol/toprightpane.vue
Normal file
225
src/views/jlmap3d/drive/drivecontrol/toprightpane.vue
Normal file
@ -0,0 +1,225 @@
|
||||
<template>
|
||||
<div style="width:25%;height:100%;position:absolute;left:25%;">
|
||||
|
||||
<div id="passlight" class="panebutton2" style="top:1%;left:1%;">
|
||||
<img class="buttonimg2" :src="zuoimg" />
|
||||
<img class="buttonimg2" :src="niuimg" :style="{transform:passlighttf}" @touchstart='passlighttouchstart' @touchmove='passlighttouchmove' @touchend='passlighttouchend'/>
|
||||
<div class="tfbutton" style="font-size:1px;top:5px;left:33px;">{{ $t('jlmap3d.close') }}</div>
|
||||
<div class="tfbutton" style="font-size:1px;top:25px;left:50px;">{{ $t('jlmap3d.open') }}</div>
|
||||
<div class="buttontext2">{{ $t('jlmap3d.roomLightingControl') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="siv" class="panebutton2" style="top:1%;left:20%;">
|
||||
<img class="buttonimg2" :src="zuoimg" />
|
||||
<img class="buttonimg2" :src="niuimg" :style="{transform:sivtf}" @touchstart='sivtouchstart' @touchmove='sivtouchmove' @touchend='sivtouchend'/>
|
||||
<div class="tfbutton" style="font-size:1px;top:5px;left:33px;">{{ $t('jlmap3d.close') }}</div>
|
||||
<div class="tfbutton" style="font-size:1px;top:25px;left:50px;">{{ $t('jlmap3d.open') }}</div>
|
||||
<div class="buttontext2">{{ $t('jlmap3d.sivsControl') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="driverlight" class="panebutton2" style="top:1%;left:40%;">
|
||||
<img class="buttonimg2" :src="zuoimg" />
|
||||
<img class="buttonimg2" :src="niuimg" :style="{transform:driverlighttf}" @touchstart='driverlighttouchstart' @touchmove='driverlighttouchmove' @touchend='driverlighttouchend'/>
|
||||
<div class="tfbutton" style="font-size:1px;top:5px;left:28px;">{{ $t('jlmap3d.shut') }}</div>
|
||||
<div class="tfbutton" style="font-size:1px;top:25px;left:50px;">{{ $t('jlmap3d.open') }}</div>
|
||||
<div class="buttontext2">{{ $t('jlmap3d.driverRoomLights') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="headlight" class="panebutton2" style="top:1%;left:60%;">
|
||||
<img class="buttonimg2" :src="zuoimg" />
|
||||
<img class="buttonimg2" :src="niuimg" :style="{transform:headlighttf}" @touchstart='headlighttouchstart' @touchmove='headlighttouchmove' @touchend='headlighttouchend'/>
|
||||
<div class="tfbutton" style="font-size:1px;top:5px;left:28px;">{{ $t('jlmap3d.shut') }}</div>
|
||||
<div class="tfbutton" style="font-size:1px;top:13px;left:50px;">{{ $t('jlmap3d.passingBeam') }}</div>
|
||||
<div class="tfbutton" style="font-size:1px;top:25px;left:50px">{{ $t('jlmap3d.distanceLight') }}</div>
|
||||
<div class="buttontext2">{{ $t('jlmap3d.headLamp') }}</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="sg" class="panebutton" style="bottom:1%;left:1%;" @tap="sgclink">
|
||||
<img class="buttonimg" :src="sgimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.electricGongSheng') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="jg" class="panebutton" style="bottom:1%;left:20%;" @tap="jgclick">
|
||||
<img class="buttonimg" :src="jgimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.pantographFall') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="sl" class="panebutton" style="bottom:1%;left:40%;" @tap="slclick">
|
||||
<img class="buttonimg" :src="slimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.lampButton') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="atp" class="panebutton" style="bottom:1%;left:60%;" @tap="atpclick">
|
||||
<img class="buttonimg" :src="atpimg" />
|
||||
<div class="buttontext">{{ $t('jlmap3d.removalATP') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="staymode" class="panebutton2" style="bottom:1%;left:80%;">
|
||||
<img class="buttonimg2" :src="zuoimg" />
|
||||
<img class="buttonimg2" :src="niuimg" :style="{transform:toutransform}" @touchstart='stopmodetouchstart' @touchmove='stopmodetouchmove' @touchend='stopmodetouchend'/>
|
||||
<div class="tfbutton" style="top:25px;left:1px;">{{ $t('jlmap3d.infliction') }}</div>
|
||||
<div class="tfbutton" style="top:5px;left:25px;">{{ $t('jlmap3d.mesoPosition') }}</div>
|
||||
<div class="tfbutton" style="top:25px;left:50px;">{{ $t('jlmap3d.remission') }}</div>
|
||||
<div class="buttontext2">{{ $t('jlmap3d.parkingBrakeMode') }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue';
|
||||
import { sendSimulationCommand } from '@/api/simulation.js';
|
||||
|
||||
export default {
|
||||
name: 'TopRightPane',
|
||||
components: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
move:0,
|
||||
movex:"20%",
|
||||
apoimg:"",
|
||||
sgimg:"/static/jl3d/control/redz.png",
|
||||
jgimg:"/static/jl3d/control/greenz.png",
|
||||
atpimg:"/static/jl3d/control/atp.png",
|
||||
slimg:"/static/jl3d/control/gray.png",
|
||||
zuoimg:"/static/jl3d/control/zuo.png",
|
||||
niuimg:"/static/jl3d/control/niu.png",
|
||||
toutransform:"rotate(0deg)",
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
computed: {
|
||||
group() {
|
||||
return this.$store.state.app.group;
|
||||
},
|
||||
code() {
|
||||
return this.$store.state.app.code;
|
||||
},
|
||||
traincode() {
|
||||
return this.$store.state.app.driverTrain;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
topstate : function(tops){
|
||||
if(tops.atpCutOff == true){
|
||||
|
||||
}else{
|
||||
|
||||
}
|
||||
},
|
||||
topcontrol : function(){
|
||||
|
||||
},
|
||||
showmsg:function(data){
|
||||
wx.showToast({
|
||||
title: data,
|
||||
icon: 'loading',
|
||||
duration: 2000
|
||||
});
|
||||
},
|
||||
showcontrolmsg:function(data,callback){
|
||||
this.controlmsg = data;
|
||||
this.msgshow = true;
|
||||
callback = callback || function(){
|
||||
this.setData();
|
||||
};
|
||||
setTimeout( callback.bind(this),2000);
|
||||
},
|
||||
stopmodetouchstart:function(e){
|
||||
// let command ={
|
||||
// code:this.traincode,
|
||||
// operation:"607",
|
||||
// type:"07",
|
||||
// param:""
|
||||
// };
|
||||
// command.param = this.touchstate;
|
||||
// sendSimulationCommand(this.group,command).then(netdata => {
|
||||
// if(netdata.data == true){
|
||||
this.touchcontrol = true;
|
||||
// }
|
||||
// });
|
||||
},
|
||||
stopmodetouchmove:function(e){//finger move 触发
|
||||
if(this.touchcontrol == true){
|
||||
this.getAngle(e.changedTouches[0].clientX,e.changedTouches[0].clientY);
|
||||
}
|
||||
},
|
||||
stopmodetouchend:function(e){
|
||||
this.touchcontrol = false;
|
||||
},
|
||||
getAngle:function(mx,my){
|
||||
//圆心坐标
|
||||
let px=140;
|
||||
let py=510;
|
||||
let x = Math.abs(px-mx);
|
||||
let y = Math.abs(py-my);
|
||||
let z = Math.sqrt(Math.pow(x,2)+Math.pow(y,2));
|
||||
let cos = y/z;
|
||||
let radina = Math.acos(cos);//用反三角函数求弧度
|
||||
let angle = Math.floor(180/(Math.PI/radina));//将弧度转换成角度
|
||||
|
||||
if(mx>px&&my>py){//鼠标在第四象限
|
||||
angle = 180 - angle;
|
||||
}
|
||||
|
||||
if(mx==px&&my>py){//鼠标在y轴负方向上
|
||||
angle = 180;
|
||||
}
|
||||
|
||||
if(mx>px&&my==py){//鼠标在x轴正方向上
|
||||
angle = 90;
|
||||
}
|
||||
|
||||
if(mx<px&&my>py){//鼠标在第三象限
|
||||
angle = 180+angle;
|
||||
}
|
||||
|
||||
if(mx<px&&my==py){//鼠标在x轴负方向
|
||||
angle = 270;
|
||||
}
|
||||
|
||||
if(mx<px&&my<py){//鼠标在第二象限
|
||||
angle = 360 - angle;
|
||||
}
|
||||
if(angle<338 && angle>219){
|
||||
|
||||
if(angle<245 && angle>219){
|
||||
this.toutransform = "rotate(305deg)";
|
||||
}else if(angle<295 && angle>245){
|
||||
this.toutransform = "rotate(359deg)";
|
||||
}else if(angle<338 && angle>295){
|
||||
this.toutransform = "rotate(412deg)";
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
sgclink: function (e){
|
||||
//console.log("升弓");
|
||||
},
|
||||
jgclick: function (e){
|
||||
//console.log("降弓");
|
||||
},
|
||||
slclick: function (e){
|
||||
//console.log("试灯");
|
||||
},
|
||||
atpclick: function (e){
|
||||
//console.log("atp");
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
@ -27,7 +27,7 @@
|
||||
<Drive-Mmi v-if="mmishow" ref="mmiui" />
|
||||
|
||||
<Drive-Tms v-if="mmishow" />
|
||||
|
||||
<Drive-Control v-if="dcontrolshow" ref="dcontrol"/>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@ -51,13 +51,14 @@ import { JLmapDriving } from '@/jlmap3d/jl3ddrive/jl3ddrive';
|
||||
|
||||
import DriveMmi from '@/views/jlmap3d/drive/sceneview/mmiview';
|
||||
import DriveTms from '@/views/jlmap3d/drive/sceneview/tmsview';
|
||||
|
||||
import DriveControl from '@/views/jlmap3d/drive/drivecontrol/drivecontrol';
|
||||
var train;
|
||||
export default {
|
||||
name: 'Jl3dDrive',
|
||||
components: {
|
||||
DriveMmi,
|
||||
DriveTms
|
||||
DriveTms,
|
||||
DriveControl
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -77,7 +78,8 @@ export default {
|
||||
mmishow: false,
|
||||
showbuttonmsg: this.$t('jlmap3d.trainInstrumentationDisplay'),
|
||||
trainnum: '',
|
||||
stoptimes: ''
|
||||
stoptimes: '',
|
||||
dcontrolshow: false,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -154,7 +156,7 @@ export default {
|
||||
|
||||
mounted() {
|
||||
this.mmishow = true;
|
||||
|
||||
window.datanew = this.datanew;
|
||||
// this.$refs.mmiui.init();
|
||||
},
|
||||
methods: {
|
||||
@ -236,6 +238,9 @@ export default {
|
||||
}
|
||||
|
||||
},
|
||||
datanew(){
|
||||
this.dcontrolshow = true;
|
||||
},
|
||||
cctvplane() {
|
||||
if (this.cctvshow == true) {
|
||||
this.cctvbuttonmsg = this.$t('jlmap3d.surveillanceHidden');
|
||||
|
@ -341,7 +341,7 @@ export default {
|
||||
height:333px;
|
||||
background: black;
|
||||
position:absolute;
|
||||
bottom:0;
|
||||
bottom:160px;
|
||||
}
|
||||
.meter{
|
||||
width:60%;
|
||||
|
@ -47,7 +47,7 @@ export default {
|
||||
background-size:100% 100%;
|
||||
background-image:url('/static/jl3d/tms.png');
|
||||
position:absolute;
|
||||
bottom:0;
|
||||
bottom:160px;
|
||||
right:0;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user