Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
bbe8dfabee
@ -35,5 +35,6 @@ export default {
|
||||
downlinkPlatform: 'Downlink platform',
|
||||
ibp:'IBP',
|
||||
getGroupId: 'Get group Id',
|
||||
groupId: 'Group id'
|
||||
groupId: 'Group id',
|
||||
interlock: 'Interlock'
|
||||
};
|
||||
|
@ -2,7 +2,7 @@ export default {
|
||||
testSystem: '城市轨道交通考试系统',
|
||||
testSystemDescription: ' 该系统具有自定义考试规则、自动生成考卷、学员成绩统计、数据曲线分析及题库管理等功能,从实战操作、业务流程、故障模拟及考试规则等多角度出发,力求打造最符合用户需求的城市轨道交通在线交互实操类考试系统',
|
||||
examResultsDetails: '考试结果详情',
|
||||
testQuestionsName: '试题名称',
|
||||
testQuestionsName: '试卷名称',
|
||||
testScores: '考试得分',
|
||||
points: '分',
|
||||
whetherThrough: '是否通过',
|
||||
|
@ -63,8 +63,8 @@ export default {
|
||||
|
||||
testDefinitionMaking: '试题定义制定',
|
||||
examRuleMaking: '考试规则制定',
|
||||
testName: '试题名称',
|
||||
inputTestName: '请填写试题名称',
|
||||
testName: '试卷名称',
|
||||
inputTestName: '请填写试卷名称',
|
||||
testScope: '试题范围',
|
||||
selectTestScope: '请选择试题范围',
|
||||
testDuration: '时长',
|
||||
|
@ -41,7 +41,7 @@ export default {
|
||||
runPlanTemplateManage: '模板运行图管理',
|
||||
runPlanCommonManage: '加载计划运行图管理',
|
||||
runPlanEveryDayManage: '每日运行图管理',
|
||||
examRuleManage: '试题规则管理',
|
||||
examRuleManage: '试卷规则管理',
|
||||
|
||||
orderAuthorityManage: '订单权限管理',
|
||||
commodityManage: '商品管理',
|
||||
|
@ -35,5 +35,6 @@ export default {
|
||||
downlinkPlatform: '下行站台',
|
||||
ibp:'IBP',
|
||||
getGroupId: '获取房间号',
|
||||
groupId: '房间号'
|
||||
groupId: '房间号',
|
||||
interlock: '联锁'
|
||||
};
|
||||
|
@ -25,11 +25,13 @@
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 73px;">
|
||||
<span class="base-label" style="left: -9px;">模式</span>
|
||||
<div style=" position: relative; top:-10px;">
|
||||
<el-radio-group v-model="control" style="width: 40%;float: left;" @change="chooseControl">
|
||||
<el-radio-group :id="domIdChoose1" v-model="control" style="width: 40%;float: left;" @change="chooseControl">
|
||||
<div style="margin-bottom: 10px;">
|
||||
<el-radio :id="control === '01'? '': domIdChoose1" label="01">自动</el-radio>
|
||||
<el-radio label="01">自动</el-radio>
|
||||
</div>
|
||||
<div style="margin-bottom:0px;">
|
||||
<el-radio label="02">全人工</el-radio>
|
||||
</div>
|
||||
<el-radio :id="control === '02'? '': domIdChoose1" label="02">全人工</el-radio>
|
||||
</el-radio-group>
|
||||
<el-input-number
|
||||
:id="domIdInput"
|
||||
@ -82,7 +84,6 @@ export default {
|
||||
loading: false,
|
||||
time: 30,
|
||||
control: '01',
|
||||
direction: '01',
|
||||
effective: true,
|
||||
selected: null,
|
||||
standName: '',
|
||||
@ -108,18 +109,6 @@ export default {
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setStopTime.input.domId : '';
|
||||
},
|
||||
disabledUp() {
|
||||
if (this.selected) {
|
||||
return this.selected.direction !== '02';
|
||||
}
|
||||
return true;
|
||||
},
|
||||
disabledDown() {
|
||||
if (this.selected) {
|
||||
return this.selected.direction !== '01';
|
||||
}
|
||||
return true;
|
||||
},
|
||||
disabledInput() {
|
||||
return this.control === '01'; // 如果是自动则不可以设置
|
||||
},
|
||||
@ -149,11 +138,9 @@ export default {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.control = selected.parkingTime == 0 ? '01' : '02';
|
||||
this.time = selected.parkingTime ? Number(selected.parkingTime) : 30;
|
||||
this.effective = selected.parkingAlwaysValid == '1';
|
||||
this.direction = selected.direction;
|
||||
// this.control = selected.parkingTime == 0 ? '01' : '02';
|
||||
// this.time = selected.parkingTime ? Number(selected.parkingTime) : 30;
|
||||
// this.effective = selected.parkingAlwaysValid == '1';
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
|
@ -142,8 +142,8 @@ export default {
|
||||
productTypes: ['02'],
|
||||
stepVOList: [
|
||||
{ deviceType: '06', orderNum: 1, operateCode: '509', tip: '鼠标右键菜单选择【停站时间控制】' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【自动】', val: '01' },
|
||||
{ deviceType: '06', orderNum: 3, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
|
||||
// { deviceType: '06', orderNum: 2, operateCode: '5092', tip: '鼠标左键点击,选择【自动】', val: '01' },
|
||||
{ deviceType: '06', orderNum: 2, operateCode: '509', tip: '鼠标左键点击【确认】按钮' }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ function hasPermission(roles, permissionRoles) {
|
||||
return roles.some(role => permissionRoles.indexOf(role) >= 0);
|
||||
}
|
||||
|
||||
const whiteList = ['/login', '/design/login', '/xty/login', '/designxty/login', '/gzb/login', '/designgzb/login', '/gzzbxy/relay', '/XiAnSubway/login', '/designXiAnSubway/login']; // 不重定向白名单
|
||||
const whiteList = ['/login', '/design/login', '/xty/login', '/designxty/login', '/gzb/login', '/designgzb/login', '/gzzbxy/relay', '/xadt/login', '/designxadt/login']; // 不重定向白名单
|
||||
|
||||
const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/iscs/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/, /^\/displayNew\/record/, /^\/displayNew\/manage/, /^\/displayNew\/plan/];
|
||||
|
||||
@ -37,14 +37,14 @@ const loginDesignPageMenu = {
|
||||
designxty: loginDesignXtyPage,
|
||||
designgzb: loginDesignGzbPage,
|
||||
designhyd: loginDesignPage,
|
||||
designXiAnSubway: loginDesignXasPage
|
||||
designxadt: loginDesignXasPage
|
||||
};
|
||||
const loginPageMenu = {
|
||||
login: loginPage,
|
||||
xty: loginXtyPage,
|
||||
gzb: loginGzbPage,
|
||||
hyd: loginPage,
|
||||
XiAnSubway: loginXasPage
|
||||
xadt: loginXasPage
|
||||
};
|
||||
// 获取路径数据
|
||||
function getRouteInfo(to) {
|
||||
@ -55,7 +55,7 @@ function getRouteInfo(to) {
|
||||
if (/^\/designxty/.test(toRoutePath)) {
|
||||
loginPath = loginDesignXtyPage;
|
||||
clientId = LoginParams.Design.clientId;
|
||||
} else if (/^\/designXiAnSubway/.test(toRoutePath)) {
|
||||
} else if (/^\/designxadt/.test(toRoutePath)) {
|
||||
loginPath = loginDesignXasPage;
|
||||
clientId = LoginParams.Design.clientId;
|
||||
} else if (/^\/designgzb/.test(toRoutePath)) {
|
||||
@ -73,7 +73,7 @@ function getRouteInfo(to) {
|
||||
} else if ( /^\/gzb/.test(toRoutePath)) {
|
||||
loginPath = loginGzbPage;
|
||||
clientId = null;
|
||||
} else if ( /^\/XiAnSubway/.test(toRoutePath)) {
|
||||
} else if ( /^\/xadt/.test(toRoutePath)) {
|
||||
loginPath = loginXasPage;
|
||||
clientId = null;
|
||||
} else {
|
||||
|
@ -117,7 +117,7 @@ const RunPlanApproval = () => import('@/views/approval/runPlan/index');
|
||||
const DeviceManage = () => import('@/views/system/deviceManage/index');
|
||||
const MapSort = () => import('@/views/publish/publishMap/mapSort');
|
||||
|
||||
import { loginInfo } from '@/scripts/ProjectConfig';
|
||||
import { loginInfo, GenerateRouteProjectList } from '@/scripts/ProjectConfig';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
|
||||
/**
|
||||
@ -165,73 +165,12 @@ export const constantRoutes = [
|
||||
component: Login,
|
||||
hidden: true
|
||||
},
|
||||
// 项目系统登录
|
||||
{
|
||||
path: '/xty/login',
|
||||
component: Login,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/xty',
|
||||
redirect: '/xty/login',
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/gzb/login',
|
||||
component: Login,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/gzb',
|
||||
redirect: '/gzb/login',
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/XiAnSubway/login',
|
||||
component: Login,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/XianSubway',
|
||||
redirect: '/XianSubway/login',
|
||||
hidden: true
|
||||
},
|
||||
// 设计平台登录
|
||||
{
|
||||
path: '/design/login',
|
||||
component: Login,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/designxty/login',
|
||||
component: Login,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/designxty',
|
||||
redirect: '/designxty/login',
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/designgzb/login',
|
||||
component: Login,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/designgzb',
|
||||
redirect: '/designgzb/login',
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/designXiAnSubway/login',
|
||||
component: Login,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/designXiAnSubway',
|
||||
component: Login,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/design/jlmap3d/edit',
|
||||
component: Jlmap3dedit,
|
||||
@ -270,7 +209,19 @@ export const constantRoutes = [
|
||||
},
|
||||
{ path: '*', redirect: '/404', hidden: true }
|
||||
];
|
||||
|
||||
// 项目登录路径
|
||||
GenerateRouteProjectList.forEach(item => {
|
||||
constantRoutes.push({
|
||||
path: `/${item}/login`,
|
||||
component: Login,
|
||||
hidden: true
|
||||
});
|
||||
constantRoutes.push({
|
||||
path: `/${item}`,
|
||||
redirect: `/${item}/login`,
|
||||
hidden: true
|
||||
});
|
||||
});
|
||||
export const asyncRouter = [
|
||||
{ // 公共地图
|
||||
path: '/design',
|
||||
|
@ -3,7 +3,7 @@ import Favicon from '@/assets/icon/favicon.png';
|
||||
import FaviconXty from '@/assets/icon/favicon_xty.png';
|
||||
import FaviconGzb from '@/assets/icon/favicon_gzb.png';
|
||||
import FaviconHyd from '@/assets/icon/favicon_hyd.png';
|
||||
import FaviconXas from '@/assets/icon/favicon_xas.png';
|
||||
import FaviconXadt from '@/assets/icon/favicon_xas.png';
|
||||
|
||||
export const loginInfo = {
|
||||
xty: {
|
||||
@ -38,13 +38,13 @@ export const loginInfo = {
|
||||
title: '城市轨道交通设计平台',
|
||||
loginPath: '/design/login'
|
||||
},
|
||||
XiAnSubway: {
|
||||
xadt: {
|
||||
title: '西安地铁城市轨道交通实训平台',
|
||||
loginPath: '/XiAnSubway/login'
|
||||
loginPath: '/xadt/login'
|
||||
},
|
||||
designXiAnSubway: {
|
||||
designxadt: {
|
||||
title: '西安地铁城市轨道交通设计平台',
|
||||
loginPath: '/designXiAnSubway/login'
|
||||
loginPath: '/designxadt/login'
|
||||
}
|
||||
};
|
||||
|
||||
@ -57,8 +57,8 @@ export const ProjectIcon = {
|
||||
designgzb:FaviconGzb,
|
||||
hyd: FaviconHyd,
|
||||
designhyd: FaviconHyd,
|
||||
XiAnSubway: FaviconXas,
|
||||
designXiAnSubway: FaviconXas
|
||||
xadt: FaviconXadt,
|
||||
designxadt: FaviconXadt
|
||||
};
|
||||
|
||||
export const ProjectCode = {
|
||||
@ -66,10 +66,14 @@ export const ProjectCode = {
|
||||
designxty: 'XTY',
|
||||
gzb: 'GZB',
|
||||
designgzb: 'GZB',
|
||||
hyd: 'HYD'
|
||||
hyd: 'HYD',
|
||||
designhyd: 'HYD',
|
||||
xadt: 'XADT',
|
||||
designxadt: 'XADT'
|
||||
};
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const CaseHideProjectList = ['hyd', 'designhyd']; // 案例展示隐藏的项目
|
||||
export const GenerateRouteProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt'];// 需要在公共路由中生成登录页面的项目
|
||||
export const goOtherPlatformMenu = {
|
||||
login: '/design/login',
|
||||
design: '/login',
|
||||
@ -79,6 +83,6 @@ export const goOtherPlatformMenu = {
|
||||
designgzb: '/gzb/login',
|
||||
hyd: '/design/login',
|
||||
designhyd: '/login',
|
||||
XiAnSubway: '/designXiAnSubway/login',
|
||||
designXiAnSubway: '/XiAnSubway/login'
|
||||
xadt: '/designxadt/login',
|
||||
designxadt: '/xadt/login'
|
||||
};
|
||||
|
@ -2,9 +2,9 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
|
@ -20,11 +20,15 @@
|
||||
:props="defaultProps"
|
||||
:filter-node-method="filterNode"
|
||||
:style="{height: height+'px'}"
|
||||
@node-click="clickEvent"
|
||||
>
|
||||
<div slot-scope="{ node, data }" class="list-elem">
|
||||
<div slot-scope="{ node, data }" class="list-elem custom-tree-node">
|
||||
<span v-if="data.state=='01'">{{ '['+data.mapName+']'+($t('global.trainingNotStart').replace('{name}', data.creator.nickName)) }}</span>
|
||||
<span v-else>{{ '['+data.mapName+']'+($t('global.trainingHasStart').replace('{name}', data.creator.nickName)) }}</span>
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="handleJoinRoom(data)"
|
||||
>进入</el-button>
|
||||
</div>
|
||||
</el-tree>
|
||||
</el-scrollbar>
|
||||
@ -32,7 +36,7 @@
|
||||
slot="footer"
|
||||
class="dialog-footer"
|
||||
>
|
||||
<el-button v-loading="loading" type="primary" :disabled="!group" @click="handleJoin">{{ $t('global.joinRoom') }}</el-button>
|
||||
<el-button v-loading="loading" type="primary" @click="handleJoin">{{ $t('global.joinNewRoom') }}</el-button>
|
||||
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
@ -41,10 +45,8 @@
|
||||
<script>
|
||||
import { getjointTrainList, getjointTraining, putJointTrainingSimulationEntrance } from '@/api/chat';
|
||||
import { getjointTrainListNew, putJointTrainingSimulationEntranceNew, getjointTrainingNew } from '@/api/jointTraining';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { ProjectCode } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'DeomonList',
|
||||
@ -57,8 +59,6 @@ export default {
|
||||
label: 'roomName'
|
||||
},
|
||||
group: '',
|
||||
state: '',
|
||||
mapId: '',
|
||||
loading: false,
|
||||
pageLoading: false
|
||||
};
|
||||
@ -82,31 +82,16 @@ export default {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
clickEvent(obj, node, data) {
|
||||
this.state = obj.state;
|
||||
this.group = obj.group;
|
||||
this.mapId = obj.mapId;
|
||||
},
|
||||
async doShow() {
|
||||
try {
|
||||
this.pageLoading = true;
|
||||
this.dialogShow = true;
|
||||
this.loading = false;
|
||||
const project = getSessionStorage('project');
|
||||
const res = await getjointTrainList({projectCode:ProjectCode[project]});
|
||||
const resp = await getjointTrainListNew({projectCode: ProjectCode[project]});
|
||||
const oldMapRoomList = res.data || [];
|
||||
const newMapRoomList = resp.data || [];
|
||||
this.trainingList = [...oldMapRoomList, ...newMapRoomList];
|
||||
this.$nextTick(() => {
|
||||
var training = this.trainingList[0] || {};
|
||||
if (training) {
|
||||
this.state = training.state;
|
||||
this.group = training.group;
|
||||
this.mapId = training.mapId;
|
||||
this.$refs.tree.setCurrentKey(this.group);
|
||||
}
|
||||
});
|
||||
const resp = await getjointTrainListNew();
|
||||
const rest = await getjointTrainList();
|
||||
const newMapData = resp.data || [];
|
||||
const oldMapData = rest.data || [];
|
||||
this.trainingList = [...newMapData, ...oldMapData];
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
@ -116,28 +101,28 @@ export default {
|
||||
async doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
async handleJoin() {
|
||||
async handleJoinRoom(data) {
|
||||
try {
|
||||
this.loading = true;
|
||||
const rest = await getPublishMapInfo(this.mapId);
|
||||
const drawWay = rest.data.drawWay;
|
||||
if (drawWay) {
|
||||
await getjointTrainingNew(this.group);
|
||||
const rest = await getPublishMapInfo(data.mapId);
|
||||
let path = '';
|
||||
if (rest.data.drawWay) {
|
||||
await getjointTrainingNew(data.group);
|
||||
path = '/jointTrainingNew';
|
||||
} else {
|
||||
await getjointTraining(this.group);
|
||||
await getjointTraining(data.group);
|
||||
path = '/jointTraining';
|
||||
}
|
||||
if (this.state == '02') {
|
||||
if (data.state == '02') {
|
||||
launchFullscreen();
|
||||
const query = { lineCode: rest.data.lineCode, mapId: this.mapId, group: this.group, drawWay: drawWay };
|
||||
if (drawWay) {
|
||||
await putJointTrainingSimulationEntranceNew(this.group);
|
||||
this.$router.push({ path: `/jointTrainingNew`, query: query });
|
||||
const query = { lineCode: rest.data.lineCode, mapId: data.mapId, group: data.group, drawWay: rest.data.drawWay };
|
||||
if (rest.data.drawWay) {
|
||||
await putJointTrainingSimulationEntranceNew(data.group);
|
||||
} else {
|
||||
await putJointTrainingSimulationEntrance(this.group);
|
||||
this.$router.push({ path: `/jointTraining`, query: query });
|
||||
await putJointTrainingSimulationEntrance(data.group);
|
||||
}
|
||||
} else if (this.state == '01') {
|
||||
const query = { group: this.group, drawWay: drawWay };
|
||||
this.$router.push({ path: path, query: query });
|
||||
} else if (data.state == '01') {
|
||||
const query = { group: data.group, drawWay: true };
|
||||
this.$router.push({ path: `/trainroom`, query: query });
|
||||
}
|
||||
} catch (e) {
|
||||
@ -145,27 +130,39 @@ export default {
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
handleJoin() {
|
||||
this.$emit('enterQcode');
|
||||
this.dialogShow = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
/deep/ {
|
||||
.el-dialog__body {
|
||||
padding: 0px 30px !important;
|
||||
}
|
||||
/deep/ {
|
||||
.el-dialog__body {
|
||||
padding: 0px 30px !important;
|
||||
}
|
||||
|
||||
.el-tree {
|
||||
overflow: hidden !important;
|
||||
.el-tree {
|
||||
overflow: hidden !important;
|
||||
.list-elem {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-tree-node.is-current>.el-tree-node__content {
|
||||
background-color: #e4e3e3 !important;
|
||||
}
|
||||
}
|
||||
.el-tree-node.is-current>.el-tree-node__content {
|
||||
background-color: #e4e3e3 !important;
|
||||
}
|
||||
}
|
||||
.custom-tree-node {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
</style>
|
||||
|
@ -314,6 +314,7 @@ export default {
|
||||
case 'Instructor': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'Instructor'); this.hideIbp(); break;
|
||||
case 'Dispatcher': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'Dispatcher'); this.hideIbp(); break;
|
||||
case 'Attendant': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'Attendant'); this.hideIbp(); break;
|
||||
case 'CI': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'CI'); this.hideIbp(); break;
|
||||
case 'Audience': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Audience'); this.hideIbp(); break;
|
||||
case 'Driver': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Driver'); this.hideIbp(); break;
|
||||
case 'Repair': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Repair'); this.hideIbp(); break;
|
||||
|
@ -90,7 +90,7 @@ export default {
|
||||
return this.userRole == 'BigScreen';
|
||||
},
|
||||
isShowRelDevice() {
|
||||
return getSessionStorage('project').endsWith('gzb') && this.userRole === 'Attendant';
|
||||
return getSessionStorage('project').endsWith('gzb') && this.userRole === 'CI';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -250,6 +250,10 @@ export default {
|
||||
this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'Attendant');
|
||||
this.$emit('getUserRole');
|
||||
break;
|
||||
case 'CI':
|
||||
this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'CI');
|
||||
this.$emit('getUserRole');
|
||||
break;
|
||||
case 'Driver':
|
||||
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'Driver');
|
||||
this.$emit('getUserRole');
|
||||
|
@ -11,7 +11,7 @@
|
||||
append-to-body
|
||||
center
|
||||
>
|
||||
<div>
|
||||
<div v-if="options.length">
|
||||
<ul>
|
||||
<li v-for="(node, index) in options" :key="index" style="height: 45px">
|
||||
<span v-if="node.online" style="color: #339933;">{{ handleDeviceTitle(node) }}</span>
|
||||
@ -75,6 +75,9 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div v-else style="height: 50px; text-align: center; color: #C0C0C0;line-height: 50px">
|
||||
<span>未查询到真实设备</span>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.connect') }}</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
|
@ -167,7 +167,7 @@ export default {
|
||||
},
|
||||
isProject() {
|
||||
const projectName = this.$route.path.split('/')[1];
|
||||
return projectName.endsWith('xty') || projectName.endsWith('gzb') || projectName.endsWith('hyd') || projectName.endsWith('XiAnSubway');
|
||||
return projectName.endsWith('xty') || projectName.endsWith('gzb') || projectName.endsWith('hyd') || projectName.endsWith('xadt');
|
||||
},
|
||||
logoImg() {
|
||||
const projectName = this.$route.path.split('/')[1];
|
||||
|
@ -347,6 +347,7 @@ export default {
|
||||
case 'INSTRUCTOR': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'INSTRUCTOR'); this.hideIbp(); break;
|
||||
case 'DISPATCHER': this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setRoles', 'DISPATCHER'); this.hideIbp(); break;
|
||||
case 'STATION_SUPERVISOR': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR'); this.hideIbp(); break;
|
||||
case 'INTERLOCK': this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'INTERLOCK'); this.hideIbp(); break;
|
||||
case 'AUDIENCE': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'AUDIENCE'); this.hideIbp(); break;
|
||||
case 'DRIVER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'DRIVER'); this.hideIbp(); break;
|
||||
case 'MAINTAINER': this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'MAINTAINER'); this.hideIbp(); break;
|
||||
|
@ -86,7 +86,7 @@ export default {
|
||||
return this.userRole == 'ADMIN';
|
||||
},
|
||||
isProject() {
|
||||
return getSessionStorage('project').endsWith('gzb');
|
||||
return getSessionStorage('project').endsWith('gzb') && this.userRole === 'CI';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -239,6 +239,10 @@ export default {
|
||||
this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'STATION_SUPERVISOR');
|
||||
this.$emit('getUserRole');
|
||||
break;
|
||||
case 'CI':
|
||||
this.$store.dispatch('training/setPrdType', '01'); this.$store.dispatch('training/setRoles', 'CI');
|
||||
this.$emit('getUserRole');
|
||||
break;
|
||||
case 'DRIVER':
|
||||
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setRoles', 'DRIVER');
|
||||
this.$emit('getUserRole');
|
||||
|
@ -11,7 +11,7 @@
|
||||
append-to-body
|
||||
center
|
||||
>
|
||||
<div>
|
||||
<div v-if="options.length">
|
||||
<ul>
|
||||
<li v-for="(node, index) in options" :key="index" style="height: 45px">
|
||||
<span v-if="node.online" style="color: #339933;">{{ handleDeviceTitle(node) }}</span>
|
||||
@ -75,6 +75,9 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div v-else style="height: 50px; text-align: center; color: #C0C0C0;line-height: 50px">
|
||||
<span>未查询到真实设备</span>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.connect') }}</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
|
@ -21,7 +21,7 @@
|
||||
</el-button>
|
||||
<el-button size="small" type="primary" class="eachButton" @click="createMap">{{ $t('map.newConstruction') }}</el-button>
|
||||
</div>
|
||||
<map-import ref="mapImport" />
|
||||
<map-import ref="mapImport" @loadInitData="loadInitData" />
|
||||
<map-operate-menu
|
||||
ref="menu"
|
||||
:point="point"
|
||||
|
@ -78,6 +78,7 @@ export default {
|
||||
that.loading = false;
|
||||
that.$message.success('导入成功!');
|
||||
// that.loadInitData();
|
||||
this.$emit('loadInitData');
|
||||
// loading.close();
|
||||
this.close();
|
||||
}).catch(error => {
|
||||
|
@ -105,7 +105,7 @@ export default {
|
||||
},
|
||||
methods:{
|
||||
loadInitData() {
|
||||
this.projectList = [{value:'xty', label:'西铁院'}, {value: 'gzb', label: '贵州装备'}];
|
||||
this.projectList = [{value:'xty', label:'西铁院'}, {value: 'gzb', label: '贵州装备'}, {value: 'xadt', label: '西安地铁'}];
|
||||
const customeredProductType = ConstConfig.ConstSelect.customeredProductType;
|
||||
this.typeList = Cookies.get('user_lang') == 'en'
|
||||
? customeredProductType.map(elem => { return { value: elem.value, label: elem.enlabel }; })
|
||||
|
@ -55,7 +55,8 @@ export default {
|
||||
'Instructor': 'trainRoom.increaseTeacher',
|
||||
'Repair': 'trainRoom.increaseUniversalAccount',
|
||||
'Driver': 'trainRoom.driver',
|
||||
'IBP': 'trainRoom.increaseIbp'
|
||||
'IBP': 'trainRoom.increaseIbp',
|
||||
'CI': 'trainRoom.interlock'
|
||||
}[this.roleType];
|
||||
}
|
||||
},
|
||||
|
@ -5,7 +5,7 @@
|
||||
{{ $t(titleI18n) }}
|
||||
</div>
|
||||
<div class="role__head--add">
|
||||
<el-button v-if="userId == room.creatorId" icon="el-icon-plus" circle plain @click="handleAddUser()" />
|
||||
<el-button v-if="userId == room.creatorId" :disabled="addRoleDis" icon="el-icon-plus" circle plain @click="handleAddUser()" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="role__container">
|
||||
@ -88,6 +88,13 @@ export default {
|
||||
},
|
||||
userId() {
|
||||
return this.$store.state.user ? this.$store.state.user.id : '';
|
||||
},
|
||||
addRoleDis() {
|
||||
if (this.roleType === 'CI' && this.options.length > 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -111,7 +118,6 @@ export default {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.role {
|
||||
border: 1px solid #ccc;
|
||||
height: 200px;
|
||||
@ -124,6 +130,7 @@ export default {
|
||||
border-bottom: 1px solid #ccc;
|
||||
background: #f0f0f0;
|
||||
display: flex;
|
||||
height: 33px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 3px;
|
||||
|
@ -74,6 +74,17 @@
|
||||
@changeUser="handleUpdUser"
|
||||
@delUser="handleDelUser"
|
||||
/>
|
||||
<e-role
|
||||
v-if="isGzbProject"
|
||||
class="role"
|
||||
title-i18n="trainRoom.interlock"
|
||||
role-type="CI"
|
||||
:room="room"
|
||||
:options="ciList"
|
||||
@addUser="handleAddUser"
|
||||
@changeUser="handleUpdUser"
|
||||
@delUser="handleDelUser"
|
||||
/>
|
||||
<e-device
|
||||
v-if="isXtyProject"
|
||||
class="role"
|
||||
@ -170,6 +181,9 @@ export default {
|
||||
isXtyProject() {
|
||||
return getSessionStorage('project').endsWith('xty');
|
||||
},
|
||||
isGzbProject() {
|
||||
return getSessionStorage('project').endsWith('gzb');
|
||||
},
|
||||
isLocal() {
|
||||
return process.env.VUE_APP_PRO === 'local';
|
||||
},
|
||||
@ -222,6 +236,9 @@ export default {
|
||||
},
|
||||
audienceList() {
|
||||
return this.members.filter(elem => { return [elem.userRole.toUpperCase()].includes('AUDIENCE'); });
|
||||
},
|
||||
ciList() {
|
||||
return this.members.filter(elem => { return [elem.userRole.toUpperCase()].includes('CI'); });
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
|
Loading…
Reference in New Issue
Block a user