This commit is contained in:
joylink_fanyuhong 2022-01-05 13:53:39 +08:00
commit 62f22d0c73
7 changed files with 155 additions and 122 deletions

View File

@ -0,0 +1,85 @@
<template>
<div id="" class="lessondeletediv" v-show="showDelete">
<div style="text-align:center;top:10%;font-size:30px">确认是否删除</div>
<el-form ref="form" >
<el-form-item style="text-align:center;margin-left: 0px;margin-top: 5%;" >
<el-button type="primary" @click="onSubmit">删除</el-button>
<el-button @click="unSubmit" >取消</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import Vue from 'vue';
import localStore from 'storejs';
export default {
name: 'LessonDelete',
components: {
},
data() {
return {
showDelete:false,
deleteId:'',
}
},
computed: {
},
watch: {
},
mounted() {
},
beforeDestroy() {
},
methods: {
deleteView(id){
if(this.showDelete == false){
this.showDelete = true;
this.deleteId = id;
}else{
this.showDelete = false;
}
},
onSubmit() {
this.showDelete = false;
this.$emit('lessonDelete',this.deleteId);
},
unSubmit(){
this.showDelete = false;
},
},
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.lessondeletediv {
position: absolute;
width: 20%;
height: 10%;
top:45%;
left:40%;
background-color: #fff;
border-radius: 18px;
border:solid 2px #000;
z-index: 5;
}
</style>

View File

@ -71,9 +71,6 @@
} }
}, },
onSubmit() { onSubmit() {
console.log(this.form.scene);
console.log(this.form.role);
console.log('submit!');
this.showSetup = false; this.showSetup = false;
this.$emit('lessonCreate', { name: this.form.name, type: this.form.type }); this.$emit('lessonCreate', { name: this.form.name, type: this.form.type });
}, },

View File

@ -302,6 +302,7 @@
saveData.setup.examMode = this.examMode; saveData.setup.examMode = this.examMode;
saveData.setup.checkedRole = this.checkedRole; saveData.setup.checkedRole = this.checkedRole;
console.log(saveData);
this.netData.data = JSON.stringify(saveData); this.netData.data = JSON.stringify(saveData);
// console.log(); // console.log();
updateLesson3dData(this.$route.query.lessonId,this.netData).then(data => { updateLesson3dData(this.$route.query.lessonId,this.netData).then(data => {

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="explainpanediv" <div class="explainpanediv"
v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex]" v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex] && lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.text != ''"
:style="{'background-image': 'url('+lessonbg+')'}"> :style="{'background-image': 'url('+lessonbg+')'}">
<div class="explainpanetittle" > <div class="explainpanetittle" >

View File

@ -2,7 +2,7 @@
<div class="stepstipsdiv" <div class="stepstipsdiv"
v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex]" v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex]"
:style="{'background-image': 'url('+lessonbg+')'}"> :style="{'background-image': 'url('+lessonbg+')'}">
<div class="stepstipstittle" > <div class="stepstipstittle" v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex].explainPane.text != ''">
当前情况 当前情况
<!-- {{lessonData.lessonData.lessonProgress[lessonPlayIndex].stepTipsData.tittle}} --> <!-- {{lessonData.lessonData.lessonProgress[lessonPlayIndex].stepTipsData.tittle}} -->
</div> </div>

View File

@ -2,8 +2,7 @@
<div class="jl3dmap3dMaintainer"> <div class="jl3dmap3dMaintainer">
<div class="jl3dmap3dMaintainerSelect" :style="{'background-color': '#e4eaea'}"> <div class="jl3dmap3dMaintainerSelect" :style="{'background-color': '#e4eaea'}">
<div style="position:absolute;width:50%;left:25%;top:10%;text-align:center;font-size:80px;">
<div style="position:absolute;left:25%;top:10%;font-size:80px;">
<el-row> <el-row>
城市轨道交通标准化培训软件 城市轨道交通标准化培训软件
</el-row> </el-row>
@ -16,43 +15,43 @@
</el-switch> </el-switch>
</el-row> </el-row>
</div> </div>
<div style="position:absolute;left:40%;top:20%;font-size:30px"> <div style="width:40%;height:70%;position:absolute;left:30%;top:25%;font-size:30px">
<el-table
:data="lessonData"
style="width: 100%;"
highlight-current-row
max-height="700"
>
<el-table-column
label="课程名称"
prop="name">
</el-table-column>
<el-table-column
align="right">
<template slot-scope="scope">
<el-button
size="mini"
@click="goDetail(scope.row)">进入课程</el-button>
</template>
</el-table-column>
</el-table>
</div> </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="display-draft">
<!-- <div class="lesson3dSelectButton" <el-button-group>
:style="{'background-image': 'url('+localStatic+'/other/ck.png)'}" <el-button style="width:200px"type="primary" @click="quit">退出</el-button>
style="left:15%;top:25%;" @click=""></div> </el-button-group>
</div>
<div class="lesson3dSelectButton"
:style="{'background-image': 'url('+localStatic+'/other/hk.png)'}"
style="left:40%;top:25%;" @click=""></div>
<div class="lesson3dSelectButton"
:style="{'background-image': 'url('+localStatic+'/other/jy.png)'}"
style="left:65%;top:25%;" @click="enterPlayer(32)"></div>
<div class="lesson3dSelectButton"
:style="{'background-image': 'url('+localStatic+'/other/yx.png)'}"
style="left:15%;top:60%;" @click=""></div>
<div class="lesson3dSelectButton"
:style="{'background-image': 'url('+localStatic+'/other/zf.png)'}"
style="left:40%;top:60%;" @click=""></div>
<div class="lesson3dSelectButton"
:style="{'background-image': 'url('+localStatic+'/other/xr51.png)'}"
style="left:65%;top:60%;" @click=""></div> -->
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { publishedLesson3d } from '@/api/jmap/lesson3d'; import { getSelectLesson3dList } from '@/api/jmap/lesson3d';
import { ProjectIcon } from '@/scripts/ProjectConfig'; import { ProjectIcon } from '@/scripts/ProjectConfig';
import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js'; import { JL3D_LOCAL_STATIC } from '@/api/jlmap3d/assets3d.js';
import bgPsdImg from '@/assets/bg_psd.png'; import bgPsdImg from '@/assets/bg_psd.png';
@ -70,52 +69,10 @@ export default {
localStatic:JL3D_LOCAL_STATIC, localStatic:JL3D_LOCAL_STATIC,
examMode:false, examMode:false,
lessonType:'publish', lessonType:'publish',
pagerConfig: { lessonData:[],
pageSize: 'pageSize', search: '',
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';
}
}
]
}
]
}
}; };
}, },
@ -126,20 +83,20 @@ export default {
// document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project]; // document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project];
}, },
mounted() { mounted() {
getSelectLesson3dList().then(response => {
console.log(response);
this.lessonData = response.data;
}).catch(() => {
});
// console.log(""); // console.log("");
}, },
methods: { methods: {
queryFunction(params) { goDetail( row) {
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} }); this.$router.push({ path: '/design/jlmap3d/lesson3dplayer', query: {lessonId: row.id,lineCode: this.$route.query.lineCode,examMode:this.examMode,lessonType:this.lessonType} });
} },
quit() {
history.go(-1);
},
} }
}; };
</script> </script>
@ -169,22 +126,15 @@ export default {
background-size:100%; background-size:100%;
} }
.lesson3dSelectButton{
position:absolute; .display-draft {
width: 20%; /* z-index: 1000; */
height: 30%; position: absolute;
position:absolute; width:100%;
text-align: center; text-align: center;
font-size: 50px; bottom: 50px;
line-height:150px;
background-size: 100%;
background-repeat: no-repeat;
color:#FFF;
cursor:pointer;
} }
</style> </style>

