diff --git a/src/api/rtSimulation.js b/src/api/rtSimulation.js index de35255a2..519419e1a 100644 --- a/src/api/rtSimulation.js +++ b/src/api/rtSimulation.js @@ -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' + }); +} diff --git a/src/api/runplan.js b/src/api/runplan.js index 47c9ec7f5..f0ccc4795 100644 --- a/src/api/runplan.js +++ b/src/api/runplan.js @@ -497,3 +497,11 @@ export function updateRunlevelDistance(mapId) { }); } +// 更新模板运行图的信息 +export function updateTemplateRunPlan (data) { + return request({ + url: `/api/runPlan/template/update`, + method: 'put', + data + }); +} diff --git a/src/api/simulation.js b/src/api/simulation.js index 6c629e360..cf4a1156a 100644 --- a/src/api/simulation.js +++ b/src/api/simulation.js @@ -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({ diff --git a/src/assets/ibp_images/blue_button_pressed.png b/src/assets/ibp_images/blue_button_pressed.png new file mode 100644 index 000000000..d3d347d66 Binary files /dev/null and b/src/assets/ibp_images/blue_button_pressed.png differ diff --git a/src/assets/ibp_images/blue_button_pressed_on.png b/src/assets/ibp_images/blue_button_pressed_on.png new file mode 100644 index 000000000..abc7c26e7 Binary files /dev/null and b/src/assets/ibp_images/blue_button_pressed_on.png differ diff --git a/src/assets/ibp_images/gray_button_pressed.png b/src/assets/ibp_images/gray_button_pressed.png new file mode 100644 index 000000000..a8c7bd7b2 Binary files /dev/null and b/src/assets/ibp_images/gray_button_pressed.png differ diff --git a/src/assets/ibp_images/gray_button_pressed_on.png b/src/assets/ibp_images/gray_button_pressed_on.png new file mode 100644 index 000000000..0ff832252 Binary files /dev/null and b/src/assets/ibp_images/gray_button_pressed_on.png differ diff --git a/src/assets/ibp_images/green_button_pressed.png b/src/assets/ibp_images/green_button_pressed.png new file mode 100644 index 000000000..b8f276dbb Binary files /dev/null and b/src/assets/ibp_images/green_button_pressed.png differ diff --git a/src/assets/ibp_images/green_button_pressed_on.png b/src/assets/ibp_images/green_button_pressed_on.png new file mode 100644 index 000000000..f36b14f9c Binary files /dev/null and b/src/assets/ibp_images/green_button_pressed_on.png differ diff --git a/src/assets/ibp_images/red_button_pressed.png b/src/assets/ibp_images/red_button_pressed.png new file mode 100644 index 000000000..e140c7286 Binary files /dev/null and b/src/assets/ibp_images/red_button_pressed.png differ diff --git a/src/assets/ibp_images/red_button_pressed_on.png b/src/assets/ibp_images/red_button_pressed_on.png new file mode 100644 index 000000000..6540bb3f4 Binary files /dev/null and b/src/assets/ibp_images/red_button_pressed_on.png differ diff --git a/src/assets/ibp_images/yellow_button_pressed.png b/src/assets/ibp_images/yellow_button_pressed.png new file mode 100644 index 000000000..316b43b0d Binary files /dev/null and b/src/assets/ibp_images/yellow_button_pressed.png differ diff --git a/src/assets/ibp_images/yellow_button_pressed_on.png b/src/assets/ibp_images/yellow_button_pressed_on.png new file mode 100644 index 000000000..72003538e Binary files /dev/null and b/src/assets/ibp_images/yellow_button_pressed_on.png differ diff --git a/src/components/QueryListPage/QueryListPage.vue b/src/components/QueryListPage/QueryListPage.vue index 324d21971..ffc413e88 100644 --- a/src/components/QueryListPage/QueryListPage.vue +++ b/src/components/QueryListPage/QueryListPage.vue @@ -377,8 +377,10 @@ export default { query(queryData) { this.queryData = queryData; // this.pageIndex = 1; - this.queryData[this.currentpagerConfig.pageSize] = this.pageSize; - this.queryData[this.currentpagerConfig.pageIndex] = this.pageIndex; + 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; diff --git a/src/i18n/langs/en/publish.js b/src/i18n/langs/en/publish.js index ee6e0bd8b..f54954521 100644 --- a/src/i18n/langs/en/publish.js +++ b/src/i18n/langs/en/publish.js @@ -55,6 +55,7 @@ export default { publisherId: 'Publisher Id', publishTime: 'Time', publishVersion: 'Version', + publishDescription:'Description', lessonDeleteBtn: 'Delete', durationMinutes: ' minutes', copyRunPlan: 'Copy run plan', diff --git a/src/i18n/langs/en/rules.js b/src/i18n/langs/en/rules.js index fa9aceabb..c3d7b29b7 100644 --- a/src/i18n/langs/en/rules.js +++ b/src/i18n/langs/en/rules.js @@ -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', diff --git a/src/i18n/langs/zh/publish.js b/src/i18n/langs/zh/publish.js index d6e3cf067..55ad8fe50 100644 --- a/src/i18n/langs/zh/publish.js +++ b/src/i18n/langs/zh/publish.js @@ -57,6 +57,7 @@ export default { addEveryRunjihuaSuccess: '加载计划创建通用排班计划成功!', publisherId: '发布人id', publishTime: '时间', + publishDescription:'描述', publishVersion: '版本', lessonDeleteBtn: '删除', durationMinutes: '分钟', diff --git a/src/i18n/langs/zh/rules.js b/src/i18n/langs/zh/rules.js index ecfa4ce36..f36a5f876 100644 --- a/src/i18n/langs/zh/rules.js +++ b/src/i18n/langs/zh/rules.js @@ -156,6 +156,7 @@ export default { pleaseSelectCity: '请选择城市', pleaseEnterMapName: '请输入地图名称', + pleaseEnterDescription:'请输入描述', pleaseChooseSkinCode: '请选择皮肤风格', pleaseChooseLineCode:'请选择线路类型', pleaseSelectMapSource: '请选择地图来源', diff --git a/src/ibp/constant/deviceRender.js b/src/ibp/constant/deviceRender.js index d15732b9b..519938c43 100644 --- a/src/ibp/constant/deviceRender.js +++ b/src/ibp/constant/deviceRender.js @@ -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] = { diff --git a/src/ibp/constant/deviceType.js b/src/ibp/constant/deviceType.js index b183e5e12..248bcd454 100644 --- a/src/ibp/constant/deviceType.js +++ b/src/ibp/constant/deviceType.js @@ -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' }; diff --git a/src/ibp/ibpPan.js b/src/ibp/ibpPan.js index c1b457c70..7addeedab 100644 --- a/src/ibp/ibpPan.js +++ b/src/ibp/ibpPan.js @@ -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); } } }); diff --git a/src/ibp/mouseController.js b/src/ibp/mouseController.js index 0c038cf8f..3b9f28122 100644 --- a/src/ibp/mouseController.js +++ b/src/ibp/mouseController.js @@ -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) { diff --git a/src/ibp/shape/alarm.js b/src/ibp/shape/alarm.js index fc6fca8f2..374bf7062 100644 --- a/src/ibp/shape/alarm.js +++ b/src/ibp/shape/alarm.js @@ -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() + } + } } diff --git a/src/ibp/shape/button.js b/src/ibp/shape/button.js index 1db7ad955..0c5ec21d5 100644 --- a/src/ibp/shape/button.js +++ b/src/ibp/shape/button.js @@ -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; } // 设置按钮状态 @@ -85,51 +107,32 @@ 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; diff --git a/src/ibp/shape/circularLamp.js b/src/ibp/shape/circularLamp.js index 66c528b69..e5207f0ab 100644 --- a/src/ibp/shape/circularLamp.js +++ b/src/ibp/shape/circularLamp.js @@ -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); } } } diff --git a/src/ibp/shape/key.js b/src/ibp/shape/key.js index ff40e26dc..3e4477e08 100644 --- a/src/ibp/shape/key.js +++ b/src/ibp/shape/key.js @@ -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; diff --git a/src/jlmap3d/jl3drailwaydrive/jl3drailwaydrive.js b/src/jlmap3d/jl3drailwaydrive/jl3drailwaydrive.js index a8cb07696..a3e3148b0 100644 --- a/src/jlmap3d/jl3drailwaydrive/jl3drailwaydrive.js +++ b/src/jlmap3d/jl3drailwaydrive/jl3drailwaydrive.js @@ -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); } diff --git a/src/jmapNew/mouseController.js b/src/jmapNew/mouseController.js index 2ca7e4804..360f9286f 100644 --- a/src/jmapNew/mouseController.js +++ b/src/jmapNew/mouseController.js @@ -97,23 +97,24 @@ class MouseController extends Eventful { } mousemove(e) { - if (this._dragging) { - const oldX = this._x; - const oldY = this._y; + if (this._dragging) { + const oldX = this._x; + const oldY = this._y; - const dx = e.offsetX - oldX; - const dy = e.offsetY - oldY; + const dx = e.offsetX - oldX; + const dy = e.offsetY - oldY; - this._x = e.offsetX; - this._y = e.offsetY; + this._x = e.offsetX; + this._y = e.offsetY; - if (e.which == 1) { - this._preventDefaultMouseMove && eventTool.stop(e.event); - 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}); - } - } + if (e.which == 1) { + this._preventDefaultMouseMove && eventTool.stop(e.event); + 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; + } + } } mouseup(e) { @@ -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) { - var em = this.checkEvent(e); - this.trigger(this.events.Contextmenu, em); + // 判断是否正在右键拖选 若不是则弹出右键菜单 + if (!this.isMoveRight) { + var em = this.checkEvent(e); + this.trigger(this.events.Contextmenu, em); + } else { + this.isMoveRight = false; + } } moveEvent(e) { diff --git a/src/jmapNew/theme/haerbin_01/menus/dialog/trainControl.vue b/src/jmapNew/theme/haerbin_01/menus/dialog/trainControl.vue index 23073492a..6ba01abb3 100644 --- a/src/jmapNew/theme/haerbin_01/menus/dialog/trainControl.vue +++ b/src/jmapNew/theme/haerbin_01/menus/dialog/trainControl.vue @@ -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; diff --git a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue index 62071d8eb..bbd31fc1e 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue @@ -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 }, diff --git a/src/jmapNew/theme/xian_01/menus/menuStationStand.vue b/src/jmapNew/theme/xian_01/menus/menuStationStand.vue index 846d5bac9..acb8ab036 100644 --- a/src/jmapNew/theme/xian_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/xian_01/menus/menuStationStand.vue @@ -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,8 +190,8 @@ export default { label: 'PSL', handler: this.openPsl } - ] - + ]; + } }, doShow(point) { @@ -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); } } }; diff --git a/src/permission.js b/src/permission.js index 1ae8d6a07..4ca73633e 100644 --- a/src/permission.js +++ b/src/permission.js @@ -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; } diff --git a/src/scripts/ConstDic.js b/src/scripts/ConstDic.js index 42f3f1462..36f459d53 100644 --- a/src/scripts/ConstDic.js +++ b/src/scripts/ConstDic.js @@ -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: '计轴预复零'} }; /** diff --git a/src/store/modules/map.js b/src/store/modules/map.js index de2908330..793d90b86 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -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; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 648fd20ce..11702c286 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -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'; // 杜康 diff --git a/src/views/components/StatusIcon/statusIcon.vue b/src/views/components/StatusIcon/statusIcon.vue index d5f8350f0..2a916e311 100644 --- a/src/views/components/StatusIcon/statusIcon.vue +++ b/src/views/components/StatusIcon/statusIcon.vue @@ -1,17 +1,22 @@ @@ -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; + } diff --git a/src/views/jlmap3d/railwaydrive/drivecontrol/drivecontrol.vue b/src/views/jlmap3d/railwaydrive/drivecontrol/drivecontrol.vue index 7fc7ac786..ca46ce9ab 100644 --- a/src/views/jlmap3d/railwaydrive/drivecontrol/drivecontrol.vue +++ b/src/views/jlmap3d/railwaydrive/drivecontrol/drivecontrol.vue @@ -20,7 +20,7 @@ - + @@ -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'; + diff --git a/src/views/planMonitor/components/menus/addTask.vue b/src/views/planMonitor/components/menus/addTask.vue index 958a8a94f..6f385923d 100644 --- a/src/views/planMonitor/components/menus/addTask.vue +++ b/src/views/planMonitor/components/menus/addTask.vue @@ -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; diff --git a/src/views/planMonitor/components/menus/deleteTask.vue b/src/views/planMonitor/components/menus/deleteTask.vue index 6e4481fdc..ff5ebc600 100644 --- a/src/views/planMonitor/components/menus/deleteTask.vue +++ b/src/views/planMonitor/components/menus/deleteTask.vue @@ -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) diff --git a/src/views/planMonitor/components/menus/duplicateTrain.vue b/src/views/planMonitor/components/menus/duplicateTrain.vue index 2648fd408..fea5e0522 100644 --- a/src/views/planMonitor/components/menus/duplicateTrain.vue +++ b/src/views/planMonitor/components/menus/duplicateTrain.vue @@ -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 => { diff --git a/src/views/planMonitor/components/menus/modifyService.vue b/src/views/planMonitor/components/menus/modifyService.vue index 8762a71ce..6fc8cbd58 100644 --- a/src/views/planMonitor/components/menus/modifyService.vue +++ b/src/views/planMonitor/components/menus/modifyService.vue @@ -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; diff --git a/src/views/planMonitor/components/routingoperate/routeMap.vue b/src/views/planMonitor/components/routingoperate/routeMap.vue index d11373f39..51d720180 100644 --- a/src/views/planMonitor/components/routingoperate/routeMap.vue +++ b/src/views/planMonitor/components/routingoperate/routeMap.vue @@ -2,7 +2,7 @@
- +
@@ -28,6 +28,12 @@ export default { GernaratePlan }, props:{ + loadRunPlanId: { + type: String, + default: function() { + return ''; + } + } }, data() { return { diff --git a/src/views/planMonitor/components/schedule.vue b/src/views/planMonitor/components/schedule.vue index 7fd0de013..f9749df0d 100644 --- a/src/views/planMonitor/components/schedule.vue +++ b/src/views/planMonitor/components/schedule.vue @@ -18,7 +18,7 @@ />
- + @@ -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); } - this.$store.dispatch('runPlan/setSelected', { serviceNumber: serviceNumber, tripNumber: null }); + 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); } - this.$store.dispatch('runPlan/setSelected', { serviceNumber: serviceNumber, tripNumber: tripNumber }); + 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 => { - this.mapName = `${resp.data.name} (${this.$route.query.planName || this.loadRunPlanName || ''})`; + 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 => { - this.mapName = `${resp.data.name} (${name})`; + if (this.loadRunPlanId) { + this.mapName = name; + } else { + this.mapName = `${resp.data.name} (${name})`; + } + this.myChart.setOption({ title: { text: this.mapName, diff --git a/src/views/planMonitor/editTool/index.vue b/src/views/planMonitor/editTool/index.vue index eacb3f77c..ffa48df53 100644 --- a/src/views/planMonitor/editTool/index.vue +++ b/src/views/planMonitor/editTool/index.vue @@ -2,28 +2,31 @@
+ + +
- + + +
- + + { 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'), { diff --git a/src/views/planMonitor/editTool/statusBar.vue b/src/views/planMonitor/editTool/statusBar.vue index 0be1a7380..925498c65 100644 --- a/src/views/planMonitor/editTool/statusBar.vue +++ b/src/views/planMonitor/editTool/statusBar.vue @@ -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 { diff --git a/src/views/planMonitor/newEditTool/index.vue b/src/views/planMonitor/newEditTool/index.vue index b6ce2feeb..5bf6543fb 100644 --- a/src/views/planMonitor/newEditTool/index.vue +++ b/src/views/planMonitor/newEditTool/index.vue @@ -33,12 +33,12 @@ @dispatchOperate="dispatchOperate" @refresh="refresh" /> - + - - + + @@ -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 }}); } } diff --git a/src/views/planMonitor/newEditTool/menuBar.vue b/src/views/planMonitor/newEditTool/menuBar.vue index dbf35e4c2..04370a79a 100644 --- a/src/views/planMonitor/newEditTool/menuBar.vue +++ b/src/views/planMonitor/newEditTool/menuBar.vue @@ -126,7 +126,7 @@ 确 定 - +
@@ -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 { @@ -595,7 +595,7 @@ export default { handleDeletePlanningTrain() { const serviceNumber = this.$store.state.runPlan.draftSelected.serviceNumber; if (serviceNumber) { - this.$emit('dispatchDialog', { + this.$emit('dispatchDialog', { name: 'offLine', params: { type: 'warning', width: 260, diff --git a/src/views/planMonitor/newEditTool/statusBar.vue b/src/views/planMonitor/newEditTool/statusBar.vue index 085d525d1..5314f9626 100644 --- a/src/views/planMonitor/newEditTool/statusBar.vue +++ b/src/views/planMonitor/newEditTool/statusBar.vue @@ -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(' 功能待完善'); diff --git a/src/views/publish/publishMap/list.vue b/src/views/publish/publishMap/list.vue index b710826d2..d72438a40 100644 --- a/src/views/publish/publishMap/list.vue +++ b/src/views/publish/publishMap/list.vue @@ -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' } ] }, diff --git a/src/views/publish/runPlanTemplate/editPlan.vue b/src/views/publish/runPlanTemplate/editPlan.vue new file mode 100644 index 000000000..31b0f2ba7 --- /dev/null +++ b/src/views/publish/runPlanTemplate/editPlan.vue @@ -0,0 +1,58 @@ + + + diff --git a/src/views/publish/runPlanTemplate/index.vue b/src/views/publish/runPlanTemplate/index.vue index a09b8fdae..10e9a62f7 100644 --- a/src/views/publish/runPlanTemplate/index.vue +++ b/src/views/publish/runPlanTemplate/index.vue @@ -2,20 +2,23 @@
+
diff --git a/static/jl3d/railway/c.png b/static/jl3d/railway/c.png new file mode 100644 index 000000000..2d87a4de6 Binary files /dev/null and b/static/jl3d/railway/c.png differ diff --git a/static/jl3d/raiwaybiao.png b/static/jl3d/raiwaybiao.png new file mode 100644 index 000000000..b7ac6831b Binary files /dev/null and b/static/jl3d/raiwaybiao.png differ