182 lines
4.2 KiB
Vue
182 lines
4.2 KiB
Vue
<template>
|
|
<view class="course-info">
|
|
<view class="info-top font_pf">
|
|
<view class="top-left font_pf">
|
|
<view class="fz-30 fw-600 mb-8">课程类别</view>
|
|
<view class="fz-30 fw-400 color-666">{{ modelValue.catalogName }}</view>
|
|
</view>
|
|
<view class="top-right font_pf">
|
|
<view class="rate-text mb-4">评分</view>
|
|
<view class="rate-num">{{ modelValue.evalGrade }}</view>
|
|
</view>
|
|
</view>
|
|
<view class="info-middle font_pf">
|
|
<view class="fz-30 fw-600 mb-8">更新时间</view>
|
|
<view class="fz-30 fw-400 color-666">{{ (modelValue.mtTime || '').substr(0, 16) }}</view>
|
|
</view>
|
|
|
|
<view class="info-bottom">
|
|
<view class="bottom-left">
|
|
<view class="mb-64">
|
|
<view class="fz-30 font_pf fw-600 mb-18">标签</view>
|
|
<view class="label" v-if="modelValue.tagCataList">
|
|
<text class="label-item font_pf" v-for="item in modelValue.tagCataList" :key="item.tagId">
|
|
{{ item.tagName }}
|
|
</text>
|
|
</view>
|
|
</view>
|
|
<view class="mb-64">
|
|
<view class="fz-30 fw-600 font_pf mb-4">创建人</view>
|
|
<view class="fz-30 font_pf fw-400 color-666">{{ modelValue.ctUserName }}</view>
|
|
</view>
|
|
<view class="mb-64">
|
|
<view class="fz-30 font_pf fw-600 mb-4">归属部门</view>
|
|
<view class="fz-30 font_pf fw-400 color-666">{{ modelValue.belgOrgName }}</view>
|
|
</view>
|
|
</view>
|
|
<view class="bottom-right">
|
|
<image src="/src/static/images/courseDetail/ditu.png" class="right-img" mode="widthFix"></image>
|
|
</view>
|
|
</view>
|
|
<view class="info-middle font_pf">
|
|
<view class="fz-30 fw-600 mb-8">回答方式</view>
|
|
<view class="fz-30 fw-400 color-666">{{answerMethod}}</view>
|
|
</view>
|
|
<view class="mb-64">
|
|
<view class="fz-30 font_pf fw-600 mb-4">课程核心</view>
|
|
<view class="examination_core color-666">
|
|
{{ modelValue.crsCore || '无' }}
|
|
</view>
|
|
</view>
|
|
<view class="mb-64 file-items" v-if="(modelValue.fileList || []).length>0">
|
|
<view class="fz-30 font_pf fw-600 mb-4">知识资料</view>
|
|
<view class="file-item" v-for="item in modelValue.fileList" @click="previewFile(item)">
|
|
{{item.fileName.replace(/.docx|.doc|.txt/g, '.pdf')}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import {computed} from 'vue'
|
|
import {
|
|
previewFileFnc
|
|
} from '@/common/common'
|
|
const props = defineProps({
|
|
modelValue: Object
|
|
});
|
|
import {ANSWER_METHOD_MAP} from '@/enum.js'
|
|
|
|
const answerMethod = computed(() => ANSWER_METHOD_MAP[props.item?.answerMethod || ''] || ANSWER_METHOD_MAP['01']);
|
|
const previewFile = info => {
|
|
previewFileFnc({
|
|
fileId: info.fileId,
|
|
getFileSrc: '/traapp/traFilePreview/',
|
|
fileName: info.fileName + '.pdf'
|
|
})
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.examination_core {
|
|
padding: 0 15rpx 0 0;
|
|
line-height: 50rpx;
|
|
font-size: 30rpx;
|
|
padding-bottom: 20rpx;
|
|
}
|
|
|
|
.course-info {
|
|
box-sizing: border-box;
|
|
// width: 100%;
|
|
background-color: #ffffff;
|
|
border-radius: 22rpx;
|
|
padding-top: 38rpx;
|
|
padding-left: 38rpx;
|
|
// margin-left: 16rpx;
|
|
// margin-right: 16rpx;
|
|
}
|
|
|
|
.info-top {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 62rpx;
|
|
padding-right: 36rpx;
|
|
.top-right {
|
|
.rate-text {
|
|
text-align: right;
|
|
color: #999999;
|
|
font-size: 30rpx;
|
|
margin-bottom: 4rpx;
|
|
}
|
|
|
|
.rate-num {
|
|
color: #0066ff;
|
|
font-size: 62rpx;
|
|
font-family: Arial, Helvetica, sans-serif;
|
|
font-weight: 600;
|
|
}
|
|
}
|
|
}
|
|
|
|
.info-middle {
|
|
margin-bottom: 35rpx;
|
|
padding-right: 36rpx;
|
|
|
|
}
|
|
|
|
.info-bottom {
|
|
// background-color: #0066ff;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
width: 100%;
|
|
position: relative;
|
|
}
|
|
|
|
.bottom-left {
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding-top: 12rpx;
|
|
flex: 1;
|
|
|
|
.label {
|
|
width: 50%;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.label-item {
|
|
padding: 0rpx 16rpx;
|
|
font-size: 22rpx;
|
|
margin-right: 14rpx;
|
|
margin-top: 6rpx;
|
|
border-radius: 8rpx;
|
|
border: 2rpx solid #FFA150;
|
|
font-weight: 500;
|
|
font-size: 24rpx;
|
|
color: #FFA150;
|
|
}
|
|
}
|
|
|
|
.bottom-right {
|
|
position: absolute;
|
|
top: -40rpx;
|
|
right: 20rpx;
|
|
.right-img {
|
|
width: 380rpx;
|
|
height: auto;
|
|
object-fit: cover;
|
|
}
|
|
}
|
|
|
|
.file-items {
|
|
padding-bottom: 26rpx;
|
|
}
|
|
.file-item {
|
|
padding-top: 12rpx;
|
|
color: #06f;
|
|
}
|
|
|
|
|
|
</style> |