desc: 调整格式化,样式
This commit is contained in:
parent
0ebab6201f
commit
7b5255c3eb
@ -2,31 +2,32 @@
|
||||
<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" :width="widthLeft"/>
|
||||
<demon-list ref="demonList" :height="height" :width="widthLeft" />
|
||||
</div>
|
||||
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
||||
<transition>
|
||||
<router-view :product-list="productList" :style="{width:currentWidth+'px',display:'inline-block'}"/>
|
||||
<router-view :product-list="productList" />
|
||||
</transition>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import demonList from './demonList';
|
||||
import drapLeft from '@/views/components/drapLeft/index';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import localStore from 'storejs';
|
||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||
import MapCreate from '@/views/map/mapdraft/mapmanage/create';
|
||||
import { mapGetters } from 'vuex';
|
||||
import demonList from './demonList';
|
||||
import drapLeft from '@/views/components/drapLeft/index';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import localStore from 'storejs';
|
||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
// import MapCreate from '@/views/map/mapdraft/mapmanage/create';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'DesignPlatform',
|
||||
components: {
|
||||
demonList,
|
||||
drapLeft,
|
||||
MapCreate
|
||||
drapLeft
|
||||
// MapCreate
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -34,7 +35,7 @@
|
||||
widthLeft: Number(localStore.get('LeftWidth')) || 450,
|
||||
productList: [],
|
||||
skinCode: '',
|
||||
currentWidth:'',
|
||||
currentWidth: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -62,9 +63,9 @@
|
||||
mounted() {
|
||||
this.currentWidth=this.$store.state.app.width - this.widthLeft;
|
||||
const againEnter = getSessionStorage('againEnter') || null;
|
||||
if (!againEnter){
|
||||
if (!againEnter) {
|
||||
launchFullscreen();
|
||||
setSessionStorage('againEnter',true);
|
||||
setSessionStorage('againEnter', true);
|
||||
}
|
||||
this.resize();
|
||||
this.widthLeft = Number(localStore.get('LeftWidth'));
|
||||
@ -99,7 +100,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -2,11 +2,11 @@
|
||||
<div style="height: 100%; overflow: hidden">
|
||||
<el-card>
|
||||
<div class="button_group">
|
||||
<el-button size="mini" v-if="hasRelease" @click="trainingManage">{{$t('lesson.trainingManage')}}</el-button>
|
||||
<el-button size="mini" v-if="hasRelease" @click="taskManage">{{$t('lesson.taskManage')}}</el-button>
|
||||
<el-button size="mini" v-if="hasRelease" @click="operationManage">{{$t('lesson.trainingRule')}}</el-button>
|
||||
<el-button size="mini" type="primary" @click="lessonCreateByPublish">{{$t('lesson.createNewCoursesFromRelease')}}</el-button>
|
||||
<el-button size="mini" type="primary" @click="lessonCreate">{{$t('lesson.newConstruction')}}</el-button>
|
||||
<el-button v-if="hasRelease" size="mini" @click="trainingManage">{{ $t('lesson.trainingManage') }}</el-button>
|
||||
<el-button v-if="hasRelease" size="mini" @click="taskManage">{{ $t('lesson.taskManage') }}</el-button>
|
||||
<el-button v-if="hasRelease" size="mini" @click="operationManage">{{ $t('lesson.trainingRule') }}</el-button>
|
||||
<el-button size="mini" type="primary" @click="lessonCreateByPublish">{{ $t('lesson.createNewCoursesFromRelease') }}</el-button>
|
||||
<el-button size="mini" type="primary" @click="lessonCreate">{{ $t('lesson.newConstruction') }}</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card v-loading="loading">
|
||||
@ -15,95 +15,109 @@
|
||||
row-key="id"
|
||||
border
|
||||
default-expand-all
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
border
|
||||
:label="this.$t('lesson.lesson')">
|
||||
</el-table-column>
|
||||
:label="this.$t('lesson.lesson')"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="this.$t('global.status')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{handlerStatus(scope.row)}}</span>
|
||||
<span>{{ handlerStatus(scope.row) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="explanation"
|
||||
show-overflow-tooltip
|
||||
:label="this.$t('lesson.rejectReason')">
|
||||
</el-table-column>
|
||||
:label="this.$t('lesson.rejectReason')"
|
||||
/>
|
||||
<el-table-column
|
||||
width="500"
|
||||
:label="this.$t('global.operate')">
|
||||
:label="this.$t('global.operate')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="scope.row.status!=='1'"
|
||||
@click="createChapter(scope.row)"
|
||||
>{{ scope.row.type==='lesson'? $t('lesson.createChapter'):$t('lesson.updateChapter')}}</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="createChapter(scope.row)"
|
||||
>{{ scope.row.type==='lesson'? $t('lesson.createChapter'):$t('lesson.updateChapter') }}</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.status==='1'"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="goDetail(scope.row)"
|
||||
>
|
||||
{{$t('lesson.review')}}
|
||||
{{ $t('lesson.review') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary" plain
|
||||
v-if="scope.row.type === 'lesson' && scope.row.status!=='1'"
|
||||
@click="treeSort(scope.row)"
|
||||
>{{$t('lesson.contentSorting')}}</el-button>
|
||||
<el-button size="mini"
|
||||
type="info"
|
||||
v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"
|
||||
@click="editLesson(scope.row)"
|
||||
>{{$t('lesson.editCourse')}}</el-button>
|
||||
<el-button size="mini"
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="scope.row.type === 'lesson'&& scope.row.status==='0'"
|
||||
@click="publish(scope.row)"
|
||||
>{{hasRelease?$t('global.release'):$t('lesson.applicationForRelease')}}</el-button>
|
||||
<el-button size="mini"
|
||||
type="danger"
|
||||
plain
|
||||
@click="treeSort(scope.row)"
|
||||
>{{ $t('lesson.contentSorting') }}</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"
|
||||
@click="deleteLesson(scope.row)"
|
||||
>{{$t('global.delete')}}</el-button>
|
||||
<el-button size="mini"
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="editLesson(scope.row)"
|
||||
>{{ $t('lesson.editCourse') }}</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type === 'lesson'&& scope.row.status==='0'"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="publish(scope.row)"
|
||||
>{{ hasRelease?$t('global.release'):$t('lesson.applicationForRelease') }}</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="deleteLesson(scope.row)"
|
||||
>{{ $t('global.delete') }}</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.status ==='1'"
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="revertLesson(scope.row)"
|
||||
>
|
||||
{{$t('lesson.withdraw')}}
|
||||
{{ $t('lesson.withdraw') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<publish-create @refresh="refresh" ref="publishCreate" />
|
||||
<publish-create ref="publishCreate" @refresh="refresh" />
|
||||
<publish-lesson ref="publishLesson" @refresh="refresh" />
|
||||
<lesson-detail ref="lessonDetail"/>
|
||||
<lesson-detail ref="lessonDetail" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDraftLesson,releaseOrCancel } from '@/api/designPlatform';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import PublishCreate from './lessoncategory/edit/create';
|
||||
import PublishLesson from './lessoncategory/edit/lesson/publish';
|
||||
import { delLesson } from '@/api/jmap/lessondraft';
|
||||
import LessonDetail from '@/views/approval/lesson/detail';
|
||||
import { getDraftLesson, releaseOrCancel } from '@/api/designPlatform';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import PublishCreate from './lessoncategory/edit/create';
|
||||
import PublishLesson from './lessoncategory/edit/lesson/publish';
|
||||
import { delLesson } from '@/api/jmap/lessondraft';
|
||||
import LessonDetail from '@/views/approval/lesson/detail';
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'LessonHome',
|
||||
components: {
|
||||
PublishCreate,
|
||||
PublishLesson,
|
||||
LessonDetail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
loading: false,
|
||||
showEdit: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
mapId() {
|
||||
return this.$route.params.mapId;
|
||||
@ -113,13 +127,6 @@
|
||||
this.$store.state.user.roles.includes('05');
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
loading: false,
|
||||
showEdit: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route() {
|
||||
this.refresh();
|
||||
@ -131,28 +138,28 @@
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
getDraftLesson({},this.mapId).then(response=> {
|
||||
getDraftLesson({}, this.mapId).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(error=>{
|
||||
this.$messageBox(this.$t('error.getDraftCourseDataFailed'))
|
||||
}).catch(( ) => {
|
||||
this.$messageBox(this.$t('error.getDraftCourseDataFailed'));
|
||||
});
|
||||
},
|
||||
refuse() {
|
||||
this.loading = true;
|
||||
getDraftLesson({},this.mapId).then(response=> {
|
||||
getDraftLesson({}, this.mapId).then(response=> {
|
||||
response.data.forEach(elem => {
|
||||
if (elem.children) {
|
||||
elem.children.forEach( it => {
|
||||
it.parentId = elem.id;
|
||||
} )
|
||||
} );
|
||||
}
|
||||
});
|
||||
this.tableData = response.data;
|
||||
@ -161,7 +168,7 @@
|
||||
},
|
||||
handlerStatus(row) {
|
||||
let lessonStatus = '';
|
||||
switch (row.status){
|
||||
switch (row.status) {
|
||||
case '0':
|
||||
lessonStatus = this.$t('lesson.notRelease');
|
||||
break;
|
||||
@ -182,10 +189,10 @@
|
||||
this.loadInitData();
|
||||
},
|
||||
editLesson(row) {
|
||||
this.$router.push( {path: `${UrlConfig.design.lessonEdit}/lessonEdit`, query: {id: row.id, skinCode: row.code}} )
|
||||
this.$router.push( {path: `${UrlConfig.design.lessonEdit}/lessonEdit`, query: {id: row.id, skinCode: row.code}} );
|
||||
},
|
||||
lessonCreate() {
|
||||
this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`,query: {skinCode: this.$route.params.skinCode} })
|
||||
this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`, query: {skinCode: this.$route.params.skinCode} });
|
||||
},
|
||||
lessonCreateByPublish() {
|
||||
this.$nextTick(() => {
|
||||
@ -202,28 +209,28 @@
|
||||
this.$message.success(this.$t('tip.successfullyDelete'));
|
||||
this.loading = true;
|
||||
this.loadInitData();
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('tip.failDelete'))
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.failDelete'));
|
||||
});
|
||||
},
|
||||
createChapter(row) {
|
||||
if (row.type === 'lesson') {
|
||||
this.$router.push({path: `${UrlConfig.design.lessonEdit}/chapterCreate`, query: {lessonId: row.id}});
|
||||
} else if (row.type === 'chapter') {
|
||||
this.$router.push( {path: `${UrlConfig.design.lessonEdit}/chapterEdit`,query: {id: row.id, lessonId: row.parentId}} )
|
||||
this.$router.push( {path: `${UrlConfig.design.lessonEdit}/chapterEdit`, query: {id: row.id, lessonId: row.parentId}} );
|
||||
}
|
||||
},
|
||||
treeSort(row){
|
||||
treeSort(row) {
|
||||
this.$router.push({path: `${UrlConfig.design.lessonEdit}/treeSort`, query: row});
|
||||
},
|
||||
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, skinCode: this.$route.params.skinCode}});
|
||||
},
|
||||
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}/${this.$route.params.skinCode}`, query: {mapId: this.$route.params.mapId}});
|
||||
},
|
||||
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, skinCode: this.$route.params.skinCode}});
|
||||
},
|
||||
revertLesson(row) {
|
||||
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {
|
||||
@ -231,11 +238,11 @@
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
releaseOrCancel(row.id,"0").then(response => {
|
||||
releaseOrCancel(row.id, '0').then(response => {
|
||||
this.loading = false;
|
||||
this.$message.success(this.$t('tip.cancelTheSuccessfulApplicationOfTheCourseRelease'));
|
||||
this.refuse();
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('tip.cancellationOfCoursePublicationApplicationFailed'));
|
||||
this.refuse();
|
||||
@ -246,7 +253,7 @@
|
||||
this.$refs.lessonDetail.show(row.id);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.draft {
|
||||
|
@ -151,7 +151,7 @@ export default {
|
||||
{ text: this.$t('lesson.generateTraining'), btnCode: 'employee_auto', handler: this.autoMaticTrainging },
|
||||
{ text: this.$t('lesson.updateTraining'), btnCode: 'employee_edit', handler: this.editTrainingByType, type: 'warning'},
|
||||
{ text: this.$t('lesson.deleteTraining'), btnCode: 'employee_delete', handler: this.delAutoMaticTrainging, type: 'danger'},
|
||||
{ text: '添加实训', btnCode: 'employee_add', handler:this.addTraining, type: 'primary' }
|
||||
{ text: '添加实训', btnCode: 'employee_add', handler: this.addTraining, type: 'primary' }
|
||||
]
|
||||
},
|
||||
|
||||
@ -257,7 +257,7 @@ export default {
|
||||
this.queryList.reload();
|
||||
},
|
||||
turnback() {
|
||||
this.$router.go(-1)
|
||||
this.$router.go(-1);
|
||||
},
|
||||
trainingRecord(index, node) {
|
||||
trainingNotify({ trainingId: node.id }).then(resp => {
|
||||
|
Loading…
Reference in New Issue
Block a user