Merge remote-tracking branch 'origin/test'

# Conflicts:
#	src/scripts/ProjectConfig.js
#	src/utils/baseUrl.js
#	src/views/login/index.vue
#	src/views/newMap/displayBaSiDi/index.vue
#	src/views/newMap/displayCity/demonMenu.vue
#	src/views/newMap/displayCity/index.vue
#	src/views/system/deviceManage/index.vue
#	src/views/trainingPlatform/demonList.vue
This commit is contained in:
fan 2023-01-10 18:01:34 +08:00
commit 6897cb6c0b
1273 changed files with 85975 additions and 44769 deletions

View File

@ -6,7 +6,7 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"start": "vue-cli-service serve --open", "start": "vue-cli-service serve --open",
"dev": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve", "dev": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve --open",
"build": "vue-cli-service build --mode production", "build": "vue-cli-service build --mode production",
"test": "vue-cli-service build --mode staging", "test": "vue-cli-service build --mode staging",
"local": "vue-cli-service build --mode", "local": "vue-cli-service build --mode",

View File

@ -1,8 +1,12 @@
<template> <template>
<div id="app"> <div id="app">
<router-view /> <router-view />
<deomon-topic ref="deomonTopic" /> <deomon-list ref="deomonList" @enterQcode="qcodeEntry" />
<img v-show="loading" :src="loadingImg" class="AppAll"> <qcode ref="qcode" />
<div v-show="loading" class="AppAll">
<img v-if="project === 'login' || project === 'design'" :src="jlFavicon" class="CompanyIcon">
<img :src="loadingImg" style="width: 100%; height: 100%;">
</div>
<div <div
v-if="!$store.state.user.baseUrl" v-if="!$store.state.user.baseUrl"
v-loading="!$store.state.user.baseUrl" v-loading="!$store.state.user.baseUrl"
@ -20,16 +24,19 @@
import { getToken, getUserIdKey } from '@/utils/auth'; import { getToken, getUserIdKey } from '@/utils/auth';
import { getSessionStorage } from '@/utils/auth'; import { getSessionStorage } from '@/utils/auth';
import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig'; import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
import DeomonTopic from '@/views/demonstration/deomonTopic';
import WindowResizeHandler from '@/mixin/WindowResizeHandler'; import WindowResizeHandler from '@/mixin/WindowResizeHandler';
import LoadingImg from '@/assets/loading.gif'; import LoadingImg from '@/assets/loading.gif';
import AppLoading from '@/assets/appLoading.png'; import AppLoading from '@/assets/appLoading.png';
import { openIndexedDB } from '@/utils/indexedDb'; import { openIndexedDB } from '@/utils/indexedDb';
import Favicon from '@/assets/icon/favicon.png';
import DeomonList from '@/views/demonstration/deomonList/index';
import Qcode from '@/layout/components/Qcode.vue';
export default { export default {
name: 'App', name: 'App',
components: { components: {
DeomonTopic DeomonList,
Qcode
}, },
mixins: [ mixins: [
WindowResizeHandler WindowResizeHandler
@ -38,20 +45,12 @@ export default {
return { return {
loadingImg: LoadingImg, loadingImg: LoadingImg,
appLoading: AppLoading, appLoading: AppLoading,
loading: false loading: false,
project: '',
jlFavicon: Favicon
}; };
}, },
watch: { watch: {
'$store.state.socket.simulationInvite': function (val) {
if (val.creator) {
this.subscribeMessage(val);
}
},
'$store.state.socket.roomInvite': function (val) {
if (val.creator) {
this.subscribeMessage(val);
}
},
'$store.state.socket.beLogoutCount': async function(val) { '$store.state.socket.beLogoutCount': async function(val) {
if (this.$store.state.socket.loggedOutMsg.token === getToken()) { if (this.$store.state.socket.loggedOutMsg.token === getToken()) {
this.$store.dispatch('disconnect').then(()=>{ this.$store.dispatch('disconnect').then(()=>{
@ -72,12 +71,17 @@ export default {
}, },
'$store.state.app.animationsCloseCount': function(val) { '$store.state.app.animationsCloseCount': function(val) {
this.loading = false; this.loading = false;
},
'$route': function(val) {
if (val.path == '/display/demon' && val.query.client == 'diagramEdit') { //
this.loading = false;
}
} }
}, },
created() { created() {
const project = getSessionStorage('project'); this.project = getSessionStorage('project');
if (project) { if (this.project) {
document.querySelector("link[rel*='icon']").href = loginInfo[project].linkIcon || ProjectIcon[project]; document.querySelector("link[rel*='icon']").href = loginInfo[this.project].linkIcon || ProjectIcon[this.project];
} }
}, },
mounted() { mounted() {
@ -92,7 +96,7 @@ export default {
if (this.$route.path.includes('trainingDesign') || this.$route.path.includes('trainingPreview')) { if (this.$route.path.includes('trainingDesign') || this.$route.path.includes('trainingPreview')) {
if (e.key == getUserIdKey('nextNew')) { if (e.key == getUserIdKey('nextNew')) {
const operate = JSON.parse(e.newValue); const operate = JSON.parse(e.newValue);
this.$store.dispatch('training/nextNew', operate); this.$store.dispatch('trainingNew/next', operate);
} }
} }
@ -105,6 +109,12 @@ export default {
this.$store.dispatch('subscribe_un', {}); this.$store.dispatch('subscribe_un', {});
}, },
methods: { methods: {
quickEntry() {
this.$refs.deomonList.doShow();
},
qcodeEntry() {
this.$refs.qcode.doShow();
},
resizeHandler() { resizeHandler() {
this.$store.dispatch('app/resize', { width: this._clientWidth, height: this._clientHeight }); this.$store.dispatch('app/resize', { width: this._clientWidth, height: this._clientHeight });
}, },
@ -112,22 +122,13 @@ export default {
window.document.oncontextmenu = function () { window.document.oncontextmenu = function () {
return false; return false;
}; };
},
subscribeMessage(res) {
if (this.$refs.deomonTopic && !window.location.href.includes('trainroom')) {
if (!(getSessionStorage('project').includes('design'))) {
this.$refs.deomonTopic.doShow(res);
}
this.$store.dispatch('socket/setSimulationInvite');
this.$store.dispatch('socket/setRoomInvite');
}
} }
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.AppAll{position: absolute;top: 0;left: 0;width: 100%;height: 100%;z-index: 2003} .AppAll{position: absolute;top: 0;left: 0;width: 100%;height: 100%;z-index: 3003}
.centerImg { .centerImg {
position: absolute; position: absolute;
left:50%; left:50%;
@ -137,4 +138,12 @@ export default {
margin-left: -240px; margin-left: -240px;
margin-top: -228px; margin-top: -228px;
} }
.CompanyIcon{
position: absolute;
z-index: 3000;
left: 50%;
margin-left: -60px;
width: 120px;
top: 30px;
}
</style> </style>

View File

@ -0,0 +1,53 @@
import request from '@/utils/request';
/** 创建权限分发*/
export function createDistribute(data) {
return request({
url: `/api/v3/permission/distribute/create`,
method: 'post',
data
});
}
/** 分页获取权限分发列表*/
export function getDistributeList(data) {
return request({
url: `/api/v3/permission/distribute/paging`,
method: 'post',
data
});
}
// /** 设置权限分发立即失效*/
// export function setDistributeInvalidate(pdId) {
// return request({
// url: `/api/v2/permission/distribute/${pdId}/invalidate`,
// method: 'put'
// });
// }
/** 获取权限分发明细*/
export function getDistributeDetail(disId) {
return request({
url: `/api/v3/permission/distribute/list/distribute/${disId}`,
method: 'get'
});
}
/** 从权限分发,直接分发给指定主体*/
export function setDistributeToSubject(pdId, subjectType, subjectId) {
return request({
url: `/api/v3/permission/distribute/${pdId}/to/${subjectType}/${subjectId}`,
method: 'post'
});
}
/** 生成分发二维码*/
export function getDistributeQrCode(pdId) {
return request({
url: `/api/v3/permission/distribute/${pdId}/qrCode`,
method: 'get'
});
}

View File

@ -24,10 +24,17 @@ export function deleteDisStation(mapId, code) {
}); });
} }
// 获取调度台逻辑数据 // 获取调度台逻辑数据
export function getDisStationList(mapId, data) { export function getDisStationListPaged(mapId, data) {
return request({ return request({
url: `/api/draftMap/${mapId}/disStation/page`, url: `/api/draftMap/${mapId}/disStation/page`,
method: 'post', method: 'post',
data data
}); });
} }
/** 查询调度台列表 */
export function getDisStationList(mapId) {
return request({
url: `api/draftMap/${mapId}/disStation/list`,
method: 'get'
});
}

26
src/api/functionManage.js Normal file
View File

@ -0,0 +1,26 @@
import request from '@/utils/request';
// 分页查询权限功能的基本信息
export function getAbilityPage(data) {
return request({
url: `/api/v2/permission/system/ability/page`,
method: 'post',
data
});
}
// 自动生成
export function autoCreate() {
return request({
url: `/api/v2/permission/system/ability/autoCreate`,
method: 'get'
});
}
// 获取所有功能
export function getAllAbility() {
return request({
url: `/api/v2/permission/system/ability/list`,
method: 'get'
});
}

View File

@ -4,7 +4,9 @@ const publicPath = process.env.VUE_APP_PRO == 'local' ? '' : '/cbtc';
export const JL3D_LOCAL_STATIC = publicPath+"/static"; export const JL3D_LOCAL_STATIC = publicPath+"/static";
const BASE_UPLOAD_API = store.state.user.uploadUrl; const BASE_UPLOAD_API = store.state.user.uploadUrl;
export const BASE_ASSET_API = store.state.user.resourcesUrl; // export const BASE_ASSET_API = store.state.user.resourcesUrl;
export const BASE_ASSET_API = store.state.user.ossUrl;
// console.log(JL3D_LOCAL_STATIC); // console.log(JL3D_LOCAL_STATIC);
// console.log(BASE_UPLOAD_API); // console.log(BASE_UPLOAD_API);
// console.log(BASE_ASSET_API); // console.log(BASE_ASSET_API);

View File

@ -2,85 +2,85 @@ import request from '@/utils/request';
/** 根据皮肤获取地图版本信息*/ /** 根据皮肤获取地图版本信息*/
export function getPublishMapVersion(id) { export function getPublishMapVersion(id) {
return request({ return request({
url: `/api/map/${id}/version`, url: `/api/map/${id}/version`,
method: 'get' method: 'get'
}); });
} }
/** 根据皮肤获取发布地图详细内容*/ /** 根据皮肤获取发布地图详细内容*/
export function getPublishMapDetail(id) { export function getPublishMapDetail(id) {
const datad = request({ const datad = request({
url: `/api/map/${id}/graphData`, url: `/api/map/${id}/graphData`,
method: 'get' method: 'get'
}); });
return datad.then(); return datad.then();
} }
/** 根据地图id获取地图信息*/ /** 根据地图id获取地图信息*/
export function getPublishMapInfo(mapId) { export function getPublishMapInfo(mapId) {
return request({ return request({
url: `/api/map/${mapId}`, url: `/api/map/${mapId}`,
method: 'get' method: 'get'
}); });
} }
/** 获取草稿地图详细内容*/ /** 获取草稿地图详细内容*/
export function getMapDetail(id) { export function getMapDetail(id) {
return request({ return request({
url: `/api/mapBuild/${id}/mapDataDetail`, url: `/api/mapBuild/${id}/mapDataDetail`,
method: 'get' method: 'get'
}); });
} }
/** 创建地图3d数据*/ /** 创建地图3d数据*/
export function set3dMapData(data) { export function set3dMapData(data) {
return request({ return request({
url: `/api/mapBuild/3dMapData`, url: `/api/mapBuild/3dMapData`,
method: 'post', method: 'post',
data: data data: data
}); });
} }
/** 通过地图id获取地图3d数据*/ /** 通过地图id获取地图3d数据*/
export function get3dMapData(mapId) { export function get3dMapData(mapId) {
return request({ return request({
url: `/api/mapBuild/3dMapData/${mapId}`, url: `/api/mapBuild/3dMapData/${mapId}`,
method: 'get' method: 'get'
}); });
} }
/** 更新地图3d数据*/ /** 更新地图3d数据*/
export function update3dMapData(data) { export function update3dMapData(data) {
return request({ return request({
url: `/api/mapBuild/3dMapData/${data.id}`, url: `/api/mapBuild/3dMapData/${data.id}`,
method: 'put', method: 'put',
data: data data: data
}); });
} }
/** 获取模型资源列表*/ /** 获取模型资源列表*/
export function loadmap3dModel() { export function loadmap3dModel() {
return request({ return request({
url: `/api/map3dModel/all`, url: `/api/map3dModel/all`,
method: 'get' method: 'get'
}); });
} }
export function getPublish3dMapDetail(id) { export function getPublish3dMapDetail(id) {
const datad = request({ const datad = request({
url: `/api/map/${id}/3dMapData`, url: `/api/map/${id}/3dMapData`,
method: 'get' method: 'get'
}); });
return datad.then(); return datad.then();
} }
/** 录制托管*/ /** 录制托管*/
export function tuoguan3ddrive(group,data) { export function tuoguan3ddrive(group, data) {
return request({ return request({
url: `/api/scriptSimulation/${group}/trust`, url: `/api/scriptSimulation/${group}/trust`,
method: 'put', method: 'put',
data: data data: data
}); });
} }
/** 三维设备故障钩锁操作*/ /** 三维设备故障钩锁操作*/
@ -101,33 +101,33 @@ export function saveStationManagerData(data) {
}); });
} }
// 更新数据 // 更新数据
export function updateStationManagerData(id,data) { export function updateStationManagerData(id, data) {
return request({ return request({
url: `/api/pfp/${id}`, url: `/api/pfp/${id}`,
method: 'put', method: 'put',
data: data data: data
}); });
} }
// 查询数据列表 // 查询数据列表
export function getStationManagerDataList() { export function getStationManagerDataList() {
const datad = request({ const datad = request({
url: `/api/pfp/list`, url: `/api/pfp/list`,
method: 'get' method: 'get'
}); });
return datad.then(); return datad.then();
} }
// 查询数据 // 查询数据
export function getStationManagerData(id) { export function getStationManagerData(id) {
const datad = request({ const datad = request({
url: `/api/pfp/${id}`, url: `/api/pfp/${id}`,
method: 'get' method: 'get'
}); });
return datad.then(); return datad.then();
} }
// 删除数据 // 删除数据
export function deleteStationManagerData(id) { export function deleteStationManagerData(id) {
return request({ return request({
url: `/api/pfp/${id}`, url: `/api/pfp/${id}`,
method: 'delete', method: 'delete'
}); });
} }

View File

@ -182,7 +182,7 @@ export function localImportMap(data) {
url: '/api/map/local/import', url: '/api/map/local/import',
method: 'post', method: 'post',
data: data data: data
}); });
} }
/** 根据group获取排序的车站列表包含车辆段/停车场) */ /** 根据group获取排序的车站列表包含车辆段/停车场) */
@ -285,3 +285,25 @@ export function allSimulationCheck() {
method: 'get' method: 'get'
}); });
} }
/** 根据地图查询仿真成员 */
export function querySimulationMemberByMapId(id) {
return request({
url: `/api/map/${id}/memberMap`,
method: 'get'
});
}
/** 根据地图查询车站(含车辆段停车场) */
export function querySimulationStationsByMapId(id) {
return request({
url: `/api/map/${id}/stations`,
method: 'get'
});
}
/** 根据用户查询地图列表 */
export function queryMapListByUser() {
return request({
url: `/api/map/list/online/ofUser`,
method: 'get'
});
}

View File

@ -190,18 +190,28 @@ export function publishTrainingDelete(data) {
data data
}); });
} }
/** 根据mapId查所有的已发布单操实训的基础信息 */ /** 查全部组织已发布实训的基础信息 */
export function getPublishSingleList(mapId) { export function getAllPublishTrainingList(params) {
return request({ return request({
url: `/api/v2/training/published/${mapId}/singles`, url: `/api/v2/training/published/list`,
method: 'get' method: 'get',
params
}); });
} }
/** 根据mapId查所有的已发布场景实训的基础信息 */ /** 查询组织已发布实训的基础信息 */
export function getPublishScenesList(mapId) { export function getPublishTrainingListInOrg(data) {
return request({ return request({
url: `/api/v2/training/published/${mapId}/scenes`, url: `/api/v2/training/published/infos`,
method: 'get' method: 'post',
data
});
}
/** 查询组织已发布的实训列表 */
export function getManageTrainingListInOrg(data) {
return request({
url: `/api/v2/training/published/manage/infos`,
method: 'post',
data
}); });
} }
/** 根据实训id查该已发布实训的所有信息 */ /** 根据实训id查该已发布实训的所有信息 */
@ -234,10 +244,11 @@ export function startTraining(group, params) {
}); });
} }
/** 结束实训 */ /** 结束实训 */
export function endTraining(group) { export function endTraining(group, data) {
return request({ return request({
url: `/api/training2Simulation/${group}/finish`, url: `/api/training2Simulation/${group}/finish`,
method: 'put' method: 'put',
data
}); });
} }
/** 实训完成步骤 */ /** 实训完成步骤 */

View File

@ -93,3 +93,23 @@ export function getLoginInfo(token) {
} }
}); });
} }
/**
* 获取用户所属组织列表
*/
export function getOrgList() {
return request({
url: '/api/orgProject/list',
method: 'get'
})
}
/**
* 登入组织
*/
export function selectOrgnization(orgId) {
return request({
url: `/api/orgProject/signIn/${orgId}`,
method: 'put'
})
}

View File

@ -95,7 +95,7 @@ export function updateExamRule(data) {
return request({ return request({
url: `/api/exam/update/rules`, url: `/api/exam/update/rules`,
method: 'put', method: 'put',
data:data data: data
}); });
} }
/** 检查并更新【规则数据异常】状态 */ /** 检查并更新【规则数据异常】状态 */
@ -106,9 +106,241 @@ export function checkAndUpdateAbnormal(mapId) {
}); });
} }
/** 重新生成考试规则 */ /** 重新生成考试规则 */
export function regenerateRule (mapId) { export function regenerateRule(mapId) {
return request({ return request({
url: `/api/exam/regenerateRules/${mapId}`, url: `/api/exam/regenerateRules/${mapId}`,
method: 'put' method: 'put'
}); });
} }
/**
* ============================================================================
* ============================================================================
* ============================= 以下为新版试卷的接口 ============================
* ============================================================================
* ============================================================================
*/
/**
* LIST -
* 根据试卷蓝图名称简介分页查找某个组织的试卷蓝图
* @param {Object} data
* @param {Number} data.orgId 组织ID
* @param {String} data.name 试卷蓝图名称
* @param {String} data.profile 试卷蓝图简介
* @param {Number} data.findState 状态: (All(1)-所有,Editing(2)-正在编辑的,CanUse(3)-可以用于生成试卷的,Locked(4)-封存,Used(5)-已经被使用过)
* @param {Number} data.orderBy 排序依据: (1--创建时间 2--更新时间 3--名称默认值为1)
*/
export function getPapaerListOfOrg({ orgId, ...data }) {
return request({
url: `/api/v2/paper/composition/find/page/for/${orgId}`,
method: 'POST',
data
});
}
export function getAllPapaerListOfOrg({ ...data }) {
// 全部组织
return request({
url: `/api/v2/paper/composition/manage/paging`,
method: 'POST',
data
});
}
/**
* 创建试卷蓝图
* @param {Object} data
* @param {Number} data.orgId 组织ID
* @param {String} data.name 试卷蓝图名称
* @param {String} data.profile 简介
* @param {String} data.startTime 启用起始时间
* @param {String} data.endTime 启用截止时间
* @param {Number} data.validDuration 考试时长
* @param {String} data.passScore 及格分
* @param {String} data.fullScore 满分
* @param {Object} data.ruleList 规则列表
* @param {Object} data.ruleList.id 规则id
* @param {Object} data.ruleList.pcId 试卷蓝图ID
* @param {Object} data.ruleList.type 试题类型
* @param {Object} data.ruleList.subtype 规则类型
* @param {Object} data.ruleList.tags 标签
* @param {Object} data.ruleList.amount 数量
* @param {Object} data.ruleList.score 每题分值
*/
export function createPaper(data) {
return request({
url: `/api/v2/paper/composition/${data.orgId}`,
method: 'POST',
data
});
}
/**
* @param {Object} data
* @param {Number} data.id 试卷蓝图ID
* @param {Number} data.orgId 组织ID
* @param {String} data.name 试卷蓝图名称
* @param {String} data.profile 简介
* @param {String} data.startTime 启用起始时间
* @param {String} data.endTime 启用截止时间
* @param {Number} data.validDuration 考试时长
* @param {String} data.passScore 及格分
* @param {String} data.fullScore 满分
* @param {Object} data.ruleList 规则列表
* @param {Object} data.ruleList.id 规则id
* @param {Object} data.ruleList.pcId 试卷蓝图ID
* @param {Object} data.ruleList.type 试题类型
* @param {Object} data.ruleList.subtype 规则类型
* @param {Object} data.ruleList.tags 标签
* @param {Object} data.ruleList.amount 数量
* @param {Object} data.ruleList.score 每题分值
*/
export function editPaper(data) {
return request({
url: `/api/v2/paper/composition`,
method: 'PUT',
data
});
}
/**
* @param {Number} pcId 试卷蓝图ID
*/
export function getPaperDetail(pcId) {
return request({
url: `/api/v2/paper/composition/${pcId}`,
method: 'GET'
});
}
/**
* @param {Object} data
* @param {Number} data.orgId
* @param {Number} data.subtype
* @param {Array<String>} data.tags
*/
export function getQuestionAmount(data) {
return request({
url: `/api/v2/paper/${data.orgId}/question/count`,
method: 'POST',
data
});
}
/**
* @param {Number} pcId 试卷蓝图Id
*/
export function lockPaper(pcId) {
return request({
url: `/api/v2/paper/composition/${pcId}/lock`,
method: 'PUT'
});
}
/**
* @param {Number} pcId 试卷蓝图Id
*/
export function invalidPaper(pcId) {
return request({
url: `/api/v2/paper/composition/${pcId}/invalid`,
method: 'PUT'
});
}
/**
* @param {Number} pcId 试卷蓝图Id
*/
export function deletePaper(pcId) {
return request({
url: `/api/v2/paper/composition/${pcId}`,
method: 'DELETE'
});
}
/**
* @param {Number} pcId 试卷蓝图Id
*/
export function generateExam(pcId) {
return request({
url: `/api/v2/paper/${pcId}`,
method: 'POST'
});
}
/** 删除用户试卷 */
export function deleteUserExam(param) {
return request({
url: `/api/v2/paper/user/${puId}`,
method: 'method'
});
}
/**
* @param {Number} puId 用户试卷Id
*/
export function getUserExamInfo(puId) {
return request({
url: `/api/v2/paper/user/${puId}`,
method: 'GET'
});
}
/** 加载用户试卷试题 */
export function loadQuestion({ type, questionId, puId }) {
return request({
url: `/api/v2/paper/user/question/${type}/${questionId}/${puId}`,
method: 'GET'
});
}
/**
* @param {Object} data
* @param {Number} data.puId 用户试卷id
* @param {Number} data.pqId 用户试卷试题id
* @param {Number} data.type 试题类型
* @param {Number} data.subType 试题子类型
* @param {Number} data.answer 答案(理论题)
* @param {Boolean} data.trainingSuccess 是否完成(实训题)
*/
export function submitAnswer(data) {
return request({
url: `/api/v2/paper/user/question/answer`,
method: 'POST',
data
});
}
/**
* @param {Number} puId 用户试卷id
*/
export function submitPaper(puId) {
return request({
url: `/api/v2/paper/user/${puId}/submit`,
method: 'POST'
});
}
/**
* 根据mapId查询蓝图的基本信息
*/
export function queryPaperList(data) {
return request({
url: `/api/v2/paper/composition/find/list`,
method: 'POST',
data
});
}
/**
* 获取标签分类
* @param {Number} ordId 组织id
* @param {Number} groupType 1-理论题 2-实训题
* @param {Number} subType 1-选择题 2-多选题 3-判断题 4-单操 5-场景
*/
export function queryTagList(data) {
return request({
url: `/api/v2/paper/question/label`,
method: 'POST',
data
});
}

