Merge branch 'develop' of https://gitee.com/siwa-team/dawa-vue into develop

This commit is contained in:
18571350067 2022-02-23 14:38:31 +08:00
commit 981fdfc65c
9 changed files with 209 additions and 48 deletions

View File

@ -0,0 +1,153 @@
<template>
<div class="CourseCatalogue-box">
<ul class="list-box">
<li class="list-item" v-for="(item, index) in catalogueList" :key="index">
<div class="list-item-title">
<span style="margin-right: 10px;">{{ capitalizeNumber[index] }}</span>
{{ item.name }}
</div>
<ul class="sub-list">
<li
@click="handlerItem(j, item)"
class="sub-list-item"
v-for="(j, k) in item.courseList"
:key="`${index}-${k}`"
>
<div
:class="[
'sub-item-info',
{ 'sub-item-info-success': j.status === 1 }
]"
>
<VideoOne
theme="filled"
:fill="j.status === 1 ? '#26bd71' : '#ccc'"
style="margin-right: 6px;"
size="1.2em"
></VideoOne>
{{ index + 1 }}.{{ k + 1 }}
{{ j.name }}
</div>
<!-- 0-未学 1-已学 -->
<div v-if="j.status === 1" class="sub-item-status">
<span style="color: #26bd71;">已学习</span>
<History
theme="filled"
tyle="margin-left: 10px;"
size="1.2em"
style="margin-left: 10px;"
fill="#26bd71"
></History>
</div>
<!-- <div v-else class="sub-item-status">
<Round
theme="filled"
strokeWidth="6"
:fill="j.status === 1 ? '#26bd71' : '#666'"
style="margin-left: 10px;"
></Round>
</div> -->
</li>
</ul>
</li>
</ul>
</div>
</template>
<script>
import { VideoOne, Round, History } from '@icon-park/vue'
export default {
components: { VideoOne, Round, History },
props: {
catalogueList: {
type: Array,
default: () => []
}
},
data () {
return {
capitalizeNumber: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一'],
data: []
}
},
mounted () {},
methods: {
handlerItem (item, pItem) {
this.$emit('changeVideo', { item, pItem })
}
}
}
</script>
<style lang="less" scoped>
.learn-detail {
display: flex;
}
.learn-detail-video {
flex: 1;
}
.learn-detail-list {
flex: 220px;
}
.list-box,
.sub-list {
margin: 0;
padding: 0;
}
.list-item-title {
color: 16px;
font-weight: bold;
color: #333;
padding: 10px 0;
}
.sub-list-item {
color: #666;
padding-bottom: 10px;
&:hover {
color: #1890ff;
}
}
.sub-list {
padding-left: 20px;
}
.sub-list-item {
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
.sub-item-info {
flex: 1;
display: flex;
line-height: 2;
}
.sub-item-info-active {
color: #1890ff !important;
}
.sub-item-info-success {
color: #26bd71;
}
.sub-item-status {
flex: 0 0 200px;
font-size: 12px;
text-align: right;
color: #1890ff;
display: flex;
align-items: center;
justify-content: flex-end;
}
}
.list-item {
width: 100%;
}
</style>

View File

