曲靖需求变更
This commit is contained in:
		| @@ -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> | ||||
		Reference in New Issue
	
	Block a user