View File

@ -0,0 +1,45 @@
import request from '@/utils/request.js'
/** 获取文件列表 */
export function getFileList(params) {
return request({
url: `/api/minio/file/list`,
method: 'get',
params,
})
}
/** 检查资源是否已存在 */
export function checkIsExist(params) {
return request({
url: `/api/minio/checkIsExist`,
method: 'get',
params,
})
}
/** 保存文件 */
export function saveFileInfo(data) {
return request({
url: `/api/minio/file/save`,
method: 'post',
data,
})
}
/** 更新文件标题 */
export function updateFileTitle(data) {
return request({
url: `/api/minio/file/update`,
method: 'put',
data,
})
}
/** 删除文件 */
export function deleteFile(id) {
return request({
url: `api/minio/file/del/${id}`,
method: 'delete',
})
}

View File

@ -17,6 +17,32 @@ export function getUserList(params) {
}); });
} }
/** 查询所有用户列表*/
export function getManageUserList(params) {
return request({
url: `/api/manage/user/list`,
method: 'get',
params: params
});
}
/** 根据用户查询用户角色列表*/
export function getUserRolesList(uid) {
return request({
url: `/api/manage/${uid}/roles`,
method: 'get'
});
}
/** 绑定用户角色*/
export function getBindUserRoles(data) {
return request({
url: `/api/manage/bind/org`,
method: 'post',
data
});
}
/** 模糊查询用户 昵称、名称、手机号*/ /** 模糊查询用户 昵称、名称、手机号*/
export function getDimUserList(params) { export function getDimUserList(params) {
return request({ return request({
@ -269,3 +295,31 @@ export function sendEmailVfcode(params) {
params params
}); });
} }
/** 新注册接口 */
export function registerUserNew(data) {
return request({
url: `/api/userinfo/register2`,
method: 'post',
data
});
}
// 手机号是否已经注册
export function isExistMobile(params) {
return request({
url: `/api/userinfo/isExist/mobile`,
method: 'get',
params
});
}
// 手机号是否已经注册
export function isExistEmail(params) {
return request({
url: `/api/userinfo/isExist/email`,
method: 'get',
params
});
}

View File

@ -1,19 +1,19 @@
import request from '@/utils/request'; import request from '@/utils/request'
/** 获取用户试题列表*/ /** 获取用户试题列表*/
export function generateExamList(examId) { export function generateExamList(examId) {
return request({ return request({
url: `/api/userExam/${examId}/generate`, url: `/api/userExam/${examId}/generate`,
method: 'get' method: 'get',
}); })
} }
/** 刷新考题列表*/ /** 刷新考题列表*/
export function refreshExamList(userExamId) { export function refreshExamList(userExamId) {
return request({ return request({
url: `/api/userExam/${userExamId}`, url: `/api/userExam/${userExamId}`,
method: 'get' method: 'get',
}); })
} }
/** 提交一个考题*/ /** 提交一个考题*/
@ -21,17 +21,16 @@ export function finishOneExamQuestion(data) {
return request({ return request({
url: '/api/userExam/finish', url: '/api/userExam/finish',
method: 'put', method: 'put',
data: data data: data,
}); })
} }
/** 考试完成提交*/ /** 考试完成提交*/
export function submitExam(examId) { export function submitExam(examId) {
return request({ return request({
url: `/api/userExam/${examId}/submit`, url: `/api/userExam/${examId}/submit`,
method: 'put' method: 'put',
}); })
} }
/** 获取用户考试列表*/ /** 获取用户考试列表*/
@ -39,40 +38,41 @@ export function getPublishExam(data) {
return request({ return request({
url: `/api/userExam/list`, url: `/api/userExam/list`,
method: 'get', method: 'get',
params: data params: data,
}); })
} }
/** 删除用户考试*/ /** 删除用户考试*/
export function delPublishExam(id) { export function delPublishExam(id) {
return request({ return request({
url: `/api/userExam/${id}`, url: `/api/userExam/${id}`,
method: 'delete' method: 'delete',
}); })
} }
export function updateExam(data) { export function updateExam(data) {
return request({ return request({
url: `/api/userExam/${data.id}`, url: `/api/userExam/${data.id}`,
method: 'put', method: 'put',
data: data data: data,
}); })
} }
/** 获取班级考试成绩列表 */ /** 获取班级考试成绩列表 */
export function getClassGradeList(examId, params) { export function getClassGradeList(params) {
return request({ return request({
url: `/api/userExam/paged/orgUser/${params.orgId}/${examId}`, url: `/api/v2/paper/user/page`,
method: 'get', method: 'get',
params params,
}); })
} }
/** 查询组织学生单次考试成绩曲线 */ /** 查询组织学生单次考试成绩曲线 */
export function getClassGradeStatistic(orgId, examId) { export function getClassGradeStatistic(orgId, examId) {
return request({ return request({
url: `/api/userExam/curve/${orgId}/${examId}`, url: `/api/v2/paper/user/curve`,
method: 'get' params: { pcId: examId, orgId },
}); method: 'get',
})
} }
/** 查询组织学生单次考试成绩曲线 */ /** 查询组织学生单次考试成绩曲线 */
@ -80,29 +80,29 @@ export function getStuGradeStatistic(userId) {
return request({ return request({
url: `/api/userExam/curve/${userId}`, url: `/api/userExam/curve/${userId}`,
method: 'get', method: 'get',
}); })
} }
/** 个人仿真数据统计 */ /** 个人仿真数据统计 */
export function getSimulationTimeChart(mapId) { export function getSimulationTimeChart(mapId) {
return request({ return request({
url: `/api/stats/simulation/${mapId}/stats`, url: `/api/stats/simulation/${mapId}/stats`,
method: 'get' method: 'get',
}); })
} }
// 课程内实训数据统计 // 课程内实训数据统计
export function getLessonTimeChart(id) { export function getLessonTimeChart(id) {
return request({ return request({
url: `/api/stats/lesson/${id}/stats`, url: `/api/stats/lesson/${id}/stats`,
method: 'get' method: 'get',
}); })
} }
// 课程列表 // 课程列表
export function getLessonList() { export function getLessonList() {
return request({ return request({
url: '/api/stats/lesson/list', url: '/api/stats/lesson/list',
method: 'get' method: 'get',
}); })
} }

View File

@ -0,0 +1,28 @@
import request from '@/utils/request';
// 创建权限
export function createPermission(data) {
return request({
url: `/api/v2/permission/create`,
method: 'post',
data
});
}
// 权限修改
export function updatePermission(data) {
return request({
url: `/api/v2/permission/update`,
method: 'put',
data
});
}
// 分页获取权限
export function getPermissionPage(data) {
return request({
url: `/api/v2/permission/find/page`,
method: 'post',
data
});
}

View File

@ -61,10 +61,10 @@ export function setLwConfig(id, data) {
data: data data: data
}); });
} }
/** 查询所有的某类型设备 */ /** 查询某个项目下的所有的某类型设备 */
export function getDevicesByType(type) { export function getDevicesByType(project, type) {
return request({ return request({
url: `/api/device/${type}/all`, url: `/api/device/${project}/${type}/all`,
method: 'get' method: 'get'
}); });
} }

187
src/api/projectConfig.js Normal file
View File

@ -0,0 +1,187 @@
import request from '@/utils/request';
/** 后端项目配置分页 */
export function getBackProjectConfigByPage(params) {
return request({
url: `/api/project/page`,
method: 'get',
params
});
}
/** 全量后端项目配置 */
export function getAllBackProjectConfig() {
return request({
url: `/api/project/all`,
method: 'get'
});
}
/** 主键获取后端项目配置 */
export function getBackProjectConfigById(id) {
return request({
url: `/api/project/${id}`,
method: 'get'
});
}
/** 通过code获取后端项目配置 */
export function getBackProjectConfigByCode(code) {
return request({
url: `/api/project/code/${code}`,
method: 'get'
});
}
/** 删除后端项目配置 */
export function deleteBackProjectConfig(id) {
return request({
url: `/api/project/del/${id}`,
method: 'delete'
});
}
/** 更新后端项目配置 */
export function updateBackProjectConfig(data) {
return request({
url: `/api/project/update`,
method: 'put',
data
});
}
/** 保存后端项目配置 */
export function saveBackProjectConfig(data) {
return request({
url: `/api/project/save`,
method: 'POST',
data
});
}
/** 获取后端项目列表,关联时使用 */
export function getBackProjectConfigList(id) {
return request({
url: `/api/project/simple`,
method: 'get'
});
}
/** 前端项目配置分页 */
export function getFrontProjectConfigByPage(params) {
return request({
url: `/api/project/viewSetting/page`,
method: 'get',
params
});
}
/** 全量前端项目配置 */
export function getAllFrontProjectConfig() {
return request({
url: `/api/project/viewSetting/all`,
method: 'get'
});
}
/** 获取前端项目配置 */
export function getFrontProjectConfigById(id) {
return request({
url: `/api/project/viewSetting/${id}`,
method: 'get'
});
}
/** 删除前端项目配置 */
export function deleteFrontProjectConfig(id) {
return request({
url: `/api/project/viewSetting/del/${id}`,
method: 'delete'
});
}
/** 更新前端项目配置 */
export function updateFrontProjectConfig(data) {
return request({
url: `/api/project/viewSetting/update`,
method: 'put',
data
});
}
/** 保存前端项目配置 */
export function saveFrontProjectConfig(data) {
return request({
url: `/api/project/viewSetting/save`,
method: 'POST',
data
});
}
/** 登录时根据前端标识获取配置 */
export function getFrontProjectConfigByLogin(markKey) {
return request({
url: `/api/project/viewSetting/project/${markKey}`,
method: 'get'
});
}
/** 登录时获取全量前端配置 */
export function getAllFrontProjectConfigByLogin(markKey) {
return request({
url: `/api/project/viewSetting/simple/all`,
method: 'get'
});
}
/** 检查项目code */
export function checkBackProjectExist(params) {
return request({
url: `/api/project/check/code`,
method: 'get',
params
});
}
/** 检查项目markKey */
export function checkFrontProjectExist(params) {
return request({
url: `/api/project/check/markKey`,
method: 'get',
params
});
}
//
export function getUploadUrl(params) {
return request({
url: `/api/minio/preSignedUrl`,
method: 'get',
params
});
}
/** 设置默认组织 */
export function setDefaultOrg(data) {
return request({
url: `/api/project/setDefaultOrg`,
method: 'put',
data
});
}
/** 创建默认组织 */
export function createDefaultOrg(id, data) {
return request({
url: `/api/project/${id}/createDefaultOrg`,
method: 'POST',
data
});
}
/** 登录项目组织列表 */
export function getOrgList(id) {
return request({
url: `/api/project/${id}/orgList`,
method: 'get'
});
}

View File

