Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
62f22d0c73
85
src/views/jlmap3d/lesson3dedit/component/lessondelete.vue
Normal file
85
src/views/jlmap3d/lesson3dedit/component/lessondelete.vue
Normal 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>
|
@ -71,9 +71,6 @@
|
||||
}
|
||||
},
|
||||
onSubmit() {
|
||||
console.log(this.form.scene);
|
||||
console.log(this.form.role);
|
||||
console.log('submit!');
|
||||
this.showSetup = false;
|
||||
this.$emit('lessonCreate', { name: this.form.name, type: this.form.type });
|
||||
},
|
||||
|
@ -302,6 +302,7 @@
|
||||
|
||||
saveData.setup.examMode = this.examMode;
|
||||
saveData.setup.checkedRole = this.checkedRole;
|
||||
console.log(saveData);
|
||||
this.netData.data = JSON.stringify(saveData);
|
||||
// console.log();
|
||||
updateLesson3dData(this.$route.query.lessonId,this.netData).then(data => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<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+')'}">
|
||||
<div class="explainpanetittle" >
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="stepstipsdiv"
|
||||
v-if="lessonData.lessonData.lessonProgress[lessonPlayIndex]"
|
||||
: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}} -->
|
||||
</div>
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
<div class="jl3dmap3dMaintainer">
|
||||
<div class="jl3dmap3dMaintainerSelect" :style="{'background-color': '#e4eaea'}">
|
||||
|
||||
<div style="position:absolute;left:25%;top:10%;font-size:80px;">
|
||||
<div style="position:absolute;width:50%;left:25%;top:10%;text-align:center;font-size:80px;">
|
||||
<el-row>
|
||||
城市轨道交通标准化培训软件
|
||||
</el-row>
|
||||
@ -16,43 +15,43 @@
|
||||
</el-switch>
|
||||
</el-row>
|
||||
</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>
|
||||
<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>
|
||||
|
||||
<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 class="display-draft">
|
||||
<el-button-group>
|
||||
<el-button style="width:200px"type="primary" @click="quit">退出</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { publishedLesson3d } from '@/api/jmap/lesson3d';
|
||||
import { getSelectLesson3dList } 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';
|
||||
@ -70,52 +69,10 @@ export default {
|
||||
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'
|
||||
},
|
||||
lessonData:[],
|
||||
search: '',
|
||||
|
||||
|
||||
{
|
||||
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];
|
||||
},
|
||||
mounted() {
|
||||
|
||||
getSelectLesson3dList().then(response => {
|
||||
console.log(response);
|
||||
this.lessonData = response.data;
|
||||
}).catch(() => {
|
||||
});
|
||||
// console.log("");
|
||||
},
|
||||
methods: {
|
||||
queryFunction(params) {
|
||||
return publishedLesson3d(params);
|
||||
},
|
||||
|
||||
refresh() {
|
||||
this.$refs.queryListPage.refresh(true);
|
||||
},
|
||||
goDetail(index, row) {
|
||||
goDetail( row) {
|
||||
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>
|
||||
@ -169,22 +126,15 @@ export default {
|
||||
background-size:100%;
|
||||
}
|
||||
|
||||
.lesson3dSelectButton{
|
||||
position:absolute;
|
||||
width: 20%;
|
||||
height: 30%;
|
||||
position:absolute;
|
||||
|
||||
.display-draft {
|
||||
/* z-index: 1000; */
|
||||
position: absolute;
|
||||
width:100%;
|
||||
text-align: center;
|
||||
font-size: 50px;
|
||||
line-height:150px;
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
color:#FFF;
|
||||
cursor:pointer;
|
||||
bottom: 50px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
@ -10,7 +10,7 @@
|
||||
<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;" />
|
||||
<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 label="发布数据管理" name="second">
|
||||
@ -27,6 +27,7 @@
|
||||
<lesson-detail ref="lessonDetail" />
|
||||
|
||||
<Lesson-Setup ref="lessonsetup" @lessonCreate="lessonCreate"></Lesson-Setup>
|
||||
<Lesson-Delete ref="lessondelete" @lessonDelete="lessonDelete"></Lesson-Delete>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -45,13 +46,16 @@ import ConstConfig from '@/scripts/ConstConfig';
|
||||
|
||||
import LessonSetup from '@/views/jlmap3d/lesson3dedit/component/lessonsetup';
|
||||
|
||||
import LessonDelete from '@/views/jlmap3d/lesson3dedit/component/lessondelete';
|
||||
|
||||
export default {
|
||||
name: 'Lesson3d',
|
||||
components: {
|
||||
PublishCreate,
|
||||
PublishLesson,
|
||||
LessonDetail,
|
||||
LessonSetup
|
||||
LessonSetup,
|
||||
LessonDelete
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -154,14 +158,6 @@ export default {
|
||||
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,
|
||||
@ -235,7 +231,7 @@ export default {
|
||||
// console.log(tab, event);
|
||||
},
|
||||
refresh() {
|
||||
this.$refs.queryListPage.refresh(true);
|
||||
this.$refs.queryListPageCourse.refresh(true);
|
||||
},
|
||||
lessonSetupCreate() {
|
||||
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) {
|
||||
row.mapId = this.$route.params.mapId;
|
||||
row.cityCode = this.$route.query.cityCode;
|
||||
this.$refs.publishLesson.doShow(row);
|
||||
},
|
||||
deleteLesson(index, row) {
|
||||
this.$refs.lessondelete.deleteView(row.id);
|
||||
// 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){
|
||||
|
Loading…
Reference in New Issue
Block a user