修改三位沙盘驾驶位置更新,修改三位课程页面
This commit is contained in:
parent
090c57aa5d
commit
f9375c0726
@ -1,5 +1,5 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
//获取三维课程草稿列表
|
||||
export function getLesson3dDrftList(params) {
|
||||
return request({
|
||||
url: `/api/draft3dLesson/paging`,
|
||||
@ -7,7 +7,7 @@ export function getLesson3dDrftList(params) {
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
//获取三维课程草稿数据
|
||||
export function getLesson3dData(lessonId) {
|
||||
return request({
|
||||
url: `/api/draft3dLesson/${lessonId}`,
|
||||
@ -15,13 +15,47 @@ export function getLesson3dData(lessonId) {
|
||||
params: ''
|
||||
});
|
||||
}
|
||||
//获取三维课程发布数据
|
||||
export function getPublishLesson3dData(lessonId) {
|
||||
return request({
|
||||
url: `/api/lesson3d/${lessonId}`,
|
||||
method: 'get',
|
||||
params: ''
|
||||
});
|
||||
}
|
||||
//上架课程
|
||||
export function onlineLesson3d(lessonId) {
|
||||
return request({
|
||||
url: `/api/lesson3d/${lessonId}/online`,
|
||||
method: 'put',
|
||||
params: ''
|
||||
});
|
||||
}
|
||||
//下架课程
|
||||
export function offlineLesson3d(lessonId) {
|
||||
return request({
|
||||
url: `/api/lesson3d/${lessonId}/offline`,
|
||||
method: 'put',
|
||||
params: ''
|
||||
});
|
||||
}
|
||||
|
||||
export function getSelectLesson3dList(params) {
|
||||
return request({
|
||||
url: `/api/lesson3d/list`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
//查询发布课程
|
||||
export function publishedLesson3d() {
|
||||
export function publishedLesson3d(params) {
|
||||
return request({
|
||||
url: `/api/lesson3d/paging`,
|
||||
method: 'get',
|
||||
params: ''
|
||||
params: params
|
||||
});
|
||||
}
|
||||
|
||||
@ -39,7 +73,7 @@ export function publishLesson3d(lessonId) {
|
||||
return request({
|
||||
url: `/api/draft3dLesson/${lessonId}/publish`,
|
||||
method: 'post',
|
||||
data: ""
|
||||
data: ''
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,9 @@ export default {
|
||||
courseDescription: 'Course description',
|
||||
editCourse: 'Edit course',
|
||||
createCourse: 'Create course',
|
||||
courseRelease: 'Course release',
|
||||
courseRelease: 'Course offonline',
|
||||
courseOnline: 'Course online',
|
||||
courseOffline: 'Course offonline',
|
||||
releaseAssociatedCity: 'Release associated city:',
|
||||
releaseAssociatedMap: 'Release associated map:',
|
||||
trainingSequence: 'Training sequence',
|
||||
|
@ -123,6 +123,8 @@ export default {
|
||||
|
||||
coursePublishSuccessful: 'Successful course release',
|
||||
coursePublishFailed: 'Course launch failed',
|
||||
offlineSuccessful: 'Successful offline',
|
||||
offlineFailed: 'Course offline',
|
||||
startOperationHint: 'This operation will start the task. Do you want to continue?',
|
||||
cancelsTaskHint: 'This action cancels the task. Do you want to continue?',
|
||||
automaticGenerationTrainingSuccess: 'Automatic generation of training success',
|
||||
|
@ -74,6 +74,8 @@ export default {
|
||||
editCourse: '编辑课程',
|
||||
createCourse: '创建课程',
|
||||
courseRelease: '课程发布',
|
||||
courseOnline: '课程上架',
|
||||
courseOffline: '课程下架',
|
||||
releaseAssociatedCity: '发布关联城市:',
|
||||
releaseAssociatedMap: '发布关联地图:',
|
||||
trainingSequence: '实训排序',
|
||||
@ -124,4 +126,3 @@ export default {
|
||||
copy: '复制',
|
||||
prdType:'产品类型'
|
||||
};
|
||||
|
||||
|
@ -123,6 +123,8 @@ export default {
|
||||
trainModelNameRepeat: '列车模型数据重复',
|
||||
coursePublishSuccessful: '课程发布成功',
|
||||
coursePublishFailed: '课程发布失败',
|
||||
offlineSuccessful: '课程下架成功',
|
||||
offlineFailed: '课程下架失败',
|
||||
startOperationHint: '此操作将开始任务, 是否继续?',
|
||||
cancelsTaskHint: '此操作将取消任务, 是否继续?',
|
||||
automaticGenerationTrainingSuccess: '自动生成实训成功',
|
||||
|
@ -364,7 +364,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
// if(data.code = "336"){
|
||||
// console.log(data);
|
||||
// }
|
||||
|
||||
if(rails.sectionrail[data.section]){
|
||||
if(data.section != updateTrainModel.nowsection){
|
||||
updateTrainModel.nowsection = data.section;
|
||||
updateTrainModel.curve = rails.sectionrail[data.section].lineleft;
|
||||
@ -522,6 +522,10 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
updateTrainModel.position.x = -100000;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -537,7 +541,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
trainmodel.code = data.code;
|
||||
trainmodel.nowcode = data.code;
|
||||
}
|
||||
|
||||
if(rails.sectionrail[data.section]){
|
||||
//改变当前列车行驶的区段code
|
||||
if(data.section != trainmodel.nowsection){
|
||||
trainmodel.nowsection = data.section;
|
||||
@ -797,10 +801,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// let pos = ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1006,7 +1007,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
}
|
||||
function signalupdate(data) {
|
||||
code = data.code;
|
||||
|
||||
if(signallist.list[code]){
|
||||
if(data.command == 'No'){
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map = materials["black"];
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
|
||||
@ -1072,8 +1073,11 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function initswitch(data) {
|
||||
code = data.code;
|
||||
if(actions[code]){
|
||||
if (data.command == 'NP') {
|
||||
// sectionlist.switchs.modellist[j].normal = data.normal;
|
||||
actions[code].action.reset();
|
||||
@ -1090,10 +1094,11 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,dri
|
||||
actions[code].command = data.command;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function switchupdate(data) {
|
||||
code = data.code;
|
||||
if (actions[code].command != data.command) {
|
||||
if (actions[code].command != data.command && actions[code]) {
|
||||
if (data.command == 'NP') {
|
||||
// sectionlist.switchs.modellist[j].normal = data.normal;
|
||||
actions[code].action.reset();
|
||||
|
@ -325,6 +325,7 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
function trainrunnew(data){
|
||||
let code = data.code;
|
||||
|
||||
if(rails.sectionrail[data.section]){
|
||||
if(trainlisttest.list[code].right != data.right){
|
||||
|
||||
if(data.right == "0"){
|
||||
@ -514,6 +515,10 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
trainlisttest.list[code].position.x = -100000;
|
||||
}
|
||||
|
||||
}
|
||||
function trainrun(data){
|
||||
let code = data.code;
|
||||
@ -871,6 +876,7 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
|
||||
function signalupdate(data) {
|
||||
code = data.code;
|
||||
if(signallist.list[code]){
|
||||
if(data.command == 'No'){
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map = materials["black"];
|
||||
signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true;
|
||||
@ -933,11 +939,12 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
signallist.list[code].mesh.getObjectByName("green").material.map = materials["black"];
|
||||
signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function initswitch(data) {
|
||||
code = data.code;
|
||||
if(actions[code]){
|
||||
if (data.command == 'NP') {
|
||||
// sectionlist.switchs.modellist[j].normal = data.normal;
|
||||
actions[code].action.reset();
|
||||
@ -953,12 +960,14 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
actions[code].action.play();
|
||||
actions[code].command = data.command;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function switchupdate(data) {
|
||||
code = data.code;
|
||||
|
||||
if(actions[code]){
|
||||
if (actions[code].command != data.command) {
|
||||
if (data.command == 'NP') {
|
||||
// sectionlist.switchs.modellist[j].normal = data.normal;
|
||||
@ -977,6 +986,8 @@ export function Maintainerconnect(jlmap3d,routegroup,jsonwebwork,lablecodemap) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
function simulationreset(data){
|
||||
for(let i=0;i<trainlisttest.group.children.length;i++){
|
||||
trainlisttest.group.children[i].dispose = true;
|
||||
|
@ -165,6 +165,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
|
||||
function trainRunNew(data){
|
||||
let code = data.code;
|
||||
if(rails.sectionrail[data.section]){
|
||||
if(trainlisttest.list[code].right != data.right){
|
||||
if(data.right == "0"){
|
||||
|
||||
@ -433,6 +434,10 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
trainlisttest.list[code].position.x = -1000000;
|
||||
}
|
||||
|
||||
}
|
||||
function trainrun(data){
|
||||
let code = data.code;
|
||||
@ -868,6 +873,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
|
||||
function initswitch(data) {
|
||||
code = data.code;
|
||||
if(actions[code]){
|
||||
if (data.command == 'NP') {
|
||||
// sectionlist.switchs.modellist[j].normal = data.normal;
|
||||
actions[code].action.reset();
|
||||
@ -884,9 +890,11 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
actions[code].command = data.command;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function switchupdate(data) {
|
||||
code = data.code;
|
||||
if(actions[code]){
|
||||
if (actions[code].command != data.command) {
|
||||
if (data.command == 'NP') {
|
||||
// sectionlist.switchs.modellist[j].normal = data.normal;
|
||||
@ -905,6 +913,8 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
function simulationreset(data){
|
||||
for(let i=0;i<trainlisttest.group.children.length;i++){
|
||||
trainlisttest.group.children[i].dispose = true;
|
||||
|
@ -29,7 +29,6 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
|
||||
|
||||
// let stats = new Stats();
|
||||
// dom.appendChild( stats.dom );
|
||||
|
||||
let scope = this;
|
||||
this.dom = dom;
|
||||
this.nowSceneType = "";
|
||||
@ -65,6 +64,8 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) {
|
||||
|
||||
let loadingInstance = Loading.service({ fullscreen: true });
|
||||
let assetModelManager = new AssetModelManager(scope,scene,controlManager);
|
||||
|
||||
console.log(lessonData);
|
||||
assetModelManager.lessonAssetsLoader(lessonData).then((result) => {
|
||||
scope.nowSceneType = lessonData.lessonProgress[0].progressScene;
|
||||
animateManager.initAnimation(assetModelManager);
|
||||
|
@ -2,7 +2,7 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://114.116.51.125/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.152:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.8.172:9200'; // 旭强
|
||||
@ -10,7 +10,7 @@ export function getBaseUrl() {
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
} else {
|
||||
BASE_API = process.env.VUE_APP_BASE_API;
|
||||
}
|
||||
|
@ -590,6 +590,7 @@ export default {
|
||||
},
|
||||
updatetrainlist(){
|
||||
getSimulationTrainlistNew(this.group).then(netdata => {
|
||||
console.log(netdata);
|
||||
this.options = [];
|
||||
this.trainlist = netdata.data;
|
||||
for(let i=0;i<netdata.data.length;i++){
|
||||
|
@ -144,7 +144,7 @@
|
||||
import { JobPaneData } from '@/jlmap3d/lesson3d/toolsmodel/jobpanedata.js';
|
||||
import { ZzwwTrain } from '@/jlmap3d/lesson3dedit/toolsmodel/zzwwtrain.js';
|
||||
|
||||
import { getLesson3dData,updateLesson3dData } from '@/api/jmap/lesson3d';
|
||||
import { getLesson3dData,updateLesson3dData,getPublishLesson3dData} from '@/api/jmap/lesson3d';
|
||||
|
||||
import { JL3D_LOCAL_STATIC,BASE_ASSET_API } from '@/api/jlmap3d/assets3d.js';
|
||||
|
||||
@ -248,15 +248,77 @@
|
||||
window.startLesson = this.startLesson;
|
||||
window.updataExamStatus = this.updataExamStatus;
|
||||
window.lessonEnd = this.lessonEnd;
|
||||
this.init(this.$route.query.lessonId);
|
||||
console.log(this.$route.query.lessonType);
|
||||
if(this.$route.query.lessonType == "publish"){
|
||||
this.initPublish(this.$route.query.lessonId);
|
||||
}else{
|
||||
this.initDraft(this.$route.query.lessonId);
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
init(lessonId){
|
||||
initDraft(lessonId){
|
||||
|
||||
getLesson3dData(lessonId).then(data => {
|
||||
console.log(data);
|
||||
this.netData.name = data.data.name;
|
||||
this.netData.type = data.data.type;
|
||||
|
||||
let dom = document.getElementById('lesson3ddraw');
|
||||
|
||||
this.lessonData = new LessonData();
|
||||
this.jobPaneData = new JobPaneData();
|
||||
this.trainDeviceData = new ZzwwTrain();
|
||||
let loadData;
|
||||
|
||||
|
||||
if(data.data.data){
|
||||
this.lessonMsg = {
|
||||
lessonTittle:data.data.name,
|
||||
userId:data.data.userId,
|
||||
userJob:"",
|
||||
};
|
||||
loadData = JSON.parse(data.data.data);
|
||||
if(this.$route.query.examMode == 1){
|
||||
this.examMode = true;
|
||||
}else{
|
||||
this.examMode = loadData.setup.examMode;
|
||||
}
|
||||
if(loadData.setup.checkedRole.length == 0){
|
||||
this.showSelectJob = false;
|
||||
}
|
||||
this.selectJobList = loadData.setup.checkedRole;
|
||||
this.jobPaneData.dataList = loadData.toolJobPane;
|
||||
this.$refs.jobpane.initJobList(this.jobPaneData.dataList);
|
||||
this.lessonTools = loadData.lessonTools;
|
||||
this.lessonData.loadLessonProgress(loadData.lessonProgress);
|
||||
if(this.lessonTools[5]){
|
||||
loadData.trainDeviceData = this.trainDeviceData.deviceList;
|
||||
}else{
|
||||
this.lessonTools[5] = {
|
||||
name:"大铁车检组件",
|
||||
type:"",
|
||||
isShow:false,
|
||||
};
|
||||
}
|
||||
}else{
|
||||
|
||||
this.lessonData.initLessonProgress();
|
||||
this.$refs.jobpane.initJobList(this.jobPaneData.dataList);
|
||||
this.jl3d.initNowRole();
|
||||
}
|
||||
// console.log("loaddata----------------");
|
||||
// console.log(loadData);
|
||||
// console.log(this.lessonMsg);
|
||||
this.jl3d = new Lesson3dPlayer(dom,loadData,this.lessonPlayIndex);
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
initPublish(lessonId){
|
||||
getPublishLesson3dData(lessonId).then(data => {
|
||||
console.log(data);
|
||||
this.netData.name = data.data.name;
|
||||
this.netData.type = data.data.type;
|
||||
|
||||
|
@ -6,11 +6,21 @@
|
||||
<div style="position:absolute;left:25%;top:10%;font-size:80px;">
|
||||
<el-row>
|
||||
城市轨道交通标准化培训软件
|
||||
|
||||
</el-row>
|
||||
<el-row style="font-size:40px;">
|
||||
课程模式选择:
|
||||
<el-switch
|
||||
v-model="examMode"
|
||||
active-text="考试模式"
|
||||
inactive-text="教学模式">
|
||||
</el-switch>
|
||||
</el-row>
|
||||
</div>
|
||||
<div style="position:absolute;left:40%;top:20%;font-size:30px">
|
||||
|
||||
<div class="lesson3dSelectButton"
|
||||
</div>
|
||||
<QueryListPage ref="queryListPage" :card-padding="50" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;top:25%;position:absolute" />
|
||||
<!-- <div class="lesson3dSelectButton"
|
||||
:style="{'background-image': 'url('+localStatic+'/other/ck.png)'}"
|
||||
style="left:15%;top:25%;" @click=""></div>
|
||||
|
||||
@ -32,7 +42,7 @@
|
||||
|
||||
<div class="lesson3dSelectButton"
|
||||
:style="{'background-image': 'url('+localStatic+'/other/xr51.png)'}"
|
||||
style="left:65%;top:60%;" @click=""></div>
|
||||
style="left:65%;top:60%;" @click=""></div> -->
|
||||
|
||||
|
||||
</div>
|
||||
@ -42,6 +52,7 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { publishedLesson3d } from '@/api/jmap/lesson3d';
|
||||
import { ProjectIcon } from '@/scripts/ProjectConfig';
|
||||
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
|
||||
import bgPsdImg from '@/assets/bg_psd.png';
|
||||
@ -57,7 +68,56 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
localStatic:JL3D_LOCAL_STATIC,
|
||||
examMode:false,
|
||||
lessonType:'publish',
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
show: false
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '三维课程名称',
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '三维课程类型',
|
||||
prop: 'type'
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
prop: 'userId'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
prop: 'createTime'
|
||||
},
|
||||
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '400',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('lesson.courseDetails'),
|
||||
handleClick: this.goDetail,
|
||||
type: 'primary',
|
||||
showControl: (row) => {
|
||||
return row.status !== '1';
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
@ -70,13 +130,16 @@ export default {
|
||||
// console.log("");
|
||||
},
|
||||
methods: {
|
||||
|
||||
enterPlayer:function (id) {
|
||||
// this.$router.push({ path: '/jlmap3d/lcjy', query: {} });
|
||||
|
||||
this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId:id} });
|
||||
queryFunction(params) {
|
||||
return publishedLesson3d(params);
|
||||
},
|
||||
|
||||
refresh() {
|
||||
this.$refs.queryListPage.refresh(true);
|
||||
},
|
||||
goDetail(index, row) {
|
||||
this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId: row.id,lineCode: this.$route.query.lineCode,examMode:this.examMode,lessonType:this.lessonType} });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -1,12 +1,27 @@
|
||||
<template>
|
||||
<div class="joylink-card">
|
||||
|
||||
|
||||
|
||||
<div class="lesson-header">
|
||||
<div class="lesson-list">草稿{{ $t('lesson.courseList') }}</div>
|
||||
<div class="joylink-card">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
|
||||
<el-tab-pane label="草稿数据管理" name="first">
|
||||
<div class="but-group">
|
||||
<el-button size="mini" type="primary" @click="lessonSetupCreate">{{ $t('lesson.newConstruction') }}</el-button>
|
||||
</div>
|
||||
<QueryListPage ref="queryListPage" :card-padding="50" :query-form="queryFormCourse" :pager-config="pagerConfigCourse" :query-list="queryListCourse" style="width: 91%;margin-left:4%;margin-top:20px;" />
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="发布数据管理" name="second">
|
||||
<QueryListPage ref="queryListPage" :card-padding="50" :query-form="queryFormPublish" :pager-config="pagerConfigPublish" :query-list="queryListPublish" style="width: 91%;margin-left:4%;margin-top:20px;" />
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
|
||||
</div>
|
||||
<QueryListPage ref="queryListPage" :card-padding="50" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
|
||||
|
||||
|
||||
<publish-create ref="publishCreate" @refresh="refresh" />
|
||||
<publish-lesson ref="publishLesson" @refresh="refresh" />
|
||||
<lesson-detail ref="lessonDetail" />
|
||||
@ -18,7 +33,7 @@
|
||||
<script>
|
||||
// import { releaseOrCancel } from '@/api/lesson3d';
|
||||
|
||||
import { getLesson3dDrftList,createLesson3d,updateLesson3dBasic,delLesson3d,publishLesson3d } from '@/api/jmap/lesson3d';
|
||||
import { getLesson3dDrftList,createLesson3d,updateLesson3dBasic,delLesson3d,publishedLesson3d,publishLesson3d,onlineLesson3d,offlineLesson3d } from '@/api/jmap/lesson3d';
|
||||
// import { delLesson } from '@/api/jmap/lesson3d';
|
||||
|
||||
|
||||
@ -41,15 +56,23 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
pagerConfig: {
|
||||
activeName: 'first',
|
||||
pagerConfigCourse: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
pagerConfigPublish: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryFormCourse: {
|
||||
show: false
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
queryFormPublish: {
|
||||
show: false
|
||||
},
|
||||
queryListCourse: {
|
||||
query: this.queryFunctionCourse,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
@ -84,14 +107,13 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('lesson.notRelease'),
|
||||
name: this.$t('lesson.courseRelease'),
|
||||
handleClick: this.release,
|
||||
type: 'primary',
|
||||
showControl: (row) => {
|
||||
return row.status !== '1';
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: this.$t('global.delete'),
|
||||
handleClick: this.deleteLesson,
|
||||
@ -104,7 +126,64 @@ export default {
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
queryListPublish: {
|
||||
query: this.queryFunctionPublish,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '三维课程名称',
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '三维课程类型',
|
||||
prop: 'type'
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
prop: 'userId'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
prop: 'createTime'
|
||||
},
|
||||
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '400',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('lesson.courseDetails'),
|
||||
handleClick: this.goDetail,
|
||||
type: 'primary',
|
||||
showControl: (row) => {
|
||||
return row.status !== '1';
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('lesson.courseOnline'),
|
||||
handleClick: this.online,
|
||||
type: 'primary',
|
||||
showControl: (row) => {
|
||||
return row.status !== '1';
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: this.$t('lesson.courseOffline'),
|
||||
handleClick: this.offonline,
|
||||
type: 'primary',
|
||||
showControl: (row) => {
|
||||
return row.status !== '1';
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
};
|
||||
},
|
||||
@ -128,9 +207,12 @@ export default {
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
queryFunction(params) {
|
||||
queryFunctionCourse(params) {
|
||||
return getLesson3dDrftList(params);
|
||||
},
|
||||
queryFunctionPublish(params) {
|
||||
return publishedLesson3d(params);
|
||||
},
|
||||
handlerStatus(row) {
|
||||
let lessonStatus = '';
|
||||
switch (row.status) {
|
||||
@ -149,6 +231,9 @@ export default {
|
||||
}
|
||||
return lessonStatus;
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
// console.log(tab, event);
|
||||
},
|
||||
refresh() {
|
||||
this.$refs.queryListPage.refresh(true);
|
||||
},
|
||||
@ -168,8 +253,6 @@ export default {
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
publish(index, row) {
|
||||
row.mapId = this.$route.params.mapId;
|
||||
row.cityCode = this.$route.query.cityCode;
|
||||
@ -187,8 +270,35 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
release(){
|
||||
|
||||
release(index, row){
|
||||
publishLesson3d(row.id).then(response => {
|
||||
this.$message.success(this.$t('tip.coursePublishSuccessful'));
|
||||
this.loading = true;
|
||||
this.refresh();
|
||||
this.loading = false;
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.coursePublishFailed'));
|
||||
});
|
||||
},
|
||||
online(index, row){
|
||||
onlineLesson3d(row.id).then(response => {
|
||||
this.$message.success(this.$t('tip.coursePublishSuccessful'));
|
||||
this.loading = true;
|
||||
this.refresh();
|
||||
this.loading = false;
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.coursePublishFailed'));
|
||||
});
|
||||
},
|
||||
offonline(index, row){
|
||||
offlineLesson3d(row.id).then(response => {
|
||||
this.$message.success(this.$t('tip.offlineSuccessful'));
|
||||
this.loading = true;
|
||||
this.refresh();
|
||||
this.loading = false;
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.offlineFailed'));
|
||||
});
|
||||
},
|
||||
goDetail(index, row) {
|
||||
console.log(row);
|
||||
|
Loading…
Reference in New Issue
Block a user