@ -1,18 +1,45 @@
import request from '@/utils/request'; import request from '@/utils/request';
// 查询理论试题(全部组织)
export function listAllQuestionPage(params) {
return request({
url: `/api/question/paging`,
method: 'get',
params
});
}
// 分页查询理论试题 // 分页查询理论试题
export function listQuestionPage(params) { export function listQuestionPage(params) {
return request({ return request({
url: `/api/questionBank/questions/paging`, // url: `/api/questionBank/questions/paging`,
url: `/api/question/org/paging`,
method: 'get', method: 'get',
params params
}); });
} }
// 查询所有理论试题
export function listQuestionAll() {
return request({
url: `/api/question/org`,
method: 'get'
});
}
// 标签列表
export function getLabelList() {
return request({
url: `/api/question/org/label`,
method: 'get'
});
}
// 创建题目 // 创建题目
export function createQuestion(data) { export function createQuestion(data) {
return request({ return request({
url: `/api/questionBank/questions`, // url: `/api/questionBank/questions`,
url: `/api/question/org`,
method: 'post', method: 'post',
data data
}); });
@ -21,25 +48,55 @@ export function createQuestion(data) {
// 删除题目 // 删除题目
export function deleteQuestion(questionId) { export function deleteQuestion(questionId) {
return request({ return request({
url: `/api/questionBank/questions/${questionId}`, // url: `/api/questionBank/questions/${questionId}`,
method: 'delete' url: `/api/question/org`,
method: 'delete',
data: [questionId]
}); });
} }
// 更新题目 // 更新题目
export function updateOption(data) { export function updateOption(data) {
return request({ return request({
url: `/api/questionBank/questions/${data.id}`, // url: `/api/questionBank/questions/${data.id}`,
url: `/api/question/org/${data.id}`,
method: 'put', method: 'put',
data data
}); });
} }
// 获取题目信息 // 获取题目信息
export function getQuestionInfo(questionId) { export function getQuestionInfo(questionId, params) {
return request({ return request({
url: `/api/questionBank/questions/${questionId}`, // url: `/api/questionBank/questions/${questionId}`,
method: 'get' url: `/api/question/org/${questionId}`,
method: 'get',
params
}); });
} }
// 题库批量导入
export function importQuestion(data) {
return request({
url: `/api/question/org/import`,
method: 'post',
data
});
}
// 预览答题
export function testAnswer(questionId, data) {
return request({
url: `/api/question/org/test/answer/${questionId}`,
method: 'post',
data
});
}
// 清空题库
export function clearBank() {
return request({
url: `/api/question/org/clear`,
method: 'get'
});
}

View File

@ -6,29 +6,15 @@ export function createSimulation(data) {
method: 'post' method: 'post'
}); });
} }
/** 根据仿真group获取仿真基础信息 */ /** 根据仿真group获取仿真基础信息 废弃 */
export function getSimulationInfoByGroup(groupId) { export function getSimulationInfoByGroup(groupId) {
return request({ return request({
url: `/common/simulation/${groupId}`, url: `/common/simulation/${groupId}`,
method: 'get' method: 'get'
}); });
} }
/** 根据仿真group获取仿真地图数据 */
export function getMapDataByGroup(groupId) { /** 获取仿真成员列表 废弃 */
return request({
url: `/rtSimulation/${groupId}/mapData`,
method: 'get'
});
}
/** 仿真发送指令 */
export function sendSimulationCommand(group, memberId, type, data) {
return request({
url: `/common/simulation/${group}/member/${memberId}/operate/${type}`,
method: 'post',
data
});
}
/** 获取仿真成员列表 */
export function getMemberListCommon(group, role) { export function getMemberListCommon(group, role) {
if (!role) { if (!role) {
@ -39,14 +25,14 @@ export function getMemberListCommon(group, role) {
method: 'get' method: 'get'
}); });
} }
/** 获取仿真用户列表 */ /** 获取仿真用户列表 废弃 */
export function getUserListCommon(group) { export function getUserListCommon(group) {
return request({ return request({
url: `/common/simulation/${group}/users`, url: `/common/simulation/${group}/users`,
method: 'get' method: 'get'
}); });
} }
/** 销毁仿真 */ /** 销毁仿真 废弃 */
export function destroySimulation(group) { export function destroySimulation(group) {
return request({ return request({
url: `/common/simulation/${group}/destroy`, url: `/common/simulation/${group}/destroy`,
@ -56,11 +42,11 @@ export function destroySimulation(group) {
/** 初始化仿真 */ /** 初始化仿真 */
export function initSimulation(group) { export function initSimulation(group) {
return request({ return request({
url: `/common/simulation/${group}/init`, url: `/simulation/new/${group}/reset`,
method: 'put' method: 'put'
}); });
} }
/** 设置故障 */ /** 设置故障 废弃 */
export function setSimulationFault(group, data) { export function setSimulationFault(group, data) {
return request({ return request({
url: `/common/simulation/${group}/fault`, url: `/common/simulation/${group}/fault`,
@ -68,7 +54,7 @@ export function setSimulationFault(group, data) {
data data
}); });
} }
/** 取消故障 */ /** 取消故障 废弃 */
export function cancelSimulationFault(group, deviceId, faultType) { export function cancelSimulationFault(group, deviceId, faultType) {
return request({ return request({
url: `/common/simulation/${group}/device/${deviceId}/fault/${faultType}`, url: `/common/simulation/${group}/device/${deviceId}/fault/${faultType}`,
@ -78,28 +64,28 @@ export function cancelSimulationFault(group, deviceId, faultType) {
/** 仿真运行倍速 */ /** 仿真运行倍速 */
export function timesSpeedPlayback(group, speed) { export function timesSpeedPlayback(group, speed) {
return request({ return request({
url: `/common/simulation/${group}/updateSpeed/${speed}`, url: `/simulation/${group}/updateSpeed/${speed}`,
method: 'put' method: 'put'
}); });
} }
/** 仿真暂停 */ /** 仿真暂停 */
export function simulationPause(group) { export function simulationPause(group) {
return request({ return request({
url: `/common/simulation/${group}/pause`, url: `/simulation/${group}/pause`,
method: 'put' method: 'put'
}); });
} }
/** 仿真开始 */ /** 仿真开始 */
export function simulationStart(group) { export function simulationStart(group) {
return request({ return request({
url: `/common/simulation/${group}/start`, url: `/simulation/${group}/start`,
method: 'put' method: 'put'
}); });
} }
/** 获取存在的仿真列表 */ /** 获取存在的仿真列表 */
export function getExistSimulationList(params) { export function getExistSimulationList(params) {
return request({ return request({
url: `/common/simulation/list`, url: `/simulation/list`,
method: 'get', method: 'get',
params params
}); });
@ -107,7 +93,15 @@ export function getExistSimulationList(params) {
/** 获取仿真用户信息 */ /** 获取仿真用户信息 */
export function getSimulationUserInfo(id) { export function getSimulationUserInfo(id) {
return request({ return request({
url: `/common/simulation/${id}/users`, url: `/simulation/${id}/users`,
method: 'get' method: 'get'
}); });
} }
/** 监管仿真 */
export function getSuperviseSimulation(params) {
return request({
url: `/simulation/supervise`,
method: 'get',
params
});
}

View File

@ -296,7 +296,7 @@ export function modifySystemTime(data, group) {
/** 新版地图按计划行车 */ /** 新版地图按计划行车 */
export function ranAsPlan(data, group) { export function ranAsPlan(data, group) {
return request({ return request({
url: `/simulation/${group}/ranAsPlan`, url: `/simulation/new/${group}/runAsPlan`,
method: 'post', method: 'post',
data: data data: data
}); });
@ -537,3 +537,40 @@ export function queryPaTimedList(group, params) {
params params
}); });
} }
/** 创建仿真 */
export function createSimulation(id) {
return request({
url: `/simulation/new/mapFunction/${id}`,
method: 'post'
});
}
/** 根据地图ID和功能ID获取仿真GroupId */
export function getGroupByMapAndFunction(mapId, functionId) {
return request({
url: `/simulation/new/map/${mapId}/function/${functionId}`,
method: 'get'
});
}
/** 由系统管理员和教员销毁仿真 */
export function destroySimulationByAdmin(group) {
return request({
url: `/simulation/${group}/destroy`,
method: 'delete'
});
}
/** 非仿真创建者退出仿真 */
export function exitSimulation(group) {
return request({
url: `/simulation/${group}/exit`,
method: 'put'
});
}
/** 仿真监管那里进入仿真 */
export function enterSimulationByTeacher(group) {
return request({
url: `/simulation/${group}/monitor`,
method: 'post'
});
}

View File

@ -0,0 +1,27 @@
import request from '@/utils/request';
/** 删除第三方配置 */
export function deleteThirdAccountConfig(id) {
return request({
url: `/api/thirdAccountConfig/${id}`,
method: 'delete'
});
}
/** 分页查询所有配置 */
export function queryThirdAccountConfig(params) {
return request({
url: `/api/thirdAccountConfig/paged`,
method: 'get',
params
});
}
/** 新增或更新第三方配置 */
export function updateThirdAccountConfig(data) {
return request({
url: `/api/thirdAccountConfig`,
method: 'post',
data
});
}

View File

@ -41,7 +41,6 @@ export function getTrainingStepList(trainingId) {
} }
/** 修改实训所有步骤 */ /** 修改实训所有步骤 */
export function updateTrainingStep(group, trainingId, data) { export function updateTrainingStep(group, trainingId, data) {
console.log(group, trainingId, '*******');
return request({ return request({
url: `/api/v2/draft/training/${group}/${trainingId}/step/update`, url: `/api/v2/draft/training/${group}/${trainingId}/step/update`,
method: 'put', method: 'put',
@ -152,10 +151,10 @@ export function getTrainingGradeRules(trainingId) {
method: 'get' method: 'get'
}); });
} }
/** 清空步骤 */ /** 清空重置实训 */
export function clearTrainingStep(trainingId) { export function clearDesignTraining(trainingId, group) {
return request({ return request({
url: `/api/v2/draft/training/${trainingId}/step/clear`, url: `/api/v2/draft/training/${group}/reset/${trainingId}`,
method: 'delete' method: 'delete'
}); });
} }

View File

@ -75,4 +75,74 @@ export function getSubSystemByProjectCode() {
method: 'get' method: 'get'
}); });
} }
/** 创建地图系统 */
export function createMapFunction(data) {
return request({
url: `/api/mapFunction`,
method: 'post',
data
});
}
/** 列表查询地图系统 */
export function queryMapFunctionList(params) {
return request({
url: `/api/mapFunction/list`,
method: 'get',
params
});
}
/** 更新地图系统 */
export function updateMapFunction(data) {
return request({
url: `/api/mapFunction/${data.id}`,
method: 'put',
data
});
}
/** 删除地图系统 */
export function deleteMapFunction(id) {
return request({
url: `/api/mapFunction/${id}`,
method: 'delete'
});
}
/** 分页查询地图系统 */
export function queryMapFunctionPaged(params) {
return request({
url: `/api/mapFunction/paged`,
method: 'get',
params
});
}
/** 生成地图子系统 */
export function generateMapFunctionNew(mapId, data) {
return request({
url: `/api/mapFunction/${mapId}/generate`,
method: 'post',
data
});
}
/** 根据id查询地图系统 */
export function getMapFunctioById(id) {
return request({
url: `/api/mapFunction/${id}`,
method: 'get'
});
}
/** 一键删除地图下所有线路功能 */
export function deleteAllMapFunction(mapId) {
return request({
url: `/api/mapFunction/batch/${mapId}`,
method: 'delete'
});
}
/** 新增分组 */
export function updateMapFunctionSubset(data) {
return request({
url: `/api/mapFunction/group`,
method: 'put',
data
});
}

View File

@ -0,0 +1,35 @@
import request from '@/utils/request';
/** 设置权限失效或有效*/
export function setPermissonInValid(subjectId) {
return request({
url: `/api/v2/permission/subject/inValid/${subjectId}`,
method: 'get'
});
}
/** 用户权限列表*/
export function listPermision(params) {
return request({
url: `/api/v2/permission/subject/page`,
method: 'get',
params: params
});
}
/** 查看用户分发的下级所有用户权限*/
export function getPermissonInDistribute(subjectId) {
return request({
url: `/api/v2/permission/subject/distribute/${subjectId}`,
method: 'get'
});
}
/** 查看当前mapId 下用户的所有权限及功能*/
export function getMapIdPermisson(mapId) {
return request({
url: `/api/v2/permission/subject/permission/${mapId}`,
method: 'get'
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

BIN
src/assets/reset.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="container"> <div class="container">
<li v-if="option.children && option.children.length" class="menu-item" :class="popClass" @mouseenter="enter($vnode.key)" @mouseleave="leave"> <li v-if="option.children && option.children.length && checkVisible(option)" class="menu-item" :class="popClass" @mouseenter="enter($vnode.key)" @mouseleave="leave">
<div ref="flexBox" class="flex-box"> <div ref="flexBox" class="flex-box">
<el-button type="text" class="item" :disabled="checkDisabled(option)"> <el-button type="text" class="item" :disabled="checkDisabled(option)">
<el-link v-if="option.tipsType" :type="option.tipsType" :underline="false">{{ option.label }}</el-link> <el-link v-if="option.tipsType" :type="option.tipsType" :underline="false">{{ option.label }}</el-link>
@ -11,7 +11,7 @@
<ul v-if="isPopup" ref="popup" class="menu" :style="{display: isShow? 'block': 'table', marginLeft: marginLeft+'px'}"> <ul v-if="isPopup" ref="popup" class="menu" :style="{display: isShow? 'block': 'table', marginLeft: marginLeft+'px'}">
<div class="menu-pop pop-menu"> <div class="menu-pop pop-menu">
<div v-show="isShow" class="arrow el-icon-arrow-down" /> <div v-show="isShow" class="arrow el-icon-arrow-down" />
<pop-menu-item v-for="(el, i) in option.children" :key="i" :option="el" :pop-class="popClass" :allowedColor="allowedColor" :disabledColor="disabledColor" @close="close" /> <pop-menu-item v-for="(el, i) in option.children" :key="i" :option="el" :pop-class="popClass" :allowed-color="allowedColor" :disabled-color="disabledColor" @close="close" />
<div v-show="isShow" class="arrow el-icon-arrow-up" /> <div v-show="isShow" class="arrow el-icon-arrow-up" />
</div> </div>
</ul> </ul>
@ -52,14 +52,14 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
disabledColor: { disabledColor: {
type: String, type: String,
default: '#000', default: '#000'
}, },
allowedColor: { allowedColor: {
type: String, type: String,
default: '#ccc' default: '#ccc'
} }
}, },
data() { data() {
return { return {

View File

@ -303,7 +303,9 @@ export default {
methods: { methods: {
// //
initQueryModel() { initQueryModel() {
this.formModel = localStore.get(this.$route.path) || this.formModel; if (!this.queryForm.notRecord) {
this.formModel = localStore.get(this.$route.path) || this.formModel;
}
this.buildForm(); this.buildForm();
if (typeof this.queryForm.initLoadCallback === 'function') { if (typeof this.queryForm.initLoadCallback === 'function') {
this.queryForm.initLoadCallback(this.formModel); this.queryForm.initLoadCallback(this.formModel);
@ -350,7 +352,6 @@ export default {
// //
const queryObject = {}; const queryObject = {};
const model = {}; const model = {};
// debugger;
for (const item in this.queryForm.queryObject) { for (const item in this.queryForm.queryObject) {
if (this.queryForm.queryObject.show === false) { if (this.queryForm.queryObject.show === false) {
continue; continue;

View File

@ -93,7 +93,7 @@
:sort-by="column.sortBy" :sort-by="column.sortBy"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div v-html="scope.row[column.prop]" /> <div style="white-space: pre-wrap;" v-html="scope.row[column.prop]" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column

View File

@ -77,7 +77,7 @@ export default {
size: 3, size: 3,
action: `${this.$store.state.user.uploadUrl}/api/upload/PICTURE?appId=00001&appSecret=joylink00001`, action: `${this.$store.state.user.uploadUrl}/api/upload/PICTURE?appId=00001&appSecret=joylink00001`,
response: (res) => { response: (res) => {
return `${this.$store.state.user.resourcesUrl}${res.data}`; return `${this.$store.state.user.ossUrl}${res.data}`;
}, },
error: () => { that.$message.error('图片上传失败,请检查网络状态'); }, error: () => { that.$message.error('图片上传失败,请检查网络状态'); },
sizeError: () => { that.$message.error('图片上传失败图片大小限制3MB'); } // sizeError: () => { that.$message.error('图片上传失败图片大小限制3MB'); } //

View File

@ -0,0 +1,835 @@
<template>
<!-- 本体部分 -->
<div
:class="['vue-puzzle-vcode', { show_: show }]"
@mousedown="onCloseMouseDown"
@mouseup="onCloseMouseUp"
@touchstart="onCloseMouseDown"
@touchend="onCloseMouseUp"
>
<div
class="vue-auth-box_"
@mousedown.stop
@touchstart.stop
>
<div
class="auth-body_"
:style="`height: ${canvasHeight}px`"
>
<!-- 主图有缺口 -->
<canvas
ref="canvas1"
:width="canvasWidth"
:height="canvasHeight"
:style="`width:${canvasWidth}px;height:${canvasHeight}px`"
/>
<!-- 成功后显示的完整图 -->
<canvas
ref="canvas3"
:class="['auth-canvas3_', { show: isSuccess }]"
:width="canvasWidth"
:height="canvasHeight"
:style="`width:${canvasWidth}px;height:${canvasHeight}px`"
/>
<!-- 小图 -->
<canvas
ref="canvas2"
:width="puzzleBaseSize"
class="auth-canvas2_"
:height="canvasHeight"
:style="
`width:${puzzleBaseSize}px;height:${canvasHeight}px;transform:translateX(${styleWidth -
sliderBaseSize -
(puzzleBaseSize - sliderBaseSize) *
((styleWidth - sliderBaseSize) /
(canvasWidth - sliderBaseSize))}px)`
"
/>
<div :class="['loading-box_', { hide_: !loading }]">
<div class="loading-gif_">
<span />
<span />
<span />
<span />
<span />
</div>
</div>
<div :class="['info-box_', { show: infoBoxShow }, { fail: infoBoxFail }]">
{{ infoText }}
</div>
<div
:class="['flash_', { show: isSuccess }]"
:style="
`transform: translateX(${
isSuccess
? `${canvasWidth + canvasHeight * 0.578}px`
: `-${canvasHeight * 0.578}px`
}) skew(-30deg, 0);`
"
/>
<img
class="reset_"
:src="resetSvg"
@click="reset"
>
</div>
<div class="auth-control_">
<div
class="range-box"
:style="`height:${sliderBaseSize}px`"
>
<div class="range-text">{{ sliderText }}</div>
<div
ref="range-slider"
class="range-slider"
:style="`width:${styleWidth}px`"
>
<div
:class="['range-btn', { isDown: mouseDown }]"
:style="`width:${sliderBaseSize}px`"
@mousedown="onRangeMouseDown($event)"
@touchstart="onRangeMouseDown($event)"
>
<div />
<div />
<div />
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import resetSvg from '@/assets/reset.png';
export default {
props: {
canvasWidth: { type: Number, default: 310 }, // canvas
canvasHeight: { type: Number, default: 160 }, // canvas
//
show: { type: Boolean, default: false },
puzzleScale: { type: Number, default: 1 }, //
sliderSize: { type: Number, default: 50 }, //
range: { type: Number, default: 10 }, //
//
imgs: {
type: Array,
default() {
return [];
}
},
successText: {
type: String,
default: '验证通过!'
},
failText: {
type: String,
default: '验证失败,请重试'
},
sliderText: {
type: String,
default: '拖动滑块完成拼图'
}
},
data() {
return {
mouseDown: false, //
startWidth: 50, // width
startX: 0, // X
newX: 0, // X
pinX: 0, // X
pinY: 0, // Y
loading: false, // onload
isCanSlide: false, //
error: false, //
infoBoxShow: false, //
infoText: '', //
infoBoxFail: false, //
timer1: null, // setTimout1
closeDown: false, // Macclick BUG
isSuccess: false, //
imgIndex: -1, //
isSubmting: false, //
resetSvg
};
},
/** 计算属性 **/
computed: {
// styleWidth
styleWidth() {
const w = this.startWidth + this.newX - this.startX;
return w < this.sliderBaseSize
? this.sliderBaseSize
: w > this.canvasWidth
? this.canvasWidth
: w;
},
// 60 * 0.2~2
puzzleBaseSize() {
return Math.round(
Math.max(Math.min(this.puzzleScale, 2), 0.2) * 52.5 + 6
);
},
// sliderSize
sliderBaseSize() {
return Math.max(
Math.min(
Math.round(this.sliderSize),
Math.round(this.canvasWidth * 0.5)
),
10
);
}
},
/** 监听 **/
watch: {
show(newV) {
//
if (newV) {
// document.body.classList.add('vue-puzzle-overflow');
this.reset();
} else {
this.isSubmting = false;
this.isSuccess = false;
this.infoBoxShow = false;
// document.body.classList.remove('vue-puzzle-overflow');
}
}
},
/** 生命周期 **/
mounted() {
// document.body.appendChild(this.$el);
document.addEventListener('mousemove', this.onRangeMouseMove, false);
document.addEventListener('mouseup', this.onRangeMouseUp, false);
document.addEventListener('touchmove', this.onRangeMouseMove, {
passive: false
});
document.addEventListener('touchend', this.onRangeMouseUp, false);
if (this.show) {
document.body.classList.add('vue-puzzle-overflow');
this.reset();
}
},
beforeDestroy() {
clearTimeout(this.timer1);
// document.body.removeChild(this.$el);
document.removeEventListener('mousemove', this.onRangeMouseMove, false);
document.removeEventListener('mouseup', this.onRangeMouseUp, false);
document.removeEventListener('touchmove', this.onRangeMouseMove, {
passive: false
});
document.removeEventListener('touchend', this.onRangeMouseUp, false);
},
/** 方法 **/
methods: {
//
onClose() {
if (!this.mouseDown && !this.isSubmting) {
clearTimeout(this.timer1);
this.$emit('close');
}
},
onCloseMouseDown() {
this.closeDown = true;
},
onCloseMouseUp() {
if (this.closeDown) {
this.onClose();
}
this.closeDown = false;
},
//
onRangeMouseDown(e) {
if (this.isCanSlide) {
this.mouseDown = true;
this.startWidth = this.$refs['range-slider'].clientWidth;
this.newX = e.clientX || e.changedTouches[0].clientX;
this.startX = e.clientX || e.changedTouches[0].clientX;
}
},
//
onRangeMouseMove(e) {
if (this.mouseDown) {
e.preventDefault();
this.newX = e.clientX || e.changedTouches[0].clientX;
}
},
//
onRangeMouseUp() {
if (this.mouseDown) {
this.mouseDown = false;
this.submit();
}
},
/**
* 开始进行
* @param withCanvas 是否强制使用canvas随机作图
*/
init(withCanvas) {
//
if (this.loading && !withCanvas) {
return;
}
this.loading = true;
this.isCanSlide = false;
const c = this.$refs.canvas1;
const c2 = this.$refs.canvas2;
const c3 = this.$refs.canvas3;
const ctx = c.getContext('2d');
const ctx2 = c2.getContext('2d');
const ctx3 = c3.getContext('2d');
const isFirefox = navigator.userAgent.indexOf('Firefox') >= 0 && navigator.userAgent.indexOf('Windows') >= 0; // windows
const img = document.createElement('img');
ctx.fillStyle = 'rgba(255,255,255,1)';
ctx3.fillStyle = 'rgba(255,255,255,1)';
ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight);
ctx2.clearRect(0, 0, this.canvasWidth, this.canvasHeight);
//
this.pinX = this.getRandom(this.puzzleBaseSize, this.canvasWidth - this.puzzleBaseSize - 20); // 20
this.pinY = this.getRandom(20, this.canvasHeight - this.puzzleBaseSize - 20); // - - 20
img.crossOrigin = 'anonymous'; //
img.onload = () => {
const [x, y, w, h] = this.makeImgSize(img);
ctx.save();
//
this.paintBrick(ctx);
ctx.closePath();
if (!isFirefox) {
ctx.shadowOffsetX = 0;
ctx.shadowOffsetY = 0;
ctx.shadowColor = '#000';
ctx.shadowBlur = 3;
ctx.fill();
ctx.clip();
} else {
ctx.clip();
ctx.save();
ctx.shadowOffsetX = 0;
ctx.shadowOffsetY = 0;
ctx.shadowColor = '#000';
ctx.shadowBlur = 3;
ctx.fill();
ctx.restore();
}
ctx.drawImage(img, x, y, w, h);
ctx3.fillRect(0, 0, this.canvasWidth, this.canvasHeight);
ctx3.drawImage(img, x, y, w, h);
//
ctx.globalCompositeOperation = 'source-atop';
this.paintBrick(ctx);
ctx.arc(
this.pinX + Math.ceil(this.puzzleBaseSize / 2),
this.pinY + Math.ceil(this.puzzleBaseSize / 2),
this.puzzleBaseSize * 1.2,
0,
Math.PI * 2,
true
);
ctx.closePath();
ctx.shadowColor = 'rgba(255, 255, 255, .8)';
ctx.shadowOffsetX = -1;
ctx.shadowOffsetY = -1;
ctx.shadowBlur = Math.min(Math.ceil(8 * this.puzzleScale), 12);
ctx.fillStyle = '#ffffaa';
ctx.fill();
// ctx2
const imgData = ctx.getImageData(
this.pinX - 3, // -3px+3px
this.pinY - 20,
this.pinX + this.puzzleBaseSize + 5,
this.pinY + this.puzzleBaseSize + 5
);
ctx2.putImageData(imgData, 0, this.pinY - 20);
// ctx2.drawImage(c, this.pinX - 3,this.pinY - 20,this.pinX + this.puzzleBaseSize + 5,this.pinY + this.puzzleBaseSize + 5,
// 0, this.pinY - 20, this.pinX + this.puzzleBaseSize + 5, this.pinY + this.puzzleBaseSize + 5);
//
ctx.restore();
ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight);
//
ctx.save();
this.paintBrick(ctx);
ctx.globalAlpha = 0.8;
ctx.fillStyle = '#ffffff';
ctx.fill();
ctx.restore();
//
ctx.save();
ctx.globalCompositeOperation = 'source-atop';
this.paintBrick(ctx);
ctx.arc(
this.pinX + Math.ceil(this.puzzleBaseSize / 2),
this.pinY + Math.ceil(this.puzzleBaseSize / 2),
this.puzzleBaseSize * 1.2,
0,
Math.PI * 2,
true
);
ctx.shadowColor = '#000';
ctx.shadowOffsetX = 2;
ctx.shadowOffsetY = 2;
ctx.shadowBlur = 16;
ctx.fill();
ctx.restore();
//
ctx.save();
ctx.globalCompositeOperation = 'destination-over';
ctx.drawImage(img, x, y, w, h);
ctx.restore();
this.loading = false;
this.isCanSlide = true;
};
img.onerror = () => {
this.init(true); // canvas
};
if (!withCanvas && this.imgs && this.imgs.length) {
let randomNum = this.getRandom(0, this.imgs.length - 1);
if (randomNum === this.imgIndex) {
if (randomNum === this.imgs.length - 1) {
randomNum = 0;
} else {
randomNum++;
}
}
this.imgIndex = randomNum;
img.src = this.imgs[randomNum];
} else {
img.src = this.makeImgWithCanvas();
}
},
// -
getRandom(min, max) {
return Math.ceil(Math.random() * (max - min) + min);
},
// - covercanvas w/h
makeImgSize(img) {
const imgScale = img.width / img.height;
const canvasScale = this.canvasWidth / this.canvasHeight;
let x = 0;
let y = 0;
let w = 0;
let h = 0;
if (imgScale > canvasScale) {
h = this.canvasHeight;
w = imgScale * h;
y = 0;
x = (this.canvasWidth - w) / 2;
} else {
w = this.canvasWidth;
h = w / imgScale;
x = 0;
y = (this.canvasHeight - h) / 2;
}
return [x, y, w, h];
},
//
paintBrick(ctx) {
const moveL = Math.ceil(15 * this.puzzleScale); // 线
ctx.beginPath();
ctx.moveTo(this.pinX, this.pinY);
ctx.lineTo(this.pinX + moveL, this.pinY);
ctx.arcTo(
this.pinX + moveL,
this.pinY - moveL / 2,
this.pinX + moveL + moveL / 2,
this.pinY - moveL / 2,
moveL / 2
);
ctx.arcTo(
this.pinX + moveL + moveL,
this.pinY - moveL / 2,
this.pinX + moveL + moveL,
this.pinY,
moveL / 2
);
ctx.lineTo(this.pinX + moveL + moveL + moveL, this.pinY);
ctx.lineTo(this.pinX + moveL + moveL + moveL, this.pinY + moveL);
ctx.arcTo(
this.pinX + moveL + moveL + moveL + moveL / 2,
this.pinY + moveL,
this.pinX + moveL + moveL + moveL + moveL / 2,
this.pinY + moveL + moveL / 2,
moveL / 2
);
ctx.arcTo(
this.pinX + moveL + moveL + moveL + moveL / 2,
this.pinY + moveL + moveL,
this.pinX + moveL + moveL + moveL,
this.pinY + moveL + moveL,
moveL / 2
);
ctx.lineTo(
this.pinX + moveL + moveL + moveL,
this.pinY + moveL + moveL + moveL
);
ctx.lineTo(this.pinX, this.pinY + moveL + moveL + moveL);
ctx.lineTo(this.pinX, this.pinY + moveL + moveL);
ctx.arcTo(
this.pinX + moveL / 2,
this.pinY + moveL + moveL,
this.pinX + moveL / 2,
this.pinY + moveL + moveL / 2,
moveL / 2
);
ctx.arcTo(
this.pinX + moveL / 2,
this.pinY + moveL,
this.pinX,
this.pinY + moveL,
moveL / 2
);
ctx.lineTo(this.pinX, this.pinY);
},
// canvas
makeImgWithCanvas() {
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
canvas.width = this.canvasWidth;
canvas.height = this.canvasHeight;
ctx.fillStyle = `rgb(${this.getRandom(100, 255)},${this.getRandom(
100,
255
)},${this.getRandom(100, 255)})`;
ctx.fillRect(0, 0, this.canvasWidth, this.canvasHeight);
// 10
for (let i = 0; i < 12; i++) {
ctx.fillStyle = `rgb(${this.getRandom(100, 255)},${this.getRandom(
100,
255
)},${this.getRandom(100, 255)})`;
ctx.strokeStyle = `rgb(${this.getRandom(100, 255)},${this.getRandom(
100,
255
)},${this.getRandom(100, 255)})`;
if (this.getRandom(0, 2) > 1) {
//
ctx.save();
ctx.rotate((this.getRandom(-90, 90) * Math.PI) / 180);
ctx.fillRect(
this.getRandom(-20, canvas.width - 20),
this.getRandom(-20, canvas.height - 20),
this.getRandom(10, canvas.width / 2 + 10),
this.getRandom(10, canvas.height / 2 + 10)
);
ctx.restore();
} else {
//
ctx.beginPath();
const ran = this.getRandom(-Math.PI, Math.PI);
ctx.arc(
this.getRandom(0, canvas.width),
this.getRandom(0, canvas.height),
this.getRandom(10, canvas.height / 2 + 10),
ran,
ran + Math.PI * 1.5
);
ctx.closePath();
ctx.fill();
}
}
return canvas.toDataURL('image/png');
},
//
submit() {
this.isSubmting = true;
// x = puzzleX - () + (puzzle - ) * /canvas
// + slider
const x = Math.abs(
this.pinX -
(this.styleWidth - this.sliderBaseSize) +
(this.puzzleBaseSize - this.sliderBaseSize) *
((this.styleWidth - this.sliderBaseSize) /
(this.canvasWidth - this.sliderBaseSize)) -
3
);
if (x < this.range) {
//
this.infoText = this.successText;
this.infoBoxFail = false;
this.infoBoxShow = true;
this.isCanSlide = false;
this.isSuccess = true;
//
clearTimeout(this.timer1);
this.timer1 = setTimeout(() => {
//
this.isSubmting = false;
this.$emit('success', x);
}, 800);
} else {
//
this.infoText = this.failText;
this.infoBoxFail = true;
this.infoBoxShow = true;
this.isCanSlide = false;
//
this.$emit('fail', x);
// 800ms
clearTimeout(this.timer1);
this.timer1 = setTimeout(() => {
this.isSubmting = false;
this.reset();
}, 800);
}
},
// -
resetState() {
this.infoBoxFail = false;
this.infoBoxShow = false;
this.isCanSlide = false;
this.isSuccess = false;
this.startWidth = this.sliderBaseSize; // width
this.startX = 0; // X
this.newX = 0; // X
},
//
reset() {
if (this.isSubmting) {
return;
}
this.resetState();
this.init();
}
}
};
</script>
<style lang="scss">
.vue-puzzle-vcode {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.3);
z-index: 999;
opacity: 0;
pointer-events: none;
transition: opacity 200ms;
&.show_ {
opacity: 1;
pointer-events: auto;
}
}
.vue-auth-box_ {
position: absolute;
top: 47%;
left: 50%;
transform: translate(-50%, -50%);
padding: 20px;
background: #fff;
user-select: none;
border-radius: 3px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
.auth-body_ {
position: relative;
overflow: hidden;
border-radius: 3px;
.loading-box_ {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.8);
z-index: 20;
opacity: 1;
transition: opacity 200ms;
display: flex;
align-items: center;
justify-content: center;
&.hide_ {
opacity: 0;
pointer-events: none;
.loading-gif_ {
span {
animation-play-state: paused;
}
}
}
.loading-gif_ {
flex: none;
height: 5px;
line-height: 0;
@keyframes load {
0% {
opacity: 1;
transform: scale(1.3);
}
100% {
opacity: 0.2;
transform: scale(0.3);
}
}
span {
display: inline-block;
width: 5px;
height: 100%;
margin-left: 2px;
border-radius: 50%;
background-color: #888;
animation: load 1.04s ease infinite;
&:nth-child(1) {
margin-left: 0;
}
&:nth-child(2) {
animation-delay: 0.13s;
}
&:nth-child(3) {
animation-delay: 0.26s;
}
&:nth-child(4) {
animation-delay: 0.39s;
}
&:nth-child(5) {
animation-delay: 0.52s;
}
}
}
}
.info-box_ {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 24px;
line-height: 24px;
text-align: center;
overflow: hidden;
font-size: 13px;
background-color: #83ce3f;
opacity: 0;
transform: translateY(24px);
transition: all 200ms;
color: #fff;
z-index: 10;
&.show {
opacity: 0.95;
transform: translateY(0);
}
&.fail {
background-color: #ce594b;
}
}
.auth-canvas2_ {
position: absolute;
top: 0;
left: 0;
width: 60px;
height: 100%;
z-index: 2;
}
.auth-canvas3_ {
position: absolute;
top: 0;
left: 0;
opacity: 0;
transition: opacity 600ms;
z-index: 3;
&.show {
opacity: 1;
}
}
.flash_ {
position: absolute;
top: 0;
left: 0;
width: 30px;
height: 100%;
background-color: rgba(255, 255, 255, 0.1);
z-index: 3;
&.show {
transition: transform 600ms;
}
}
.reset_ {
position: absolute;
top: 2px;
right: 2px;
width: 35px;
height: auto;
z-index: 12;
cursor: pointer;
transition: transform 200ms;
transform: rotate(0deg);
&:hover {
transform: rotate(-90deg);
}
}
}
.auth-control_ {
.range-box {
position: relative;
width: 100%;
background-color: #eef1f8;
margin-top: 20px;
border-radius: 3px;
box-shadow: 0 0 8px rgba(240, 240, 240, 0.6) inset;
.range-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 14px;
color: #b7bcd1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
width: 100%;
}
.range-slider {
position: absolute;
height: 100%;
width: 50px;
background-color: rgba(106, 160, 255, 0.8);
border-radius: 3px;
.range-btn {
position: absolute;
display: flex;
align-items: center;
justify-content: center;
right: 0;
width: 50px;
height: 100%;
background-color: #fff;
border-radius: 3px;
box-shadow: 0 0 4px #ccc;
cursor: pointer;
& > div {
width: 0;
height: 40%;
transition: all 200ms;
&:nth-child(2) {
margin: 0 4px;
}
border: solid 1px #6aa0ff;
}
&:hover,
&.isDown {
& > div:first-child {
border: solid 4px transparent;
height: 0;
border-right-color: #6aa0ff;
}
& > div:nth-child(2) {
border-width: 3px;
height: 0;
border-radius: 3px;
margin: 0 6px;
border-right-color: #6aa0ff;
}
& > div:nth-child(3) {
border: solid 4px transparent;
height: 0;
border-left-color: #6aa0ff;
}
}
}
}
}
}
}
.vue-puzzle-overflow {
overflow: hidden !important;
}
</style>

View File

@ -29,6 +29,7 @@ import systemGenerate from './systemGenerate';
import login from './login'; import login from './login';
import designPlatform from './designPlatform'; import designPlatform from './designPlatform';
import trainingManage from './trainingManage'; import trainingManage from './trainingManage';
import newRouter from './newRouter';
export default { export default {
enLocale, enLocale,
@ -61,5 +62,6 @@ export default {
systemGenerate, systemGenerate,
login, login,
designPlatform, designPlatform,
trainingManage trainingManage,
newRouter
}; };

View File

@ -0,0 +1,48 @@
export default {
simulation: 'simulation',
multiplayerSimulation: 'Many simulation',
regulationSimulation: 'Regulation of the simulation',
teachingManagement: 'teaching management',
classroom: 'classroom management',
student: 'student management',
theory: 'The theory of management',
training: 'Practical teaching management',
exam: 'examination management',
lineDesign: 'track design',
case: 'case',
SystemManagement: 'System management',
SystemDataManagement: 'System data management',
dataDictionary: 'Data dictionary',
SystemAccountManagement: 'System Account Management',
ThirdPartyAccounts: 'Configuring Third-Party Accounts',
OnlineInformationManagement: 'Online information management',
loginUser: 'Online users',
cacheDataManage: 'Cache data management',
simulationManage: 'simulation management',
companyUserManage: 'Organization User Management',
companyManage: 'Company manage',
lineDataManage: 'Line data management',
lineTypeManage: 'Line type management',
linePacketManage: 'Line packet management',
teachingDataManage: 'Teaching data management',
theoryData: 'Theoretical topic data management',
trainingDataManage: 'Training data management',
examData: 'Examination data management',
userTrainingDataManage: 'User training data management',
userExamData: 'User test data management',
projectDataManage: 'Project data management',
projectManage: 'Project Manage',
projectConfig: 'Project client configuration',
projectDeviceManage: 'Project equipment management',
permissionDataManage: 'Permission Data Management',
permissionManage: 'Permission',
authorityTransferManage: 'Privilege distribution management',
userRulesManage: 'User Rights Statistics',
fileManage: 'File Manage',
frontResourceManage: 'Front-End Resource Management',
iscsPrerecordManage: 'ISCS Advance record management',
XRVTI: 'Xi\'an Railway Vocational & Technical Institute',
GEMVC: 'Guizhou Equipment Manufacturing Vocational College',
JVCOEAI: 'Jiangsu Vocational College Of Electronics And Information',
functionManage: 'function management'
};

View File

@ -117,5 +117,8 @@ export default {
distributionAttribution: 'Distribution attribution', distributionAttribution: 'Distribution attribution',
goodsAmount:'Goods Amount', goodsAmount:'Goods Amount',
operate:'operate', operate:'operate',
orderNotPay:'order not pay' orderNotPay:'order not pay',
updateTime: 'update time',
oneClickSync: 'one click sync',
ability: 'ability'
}; };

View File

@ -1,108 +1,110 @@
export default { export default {
homePage: 'Home', homePage: 'Home',
mapManage: 'Map', mapManage: 'Map',
skinManage: 'Skin management', skinManage: 'Skin management',
mapDraw: 'Map draw', mapDraw: 'Map draw',
runPlanManage: 'Run plan', runPlanManage: 'Run plan',
productEdit: 'Product editor', productEdit: 'Product editor',
newDesignEditor: 'Editor', newDesignEditor: 'Editor',
newDesignEditorList: 'Editor List', newDesignEditorList: 'Editor List',
newDesignDraftEditorList: 'Draft Editor List', newDesignDraftEditorList: 'Draft Editor List',
uploadPdf: 'Upload Pdf', uploadPdf: 'Upload Pdf',
fileManage:'File Manage', fileManage: 'File Manage',
designhomePage: 'Public map', designhomePage: 'Public map',
designUserPage: 'Personal map', designUserPage: 'Personal map',
newDesignUserPage: 'Personal map', newDesignUserPage: 'Personal map',
lessaonManage: 'Lesson', lessaonManage: 'Lesson',
lessonEdit: 'Lesson editor', lessonEdit: 'Lesson editor',
trainingRecord: 'Trainning recording', trainingRecord: 'Trainning recording',
trainingRule: 'Training rules', trainingRule: 'Training rules',
trainingManage: 'Training management', trainingManage: 'Training management',
taskManage: 'Task management', taskManage: 'Task management',
scriptManage: 'Script', scriptManage: 'Script',
teachSystem: 'Teaching', teachSystem: 'Teaching',
examSystem: 'Examination', examSystem: 'Examination',
demonstrationSystem: 'Simulation', demonstrationSystem: 'Simulation',
dpSystem: 'Large screen', dpSystem: 'Large screen',
planSystem: 'Lian plan', planSystem: 'Lian plan',
replayManage: 'Playback', replayManage: 'Playback',
permissionManage: 'Permission', permissionManage: 'Permission',
selfPermission: 'My Permission', selfPermission: 'My Permission',
pulishManage: 'Publication', pulishManage: 'Publication',
publishMapManage: 'Publishing map management', publishMapManage: 'Publishing map management',
productStateManage: 'Product state management', productStateManage: 'Product state management',
publishLessonManage: 'Publishing lesson management', publishLessonManage: 'Publishing lesson management',
runPlanTemplateManage: 'Template plan management', runPlanTemplateManage: 'Template plan management',
runPlanCommonManage: 'Loading Plan Managemen', runPlanCommonManage: 'Loading Plan Managemen',
runPlanEveryDayManage: 'Daily plan Management', runPlanEveryDayManage: 'Daily plan Management',
examRuleManage: 'Management of examination rules', examRuleManage: 'Management of examination rules',
orderAuthorityManage: 'Order&Authority', orderAuthorityManage: 'Order&Authority',
commodityManage: 'Commodity management', commodityManage: 'Commodity management',
orderManage: 'Order management', orderManage: 'Order management',
authorityManage: 'authority management', authorityManage: 'authority management',
authorityTransferManage: 'Privilege distribution management', authorityTransferManage: 'Privilege distribution management',
userRulesManage: 'User Rights Statistics', userRulesManage: 'User Rights Statistics',
addCommodity: 'Adding goods', addCommodity: 'Adding goods',
addOrder: 'Adding orders', addOrder: 'Adding orders',
addCoursePermissions: 'Adding course permissions', addCoursePermissions: 'Adding course permissions',
systemManage: 'System', systemManage: 'System',
dataDictionary: 'Data dictionary', dataDictionary: 'Data dictionary',
dataDictionaryDetails: 'Data dictionary details', dataDictionaryDetails: 'Data dictionary details',
userManage: 'user management', userManage: 'user management',
loginUserManage:'login user Manage', loginUserManage: 'login user Manage',
cacheManage: 'cache management', cacheManage: 'cache management',
userTrainingManage: 'User training management', userTrainingManage: 'User training management',
userExamManage: 'User examination management', userExamManage: 'User examination management',
userSimulationManage: 'User simulation management', userSimulationManage: 'User simulation management',
existingSimulation: 'Existence simulation management', existingSimulation: 'Existence simulation management',
ibpDraw: 'Ibp Draw', ibpDraw: 'Ibp Draw',
trainingPlatform: 'trainingPlatform', trainingPlatform: 'trainingPlatform',
releaseApplication: 'Release application', releaseApplication: 'Release application',
courseApplication: 'Course release application', courseApplication: 'Course release application',
scriptReleaseApplication: 'Script release application', scriptReleaseApplication: 'Script release application',
runGraphReleaseApplication: 'Run graph release application', runGraphReleaseApplication: 'Run graph release application',
subsystemGeneration: 'Subsystem generation', subsystemGeneration: 'Subsystem generation',
newsBulletin: 'New bulletin', newsBulletin: 'New bulletin',
notificationBulletin: 'Systematic notification', notificationBulletin: 'Systematic notification',
commandDictionary: 'Command dictionary', commandDictionary: 'Command dictionary',
configLine: 'Line management', configLine: 'Line management',
deviceManage: 'Device management', deviceManage: 'Device management',
iscsDraw: 'Iscs Draw', iscsDraw: 'Iscs Draw',
iscsSystem: 'Iscs System', iscsSystem: 'Iscs System',
studentManage: 'Student manage', studentManage: 'Student manage',
examDetail: 'Exam detail', examDetail: 'Exam detail',
raceManage: 'Race manage', raceManage: 'Race manage',
practiceManage:'Practice manage', practiceManage: 'Practice manage',
bankManage: 'Bank manage', bankManage: 'Bank manage',
sceneManage:'Scene manage', sceneManage: 'Scene manage',
companyManage: 'Company manage', companyManage: 'Company manage',
authorApply: 'Grant application', authorApply: 'Grant application',
AuthorList: 'Authorization code list', AuthorList: 'Authorization code list',
questionsRuleManage: 'Question rule manage', questionsRuleManage: 'Question rule manage',
preTheoryData: 'Pre Theory Data', preTheoryData: 'Pre Theory Data',
boardManage: 'Message Board Manage', boardManage: 'Message Board Manage',
publishIBPManage:'publish IBP Manage', publishIBPManage: 'publish IBP Manage',
publishISCSManage:'publish ISCS Manage', publishISCSManage: 'publish ISCS Manage',
publishTrainingManage: 'publish Training Manage', publishTrainingManage: 'publish Training Manage',
voiceTraining: 'Voice Training', voiceTraining: 'Voice Training',
mapGroup: 'Map Group', mapGroup: 'Map Group',
drawingMange:'Drawing Mange', drawingMange: 'Drawing Mange',
projectServer: 'Project Server', projectServer: 'Project Server',
audioResourcesManage: 'Audio Resources Manage', audioResourcesManage: 'Audio Resources Manage',
iscsDeviceManage: 'ISCS Device Manage', iscsDeviceManage: 'ISCS Device Manage',
iscsResourcesManage: 'ISCS Resources Manage' iscsResourcesManage: 'ISCS Resources Manage',
}; projectManage: 'Project Manage',
frontProjectConfigManage: 'Front Project Config Manage',
}

View File

@ -29,6 +29,7 @@ import systemGenerate from './systemGenerate';
import login from './login'; import login from './login';
import designPlatform from './designPlatform'; import designPlatform from './designPlatform';
import trainingManage from './trainingManage'; import trainingManage from './trainingManage';
import newRouter from './newRouter';
export default { export default {
cnLocale, cnLocale,
@ -61,5 +62,6 @@ export default {
systemGenerate, systemGenerate,
login, login,
designPlatform, designPlatform,
trainingManage trainingManage,
newRouter
}; };

View File

@ -129,7 +129,7 @@ export default {
confirmRunToFrontStation: '确认运行至前方站' confirmRunToFrontStation: '确认运行至前方站'
}, },
passiveDialog: { passiveDialog: {
alarmDetailInformation: '级警详细信息', alarmDetailInformation: '级警详细信息',
lineName: '线路名称', lineName: '线路名称',
unitName: '单位名称', unitName: '单位名称',
moduleName: '模块名称', moduleName: '模块名称',

View File

@ -0,0 +1,48 @@
export default {
simulation: '仿真',
multiplayerSimulation: '多人仿真',
regulationSimulation: '监管仿真',
teachingManagement: '教学管理',
classroom: '班级管理',
student: '学生管理',
theory: '理论题目管理',
training: '实训教学管理',
exam: '考试管理',
lineDesign: '线路设计',
case: '案例管理',
SystemManagement: '系统管理',
SystemDataManagement: '系统数据管理',
dataDictionary: '数据字典',
SystemAccountManagement: '系统账户管理',
ThirdPartyAccounts: '第三方账户配置',
OnlineInformationManagement: '在线信息管理',
loginUser: '在线用户',
cacheDataManage: '缓存数据管理',
simulationManage: '仿真管理',
companyUserManage: '组织用户管理',
companyManage: '组织管理',
lineDataManage: '线路数据管理',
lineTypeManage: '线路类型管理',
linePacketManage: '线路分组管理',
teachingDataManage: '教学数据管理',
theoryData: '理论题数据管理',
trainingDataManage: '实训数据管理',
examData: '考试数据管理',
userTrainingDataManage: '用户实训数据管理',
userExamData: '用户考试数据管理',
projectDataManage: '项目数据管理',
projectManage: '项目管理',
projectConfig: '项目客户端配置',
projectDeviceManage: '项目设备管理',
permissionDataManage: '权限数据管理',
permissionManage: '权限管理',
authorityTransferManage: '权限分发管理',
userRulesManage: '用户权限管理',
fileManage: '文件管理',
frontResourceManage: '前端资源管理',
iscsPrerecordManage: 'ISCS预录管理',
XRVTI: '西安铁路职业技术学院',
GEMVC: '贵州装备制造职业学院',
JVCOEAI: '江苏电子信息职业学院',
functionManage: '功能管理'
};

View File

@ -116,5 +116,8 @@ export default {
distributionAttribution: '分发归属', distributionAttribution: '分发归属',
goodsAmount:'商品个数', goodsAmount:'商品个数',
operate:'操作', operate:'操作',
orderNotPay:'该订单未支付' orderNotPay:'该订单未支付',
updateTime: '更新时间',
oneClickSync: '一键同步',
ability: '功能'
}; };

View File

@ -105,7 +105,7 @@ export default {
selectScope: '请选择范围', selectScope: '请选择范围',
questionNumbers: '题数', questionNumbers: '题数',
allNumberTipOne: '此类型有', allNumberTipOne: '此类型有',
allNumberTipTwo: '题', allNumberTipTwo: '题',
scorePerQuestion: '每题分值', scorePerQuestion: '每题分值',
inputQuestionNumber: '请输入题数', inputQuestionNumber: '请输入题数',
inputQuestionNumberError: '输入的题数大于0', inputQuestionNumberError: '输入的题数大于0',

View File

@ -1,112 +1,114 @@
export default { export default {
homePage: '首页', homePage: '首页',
designhomePage: '公共地图', designhomePage: '公共地图',
designUserPage: '个人地图', designUserPage: '个人地图',
newDesignUserPage: '地图绘制', newDesignUserPage: '地图绘制',
newDesignEditor: '编辑器', newDesignEditor: '编辑器',
newDesignEditorList: '图文列表', newDesignEditorList: '图文列表',
newDesignDraftEditorList: '文章草稿', newDesignDraftEditorList: '文章草稿',
uploadPdf: 'PDF上传', uploadPdf: 'PDF上传',
fileManage:'文件管理', fileManage: '文件管理',
mapManage: '地图管理', mapManage: '地图管理',
skinManage: '皮肤管理', skinManage: '皮肤管理',
mapDraw: '地图绘制', mapDraw: '地图绘制',
runPlanManage: '运行图管理', runPlanManage: '运行图管理',
productEdit: '产品编辑', productEdit: '产品编辑',
lessaonManage: '课程管理', lessaonManage: '课程管理',
trainingRecord: '实训录制', trainingRecord: '实训录制',
taskManage: '任务管理', taskManage: '任务管理',
trainingRule: '操作定义', trainingRule: '操作定义',
trainingManage: '实训管理', trainingManage: '实训管理',
lessonEdit: '课程编辑', lessonEdit: '课程编辑',
scriptManage: '剧本管理', scriptManage: '剧本管理',
teachSystem: '教学系统', teachSystem: '教学系统',
examSystem: '考试系统', examSystem: '考试系统',
demonstrationSystem: '仿真系统', demonstrationSystem: '仿真系统',
dpSystem: '大屏系统', dpSystem: '大屏系统',
planSystem: '琏计划', planSystem: '琏计划',
replayManage: '回放管理', replayManage: '回放管理',
permissionManage: '权限管理', permissionManage: '权限管理',
selfPermission: '我的权限', selfPermission: '我的权限',
pulishManage: '发布内容管理', pulishManage: '发布内容管理',
publishMapManage: '发布地图管理', publishMapManage: '发布地图管理',
productStateManage: '产品状态管理', productStateManage: '产品状态管理',
publishLessonManage: '发布课程管理', publishLessonManage: '发布课程管理',
runPlanTemplateManage: '模板运行图管理', runPlanTemplateManage: '模板运行图管理',
runPlanCommonManage: '加载计划运行图管理', runPlanCommonManage: '加载计划运行图管理',
runPlanEveryDayManage: '每日运行图管理', runPlanEveryDayManage: '每日运行图管理',
examRuleManage: '试卷规则管理', examRuleManage: '试卷规则管理',
orderAuthorityManage: '订单权限管理', orderAuthorityManage: '订单权限管理',
commodityManage: '商品管理', commodityManage: '商品管理',
orderManage: '订单管理', orderManage: '订单管理',
authorityManage: '权限管理', authorityManage: '权限管理',
authorityTransferManage: '权限分发管理', authorityTransferManage: '权限分发管理',
userRulesManage: '用户权限统计', userRulesManage: '用户权限统计',
addCommodity: '添加商品', addCommodity: '添加商品',
addOrder: '添加订单', addOrder: '添加订单',
addCoursePermissions: '添加课程权限', addCoursePermissions: '添加课程权限',
systemManage: '系统管理', systemManage: '系统管理',
dataDictionary: '数据字典', dataDictionary: '数据字典',
dataDictionaryDetails: '数据字典明细', dataDictionaryDetails: '数据字典明细',
userManage: '用户管理', userManage: '用户管理',
loginUserManage:'在线用户管理', loginUserManage: '在线用户管理',
cacheManage: '缓存管理', cacheManage: '缓存管理',
userTrainingManage: '用户实训统计', userTrainingManage: '用户实训统计',
userExamManage: '用户考试统计', userExamManage: '用户考试统计',
userSimulationManage: '用户仿真统计', userSimulationManage: '用户仿真统计',
existingSimulation: '存在仿真管理', existingSimulation: '存在仿真管理',
ibpDraw: 'Ibp盘绘制', ibpDraw: 'Ibp盘绘制',
trainingPlatform: '实训平台', trainingPlatform: '实训平台',
releaseApplication: '发布申请', releaseApplication: '发布申请',
courseApplication: '课程发布申请', courseApplication: '课程发布申请',
scriptReleaseApplication: '剧本发布申请', scriptReleaseApplication: '剧本发布申请',
runGraphReleaseApplication: '运行图发布申请', runGraphReleaseApplication: '运行图发布申请',
subsystemGeneration: '子系统生成', subsystemGeneration: '子系统生成',
newsBulletin: '消息公告', newsBulletin: '消息公告',
notificationBulletin: '系统通知', notificationBulletin: '系统通知',
commandDictionary: '指令字典', commandDictionary: '指令字典',
configLine: '线路管理', configLine: '线路管理',
deviceManage: '设备管理', deviceManage: '设备管理',
iscsDraw: 'Iscs绘制', iscsDraw: 'Iscs绘制',
iscsSystem: 'Iscs系统', iscsSystem: 'Iscs系统',
studentManage: '学生管理', studentManage: '学生管理',
competitionManage: '竞赛管理', competitionManage: '竞赛管理',
refereeJManage: '仿真管理', refereeJManage: '仿真管理',
homeJsxt: '首页', homeJsxt: '首页',
examDetail: '考试详情', examDetail: '考试详情',
raceManage: '竞赛管理', raceManage: '竞赛管理',
recaList: '报名列表', recaList: '报名列表',
bankManage: '题库列表', bankManage: '题库列表',
practiceManage:'实操列表', practiceManage: '实操列表',
sceneManage:'场景列表', sceneManage: '场景列表',
companyManage: '组织管理', companyManage: '组织管理',
authorApply: '授权申请', authorApply: '授权申请',
AuthorList: '授权列表', AuthorList: '授权列表',
questionsRuleManage: '出题规则管理', questionsRuleManage: '出题规则管理',
preTheoryData: '理论导入预处理', preTheoryData: '理论导入预处理',
boardManage: '留言板管理', boardManage: '留言板管理',
publishIBPManage:'发布IBP盘管理', publishIBPManage: '发布IBP盘管理',
publishISCSManage:'发布ISCS管理', publishISCSManage: '发布ISCS管理',
publishTrainingManage: '发布实训管理', publishTrainingManage: '发布实训管理',
voiceTraining: '语音训练', voiceTraining: '语音训练',
mapGroup: '地图分组', mapGroup: '地图分组',
drawingMange:'图纸管理', drawingMange: '图纸管理',
projectServer: '项目域名', projectServer: '项目域名',
audioResourcesManage: '音频资源管理', audioResourcesManage: '音频资源管理',
iscsDeviceManage: 'ISCS设备管理', iscsDeviceManage: 'ISCS设备管理',
iscsResourcesManage: 'ISCS资源管理' iscsResourcesManage: 'ISCS资源管理',
}; projectManage: '项目管理',
frontProjectConfigManage: '前端项目配置管理',
}

View File

@ -3,183 +3,183 @@ import { getToken } from '@/utils/auth';
import store from '@/store/index'; import store from '@/store/index';
// 定于仿真socket接口 // 定于仿真socket接口
export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passerStation,passerAi) { export function PassflowConnect(deviceaction, toptrain, downtrain, routegroup, passerStation, passerAi) {
const scope = this; const scope = this;
this.teststomp = new StompClient(); this.teststomp = new StompClient();
// let topic = '/user/queue/simulation/jl3d/'+routegroup; // let topic = '/user/queue/simulation/jl3d/'+routegroup;
let topic = '/user/queue/simulation/'+ routegroup +'/jl3d'; const topic = '/user/queue/simulation/' + routegroup + '/jl3d';
let header = {'X-Token': getToken() }; const header = {'X-Token': getToken() };
socketon(topic); socketon(topic);
function socketon(topic) { function socketon(topic) {
try { try {
scope.teststomp.subscribe(topic, callback, header); scope.teststomp.subscribe(topic, callback, header);
} catch (error) { } catch (error) {
console.error('websocket订阅失败'); console.error('websocket订阅失败');
} }
}; }
this.socketoff = function(topic) { this.socketoff = function(topic) {
scope.teststomp.unsubscribe(topic); scope.teststomp.unsubscribe(topic);
}; };
// 仿真socket接口回调函数 // 仿真socket接口回调函数
function callback(Response) { function callback(Response) {
const data = JSON.parse(Response.body); const data = JSON.parse(Response.body);
if(data.type == "DeviceCtrl_3D"){ if (data.type == 'DeviceCtrl_3D') {
if(data.body.type == "PSD"){ if (data.body.type == 'PSD') {
if(data.body.code == passerStation.nowStation.toppsd){ if (data.body.code == passerStation.nowStation.toppsd) {
if(data.body.command == 'G'){ if (data.body.command == 'G') {
deviceaction.top.action.reset(); deviceaction.top.action.reset();
deviceaction.top.action.time =deviceaction.top.action._clip.duration; deviceaction.top.action.time = deviceaction.top.action._clip.duration;
deviceaction.top.action.timeScale = -1; deviceaction.top.action.timeScale = -1;
deviceaction.top.action.play(); deviceaction.top.action.play();
}else{ } else {
passerAi.passerout("top") passerAi.passerout('top');
deviceaction.top.action.reset(); deviceaction.top.action.reset();
deviceaction.top.action.time = 0; deviceaction.top.action.time = 0;
deviceaction.top.action.timeScale = 1; deviceaction.top.action.timeScale = 1;
deviceaction.top.action.play(); deviceaction.top.action.play();
} }
} }
if(data.body.code == passerStation.nowStation.downpsd){ if (data.body.code == passerStation.nowStation.downpsd) {
if(data.body.command == 'G'){ if (data.body.command == 'G') {
deviceaction.down.action.reset(); deviceaction.down.action.reset();
deviceaction.down.action.time = deviceaction.down.action._clip.duration; deviceaction.down.action.time = deviceaction.down.action._clip.duration;
deviceaction.down.action.timeScale = -1; deviceaction.down.action.timeScale = -1;
deviceaction.down.action.play(); deviceaction.down.action.play();
}else{ } else {
passerAi.passerout("down"); passerAi.passerout('down');
deviceaction.down.action.reset(); deviceaction.down.action.reset();
deviceaction.down.action.time = 0; deviceaction.down.action.time = 0;
deviceaction.down.action.timeScale = 1; deviceaction.down.action.timeScale = 1;
deviceaction.down.action.play(); deviceaction.down.action.play();
} }
} }
} }
if(data.body.type == "TRAIN_DOOR"){ if (data.body.type == 'TRAIN_DOOR') {
if(toptrain.nowcode == data.body.trainCode){ if (toptrain.nowcode == data.body.trainCode) {
if(data.body.command == 'G'){ if (data.body.command == 'G') {
closetraindoor(toptrain,data.body.code,"top"); closetraindoor(toptrain, data.body.code, 'top');
}else{ } else {
opentraindoor(toptrain,data.body.code,"top"); opentraindoor(toptrain, data.body.code, 'top');
} }
} }
if(downtrain.nowcode == data.body.trainCode){ if (downtrain.nowcode == data.body.trainCode) {
// console.log(data.body); // console.log(data.body);
if(data.body.command == 'G'){ if (data.body.command == 'G') {
closetraindoor(downtrain,data.body.code,"down"); closetraindoor(downtrain, data.body.code, 'down');
}else{ } else {
opentraindoor(downtrain,data.body.code,"down"); opentraindoor(downtrain, data.body.code, 'down');
} }
} }
} }
} }
if(data.type == "TrainRun_3D"){ if (data.type == 'TrainRun_3D') {
for(let i=0,leni = data.body.length;i<leni;i++){ for (let i = 0, leni = data.body.length; i < leni; i++) {
if(data.body[i].section == passerStation.nowStation.topsection){ if (data.body[i].section == passerStation.nowStation.topsection) {
if(toptrain.nowcode != data.body[i].code){ if (toptrain.nowcode != data.body[i].code) {
toptrain.nowcode = data.body[i].code; toptrain.nowcode = data.body[i].code;
} }
toptrain.position.copy(passerStation.nowStation.topcurve.getPointAt(data.body[i].offset)); toptrain.position.copy(passerStation.nowStation.topcurve.getPointAt(data.body[i].offset));
// } // }
}else{ } else {
if(downtrain.nowcode == data.body[i].code){ if (downtrain.nowcode == data.body[i].code) {
toptrain.position.x -= 1; toptrain.position.x -= 1;
} }
} }
if(data.body[i].section == passerStation.nowStation.downsection){ if (data.body[i].section == passerStation.nowStation.downsection) {
if(downtrain.nowcode != data.body[i].code){ if (downtrain.nowcode != data.body[i].code) {
downtrain.nowcode = data.body[i].code; downtrain.nowcode = data.body[i].code;
} }
downtrain.position.copy(passerStation.nowStation.downcurve.getPointAt(data.body[i].offset)); downtrain.position.copy(passerStation.nowStation.downcurve.getPointAt(data.body[i].offset));
}else{ } else {
if(downtrain.nowcode == data.body[i].code){ if (downtrain.nowcode == data.body[i].code) {
downtrain.position.x += 1; downtrain.position.x += 1;
} }
} }
} }
} }
if(data.type == 'Simulation_Over') { // if(data.type == 'Simulation_Over') {
store.dispatch('LogOut').then(() => { // store.dispatch('LogOut').then(() => {
location.reload(); // location.reload();
}); // });
} // }
} }
let actions; let actions;
function opentraindoor(train,doorcode,direct){ function opentraindoor(train, doorcode, direct) {
if(direct == "top"){ if (direct == 'top') {
if(doorcode == "1"){ if (doorcode == '1') {
actions = train.action.down; actions = train.action.down;
} }
if(doorcode == "2"){ if (doorcode == '2') {
actions = train.action.top; actions = train.action.top;
} }
}else{ } else {
if(doorcode == "1"){ if (doorcode == '1') {
actions = train.action.top; actions = train.action.top;
} }
if(doorcode == "2"){ if (doorcode == '2') {
actions = train.action.down; actions = train.action.down;
} }
} }
for(let an=actions.length-1;an>=0;an--){ for (let an = actions.length - 1; an >= 0; an--) {
actions[an].reset(); actions[an].reset();
actions[an].time = 0; actions[an].time = 0;
actions[an].timeScale = 1; actions[an].timeScale = 1;
actions[an].play(); actions[an].play();
} }
} }
function closetraindoor(train,doorcode,direct){ function closetraindoor(train, doorcode, direct) {
if(direct == "top"){ if (direct == 'top') {
if(doorcode == "1"){ if (doorcode == '1') {
actions = train.action.down; actions = train.action.down;
} }
if(doorcode == "2"){ if (doorcode == '2') {
actions = train.action.top; actions = train.action.top;
} }
toptrain.nowcode = null; toptrain.nowcode = null;
}else{ } else {
if(doorcode == "1"){ if (doorcode == '1') {
actions = train.action.top; actions = train.action.top;
} }
if(doorcode == "2"){ if (doorcode == '2') {
actions = train.action.down; actions = train.action.down;
} }
downtrain.nowcode = null; downtrain.nowcode = null;
} }
for(let an=actions.length-1;an>=0;an--){ for (let an = actions.length - 1; an >= 0; an--) {
actions[an].reset(); actions[an].reset();
actions[an].time = actions[an]._clip.duration; actions[an].time = actions[an]._clip.duration;
actions[an].timeScale = -1; actions[an].timeScale = -1;
actions[an].play(); actions[an].play();
} }
} }
} }

View File

@ -1,5 +1,5 @@
import Vue from 'vue'; import Vue from 'vue';
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js'; import { JL3D_LOCAL_STATIC,BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
// 模型loader // 模型loader
import { AssetLoader } from '@/jlmap3d/jl3drailwaydrive/loader/AssetLoader.js'; import { AssetLoader } from '@/jlmap3d/jl3drailwaydrive/loader/AssetLoader.js';
import {DDSLoader} from '@/jlmap3d/main/loaders/DDSLoader.js'; import {DDSLoader} from '@/jlmap3d/main/loaders/DDSLoader.js';
@ -67,8 +67,9 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
//let camera = SetCamera(dom); //let camera = SetCamera(dom);
// 定义场景(渲染容器) // 定义场景(渲染容器)
let scene = SetScene(project); let scene = SetScene(project);
// https://joylink.club/oss/joylink
scene.background = new THREE.CubeTextureLoader() scene.background = new THREE.CubeTextureLoader()
.setPath( 'https://joylink.club/oss/joylink/PICTURE/2021-06-15/' ) .setPath( BASE_ASSET_API + '/PICTURE/2021-06-15/' )
.load( [ '18-75117.jpg', '17-78286.jpg', '19-62689.jpg', '15-95146.jpg', '16-99183.jpg', '14-94914.jpg' ] ); .load( [ '18-75117.jpg', '17-78286.jpg', '19-62689.jpg', '15-95146.jpg', '16-99183.jpg', '14-94914.jpg' ] );
let meshCloud; let meshCloud;

View File

@ -570,7 +570,6 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
trainlisttest.list[code].position.y = 0; trainlisttest.list[code].position.y = 0;
// trainlisttest.list[code].progress = 0; // trainlisttest.list[code].progress = 0;
trainlisttest.list[code].dispose = "0"; trainlisttest.list[code].dispose = "0";
debugger
trainlisttest.list[code].nowcode = data.body.deviceList[i].section; trainlisttest.list[code].nowcode = data.body.deviceList[i].section;
trainlisttest.list[code].nextcode = null; trainlisttest.list[code].nextcode = null;
trainlisttest.list[code].curve = null; trainlisttest.list[code].curve = null;

View File

@ -51,6 +51,7 @@ class Jlmap {
this.isUpdateShowTrainList = false; this.isUpdateShowTrainList = false;
this.isUpdateRunLineTrain = false; this.isUpdateRunLineTrain = false;
this._disposeFlag = false; this._disposeFlag = false;
if (this.methods.initJlmap instanceof Function) { this.methods.initJlmap(); }
} }
// 初始化属性有鼠标事件 缩放等 // 初始化属性有鼠标事件 缩放等
@ -119,7 +120,7 @@ class Jlmap {
this.$options.scaleIndex = parseInt((scaling / 0.05).toFixed()); this.$options.scaleIndex = parseInt((scaling / 0.05).toFixed());
this.$painter.updateTransform({ scaleRate: scaling, offsetX: origin ? origin.x : 0, offsetY: origin ? origin.y : 0 }); this.$painter.updateTransform({ scaleRate: scaling, offsetX: origin ? origin.x : 0, offsetY: origin ? origin.y : 0 });
} }
setMap(map, mapDevice, logicData) { setMap(map, mapDevice, logicData, repaint = true) {
// 保存皮肤类型 // 保存皮肤类型
if (map.skinVO) { if (map.skinVO) {
this.lineCode = map.skinVO.code; this.lineCode = map.skinVO.code;
@ -143,7 +144,11 @@ class Jlmap {
if (this.methods.dataLoaded instanceof Function) { this.methods.dataLoaded(this.mapDevice); } if (this.methods.dataLoaded instanceof Function) { this.methods.dataLoaded(this.mapDevice); }
// 初次渲染视图 // 初次渲染视图
this.$painter.repaint(this.mapDevice); if (repaint) {
this.$painter.repaint(this.mapDevice);
} else {
this.render(Object.values(this.mapDevice));
}
// 视图加载完成 回调 // 视图加载完成 回调
if (this.methods.viewLoaded instanceof Function) { this.methods.viewLoaded(this.mapDevice); } if (this.methods.viewLoaded instanceof Function) { this.methods.viewLoaded(this.mapDevice); }
@ -427,7 +432,7 @@ class Jlmap {
const type = elem._type; const type = elem._type;
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig); const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
oDevice.showMode = showMode; oDevice.showMode = showMode;
oDevice.instance && oDevice.model && oDevice.instance.setState(oDevice.model); oDevice.instance && oDevice.instance.model && oDevice.instance.setState(oDevice.instance.model);
}); });
this.$painter.$transformHandle.revisibleAll(); this.$painter.$transformHandle.revisibleAll();
} }

View File

@ -198,7 +198,6 @@ class MouseController extends Eventful {
var newDevice = this.$jmap.getDeviceByCode(newEm.deviceCode) || {}; var newDevice = this.$jmap.getDeviceByCode(newEm.deviceCode) || {};
var oldInstance = (this.$jmap.getDeviceByCode(oldEm.deviceCode) || {}).instance || {}; var oldInstance = (this.$jmap.getDeviceByCode(oldEm.deviceCode) || {}).instance || {};
var newInstance = (this.$jmap.getDeviceByCode(newEm.deviceCode) || {}).instance || {}; var newInstance = (this.$jmap.getDeviceByCode(newEm.deviceCode) || {}).instance || {};
// 如果之前和当前选中的实例不一致 // 如果之前和当前选中的实例不一致
if (oldInstance != newInstance) { if (oldInstance != newInstance) {
// 如果实例有取消选择函数并且被点击,则执行取消选中函数 // 如果实例有取消选择函数并且被点击,则执行取消选中函数
@ -207,12 +206,20 @@ class MouseController extends Eventful {
oldDevice.instance['__down'] = false; oldDevice.instance['__down'] = false;
oldInstance.mouseEvent['mouseout'](e); oldInstance.mouseEvent['mouseout'](e);
} }
if (oldInstance._type === 'Train' && oldInstance.trainB && oldInstance.trainB.mouseEvent) {
oldDevice.instance['__click'] = false;
oldInstance.trainB.mouseEvent['cancelMouseClick'](e);
}
// 如果实例有选中函数并且被点击,则执行选中函数 // 如果实例有选中函数并且被点击,则执行选中函数
if (e.which == 3 && newInstance.mouseEvent && newInstance.mouseEvent.mouseover) { if (e.which == 3 && newInstance.mouseEvent && newInstance.mouseEvent.mouseover) {
newDevice.instance['__down'] = true; newDevice.instance['__down'] = true;
newInstance.mouseEvent['mouseover'](e); newInstance.mouseEvent['mouseover'](e);
} }
if (e.which == 1 && newInstance.mouseEvent && newInstance.mouseEvent.mouseClick) {
newDevice.instance['__click'] = true;
newInstance.mouseEvent['mouseClick'](e);
}
} }
// 保存当前实例到全局 // 保存当前实例到全局

View File

@ -17,10 +17,19 @@ export function parser(data, skinCode, showConfig) {
var mapDevice = {}; var mapDevice = {};
var propConvert = skinCode ? Vue.prototype.$theme.loadPropConvert(skinCode) : null; var propConvert = skinCode ? Vue.prototype.$theme.loadPropConvert(skinCode) : null;
if (data) { if (data) {
const centralStationList = [];
zrUtil.each(data.stationList || [], elem => { zrUtil.each(data.stationList || [], elem => {
if (elem.centralized) {
centralStationList.push(elem);
}
mapDevice[elem.code] = createDevice(deviceType.Station, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.Station, elem, propConvert, showConfig);
}, this); }, this);
zrUtil.each(centralStationList, elem => {
mapDevice[elem.code].stationCode = elem.code;
zrUtil.each(elem.chargeStationCodeList || [], item => {
mapDevice[item].stationCode = elem.code;
});
});
zrUtil.each(data.sectionList || [], elem => { zrUtil.each(data.sectionList || [], elem => {
mapDevice[elem.code] = createDevice(deviceType.Section, elem, propConvert, showConfig); mapDevice[elem.code] = createDevice(deviceType.Section, elem, propConvert, showConfig);
elem = propConvert.initPrivateProps(elem); elem = propConvert.initPrivateProps(elem);

View File

@ -105,7 +105,7 @@ export default class Line2 extends Group {
this.segment && this.segment.hide(); this.segment && this.segment.hide();
this.viceSegment && this.viceSegment.hide(); this.viceSegment && this.viceSegment.hide();
} else { } else {
this.setLineType(model.type); model && this.setLineType(model.type);
} }
} }
recover() { recover() {

View File

@ -84,7 +84,7 @@ class EHorizontal2Door extends Group {
this.stand2.setStyle('fill', style.Psd.horizontal2Door.defaultColor); this.stand2.setStyle('fill', style.Psd.horizontal2Door.defaultColor);
} }
} }
if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) { if (model.noStatus || (model.atsNoStatus && store.state.map.picture === 'dispatchWork')) {
this.stand1.setStyle('fill', '#7F7F7F'); this.stand1.setStyle('fill', '#7F7F7F');
this.stand2.setStyle('fill', '#7F7F7F'); this.stand2.setStyle('fill', '#7F7F7F');
} }

View File

@ -51,7 +51,7 @@ class ERect2Door extends Group {
this.psd.setStyle('fill', style.Psd.rectDoor.defaultColor); this.psd.setStyle('fill', style.Psd.rectDoor.defaultColor);
} }
} }
if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) { if (model.noStatus || (model.atsNoStatus && store.state.map.picture === 'dispatchWork')) {
this.psd.setStyle('fill', '#7F7F7F'); this.psd.setStyle('fill', '#7F7F7F');
} }
} }

View File

@ -578,7 +578,7 @@ export default class Section extends Group {
// 区段延时解锁 // 区段延时解锁
model.remain > 0 && this.delayUnlock(); model.remain > 0 && this.delayUnlock();
// 设置灰显 // 设置灰显
if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) { if (model.noStatus || (model.atsNoStatus && store.state.map.picture === 'dispatchWork')) {
this.setAshShow(); this.setAshShow();
} }
// 设置脱轨器 // 设置脱轨器
@ -618,12 +618,20 @@ export default class Section extends Group {
/** 计算提示位置*/ /** 计算提示位置*/
getShapeTipPoint() { getShapeTipPoint() {
const rect = this.getBoundingRect(); if (this.model.curve) {
const distance = this.style.Section.line.width / 2; const rect = this.name.getBoundingRect();
return { return {
x: rect.x + rect.width / 2, x: rect.x + rect.width / 2,
y: rect.y + rect.height / 2.7 - distance y: rect.y + rect.height / 2.7
}; };
} else {
const rect = this.getBoundingRect();
const distance = this.style.Section.line.width / 2;
return {
x: rect.x + rect.width / 2,
y: rect.y + rect.height / 2.7 - distance
};
}
} }
getBoundingRect() { getBoundingRect() {

View File

@ -1210,7 +1210,7 @@ class Signal extends Group {
} }
this.model.virtual && this.sigBack && this.sigBack.show(); this.model.virtual && this.sigBack && this.sigBack.show();
// 设置灰显 // 设置灰显
if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) { if (model.noStatus || (model.atsNoStatus && store.state.map.picture === 'dispatchWork')) {
this.setAshShow(); this.setAshShow();
} }
@ -1218,7 +1218,7 @@ class Signal extends Group {
if (this.style.Signal.text.conflictColor && model.checkConflict) { if (this.style.Signal.text.conflictColor && model.checkConflict) {
this.sigName.setColor(this.style.Signal.text.conflictColor); this.sigName.setColor(this.style.Signal.text.conflictColor);
} }
if (store.state.training.prdType === '01') { if (store.state.map.picture === 'localWork') {
this.lowButton && this.lowButton.show(); this.lowButton && this.lowButton.show();
} }
} }

View File

@ -42,8 +42,8 @@ class EStationText extends Group {
z: this.model.z, z: this.model.z,
silent: !model.visible || false, silent: !model.visible || false,
style: { style: {
x: model.subheadPosition.x, x: model.computedSubheadTextPosition.x,
y: model.subheadPosition.y, y: model.computedSubheadTextPosition.y,
fontWeight: model.fontWeight, fontWeight: model.fontWeight,
fontSize: model.subheadFont || 18, fontSize: model.subheadFont || 18,
fontFamily: style.fontFamily, fontFamily: style.fontFamily,

View File

@ -34,10 +34,12 @@ export default class Station extends Group {
this.computedPosition = pictureDevice.position; this.computedPosition = pictureDevice.position;
this.computedTurnBackPoint = { x: model.turnBackPoint ? model.turnBackPoint.x + offsetX : 0, y: model.turnBackPoint ? model.turnBackPoint.y + offsetY : 0 }; this.computedTurnBackPoint = { x: model.turnBackPoint ? model.turnBackPoint.x + offsetX : 0, y: model.turnBackPoint ? model.turnBackPoint.y + offsetY : 0 };
this.computedControlModePoint = { x: model.controlModePoint.x + offsetX, y: model.controlModePoint.y + offsetY }; this.computedControlModePoint = { x: model.controlModePoint.x + offsetX, y: model.controlModePoint.y + offsetY };
this.computedSubheadTextPosition = { x: model.subheadPosition ? model.subheadPosition.x + offsetX : 0, y: model.subheadPosition ? model.subheadPosition.y + offsetY : 0 };
} else { } else {
this.computedPosition = model.position; this.computedPosition = model.position;
this.computedTurnBackPoint = model.turnBackPoint; this.computedTurnBackPoint = model.turnBackPoint;
this.computedControlModePoint = model.controlModePoint; this.computedControlModePoint = model.controlModePoint;
this.computedSubheadTextPosition = model.subheadPosition;
} }
this.z = 40; this.z = 40;
this.model = model; this.model = model;
@ -59,6 +61,7 @@ export default class Station extends Group {
'stationText': EStationText // 车站名称 (普通站台样式) 'stationText': EStationText // 车站名称 (普通站台样式)
}; };
model.computedPosition = this.computedPosition; model.computedPosition = this.computedPosition;
model.computedSubheadTextPosition = this.computedSubheadTextPosition;
// 遍历当前线路下的绘图元素 组合模式 // 遍历当前线路下的绘图元素 组合模式
traverseLineElements(style.Station, elementTypeList, model, style, this); traverseLineElements(style.Station, elementTypeList, model, style, this);

View File

@ -55,7 +55,7 @@ class ETrainSetButton extends Group {
} }
setState(model) { setState(model) {
if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) { if (model.noStatus || (model.atsNoStatus && store.state.map.picture === 'dispatchWork')) {
this.setColor('#7F7F7F'); this.setColor('#7F7F7F');
} }
} }

View File

@ -159,7 +159,7 @@ class StationStand extends Group {
this.downDetainLamp && this.downDetainLamp.hide(); this.downDetainLamp && this.downDetainLamp.hide();
} }
setScreenDoorOpenStatus(model) { setScreenDoorOpenStatus(model) {
if (!this.model.noStatus && !(this.model.atsNoStatus && store.state.training.prdType == '02')) { if (!this.model.noStatus && !(this.model.atsNoStatus && store.state.map.picture === 'dispatchWork')) {
this.gapStand && this.gapStand.setState(model); this.gapStand && this.gapStand.setState(model);
} }
} }
@ -183,7 +183,7 @@ class StationStand extends Group {
currentTypeList.forEach(element => { currentTypeList.forEach(element => {
this[element].setState(model); this[element].setState(model);
}); });
if (store.state.training.prdType === '01') { if (store.state.map.picture === 'localWork') {
this.stopJumpLamp && this.stopJumpLamp.show(); this.stopJumpLamp && this.stopJumpLamp.show();
this.cancelStopJumpLamp && this.cancelStopJumpLamp.show(); this.cancelStopJumpLamp && this.cancelStopJumpLamp.show();
this.upDetainLamp && this.upDetainLamp.show(); this.upDetainLamp && this.upDetainLamp.show();

View File

@ -110,7 +110,7 @@ class EGapStand extends Group {
this.setClose(); this.setClose();
} }
} }
if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) { if (model.noStatus || (model.atsNoStatus && store.state.map.picture === '02')) {
this.setColor('#7F7F7F'); this.setColor('#7F7F7F');
} }
} }

View File

@ -1,3 +1,4 @@
import store from '@/store/index';
import Group from 'zrender/src/container/Group'; import Group from 'zrender/src/container/Group';
import Rect from 'zrender/src/graphic/shape/Rect'; import Rect from 'zrender/src/graphic/shape/Rect';
import Text from 'zrender/src/graphic/Text'; import Text from 'zrender/src/graphic/Text';
@ -52,16 +53,19 @@ class ESolidStand extends Group {
this.holdTrain.hide(); this.holdTrain.hide();
} }
const path = window.location.href; // const path = window.location.href;
if (path.includes('/practiceDisplay')) { // const search = window.location.search;
// if (path.includes('/display/demon') && search.includes('project=bjd')) {
if (store.state.map.picture == 'largePassengerView') {
// 文字描述 // 文字描述
const modelNum = model.num ? model.num : 0;
this.arrowText = new Text({ this.arrowText = new Text({
zlevel: this.model.zlevel, zlevel: this.model.zlevel,
z: this.model.z + 10, z: this.model.z + 10,
style: { style: {
x: computedPosition.x + 35, x: computedPosition.x + 35,
y: computedPosition.y - 20, y: computedPosition.y - 20,
text: `${'站台人数: ' + model.num ? model.num : 0}`, text: '站台人数: ' + modelNum,
textFill: '#000', textFill: '#000',
textAlign: 'left', textAlign: 'left',
textFont: 12 + 'px consolas', textFont: 12 + 'px consolas',
@ -69,6 +73,7 @@ class ESolidStand extends Group {
textBackgroundColor: style.tipBackgroundColor textBackgroundColor: style.tipBackgroundColor
} }
}); });
console.log('站台人数: ', modelNum);
this.add(this.arrowText); this.add(this.arrowText);
this.arrowText.hide(); this.arrowText.hide();
this.on('mouseover', () => { this.on('mouseover', () => {
@ -123,8 +128,10 @@ class ESolidStand extends Group {
setState(model) { setState(model) {
const style = this.model.style; const style = this.model.style;
const path = window.location.href; // const path = window.location.href;
if (!path.includes('/practiceDisplay')) { // const search = window.location.search;
// if (!(path.includes('/display/demon') && search.includes('project=bjd'))) {
if (store.state.map.picture != 'largePassengerView') {
// 列车跳停 // 列车跳停
model.assignSkip && this.setColor(style.StationStand.solidStand.designatedJumpStopColor); model.assignSkip && this.setColor(style.StationStand.solidStand.designatedJumpStopColor);
// 全部跳停 // 全部跳停

View File

@ -69,7 +69,7 @@ class ESwLnversion extends Group {
animateStyle(cb) { animateStyle(cb) {
this.eachChild((child) => { this.eachChild((child) => {
cb(child); child && cb(child);
}); });
} }

View File

@ -877,7 +877,7 @@ export default class Switch extends Group {
const sectionC = this.mapDevice[switchModel.sectionCCode]; const sectionC = this.mapDevice[switchModel.sectionCCode];
sectionC && sectionC.instance && sectionC.instance.handleSwitchSection(sectionC); sectionC && sectionC.instance && sectionC.instance.handleSwitchSection(sectionC);
} }
if (model.noStatus || (model.atsNoStatus && store.state.training.prdType == '02')) { if (model.noStatus || (model.atsNoStatus && store.state.map.picture === 'dispatchWork')) {
this.setAshShow(); this.setAshShow();
} }
!model.auto && this.artificialArc && this.artificialArc.show(); !model.auto && this.artificialArc && this.artificialArc.show();

View File

@ -3,6 +3,7 @@ import Text from 'zrender/src/graphic/Text';
import LangStorage from '@/utils/lang'; import LangStorage from '@/utils/lang';
import Rect from 'zrender/src/graphic/shape/Rect'; import Rect from 'zrender/src/graphic/shape/Rect';
import store from '@/store/index'; import store from '@/store/index';
import { getSessionStorage } from '@/utils/auth';
class EMouse extends Group { class EMouse extends Group {
constructor(device) { constructor(device) {
@ -103,9 +104,10 @@ class EMouse extends Group {
RM: 'IL' RM: 'IL'
}; };
// \nNumber of people: ${this.device.model.num ? this.device.model.num : 0} // \nNumber of people: ${this.device.model.num ? this.device.model.num : 0}
const path = window.location.href;
const stationNames = new Map(store.state.map.map.stationList.map(s=>[s.code, s.name])); const stationNames = new Map(store.state.map.map.stationList.map(s=>[s.code, s.name]));
if (!path.includes('/practiceDisplay')) { if (getSessionStorage('project') === 'yjddzh') {
text = `列车号:${this.device.model.groupNumber}\n位置:${this.device.model.locationKM}\n速度:${this.device.model.speed || 0} km/h\n方向:${this.device.model.right == 1 ? '下行' : '上行'}`;
} else if (store.state.map.picture != 'largePassengerView') {
if (LangStorage.getLang() == 'en') { if (LangStorage.getLang() == 'en') {
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${direction ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.hold ? 'Detained' : 'Normal'}\n \n 跳停状态: ${this.device.model.jump ? 'Skip to continue moving' : 'Normal'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`; text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${direction ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? (this.device.model.sectionModel.parentName ? this.device.model.sectionModel.parentName : this.device.model.sectionModel.name) : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.hold ? 'Detained' : 'Normal'}\n \n 跳停状态: ${this.device.model.jump ? 'Skip to continue moving' : 'Normal'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`;
} else { } else {
@ -116,11 +118,11 @@ class EMouse extends Group {
} }
} }
} else { } else {
text = `${'车内人数: ' + this.device.model.num}`; text = `${'车内人数: ' + this.device.model.num || 0}`;
} }
const trainTip = this.device.style.Train.common.trainTip; const trainTip = this.device.style.Train.common.trainTip;
if (trainTip) { if (trainTip || getSessionStorage('project') === 'yjddzh') {
// 文字描述 // 文字描述
this.arrowText = new Text({ this.arrowText = new Text({
zlevel: this.device.model.zlevel, zlevel: this.device.model.zlevel,
@ -137,7 +139,8 @@ class EMouse extends Group {
} }
}); });
if (path.includes('/practiceDisplay')) { // if (path.includes('/display/demon') && search.includes('project=bjd')) {
if (store.state.map.picture == 'largePassengerView') {
this.arrowText.setStyle('textFont', 12 + 'px consolas'); this.arrowText.setStyle('textFont', 12 + 'px consolas');
this.arrowText.setStyle('y', this.device.model.point.y + 15); this.arrowText.setStyle('y', this.device.model.point.y + 15);
this.arrowText.setStyle('x', this.device.model.point.x + 55); this.arrowText.setStyle('x', this.device.model.point.x + 55);
@ -210,7 +213,43 @@ class EMouse extends Group {
this.trainBorder.show(); this.trainBorder.show();
} }
} }
mouseClick() {
if (getSessionStorage('project') === 'yjddzh') {
const scaleRate = parseFloat(this.device.model.model.zrOptions.scaleRate);
const zrRect = {
x: this.device.model.model.zrOptions.offsetX / scaleRate,
y: this.device.model.model.zrOptions.offsetY / scaleRate,
width: store.state.config.width / scaleRate,
height: store.state.config.height / scaleRate
};
this.device.deviceModel.__click = true;
const arrowTextRect = this.arrowText.getBoundingRect();
const zrRectX = zrRect.x + zrRect.width;
const zrRectY = zrRect.y + zrRect.height;
const arrowTextRectX = arrowTextRect.x + arrowTextRect.width;
const arrowTextRectY = arrowTextRect.y + arrowTextRect.height;
if (arrowTextRectX > zrRectX || arrowTextRectY > zrRectY) {
const offsetX = arrowTextRectX > zrRectX ? arrowTextRectX - zrRectX : 0;
const offsetY = arrowTextRectY > zrRectY ? arrowTextRectY - zrRectY : 0;
this.arrowText.setStyle({ x: this.device.model.point.x + 50 - offsetX, y: this.device.model.point.y + 25 - offsetY });
}
this.arrowText.show();
if (this.device.style.Train.mouseOverStyle) {
this.device.deviceModel.__click = true;
this.trainBorder.show();
}
}
}
cancelMouseClick() {
if (this.device.deviceModel.__click) {
this.arrowText.hide();
this.device.deviceModel.__click = false;
}
if (this.device.style.Train.mouseOverStyle && this.device.deviceModel.__click) {
this.trainBorder.hide();
this.device.deviceModel.__click = false;
}
}
mouseout() { mouseout() {
if (this.device.model.style.Train.common.trainTip && this.device.deviceModel.__down) { if (this.device.model.style.Train.common.trainTip && this.device.deviceModel.__down) {
this.arrowText.hide(); this.arrowText.hide();
@ -221,6 +260,11 @@ class EMouse extends Group {
this.device.deviceModel.__down = false; this.device.deviceModel.__down = false;
} }
} }
updateTextPosition(point) {
if (getSessionStorage('project') === 'yjddzh') {
this.arrowText.setStyle({ x: point.x, y: point.y + 20 });
}
}
} }
export default EMouse; export default EMouse;

View File

@ -27,6 +27,9 @@ export default class TrainBody extends Group {
store.dispatch('map/setTrainDetails', this.deviceModel); store.dispatch('map/setTrainDetails', this.deviceModel);
this.mouseEvent.mouseover(); this.mouseEvent.mouseover();
} }
if (this.deviceModel.__click) {
this.mouseEvent.mouseClick();
}
this.on('mouseover', () => { this.on('mouseover', () => {
store.dispatch('map/setTrainDetails', this.deviceModel); store.dispatch('map/setTrainDetails', this.deviceModel);
this.mouseEvent.mouseover(); this.mouseEvent.mouseover();
@ -35,6 +38,9 @@ export default class TrainBody extends Group {
store.dispatch('map/setTrainDetails', null); store.dispatch('map/setTrainDetails', null);
this.mouseEvent.mouseout(); this.mouseEvent.mouseout();
}); });
this.on('click', () => {
this.mouseEvent.mouseClick();
});
} }
create() { create() {
@ -527,7 +533,7 @@ export default class TrainBody extends Group {
this.textTrainTrip.dirty(); this.textTrainTrip.dirty();
} }
if (this.textTrainGroup) { if (this.textTrainGroup) {
if (store.state.training.prdType === '10') { if (store.state.map.picture === 'emergency') {
widthText = 0; widthText = 0;
} }
this.textTrainGroup.attr({ this.textTrainGroup.attr({
@ -548,4 +554,7 @@ export default class TrainBody extends Group {
untrainBodyFault() { untrainBodyFault() {
this.trainBodyBox && this.trainBodyBox.untrainBodyFault(); this.trainBodyBox && this.trainBodyBox.untrainBodyFault();
} }
updateTextPosition(point) {
this.mouseEvent.updateTextPosition(point);
}
} }

View File

@ -21,7 +21,7 @@ export default class Train extends Group {
this.fontSize = model.nameFontSize || style.Train.common.trainTextFontSize; this.fontSize = model.nameFontSize || style.Train.common.trainTextFontSize;
this.newScale = this.fontSize / style.Train.common.trainTextFontSize; this.newScale = this.fontSize / style.Train.common.trainTextFontSize;
this.nameFormat = model.nameFormat || style.Train.trainBody.trainNameFormat; this.nameFormat = model.nameFormat || style.Train.trainBody.trainNameFormat;
if (store.state.training.prdType === '10') { if (store.state.map.picture === 'emergency') {
this.nameFormat = 'groupNumber'; this.nameFormat = 'groupNumber';
} else if (style.Train.trainBody.specialTrainType.length > 0) { } else if (style.Train.trainBody.specialTrainType.length > 0) {
style.Train.trainBody.specialTrainType.some((item) => { style.Train.trainBody.specialTrainType.some((item) => {
@ -40,7 +40,7 @@ export default class Train extends Group {
_computed() { _computed() {
const model = this.model; const model = this.model;
const style = this.style; const style = this.style;
if (model.trainWindowModel) { if (model.trainWindowModel && model.trainWindowModel.instance) {
const amendData = store.getters['map/amendPoints'](model.trainWindowModel.code); const amendData = store.getters['map/amendPoints'](model.trainWindowModel.code);
if (amendData) { if (amendData) {
model.trainWindowModel.instance.computedPoint = amendData.position; model.trainWindowModel.instance.computedPoint = amendData.position;
@ -101,6 +101,7 @@ export default class Train extends Group {
stationCode: model.stationCode, stationCode: model.stationCode,
runLevel: model.runLevel, runLevel: model.runLevel,
preselectionMode: model.preselectionMode, preselectionMode: model.preselectionMode,
locationKM: model.locationKM,
model: model model: model
}); });
const rect = this.trainB.getBoundingRectOfFont().clone(); const rect = this.trainB.getBoundingRectOfFont().clone();
@ -212,6 +213,7 @@ export default class Train extends Group {
}); });
const point = { x: this.startX, y: this.startY }; const point = { x: this.startX, y: this.startY };
this.triangle.point = point; this.triangle.point = point;
this.trainB.updateTextPosition(point);
this.triangle.updateTriangle(point, train.right, this.trainB); this.triangle.updateTriangle(point, train.right, this.trainB);
this.triangle.dirty(); this.triangle.dirty();
} }
@ -389,8 +391,10 @@ export default class Train extends Group {
// this.setDriveMode(model.driveMode); // this.setDriveMode(model.driveMode);
// } // }
this.setRunStatus(model.stop, flag); this.setRunStatus(model.stop, flag);
const path = window.location.href; // const path = window.location.href;
if (!path.includes('/practiceDisplay')) { // const search = window.location.search;
// if (!(path.includes('/display/demon') && search.includes('project=bjd'))) {
if (store.state.map.picture != 'largePassengerView') {
if (this.style.Train.common.trainHeadColorChangeMode) { if (this.style.Train.common.trainHeadColorChangeMode) {
this.setDriveMode(model.driveMode + model.runLevel); this.setDriveMode(model.driveMode + model.runLevel);
} else { } else {
@ -413,7 +417,8 @@ export default class Train extends Group {
if (style.Section.trainPosition.display) { if (style.Section.trainPosition.display) {
this.updateSection(object); this.updateSection(object);
} }
if (path.includes('/practiceDisplay')) { // if (path.includes('/display/demon') && search.includes('project=bjd')) {
if (store.state.map.picture == 'largePassengerView') {
this.handlePassagerColor(model.num); this.handlePassagerColor(model.num);
} }
if (style.Train.trainBody.trainBodyFaultFlashColor) { if (style.Train.trainBody.trainBodyFaultFlashColor) {

View File

@ -4,34 +4,25 @@ export default class EMouse {
} }
mouseover(e) { mouseover(e) {
if (this.device.prdType) { this.device.setVisible(true);
this.device.setVisible(true); const instance = this.device.getInstanceByCode(this.device.model.sectionCode);
const instance = this.device.getInstanceByCode(this.device.model.sectionCode); if (instance && instance.mouseEvent && instance.mouseEvent.mouseover) {
if (instance && instance.mouseEvent && instance.mouseEvent.mouseover) { instance.mouseEvent.mouseEnter(e);
instance.mouseEvent.mouseEnter(e);
}
} }
} }
mouseout(e) { mouseout(e) {
if (this.device.prdType) { this.device.setVisible(false);
this.device.setVisible(false); const instance = this.device.getInstanceByCode(this.device.model.sectionCode);
const instance = this.device.getInstanceByCode(this.device.model.sectionCode); if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) {
if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) { instance.mouseEvent.mouseLeave(e);
instance.mouseEvent.mouseLeave(e);
}
} }
} }
mouseEnter() { mouseEnter() {
// if (this.device.prdType) {
// this.device.setVisible(true);
// }
} }
mouseLeave() { mouseLeave() {
if (this.device.prdType ) { this.device.setVisible(false);
this.device.setVisible(false);
}
} }
} }

View File

@ -23,13 +23,12 @@ class TrainWindow extends Group {
this.model = model; this.model = model;
this.style = style; this.style = style;
this.z = 9; this.z = 9;
this.prdType = store.state.training.prdType;
this.create(); this.create();
this.createMouseEvent(); this.createMouseEvent();
this.setState(model); this.setState(model);
} }
create() { create() {
if (this.prdType !== '01') { if (store.state.map.picture !== 'localWork') {
this.createTrainWindow(); this.createTrainWindow();
} }
} }
@ -79,11 +78,9 @@ class TrainWindow extends Group {
} }
setState(model) { setState(model) {
// if (!this.isShowShape) return; const path = window.location.href;
if (this.model.showMode == '01' || !this.style.TrainWindow.show) { if (!path.includes('lineDesign') && (this.model.showMode == '01' || !this.style.TrainWindow.show)) {
this.eachChild(item => { item.hide(); }); this.eachChild(item => { item.hide(); });
// } else if (!store.getters['map/checkDeviceShow'](this._code)) {
// this.trainRect && this.trainRect.hide();
} else if (model._tro) { } else if (model._tro) {
this.trainRect && this.trainRect.hide(); this.trainRect && this.trainRect.hide();
} else { } else {

View File

@ -318,7 +318,7 @@ export default {
operate.operation = OperationEvent.Switch.alxeEffective.confirm1.operation; operate.operation = OperationEvent.Switch.alxeEffective.confirm1.operation;
} }
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.type = 'password'; this.type = 'password';
@ -346,7 +346,7 @@ export default {
operate.operation = OperationEvent.Switch.alxeEffective.choose1.operation; operate.operation = OperationEvent.Switch.alxeEffective.choose1.operation;
} }
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}); });
}, },
@ -369,7 +369,7 @@ export default {
operate.operation = OperationEvent.Switch.alxeEffective.choose2.operation; operate.operation = OperationEvent.Switch.alxeEffective.choose2.operation;
} }
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}); });
}, },
@ -393,7 +393,7 @@ export default {
this.stepNum = 3; this.stepNum = 3;
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.type = 'text'; this.type = 'text';
@ -422,7 +422,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -108,7 +108,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -126,7 +126,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -136,7 +136,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -153,7 +153,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -164,7 +164,7 @@ export default {
type: this.operate.type, type: this.operate.type,
operation: OperationEvent.Command.close.password.operation operation: OperationEvent.Command.close.password.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();

View File

@ -75,7 +75,7 @@ export default {
operation: OperationEvent.Command.close.alarm.operation operation: OperationEvent.Command.close.alarm.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose(); this.doClose();

View File

@ -210,7 +210,7 @@ export default {
val: row.code val: row.code
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -237,7 +237,7 @@ export default {
const operate = { const operate = {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -153,7 +153,7 @@ export default {
}; };
this.strategy = row.value; this.strategy = row.value;
this.isConfirm = true; this.isConfirm = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -204,7 +204,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -239,7 +239,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -255,7 +255,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -256,7 +256,7 @@ export default {
this.setMessage('请点击“确认1”按钮确认命令'); this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 }); this.setButtonEnable({ step: 1 });
@ -283,7 +283,7 @@ export default {
this.setMessage('请点击“确认2”按钮确认命令'); this.setMessage('请点击“确认2”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1; this.timeCountCommand = -1;
@ -313,7 +313,7 @@ export default {
this.setMessage(''); this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.timeCountCommand = -1; this.timeCountCommand = -1;
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 }); this.setButtonEnable({ step: -1 });
@ -344,7 +344,7 @@ export default {
} }
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 }); this.setButtonEnable({ step: 0 });
@ -362,7 +362,7 @@ export default {
operation: OperationEvent.Command.close.menu.operation operation: OperationEvent.Command.close.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -88,7 +88,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -105,7 +105,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -107,7 +107,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -124,7 +124,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -121,7 +121,7 @@ export default {
val: this.addModel.tripNumber val: this.addModel.tripNumber
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -136,7 +136,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -153,7 +153,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -117,7 +117,7 @@ export default {
val: this.addModel.groupNumber val: this.addModel.groupNumber
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -134,7 +134,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -155,7 +155,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -125,7 +125,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -145,7 +145,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -121,7 +121,7 @@ export default {
val: this.addModel.groupNumber val: this.addModel.groupNumber
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -136,7 +136,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -153,7 +153,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -115,7 +115,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -132,7 +132,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -121,7 +121,7 @@ export default {
val: this.addModel.groupNumber val: this.addModel.groupNumber
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -136,7 +136,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -153,7 +153,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -133,7 +133,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -153,7 +153,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -121,7 +121,7 @@ export default {
val: this.addModel.groupNumber val: this.addModel.groupNumber
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -136,7 +136,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -153,7 +153,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -103,7 +103,7 @@ export default {
val: this.addModel.tripNumber val: this.addModel.tripNumber
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -118,7 +118,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -135,7 +135,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -105,7 +105,7 @@ export default {
val: this.addModel.tripNumber val: this.addModel.tripNumber
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -120,7 +120,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -137,7 +137,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -0,0 +1,370 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'dispatchWork'" />
<menu-switch ref="menuSwitch" :selected="selected" :work="'dispatchWork'" />
<menu-signal ref="menuSignal" :selected="selected" :work="'dispatchWork'" />
<menu-section ref="menuSection" :selected="selected" :work="'dispatchWork'" />
<menu-train ref="menuTrain" :selected="selected" :work="'dispatchWork'" />
<menu-station ref="menuStation" :selected="selected" :work="'dispatchWork'" />
<menu-limit ref="menuLimit" :selected="selected" :work="'dispatchWork'" />
<passive-alarm ref="passiveAlarm" />
<passive-contorl ref="passiveControl" pop-class="beijing-01__systerm" />
<passive-timeout ref="passiveTimeout" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuSignal from './menuSignal';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection';
import MenuTrain from './menuTrain';
import MenuStation from './menuStation';
import MenuBar from './dispatchWorkMenuBar';
import MenuLimit from './menuLimit';
import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
export default {
name: 'DispatchWorkMenus',
components: {
MenuBar,
MenuSignal,
MenuSwitch,
MenuSection,
MenuStationStand,
MenuStation,
MenuTrain,
MenuLimit,
PassiveAlarm,
PassiveContorl,
PassiveTimeout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
computed: {
...mapGetters('config', [
'width'
])
},
watch: {},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
this.$refs['menuSignal'].setRouteSignal();
});
this.$root.$on('dialogOpen', e => {
if (this.selected == e &&
this.selected &&
this.selected.instance &&
this.selected.instance.mouseEvent) {
this.selected.instance.mouseEvent.mouseover();
}
});
this.$root.$on('dialogClose', e => {
if (this.selected == e &&
this.selected &&
this.selected.instance &&
this.selected.instance.mouseEvent) {
this.selected.instance.__down = false;
this.selected.instance.mouseEvent.mouseout();
this.$jlmap.clearEvent();
}
});
},
beforeDestroy() {
this.$root.$off('dialogOpen');
this.$root.$off('dialogClose');
}
};
</script>
<style>
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.beijing-01__systerm {
overflow: hidden !important;
}
.beijing-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgb(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;
}
.beijing-01__systerm .el-dialog .el-dialog__header {
padding: 10px;
height: 26px;
}
.beijing-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.beijing-01__systerm .el-dialog .el-dialog__body {
padding: 10px;
margin: 5px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #F0F0F0;
opacity: 1;
}
.beijing-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 6px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.beijing-01__systerm .el-dialog .el-dialog__title::before {
content: '';
position: absolute;
top: 0;
left: 0;
filter: blur(7px);
height: 20px;
width: -webkit-fill-available;
background: rgba(190, 190, 190, 0.8);
z-index: -1;
}
.beijing-01__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 5px;
right: 5px;
line-height: 18px;
}
.beijing-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.beijing-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.beijing-01__systerm .el-dialog .el-button {
height: 32px;
line-height: 32px;
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 0px !important;
color: #000;
background: #F0F0F0;
}
.beijing-01__systerm .el-dialog .expand {
width: 120px;
}
.beijing-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.beijing-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.beijing-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.beijing-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.beijing-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.beijing-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.beijing-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.beijing-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.beijing-01__systerm .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.beijing-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.beijing-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.beijing-01__systerm .el-dialog .el-table th.is-leaf {
background: #F0F0F0 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.beijing-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.beijing-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.beijing-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute;
-webkit-box-sizing: content-box;
box-sizing: content-box;
content: "";
border: 1px solid #000;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
top: 1px;
}
.beijing-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.beijing-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #000 !important;
position: absolute;
left: 50%;
top: 50%;
}
.beijing-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.beijing-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.beijing-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.beijing-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.beijing-01__systerm .el-dialog .table {
margin-top: 10px;
}
.beijing-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.beijing-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
</style>

View File

@ -0,0 +1,849 @@
<template>
<div id="menuBar">
<div class="nav">
<template v-for="(item,i) in menu">
<template v-if="noShowingChildren(item.children)">
<li :id="getDomId(item)" :key="i" class="nav-li" @click="hookClick(item)">
<span class="nav-li-text">{{ item.title }}</span>
</li>
</template>
<template v-else>
<li
v-if="handleShow(item)"
:id="getDomId(item)"
:key="i"
class="nav-li"
@click.stop="selectedClassA(item, i)"
>
<span class="nav-li-text">{{ item.title }}</span>
<ul class="nav-ul" :class="{'active' :i==classA}">
<template v-for="(child,j) in item.children">
<template v-if="child.children && child.children.length > 0">
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li
v-else
:id="getDomId(child)"
:key="j"
class="menu-li"
@click.stop="selectedClassB(child, j)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
<ul class="menu-ul" :class="{'active' :j==classB}">
<template v-for="(grandchild,k) in child.children">
<li v-if="grandchild.type === 'separator'" :key="k" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li
v-else-if="grandchild.show"
:id="getDomId(grandchild)"
:key="k"
class="menu-li"
@click.stop="hookClick(grandchild)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ grandchild.title }}</span>
</span>
</div>
</li>
</template>
</ul>
</li>
</template>
<template v-else>
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li
v-else-if="child.show"
:id="getDomId(child)"
:key="j"
class="menu-li"
@click.stop="hookClick(child)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
</li>
</template>
</template>
</ul>
</li>
</template>
</template>
</div>
<station-control ref="stationControl" />
<detain-train-contorl ref="detainTrainContorl" />
<detain-train-contorl-up-down ref="detainTrainContorlUpDown" />
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
<train-add ref="trainAdd" />
<train-transtalet ref="trainTranstalet" />
<train-delete ref="trainDelete" />
<manage-user ref="manageUser" />
<help-about ref="helpAbout" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { TrainingMode } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import StationControl from './menuDialog/stationControl';
import DetainTrainContorl from './menuDialog/detainTrainContorl';
import DetainTrainContorlUpDown from './menuDialog/detainTrainContorlUpDown';
import TrainAdd from './menuDialog/trainAdd';
import TrainTranstalet from './menuDialog/trainTranstalet';
import TrainDelete from './menuDialog/trainDelete';
import ManageUser from './menuDialog/manageUser';
import HelpAbout from './menuDialog/helpAbout';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'MenuBar',
components: {
NoticeInfo,
StationControl,
DetainTrainContorl,
DetainTrainContorlUpDown,
TrainAdd,
TrainTranstalet,
TrainDelete,
ManageUser,
HelpAbout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
classA: -1,
classB: -1,
tempClassA: -1,
tempClassB: -1,
valid: true,
menu: [
{
title: '系统',
operate: OperationEvent.Command.mBar.system,
children: [
{
title: '登录',
click: this.undeveloped,
show: true
},
{
title: '注销',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '站遥控',
operate: OperationEvent.MixinCommand.remoteControl.mbar,
click: this.stationRemoteControl,
show: true
},
{
title: '区域选择',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '连接主用中心',
click: this.undeveloped,
show: true
},
{
title: '连接备用中心',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '退出',
click: this.undeveloped,
show: true
}
]
},
{
title: '查看',
operate: OperationEvent.Command.mBar.check,
children: [
{
title: '运行图',
click: this.undeveloped,
show: true
},
{
title: '报告分析',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '视图',
click: this.undeveloped,
operate: '',
children: [{
title: '报警',
click: this.undeveloped,
show: true
},
{
title: '列车运行信息',
click: this.undeveloped,
show: true
},
{
title: '设备状态',
click: this.undeveloped,
show: true
},
{
title: '列车详细信息',
click: this.undeveloped,
show: true
},
{
title: '站台详细信息',
click: this.undeveloped,
show: true
}]
},
{
title: '终端站发车列表',
click: this.undeveloped,
show: true
},
{
title: '详细设备状态',
click: this.undeveloped,
show: true
},
{
title: '查找列车',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '显示目的地号',
click: this.undeveloped,
show: true
},
{
title: '显示轨道名',
click: this.undeveloped,
show: true
},
{
title: '显示道岔名',
click: this.undeveloped,
show: true
},
{
title: '显示信号机名',
click: this.undeveloped,
show: true
},
{
title: '显示车次窗位置',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '显示车次号',
click: this.undeveloped,
show: true
},
{
title: '显示车组号',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '全屏',
click: this.undeveloped,
show: true
},
{
title: '放大',
click: this.undeveloped,
show: true
},
{
title: '缩小',
click: this.undeveloped,
show: true
},
{
title: '恢复',
click: this.undeveloped,
show: true
}
]
},
{
title: '车站定位',
operate: '',
children: [
]
},
{
title: 'ATS终端操作',
operate: '',
children: [
{
title: '当天运行车计划',
click: this.undeveloped,
show: true
},
{
title: '出入库预告',
click: this.undeveloped,
show: true
}
]
},
{
title: '计划车操作',
operate: '',
children: [
{
title: '添加计划车',
click: this.undeveloped,
show: true
},
{
title: '平移计划车',
click: this.undeveloped,
show: true
},
{
title: '删除计划车',
click: this.undeveloped,
show: true
}
]
},
{
title: '批处理命令',
operate: OperationEvent.Command.mBar.detainControl,
children: [
{
title: '全线扣车',
operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
click: this.setDetainTrainAll,
show: true
},
{
title: '取消全线扣车',
operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
click: this.cancelDetainTrainAll,
show: true
},
{
title: '取消上行全线扣车',
operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
click: this.cancelUpDetainTrainAll,
show: true
},
{
title: '取消下行全线扣车',
operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
click: this.cancelDownDetainTrainAll,
show: true
}
]
},
{
title: '信息管理',
operate: '',
children: [
{
title: '调度日志',
click: this.undeveloped,
show: true
},
{
title: '调度留言提醒',
click: this.undeveloped,
show: true
},
{
title: '报警设置',
click: this.undeveloped,
show: true
}
]
},
{
title: '帮助',
children: [
{
title: '关于ITS GPC 工作站',
click: this.about,
operate: OperationEvent.Command.help.about,
show: true
}
]
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'started',
'steps',
'order',
'mode'
]),
...mapGetters('map', [
'stationList'
])
},
watch: {
tempClassA() {
this.classA = this.$store.state.menuOperation.break ? -1 : this.tempClassA;
},
tempClassB() {
this.classB = this.$store.state.menuOperation.break ? -1 : this.tempClassB;
},
'$store.state.menuOperation.break': function (val) {
if (val) {
this.classA = this.classB = -1;
} else {
this.classA = this.tempClassA;
this.classB = this.tempClassB;
}
},
'$store.state.trainingNew.trainingSwitch': function (val) {
this.closeMenu(true);
}
},
mounted() {
this.initMenu();
},
methods: {
handleShow(item) {
if (item.hide) {
return false;
}
return true;
},
initStationList() {
const list = [];
this.stationList.forEach(station => {
if (station.visible) {
const node = {
title: station.name,
operate: station.code,
show: true,
click: this.mapLocation,
code: station.code
};
list.push(node);
}
});
return list;
},
initMenu() {
if (this.menu[3]) {
this.menu[3].children = this.initStationList();
}
this.clickEvent();
this.closeMenu(true);
},
clickEvent() {
const self = this;
window.onclick = function (e) {
if (document.getElementById('menuBar')) {
self.closeMenu(false);
}
};
},
getDomId(item) {
if (item && item.operate) {
return item.operate.domId;
}
return '';
},
noShowingChildren(children) {
if (!children || children.length <= 0) {
return true;
}
return false;
},
hasShowingChildren(children) {
if (children && children.length > 0) {
return true;
}
return false;
},
closeMenu(flag) {
if (flag || (this.mode !== TrainingMode.EDIT && this.mode !== TrainingMode.TEACH)) {
this.classA = this.tempClassA = -1;
this.classB = this.tempClassB = -1;
}
},
hookClick(item, event) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
if (item && typeof item.click == 'function') {
item.click(item.operate);
}
},
selectedClassA(item, index) {
const order = this.order || 0;
if (this.mode !== TrainingMode.TEACH) { //
this.popupMenuA(item, index);
} else if (this.steps[order] && this.steps[order].type == 'bar') { //
this.popupMenuA(item, index);
}
},
selectedClassB(item, index) {
},
//
popupMenuA(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
this.clickEvent();
const operate = {
type: 'bar',
operation: item.operate.operation
};
this.tempClassA = index;
this.tempClassB = -1;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
popupMenuB(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
const operate = {
type: 'bar',
operation: item.operate.operation
};
this.tempClassB = index;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
//
mapLocation(code) {
if (code) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: code });
this.closeMenu(true);
}
},
//
stationRemoteControl(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControl.doShow(operate);
}
});
},
// 线
setDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorl.doShow(operate);
}
});
},
// 线
cancelDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorl.doShow(operate);
}
});
},
//
cancelUpDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorlUpDown.doShow(operate);
}
});
},
//
cancelDownDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorlUpDown.doShow(operate);
}
});
},
//
about(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.helpAbout.doShow(operate);
}
});
},
//
refresh() {
this.closeMenu(true);
EventBus.$emit('refresh');
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
doClose() {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$width: 30px;
$height: 30px;
$menuPadding: 10px;
$menuItemHeight: 30px;
$menuItemWidth: 180px;
$menuItemPadding: 5px;
#menuBar {
z-index: 36;
position: absolute;
width: inherit;
height: $height;
line-height: $height;
}
.nav {
display: block;
cursor: pointer;
color: #0000;
background: -webkit-linear-gradient(#FDFDFE, #DEE3F3);
background: -o-linear-gradient(#FDFDFE, #DEE3F3);
background: -moz-linear-gradient(#FDFDFE, #DEE3F3);
background: linear-gradient(#FDFDFE, #DEE3F3);
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
}
.nav-li {
position: relative;
display: inline-block;
padding-left: $menuPadding;
padding-right: $menuPadding;
}
.nav-li:active {
background: #C9D0E1;
border-radius: 4px;
}
.nav-li-text {
font-size: 13px;
color: #000;
text-align: center;
text-decoration: none;
}
.nav-ul {
display: none;
position: absolute;
list-style: none;
border: 1px solid gray !important;
line-height: $menuItemHeight;
width: $menuItemWidth;
padding: 0px;
margin: 0px;
max-height: 550px;
overflow-y: scroll;
&::-webkit-scrollbar {
width: 4px;
}
&::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #c3c3c3;
}
&::-webkit-scrollbar-track {
border-radius: 0;
background: #f0f0f0;
}
}
.menu-ul {
display: none;
list-style: none;
background: #F0F0F0;
line-height: $menuItemHeight;
width: $menuItemWidth;
bottom: $menuItemHeight;
}
.active {
position: absolute;
display: block !important;
}
.menu-ul-text {
font-size: 14px;
color: #000;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li {
text-align: left;
background: #F0F0F0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-block {
display: flex;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-text {
font-size: 14px;
color: #000;
}
.menu-li-text .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
}
.menu-li-text .label {
display: inline-block;
}
.menu-separator {
text-align: left;
background: #F0F0F0;
height: 2px;
line-height: 2px;
}
.menu-separator .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
height: 100%;
background: #EFECDE;
}
.menu-separator .separator {
display: inline-block;
background: #CACACA;
margin-left: 5px;
height: 2px;
width: $menuItemWidth - $width - 30px;
}
.menu-li-block:hover {
background: #C9DEF7;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
</style>

View File

@ -0,0 +1,371 @@
<template>
<div class="menus" :style="{width: width + 'px'}">
<menu-bar ref="menuBar" :selected="selected" />
<menu-button ref="menuButton" />
<passive-alarm ref="passiveAlarm" />
<menu-station-stand ref="menuStationStand" :selected="selected" :work="'localWork'" />
<menu-switch ref="menuSwitch" :selected="selected" :work="'localWork'" />
<menu-signal ref="menuSignal" :selected="selected" :work="'localWork'" />
<menu-section ref="menuSection" :selected="selected" :work="'localWork'" />
<menu-train ref="menuTrain" :selected="selected" :work="'localWork'" />
<menu-station ref="menuStation" :selected="selected" :work="'localWork'" />
<menu-limit ref="menuLimit" :selected="selected" :work="'localWork'" />
<passive-contorl ref="passiveControl" pop-class="beijing-01__systerm" />
<passive-timeout ref="passiveTimeout" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import MenuButton from './menuButton';
import MenuBar from './localWorkMenuBar';
import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
import MenuStation from './menuStation';
import MenuStationStand from './menuStationStand';
import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection';
import MenuTrain from './menuTrain';
import MenuSignal from './menuSignal';
import MenuLimit from './menuLimit';
export default {
name: 'LocalWorkMenus',
components: {
MenuBar,
MenuButton,
PassiveAlarm,
PassiveContorl,
PassiveTimeout,
MenuStation,
MenuStationStand,
MenuSwitch,
MenuSection,
MenuTrain,
MenuSignal,
MenuLimit
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
computed: {
...mapGetters('config', [
'width'
])
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar');
});
this.$root.$on('dialogOpen', e => {
if (this.selected == e &&
this.selected &&
this.selected.instance &&
this.selected.instance.mouseEvent) {
this.selected.instance.mouseEvent.mouseover();
}
});
this.$root.$on('dialogClose', e => {
if (this.selected == e &&
this.selected &&
this.selected.instance &&
this.selected.instance.mouseEvent) {
this.selected.instance.__down = false;
this.selected.instance.mouseEvent.mouseout();
this.$jlmap.clearEvent();
}
});
},
beforeDestroy() {
this.$root.$off('dialogOpen');
this.$root.$off('dialogClose');
}
};
</script>
<style>
.menus .pop-menu {
background: #F0F0F0;
}
.menus .pop-menu span {
color: #000;
}
.menus .pop-menu .is-disabled span {
color: #B4B3B8;
}
.beijing-01__systerm {
overflow: hidden !important;
}
.beijing-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgb(144, 144, 144, 0.8);
border-radius: 6px;
color: #000;
font-size: 14px;
}
.beijing-01__systerm .el-dialog .el-dialog__header {
padding: 10px;
height: 26px;
}
.beijing-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0;
opacity: 1;
}
.beijing-01__systerm .el-dialog .el-dialog__body {
padding: 10px;
margin: 5px;
border: 2px solid rgba(120, 121, 123, 0.5);
box-shadow: 1px hsla(240, 0%, 100%, 0.5) inset;
background: #F0F0F0;
opacity: 1;
}
.beijing-01__systerm .el-dialog .el-dialog__title {
position: absolute;
top: 6px;
color: #000;
border-radius: 4px;
padding: 0px 2px;
height: 20px;
line-height: 20px
}
.beijing-01__systerm .el-dialog .el-dialog__title::before {
content: '';
position: absolute;
top: 0;
left: 0;
filter: blur(7px);
height: 20px;
width: -webkit-fill-available;
background: rgba(190, 190, 190, 0.8);
z-index: -1;
}
.beijing-01__systerm .el-dialog .el-dialog__headerbtn {
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff;
border-radius: 4px;
top: 5px;
right: 5px;
line-height: 18px;
}
.beijing-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
font-size: 16px;
}
.beijing-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
.beijing-01__systerm .el-dialog .el-button {
height: 32px;
line-height: 32px;
padding: 0px;
width: 80px;
border: 2px outset #E2E2E2;
border-radius: 0px !important;
color: #000;
background: #F0F0F0;
}
.beijing-01__systerm .el-dialog .expand {
width: 120px;
}
.beijing-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray;
}
.beijing-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2;
}
.beijing-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2;
}
.beijing-01__systerm .el-dialog .el-button:disabled span {
border: 0px;
}
.beijing-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9;
}
.beijing-01__systerm .el-dialog .el-input .el-input__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
background: #F0F0F0 !important;
}
.beijing-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9;
border-radius: 0px;
}
.beijing-01__systerm .el-dialog .el-textarea .el-textarea__inner {
color: #000;
background: #fff !important;
border: 0px;
border-radius: 0px !important;
box-sizing: border-box;
}
.beijing-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
background: #F0F0F0 !important;
}
.beijing-01__systerm .el-dialog .el-table--border th.gutter {
background: #EBEADB !important;
}
.beijing-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9;
color: #000 !important;
}
.beijing-01__systerm .el-dialog .el-table .cell {
line-height: unset !important;
}
.beijing-01__systerm .el-dialog .el-table th.is-leaf {
background: #F0F0F0 !important;
border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important;
color: #000 !important;
height: 20px !important;
padding: 0px;
}
.beijing-01__systerm .el-dialog .el-table tr td {
height: 20px !important;
padding: 0px;
}
.beijing-01__systerm .el-dialog .el-table .el-table__empty-text {
top: 15px !important;
}
.beijing-01__systerm .el-dialog .current-row>td {
background: #3399FF !important;
color: #fff !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
background: #E6E6E6 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
color: #C5C9CC !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
position: absolute;
-webkit-box-sizing: content-box;
box-sizing: content-box;
content: "";
border: 1px solid #000;
border-left: 0;
border-top: 0;
height: 7px;
left: 4px;
top: 1px;
}
.beijing-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-radio__label {
color: #000 !important;
}
.beijing-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
background: #fff !important;
border: 1px inset #dcdfe6 !important;
}
.beijing-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
width: 4px;
height: 4px;
border-radius: 100%;
background-color: #000 !important;
position: absolute;
left: 50%;
top: 50%;
}
.beijing-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
background: #E6E6E6 !important;
}
.beijing-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
color: #C5C9CC !important;
}
.beijing-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -15px;
top: -18px;
}
.beijing-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important;
color: #000 !important;
}
.beijing-01__systerm .el-dialog .context {
height: 100px;
border: 2px inset #E2E2E2;
overflow-y: scroll;
}
.beijing-01__systerm .el-dialog .table {
margin-top: 10px;
}
.beijing-01__systerm .el-dialog .notice {
margin-left: 62px;
line-height: 30px;
}
.beijing-01__systerm .el-dialog .button-group {
margin-top: 10px;
}
</style>

