desc: 调整格式化,样式

This commit is contained in:
zyy 2019-10-17 18:27:49 +08:00
parent 0ebab6201f
commit 7b5255c3eb
3 changed files with 390 additions and 382 deletions

View File

@ -6,7 +6,7 @@
</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>
@ -19,14 +19,15 @@
import { launchFullscreen } from '@/utils/screen';
import localStore from 'storejs';
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 {
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: {

View File

@ -2,9 +2,9 @@
<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 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>
@ -15,12 +15,13 @@
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')"
>
@ -31,50 +32,56 @@
<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
v-if="scope.row.status!=='1'"
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
v-if="scope.row.status==='1'"
size="mini"
type="primary"
v-if="scope.row.status==='1'"
@click="goDetail(scope.row)"
>
{{ $t('lesson.review') }}
</el-button>
<el-button
size="mini"
type="primary" plain
v-if="scope.row.type === 'lesson' && scope.row.status!=='1'"
size="mini"
type="primary"
plain
@click="treeSort(scope.row)"
>{{ $t('lesson.contentSorting') }}</el-button>
<el-button size="mini"
type="info"
<el-button
v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"
size="mini"
type="info"
@click="editLesson(scope.row)"
>{{ $t('lesson.editCourse') }}</el-button>
<el-button size="mini"
type="primary"
<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 size="mini"
type="danger"
<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 size="mini"
type="danger"
<el-button
v-if="scope.row.status ==='1'"
size="mini"
type="danger"
@click="revertLesson(scope.row)"
>
{{ $t('lesson.withdraw') }}
@ -83,7 +90,7 @@
</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" />
</div>
@ -104,6 +111,13 @@
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();
@ -136,13 +143,13 @@
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() {
@ -152,7 +159,7 @@
if (elem.children) {
elem.children.forEach( it => {
it.parentId = elem.id;
} )
} );
}
});
this.tableData = response.data;
@ -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) {
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();

View File

@ -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 => {