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

View File

@ -110,7 +110,7 @@ export default {
if (selected) { if (selected) {
this.curVideo = selected this.curVideo = selected
this.playerOptions = { this.playerOptions = {
height: '360', height: '500',
autoplay: false, autoplay: false,
muted: false, muted: false,
language: 'zh-CN', 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 () { handleRefresh () {
this.$refs.table.refresh()
}, },
handleOk () { handleOk () {
this.$refs.table.refresh() this.$refs.table.refresh()

View File

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

View File

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

View File

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

View File

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