Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
# Conflicts: # src/layout/components/Logout.vue
This commit is contained in:
commit
dd89b94e64
@ -239,7 +239,7 @@ export function getPermissionJoint(group) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// 添加或更新真实设备和仿真对象连接
|
||||||
export function setRealDevice(group, data) {
|
export function setRealDevice(group, data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/jointTraining/room/realDevice?group=${group}`,
|
url: `/api/jointTraining/room/realDevice?group=${group}`,
|
||||||
@ -247,3 +247,20 @@ export function setRealDevice(group, data) {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除真实设备和仿真对象连接
|
||||||
|
export function delRealDevice(id, group) {
|
||||||
|
return request({
|
||||||
|
url: `/api/jointTraining/room/realDevice/${id}`,
|
||||||
|
method: 'delete',
|
||||||
|
params: { group: group }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取真实设备列表
|
||||||
|
export function getRealDevices(group) {
|
||||||
|
return request({
|
||||||
|
url: `/api/jointTraining/room/${group}/devices`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -32,5 +32,6 @@ export default {
|
|||||||
instructions: 'Instructions',
|
instructions: 'Instructions',
|
||||||
chapterTrainingName: 'Chapter/training name',
|
chapterTrainingName: 'Chapter/training name',
|
||||||
revokeScriptSuccess: 'Revoke script success',
|
revokeScriptSuccess: 'Revoke script success',
|
||||||
revokeScriptFailed: 'Revoke script failed'
|
revokeScriptFailed: 'Revoke script failed',
|
||||||
|
skin: 'Skin'
|
||||||
};
|
};
|
||||||
|
@ -94,5 +94,11 @@ export default {
|
|||||||
getTrainListFailed: 'Failed to get train list',
|
getTrainListFailed: 'Failed to get train list',
|
||||||
getDraftCourseDataFailed: 'Failed to get draft course data!',
|
getDraftCourseDataFailed: 'Failed to get draft course data!',
|
||||||
failedToGetCourseData: 'Failed to get course data!',
|
failedToGetCourseData: 'Failed to get course data!',
|
||||||
failedToGetSystemData: 'Failed to get system data!'
|
failedToGetSystemData: 'Failed to get system data!',
|
||||||
|
inquiryPLCDeviceFailed: 'Inquiry PLC device failed!',
|
||||||
|
getScreenDoorsListFailed: 'Get the list of screen doors failed!',
|
||||||
|
theDeviceTypeAlreadyExists: 'The device type already exists!',
|
||||||
|
connectToRealDeviceFailed: 'Connect to real device failed!',
|
||||||
|
getRealDeviceListFailed: 'Get real device list failed!',
|
||||||
|
deleteRealDeviceFailed: 'Delete real device failed!'
|
||||||
};
|
};
|
||||||
|
@ -118,5 +118,6 @@ export default {
|
|||||||
rejected: 'Rejected',
|
rejected: 'Rejected',
|
||||||
review: 'Review',
|
review: 'Review',
|
||||||
explanation: 'Explanation',
|
explanation: 'Explanation',
|
||||||
courseDetails: 'Course details'
|
courseDetails: 'Course details',
|
||||||
|
courseTree: 'Course tree:'
|
||||||
};
|
};
|
||||||
|
@ -4,7 +4,7 @@ export default {
|
|||||||
pleaseSelect: 'please choose',
|
pleaseSelect: 'please choose',
|
||||||
pleaseEnter: 'please input',
|
pleaseEnter: 'please input',
|
||||||
sketchMap: 'Draft map list',
|
sketchMap: 'Draft map list',
|
||||||
newConstruction: 'create',
|
newConstruction: 'Create',
|
||||||
importMap: 'Import the map',
|
importMap: 'Import the map',
|
||||||
createNewMap: 'A new map',
|
createNewMap: 'A new map',
|
||||||
normalCreate: 'The normal to create',
|
normalCreate: 'The normal to create',
|
||||||
|
@ -27,5 +27,10 @@ export default {
|
|||||||
recording: 'recording...',
|
recording: 'recording...',
|
||||||
sendText: 'Send text',
|
sendText: 'Send text',
|
||||||
left: 'left',
|
left: 'left',
|
||||||
right: 'right'
|
right: 'right',
|
||||||
|
realDevice: 'Real device',
|
||||||
|
plcGatewayOnline: '[PLC gateway online]',
|
||||||
|
plcGatewayOffline: '[PLC gateway offline]',
|
||||||
|
uplinkPlatform: 'Uplink platform',
|
||||||
|
downlinkPlatform: 'Downlink platform'
|
||||||
};
|
};
|
||||||
|
@ -32,6 +32,6 @@ export default {
|
|||||||
instructions: '说明',
|
instructions: '说明',
|
||||||
chapterTrainingName: '章节/课程名称',
|
chapterTrainingName: '章节/课程名称',
|
||||||
revokeScriptSuccess: '撤回成功',
|
revokeScriptSuccess: '撤回成功',
|
||||||
revokeScriptFailed: '撤回失败'
|
revokeScriptFailed: '撤回失败',
|
||||||
|
skin: '皮肤'
|
||||||
};
|
};
|
||||||
|
@ -94,5 +94,11 @@ export default {
|
|||||||
getTrainListFailed: '获取列车列表失败',
|
getTrainListFailed: '获取列车列表失败',
|
||||||
getDraftCourseDataFailed: '获取草稿课程数据失败!',
|
getDraftCourseDataFailed: '获取草稿课程数据失败!',
|
||||||
failedToGetCourseData: '获取课程数据失败!',
|
failedToGetCourseData: '获取课程数据失败!',
|
||||||
failedToGetSystemData: '获取系统数据失败!'
|
failedToGetSystemData: '获取系统数据失败!',
|
||||||
|
inquiryPLCDeviceFailed: '查询PLC设备失败!',
|
||||||
|
getScreenDoorsListFailed: '获取屏蔽门列表失败!',
|
||||||
|
theDeviceTypeAlreadyExists: '已存在该设备类型!',
|
||||||
|
connectToRealDeviceFailed: '关联真实设备失败!',
|
||||||
|
getRealDeviceListFailed: '获取真实设备列表失败!',
|
||||||
|
deleteRealDeviceFailed: '删除真实设备失败!'
|
||||||
};
|
};
|
||||||
|
@ -117,6 +117,7 @@ export default {
|
|||||||
rejected: '已驳回',
|
rejected: '已驳回',
|
||||||
review: '查看',
|
review: '查看',
|
||||||
explanation: '驳回说明',
|
explanation: '驳回说明',
|
||||||
courseDetails: '课程详情'
|
courseDetails: '课程详情',
|
||||||
|
courseTree: '课程树:'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -27,5 +27,10 @@ export default {
|
|||||||
recording: '录音中...',
|
recording: '录音中...',
|
||||||
sendText: '发送文字',
|
sendText: '发送文字',
|
||||||
left: '左',
|
left: '左',
|
||||||
right: '右'
|
right: '右',
|
||||||
|
realDevice: '真实设备',
|
||||||
|
plcGatewayOnline: '[PLC网关在线]',
|
||||||
|
plcGatewayOffline: '[PLC网关离线]',
|
||||||
|
uplinkPlatform: '上行站台',
|
||||||
|
downlinkPlatform: '下行站台'
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="avatar-container" style="right: 80px;">
|
<div class="avatar-container">
|
||||||
|
<!-- style="right: 80px;" -->
|
||||||
<el-menu-item v-for="item in entryList" v-show="!item.hidden" :key="item.name" class="avatar-wrapper" index="" @click="item.handle">
|
<el-menu-item v-for="item in entryList" v-show="!item.hidden" :key="item.name" class="avatar-wrapper" index="" @click="item.handle">
|
||||||
<span style="color: white;">{{ $t(item.name) }}</span>
|
<span style="color: white;">{{ $t(item.name) }}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
|
@ -94,8 +94,10 @@ export default {
|
|||||||
.avatar-container {
|
.avatar-container {
|
||||||
height: $height;
|
height: $height;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
right: 35px;
|
position: relative;
|
||||||
|
right: 0px;
|
||||||
|
// right: 35px;
|
||||||
|
|
||||||
.avatar-wrapper {
|
.avatar-wrapper {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -68,8 +68,15 @@
|
|||||||
</el-submenu>
|
</el-submenu>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<quick-entry v-if="isShow" ref="quickEntry" />
|
<div class="rightGroup">
|
||||||
<user-logout ref="userLogout" />
|
<quick-entry v-if="isShow" ref="quickEntry" />
|
||||||
|
<div v-if="!isShow" class="avatar-container" @click="goToTraining">
|
||||||
|
<el-menu-item class="avatar-wrapper" index="">
|
||||||
|
<span style="color: white;">城市轨道交通实训平台</span>
|
||||||
|
</el-menu-item>
|
||||||
|
</div>
|
||||||
|
<user-logout ref="userLogout" />
|
||||||
|
</div>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -149,6 +156,12 @@ export default {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
},
|
||||||
|
goToTraining() {
|
||||||
|
const routeData = this.$router.resolve({
|
||||||
|
path: '/'
|
||||||
|
});
|
||||||
|
window.open(routeData.href, '_blank');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -157,6 +170,12 @@ export default {
|
|||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
$height: 61px;
|
$height: 61px;
|
||||||
|
|
||||||
|
.rightGroup{
|
||||||
|
position: absolute;
|
||||||
|
right: 35px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
height: $height;
|
height: $height;
|
||||||
line-height: $height;
|
line-height: $height;
|
||||||
@ -180,26 +199,8 @@ export default {
|
|||||||
.avatar-container {
|
.avatar-container {
|
||||||
height: $height;
|
height: $height;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: absolute;
|
position: relative;
|
||||||
right: 35px;
|
margin-right:10px;
|
||||||
|
|
||||||
.avatar-wrapper {
|
|
||||||
cursor: pointer;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.user-avatar {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-icon-caret-bottom {
|
|
||||||
position: absolute;
|
|
||||||
right: -20px;
|
|
||||||
top: 25px;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
<navbar />
|
<navbar />
|
||||||
<app-main :style="{width: width+'px', height: height+'px'}" />
|
<app-main :style="{width: width+'px', height: height+'px'}" />
|
||||||
|
<el-footer style="height:30px;text-align:right;line-height: 30px;">
|
||||||
|
<span style="font-size:14px;">Copyright ©2018 北京玖琏科技有限公司 京ICP备18028522号</span>
|
||||||
|
</el-footer>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -37,7 +40,7 @@ export default {
|
|||||||
return this.$store.state.app.width;
|
return this.$store.state.app.width;
|
||||||
},
|
},
|
||||||
height() {
|
height() {
|
||||||
return this.$store.state.app.height - 60;
|
return this.$store.state.app.height - 60-30;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -5,9 +5,9 @@ import NProgress from 'nprogress'; // Progress 进度条
|
|||||||
import 'nprogress/nprogress.css';// Progress 进度条样式
|
import 'nprogress/nprogress.css';// Progress 进度条样式
|
||||||
import { admin, userDesign} from './router';
|
import { admin, userDesign} from './router';
|
||||||
import { getToken, getScreenToken, getDesignToken} from '@/utils/auth'; // 验权
|
import { getToken, getScreenToken, getDesignToken} from '@/utils/auth'; // 验权
|
||||||
// getPlanToken
|
|
||||||
import { LoginParams } from '@/utils/login';
|
import { LoginParams } from '@/utils/login';
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
|
import localStore from 'storejs';
|
||||||
|
|
||||||
function hasPermission(roles, permissionRoles) {
|
function hasPermission(roles, permissionRoles) {
|
||||||
if (roles.indexOf(admin) >= 0) return true;
|
if (roles.indexOf(admin) >= 0) return true;
|
||||||
@ -29,7 +29,6 @@ function getRouteInfo(to) {
|
|||||||
let getTokenInfo = () => { };
|
let getTokenInfo = () => { };
|
||||||
let clientId = '';
|
let clientId = '';
|
||||||
const toRoutePath = to.redirectedFrom || to.path;
|
const toRoutePath = to.redirectedFrom || to.path;
|
||||||
|
|
||||||
if (/^\/dp/.test(toRoutePath) || /^\/display\/dp/.test(toRoutePath)) {
|
if (/^\/dp/.test(toRoutePath) || /^\/display\/dp/.test(toRoutePath)) {
|
||||||
loginPath = loginScreenPage;
|
loginPath = loginScreenPage;
|
||||||
getTokenInfo = getScreenToken;
|
getTokenInfo = getScreenToken;
|
||||||
@ -88,7 +87,15 @@ function handleRoute(to, from, next, routeInfo) {
|
|||||||
} else {
|
} else {
|
||||||
// 除没有动态改变权限的需求可直接next() 删下方权限判断
|
// 除没有动态改变权限的需求可直接next() 删下方权限判断
|
||||||
if (hasPermission(store.getters.roles, to.meta.roles)) {
|
if (hasPermission(store.getters.roles, to.meta.roles)) {
|
||||||
next();
|
if (to.path==='/404' && to.redirectedFrom==='/') {
|
||||||
|
if (getSessionStorage('design') === 'true') {
|
||||||
|
next('/design/home');
|
||||||
|
} else {
|
||||||
|
next(localStore.get('trainingPlatformRoute'+store.getters.id) ||'/trainingPlatform');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
next();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
next({ path: '/401', replace: true, query: { noGoBack: true } });
|
next({ path: '/401', replace: true, query: { noGoBack: true } });
|
||||||
}
|
}
|
||||||
|
@ -153,6 +153,14 @@ export const userPlan = '015'; // 计划系统
|
|||||||
export const userDesign='016'; // 设计系统
|
export const userDesign='016'; // 设计系统
|
||||||
const isDev = process.env.NODE_ENV === 'development';
|
const isDev = process.env.NODE_ENV === 'development';
|
||||||
|
|
||||||
|
// const design = getSessionStorage('design');
|
||||||
|
// let redirectPath = '';
|
||||||
|
// if (design === 'true') {
|
||||||
|
// redirectPath = '/design/home';
|
||||||
|
// } else {
|
||||||
|
// redirectPath = '/trainingPlatform';
|
||||||
|
// }
|
||||||
|
|
||||||
export const UrlConfig = {
|
export const UrlConfig = {
|
||||||
display: '/display',
|
display: '/display',
|
||||||
scriptDisplay: '/scriptDisplay',
|
scriptDisplay: '/scriptDisplay',
|
||||||
@ -313,6 +321,11 @@ export const constantRoutes = [
|
|||||||
component: Jlmap3dedit,
|
component: Jlmap3dedit,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// path: '/',
|
||||||
|
// redirect: redirectPath,
|
||||||
|
// hidden: true
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
path: '/401',
|
path: '/401',
|
||||||
component: Error401,
|
component: Error401,
|
||||||
|
@ -11,6 +11,7 @@ const getters = {
|
|||||||
roles: state => state.user.roles,
|
roles: state => state.user.roles,
|
||||||
canvasWidth: state => state.config.width,
|
canvasWidth: state => state.config.width,
|
||||||
canvasHeight: state => state.config.height,
|
canvasHeight: state => state.config.height,
|
||||||
|
id: state => state.user.id,
|
||||||
permission_routes: state => state.permission.routes
|
permission_routes: state => state.permission.routes
|
||||||
};
|
};
|
||||||
export default getters;
|
export default getters;
|
||||||
|
@ -89,7 +89,7 @@ function handle(state, data) {
|
|||||||
state.tipOperateCount++;
|
state.tipOperateCount++;
|
||||||
break;
|
break;
|
||||||
case 'JointTraining_Device':
|
case 'JointTraining_Device':
|
||||||
handleDeviceInfo(state, msg);
|
state.realDeviceInfo++;
|
||||||
break;
|
break;
|
||||||
case 'Simulation_Control_Pause': // 暂停中
|
case 'Simulation_Control_Pause': // 暂停中
|
||||||
store.dispatch('scriptRecord/updateSimulationPause', msg);
|
store.dispatch('scriptRecord/updateSimulationPause', msg);
|
||||||
@ -185,11 +185,6 @@ function handleUserinfo(state, data) {
|
|||||||
state.roleInfo = data;
|
state.roleInfo = data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function handleDeviceInfo(state, data) {
|
|
||||||
if (data) {
|
|
||||||
state.deviceInfo = data;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function handleMessageInfo(state, type, data) {
|
function handleMessageInfo(state, type, data) {
|
||||||
const message = {
|
const message = {
|
||||||
join: true,
|
join: true,
|
||||||
@ -284,7 +279,7 @@ const socket = {
|
|||||||
permissionOver: {}, // 权限结束
|
permissionOver: {}, // 权限结束
|
||||||
|
|
||||||
tipOperateCount: 0, // 任务结束提示消息
|
tipOperateCount: 0, // 任务结束提示消息
|
||||||
deviceInfo: [] // 真实设备信息
|
realDeviceInfo: 0 // 真实设备信息
|
||||||
},
|
},
|
||||||
|
|
||||||
getters: {
|
getters: {
|
||||||
|
@ -3,9 +3,9 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// 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.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.41:9000'; // 王兴杰
|
||||||
} else {
|
} else {
|
||||||
BASE_API = process.env.VUE_APP_BASE_API;
|
BASE_API = process.env.VUE_APP_BASE_API;
|
||||||
|
@ -1,214 +1,213 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList"></QueryListPage>
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<el-dialog :title="this.$t('approval.explanation')" :visible.sync="dialogFormVisible" v-dialogDrag>
|
<el-dialog v-dialogDrag :title="this.$t('approval.explanation')" :visible.sync="dialogFormVisible">
|
||||||
<!--<el-input type="textarea"
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
:rows="2"
|
<div slot="footer" class="dialog-footer">
|
||||||
:placeholder="this.$t('rules.enterRejectReason')"
|
<el-button @click="rejectCancel">{{ $t('global.cancel') }}</el-button>
|
||||||
@focus="inputFocus"
|
<el-button type="primary" @click="rejectConfirm">{{ $t('global.confirm') }}</el-button>
|
||||||
@blur="inputBlur"
|
</div>
|
||||||
v-model="textarea"></el-input>
|
</el-dialog>
|
||||||
<span v-show="needReason" style="color: red">{{'*'+$t('rules.enterRejectReason')}}</span>-->
|
<lesson-detail ref="lessonDetail" />
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="rejectCancel">{{$t('global.cancel')}}</el-button>
|
|
||||||
<el-button type="primary" @click="rejectConfirm">{{$t('global.confirm')}}</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<lesson-detail ref="lessonDetail"></lesson-detail>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {adminPublishLesson,rejectedLessonRelease,reviewLessonList} from '@/api/designPlatform';
|
import {adminPublishLesson, rejectedLessonRelease, reviewLessonList} from '@/api/designPlatform';
|
||||||
import { listPublishMap } from '@/api/jmap/map';
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
import LessonDetail from './detail';
|
import LessonDetail from './detail';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LessonApproval',
|
name: 'LessonApproval',
|
||||||
components: {
|
components: {
|
||||||
LessonDetail
|
LessonDetail
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return{
|
return {
|
||||||
dialogFormVisible: false,
|
dialogFormVisible: false,
|
||||||
rejectId: '',
|
rejectId: '',
|
||||||
formModel: {
|
formModel: {
|
||||||
explanation: ''
|
explanation: ''
|
||||||
},
|
},
|
||||||
mapList: [],
|
mapList: [],
|
||||||
pagerConfig: {
|
pagerConfig: {
|
||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
reset: true,
|
reset: true,
|
||||||
queryObject: {
|
queryObject: {
|
||||||
mapId: {
|
mapId: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: this.$t('approval.map')+this.$t('global.colon'),
|
label: this.$t('approval.map')+this.$t('global.colon'),
|
||||||
config: {
|
config: {
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
lessonName: {
|
lessonName: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: this.$t('lesson.courseName')
|
label: this.$t('lesson.courseName')
|
||||||
},
|
},
|
||||||
userName: {
|
userName: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: this.$t('approval.applicant')+this.$t('global.colon'),
|
label: this.$t('approval.applicant')+this.$t('global.colon')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
query: reviewLessonList,
|
query: reviewLessonList,
|
||||||
selectCheckShow: false,
|
selectCheckShow: false,
|
||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('lesson.courseName'),
|
title: this.$t('lesson.courseName'),
|
||||||
prop: 'name'
|
prop: 'name'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('approval.map'),
|
title: this.$t('approval.map'),
|
||||||
prop: 'mapId ',
|
prop: 'mapId ',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.mapId , this.mapList, ['value', 'label']); },
|
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('approval.courseDescription'),
|
title: this.$t('approval.courseDescription'),
|
||||||
prop: 'remarks'
|
prop: 'remarks'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('approval.applicant'),
|
title: this.$t('approval.applicant'),
|
||||||
prop: 'userName'
|
prop: 'userName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('approval.applyTime'),
|
title: this.$t('approval.applyTime'),
|
||||||
prop: 'uploadTime',
|
prop: 'uploadTime',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.handleTime(row.uploadTime)},
|
columnValue: (row) => { return this.handleTime(row.uploadTime); },
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: this.$t('global.operate'),
|
title: this.$t('global.operate'),
|
||||||
width: '250',
|
width: '400',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: this.$t('approval.lookOver'),
|
name: this.$t('approval.lookOver'),
|
||||||
handleClick: this.goDetail,
|
handleClick: this.goDetail,
|
||||||
type: ''
|
type: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('approval.applyPassed'),
|
name: this.$t('approval.applyPassed'),
|
||||||
handleClick: this.pass,
|
handleClick: this.pass,
|
||||||
type: ''
|
type: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('approval.applyReject'),
|
name: this.$t('approval.applyReject'),
|
||||||
handleClick: this.noPass,
|
handleClick: this.noPass,
|
||||||
type: ''
|
type: ''
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
form :{
|
form: {
|
||||||
labelWidth: '150px',
|
labelWidth: '150px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'explanation', label: this.$t('approval.explanation'), type: 'textarea', required: true},
|
{ prop: 'explanation', label: this.$t('approval.explanation'), type: 'textarea', required: true}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
rules :{
|
rules: {
|
||||||
explanation: [
|
explanation: [
|
||||||
{ required: true, message: this.$t('rules.enterRejectReason'), trigger: 'blur' }
|
{ required: true, message: this.$t('rules.enterRejectReason'), trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
created(){
|
watch: {
|
||||||
listPublishMap().then(response=>{
|
|
||||||
response.data.forEach(elem => {
|
|
||||||
this.mapList.push({ value: elem.id, label: elem.name });
|
|
||||||
});
|
|
||||||
this.queryForm.queryObject.mapId.config.data = this.mapList;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
mounted(){
|
|
||||||
|
|
||||||
},
|
},
|
||||||
beforeDestroy(){
|
created() {
|
||||||
|
listPublishMap().then(response=>{
|
||||||
|
response.data.forEach(elem => {
|
||||||
|
this.mapList.push({ value: elem.id, label: elem.name });
|
||||||
|
});
|
||||||
|
this.queryForm.queryObject.mapId.config.data = this.mapList;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
beforeDestroy() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goDetail(index,row) {
|
goDetail(index, row) {
|
||||||
this.$refs.lessonDetail.show(row.id);
|
this.$refs.lessonDetail.show(row.id);
|
||||||
},
|
},
|
||||||
pass(index,row) {
|
pass(index, row) {
|
||||||
this.$confirm(this.$t('tip.publishTheCourseHint'), this.$t('global.tips'), {
|
this.$confirm(this.$t('tip.publishTheCourseHint'), this.$t('global.tips'), {
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
cancelButtonText: this.$t('global.cancel'),
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
const params = {
|
const params = {
|
||||||
cityCode: row.cityCode,
|
cityCode: row.cityCode,
|
||||||
mapId: row.mapId,
|
mapId: row.mapId,
|
||||||
name: row.name,
|
name: row.name,
|
||||||
prdCode: row.prdCode
|
prdCode: row.prdCode
|
||||||
};
|
};
|
||||||
adminPublishLesson(params,row.id).then(response => {
|
adminPublishLesson(params, row.id).then(response => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$message.success(this.$t('tip.coursePublishSuccessful'));
|
this.$message.success(this.$t('tip.coursePublishSuccessful'));
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$messageBox(this.$t('tip.coursePublishFailed'));
|
this.$messageBox(this.$t('tip.coursePublishFailed'));
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
noPass(index,row) {
|
noPass(index, row) {
|
||||||
this.dialogFormVisible = true;
|
this.dialogFormVisible = true;
|
||||||
this.rejectId = row.id;
|
this.rejectId = row.id;
|
||||||
},
|
},
|
||||||
handleTime(time) {
|
handleTime(time) {
|
||||||
let timeList = time.split("T");
|
const timeList = time.split('T');
|
||||||
return timeList[0] + ' ' +timeList[1];
|
return timeList[0] + ' ' +timeList[1];
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.$refs.queryListPage.refresh(true);
|
this.$refs.queryListPage.refresh(true);
|
||||||
},
|
},
|
||||||
rejectConfirm() {
|
rejectConfirm() {
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
if (this.rejectId){
|
if (this.rejectId) {
|
||||||
rejectedLessonRelease(this.formModel,this.rejectId).then(resp =>{
|
rejectedLessonRelease(this.formModel, this.rejectId).then(resp =>{
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$message.success(this.$t('tip.rejectedCourseReleaseApplicationSuccessful'));
|
this.$message.success(this.$t('tip.rejectedCourseReleaseApplicationSuccessful'));
|
||||||
this.dialogFormVisible = false;
|
this.dialogFormVisible = false;
|
||||||
this.rejectId = '';
|
this.rejectId = '';
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$messageBox(this.$t('tip.rejectedCourseReleaseApplicationSuccessful'));
|
this.$messageBox(this.$t('tip.rejectedCourseReleaseApplicationSuccessful'));
|
||||||
this.dialogFormVisible = false;
|
this.dialogFormVisible = false;
|
||||||
this.rejectId = '';
|
this.rejectId = '';
|
||||||
this.doClose();
|
this.doClose();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
rejectCancel() {
|
rejectCancel() {
|
||||||
this.dialogFormVisible = false;
|
this.dialogFormVisible = false;
|
||||||
this.rejectId = '';
|
this.rejectId = '';
|
||||||
this.textarea = '';
|
this.textarea = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
/deep/
|
||||||
|
.el-row .el-button+.el-button{
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
<script>
|
<script>
|
||||||
import RunPlanOperate from './operate';
|
import RunPlanOperate from './operate';
|
||||||
import { reviewRunPlanList,publishRunPlan,rejectRunPlan,previewRunPlan } from '@/api/designPlatform';
|
import { reviewRunPlanList,publishRunPlan,rejectRunPlan,previewRunPlan } from '@/api/designPlatform';
|
||||||
import { listPublishMap } from '@/api/jmap/map';
|
// import { listPublishMap } from '@/api/jmap/map';
|
||||||
|
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||||
|
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
export default {
|
export default {
|
||||||
@ -24,22 +26,23 @@
|
|||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
|
skinList:[],
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '100px',
|
labelWidth: '150px',
|
||||||
reset: true,
|
reset: true,
|
||||||
queryObject: {
|
queryObject: {
|
||||||
mapId: {
|
mapId: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: this.$t('approval.map'),
|
label: this.$t('approval.skin'),
|
||||||
config: {
|
config: {
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'scriptName':{
|
'name':{
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: this.$t('approval.runPlanName')
|
label: this.$t('approval.runPlanName')
|
||||||
},
|
},
|
||||||
'userName': {
|
'creatorName': {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: this.$t('approval.applicant')
|
label: this.$t('approval.applicant')
|
||||||
}
|
}
|
||||||
@ -57,16 +60,16 @@
|
|||||||
prop: 'name'
|
prop: 'name'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('approval.map'),
|
title: this.$t('approval.skin'),
|
||||||
prop: 'mapId ',
|
prop: 'mapId ',
|
||||||
width:250,
|
width:250,
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.mapId , this.mapList, ['value', 'label']); },
|
columnValue: (row) => { return this.$convertField(row.skinCode , this.skinList, ['value', 'label']); },
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('approval.applicant'),
|
title: this.$t('approval.applicant'),
|
||||||
prop: 'userName'
|
prop: 'creatorName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('approval.applyTime'),
|
title: this.$t('approval.applyTime'),
|
||||||
@ -124,11 +127,11 @@
|
|||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
try {
|
try {
|
||||||
// 获取地图
|
// 获取地图
|
||||||
this.mapList = [];
|
this.skinList = [];
|
||||||
const res = await listPublishMap();
|
const res = await getSkinCodeList();
|
||||||
res.data.forEach(elem => {
|
res.data.forEach(elem => {
|
||||||
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
this.queryForm.queryObject.mapId.config.data.push({ value: elem.code, label: elem.name });
|
||||||
this.mapList.push({ value: elem.id, label: elem.name });
|
this.skinList.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error, '获取发布地图');
|
console.error(error, '获取发布地图');
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<!-- <script-operate ref='applyPassed' @reloadTable="reloadTable" @create="handleConfirmPass" :title="$t('approval.passedScript')" type="applyPassed">
|
|
||||||
</script-operate> -->
|
|
||||||
<script-operate ref='applyReject' @reloadTable="reloadTable" @create="handleConfirmReject" :title="$t('approval.rejectScript')">
|
<script-operate ref='applyReject' @reloadTable="reloadTable" @create="handleConfirmReject" :title="$t('approval.rejectScript')">
|
||||||
</script-operate>
|
</script-operate>
|
||||||
</div>
|
</div>
|
||||||
@ -37,7 +35,7 @@
|
|||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'scriptName':{
|
'name':{
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: this.$t('approval.scriptName')
|
label: this.$t('approval.scriptName')
|
||||||
},
|
},
|
||||||
@ -45,7 +43,7 @@
|
|||||||
type: 'text',
|
type: 'text',
|
||||||
label: this.$t('approval.applicant')
|
label: this.$t('approval.applicant')
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
@ -178,4 +176,10 @@
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
/deep/
|
||||||
|
.el-row .el-button+.el-button{
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
<span
|
<span
|
||||||
class="el-icon-tickets"
|
class="el-icon-tickets"
|
||||||
:style="{color: data.valid ? 'green':''}"
|
:style="{color: data.valid ? 'green':''}"
|
||||||
> {{ tnode.label }}</span>
|
></span>
|
||||||
|
<span> {{ tnode.label }}</span>
|
||||||
</span>
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
height() {
|
height() {
|
||||||
return this.$store.state.app.height - 50;
|
return this.$store.state.app.height - 50-30;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -40,7 +40,7 @@ export default {
|
|||||||
'lessonbar'
|
'lessonbar'
|
||||||
]),
|
]),
|
||||||
height() {
|
height() {
|
||||||
return this.$store.state.app.height - 50;
|
return this.$store.state.app.height - 50-30;
|
||||||
},
|
},
|
||||||
width() {
|
width() {
|
||||||
return this.$store.state.app.width;
|
return this.$store.state.app.width;
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
<span
|
<span
|
||||||
class="el-icon-tickets"
|
class="el-icon-tickets"
|
||||||
:style="{color: data.valid ? 'green':''}"
|
:style="{color: data.valid ? 'green':''}"
|
||||||
> {{ tnode.label }}</span>
|
></span>
|
||||||
|
<span> {{ tnode.label }}</span>
|
||||||
</span>
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
@ -281,7 +281,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.zoom-view {
|
.zoom-view {
|
||||||
position: fixed;
|
// position: fixed;
|
||||||
|
position: absolute;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,22 +5,25 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="display: flex;align-items:flex-start">
|
<div style="display: flex;align-items:flex-start">
|
||||||
<div class="tree_box">
|
<div class="tree_box">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-50) +'px' }">
|
<div style="border: 2px dashed #B0C4DE">
|
||||||
<el-tree
|
<p>{{ this.$t('lesson.courseTree') }}</p>
|
||||||
ref="tree"
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-80) +'px' }">
|
||||||
style="width: 380px"
|
<el-tree
|
||||||
:data="treeList"
|
ref="tree"
|
||||||
node-key="id"
|
style="width: 370px"
|
||||||
:props="defaultProps"
|
:data="treeList"
|
||||||
default-expand-all
|
node-key="id"
|
||||||
highlight-current
|
:props="defaultProps"
|
||||||
:span="22"
|
default-expand-all
|
||||||
:filter-node-method="filterNode"
|
highlight-current
|
||||||
:default-expanded-keys="expandList"
|
:span="22"
|
||||||
@node-contextmenu="showContextMenu"
|
:filter-node-method="filterNode"
|
||||||
@node-click="clickEvent"
|
:default-expanded-keys="expandList"
|
||||||
/>
|
@node-contextmenu="showContextMenu"
|
||||||
</el-scrollbar>
|
@node-click="clickEvent"
|
||||||
|
/>
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<transition>
|
<transition>
|
||||||
<router-view @refresh="refresh" />
|
<router-view @refresh="refresh" />
|
||||||
@ -136,7 +139,8 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
left: 10px;
|
left: 10px;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
padding-right: 10px;
|
padding-right: 20px;
|
||||||
|
padding-top: 20px;
|
||||||
}
|
}
|
||||||
.right_box{
|
.right_box{
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<div style="height: 100%; overflow: hidden">
|
<div style="height: 100%; overflow: hidden">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div class="button_group">
|
<div class="button_group">
|
||||||
|
<el-button v-if="hasRelease" size="mini" @click="operationManage">{{ $t('lesson.trainingRule') }}</el-button>
|
||||||
<el-button v-if="hasRelease" size="mini" @click="trainingManage">{{ $t('lesson.trainingManage') }}</el-button>
|
<el-button v-if="hasRelease" size="mini" @click="trainingManage">{{ $t('lesson.trainingManage') }}</el-button>
|
||||||
<el-button v-if="hasRelease" size="mini" @click="taskManage">{{ $t('lesson.taskManage') }}</el-button>
|
<el-button v-if="hasRelease" size="mini" @click="taskManage">{{ $t('lesson.taskManage') }}</el-button>
|
||||||
<el-button v-if="hasRelease" size="mini" @click="operationManage">{{ $t('lesson.trainingRule') }}</el-button>
|
|
||||||
<el-button size="mini" type="primary" @click="lessonCreateByPublish">{{ $t('lesson.createNewCoursesFromRelease') }}</el-button>
|
<el-button size="mini" type="primary" @click="lessonCreateByPublish">{{ $t('lesson.createNewCoursesFromRelease') }}</el-button>
|
||||||
<el-button size="mini" type="primary" @click="lessonCreate">{{ $t('lesson.newConstruction') }}</el-button>
|
<el-button size="mini" type="primary" @click="lessonCreate">{{ $t('lesson.newConstruction') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -78,6 +78,14 @@ export default {
|
|||||||
title: this.$t('global.operate'),
|
title: this.$t('global.operate'),
|
||||||
width: '400',
|
width: '400',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
{
|
||||||
|
name: this.$t('lesson.courseDetails'),
|
||||||
|
handleClick: this.goDetail,
|
||||||
|
type: 'primary',
|
||||||
|
showControl: (row) => {
|
||||||
|
return row.status !=='1';
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('lesson.contentSorting'),
|
name: this.$t('lesson.contentSorting'),
|
||||||
handleClick: this.treeSort,
|
handleClick: this.treeSort,
|
||||||
@ -125,14 +133,6 @@ export default {
|
|||||||
showControl: (row) => {
|
showControl: (row) => {
|
||||||
return row.status ==='1';
|
return row.status ==='1';
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
name: this.$t('lesson.courseDetails'),
|
|
||||||
handleClick: this.goDetail,
|
|
||||||
type: 'primary',
|
|
||||||
showControl: (row) => {
|
|
||||||
return row.status !=='1';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -210,7 +210,7 @@ export default {
|
|||||||
this.$refs.queryListPage.refresh(true);
|
this.$refs.queryListPage.refresh(true);
|
||||||
},
|
},
|
||||||
lessonCreate() {
|
lessonCreate() {
|
||||||
this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`, query: {skinCode: this.$route.params.skinCode} });
|
this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`, query: {skinCode: this.$route.params.skinCode, mapId: this.$route.params.mapId, cityCode: this.$route.query.cityCode} });
|
||||||
},
|
},
|
||||||
lessonCreateByPublish() {
|
lessonCreateByPublish() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@ -227,6 +227,7 @@ export default {
|
|||||||
this.$message.success(this.$t('tip.successfullyDelete'));
|
this.$message.success(this.$t('tip.successfullyDelete'));
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.refresh();
|
this.refresh();
|
||||||
|
this.loading = false;
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('tip.failDelete'));
|
this.$messageBox(this.$t('tip.failDelete'));
|
||||||
});
|
});
|
||||||
|
@ -9,16 +9,6 @@
|
|||||||
label-width="140px"
|
label-width="140px"
|
||||||
@submit.native.prevent
|
@submit.native.prevent
|
||||||
>
|
>
|
||||||
<el-form-item :label="this.$t('lesson.releaseAssociatedCity')" prop="cityCode">
|
|
||||||
<el-select v-model="editModel.cityCode" :placeholder="this.$t('rules.pleaseSelect')" :disabled="this.disabled" @change="cityChange">
|
|
||||||
<el-option v-for="item in cityList" :key="item.code" :label="item.name" :value="item.code" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="this.$t('lesson.releaseAssociatedMap')" prop="mapId">
|
|
||||||
<el-select v-model="editModel.mapId" :placeholder="this.$t('rules.pleaseSelect')" :disabled="this.disabled" @change="mapChange">
|
|
||||||
<el-option v-for="item in mapList" :key="item.id" :label="item.name" :value="item.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="this.$t('lesson.publishCourseName')" prop="name">
|
<el-form-item :label="this.$t('lesson.publishCourseName')" prop="name">
|
||||||
<el-input v-model="editModel.name" :disabled="!this.hasRelease" />
|
<el-input v-model="editModel.name" :disabled="!this.hasRelease" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -33,7 +23,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getPublishMapListBySkinCode } from '@/api/jmap/map';
|
import { getPublishMapListBySkinCode } from '@/api/jmap/map';
|
||||||
import { getLessonNameByMapIdAndLessonId } from '@/api/jmap/lessondraft';
|
|
||||||
import { adminPublishLesson, releaseOrCancel } from '@/api/designPlatform';
|
import { adminPublishLesson, releaseOrCancel } from '@/api/designPlatform';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -78,16 +67,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
cityChange(code) {
|
|
||||||
this.editModel.mapId = '';
|
|
||||||
this.mapList = this.cityMapDict[code];
|
|
||||||
},
|
|
||||||
async mapChange(mapId) {
|
|
||||||
const resp = await getLessonNameByMapIdAndLessonId({ mapId: mapId, lessonId: this.editModel.id });
|
|
||||||
if (resp && resp.data) {
|
|
||||||
this.editModel.name = resp.data.name;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
doShow(model) {
|
doShow(model) {
|
||||||
this.mapList = [];
|
this.mapList = [];
|
||||||
this.cityList = [];
|
this.cityList = [];
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@submit.native.prevent
|
@submit.native.prevent
|
||||||
>
|
>
|
||||||
<el-form-item :label="this.$t('map.mapName')" prop="name">
|
<el-form-item :label="this.$t('orderAuthor.permissionName')" prop="name">
|
||||||
<el-input v-model="editModel.name" />
|
<el-input v-model="editModel.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('orderAuthor.describtion')" prop="remarks">
|
<el-form-item :label="this.$t('orderAuthor.describtion')" prop="remarks">
|
||||||
|
@ -75,7 +75,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
height() {
|
height() {
|
||||||
return this.$store.state.app.height - 50;
|
return this.$store.state.app.height - 50-30;
|
||||||
},
|
},
|
||||||
skinCode() {
|
skinCode() {
|
||||||
return this.$route.query.skinCode || '02';
|
return this.$route.query.skinCode || '02';
|
||||||
|
@ -1,171 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-card :style="{height: height+'px'}">
|
|
||||||
<div class="home-box">
|
|
||||||
<el-card class="box-card">
|
|
||||||
<div id="scriptTitle">{{$t('scriptRecord.scriptDetail')}}</div>
|
|
||||||
<div id="sciptForm">
|
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
|
||||||
</div>
|
|
||||||
<div id="btnList">
|
|
||||||
<span slot="footer" class="btn-footer">
|
|
||||||
<el-button type="success" @click="drawUp">{{$t('scriptRecord.scriptRecord')}}</el-button>
|
|
||||||
<el-button type="primary" @click="modifyScript">{{$t('scriptRecord.scriptModify')}}</el-button>
|
|
||||||
<el-button type="danger" @click="deleteScript">{{$t('scriptRecord.scriptDelete')}}</el-button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import Cookies from 'js-cookie';
|
|
||||||
import { UrlConfig } from '@/router/index';
|
|
||||||
import {listPublishMap} from '@/api/jmap/map';
|
|
||||||
import {getQuestById, updateQuest, deleteQuest} from '@/api/quest';
|
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
|
||||||
import { scriptRecordNotify } from '@/api/simulation';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'ScriptDetail',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
mapList: [],
|
|
||||||
taskStatusList: [],
|
|
||||||
disabled: true,
|
|
||||||
formModel: {
|
|
||||||
name: '',
|
|
||||||
mapId: '',
|
|
||||||
description: ''
|
|
||||||
},
|
|
||||||
isShow: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
form() {
|
|
||||||
const form = {
|
|
||||||
labelWidth: '150px',
|
|
||||||
items: [
|
|
||||||
{ prop: 'name', label: this.$t('scriptRecord.scriptName'), type: 'text', required: true},
|
|
||||||
{ prop: 'mapId', label: this.$t('scriptRecord.map'), type: 'select', required: true, options: this.mapList, disabled: this.disabled},
|
|
||||||
{ prop: 'description', label: this.$t('scriptRecord.scriptDescription'), type: 'textarea', required: true}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
return form;
|
|
||||||
},
|
|
||||||
rules() {
|
|
||||||
const crules = {
|
|
||||||
name: [
|
|
||||||
{ required: true, message: this.$t('scriptRecord.scriptNameRule'), trigger: 'blur' },
|
|
||||||
{ required: true, message: this.$t('scriptRecord.scriptNameRule'), trigger: 'change' }
|
|
||||||
],
|
|
||||||
mapId: [
|
|
||||||
{ required: true, message: '请选择地图', trigger: 'change' }
|
|
||||||
],
|
|
||||||
description: [
|
|
||||||
{ required: true, message: this.$t('scriptRecord.scriptDescriptionRule'), trigger: 'blur' },
|
|
||||||
{ required: true, message: this.$t('scriptRecord.scriptDescriptionRule'), trigger: 'change' }
|
|
||||||
]
|
|
||||||
};
|
|
||||||
return crules;
|
|
||||||
},
|
|
||||||
height() {
|
|
||||||
return this.$store.state.app.height - 50;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
$route(newVal) {
|
|
||||||
this.loadInitData();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
listPublishMap().then(response => {
|
|
||||||
this.mapList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
|
||||||
this.loadInitData();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
loadInitData() {
|
|
||||||
const scriptId =this.$route.params.scriptId;
|
|
||||||
if (parseInt(scriptId)) {
|
|
||||||
getQuestById(scriptId).then(resp=>{
|
|
||||||
const data={'name': resp.data.name, 'description': resp.data.description, 'mapId': resp.data.mapId,'lang':resp.data.lang};
|
|
||||||
this.formModel=data;
|
|
||||||
this.formModel.id=scriptId;
|
|
||||||
}).catch(error => {
|
|
||||||
this.$message.error(this.$t('scriptRecord.getScriptFail')+':' + error.message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
drawUp() {
|
|
||||||
const data=this.formModel;
|
|
||||||
scriptRecordNotify(data.id).then(resp => {
|
|
||||||
const query = { mapId: data.mapId, group: resp.data, scriptId: data.id,lang:data.lang };
|
|
||||||
this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query });
|
|
||||||
launchFullscreen();
|
|
||||||
}).catch(error => {
|
|
||||||
this.$messageBox(`${this.$t('scriptRecord.createSimulationFail')}: ${error.message}`);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
modifyScript() {
|
|
||||||
const data=this.formModel;
|
|
||||||
if(Cookies.get("user_lang")=="en"){
|
|
||||||
data.lang='en';
|
|
||||||
}else{
|
|
||||||
data.lang='zh';
|
|
||||||
}
|
|
||||||
updateQuest(data.id, data).then(resp => {
|
|
||||||
this.$emit('refresh');
|
|
||||||
this.$message.success(this.$t('scriptRecord.modifyScriptSuccess'));
|
|
||||||
}).catch(error => {
|
|
||||||
this.$messageBox(`${this.$t('scriptRecord.modifyScriptFail')}: ${error.message}`);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
deleteScript() {
|
|
||||||
const data=this.formModel;
|
|
||||||
this.$confirm(this.$t('scriptRecord.deleteScriptTip'), this.$t('global.tips'), {
|
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
|
||||||
cancelButtonText: this.$t('global.cancel'),
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
deleteQuest(data.id).then(response => {
|
|
||||||
this.$message.success(this.$t('scriptRecord.deleteScriptSucess'));
|
|
||||||
this.$emit('refresh');
|
|
||||||
this.$router.push({ path: `${UrlConfig.script.prefix}` });
|
|
||||||
}).catch(() => {
|
|
||||||
this.$messageBox(this.$t('scriptRecord.deleteScriptFail'));
|
|
||||||
});
|
|
||||||
}).catch(() => { });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
@import "src/styles/mixin.scss";
|
|
||||||
.home-box {
|
|
||||||
padding: 20px 100px;
|
|
||||||
float: left;
|
|
||||||
width: 100%;
|
|
||||||
font-family: 'Microsoft YaHei';
|
|
||||||
}
|
|
||||||
.box-card {
|
|
||||||
width:800px;
|
|
||||||
margin: 0 auto;
|
|
||||||
margin-top: 20px;
|
|
||||||
padding-bottom: 50px;
|
|
||||||
}
|
|
||||||
#scriptTitle{
|
|
||||||
padding: 30px 40px;
|
|
||||||
}
|
|
||||||
#sciptForm{
|
|
||||||
margin-top: 10px;
|
|
||||||
padding: 0px 130px 0px 100px;
|
|
||||||
}
|
|
||||||
#btnList{
|
|
||||||
margin: 0px 100px;
|
|
||||||
}
|
|
||||||
.btn-footer{
|
|
||||||
margin-left: 100px;
|
|
||||||
margin-top: 10px;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -116,7 +116,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
height() {
|
height() {
|
||||||
return this.$store.state.app.height - 50;
|
return this.$store.state.app.height - 50-30;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -174,10 +174,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="Scheduling">
|
<div class="Scheduling">
|
||||||
<p class="title">真实设备-<span>{{ hasPlc?'[PLC网关在线]':'[PLC网关离线]' }}</span></p>
|
<p class="title">{{ $t('trainRoom.realDevice') }}-<span>{{ hasPlc?$t('trainRoom.plcGatewayOnline'):$t('trainRoom.plcGatewayOffline') }}</span></p>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(nor, index) in stationStandList" :key="index" class="selectPerson">
|
<li v-for="(nor, index) in stationStandList" :key="index" class="selectPerson">
|
||||||
<span>{{ realDeviceType[nor.deviceType] }}</span>
|
<span>{{ realDeviceType[nor.deviceType] }}</span>
|
||||||
|
<i
|
||||||
|
v-if="userId == roomInfo.creatorId"
|
||||||
|
class="el-icon-close delPerson"
|
||||||
|
@click="handleDelDevice(nor)"
|
||||||
|
/>
|
||||||
<div style="float: right; margin-right: 15px;">
|
<div style="float: right; margin-right: 15px;">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="nor.deviceCode"
|
v-model="nor.deviceCode"
|
||||||
@ -284,7 +289,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getJoinTrainCode, deljointTrainRoom, putUserRoles, postRoomDetail, getJointTrainRoomUserList, putJointTrainingExit, startJointTraining, putJointTrainingSimulation, putJointTrainingSimulationEntrance, setRealDevice } from '@/api/chat';
|
import { getJoinTrainCode, deljointTrainRoom, putUserRoles, postRoomDetail, getJointTrainRoomUserList, putJointTrainingExit, startJointTraining, putJointTrainingSimulation, putJointTrainingSimulationEntrance, setRealDevice, delRealDevice, getRealDevices } from '@/api/chat';
|
||||||
import { getStationList } from '@/api/runplan';
|
import { getStationList } from '@/api/runplan';
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { DeviceMenu, RealDeviceType } from '@/scripts/ConstDic';
|
import { DeviceMenu, RealDeviceType } from '@/scripts/ConstDic';
|
||||||
@ -407,10 +412,8 @@ export default {
|
|||||||
await this.addPeopleList(val);
|
await this.addPeopleList(val);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.deviceInfo': async function (val) {
|
'$store.state.socket.realDeviceInfo': async function (val) {
|
||||||
if (val) { // 分配设备信息
|
await this.getDevicesList(); // 分配设备信息
|
||||||
await this.handlerDeviceList(val);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@ -422,7 +425,8 @@ export default {
|
|||||||
this.userId = this.$store.state.user.id;
|
this.userId = this.$store.state.user.id;
|
||||||
this.getRoomInfo(); // 获取房间信息 info
|
this.getRoomInfo(); // 获取房间信息 info
|
||||||
this.getUserList(); // 房间人员 列表
|
this.getUserList(); // 房间人员 列表
|
||||||
// this.checkPlcGateway(); //PLC网关
|
this.checkPlcGateway(); // PLC网关
|
||||||
|
this.getDevicesList(); // 获取真实设备列表
|
||||||
this.timeDemon = setInterval(() => {
|
this.timeDemon = setInterval(() => {
|
||||||
checkLoginLine();
|
checkLoginLine();
|
||||||
}, 5000 * 60);
|
}, 5000 * 60);
|
||||||
@ -723,7 +727,11 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
await putJointTrainingExit(this.$route.query.group);
|
await putJointTrainingExit(this.$route.query.group);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$router.push({ path: `/trainingPlatform/detail/${this.$route.query.subSystem}`, query: {mapId: this.mapId}});
|
if (this.$route.query.subSystem) {
|
||||||
|
this.$router.push({ path: `/trainingPlatform/detail/${this.$route.query.subSystem}`, query: {mapId: this.mapId}});
|
||||||
|
} else {
|
||||||
|
this.$router.go(-1);
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.messageInfo( this.$t('error.operationFailure'), 'error');
|
this.messageInfo( this.$t('error.operationFailure'), 'error');
|
||||||
}
|
}
|
||||||
@ -901,7 +909,7 @@ export default {
|
|||||||
this.hasPlc = false;
|
this.hasPlc = false;
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox('查询PLC设备失败!');
|
this.$messageBox(this.$t('error.inquiryPLCDeviceFailed'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleDoorList(mapId, stationList) {
|
handleDoorList(mapId, stationList) {
|
||||||
@ -910,33 +918,48 @@ export default {
|
|||||||
stationList.forEach(item => {
|
stationList.forEach(item => {
|
||||||
res.data.forEach(it =>{
|
res.data.forEach(it =>{
|
||||||
if (item.code === it.stationCode) {
|
if (item.code === it.stationCode) {
|
||||||
const direction = parseInt(it.doorLocationType)%2 ===0? '上行站台':'下行站台';
|
const direction = parseInt(it.doorLocationType)%2 ===0? this.$t('trainRoom.uplinkPlatform'):this.$t('trainRoom.downlinkPlatform');
|
||||||
doorList.push({code: it.code, name: item.name+direction});
|
doorList.push({code: it.code, name: item.name+direction});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.doorList = doorList;
|
this.doorList = doorList;
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.$messageBox('获取屏蔽门列表失败!');
|
this.$messageBox(this.$t('error.getScreenDoorsListFailed'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
addingDevice() {
|
addingDevice() {
|
||||||
const roomDeviceVo = {id: '', deviceType: 'ScreenDoor', deviceCode: ''};
|
const roomDeviceVo = {id: '', deviceType: 'ScreenDoor', deviceCode: ''};
|
||||||
|
let typeSame = false;
|
||||||
|
this.stationStandList.forEach( item =>{
|
||||||
|
if (item.deviceType === roomDeviceVo.deviceType) {
|
||||||
|
typeSame = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (typeSame) {
|
||||||
|
this.$message.info(this.$t('error.theDeviceTypeAlreadyExists'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
setRealDevice(this.$route.query.group, roomDeviceVo);
|
setRealDevice(this.$route.query.group, roomDeviceVo);
|
||||||
},
|
},
|
||||||
handleChangeDevice(nor, doorList, stationStandList) {
|
handleChangeDevice(nor, doorList, stationStandList) {
|
||||||
setRealDevice(this.$route.query.group, nor);
|
setRealDevice(this.$route.query.group, nor).then(resp => {
|
||||||
doorList.forEach(item => {
|
}).catch(() => {
|
||||||
item.disabled = false;
|
this.$messageBox(this.$t('error.connectToRealDeviceFailed'));
|
||||||
stationStandList.forEach(nor => {
|
|
||||||
if (item.code == nor.deviceCode) {
|
|
||||||
item.disabled = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handlerDeviceList(data) {
|
getDevicesList() {
|
||||||
this.stationStandList = [data];
|
getRealDevices(this.$route.query.group).then( resp => {
|
||||||
|
this.stationStandList = resp.data;
|
||||||
|
}).catch(() => {
|
||||||
|
this.$messageBox(this.$t('error.getRealDeviceListFailed'));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDelDevice(nor) {
|
||||||
|
delRealDevice(nor.id, this.$route.query.group).then( resp => {
|
||||||
|
}).catch(() => {
|
||||||
|
this.$messageBox(this.$t('error.deleteRealDeviceFailed'));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user