From e9e0d39bfc150748f42264dc06d49a93c7794877 Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Tue, 27 Oct 2020 16:51:57 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=8A=B6=E6=80=81?=
=?UTF-8?q?=E5=A4=9A=E4=BD=99=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/jmapNew/map.js | 7 +-
src/jmapNew/mouseController.js | 6 +-
src/store/modules/exam.js | 6 -
src/store/modules/ibp.js | 16 -
src/store/modules/iscs.js | 129 -------
src/store/modules/map.js | 327 +-----------------
src/store/modules/order.js | 6 +-
src/store/modules/rpTools.js | 26 +-
src/store/modules/settings.js | 30 +-
src/store/modules/socket.js | 1 -
src/store/modules/training.js | 114 +++---
src/store/modules/trainingList.js | 30 --
src/utils/baseUrl.js | 4 +-
src/utils/loaddata.js | 4 +-
src/views/newMap/jlmapNew/index.vue | 2 +-
.../newMapdraft/mapoperate/checkboxDraft.vue | 2 +-
16 files changed, 110 insertions(+), 600 deletions(-)
diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js
index 085be1252..1fe49d8ea 100644
--- a/src/jmapNew/map.js
+++ b/src/jmapNew/map.js
@@ -338,7 +338,7 @@ class Jlmap {
});
}
setUpdateMapDevice(list) {
- store.dispatch('map/updateMapDevice', list);
+ store.commit('map/updateMapDevice', list);
(list || []).forEach(elem => {
const code = elem.code;
const type = elem._type;
@@ -483,8 +483,7 @@ class Jlmap {
} else {
if (elem.deviceType === 'TRAIN') {
this.isUpdateShowTrainList = true;
- store.dispatch('map/updateActiveTrainList', elem);
- // store.dispatch('map/updateTrainState', elem);
+ store.commit('map/updateActiveTrainList', elem);
} else if (elem.deviceType === 'STAND') {
store.dispatch('map/updateStationStand', elem);
const psdDevice = this.mapDevice[this.mapDevice[elem.code].psdCode];
@@ -505,9 +504,7 @@ class Jlmap {
if (elem.dispose) {
this.$painter.delete(oDevice);
} else {
- // if (this.hookHandle(oDevice, elem)) {
this.$painter.update(oDevice);
- // }
}
}
});
diff --git a/src/jmapNew/mouseController.js b/src/jmapNew/mouseController.js
index 4b7918e82..7ef0a8514 100644
--- a/src/jmapNew/mouseController.js
+++ b/src/jmapNew/mouseController.js
@@ -85,8 +85,8 @@ class MouseController extends Eventful {
mousedown(e) {
// if (eventTool.notLeftMouse(e)) {
// return;
- // }
- this.$zr.dom.focus();
+ // }
+ this.$zr.dom.focus();
if (e.which == 1 || e.which == 3) {
var x = e.offsetX;
var y = e.offsetY;
@@ -287,7 +287,7 @@ class MouseController extends Eventful {
}
});
this.deviceList = includeDeviceList;
- store.dispatch('map/setSeclectDeviceList', this.deviceList); // 给store设置框选的 model
+ store.commit('map/setSeclectDeviceList', this.deviceList); // 给store设置框选的 model
}
// 生成包围盒对象坐标
createFakeBoundingRect(instance) {
diff --git a/src/store/modules/exam.js b/src/store/modules/exam.js
index 989b6197c..bb9c3ee5e 100644
--- a/src/store/modules/exam.js
+++ b/src/store/modules/exam.js
@@ -74,15 +74,9 @@ const exam = {
actions: {
start({ commit }) {
commit('setStarted', true);
- // commit('setSuspend', false);
- // commit('setUsedTime', 0);
- // commit('countUsedTime');
},
over({ commit }) {
commit('setStarted', false);
- // commit('setSuspend', true);
- // commit('setUsedTime', 0);
- // commit('stopCountTime');
},
isOver() {
const trainingList = store.getters['trainingList/trainingList'];
diff --git a/src/store/modules/ibp.js b/src/store/modules/ibp.js
index d626b5d05..9523c8a17 100644
--- a/src/store/modules/ibp.js
+++ b/src/store/modules/ibp.js
@@ -8,33 +8,17 @@ const ibp = {
state: {
ibp: null, // 数据
- ibpDevice: {}, // 解析后的地图数据
- ibpList: {}, // 数据列表
- ibpIdList: {}, // 数据列表(以id为标识)
updateDeviceData: {}, // 修改的数据
rightClickCount: 0, // 右键点击设备
ibpBgDevice: {} // ibp背景设备
},
getters: {
- ibpList: (state) => {
- return state.ibpList;
- },
ibp: (state) => {
return state.ibp;
},
- version: (state) => {
- if (state.ibp) {
- return state.ibp.version;
- } else {
- return null;
- }
- },
updateDeviceData: (state) => {
return state.updateDeviceData;
- },
- ibpBgDevice: (state) => {
- return state.ibpBgDevice;
}
},
diff --git a/src/store/modules/iscs.js b/src/store/modules/iscs.js
index aa333aa99..73fdd0715 100644
--- a/src/store/modules/iscs.js
+++ b/src/store/modules/iscs.js
@@ -7,9 +7,6 @@ const iscs = {
state: {
iscs: null, // 数据
- iscsDevice: {}, // 解析后的地图数据
- iscsList: {}, // 数据列表
- iscsIdList: {}, // 数据列表(以id为标识)
updateDeviceData: {}, // 修改的数据
rightClickCount: 0, // 右键点击设备
selected: '', // 左键选中设备
@@ -19,134 +16,8 @@ const iscs = {
},
getters: {
- incidentList: (state) => {
- return state.incidentList;
- },
- alarmList: (state) => {
- return state.alarmList;
- },
- iscsList: (state) => {
- return state.iscsList;
- },
- iscs: (state) => {
- return state.iscs;
- },
- version: (state) => {
- if (state.iscs) {
- return state.iscs.version;
- } else {
- return null;
- }
- },
updateDeviceData: (state) => {
return state.updateDeviceData;
- },
- iscsGroupList: (state) => {
- if (state.iscs) {
- return state.iscs.iscsGroupList || [];
- } else {
- return [];
- }
- },
- vidiconList: (state) => {
- if (state.iscs) {
- return state.iscs.vidiconList;
- } else {
- return [];
- }
- },
- vidiconCloudList: (state) => {
- if (state.iscs.vidiconCloudList) {
- return state.iscs.vidiconCloudList;
- } else {
- return [];
- }
- },
- frozenPumpList:(state)=>{
- if (state.iscs.frozenPumpList) {
- return state.iscs.frozenPumpList;
- } else {
- return [];
- }
- },
- airConditionerList:(state)=>{
- if (state.iscs.airConditionerList) {
- return state.iscs.airConditionerList;
- } else {
- return [];
- }
- },
- tunnelFanList:(state)=>{
- if (state.iscs.tunnelFanList) {
- return state.iscs.tunnelFanList;
- } else {
- return [];
- }
- },
- orbitalVentilatorList:(state)=>{
- if (state.iscs.orbitalVentilatorList) {
- return state.iscs.orbitalVentilatorList;
- } else {
- return [];
- }
- },
- smookProofFdList:(state)=>{
- if (state.iscs.smookProofFdList) {
- return state.iscs.smookProofFdList;
- } else {
- return [];
- }
- },
- chillerList:(state)=>{
- if (state.iscs.chillerList) {
- return state.iscs.chillerList;
- } else {
- return [];
- }
- },
- coolTowerList:(state)=>{
- if (state.iscs.coolTowerList) {
- return state.iscs.coolTowerList;
- } else {
- return [];
- }
- },
- fireDamperList:(state)=>{
- if (state.iscs.fireDamperList) {
- return state.iscs.fireDamperList;
- } else {
- return [];
- }
- },
- jetFanList:(state)=>{
- if (state.iscs.jetFanList) {
- return state.iscs.jetFanList;
- } else {
- return [];
- }
- },
- ventilatorList:(state)=>{
- if (state.iscs.ventilatorList) {
- return state.iscs.ventilatorList;
- } else {
- return [];
- }
- },
- arcStatusList:(state)=>{
- if (state.iscs.arcStatusList) {
- return state.iscs.arcStatusList;
- } else {
- return [];
- }
- },
- selected: (state) => {
- return state.selected;
- },
- selectedCount: (state) => {
- return state.selectedCount;
- },
- getDeviceByCode: (state) => (code) => {
- return state.iscsDevice[code];
}
},
diff --git a/src/store/modules/map.js b/src/store/modules/map.js
index 9633d0a7b..d92b2393d 100644
--- a/src/store/modules/map.js
+++ b/src/store/modules/map.js
@@ -1,5 +1,4 @@
import deviceType from '@/jmapNew/constant/deviceType';
-// import { parser, updateMapData } from '@/jmap/utils/parser';
import { parser, updateMapData } from '@/jmapNew/utils/parser';
import Vue from 'vue';
import { deepAssign } from '@/utils/index';
@@ -237,101 +236,23 @@ const map = {
holdStatus: false, // 是否有扣车状态
jumpStandList: [], // 跳停站台列表
jumpStatus: false, // 是否有跳停状态
- selectDeviceFlag: false, // 设备管理激活判断
+ // selectDeviceFlag: false, // 设备管理激活判断
keyboardEnterCount: 0, // 键盘enter键触发
controlTransfer:[] // 控制权转移消息
},
getters: {
- mapList: (state) => {
- return state.mapList;
- },
- trainWindowSectionCode: (state) => {
- return state.trainWindowSectionCode;
- },
- mapConfig: (state) => {
- return state.mapConfig;
- },
- routeList: (state) => {
- return state.routeList;
- },
- routeData: (state) => {
- return state.routeData;
- },
- routeStartSignalData: (state) => {
- if (state.map) {
- return state.map.routeStartSignalData || {};
- } else {
- return {};
- }
- },
- overlapData: (state) => {
- return state.overlapData;
- },
autoReentryData: (state) => {
return state.autoReentryData;
},
- autoReentryList: (state) => {
- return state.autoReentryList;
- },
- signalApproachSectionData: (state) => {
- return state.signalApproachSectionData;
- },
- signalApproachSectionList: (state) => {
- return state.signalApproachSectionList;
- },
- seclectDeviceList: (state) => {
- return state.seclectDeviceList;
- },
- stepData: (state) => {
- return state.stepData;
- },
- recoverStepData: (state) => {
- return state.recoverStepData;
- },
map: (state) => {
return state.map;
},
- psdList: (state) => {
- if (state.map) {
- return state.map.psdList;
- } else {
- return [];
- }
- },
- espList: (state) => {
- if (state.map) {
- return state.map.espList;
- } else {
- return [];
- }
- },
lineCode: (state) => {
if (state.map && state.map.skinVO) {
return state.map.skinVO.code;
}
},
- name: (state) => {
- if (state.map) {
- return state.map.name;
- } else {
- return null;
- }
- },
- version: (state) => {
- if (state.map) {
- return state.version;
- } else {
- return null;
- }
- },
- linkList: (state) => {
- if (state.map) {
- return state.map.linkList;
- } else {
- return [];
- }
- },
switchList: (state) => {
if (state.map) {
return state.map.switchList;
@@ -339,20 +260,6 @@ const map = {
return [];
}
},
- floodGateList: (state) => {
- if (state.map) {
- return state.map.floodGateList;
- } else {
- return [];
- }
- },
- buttonList: (state) => {
- if (state.map) {
- return state.map.buttonList;
- } else {
- return [];
- }
- },
signalList: (state) => {
if (state.map) {
return state.map.signalList;
@@ -367,104 +274,6 @@ const map = {
return [];
}
},
- zcList: (state) => {
- if (state.map) {
- return state.map.zcList;
- } else {
- return [];
- }
- },
- powerLineList: (state) => {
- if (state.map) {
- return state.map.powerLineList || [];
- } else {
- return [];
- }
- },
- tempSpeedLimitList: (state) => {
- if (state.map) {
- return state.map.tempSpeedLimitList;
- } else {
- return [];
- }
- },
- lcList: (state) => {
- if (state.map) {
- return state.map.lcList;
- } else {
- return [];
- }
- },
- tbStrategyList: (state) => {
- if (state.map) {
- return state.map.tbStrategyList || [];
- } else {
- return [];
- }
- },
- axleCounterResetButtonList: (state) => {
- if (state.map) {
- return state.map.axleCounterResetButtonList || [];
- } else {
- return [];
- }
- },
- totalGuideLockButtonVOList: (state) => {
- if (state.map) {
- return state.map.totalGuideLockButtonVOList || [];
- } else {
- return [];
- }
- },
- cycleButtonList: (state) => {
- if (state.map) {
- return state.map.cycleButtonList || [];
- } else {
- return [];
- }
- },
- outerFrameList: (state) => {
- if (state.map) {
- return state.map.outerFrameList || [];
- } else {
- return [];
- }
- },
- bigScreenConfig: (state) => {
- if (state.map) {
- return state.map.bigScreenConfig || {};
- } else {
- return {};
- }
- },
- indicatorLightList: (state) => {
- if (state.map) {
- return state.map.indicatorLightList || [];
- } else {
- return [];
- }
- },
- splitStationList: (state) => {
- if (state.map) {
- return state.map.splitStationList || [];
- } else {
- return [];
- }
- },
- automaticRouteButtonList: (state) => {
- if (state.map) {
- return state.map.automaticRouteButtonList || [];
- } else {
- return [];
- }
- },
- resourceList: (state) => {
- if (state.map) {
- return state.map.resourceList;
- } else {
- return [];
- }
- },
stationList: (state) => {
if (state.map) {
return state.map.stationList;
@@ -472,13 +281,6 @@ const map = {
return [];
}
},
- stationStandList: (state) => {
- if (state.map) {
- return state.map.stationStandList;
- } else {
- return [];
- }
- },
stationControlList: (state) => {
if (state.map) {
return state.map.stationControlList;
@@ -486,41 +288,6 @@ const map = {
return [];
}
},
- counterList: (state) => {
- if (state.map) {
- return state.map.counterList;
- } else {
- return [];
- }
- },
- delayShowList: (state) => {
- if (state.map) {
- return state.map.delayShowList;
- } else {
- return [];
- }
- },
- lineList: (state) => {
- if (state.map) {
- return state.map.lineList;
- } else {
- return [];
- }
- },
- arrowList: (state) => {
- if (state.map) {
- return state.map.arrowList || [];
- } else {
- return [];
- }
- },
- textList: (state) => {
- if (state.map) {
- return state.map.textList;
- } else {
- return [];
- }
- },
trainWindowList: (state) => {
if (state.map) {
return state.map.trainWindowList;
@@ -528,36 +295,6 @@ const map = {
return [];
}
},
- trainList: (state) => {
- if (state.map) {
- return state.map.trainList;
- } else {
- return [];
- }
- },
- trainModelList: (state) => {
- if (state.map) {
- return state.map.trainModelList;
- } else {
- return [];
- }
- },
- directionRodList: (state) => {
- if (state.map) {
- return state.map.directionRodList;
- } else {
- return [];
- }
- },
- trainDetails: (state) => {
- return state.trainDetails;
- },
- flankProtectList: (state) => {
- return state.flankProtectList;
- },
- mapDevice: (state) => {
- return state.mapDevice;
- },
getDeviceByCode: (state) => (code) => {
return state.mapDevice[code];
},
@@ -596,22 +333,6 @@ const map = {
return device;
},
- // 查询所属车站关联的控制模式
- getStationControlByStationCode: (state) => (code) => {
- let device = null;
- if (code &&
- state.map &&
- state.map.stationControlList && state.map.stationControlList.length) {
- state.map.stationControlList.forEach(elem => {
- if (elem.stationCode == code) {
- device = state.mapDevice[elem.code];
- }
- });
- }
-
- return device;
- },
-
// 查询所属车站的控制模式
getDeviceStationCodeByStationCode: (state) => (code) => {
let device = null;
@@ -654,6 +375,7 @@ const map = {
},
mutations: {
+ // 设置地图数据
setMapData: (state, map) => {
if (map && map.skinVO) {
state.map = map;
@@ -673,12 +395,15 @@ const map = {
state.mapDevice[elem.code] = deepAssign(state.mapDevice[elem.code] || {}, elem);
});
},
+ // 设置地图所属线路
setMapConfig: (state, config) => {
state.mapConfig = config;
},
+ // 获取包围框选中元素列表
setSeclectDeviceList: (state, list) => {
state.seclectDeviceList = list;
},
+ // 设置缩放位置
setDataZoom: (state, dataZoom) => {
state.dataZoom = dataZoom;
},
@@ -784,6 +509,7 @@ const map = {
setMousemove: (state) => {
state.mousemove++;
},
+ // 设置进路数据
setRouteData: (state, routeDataList) => {
state.routeData = {};
state.routeStartSignalData = {};
@@ -830,11 +556,6 @@ const map = {
updateAutoReentryState: (state, status) => {
state.autoReentryData[status.code] = deepAssign(state.autoReentryData[status.code], status);
},
- // updateTrainState:(state, status) =>{
- // if (state.map.trainList) {
- // state.map.trainList[parseInt(status.code) - 1] = deepAssign(state.map.trainList[parseInt(status.code) - 1] || {}, status);
- // }
- // },
updateStationStand: (state, status) => {
const holdIndex = state.holdStandList.indexOf(status.code);
const jumpIndex = state.jumpStandList.indexOf(status.code);
@@ -870,6 +591,7 @@ const map = {
}
});
},
+ // 更新激活的列车信息
updateActiveTrainList: (state, data)=>{
let isExist = false;
state.activeTrainList.forEach(elem => {
@@ -899,31 +621,12 @@ const map = {
},
actions: {
- mapClear: ({ commit }) => {
+ setMapData:({ commit }, mapData) => {
+ commit('setMapData', mapData);
+ },
+ mapClear:({ commit }) => {
commit('mapClear');
},
- // 获取包围框选中元素列表
- setSeclectDeviceList: ({ commit }, list) => {
- commit('setSeclectDeviceList', list);
- },
-
- // 设置缩放位置
- updateZoom: ({ commit }, dataZoom) => {
- commit('setDataZoom', dataZoom);
- },
-
- setMapData: ({ commit }, map) => { // 设置地图数据
- commit('setMapData', map);
- },
- updateMapDevice: ({ commit }, list) => {
- commit('updateMapDevice', list);
- },
- setMapConfig: ({ commit }, config) => { // 设置地图所属线路
- commit('setMapConfig', config);
- },
- setRouteData: ({ commit }, routeData) => { // 设置进路数据
- commit('setRouteData', routeData);
- },
setOverlapData: ({ commit }, overlapData) => {
commit('setOverlapData', overlapData);
commit('mapRender', overlapData);
@@ -940,9 +643,6 @@ const map = {
updateAutoReentryState: ({ commit }, status) => {
commit('updateAutoReentryState', status);
},
- // updateTrainState:({ commit }, status) => {
- // commit('updateTrainState', status);
- // },
updateStationStand: ({ commit }, status) => {
commit('updateStationStand', status);
},
@@ -970,11 +670,6 @@ const map = {
}
},
- // 更新激活的列车信息
- updateActiveTrainList:({ commit }, train) => {
- commit('updateActiveTrainList', train);
- },
-
setMapDataIdList: ({ state }, data) => {
state.mapIdList[`mapDate_${data.mapId}`] = data.mapData;
},
diff --git a/src/store/modules/order.js b/src/store/modules/order.js
index b85a0ddf6..640e400ab 100644
--- a/src/store/modules/order.js
+++ b/src/store/modules/order.js
@@ -7,9 +7,9 @@ const order = {
orderList: [] // 选中的商品列表,
},
getters: {
- orderList: (state)=>{
- return state.orderList;
- }
+ // orderList: (state)=>{
+ // return state.orderList;
+ // }
},
mutations: {
setOrderList: (state, orderList) => {
diff --git a/src/store/modules/rpTools.js b/src/store/modules/rpTools.js
index 640a5a80f..63267e92b 100644
--- a/src/store/modules/rpTools.js
+++ b/src/store/modules/rpTools.js
@@ -9,20 +9,20 @@ const runPlan = {
planLoadedCount: 0, // 运行图数据更新
planUpdateCount: 0, // 运行图更新标识
selected: {}, // 选择的对象
- refreshCount: 0, // 刷新页面重新加载
- width: 800, // 运行图canvas 容器 宽度
- height: 600, // 运行图canvas 容器 高度
+ refreshCount: 0, // 刷新页面重新加载
+ width: 800, // 运行图canvas 容器 宽度
+ height: 600 // 运行图canvas 容器 高度
},
getters: {
stations: (state) => {
return state.stations || [];
- },
- planData: (state) => {
- return state.planData || [];
- }
+ },
+ planData: (state) => {
+ return state.planData || [];
+ }
},
mutations: {
- setWidth: (state, width) => {
+ setWidth: (state, width) => {
state.width = width;
state.planSizeCount += 1;
},
@@ -51,11 +51,11 @@ const runPlan = {
}
},
actions: {
- /** 更新数据*/
- updateRunPlanData: ({ commit }, data) => {
- commit('updateRunPlanData', data);
- },
- /** 设置运行图大小*/
+ /** 更新数据*/
+ updateRunPlanData: ({ commit }, data) => {
+ commit('updateRunPlanData', data);
+ },
+ /** 设置运行图大小*/
resize({ commit }, opt) {
if (opt.width) {
commit('setWidth', opt.width);
diff --git a/src/store/modules/settings.js b/src/store/modules/settings.js
index d3fea1a27..5c49ad70f 100644
--- a/src/store/modules/settings.js
+++ b/src/store/modules/settings.js
@@ -3,29 +3,29 @@ import defaultSettings from '@/settings';
const { showSettings, fixedHeader, sidebarLogo } = defaultSettings;
const state = {
- showSettings: showSettings,
- fixedHeader: fixedHeader,
- sidebarLogo: sidebarLogo
+ showSettings: showSettings,
+ fixedHeader: fixedHeader,
+ sidebarLogo: sidebarLogo
};
const mutations = {
- CHANGE_SETTING: (state, { key, value }) => {
- if (state.hasOwnProperty(key)) {
- state[key] = value;
- }
- }
+ CHANGE_SETTING: (state, { key, value }) => {
+ if (state.hasOwnProperty(key)) {
+ state[key] = value;
+ }
+ }
};
const actions = {
- changeSetting({ commit }, data) {
- commit('CHANGE_SETTING', data);
- }
+ changeSetting({ commit }, data) {
+ commit('CHANGE_SETTING', data);
+ }
};
export default {
- namespaced: true,
- state,
- mutations,
- actions
+ namespaced: true,
+ state,
+ mutations,
+ actions
};
diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js
index f40fc82c7..dc4a9f79e 100644
--- a/src/store/modules/socket.js
+++ b/src/store/modules/socket.js
@@ -240,7 +240,6 @@ const socket = {
simulationStart: '', // 仿真-开始消息
simulationOver:0, // 退出仿真推送消息
simulationReset: 0, // 仿真-异常消息
- // coversitionList:{}, // 历史仿真-用户消息列表
inviteSimulationConversition: {}, // 仿真会话邀请消息
acceptConversionInvite:{}, // 仿真会话成员接收邀请
createConversition:{}, // 仿真创建会话
diff --git a/src/store/modules/training.js b/src/store/modules/training.js
index 6e58f27d7..21bb1475c 100644
--- a/src/store/modules/training.js
+++ b/src/store/modules/training.js
@@ -48,51 +48,51 @@ const training = {
},
getters: {
- steps: (state) => {
- return state.steps;
- },
- order: (state) => {
- return state.order;
- },
- offsetStationCode: (state) => {
- return state.offsetStationCode;
- },
+ // steps: (state) => {
+ // return state.steps;
+ // },
+ // order: (state) => {
+ // return state.order;
+ // },
+ // offsetStationCode: (state) => {
+ // return state.offsetStationCode;
+ // },
basicInfo: (state) => {
return state.basicInfo;
},
- mode: (state) => {
- return state.mode;
- },
- operatemode: (state) => {
- return state.operatemode;
- },
- started: (state) => {
- return state.started;
- },
- score: (state) => {
- return state.score;
- },
- usedTime: (state) => {
- return state.usedTime;
- },
- tipEvent: (state) => {
- return state.tipEvent;
- },
- initTime: (state) => {
- return state.initTime;
- },
- prdType: (state) => {
- return state.prdType;
- },
- roles: (state) => {
- return state.roles;
- },
- memberList: (state) => {
- return state.memberList;
- },
- simulationUserList: (state) => {
- return state.simulationUserList;
- },
+ // mode: (state) => {
+ // return state.mode;
+ // },
+ // operatemode: (state) => {
+ // return state.operatemode;
+ // },
+ // started: (state) => {
+ // return state.started;
+ // },
+ // score: (state) => {
+ // return state.score;
+ // },
+ // usedTime: (state) => {
+ // return state.usedTime;
+ // },
+ // tipEvent: (state) => {
+ // return state.tipEvent;
+ // },
+ // initTime: (state) => {
+ // return state.initTime;
+ // },
+ // prdType: (state) => {
+ // return state.prdType;
+ // },
+ // roles: (state) => {
+ // return state.roles;
+ // },
+ // memberList: (state) => {
+ // return state.memberList;
+ // },
+ // simulationUserList: (state) => {
+ // return state.simulationUserList;
+ // },
// 视图中的列车列表
viewTrainList: (state) => () =>{
const trainList = [];
@@ -104,22 +104,22 @@ const training = {
});
return trainList;
- },
- commonMenuStep: (state) => {
- return state.commonMenuStep;
- },
- scriptQuitCount: (state) => {
- return state.scriptQuitCount;
- },
- scriptOperationType: (state) => {
- return state.scriptOperationType;
- },
- triggerFaultCount: (state) => {
- return state.triggerFaultCount;
- },
- triggerFaultDevice: (state) => {
- return state.triggerFaultDevice;
}
+ // commonMenuStep: (state) => {
+ // return state.commonMenuStep;
+ // },
+ // scriptQuitCount: (state) => {
+ // return state.scriptQuitCount;
+ // },
+ // scriptOperationType: (state) => {
+ // return state.scriptOperationType;
+ // },
+ // triggerFaultCount: (state) => {
+ // return state.triggerFaultCount;
+ // },
+ // triggerFaultDevice: (state) => {
+ // return state.triggerFaultDevice;
+ // }
},
mutations: {
diff --git a/src/store/modules/trainingList.js b/src/store/modules/trainingList.js
index ce4ba205c..f29494ab0 100644
--- a/src/store/modules/trainingList.js
+++ b/src/store/modules/trainingList.js
@@ -8,22 +8,6 @@ const trainingList = {
getters: {
trainingList: (state) => {
return state.trainingList;
- },
- prevTraining: (state) => () => {
- if (state.trainingList && state.trainingList.length > 0) {
- state.index = state.index - 1;
- if (state.index >= 0) {
- return state.trainingList[state.index];
- }
- }
- },
- nextTraining: (state) => () => {
- if (state.trainingList && state.trainingList.length > 0) {
- state.index = state.index + 1;
- if (state.index < state.trainingList.length) {
- return state.trainingList[state.index];
- }
- }
}
},
mutations: {
@@ -39,20 +23,6 @@ const trainingList = {
}
},
actions: {
- setIndex({ commit }, index) {
- commit('setIndex', index);
- },
- setIndexByTrainingObj({ commit, state }, trainingId) {
- let index = 0;
- if (state.trainingList && state.trainingList.length) {
- state.trainingList.forEach((elem, i) => {
- if (elem.id === trainingId) {
- index = i;
- }
- });
- }
- commit('setIndex', index);
- },
setTrainingList({ commit }, trainingList) {
commit('setTrainingList', trainingList);
},
diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js
index d73c13463..5c17a46dd 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.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.169:9000'; // 旭强
// BASE_API = 'http://192.168.3.175:9000'; // 张赛
- BASE_API = 'http://192.168.3.82:9000'; // 杜康
+ // BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
diff --git a/src/utils/loaddata.js b/src/utils/loaddata.js
index 594b1d12d..687757f2e 100644
--- a/src/utils/loaddata.js
+++ b/src/utils/loaddata.js
@@ -81,12 +81,12 @@ export function covertData(resp, type, resolve) {
overlapData.forEach(item => {
item._type = 'OverAp';
});
- store.dispatch('map/setRouteData', routeData);
+ store.commit('map/setRouteData', routeData);
store.dispatch('map/setOverlapData', overlapData);
store.dispatch('map/setAutoReentryData', autoReentryData);
store.dispatch('map/setSignalApproachSectionData', signalApproachSectionData);
const mapConfig = resp.data.configVO;
- store.dispatch('map/setMapConfig', mapConfig);
+ store.commit('map/setMapConfig', mapConfig);
store.dispatch('map/setMapVersion', resp.data.version);
}
diff --git a/src/views/newMap/jlmapNew/index.vue b/src/views/newMap/jlmapNew/index.vue
index dbe291f31..097984cf4 100644
--- a/src/views/newMap/jlmapNew/index.vue
+++ b/src/views/newMap/jlmapNew/index.vue
@@ -377,7 +377,7 @@ export default {
offsetX: this.dataZoom.offsetX,
lineCode: lineCode
};
- this.$store.dispatch('map/updateZoom', this.dataZoom);
+ this.$store.commit('map/setDataZoom', this.dataZoom);
localStore.set(`scaleRate_${lineCode}`, JSON.stringify(param)); // 保存缩放倍数
}
diff --git a/src/views/newMap/newMapdraft/mapoperate/checkboxDraft.vue b/src/views/newMap/newMapdraft/mapoperate/checkboxDraft.vue
index 0104ff4ea..00ba58821 100644
--- a/src/views/newMap/newMapdraft/mapoperate/checkboxDraft.vue
+++ b/src/views/newMap/newMapdraft/mapoperate/checkboxDraft.vue
@@ -154,7 +154,7 @@ export default {
},
clearList() { // 清空数据
this.stationCode = '';
- this.$store.dispatch('map/setSeclectDeviceList', []);
+ this.$store.commit('map/setSeclectDeviceList', []);
this.seclectDeviceList = [];
this.modelList = [
{
From 85216079e4b87862fce9049bbb1ad55887103c24 Mon Sep 17 00:00:00 2001
From: fan <18706759286@163.com>
Date: Tue, 27 Oct 2020 17:00:00 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E7=90=86=E8=AE=BA=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../theme/haerbin_01/menus/menuBar.vue | 78 +++++++++++++++-
src/utils/baseUrl.js | 2 +-
.../competitionManage/bankList/index.vue | 2 +-
src/views/system/companyManage/index.vue | 16 +++-
src/views/system/questionsRuleManage/add.vue | 89 ++++++++-----------
5 files changed, 129 insertions(+), 58 deletions(-)
diff --git a/src/jmapNew/theme/haerbin_01/menus/menuBar.vue b/src/jmapNew/theme/haerbin_01/menus/menuBar.vue
index 21d4f8b86..56336e40e 100644
--- a/src/jmapNew/theme/haerbin_01/menus/menuBar.vue
+++ b/src/jmapNew/theme/haerbin_01/menus/menuBar.vue
@@ -1,7 +1,7 @@
@@ -103,7 +156,8 @@ export default {
centralizedStationList2: [],
colsNum: 0,
version: '',
- centralizedMap: {}
+ centralizedMap: {},
+ tipContent: []
};
},
computed: {
@@ -423,4 +477,24 @@ export default {
background: #ffffff;
cursor: not-allowed;
}
+ .div-simulate-button{
+ height: 20px;
+ line-height: 20px;
+ display: inline-block;
+ font-size: 14px;
+ color: #303030;
+ border: 1px solid #44556D;
+ background: #FFF;
+ text-align: center;
+ border-radius: 5px;
+ width: 80px;
+ }
+ .tip-content-box{
+ height: 20px;
+ width: 100%;
+ line-height: 20px;
+ background: #001528;
+ color: #C20F29;
+ font-size: 14px;
+ }
diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js
index d73c13463..347a63319 100644
--- a/src/utils/baseUrl.js
+++ b/src/utils/baseUrl.js
@@ -6,7 +6,7 @@ export function getBaseUrl() {
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.169:9000'; // 旭强
// BASE_API = 'http://192.168.3.175:9000'; // 张赛
- BASE_API = 'http://192.168.3.82:9000'; // 杜康
+ BASE_API = 'http://192.168.8.110:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
diff --git a/src/views/competitionManage/bankList/index.vue b/src/views/competitionManage/bankList/index.vue
index a716da874..d2f9d11c5 100644
--- a/src/views/competitionManage/bankList/index.vue
+++ b/src/views/competitionManage/bankList/index.vue
@@ -27,7 +27,7 @@ export default {
queryForm: {
reset: true,
labelWidth: '80px',
- leftSpan: 17,
+ leftSpan: 16,
queryObject: {
type: {
type: 'select',
diff --git a/src/views/system/companyManage/index.vue b/src/views/system/companyManage/index.vue
index 4cbb9e0cd..8f6afafe5 100644
--- a/src/views/system/companyManage/index.vue
+++ b/src/views/system/companyManage/index.vue
@@ -2,16 +2,19 @@
+