Merge remote-tracking branch 'origin/dev' into test

# Conflicts:
#	src/router/index.js
This commit is contained in:
fan 2019-10-31 17:49:20 +08:00
commit cf39a8fa89
32 changed files with 1047 additions and 1878 deletions

View File

@ -1,9 +1,9 @@
import request from '@/utils/request'; import request from '@/utils/request';
/** 获取课程树*/ // /** 获取课程树*/
export function getLessonTree(skinCode) { export function getLessonTree(lessonId) {
return request({ return request({
url: `/api/lessonDraft/${skinCode}/tree`, url: `/api/lessonDraft/${lessonId}/tree`,
method: 'get' method: 'get'
}); });
} }
@ -95,9 +95,9 @@ export function dragSortLessonChapter(data) {
}); });
} }
export function getLessonDrftList(params) { export function getLessonDrftList(mapId, params) {
return request({ return request({
url: `/api/lessonDraft`, url: `/api/lessonDraft/${mapId}/list`,
method: 'get', method: 'get',
params: params params: params
}); });

View File

@ -115,5 +115,9 @@ export default {
enterRunPlanName: 'Please enter the name of the diagram', enterRunPlanName: 'Please enter the name of the diagram',
setTheProject: 'Set the project', setTheProject: 'Set the project',
whetherItBelongsToTheProject: 'Whether it belongs to the project', whetherItBelongsToTheProject: 'Whether it belongs to the project',
belongsProject: 'Belongs project' belongsProject: 'Belongs project',
theBelongsProjectCannotBeEmpty: 'The belongs project cannot be empty',
pleaseSelectTheBelongsProject: 'Please select the belongs project',
copyMapAs: 'Copy map as',
whetherToCopyData: 'Whether to copy data'
}; };

View File

@ -215,5 +215,9 @@ export default {
applyRunPlanFail:'Submit run plan to publish fail!', applyRunPlanFail:'Submit run plan to publish fail!',
cancelRunPlanTips:'This action will revoke the run plan request, whether to continue?', cancelRunPlanTips:'This action will revoke the run plan request, whether to continue?',
cancelRunPlanSuccess:'Revoke run plan success!', cancelRunPlanSuccess:'Revoke run plan success!',
cancelRunPlanFail:'Revoke run plan fail!' cancelRunPlanFail:'Revoke run plan fail!',
setProjectSuccess: 'Set belongs project success!',
setProjectFail: 'Set belongs project fail!',
copyMapSuccess: 'Copy map success!',
copyMapFail: 'Copy map fail!'
}; };

View File

@ -119,5 +119,9 @@ export default {
// refreshFailed 刷新失败 // refreshFailed 刷新失败
setTheProject: '设置归属项目', setTheProject: '设置归属项目',
whetherItBelongsToTheProject: '是否归属项目', whetherItBelongsToTheProject: '是否归属项目',
belongsProject: '归属项目' belongsProject: '归属项目',
theBelongsProjectCannotBeEmpty: '所属项目不能为空',
pleaseSelectTheBelongsProject: '请选择归属项目',
copyMapAs: '复制地图为',
whetherToCopyData: '是否复制数据'
}; };

View File

@ -215,5 +215,9 @@ export default {
applyRunPlanFail:'提交运行图发布申请失败!', applyRunPlanFail:'提交运行图发布申请失败!',
cancelRunPlanTips:'此操作将撤销发布运行图申请,是否继续?', cancelRunPlanTips:'此操作将撤销发布运行图申请,是否继续?',
cancelRunPlanSuccess:'撤销运行图发布申请成功!', cancelRunPlanSuccess:'撤销运行图发布申请成功!',
cancelRunPlanFail:'撤销运行图发布申请失败!' cancelRunPlanFail:'撤销运行图发布申请失败!',
setProjectSuccess: '设置归属项目成功!',
setProjectFail: '设置归属项目失败!',
copyMapSuccess: '复制地图成功!',
copyMapFail: '复制地图失败!'
}; };

View File

@ -19,7 +19,6 @@ import Error401 from '@/views/error-page/401';
import Errpr404 from '@/views/error-page/404'; import Errpr404 from '@/views/error-page/404';
import MapProduct from '@/views/system/product/index'; import MapProduct from '@/views/system/product/index';
import ibpDraw from '@/views/system/ibpDraw/index';
import Dictionary from '@/views/system/dictionary/index'; import Dictionary from '@/views/system/dictionary/index';
import DictionaryDetail from '@/views/system/dictionaryDetail/index'; import DictionaryDetail from '@/views/system/dictionaryDetail/index';
import UserControl from '@/views/system/userControl/index'; import UserControl from '@/views/system/userControl/index';
@ -28,8 +27,9 @@ import UserExam from '@/views/system/userExam/index';
import UserSimulation from '@/views/system/userSimulation/index'; import UserSimulation from '@/views/system/userSimulation/index';
import ExistingSimulation from '@/views/system/existingSimulation/index'; import ExistingSimulation from '@/views/system/existingSimulation/index';
import CacheControl from '@/views/system/cacheControl/index'; import CacheControl from '@/views/system/cacheControl/index';
import SystemGenerate from '@/views/system/systemGenerate/index';
import Trainingrecord from '@/views/system/trainingrecord/index'; import Trainingrecord from '@/views/system/trainingrecord/index';
import SystemGenerate from '@/views/system/systemGenerate/index';
import IbpDraw from '@/views/system/ibpDraw/index';
import Mapedit from '@/views/mapdraft/index'; import Mapedit from '@/views/mapdraft/index';
@ -48,6 +48,7 @@ import ScriptDisplay from '@/views/scriptManage/display/index';
import TeachDetail from '@/views/teach/detail/index'; import TeachDetail from '@/views/teach/detail/index';
import TeachHome from '@/views/teach/index'; import TeachHome from '@/views/teach/index';
import Pay from '@/views/components/pay/index'; import Pay from '@/views/components/pay/index';
import ExamDetail from '@/views/exam/detail/examDetail'; import ExamDetail from '@/views/exam/detail/examDetail';
import ExamHome from '@/views/exam/index'; import ExamHome from '@/views/exam/index';
import ExamCourseDetail from '@/views/exam/detail/courseDetail'; import ExamCourseDetail from '@/views/exam/detail/courseDetail';
@ -57,8 +58,6 @@ import DemonstrationDetail from '@/views/demonstration/detail/index';
import PlanMonitorEditTool from '@/views/planMonitor/editTool/index'; import PlanMonitorEditTool from '@/views/planMonitor/editTool/index';
import PlanMonitorEditUserTool from '@/views/planMonitor/editTool/userindex'; import PlanMonitorEditUserTool from '@/views/planMonitor/editTool/userindex';
// import PlanMonitor from '@/views/planMonitor/index';
// import PlanMonitorHome from '@/views/planMonitor/home';
import PlanMonitorDetail from '@/views/planMonitor/detail'; import PlanMonitorDetail from '@/views/planMonitor/detail';
import DesignPlatformHome from '@/views/designPlatform/home'; import DesignPlatformHome from '@/views/designPlatform/home';
@ -308,22 +307,12 @@ export const asyncRouter = [
meta: { meta: {
} }
}, },
{ { // 运行图设计
path: 'map/draw/:mapId/:view',
component: Mapedit,
hidden: true
},
{
path: 'lesson/edit/:type',
component: LessonEdit,
hidden: true
},
{
path: 'runPlan/detail/:mapId', path: 'runPlan/detail/:mapId',
component: PlanMonitorDetail, component: PlanMonitorDetail,
hidden: true hidden: true
}, },
{ { // 剧本
path: 'script/home/:mapId', path: 'script/home/:mapId',
component: ScriptmanageHome, component: ScriptmanageHome,
meta: { meta: {
@ -331,13 +320,37 @@ export const asyncRouter = [
}, },
hidden: true hidden: true
}, },
{ { // 课程列表
path: 'lesson/home/:mapId', path: 'lesson/home/:mapId',
// /:skinCode
component: LessonHome, component: LessonHome,
hidden: true 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', path: 'lesson/details',
component: LessonDetail, component: LessonDetail,
hidden: true, hidden: true,
@ -354,32 +367,7 @@ export const asyncRouter = [
component: TrainingrecordManage, component: TrainingrecordManage,
hidden: true hidden: true
}, },
{ { // 地图预览
path: 'lesson/taskManage',
component: Taskmanage,
hidden: true
},
{
path: 'lesson/trainingRule',
component: TrainingRuleList,
hidden: true
},
{
path: 'lesson/trainingRule/detail',
hidden: true,
component: TrainingRuleEdit
},
{
path: 'lesson/trainingManage/:skinCode',
component: Trainingmanage,
hidden: true
},
{
path: 'lesson/training/:trainingId/:trainingName',
component: TrainingrecordManage,
hidden: true
},
{
path: 'mapPreview/:mapId', path: 'mapPreview/:mapId',
component: MapPreview, component: MapPreview,
hidden: true hidden: true
@ -412,38 +400,15 @@ export const asyncRouter = [
meta: { meta: {
} }
}, },
{ { // 地图绘制
path: 'map/draw/:mapId/:view', path: 'map/draw/:mapId/:view',
component: Mapedit, component: Mapedit,
hidden: true hidden: true
}, },
{ { // 运行图设计
path: 'lesson/edit/:type',
component: LessonEdit,
hidden: true
},
{
path: 'runPlan/detail/:mapId', path: 'runPlan/detail/:mapId',
component: PlanMonitorDetail, component: PlanMonitorDetail,
hidden: true hidden: true
},
{
path: 'script/home/:mapId',
component: ScriptmanageHome,
meta: {
i18n: 'router.scriptManage'
},
hidden: true
},
{
path: 'lesson/home/:mapId',
component: LessonHome,
hidden: true
},
{
path: 'lesson/training/:trainingId/:trainingName',
component: TrainingrecordManage,
hidden: true
} }
] ]
} }
@ -503,71 +468,71 @@ export const asyncRouter = [
meta: { meta: {
}, },
children: [ children: [
{ { // 仿真详情
path: 'detail/:subSystem', path: 'detail/:subSystem',
component: DemonstrationDetail, component: DemonstrationDetail,
hidden: true hidden: true
}, },
{ { // 教学系统 课程列表
path: 'teachHome/:subSystem', path: 'teachHome/:subSystem',
component: TeachHome, component: TeachHome,
hidden: true hidden: true
}, },
{ { // 课程详情
path: 'teach/:subSystem', path: 'teach/:subSystem',
component: TeachDetail, component: TeachDetail,
hidden: true hidden: true
}, },
{ { // 试卷列表
path: 'examHome/:subSystem',
component: ExamHome,
hidden: true
},
{
path: 'exam/:examId',
component: ExamDetail,
hidden: true
},
{
path: 'pay/:lessonId',
component: Pay,
hidden: true
},
{
path: 'course/:subSystem', path: 'course/:subSystem',
component: ExamCourseDetail, component: ExamCourseDetail,
hidden: true hidden: true
}, },
{ { // 考试系统 课程列表
path: 'result/:userExamId', path: 'examHome/:subSystem',
component: ExamResult, component: ExamHome,
hidden: true hidden: true
}, },
{ { // 试卷详情
path: 'permission/:mapId', path: 'exam/:examId',
component: Package, component: ExamDetail,
hidden: true hidden: true
}, },
{ { // 试卷列表
path: 'permission/detail/:id',
component: PackageDetail,
hidden: true
},
{
path: 'draft',
component: PackageDraft,
hidden: true
},
{
path: 'examRule/manage', path: 'examRule/manage',
component: PublishExamRule, component: PublishExamRule,
hidden: true hidden: true
}, },
{ { // 创建试卷
path: 'examRule/draft/:mode/:ruleId/:lessonId', path: 'examRule/draft/:mode/:ruleId/:lessonId',
component: PublishExamRuleDraft, component: PublishExamRuleDraft,
hidden: true hidden: true
}, },
{ // 购买
path: 'pay/:lessonId',
component: Pay,
hidden: true
},
{ // 考试结果
path: 'result/:userExamId',
component: ExamResult,
hidden: true
},
{ // 线路权限列表
path: 'permission/:mapId',
component: Package,
hidden: true
},
{ // 打包详情
path: 'permission/detail/:id',
component: PackageDetail,
hidden: true
},
{ // 权限打包
path: 'draft',
component: PackageDraft,
hidden: true
},
{ {
path: 'runPlan/manage/:mapId', path: 'runPlan/manage/:mapId',
component: PlanMonitorDetail, component: PlanMonitorDetail,
@ -772,7 +737,7 @@ export const asyncRouter = [
children: [ children: [
{ {
path: 'ibp/edit', path: 'ibp/edit',
component: ibpDraw, component: IbpDraw,
meta: { meta: {
i18n: 'router.ibpDraw' i18n: 'router.ibpDraw'
} }

View File

@ -42,80 +42,80 @@ import { getPublishMapInfo } from '@/api/jmap/map';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
export default { export default {
name: 'DeomonList', name: 'DeomonList',
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
height: 120, height: 120,
trainingList: [], trainingList: [],
defaultProps: { defaultProps: {
label: 'roomName' label: 'roomName'
}, },
group: '', group: '',
state: '', state: '',
mapId: '' mapId: ''
}; };
}, },
computed: { computed: {
show() { show() {
return this.dialogShow; return this.dialogShow;
}, },
title() { title() {
return this.$t('global.synthesisTrainingTitle'); return this.$t('global.synthesisTrainingTitle');
}, },
isWatch() { isWatch() {
return true; return true;
}, },
isjoin() { isjoin() {
return true; return true;
} }
}, },
methods: { methods: {
filterNode(value, data) { filterNode(value, data) {
if (!value) return true; if (!value) return true;
return data.label.indexOf(value) !== -1; return data.label.indexOf(value) !== -1;
}, },
clickEvent(obj, node, data) { clickEvent(obj, node, data) {
this.state = obj.state; this.state = obj.state;
this.group = obj.group; this.group = obj.group;
this.mapId = obj.mapId; this.mapId = obj.mapId;
}, },
async getList() { async getList() {
try { try {
const res = await getjointTrainList(); const res = await getjointTrainList();
this.trainingList = res.data; this.trainingList = res.data;
} catch (error) { } catch (error) {
console.error(error); console.error(error);
} }
}, },
doShow() { doShow() {
this.getList(); this.getList();
this.loading = false; this.loading = false;
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
}, },
async handleJoin() { async handleJoin() {
if (this.group) { if (this.group) {
await getjointTraining(this.group); await getjointTraining(this.group);
if (this.state == '02') { if (this.state == '02') {
launchFullscreen(); launchFullscreen();
await putJointTrainingSimulationEntrance(this.group); await putJointTrainingSimulationEntrance(this.group);
const rest = await getPublishMapInfo(this.mapId); const rest = await getPublishMapInfo(this.mapId);
const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.group, subSystem: this.$route.query.subSystem }; const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.group, subSystem: this.$route.query.subSystem };
this.$router.push({ path: `/jointTraining`, query: query }); this.$router.push({ path: `/jointTraining`, query: query });
} else if (this.state == '01') { } else if (this.state == '01') {
const query = { group: this.group }; const query = { group: this.group };
this.$router.push({ path: `/trainroom`, query: query }); this.$router.push({ path: `/trainroom`, query: query });
} }
} else { } else {
this.$message.info(this.$t('global.pleaseChooseRoom')); this.$message.info(this.$t('global.pleaseChooseRoom'));
} }
} }
} }
}; };
</script> </script>

View File

@ -23,52 +23,52 @@ import { getPublishMapInfo } from '@/api/jmap/map';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
export default { export default {
name: 'DeomonList', name: 'DeomonList',
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
group: '', group: '',
roomName: '', roomName: '',
state: '', state: '',
mapId: '' mapId: ''
}; };
}, },
computed: { computed: {
show() { show() {
return this.dialogShow; return this.dialogShow;
}, },
title() { title() {
return this.$t('global.synthesisTrainingTitle'); return this.$t('global.synthesisTrainingTitle');
} }
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doShow(data) { doShow(data) {
this.roomName = data.creator.nickName; this.roomName = data.creator.nickName;
this.group = data.group; this.group = data.group;
this.state = data.state; this.state = data.state;
this.mapId = data.mapId; this.mapId = data.mapId;
this.dialogShow = true; this.dialogShow = true;
}, },
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
}, },
async handleJoin() { async handleJoin() {
if (this.state == '02') { if (this.state == '02') {
launchFullscreen(); launchFullscreen();
await putJointTrainingSimulationEntrance(this.group); await putJointTrainingSimulationEntrance(this.group);
const rest = await getPublishMapInfo(this.mapId); const rest = await getPublishMapInfo(this.mapId);
const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.group }; const query = { skinCode: rest.data.skinCode, mapId: this.mapId, group: this.group };
this.$router.push({ path: `/jointTraining`, query: query }); this.$router.push({ path: `/jointTraining`, query: query });
} else if (this.state == '01') { } else if (this.state == '01') {
const query = { group: this.group }; const query = { group: this.group };
this.$router.push({ path: `/trainroom`, query: query }); this.$router.push({ path: `/trainroom`, query: query });
} }
this.dialogShow = false; this.dialogShow = false;
getjointTraining(this.group); getjointTraining(this.group);
} }
} }
}; };
</script> </script>

