Merge remote-tracking branch 'origin/test'
@ -29,10 +29,10 @@ export function sendSimulationCommand(group, memberId, type, data) {
|
||||
});
|
||||
}
|
||||
/** 获取仿真成员列表 */
|
||||
export function getMemberListCommon(group,role) {
|
||||
export function getMemberListCommon(group, role) {
|
||||
|
||||
if(!role){
|
||||
role = "";
|
||||
if (!role) {
|
||||
role = '';
|
||||
}
|
||||
return request({
|
||||
url: `/common/simulation/${group}/members?role=${role}`,
|
||||
@ -96,3 +96,18 @@ export function simulationStart(group) {
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
/** 获取存在的仿真列表 */
|
||||
export function getExistSimulationList(params) {
|
||||
return request({
|
||||
url: `/common/simulation/list`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
/** 获取仿真用户信息 */
|
||||
export function getSimulationUserInfo(id) {
|
||||
return request({
|
||||
url: `/common/simulation/${id}/users`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -497,3 +497,11 @@ export function updateRunlevelDistance(mapId) {
|
||||
});
|
||||
}
|
||||
|
||||
// 更新模板运行图的信息
|
||||
export function updateTemplateRunPlan (data) {
|
||||
return request({
|
||||
url: `/api/runPlan/template/update`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
@ -163,22 +163,22 @@ export function cancelReplaceBg(group) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 分页查询存在的仿真 */
|
||||
export function getExistingSimulation(params) {
|
||||
return request({
|
||||
url: `/manage/simulation/exists`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除存在的仿真 */
|
||||
export function deleteExistingSimulation(group) {
|
||||
return request({
|
||||
url: `/manage/simulation/${group}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
// /** 分页查询存在的仿真 */
|
||||
// export function getExistingSimulation(params) {
|
||||
// return request({
|
||||
// url: `/manage/simulation/exists`,
|
||||
// method: 'get',
|
||||
// params
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// /** 删除存在的仿真 */
|
||||
// export function deleteExistingSimulation(group) {
|
||||
// return request({
|
||||
// url: `/manage/simulation/${group}`,
|
||||
// method: 'delete'
|
||||
// });
|
||||
// }
|
||||
|
||||
/** 获取任务录制的所有动作(新版)*/
|
||||
export function getScriptAllAction(group) {
|
||||
@ -228,6 +228,23 @@ export function handlerIbpEvent(group, button, stationCode, buttonCode) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 处理ibp盘事件(按下) */
|
||||
|
||||
export function handleIbpPress(group, stationCode, buttonCode) {
|
||||
return request({
|
||||
url: `/simulation/${group}/ibp/press/${stationCode}/${buttonCode}`,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
/** 处理ibp盘事件(松开) */
|
||||
|
||||
export function handleIbpRelease(group, stationCode, buttonCode) {
|
||||
return request({
|
||||
url: `/simulation/${group}/ibp/release/${stationCode}/${buttonCode}`,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
/** 预览脚本仿真(新版)*/
|
||||
export function scriptDraftRecordNotifyNew(scriptId) {
|
||||
return request({
|
||||
|
BIN
src/assets/ibp_images/blue_button_pressed.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
src/assets/ibp_images/blue_button_pressed_on.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
src/assets/ibp_images/gray_button_pressed.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
src/assets/ibp_images/gray_button_pressed_on.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
src/assets/ibp_images/green_button_pressed.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
src/assets/ibp_images/green_button_pressed_on.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
src/assets/ibp_images/red_button_pressed.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
src/assets/ibp_images/red_button_pressed_on.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
src/assets/ibp_images/yellow_button_pressed.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
src/assets/ibp_images/yellow_button_pressed_on.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
@ -377,8 +377,10 @@ export default {
|
||||
query(queryData) {
|
||||
this.queryData = queryData;
|
||||
// this.pageIndex = 1;
|
||||
if (!this.queryList.paginationHiden) {
|
||||
this.queryData[this.currentpagerConfig.pageSize] = this.pageSize;
|
||||
this.queryData[this.currentpagerConfig.pageIndex] = this.pageIndex;
|
||||
}
|
||||
// this.queryList.reload();
|
||||
this.choose = null;
|
||||
this.commitQuery();
|
||||
@ -512,6 +514,7 @@ export default {
|
||||
self.enableQuery();
|
||||
return;
|
||||
}
|
||||
delete this.queryData.undefined;
|
||||
if (this.queryList.query instanceof Function) {
|
||||
this.queryList.query(this.queryData).then(response => {
|
||||
self.enableQuery();
|
||||
@ -519,7 +522,7 @@ export default {
|
||||
this.queryList.afterQuery(response.data);
|
||||
}
|
||||
const resultData = response.data;
|
||||
this.$set(this.queryList, 'data', resultData.list);
|
||||
this.$set(this.queryList, 'data', this.queryList.paginationHiden ? resultData : resultData.list);
|
||||
this.$set(this.queryList, 'total', resultData.total);
|
||||
if (resultData.pageNum) {
|
||||
this.pageIndex = resultData.pageNum;
|
||||
|
@ -55,6 +55,7 @@ export default {
|
||||
publisherId: 'Publisher Id',
|
||||
publishTime: 'Time',
|
||||
publishVersion: 'Version',
|
||||
publishDescription:'Description',
|
||||
lessonDeleteBtn: 'Delete',
|
||||
durationMinutes: ' minutes',
|
||||
copyRunPlan: 'Copy run plan',
|
||||
|
@ -157,6 +157,7 @@ export default {
|
||||
strLengthNotExceed50: 'No more than 50 characters',
|
||||
|
||||
pleaseEnterMapName: 'Please enter a map name',
|
||||
pleaseEnterDescription:'Please enter description',
|
||||
pleaseChooseSkinCode: 'Please choose skin style',
|
||||
pleaseChooseLineCode:'Please Choose line type',
|
||||
pleaseSelectMapSource: 'Please select the map source',
|
||||
|
@ -57,6 +57,7 @@ export default {
|
||||
addEveryRunjihuaSuccess: '加载计划创建通用排班计划成功!',
|
||||
publisherId: '发布人id',
|
||||
publishTime: '时间',
|
||||
publishDescription:'描述',
|
||||
publishVersion: '版本',
|
||||
lessonDeleteBtn: '删除',
|
||||
durationMinutes: '分钟',
|
||||
|
@ -156,6 +156,7 @@ export default {
|
||||
pleaseSelectCity: '请选择城市',
|
||||
|
||||
pleaseEnterMapName: '请输入地图名称',
|
||||
pleaseEnterDescription:'请输入描述',
|
||||
pleaseChooseSkinCode: '请选择皮肤风格',
|
||||
pleaseChooseLineCode:'请选择线路类型',
|
||||
pleaseSelectMapSource: '请选择地图来源',
|
||||
|
@ -17,11 +17,11 @@ deviceRender[deviceType.SquareButton] = {
|
||||
};
|
||||
|
||||
/** WarnButton渲染配置*/
|
||||
deviceRender[deviceType.WarnButton] = {
|
||||
_type: deviceType.WarnButton,
|
||||
zlevel: 1,
|
||||
z: 4
|
||||
};
|
||||
// deviceRender[deviceType.WarnButton] = {
|
||||
// _type: deviceType.WarnButton,
|
||||
// zlevel: 1,
|
||||
// z: 4
|
||||
// };
|
||||
|
||||
/** Arrow渲染配置*/
|
||||
deviceRender[deviceType.Arrow] = {
|
||||
|
@ -1,18 +1,18 @@
|
||||
const deviceType = {
|
||||
IbpText: 'IbpText',
|
||||
SquareButton: 'SquareButton',
|
||||
Arrow: 'Arrow',
|
||||
TipBox: 'TipBox',
|
||||
SquareButton: 'SquareButton', // 方形按钮
|
||||
Arrow: 'Arrow', // 箭头
|
||||
TipBox: 'TipBox', // 提示框
|
||||
Background: 'Background',
|
||||
CircularLamp: 'CircularLamp',
|
||||
CircularLamp: 'CircularLamp', // 圆形灯
|
||||
IbpLine: 'IbpLine',
|
||||
AppendageBox: 'AppendageBox',
|
||||
Alarm: 'Alarm',
|
||||
Elevator: 'Elevator',
|
||||
Key: 'Key',
|
||||
TeleTerminal: 'TeleTerminal',
|
||||
Clock: 'Clock',
|
||||
RotateTip: 'RotateTip',
|
||||
AppendageBox: 'AppendageBox', // 扶梯框
|
||||
Alarm: 'Alarm', // 蜂鸣器
|
||||
Elevator: 'Elevator', // 电梯
|
||||
Key: 'Key', // 钥匙
|
||||
TeleTerminal: 'TeleTerminal', // 电话端子
|
||||
Clock: 'Clock', // 数字时钟
|
||||
RotateTip: 'RotateTip', // 旋转提示
|
||||
CheckBox: 'CheckBox'
|
||||
};
|
||||
|
||||
|
@ -199,13 +199,11 @@ class IbpPan {
|
||||
}
|
||||
setDeviceStatus(val) {
|
||||
const deviceList = Object.values(this.ibpDevice);
|
||||
deviceList.forEach(elem =>{
|
||||
for (var key in val) {
|
||||
const mean = elem.model.mean || '';
|
||||
if (mean.toUpperCase() === key.toUpperCase()) {
|
||||
const state = {};
|
||||
state[key] = val[key];
|
||||
elem.instance.setStatus(state);
|
||||
deviceList.forEach(device =>{
|
||||
for (var key in val.statusMap) {
|
||||
if (device.model.code === key) {
|
||||
const state = {...val.statusMap[key]}
|
||||
device.instance.setStatus instanceof Function && device.instance.setStatus(state);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -154,7 +154,7 @@ class MouseController extends Eventful {
|
||||
if (this.eventTarget.grouper) {
|
||||
if (this._target && this._target._subType == 'buttonImag') {
|
||||
// this.targetView = this.checkEvent(e);
|
||||
this._targetView && this._targetView.eventTarget.close();
|
||||
this._targetView && this._targetView.eventTarget.release();
|
||||
this.boundingRect = {};
|
||||
}
|
||||
this._target = null;
|
||||
@ -232,10 +232,10 @@ class MouseController extends Eventful {
|
||||
} else {
|
||||
this.$ibp.deleteCheckBox('check_box');
|
||||
}
|
||||
if (this.eventTarget.grouper) {
|
||||
if (this.eventTarget && this.eventTarget.grouper) {
|
||||
if (e.target._subType == 'buttonImag') {
|
||||
this.targetView = this.checkEvent(e);
|
||||
this.targetView.eventTarget.open();
|
||||
this.targetView.eventTarget.press();
|
||||
this._target = e.target;
|
||||
this._targetView = this.targetView;
|
||||
this.boundingRect = this.eventTarget.grouper.getBoundingRect();
|
||||
@ -273,7 +273,7 @@ class MouseController extends Eventful {
|
||||
const x = e.event.x + this.$ibp.$options.offsetX;
|
||||
const y = e.event.y + this.$ibp.$options.offsetY;
|
||||
if (!(x <= this.boundingRect.x2 && x >= this.boundingRect.x1 && y <= this.boundingRect.y2 && y >= this.boundingRect.y1)) {
|
||||
this.targetView.eventTarget.close();
|
||||
this.targetView.eventTarget.release();
|
||||
}
|
||||
}
|
||||
if (!this._moveOnMouseMove || !this._dragging || !this.isAllowDragging) {
|
||||
|
@ -46,4 +46,14 @@ export default class alarm extends Group {
|
||||
this.model.point.x+=dx;
|
||||
this.model.point.y+=dy;
|
||||
}
|
||||
|
||||
setStatus(state) {
|
||||
// domid还是写在了alarm里面 待优化
|
||||
const audioDom = document.querySelector('#buzzer');
|
||||
if (state && state.on) {
|
||||
audioDom.play().catch(e=>{throw e})
|
||||
} else if (state && !state.on) {
|
||||
audioDom.pause()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,33 +2,55 @@ import Group from 'zrender/src/container/Group';
|
||||
import Image from 'zrender/src/graphic/Image';
|
||||
import redButtonPic from '@/assets/ibp_images/red_button.png';
|
||||
import redButtonPicOn from '@/assets/ibp_images/red_button_on.png';
|
||||
import redButtonPicPressed from '@/assets/ibp_images/red_button_pressed.png';
|
||||
import redButtonPicPressedOn from '@/assets/ibp_images/red_button_pressed_on.png';
|
||||
import greenButtonPicOn from '@/assets/ibp_images/green_button_on.png';
|
||||
import greenButtonPic from '@/assets/ibp_images/green_button.png';
|
||||
import greenButtonPicPressedOn from '@/assets/ibp_images/green_button_pressed_on.png';
|
||||
import greenButtonPicPressed from '@/assets/ibp_images/green_button_pressed.png';
|
||||
import blueButtonPic from '@/assets/ibp_images/blue_button.png';
|
||||
import blueButtonPicOn from '@/assets/ibp_images/blue_button_on.png';
|
||||
import blueButtonPicPressed from '@/assets/ibp_images/blue_button_pressed.png';
|
||||
import blueButtonPicPressedOn from '@/assets/ibp_images/blue_button_pressed_on.png';
|
||||
import yellowButtonPic from '@/assets/ibp_images/yellow_button.png';
|
||||
import yellowButtonPicOn from '@/assets/ibp_images/yellow_button_on.png';
|
||||
import yellowButtonPicPressed from '@/assets/ibp_images/yellow_button_pressed.png';
|
||||
import yellowButtonPicPressedOn from '@/assets/ibp_images/yellow_button_pressed_on.png';
|
||||
import grayButtonPic from '@/assets/ibp_images/gray_button.png';
|
||||
import grayButtonPicOn from '@/assets/ibp_images/gray_button_on.png';
|
||||
import grayButtonPicPressed from '@/assets/ibp_images/gray_button_pressed.png';
|
||||
import grayButtonPicPressedOn from '@/assets/ibp_images/gray_button_pressed_on.png';
|
||||
|
||||
// on/off 代表是否亮灯
|
||||
// pressed 代表是否按下
|
||||
const colors = new Map([
|
||||
['red_on', [redButtonPicOn]],
|
||||
['red_off', [redButtonPic]],
|
||||
['green_on', [greenButtonPicOn]],
|
||||
['green_off', [greenButtonPic]],
|
||||
['blue_on', [blueButtonPicOn]],
|
||||
['blue_off', [blueButtonPic]],
|
||||
['yellow_on', [yellowButtonPicOn]],
|
||||
['yellow_off', [yellowButtonPic]],
|
||||
['gray_on', [grayButtonPicOn]],
|
||||
['gray_off', [grayButtonPic]]
|
||||
['red_on', redButtonPicOn],
|
||||
['red_off', redButtonPic],
|
||||
['red_pressed_on', redButtonPicPressedOn],
|
||||
['red_pressed_off', redButtonPicPressed],
|
||||
['green_on', greenButtonPicOn],
|
||||
['green_off', greenButtonPic],
|
||||
['green_pressed_on', greenButtonPicPressedOn],
|
||||
['green_pressed_off', greenButtonPicPressed],
|
||||
['blue_on', blueButtonPicOn],
|
||||
['blue_off', blueButtonPic],
|
||||
['blue_pressed_on', blueButtonPicPressedOn],
|
||||
['blue_pressed_off', blueButtonPicPressed],
|
||||
['yellow_on', yellowButtonPicOn],
|
||||
['yellow_off', yellowButtonPic],
|
||||
['yellow_pressed_on', yellowButtonPicPressedOn],
|
||||
['yellow_pressed_off', yellowButtonPicPressed],
|
||||
['gray_on', grayButtonPicOn],
|
||||
['gray_off', grayButtonPic],
|
||||
['gray_pressed_on', grayButtonPicPressedOn],
|
||||
['gray_pressed_off', grayButtonPicPressed],
|
||||
]);
|
||||
export default class button extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this._type = device.model._type;
|
||||
this._code = device.model.code;
|
||||
this.model = device.model;
|
||||
this.model = {...device.model, pressed: false};
|
||||
this.zlevel = device.model.zlevel;
|
||||
this.z = device.model.z;
|
||||
this.create();
|
||||
@ -64,8 +86,8 @@ export default class button extends Group {
|
||||
}
|
||||
|
||||
getImagePic() {
|
||||
const color = colors.get(`${this.model.color}_${this.model.status}`);
|
||||
return color[0];
|
||||
const color = colors.get(`${this.model.color}${this.model.pressed ? '_pressed' : ''}_${this.model.status}`);
|
||||
return color;
|
||||
}
|
||||
|
||||
// 设置按钮状态
|
||||
@ -86,50 +108,31 @@ export default class button extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
// onmousedown() {
|
||||
// console.log('按下');
|
||||
// this.mouse = true;
|
||||
// this.model.status = 'on';
|
||||
// }
|
||||
// onmousemove(e) {
|
||||
// if (this.mouse) {
|
||||
// console.log(e, '元素移动');
|
||||
// }
|
||||
// }
|
||||
// onmouseup() {
|
||||
// if (this.mouse) {
|
||||
// console.log('抬起');
|
||||
// this.model.status = 'off';
|
||||
// this.mouse = false;
|
||||
// }
|
||||
// }
|
||||
|
||||
onclick() {
|
||||
// if (!this.model.draggable) {
|
||||
// switch (this.model.status) {
|
||||
// case 'off': {
|
||||
// this.open();
|
||||
// this.model.status='on';
|
||||
// break;
|
||||
// }
|
||||
// case 'on': {
|
||||
// this.close();
|
||||
// this.model.status='off';
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
setStatus(model) {
|
||||
model.on ? this.open() : this.close();
|
||||
}
|
||||
|
||||
// 关闭
|
||||
close() {
|
||||
const color = colors.get(`${this.model.color}_off`);
|
||||
this.imageBg.setStyle({image: color[0]});
|
||||
this.model.status = 'off';
|
||||
this.imageBg.setStyle({image: this.getImagePic()});
|
||||
}
|
||||
// 开放
|
||||
open() {
|
||||
const color = colors.get(`${this.model.color}_on`);
|
||||
this.imageBg.setStyle({image: color[0]});
|
||||
this.model.status = 'on';
|
||||
this.imageBg.setStyle({image: this.getImagePic()});
|
||||
}
|
||||
// 按下
|
||||
press() {
|
||||
this.model.pressed = true;
|
||||
this.imageBg.setStyle({image: this.getImagePic()});
|
||||
}
|
||||
// 松开
|
||||
release() {
|
||||
this.model.pressed = false;
|
||||
this.imageBg.setStyle({image: this.getImagePic()});
|
||||
}
|
||||
|
||||
setModel(dx, dy) {
|
||||
this.model.point.x += dx;
|
||||
this.model.point.y += dy;
|
||||
|
@ -2,6 +2,9 @@ import Group from 'zrender/src/container/Group';
|
||||
import Circle from 'zrender/src/graphic/shape/Circle';
|
||||
import {IbpShowCondition} from '@/scripts/ConstDic';
|
||||
|
||||
const ACTIVE_COLOR = '#D8FCF2';
|
||||
const INACTIVE_COLOR = '#332C22';
|
||||
|
||||
export default class CircularLamp extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
@ -41,11 +44,7 @@ export default class CircularLamp extends Group {
|
||||
this.lamp.setStyle({fill: color});
|
||||
}
|
||||
setStatus(state) {
|
||||
if (state.xxkcLight || state.sxkcLight || state.jjtcLight || state.xxgmLight || state.xxkmLight || state.sxgmLight || state.sxkmLight ) {
|
||||
this.setCircularLampColor('#D8FCF2');
|
||||
} else {
|
||||
this.setCircularLampColor('#332C22');
|
||||
}
|
||||
this.setCircularLampColor( state.on ? ACTIVE_COLOR : INACTIVE_COLOR );
|
||||
}
|
||||
setModel(dx, dy) {
|
||||
this.model.point.x += dx;
|
||||
@ -53,9 +52,9 @@ export default class CircularLamp extends Group {
|
||||
}
|
||||
setDefaultStatus(obj) {
|
||||
if (obj && obj.defaultStatus === 'close') {
|
||||
this.setCircularLampColor('#332C22');
|
||||
this.setCircularLampColor(ACTIVE_COLOR);
|
||||
} else if (obj && obj.defaultStatus === 'open') {
|
||||
this.setCircularLampColor('#D8FCF2');
|
||||
this.setCircularLampColor(INACTIVE_COLOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -163,13 +163,14 @@ export default class key extends Group {
|
||||
}
|
||||
}
|
||||
setStatus(model) {
|
||||
if (model.xxys || model.sxys) {
|
||||
if (model.on) {
|
||||
this.keyImage.setStyle({image: keyPicOn});
|
||||
this.model.status = 'on';
|
||||
} else {
|
||||
this.keyImage.setStyle({image: keyPic});
|
||||
this.model.status = 'off';
|
||||
}
|
||||
|
||||
}
|
||||
setModel(dx, dy) {
|
||||
this.model.point.x += dx;
|
||||
|
@ -67,6 +67,52 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
//let camera = SetCamera(dom);
|
||||
// 定义场景(渲染容器)
|
||||
let scene = SetScene(project);
|
||||
scene.background = new THREE.CubeTextureLoader()
|
||||
.setPath( 'https://oss.joylink.club/oss/joylink/PICTURE/2021-06-15/' )
|
||||
.load( [ '18-75117.jpg', '17-78286.jpg', '19-62689.jpg', '15-95146.jpg', '16-99183.jpg', '14-94914.jpg' ] );
|
||||
|
||||
let meshCloud;
|
||||
var loader = new THREE.TextureLoader();
|
||||
// 加载一个资源
|
||||
loader.load(
|
||||
// 资源URL
|
||||
JL3D_LOCAL_STATIC+"/jl3d/railway/c.png",
|
||||
|
||||
// onLoad回调
|
||||
function ( texture ) {
|
||||
|
||||
let materialCloud = new THREE.MeshPhongMaterial({
|
||||
transparent:true,
|
||||
map:texture,
|
||||
});
|
||||
let planeCloud = new THREE.Mesh( new THREE.PlaneGeometry( 64, 64 ) );
|
||||
let geoCloud = new THREE.Geometry();
|
||||
|
||||
for ( var i = 0; i < 20; i++ ) {
|
||||
|
||||
planeCloud.position.x = 1000 - 2000 * Math.random();
|
||||
planeCloud.position.y = Math.random() * 500+100 ;
|
||||
planeCloud.position.z = 1000 - 2000 * Math.random();
|
||||
planeCloud.rotation.z = Math.random() * Math.PI*i;
|
||||
planeCloud.scale.x = planeCloud.scale.y = Math.random() * Math.random() * 5+0.5;
|
||||
planeCloud.lookAt(new THREE.Vector3( 0, 0, 0 ));
|
||||
THREE.GeometryUtils.merge( geoCloud, planeCloud );
|
||||
|
||||
}
|
||||
|
||||
meshCloud = new THREE.Mesh( geoCloud, materialCloud );
|
||||
meshCloud.renderOrder = 8;
|
||||
camera.add( meshCloud );
|
||||
},
|
||||
|
||||
// 目前暂不支持onProgress的回调
|
||||
undefined,
|
||||
|
||||
// onError回调
|
||||
function ( err ) {
|
||||
console.error( 'An error happened.' );
|
||||
}
|
||||
);
|
||||
|
||||
let speed = 0;
|
||||
|
||||
@ -113,7 +159,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
// 地图模型数据
|
||||
let mapdata = new Jl3ddata();
|
||||
|
||||
let camera = new THREE.PerspectiveCamera(70, dom.clientWidth/dom.clientHeight, 0.1, 400000);
|
||||
let camera = new THREE.PerspectiveCamera(70, dom.clientWidth/dom.clientHeight, 0.1, 4000);
|
||||
camera.position.set( 0, 0, 0 );
|
||||
camera.aspect = window.innerWidth / window.innerHeight;
|
||||
camera.updateProjectionMatrix();
|
||||
@ -201,7 +247,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
// 根据相机渲染场景
|
||||
renderer.render(scene, camera);
|
||||
//cctv渲染
|
||||
|
||||
meshCloud.rotation.y += 0.0001;
|
||||
if(scope.cctvswitch == true){
|
||||
renderercctv.render(scene,cameracctv);
|
||||
}
|
||||
|
@ -112,6 +112,7 @@ class MouseController extends Eventful {
|
||||
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
|
||||
} else if (e.which === 3 && this._zoomOnMouseWheel && this._previewOrMapDraw) {
|
||||
this.handleMouseMoveRight({x: e.offsetX, y: e.offsetY});
|
||||
this.isMoveRight = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -121,10 +122,23 @@ class MouseController extends Eventful {
|
||||
this._dragging = false;
|
||||
}
|
||||
if (this._zoomOnMouseWheel && this.$jmap.mapDevice['check_box'] && this._previewOrMapDraw ) {
|
||||
console.log(this.isMoveRight, 'mouseup');
|
||||
this.eventTarget = this.$jmap.mapDevice['check_box'].instance;
|
||||
this.handleBoundingRect(this.eventTarget);
|
||||
var em = this.checkEvent(e);
|
||||
let em;
|
||||
if (!this.isMoveRight) {
|
||||
em = this.checkEvent(e);
|
||||
} else {
|
||||
em = {
|
||||
clientX:e.offsetX,
|
||||
clientY:e.offsetY,
|
||||
eventTarget:this.eventTarget,
|
||||
deviceCode:'check_box',
|
||||
deviceType:'CheckBox'
|
||||
};
|
||||
}
|
||||
this.trigger(this.events.Selected, em);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -157,8 +171,13 @@ class MouseController extends Eventful {
|
||||
}
|
||||
|
||||
contextmenu(e) {
|
||||
// 判断是否正在右键拖选 若不是则弹出右键菜单
|
||||
if (!this.isMoveRight) {
|
||||
var em = this.checkEvent(e);
|
||||
this.trigger(this.events.Contextmenu, em);
|
||||
} else {
|
||||
this.isMoveRight = false;
|
||||
}
|
||||
}
|
||||
|
||||
moveEvent(e) {
|
||||
|
@ -131,6 +131,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MouseEvent } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'FaultChoose',
|
||||
components: {
|
||||
@ -191,7 +192,7 @@ export default {
|
||||
watch:{
|
||||
'$store.state.menuOperation.selectedCount':function(em) {
|
||||
const device = this.$store.state.menuOperation.selected;
|
||||
if (device && device.code && device.deviceType === 'TRAIN' && this.$store.state.training.prdType === '02') {
|
||||
if (device && device.code && device.deviceType === 'TRAIN' && this.$store.state.training.prdType === '02' && device._event === MouseEvent.left) {
|
||||
if (!this.dialogShow) {
|
||||
this.controlMode = 'edit';
|
||||
this.dialogShow = true;
|
||||
|
@ -683,7 +683,7 @@ export default {
|
||||
this.param.routeCodeList = routeCodeList;
|
||||
}
|
||||
if (this.cmdType == CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER || this.cmdType == CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER) {
|
||||
this.param = { stationCode: this.selectedObj.code };
|
||||
this.param = { stationCode: this.selectedObj.code || this.$store.state.map.showCentralizedStationCode };
|
||||
}
|
||||
if (this.cmdType == CMD.Section.CMD_SECTION_SET_LIMIT_SPEED || this.cmdType == CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED) {
|
||||
this.param.speedLimitValue = this.speedLimitValue;
|
||||
@ -863,14 +863,15 @@ export default {
|
||||
{ name: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menu, show: false },
|
||||
{ name: '自排全开', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menu, show: false },
|
||||
{ name: '自排全关', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menu, show: false }
|
||||
] : [{ name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
|
||||
{ name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' },
|
||||
{ name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, show:false, securityCommand: true },
|
||||
{ name: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menu, show: false },
|
||||
{ name: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menu, show: false },
|
||||
{ name: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menu, show: false },
|
||||
{ name: '自排全开', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menu, show: false },
|
||||
{ name: '自排全关', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menu, show: false }
|
||||
] : [
|
||||
// { name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false, disabledName: 'controlMode', mode: 'Center' },
|
||||
// { name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false, disabledName: 'controlMode', mode: 'None' },
|
||||
// { name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, show:false, securityCommand: true },
|
||||
// { name: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menu, show: false },
|
||||
// { name: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menu, show: false },
|
||||
// { name: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menu, show: false },
|
||||
// { name: '自排全开', cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menu, show: false },
|
||||
// { name: '自排全关', cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menu, show: false }
|
||||
];
|
||||
this.sectionParamList = [
|
||||
{ name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, show: false },
|
||||
|
@ -94,6 +94,11 @@ export default {
|
||||
handler: this.cancelDetainTrainAll,
|
||||
cmdType: CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '强制取消扣车',
|
||||
handler: this.cancelDetainTrainForce,
|
||||
cmdType:CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '设置跳停',
|
||||
handler: this.setJumpStop,
|
||||
@ -185,7 +190,7 @@ export default {
|
||||
label: 'PSL',
|
||||
handler: this.openPsl
|
||||
}
|
||||
]
|
||||
];
|
||||
|
||||
}
|
||||
},
|
||||
@ -309,8 +314,8 @@ export default {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
},
|
||||
// 打开PSL面板
|
||||
openPsl(){
|
||||
this.$refs.psl.doShow(this.selected)
|
||||
openPsl() {
|
||||
this.$refs.psl.doShow(this.selected);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -27,8 +27,10 @@ function getRouteInfo(to) {
|
||||
}
|
||||
const localLogin = process.env.VUE_APP_PRO == 'local' || process.env.VUE_APP_PRO == 'ntyl';
|
||||
loginPath = loginInfo[current_session] && !localLogin ? loginInfo[current_session].loginPath : whiteList[0];
|
||||
if (to.query.projectDevice && to.query.type) {
|
||||
if (to.query.projectDevice && to.query.type && loginPath.includes('?')) {
|
||||
loginPath = `${loginPath}&projectDevice=${to.query.projectDevice}&type=${to.query.type}`;
|
||||
} else if (to.query.projectDevice && to.query.type) {
|
||||
loginPath = `${loginPath}?projectDevice=${to.query.projectDevice}&type=${to.query.type}`;
|
||||
}
|
||||
return loginPath;
|
||||
}
|
||||
|
@ -129,8 +129,9 @@ export const IbpOperation = {
|
||||
SXKM: {operate: '10', event: 'SXKM', name: '上行屏蔽门开门'},
|
||||
XXYS: {operate: '09', event: 'XXYS', name: '下行钥匙'},
|
||||
SXYS: {operate: '11', event: 'SXYS', name: '上行钥匙'},
|
||||
PRERESET: {operate: '12', event: 'PRERESET', name: '计轴复位'},
|
||||
AXLE_RESET: {operate: '12', event: 'AXLE_RESET', name: '计轴复位'},
|
||||
AXLE_PRE_RESET: {operate: '13', event: 'AXLE_PRE_RESET', name: '计轴预复位'},
|
||||
PRERESET_Z: {operate: '14', event: 'PRERESET_Z', name: '计轴预复零'}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -891,15 +891,16 @@ const map = {
|
||||
updateStationStand: (state, status) => {
|
||||
const holdIndex = state.holdStandList.indexOf(status.code);
|
||||
const jumpIndex = state.jumpStandList.indexOf(status.code);
|
||||
if ((status.stationHoldTrain || status.centerHoldTrain) && holdIndex < 0) {
|
||||
state.holdStandList.push(status.code);
|
||||
} else if (!(status.stationHoldTrain && status.centerHoldTrain) && holdIndex > -1) {
|
||||
const device = state.mapDevice[status.code];
|
||||
if ((device.stationHoldTrain || device.centerHoldTrain) && holdIndex < 0) {
|
||||
state.holdStandList.push(device.code);
|
||||
} else if (!(device.stationHoldTrain && device.centerHoldTrain) && holdIndex > -1) {
|
||||
state.holdStandList.splice(holdIndex, 1);
|
||||
}
|
||||
state.holdStatus = state.holdStandList.length > 0;
|
||||
if ((status.assignSkip || status.allSkip) && jumpIndex < 0) {
|
||||
state.jumpStandList.push(status.code);
|
||||
} else if (!(status.assignSkip && status.allSkip) && jumpIndex > -1) {
|
||||
if ((device.assignSkip || device.allSkip) && jumpIndex < 0) {
|
||||
state.jumpStandList.push(device.code);
|
||||
} else if (!(device.assignSkip && device.allSkip) && jumpIndex > -1) {
|
||||
state.jumpStandList.splice(jumpIndex, 1);
|
||||
}
|
||||
state.jumpStatus = state.jumpStandList.length > 0;
|
||||
|
@ -2,11 +2,11 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线
|
||||
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线
|
||||
BASE_API = 'http://192.168.3.120:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.120:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
|
@ -1,17 +1,22 @@
|
||||
<template>
|
||||
<div id="textStatus" class="icon-box" :style="{top: offset+'px'}">
|
||||
<div class="textStatus" :style="{background: holdBackground}" @mouseenter="showHoldStatus" @mouseleave="hideHoldStatus">H</div>
|
||||
<div class="textStatus" :style="{background: jumpBackground}" @mouseenter="showJumpStatus" @mouseleave="hideJumpStatus">S</div>
|
||||
<div class="textStatus" style="cursor: pointer;" :style="{background: holdBackground}" @contextmenu="showHoldStationPop">H</div>
|
||||
<div class="textStatus" style="cursor: pointer;" :style="{background: jumpBackground}" @contextmenu="showJumpStationPop">S</div>
|
||||
<pop-tip v-show="popShow" :position="position" :tip="tip" />
|
||||
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="statusIcon" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopTip from '@/views/newMap/mapsystemNew/plugin/src/poptip';
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
|
||||
export default {
|
||||
name: 'StatusIcon',
|
||||
components: { PopTip },
|
||||
components: {
|
||||
PopTip,
|
||||
PopMenu
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
offset: 15,
|
||||
@ -19,7 +24,8 @@ export default {
|
||||
jumpBackground: '#807D8E',
|
||||
tip: '',
|
||||
position: {x: 0, y:0, align: 'top', textAlign:'left', fontNumber: 12},
|
||||
popShow: false
|
||||
popShow: false,
|
||||
menu: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -61,43 +67,56 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
showHoldStatus(e) {
|
||||
showHoldStationPop(e) {
|
||||
const point = {};
|
||||
point.x = e.clientX;
|
||||
point.y = e.clientY;
|
||||
const stationList = [];
|
||||
if (this.$store.state.map.holdStandList.length) {
|
||||
this.popShow = true;
|
||||
this.position.x = e.clientX;
|
||||
this.position.y = e.clientY;
|
||||
this.tip = '扣车提示:<br>';
|
||||
this.menu = [];
|
||||
this.$store.state.map.holdStandList.forEach(item => {
|
||||
const stand = this.$store.getters['map/getDeviceByCode'](item);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||
const dir = stand.right ? '上行站台' : '下行站台';
|
||||
if (stand) {
|
||||
this.tip = this.tip + station.name + ':<br>' + dir + '站台存在扣车命令<br>';
|
||||
}
|
||||
if (stationList.indexOf(station.code) === -1) {
|
||||
stationList.push(station.code);
|
||||
this.menu.push({
|
||||
label: station.name,
|
||||
code: station.code,
|
||||
handler: this.setCenter
|
||||
});
|
||||
}
|
||||
});
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
}
|
||||
},
|
||||
hideHoldStatus(e) {
|
||||
this.popShow = false;
|
||||
},
|
||||
showJumpStatus(e) {
|
||||
showJumpStationPop(e) {
|
||||
const point = {};
|
||||
point.x = e.clientX;
|
||||
point.y = e.clientY;
|
||||
if (this.$store.state.map.jumpStandList.length) {
|
||||
this.popShow = true;
|
||||
this.position.x = e.clientX;
|
||||
this.position.y = e.clientY;
|
||||
this.tip = '跳停提示:<br>';
|
||||
this.menu = [];
|
||||
const stationList = [];
|
||||
this.$store.state.map.jumpStandList.forEach(item => {
|
||||
const stand = this.$store.getters['map/getDeviceByCode'](item);
|
||||
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||
const dir = stand.right ? '上行站台' : '下行站台';
|
||||
if (stand) {
|
||||
this.tip = this.tip + station.name + ':<br>' + dir + '站台存在跳停命令<br>';
|
||||
}
|
||||
if (stationList.indexOf(station.code) === -1) {
|
||||
stationList.push(station.code);
|
||||
this.menu.push({
|
||||
label: station.name,
|
||||
code: station.code,
|
||||
handler: this.setCenter
|
||||
});
|
||||
}
|
||||
});
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
}
|
||||
},
|
||||
hideJumpStatus(e) {
|
||||
this.popShow = false;
|
||||
setCenter(val) {
|
||||
this.$jlmap && this.$jlmap.setCenter(val.code);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -105,7 +124,7 @@ export default {
|
||||
|
||||
<style scoped>
|
||||
.icon-box {
|
||||
z-index: 7;
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 120px;
|
||||
@ -127,4 +146,7 @@ export default {
|
||||
background: #807D8E;
|
||||
color: #C9A167;
|
||||
}
|
||||
.statusIcon {
|
||||
background: #ccc;
|
||||
}
|
||||
</style>
|
||||
|
@ -34,7 +34,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="['PRERESET', 'AXLE_PRE_RESET'].includes(form.mean)" label="关联区段" prop="sectionCode">
|
||||
<el-form-item v-if="'AXLE_PRE_RESET' === form.mean" label="关联区段" prop="sectionCode">
|
||||
<el-select v-model="form.sectionCode" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in sectionList"
|
||||
@ -74,7 +74,7 @@ export default {
|
||||
{ label: '报警切除', value: 'BJQC' },
|
||||
{ label: '下行屏蔽门开门', value: 'XXKM' },
|
||||
{ label: '上行屏蔽门开门', value: 'SXKM' },
|
||||
{ label: '计轴复位', value: 'PRERESET' },
|
||||
{ label: '计轴复位', value: 'AXLE_RESET' },
|
||||
{ label: '计轴预复位', value: 'AXLE_PRE_RESET' },
|
||||
{ label: '计轴预复零', value: 'PRERESET_Z' },
|
||||
],
|
||||
|
@ -19,7 +19,7 @@ import IbpPan from '@/ibp/ibpPan';
|
||||
import { parser } from '@/ibp/utils/parser';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { handlerIbpEvent } from '@/api/simulation';
|
||||
import { handlerIbpEvent, handleIbpPress, handleIbpRelease } from '@/api/simulation';
|
||||
import { IbpOperation } from '@/scripts/ConstDic';
|
||||
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
||||
import { getToken } from '@/utils/auth';
|
||||
@ -28,8 +28,7 @@ import { getSimulationInfoNew, getIbpInitialState } from '@/api/simulation';
|
||||
import BuzzerAudio from '@/assets/buzzer.mp3';
|
||||
import { getStationList } from '@/api/runplan';
|
||||
|
||||
let ctrlKeyPressed = false;
|
||||
let timer = null;
|
||||
const pressedKeys = new Set();
|
||||
export default {
|
||||
name: 'Ibp',
|
||||
props: {
|
||||
@ -87,7 +86,6 @@ export default {
|
||||
'$store.state.socket.simulationIbpStatus': function (val) {
|
||||
if (val && val[this.stationCode]) {
|
||||
this.statusMessage(val[this.stationCode]);
|
||||
this.controlAudio(val[this.stationCode].jjtcBuzzer);
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationTimeSync': function (time) { // 仿真时间更新
|
||||
@ -176,9 +174,8 @@ export default {
|
||||
getIbpInitialState(this.$route.query.group, this.stationCode).then(resp => {
|
||||
if (resp.data) {
|
||||
this.statusMessage(resp.data);
|
||||
this.controlAudio(resp.data.jjtcBuzzer);
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch((e) => {
|
||||
this.$message.error('获取IBP盘初始状态异常!');
|
||||
});
|
||||
document.getElementById(this.ibpId).oncontextmenu = function (e) {
|
||||
@ -196,7 +193,7 @@ export default {
|
||||
this.setIbp(data, ibpDatas);
|
||||
this.$store.dispatch('ibp/setIbpData', ibpDatas);
|
||||
this.handleBanOpenScreenDoorStatus();
|
||||
this.preResetBtn = this.$ibp.$painter.ibpInstanceLevel.SquareButton.children().find(e=>e.model.mean === 'PRERESET_Z');
|
||||
this.preResetBtn = this.$ibp.$painter.ibpInstanceLevel.SquareButton.children().find(e=>e.model.mean === IbpOperation.PRERESET_Z.event);
|
||||
} else {
|
||||
// 无数据
|
||||
this.loading = false;
|
||||
@ -237,36 +234,24 @@ export default {
|
||||
onKeyboardAction(e){
|
||||
if (this.preResetBtn) {
|
||||
if (e.type === 'keydown' && e.key === 'Control') {
|
||||
ctrlKeyPressed = true;
|
||||
this.preResetBtn.open();
|
||||
pressedKeys.add(e.key)
|
||||
this.preResetBtn.press();
|
||||
handleIbpPress(this.$route.query.group, this.stationCode, this.preResetBtn._code).catch(error => { this.$message.error(error.message); });
|
||||
} else if (e.type === 'keyup' && e.key === 'Control'){
|
||||
ctrlKeyPressed = false;
|
||||
this.preResetBtn.close();
|
||||
clearTimeout(timer);
|
||||
pressedKeys.delete(e.key)
|
||||
this.preResetBtn.release();
|
||||
handleIbpRelease(this.$route.query.group, this.stationCode, this.preResetBtn._code).catch(error => { this.$message.error(error.message); });
|
||||
}
|
||||
}
|
||||
},
|
||||
onMouseDown(em) {
|
||||
if (em.deviceModel.mean && IbpOperation[em.deviceModel.mean] && em.deviceModel.mean === IbpOperation.AXLE_PRE_RESET.event) {
|
||||
if (this.preResetBtn) {
|
||||
if (ctrlKeyPressed) {
|
||||
timer = setTimeout(() => {
|
||||
handlerIbpEvent(this.$route.query.group, IbpOperation[em.deviceModel.mean].event, this.stationCode, em.deviceModel.sectionCode).then(() => {}).catch(error => { this.$message.error(error.message); });
|
||||
}, 3000);
|
||||
}
|
||||
} else {
|
||||
handlerIbpEvent(this.$route.query.group, IbpOperation[em.deviceModel.mean].event, this.stationCode, em.deviceModel.sectionCode).then(() => {}).catch(error => { this.$message.error(error.message); });
|
||||
}
|
||||
} else if ( em.deviceModel.mean && IbpOperation[em.deviceModel.mean]) {
|
||||
handlerIbpEvent(this.$route.query.group, IbpOperation[em.deviceModel.mean].event, this.stationCode).then(() => {
|
||||
}).catch(error => { this.$message.error(error.message); });
|
||||
if (["SquareButton", "Key"].includes(em.deviceType)){
|
||||
handleIbpPress(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); });
|
||||
}
|
||||
},
|
||||
onMouseUp(em) {
|
||||
if (em.deviceModel.mean && IbpOperation[em.deviceModel.mean] && em.deviceModel.mean === IbpOperation.AXLE_PRE_RESET.event) {
|
||||
if (this.preResetBtn) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
if (["SquareButton"].includes(em.deviceType)){
|
||||
handleIbpRelease(this.$route.query.group, this.stationCode, em.deviceCode).catch(error => { this.$message.error(error.message); });
|
||||
}
|
||||
},
|
||||
// 右键点击事件
|
||||
@ -325,8 +310,8 @@ export default {
|
||||
this.$ibp.dispose();
|
||||
this.$ibp = '';
|
||||
Vue.prototype.$ibp = '';
|
||||
}
|
||||
this.preResetBtn = null;
|
||||
}
|
||||
},
|
||||
handleViewLoaded() {
|
||||
this.loading = false;
|
||||
@ -343,16 +328,6 @@ export default {
|
||||
clearSubscribe() {
|
||||
clearSubscribe(`${displayTopic}\/${this.$route.query.group}`);
|
||||
},
|
||||
controlAudio(val) {
|
||||
const audio = document.getElementById('buzzer');
|
||||
if (audio !== null) {
|
||||
if (val) {
|
||||
audio.play();
|
||||
} else if (val === false) {
|
||||
audio.pause();
|
||||
}
|
||||
}
|
||||
},
|
||||
switchOffset() {
|
||||
if (this.offsetX === 0) {
|
||||
this.offsetX = 1920;
|
||||
|
@ -25,7 +25,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="back-box" @click="back">{{ projectDevice? '退出': '返回主页面' }}</div>
|
||||
<div v-if="!projectDevice" class="back-box" @click="back">返回主页面</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -416,17 +416,17 @@ export default {
|
||||
back() {
|
||||
this.firstBack = true;
|
||||
this.clearSubscribe();
|
||||
if (this.projectDevice) {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
} else {
|
||||
// if (this.projectDevice) {
|
||||
// this.$store.dispatch('LogOut').then(() => {
|
||||
// location.reload();
|
||||
// });
|
||||
// } else {
|
||||
clearSimulation(this.$route.query.group).then(resp => {
|
||||
this.$router.push({ path: `/trainingPlatform` });
|
||||
}).catch(()=> {
|
||||
this.$message.error('清除仿真失败!');
|
||||
});
|
||||
}
|
||||
// }
|
||||
},
|
||||
changeCurrentSystem() {
|
||||
this.$router.push({
|
||||
|
@ -9,18 +9,28 @@
|
||||
<img id="directimgbrakeall" class="brakeimg" :src="brakeallimgurlt" :style="{transform:braketransall}" @mousedown="touchstartbrakeall" />
|
||||
</div> -->
|
||||
|
||||
<div id="direct" class="brakebutton" style="bottom:5%;left:100px;">
|
||||
<!-- <div id="direct" class="brakebutton" style="bottom:5%;left:100px;">
|
||||
<img class="brakeimg" :src="brakeimgurl" />
|
||||
<img id="directimgbrake" class="brakeimg" :src="brakeimgurlt" :style="{transform:braketrans}" @mousedown="touchstartbrake" />
|
||||
</div> -->
|
||||
|
||||
<div id="directpane" class="directbutton" style="bottom:10px;left:150px;">
|
||||
<img class="rightbuttonbcimg" :src="zuoimg" />
|
||||
<img id="directimgdiv" class="rightbuttonbcimg" :src="niuimg" :style="{transform:doordirecttou}" @mousedown='doordirecttouchstart' />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="div1" class ="pane-box">
|
||||
<img class="paneimg" :src="pane"/>
|
||||
<div style="width:100%;height:33px;position:absolute;top:0;font-size:33px;color:#ffffff;">油门</div>
|
||||
<img class="paneimg" :src="pane" @mouseout="speedout" />
|
||||
<img id="div2" class="lgimg" :src="lg" :style="{top:movex}" @mousedown="speedstart" />
|
||||
<!-- @mouseup="speedend" -->
|
||||
</div>
|
||||
<div id="div3" class ="pane-box2">
|
||||
<div style="width:100%;height:33px;position:absolute;top:0;font-size:33px;color:#ffffff;">刹车</div>
|
||||
<img class="paneimg" :src="pane" @mouseout="bakeout"/>
|
||||
<img id="div4" class="lgimg" :src="lg" :style="{top:stopx}" @mousedown="bakestart" />
|
||||
<!-- @mouseup="speedend" -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@ -65,6 +75,10 @@
|
||||
pane:JL3D_LOCAL_STATIC+"/jl3d/railway/lg.png",
|
||||
lg:JL3D_LOCAL_STATIC+"/jl3d/railway/yuahdfgdfre.png",
|
||||
|
||||
doordirecttou:"rotate(0deg)",
|
||||
zuoimg:JL3D_LOCAL_STATIC+"/jl3d/railway/direct.png",
|
||||
niuimg:JL3D_LOCAL_STATIC+"/jl3d/control/niu.png",
|
||||
|
||||
iconrotate:45,//旋转deg
|
||||
icontranslateX:100,//沿x轴位移px
|
||||
icontranslateY:100,//沿y轴位移px
|
||||
@ -83,6 +97,11 @@
|
||||
y: null
|
||||
},
|
||||
moveheight:null,
|
||||
move:0,
|
||||
movex:"73px",
|
||||
stopheight:null,
|
||||
stop:0,
|
||||
stopx:"73px",
|
||||
speedlimit:160,
|
||||
|
||||
}
|
||||
@ -147,11 +166,30 @@
|
||||
updateInitStatus : function(data){
|
||||
this.moveheight = data[4]/100*235;
|
||||
this.movex = this.moveheight+15 +"px";
|
||||
let angle = 397 - data[6]/150*83;
|
||||
let angleall =397 - data[5]/100*105;
|
||||
this.braketrans = "rotate("+angle+"deg)";
|
||||
this.braketransall = "rotate("+angleall+"deg)";
|
||||
this.stopheight = data[6]/150*235;
|
||||
this.stopx = this.stopheight+15 +"px";
|
||||
|
||||
// let angle = 397 - data[6]/150*83;
|
||||
// let angleall =397 - data[5]/100*105;
|
||||
// this.braketrans = "rotate("+angle+"deg)";
|
||||
// this.braketransall = "rotate("+angleall+"deg)";
|
||||
|
||||
if(data[2] == "1"){
|
||||
this.doordirecttou = "rotate("+320+"deg)";
|
||||
this.oldDirectType = 1;
|
||||
}
|
||||
if(data[2] == "0"){
|
||||
this.doordirecttou = "rotate("+360+"deg)";
|
||||
this.oldDirectType = 0;
|
||||
}
|
||||
if(data[2] == "-1"){
|
||||
this.doordirecttou = "rotate("+399+"deg)";
|
||||
this.oldDirectType = -1;
|
||||
}
|
||||
if(data[2] == "2"){
|
||||
this.doordirecttou = "rotate("+442+"deg)";
|
||||
this.oldDirectType = 2;
|
||||
}
|
||||
},
|
||||
centerstate : function(gear){
|
||||
this.touchstate = gear;
|
||||
@ -199,6 +237,54 @@
|
||||
|
||||
}
|
||||
},
|
||||
bakestart: function(event){
|
||||
let domoffset = document.getElementById("div3").getBoundingClientRect();
|
||||
// movelimit
|
||||
this.movelimit.x = domoffset.x;
|
||||
this.movelimit.y = domoffset.y;
|
||||
event.preventDefault();
|
||||
document.getElementById("div3").onmousemove = this.bakechange;
|
||||
document.getElementById("div4").onmouseup = this.bakeend;
|
||||
},
|
||||
bakechange: function(event){
|
||||
this.stopheight = event.pageY-this.movelimit.y;
|
||||
this.stopx = this.stopheight-15 +"px";
|
||||
// if(this.atostate == true){
|
||||
// this.$store.dispatch('app/setAtoState', false);
|
||||
// }
|
||||
this.stop = this.stopheight/235;
|
||||
if(this.stopheight<=40){
|
||||
this.stopheight=30;
|
||||
this.stopx=23+"px";
|
||||
this.stop = 0;
|
||||
}
|
||||
if(this.stopheight>=235){
|
||||
this.stopheight=235;
|
||||
this.stopx=235+"px";
|
||||
this.stop = 1;
|
||||
}
|
||||
|
||||
let param = {
|
||||
// id:this.groupNum,
|
||||
id:"001",
|
||||
pos:parseInt(this.stop*150)
|
||||
};
|
||||
const userInfo = store.state.training.simulationUserList.find(el => el.id == store.state.user.id);
|
||||
throttle(
|
||||
trainSimulationForce(this.group,userInfo.memberId,param,"Train_Drive_Auto_Break ").then(res => {
|
||||
// console.log(res);
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
}),200,true);
|
||||
},
|
||||
bakeend: function(event){
|
||||
document.getElementById("div3").onmousemove = null;
|
||||
document.getElementById("div4").onmouseup = null;
|
||||
},
|
||||
bakeout: function(event){
|
||||
document.getElementById("div3").onmousemove = null;
|
||||
document.getElementById("div4").onmouseup = null;
|
||||
},
|
||||
speedstart: function(event){
|
||||
let domoffset = document.getElementById("div1").getBoundingClientRect();
|
||||
// movelimit
|
||||
@ -207,6 +293,7 @@
|
||||
event.preventDefault();
|
||||
document.getElementById("div1").onmousemove = this.speedchange;
|
||||
document.getElementById("div2").onmouseup = this.speedend;
|
||||
|
||||
},
|
||||
speedchange: function(event){
|
||||
this.moveheight = event.pageY-this.movelimit.y;
|
||||
@ -245,7 +332,10 @@
|
||||
document.getElementById("div1").onmousemove = null;
|
||||
document.getElementById("div2").onmouseup = null;
|
||||
},
|
||||
|
||||
speedout: function(event){
|
||||
document.getElementById("div1").onmousemove = null;
|
||||
document.getElementById("div2").onmouseup = null;
|
||||
},
|
||||
|
||||
|
||||
click:function(){//图标点击事件
|
||||
@ -256,23 +346,19 @@
|
||||
}
|
||||
},
|
||||
touchstartbrake:function(e){
|
||||
|
||||
|
||||
let domoffset = document.getElementById("directimgbrake").getBoundingClientRect();
|
||||
// movelimit
|
||||
this.angleoffset.x = domoffset.x;
|
||||
this.angleoffset.y = domoffset.y;
|
||||
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
document.getElementById("directimgbrake").onmousemove = this.touchmovebrake;
|
||||
document.getElementById("directimgbrake").onmouseup = this.touchendbrake;
|
||||
|
||||
|
||||
},
|
||||
touchmovebrake:function(e){//finger move 触发
|
||||
// console.log(e);
|
||||
|
||||
this.getAnglebrake(e.pageX-this.angleoffset.x ,e.pageY-this.angleoffset.y);
|
||||
},
|
||||
touchendbrake:function(e){
|
||||
@ -281,10 +367,9 @@
|
||||
},
|
||||
getAnglebrake:function(mx,my){
|
||||
//圆心坐标
|
||||
// console.log(mx);
|
||||
// console.log(my);
|
||||
|
||||
let px=150;
|
||||
let py=150;
|
||||
let py=170;
|
||||
let x = Math.abs(px-mx);
|
||||
let y = Math.abs(py-my);
|
||||
let z = Math.sqrt(Math.pow(x,2)+Math.pow(y,2));
|
||||
@ -296,28 +381,27 @@
|
||||
angle = 180 - angle;
|
||||
}
|
||||
|
||||
if(mx==px&&my>py){//鼠标在y轴负方向上
|
||||
angle = 180;
|
||||
}
|
||||
|
||||
if(mx>px&&my==py){//鼠标在x轴正方向上
|
||||
angle = 90;
|
||||
}
|
||||
// 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){//鼠标在x轴负方向
|
||||
// angle = 270;
|
||||
// }
|
||||
|
||||
if(mx<px&&my<py){//鼠标在第二象限
|
||||
angle = 360 - angle;
|
||||
}
|
||||
|
||||
angle += 180;
|
||||
|
||||
if(angle >292 && angle<427){
|
||||
let stopspeed = 0;
|
||||
if(angle>=397){
|
||||
@ -346,7 +430,7 @@
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
}),200,true);
|
||||
updatemmic1(param.percent);
|
||||
// updatemmic1(param.percent);
|
||||
|
||||
}
|
||||
|
||||
@ -440,6 +524,135 @@
|
||||
}
|
||||
|
||||
},
|
||||
doordirecttouchstart:function(e){
|
||||
|
||||
|
||||
let domoffset = document.getElementById("directimgdiv").getBoundingClientRect();
|
||||
// movelimit
|
||||
this.angleoffset.x = domoffset.x;
|
||||
this.angleoffset.y = domoffset.y;
|
||||
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
document.getElementById("directimgdiv").onmousemove = this.doordirecttouchmove;
|
||||
document.getElementById("directimgdiv").onmouseup = this.doordirecttouchup;
|
||||
|
||||
|
||||
},
|
||||
doordirecttouchmove:function(e){//finger move 触发
|
||||
// console.log(e);
|
||||
|
||||
this.getAngle(e.pageX-this.angleoffset.x ,e.pageY-this.angleoffset.y);
|
||||
},
|
||||
doordirecttouchup:function(e){
|
||||
document.getElementById("directimgdiv").onmousemove = null;
|
||||
document.getElementById("directimgdiv").onmouseup = null;
|
||||
},
|
||||
|
||||
getAngle:function(mx,my){
|
||||
|
||||
let px=50;
|
||||
let py=50;
|
||||
// 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));//将弧度转换成角度
|
||||
|
||||
|
||||
//圆心坐标
|
||||
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;
|
||||
}
|
||||
|
||||
angle = angle + 180;
|
||||
|
||||
let paramGear = {
|
||||
// id:this.groupNum,
|
||||
id:"001",
|
||||
pos:''
|
||||
};
|
||||
|
||||
// console.log(angle);
|
||||
if(angle<=356){
|
||||
|
||||
this.doordirecttou = "rotate("+320+"deg)";
|
||||
this.directType = 1;
|
||||
paramGear.pos = '4';
|
||||
}
|
||||
if(angle>356 && angle<372){
|
||||
this.doordirecttou = "rotate("+360+"deg)";
|
||||
this.directType = 0;
|
||||
paramGear.pos = '0';
|
||||
}
|
||||
|
||||
if(angle>372 && angle<421){
|
||||
this.doordirecttou = "rotate("+399+"deg)";
|
||||
this.directType = -1;
|
||||
paramGear.pos = '4';
|
||||
}
|
||||
|
||||
if(angle>421){
|
||||
this.doordirecttou = "rotate("+442+"deg)";
|
||||
this.directType = 2;
|
||||
paramGear.pos = '4';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(this.oldDirectType != this.directType){
|
||||
this.oldDirectType = this.directType;
|
||||
let param = {
|
||||
// id:this.groupNum,
|
||||
id:"001",
|
||||
pos:parseInt(this.directType)
|
||||
};
|
||||
const userInfo = store.state.training.simulationUserList.find(el => el.id == store.state.user.id);
|
||||
|
||||
trainSimulationForce(this.group,userInfo.memberId,paramGear,"Train_Drive_Gear_Change").then(res => {
|
||||
// console.log(res);
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
trainSimulationForce(this.group,userInfo.memberId,param,"Train_Drive_Change_Over_Switch").then(res => {
|
||||
// console.log(res);
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@ -468,7 +681,16 @@
|
||||
height:300px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
.pane-box2{
|
||||
right: 0px;
|
||||
bottom: 10px;
|
||||
width:120px;
|
||||
height:300px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
}
|
||||
.lgimg{
|
||||
width: 60px;
|
||||
@ -508,5 +730,20 @@
|
||||
font-size: 1px;
|
||||
position:absolute;
|
||||
}
|
||||
.directbutton{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
.rightbuttonbcimg{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<!-- <Left-Pane ref="leftcontrol" /> -->
|
||||
|
||||
<Right-Pane ref="rightcontrol" />
|
||||
<!-- <Right-Pane ref="rightcontrol" /> -->
|
||||
|
||||
<!-- <TopRight-Pane ref="topcontrol" :group-num="groupnum" /> -->
|
||||
|
||||
@ -290,7 +290,7 @@ import axios from 'axios';
|
||||
updateDriveValue(newvalue){
|
||||
|
||||
this.$refs.centercontrol.updateInitStatus(newvalue);
|
||||
this.$refs.rightcontrol.updateInitStatus(newvalue);
|
||||
// this.$refs.rightcontrol.updateInitStatus(newvalue);
|
||||
},
|
||||
updatetrainlist(){
|
||||
getMemberListCommon(this.$route.query.group,"DRIVER").then(netdata => {
|
||||
@ -362,7 +362,7 @@ import axios from 'axios';
|
||||
|
||||
<style>
|
||||
.drivepane{
|
||||
width:30%;
|
||||
width:400px;
|
||||
height:333px;
|
||||
right:0;
|
||||
bottom:0;
|
||||
|
@ -293,7 +293,7 @@
|
||||
pos:parseInt(this.stalls[this.stallh][this.stalll].type)
|
||||
};
|
||||
const userInfo = store.state.training.simulationUserList.find(el => el.id == store.state.user.id);
|
||||
|
||||
console.log(userInfo);
|
||||
trainSimulationForce(this.group,userInfo.memberId,param,"Train_Drive_Gear_Change").then(res => {
|
||||
// console.log(res);
|
||||
}).catch((error) => {
|
||||
|
@ -21,7 +21,7 @@ export function mmirender(dom) {
|
||||
scene.add( plane );
|
||||
|
||||
|
||||
var texture = new THREE.TextureLoader().load( JL3D_LOCAL_STATIC+'/jl3d/biao.png' );
|
||||
var texture = new THREE.TextureLoader().load( JL3D_LOCAL_STATIC+'/jl3d/raiwaybiao.png' );
|
||||
var geometry = new THREE.PlaneBufferGeometry( 60, 60, 2 );
|
||||
var material = new THREE.MeshBasicMaterial( {map: texture, side: THREE.DoubleSide} );
|
||||
var kd = new THREE.Mesh( geometry, material );
|
||||
@ -47,45 +47,45 @@ export function mmirender(dom) {
|
||||
zz.position.x = 11;
|
||||
zc.add( zz );
|
||||
|
||||
var geometry = new THREE.PlaneBufferGeometry( 2, 2, 2 );
|
||||
var material = new THREE.MeshBasicMaterial( {color: 0x000000, side: THREE.DoubleSide} );
|
||||
var atp = new THREE.Mesh( geometry, material );
|
||||
atp.position.x = 2.48;
|
||||
atp.position.y = -0.34;
|
||||
atp.position.z = 1;
|
||||
//zc.rotation.y = Math.PI;
|
||||
//0刻度-Math.PI*65.8/100
|
||||
//110刻度-Math.PI*234.8/100
|
||||
atp.rotation.z = -Math.PI*65.8/100;
|
||||
scene.add( atp );
|
||||
// var geometry = new THREE.PlaneBufferGeometry( 2, 2, 2 );
|
||||
// var material = new THREE.MeshBasicMaterial( {color: 0x000000, side: THREE.DoubleSide} );
|
||||
// var atp = new THREE.Mesh( geometry, material );
|
||||
// atp.position.x = 2.48;
|
||||
// atp.position.y = -0.34;
|
||||
// atp.position.z = 1;
|
||||
// //zc.rotation.y = Math.PI;
|
||||
// //0刻度-Math.PI*65.8/100
|
||||
// //110刻度-Math.PI*234.8/100
|
||||
// atp.rotation.z = -Math.PI*65.8/100;
|
||||
// scene.add( atp );
|
||||
//
|
||||
// var geometry = new THREE.CircleBufferGeometry(1.5, 1 );
|
||||
// var material = new THREE.MeshBasicMaterial( {color: 0xea0000, side: THREE.DoubleSide} );
|
||||
// var atpmark = new THREE.Mesh( geometry, material );
|
||||
// atpmark.position.z = 1;
|
||||
// atpmark.position.x = 21;
|
||||
// atpmark.rotation.y = Math.PI;
|
||||
// atp.add( atpmark );
|
||||
|
||||
var geometry = new THREE.CircleBufferGeometry(1.5, 1 );
|
||||
var material = new THREE.MeshBasicMaterial( {color: 0xea0000, side: THREE.DoubleSide} );
|
||||
var atpmark = new THREE.Mesh( geometry, material );
|
||||
atpmark.position.z = 1;
|
||||
atpmark.position.x = 21;
|
||||
atpmark.rotation.y = Math.PI;
|
||||
atp.add( atpmark );
|
||||
// var geometry = new THREE.PlaneBufferGeometry( 2, 2, 2 );
|
||||
// var material = new THREE.MeshBasicMaterial( {color: 0x000000, side: THREE.DoubleSide} );
|
||||
// var ato = new THREE.Mesh( geometry, material );
|
||||
// ato.position.x = 2.48;
|
||||
// ato.position.y = -0.34;
|
||||
// ato.position.z = 1;
|
||||
// //zc.rotation.y = Math.PI;
|
||||
// //0刻度-Math.PI*65.8/100
|
||||
// //110刻度-Math.PI*234.8/100
|
||||
// ato.rotation.z = -Math.PI*65.8/100;
|
||||
// scene.add( ato );
|
||||
|
||||
var geometry = new THREE.PlaneBufferGeometry( 2, 2, 2 );
|
||||
var material = new THREE.MeshBasicMaterial( {color: 0x000000, side: THREE.DoubleSide} );
|
||||
var ato = new THREE.Mesh( geometry, material );
|
||||
ato.position.x = 2.48;
|
||||
ato.position.y = -0.34;
|
||||
ato.position.z = 1;
|
||||
//zc.rotation.y = Math.PI;
|
||||
//0刻度-Math.PI*65.8/100
|
||||
//110刻度-Math.PI*234.8/100
|
||||
ato.rotation.z = -Math.PI*65.8/100;
|
||||
scene.add( ato );
|
||||
|
||||
var geometry = new THREE.CircleBufferGeometry(1.5, 1 );
|
||||
var material = new THREE.MeshBasicMaterial( {color: 0xEEEE00, side: THREE.DoubleSide} );
|
||||
var atomark = new THREE.Mesh( geometry, material );
|
||||
atomark.position.z = 1;
|
||||
atomark.position.x = 21;
|
||||
atomark.rotation.y = Math.PI;
|
||||
ato.add( atomark );
|
||||
// var geometry = new THREE.CircleBufferGeometry(1.5, 1 );
|
||||
// var material = new THREE.MeshBasicMaterial( {color: 0xEEEE00, side: THREE.DoubleSide} );
|
||||
// var atomark = new THREE.Mesh( geometry, material );
|
||||
// atomark.position.z = 1;
|
||||
// atomark.position.x = 21;
|
||||
// atomark.rotation.y = Math.PI;
|
||||
// ato.add( atomark );
|
||||
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ export function mmirender(dom) {
|
||||
}
|
||||
|
||||
this.updatezz = function(speed){
|
||||
zc.rotation.z = -Math.PI*(65.8+169*speed/110)/100;
|
||||
zc.rotation.z = -Math.PI*(72.3+157*speed/360)/100;
|
||||
|
||||
renderer.render( scene, camera );
|
||||
}
|
||||
|
@ -95,9 +95,9 @@ import axios from 'axios';
|
||||
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
|
||||
import { mmirender } from '@/views/jlmap3d/drive/sceneview/mmi';
|
||||
import { mmirender } from '@/views/jlmap3d/railwaydrive/sceneview/mmi';
|
||||
|
||||
import { mmiimage } from '@/views/jlmap3d/drive/sceneview/mmiimage';
|
||||
import { mmiimage } from '@/views/jlmap3d/railwaydrive/sceneview/mmiimage';
|
||||
|
||||
export default {
|
||||
name: 'SimulationMmi',
|
||||
|
@ -472,6 +472,7 @@ export default {
|
||||
this.$router.push({ path: `/displayIscs/system`, query: {
|
||||
group: res.data.group,
|
||||
lineCode: resp.data.map.lineCode,
|
||||
mapId:resp.data.map.id,
|
||||
projectDevice: this.$route.query.projectDevice,
|
||||
type: this.$route.query.type} });
|
||||
} else if (this.$route.query.type == 'CCTV') {
|
||||
|
@ -62,7 +62,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="位置" width="60">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.section }}</span>
|
||||
<span>{{ getSectionPosition(scope.row.sectionCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -110,8 +110,16 @@
|
||||
<div style="margin-top: 20px;height: 20px;">插入位置(之前):</div>
|
||||
<el-table :data="tableData" border style="width: 280px;" height="180">
|
||||
<el-table-column prop="date" label="方向" width="60" />
|
||||
<el-table-column prop="name" label="列车号" width="157" />
|
||||
<el-table-column prop="address" label="位置" width="60" />
|
||||
<el-table-column prop="name" label="列车号" width="157">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getTrainCode(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="位置" width="60">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getSectionPosition(scope.row.sectionCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
@ -180,7 +188,11 @@
|
||||
<span>{{ getTrainCode(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="位置" width="60" />
|
||||
<el-table-column prop="address" label="位置" width="60">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getSectionPosition(scope.row.sectionCode) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div style="width: 250px;display: flex;justify-content: space-between;margin-top: 20px;margin-left: 10px;align-items: center;height: 25px;">
|
||||
|
@ -257,7 +257,11 @@ export default {
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const planData = this.$store.state.runPlan.planData;
|
||||
this.kmRangeMap = this.PlanParser.convertStationsToMap(stations);
|
||||
if (this.$route.query.lineCode === '07') {
|
||||
this.pushModels(this.staticSeries, [this.PlanParser.initializeAxisX(stations)]);
|
||||
} else {
|
||||
this.pushModels(this.staticSeries, [this.PlanParser.initializeAxisY(stations)]);
|
||||
}
|
||||
this.staticSeries = this.pushModels(this.staticSeries, this.PlanParser.convertDataToModels(planData, stations, this.kmRangeMap, { color: '#000', width: 0.5 }));
|
||||
this.staticSeries.forEach(item => {
|
||||
this.seriesMap[item.name] = item;
|
||||
@ -362,6 +366,89 @@ export default {
|
||||
|
||||
]
|
||||
};
|
||||
const hebXAxis = {
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
lineStyle: {
|
||||
width: 2,
|
||||
color: '#d14a61'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
interval: 'auto',
|
||||
formatter: this.yAxisLableFormat
|
||||
},
|
||||
axisPointer: {
|
||||
xAxisIndex: 'all',
|
||||
label: {
|
||||
formatter: this.yAxisPointFormat,
|
||||
backgroundColor: 'rgb(0,100,0,0.5)',
|
||||
color: 'white'
|
||||
}
|
||||
},
|
||||
min: 0,
|
||||
max: 0
|
||||
};
|
||||
const hebYAxis = [
|
||||
{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: [],
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
lineStyle: {
|
||||
width: 2,
|
||||
color: '#d14a61'
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: this.xAxisLableFormat,
|
||||
textStyle: {
|
||||
color: '#333'
|
||||
}
|
||||
},
|
||||
axisPointer: {
|
||||
snap: true,
|
||||
label: {
|
||||
formatter: this.xAxisPointFormat,
|
||||
backgroundColor: 'rgb(255,0,0,0.5)',
|
||||
color: 'white'
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
const hebDataZoom = [
|
||||
{
|
||||
type: 'inside',
|
||||
yAxisIndex: 0
|
||||
},
|
||||
{
|
||||
fiterMode: 'filter',
|
||||
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
|
||||
handleSize: '80%',
|
||||
yAxisIndex: 0,
|
||||
handleStyle: {
|
||||
color: '#fff',
|
||||
shadowBlur: 3,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.6)',
|
||||
shadowOffsetX: 2,
|
||||
shadowOffsetY: 2
|
||||
},
|
||||
left: '20px'
|
||||
}
|
||||
];
|
||||
if (this.$route.query.lineCode === '07') {
|
||||
option.xAxis = hebXAxis;
|
||||
option.yAxis = hebYAxis;
|
||||
option.dataZoom = hebDataZoom;
|
||||
}
|
||||
await this.xAxisInit(option);
|
||||
await this.yAxisInit(option);
|
||||
await this.loadInitChart(option);
|
||||
@ -420,7 +507,11 @@ export default {
|
||||
const startValue = 3600 * 6;
|
||||
const offsetTime = 3600 * 1;
|
||||
|
||||
if (this.$route.query.lineCode === '07') {
|
||||
option.yAxis[0].data = list;
|
||||
} else {
|
||||
option.xAxis[0].data = list;
|
||||
}
|
||||
if (!option.dataZoom[0].startValue) {
|
||||
option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime;
|
||||
}
|
||||
@ -430,19 +521,31 @@ export default {
|
||||
}
|
||||
},
|
||||
yAxisInit(option) {
|
||||
if (Object.keys(this.PlanParser).length) {
|
||||
option.yAxis[0].min = this.PlanParser.computedAxisYMinValue(this.stations);
|
||||
option.yAxis[0].max = this.PlanParser.computedAxisYMaxValue(this.stations);
|
||||
if (Object.keys(this.PlanParser).length && this.$route.query.lineCode !== '07') {
|
||||
option.yAxis.min = this.PlanParser.computedAxisYMinValue(this.stations);
|
||||
option.yAxis.max = this.PlanParser.computedAxisYMaxValue(this.stations);
|
||||
} else if (Object.keys(this.PlanParser).length && this.$route.query.lineCode === '07') {
|
||||
option.xAxis.min = this.PlanParser.computedAxisXMinValue(this.stations);
|
||||
option.xAxis.max = this.PlanParser.computedAxisXMaxValue(this.stations);
|
||||
}
|
||||
},
|
||||
axisTooltip(param) {
|
||||
const station = (this.$store.getters['map/getDeviceByCode'](param.data[2])) || { name: '', kmRange: '' };
|
||||
if (this.$route.query.lineCode !== '07') {
|
||||
return [
|
||||
`Point Data <hr size=1 style=" margin: 3px 0">`,
|
||||
`车站名称: ${station.name}<br>`,
|
||||
`车站公里标: ${station.kmRange} km <br>`,
|
||||
`到站时间: ${timeFormat(param.data[0] + this.PlanParser.getTranslation())} (${param.data[0]})<br>`
|
||||
].join('');
|
||||
} else {
|
||||
return [
|
||||
`Point Data <hr size=1 style=" margin: 3px 0">`,
|
||||
`车站名称: ${station.name}<br>`,
|
||||
`车站公里标: ${station.kmRange} km <br>`,
|
||||
`到站时间: ${timeFormat(param.data[1] + this.PlanParser.getTranslation())} (${param.data[1]})<br>`
|
||||
].join('');
|
||||
}
|
||||
},
|
||||
renderTripNumber(params) {
|
||||
const tripNumber = params.tripNumber; // 车次号
|
||||
|
@ -342,7 +342,7 @@ export default {
|
||||
async back() {
|
||||
this.isGoback = true;
|
||||
if (this.projectDevice) {
|
||||
// || this.project === 'bjd'
|
||||
if (this.$route.query.type == 'IM') {
|
||||
clearSimulation(this.group).then(res=>{
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
@ -352,6 +352,17 @@ export default {
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
// this.$store.dispatch('training/reset');
|
||||
// this.$store.dispatch('map/mapClear');
|
||||
location.reload();
|
||||
});
|
||||
});
|
||||
}
|
||||
// || this.project === 'bjd'
|
||||
|
||||
} else {
|
||||
if (this.project === 'bjd') {
|
||||
window.close();
|
||||
|
@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<status-icon v-if="statusIconShow" ref="statusIcon" />
|
||||
<chat-box v-if="$route.query.type !== 'ILW'" :group="group" :user-role="userRole" />
|
||||
<!-- 地图没有报错-->
|
||||
<!-- 地图错误判断 -->
|
||||
<div v-if="!dataError&&hasOneButton" class="display_top_draft" :style="{top: offset+'px'}">
|
||||
<div v-if="!dataError&&hasOneButton" class="display_top_draft" :style="{top: statusIconShow ? offset + 60 + 'px':offset+'px'}">
|
||||
<div class="btn_hover" @click="menuClick">菜单</div>
|
||||
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
|
||||
<!-- 设备视图 -->
|
||||
@ -48,6 +49,7 @@
|
||||
|
||||
<script>
|
||||
import QrCode from '@/components/QrCode';
|
||||
import StatusIcon from '@/views/components/StatusIcon/statusIcon';
|
||||
import ChatBox from '../chatView/chatBox';
|
||||
import Equipment from '@/views/newMap/displayNew/demon/equipment';
|
||||
import SetTime from '@/views/newMap/displayNew/demon/setTime';
|
||||
@ -68,7 +70,8 @@ export default {
|
||||
QrCode,
|
||||
SetTime,
|
||||
Equipment,
|
||||
ContectUs
|
||||
ContectUs,
|
||||
StatusIcon
|
||||
},
|
||||
props: {
|
||||
group: {
|
||||
@ -182,6 +185,9 @@ export default {
|
||||
},
|
||||
isDisable() {
|
||||
return this.$store.state.training.started;
|
||||
},
|
||||
statusIconShow() {
|
||||
return (this.$route.query.lineCode == '11' || this.$route.query.lineCode == '10') && this.$store.state.training.prdType == '02';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -187,7 +187,7 @@ export default {
|
||||
device = this.getSelectedByLineCode(device);
|
||||
this.selected = { ...device, _event: MouseEvent.Right};
|
||||
if (!this.buttonOperation) {
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: device, subType: em.subType});
|
||||
this.$store.dispatch('menuOperation/setSelected', {device: this.selected, subType: em.subType});
|
||||
if (!this.checkShouldPop(device)) {
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: null });
|
||||
} else {
|
||||
|
@ -11,6 +11,9 @@
|
||||
<el-form-item :label="$t('map.publishMapName')" prop="name">
|
||||
<el-input v-model="editModel.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="描述:" prop="note">
|
||||
<el-input v-model="editModel.note" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@ -39,7 +42,8 @@ export default {
|
||||
editModel: {
|
||||
id: '',
|
||||
name: '',
|
||||
cityCode: '000000'
|
||||
cityCode: '000000',
|
||||
note:''
|
||||
},
|
||||
editRules: {
|
||||
cityCode: [
|
||||
@ -47,6 +51,9 @@ export default {
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
|
||||
],
|
||||
note:[
|
||||
{ required: true, message: this.$t('rules.pleaseEnterDescription'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
@ -294,6 +294,30 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="checkFieldType(item,'checkBoxDevice')">
|
||||
<div :key="item.prop" class="coordinate">
|
||||
<span class="title">{{ item.label }}</span>
|
||||
<div class="list-box">
|
||||
<div>
|
||||
<el-button
|
||||
size="small"
|
||||
:type="item.buttonShowType ? 'danger' : 'primary'"
|
||||
@click="item.hover(item.buttonType)"
|
||||
>激活选择</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
@click="item.clear()"
|
||||
>清空</el-button>
|
||||
</div>
|
||||
<div class="list-content">
|
||||
<div v-for="(nor,indexIn) in formModel[item.prop]" :key="nor" class="each-content" @mouseenter="item.mouseenter(nor)" @mouseleave="item.mouseleave(nor)">
|
||||
<div class="name">{{ item.getName(nor) }}</div>
|
||||
<div class="close" @click="formModel[item.prop].splice(indexIn, 1);"><i class="el-icon-close" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</fieldset>
|
||||
</template>
|
||||
|
@ -195,12 +195,20 @@ export default {
|
||||
this.enabledTab = 'ControlDraft';
|
||||
} else if (controlLampTypeList.includes(type)) {
|
||||
this.enabledTab = 'ControlLamp';
|
||||
} else {
|
||||
if (this.$refs['ZcControl'] && this.$refs['ZcControl'][0].field == 'checkZcSection') {
|
||||
this.enabledTab = 'ZcControl';
|
||||
} else {
|
||||
this.enabledTab = type;
|
||||
}
|
||||
}
|
||||
},
|
||||
deviceSelect(type) {
|
||||
// if (this.$refs['ZcControl'].field != 'checkZcSection') {
|
||||
this.selectDevice = type;
|
||||
// } else {
|
||||
// this.selectDevice = 'ZcControl';
|
||||
// }
|
||||
},
|
||||
saveMapEvent() {
|
||||
this.$emit('saveMapEvent');
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-tabs v-model="activeName" class="card" @tab-click="handleClick">
|
||||
<el-tabs v-model="activeName" class="card">
|
||||
<el-tab-pane class="view-control" :label="$t('map.property')" name="first" :lazy="lazy">
|
||||
<div class="view-control-content">
|
||||
<config-list ref="dataform" :form="form" :form-model="editModel" :rules="rules" />
|
||||
@ -53,8 +53,9 @@ export default {
|
||||
editModel: {
|
||||
code: '',
|
||||
name: '',
|
||||
managedSectionList:[],
|
||||
// visible: '',
|
||||
concentrateStationList:[],
|
||||
// concentrateStationList:[],
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
@ -64,12 +65,13 @@ export default {
|
||||
code: '',
|
||||
name: '',
|
||||
// visible: '',
|
||||
concentrateStationList:[],
|
||||
// concentrateStationList:[],
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
},
|
||||
field:'',
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectEncoding'), trigger: 'change' }
|
||||
@ -80,9 +82,9 @@ export default {
|
||||
// visible: [
|
||||
// { required: true, message: this.$t('rules.visible'), trigger: 'change' }
|
||||
// ],
|
||||
concentrateStationList:[
|
||||
{ required: true, message: this.$t('rules.selectConcentrateStation'), trigger: 'change' }
|
||||
],
|
||||
// concentrateStationList:[
|
||||
// { required: true, message: this.$t('rules.selectConcentrateStation'), trigger: 'change' }
|
||||
// ],
|
||||
'position.x': [
|
||||
{ required: true, message: this.$t('rules.trainPositionX'), trigger: 'blur' }
|
||||
],
|
||||
@ -95,8 +97,11 @@ export default {
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'zcList',
|
||||
'stationList'
|
||||
'seclectDeviceList'
|
||||
]),
|
||||
isButtonType() {
|
||||
return this.field == 'checkZcSection';
|
||||
},
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '150px',
|
||||
@ -115,7 +120,8 @@ export default {
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||
] },
|
||||
{ prop:'concentrateStationList', label:this.$t('map.concentrateStationList'), type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.concertrateStation, deviceChange: this.changeConcentrateStation }
|
||||
{ prop:'managedSectionList', label:'管理区段列表: ', type: 'checkBoxDevice', getName:this.getName, mouseenter:this.mouseenter, mouseleave:this.mouseleave, buttonShowType:this.isButtonType, hover:this.hover, buttonType:'checkZcSection', clear:this.clear}
|
||||
// { prop:'concentrateStationList', label:this.$t('map.concentrateStationList'), type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.concertrateStation, deviceChange: this.changeConcentrateStation }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -133,8 +139,9 @@ export default {
|
||||
{ prop: 'position', label: this.$t('map.stateSignalsPlotCoordinates'), type: 'coordinate', width: '140px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||
] },
|
||||
{ prop:'concentrateStationList', label:this.$t('map.concentrateStationList'), type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.concertrateStation, deviceChange: this.changeConcentrateStation }
|
||||
] }
|
||||
//
|
||||
// { prop:'concentrateStationList', label:this.$t('map.concentrateStationList'), type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.concertrateStation, deviceChange: this.changeConcentrateStation }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -143,51 +150,41 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
stationList() {
|
||||
this.getConcertrateStation();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getConcertrateStation();
|
||||
},
|
||||
// mounted() {
|
||||
// this.getConcertrateStation();
|
||||
// },
|
||||
methods: {
|
||||
deviceChange(code) {
|
||||
this.$emit('setCenter', code);
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
},
|
||||
changeConcentrateStation() {},
|
||||
handleClick() {
|
||||
this.getConcertrateStation();
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
// 待调整
|
||||
// this.$refs.make && this.$refs.make.resetFields();
|
||||
if (selected && selected._type.toUpperCase() === 'CheckBox'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
this.seclectDeviceList.forEach(item => {
|
||||
if (item._type == 'Section' && (item.type == '01' || item.type == '04') && !this.editModel.managedSectionList.includes(selected.code)) {
|
||||
this.editModel.managedSectionList.push(item.code);
|
||||
}
|
||||
});
|
||||
} else if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected._type == 'Section' && (selected.type == '01' || selected.type == '04') && !this.editModel.managedSectionList.includes(selected.code)) {
|
||||
this.editModel.managedSectionList.push(selected.code);
|
||||
}
|
||||
} else if (selected && selected._type.toUpperCase() === 'ZcControl'.toUpperCase()) {
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
this.$refs.make && this.$refs.make.resetFields();
|
||||
if (selected && selected._type.toUpperCase() === 'ZcControl'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.getConcertrateStation();
|
||||
}
|
||||
},
|
||||
getConcertrateStation() {
|
||||
// 被选中的集中站站数据
|
||||
const beConcentrateStation = {};
|
||||
this.zcList.forEach(data=>{
|
||||
data.concentrateStationList.forEach(concentrate=>{
|
||||
beConcentrateStation[concentrate] = data.code;
|
||||
});
|
||||
});
|
||||
this.concertrateStation = this.stationList.filter(station=>{
|
||||
// if (this.activeName == 'first') {
|
||||
// return station.centralized && !( beConcentrateStation[station.code] && (beConcentrateStation[station.code] != this.editModel.code));
|
||||
return station.centralized;
|
||||
// } else {
|
||||
// return station.centralized && !( beConcentrateStation[station.code]);
|
||||
// }
|
||||
});
|
||||
clear() {
|
||||
this.editModel.managedSectionList = [];
|
||||
},
|
||||
create() {
|
||||
const uid = getUID('ZcControl', this.zcList);
|
||||
let models = [];
|
||||
const models = [];
|
||||
const model = {
|
||||
_type: 'ZcControl',
|
||||
code: uid,
|
||||
@ -195,16 +192,11 @@ export default {
|
||||
position: {
|
||||
x: this.addModel.position.x,
|
||||
y: this.addModel.position.y
|
||||
},
|
||||
concentrateStationList:this.addModel.concentrateStationList
|
||||
}
|
||||
};
|
||||
models.push(model);
|
||||
model.concentrateStationList.forEach(stationCode=>{
|
||||
const arr = this.setStationStand(stationCode, model.code);
|
||||
models = [...models, ...arr];
|
||||
});
|
||||
|
||||
this.$emit('updateMapModel', models);
|
||||
this.getConcertrateStation();
|
||||
this.$refs.createForm.resetForm();
|
||||
},
|
||||
// 修改对象
|
||||
@ -212,11 +204,7 @@ export default {
|
||||
this.$refs['dataform'].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = Object.assign({_type: 'ZcControl'}, this.editModel);
|
||||
let models = [data];
|
||||
data.concentrateStationList.forEach(stationCode=>{
|
||||
const arr = this.setStationStand(stationCode, data.code);
|
||||
models = [...models, ...arr];
|
||||
});
|
||||
const models = [data];
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$emit('deviceSelect', '');
|
||||
}
|
||||
@ -231,16 +219,6 @@ export default {
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.concertrateStation.forEach(station=>{
|
||||
selected.concentrateStationList.forEach(stationCode=>{
|
||||
switch (stationCode) {
|
||||
case station.code: {
|
||||
this.setStationStand(station.code, '');
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
this.$emit('updateMapModel', {...selected, _dispose: true});
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
}).catch(() => {
|
||||
@ -248,19 +226,18 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
// 设置车站所属ZC区域
|
||||
setStationStand(stationCode, code) {
|
||||
const arr = [];
|
||||
this.stationList.forEach(elem=>{
|
||||
if (elem.code == stationCode) {
|
||||
const station = deepAssign({}, elem);
|
||||
// const station = Object.assign({}, elem);
|
||||
station.zcCode = code;
|
||||
arr.push(station);
|
||||
// this.$emit('updateMapModel', station);
|
||||
}
|
||||
});
|
||||
return arr; // 返回设置的车站list
|
||||
getName(code) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](code);
|
||||
return section.name || '';
|
||||
},
|
||||
mouseenter(code) {
|
||||
|
||||
},
|
||||
mouseleave(code) {
|
||||
|
||||
},
|
||||
hover(field) {
|
||||
this.field = field === this.field ? '' : field;
|
||||
}
|
||||
// changeConcertrateStation(data) {
|
||||
// if (data.length > 0) {
|
||||
@ -300,3 +277,31 @@ export default {
|
||||
color: #3E44BE;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.view-control-content .list-box .list-content{
|
||||
margin-left:10px;
|
||||
margin-top:10px;
|
||||
margin-right:10px;
|
||||
padding:5px;
|
||||
|
||||
}
|
||||
.view-control-content .list-box .each-content{
|
||||
background: #e2e2e2;
|
||||
margin: 5px;
|
||||
border-radius: 5px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding-left: 10px;
|
||||
padding-right: 7px;
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
.view-control-content .list-box .each-content .name{
|
||||
display: inline-block;
|
||||
}
|
||||
.view-control-content .list-box .each-content .close{
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
@ -189,6 +189,14 @@ export default {
|
||||
name: 'AddTask',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -262,7 +270,7 @@ export default {
|
||||
loadInitData(params) {
|
||||
this.isPlan = params.isPlan;
|
||||
this.addModel.serviceNumber = params.serviceNumber;
|
||||
this.addModel.planId = this.$route.query.planId;
|
||||
this.addModel.planId = this.$route.query.planId || this.loadRunPlanId;
|
||||
this.addModel.arriveConfigList = [];
|
||||
const mapId = this.$route.query.mapId;
|
||||
|
||||
|
@ -30,6 +30,14 @@ export default {
|
||||
name: 'DeleteTask',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -70,13 +78,14 @@ export default {
|
||||
} else {
|
||||
// 直接删除任务
|
||||
const model = {
|
||||
planId: this.$route.query.planId,
|
||||
planId: this.$route.query.planId || this.loadRunPlanId,
|
||||
SDTNumber: `${this.model.serviceNumber}${this.model.tripNumber}`,
|
||||
deleteBefore: this.model.deleteBefore
|
||||
};
|
||||
|
||||
deletePlanTrip(model).then(resp => {
|
||||
this.$store.dispatch('runPlan/setSelected', {});
|
||||
this.$store.dispatch('runPlan/setDraftSelected', {});
|
||||
this.$emit('refresh');
|
||||
// this.$emit('dispatchOperate', {
|
||||
// dialogName: 'openRunPlan', operate: 'loadRunPlanData', params: Object.assign({refresh: true}, this.$route.query)
|
||||
|
@ -43,6 +43,14 @@ export default {
|
||||
name: 'DuplicateTrain',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -72,7 +80,7 @@ export default {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handleCommit() {
|
||||
this.model['planId'] = this.$route.query.planId;
|
||||
this.model['planId'] = this.$route.query.planId || this.loadRunPlanId;
|
||||
this.model['serviceNumber'] = this.model.serviceNumber;
|
||||
this.doClose();
|
||||
duplicateService(this.model).then(resp => {
|
||||
|
@ -33,6 +33,14 @@
|
||||
import { updateTripNumber, updateServiceNumber } from '@/api/runplan';
|
||||
export default {
|
||||
name:'ModifyService',
|
||||
props: {
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow:false,
|
||||
@ -66,7 +74,7 @@ export default {
|
||||
handleServiceNumber() {
|
||||
let newValue = parseInt(this.serviceNumber);
|
||||
if (newValue) {
|
||||
if (newValue > 0 & newValue < 9) {
|
||||
if (newValue > 0 & newValue <= 9) {
|
||||
newValue = '00' + newValue;
|
||||
} else if (newValue > 10 & newValue < 99) {
|
||||
newValue = '0' + newValue;
|
||||
@ -78,7 +86,7 @@ export default {
|
||||
if (this.isModifyServiceNumber) {
|
||||
const result = /^\d{2,}$/.test(this.serviceNumber);
|
||||
if (this.serviceNumber && result) {
|
||||
updateServiceNumber(this.$route.query.planId, this.oldServiceNumber, this.serviceNumber).then(res=>{
|
||||
updateServiceNumber(this.$route.query.planId || this.loadRunPlanId, this.oldServiceNumber, this.serviceNumber).then(res=>{
|
||||
this.$message.success('修改计划号成功');
|
||||
// this.$emit('refresh');
|
||||
this.dialogShow = false;
|
||||
@ -94,7 +102,7 @@ export default {
|
||||
const result = /^\d{2,}$/.test(this.tripNumber);
|
||||
if (this.tripNumber && result) {
|
||||
const SDTNumber = this.oldServiceNumber + this.oldTripNumber;
|
||||
updateTripNumber(this.$route.query.planId, SDTNumber, this.tripNumber).then(res=>{
|
||||
updateTripNumber(this.$route.query.planId || this.loadRunPlanId, SDTNumber, this.tripNumber).then(res=>{
|
||||
this.$message.success('修改车次号成功');
|
||||
// this.$emit('refresh');
|
||||
this.dialogShow = false;
|
||||
|
@ -2,7 +2,7 @@
|
||||
<el-dialog :title="title" :visible.sync="dialogShow" custom-class="content-route" width="100%" :fullscreen="true" top="0px" :before-close="close" :z-index="2000" :append-to-body="true">
|
||||
<div class="content-box">
|
||||
<div v-if="type=='generateRouting'">
|
||||
<gernarate-plan ref="gernaratePlanTrain" @close="closeDialog" @mapLoading="mapLoading" />
|
||||
<gernarate-plan ref="gernaratePlanTrain" :load-run-plan-id="loadRunPlanId" @close="closeDialog" @mapLoading="mapLoading" />
|
||||
</div>
|
||||
<jlmap-visual ref="jlmapVisual" v-loading="loadingMap" @onMenu="onContextmenu" @onSelect="clickEvent" />
|
||||
<!-- :style="{height: $store.state.app.height-54+'px' }" -->
|
||||
@ -28,6 +28,12 @@ export default {
|
||||
GernaratePlan
|
||||
},
|
||||
props:{
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default: function() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -18,7 +18,7 @@
|
||||
/>
|
||||
<!-- @touch="trainNumTouch" -->
|
||||
</div>
|
||||
<modify-service ref="modifyService" />
|
||||
<modify-service ref="modifyService" :load-run-plan-id="loadRunPlanId" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -229,7 +229,7 @@ export default {
|
||||
'stations'
|
||||
]),
|
||||
planId() {
|
||||
return this.$route.query.planId;
|
||||
return this.$route.query.planId || this.loadRunPlanId;
|
||||
},
|
||||
maxWidth() {
|
||||
return this.$store.state.app.width;
|
||||
@ -243,7 +243,8 @@ export default {
|
||||
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
||||
},
|
||||
'$store.state.runPlan.refreshCount': function() {
|
||||
if (this.planId || this.loadRunPlanId) {
|
||||
// || this.loadRunPlanId
|
||||
if (this.planId) {
|
||||
this.loadChartPage();
|
||||
}
|
||||
},
|
||||
@ -252,8 +253,8 @@ export default {
|
||||
// this.loadChartPage();
|
||||
// });
|
||||
// },
|
||||
loadRunPlanId() {
|
||||
if (this.planId || this.loadRunPlanId) {
|
||||
planId() {
|
||||
if (this.planId) {
|
||||
this.loadChartPage();
|
||||
} else {
|
||||
this.clearCanvas();
|
||||
@ -268,6 +269,9 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.setPosition();
|
||||
if (this.planId) {
|
||||
this.loadChartPage();
|
||||
}
|
||||
// this.loadChartPage();
|
||||
},
|
||||
beforeDestroy() {
|
||||
@ -316,11 +320,21 @@ export default {
|
||||
});
|
||||
this.myChart.setOption(op, true);
|
||||
}
|
||||
if (this.loadRunPlanId) {
|
||||
this.$store.dispatch('runPlan/setDraftSelected', { serviceNumber: serviceNumber, tripNumber: null });
|
||||
} else {
|
||||
this.$store.dispatch('runPlan/setSelected', { serviceNumber: serviceNumber, tripNumber: null });
|
||||
}
|
||||
|
||||
this.analyticalTripNumber(serviceObj.trainMap || {});
|
||||
},
|
||||
tripNumberChange(row) {
|
||||
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
|
||||
let serviceNumber;
|
||||
if (this.loadRunPlanId) {
|
||||
serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
|
||||
} else {
|
||||
serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
|
||||
}
|
||||
let tripNumber = null;
|
||||
if (row) {
|
||||
const data = [];
|
||||
@ -362,7 +376,12 @@ export default {
|
||||
}, 50);
|
||||
|
||||
}
|
||||
if (this.loadRunPlanId) {
|
||||
this.$store.dispatch('runPlan/setDraftSelected', { serviceNumber: serviceNumber, tripNumber: tripNumber });
|
||||
} else {
|
||||
this.$store.dispatch('runPlan/setSelected', { serviceNumber: serviceNumber, tripNumber: tripNumber });
|
||||
}
|
||||
|
||||
},
|
||||
async analyticalServiceNumber(data) {
|
||||
this.serviceNumberConfig.data = Object.keys(data || {})
|
||||
@ -422,7 +441,11 @@ export default {
|
||||
// });
|
||||
// } else {
|
||||
getPublishMapInfo(this.$route.query.mapId).then(resp => {
|
||||
if (this.loadRunPlanId) {
|
||||
this.mapName = this.$route.query.planName || this.loadRunPlanName || '';
|
||||
} else {
|
||||
this.mapName = `${resp.data.name} (${this.$route.query.planName || this.loadRunPlanName || ''})`;
|
||||
}
|
||||
});
|
||||
// }
|
||||
|
||||
@ -643,7 +666,12 @@ export default {
|
||||
},
|
||||
refreshRunPlanName(name) {
|
||||
getPublishMapInfo(this.$route.query.mapId).then(resp => {
|
||||
if (this.loadRunPlanId) {
|
||||
this.mapName = name;
|
||||
} else {
|
||||
this.mapName = `${resp.data.name} (${name})`;
|
||||
}
|
||||
|
||||
this.myChart.setOption({
|
||||
title: {
|
||||
text: this.mapName,
|
||||
|
@ -2,28 +2,31 @@
|
||||
<div class="plan-tool" style="width: 100%; height: 100%;">
|
||||
<menu-bar
|
||||
ref="menuBar"
|
||||
:load-run-plan-id="loadRunPlanId"
|
||||
@doClose="doClose"
|
||||
@refresh="refresh"
|
||||
@dispatchDialog="dispatchDialog"
|
||||
@loadingRunPlan="loadingRunPlan"
|
||||
@modifyRunPlanName="modifyRunPlanName"
|
||||
/>
|
||||
|
||||
<!-- :load-run-plan-id="loadRunPlanId" -->
|
||||
<!-- @loadingRunPlan="loadingRunPlan" -->
|
||||
<!-- @checkIsLoadRunPlan="checkIsLoadRunPlan" -->
|
||||
<div class="scheduleIn">
|
||||
<schedule
|
||||
ref="schedule"
|
||||
v-loading="runplanLoading"
|
||||
:plan-parser="PlanParser"
|
||||
:load-run-plan-id="loadRunPlanId"
|
||||
:load-run-plan-name="loadRunPlanName"
|
||||
/>
|
||||
<status-bar ref="statusBar" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @showTrain="showTrain" @refresh="refresh" />
|
||||
<!-- :load-run-plan-id="loadRunPlanId" -->
|
||||
<status-bar ref="statusBar" @dispatchDialog="dispatchDialog" @showTrain="showTrain" @refresh="refresh" />
|
||||
<!-- :load-run-plan-id="loadRunPlanId" -->
|
||||
</div>
|
||||
<parameter ref="parameter" />
|
||||
<!-- 删除计划 -->
|
||||
<off-line ref="offLine" @handleConfirm="handleConfirm" @dispatchDialog="dispatchDialog" />
|
||||
<add-planning-train ref="addPlanningTrain" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" />
|
||||
<add-planning-train ref="addPlanningTrain" @dispatchDialog="dispatchDialog" />
|
||||
<!-- :load-run-plan-id="loadRunPlanId" -->
|
||||
<edit-planning-train
|
||||
ref="editPlanningTrain"
|
||||
@dispatchDialog="dispatchDialog"
|
||||
@ -179,10 +182,10 @@ export default {
|
||||
doClose() {
|
||||
this.$emit('doClose');
|
||||
},
|
||||
loadingRunPlan(param) {
|
||||
this.loadRunPlanId = param.planId;
|
||||
this.loadRunPlanName = param.planName;
|
||||
},
|
||||
// loadingRunPlan(param) {
|
||||
// // this.loadRunPlanId = param.planId;
|
||||
// this.loadRunPlanName = param.planName;
|
||||
// },
|
||||
checkIsLoadRunPlan(planId) {
|
||||
// this.refreshRunPlanList(planId === this.loadRunPlanId);
|
||||
},
|
||||
|
@ -133,13 +133,13 @@ export default {
|
||||
default: function() {
|
||||
return { };
|
||||
}
|
||||
},
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default: function() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
// loadRunPlanId: {
|
||||
// type: String,
|
||||
// default: function() {
|
||||
// return '';
|
||||
// }
|
||||
// }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -475,7 +475,7 @@ export default {
|
||||
},
|
||||
// 测试运行图
|
||||
async handleTestRunPlan() {
|
||||
const data = { planId: this.$route.query.planId || this.loadRunPlanId };
|
||||
const data = { planId: this.$route.query.planId };
|
||||
runPlanNotify(data).then(resp => {
|
||||
if (resp.data) {
|
||||
const query = {
|
||||
@ -497,7 +497,7 @@ export default {
|
||||
},
|
||||
// 添加计划
|
||||
handleAddPlanningTrain() {
|
||||
const planId = this.$route.query.planId || this.loadRunPlanId;
|
||||
const planId = this.$route.query.planId;
|
||||
if (planId) {
|
||||
this.$emit('dispatchDialog', { name: 'addPlanningTrain', params: {} });
|
||||
} else {
|
||||
@ -606,9 +606,9 @@ export default {
|
||||
const params = this.$store.state.runPlan.selected;
|
||||
this.$emit('dispatchDialog', { name: 'modifyingBeginTime', params });
|
||||
},
|
||||
loadingRunPlan(param) {
|
||||
this.$emit('loadingRunPlan', param);
|
||||
},
|
||||
// loadingRunPlan(param) {
|
||||
// this.$emit('loadingRunPlan', param);
|
||||
// },
|
||||
// deleteRunPlanOperate(param) {
|
||||
// // 删除运行图
|
||||
// this.$confirm(this.$t('planMonitor.openRunPlan.confirmDeleteRunPlan'), this.$t('tip.hint'), {
|
||||
|
@ -27,12 +27,12 @@ import { UrlConfig } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'PlanStatusBar',
|
||||
props: {
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default() {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
// loadRunPlanId: {
|
||||
// type: String,
|
||||
// default() {
|
||||
// return '';
|
||||
// }
|
||||
// }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -49,7 +49,7 @@ export default {
|
||||
},
|
||||
// 添加计划
|
||||
handleAddPlanningTrain() {
|
||||
const planId = this.$route.query.planId || this.loadRunPlanId;
|
||||
const planId = this.$route.query.planId;
|
||||
if (planId) {
|
||||
this.$emit('dispatchDialog', { name: 'addPlanningTrain', params: {} });
|
||||
} else {
|
||||
@ -57,7 +57,7 @@ export default {
|
||||
}
|
||||
},
|
||||
handleGernarateRouting() {
|
||||
const planId = this.$route.query.planId || this.loadRunPlanId;
|
||||
const planId = this.$route.query.planId;
|
||||
if (planId) {
|
||||
this.$emit('dispatchDialog', { name: 'generateRouting', params: {} });
|
||||
} else {
|
||||
|
@ -33,12 +33,12 @@
|
||||
@dispatchOperate="dispatchOperate"
|
||||
@refresh="refresh"
|
||||
/>
|
||||
<duplicate-train ref="duplicateTrain" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<duplicate-train ref="duplicateTrain" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<move-planing-train ref="movePlaningTrain" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
|
||||
<systerm-out ref="systermOut" />
|
||||
<add-task ref="addTask" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<delete-task ref="deleteTask" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<add-task ref="addTask" :load-run-plan-id="loadRunPlanId" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<delete-task ref="deleteTask" :load-run-plan-id="loadRunPlanId" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<modifying-task ref="modifyingTask" :load-run-plan-id="loadRunPlanId" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
|
||||
<modifying-station-interval-time ref="modifyingStationIntervalTime" />
|
||||
@ -156,12 +156,13 @@ export default {
|
||||
} else if (params.operate == 'DeletePlanningTrain') {
|
||||
// 删除计划
|
||||
const model = {
|
||||
planId: this.$route.query.planId,
|
||||
planId: this.loadRunPlanId,
|
||||
serviceNumber: params.serviceNumber
|
||||
};
|
||||
deletePlanService(model).then(resp => {
|
||||
this.$message.success(this.$t('tip.deletePlanSuccessfully'));
|
||||
this.$store.dispatch('runPlan/setSelected', {});
|
||||
// this.$store.dispatch('runPlan/setSelected', {});
|
||||
this.$store.dispatch('runPlan/setDraftSelected', {});
|
||||
this.$store.dispatch('runPlan/refresh');
|
||||
// this.$refs.openRunPlan.loadRunPlanData(Object.assign({refresh: true}, this.$route.query));
|
||||
}).catch(() => {
|
||||
@ -211,6 +212,7 @@ export default {
|
||||
},
|
||||
refreshRunPlanName(name) {
|
||||
this.$refs.schedule.refreshRunPlanName(name);
|
||||
this.refreshRunPlanList(this.loadRunPlanId);
|
||||
this.$router.replace({ path: this.$route.path, query: { ...this.$route.query, planName: name }});
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,7 @@
|
||||
<el-button type="primary" @click="confirmPublish">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<route-map ref="routeMap" />
|
||||
<route-map ref="routeMap" :load-run-plan-id="loadRunPlanId" />
|
||||
<runplan-config ref="runplanConfig" />
|
||||
</div>
|
||||
</template>
|
||||
@ -567,7 +567,7 @@ export default {
|
||||
},
|
||||
// 添加计划
|
||||
handleAddPlanningTrain() {
|
||||
const planId = this.$route.query.planId || this.loadRunPlanId;
|
||||
const planId = this.loadRunPlanId;
|
||||
if (planId) {
|
||||
this.$emit('dispatchDialog', { name: 'addPlanningTrain', params: {} });
|
||||
} else {
|
||||
|
@ -56,7 +56,7 @@ export default {
|
||||
},
|
||||
// 添加计划
|
||||
handleAddPlanningTrain() {
|
||||
const planId = this.$route.query.planId || this.loadRunPlanId;
|
||||
const planId = this.loadRunPlanId;
|
||||
if (planId) {
|
||||
this.$emit('dispatchDialog', { name: 'addPlanningTrain', params: {} });
|
||||
} else {
|
||||
@ -64,7 +64,7 @@ export default {
|
||||
}
|
||||
},
|
||||
handleGernaratePlanningTrain() {
|
||||
const planId = this.$route.query.planId || this.loadRunPlanId;
|
||||
const planId = this.loadRunPlanId;
|
||||
if (planId) {
|
||||
this.$emit('dispatchDialog', { name: 'gernaratePlanTrain', params: {} });
|
||||
} else {
|
||||
@ -73,7 +73,7 @@ export default {
|
||||
},
|
||||
// 删除计划
|
||||
handleDeletePlanningTrain() {
|
||||
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
|
||||
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
|
||||
if (serviceNumber) {
|
||||
this.$emit('dispatchDialog', {
|
||||
name: 'offLine', params: {
|
||||
@ -90,7 +90,7 @@ export default {
|
||||
}
|
||||
},
|
||||
handleMovePlanningTrain() {
|
||||
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
|
||||
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
|
||||
if (serviceNumber) {
|
||||
this.$emit('dispatchDialog', { name: 'movePlaningTrain', params: { serviceNumber } });
|
||||
} else {
|
||||
@ -99,7 +99,7 @@ export default {
|
||||
},
|
||||
// 复制计划
|
||||
handleDuplicateTrain() {
|
||||
const serviceNumber = this.$store.state.runPlan.selected.serviceNumber;
|
||||
const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber;
|
||||
if (serviceNumber) {
|
||||
this.$emit('dispatchDialog', { name: 'duplicateTrain', params: { serviceNumber } });
|
||||
} else {
|
||||
@ -108,7 +108,7 @@ export default {
|
||||
},
|
||||
// 添加任务
|
||||
handleAddTask() {
|
||||
const params = this.$store.state.runPlan.selected;
|
||||
const params = this.$store.state.runPlan.draftSelected;
|
||||
if (params.serviceNumber && params.tripNumber) {
|
||||
this.$emit('dispatchDialog', { name: 'addTask', params });
|
||||
} else {
|
||||
@ -117,7 +117,7 @@ export default {
|
||||
},
|
||||
// 删除任务
|
||||
handleDeleteTask() {
|
||||
const params = this.$store.state.runPlan.selected;
|
||||
const params = this.$store.state.runPlan.draftSelected;
|
||||
if (params.serviceNumber && params.tripNumber) {
|
||||
this.$emit('dispatchDialog', { name: 'deleteTask', params });
|
||||
} else {
|
||||
@ -126,7 +126,7 @@ export default {
|
||||
},
|
||||
// 修改任务
|
||||
handleModifyingTask() {
|
||||
const params = this.$store.state.runPlan.selected;
|
||||
const params = this.$store.state.runPlan.draftSelected;
|
||||
if (params.serviceNumber && params.tripNumber) {
|
||||
this.$emit('dispatchDialog', { name: 'modifyingTask', params });
|
||||
} else {
|
||||
@ -140,7 +140,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
center: true
|
||||
}).then(() => {
|
||||
clearPlaningData(this.$route.query.planId).then(resp => {
|
||||
clearPlaningData(this.loadRunPlanId).then(resp => {
|
||||
console.log('清除数据成功!');
|
||||
this.$emit('refresh');
|
||||
}).catch(() => {
|
||||
@ -152,7 +152,7 @@ export default {
|
||||
},
|
||||
// 校验运行图
|
||||
handlePlanEffectiveCheck() {
|
||||
const planId = this.$route.query.planId;
|
||||
const planId = this.loadRunPlanId;
|
||||
if (planId) {
|
||||
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||
this.$messageBox(' 功能待完善');
|
||||
|
@ -36,14 +36,21 @@ export default {
|
||||
{
|
||||
title: this.$t('publish.publisherId'),
|
||||
prop: 'userId'
|
||||
// width:'300px'
|
||||
},
|
||||
{
|
||||
title: this.$t('publish.publishTime'),
|
||||
prop: 'publishTime'
|
||||
// width:'200px'
|
||||
},
|
||||
{
|
||||
title: this.$t('publish.publishVersion'),
|
||||
prop: 'version'
|
||||
// width:'200px'
|
||||
},
|
||||
{
|
||||
title: this.$t('publish.publishDescription'),
|
||||
prop: 'note'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
58
src/views/publish/runPlanTemplate/editPlan.vue
Normal file
@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag :title="title" :visible.sync="show" width="30%" :before-close="doClose">
|
||||
<el-form ref="form" :model="formModel" :rules="rules" label-width="140px">
|
||||
<el-form-item :label="$t('publish.runPlanName')" prop="name">
|
||||
<el-input v-model="formModel.name" :placeholder="$t('publish.enterRunPlanName')" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="handleCofirm">{{ $t('global.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
mapIdList: [],
|
||||
formModel: {
|
||||
id: 0,
|
||||
name: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.$t('publish.selectMap');
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
name: [
|
||||
{ required: true, message: this.$t('publish.enterRunPlanName'), trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(row) {
|
||||
this.formModel.id = row.id;
|
||||
this.formModel.name = row.name;
|
||||
this.show = true;
|
||||
},
|
||||
doClose(done) {
|
||||
this.show = false;
|
||||
this.$refs.form.resetFields();
|
||||
},
|
||||
handleCofirm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$emit('confirm', this.formModel);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -2,20 +2,23 @@
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<copy-plan ref="copyPlan" @confirm="handleCopyRunPlan" />
|
||||
<edit-plan ref="editPlan" @confirm="handleUpdateRunPlan" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { superAdmin } from '@/router/index';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
import { runPlanTemplateList, deleteRunPlanTemplate, generateCommonRunPlanEveryDay, postRunPlanTemplate } from '@/api/runplan';
|
||||
import { runPlanTemplateList, deleteRunPlanTemplate, generateCommonRunPlanEveryDay, postRunPlanTemplate, updateTemplateRunPlan } from '@/api/runplan';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import CopyPlan from './copyPlan.vue';
|
||||
import EditPlan from './editPlan.vue';
|
||||
|
||||
export default {
|
||||
name: 'RunPlanTemplate',
|
||||
components: {
|
||||
CopyPlan
|
||||
CopyPlan,
|
||||
EditPlan
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -65,7 +68,7 @@ export default {
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '550',
|
||||
width: '580',
|
||||
hide: () => { return !this.$store.state.user.roles.includes(superAdmin); },
|
||||
buttons: [
|
||||
{
|
||||
@ -78,6 +81,11 @@ export default {
|
||||
handleClick: this.handleCopyPlan,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: '编辑',
|
||||
handleClick: this.handleEdit,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('global.preview'),
|
||||
handleClick: this.handleView,
|
||||
@ -142,6 +150,9 @@ export default {
|
||||
handleCopyPlan(index, row) {
|
||||
this.$refs.copyPlan.doShow({row:row, mapList:this.mapIdList});
|
||||
},
|
||||
handleEdit(index, row) {
|
||||
this.$refs.editPlan.doShow(row);
|
||||
},
|
||||
// 生成每日运行图
|
||||
handleGenerateEveryDay(planId, mapId) {
|
||||
this.$confirm(this.$t('publish.wellGenerateEveryRunPlan'), this.$t('global.tips'), {
|
||||
@ -175,6 +186,16 @@ export default {
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
handleUpdateRunPlan(data) {
|
||||
updateTemplateRunPlan(data).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$refs.editPlan.doClose();
|
||||
this.$message.success('编辑模板运行图成功!');
|
||||
}).catch(e => {
|
||||
this.reloadTable();
|
||||
this.$message.error('编辑模板运行图失败:' + e.message);
|
||||
});
|
||||
},
|
||||
// 预览
|
||||
handleView(index, row) {
|
||||
const data = this.mapIdList.filter(elem=>{ return elem.id == row.mapId; })[0];
|
||||
|
@ -108,7 +108,8 @@ export default {
|
||||
'generateDestination',
|
||||
'switchTurnOperationCanRecoverSplitFault',
|
||||
'holdCommandIgnoreControlMode',
|
||||
'delayWhenCancelRouteWithAbnormalInterlock'
|
||||
'delayWhenCancelRouteWithAbnormalInterlock',
|
||||
'noARB'
|
||||
],
|
||||
selectList: ['runMode'],
|
||||
generalConfig: [
|
||||
@ -149,7 +150,8 @@ export default {
|
||||
'holdCommandIgnoreControlMode',
|
||||
'delayWhenCancelRouteWithAbnormalInterlock',
|
||||
'figuresOfTripNumber',
|
||||
'figuresOfServiceNumber'
|
||||
'figuresOfServiceNumber',
|
||||
'noARB'
|
||||
],
|
||||
rangeList: ['noParkingSM', 'parkingSM'],
|
||||
speedList: ['rmAtpSpeed', 'urmAtpSpeed'],
|
||||
@ -195,7 +197,8 @@ export default {
|
||||
holdCommandIgnoreControlMode: '扣车命令不区分控制模式',
|
||||
delayWhenCancelRouteWithAbnormalInterlock: '取消联锁条件不满足的进路时需要延时解锁',
|
||||
figuresOfTripNumber: '车次号的位数',
|
||||
figuresOfServiceNumber: '服务号的位数'
|
||||
figuresOfServiceNumber: '服务号的位数',
|
||||
noARB: '没有ARB判定'
|
||||
}
|
||||
};
|
||||
},
|
||||
|
@ -1,15 +1,19 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<QueryListPage ref="queryListPage" :query-form="queryForm" :query-list="queryList" />
|
||||
<view-member ref="viewMember" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
import { getExistingSimulation, deleteExistingSimulation } from '@/api/simulation';
|
||||
import ViewMember from './viewMember';
|
||||
// import { getExistingSimulation, deleteExistingSimulation } from '@/api/simulation';
|
||||
import { getExistSimulationList, destroySimulation } from '@/api/rtSimulation';
|
||||
export default {
|
||||
name: 'SimulationManage',
|
||||
components: {
|
||||
ViewMember
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -44,65 +48,52 @@ export default {
|
||||
},
|
||||
simulationTypeList: [{label: '仿真', value: 'SIMULATION'}, {label: '课程', value: 'LESSON'}, {label: '考试', value: 'EXAM'}, {label: '剧本编制', value: 'SCRIPT_MAKING'}],
|
||||
queryList: {
|
||||
query: getExistingSimulation,
|
||||
query: getExistSimulationList,
|
||||
selectCheckShow: false,
|
||||
paginationHiden: true,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
// {
|
||||
// title: this.$t('system.userName'),
|
||||
// prop: 'creator.name'
|
||||
// },
|
||||
{
|
||||
title: this.$t('system.userName'),
|
||||
prop: 'creator.name'
|
||||
title: '仿真ID',
|
||||
prop: 'id'
|
||||
},
|
||||
{
|
||||
title: '仿真状态',
|
||||
prop: 'state',
|
||||
type: 'tag',
|
||||
columnValue: (row) => {
|
||||
if (row.state === 1) { return '仿真开始'; } else if (row.state === 0) { return '仿真暂停'; } else if (row.state === 4) { return '仿真错误'; } else { return '未知状态'; }
|
||||
},
|
||||
tagType: (row) => {
|
||||
return 'success';
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '仿真倍速',
|
||||
prop: 'speed'
|
||||
},
|
||||
// {
|
||||
// title: '类型',
|
||||
// prop: 'type',
|
||||
// type: 'tag',
|
||||
// columnValue: (row) => { return this.$convertField(row.type, this.simulationTypeList, ['value', 'label']); },
|
||||
// tagType: (row) => { return ''; }
|
||||
//
|
||||
// },
|
||||
{
|
||||
title: this.$t('system.mapName'),
|
||||
prop: 'map.name'
|
||||
},
|
||||
{
|
||||
title: 'Group',
|
||||
prop: 'group'
|
||||
},
|
||||
{
|
||||
title: this.$t('system.isError'),
|
||||
prop: 'error',
|
||||
prop: 'map.name',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.error, 'Whether'); },
|
||||
columnValue: (row) => {
|
||||
return `${row.map.name}( ${row.map.id}- ${row.map.version})`;
|
||||
},
|
||||
tagType: (row) => {
|
||||
switch (row.error) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
return 'success';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('system.isSuspend'),
|
||||
prop: 'pause',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.pause, 'Whether'); },
|
||||
tagType: (row) => {
|
||||
switch (row.pause) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('system.isDrivingAsplanned'),
|
||||
prop: 'planRunning',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.planRunning, 'Whether'); },
|
||||
tagType: (row) => {
|
||||
switch (row.runAsPlan) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
prop: 'type',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.type, this.simulationTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('system.prdType'),
|
||||
@ -112,16 +103,21 @@ export default {
|
||||
tagType: (row) => { return ''; }
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('system.simulationGroupId'),
|
||||
prop: 'onlineUserIdList',
|
||||
type: 'basicText',
|
||||
columnValue: (row) => { return this.listJoiningTogether(row.onlineUserIdList); }
|
||||
},
|
||||
// {
|
||||
// title: this.$t('system.simulationGroupId'),
|
||||
// prop: 'userList',
|
||||
// type: 'basicText',
|
||||
// columnValue: (row) => { return this.listJoiningTogether(row.userList); }
|
||||
// },
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
buttons: [
|
||||
{
|
||||
name: '仿真用户信息',
|
||||
handleClick: this.viewMember,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('system.destory'),
|
||||
handleClick: this.handleDelete,
|
||||
@ -146,15 +142,18 @@ export default {
|
||||
this.queryForm.queryObject.prdType.config.data = this.prdTypeList;
|
||||
},
|
||||
methods: {
|
||||
listJoiningTogether(sessionList) {
|
||||
let sessionId = '';
|
||||
if (sessionList && sessionList.length > 0) {
|
||||
sessionList.forEach((item) => {
|
||||
sessionId = sessionId + item + ',';
|
||||
});
|
||||
sessionId = sessionId.substring(0, sessionId.length - 1);
|
||||
}
|
||||
return sessionId;
|
||||
// listJoiningTogether(sessionList) {
|
||||
// let sessionId = '';
|
||||
// if (sessionList && sessionList.length > 0) {
|
||||
// sessionList.forEach((item) => {
|
||||
// sessionId = sessionId + item.name + '(' + item.id + ')' + ',';
|
||||
// });
|
||||
// sessionId = sessionId.substring(0, sessionId.length - 1);
|
||||
// }
|
||||
// return sessionId;
|
||||
// },
|
||||
viewMember(index, row) {
|
||||
this.$refs.viewMember.doShow(row.id);
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
this.$confirm(this.$t('system.wellDelUserSimulation'), this.$t('global.tips'), {
|
||||
@ -162,7 +161,7 @@ export default {
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteExistingSimulation(row.group).then(response => {
|
||||
destroySimulation(row.id).then(response => {
|
||||
this.$message.success(this.$t('system.deleteSuccess'));
|
||||
this.reloadTable();
|
||||
}).catch(() => {
|
||||
|
61
src/views/system/existingSimulation/viewMember.vue
Normal file
@ -0,0 +1,61 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag title="仿真用户列表" :visible.sync="dialogVisible" width="80%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column prop="id" label="用户Id" width="100" />
|
||||
<el-table-column prop="name" label="用户名" width="100" />
|
||||
<el-table-column prop="creator" label="仿真创建者" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.creator? '是':'否' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="wsSubscribeMap" label="订阅路径">
|
||||
<template slot-scope="scope">
|
||||
<template v-for="(item, key) in scope.row.wsSubscribeMap">
|
||||
<div :key="key">{{ key + ':' }}
|
||||
<template v-for="(elem, i) in item">
|
||||
<el-tag :key="key+i">{{ elem }}</el-tag>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSimulationUserInfo } from '@/api/rtSimulation';
|
||||
export default {
|
||||
name: 'DictionaryEdit',
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
tableData: [],
|
||||
title:'',
|
||||
isAdd:false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
doShow(id) {
|
||||
getSimulationUserInfo(id).then(resp => {
|
||||
this.dialogVisible = true;
|
||||
this.tableData = resp.data;
|
||||
}).catch(error => {
|
||||
this.$message.error('获取仿真用户列表失表:' + error.message);
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
BIN
static/jl3d/railway/c.png
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
static/jl3d/raiwaybiao.png
Normal file
After Width: | Height: | Size: 27 KiB |