This commit is contained in:
joylink_cuiweidong 2020-10-27 18:37:44 +08:00
commit 940c4cb2e3
20 changed files with 672 additions and 415 deletions

View File

@ -1,81 +1,6 @@
import request from '@/utils/request';
export function postDataBd(data) {
return request({
url: `/api/audio/bd?group=${data.group}&conversationId=${data.conversationId}`,
method: 'post',
data: data.file
});
}
// 创建/获取会话id
export function getConversation(data) {
return request({
url: `/api/audio/conversation`,
method: 'get',
params: {
group: data.group,
userId: data.userId,
code: data.code
}
});
}
export function postDataXf(data) {
return request({
url: `/api/audio/xf`,
method: 'post',
data: data
});
}
// 获取语音历史记录
export function getHistoryVoice(code) {
return request({
url: `/api/audio/${code}/history`,
method: 'get'
});
}
// 文字聊天 发送文字
export function chatWithText(data, group) {
return request({
url: `/api/jointTraining/chatWithText?group=${group}`,
method: 'post',
data: {
message: data
}
});
}
// 文字聊天 发送语音
export function chatWithAudio(file, group) {
return request({
url: `/api/jointTraining/chatWithAudio?group=${group}`,
method: 'post',
data: file
});
}
// 文字聊天 发送语音(新版)
export function chatWithAudioNew(file, group) {
return request({
url: `/api/v1/jointTraining/chatWithAudio?group=${group}`,
method: 'post',
data: file
});
}
// 生成分发二维码
export function getJoinTrainCode(data, group) {
return request({
url: `/api/jointTraining/qrCode?group=${group}`,
method: 'post',
data: data
});
}
// 创建房间
export function postCreateRoom(data) {
return request({
@ -85,34 +10,6 @@ export function postCreateRoom(data) {
});
}
// 检查房间存在
export function checkRoomExist(params) {
return request({
url: `/api/simulationRoom`,
method: 'get',
params
});
}
// 获取房间详情
export function postRoomDetail(group) {
return request({
url: `/api/jointTraining/room/${group}`,
method: 'get'
});
}
// 销毁房间
export function deljointTrainRoom(group) {
return request({
url: `/api/jointTraining/room`,
method: 'delete',
params: {
group: group
}
});
}
// 查询有权限房间列表
export function getjointTrainList(params) {
return request({
@ -133,90 +30,6 @@ export function getjointTraining(group) {
});
}
// 设置人员角色
export function putUserRoles(data, group) {
return request({
url: `/api/jointTraining/room/user/role?group=${group}`,
method: 'put',
data: data
});
}
// 获取房间里的用户列表
export function getJointTrainRoomUserList(group) {
return request({
url: `/api/jointTraining/room/${group}/user/list`,
method: 'get'
});
}
// 离开房间接口
export function putJointTrainingExit(group) {
return request({
url: `/api/jointTraining/room/exit`,
method: 'put',
params: {
group: group
}
});
}
// 开始联合演练
export function startJointTraining(group) {
return request({
url: `/api/jointTraining/room/simulation`,
method: 'post',
params: {
group: group
}
});
}
// 获取个人信息
export function getUserRoles(group) {
return request({
url: `/api/jointTraining/room/user/role`,
method: 'get',
params: {
group: group
}
});
}
// 踢出用户
export function putJointTrainingUserkicked(userId, group) {
return request({
url: `/api/jointTraining/room/user`,
method: 'put',
params: {
userId: userId,
group: group
}
});
}
// 管理员结束所有人的仿真
export function putJointTrainingSimulation(group) {
return request({
url: `/api/jointTraining/room/simulation/all`,
method: 'put',
params: {
group: group
}
});
}
// 结束仿真返回房间
export function putJointTrainingSimulationUser(group) {
return request({
url: `/api/jointTraining/room/simulation/user/exit`,
method: 'put',
params: {
group: group
}
});
}
// 进入仿真
export function putJointTrainingSimulationEntrance(group) {
return request({
@ -228,9 +41,7 @@ export function putJointTrainingSimulationEntrance(group) {
});
}
/**
* 权限获取(房间权限)
*/
// 权限获取(房间权限)
export function getPermissionJoint(group) {
return request({
url: '/api/jointTraining/qrCode',
@ -241,60 +52,6 @@ export function getPermissionJoint(group) {
});
}
// 添加或更新真实设备和仿真对象连接
export function setRealDevice(group, data) {
return request({
url: `/api/jointTraining/room/realDevice?group=${group}`,
method: 'post',
data: data
});
}
// 删除真实设备和仿真对象连接
export function delRealDevice(id, group) {
return request({
url: `/api/jointTraining/room/realDevice/${id}`,
method: 'delete',
params: { group: group }
});
}
// 获取真实设备列表
export function getRealDevices(group) {
return request({
url: `/api/jointTraining/room/${group}/devices`,
method: 'get'
});
}
// 获取房间真实设备连接关系
export function getRealDevicesInRoom(group) {
return request({
url: `/api/jointTraining/room/${group}/realDevice/connect`,
method: 'get'
});
}
// 更新真实设备的连接关系
export function updateRealDevices(group, data) {
return request({
url: `/api/jointTraining/room/${group}/realDevice`,
method: 'put',
data: data
});
}
// 真实设备是否被其他仿真使用
export function realDeviceIsUsed(group, projectCode) {
return request({
url: `/api/jointTraining/room/${group}/realDeviceUsed`,
method: 'get',
params: {
projectCode: projectCode
}
});
}
// 获取仿真成员列表(新版地图)
export function getSimulationMembersNew(group) {
return request({
@ -302,23 +59,6 @@ export function getSimulationMembersNew(group) {
method: 'get'
});
}
// 获取仿真会话消息列表(新版地图)
export function getSimulationContextListNew(group, conversationId) {
return request({
url: `/simulation/${group}/conversation/${conversationId}`,
method: 'get'
});
}
// 接受其他人的会话邀请 (新版地图)
export function acceptCoversitionInvite(group, conversationId) {
return request({
url: `/simulation/${group}/${conversationId}/accept`,
method: 'put'
});
}
/** 发起会话 */
export function startConversition(group, data, sign) {
return request({
@ -327,13 +67,6 @@ export function startConversition(group, data, sign) {
data
});
}
/** 根据会话id获取仿真会话 */
export function getSimulationConversition(group, conversationId) {
return request({
url: `/api/simulation/${group}/conversation/${conversationId}`,
method: 'get'
});
}
/** 发送会话消息 */
export function sendSimulationConversition(group, conversationId, file) {
return request({

View File

@ -13,53 +13,51 @@
import pathToRegexp from 'path-to-regexp';
export default {
data() {
return {
levelList: null
};
},
watch: {
$route() {
this.getBreadcrumb();
}
},
created() {
this.getBreadcrumb();
},
methods: {
getBreadcrumb() {
// only show routes with meta.title
let matched = this.$route.matched.filter(item => item.meta && item.meta.title);
const first = matched[0];
data() {
return {
levelList: null
};
},
watch: {
$route() {
this.getBreadcrumb();
}
},
created() {
this.getBreadcrumb();
},
methods: {
getBreadcrumb() {
let matched = this.$route.matched.filter(item => item.meta && item.meta.title);
const first = matched[0];
if (!this.isDashboard(first)) {
matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched);
}
if (!this.isDashboard(first)) {
matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched);
}
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false);
},
isDashboard(route) {
const name = route && route.name;
if (!name) {
return false;
}
return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase();
},
pathCompile(path) {
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
const { params } = this.$route;
var toPath = pathToRegexp.compile(path);
return toPath(params);
},
handleLink(item) {
const { redirect, path } = item;
if (redirect) {
this.$router.push(redirect);
return;
}
this.$router.push(this.pathCompile(path));
}
}
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false);
},
isDashboard(route) {
const name = route && route.name;
if (!name) {
return false;
}
return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase();
},
pathCompile(path) {
const { params } = this.$route;
var toPath = pathToRegexp.compile(path);
return toPath(params);
},
handleLink(item) {
const { redirect, path } = item;
if (redirect) {
this.$router.push(redirect);
return;
}
this.$router.push(this.pathCompile(path));
}
}
};
</script>

View File

@ -4,7 +4,6 @@ import router from './router/index_APP_TARGET';
import {loginInfo} from '@/scripts/ProjectConfig';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
// import { admin } from './router/index_APP_TARGET';
import { getToken, removeToken, getSessionStorage } from '@/utils/auth';
import localStore from 'storejs';
@ -14,22 +13,15 @@ import localStore from 'storejs';
// return roles.some(role => permissionRoles.indexOf(role) >= 0);
// }
const whiteList = ['/login', '/design/login', '/gzzbxy/relay', '/authorization', '/AUStool']; // 不重定向白名单
const whiteList = ['/login', '/design/login', '/gzzbxy/relay', '/authorization', '/AUSline', '/AUStool']; // 不重定向白名单
// const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/iscs/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/, /^\/displayNew\/record/, /^\/displayNew\/manage/, /^\/displayNew\/plan/, /^\/practiceDisplayNew/, /^\/bigSplitScreen/];
// function isDesignPage(toRoutePath) {
// return designPageRegex.some(item => item.test(toRoutePath) );
// }
for (const val in loginInfo) {
if (loginInfo[val].loginPath && !whiteList.includes(loginInfo[val].loginPath)) {
whiteList.push(loginInfo[val].loginPath);
}
}
// const loginPage = whiteList[0];
// const loginDesignPage = whiteList[1];
// 获取路径数据
// 登录路径判断获取
function getRouteInfo(to) {
let loginPath = '';
const toRoutePath = to.redirectedFrom || to.path;
@ -71,14 +63,12 @@ function handleRoute(to, next, loginPath) {
});
} else {
// 除没有动态改变权限的需求可直接next() 删下方权限判断
// if (hasPermission(store.getters.roles, to.meta.roles)) {
if (to.path === '/404' && to.redirectedFrom === '/') {
const project = getSessionStorage('project');
next(localStore.get('trainingPlatformRoute' + store.getters.id + project) || '/trainingPlatform');
} else {
next();
}
// }
}
}

View File

@ -80,7 +80,8 @@ const ExamCourseDetail = () => import('@/views/exam/detail/courseDetail');
const DemonstrationDetail = () => import('@/views/demonstration/detail/index');
const PlanMonitorEditTool = () => import('@/views/planMonitor/editTool/index');
const PlanMonitorEditAUSTool = () => import('@/views/planMonitor/editToolAUS/index');
const PlanMonitorEditAUSTool = () => import('@/views/planMonitor/editToolAUS/tool/index');
const PlanMonitorEditAUSLine = () => import('@/views/planMonitor/editToolAUS/line/index');
const PlanMonitorDetail = () => import('@/views/planMonitor/detail');
const DesignPlatformHome = () => import('@/views/designPlatform/home');
@ -210,12 +211,17 @@ export const constantRoutes = [
path: '/design/jlmap3d/assetmanager',
component: Jlmap3dAssetManager,
hidden: true
},
},
{ // 线信息
path: '/AUSline',
component: PlanMonitorEditAUSLine,
hidden: true
},
{ // 运行图编辑
path: '/AUStool',
component: PlanMonitorEditAUSTool,
hidden: true
},
},
{
path: '/jlmap3d/sandbox',
component: Jlmap3dSandbox,

View File

@ -14,12 +14,25 @@ const 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;
// }
},
mutations: {

View File

@ -16,9 +16,135 @@ 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];
// }
},
mutations: {

View File

@ -242,17 +242,95 @@ const map = {
},
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;
@ -260,6 +338,20 @@ 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;
@ -274,6 +366,104 @@ 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;
@ -281,6 +471,13 @@ const map = {
return [];
}
},
stationStandList: (state) => {
if (state.map) {
return state.map.stationStandList;
} else {
return [];
}
},
stationControlList: (state) => {
if (state.map) {
return state.map.stationControlList;
@ -288,6 +485,41 @@ 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;
@ -295,6 +527,36 @@ 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];
},
@ -333,6 +595,22 @@ 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;

