desc: 调整格式化,样式
This commit is contained in:
parent
0ebab6201f
commit
7b5255c3eb
@ -1,105 +1,106 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-wrapper">
|
<div class="app-wrapper">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
<div v-show="listShow" class="examList" :style="{width: widthLeft+'px'}">
|
<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>
|
</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>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import demonList from './demonList';
|
import demonList from './demonList';
|
||||||
import drapLeft from '@/views/components/drapLeft/index';
|
import drapLeft from '@/views/components/drapLeft/index';
|
||||||
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 {
|
||||||
listShow: true,
|
listShow: true,
|
||||||
widthLeft: Number(localStore.get('LeftWidth')) || 450,
|
widthLeft: Number(localStore.get('LeftWidth')) || 450,
|
||||||
productList: [],
|
productList: [],
|
||||||
skinCode: '',
|
skinCode: '',
|
||||||
currentWidth:'',
|
currentWidth: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters([
|
||||||
'lessonbar'
|
'lessonbar'
|
||||||
]),
|
]),
|
||||||
height() {
|
height() {
|
||||||
return this.$store.state.app.height - 50;
|
return this.$store.state.app.height - 50;
|
||||||
},
|
},
|
||||||
width() {
|
width() {
|
||||||
return this.$store.state.app.width;
|
return this.$store.state.app.width;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'lessonbar.opened': function (val) {
|
'lessonbar.opened': function (val) {
|
||||||
this.listShow = val;
|
this.listShow = val;
|
||||||
},
|
},
|
||||||
widthLeft(val) {
|
widthLeft(val) {
|
||||||
this.setMapResize(val);
|
this.setMapResize(val);
|
||||||
},
|
},
|
||||||
'$store.state.app.windowSizeCount': function() {
|
'$store.state.app.windowSizeCount': function() {
|
||||||
this.resize();
|
this.resize();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.currentWidth=this.$store.state.app.width - this.widthLeft;
|
this.currentWidth=this.$store.state.app.width - this.widthLeft;
|
||||||
const againEnter = getSessionStorage('againEnter') || null;
|
const againEnter = getSessionStorage('againEnter') || null;
|
||||||
if (!againEnter){
|
if (!againEnter) {
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
setSessionStorage('againEnter',true);
|
setSessionStorage('againEnter', true);
|
||||||
}
|
}
|
||||||
this.resize();
|
this.resize();
|
||||||
this.widthLeft = Number(localStore.get('LeftWidth'));
|
this.widthLeft = Number(localStore.get('LeftWidth'));
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
refresh() {
|
refresh() {
|
||||||
this.$refs && this.$refs.demonList && this.$refs.demonList.refresh();
|
this.$refs && this.$refs.demonList && this.$refs.demonList.refresh();
|
||||||
},
|
},
|
||||||
drapWidth(width) {
|
drapWidth(width) {
|
||||||
this.widthLeft = Number(width);
|
this.widthLeft = Number(width);
|
||||||
},
|
},
|
||||||
|
|
||||||
refresh1() {
|
refresh1() {
|
||||||
|
|
||||||
},
|
},
|
||||||
mapSelected(data) {
|
mapSelected(data) {
|
||||||
if (data && this.editModel) {
|
if (data && this.editModel) {
|
||||||
this.$router.push({ path: `${UrlConfig.map.draft}/${this.editModel.id}/${data.view}`, query: { name: this.editModel.name } });
|
this.$router.push({ path: `${UrlConfig.map.draft}/${this.editModel.id}/${data.view}`, query: { name: this.editModel.name } });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resize() {
|
resize() {
|
||||||
this.widthLeft = Number(localStore.get('LeftWidth')) || this.widthLeft;
|
this.widthLeft = Number(localStore.get('LeftWidth')) || this.widthLeft;
|
||||||
const width = this.$store.state.app.width - 521 - this.widthLeft;
|
const width = this.$store.state.app.width - 521 - this.widthLeft;
|
||||||
const height = this.$store.state.app.height - 90;
|
const height = this.$store.state.app.height - 90;
|
||||||
this.$store.dispatch('config/resize', { width: width, height: height });
|
this.$store.dispatch('config/resize', { width: width, height: height });
|
||||||
},
|
},
|
||||||
setMapResize(LeftWidth) {
|
setMapResize(LeftWidth) {
|
||||||
this.currentWidth=this.$store.state.app.width - this.widthLeft;
|
this.currentWidth=this.$store.state.app.width - this.widthLeft;
|
||||||
const widths = this.$store.state.app.width - 521 - LeftWidth;
|
const widths = this.$store.state.app.width - 521 - LeftWidth;
|
||||||
const heights = this.$store.state.app.height - 90;
|
const heights = this.$store.state.app.height - 90;
|
||||||
this.$store.dispatch('config/resize', { width: widths, height: heights });
|
this.$store.dispatch('config/resize', { width: widths, height: heights });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -1,252 +1,259 @@
|
|||||||
<template>
|
<template>
|
||||||
<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>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card v-loading="loading">
|
<el-card v-loading="loading">
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
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
|
>
|
||||||
prop="name"
|
<el-table-column
|
||||||
border
|
prop="name"
|
||||||
:label="this.$t('lesson.lesson')">
|
border
|
||||||
</el-table-column>
|
:label="this.$t('lesson.lesson')"
|
||||||
<el-table-column
|
/>
|
||||||
:label="this.$t('global.status')"
|
<el-table-column
|
||||||
>
|
:label="this.$t('global.status')"
|
||||||
<template slot-scope="scope">
|
>
|
||||||
<span>{{handlerStatus(scope.row)}}</span>
|
<template slot-scope="scope">
|
||||||
</template>
|
<span>{{ handlerStatus(scope.row) }}</span>
|
||||||
</el-table-column>
|
</template>
|
||||||
<el-table-column
|
</el-table-column>
|
||||||
prop="explanation"
|
<el-table-column
|
||||||
show-overflow-tooltip
|
prop="explanation"
|
||||||
:label="this.$t('lesson.rejectReason')">
|
show-overflow-tooltip
|
||||||
</el-table-column>
|
:label="this.$t('lesson.rejectReason')"
|
||||||
<el-table-column
|
/>
|
||||||
width="500"
|
<el-table-column
|
||||||
:label="this.$t('global.operate')">
|
width="500"
|
||||||
<template slot-scope="scope">
|
:label="this.$t('global.operate')"
|
||||||
<el-button
|
>
|
||||||
size="mini"
|
<template slot-scope="scope">
|
||||||
type="primary"
|
<el-button
|
||||||
v-if="scope.row.status!=='1'"
|
v-if="scope.row.status!=='1'"
|
||||||
@click="createChapter(scope.row)"
|
size="mini"
|
||||||
>{{ scope.row.type==='lesson'? $t('lesson.createChapter'):$t('lesson.updateChapter')}}</el-button>
|
type="primary"
|
||||||
<el-button
|
@click="createChapter(scope.row)"
|
||||||
size="mini"
|
>{{ scope.row.type==='lesson'? $t('lesson.createChapter'):$t('lesson.updateChapter') }}</el-button>
|
||||||
type="primary"
|
<el-button
|
||||||
v-if="scope.row.status==='1'"
|
v-if="scope.row.status==='1'"
|
||||||
@click="goDetail(scope.row)"
|
size="mini"
|
||||||
>
|
type="primary"
|
||||||
{{$t('lesson.review')}}
|
@click="goDetail(scope.row)"
|
||||||
</el-button>
|
>
|
||||||
<el-button
|
{{ $t('lesson.review') }}
|
||||||
size="mini"
|
</el-button>
|
||||||
type="primary" plain
|
<el-button
|
||||||
v-if="scope.row.type === 'lesson' && scope.row.status!=='1'"
|
v-if="scope.row.type === 'lesson' && scope.row.status!=='1'"
|
||||||
@click="treeSort(scope.row)"
|
size="mini"
|
||||||
>{{$t('lesson.contentSorting')}}</el-button>
|
type="primary"
|
||||||
<el-button size="mini"
|
plain
|
||||||
type="info"
|
@click="treeSort(scope.row)"
|
||||||
v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"
|
>{{ $t('lesson.contentSorting') }}</el-button>
|
||||||
@click="editLesson(scope.row)"
|
<el-button
|
||||||
>{{$t('lesson.editCourse')}}</el-button>
|
v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"
|
||||||
<el-button size="mini"
|
size="mini"
|
||||||
type="primary"
|
type="info"
|
||||||
v-if="scope.row.type === 'lesson'&& scope.row.status==='0'"
|
@click="editLesson(scope.row)"
|
||||||
@click="publish(scope.row)"
|
>{{ $t('lesson.editCourse') }}</el-button>
|
||||||
>{{hasRelease?$t('global.release'):$t('lesson.applicationForRelease')}}</el-button>
|
<el-button
|
||||||
<el-button size="mini"
|
v-if="scope.row.type === 'lesson'&& scope.row.status==='0'"
|
||||||
type="danger"
|
size="mini"
|
||||||
v-if="scope.row.type === 'lesson'&& scope.row.status!=='1'"
|
type="primary"
|
||||||
@click="deleteLesson(scope.row)"
|
@click="publish(scope.row)"
|
||||||
>{{$t('global.delete')}}</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.status ==='1'"
|
size="mini"
|
||||||
@click="revertLesson(scope.row)"
|
type="danger"
|
||||||
>
|
@click="deleteLesson(scope.row)"
|
||||||
{{$t('lesson.withdraw')}}
|
>{{ $t('global.delete') }}</el-button>
|
||||||
</el-button>
|
<el-button
|
||||||
</template>
|
v-if="scope.row.status ==='1'"
|
||||||
</el-table-column>
|
size="mini"
|
||||||
</el-table>
|
type="danger"
|
||||||
</el-card>
|
@click="revertLesson(scope.row)"
|
||||||
<publish-create @refresh="refresh" ref="publishCreate" />
|
>
|
||||||
<publish-lesson ref="publishLesson" @refresh="refresh" />
|
{{ $t('lesson.withdraw') }}
|
||||||
<lesson-detail ref="lessonDetail"/>
|
</el-button>
|
||||||
</div>
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
<publish-create ref="publishCreate" @refresh="refresh" />
|
||||||
|
<publish-lesson ref="publishLesson" @refresh="refresh" />
|
||||||
|
<lesson-detail ref="lessonDetail" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getDraftLesson,releaseOrCancel } from '@/api/designPlatform';
|
import { getDraftLesson, releaseOrCancel } from '@/api/designPlatform';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import PublishCreate from './lessoncategory/edit/create';
|
import PublishCreate from './lessoncategory/edit/create';
|
||||||
import PublishLesson from './lessoncategory/edit/lesson/publish';
|
import PublishLesson from './lessoncategory/edit/lesson/publish';
|
||||||
import { delLesson } from '@/api/jmap/lessondraft';
|
import { delLesson } from '@/api/jmap/lessondraft';
|
||||||
import LessonDetail from '@/views/approval/lesson/detail';
|
import LessonDetail from '@/views/approval/lesson/detail';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LessonHome',
|
name: 'LessonHome',
|
||||||
components: {
|
components: {
|
||||||
PublishCreate,
|
PublishCreate,
|
||||||
PublishLesson,
|
PublishLesson,
|
||||||
LessonDetail
|
LessonDetail
|
||||||
},
|
},
|
||||||
computed: {
|
data() {
|
||||||
mapId() {
|
return {
|
||||||
return this.$route.params.mapId;
|
tableData: [],
|
||||||
},
|
loading: false,
|
||||||
hasRelease() {
|
showEdit: false
|
||||||
return this.$store.state.user.roles.includes('04') ||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
mapId() {
|
||||||
|
return this.$route.params.mapId;
|
||||||
|
},
|
||||||
|
hasRelease() {
|
||||||
|
return this.$store.state.user.roles.includes('04') ||
|
||||||
this.$store.state.user.roles.includes('05');
|
this.$store.state.user.roles.includes('05');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
watch: {
|
||||||
return {
|
$route() {
|
||||||
tableData: [],
|
this.refresh();
|
||||||
loading: false,
|
}
|
||||||
showEdit: false
|
},
|
||||||
};
|
mounted() {
|
||||||
},
|
this.loading = true;
|
||||||
watch: {
|
this.loadInitData();
|
||||||
$route() {
|
},
|
||||||
this.refresh();
|
methods: {
|
||||||
}
|
loadInitData() {
|
||||||
},
|
getDraftLesson({}, this.mapId).then(response=> {
|
||||||
mounted() {
|
response.data.forEach(elem => {
|
||||||
this.loading = true;
|
if (elem.children) {
|
||||||
this.loadInitData();
|
elem.children.forEach( it => {
|
||||||
},
|
it.parentId = elem.id;
|
||||||
methods: {
|
} );
|
||||||
loadInitData() {
|
}
|
||||||
getDraftLesson({},this.mapId).then(response=> {
|
});
|
||||||
response.data.forEach(elem => {
|
this.tableData = response.data;
|
||||||
if (elem.children) {
|
this.loading = false;
|
||||||
elem.children.forEach( it => {
|
}).catch(( ) => {
|
||||||
it.parentId = elem.id;
|
this.$messageBox(this.$t('error.getDraftCourseDataFailed'));
|
||||||
} )
|
});
|
||||||
}
|
},
|
||||||
});
|
refuse() {
|
||||||
this.tableData = response.data;
|
this.loading = true;
|
||||||
this.loading = false;
|
getDraftLesson({}, this.mapId).then(response=> {
|
||||||
}).catch(error=>{
|
response.data.forEach(elem => {
|
||||||
this.$messageBox(this.$t('error.getDraftCourseDataFailed'))
|
if (elem.children) {
|
||||||
});
|
elem.children.forEach( it => {
|
||||||
},
|
it.parentId = elem.id;
|
||||||
refuse() {
|
} );
|
||||||
this.loading = true;
|
}
|
||||||
getDraftLesson({},this.mapId).then(response=> {
|
});
|
||||||
response.data.forEach(elem => {
|
this.tableData = response.data;
|
||||||
if (elem.children) {
|
this.loading = false;
|
||||||
elem.children.forEach( it => {
|
});
|
||||||
it.parentId = elem.id;
|
},
|
||||||
} )
|
handlerStatus(row) {
|
||||||
}
|
let lessonStatus = '';
|
||||||
});
|
switch (row.status) {
|
||||||
this.tableData = response.data;
|
case '0':
|
||||||
this.loading = false;
|
lessonStatus = this.$t('lesson.notRelease');
|
||||||
});
|
break;
|
||||||
},
|
case '1':
|
||||||
handlerStatus(row) {
|
lessonStatus = this.$t('lesson.pendingReview');
|
||||||
let lessonStatus = '';
|
break;
|
||||||
switch (row.status){
|
case '2':
|
||||||
case '0':
|
lessonStatus = this.$t('lesson.published');
|
||||||
lessonStatus = this.$t('lesson.notRelease');
|
break;
|
||||||
break;
|
case '3':
|
||||||
case '1':
|
lessonStatus = this.$t('lesson.rejected');
|
||||||
lessonStatus = this.$t('lesson.pendingReview');
|
break;
|
||||||
break;
|
}
|
||||||
case '2':
|
return lessonStatus;
|
||||||
lessonStatus = this.$t('lesson.published');
|
},
|
||||||
break;
|
refresh() {
|
||||||
case '3':
|
this.loading = true;
|
||||||
lessonStatus = this.$t('lesson.rejected');
|
this.loadInitData();
|
||||||
break;
|
},
|
||||||
}
|
editLesson(row) {
|
||||||
return lessonStatus;
|
this.$router.push( {path: `${UrlConfig.design.lessonEdit}/lessonEdit`, query: {id: row.id, skinCode: row.code}} );
|
||||||
},
|
},
|
||||||
refresh() {
|
lessonCreate() {
|
||||||
this.loading = true;
|
this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`, query: {skinCode: this.$route.params.skinCode} });
|
||||||
this.loadInitData();
|
},
|
||||||
},
|
lessonCreateByPublish() {
|
||||||
editLesson(row) {
|
this.$nextTick(() => {
|
||||||
this.$router.push( {path: `${UrlConfig.design.lessonEdit}/lessonEdit`, query: {id: row.id, skinCode: row.code}} )
|
this.$refs.publishCreate.doShow();
|
||||||
},
|
});
|
||||||
lessonCreate() {
|
},
|
||||||
this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`,query: {skinCode: this.$route.params.skinCode} })
|
publish(row) {
|
||||||
},
|
row.skinCode = this.$route.params.skinCode;
|
||||||
lessonCreateByPublish() {
|
row.cityCode = this.$route.query.cityCode;
|
||||||
this.$nextTick(() => {
|
this.$refs.publishLesson.doShow(row);
|
||||||
this.$refs.publishCreate.doShow();
|
},
|
||||||
});
|
deleteLesson(row) {
|
||||||
},
|
delLesson(row).then(response => {
|
||||||
publish(row) {
|
this.$message.success(this.$t('tip.successfullyDelete'));
|
||||||
row.skinCode = this.$route.params.skinCode;
|
this.loading = true;
|
||||||
row.cityCode = this.$route.query.cityCode;
|
this.loadInitData();
|
||||||
this.$refs.publishLesson.doShow(row);
|
}).catch(() => {
|
||||||
},
|
this.$messageBox(this.$t('tip.failDelete'));
|
||||||
deleteLesson(row) {
|
});
|
||||||
delLesson(row).then(response => {
|
},
|
||||||
this.$message.success(this.$t('tip.successfullyDelete'));
|
createChapter(row) {
|
||||||
this.loading = true;
|
if (row.type === 'lesson') {
|
||||||
this.loadInitData();
|
this.$router.push({path: `${UrlConfig.design.lessonEdit}/chapterCreate`, query: {lessonId: row.id}});
|
||||||
}).catch(error => {
|
} else if (row.type === 'chapter') {
|
||||||
this.$messageBox(this.$t('tip.failDelete'))
|
this.$router.push( {path: `${UrlConfig.design.lessonEdit}/chapterEdit`, query: {id: row.id, lessonId: row.parentId}} );
|
||||||
});
|
}
|
||||||
},
|
},
|
||||||
createChapter(row) {
|
treeSort(row) {
|
||||||
if (row.type === 'lesson') {
|
this.$router.push({path: `${UrlConfig.design.lessonEdit}/treeSort`, query: row});
|
||||||
this.$router.push({path: `${UrlConfig.design.lessonEdit}/chapterCreate`, query: {lessonId: row.id}});
|
},
|
||||||
} else if (row.type === 'chapter') {
|
taskManage() {
|
||||||
this.$router.push( {path: `${UrlConfig.design.lessonEdit}/chapterEdit`,query: {id: row.id, lessonId: row.parentId}} )
|
this.$router.push({path: `${UrlConfig.design.taskManage}`, query: {mapId: this.$route.params.mapId, skinCode: this.$route.params.skinCode}});
|
||||||
}
|
},
|
||||||
},
|
trainingManage() {
|
||||||
treeSort(row){
|
this.$router.push({path: `${UrlConfig.design.trainingManage}/${this.$route.params.skinCode}`, query: {mapId: this.$route.params.mapId}});
|
||||||
this.$router.push({path: `${UrlConfig.design.lessonEdit}/treeSort`, query: row});
|
},
|
||||||
},
|
operationManage() {
|
||||||
taskManage() {
|
this.$router.push({path: `${UrlConfig.design.trainingRule}`, 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}})
|
},
|
||||||
},
|
revertLesson(row) {
|
||||||
trainingManage() {
|
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {
|
||||||
this.$router.push({path: `${UrlConfig.design.trainingManage}/${this.$route.params.skinCode}`, query: {mapId: this.$route.params.mapId}})
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
},
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
operationManage() {
|
type: 'warning'
|
||||||
this.$router.push({path: `${UrlConfig.design.trainingRule}`, query: {mapId: this.$route.params.mapId, skinCode: this.$route.params.skinCode}})
|
}).then(() => {
|
||||||
},
|
releaseOrCancel(row.id, '0').then(response => {
|
||||||
revertLesson(row) {
|
this.loading = false;
|
||||||
this.$confirm(this.$t('tip.cancelCoursePublicationHint'), this.$t('global.tips'), {
|
this.$message.success(this.$t('tip.cancelTheSuccessfulApplicationOfTheCourseRelease'));
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
this.refuse();
|
||||||
cancelButtonText: this.$t('global.cancel'),
|
}).catch(() => {
|
||||||
type: 'warning'
|
this.loading = false;
|
||||||
}).then(() => {
|
this.$messageBox(this.$t('tip.cancellationOfCoursePublicationApplicationFailed'));
|
||||||
releaseOrCancel(row.id,"0").then(response => {
|
this.refuse();
|
||||||
this.loading = false;
|
});
|
||||||
this.$message.success(this.$t('tip.cancelTheSuccessfulApplicationOfTheCourseRelease'));
|
});
|
||||||
this.refuse();
|
},
|
||||||
}).catch(error => {
|
goDetail(row) {
|
||||||
this.loading = false;
|
this.$refs.lessonDetail.show(row.id);
|
||||||
this.$messageBox(this.$t('tip.cancellationOfCoursePublicationApplicationFailed'));
|
}
|
||||||
this.refuse();
|
}
|
||||||
});
|
};
|
||||||
});
|
|
||||||
},
|
|
||||||
goDetail(row) {
|
|
||||||
this.$refs.lessonDetail.show(row.id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
.draft {
|
.draft {
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
:training-operate-type-map="trainingOperateTypeMap"
|
:training-operate-type-map="trainingOperateTypeMap"
|
||||||
@refresh="reloadTable"
|
@refresh="reloadTable"
|
||||||
/>
|
/>
|
||||||
<div class="draft">
|
<div class="draft">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
|
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -139,11 +139,11 @@ export default {
|
|||||||
handleClick: this.demoDisplay,
|
handleClick: this.demoDisplay,
|
||||||
type: ''
|
type: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '实训录制',
|
name: '实训录制',
|
||||||
handleClick: this.trainingRecord,
|
handleClick: this.trainingRecord,
|
||||||
type: ''
|
type: ''
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -151,7 +151,7 @@ export default {
|
|||||||
{ text: this.$t('lesson.generateTraining'), btnCode: 'employee_auto', handler: this.autoMaticTrainging },
|
{ 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.updateTraining'), btnCode: 'employee_edit', handler: this.editTrainingByType, type: 'warning'},
|
||||||
{ text: this.$t('lesson.deleteTraining'), btnCode: 'employee_delete', handler: this.delAutoMaticTrainging, type: 'danger'},
|
{ 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' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -161,28 +161,28 @@ export default {
|
|||||||
async created() {
|
async created() {
|
||||||
await this.loadInitData();
|
await this.loadInitData();
|
||||||
const json = localStore.get(this.$route.path);
|
const json = localStore.get(this.$route.path);
|
||||||
json.type = '';
|
json.type = '';
|
||||||
json.prdCode = '';
|
json.prdCode = '';
|
||||||
json.operateType = '';
|
json.operateType = '';
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
this.skinCodeList = [];
|
this.skinCodeList = [];
|
||||||
this.queryForm.queryObject.prdCode.config.data = [];
|
this.queryForm.queryObject.prdCode.config.data = [];
|
||||||
getSkinCodeList().then(response => {
|
getSkinCodeList().then(response => {
|
||||||
this.skinCodeList = response.data;
|
this.skinCodeList = response.data;
|
||||||
});
|
});
|
||||||
getCommodityMapProduct(this.$route.params.skinCode).then((response) => {
|
getCommodityMapProduct(this.$route.params.skinCode).then((response) => {
|
||||||
const productList = response.data;
|
const productList = response.data;
|
||||||
if (productList && productList.length > 0) {
|
if (productList && productList.length > 0) {
|
||||||
productList.forEach(elem => {
|
productList.forEach(elem => {
|
||||||
// 过滤综合演练产品
|
// 过滤综合演练产品
|
||||||
if (elem.prdType != '03') {
|
if (elem.prdType != '03') {
|
||||||
this.queryForm.queryObject.prdCode.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.prdCode.config.data.push({ value: elem.code, label: elem.name });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.prdTypeList = [];
|
this.prdTypeList = [];
|
||||||
getProductList({ pageSize: 500, pageNum: 1 }).then(res => {
|
getProductList({ pageSize: 500, pageNum: 1 }).then(res => {
|
||||||
@ -256,24 +256,24 @@ export default {
|
|||||||
reloadTable() {
|
reloadTable() {
|
||||||
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 => {
|
||||||
this.group = resp.data;
|
this.group = resp.data;
|
||||||
this.$router.push({ path: `${UrlConfig.design.trainingRecord}/${node.id}/${node.name}`, query: { group: resp.data } });
|
this.$router.push({ path: `${UrlConfig.design.trainingRecord}/${node.id}/${node.name}`, query: { group: resp.data } });
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`${this.$t('error.createSimulationFailed')}: ${error.message}`);
|
this.$messageBox(`${this.$t('error.createSimulationFailed')}: ${error.message}`);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
params['mapId'] = this.$route.query.mapId;
|
params['mapId'] = this.$route.query.mapId;
|
||||||
return pageQueryTraining(params);
|
return pageQueryTraining(params);
|
||||||
},
|
},
|
||||||
addTraining() {
|
addTraining() {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user