View File

@ -1,9 +1,9 @@
<template> <template>
<el-card v-loading="loading"> <div v-loading="loading" class="joylink-card">
<div slot="header" style="text-align: center;"> <div class="card-title">
<span><b>{{ $t('demonstration.simulationName') + courseModel.name }}</b></span> <span><b>{{ $t('demonstration.simulationName') + courseModel.name }}</b></span>
</div> </div>
<div class="simulation-detail" :style="{ height: height-230 +'px' }"> <div class="simulation-detail">
<p class="list-item"> <p class="list-item">
<span class="list-label">{{ $t('demonstration.productDescription') }}</span> <span class="list-label">{{ $t('demonstration.productDescription') }}</span>
<span class="list-elem">{{ courseModel.remarks }}</span> <span class="list-elem">{{ courseModel.remarks }}</span>
@ -21,8 +21,9 @@
<el-button v-show="isCreateRoom" :loading="buttonLoading" type="primary" @click="start">{{ $t('demonstration.createRoom') }}</el-button> <el-button v-show="isCreateRoom" :loading="buttonLoading" type="primary" @click="start">{{ $t('demonstration.createRoom') }}</el-button>
<el-button v-show="isInRoom" :loading="buttonLoading" type="primary" @click="joinRoom">{{ $t('demonstration.enterRoom') }}</el-button> <el-button v-show="isInRoom" :loading="buttonLoading" type="primary" @click="joinRoom">{{ $t('demonstration.enterRoom') }}</el-button>
</div> </div>
</el-card> </div>
</template> </template>
<script> <script>
// import { getPublishMapInfo } from '@/api/jmap/map'; // import { getPublishMapInfo } from '@/api/jmap/map';
import { getGoodsTryUse } from '@/api/management/goods'; import { getGoodsTryUse } from '@/api/management/goods';
@ -35,241 +36,243 @@ import LimitList from '@/views/components/limits/index';
import { getSubSystemDetail } from '@/api/trainingPlatform'; import { getSubSystemDetail } from '@/api/trainingPlatform';
export default { export default {
name: 'ExamDetailList', name: 'ExamDetailList',
components: { components: {
LimitList LimitList
}, },
data() { data() {
return { return {
tryTime: 0, tryTime: 0,
goodsId: '', goodsId: '',
tryUser: 0, tryUser: 0,
loading: true, loading: true,
buttonLoading: false, buttonLoading: false,
currentLessonId: '', currentLessonId: '',
currentPrdCode: '', currentPrdCode: '',
productList: [], productList: [],
courseModel: { courseModel: {
id: '', id: '',
name: '', name: '',
mapId: '', mapId: '',
skinCode: '', skinCode: '',
remarks: '', remarks: '',
prdType: '', prdType: '',
prdCode: '', prdCode: '',
pmsList: [] pmsList: []
}, },
jointShow: false, jointShow: false,
jointGroup: '' jointGroup: ''
}; };
}, },
computed: { computed: {
hasPermssion() { hasPermssion() {
let isShow = false; let isShow = false;
if (this.courseModel.pmsList && this.courseModel.pmsList.length) { if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
isShow = true; isShow = true;
} }
return isShow; return isShow;
}, },
isStartDemon() { isStartDemon() {
return this.courseModel.prdType !== '03' && (this.hasPermssion || this.tryTime > 0); return this.courseModel.prdType !== '03' && (this.hasPermssion || this.tryTime > 0);
}, },
isCreateRoom() { isCreateRoom() {
return this.courseModel.prdType === '03' && this.hasPermssion && !this.jointShow; return this.courseModel.prdType === '03' && this.hasPermssion && !this.jointShow;
}, },
isInRoom() { isInRoom() {
return this.courseModel.prdType === '03' && this.hasPermssion && this.jointShow; return this.courseModel.prdType === '03' && this.hasPermssion && this.jointShow;
}, },
mapId() { mapId() {
return this.$route.query.mapId; return this.$route.query.mapId;
}, }
// prodId() { },
// return this.$route.query.prodId; watch: {
// }, '$route': function (val) {
height() { this.loadInitData();
return this.$store.state.app.height - 50; }
} },
}, async mounted() {
watch: { this.loadInitData();
'$route': function (val) { },
this.loadInitData(); methods: {
} async loadInitData() {
}, this.loading = true;
async mounted() { try {
this.loadInitData(); const resp = await getSubSystemDetail(this.$route.params.subSystem);
}, this.tryUser = 0;
methods: { this.loading = false;
async loadInitData() { if (resp.data.mapPrd) {
this.loading = true; this.courseModel = {
try { id: resp.data.mapPrd.id,
const resp = await getSubSystemDetail(this.$route.params.subSystem); name: resp.data.mapPrd.name,
this.tryUser = 0; mapId: this.mapId,
this.loading = false; skinCode: resp.data.mapPrd.skinCode,
if (resp.data.mapPrd) { remarks: resp.data.mapPrd.remarks,
this.courseModel = { prdType: resp.data.mapPrd.prdType,
id: resp.data.mapPrd.id, prdCode: resp.data.mapPrd.code,
name: resp.data.mapPrd.name, pmsList: resp.data.permissionList || [],
mapId: this.mapId, PermissionType: PermissionType.SIMULATION
skinCode: resp.data.mapPrd.skinCode, };
remarks: resp.data.mapPrd.remarks, this.currentPrdCode = resp.data.mapPrd.code;
prdType: resp.data.mapPrd.prdType, if (resp.data.mapPrd.prdType === '03') {
prdCode: resp.data.mapPrd.code, this.getJointTrainingList();
pmsList: resp.data.permissionList || [], }
PermissionType: PermissionType.SIMULATION }
}; if (!this.courseModel.pmsList) {
this.currentPrdCode = resp.data.mapPrd.code; this.tryUser = 1;
if (resp.data.mapPrd.prdType === '03') { const paras = {
this.getJointTrainingList(); mapId: this.mapId,
} prdCode: this.courseModel.prdCode,
} permissionType: PermissionType.SIMULATION
if (!this.courseModel.pmsList) { };
this.tryUser = 1;
const paras = {
mapId: this.mapId,
prdCode: this.courseModel.prdCode,
permissionType: PermissionType.SIMULATION
};
try { try {
const resr = await getGoodsTryUse(paras); const resr = await getGoodsTryUse(paras);
if (resr.data.tryTime <= 0) { if (resr.data.tryTime <= 0) {
this.tryTime = 0; this.tryTime = 0;
} else { } else {
this.tryTime = resr.data.tryTime; this.tryTime = resr.data.tryTime;
this.goodsId = resr.data.goodsId; this.goodsId = resr.data.goodsId;
} }
} catch (error) { } catch (error) {
this.tryTime = 0; this.tryTime = 0;
} }
} }
} catch (error) { } catch (error) {
this.loading = false; this.loading = false;
this.$messageBox(this.$t('error.refreshFailed')); this.$messageBox(this.$t('error.refreshFailed'));
} }
}, },
async getJointTrainingList() { async getJointTrainingList() {
try { try {
if (this.mapId) { if (this.mapId) {
const res = await checkRoomExist({ mapId: this.mapId }); const res = await checkRoomExist({ mapId: this.mapId });
this.jointGroup = res.data; this.jointGroup = res.data;
this.jointShow = false; this.jointShow = false;
if (res.data) { if (res.data) {
this.jointShow = true; this.jointShow = true;
} }
} }
} catch (error) { } catch (error) {
console.error(error, '获取是否拥有综合演练房间'); console.error(error, '获取是否拥有综合演练房间');
} }
}, },
async joinRoom() { async joinRoom() {
await getjointTraining(this.jointGroup); await getjointTraining(this.jointGroup);
const query = { skinCode: this.courseModel.skinCode, group: this.jointGroup, subSystem: this.$route.params.subSystem}; const query = { skinCode: this.courseModel.skinCode, group: this.jointGroup, subSystem: this.$route.params.subSystem};
this.$router.push({ path: `/trainroom`, query: query }); this.$router.push({ path: `/trainroom`, query: query });
}, },
async createRoom() { async createRoom() {
try { try {
this.buttonLoading = true; this.buttonLoading = true;
const param = { const param = {
mapId: Number(this.mapId), mapId: Number(this.mapId),
prdCode: this.courseModel.prdCode prdCode: this.courseModel.prdCode
}; };
const res = await postCreateRoom(param); const res = await postCreateRoom(param);
if (res && res.code == 200) { if (res && res.code == 200) {
const query = { skinCode: this.courseModel.skinCode, group: res.data, subSystem: this.$route.params.subSystem }; const query = { skinCode: this.courseModel.skinCode, group: res.data, subSystem: this.$route.params.subSystem };
this.$router.push({ path: `/trainroom`, query: query }); this.$router.push({ path: `/trainroom`, query: query });
} }
} catch (error) { } catch (error) {
this.buttonLoading = false; this.buttonLoading = false;
if (error.code == 20001) { if (error.code == 20001) {
this.$confirm(this.$t('tip.createRoomFailedHint'), this.$t('global.tips'), { this.$confirm(this.$t('tip.createRoomFailedHint'), 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(() => {}).catch(() => {}); }).then(() => {}).catch(() => {});
} }
if (error.code == 500009) { if (error.code == 500009) {
this.$messageBox(error.message); this.$messageBox(error.message);
} }
} }
}, },
async start() { async start() {
if (this.courseModel.prdType == '05') { if (this.courseModel.prdType == '05') {
this.jumpScheduling(); this.jumpScheduling();
} else if (this.courseModel.prdType == '03') { } else if (this.courseModel.prdType == '03') {
this.createRoom(); this.createRoom();
} else { } else {
if (this.courseModel.pmsList && this.courseModel.pmsList.length) { if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
this.jump(); this.jump();
} else { } else {
if (this.tryTime <= 1) { if (this.tryTime <= 1) {
this.$confirm(this.$t('tip.noPermissionHint'), this.$t('global.tips'), { this.$confirm(this.$t('tip.noPermissionHint'), 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(() => {
this.buy(); this.buy();
}).catch(() => { this.buttonLoading = false; }); }).catch(() => { this.buttonLoading = false; });
} else { } else {
this.jump(); this.jump();
} }
} }
} }
}, },
jumpScheduling() { jumpScheduling() {
this.buttonLoading = true; this.buttonLoading = true;
const data = { mapId: this.courseModel.mapId, code: this.currentPrdCode }; const data = { mapId: this.courseModel.mapId, code: this.currentPrdCode };
schedulingNotify(data).then(resp => { schedulingNotify(data).then(resp => {
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdCode, goodsId: this.goodsId, try: this.tryUser }; const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdCode, goodsId: this.goodsId, try: this.tryUser };
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query }); this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
launchFullscreen(); launchFullscreen();
}).catch(error => { }).catch(error => {
this.$messageBox(this.$t('error.createSimulationFailed') + error.message); this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
this.buttonLoading = false; this.buttonLoading = false;
}); });
}, },
jump() { jump() {
const data = { mapId: this.courseModel.mapId, code: this.currentPrdCode }; const data = { mapId: this.courseModel.mapId, code: this.currentPrdCode };
this.buttonLoading = true; this.buttonLoading = true;
simulationNotify(data).then(resp => { simulationNotify(data).then(resp => {
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdCode, goodsId: this.goodsId, try: this.tryUser }; const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdCode, goodsId: this.goodsId, try: this.tryUser };
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query }); this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
launchFullscreen(); launchFullscreen();
}).catch(error => { }).catch(error => {
this.$messageBox(this.$t('error.createSimulationFailed') + error.message); this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
this.buttonLoading = false; this.buttonLoading = false;
}); });
}, },
buy() { buy() {
this.buttonLoading = true; this.buttonLoading = true;
this.$router.push({ this.$router.push({
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`, path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
query: { permissionType: PermissionType.SIMULATION, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem } query: { permissionType: PermissionType.SIMULATION, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
}); });
}, },
transfer() { transfer() {
this.buttonLoading = false; this.buttonLoading = false;
if (this.$refs) { if (this.$refs) {
this.$refs[`limit`].transfer(this.courseModel); this.$refs[`limit`].transfer(this.courseModel);
} }
}, },
distribute() { distribute() {
this.buttonLoading = false; this.buttonLoading = false;
if (this.$refs) { if (this.$refs) {
this.$refs[`limit`].distribute(this.courseModel); this.$refs[`limit`].distribute(this.courseModel);
} }
} }
} }
}; };
</script> </script>
<style scoped>
::-webkit-scrollbar { <style rel="stylesheet/scss" lang="scss" scoped>
width: 3px; .joylink-card{
height: 3px; height: 100%;
overflow: hidden;
.card-title{
height: 47px;
line-height: 47px;
text-align: center;
border-bottom: 1px solid #d6d6d6;
}
} }
</style>
<style>
.simulation-detail { .simulation-detail {
margin: 50px; padding: 50px;
padding-bottom: 0;
height: calc(100% - 107px);
overflow: auto;
} }
.list-item { .list-item {
@ -289,10 +292,8 @@ export default {
} }
.btn-buy { .btn-buy {
position: relative;
text-align: center; text-align: center;
justify-content: center; padding: 10px 0;
transform: translateY(-20px);
} }
.el-tabs--border-card>.el-tabs__header .el-tabs__item { .el-tabs--border-card>.el-tabs__header .el-tabs__item {

View File

@ -1,97 +0,0 @@
<template>
<el-card :style="{height: height+'px'}">
<div class="home-box" :style="{height: height+'px'}">
<el-scrollbar wrap-class="scrollbar-wrapper">
<h1 class="title">
{{ $t('demonstration.simulationSystem') }}
<img :src="logo" alt="" class="logo-img">
</h1>
<div class="card-box">
<el-carousel :interval="4000" type="card" height="380px">
<el-carousel-item v-for="(item, index) in listImg" :key="index">
<img :src="item.src" alt="" height="100%" width="100%">
</el-carousel-item>
</el-carousel>
</div>
<div class="brief-box">{{ $t('demonstration.simulationSystemDescription') }}</div>
</el-scrollbar>
</div>
</el-card>
</template>
<script>
import logo from '@/assets/logo.png';
import home1 from '@/assets/home/home1.png';
import home2 from '@/assets/home/home2.png';
import home3 from '@/assets/home/demon1.jpg';
import home4 from '@/assets/home/tring1.png';
import home5 from '@/assets/home/tring4.jpg';
import home6 from '@/assets/home/demon2.jpg';
export default {
name: 'Home',
data() {
return {
listImg: [
{ src: home1 },
{ src: home2 },
{ src: home3 },
{ src: home4 },
{ src: home5 },
{ src: home6 }
],
logo: logo
};
},
computed: {
height() {
return this.$store.state.app.height - 50;
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ .el-carousel {
overflow: hidden;
}
.home-box {
padding: 15px 100px;
float: left;
width: 100%;
font-family: 'Microsoft YaHei';
.title {
font-size: 35px;
width: 100%;
text-align: center;
font-weight: 400;
margin-top: 55px;
border-bottom: 2px dashed #333;
padding-bottom: 15px;
margin-bottom: 70px;
position: relative;
.logo-img {
position: absolute;
right: 0;
top: 0;
width: 55px;
}
}
.card-box {
width: 100%;
padding: 0 50px;
}
.brief-box {
font-size: 18px;
text-indent: 2em;
line-height: 32px;
padding: 40px 20px 0;
font-family: unset;
}
}
</style>

View File

@ -1,74 +0,0 @@
<template>
<div class="app-wrapper">
<el-scrollbar wrap-class="scrollbar-wrapper">
<div v-show="listShow" class="examList" :style="{width: widthLeft+'px'}">
<demon-list ref="demonList" :height="height" />
</div>
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
<transition>
<router-view :product-list="productList" />
</transition>
</el-scrollbar>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import demonList from './list/demonList';
import drapLeft from '@/views/components/drapLeft/index';
import localStore from 'storejs';
export default {
name: 'Exam',
components: {
demonList,
drapLeft
},
data() {
return {
listShow: true,
widthLeft: 450,
productList: []
};
},
computed: {
...mapGetters([
'lessonbar'
]),
height() {
return this.$store.state.app.height - 50;
}
},
watch: {
'lessonbar.opened': function (val) {
this.listShow = val;
}
},
mounted() {
this.widthLeft = Number(localStore.get('LeftWidth'));
},
methods: {
refresh() {
this.$refs && this.$refs.demonList && this.$refs.demonList.refresh();
},
drapWidth(width) {
this.widthLeft = Number(width);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
overflow: hidden;
}
.examList {
float: left;
}
</style>

View File

@ -1,146 +0,0 @@
<template>
<el-card v-loading="loading" class="map-list-main">
<div slot="header" class="clearfix">
<span>{{ $t('global.mapList') }}</span>
</div>
<filter-city ref="filerCity" filter-empty :query-function="queryFunction" @filterSelectChange="refresh" />
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-125) +'px' }">
<el-tree
ref="tree"
:data="treeList"
node-key="id"
:props="defaultProps"
highlight-current
:span="22"
:filter-node-method="filterNode"
@node-click="clickEvent"
@node-contextmenu="showContextMenu"
>
<span slot-scope="{ node:tnode, data }">
<span
class="el-icon-tickets"
:style="{color: data.valid ? 'green':''}"
/>
<span :style="{color: data.valid ? 'green':''}">&nbsp;{{ tnode.label }}</span>
</span>
</el-tree>
</el-scrollbar>
</el-card>
</template>
<script>
import { getPublishMapTree } from '@/api/management/mapprd';
import { UrlConfig } from '@/router/index';
import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
import FilterCity from '@/views/components/filterCity';
export default {
name: 'ExamDetailList',
components: {
FilterCity
},
props: {
height: {
type: Number,
required: true
}
},
data() {
return {
loading: true,
defaultShowKeys: [],
queryFunction: getPublishMapTree,
filterText: '',
treeData: [],
treeList: [],
selected: {},
defaultProps: {
children: 'children',
label: 'name'
},
node: {
}
};
},
computed: {
role() {
return this.$store.state.user.roles.includes('04') ||
this.$store.state.user.roles.includes('05') ||
this.$store.state.user.roles.includes('01');
}
},
watch: {
filterText(val) {
this.treeList = this.treeData.filter((res) => {
return res.name.includes(val);
});
}
},
beforeDestroy () {
removeSessionStorage('demonList');
},
methods: {
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
showContextMenu(e, obj, node, vueElem) {
if (obj) {
this.node = node;
this.selected = obj;
}
},
clickEvent(obj, data, ele) {
if (obj.type == 'Map') {
setSessionStorage('demonList', obj.id);
this.$router.push({ path: `${UrlConfig.demonstration.detail}/${obj.id}` });
}
},
async refresh(filterSelect) {
this.loading = true;
this.treeData = this.treeList = [];
try {
const res = await getPublishMapTree(filterSelect);
this.treeData = res.data;
this.treeList = this.filterText
? res.data.filter(elem => { return elem.name.includes(this.filterText); })
: res.data;
if (this.treeData.length > 0) {
this.treeData.forEach(v => {
v.children = [];
});
}
this.$nextTick(() => {
const mapId = getSessionStorage('demonList') || null;
this.$refs.tree.setCurrentKey(mapId);
this.loading = false;
});
} catch (error) {
this.loading = false;
this.$messageBox(this.$t('error.refreshFailed'));
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.back-home {
float: right;
cursor: pointer;
&:hover {
color: #3ea726;
}
}
</style>
<style>
.el-tree {
overflow-x: hidden;
}
.el-tree-node.is-current>.el-tree-node__content {
background-color: #e4e3e3 !important;
}
</style>

View File

@ -1,10 +1,10 @@
<template> <template>
<el-card> <div class="joylink-card">
<div slot="header" style="text-align: center;"> <div class="card-title">
<b>{{ $t('exam.nameOfTestPaper') +': ' + examDetails.name }}</b> <b>{{ $t('exam.nameOfTestPaper') +': ' + examDetails.name }}</b>
</div> </div>
<div style="margin:50px; overflow-y: auto;"> <div style="padding:50px; padding-right: 0; height: 100%;">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height - 190 +'px' }"> <el-scrollbar wrap-class="scrollbar-wrapper">
<p class="list-item"> <p class="list-item">
<span class="list-label">{{ $t('exam.examStartTime') +':' }}</span> <span class="list-label">{{ $t('exam.examStartTime') +':' }}</span>
<span v-if="examDetails.startTime" class="list-elem"> <span v-if="examDetails.startTime" class="list-elem">
@ -40,13 +40,13 @@
</p> </p>
</span> </span>
</p> </p>
<div class="btn-start">
<el-button :loading="loading" type="primary" @click="exmaStart">{{ $t('exam.startTheExam') }}</el-button>
<el-button @click="back">{{ $t('global.back') }}</el-button>
</div>
</el-scrollbar> </el-scrollbar>
</div> </div>
<div class="btn-start"> </div>
<el-button :loading="loading" type="primary" @click="exmaStart">{{ $t('exam.startTheExam') }}</el-button>
<el-button @click="back">{{ $t('global.back') }}</el-button>
</div>
</el-card>
</template> </template>
<script> <script>
import { examNotify } from '@/api/simulation'; import { examNotify } from '@/api/simulation';
@ -223,6 +223,16 @@ export default {
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
.joylink-card{
height: 100%;
overflow: hidden;
.card-title{
height: 47px;
line-height: 47px;
text-align: center;
border-bottom: 1px solid #e6e6e6;
}
}
.menu li { .menu li {
border-right: solid white 1px; border-right: solid white 1px;
@ -279,7 +289,7 @@ export default {
.list-table { .list-table {
padding-top: 10px; padding-top: 10px;
padding-left: 120px; padding-left: 120px;
width: calc(100%); width: calc(100% - 80px);
} }
.list-elem { .list-elem {
@ -287,9 +297,7 @@ export default {
} }
.btn-start { .btn-start {
position: relative;
text-align: center; text-align: center;
justify-content: center; margin-bottom: 20px;
transform: translateY(-20px);
} }
</style> </style>

View File

@ -40,37 +40,37 @@ import { UrlConfig } from '@/router/index';
import localStore from 'storejs'; import localStore from 'storejs';
export default { export default {
name: 'ExamHome', name: 'ExamHome',
data() { data() {
return { return {
tableData: [], tableData: [],
loading: false loading: false
}; };
}, },
watch: { watch: {
'$route.params.subSystem': function(newVal) { '$route.params.subSystem': function(newVal) {
this.loadInitPage(); this.loadInitPage();
} }
}, },
mounted() { mounted() {
this.loadInitPage(); this.loadInitPage();
}, },
methods: { methods: {
loadInitPage() { loadInitPage() {
if (this.$route.params.subSystem) { if (this.$route.params.subSystem) {
getSubSystemDetail(this.$route.params.subSystem).then(resp =>{ getSubSystemDetail(this.$route.params.subSystem).then(resp =>{
if (resp.data) { if (resp.data) {
this.tableData = resp.data.lessonList; this.tableData = resp.data.lessonList;
} }
}).catch(()=>{ }).catch(()=>{
this.$messageBox(this.$t('error.obtainCourseInformationFailed')); this.$messageBox(this.$t('error.obtainCourseInformationFailed'));
}); });
} }
}, },
goLesson(row) { goLesson(row) {
localStore.set('examDetail'+this.$route.params.subSystem, `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}?lessonId=${row.id}`); localStore.set('examDetail' + this.$route.params.subSystem, `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}?lessonId=${row.id}`);
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}`, query: {lessonId: row.id}}); this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}`, query: {lessonId: row.id}});
} }
} }
}; };
</script> </script>

View File

@ -45,82 +45,82 @@ import { submitExam } from '@/api/management/userexam';
import { UrlConfig } from '@/router/index'; import { UrlConfig } from '@/router/index';
export default { export default {
name: 'ExamResult', name: 'ExamResult',
props: { props: {
examDetails: { examDetails: {
type: Object, type: Object,
default: null default: null
} }
}, },
data() { data() {
return { return {
resultModel: { resultModel: {
trainingName: '', trainingName: '',
score: 0 score: 0
}, },
loading: true loading: true
}; };
}, },
computed: { computed: {
height() { height() {
return this.$store.state.app.height - 50; return this.$store.state.app.height - 50;
} }
}, },
mounted() { mounted() {
this.submitExamData(); this.submitExamData();
}, },
methods: { methods: {
getSummaries(param) { getSummaries(param) {
const { columns, data } = param; const { columns, data } = param;
const sums = []; const sums = [];
columns.forEach((column, index) => { columns.forEach((column, index) => {
if (index === 0) { if (index === 0) {
sums[index] = this.$t('exam.totalScore'); sums[index] = this.$t('exam.totalScore');
return; return;
} }
const values = data.map(item => Number(item[column.property])); const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value))) { if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr); const value = Number(curr);
if (!isNaN(value)) { if (!isNaN(value)) {
return prev + curr; return prev + curr;
} else { } else {
return prev; return prev;
} }
}, 0); }, 0);
sums[index] += this.$t('exam.points'); sums[index] += this.$t('exam.points');
} else { } else {
sums[index] = 'N/A'; sums[index] = 'N/A';
} }
}); });
return sums; return sums;
}, },
submitExamData() { submitExamData() {
this.loading = true; this.loading = true;
let count = 3; let count = 3;
const userExamId = this.$route.params.userExamId; const userExamId = this.$route.params.userExamId;
let interval = setInterval(() => { let interval = setInterval(() => {
submitExam(userExamId).then(response => { submitExam(userExamId).then(response => {
this.loading = false; this.loading = false;
this.resultModel = response.data; this.resultModel = response.data;
clearInterval(interval); clearInterval(interval);
interval = null; interval = null;
}).catch(() => { }).catch(() => {
if (count-- < 0) { if (count-- < 0) {
this.loading = false; this.loading = false;
clearInterval(interval); clearInterval(interval);
interval = null; interval = null;
this.$messageBox(this.$t('error.submitExamFailed')); this.$messageBox(this.$t('error.submitExamFailed'));
} }
}); });
}, 1000); }, 1000);
}, },
back() { back() {
const examId = this.resultModel.examId; const examId = this.resultModel.examId;
this.$router.push({path: `${UrlConfig.trainingPlatform.examDetail}/${examId}`, query: { subSystem: this.$route.query.subSystem }}); this.$router.push({path: `${UrlConfig.trainingPlatform.examDetail}/${examId}`, query: { subSystem: this.$route.query.subSystem }});
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -91,15 +91,15 @@ export default {
}, },
methods: { methods: {
show (deviceCode, ibpPart) { show (deviceCode, ibpPart) {
if (!deviceCode) { if (!deviceCode) {
return; return;
} }
this.stationCode = deviceCode; this.stationCode = deviceCode;
document.getElementById(this.ibpId).oncontextmenu = function (e) { document.getElementById(this.ibpId).oncontextmenu = function (e) {
return false; return false;
}; };
let offsetX = 0; let offsetX = 0;
if (ibpPart === 'left') { if (ibpPart === 'left') {
offsetX = 0; offsetX = 0;
} else if (ibpPart === 'right') { } else if (ibpPart === 'right') {
offsetX = 1920; offsetX = 1920;
@ -140,14 +140,14 @@ export default {
}, },
// //
onSelected(em) { onSelected(em) {
if (em.deviceModel.mean) { if (em.deviceModel.mean) {
const params = { operate:IbpOperation[em.deviceModel.mean].operate, stationCode:this.stationCode }; const params = { operate:IbpOperation[em.deviceModel.mean].operate, stationCode:this.stationCode };
handlerIbpEvent(this.$route.query.group, params); handlerIbpEvent(this.$route.query.group, params);
} }
}, },
// //
onContextMenu(em) { onContextMenu(em) {
this.$store.dispatch('ibp/setUpdateDeviceData', em.eventTarget.model); this.$store.dispatch('ibp/setUpdateDeviceData', em.eventTarget.model);
}, },
// //
drawIbpInit() { drawIbpInit() {

View File

@ -24,7 +24,7 @@ import { getLessonDrftList } from '@/api/jmap/lessondraft';
import { UrlConfig } from '@/router/index'; import { UrlConfig } from '@/router/index';
import PublishCreate from './lessoncategory/edit/create'; import PublishCreate from './lessoncategory/edit/create';
import PublishLesson from './lessoncategory/edit/lesson/publish'; import PublishLesson from './lessoncategory/edit/lesson/publish';
import { delLesson, getLessonTree } from '@/api/jmap/lessondraft'; import { delLesson } from '@/api/jmap/lessondraft';
import LessonDetail from '@/views/approval/lesson/detail'; import LessonDetail from '@/views/approval/lesson/detail';
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
@ -37,9 +37,7 @@ export default {
}, },
data() { data() {
return { return {
tableData: [],
loading: false, loading: false,
showEdit: false,
pagerConfig: { pagerConfig: {
pageSize: 'pageSize', pageSize: 'pageSize',
pageIndex: 'pageNum' pageIndex: 'pageNum'
@ -48,7 +46,7 @@ export default {
show: false show: false
}, },
queryList: { queryList: {
query: getLessonDrftList, query: this.queryFunction,
selectCheckShow: false, selectCheckShow: false,
indexShow: true, indexShow: true,
columns: [ columns: [
@ -158,35 +156,8 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
loadInitData() { queryFunction(params) {
this.loading = true; return getLessonDrftList(this.$route.params.mapId, params);
getLessonTree(this.$route.params.skinCode).then(response=> {
response.data.forEach(elem => {
if (elem.children) {
elem.children.forEach( it => {
it.parentId = elem.id;
} );
}
});
this.tableData = response.data;
this.loading = false;
}).catch(( ) => {
this.$messageBox(this.$t('error.getDraftCourseDataFailed'));
});
},
refuse() {
this.loading = true;
getLessonTree(this.$route.params.skinCode).then(response=> {
response.data.forEach(elem => {
if (elem.children) {
elem.children.forEach( it => {
it.parentId = elem.id;
} );
}
});
this.tableData = response.data;
this.loading = false;
});
}, },
handlerStatus(row) { handlerStatus(row) {
let lessonStatus = ''; let lessonStatus = '';
@ -236,13 +207,13 @@ export default {
this.$router.push({path: `${UrlConfig.design.lessonEdit}/treeSort`, query: {id: row.id}}); this.$router.push({path: `${UrlConfig.design.lessonEdit}/treeSort`, query: {id: row.id}});
}, },
taskManage() { taskManage() {
this.$router.push({path: `${UrlConfig.design.taskManage}`, query: {mapId: this.$route.params.mapId, skinCode: this.$route.params.skinCode}}); this.$router.push({path: `${UrlConfig.design.taskManage}`, query: {mapId: this.$route.params.mapId}});
}, },
trainingManage() { trainingManage() {
this.$router.push({path: `${UrlConfig.design.trainingManage}/${this.$route.params.skinCode}`, query: {mapId: this.$route.params.mapId}}); this.$router.push({path: `${UrlConfig.design.trainingManage}`, query: {mapId: this.$route.params.mapId}});
}, },
operationManage() { operationManage() {
this.$router.push({path: `${UrlConfig.design.trainingRule}`, query: {mapId: this.$route.params.mapId, skinCode: this.$route.params.skinCode}}); this.$router.push({path: `${UrlConfig.design.trainingRule}`, query: {mapId: this.$route.params.mapId}});
}, },
revertLesson(index, row) { revertLesson(index, row) {
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), { this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {

View File

@ -1,114 +0,0 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
</div>
</template>
<script>
import PopMenu from '@/components/PopMenu';
import { DeviceMenu } from '@/scripts/ConstDic';
export default {
name: 'TrainingOperateMenu',
components: {
PopMenu
},
props: {
point: {
type: Object,
required: true
},
selected: {
type: Object,
required: true
}
},
data() {
return {
menuShow: false,
operation: {
code: '',
title: '',
basicInfo: false
},
menu: [],
lessonMenu: [
{
label: this.$t('lesson.createChapter'),
handler: this.addSection
},
{
label: this.$t('lesson.contentSorting'),
handler: this.treeSort
}
],
chapterMenu: [
{
label: this.$t('lesson.createChapter'),
handler: this.addSection
}
]
};
},
watch: {
selected: function (val) {
if (val) {
if (val.type === 'lesson') {
this.menu = this.lessonMenu;
} else if (val.type === 'chapter') {
this.menu = this.chapterMenu;
}
}
},
'$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Lesson)) {
this.doShow(this.$store.state.menuOperation.menuPosition);
} else {
this.doClose();
}
}
},
methods: {
clickEvent() {
const self = this;
window.onclick = function (e) {
self.doClose();
};
},
doShow(point) {
this.menuShow = true;
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.resetShowPosition(point);
}
this.clickEvent();
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
this.$refs.popMenu.close();
}
this.menuShow = false;
},
createLesson() {
this.$emit('lessonCreate');
},
createFromPublish() {
this.$emit('publishCreate');
},
addSection() {
this.$emit('chapterCreate');
},
treeSort() {
this.$emit('treeSort');
},
deleteObj() {
this.$confirm(this.$('tip.confirmDeletion'), this.$('global.tips'), {
confirmButtonText: this.$('global.confirm'),
cancelButtonText: this.$('global.cancel'),
type: 'warning'
}).then(() => {
}).catch(() => {
this.$messageBox(this.$('tip.cancelledDelete'));
});
}
}
};
</script>

View File

@ -1,188 +0,0 @@
<template>
<el-card v-loading="loading" class="map-list-main">
<div slot="header" class="clearfix">
<span>{{ $t('lesson.courseList') }}</span>
<el-button type="text" style="float: right; padding: 3px 0" @click="publishCreate">{{ $t('lesson.createNewCoursesFromRelease') }}</el-button>
</div>
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: (height - 55) + 'px'}">
<el-tree
ref="lessonTree"
:data="treeData"
:props="defaultProps"
:filter-node-method="filterNode"
draggable
:allow-drop="allowDrop"
:allow-drag="allowDrag"
expand-on-click-node
highlight-current
:span="22"
@node-contextmenu="showContextMenu"
@node-drag-end="handleDragEnd"
@node-click="clickEvent"
>
<span slot-scope="{ node }">
<span v-if="node.data.type === 'skin'" class="el-icon-news" />
<span v-if="node.data.type === 'lesson'" class="el-icon-tickets" />
<span v-if="node.data.type === 'chapter'" class="el-icon-document" />
<span>&nbsp;{{ node.label }}</span>
</span>
</el-tree>
</el-scrollbar>
<tree-operate-menu
ref="treeOperateMenu"
:point="point"
:selected="selected"
@refresh="refresh"
@lessonCreate="lessonCreate"
@chapterCreate="chapterCreate"
@treeSort="treeSort"
/>
</el-card>
</template>
<script>
import { getLessonTree, dragSortLessonChapter } from '@/api/jmap/lessondraft';
import { DeviceMenu } from '@/scripts/ConstDic';
import TreeOperateMenu from './operateMenu';
export default {
name: 'TrainingOperate',
components: {
TreeOperateMenu
},
props: {
height: {
type: Number
}
},
data() {
return {
loading: true,
defaultProps: {
children: 'children',
label: 'name'
},
filterText: '',
node: {},
selected: {},
menuoper: {},
treeData: [],
point: {
x: 0,
y: 0
}
};
},
watch: {
filterText(val) {
this.$refs.lessonTree.filter(val);
}
},
mounted() {
this.refresh();
},
methods: {
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
allowDrop(draggingNode, dropNode, type) {
if (draggingNode && draggingNode.data.type === 'chapter') {
return dropNode && dropNode.data.type === 'chapter';
} else if (draggingNode && draggingNode.data.type === 'training') {
return dropNode && dropNode.data.type === 'training' && type !== 'inner' && draggingNode.parent == dropNode.parent;
}
},
allowDrag(draggingNode) {
return draggingNode && (draggingNode.data.type === 'chapter' || draggingNode.data.type === 'training');
},
handleDragEnd(draggingNode, dropNode, dropType, ev) {
if (draggingNode && dropNode && dropType !== 'none') {
const lesson = this.getLeesonId(dropNode);
const lessonId = lesson.data.id;
const model = {
location: dropType,
sourceId: draggingNode.data.id,
sourceType: draggingNode.data.type,
targetId: dropNode.data.id,
targetType: dropNode.data.type,
lessonId: lessonId,
chapterId: dropNode.parent.data.id
};
dragSortLessonChapter(model).then(response => {
});
}
},
getLeesonId(node) {
if (node.parent.parent !== null) {
return this.getLeesonId(node.parent);
} else {
return node;
}
},
showContextMenu(e, obj, node, vueElem) {
if (obj && (obj.type == 'lesson' || obj.type == 'chapter')) {
e.preventDefault();
this.point = {
x: e.clientX,
y: e.clientY
};
this.node = node;
this.selected = obj;
const menu = DeviceMenu.Lesson;
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
}
},
clickEvent(obj, node, vueElem) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
if (obj.type === 'skin') {
this.$emit('lessonCreate', node);
} else if (obj.type === 'lesson') {
this.$emit('lessonEdit', node);
} else if (obj.type === 'chapter') {
this.$emit('chapterEdit', node);
}
},
chapterCreate() {
this.$emit('chapterCreate', this.node);
},
lessonCreate() {
this.$emit('lessonCreate', this.node);
},
publishCreate() {
this.$emit('publishCreate', this.node);
},
treeSort() {
this.$emit('treeSort', this.node);
},
convertTreeData(list) {
const tree = [];
if (list && list.length) {
/* 去除列表的training节点*/
list.forEach(elem => {
elem.children = this.convertTreeData(elem.children);
if (elem.type !== 'training') {
tree.push(elem);
}
});
}
return tree;
},
refresh() {
this.loading = true;
getLessonTree().then(response => {
this.treeData = this.convertTreeData(response.data);
this.$nextTick(() => { this.loading = false; });
}).catch(() => {
this.$messageBox(this.$t('error.refreshFailed'));
this.loading = false;
});
}
}
};
</script>
<style>
.el-tree-node.is-current>.el-tree-node__content {
background-color: #e4e3e3 !important;
}
</style>

View File

@ -10,13 +10,13 @@
<el-form-item :label="this.$t('lesson.courseName')+this.$t('global.colon')" prop="name"> <el-form-item :label="this.$t('lesson.courseName')+this.$t('global.colon')" prop="name">
<el-input v-model="courseModel.name" /> <el-input v-model="courseModel.name" />
</el-form-item> </el-form-item>
<el-form-item :label="this.$t('lesson.associatedSkin')" prop="skinCode"> <el-form-item :label="this.$t('lesson.mapName')" prop="mapId">
<el-select v-model="courseModel.skinCode" :placeholder="$t('rules.pleaseSelect')" :disabled="true"> <el-select v-model="courseModel.mapId" :placeholder="$t('rules.pleaseSelect')" :disabled="true">
<el-option <el-option
v-for="(item,index) in skinCodeList" v-for="(item,index) in mapIdList"
:key="index" :key="index"
:label="item.name" :label="item.name"
:value="item.code" :value="item.id"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -44,7 +44,7 @@
<div class="draft"> <div class="draft">
<el-button-group> <el-button-group>
<template v-if="!isEdit"> <template v-if="!isEdit">
<el-button v-if="courseModel.skinCode" type="primary" @click="create">{{ $t('global.create') }}</el-button> <el-button v-if="courseModel.mapId" type="primary" @click="create">{{ $t('global.create') }}</el-button>
<el-button type="primary" @click="back">{{ $t('global.back') }}</el-button> <el-button type="primary" @click="back">{{ $t('global.back') }}</el-button>
</template> </template>
<template v-else> <template v-else>
@ -59,8 +59,8 @@
<script> <script>
import { createLesson, updateLesson, getLessonDetail } from '@/api/jmap/lessondraft'; import { createLesson, updateLesson, getLessonDetail } from '@/api/jmap/lessondraft';
import { getCommodityMapProduct } from '@/api/management/mapprd'; import { getCommodityMapProduct } from '@/api/management/mapprd';
import { getSkinCodeList } from '@/api/management/mapskin'; import { listPublishMap } from '@/api/jmap/map';
// import { UrlConfig } from '@/router/index'; import { UrlConfig } from '@/router/index';
export default { export default {
name: 'CourseEdit', name: 'CourseEdit',
@ -71,12 +71,12 @@ export default {
isEdit: false, isEdit: false,
display: 1, display: 1,
productList: [], productList: [],
skinCodeList: [], mapIdList: [],
courseModel: { courseModel: {
id: '', id: '',
prdCode: '', prdCode: '',
product: [], product: [],
skinCode: '', mapId: '',
name: '', name: '',
remarks: '' remarks: ''
} }
@ -91,8 +91,8 @@ export default {
name: [ name: [
{ required: true, message: this.$t('rules.enterCourseName'), trigger: 'change' } { required: true, message: this.$t('rules.enterCourseName'), trigger: 'change' }
], ],
skinCode: [ mapId: [
{ required: true, message: this.$t('rules.inputSkinType'), trigger: 'change' } { required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
], ],
prdCode: [ prdCode: [
{ required: true, message: this.$t('rules.selectAssociatedProduct'), trigger: 'change' } { required: true, message: this.$t('rules.selectAssociatedProduct'), trigger: 'change' }
@ -105,9 +105,9 @@ export default {
} }
}, },
mounted() { mounted() {
this.skinCodeList = []; this.mapIdList = [];
getSkinCodeList().then(response => { listPublishMap().then(response => {
this.skinCodeList = response.data; this.mapIdList = response.data;
}); });
}, },
methods: { methods: {
@ -117,7 +117,6 @@ export default {
if (!isNew) { if (!isNew) {
this.refresh(data); this.refresh(data);
} else { } else {
this.courseModel.skinCode = this.$route.query.skinCode;
this.courseModel.mapId = this.$route.query.mapId; this.courseModel.mapId = this.$route.query.mapId;
} }
getCommodityMapProduct(this.$route.query.mapId).then(response => { getCommodityMapProduct(this.$route.query.mapId).then(response => {
@ -176,7 +175,7 @@ export default {
const data = response.data; const data = response.data;
this.courseModel = { this.courseModel = {
id: data.id, id: data.id,
skinCode: this.$route.query.skinCode, mapId: this.$route.query.mapId,
prdCode: data.prdCode, prdCode: data.prdCode,
name: data.name, name: data.name,
remarks: data.remarks remarks: data.remarks
@ -187,8 +186,7 @@ export default {
} }
}, },
back() { back() {
// this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}/${this.$route.query.skinCode}`, query: {cityCode: this.$route.query.cityCode} }); this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}`, query: {cityCode: this.$route.query.cityCode} });
this.$router.go(-1);
} }
} }
}; };

View File

@ -877,16 +877,17 @@ export default {
section.trainPosType = model.trainPosType; section.trainPosType = model.trainPosType;
edits.push(section); edits.push(section);
} }
if (section.linkCode == model.linkCode && model.code != section.code) { if (section.linkCode == model.linkCode && model.code != section.code && section.type == '01') {
// debugger;
const lastIndex = this.oldPoint.length - 1; const lastIndex = this.oldPoint.length - 1;
if (this.oldPoint[0].x == section.points[section.points.length - 1].x && this.oldPoint[0].y == section.points[section.points.length - 1].y) { if (this.oldPoint[0].x == section.points[section.points.length - 1].x && this.oldPoint[0].y == section.points[section.points.length - 1].y) {
section.points[section.points.length - 1].x = model.points[0].x; section.points[section.points.length - 1].x = model.points[0].x;
section.points[section.points.length - 1].y = model.points[0].y; section.points[section.points.length - 1].y = model.points[0].y;
section.offsetRight = model.offsetLeft;
} }
if (this.oldPoint[lastIndex].x == section.points[0].x && this.oldPoint[lastIndex].y == section.points[0].y) { if (this.oldPoint[lastIndex].x == section.points[0].x && this.oldPoint[lastIndex].y == section.points[0].y) {
section.points[0].x = model.points[model.points.length - 1].x; section.points[0].x = model.points[model.points.length - 1].x;
section.points[0].y = model.points[model.points.length - 1].y; section.points[0].y = model.points[model.points.length - 1].y;
section.offsetLeft = model.offsetRight;
} }
edits.push(section); edits.push(section);
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <div style="height: 100%; overflow: auto;">
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" /> <QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<div class="draft"> <div class="draft">
<el-button-group> <el-button-group>
@ -13,76 +13,76 @@
import { getPermissonDetail } from '@/api/management/author'; import { getPermissonDetail } from '@/api/management/author';
export default { export default {
name: 'Author', name: 'Author',
components: { components: {
}, },
data() { data() {
return { return {
PermissionTypeList: [], PermissionTypeList: [],
pagerConfig: { pagerConfig: {
pageSize: 'pageSize', pageSize: 'pageSize',
pageIndex: 'pageNum' pageIndex: 'pageNum'
}, },
queryForm: { queryForm: {
labelWidth: '140px', labelWidth: '140px',
reset: true, reset: true,
show: false, show: false,
queryObject: { queryObject: {
} }
}, },
queryList: { queryList: {
query: this.queryFunction, query: this.queryFunction,
selectCheckShow: false, selectCheckShow: false,
indexShow: true, indexShow: true,
columns: [ columns: [
{ {
title: this.$t('orderAuthor.permissionName'), title: this.$t('orderAuthor.permissionName'),
prop: 'name' prop: 'name'
}, },
{ {
title: this.$t('orderAuthor.permissionType'), title: this.$t('orderAuthor.permissionType'),
prop: 'type', prop: 'type',
type: 'tag', type: 'tag',
columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']); }, columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']); },
tagType: (row) => { return ''; } tagType: (row) => { return ''; }
}, },
{ {
type: 'button', type: 'button',
title: this.$t('global.operate'), title: this.$t('global.operate'),
width: '150', width: '150',
buttons: [ buttons: [
] ]
} }
], ],
actions: [ actions: [
] ]
} }
}; };
}, },
mounted() { mounted() {
this.loadInitData(); this.loadInitData();
}, },
methods: { methods: {
loadInitData() { loadInitData() {
this.$Dictionary.permissionType().then(list => { this.$Dictionary.permissionType().then(list => {
this.$convertList(list, this.PermissionTypeList, elem => { this.$convertList(list, this.PermissionTypeList, elem => {
return true; return true;
}); });
}); });
}, },
queryFunction() { queryFunction() {
return getPermissonDetail(this.$route.params.id); return getPermissonDetail(this.$route.params.id);
}, },
reloadTable() { reloadTable() {
if (this.queryList && this.queryList.reload) { if (this.queryList && this.queryList.reload) {
this.queryList.reload(); this.queryList.reload();
} }
}, },
turnback() { turnback() {
this.$router.go(-1); this.$router.go(-1);
} }
} }
}; };
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>

View File

@ -1,72 +1,69 @@
<template> <template>
<el-card> <div class="joylink-card pack-box">
<div class="pack-box" :style="{ height: height +'px' }"> <el-scrollbar wrap-class="scrollbar-wrapper" style="">
<el-scrollbar wrap-class="scrollbar-wrapper" style=""> <el-steps class="steps" :active="display">
<el-steps class="steps" :active="display"> <el-step :title="$t('permission.customPackageRules')" icon="el-icon-edit" />
<el-step :title="$t('permission.customPackageRules')" icon="el-icon-edit" /> <el-step icon="el-icon-setting" />
<el-step icon="el-icon-setting" /> </el-steps>
</el-steps> <div class="joylink-card forms pack-rule">
<el-card class="forms pack-rule"> <el-button class="addList" size="small" @click="dialogAdd">{{ $t('permission.addRules') }}</el-button>
<el-button class="addList" size="small" @click="dialogAdd">{{ $t('permission.addRules') }}</el-button> <el-table
<el-table :data="ruleList"
:data="ruleList" border
border show-summary
show-summary :summary-method="getSummaries"
:summary-method="getSummaries" style="width: 100%; min-height: 300px;"
style="width: 100%" >
:height="height-300" <el-table-column prop="permissionType" :label="$t('permission.permissionType')" width="80">
> <template slot-scope="scope">
<el-table-column prop="permissionType" :label="$t('permission.permissionType')" width="80"> {{ computedName(PermissionTypeList, scope.row.permissionType) }}
<template slot-scope="scope"> </template>
{{ computedName(PermissionTypeList, scope.row.permissionType) }} </el-table-column>
</template> <el-table-column prop="mapId" :label="$t('permission.mapName')">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="mapId" :label="$t('permission.mapName')"> {{ computedName(PublishMapList, scope.row.mapId) }}
<template slot-scope="scope"> </template>
{{ computedName(PublishMapList, scope.row.mapId) }} </el-table-column>
</template> <el-table-column prop="mapProductCode" :label="$t('permission.mapProductName')" width="100">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="mapProductCode" :label="$t('permission.mapProductName')" width="100"> {{ computedName(mapProductList, scope.row.prdCode) }}
<template slot-scope="scope"> </template>
{{ computedName(mapProductList, scope.row.prdCode) }} </el-table-column>
</template> <el-table-column prop="lessonId" :label="$t('permission.lessonName')">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="lessonId" :label="$t('permission.lessonName')"> {{ computedName(PublisLessonList, scope.row.lessonId) }}
<template slot-scope="scope"> </template>
{{ computedName(PublisLessonList, scope.row.lessonId) }} </el-table-column>
</template> <el-table-column prop="startTime" :label="$t('permission.startTime')" width="80" />
</el-table-column> <el-table-column prop="endTime" :label="$t('permission.endTime')" width="80" />
<el-table-column prop="startTime" :label="$t('permission.startTime')" width="80" /> <el-table-column prop="amount" label="权限个数" width="90" />
<el-table-column prop="endTime" :label="$t('permission.endTime')" width="80" /> <el-table-column label="操作" width="100">
<el-table-column prop="amount" label="权限个数" width="90" /> <template slot-scope="scope">
<el-table-column label="操作" width="100"> <el-button type="text" size="small" @click="dialogEdit(scope.row)">{{ $t('global.edit') }}</el-button>
<template slot-scope="scope"> <el-button type="text" size="small" @click="deleteForm(scope.row)">{{ $t('global.delete') }}</el-button>
<el-button type="text" size="small" @click="dialogEdit(scope.row)">{{ $t('global.edit') }}</el-button> </template>
<el-button type="text" size="small" @click="deleteForm(scope.row)">{{ $t('global.delete') }}</el-button> </el-table-column>
</template> </el-table>
</el-table-column> </div>
</el-table> <div class="draft">
</el-card> <el-button-group>
<div class="draft"> <el-button v-if="!urlInfo.url" type="primary" @click="packForm">{{ $t('permission.package') }}</el-button>
<el-button-group> <el-button v-if="urlInfo.url" type="primary" @click="qrcodeShow">{{ $t('permission.getQrcode') }}</el-button>
<el-button v-if="!urlInfo.url" type="primary" @click="packForm">{{ $t('permission.package') }}</el-button> <el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
<el-button v-if="urlInfo.url" type="primary" @click="qrcodeShow">{{ $t('permission.getQrcode') }}</el-button> </el-button-group>
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button> </div>
</el-button-group> <edit-rule
</div> ref="addRule"
<edit-rule :permission-type-list="PermissionTypeList"
ref="addRule" :publis-lesson-list="PublisLessonList"
:permission-type-list="PermissionTypeList" :publish-map-list="PublishMapList"
:publis-lesson-list="PublisLessonList" @editRuleForm="editRuleForm"
:publish-map-list="PublishMapList" @addRuleForm="addRuleForm"
@editRuleForm="editRuleForm" />
@addRuleForm="addRuleForm" </el-scrollbar>
/>
</el-scrollbar>
</div>
<qr-code ref="qrCode" /> <qr-code ref="qrCode" />
<can-transfer ref="canDistribute" @distribute="distribute" /> <can-transfer ref="canDistribute" @distribute="distribute" />
</el-card> </div>
</template> </template>
<script> <script>
@ -96,11 +93,6 @@ export default {
ruleList: [] ruleList: []
}; };
}, },
computed: {
height() {
return this.$store.state.app.height - 63;
}
},
mounted() { mounted() {
this.loadInitData(); this.loadInitData();
}, },
@ -262,6 +254,8 @@ export default {
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
.pack-box { .pack-box {
padding-top: 10px; padding-top: 10px;
height: 100%;
overflow: hidden;
/deep/ { /deep/ {
.el-step__icon.is-icon { .el-step__icon.is-icon {
@ -289,6 +283,8 @@ export default {
} }
.pack-rule { .pack-rule {
width: 980px;
margin: 0 auto;
.addList { .addList {
float: right; float: right;
font-size: 14px; font-size: 14px;

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <div style="height: 100%; overflow: auto;">
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" /> <QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<select-role ref="selectRole" @reloadTable="reloadTable" /> <select-role ref="selectRole" @reloadTable="reloadTable" />
</div> </div>
@ -12,159 +12,159 @@ import { superAdmin, admin } from '@/router';
import selectRole from './selectRole/list'; import selectRole from './selectRole/list';
export default { export default {
name: 'Author', name: 'Author',
components: { components: {
selectRole selectRole
}, },
data() { data() {
return { return {
param: '', param: '',
WhetherTypeList: [], WhetherTypeList: [],
// EffectiveTypeList: [], // EffectiveTypeList: [],
PermissionTypeList: [], PermissionTypeList: [],
pagerConfig: { pagerConfig: {
pageSize: 'pageSize', pageSize: 'pageSize',
pageIndex: 'pageNum' pageIndex: 'pageNum'
}, },
queryForm: { queryForm: {
labelWidth: '140px', labelWidth: '140px',
reset: true, reset: true,
leftSpan: 18, leftSpan: 18,
queryObject: { queryObject: {
'canDistribute': { 'canDistribute': {
type: 'select', type: 'select',
label: this.$t('permission.permissionUseType'), label: this.$t('permission.permissionUseType'),
config: { config: {
data: [] data: []
} }
} }
} }
}, },
queryList: { queryList: {
query: this.queryFunction, query: this.queryFunction,
selectCheckShow: false, selectCheckShow: false,
indexShow: true, indexShow: true,
columns: [ columns: [
{ {
title: this.$t('permission.permissionName'), title: this.$t('permission.permissionName'),
width: '210', width: '210',
prop: 'permissionName' prop: 'permissionName'
}, },
{ {
title: this.$t('permission.permissionType'), title: this.$t('permission.permissionType'),
prop: 'permissionType', prop: 'permissionType',
type: 'tag', type: 'tag',
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); }, columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); },
tagType: (row) => { return ''; } tagType: (row) => { return ''; }
}, },
{ {
title: this.$t('permission.permissionUseType'), title: this.$t('permission.permissionUseType'),
prop: 'canDistribute', prop: 'canDistribute',
type: 'tag', type: 'tag',
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); }, columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
tagType: (row) => { tagType: (row) => {
switch (row.canDistribute) { switch (row.canDistribute) {
case true: return 'success'; case true: return 'success';
case false: return 'danger'; case false: return 'danger';
} }
} }
}, },
{ {
title: this.$t('permission.permissionTotal'), title: this.$t('permission.permissionTotal'),
prop: 'amount' prop: 'amount'
}, },
{ {
title: this.$t('permission.permissionRemains'), title: this.$t('permission.permissionRemains'),
prop: 'remains' prop: 'remains'
}, },
{ {
title: this.$t('permission.startTime'), title: this.$t('permission.startTime'),
prop: 'startTime', prop: 'startTime',
type: 'formatter', type: 'formatter',
formatter: this.formatterDate formatter: this.formatterDate
}, },
{ {
title: this.$t('permission.endTime'), title: this.$t('permission.endTime'),
prop: 'endTime', prop: 'endTime',
type: 'formatter', type: 'formatter',
formatter: this.formatterDate formatter: this.formatterDate
}, },
{ {
title: this.$t('permission.belonger'), title: this.$t('permission.belonger'),
prop: 'ownerName', prop: 'ownerName',
isShow: () => { return this.$store.state.user.roles.indexOf(superAdmin) > 0 || this.$store.state.user.roles.indexOf(admin) > 0; } isShow: () => { return this.$store.state.user.roles.indexOf(superAdmin) > 0 || this.$store.state.user.roles.indexOf(admin) > 0; }
}, },
{ {
type: 'button', type: 'button',
title: this.$t('global.operate'), title: this.$t('global.operate'),
width: '300', width: '300',
hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0 || this.$store.state.user.roles.indexOf(admin) < 0; }, hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0 || this.$store.state.user.roles.indexOf(admin) < 0; },
buttons: [ buttons: [
{ {
name: this.$t('permission.setBelonger'), name: this.$t('permission.setBelonger'),
handleClick: this.handleRoleVest, handleClick: this.handleRoleVest,
type: '' type: ''
}, },
{ {
name: this.$t('orderAuthor.packingDetails'), name: this.$t('orderAuthor.packingDetails'),
handleClick: this.handleDetail, handleClick: this.handleDetail,
type: '', type: '',
showControl: (row) => { return !row.permissionType; } showControl: (row) => { return !row.permissionType; }
} }
] ]
} }
], ],
actions: [ actions: [
{ text: this.$t('permission.permissionPack'), btnCode: 'employee_insert', handler: this.handlePermissionPack } { text: this.$t('permission.permissionPack'), btnCode: 'employee_insert', handler: this.handlePermissionPack }
] ]
} }
}; };
}, },
watch: { watch: {
'$route.params.mapId': function (val) { '$route.params.mapId': function (val) {
this.$refs.queryListPage.refresh(true); this.$refs.queryListPage.refresh(true);
} }
}, },
mounted() { mounted() {
this.loadInitData(); this.loadInitData();
}, },
methods: { methods: {
handleRoleVest(index, row) { handleRoleVest(index, row) {
this.$refs.selectRole.doShow(row.id); this.$refs.selectRole.doShow(row.id);
}, },
handleDetail(index, row) { handleDetail(index, row) {
this.$router.push({ path: `${UrlConfig.trainingPlatform.permissionDetails}/${row.permissionId}` }); this.$router.push({ path: `${UrlConfig.trainingPlatform.permissionDetails}/${row.permissionId}` });
}, },
loadInitData() { loadInitData() {
this.queryForm.queryObject.canDistribute.config.data = this.$ConstSelect.PermissionUseList; this.queryForm.queryObject.canDistribute.config.data = this.$ConstSelect.PermissionUseList;
this.$Dictionary.permissionType().then(list => { this.$Dictionary.permissionType().then(list => {
list.forEach(elem => { list.forEach(elem => {
elem.value = elem.code; elem.value = elem.code;
elem.label = elem.name; elem.label = elem.name;
}); });
this.$convertList(list, this.PermissionTypeList, elem => { this.$convertList(list, this.PermissionTypeList, elem => {
return true; return true;
}); });
}); });
}, },
formatterDate(row, porpInfo) { formatterDate(row, porpInfo) {
return row[porpInfo.property] ? row[porpInfo.property] : '---'; return row[porpInfo.property] ? row[porpInfo.property] : '---';
}, },
queryFunction(params) { queryFunction(params) {
if (this.$route.params.mapId) { if (this.$route.params.mapId) {
params.mapId = this.$route.params.mapId; params.mapId = this.$route.params.mapId;
} }
return listUserPermision(params); return listUserPermision(params);
}, },
handlePermissionPack() { handlePermissionPack() {
this.$router.push({ path: `${UrlConfig.trainingPlatform.draft}` }); this.$router.push({ path: `${UrlConfig.trainingPlatform.draft}` });
}, },
reloadTable() { reloadTable() {
if (this.queryList && this.queryList.reload) { if (this.queryList && this.queryList.reload) {
this.queryList.reload(); this.queryList.reload();
} }
} }
} }
}; };
</script> </script>

View File

@ -23,13 +23,13 @@
/> />
<edit-smooth-run-time ref="editSmoothRunTime" @dispatchDialog="dispatchDialog" /> <edit-smooth-run-time ref="editSmoothRunTime" @dispatchDialog="dispatchDialog" />
<add-smooth-run-time ref="addSmoothRunTime" @dispatchDialog="dispatchDialog" /> <add-smooth-run-time ref="addSmoothRunTime" @dispatchDialog="dispatchDialog" />
<duplicate-train ref="duplicateTrain" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh"/> <duplicate-train ref="duplicateTrain" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<modifying-routing ref="modifyingRouting" @dispatchDialog="dispatchDialog" /> <modifying-routing ref="modifyingRouting" @dispatchDialog="dispatchDialog" />
<modifying-begin-time ref="modifyingBeginTime" /> <modifying-begin-time ref="modifyingBeginTime" />
<systerm-out ref="systermOut" /> <systerm-out ref="systermOut" />
<add-task ref="addTask" @dispatchOperate="dispatchOperate" @refresh="refresh"/> <add-task ref="addTask" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<delete-task ref="deleteTask" @dispatchOperate="dispatchOperate" @refresh="refresh"/> <delete-task ref="deleteTask" @dispatchOperate="dispatchOperate" @refresh="refresh" />
<modifying-task ref="modifyingTask" @dispatchOperate="dispatchOperate" /> <modifying-task ref="modifyingTask" @dispatchOperate="dispatchOperate" />
<edit-station-between-time ref="editStationBetweenTime" /> <edit-station-between-time ref="editStationBetweenTime" />
@ -64,109 +64,109 @@ import { deletePlanService } from '@/api/runplan';
import { checkLoginLine } from '@/api/login'; import { checkLoginLine } from '@/api/login';
export default { export default {
name: 'Menus', name: 'Menus',
components: { components: {
MenuBar, MenuBar,
StatusBar, StatusBar,
Schedule, Schedule,
// OpenRunPlan, // OpenRunPlan,
// CreateEmptyPlan, // CreateEmptyPlan,
Parameter, Parameter,
OffLine, OffLine,
AddPlanningTrain, AddPlanningTrain,
EditPlanningTrain, EditPlanningTrain,
DuplicateTrain, DuplicateTrain,
SystermOut, SystermOut,
AddTask, AddTask,
DeleteTask, DeleteTask,
ModifyingTask, ModifyingTask,
ModifyingRouting, ModifyingRouting,
ModifyingBeginTime, ModifyingBeginTime,
EditStationBetweenTime, EditStationBetweenTime,
AddSmoothRunTime, AddSmoothRunTime,
EditSmoothRunTime, EditSmoothRunTime,
ModifyingStationIntervalTime ModifyingStationIntervalTime
}, },
data() { data() {
return { return {
PlanConvert: {}, PlanConvert: {},
timeDemon: null timeDemon: null
}; };
}, },
computed: { computed: {
skinCode() { skinCode() {
return this.$route.query.skinCode || '02'; return this.$route.query.skinCode || '02';
}, },
width() { width() {
return this.$store.state.app.width; return this.$store.state.app.width;
}, },
height() { height() {
return this.$store.state.app.height; return this.$store.state.app.height;
} }
}, },
created() { created() {
this.PlanConvert = this.$theme.loadPlanConvert(this.skinCode); this.PlanConvert = this.$theme.loadPlanConvert(this.skinCode);
}, },
mounted() { mounted() {
this.timeDemon = setInterval(() => { this.timeDemon = setInterval(() => {
checkLoginLine(); checkLoginLine();
}, 3000 * 60); }, 3000 * 60);
}, },
beforeDestroy() { beforeDestroy() {
if (this.timeDemon) { if (this.timeDemon) {
clearTimeout(this.timeDemon); clearTimeout(this.timeDemon);
} }
}, },
methods: { methods: {
setPosition() { setPosition() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.schedule.setPosition(); this.$refs.schedule.setPosition();
}); });
}, },
dispatchDialog(dialogObj) { dispatchDialog(dialogObj) {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs[dialogObj.name]) { if (this.$refs[dialogObj.name]) {
this.$refs[dialogObj.name].doShow(dialogObj.params); this.$refs[dialogObj.name].doShow(dialogObj.params);
} }
}); });
}, },
dispatchOperate(operateObj) { dispatchOperate(operateObj) {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs[operateObj.dialogName]) { if (this.$refs[operateObj.dialogName]) {
this.$refs[operateObj.dialogName][operateObj.operate](operateObj.params); this.$refs[operateObj.dialogName][operateObj.operate](operateObj.params);
} }
}); });
}, },
handleConfirm(params) { handleConfirm(params) {
if (params.operate == 'AddPlanningTrain') { if (params.operate == 'AddPlanningTrain') {
// //
this.$refs.addPlanningTrain.handleConfirm(); this.$refs.addPlanningTrain.handleConfirm();
} else if (params.operate == 'DeletePlanningTrain') { } else if (params.operate == 'DeletePlanningTrain') {
// //
const model = { const model = {
planId: this.$route.query.planId, planId: this.$route.query.planId,
serviceNumber: params.serviceNumber serviceNumber: params.serviceNumber
}; };
deletePlanService(model).then(resp => { deletePlanService(model).then(resp => {
this.$message.success(this.$t('tip.deletePlanSuccessfully')); this.$message.success(this.$t('tip.deletePlanSuccessfully'));
this.$store.dispatch('runPlan/setSelected', {}); this.$store.dispatch('runPlan/setSelected', {});
this.$store.dispatch('runPlan/refresh'); this.$store.dispatch('runPlan/refresh');
// this.$refs.openRunPlan.loadRunPlanData(Object.assign({refresh: true}, this.$route.query)); // this.$refs.openRunPlan.loadRunPlanData(Object.assign({refresh: true}, this.$route.query));
}).catch(() => { }).catch(() => {
this.$messageBox(this.$t('tip.deletePlanFailed')); this.$messageBox(this.$t('tip.deletePlanFailed'));
}); });
} }
},
showTrain() {
if (this.$refs.schedule) {
this.$refs.schedule.displayTrain();
}
}, },
refresh(){ showTrain() {
if (this.$refs.schedule) {
this.$refs.schedule.displayTrain();
}
},
refresh() {
this.$store.dispatch('runPlan/refresh'); this.$store.dispatch('runPlan/refresh');
} }
} }
}; };
</script> </script>

View File

@ -1,94 +0,0 @@
<template>
<el-card :style="{height: height+'px'}">
<div class="home-box" :style="{height: height+'px'}">
<el-scrollbar wrap-class="scrollbar-wrapper" style="margin-top:5px;">
<h1 class="title">
{{ $t('planMonitor.lianPlanSystem') }}
<img :src="logo" alt="" class="logo-img">
</h1>
<div class="card-box">
<el-carousel :interval="4000" type="card" height="370px">
<el-carousel-item v-for="(item, index) in listImg" :key="index">
<img :src="item.src" alt="" height="100%" width="100%">
</el-carousel-item>
</el-carousel>
</div>
<div class="brief-box">
{{ $t('planMonitor.lianPlanDescription') }}
</div>
</el-scrollbar>
</div>
</el-card>
</template>
<script>
import logo from '@/assets/logo.png';
import home1 from '@/assets/home/plan1.png';
import home2 from '@/assets/home/plan2.png';
import home3 from '@/assets/home/plan3.png';
export default {
name: 'Home',
data() {
return {
listImg: [
{ src: home1 },
{ src: home2 },
{ src: home3 }
],
logo: logo
};
},
computed: {
height() {
return this.$store.state.app.height;
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
/deep/ .el-carousel {
overflow: hidden;
}
.home-box {
padding: 15px 100px;
float: left;
width: 100%;
font-family: 'Microsoft YaHei';
.title {
font-size: 35px;
width: 100%;
text-align: center;
font-weight: 400;
margin-top: 55px;
border-bottom: 2px dashed #333;
padding-bottom: 15px;
margin-bottom: 70px;
position: relative;
.logo-img {
position: absolute;
right: 0;
top: 0;
width: 55px;
}
}
.card-box {
width: 100%;
padding: 0 50px;
}
.brief-box {
font-size: 18px;
text-indent: 2em;
line-height: 32px;
padding: 40px 20px 0;
font-family: unset;
}
}
</style>

View File

@ -1,70 +0,0 @@
<template>
<div class="app-wrapper">
<el-scrollbar wrap-class="scrollbar-wrapper">
<div v-show="listShow" class="map-list" :style="{width: widthLeft+'px'}">
<plan-list ref="planList" :height="height" />
</div>
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
<transition>
<router-view />
</transition>
</el-scrollbar>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import planList from './planmanage/planList';
import drapLeft from '@/views/components/drapLeft/index';
import localStore from 'storejs';
export default {
name: 'Exam',
components: {
planList,
drapLeft
},
data() {
return {
listShow: true,
widthLeft: Number(localStore.get('LeftWidth')) || 450
};
},
computed: {
...mapGetters([
'lessonbar'
]),
height() {
return this.$store.state.app.height;
}
},
watch: {
'lessonbar.opened': function (val) {
this.listShow = val;
}
},
methods: {
refresh() {
this.$refs && this.$refs.planList && this.$refs.planList.refresh();
},
drapWidth(width) {
this.widthLeft = Number(width);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
width: 100%;
overflow: hidden;
}
.map-list {
float: left;
}
</style>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog v-dialogDrag title="复制地图为" :visible.sync="dialogVisible" width="30%" center> <el-dialog v-dialogDrag :title="this.$t('publish.copyMapAs')" :visible.sync="dialogVisible" width="30%" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" /> <data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button> <el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
@ -24,16 +24,16 @@ export default {
form:{ form:{
labelWidth: '100px', labelWidth: '100px',
items: [ items: [
{ prop: 'name', label: '地图名称', type: 'text', required: true}, { prop: 'name', label: this.$t('publish.mapName'), type: 'text', required: true},
{ prop: 'copyOtherData', label: '是否复制数据', type: 'switch', required: true} { prop: 'copyOtherData', label: this.$t('publish.whetherToCopyData'), type: 'switch', required: true}
] ]
}, },
rules: { rules: {
name: [ name: [
{ required: true, message: '请输入地图名称', trigger: 'blur' } { required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
], ],
copyOtherData: [ copyOtherData: [
{ required: true, message: '请选择', trigger: 'change' } { required: true, message: this.$t('global.choose'), trigger: 'change' }
] ]
} }
}; };
@ -52,13 +52,13 @@ export default {
} }
this.loading = true; this.loading = true;
copyMapAs(this.mapId, this.formModel).then(resp =>{ copyMapAs(this.mapId, this.formModel).then(resp =>{
this.$message.success('复制地图成功!'); this.$message.success(this.$t('tip.copyMapSuccess'));
this.loading = false; this.loading = false;
this.dialogVisible = false; this.dialogVisible = false;
this.$emit('refresh'); this.$emit('refresh');
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.$messageBox(`复制地图失败!`); this.$messageBox(this.$t('tip.copyMapFail'));
}); });
} }
} }

View File

@ -15,10 +15,10 @@
:label="this.$t('publish.belongsProject')" :label="this.$t('publish.belongsProject')"
prop="projectCode" prop="projectCode"
:rules="{ :rules="{
required: true, message: '归属项目不能为空', trigger: 'change' required: true, message: this.$t('publish.theBelongsProjectCannotBeEmpty'), trigger: 'change'
}" }"
> >
<el-select v-model="formModel.projectCode" placeholder="请选择归属项目"> <el-select v-model="formModel.projectCode" :placeholder="this.$t('publish.pleaseSelectTheBelongsProject')">
<el-option label="西铁院" value="XTY" /> <el-option label="西铁院" value="XTY" />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -69,12 +69,12 @@ export default {
} }
this.loading = true; this.loading = true;
setMapProject(this.formModel).then(resp =>{ setMapProject(this.formModel).then(resp =>{
this.$message.success('设置归属项目成功!'); this.$message.success(this.$t('tip.setProjectSuccess'));
this.loading = false; this.loading = false;
this.dialogVisible = false; this.dialogVisible = false;
this.$emit('refresh'); this.$emit('refresh');
}).catch( ()=>{ }).catch( ()=>{
this.$messageBox(`设置归属项目失败!`); this.$messageBox(this.$t('tip.setProjectFail'));
}); });
} else { } else {
return false; return false;

View File

@ -1,12 +1,12 @@
<template> <template>
<el-card> <div class="joylink-card card_hidden_box">
<div slot="header" style="text-align: center;"> <div class="card-title">
<b>{{ $t('teach.courseName') }}: {{ courseModel.name }}</b> <b>{{ $t('teach.courseName') }}: {{ courseModel.name }}</b>
</div> </div>
<div style="margin:50px" :style="{ height: height - 230 +'px' }"> <div class="content_box" style="">
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane :label="$t('teach.courseDetails')" name="first"> <el-tab-pane :label="$t('teach.courseDetails')" name="first">
<div :style="{ height: height - 270 +'px' }"> <div>
<el-scrollbar wrap-class="scrollbar-wrapper"> <el-scrollbar wrap-class="scrollbar-wrapper">
<el-tree <el-tree
ref="tree" ref="tree"
@ -32,11 +32,7 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('teach.permissionsDetails')" name="second"> <el-tab-pane :label="$t('teach.permissionsDetails')" name="second">
<div :style="{ height: height - 270 +'px' }"> <limit-list ref="limitList" :course-model="courseModel" @initLoadPage="initLoadPage" />
<el-scrollbar wrap-class="scrollbar-wrapper">
<limit-list ref="limitList" :course-model="courseModel" @initLoadPage="initLoadPage" />
</el-scrollbar>
</div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
@ -46,7 +42,7 @@
<el-button v-if="hasPermssion" type="primary" @click="transfer">{{ $t('teach.authorityTransferred') }}</el-button> <el-button v-if="hasPermssion" type="primary" @click="transfer">{{ $t('teach.authorityTransferred') }}</el-button>
<el-button type="primary" @click="backLessonList">{{ $t('teach.returnCourseList') }}</el-button> <el-button type="primary" @click="backLessonList">{{ $t('teach.returnCourseList') }}</el-button>
</div> </div>
</el-card> </div>
</template> </template>
<script> <script>
@ -86,9 +82,6 @@ export default {
computed: { computed: {
hasPermssion() { hasPermssion() {
return this.courseModel.pmsList.length > 0; return this.courseModel.pmsList.length > 0;
},
height() {
return this.$store.state.app.height - 50;
} }
}, },
watch: { watch: {
@ -214,6 +207,24 @@ export default {
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
.joylink-card{
height: 100%;
.card-title{
height: 47px;
line-height: 47px;
text-align: center;
border-bottom: 1px solid #e6e6e6;
}
}
.content_box{
padding: 50px;
height: calc(100% - 107px);
overflow: auto;
padding-bottom: 0;
}
.card_hidden_box{
overflow: hidden;
}
.menu li { .menu li {
border-right: solid white 1px; border-right: solid white 1px;
@ -225,10 +236,8 @@ export default {
} }
.btn-buy { .btn-buy {
position: relative;
text-align: center; text-align: center;
justify-content: center; padding: 10px 0;
transform: translateY(-20px);
} }
.custom-tree-node { .custom-tree-node {
flex: 1; flex: 1;

View File

@ -6,23 +6,10 @@
</div> </div>
</el-card> </el-card>
<el-card v-loading="loading"> <el-card v-loading="loading">
<el-table <el-table :data="tableData" border style="width: 100%">
:data="tableData" <el-table-column prop="name" :label="this.$t('teach.courseName')" />
border <el-table-column prop="remarks" show-overflow-tooltip :label="this.$t('teach.courseDescription')" />
style="width: 100%" <el-table-column :label="this.$t('global.operate')">
>
<el-table-column
prop="name"
:label="this.$t('teach.courseName')"
/>
<el-table-column
prop="remarks"
show-overflow-tooltip
:label="this.$t('teach.courseDescription')"
/>
<el-table-column
:label="this.$t('global.operate')"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" @click="goLesson(scope.row)"> <el-button size="mini" type="primary" @click="goLesson(scope.row)">
{{ $t('teach.enterTheCourse') }} {{ $t('teach.enterTheCourse') }}

View File

@ -859,7 +859,7 @@ export default {
stationList.forEach(item => { stationList.forEach(item => {
item.disabled = false; item.disabled = false;
list.forEach(nor => { list.forEach(nor => {
if (item.code === nor.deviceCode[0]) { if (item.value === nor.deviceCode[0]) {
item.disabled = true; item.disabled = true;
} }
}); });