曲靖需求变更
This commit is contained in:
@@ -28,6 +28,7 @@ const $confirm = (content, options) => {
|
||||
return MessageBox.confirm(content, {
|
||||
type: "warning",
|
||||
confirmButtonText: "确认",
|
||||
closeOnClickModal: false,
|
||||
center: true,
|
||||
title: "提示",
|
||||
dangerouslyUseHTMLString: true,
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<div class="AppQuestionBank">
|
||||
<keep-alive :include="['List']">
|
||||
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
|
||||
</keep-alive>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/List'
|
||||
import Detail from './components/Detail'
|
||||
|
||||
export default {
|
||||
name: 'AppCertificateIssuance',
|
||||
label: '考试台账',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
component: 'List',
|
||||
params: {},
|
||||
include: []
|
||||
}
|
||||
},
|
||||
|
||||
components: {
|
||||
List,
|
||||
Detail
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChange (data) {
|
||||
if (data.type === 'Detail') {
|
||||
this.component = 'Detail'
|
||||
this.params = data.params
|
||||
}
|
||||
|
||||
if (data.type === 'List') {
|
||||
this.component = 'List'
|
||||
this.params = data.params
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (data.isRefresh) {
|
||||
this.$refs.component.getList()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.AppQuestionBank {
|
||||
height: 100%;
|
||||
background: #F3F6F9;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
148
project/qujing/app/AppCertificateIssuance/components/Detail.vue
Normal file
148
project/qujing/app/AppCertificateIssuance/components/Detail.vue
Normal file
@@ -0,0 +1,148 @@
|
||||
<template>
|
||||
<ai-detail>
|
||||
<template slot="title">
|
||||
<ai-title title="学习记录" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-card title="基本信息">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="120px">
|
||||
<ai-info-item label="微信昵称" :value="info.nickName"></ai-info-item>
|
||||
<ai-info-item label="手机号" :value="info.phone"></ai-info-item>
|
||||
<ai-info-item label="姓名" :value="info.realName"></ai-info-item>
|
||||
<ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item>
|
||||
<ai-info-item label="地区" :value="info.areaName"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="考试记录">
|
||||
<template #right>
|
||||
<el-button type="primary" v-if="!info.haveCertificate" @click="audit(row.id, row.openId)">审核发证</el-button>
|
||||
</template>
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
style="width: 100%"
|
||||
label-width="56px">
|
||||
<ai-info-item label="考试名称" :value="info.examinationName"></ai-info-item>
|
||||
<ai-info-item label="考试类型" :value="dict.getLabel('qjExaminationType', info.examinationType)"></ai-info-item>
|
||||
<ai-info-item label="考试场数" :value="info.examinationCount"></ai-info-item>
|
||||
<ai-info-item label="通过考试" :value="info.passCount"></ai-info-item>
|
||||
<ai-info-item label="是否发证" :value="info.haveCertificate ? '是' : '否'"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
style="margin-top: 6px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="操作信息" v-if="info.haveCertificate">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
style="width: 100%"
|
||||
label-width="56px">
|
||||
<ai-info-item label="发证审核人" :value="info.examinationName"></ai-info-item>
|
||||
<ai-info-item label="时间" :value="info.examinationName"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Detail',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
info: {},
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
title: ''
|
||||
},
|
||||
total: 0,
|
||||
tableData: [],
|
||||
colConfigs: [
|
||||
{ prop: 'bizName', label: '考试名称', align: 'left' },
|
||||
{ prop: 'allSubjectNumber', label: '题目数', align: 'center' },
|
||||
{ prop: 'startTime', label: '开始考试时间', align: 'center' },
|
||||
{ prop: 'score', label: '得分', align: 'center' },
|
||||
{ prop: 'status', label: '是否通过', align: 'center', format: v => v === '0' ? '否' : '是' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
this.getInfo()
|
||||
this.dict.load('qjLearnStatus').then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo () {
|
||||
this.instance.post(`/app/appexaminationinfo/learningInfo?bizId=${this.params.id}&openId=${this.params.openId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
audit () {
|
||||
this.$confirm('发证审核通过后,将向居民颁发知法明理证书', '审核发证', {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: '确定',
|
||||
closeOnClickModal: false,
|
||||
cancelButtonText: '取消'
|
||||
}).then(() => {
|
||||
this.instance.post(`/app/appcertificateinfo/auditCertificate?certificateId=${this.info.certificateId}&openId=${this.params.openId}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.getInfo()
|
||||
this.$message.success('审核通过')
|
||||
}
|
||||
})
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
|
||||
getList () {
|
||||
this.instance.post(`/app/appwechatuserqujinglearnrecord/list`, null, {
|
||||
params: {
|
||||
...this.search2,
|
||||
bizType: 1,
|
||||
openId: this.params.openId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel (isRefresh) {
|
||||
this.$emit('change', {
|
||||
type: 'List',
|
||||
isRefresh: !!isRefresh
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
167
project/qujing/app/AppCertificateIssuance/components/List.vue
Normal file
167
project/qujing/app/AppCertificateIssuance/components/List.vue
Normal file
@@ -0,0 +1,167 @@
|
||||
<template>
|
||||
<ai-list class="notice">
|
||||
<template slot="title">
|
||||
<ai-title
|
||||
title="考试台账"
|
||||
isShowBottomBorder
|
||||
isShowArea
|
||||
:hideLevel="user.info.areaList.length - 1"
|
||||
v-model="areaId"
|
||||
:instance="instance"
|
||||
@change="onChange()">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-search-bar class="search-bar">
|
||||
<template #left>
|
||||
<ai-select
|
||||
v-model="search.examinationType"
|
||||
clearable
|
||||
placeholder="考试类型"
|
||||
:selectList="dict.getDict('qjExaminationType')"
|
||||
@change="search.current = 1, getList()">
|
||||
</ai-select>
|
||||
<ai-select
|
||||
v-model="search.haveCertificate"
|
||||
clearable
|
||||
placeholder="是否发证"
|
||||
:selectList="[
|
||||
{
|
||||
dictName: '是',
|
||||
dictValue: '1'
|
||||
},
|
||||
{
|
||||
dictName: '否',
|
||||
dictValue: '0'
|
||||
}
|
||||
]"
|
||||
@change="search.current = 1, getList()">
|
||||
</ai-select>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="search.name"
|
||||
class="search-input"
|
||||
size="small"
|
||||
v-throttle="() => {search.current = 1, getList()}"
|
||||
placeholder="请输入姓名/身份证/手机号/微信昵称"
|
||||
clearable
|
||||
@clear="search.current = 1, getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
style="margin-top: 6px;"
|
||||
:current.sync="search.current"
|
||||
:size.sync="search.size"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" v-if="!row.haveCertificate" @click="audit(row)">审核发证</el-button>
|
||||
<el-button type="text" @click="toDetail(row.bizId, row.openId)">详情</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: 'List',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
search: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
name: '',
|
||||
areaId: '',
|
||||
haveCertificate: '',
|
||||
examinationType: ''
|
||||
},
|
||||
total: 10,
|
||||
colConfigs: [
|
||||
{ prop: 'realName', label: '姓名' },
|
||||
{ prop: 'idNumber', label: '身份证号', align: 'center' },
|
||||
{ prop: 'areaName', label: '地址', align: 'center' },
|
||||
{ prop: 'phone', label: '手机号', align: 'center' },
|
||||
{ prop: 'examinationName', label: '考试名称', align: 'center' },
|
||||
{ prop: 'examinationType', label: '考试类型', align: 'center', format: v => this.dict.getLabel('qjExaminationType', v) },
|
||||
{ prop: 'score', label: '考试得分', align: 'center' },
|
||||
{ prop: 'status', label: '是否通过', align: 'center', format: v => v === '0' ? '未通过' : '通过' },
|
||||
{ prop: 'haveCertificate', label: '是否发证', align: 'center', format: v => !v ? '否' : '是' }
|
||||
],
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
created () {
|
||||
this.areaId = this.user.info.areaId
|
||||
this.dict.load(['qjExaminationType']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post(`/app/appexaminationinfo/learningList`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
audit (item) {
|
||||
this.$confirm('发证审核通过后,将向居民颁发知法明理证书', '审核发证', {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: '确定',
|
||||
closeOnClickModal: false,
|
||||
cancelButtonText: '取消'
|
||||
}).then(() => {
|
||||
this.instance.post(`/app/appcertificateinfo/auditCertificate?certificateId=${item.certificateId}&openId=item.openId`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.getList()
|
||||
this.$message.success('审核通过')
|
||||
}
|
||||
})
|
||||
}).catch((e) => {
|
||||
})
|
||||
},
|
||||
|
||||
toDetail (id, openId) {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
params: {
|
||||
id: id || '',
|
||||
openId
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
@@ -10,22 +10,6 @@
|
||||
<el-form-item label="证书名称" style="width: 100%" prop="certificateName" :rules="[{required: true, message: '请输入证书名称', trigger: 'blur'}]">
|
||||
<el-input size="small" v-model="form.certificateName" clearable placeholder="请输入证书名称" :maxlength="200"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="certificateType" label="类型" :rules="[{required: true, message: '请选择证书类型', trigger: 'change'}]">
|
||||
<ai-select
|
||||
v-model="form.certificateType"
|
||||
clearable
|
||||
placeholder="请选择证书类型"
|
||||
:selectList="dict.getDict('qjCertificateType')">
|
||||
</ai-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="累计学习时长" v-if="form.certificateType === '0'" style="width: 100%" prop="studyDuration" :rules="[{required: true, message: '请输入累计学习时长', trigger: 'blur'}]">
|
||||
<el-input-number size="small" v-model="form.studyDuration" :min="1" clearable placeholder="请输入" :maxlength="200"></el-input-number>
|
||||
<span style="color: #999; padding-left: 10px;">分钟</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="通过考试" v-else style="width: 100%" prop="passExam" :rules="[{required: true, message: '请输入通过考试场数', trigger: 'blur'}]">
|
||||
<el-input-number size="small" v-model="form.passExam" :min="1" clearable placeholder="请输入" :maxlength="200"></el-input-number>
|
||||
<span style="color: #999; padding-left: 10px;">场</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传证书" prop="imageUrl" style="width: 100%;" :rules="[{required: true, message: '请上传证书', trigger: 'change'}]">
|
||||
<ai-uploader
|
||||
:instance="instance"
|
||||
@@ -58,9 +42,7 @@
|
||||
info: {},
|
||||
form: {
|
||||
certificateName: '',
|
||||
content: '',
|
||||
imageUrl: [],
|
||||
certificateType: ''
|
||||
imageUrl: []
|
||||
},
|
||||
id: ''
|
||||
}
|
||||
|
||||
@@ -61,10 +61,7 @@
|
||||
total: 10,
|
||||
colConfigs: [
|
||||
{ prop: 'certificateName', label: '证书名称', align: 'left' },
|
||||
{ prop: 'certificateType', label: '类型', align: 'center', format: v => this.dict.getLabel('qjCertificateType', v) },
|
||||
{ prop: 'issueNumber', label: '已颁发数量', align: 'center' },
|
||||
{ prop: 'studyDuration', label: '累积学习时(分钟)', align: 'center' },
|
||||
{ prop: 'passExam', label: '通过考试', align: 'center' }
|
||||
],
|
||||
tableData: []
|
||||
}
|
||||
|
||||
@@ -13,6 +13,25 @@
|
||||
<el-form-item prop="showIndex" label="排序" :rules="[{required: true, message: '请选择排序', trigger: 'change'}]">
|
||||
<el-input-number size="small" v-model="form.showIndex" :min="0"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item prop="examinationType" label="考试类型" :rules="[{required: true, message: '请选择选题方式', trigger: 'change'}]">
|
||||
<ai-select
|
||||
v-model="form.examinationType"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
:selectList="dict.getDict('qjExaminationType')">
|
||||
</ai-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="examination_duration" v-if="form.examinationType === '1'" label="考试学时" style="width: 100%" :rules="[{required: true, message: '请输入', trigger: 'change'}]">
|
||||
<el-input-number size="small" v-model="form.examination_duration" :min="1"></el-input-number>(分钟)
|
||||
</el-form-item>
|
||||
<el-form-item prop="certificateId" label="关联证书" :rules="[{required: true, message: '请选择关联证书', trigger: 'change'}]">
|
||||
<ai-select
|
||||
v-model="form.certificateId"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
:selectList="certificateList">
|
||||
</ai-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="chooseType" style="width: 100%" label="成绩评核" :rules="[{required: true, message: '请选择成绩评核', trigger: 'change'}]">
|
||||
<div class="type-list">
|
||||
<div class="type-item" v-for="(item, index) in form.assessments" :key="index">
|
||||
@@ -33,14 +52,6 @@
|
||||
<el-radio :label="item.dictValue" :key="item.dictValue" v-for="item in dict.getDict('qjEIChooseType')">{{ item.dictName }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="examinationType" label="考试类型" :rules="[{required: true, message: '请选择选题方式', trigger: 'change'}]">
|
||||
<ai-select
|
||||
v-model="form.examinationType"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
:selectList="dict.getDict('qjExaminationType')">
|
||||
</ai-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="subjectConfigs" style="width: 100%;" label="题目设置" :rules="[{required: true, message: '请选择题目设置', trigger: 'change'}]">
|
||||
<div class="type-list">
|
||||
<div class="choose-item" v-for="(item, index) in form.subjectConfigs" :key="index">
|
||||
@@ -160,6 +171,9 @@
|
||||
form: {
|
||||
examinationName: '',
|
||||
title: '',
|
||||
examination_duration: '',
|
||||
certificateId: '',
|
||||
certificateName: '',
|
||||
examinationType: '',
|
||||
showIndex: '',
|
||||
chooseType: '0',
|
||||
@@ -214,7 +228,8 @@
|
||||
tableData: [],
|
||||
isShow: false,
|
||||
ids: [],
|
||||
sort: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I']
|
||||
sort: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],
|
||||
certificateList: []
|
||||
}
|
||||
},
|
||||
|
||||
@@ -231,6 +246,7 @@
|
||||
|
||||
created () {
|
||||
this.getList()
|
||||
this.getCertificateList()
|
||||
this.dict.load(['qjQBType', 'qjEIChooseType', 'qjEACondition', 'qjEAType', 'qjExaminationType']).then(() => {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
@@ -262,6 +278,23 @@
|
||||
})
|
||||
},
|
||||
|
||||
getCertificateList() {
|
||||
this.instance.post(`/app/appcertificateinfo/list`, null, {
|
||||
params: {
|
||||
...this.search,
|
||||
size: 1000
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.certificateList = res.data.records.map(v => {
|
||||
return {
|
||||
dictName: v.certificateName,
|
||||
dictValue: v.id
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onChange () {
|
||||
this.getList()
|
||||
},
|
||||
@@ -371,7 +404,8 @@
|
||||
|
||||
this.instance.post(`/app/appexaminationinfo/addOrUpdate`, {
|
||||
...this.form,
|
||||
id: this.params.id || ''
|
||||
id: this.params.id || '',
|
||||
certificateName: this.certificateList.filter(v => v.dictValue === this.form.certificateId)[0].dictName
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('提交成功')
|
||||
|
||||
@@ -57,12 +57,12 @@
|
||||
<h2>考试人数</h2>
|
||||
<div class="bottom">
|
||||
<div class="bottom-item">
|
||||
<h3>{{ statisticsKeyData['优秀'] }}</h3>
|
||||
<p>优秀</p>
|
||||
<h3>{{ statisticsKeyData['学富五车'] }}</h3>
|
||||
<p>学富五车</p>
|
||||
</div>
|
||||
<div class="bottom-item">
|
||||
<h3>{{ statisticsKeyData['良好'] }}</h3>
|
||||
<p>良好</p>
|
||||
<h3>{{ statisticsKeyData['才高八斗'] }}</h3>
|
||||
<p>才高八斗</p>
|
||||
</div>
|
||||
<div class="bottom-item">
|
||||
<h3>{{ statisticsKeyData['合格'] }}</h3>
|
||||
@@ -78,12 +78,7 @@
|
||||
<h2>获得证书人数</h2>
|
||||
<div class="bottom">
|
||||
<div class="bottom-item">
|
||||
<h3>{{ statisticsKeyData['学习证书人数'] }}</h3>
|
||||
<p>学习</p>
|
||||
</div>
|
||||
<div class="bottom-item">
|
||||
<h3>{{ statisticsKeyData['考试证书人数'] }}</h3>
|
||||
<p>考试</p>
|
||||
<h3>{{ statisticsKeyData['获得证书人数'] }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user