desc: 调整格式化,样式
This commit is contained in:
parent
0ebab6201f
commit
7b5255c3eb
@ -6,7 +6,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
||||||
<transition>
|
<transition>
|
||||||
<router-view :product-list="productList" :style="{width:currentWidth+'px',display:'inline-block'}"/>
|
<router-view :product-list="productList" />
|
||||||
</transition>
|
</transition>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
@ -19,14 +19,15 @@
|
|||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import localStore from 'storejs';
|
import localStore from 'storejs';
|
||||||
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
import { getSessionStorage, setSessionStorage } from '@/utils/auth';
|
||||||
import MapCreate from '@/views/map/mapdraft/mapmanage/create';
|
import { UrlConfig } from '@/router/index';
|
||||||
|
// import MapCreate from '@/views/map/mapdraft/mapmanage/create';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DesignPlatform',
|
name: 'DesignPlatform',
|
||||||
components: {
|
components: {
|
||||||
demonList,
|
demonList,
|
||||||
drapLeft,
|
drapLeft
|
||||||
MapCreate
|
// MapCreate
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -34,7 +35,7 @@
|
|||||||
widthLeft: Number(localStore.get('LeftWidth')) || 450,
|
widthLeft: Number(localStore.get('LeftWidth')) || 450,
|
||||||
productList: [],
|
productList: [],
|
||||||
skinCode: '',
|
skinCode: '',
|
||||||
currentWidth:'',
|
currentWidth: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<div style="height: 100%; overflow: hidden">
|
<div style="height: 100%; overflow: hidden">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div class="button_group">
|
<div class="button_group">
|
||||||
<el-button size="mini" v-if="hasRelease" @click="trainingManage">{{$t('lesson.trainingManage')}}</el-button>
|
<el-button v-if="hasRelease" size="mini" @click="trainingManage">{{ $t('lesson.trainingManage') }}</el-button>
|
||||||
<el-button size="mini" v-if="hasRelease" @click="taskManage">{{$t('lesson.taskManage')}}</el-button>
|
<el-button v-if="hasRelease" size="mini" @click="taskManage">{{ $t('lesson.taskManage') }}</el-button>
|
||||||
<el-button size="mini" v-if="hasRelease" @click="operationManage">{{$t('lesson.trainingRule')}}</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="lessonCreateByPublish">{{ $t('lesson.createNewCoursesFromRelease') }}</el-button>
|
||||||
<el-button size="mini" type="primary" @click="lessonCreate">{{ $t('lesson.newConstruction') }}</el-button>
|
<el-button size="mini" type="primary" @click="lessonCreate">{{ $t('lesson.newConstruction') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -15,12 +15,13 @@
|
|||||||
row-key="id"
|
row-key="id"
|
||||||
border
|
border
|
||||||
default-expand-all
|
default-expand-all
|
||||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||||
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="name"
|
prop="name"
|
||||||
border
|
border
|
||||||
:label="this.$t('lesson.lesson')">
|
:label="this.$t('lesson.lesson')"
|
||||||
</el-table-column>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="this.$t('global.status')"
|
:label="this.$t('global.status')"
|
||||||
>
|
>
|
||||||
@ -31,50 +32,56 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
prop="explanation"
|
prop="explanation"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
:label="this.$t('lesson.rejectReason')">
|
:label="this.$t('lesson.rejectReason')"
|
||||||
</el-table-column>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="500"
|
width="500"
|
||||||
:label="this.$t('global.operate')">
|
:label="this.$t('global.operate')"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
v-if="scope.row.status!=='1'"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="scope.row.status!=='1'"
|
|
||||||
@click="createChapter(scope.row)"
|
@click="createChapter(scope.row)"
|
||||||
>{{ scope.row.type==='lesson'? $t('lesson.createChapter'):$t('lesson.updateChapter') }}</el-button>
|
>{{ scope.row.type==='lesson'? $t('lesson.createChapter'):$t('lesson.updateChapter') }}</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-if="scope.row.status==='1'"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="scope.row.status==='1'"
|
|
||||||
@click="goDetail(scope.row)"
|
@click="goDetail(scope.row)"
|
||||||
>
|
>
|
||||||
{{ $t('lesson.review') }}
|
{{ $t('lesson.review') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
|
||||||
type="primary" plain
|
|
||||||
v-if="scope.row.type === 'lesson' && scope.row.status!=='1'"
|
v-if="scope.row.type === 'lesson' && scope.row.status!=='1'"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
@click="treeSort(scope.row)"
|
@click="treeSort(scope.row)"
|
||||||
>{{ $t('lesson.contentSorting') }}</el-button>
|
>{{ $t('lesson.contentSorting') }}</el-button>
|
||||||
<el-button size="mini"
|
<el-button
|
||||||
type="info"
|
|
||||||
v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"
|
v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"
|
||||||
|
size="mini"
|
||||||
|
type="info"
|
||||||
@click="editLesson(scope.row)"
|
@click="editLesson(scope.row)"
|
||||||
>{{ $t('lesson.editCourse') }}</el-button>
|
>{{ $t('lesson.editCourse') }}</el-button>
|
||||||
<el-button size="mini"
|
<el-button
|
||||||
type="primary"
|
|
||||||
v-if="scope.row.type === 'lesson'&& scope.row.status==='0'"
|
v-if="scope.row.type === 'lesson'&& scope.row.status==='0'"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
@click="publish(scope.row)"
|
@click="publish(scope.row)"
|
||||||
>{{ hasRelease?$t('global.release'):$t('lesson.applicationForRelease') }}</el-button>
|
>{{ hasRelease?$t('global.release'):$t('lesson.applicationForRelease') }}</el-button>
|
||||||
<el-button size="mini"
|
<el-button
|
||||||
type="danger"
|
|
||||||
v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"
|
v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"
|
||||||
|
size="mini"
|
||||||
|
type="danger"
|
||||||
@click="deleteLesson(scope.row)"
|
@click="deleteLesson(scope.row)"
|
||||||
>{{ $t('global.delete') }}</el-button>
|
>{{ $t('global.delete') }}</el-button>
|
||||||
<el-button size="mini"
|
<el-button
|
||||||
type="danger"
|
|
||||||
v-if="scope.row.status ==='1'"
|
v-if="scope.row.status ==='1'"
|
||||||
|
size="mini"
|
||||||
|
type="danger"
|
||||||
@click="revertLesson(scope.row)"
|
@click="revertLesson(scope.row)"
|
||||||
>
|
>
|
||||||
{{ $t('lesson.withdraw') }}
|
{{ $t('lesson.withdraw') }}
|
||||||
@ -83,7 +90,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
<publish-create @refresh="refresh" ref="publishCreate" />
|
<publish-create ref="publishCreate" @refresh="refresh" />
|
||||||
<publish-lesson ref="publishLesson" @refresh="refresh" />
|
<publish-lesson ref="publishLesson" @refresh="refresh" />
|
||||||
<lesson-detail ref="lessonDetail" />
|
<lesson-detail ref="lessonDetail" />
|
||||||
</div>
|
</div>
|
||||||
@ -104,6 +111,13 @@
|
|||||||
PublishLesson,
|
PublishLesson,
|
||||||
LessonDetail
|
LessonDetail
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tableData: [],
|
||||||
|
loading: false,
|
||||||
|
showEdit: false
|
||||||
|
};
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
mapId() {
|
mapId() {
|
||||||
return this.$route.params.mapId;
|
return this.$route.params.mapId;
|
||||||
@ -113,13 +127,6 @@
|
|||||||
this.$store.state.user.roles.includes('05');
|
this.$store.state.user.roles.includes('05');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
tableData: [],
|
|
||||||
loading: false,
|
|
||||||
showEdit: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
$route() {
|
$route() {
|
||||||
this.refresh();
|
this.refresh();
|
||||||
@ -136,13 +143,13 @@
|
|||||||
if (elem.children) {
|
if (elem.children) {
|
||||||
elem.children.forEach( it => {
|
elem.children.forEach( it => {
|
||||||
it.parentId = elem.id;
|
it.parentId = elem.id;
|
||||||
} )
|
} );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.tableData = response.data;
|
this.tableData = response.data;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}).catch(error=>{
|
}).catch(( ) => {
|
||||||
this.$messageBox(this.$t('error.getDraftCourseDataFailed'))
|
this.$messageBox(this.$t('error.getDraftCourseDataFailed'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
refuse() {
|
refuse() {
|
||||||
@ -152,7 +159,7 @@
|
|||||||
if (elem.children) {
|
if (elem.children) {
|
||||||
elem.children.forEach( it => {
|
elem.children.forEach( it => {
|
||||||
it.parentId = elem.id;
|
it.parentId = elem.id;
|
||||||
} )
|
} );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.tableData = response.data;
|
this.tableData = response.data;
|
||||||
@ -182,10 +189,10 @@
|
|||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
editLesson(row) {
|
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() {
|
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() {
|
lessonCreateByPublish() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@ -202,28 +209,28 @@
|
|||||||
this.$message.success(this.$t('tip.successfullyDelete'));
|
this.$message.success(this.$t('tip.successfullyDelete'));
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('tip.failDelete'))
|
this.$messageBox(this.$t('tip.failDelete'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
createChapter(row) {
|
createChapter(row) {
|
||||||
if (row.type === 'lesson') {
|
if (row.type === 'lesson') {
|
||||||
this.$router.push({path: `${UrlConfig.design.lessonEdit}/chapterCreate`, query: {lessonId: row.id}});
|
this.$router.push({path: `${UrlConfig.design.lessonEdit}/chapterCreate`, query: {lessonId: row.id}});
|
||||||
} else if (row.type === 'chapter') {
|
} 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});
|
this.$router.push({path: `${UrlConfig.design.lessonEdit}/treeSort`, query: row});
|
||||||
},
|
},
|
||||||
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, skinCode: this.$route.params.skinCode}});
|
||||||
},
|
},
|
||||||
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}/${this.$route.params.skinCode}`, 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, skinCode: this.$route.params.skinCode}});
|
||||||
},
|
},
|
||||||
revertLesson(row) {
|
revertLesson(row) {
|
||||||
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {
|
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {
|
||||||
@ -231,11 +238,11 @@
|
|||||||
cancelButtonText: this.$t('global.cancel'),
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
releaseOrCancel(row.id,"0").then(response => {
|
releaseOrCancel(row.id, '0').then(response => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$message.success(this.$t('tip.cancelTheSuccessfulApplicationOfTheCourseRelease'));
|
this.$message.success(this.$t('tip.cancelTheSuccessfulApplicationOfTheCourseRelease'));
|
||||||
this.refuse();
|
this.refuse();
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$messageBox(this.$t('tip.cancellationOfCoursePublicationApplicationFailed'));
|
this.$messageBox(this.$t('tip.cancellationOfCoursePublicationApplicationFailed'));
|
||||||
this.refuse();
|
this.refuse();
|
||||||
|
@ -257,7 +257,7 @@ export default {
|
|||||||
this.queryList.reload();
|
this.queryList.reload();
|
||||||
},
|
},
|
||||||
turnback() {
|
turnback() {
|
||||||
this.$router.go(-1)
|
this.$router.go(-1);
|
||||||
},
|
},
|
||||||
trainingRecord(index, node) {
|
trainingRecord(index, node) {
|
||||||
trainingNotify({ trainingId: node.id }).then(resp => {
|
trainingNotify({ trainingId: node.id }).then(resp => {
|
||||||
|
Loading…
Reference in New Issue
Block a user