View File

@ -10,7 +10,7 @@
<div class="but-group"> <div class="but-group">
<el-button size="mini" type="primary" @click="lessonSetupCreate">{{ $t('lesson.newConstruction') }}</el-button> <el-button size="mini" type="primary" @click="lessonSetupCreate">{{ $t('lesson.newConstruction') }}</el-button>
</div> </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;" /> <QueryListPage ref="queryListPageCourse" :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>
<el-tab-pane label="发布数据管理" name="second"> <el-tab-pane label="发布数据管理" name="second">
@ -27,6 +27,7 @@
<lesson-detail ref="lessonDetail" /> <lesson-detail ref="lessonDetail" />
<Lesson-Setup ref="lessonsetup" @lessonCreate="lessonCreate"></Lesson-Setup> <Lesson-Setup ref="lessonsetup" @lessonCreate="lessonCreate"></Lesson-Setup>
<Lesson-Delete ref="lessondelete" @lessonDelete="lessonDelete"></Lesson-Delete>
</div> </div>
</template> </template>
@ -45,13 +46,16 @@ import ConstConfig from '@/scripts/ConstConfig';
import LessonSetup from '@/views/jlmap3d/lesson3dedit/component/lessonsetup'; import LessonSetup from '@/views/jlmap3d/lesson3dedit/component/lessonsetup';
import LessonDelete from '@/views/jlmap3d/lesson3dedit/component/lessondelete';
export default { export default {
name: 'Lesson3d', name: 'Lesson3d',
components: { components: {
PublishCreate, PublishCreate,
PublishLesson, PublishLesson,
LessonDetail, LessonDetail,
LessonSetup LessonSetup,
LessonDelete
}, },
data() { data() {
return { return {
@ -154,14 +158,6 @@ export default {
title: this.$t('global.operate'), title: this.$t('global.operate'),
width: '400', width: '400',
buttons: [ buttons: [
{
name: this.$t('lesson.courseDetails'),
handleClick: this.goDetail,
type: 'primary',
showControl: (row) => {
return row.status !== '1';
}
},
{ {
name: this.$t('lesson.courseOnline'), name: this.$t('lesson.courseOnline'),
handleClick: this.online, handleClick: this.online,
@ -235,7 +231,7 @@ export default {
// console.log(tab, event); // console.log(tab, event);
}, },
refresh() { refresh() {
this.$refs.queryListPage.refresh(true); this.$refs.queryListPageCourse.refresh(true);
}, },
lessonSetupCreate() { lessonSetupCreate() {
this.$refs.lessonsetup.setupView(); this.$refs.lessonsetup.setupView();
@ -253,21 +249,25 @@ export default {
}); });
}, },
lessonDelete(deleteId){
delLesson3d(deleteId).then(response => {
this.$message.success(this.$t('tip.successfullyDelete'));
this.loading = true;
this.refresh();
this.loading = false;
}).catch(() => {
this.$messageBox(this.$t('tip.failDelete'));
});
},
publish(index, row) { publish(index, row) {
row.mapId = this.$route.params.mapId; row.mapId = this.$route.params.mapId;
row.cityCode = this.$route.query.cityCode; row.cityCode = this.$route.query.cityCode;
this.$refs.publishLesson.doShow(row); this.$refs.publishLesson.doShow(row);
}, },
deleteLesson(index, row) { deleteLesson(index, row) {
this.$refs.lessondelete.deleteView(row.id);
// console.log(row); // console.log(row);
delLesson3d(row.id).then(response => {
this.$message.success(this.$t('tip.successfullyDelete'));
this.loading = true;
this.refresh();
this.loading = false;
}).catch(() => {
this.$messageBox(this.$t('tip.failDelete'));
});
}, },
release(index, row){ release(index, row){