View File

@ -48,51 +48,33 @@ 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;
},
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;
},
memberList: (state) => {
return state.memberList;
},
// 视图中的列车列表
viewTrainList: (state) => () =>{
const trainList = [];
@ -105,21 +87,6 @@ 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;
// }
},
mutations: {

View File

@ -9,6 +9,22 @@ const trainingList = {
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: {
setIndex: (state, index) => {

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

@ -13,10 +13,7 @@ import {getIscsData} from '@/api/iscs';
// import {getIscsData} from '@/iscs/constant/iscsData';
import { mapGetters } from 'vuex';
import { exitFullscreen } from '@/utils/screen';
import { putJointTrainingSimulationUser } from '@/api/chat';
import { putJointTrainingSimulationUserNew} from '@/api/jointTraining';
// import { handlerIscsEvent } from '@/api/simulation';
// import { IscsOperation } from '@/scripts/ConstDic';
import { deepAssign } from '@/utils/index';
import { getUID } from '@/iscs/utils/Uid';
@ -100,7 +97,6 @@ export default {
this.iscsDestroy();
this.loading = true;
// const data = parser(getIscsData(mode, system, part), {width: this.canvasWidth, height: this.canvasHeight});
this.$iscs = new Iscs({
dom: document.getElementById(this.iscsId),
config: {

View File

@ -84,7 +84,6 @@ export default {
computed: {
...mapGetters('training', [
'mode'
// 'offsetStationCode'
]),
canvasId() {
const canvasId = ['map', (Math.random().toFixed(5)) * 100000].join('_');

View File

@ -1,6 +1,6 @@
<template>
<div class="drawer" :class="{visible}" tabindex="-1">
<div class="drawer__wrapper" tabindex="-1">
<div class="drawer__wrapper" tabindex="-1" @click="doClose">
<div class="layer" :class="[direction]" :style="{width: width+'px'}" tabindex="-1">
<div class="title">
<span>
@ -28,7 +28,7 @@ export default {
},
width: {
type: Number,
default: 600
default: 360
},
visible: {
type: Boolean,

View File

@ -11,7 +11,7 @@
</template>
<script>
import * as utils from './utils'
import * as utils from '../utils'
import echarts from 'echarts';
import { timeFormat } from '@/utils/date';
@ -247,7 +247,7 @@ export default {
doExport() {
const urlObject = window.URL || window.webkitURL || window;
const export_blob = utils.dataURItoBlob(this.myChart.getDataURL({
pixelRatio: 1,
pixelRatio: 2,
backgroundColor: '#fff'
}), 'png');
const save_link = document.createElementNS("http://www.w3.org/1999/xhtml", "a");

View File

@ -0,0 +1,135 @@
<template>
<div class="line">
<el-menu class="menus" default-active="2-1" :collapse="true">
<el-submenu index="2">
<template slot="title">
<i class="el-icon-document" />
</template>
<el-menu-item-group>
<span slot="title">Line List</span>
<el-tree :data="lineList" :props="defaultProps" @node-click="onSelectLine">
<template slot-scope="{data}">
<span class="flex" >
<span><i class="el-icon-document"/>&ensp;{{data.name}}</span>
<el-button
type="text"
style="color:red"
size="mini"
@click="doDeletePlan(data)">
Delete
</el-button>
</span>
</template>
</el-tree>
</el-menu-item-group>
</el-submenu>
</el-menu>
<div class="container">
<div class="title">
<span>title</span>
</div>
<div class="form">
11111111111
</div>
</div>
</div>
</template>
<script>
import Drawer from '../components/drawer.vue';
export default {
components: {
Drawer
},
data() {
return {
defaultProps: {
children: 'children',
label: 'name'
},
lineList: [
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
{name: '1', id: 1},
{name: '2', id: 2},
]
}
},
methods: {
onSelectLine(el) {
}
}
}
</script>
<style lang="scss" scoped>
.line {
width: 100%;
height: 100%;
display: flex;
justify-content: space-between;
.menus {
height: 100%;
}
.container {
flex: 1;
.title {
width: 100%;
height: 32px;
font-size: 26px;
padding: 7px;
background: rgba(240,240,240,0.3);
display: flex;
justify-content: center;
align-items: center;
}
.form {
padding: 30px;
width: 50%;
margin: auto;
}
}
}
</style>

View File

@ -62,26 +62,27 @@
<plan-just-turnback :config="config" :selected="selected" @justTurnBack="doJustTurnback"/>
<plan-set-params :config="config" @setParams="doSetPlanParams" />
<plan-create ref="create" @createPlan="doCreatePlan" />
<plan-export ref="export" :planUtil="planUtil" :title="title" :width="3600*2+2050" :height="height-160" />
<div class="fixed" v-show="show">
<textarea :auto-focus="true" v-if="textareaModel.show" v-focus v-model="textareaModel.text" class="fixed-textarea"
:style="{ left: rect.x+'px', top: rect.y+'px', width: rect.width+'px', height: rect.height+'px', }"/>
</div>
<export ref="export" :planUtil="planUtil" :title="title" :width="3600*2+2050" :height="height-160" />
</div>
</template>
<script>
import PlanJustRunning from '../dialog/planJustRunning.vue';
import PlanJustStop from '../dialog/planJustStop.vue';
import PlanJustTurnback from '../dialog/planJustTurnback.vue';
import PlanSetParams from '../dialog/planSetParams.vue';
import PlanCreate from '../dialog/planCreate.vue';
import PlanExport from '../dialog/planExport.vue';
import Schedule from './schedule.vue';
import PlanJustRunning from './dialog/planJustRunning.vue';
import PlanJustStop from './dialog/planJustStop.vue';
import PlanJustTurnback from './dialog/planJustTurnback.vue';
import PlanSetParams from './dialog/planSetParams.vue';
import PlanCreate from './dialog/planCreate.vue';
import Drawer from './drawer.vue';
import Menus from './menus.vue';
import Export from './export.vue';
import { MenuEnum } from './utils.js';
import Drawer from '../components/drawer.vue';
import * as utils from '../utils.js';
import { timeFormat } from '@/utils/date';
import { mapGetters } from 'vuex';
import { getStationList } from '@/api/runplan';
@ -102,9 +103,9 @@ export default {
PlanJustTurnback,
PlanSetParams,
PlanCreate,
PlanExport,
Menus,
Drawer,
Export
},
data() {
return {
@ -170,7 +171,7 @@ export default {
return '00';
},
MenuEnum() {
return MenuEnum;
return utils.MenuEnum;
}
},
watch: {
@ -332,6 +333,7 @@ export default {
},
onSelectPlan(el) {
this.$router.replace({ path: 'AUStool', query: { planId: el.id, title: el.name }});
this.drawer = false;
},
doExport() {
this.$refs.export.doShow(this.stations, this.planData);

View File

@ -1,6 +1,5 @@
import echarts from 'echarts';
import * as utils from './utils'
import { MenuEnum } from './utils';
import * as utils from '../utils'
export default {
data() {
@ -435,15 +434,15 @@ export default {
this.doSetSelected({e, pointInGrid});
if (e.dataIndex < length - 1 && e.value[1] == near[1]) {
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: MenuEnum.planJustStop });
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: utils.MenuEnum.planJustStop });
} else if (e.dataIndex < length - 1 && e.value[1] != near[1] && e.value[1] == next[1]) {
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: MenuEnum.planJustTurnBack });
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: utils.MenuEnum.planJustTurnBack });
} else if (e.dataIndex == 0 || e.dataIndex > 0 && e.value[1] == prev[1]) {
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: MenuEnum.planJustRunning });
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: utils.MenuEnum.planJustRunning });
}
} else if (e.target && e.target.subType == 'area') {
if (this.model.action == 'Note') {
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: MenuEnum.planSetAreaNote });
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: utils.MenuEnum.planSetAreaNote });
}
}
},

View File

@ -11,7 +11,7 @@
</template>
<script>
import * as utils from './utils'
import * as utils from '../utils'
import echarts from 'echarts';
import Monitor from './monitor.js';
import { timeFormat } from '@/utils/date';

View File

@ -106,7 +106,6 @@ export function findPrev(list, idx, cb) {
return null;
}
export function dataURItoBlob(dataURI, dataTYPE) {
var binary = atob(dataURI.split(',')[1]), array = [];
for(var i = 0; i < binary.length; i++) array.push(binary.charCodeAt(i));