@ -23,12 +23,17 @@
<span class="label">学习状态</span>
<span class="value">{{ data.status }}</span>
</a-col>
<a-col>
<CourseCatalogue :catalogueList="data.details"></CourseCatalogue>
</a-col>
</a-row>
</div>
</template>
<script>
import CourseCatalogue from './CourseCatalogue.vue'
export default {
components: {CourseCatalogue},
props: {
data: {
type: Object,

View File

@ -110,7 +110,7 @@ export default {
if (selected) {
this.curVideo = selected
this.playerOptions = {
height: '360',
height: '500',
autoplay: false,
muted: false,
language: 'zh-CN',

View File

@ -1,13 +0,0 @@
<template>
</template>
<script>
export default {
}
</script>
<style>
</style>

View File

@ -161,7 +161,7 @@ export default {
},
//
handleRefresh () {
this.$refs.table.refresh()
},
handleOk () {
this.$refs.table.refresh()

View File

@ -13,7 +13,7 @@
"></SearchCom>
</div>
</br>
<a-tabs :default-active-key="activeTab">
<a-tabs :default-active-key="activeTab" @change="(key)=>{activeTab = key}">
<a-tab-pane key="1" tab="预约考试">
<s-table
ref="examTable"
@ -74,6 +74,8 @@
<script>
import { STable, SearchCom } from '@/components'
import { reqExamList, reqExamAttendList, reqExamSubscribe } from '@/api/myexam/exam'
import { dictionaryDropDown } from '@/api/sys/dictionaryItem'
import { dictToTree } from '@/utils/util'
export default {
components: { STable, SearchCom },
@ -82,10 +84,10 @@ export default {
loading: false,
activeTab: '1',
queryParam: {
examType: '' //
examClassify: '' //
},
queryOptions: [
{ type: 'select-dic-tree', placeholder: '考试分类', key: 'examType', options: [] }
{ type: 'select-dic-tree', placeholder: '课程分类', key: 'examClassify', options: [] }
],
examColumns: [
{
@ -181,15 +183,24 @@ export default {
}
},
mounted () {
this.dictionaryDropDown()
},
methods: {
dictionaryDropDown () {
dictionaryDropDown({ dictionaryCode: '0006' }).then((res) => {
const result = dictToTree(res.data, [], 0)
this.queryOptions[0].options = result
this.loading = false
})
},
//
handleRefresh () {
const { activeTab } = this
console.log('activeTab', activeTab)
if (activeTab === '1') {
this.$refs.examTable.refresh()
} else {
this.$refs.examDoneColumns.refresh()
this.$refs.examDoneTable.refresh()
}
},
//

View File

@ -22,28 +22,32 @@
</div>
</div>
</br>
<a-card v-for="(item, index) in dataList" :key="index" :bordered="false" :bodyStyle="{paddingLeft: '0px !important'}" :headStyle="{paddingLeft: '0px !important'}" >
<template slot="title">
<b>{{ item.title }}</b><span class="sub-txt">{{ item.questionCount }}</span>
</template>
<a-row :gutter="16">
<a-col
:span="6"
:lg="4"
:md="6"
:sm="8"
:xs="12"
v-for="(j, k) in item.list"
:key="`${index}-${k}`">
<a-card hoverable style="width: 100%; margin-bottom: 15px;">
<div class="flex-center"><h4>{{ j.courseName }}</h4></div>
<div class="flex-center" style="margin-top: 10px;">
<a-button @click="handlerStart(j)" type="primary" size="small" round>开始答题</a-button>
</div>
</a-card>
</a-col>
</a-row>
</a-card>
<template v-if="dataList && dataList.length>0">
<a-card v-for="(item, index) in dataList" :key="index" :bordered="false" :bodyStyle="{paddingLeft: '0px !important'}" :headStyle="{paddingLeft: '0px !important'}" >
<template slot="title">
<b>{{ item.title }}</b><span class="sub-txt">{{ item.questionCount }}</span>
</template>
<a-row :gutter="16">
<a-col
:span="6"
:lg="4"
:md="6"
:sm="8"
:xs="12"
v-for="(j, k) in item.list"
:key="`${index}-${k}`">
<a-card hoverable style="width: 100%; margin-bottom: 15px;">
<div class="flex-center"><h4>{{ j.courseName }}</h4></div>
<div class="flex-center" style="margin-top: 10px;">
<a-button @click="handlerStart(j)" type="primary" size="small" round>开始答题</a-button>
</div>
</a-card>
</a-col>
</a-row>
</a-card>
</template>
<a-empty v-else />
</a-card>
</template>

View File

@ -9,9 +9,9 @@
<a-descriptions-item label="培训类型">{{projectBasicInfo.trainType == 1 ? '必修课':'选修课'}}</a-descriptions-item>
<a-descriptions-item label="培训种类">{{projectBasicInfo.trainClassName}}</a-descriptions-item>
<a-descriptions-item label="培训方式">{{projectBasicInfo.trainWayName}}</a-descriptions-item>
<a-descriptions-item label="培训时间">{{projectBasicInfo.trainSdate + ' - ' + projectBasicInfo.trainEdate}}</a-descriptions-item>
<a-descriptions-item label="练习时间">{{projectBasicInfo.practiceSdate + ' - ' + projectBasicInfo.practiceEdate}}</a-descriptions-item>
<a-descriptions-item label="考试时间">{{projectBasicInfo.examSdate + ' - ' + projectBasicInfo.examEdate}}</a-descriptions-item>
<a-descriptions-item v-if="projectBasicInfo.trainSdate != null" label="培训时间">{{projectBasicInfo.trainSdate + ' - ' + projectBasicInfo.trainEdate}}</a-descriptions-item>
<a-descriptions-item v-if="projectBasicInfo.practiceSdate != null" label="练习时间">{{projectBasicInfo.practiceSdate + ' - ' + projectBasicInfo.practiceEdate}}</a-descriptions-item>
<a-descriptions-item v-if="projectBasicInfo.examSdate != null" label="考试时间">{{projectBasicInfo.examSdate + ' - ' + projectBasicInfo.examEdate}}</a-descriptions-item>
<a-descriptions-item label="考试次数">{{projectBasicInfo.examNumber + '次'}}</a-descriptions-item>
<a-descriptions-item label="模拟考试">{{projectBasicInfo.mockExam == 1 ? '允许':'不允许'}}</a-descriptions-item>
<a-descriptions-item label="备注">{{projectBasicInfo.remark}}</a-descriptions-item>
@ -63,7 +63,7 @@ export default {
personColumns: [ //
{ title: '序号', key: 'id', dataIndex: 'id', width: 60, scopedSlots: { customRender: 'serial' } },
{ title: '姓名', dataIndex: 'name', key: 'name' },
{ title: '受训角色', dataIndex: 'role', key: 'role', },
// { title: '', dataIndex: 'role', key: 'role', },
{ title: '单位信息', key: 'company', dataIndex: 'company', },
{ title: '部门信息', dataIndex: 'department', key: 'department', },
],

View File

@ -25,7 +25,7 @@
</a-form-model-item>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row v-if="!['2'].includes(form.trainWay)" :gutter="24">
<h4>考试开启条件</h4>
<a-col :md="10" :sm="12">
<a-form-model-item label="学时时长" prop="examOpenCondition">
@ -69,6 +69,7 @@
// jsjsjson
// import from ''
import { getQuestionNumByCourseIds } from '@/api/course/question/question'
import Item from '@/components/AvatarList/Item'
export default {
// import使
@ -158,13 +159,13 @@ export default {
methods: {
//
toSave() {
this.form.testPaperTactics = this.tableData;
this.form.testPaperTactics = this.tableData.filter((Item) => {return Item.topicNum && Item.topicScore});
this.form.projectStatus = 1
this.$emit('executeSave', this.form)
},
//
toIssue() {
this.form.testPaperTactics = this.tableData
this.form.testPaperTactics = this.tableData.filter((Item) => {return Item.topicNum && Item.topicScore});
this.form.projectStatus = 2
this.$emit('executeIssue', this.form)
},