终端培训新增按钮间距调整
This commit is contained in:
commit
b0132426a1
|
@ -3,9 +3,9 @@
|
|||
<div class="answer-card">
|
||||
<a-card :bordered="false">
|
||||
<div @click="handlerBack" class="answer-card-title"><a-icon type="arrow-left" style="margin-right: 6px;" />答题卡</div>
|
||||
<div class="answer-cart-time">
|
||||
<div v-if="data.examTime" class="answer-cart-time">
|
||||
倒计时:
|
||||
<b style="margin-left: 5px;"><a-statistic-countdown :value="deadline" :valueStyle="{ fontSize: '16px' }" @finish="onFinish"/></b>
|
||||
<b style="margin-left: 5px;"><a-statistic-countdown :value="Date.now() + data.examTime*60*1000" :valueStyle="{ fontSize: '16px' }" @finish="onFinish"/></b>
|
||||
</div>
|
||||
<DbAnswerCard :data="data"></DbAnswerCard>
|
||||
<div class="answer-cart-footer flex-center" style="margin-top: 20px;">
|
||||
|
@ -89,12 +89,23 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
// 考试倒计时结束
|
||||
onFinish () {},
|
||||
onFinish () {
|
||||
this.$emit('submit', this.data)
|
||||
},
|
||||
handlerBack () {
|
||||
this.$router.go(-1)
|
||||
},
|
||||
handlerSubmit () {
|
||||
this.$emit('submit', this.data)
|
||||
const _this = this
|
||||
this.$confirm({
|
||||
title: '安全培训',
|
||||
content: '一但提交将不能修改,确定要现在提交吗?',
|
||||
onOk () {
|
||||
// change()
|
||||
_this.$emit('submit', _this.data)
|
||||
},
|
||||
onCancel () {}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
|
@ -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,
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
<a-col :span="12" class="flex-center">
|
||||
<a-progress
|
||||
type="circle"
|
||||
:percent="data.score / (data.totalScore * 100)"
|
||||
:format="percent => `${percent} 分`"
|
||||
:percent="(data.score / data.totalScore) * 100"
|
||||
:format="percent => `${data.score }分`"
|
||||
/>
|
||||
</a-col>
|
||||
<a-col class="count-info" :span="12">
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="container">
|
||||
<div class="top">
|
||||
<div class="header">
|
||||
<a href="/">
|
||||
<a href="javascript:void(0);">
|
||||
<img src="~@/assets/logo.svg" class="logo" alt="logo">
|
||||
<span class="title">安全培训平台</span>
|
||||
</a>
|
||||
|
|
|
@ -39,7 +39,7 @@ const user = {
|
|||
|
||||
actions: {
|
||||
// 登录
|
||||
Login({ commit }, userInfo) {
|
||||
Login ({ commit }, userInfo) {
|
||||
return new Promise((resolve, reject) => {
|
||||
login(userInfo).then(response => {
|
||||
storage.set(ACCESS_TOKEN, response.token, 24 * 60 * 60 * 1000)
|
||||
|
@ -52,7 +52,7 @@ const user = {
|
|||
},
|
||||
|
||||
// 获取用户信息
|
||||
GetInfo({ commit, state }) {
|
||||
GetInfo ({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getLoginUser().then(response => {
|
||||
if (response.code === 200) {
|
||||
|
@ -76,18 +76,25 @@ const user = {
|
|||
},
|
||||
|
||||
// 登出
|
||||
Logout({ commit, state }) {
|
||||
Logout ({ commit, state }) {
|
||||
return new Promise((resolve) => {
|
||||
logout().then(() => {
|
||||
resolve()
|
||||
}).catch(() => {
|
||||
resolve()
|
||||
}).finally(() => {
|
||||
const clear = function () {
|
||||
commit('SET_TOKEN', '')
|
||||
commit('SET_ROLES', [])
|
||||
commit('SET_BUTTONS', [])
|
||||
commit('SET_ROUTERS', [])
|
||||
storage.remove(ACCESS_TOKEN)
|
||||
}
|
||||
logout().then(() => {
|
||||
clear()
|
||||
setTimeout(() => {
|
||||
resolve()
|
||||
}, 300)
|
||||
resolve()
|
||||
}).catch(() => {
|
||||
resolve()
|
||||
}).finally(() => {
|
||||
clear()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
@ -163,10 +163,14 @@ export default {
|
|||
methods: {
|
||||
//返回
|
||||
goback() {
|
||||
this.$router.push({
|
||||
path: '/course/CoursewareList',
|
||||
query: { id: this.$route.query.courseId, type: this.$route.query.types },
|
||||
})
|
||||
if(this.$route.query.isOther){
|
||||
this.$router.go(-1)
|
||||
}else{
|
||||
this.$router.push({
|
||||
path: '/course/CoursewareList',
|
||||
query: { id: this.$route.query.courseId, type: this.$route.query.types },
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//选择播放的文件/下载的文件
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
<!-- <a-row :gutter="48">
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-form-item label="部门名称"><a-input v-model="queryParam.orgName" placeholder="请输入部门名称" @pressEnter="loadData1" /></a-form-item>
|
||||
</a-col>
|
||||
|
@ -34,7 +34,7 @@
|
|||
<a-button type="primary" @click="$refs.table1.refresh(true)">查询</a-button>
|
||||
<a-button style="margin-left: 8px" @click="() => {queryParam = {}, this.loadData1()}">重置</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-row> -->
|
||||
</a-form>
|
||||
</div>
|
||||
<s-table
|
||||
|
@ -74,7 +74,7 @@
|
|||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper" >
|
||||
<a-form layout="inline">
|
||||
<a-row :gutter="48">
|
||||
<!-- <a-row :gutter="48">
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-form-item label="部门名称"><a-input v-model="queryParam.orgName" placeholder="请输入部门名称" @pressEnter="loadData2" /></a-form-item>
|
||||
</a-col>
|
||||
|
@ -82,9 +82,13 @@
|
|||
<a-button type="primary" @click="$refs.table2.refresh(true)">查询</a-button>
|
||||
<a-button style="margin-left: 8px" @click="() => {queryParam = {}, this.loadData2()}">重置</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-row> -->
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<a-button @click="changeSort(1)" ref="toFocus">按累计学时排序</a-button>
|
||||
<a-button @click="changeSort(2)">按年度学时排序</a-button>
|
||||
</div>
|
||||
|
||||
<s-table
|
||||
ref="table2"
|
||||
|
@ -100,9 +104,9 @@
|
|||
|
||||
<a-divider>前十统计排名</a-divider>
|
||||
<div class="table-operator">
|
||||
<a-button @click="changeTopType(1)" ref="toFocus">公司排名年度学时前十统计</a-button>
|
||||
<a-button @click="changeTopType(1)">公司排名年度学时前十统计</a-button>
|
||||
<a-button @click="changeTopType(2)">公司累计学时学时前十统计</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<s-table
|
||||
v-show="topType==1"
|
||||
ref="tableTop1"
|
||||
|
@ -112,7 +116,7 @@
|
|||
:rowKey="(record) => record.id"
|
||||
>
|
||||
</s-table>
|
||||
|
||||
|
||||
<s-table
|
||||
v-show="topType==2"
|
||||
ref="tableTop2"
|
||||
|
@ -121,7 +125,7 @@
|
|||
:showPagination="false"
|
||||
:rowKey="(record) => record.id"
|
||||
>
|
||||
</s-table>
|
||||
</s-table>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
|
||||
|
@ -141,7 +145,7 @@
|
|||
data () {
|
||||
return {
|
||||
// 查询参数
|
||||
queryParam: { orgId: undefined, orgName: '' },
|
||||
queryParam: { orgId: undefined, orgName: '', asc: 1, type: 1 },
|
||||
// 表头1
|
||||
columns1: [
|
||||
{
|
||||
|
@ -150,7 +154,7 @@
|
|||
},
|
||||
{
|
||||
title: '学员数量',
|
||||
dataIndex: 'studentCount'
|
||||
dataIndex: 'personCount'
|
||||
},
|
||||
{
|
||||
title: '培训人数',
|
||||
|
@ -175,6 +179,10 @@
|
|||
],
|
||||
loadData1: parameter => {
|
||||
return dataOrgStatistics(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||
const data = res.rows
|
||||
data.forEach(function(val){
|
||||
val.trainRate = val.trainRate + '%'
|
||||
})
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
@ -200,10 +208,6 @@
|
|||
title: '累计学时',
|
||||
dataIndex: 'sumClassHour'
|
||||
},
|
||||
{
|
||||
title: '人均学时',
|
||||
dataIndex: 'avgClassHour'
|
||||
}
|
||||
],
|
||||
loadData2: parameter => {
|
||||
return dataPersonalStatistics(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||
|
@ -241,7 +245,7 @@
|
|||
}
|
||||
],
|
||||
loadDataTop1: parameter => {
|
||||
return dataClassHourTop(Object.assign(parameter, {type : 1})).then((res) => {
|
||||
return dataClassHourTop(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||
return res.data
|
||||
})
|
||||
},
|
||||
|
@ -276,7 +280,7 @@
|
|||
}
|
||||
],
|
||||
loadDataTop2: parameter => {
|
||||
return dataClassHourTop(Object.assign(parameter, {type : 2})).then((res) => {
|
||||
return dataClassHourTop(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||
return res.data
|
||||
})
|
||||
},
|
||||
|
@ -302,7 +306,7 @@
|
|||
this.getOrgTree()
|
||||
},
|
||||
mounted () {
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
tabsCallback (key) {
|
||||
|
@ -347,10 +351,27 @@
|
|||
}
|
||||
if (this.keyType === '2') {
|
||||
this.$refs.table2.refresh(true)
|
||||
if (this.topType === 1) {
|
||||
this.$refs.tableTop1.refresh(true)
|
||||
}
|
||||
if (this.topType === 2) {
|
||||
this.$refs.tableTop2.refresh(true)
|
||||
}
|
||||
}
|
||||
},
|
||||
changeTopType (type) {
|
||||
this.topType = type
|
||||
this.queryParam.type = type
|
||||
if (this.topType === 1) {
|
||||
this.$refs.tableTop1.refresh(true)
|
||||
}
|
||||
if (this.topType === 2) {
|
||||
this.$refs.tableTop2.refresh(true)
|
||||
}
|
||||
},
|
||||
changeSort (type) {
|
||||
this.queryParam.asc = type
|
||||
this.$refs.table2.refresh(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,6 +82,7 @@ export default {
|
|||
const data = res.data
|
||||
if (res.correctness) {
|
||||
this.$message.success('恭喜你,回答正确!')
|
||||
this.$emit('success')
|
||||
this.visible = false
|
||||
} else {
|
||||
if (this.chance === 1) {
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
</a-tabs>
|
||||
</div>
|
||||
<!-- 课中考试 -->
|
||||
<ExamDialog ref="examDialog" :curVideo="curVideo"></ExamDialog>
|
||||
<ExamDialog ref="examDialog" :curVideo="curVideo" @success="answerSuccess"></ExamDialog>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
|
@ -110,7 +110,7 @@ export default {
|
|||
if (selected) {
|
||||
this.curVideo = selected
|
||||
this.playerOptions = {
|
||||
height: '360',
|
||||
height: '500',
|
||||
autoplay: false,
|
||||
muted: false,
|
||||
language: 'zh-CN',
|
||||
|
@ -148,9 +148,9 @@ export default {
|
|||
_this.curVideo = item
|
||||
vid.src(item.videoAddress)
|
||||
vid.play()
|
||||
_this.openCourseExam() // 调试用
|
||||
// _this.openCourseExam() // 调试用
|
||||
}
|
||||
if (this.oldTime > 0) {
|
||||
if (this.oldTime > 0 && _this.curVideo.status !== 1) {
|
||||
this.$confirm({
|
||||
title: '确定要切换学习视频吗?',
|
||||
content: '一但切换学习视频,您现在正在学习的视频学时将清0,确定要切换吗?',
|
||||
|
@ -170,7 +170,6 @@ export default {
|
|||
},
|
||||
// 当视频播放完毕的回调处理
|
||||
onPlayerEnded () {
|
||||
console.log('播放完毕')
|
||||
this.openCourseExam()
|
||||
},
|
||||
// 打开课中检查
|
||||
|
@ -203,6 +202,9 @@ export default {
|
|||
this.maxTime = oldTime
|
||||
}
|
||||
}
|
||||
},
|
||||
answerSuccess () {
|
||||
this.curVideo.status = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -161,7 +161,7 @@ export default {
|
|||
},
|
||||
// 获取列表
|
||||
handleRefresh () {
|
||||
|
||||
this.$refs.table.refresh()
|
||||
},
|
||||
handleOk () {
|
||||
this.$refs.table.refresh()
|
||||
|
|
|
@ -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"
|
||||
|
@ -34,14 +34,9 @@
|
|||
{{ record.examTime }}分钟
|
||||
</template>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<template v-if="record.subscribeStatus == 0">
|
||||
<a disabled>预约考试</a>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a v-if="record.examCondition === 2" @click="handlerMarker(record)">预约考试</a>
|
||||
<a v-if="record.examCondition === 1" @click="handlerGoReport(record)">查看详情</a>
|
||||
<a v-if="record.examCondition === 3" @click="handlerGoExam(record)">进入考试</a>
|
||||
</template>
|
||||
</span>
|
||||
</s-table>
|
||||
</a-tab-pane>
|
||||
|
@ -79,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 },
|
||||
|
@ -87,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: [
|
||||
{
|
||||
|
@ -186,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()
|
||||
}
|
||||
},
|
||||
// 预约考试
|
||||
|
@ -205,7 +211,7 @@ export default {
|
|||
content: '确定要预约考试吗?',
|
||||
onOk () {
|
||||
reqExamSubscribe({ projectId: data.id }).then(res => {
|
||||
this.$message.success('预约成功!')
|
||||
_this.$message.success('预约成功!')
|
||||
_this.handleRefresh()
|
||||
})
|
||||
},
|
||||
|
@ -219,7 +225,7 @@ export default {
|
|||
this.$router.push({ path: '/myexamDetail', query: { type: 'exam', projectId: row.id } })
|
||||
},
|
||||
handlerGoReport (row) {
|
||||
this.$router.push({ path: '/myreport', query: { type: 'exam', reportId: row.id } })
|
||||
this.$router.push({ path: '/myreport', query: { type: 'exam', reportId: row.report.id } })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,10 +19,12 @@ export default {
|
|||
data () {
|
||||
return {
|
||||
examData: {},
|
||||
query: {}
|
||||
query: {},
|
||||
startTime: 0
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.startTime = Date.now()
|
||||
this.query = this.$route.query
|
||||
this.$nextTick(() => {
|
||||
this.initData()
|
||||
|
@ -83,10 +85,10 @@ export default {
|
|||
// 提交
|
||||
handlerSubmit (result) {
|
||||
const { type } = this.query
|
||||
if (type === 'practice' || type === 'operation') {
|
||||
if (type === 'practice') {
|
||||
this.submitPractice(result)
|
||||
}
|
||||
if (type === 'exam') {
|
||||
if (type === 'exam' || type === 'test' || type === 'operation') {
|
||||
this.submitExam(result)
|
||||
}
|
||||
// if (type === 'operation') {
|
||||
|
@ -134,7 +136,7 @@ export default {
|
|||
const params = {
|
||||
projectId: query.projectId,
|
||||
courseId: query.courseId,
|
||||
answerTime: 0,
|
||||
answerTime: Number.parseInt((Date.now() - this.startTime) / 1000),
|
||||
type: query.practiceType,
|
||||
questionList: this.formatSubmit(result)
|
||||
}
|
||||
|
@ -149,7 +151,7 @@ export default {
|
|||
const params = {
|
||||
projectId: query.projectId,
|
||||
courseId: query.courseId,
|
||||
answerTime: 0,
|
||||
answerTime: Number.parseInt((Date.now() - this.startTime) / 1000),
|
||||
type: query.practiceType,
|
||||
questionList: this.formatSubmit(result)
|
||||
}
|
||||
|
@ -164,8 +166,9 @@ export default {
|
|||
const params = {
|
||||
projectId: query.projectId,
|
||||
courseId: query.courseId,
|
||||
answerTime: 0,
|
||||
answerTime: Number.parseInt((Date.now() - this.startTime) / 1000),
|
||||
type: query.practiceType,
|
||||
examType: query.type === 'test' ? 1 : (query.type === 'operation' ? 3 : 2),
|
||||
questionList: this.formatSubmit(result)
|
||||
}
|
||||
reqExamSubmit(params).then(() => {
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -7,21 +7,42 @@
|
|||
@search="handleRefresh"
|
||||
@reset="
|
||||
() => {
|
||||
queryParam = {}
|
||||
handleRefresh()
|
||||
queryParam = {};
|
||||
handleRefresh();
|
||||
}
|
||||
"></SearchCom>
|
||||
"
|
||||
></SearchCom>
|
||||
</div>
|
||||
<template v-if="dataList && dataList.length>0">
|
||||
<template v-if="dataList && dataList.length > 0">
|
||||
<a-card v-for="(item, index) in dataList" :key="index" style="margin-bottom: 15px;">
|
||||
<div class="flex-center" >
|
||||
<div class="flex-center">
|
||||
<div style="flex: 1;">
|
||||
<h3>{{ item.name }}</h3>
|
||||
<div><span style="margin-right: 20px;">下载次数{{ item.rightQuestions }}次</span><span>预览次数:{{ item.submitTime }}次</span></div>
|
||||
<div>
|
||||
<span style="margin-right: 20px;">下载次数{{ item.downCount || 0 }}次</span>
|
||||
<span>预览次数:{{ item.viewCount }}次</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="flex: 0 0 200px; text-align: right;">
|
||||
<div @click="handlerDown(item)" :span="24" style="margin-bottom: 10px;"><a-button type="primary" size="small" >下载</a-button></div>
|
||||
<div @click="handlerPreview(item)" :span="24"><a-button type="danger" size="small">预览</a-button></div>
|
||||
<!-- <div @click="handlerDown(item)" :span="24" style="margin-bottom: 10px;"><a-button type="primary" size="small" >下载</a-button></div> -->
|
||||
<a-popover title="资源下载">
|
||||
<template slot="content">
|
||||
<a
|
||||
style="display: block;margin-bottom:15px"
|
||||
v-for="j in item.videoList"
|
||||
:href="j.path"
|
||||
:key="j.id"
|
||||
>
|
||||
{{ j.name }}
|
||||
</a>
|
||||
</template>
|
||||
<div :span="24" style="margin-bottom: 10px;">
|
||||
<a-button type="primary" size="small">下载</a-button>
|
||||
</div>
|
||||
</a-popover>
|
||||
<div @click="handlerPreview(item)" :span="24">
|
||||
<a-button type="danger" size="small">预览</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
|
@ -32,7 +53,6 @@
|
|||
<template v-else>
|
||||
<a-empty style="margin: 30px 0;" />
|
||||
</template>
|
||||
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
|
@ -54,24 +74,27 @@ export default {
|
|||
pageNum: 1
|
||||
},
|
||||
queryParam: {
|
||||
name: '', // 课程分类
|
||||
trainWay: ''
|
||||
classify: ''
|
||||
},
|
||||
queryOptions: [
|
||||
{ type: 'select-dic-tree', placeholder: '课程类别', key: 'trainWay', options: [] }
|
||||
{ type: 'select-dic-tree', placeholder: '课件类别', key: 'classify', options: [] }
|
||||
]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.dictionaryDropDown()
|
||||
},
|
||||
mounted () {
|
||||
this.dictionaryDropDown()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 获取数据词典
|
||||
dictionaryDropDown () {
|
||||
dictionaryDropDown({ dictionaryCode: '0009' }).then(res => {
|
||||
this.queryOptions[0].options = dictToTree(res.data, [], 0)
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
getList () {
|
||||
gerMyresource(this.params).then(res => {
|
||||
console.log('>>>>>>', res)
|
||||
gerMyresource({ ...this.params, ...this.queryParam }).then(res => {
|
||||
this.dataList = res.rows
|
||||
this.total = res.total
|
||||
})
|
||||
|
@ -83,24 +106,18 @@ export default {
|
|||
this.getList()
|
||||
})
|
||||
},
|
||||
handlerDown () {
|
||||
|
||||
handlerDown () {},
|
||||
handlerPreview (data) {
|
||||
this.$router.push({
|
||||
path: '/course/CoursewarePreview',
|
||||
query: { coursewareId: data.id, courseId: data.courseId, types: 'self', isOther: 1 }
|
||||
})
|
||||
},
|
||||
handlerPreview () {},
|
||||
handleRefresh () {
|
||||
this.getList()
|
||||
},
|
||||
// 获取数据词典
|
||||
dictionaryDropDown () {
|
||||
dictionaryDropDown({ dictionaryCode: '0006' }).then((res) => {
|
||||
this.queryOptions[1].options = dictToTree(res.data, [], 0)
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
|
||||
</style>
|
||||
<style lang="less"></style>
|
||||
|
|
|
@ -32,14 +32,23 @@
|
|||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
<a-form-model-item ref="isCalculate" label="是否计算学时" prop="isCalculate">
|
||||
<a-radio-group v-model="form.isCalculate">
|
||||
<a-radio :value="1">是</a-radio>
|
||||
<a-radio :value="0">否</a-radio>
|
||||
<a-radio :value="1" @click="isCalculateFunc(1)">是</a-radio>
|
||||
<a-radio :value="0" @click="isCalculateFunc(0)">否</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<div v-if="classHourShow">
|
||||
<a-col :span="12" >
|
||||
<a-form-model-item ref="classHour" label="学时" prop="classHour" >
|
||||
<a-input v-model="form.classHour" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</div>
|
||||
</a-row>
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="12">
|
||||
|
@ -136,7 +145,8 @@ export default {
|
|||
rangeId: 0,
|
||||
rangeName: '',
|
||||
isTop: 0,
|
||||
isCalculate: 0,
|
||||
isCalculate: 1,
|
||||
classHour: 0,
|
||||
isNowPublish: false,
|
||||
publishTime: '',
|
||||
type: 1,
|
||||
|
@ -144,11 +154,13 @@ export default {
|
|||
},
|
||||
fileList: [],
|
||||
timeShow: true,
|
||||
classHourShow: true,
|
||||
rules: {
|
||||
title: [{ required: true, message: '请输入公告标题', trigger: 'blur' }],
|
||||
rangeName: [{ required: true, message: '请选择发布范围', trigger: 'blur' }],
|
||||
isTop: [{ required: true, message: '请选择是否置顶', trigger: 'change' }],
|
||||
isCalculate: [{ required: true, message: '请选择是否计算学时', trigger: 'change' }],
|
||||
classHour: [{ required: true, message: '请填写学时', trigger: 'change' }],
|
||||
isNowPublish: [{ required: true, message: '请选择即时发布', trigger: 'change' }],
|
||||
publishTime: [{ required: true, message: '请选择发布时间', trigger: 'change' }],
|
||||
type: [{ required: true, message: '请选择发布类型', trigger: 'change' }],
|
||||
|
@ -209,6 +221,9 @@ export default {
|
|||
},
|
||||
onChangeNow(checked) {
|
||||
this.timeShow = !checked
|
||||
},
|
||||
isCalculateFunc(type) {
|
||||
this.classHourShow = type === 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -177,6 +177,20 @@
|
|||
</a-form>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form :form="form">
|
||||
<a-form-item
|
||||
label="年度计划学时"
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
has-feedback
|
||||
>
|
||||
<a-input placeholder="请输入年度计划学时" v-decorator="['planClassHour']" />
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-divider orientation="left">上传身份证</a-divider>
|
||||
<a-row :gutter="24">
|
||||
|
@ -330,7 +344,8 @@
|
|||
workType: data.workType ? parseInt(data.workType) : undefined,
|
||||
degreeId: data.degreeId,
|
||||
orgId: data.orgId,
|
||||
orgName: data.orgName
|
||||
orgName: data.orgName,
|
||||
planClassHour: data.planClassHour
|
||||
}
|
||||
)
|
||||
// 动态赋值年龄和性别
|
||||
|
|
Loading…
Reference in New Issue