This commit is contained in:
lVAL 2020-10-27 17:00:40 +08:00
commit 469c99320e
20 changed files with 238 additions and 657 deletions

View File

@ -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);
// }
}
}
});

View File

@ -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) {

View File

@ -1,7 +1,7 @@
<template>
<div id="menuBar">
<div class="haerbin-01__systerm nav">
<el-row>
<el-row v-if="$store.state.training.prdType === '01'">
<el-col :span="2">
<div class="nav-border">
<el-row>
@ -64,6 +64,59 @@
</div>
</el-col>
</el-row>
<el-row v-else-if="$store.state.training.prdType === '02'">
<el-col :span="16" style="border: 1px solid #DBD8C7;border-radius: 5px;">
<el-row style="padding: 4px;">
<div class="tip-content-box">{{ tipContent[0] }}</div>
<div class="tip-content-box">{{ tipContent[1] }}</div>
<div class="tip-content-box">{{ tipContent[2] }}</div>
</el-row>
<el-row style="height: 30px;line-height: 30px;display: flex;justify-content:space-between;">
<div class="div-simulate-button" @click="undeveloped">系统</div>
<div class="div-simulate-button" @click="undeveloped">联锁</div>
<div class="div-simulate-button" @click="undeveloped">列监</div>
<div class="div-simulate-button" @click="undeveloped">站控</div>
<div class="div-simulate-button" @click="undeveloped">车场</div>
<div class="div-simulate-button" @click="undeveloped">编表</div>
<div class="div-simulate-button" @click="undeveloped">车辆段</div>
</el-row>
<el-row style="height: 30px;line-height: 30px;display: flex;justify-content:space-between;">
<div class="div-simulate-button" @click="undeveloped">轨道</div>
<div class="div-simulate-button" @click="undeveloped">调度</div>
<div class="div-simulate-button" @click="undeveloped">录放</div>
<div class="div-simulate-button" @click="undeveloped">管理</div>
<div class="div-simulate-button" @click="undeveloped">列车信息</div>
<div class="div-simulate-button" @click="undeveloped">职权</div>
<div style="width: 80px;" />
</el-row>
</el-col>
<el-col :span="4">
<el-row>
<div style="width: 40px;" class="div-simulate-button" @click="undeveloped">A</div>
<div style="width: 40px;" class="div-simulate-button" @click="undeveloped">B</div>
<div style="width: 40px;" class="div-simulate-button" @click="undeveloped">C</div>
<div style="width: 60px;" class="div-simulate-button" @click="undeveloped">调度</div>
</el-row>
<el-row>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">报警</div>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">运图</div>
</el-row>
<el-row>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">报表</div>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">时刻表</div>
</el-row>
</el-col>
<el-col :span="4">
<el-row>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">考评</div>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">日志</div>
</el-row>
<el-row>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">锁屏</div>
<div style="width: 80px;" class="div-simulate-button" @click="undeveloped">退出</div>
</el-row>
</el-col>
</el-row>
</div>
<notice-info ref="noticeInfo" pop-class="haerbin-01__systerm" />
</div>
@ -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;
}
</style>

View File

@ -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'];

View File

@ -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;
}
},

View File

@ -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];
}
},

View File

@ -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;
},

View File

