2019-07-26 13:32:43 +08:00
|
|
|
<template>
|
2019-08-13 15:54:26 +08:00
|
|
|
<el-card>
|
|
|
|
<div slot="header" style="text-align: center;">
|
2019-08-21 13:54:53 +08:00
|
|
|
<span class=" title">{{ $t('global.line')+courseModel.name }}</span>
|
2019-08-13 15:54:26 +08:00
|
|
|
</div>
|
|
|
|
<div style="margin:50px; overflow-x: auto;" :style="{ height: height - 150 +'px' }">
|
|
|
|
<p class="list-item">
|
2019-08-21 13:54:53 +08:00
|
|
|
<span class="list-label">{{ $t('global.updateTime') }}</span>
|
2019-08-13 15:54:26 +08:00
|
|
|
<span class="list-elem">{{ courseModel.updateTime }}</span>
|
|
|
|
</p>
|
|
|
|
<p class="list-item">
|
2019-08-21 13:54:53 +08:00
|
|
|
<span class="list-label">{{ $t('global.permissionList') }}</span>
|
2019-08-13 15:54:26 +08:00
|
|
|
</p>
|
|
|
|
<limit-list ref="limitList" :course-model="courseModel" @initLoadPage="getScreenLists" />
|
|
|
|
<p style="display: flex; justify-content: center;">
|
|
|
|
<span class="list-label" />
|
2019-08-20 18:58:55 +08:00
|
|
|
<el-button type="success" @click="buy">{{ $t('global.buy') }}</el-button>
|
|
|
|
<el-button v-if="hasPermssion" type="primary" @click="distribute">{{ $t('global.distributePermission') }}</el-button>
|
|
|
|
<el-button v-if="hasPermssion" type="primary" @click="transfer">{{ $t('global.transferQRCode') }}</el-button>
|
|
|
|
<el-button type="primary" @click="start">{{ $t('planMonitor.offlineMappingSoftware') }}</el-button>
|
2019-08-13 15:54:26 +08:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</el-card>
|
2019-07-26 13:32:43 +08:00
|
|
|
</template>
|
|
|
|
<script>
|
2019-08-13 15:54:26 +08:00
|
|
|
// import { mapGetters } from 'vuex';
|
|
|
|
// import { getCourseLessonTree } from '@/api/management/exam';
|
|
|
|
import { getPublishMapInfo } from '@/api/jmap/map';
|
2019-08-30 19:10:08 +08:00
|
|
|
// import { queryPermissionScreen } from '@/api/management/author';
|
2019-08-13 15:54:26 +08:00
|
|
|
import { PermissionType } from '@/scripts/ConstDic';
|
|
|
|
// import { launchFullscreen } from '@/utils/screen';
|
|
|
|
import { UrlConfig } from '@/router/index';
|
|
|
|
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
|
|
|
import LimitList from '@/views/components/limits/index';
|
2019-07-26 13:32:43 +08:00
|
|
|
|
2019-08-13 15:54:26 +08:00
|
|
|
export default {
|
|
|
|
name: 'ExamDetailList',
|
|
|
|
components: {
|
|
|
|
LimitList
|
|
|
|
},
|
|
|
|
filters: {
|
|
|
|
},
|
|
|
|
mixins: [
|
|
|
|
WindowResizeHandler
|
|
|
|
],
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
height: '',
|
|
|
|
courseModel: {
|
|
|
|
mapId: '',
|
|
|
|
name: '',
|
2019-08-14 16:37:17 +08:00
|
|
|
skinCode: '',
|
2019-08-13 15:54:26 +08:00
|
|
|
updateTime: '',
|
|
|
|
pmsList: []
|
|
|
|
},
|
|
|
|
EffectiveTypeList: [],
|
|
|
|
screenList: []
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
hasPermssion() {
|
|
|
|
let isShow = false;
|
|
|
|
this.courseModel.pmsList.forEach(item => {
|
|
|
|
if (item.canDistribute) {
|
|
|
|
isShow = true;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return isShow;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
$route(newVal) {
|
|
|
|
this.initLoadPage();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
async mounted() {
|
|
|
|
this.$Dictionary.effectiveType().then(list => {
|
|
|
|
this.EffectiveTypeList = list;
|
|
|
|
});
|
|
|
|
await this.getScreenLists();
|
|
|
|
this.initLoadPage();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
resizeHandler: function () {
|
|
|
|
this.height = this._clientHeight;
|
|
|
|
},
|
|
|
|
async getScreenLists() {
|
2019-08-30 19:10:08 +08:00
|
|
|
|
2019-08-13 15:54:26 +08:00
|
|
|
},
|
|
|
|
async initLoadPage() {
|
|
|
|
const that = this;
|
|
|
|
const data = { id: this.$route.params.lessonId };
|
|
|
|
if (parseInt(data.id)) {
|
|
|
|
try {
|
|
|
|
const res = await getPublishMapInfo(data.id);
|
|
|
|
this.tryUser = 0;
|
|
|
|
that.courseModel = {
|
|
|
|
name: res.data.name,
|
|
|
|
mapId: res.data.id,
|
2019-08-14 16:37:17 +08:00
|
|
|
skinCode: res.data.skinCode,
|
2019-08-13 15:54:26 +08:00
|
|
|
updateTime: res.data.updateTime,
|
|
|
|
pmsList: that.screenList || [],
|
|
|
|
PermissionType: PermissionType.PLAN
|
|
|
|
};
|
2019-07-26 13:32:43 +08:00
|
|
|
|
2019-08-13 15:54:26 +08:00
|
|
|
this.$store.dispatch('training/setPrdType', res.data.prdType);
|
|
|
|
// const paras = {
|
|
|
|
// productType: PermissionType.PLAN
|
|
|
|
// };
|
|
|
|
} catch (error) {
|
2019-08-20 18:58:55 +08:00
|
|
|
this.$messageBox(this.$t('error.refreshFailed'));
|
2019-08-13 15:54:26 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
buy() {
|
|
|
|
this.$router.push({
|
|
|
|
path: `${UrlConfig.plan.pay}/${this.$route.params.lessonId}`,
|
|
|
|
query: { permissionType: PermissionType.SCREEN, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId }
|
|
|
|
});
|
|
|
|
},
|
|
|
|
transfer() {
|
|
|
|
if (this.$refs) {
|
|
|
|
this.$refs.limitList.transfer(this.courseModel);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
distribute() {
|
|
|
|
if (this.$refs) {
|
|
|
|
this.$refs.limitList.distribute(this.courseModel);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
jump() {
|
|
|
|
const query = {
|
2019-08-14 16:37:17 +08:00
|
|
|
skinCode: this.courseModel.skinCode, mapId: this.courseModel.mapId
|
2019-08-13 15:54:26 +08:00
|
|
|
};
|
|
|
|
this.$router.push({ path: `${UrlConfig.plan.tool}`, query: query });
|
|
|
|
},
|
|
|
|
start() {
|
|
|
|
this.jump();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2019-07-26 13:32:43 +08:00
|
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
width: 3px;
|
|
|
|
height: 3px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
|
@import "src/styles/mixin.scss";
|
|
|
|
|
|
|
|
.title {
|
|
|
|
font-weight: bold
|
|
|
|
}
|
|
|
|
|
|
|
|
.time-item {
|
|
|
|
font-size: 24px;
|
|
|
|
color: black !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.time-label {
|
|
|
|
display: -moz-inline-box;
|
|
|
|
display: inline-block;
|
|
|
|
text-align: right;
|
|
|
|
margin-left: 14px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.time-elem {
|
|
|
|
color: rgb(90, 89, 89) !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.list-item {
|
|
|
|
font-size: 16px;
|
|
|
|
margin-bottom: 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.list-label {
|
|
|
|
display: -moz-inline-box;
|
|
|
|
display: inline-block;
|
|
|
|
text-align: right;
|
|
|
|
/* width: 160px; */
|
|
|
|
}
|
|
|
|
|
|
|
|
.list-elem {
|
|
|
|
color: #808080 !important;
|
|
|
|
}
|
2019-08-13 15:54:26 +08:00
|
|
|
</style>
|