View File

@ -0,0 +1,846 @@
<template>
<div id="menuBar">
<div class="nav">
<template v-for="(item,i) in menu">
<template v-if="noShowingChildren(item.children)">
<li :id="getDomId(item)" :key="i" class="nav-li" @click="hookClick(item)">
<span class="nav-li-text">{{ item.title }}</span>
</li>
</template>
<template v-else>
<li
v-if="handleShow(item)"
:id="getDomId(item)"
:key="i"
class="nav-li"
@click.stop="selectedClassA(item, i)"
>
<span class="nav-li-text">{{ item.title }}</span>
<ul class="nav-ul" :class="{'active' :i==classA}">
<template v-for="(child,j) in item.children">
<template v-if="child.children && child.children.length > 0">
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li
v-else
:id="getDomId(child)"
:key="j"
class="menu-li"
@click.stop="selectedClassB(child, j)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
<ul class="menu-ul" :class="{'active' :j==classB}">
<template v-for="(grandchild,k) in child.children">
<li v-if="grandchild.type === 'separator'" :key="k" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li
v-else-if="grandchild.show"
:id="getDomId(grandchild)"
:key="k"
class="menu-li"
@click.stop="hookClick(grandchild)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ grandchild.title }}</span>
</span>
</div>
</li>
</template>
</ul>
</li>
</template>
<template v-else>
<li v-if="child.type === 'separator'" :key="j" class="menu-separator">
<span class="status">&ensp;</span>
<span class="separator">&ensp;</span>
</li>
<li
v-else-if="child.show"
:id="getDomId(child)"
:key="j"
class="menu-li"
@click.stop="hookClick(child)"
>
<div class="menu-li-block">
<span class="menu-li-text">
<span class="status">&ensp;</span>
<span class="label">{{ child.title }}</span>
</span>
</div>
</li>
</template>
</template>
</ul>
</li>
</template>
</template>
</div>
<station-control ref="stationControl" />
<detain-train-contorl ref="detainTrainContorl" />
<detain-train-contorl-up-down ref="detainTrainContorlUpDown" />
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
<train-add ref="trainAdd" />
<train-transtalet ref="trainTranstalet" />
<train-delete ref="trainDelete" />
<manage-user ref="manageUser" />
<help-about ref="helpAbout" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { TrainingMode } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import StationControl from './menuDialog/stationControl';
import DetainTrainContorl from './menuDialog/detainTrainContorl';
import DetainTrainContorlUpDown from './menuDialog/detainTrainContorlUpDown';
import TrainAdd from './menuDialog/trainAdd';
import TrainTranstalet from './menuDialog/trainTranstalet';
import TrainDelete from './menuDialog/trainDelete';
import ManageUser from './menuDialog/manageUser';
import HelpAbout from './menuDialog/helpAbout';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { EventBus } from '@/scripts/event-bus';
export default {
name: 'MenuBar',
components: {
NoticeInfo,
StationControl,
DetainTrainContorl,
DetainTrainContorlUpDown,
TrainAdd,
TrainTranstalet,
TrainDelete,
ManageUser,
HelpAbout
},
props: {
selected: {
type: Object,
default() {
return null;
}
}
},
data() {
return {
classA: -1,
classB: -1,
tempClassA: -1,
tempClassB: -1,
valid: true,
menu: [
{
title: '系统',
operate: OperationEvent.Command.mBar.system,
children: [
{
title: '登录',
click: this.undeveloped,
show: true
},
{
title: '注销',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '站遥控',
operate: OperationEvent.MixinCommand.remoteControl.mbar,
click: this.stationRemoteControl,
show: true
},
{
title: '区域选择',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '连接主用中心',
click: this.undeveloped,
show: true
},
{
title: '连接备用中心',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '退出',
click: this.undeveloped,
show: true
}
]
},
{
title: '查看',
operate: OperationEvent.Command.mBar.check,
children: [
{
title: '运行图',
click: this.undeveloped,
show: true
},
{
title: '报告分析',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '视图',
click: this.undeveloped,
operate: '',
children: [{
title: '报警',
click: this.undeveloped,
show: true
},
{
title: '列车运行信息',
click: this.undeveloped,
show: true
},
{
title: '设备状态',
click: this.undeveloped,
show: true
},
{
title: '列车详细信息',
click: this.undeveloped,
show: true
},
{
title: '站台详细信息',
click: this.undeveloped,
show: true
}]
},
{
title: '终端站发车列表',
click: this.undeveloped,
show: true
},
{
title: '详细设备状态',
click: this.undeveloped,
show: true
},
{
title: '查找列车',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '显示目的地号',
click: this.undeveloped,
show: true
},
{
title: '显示轨道名',
click: this.undeveloped,
show: true
},
{
title: '显示道岔名',
click: this.undeveloped,
show: true
},
{
title: '显示信号机名',
click: this.undeveloped,
show: true
},
{
title: '显示车次窗位置',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '显示车次号',
click: this.undeveloped,
show: true
},
{
title: '显示车组号',
click: this.undeveloped,
show: true
},
{
type: 'separator'
},
{
title: '全屏',
click: this.undeveloped,
show: true
},
{
title: '放大',
click: this.undeveloped,
show: true
},
{
title: '缩小',
click: this.undeveloped,
show: true
},
{
title: '恢复',
click: this.undeveloped,
show: true
}
]
},
{
title: '车站定位',
operate: '',
children: [
]
},
{
title: 'ATS终端操作',
operate: '',
children: [
{
title: '当天运行车计划',
click: this.undeveloped,
show: true
},
{
title: '出入库预告',
click: this.undeveloped,
show: true
}
]
},
{
title: '计划车操作',
operate: '',
children: [
{
title: '添加计划车',
click: this.undeveloped,
show: true
},
{
title: '平移计划车',
click: this.undeveloped,
show: true
},
{
title: '删除计划车',
click: this.undeveloped,
show: true
}
]
},
{
title: '批处理命令',
operate: OperationEvent.Command.mBar.detainControl,
children: [
{
title: '全线扣车',
operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
click: this.setDetainTrainAll,
show: true
},
{
title: '取消全线扣车',
operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
click: this.cancelDetainTrainAll,
show: true
},
{
title: '取消上行全线扣车',
operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
click: this.cancelUpDetainTrainAll,
show: true
},
{
title: '取消下行全线扣车',
operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
click: this.cancelDownDetainTrainAll,
show: true
}
]
},
{
title: '信息管理',
operate: '',
children: [
{
title: '调度日志',
click: this.undeveloped,
show: true
},
{
title: '调度留言提醒',
click: this.undeveloped,
show: true
},
{
title: '报警设置',
click: this.undeveloped,
show: true
}
]
},
{
title: '帮助',
children: [
{
title: '关于ITS GPC 工作站',
click: this.about,
operate: OperationEvent.Command.help.about,
show: true
}
]
}
]
};
},
computed: {
...mapGetters('training', [
'mode',
'started',
'steps',
'order',
'mode'
]),
...mapGetters('map', [
'stationList'
])
},
watch: {
tempClassA() {
this.classA = this.$store.state.menuOperation.break ? -1 : this.tempClassA;
},
tempClassB() {
this.classB = this.$store.state.menuOperation.break ? -1 : this.tempClassB;
},
'$store.state.menuOperation.break': function (val) {
if (val) {
this.classA = this.classB = -1;
} else {
this.classA = this.tempClassA;
this.classB = this.tempClassB;
}
},
'$store.state.trainingNew.trainingSwitch': function (val) {
this.closeMenu(true);
}
},
mounted() {
this.initMenu();
},
methods: {
handleShow(item) {
if (item.hide) {
return false;
}
return true;
},
initStationList() {
const list = [];
this.stationList.forEach(station => {
if (station.visible) {
const node = {
title: station.name,
operate: station.code,
show: true,
click: this.mapLocation,
code: station.code
};
list.push(node);
}
});
return list;
},
initMenu() {
if (this.menu[3]) {
this.menu[3].children = this.initStationList();
}
this.clickEvent();
this.closeMenu(true);
},
clickEvent() {
const self = this;
window.onclick = function (e) {
if (document.getElementById('menuBar')) {
self.closeMenu(false);
}
};
},
getDomId(item) {
if (item && item.operate) {
return item.operate.domId;
}
return '';
},
noShowingChildren(children) {
if (!children || children.length <= 0) {
return true;
}
return false;
},
hasShowingChildren(children) {
if (children && children.length > 0) {
return true;
}
return false;
},
closeMenu(flag) {
if (flag || (this.mode !== TrainingMode.EDIT && this.mode !== TrainingMode.TEACH)) {
this.classA = this.tempClassA = -1;
this.classB = this.tempClassB = -1;
}
},
hookClick(item, event) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
if (item && typeof item.click == 'function') {
item.click(item.operate);
}
},
selectedClassA(item, index) {
const order = this.order || 0;
if (this.mode !== TrainingMode.TEACH) { //
this.popupMenuA(item, index);
} else if (this.steps[order] && this.steps[order].type == 'bar') { //
this.popupMenuA(item, index);
}
},
//
popupMenuA(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
this.clickEvent();
const operate = {
type: 'bar',
operation: item.operate.operation
};
this.tempClassA = index;
this.tempClassB = -1;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
popupMenuB(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
const operate = {
type: 'bar',
operation: item.operate.operation
};
this.tempClassB = index;
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
//
mapLocation(code) {
if (code) {
this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: code });
this.closeMenu(true);
}
},
//
stationRemoteControl(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationControl.doShow(operate);
}
});
},
// 线
setDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorl.doShow(operate);
}
});
},
// 线
cancelDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorl.doShow(operate);
}
});
},
//
cancelUpDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorlUpDown.doShow(operate);
}
});
},
//
cancelDownDetainTrainAll(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.detainTrainContorlUpDown.doShow(operate);
}
});
},
//
about(order) {
const operate = {
type: 'bar',
operation: order.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.closeMenu(true);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.helpAbout.doShow(operate);
}
});
},
//
refresh() {
this.closeMenu(true);
EventBus.$emit('refresh');
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
doClose() {
this.$nextTick(() => {
EventBus.$emit('closeMenu');
});
}
}
};
</script>
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$width: 30px;
$height: 30px;
$menuPadding: 10px;
$menuItemHeight: 30px;
$menuItemWidth: 180px;
$menuItemPadding: 5px;
#menuBar {
z-index: 36;
position: absolute;
width: inherit;
height: $height;
line-height: $height;
}
.nav {
display: block;
cursor: pointer;
color: #0000;
background: -webkit-linear-gradient(#FDFDFE, #DEE3F3);
background: -o-linear-gradient(#FDFDFE, #DEE3F3);
background: -moz-linear-gradient(#FDFDFE, #DEE3F3);
background: linear-gradient(#FDFDFE, #DEE3F3);
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
}
.nav-li {
position: relative;
display: inline-block;
padding-left: $menuPadding;
padding-right: $menuPadding;
}
.nav-li:active {
background: #C9D0E1;
border-radius: 4px;
}
.nav-li-text {
font-size: 13px;
color: #000;
text-align: center;
text-decoration: none;
}
.nav-ul {
display: none;
position: absolute;
list-style: none;
border: 1px solid gray !important;
line-height: $menuItemHeight;
width: $menuItemWidth;
padding: 0px;
margin: 0px;
max-height: 550px;
overflow-y: scroll;
&::-webkit-scrollbar {
width: 4px;
}
&::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #c3c3c3;
}
&::-webkit-scrollbar-track {
border-radius: 0;
background: #f0f0f0;
}
}
.menu-ul {
display: none;
list-style: none;
background: #F0F0F0;
line-height: $menuItemHeight;
width: $menuItemWidth;
bottom: $menuItemHeight;
}
.active {
position: absolute;
display: block !important;
}
.menu-ul-text {
font-size: 14px;
color: #000;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li {
text-align: left;
background: #F0F0F0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-block {
display: flex;
letter-spacing: 0;
height: $menuItemHeight;
line-height: $menuItemHeight;
}
.menu-li-text {
font-size: 14px;
color: #000;
}
.menu-li-text .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
}
.menu-li-text .label {
display: inline-block;
}
.menu-separator {
text-align: left;
background: #F0F0F0;
height: 2px;
line-height: 2px;
}
.menu-separator .status {
display: inline-block;
border-right: 1px inset #CACACA;
width: $width;
height: 100%;
background: #EFECDE;
}
.menu-separator .separator {
display: inline-block;
background: #CACACA;
margin-left: 5px;
height: 2px;
width: $menuItemWidth - $width - 30px;
}
.menu-li-block:hover {
background: #C9DEF7;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
<template> <template>
<div v-if="isShowBtn" id="menuButtons_box" class="menu menuButton" style="height:45px;" :style="{left: point.x+'px', bottom: point.y+'px' }"> <div id="menuButtons_box" class="menu menuButton" style="height:45px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
<button <button
:id="Signal.arrangementRoute.button.domId" :id="Signal.arrangementRoute.button.domId"
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}" :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
@ -244,9 +244,7 @@
<script> <script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import Handler from '@/scripts/cmdPlugin/Handler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
// import { deepAssign } from '@/utils/index';
import PasswordBox from './dialog/childDialog/passwordInputBox.vue'; import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
export default { export default {
@ -287,9 +285,6 @@ export default {
}, },
Command() { Command() {
return OperationEvent.Command; return OperationEvent.Command;
},
isShowBtn() {
return this.$store.state.training.prdType == '01';
} }
}, },
watch: { watch: {
@ -298,6 +293,11 @@ export default {
}, },
'$store.state.menuOperation.selectedCount': function (val) { '$store.state.menuOperation.selectedCount': function (val) {
this.selectedChange(); this.selectedChange();
},
'$store.state.trainingNew.trainingSwitch': function (val) {
if (val) {
this.$store.dispatch('menuOperation/setButtonOperation', null);
}
} }
}, },
methods: { methods: {
@ -326,7 +326,7 @@ export default {
type: 'mbm', type: 'mbm',
operation: operation operation: operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/setButtonOperation', operation); // this.$store.dispatch('menuOperation/setButtonOperation', operation); //
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -340,7 +340,7 @@ export default {
over:true, over:true,
cmdType:data.cmdType cmdType:data.cmdType
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -350,19 +350,19 @@ export default {
}, },
selectedChange() { selectedChange() {
const model = this.$store.state.menuOperation.selected; const model = this.$store.state.menuOperation.selected;
console.log(model, model._type, this.$store.state.menuOperation.buttonOperation, 'caise');
if (model && model._type) { if (model && model._type) {
switch (this.$store.state.menuOperation.buttonOperation) { switch (this.$store.state.menuOperation.buttonOperation) {
case OperationEvent.Station.guideLock.button.operation : { case OperationEvent.Station.guideLock.button.operation : {
if (model && model._type == 'GuideLock') { if (model && model._type == 'GuideLock') {
const operate = { const operate = {
start: true, start: true,
over: true,
operation: OperationEvent.Station.guideLock.button.operation, operation: OperationEvent.Station.guideLock.button.operation,
param:{ param:{
stationCode:model.stationCode stationCode:model.stationCode
} }
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (model.totalGuideLock) { if (model.totalGuideLock) {
@ -372,7 +372,8 @@ export default {
} }
this.$refs.password.doShow(operate); this.$refs.password.doShow(operate);
} }
}).catch(() => { }).catch((e) => {
console.log(e);
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
@ -391,7 +392,7 @@ export default {
}, },
cmdType : CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK cmdType : CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -413,7 +414,7 @@ export default {
}, },
cmdType : CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK cmdType : CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -425,7 +426,7 @@ export default {
} }
} }
} else { } else {
Handler.clear(); // Handler.clear();
this.$store.dispatch('menuOperation/setButtonOperation', null); this.$store.dispatch('menuOperation/setButtonOperation', null);
} }
} }

View File

@ -94,7 +94,7 @@ export default {
operation: OperationEvent.Command.close.confirm.operation operation: OperationEvent.Command.close.confirm.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose(); this.doClose();
@ -113,7 +113,7 @@ export default {
} else if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) { } else if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) {
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL; operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
} }
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid, response }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });

View File

@ -124,7 +124,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
if (this.model.password === this.model.confirm) { if (this.model.password === this.model.confirm) {
@ -146,7 +146,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -99,7 +99,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -116,7 +116,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -137,7 +137,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
if (this.selected.password !== this.model.oldPassword) { if (this.selected.password !== this.model.oldPassword) {
@ -163,7 +163,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

View File

@ -109,7 +109,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
@ -137,7 +137,7 @@ export default {
messages: ['确认设置全线扣车!'] messages: ['确认设置全线扣车!']
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else { } else {
@ -161,7 +161,7 @@ export default {
messages: ['确认取消全线扣车!'] messages: ['确认取消全线扣车!']
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else { } else {

View File

@ -109,7 +109,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
@ -137,7 +137,7 @@ export default {
messages: ['确认取消全线上行扣车!'] messages: ['确认取消全线上行扣车!']
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else { } else {
@ -161,7 +161,7 @@ export default {
messages: ['确认取消全线下行扣车!'] messages: ['确认取消全线下行扣车!']
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else { } else {

View File

@ -99,7 +99,7 @@ export default {
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -115,7 +115,7 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }

Some files were not shown because too many files have changed in this diff Show More