@ -7,9 +7,9 @@ const order = {
orderList: [] // 选中的商品列表,
},
getters: {
orderList: (state)=>{
return state.orderList;
}
// orderList: (state)=>{
// return state.orderList;
// }
},
mutations: {
setOrderList: (state, orderList) => {

View File

@ -11,7 +11,7 @@ const runPlan = {
selected: {}, // 选择的对象
refreshCount: 0, // 刷新页面重新加载
width: 800, // 运行图canvas 容器 宽度
height: 600, // 运行图canvas 容器 高度
height: 600 // 运行图canvas 容器 高度
},
getters: {
stations: (state) => {

View File

@ -240,7 +240,6 @@ const socket = {
simulationStart: '', // 仿真-开始消息
simulationOver:0, // 退出仿真推送消息
simulationReset: 0, // 仿真-异常消息
// coversitionList:{}, // 历史仿真-用户消息列表
inviteSimulationConversition: {}, // 仿真会话邀请消息
acceptConversionInvite:{}, // 仿真会话成员接收邀请
createConversition:{}, // 仿真创建会话

View File

@ -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: {

View File

@ -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);
},

View File

@ -2,8 +2,8 @@ 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 = 'http://192.168.8.107:9000'; // 袁琪
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.169:9000'; // 旭强
// BASE_API = 'http://192.168.3.175:9000'; // 张赛

View File

@ -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);
}

View File

@ -27,7 +27,7 @@ export default {
queryForm: {
reset: true,
labelWidth: '80px',
leftSpan: 17,
leftSpan: 16,
queryObject: {
type: {
type: 'select',

View File

@ -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)); //
}

View File

@ -154,7 +154,7 @@ export default {
},
clearList() { //
this.stationCode = '';
this.$store.dispatch('map/setSeclectDeviceList', []);
this.$store.commit('map/setSeclectDeviceList', []);
this.seclectDeviceList = [];
this.modelList = [
{

View File

@ -2,16 +2,19 @@
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<edit-company ref="editCompany" @reloadTable="reloadTable" />
<qr-code ref="qrCode" />
</div>
</template>
<script>
import { getCompanyListPaging, deleteCompany } from '@/api/company';
import EditCompany from './add';
import QrCode from '@/components/QrCode';
export default {
name: 'CompanyManage',
components: {
EditCompany
EditCompany,
QrCode
},
data() {
return {
@ -51,6 +54,10 @@ export default {
name: this.$t('global.edit'),
handleClick: this.handleUpdate
},
{
name: '生成二维码',
handleClick: this.handleGenerateQrCode
},
{
name: '删除',
handleClick: this.handleDeleteCompany,
@ -87,6 +94,13 @@ export default {
},
handlerBack() {
this.$router.go(-1);
},
handleGenerateQrCode(index, row) {
const param = {
url: `companyName=${row.name}&&companyId=${row.id}`,
title: '单位二维码'
};
this.$refs.qrCode.doShow(param);
}
}
};

View File

@ -1,11 +1,10 @@
<template>
<el-dialog v-dialogDrag title="添加出题规则" :visible.sync="dialogVisible" width="640px" :before-close="handleClose" center :close-on-click-modal="false">
<!--<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" :inline="true" />-->
<el-form ref="form" :model="formModel" label-width="80px" :inline="true">
<el-form-item label="单位">
<el-select v-model="formModel.companyId" placeholder="请选择单位" clearable size="small">
<el-dialog v-dialogDrag title="添加出题规则" :visible.sync="dialogVisible" width="710" :before-close="handleClose" center :close-on-click-modal="false">
<el-form ref="form" :model="formModel" label-width="100px" :inline="true">
<el-form-item v-if="!isProject" label="单位">
<el-select v-model="formModel.companyId" placeholder="请选择单位" clearable size="small" style="width: 400px;">
<el-option
v-for="item in options"
v-for="item in companyList"
:key="item.id"
:label="item.name"
:value="item.id"
@ -13,31 +12,31 @@
</el-select>
</el-form-item>
<el-form-item label="判断题数量">
<el-input-number v-model="formModel.judgeNum" :min="0" :max="10" />
<el-input-number v-model="formModel.judgeNum" :min="0" :max="questionNum.judge" /><div style="display: inline-block;width: 70px;">{{ `(${questionNum.judge})` }}</div>
</el-form-item>
<el-form-item label="判断题分数">
<el-input-number v-model="formModel.judgePoint" :min="0" :max="10" />
</el-form-item>
<el-form-item label="单选题数量">
<el-input-number v-model="formModel.selectNum" :min="0" :max="10" />
<el-input-number v-model="formModel.selectNum" :min="0" :max="questionNum.select" /><div style="display: inline-block;width: 70px;">{{ `(${questionNum.select})` }}</div>
</el-form-item>
<el-form-item label="单选题分数">
<el-input-number v-model="formModel.selectPoint" :min="0" :max="10" />
</el-form-item>
<el-form-item label="多选题数量">
<el-input-number v-model="formModel.multiNum" :min="0" :max="10" />
<el-input-number v-model="formModel.multiNum" :min="0" :max="questionNum.multi" /><div style="display: inline-block;width: 70px;">{{ `(${questionNum.multi})` }}</div>
</el-form-item>
<el-form-item label="多选题分数">
<el-input-number v-model="formModel.multiPoint" :min="0" :max="10" />
</el-form-item>
<el-form-item label="填空题数量">
<el-input-number v-model="formModel.fillNum" :min="0" :max="10" />
<el-input-number v-model="formModel.fillNum" :min="0" :max="questionNum.fill" /><div style="display: inline-block;width: 70px;">{{ `(${questionNum.fill})` }}</div>
</el-form-item>
<el-form-item label="填空题分数">
<el-input-number v-model="formModel.fillPoint" :min="0" :max="10" />
</el-form-item>
<el-form-item label="填空题数量">
<el-input-number v-model="formModel.answerNum" :min="0" :max="10" />
<el-input-number v-model="formModel.answerNum" :min="0" :max="questionNum.answer" /><div style="display: inline-block;width: 70px;">{{ `(${questionNum.answer})` }}</div>
</el-form-item>
<el-form-item label="填空题分数">
<el-input-number v-model="formModel.answerPoint" :min="0" :max="10" />
@ -53,6 +52,7 @@
<script>
import { addQuestionRule, updateQuestionRule } from '@/api/questionsRule';
import { getSessionStorage } from '@/utils/auth';
import { selectQuestionTypeNum } from '@/api/race';
export default {
name: 'Add',
props: {
@ -78,58 +78,41 @@ export default {
answerNum: 0,
answerPoint: 0
},
questionNum: {
select: 0,
judge: 0,
multi: 0,
fill:0,
answer: 0
},
update: false
};
},
computed:{
form() {
isProject() {
const project = getSessionStorage('project');
const isProject = project !== 'login' && project !== 'design';
const form = isProject ? {
labelWidth: '100px',
items: [
{ prop: 'judgeNum', label: '判断题数量', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'judgePoint', label: '判断题分数', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'selectNum', label: '单选题数量', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'selectPoint', label: '单选题分数', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'multiNum', label: '多选题数量', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'multiPoint', label: '多选题分数', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'fillNum', label: '填空题数量', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'fillPoint', label: '填空题分数', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'answerNum', label: '问答题数量', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'answerPoint', label: '问答题分数', type: 'number', min: 0, max: 99, step: 1 }
]
} : {
labelWidth: '100px',
items: [
{ prop: 'companyId', label: '公司名称', type: 'select', options: this.companyList, optionValue: 'id', optionLabel: 'name' },
{ prop: 'judgeNum', label: '判断题数量', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'judgePoint', label: '判断题分数', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'selectNum', label: '单选题数量', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'selectPoint', label: '单选题分数', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'multiNum', label: '多选题数量', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'multiPoint', label: '多选题分数', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'fillNum', label: '填空题数量', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'fillPoint', label: '填空题分数', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'answerNum', label: '问答题数量', type: 'number', min: 0, max: 99, step: 1 },
{ prop: 'answerPoint', label: '问答题分数', type: 'number', min: 0, max: 99, step: 1 }
]
};
return form;
},
rules() {
const crules = {
// companyId: [
// { required: true, message: '', trigger: 'change' }
// ]
};
return crules;
return project !== 'login' && project !== 'design';
}
},
methods: {
selectQuestion() {
selectQuestionTypeNum(this.formModel.companyId).then(resp => {
resp.data.forEach(item => {
this.questionNum[item.type] = item.num;
});
});
},
doShow(data) {
this.dialogVisible = true;
this.update = false;
this.questionNum = {
select: 0,
judge: 0,
multi: 0,
fill:0,
answer: 0
};
this.selectQuestion();
if (data) {
this.update = true;
this.formModel.id = data.id;
@ -209,7 +192,7 @@ export default {
this.$emit('reloadTable');
}).catch(e => {
if (e.code == 10010) {
this.$message.error('关联改公司数据已存在!');
this.$message.error('关联该单位数据已存在!');
} else {
this.$message.error('添加出题规则失败!');
}