Merge branch 'test_dispaly' of git.code.tencent.com:lian-cbtc/jl-client into test_dispaly

This commit is contained in:
Yuan 2022-10-13 09:35:03 +08:00
commit a6a806c218
33 changed files with 2421 additions and 2007 deletions

View File

@ -106,3 +106,11 @@ export function deleteMapSystem(id) {
method: 'delete'
});
}
/** 分页查询地图系统 */
export function queryMapSystemPaged(params) {
return request({
url: `/api/mapSystem/new/paged`,
method: 'get',
params
});
}

View File

@ -6,8 +6,8 @@
</div>
</template>
<script>
import { getSessionStorage } from '@/utils/auth';
import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
// import { getSessionStorage } from '@/utils/auth';
// import { loginInfo, ProjectIcon } from '@/scripts/ProjectConfig';
export default {
data() {
@ -19,11 +19,15 @@ export default {
};
},
mounted() {
const project = getSessionStorage('project');
this.systemTitle = loginInfo[project].homeTitle || loginInfo[project].title;
this.logoImg = loginInfo[project].titleIcon || ProjectIcon[project];
this.navigationLogoWidth = loginInfo[project].navigationLogoWidth;
this.navigationMarginLeft = loginInfo[project].navigationMarginLeft;
// const project = getSessionStorage('project');
// this.systemTitle = loginInfo[project].homeTitle || loginInfo[project].title;
// this.logoImg = loginInfo[project].titleIcon || ProjectIcon[project];
// this.navigationLogoWidth = loginInfo[project].navigationLogoWidth;
// this.navigationMarginLeft = loginInfo[project].navigationMarginLeft;
this.systemTitle = this.$store.state.projectConfig.homeTitle;
this.logoImg = this.$store.state.projectConfig.loginProLogo;
this.navigationLogoWidth = this.$store.state.projectConfig.homeProLogoWidth + 'px';
this.navigationMarginLeft = '60px';
},
methods: {
goToMain() {

View File

@ -114,7 +114,7 @@ router.beforeEach( async (to, from, next) => {
// }
const response = await getFrontProjectConfigByLogin(project);
if (response.data) {
const {browserTitle, loginProLogo, baseApiUrl, baseSite, ossUrl} = response.data.viewSetting;
const {browserTitle, loginProLogo, baseApiUrl, baseSite, caseShow, ossUrl, homeTitle, homeProLogoWidth} = response.data.viewSetting;
if (!store.state.user.baseUrl && project) {
const urlData = handlerUrl();
store.dispatch('setBaseUrl', baseApiUrl || urlData.BASE_API);
@ -123,7 +123,12 @@ router.beforeEach( async (to, from, next) => {
subscribe();
}
document.title = browserTitle;
document.querySelector("link[rel*='icon']").href = loginProLogo ? '/oss-rtss/logo/' + loginProLogo : '';
const url = loginProLogo ? store.state.user.ossUrl + '/logo/' + loginProLogo : '';
document.querySelector("link[rel*='icon']").href = url;
store.commit('setCaseShow', caseShow);
store.dispatch('setHomeProLogoWidth', homeProLogoWidth);
store.dispatch('setLoginProLogo', url);
store.dispatch('setHomeTitle', homeTitle);
NProgress.start();
const loginPath = getRouteInfo(to, response.data.markKey);
const token = to.query.token;

View File

@ -7,7 +7,6 @@ Vue.use(Router);
/* Layout */
const Layout = () => import('@/layout');
const Login = () => import('@/views/login/index');
const LoginNew = () => import('@/views/login_new/index');
const Authorization = () => import('@/views/authorization/index');
const AuthorApply = () => import('@/views/authorization/apply');
@ -132,9 +131,10 @@ const MapPreviewNew = () => import('@/views/designPlatform/mapPreviewNew');
const BigScreen = () => import('@/views/designPlatform/bigScreen');
const BigSplitScreen = () => import('@/views/designPlatform/bigSplitScreen');
const Package = () => import('@/views/package/index');
const SimulationPlatform = () => import('@/views/trainingPlatform/simulation');
const PublishMap = () => import('@/views/publish/publishMap/index');
const SubsystemManage = () => import('@/views/publish/publishMap/subsystem');
const PublishMapDetail = () => import('@/views/publish/publishMap/list'); // 发布历史
const PublishLesson = () => import('@/views/publish/publishLesson/index');
const RunPlanTemplate = () => import('@/views/publish/runPlanTemplate/index');
@ -294,12 +294,6 @@ export const constantRoutes = [
component: Login,
hidden: true
},
// 新版平台登录页面
{
path: '/loginNew',
component: LoginNew,
hidden: true
},
// 设计平台登录
{
path: '/design',
@ -920,9 +914,9 @@ export const asyncRouter = [
component: ExamResult,
hidden: true
},
{ // 线路权限列表
path: 'permission/:mapId',
component: Package,
{
path: 'simulation/:mapId',
component: SimulationPlatform,
hidden: true
},
{ // 二级home页面
@ -1582,20 +1576,20 @@ export const asyncRouter = [
i18n: 'newRouter.regulationSimulation'
}
}
]
},
{ // 新路由-教学管理菜单
path: '/info',
path: '/teaching',
component: Layout,
meta: {
i18n: 'newRouter.teachingManagement',
roles: [admin, user, userTrainingPlatform]
},
children: [
{ // 班级管理
{
path: 'organization',
component: OrganizationManage,
redirect: '/teaching/organization/classManage',
meta: {
i18n: 'newRouter.teachingManagement'
},
@ -1617,12 +1611,129 @@ export const asyncRouter = [
},
{ // 理论题目管理
path: 'theoryManage',
component: Temporary,
component: BankManage,
hidden: true
},
{ // 考试管理
path: 'examManage',
component: Temporary,
component: OrgExamManage,
hidden: true
},
{
path: 'questionCreate',
component: QuestionCreatePage,
hidden: true
},
{
path: 'questionUpdate/:questionId',
component: QuestionUpdatePage,
hidden: true
}
]
},
{ // 理论题目管理-添加
path: 'questionCreate',
component: QuestionCreatePage,
hidden: true
},
{ // 理论题目管理-编辑
path: 'questionUpdate/:questionId',
component: QuestionUpdatePage,
hidden: true
},
{ // 出题规则管理
path: 'questionsRuleManage',
hidden: true,
component: QuestionsRuleManage
},
{ // 用于实训教学管理部分
path: 'design',
component: DesignPlatform,
hidden: true,
meta: {
i18n: 'router.designhomePage'
},
children: [
{
path: 'home',
component: DesignPlatformHome,
hidden: true
},
{ // 运行图设计
path: 'runPlan/detail/:mapId',
component: PlanMonitorDetail,
hidden: true
},
{ // 剧本
path: 'script/home/:mapId',
component: ScriptmanageHome,
hidden: true
},
{ // 课程列表
path: 'lesson/home/:mapId',
component: LessonHome,
hidden: true
},
{ // 三维课程列表
path: 'lesson/lesson3d',
component: Lesson3d,
hidden: true
},
{ // 操作定义
path: 'lesson/trainingRule',
component: TrainingRuleList,
hidden: true
},
{ // 操作定义步骤
path: 'lesson/trainingRule/detail',
hidden: true,
component: TrainingRuleEdit
},
{ // 任务管理
path: 'lesson/taskManage',
component: Taskmanage,
hidden: true
},
{ // 实训管理
path: 'lesson/trainingManage',
component: Trainingmanage,
hidden: true
},
{ // 创建课程
path: 'lesson/edit/:type',
component: LessonEdit,
hidden: true
},
{ // 课程详情
path: 'lesson/details',
component: LessonDetail,
hidden: true,
children: [
{
path: 'edit/:type',
component: LessonEdit,
hidden: true
}
]
},
{ // 新版地图预览
path: 'mapPreviewNew/:mapId',
component: MapPreviewNew,
hidden: true
},
{
path: 'bigScreen/:mapId',
component: BigScreen,
hidden: true
},
{ // ibp列表
path: 'ibp/home/:mapId',
component: IbpHome,
hidden: true
},
{
path: 'ibp/edit',
component: IbpDraw,
hidden: true
}
]
@ -1630,7 +1741,7 @@ export const asyncRouter = [
]
},
{ // 新路由-线路设计
path: '/design',
path: '/lineDesign',
component: Layout,
meta: {
i18n: 'newRouter.lineDesign',
@ -1639,7 +1750,7 @@ export const asyncRouter = [
children: [
{
path: 'usermap',
redirect: '/design/usermap/home',
redirect: '/lineDesign/usermap/home',
component: NewDesignPlatformUser,
meta: {
i18n: 'newRouter.lineDesign'
@ -1691,7 +1802,7 @@ export const asyncRouter = [
]
},
{ // 新路由-系统管理
path: '/system',
path: '/systemManagement',
component: Layout,
meta: {
i18n: 'newRouter.SystemManagement',
@ -1813,6 +1924,14 @@ export const asyncRouter = [
meta: {
i18n: 'newRouter.linePacketManage'
}
},
{
path: 'subsystem',
component: SubsystemManage,
hidden: true,
meta: {
i18n: 'newRouter.subsystemManage'
}
}
]
},

View File

@ -129,7 +129,7 @@ class MenuContextHandler {
}
covertList(list) {
const menu = [...list];
let menu = [...list];
const selected = this.getCurrentStateObject();
const control = this.getStationControl(selected);
if (control && !store.state.scriptRecord.audioPlay) {

View File

@ -19,6 +19,7 @@ import iscs from './modules/iscs';
import rpTools from './modules/rpTools';
import race from './modules/race';
import trainingNew from './modules/trainingNew';
import projectConfig from './modules/projectConfig';
import getters from './getters';
@ -44,7 +45,8 @@ const store = new Vuex.Store({
iscs,
rpTools,
race,
trainingNew
trainingNew,
projectConfig
},
getters
});

View File

@ -94,7 +94,7 @@ const permission = {
},
actions: {
// 生成其他权限路由
GenerateRoutes({ commit }, data) {
GenerateRoutes({ commit, rootState }, data) {
return new Promise(resolve => {
const { roles } = data;
if (roles.includes(superAdmin) && !roles.includes(admin)) { // 只拥有超级管理员 没有管理员权限
@ -110,6 +110,9 @@ const permission = {
if (route.children && route.children.length == 0) {
route.hidden = true;
}
if (route.path == '/case') { // 案例菜单是否显示
route.hidden = !rootState.projectConfig.caseShow;
}
});
commit('SET_ROUTERS', accessedRouters);
resolve();

View File

@ -0,0 +1,39 @@
const user = {
state: {
homeProLogoWidth:0,
loginProLogo:'',
homeTitle:'',
caseShow:true
},
mutations: {
setHomeProLogoWidth: (state, homeProLogoWidth) => {
state.homeProLogoWidth = homeProLogoWidth;
},
setLoginProLogo: (state, loginProLogo) => {
state.loginProLogo = loginProLogo;
},
setHomeTitle: (state, homeTitle) => {
state.homeTitle = homeTitle;
},
setCaseShow: (state, caseShow) => {
state.caseShow = caseShow;
}
},
actions: {
setHomeProLogoWidth({ commit }, homeProLogoWidth) {
commit('setHomeProLogoWidth', homeProLogoWidth);
},
setLoginProLogo({ commit }, loginProLogo) {
commit('setLoginProLogo', loginProLogo);
},
setHomeTitle({ commit }, homeTitle) {
commit('setHomeTitle', homeTitle);
},
setCaseShow({ commit }, caseShow) {
commit('setCaseShow', caseShow);
}
}
};
export default user;

View File

@ -106,13 +106,14 @@ const user = {
Login({ commit }, userInfo) {
const username = userInfo.username.trim();
const password = userInfo.password.trim();
const type = userInfo.type;
// const type = userInfo.type;
const type = 'class';
const project = userInfo.project;
const deviceCode = userInfo.deviceCode;
const teacherLogin = userInfo.teacherLogin;
return new Promise((resolve, reject) => {
// 登录系统
const params = Object.assign({ account: username, password, project:project, deviceCode:deviceCode, teacherLogin:teacherLogin }, type == 'design' ? LoginParams.Design : LoginParams.LianKeTang);
const params = Object.assign({ account: username, password, project:project, deviceCode:deviceCode, teacherLogin:teacherLogin }, LoginParams.LianKeTang);
login(params).then(resp => {
const token = resp.data;
const header = { group: '', 'X-Token': token };

View File

@ -6,7 +6,7 @@
</template>
<script>
import { UrlConfig } from '@/scripts/ConstDic';
// import { UrlConfig } from '@/scripts/ConstDic';
import { listQuestionPage, deleteQuestion } from '@/api/questionBank.js';
import DialogDetail from './dialog-detail';
import { convertSheetToList } from '@/jmapNew/theme/parser/util.js';
@ -134,13 +134,15 @@ export default {
},
methods: {
doCreate() {
this.$router.push({path: `${UrlConfig.bank.questionCreate}`});
// this.$router.push({path: `${UrlConfig.bank.questionCreate}`});
this.$router.push({path: '/teaching/questionCreate'});
},
getCompanyName(companyId) {
return this.companyMap[companyId];
},
edit(index, row) {
this.$router.push({path: `${UrlConfig.bank.questionUpdate}/${row.id}`});
// this.$router.push({path: `${UrlConfig.bank.questionUpdate}/${row.id}`});
this.$router.push({path: `/teaching/questionUpdate/${row.id}`});
},
doDelete(index, row) {
@ -306,7 +308,8 @@ export default {
this.handleImport(f);
},
questionsRuleManage() {
this.$router.push({ path: `/system/questionsRuleManage`});
// this.$router.push({ path: `/system/questionsRuleManage`});
this.$router.push({ path: `/teaching/questionsRuleManage`});
},
exportTemplate() {
const wb = XLSX.utils.book_new();

View File

@ -101,7 +101,6 @@ export default {
try {
let res;
try {
debugger;
res = await getPublishMapInfo(this.mapId);
} catch (error) {
if (error.code == 30001 || error.code == 10007) {

View File

@ -0,0 +1,28 @@
<template>
<div class="content_box">
<span>本产品基于长安玖琏</span><span>城市轨道交通实训云平台开发</span>
<br><span>平台网址</span><a target="_blank" href="https://joylink.club/cbtc/login" style="color: #33F;text-decoration:underline;">https://joylink.club/cbtc/login</a>
</div>
</template>
<script>
export default {
name: 'BaseDevelopment',
data() {
return {
};
},
mounted() {
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.content_box{
position: absolute;
bottom: 10%;
right: 2%;
line-height: 20px;
font-size: 14px;
}
</style>

View File

@ -1,34 +0,0 @@
<template>
<div class="content_box">
<span>本产品基于长安玖琏</span><span v-if="!project.startsWith('design')">城市轨道交通实训云平台设计开发</span><span v-else>城市轨道交通设计云平台设计开发</span>
<br><span>实训平台网址</span><a target="_blank" href="https://joylink.club/cbtc/login" style="color: #33F;text-decoration:underline;">https://joylink.club/cbtc/login</a>
<br><span>设计平台网址</span><a target="_blank" href="https://joylink.club/cbtc/design/login" style="color: #33F;text-decoration:underline;">https://joylink.club/cbtc/design/login</a>
</div>
</template>
<script>
export default {
name: 'FloatPart',
data() {
return {
};
},
computed: {
project() {
return this.$route.path.split('/')[1];
}
},
mounted() {
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.content_box{
position: absolute;
bottom: 10%;
right: 2%;
line-height: 20px;
font-size: 14px;
}
</style>

View File

@ -1,262 +0,0 @@
<template>
<el-dialog
:title="title"
:visible.sync="dialogShow"
width="500px"
:before-close="doClose"
:z-index="9000"
:show-close="false"
:close-on-click-modal="false"
top="25vh"
>
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="110px" class="demo-ruleForm">
<el-form-item prop="type">
<template slot="label">
<span>找回途径</span>
</template>
<el-radio-group v-model="form.type" size="small">
<el-radio label="phone" border>手机号找回</el-radio>
<el-radio label="email" border>邮箱找回</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.type === 'email'" prop="email">
<template slot="label">
<span>&emsp;&emsp;</span>
</template>
<el-input v-model="form.email" size="small" style="width: 200px;" />
</el-form-item>
<el-form-item v-if="form.type === 'phone'" prop="phone">
<template slot="label">
<span>手机号</span>
</template>
<el-input v-model="form.phone" size="small" style="width: 200px;" />
</el-form-item>
<el-form-item label="密码:" prop="password">
<template slot="label">
<span>&emsp;&emsp;</span>
</template>
<el-input v-model="form.password" size="small" autocomplete="new-password" show-password style="width: 200px;" />
</el-form-item>
<el-form-item label="密码确认:" prop="repeatPassword">
<el-input v-model="form.repeatPassword" size="small" autocomplete="new-password" show-password style="width: 200px;" />
</el-form-item>
<el-form-item prop="vfCode">
<template slot="label">
<span>验证码</span>
</template>
<el-input v-model="form.vfCode" size="small" style="display: inline-block;width: 200px" />
<el-button
size="small"
type="primary"
style="margin-top: 10px; margin-right: 10px;"
:disabled="passWordCodeTime != 0"
@click="sendVfcode"
>
{{ $t('global.sendCode') }}
<span
v-if="passWordCodeTime"
>{{ passWordCodeTime }}</span>
</el-button>
</el-form-item>
<div style="display: flex;justify-content: space-around;">
<el-button type="primary" size="small" @click="submitForm()">找回</el-button>
<el-button size="small" @click="doClose()">返回登录</el-button>
</div>
</el-form>
</el-dialog>
</template>
<script>
import { findPassword, sendPhoneVfcode, sendEmailVfcode } from '@/api/management/user';
import md5 from 'js-md5';
import {clearInterval, setInterval} from 'timers';
export default {
name: 'ForgetPassword',
data() {
var validateEmail = (rule, value, callback) => {
const regu = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
const re = new RegExp(regu);
if (!re.test(value) ) {
callback(new Error('邮箱格式不正确'));
} else {
callback();
}
};
var validatePhone = (rule, value, callback) => {
const regu = /^1(3[0-9]|4[5,7]|5[0,1,2,3,5,6,7,8,9]|6[2,5,6,7]|7[0,1,7,8]|8[0-9]|9[1,8,9])\d{8}$/;
const re = new RegExp(regu);
if (!re.test(value)) {
callback(new Error('手机号格式不正确'));
} else {
callback();
}
};
var validatePassword = (rule, value, callback) => {
if (this.form.repeatPassword) {
this.$refs.ruleForm.validateField('repeatPassword');
}
callback();
};
var validateRepeatPassword = (rule, value, callback) => {
if (value !== this.form.password) {
callback(new Error('两次密码不相同,请确认密码'));
} else {
callback();
}
};
var validateVfCode = (rule, value, callback) => {
if (this.form.vfCode.length !== 4) {
callback(new Error('验证码长度错误'));
} else {
callback();
}
};
return {
dialogShow: false,
message: '',
operation: '',
title: '密码找回',
passWordTime: null,
form: {
type: 'phone',
phone: '',
email: '',
password: '',
repeatPassword: '',
vfCode: ''
},
passWordCodeTime: 0,
rules: {
phone: [
{ required: true, message: '请输入手机号', trigger: 'blur' },
{ validator: validatePhone, trigger: 'blur' }
],
email: [
{ required: true, message: '请输入邮箱', trigger: 'blur' },
{ validator: validateEmail, trigger: 'blur' }
],
password: [
{ required: true, message: '请输入密码', trigger: 'blur' },
{ validator: validatePassword, trigger: 'blur' },
{ min: 5, max: 20, message: '长度在 5 到 20 个字符', trigger: 'blur' }
],
repeatPassword: [
{ required: true, message: '请重复输入密码', trigger: 'blur' },
{ validator: validateRepeatPassword, trigger: 'blur' },
{ min: 5, max: 20, message: '长度在 5 到 20 个字符', trigger: 'blur' }
],
vfCode: [
{ required: true, message: '请输入验证码', trigger: 'blur' },
{ validator: validateVfCode, trigger: 'blur' }
]
}
};
},
computed: {
},
mounted() {
},
methods: {
doShow() {
this.form = {
type: 'phone',
phone: '',
email: '',
password: '',
repeatPassword: '',
vfCode: ''
};
this.dialogShow = true;
},
doClose() {
this.dialogShow = false;
this.form = {
type: 'phone',
phone: '',
email: '',
password: '',
repeatPassword: '',
vfCode: ''
};
this.$refs.ruleForm.clearValidate();
},
async sendVfcode() {
const reguEmail = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
const reguPhone = /^1(3[0-9]|4[5,7]|5[0,1,2,3,5,6,7,8,9]|6[2,5,6,7]|7[0,1,7,8]|8[0-9]|9[1,8,9])\d{8}$/;
const rePhone = new RegExp(reguPhone);
const reEmail = new RegExp(reguEmail);
if (this.form.type === 'phone' && this.form.phone && rePhone.test(this.form.phone)) {
const random = Math.floor(Math.random() * 10000 + 1);
const timeCount = Date.parse(new Date()) / 1000;
const pass = `${timeCount}86${this.form.phone}${random}`;
const param = {
mobile: this.form.phone,
nationCode: '86',
rd: random + '',
time: timeCount + '',
token: md5(pass)
};
try {
this.passWordCodeTime = 60;
this.passWordTime = setInterval(() => {
this.passWordCodeTime--;
if (this.passWordCodeTime <= 0) {
this.passWordCodeTime = 0;
clearInterval(this.mobileTime);
this.passWordTime = null;
}
}, 1000);
await sendPhoneVfcode(param);
} catch (error) {
this.$message.info(this.$t('global.codeFaile'));
}
} else if (this.form.type === 'email' && this.form.email && reEmail.test(this.form.email)) {
const param = { email: this.form.email };
try {
this.passWordCodeTime = 60;
this.passWordTime = setInterval(() => {
this.passWordCodeTime--;
if (this.passWordCodeTime <= 0) {
this.passWordCodeTime = 0;
clearInterval(this.mobileTime);
this.passWordTime = null;
}
}, 1000);
await sendEmailVfcode(param);
} catch (error) {
this.$message.info(this.$t('global.codeFaile'));
}
} else {
this.$refs.ruleForm.validateField('email');
this.$refs.ruleForm.validateField('phone');
}
},
submitForm() {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
const data = { email: this.form.email, mobile: this.form.phone, newPwd: md5(this.form.password), vfCode: this.form.vfCode };
findPassword(data).then(resp => {
this.$message.success('设置密码成功!' );
this.doClose();
}).catch(error => {
this.$message.error('设置密码失败:' + error.message);
});
}
});
}
}
};
</script>
<style scoped>
.confirm-control-speed .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
.ningbo-01__systerm .el-dialog .el-button{
display: block;
margin: 0 auto;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,315 @@
<template>
<el-form
ref="loginForm"
v-loading="loading"
class="login-form"
:model="loginForm"
:rules="loginRules"
label-position="left"
>
<el-form-item prop="username" class="item_form_box">
<span class="svg-container svg-container_login">
<svg-icon icon-class="user" />
</span>
<el-input
v-model="loginForm.username"
name="username"
type="text"
:placeholder="this.$t('login.mobilePhoneNumberOrEmail')"
@keyup.enter.native="goToNext"
/>
</el-form-item>
<el-form-item prop="password" class="item_form_box item_form_password">
<span class="svg-container">
<svg-icon icon-class="password" />
</span>
<el-input
ref="password"
v-model="loginForm.password"
name="password"
:type="pwdType"
:placeholder="this.$t('login.password')"
@keyup.enter.native="handleLogin"
/>
<span class="show-pwd" @click="showPwd">
<svg-icon v-if="pwdDisplay" icon-class="eye" />
<svg-icon v-else icon-class="eye-open" />
</span>
</el-form-item>
<div class="tip-message">{{ tipsMsg }}</div>
<div style="display: inline-block;width: 100%;margin-bottom: 10px;">
<div style="display:inline-block">
<el-checkbox v-model="isAutoLogin">{{ $t('login.autoLogin') }}</el-checkbox>
<!-- <el-checkbox v-if="project === 'cgy'" v-model="teacherLogin">教师登录</el-checkbox> -->
</div>
<el-popover
placement="right"
title=""
width="200"
trigger="hover"
class="popover_box"
>
<div>
<img :src="QCode" alt="" style="width: 100px; height: 100px; display: block; margin:0 auto;">
<div style="margin-top: 10px; word-break: break-word;text-align: center;">
{{ $t('login.perfectInformation') }}
</div>
</div>
<div slot="reference">
{{ $t('login.unableToLogin') }}
</div>
</el-popover>
<!-- <div v-if="registerCodeList.includes(project)" class="popover_box active" @click="registerUser">
注册账号
</div> -->
</div>
<el-form-item>
<el-button type="primary" style="width:100%;" @click.native.prevent="handleLogin">
{{ $t('login.login') }}
</el-button>
</el-form-item>
<!-- <div style="display: inline-block;width: 100%;">
<div class="popover_box active" style="bottom: 50px;" @click="forgetPassword">
忘记密码
</div>
</div> -->
</el-form>
</template>
<script>
// export const RegisterCodeList = ['cgy', 'designcgy'];
import QCode from '@/assets/erCode.jpg';
import md5 from 'js-md5';
import Cookies from 'js-cookie';
// getLoginWmurl, checkLoginStatus, getLoginInfo,
import { getOrgList, selectOrgnization } from '@/api/login';
// import ForgetPassword from './forgetPassword';
export default {
name:'NormalLogin',
// Register,
// components: { ForgetPassword },
props: {
project: {
type: String,
default: () => {
return '';
}
}
// syncLogin:{
// type: Boolean,
// default: () => {
// return false;
// }
// }
},
data() {
const validateName = (rule, value, callback) => {
if (value) {
callback();
} else {
callback(new Error('请输入用户名'));
}
};
const validatePass = (rule, value, callback) => {
if (value.length < 5) {
callback(new Error(this.$t('login.passwordHint')));
} else {
callback();
}
};
return {
QCode: QCode,
loading:false,
pwdDisplay: true,
pwdType: 'password',
cookiesName: 'UserName',
cookiesToken: 'UserToken',
isAutoLogin: false,
tipsMsg: '',
// teacherLogin: false,
loginForm: {
username: '',
password: ''
},
loginRules: {
username: [{ required: true, trigger: 'blur', validator: validateName }],
password: [{ required: true, trigger: 'blur', validator: validatePass }]
}
};
},
// created() {
// },
watch: {
'project': function(val) {
if (Cookies.get(this.cookiesName) && Cookies.get(this.cookiesToken)) {
const model = {
username: Cookies.get(this.cookiesName),
password: Cookies.get(this.cookiesToken),
project: this.project
};
model.type = 'class';
this.loginAction(model);
}
}
},
methods:{
showPwd() {
if (this.pwdType === 'password') {
this.pwdDisplay = false;
this.pwdType = '';
} else {
this.pwdType = 'password';
this.pwdDisplay = true;
}
},
loginAction(model) {
this.$store
.dispatch('Login', model)
.then(() => {
this.$store.dispatch('SetAccount', model.username);
// this.handleLoginSucessRoute();
this.checkOrgnizationInfo();
})
.catch(error => {
console.log(error);
// if (error.code === '30001') {
// this.tipsMsg = this.$t('login.accountOrPasswordIsIncorrect');
// } else if (error.code == '10001') {
// this.tipsMsg = '';
// } else if (error.code == '10013' || error.code == '10014') {
// this.tipsMsg = '';
// } else {
// this.tipsMsg = error.message;
// }
this.tipsMsg = error.message;
this.loading = false;
setTimeout(() => {
this.tipsMsg = '';
}, 5000);
});
},
checkOrgnizationInfo() {
getOrgList().then(resp => {
const orgList = resp.data;
let orgId = '';
if (orgList.length < 2) {
if (orgList.length === 1) {
orgId = orgList[0].orgId;
selectOrgnization(orgId);
}
this.handleLoginSucessRoute();
} else {
// this.showOrgSelect(orgList).then(this.handleLoginSucessRoute());
}
});
},
handleLoginSucessRoute() {
this.loading = false;
this.tipsMsg = '';
console.log(this.path, '00000000000');
// path: '/trainingPlatform',
const path = '/simulation/simulationIndex';
// if()
this.$router.push({ path: path });
},
//
handleLogin() {
this.$refs.loginForm.validate(valid => {
if (valid) {
const model = Object.assign({}, this.loginForm);
model.password = md5(model.password);
model.type = 'class';
model.project = this.project;
this.loading = true;
if (this.isAutoLogin) {
Cookies.set(this.cookiesName, model.username, { expires: 2 });
Cookies.set(this.cookiesToken, model.password, { expires: 2 });
}
this.loginAction(model);
} else {
console.log('error submit!!');
return false;
}
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scope>
$bg: #fff;
$dark_gray: #889aa4;
.login-form .el-form-item {
background: #fff !important;
border: 1px solid rgba(0, 0, 0, 0.1) !important;
.el-input {
height: 40px;
width: 85%;
background: #fff;
input {
background: #fff !important;
border: 0px;
-webkit-appearance: none;
border-radius: 0px;
padding: 8px 9px 7px 5px;
color: #000;
height: 100%;
&:-webkit-autofill {
box-shadow: 0 0 0px 1000px $bg inset !important;
-webkit-text-fill-color: #000 !important;
}
}
}
}
.login-form {
width: 440px;
padding: 0 50px;
}
.item_form_box {
border: 1px solid #ccc;
border-radius: 5px;
color: #454545;
}
.item_form_password {
margin-bottom: 10px;
}
.tip-message {
color: #f56c61;
padding: 5px;
font-size: 12px;
height: 23px;
margin-bottom: 10px;
}
.svg-container {
padding-left: 14px;
color: $dark_gray;
vertical-align: middle;
width: 30px;
display: inline-block;
&_login {
font-size: 16px;
}
}
.popover_box {
position: absolute;
right: 80px;
bottom: 124px;
cursor: pointer;
color: #225592;
font-size: 14px;
}
.active:hover {
color: #409eff;
}
.show-pwd {
position: absolute;
right: 10px;
top: 3px;
font-size: 16px;
color: $dark_gray;
cursor: pointer;
user-select: none;
}
</style>

View File

@ -1,42 +0,0 @@
<template>
<el-dialog center :visible.sync="show" :close-on-click-modal="false" :show-close="false" title="请选择要登录的组织">
<div class="formWrapper">
<el-select v-model="selected" placeholder="请选择">
<el-option v-for="option in orgList" :key="option.orgId" :label="option.name" :value="option.orgId" />
</el-select>
</div>
<el-button slot="footer" primary size="small" @click="confirmSelect">确认</el-button>
</el-dialog>
</template>
<script>
export default {
name: 'OrgSelect',
data() {
return {
show: false,
orgList: [],
selected: ''
}
},
methods: {
confirmSelect() {
this.$emit('select', this.selected)
},
doShow(orgList) {
this.orgList = orgList
this.show = true
},
doClose() {
this.show = false
}
}
}
</script>
<style lang="scss" scoped>
.formWrapper {
display: flex;
justify-content: center;
}
</style>

View File

@ -1,158 +0,0 @@
<template>
<el-dialog
:title="title"
:visible.sync="dialogShow"
width="500px"
:before-close="doClose"
:z-index="9000"
:show-close="false"
:close-on-click-modal="false"
top="25vh"
>
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="110px" class="demo-ruleForm">
<el-form-item prop="nickname">
<template slot="label">
<span>&emsp;&emsp;</span>
</template>
<el-input v-model="form.nickname" autocomplete="new-password" />
</el-form-item>
<el-form-item prop="email">
<template slot="label">
<span>邮箱(账号)</span>
</template>
<el-input v-model="form.email" />
</el-form-item>
<el-form-item label="密码:" prop="password">
<template slot="label">
<span>&emsp;&emsp;</span>
</template>
<el-input v-model="form.password" autocomplete="new-password" show-password />
</el-form-item>
<el-form-item label="密码确认:" prop="repeatPassword">
<el-input v-model="form.repeatPassword" autocomplete="new-password" show-password />
</el-form-item>
<div style="display: flex;justify-content: space-around;">
<el-button type="primary" @click="submitForm()">立即创建</el-button>
<el-button @click="doClose()">返回登录</el-button>
</div>
</el-form>
</el-dialog>
</template>
<script>
import { registerUser } from '@/api/management/user';
import { ProjectCode } from '@/scripts/ProjectConfig';
import { getSessionStorage } from '@/utils/auth';
import md5 from 'js-md5';
export default {
name: 'Register',
data() {
var validateEmail = (rule, value, callback) => {
const regu = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
const re = new RegExp(regu);
if (!re.test(value) ) {
callback(new Error('邮箱格式不正确'));
} else {
callback();
}
};
var validatePassword = (rule, value, callback) => {
if (this.form.repeatPassword) {
this.$refs.ruleForm.validateField('repeatPassword');
}
callback();
};
var validateRepeatPassword = (rule, value, callback) => {
if (value !== this.form.password) {
callback(new Error('两次密码不相同,请确认密码'));
} else {
callback();
}
};
return {
dialogShow: false,
message: '',
operation: '',
title: '账号注册',
form: {
email: '',
nickname: '',
password: '',
repeatPassword: ''
},
rules: {
email: [
{ required: true, message: '请输入邮箱', trigger: 'blur' },
{ validator: validateEmail, trigger: 'blur' }
],
nickname: [
{ required: true, message: '请输入昵称', trigger: 'blur' },
{ min: 1, max: 32, message: '长度在 1 到 32 个字符', trigger: 'blur' }
],
password: [
{ required: true, message: '请输入密码', trigger: 'blur' },
{ validator: validatePassword, trigger: 'blur' },
{ min: 5, max: 20, message: '长度在 5 到 20 个字符', trigger: 'blur' }
],
repeatPassword: [
{ required: true, message: '请重复输入密码', trigger: 'blur' },
{ validator: validateRepeatPassword, trigger: 'blur' },
{ min: 5, max: 20, message: '长度在 5 到 20 个字符', trigger: 'blur' }
]
}
};
},
computed: {
},
mounted() {
},
methods: {
doShow() {
this.form = {
email: '',
nickname: '',
password: '',
repeatPassword: ''
};
this.dialogShow = true;
},
doClose() {
this.dialogShow = false;
this.form = {
email: '',
nickname: '',
password: '',
repeatPassword: ''
};
this.$refs.ruleForm.clearValidate();
},
submitForm() {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
const project = getSessionStorage('project');
const data = { email: this.form.email, nickname: this.form.nickname, password: md5(this.form.password), source: ProjectCode[project] || '' };
registerUser(data).then(resp => {
this.$message.success('账号注册成功!' );
this.doClose();
}).catch(error => {
this.$message.error('账号注册失败:' + error.message);
});
}
});
}
}
};
</script>
<style scoped>
.confirm-control-speed .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
.ningbo-01__systerm .el-dialog .el-button{
display: block;
margin: 0 auto;
}
</style>

View File

@ -59,7 +59,6 @@ export default {
sessionId: '',
checkLogin: null,
qrcodeClassName: 'login-qrcode',
modelType: 'class',
loginClient:'LianKeTang'
};
},
@ -110,7 +109,7 @@ export default {
//
debugger;
self.$store
.dispatch('QrLoginSetting', { key: 'SET_TOKEN', value: response.data.token, type: this.modelType })
.dispatch('QrLoginSetting', { key: 'SET_TOKEN', value: response.data.token, type: 'class' })
.then(() => {
//
self.clearTimer(self.checkLogin);
@ -172,4 +171,18 @@ $qrbg: #fff;
line-height: 30px;
}
}
.el-loading-spinner i {
font-size: 100px;
}
.el-loading-spinner .el-loading-text {
font-size: 24px;
}
.login-code-box {
.el-loading-spinner i {
font-size: 14px;
}
.el-loading-spinner .el-loading-text {
font-size: 14px;
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -83,21 +83,21 @@ export default {
methods:{
clickMenu(val) {
if (val.index === '2-1') {
this.$router.replace('/info/organization/lessonManage');
this.$router.replace('/teaching/organization/lessonManage');
} else if (val.index === '2-2') {
this.$router.replace('/info/organization/draftLessonManage');
this.$router.replace('/teaching/organization/draftLessonManage');
} else if (val.index === '1') {
this.$router.replace('/info/organization/classManage');
this.$router.replace('/teaching/organization/classManage');
} else if (val.index === '3') {
this.$router.replace('/info/organization/examManage');
this.$router.replace('/teaching/organization/examManage');
} else if (val.index === '4') {
this.$router.replace('/info/organization/ruleManage');
this.$router.replace('/teaching/organization/ruleManage');
} else if (val.index === '5') {
this.$router.replace('/info/organization/studentManage');
this.$router.replace('/teaching/organization/studentManage');
} else if (val.index === '6') {
this.$router.replace('/info/organization/trainingManage');
this.$router.push('/teaching/design/home');
} else if (val.index === '7') {
this.$router.replace('/info/organization/theoryManage');
this.$router.replace('/teaching/organization/theoryManage');
}
},
back() {

View File

@ -0,0 +1,258 @@
<template>
<el-dialog width="80%" :title="innerTitle" :visible.sync="innerVisible" center append-to-body>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 98%;margin-left:1%;margin-top:20px;" />
</el-dialog>
</template>
<script>
import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie';
import { pageQueryTrainingNew } from '@/api/jmap/training';
import { getPublishMapListOnline } from '@/api/jmap/map';
import { getCmdList } from '@/api/management/dictionary';
import { getTrainingOperateTypeMap } from '@/scripts/ConstDic';
export default {
name: 'TrainingGeneration',
components: {
},
data() {
return {
innerVisible: false,
innerTitle: '实训选择',
mapIdList: [],
trainingTypeList: [],
trainingOperateTypeMap: {
Switch: [],
Section: [],
Signal: [],
Stand: [],
Station: [],
ControlConvertMenu: [],
LimitControl: [],
TrainWindow: []
},
trainingTypeMap: {},
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '120px',
initLoadCallback: this.initForm,
queryObject: {
prdType: {
type: 'select',
label: this.$t('lesson.prdType'),
change: this.prdChoose,
config: {
data: []
}
},
type: {
type: 'select',
label: this.$t('lesson.trainingType'),
change: this.typeChoose,
config: {
data: []
}
},
operateType: {
type: 'select',
label: this.$t('lesson.operationType'),
config: {
data: []
}
},
name: {
type: 'text',
label: this.$t('lesson.trainingName')
}
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: this.$t('lesson.trainingName'),
prop: 'name'
},
{
title: this.$t('lesson.prdType'),
prop: 'prdType',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.prdType, this.prdTypeList, ['value', 'label']); },
tagType: (row) => { return 'success'; }
},
{
title: this.$t('lesson.trainingType'),
prop: 'type',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.type, this.trainingTypeList, ['value', 'label']); },
tagType: (row) => { return 'success'; }
},
{
title: this.$t('lesson.operationType'),
prop: 'operateType',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.operateType, this.trainingOperateTypeMap[row.type], ['value', 'label']); },
tagType: (row) => { return 'success'; }
},
{
title: this.$t('lesson.minDuration'),
prop: 'minDuration'
},
{
title: this.$t('lesson.maxDuration'),
prop: 'maxDuration'
},
{
title: this.$t('lesson.remarks'),
prop: 'remarks'
},
{
type: 'button',
title: this.$t('global.operate'),
width: '250',
buttons: [
{
name: '选中',
handleClick: this.chooseTraining,
type: ''
}
]
}
],
actions: []
},
currentModel: {}
};
},
computed:{
prdTypeList() {
const productTypeList = ConstConfig.ConstSelect.prdType;
return Cookies.get('user_lang') == 'en'
? productTypeList.map(elem => { return { value: elem.value, label: elem.enlabel }; })
: productTypeList.map(elem => { return { value: elem.value, label: elem.label }; });
}
},
async created() {
await this.loadInitData();
this.typeChoose();
},
mounted() {
},
beforeDestroy() {
},
methods: {
doShow() {
this.innerVisible = true;
},
async loadInitData() {
this.mapIdList = [];
this.queryForm.queryObject.prdType.config.data = [];
getPublishMapListOnline().then(response => {
this.mapIdList = response.data;
});
this.queryForm.queryObject.prdType.config.data = this.prdTypeList;
this.trainingOperateTypeMap = getTrainingOperateTypeMap();
},
chooseTraining(index, row) {
this.$emit('choose', row);
this.innerVisible = false;
},
async initForm(form) {
if (form) {
await this.prdChoose(form, false);
await this.typeChoose(form, false);
}
},
async prdChoose(form, isClean = true) {
console.log('-------------');
this.trainingTypeMap = {};
const lineCode = this.$route.query.lineCode;
const res = await getCmdList(lineCode, {prdType:form.prdType});
const trainingOperateList = [];
const trainingOperateConfigList = [];
const operateTypeMap = {
Switch: [],
Section: [],
Signal: [],
Stand: [],
Station: [],
ControlConvertMenu: [],
LimitControl: [],
TrainWindow: [],
Driver: []
};
if (isClean) {
form.type = '';
form.operateType = '';
}
this.queryForm.queryObject.type.config.data = [];
this.queryForm.queryObject.operateType.config.data = [];
if (res && res.code === 200) {
res.data.forEach(item => {
if (this.trainingOperateTypeMap[item.operateObject]) {
this.trainingOperateTypeMap[item.operateObject].forEach(ele => {
if (ele.value == item.operate && !this.checkIncludes(operateTypeMap[item.operateObject], ele)) {
operateTypeMap[item.operateObject].push(ele);
}
});
}
if (!trainingOperateList.includes(item.operateObject)) {
trainingOperateList.push(item.operateObject);
const objectLabel = ConstConfig.ConstSelect.trainingDeviceType[item.operateObject] || {};
trainingOperateConfigList.push({value: item.operateObject, label: Cookies.get('user_lang') == 'en' ? objectLabel.enlabel : objectLabel.label});
}
});
this.queryForm.queryObject.type.config.data = trainingOperateConfigList;
this.trainingTypeList = trainingOperateConfigList;
this.trainingTypeMap = operateTypeMap;
} else {
this.$message.error(this.$t('error.failedToObtainTrainingType'));
}
},
async typeChoose(form, isClean = true) {
this.queryForm.queryObject.operateType.config.data = [];
if (isClean && form) {
form.operateType = '';
}
if (form && form.type && this.trainingTypeMap[form.type]) {
this.trainingTypeMap[form.type].forEach(elem => {
this.queryForm.queryObject.operateType.config.data.push({ value: elem.value, label: elem.label });
});
}
},
checkIncludes(list, obj) {
let flag = false;
list.forEach(item => {
if (item.value === obj.value) {
flag = true;
}
});
return flag;
},
reloadTable() {
this.queryList.reload();
},
queryFunction(params) {
params['mapId'] = this.$route.query.mapId;
return pageQueryTrainingNew(params);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.draft {
width: 400px;
text-align: center;
margin: 20px auto;
}
</style>

View File

@ -0,0 +1,257 @@
<template>
<el-dialog
width="30%"
:title="title"
:visible.sync="visible"
center
>
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="120px" class="demo-ruleForm">
<el-form-item label="子系统名称:" prop="name">
<el-input v-model="ruleForm.name" style="width: 200px;" />
</el-form-item>
<el-form-item label="系统:" prop="type">
<el-select v-model="ruleForm.type" placeholder="请选择类型">
<el-option label="地铁CBTC" value="METRO" />
<el-option label="大铁CTC" value="RAILWAY" />
<el-option label="应急调度" value="EMERGENCY" />
</el-select>
</el-form-item>
<el-form-item label="使用方式:" prop="usage">
<el-select v-model="ruleForm.usage" placeholder="请选择使用方式">
<el-option label="单角色仿真" value="SINGLE_MEMBER" />
<el-option label="单客户端仿真" value="SINGLE_CLIENT" />
<el-option label="综合演练" value="JOINT" />
</el-select>
</el-form-item>
<el-form-item v-if="ruleForm.usage === 'SINGLE_MEMBER' || ruleForm.usage === 'JOINT'" label="角色:" prop="memberType">
<el-select v-model="ruleForm.memberType" placeholder="请选择角色">
<el-option v-for="option in roleList" :key="option.value" :label="option.label" :value="option.value" />
</el-select>
</el-form-item>
<el-form-item v-if="stationRoles.includes(ruleForm.memberType)" label="车站:" prop="deviceCode">
<el-select v-model="ruleForm.deviceCode" placeholder="请选择设备">
<el-option v-for="option in stationList" :key="option.code" :label="option.name" :value="option.code" />
</el-select>
</el-form-item>
<el-form-item v-if="ruleForm.memberType === 'DRIVER'" label="列车:" prop="deviceCode">
<el-select v-model="ruleForm.deviceCode" placeholder="请选择设备">
<el-option v-for="option in trainList" :key="option.code" :label="option.code" :value="option.code" />
</el-select>
</el-form-item>
<el-form-item v-if="ruleForm.usage === 'SINGLE_CLIENT'" label="客户端:" prop="client">
<el-select v-model="ruleForm.client" placeholder="请选择使用客户端">
<el-option label="联锁" value="INTERLOCK" />
<el-option label="大屏" value="BIG_SCREEN" />
<el-option label="综合监控" value="ISCS" />
</el-select>
</el-form-item>
<el-form-item label="功能:" prop="function">
<el-select v-model="ruleForm.function" placeholder="请选择功能">
<el-option label="大客流" value="LPF" />
<el-option label="实训室" value="TRAINING_ROOM" />
<el-option label="实训设计" value="TRAINING_DESIGN" />
<el-option label="实训" value="TRAINING" />
<el-option label="考试" value="EXAM" />
</el-select>
</el-form-item>
<el-form-item v-if="ruleForm.function === 'TRAINING'" label="实训:" prop="trainingName">
<div style="display: flex;">
<div style="width: 200px;">{{ ruleForm.trainingName? ruleForm.trainingName: '-' }}</div>
<el-button style="margin-left: 10px;" type="primary" size="mini" @click="handleChoose">选择</el-button>
</div>
</el-form-item>
<el-form-item label="描述:" prop="desc">
<el-input
v-model="ruleForm.desc"
type="textarea"
:rows="2"
placeholder="请输入内容"
/>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="close"> </el-button>
<el-button type="primary" @click="commit"> </el-button>
</span>
<choose-training ref="chooseTraining" @choose="choose" />
</el-dialog>
</template>
<script>
import { updateMapSystem, createMapSystem } from '@/api/trainingPlatform';
import { getStationListNeedAttendant } from '@/api/jmap/map';
import ChooseTraining from './chooseTraining';
export default {
name: 'EditSubsystem',
components: {
ChooseTraining
},
data() {
return {
visible: false,
title: '',
mapSystemId: '',
mapId: '',
stationList: [],
trainList: [],
stationRoles: ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER', 'STATION_SWITCH_MAN',
'STATION_FACILITATOR', 'STATION_WORKER', 'TRAIN_MASTER'],
rules: {
name: [
{ required: true, message: '请输入子系统名称', trigger: 'blur' }
],
type: [
{ required: true, message: '请选择子系统类型', trigger: 'change' }
],
usage: [
{ required: true, message: '请选择使用方式', trigger: 'change' }
]
},
roleList: [
{label: '行调', value: 'DISPATCHER'},
{label: '行值', value: 'STATION_SUPERVISOR'},
{label: '司机', value: 'DRIVER'},
{label: '通号', value: 'MAINTAINER'},
{label: '车辆段信号楼', value: 'DEPOT_DISPATCHER'},
{label: '停车场信号楼', value: 'PARKING_LOT_SIGNAL_BUILDING'},
{label: '车站助理', value: 'STATION_ASSISTANT'},
{label: '车站站长', value: 'STATION_MASTER'},
{label: '车站信号员', value: 'STATION_SIGNALER'},
{label: '车站客运员', value: 'STATION_PASSENGER'},
{label: '车站扳道员', value: 'STATION_SWITCH_MAN'},
{label: '车站引导员', value: 'STATION_FACILITATOR'},
{label: '车站工务工', value: 'STATION_WORKER'},
{label: '车务段段长', value: 'TRAIN_MASTER'}
],
ruleForm: {
name: '',
type: '',
usage: '',
memberType: '',
deviceCode: '',
client: '',
function: '',
trainingId: '',
trainingName: ''
},
clientList: [
{ label: '中心ATS工作站', value: 'C_ATS' },
{ label: '中心ATS大屏', value: 'C_ATS_BS' },
{ label: '中心PA系统', value: 'C_PA' },
{ label: '中心视频监控系统', value: 'C_CCTV' },
{ label: '现地ATS工作站', value: 'L_ATS' },
{ label: '本地控制工作站', value: 'LCW' },
{ label: '现地视频监控系统', value: 'L_CCTV' },
{ label: '现地PA系统', value: 'L_PA' },
{ label: '调度台终端', value: 'GPC' },
{ label: '联锁工作站', value: 'IPC' },
{ label: '车务终端', value: 'STPC' },
{ label: '车务管理终端', value: 'DMP' }
]
};
},
mounted() {
this.stationList = [];
getStationListNeedAttendant(this.$route.query.mapId).then(resp => {
if (resp.data && resp.data.length) {
this.stationList = resp.data;
}
}).catch(() => {
this.$message.error('获取车站列表失败');
});
},
methods: {
doShow(row) {
if (row && row.id) {
this.mapSystemId = row.id;
this.ruleForm.name = row.name;
this.ruleForm.desc = row.desc;
this.ruleForm.type = row.paramVO.type;
this.ruleForm.usage = row.paramVO.usageInfo.usage;
this.ruleForm.client = row.paramVO.usageInfo.param.client;
this.ruleForm.memberType = row.paramVO.usageInfo.param.memberType;
this.ruleForm.deviceCode = row.paramVO.usageInfo.param.deviceCode;
const functionList = Object.keys(row.paramVO.functionMap);
if (functionList && functionList.length) {
this.ruleForm.function = functionList[0];
}
this.title = '子系统修改';
} else {
this.title = '子系统创建';
}
this.visible = true;
},
close() {
this.mapSystemId = '';
this.ruleForm = {
name: '',
type: '',
usage: '',
memberType: '',
deviceCode: '',
client: '',
function: '',
trainingId: '',
trainingName: ''
};
this.visible = false;
this.$refs.ruleForm.resetFields();
},
commit() {
const functionMap = {};
if (this.ruleForm.function) {
functionMap[this.ruleForm.function] = this.ruleForm.function;
}
const data = {
mapId: this.mapId,
name: this.ruleForm.name,
desc: this.ruleForm.desc,
paramVO: {
type: this.ruleForm.type,
usageInfo: {
usage: this.ruleForm.usage,
param: {
client: this.ruleForm.client,
memberType: this.ruleForm.memberType,
deviceCode: this.ruleForm.deviceCode
}
},
functionMap: functionMap
}
};
if (this.innerTitle === '创建子系统') {
createMapSystem(data).then(resp => {
this.visible = false;
this.$emit('tableReload');
this.$message.success('创建子系统成功!');
this.close();
}).catch(() => {
this.$message.error('创建子系统失败!');
});
} else {
data.id = this.mapSystemId;
updateMapSystem(data).then(resp => {
this.visible = false;
this.$emit('tableReload');
this.close();
this.$message.success('修改子系统成功!');
}).catch(() => {
this.$message.error('修改子系统失败!');
});
}
},
handleChoose() {
this.$refs.chooseTraining.doShow();
},
choose(data) {
this.ruleForm.trainingId = data.id;
this.ruleForm.trainingName = data.name;
}
}
};
</script>
<style scoped>
</style>

View File

@ -7,7 +7,6 @@
<local-map ref="localMap" />
<export-map ref="exportMap" />
<map-sort ref="mapSort" />
<subsystem-manage ref="subsystemManage" />
<!--<input ref="files" type="file" class="file_box" accept=".json, application/json" style="display: none" @change="importf">-->
<el-dialog
title="一键领取权限"
@ -40,7 +39,6 @@ import MapSort from './mapSort';
import { superAdmin } from '@/router/index';
import { ProjectList } from '@/scripts/ProjectConfig';
import { getPermissionQuickly } from '@/api/management/author';
import SubsystemManage from './subsystem';
export default {
name: 'PublishMap',
@ -50,8 +48,7 @@ export default {
CopyMap,
LocalMap,
ExportMap,
MapSort,
SubsystemManage
MapSort
},
data() {
return {
@ -474,7 +471,7 @@ export default {
this.dialogVisible = true;
},
subsystemManage(index, row) {
this.$refs.subsystemManage.doShow(row);
this.$router.push({path:'/system/lineDataManage/subsystem', query: {mapId: row.id, lineCode: row.lineCode}});
},
permissionCommit() {
getPermissionQuickly(this.mapId, this.permissionNum).then(resp => {

View File

@ -1,201 +1,120 @@
<template>
<el-dialog
title="子系统管理"
:visible.sync="dialogVisible"
width="60%"
center
>
<el-button type="primary" size="small" style="position: relative;left: 90%;margin-bottom: 10px;" @click="handleAddSubsystem">新增</el-button>
<el-table v-loading="loading" :data="tableData" border style="width: 100%">
<el-table-column prop="name" label="名称" />
<el-table-column prop="simType" label="类型">
<template slot-scope="scope">
<span>{{ simTypeMap[scope.row.simType] }}</span>
</template>
</el-table-column>
<el-table-column prop="simUsage" label="使用方式">
<template slot-scope="scope">
<span>{{ simUsageMap[scope.row.simUsage] }}</span>
</template>
</el-table-column>
<el-table-column prop="desc" label="描述" width="400px" />
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="updateRow(scope.row)">更新</el-button>
<el-button type="text" size="small" @click="deleteRow(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog
width="30%"
:title="innerTitle"
:visible.sync="innerVisible"
center
append-to-body
>
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="120px" class="demo-ruleForm">
<el-form-item label="子系统名称:" prop="name">
<el-input v-model="ruleForm.name" style="width: 200px;" />
</el-form-item>
<el-form-item label="类型:" prop="type">
<el-select v-model="ruleForm.type" placeholder="请选择类型">
<el-option label="地铁" value="METRO" />
<el-option label="铁路/大铁" value="RAILWAY" />
<el-option label="应急调度" value="EMERGENCY" />
</el-select>
</el-form-item>
<el-form-item label="使用方式:" prop="usage">
<el-select v-model="ruleForm.usage" placeholder="请选择使用方式">
<el-option label="单角色仿真" value="SINGLE_MEMBER" />
<el-option label="单客户端仿真" value="SINGLE_CLIENT" />
<el-option label="综合演练" value="JOINT" />
</el-select>
</el-form-item>
<el-form-item v-if="ruleForm.usage === 'SINGLE_MEMBER' || ruleForm.usage === 'JOINT'" label="角色:" prop="memberType">
<el-select v-model="ruleForm.memberType" placeholder="请选择角色">
<el-option v-for="option in roleList" :key="option.value" :label="option.label" :value="option.value" />
</el-select>
</el-form-item>
<el-form-item v-if="stationRoles.includes(ruleForm.memberType)" label="车站:" prop="deviceCode">
<el-select v-model="ruleForm.deviceCode" placeholder="请选择设备">
<el-option v-for="option in stationList" :key="option.code" :label="option.name" :value="option.code" />
</el-select>
</el-form-item>
<el-form-item v-if="ruleForm.memberType === 'DRIVER'" label="列车:" prop="deviceCode">
<el-select v-model="ruleForm.deviceCode" placeholder="请选择设备">
<el-option v-for="option in trainList" :key="option.code" :label="option.code" :value="option.code" />
</el-select>
</el-form-item>
<el-form-item v-if="ruleForm.usage === 'SINGLE_CLIENT'" label="客户端:" prop="client">
<el-select v-model="ruleForm.client" placeholder="请选择使用客户端">
<el-option label="联锁" value="INTERLOCK" />
<el-option label="大屏" value="BIG_SCREEN" />
<el-option label="综合监控" value="ISCS" />
</el-select>
</el-form-item>
<el-form-item label="功能:" prop="function">
<el-select v-model="ruleForm.function" placeholder="请选择功能">
<el-option label="大客流" value="LPF" />
</el-select>
</el-form-item>
<el-form-item label="描述:" prop="desc">
<el-input
v-model="ruleForm.desc"
type="textarea"
:rows="2"
placeholder="请输入内容"
/>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="closeInner"> </el-button>
<el-button type="primary" @click="commit"> </el-button>
</span>
</el-dialog>
</el-dialog>
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<edit-subsystem ref="editSubsystem" />
</div>
</template>
<script>
import { getStationListNeedAttendant } from '@/api/jmap/map';
import { queryMapSystemList, updateMapSystem, createMapSystem, deleteMapSystem } from '@/api/trainingPlatform';
export default {
name: 'Subsystem',
data() {
return {
dialogVisible: false,
tableData: [],
mapId: '',
loading: false,
innerVisible: false,
mapSystemId: '',
stationList: [],
trainList: [],
innerTitle: '',
ruleForm: {
name: '',
type: '',
usage: '',
memberType: '',
deviceCode: '',
client: '',
function: ''
},
simTypeMap: {
METRO: '地铁',
RAILWAY: '铁路/大铁',
import { queryMapSystemPaged, deleteMapSystem } from '@/api/trainingPlatform';
import { getPublishMapListOnline } from '@/api/jmap/map';
import EditSubsystem from './editSubsystem';
const simTypeMap = {
METRO: '地铁CBTC',
RAILWAY: '大铁CTC',
EMERGENCY: '应急调度'
},
simUsageMap: {
};
const simUsageMap = {
SINGLE_MEMBER: '单角色仿真',
SINGLE_CLIENT: '单客户端仿真',
JOINT: '综合演练'
};
export default {
name: 'PublishMap',
components: {
EditSubsystem
},
stationRoles: ['STATION_SUPERVISOR', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER', 'STATION_SWITCH_MAN',
'STATION_FACILITATOR', 'STATION_WORKER', 'TRAIN_MASTER'],
rules: {
name: [
{ required: true, message: '请输入子系统名称', trigger: 'blur' }
],
type: [
{ required: true, message: '请选择子系统类型', trigger: 'change' }
],
usage: [
{ required: true, message: '请选择使用方式', trigger: 'change' }
]
data() {
return {
dialogVisible: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
roleList: [
{label: '行调', value: 'DISPATCHER'},
{label: '行值', value: 'STATION_SUPERVISOR'},
{label: '司机', value: 'DRIVER'},
{label: '通号', value: 'MAINTAINER'},
{label: '车辆段信号楼', value: 'DEPOT_DISPATCHER'},
{label: '停车场信号楼', value: 'PARKING_LOT_SIGNAL_BUILDING'},
{label: '车站助理', value: 'STATION_ASSISTANT'},
{label: '车站站长', value: 'STATION_MASTER'},
{label: '车站信号员', value: 'STATION_SIGNALER'},
{label: '车站客运员', value: 'STATION_PASSENGER'},
{label: '车站扳道员', value: 'STATION_SWITCH_MAN'},
{label: '车站引导员', value: 'STATION_FACILITATOR'},
{label: '车站工务工', value: 'STATION_WORKER'},
{label: '车务段段长', value: 'TRAIN_MASTER'}
queryForm: {
labelWidth: '80px',
reset: true,
leftSpan: 18,
queryObject: {
name: {
type: 'text',
label: '名称'
}
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '名称',
prop: 'name'
},
{
title: '地图',
prop: 'mapId',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['id', 'name']); },
tagType: () => { return 'success'; }
},
{
title: '系统',
prop: 'simType',
type: 'tag',
columnValue: (row) => { return simTypeMap[row.simType]; },
tagType: () => { return 'success'; }
},
{
title: '使用方式',
prop: 'simUsage',
type: 'tag',
columnValue: (row) => { return simUsageMap[row.simUsage]; },
tagType: () => { return ''; }
},
{
title: '描述',
prop: 'desc'
},
{
type: 'button',
title: '操作',
width: '300',
buttons: [
{
name: '更新',
handleClick: this.updateRow
},
{
name: '删除',
handleClick: this.deleteRow
}
]
}
],
actions: [
{ text: '新建', handler: this.handleAddSubsystem },
{ text: '返回', handler: this.goBack }
]
}
};
},
computed: {
isShow() {
return this.$store.getters['roles'].indexOf('05');
}
},
created() {
this.mapList = [];
getPublishMapListOnline().then(resp => {
this.mapList = resp.data;
});
},
methods: {
handleAddSubsystem() {
this.innerTitle = '创建子系统';
this.innerVisible = true;
},
doShow(data) {
if (data && data.id) {
this.mapId = data.id;
this.stationList = [];
getStationListNeedAttendant(data.id).then(resp => {
if (resp.data && resp.data.length) {
this.stationList = resp.data;
}
}).catch(() => {
this.$message.error('获取车站列表失败');
});
this.reload();
this.dialogVisible = true;
}
},
reload() {
this.loading = true;
this.tableData = [];
queryMapSystemList({mapId: this.mapId}).then(resp => {
if (resp.data && resp.data.length) {
this.tableData = resp.data;
}
this.loading = false;
}).catch(() => {
this.loading = false;
this.$message.error('获取地图系统列表!');
});
},
doClose() {
this.dialogVisible = false;
queryFunction(params) {
params['mapId'] = this.$route.query.mapId;
return queryMapSystemPaged(params);
},
deleteRow(row) {
this.$confirm('删除子系统,是否继续?', '提 示', {
@ -210,83 +129,25 @@ export default {
});
}).catch( () => { });
},
updateRow(row) {
this.mapSystemId = row.id;
this.ruleForm.name = row.name;
this.ruleForm.desc = row.desc;
this.ruleForm.type = row.paramVO.type;
this.ruleForm.usage = row.paramVO.usageInfo.usage;
this.ruleForm.client = row.paramVO.usageInfo.param.client;
this.ruleForm.memberType = row.paramVO.usageInfo.param.memberType;
this.ruleForm.deviceCode = row.paramVO.usageInfo.param.deviceCode;
const functionList = Object.keys(row.paramVO.functionMap);
if (functionList && functionList.length) {
this.ruleForm.function = functionList[0];
}
this.innerTitle = '修改子系统';
this.innerVisible = true;
updateRow(index, row) {
this.$refs.editSubsystem.doShow(row);
},
commit() {
const functionMap = {};
if (this.ruleForm.function) {
functionMap[this.ruleForm.function] = null;
}
const data = {
mapId: this.mapId,
name: this.ruleForm.name,
desc: this.ruleForm.desc,
paramVO: {
type: this.ruleForm.type,
usageInfo: {
usage: this.ruleForm.usage,
param: {
client: this.ruleForm.client,
memberType: this.ruleForm.memberType,
deviceCode: this.ruleForm.deviceCode
}
handleAddSubsystem() {
this.$refs.editSubsystem.doShow();
},
functionMap: functionMap
}
};
if (this.innerTitle === '创建子系统') {
createMapSystem(data).then(resp => {
this.innerVisible = false;
this.reload();
this.$message.success('创建子系统成功!');
this.closeInner();
}).catch(() => {
this.$message.error('创建子系统失败!');
});
} else {
data.id = this.mapSystemId;
updateMapSystem(data).then(resp => {
this.innerVisible = false;
this.reload();
this.closeInner();
this.$message.success('修改子系统成功!');
}).catch(() => {
this.$message.error('修改子系统失败!');
});
}
reloadTable() {
this.queryList.reload();
},
closeInner() {
this.mapSystemId = '';
this.ruleForm = {
name: '',
type: '',
usage: '',
memberType: '',
deviceCode: '',
client: '',
function: ''
};
this.innerVisible = false;
this.$refs.ruleForm.resetFields();
goBack() {
this.$router.go(-1);
}
}
};
</script>
<style scoped>
<style lang="scss" scoped>
/deep/
.el-button+.el-button{
margin-top: 5px;
margin-left: 5px;
}
</style>

View File

@ -32,9 +32,9 @@
<el-form-item label="登录页Logo宽度:" prop="loginProLogoWidth" class="inlineBlock" style="margin-left:10px">
<el-input-number v-model="formModel.loginProLogoWidth" size="small" style="width: 210px;" :min="0" :step="1" />
</el-form-item>
<!-- <el-form-item label="登录页Logo高度:" prop="loginProLogoHeight" class="inlineBlock" style="margin-left:10px">
<el-input-number v-model="formModel.loginProLogoHeight" size="small" style="width: 210px;" :min="0" :step="1" />
</el-form-item> -->
<el-form-item label="主页Logo宽度:" prop="homeProLogoWidth" class="inlineBlock" style="margin-left:10px">
<el-input-number v-model="formModel.homeProLogoWidth" size="small" style="width: 210px;" :min="0" :step="1" />
</el-form-item>
<el-form-item label="页签名称:" prop="browserTitle" class="inlineBlock">
<el-input v-model="formModel.browserTitle" style="width: 210px;" size="small" />
</el-form-item>
@ -88,7 +88,7 @@ export default {
loginContectInformation:false, //
loginProLogo:'', // logo
loginProLogoWidth:0, // logo
// loginProLogoHeight:0, // logo
homeProLogoWidth:0, // logo
browserTitle:'', //
homeTitle:'', //
@ -145,7 +145,7 @@ export default {
this.formModel.loginProLogo = viewSetting.loginProLogo || '';
this.formModel.loginProLogoWidth = viewSetting.loginProLogoWidth || 0;
// this.formModel.loginProLogoHeight = viewSetting.loginProLogoHeight || 0;
this.formModel.homeProLogoWidth = viewSetting.homeProLogoWidth || 0;
this.formModel.browserTitle = viewSetting.browserTitle || '';
this.formModel.homeTitle = viewSetting.homeTitle || '';
@ -171,7 +171,7 @@ export default {
loginContectInformation:false, //
loginProLogo:'', // logo
loginProLogoWidth:'', // logo
// loginProLogoHeight:'', // logo
homeProLogoWidth:'', // logo
browserTitle:'', //
homeTitle:'', //

View File

@ -89,9 +89,12 @@ export default {
// 使
getBackProjectConfigList().then(resp => {
if (resp.data && resp.data.length > 0) {
this.projectMap['DEFAULT'] = {label:'默认', value:'DEFAULT'};
resp.data.forEach(each=>{
if (each.label == '') {
this.projectMap[each.value] = {label:'默认', value:'DEFAULT'};
} else {
this.projectMap[each.value] = each;
}
});
this.queryForm.queryObject.project.config.data = Object.values(this.projectMap);
}

View File

@ -10,9 +10,6 @@
<el-form-item label="项目描述:" prop="description">
<el-input v-model="formModel.description" style="width: 260px;" />
</el-form-item>
<el-form-item label="关联项目:" prop="viewShow">
<el-switch v-model="formModel.viewShow" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
@ -31,8 +28,7 @@ export default {
id: '',
code: '', //
name: '', //
description: '', //
viewShow:false // 01
description: '' //
},
loading: false
};
@ -64,7 +60,6 @@ export default {
this.formModel.code = row.code;
this.formModel.name = row.name;
this.formModel.description = row.description;
this.formModel.viewShow = !!row.viewShow;
} else {
this.$nextTick(() => {
this.$refs.ruleForm.resetFields();
@ -76,8 +71,7 @@ export default {
id: '',
code: '', //
name: '', //
description: '', //
viewShow:false // 01
description: '' //
};
this.$refs.ruleForm.resetFields();
this.dialogVisible = false;
@ -88,7 +82,6 @@ export default {
if (valid) {
this.loading = true;
const data = Object.assign({}, this.formModel);
data.viewShow = data.viewShow ? 1 : 0;
// code
checkBackProjectExist({code:data.code}).then(res=>{
if (!res.data) {

View File

@ -51,10 +51,14 @@ export default {
prop: 'description'
},
{
title: '关联项目选择',
prop: 'viewShow',
type: 'tag',
columnValue: (row) => { return row.viewShow ? '是' : '否'; },
title: '默认组织',
prop: 'defaultOrgName'
},
{
title: '关联组织',
prop: 'orgList',
type: 'tagMore',
columnValue: (row) => { return row.orgList; },
tagType: (row) => { return 'success'; }
},
{

View File

@ -1,52 +1,49 @@
<template>
<div v-loading="loading" class="map-list-main">
<div id="trainingMapTree" class="left-map-list">
<el-menu
default-active="2"
class="el-menu-vertical-demo"
background-color="#545c64"
text-color="#fff"
router
active-text-color="#ffd04b"
>
<div class="mapListName">
<span>{{ $t('global.mapList') }}</span>
</div>
<template v-if="!IsProject">
<filter-city ref="filerCity" filter-empty local-param-name="training_cityCode" @filterSelectChange="refresh" />
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
<template v-for="(cityCode, index) in Object.keys(menuData)">
<el-submenu :key="index" :index="index+''">
<template slot="title">
<i class="el-icon-location" />
<span>{{ cityMap.get(cityCode) }}</span>
</template>
<div id="trainingMapTree" class="left-map-list">
<el-tree
ref="tree"
:data="treeList"
node-key="id"
:props="{children:'children',label:'name'}"
highlight-current
:span="22"
:filter-node-method="filterNode"
@node-click="clickEvent"
>
<span slot-scope="{ node }">
<span
class="el-icon-tickets"
/>
<span :id="node.data.id">&nbsp;{{ node.data.name }}</span>
</span>
</el-tree>
<template v-for="(map, mapIndex) in menuData[cityCode]">
<el-menu-item :key="index + '-' + mapIndex" :index="'/trainingPlatform/simulation/' + map.id + '?lineCode=' + map.lineCode">{{ map.name }}</el-menu-item>
</template>
</el-submenu>
</template>
</el-menu>
</div>
</div>
</template>
<script>
import { listPublishMap } from '@/api/jmap/map';
import { UrlConfig } from '@/scripts/ConstDic';
import FilterCity from '@/views/components/filterCity';
import { getSessionStorage } from '@/utils/auth';
import { GetMapListByProjectList } from '@/scripts/ProjectConfig';
import { publisMapCityList} from '@/api/jmap/map';
export default {
name: 'DemonList',
components: {
FilterCity
},
data() {
return {
loading: true,
filterText: '',
treeList: [],
menuData: {},
mapId: '',
filterSelect: ''
filterSelect: '',
cityMap: null
};
},
computed: {
@ -66,10 +63,29 @@ export default {
this.$refs.tree.filter(val);
}
},
mounted() {
async mounted() {
let res = {};
this.menuData = {};
this.cityMap = new Map();
const resp = await publisMapCityList('city_type');
(resp.data || []).forEach(item => {
this.cityMap.set(item.code, item.name);
});
if (this.IsProject) {
this.refresh();
res = await listPublishMap({project: this.project});
} else {
res = await listPublishMap();
}
if (res && res.data) {
res.data.forEach(item => {
if (this.menuData[item.cityCode]) {
this.menuData[item.cityCode].push(item);
} else {
this.menuData[item.cityCode] = [item];
}
});
}
this.loading = false;
},
methods: {
filterNode(value, data) {
@ -78,30 +94,9 @@ export default {
},
clickEvent(obj, data, ele) {
this.mapId = obj.id;
const router = { path: `${UrlConfig.trainingPlatform.permission}/${this.mapId}`, query: { lineCode: obj.lineCode }};
const router = { path: `/trainingPlatform/simulation/${this.mapId}`, query: { lineCode: obj.lineCode }};
console.log(router, 'router');
this.$router.push(router);
},
async refresh(filterSelect) {
this.loading = true;
this.treeList = [];
this.filterSelect = filterSelect;
try {
let res = {};
if (this.IsProject) {
res = await listPublishMap({project: this.project});
} else {
res = await listPublishMap({ cityCode:filterSelect});
}
this.treeList = res.data;
this.$nextTick(() => {
this.$refs.tree && this.$refs.tree.setCurrentKey(this.$route.params.mapId + '');
});
this.$emit('goRoutePath', res.data);
this.loading = false;
} catch (error) {
this.loading = false;
this.$message.error(this.$t('error.refreshFailed'));
}
}
}
};
@ -109,19 +104,25 @@ export default {
<style rel="stylesheet/scss" lang="scss" scoped>
.mapListName{
padding: 15px 0px 15px 17px;
color: #fff;
}
.left-map-list{
width: 100%;
height: 100%;
flex: 1;
overflow: auto;
padding-bottom: 10px;
padding-top: 5px;
background: #545c64;
}
.map-list-main{
height: 100%;
display:flex;
flex-direction:column;
}
/deep/.el-menu{
border-right-width: 0;
}
</style>
<style>
.el-tree {

View File

@ -42,7 +42,7 @@ export default {
goRoutePath(data) {
const againEnter = getSessionStorage('againEnter') || null;
if (!againEnter && !this.$route.query.thirdJump) {
this.$router.push(`/trainingPlatform/permission/${data[0].id}?lineCode=${data[0].lineCode}`);
this.$router.push(`/trainingPlatform/simulation/${data[0].id}?lineCode=${data[0].lineCode}`);
setSessionStorage('againEnter', true);
}
}

View File

@ -46,7 +46,7 @@ import { createSimulation } from '@/api/simulation';
import { getSessionStorage } from '@/utils/auth';
export default {
name: 'Author',
name: 'Simulation',
components: {
selectRole
},