考点审核
Showing
3 changed files
with
168 additions
and
150 deletions
| 1 | // dev | 1 | // dev |
| 2 | // const baseUrl_api = 'http://192.168.1.125:8787' | 2 | // const baseUrl_api = 'http://192.168.1.125:8787' |
| 3 | const baseUrl_api = 'https://tk001.wxjylt.com/stage-api/' | 3 | const baseUrl_api = 'https://tk001.wxjylt.com/stage-api/' |
| 4 | const loginImage_api = 'http://tk001.wxjylt.com/stage-api' | 4 | const loginImage_api = 'https://tk001.wxjylt.com/stage-api' |
| 5 | const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do' | 5 | const payUrl = 'https://wxpay.cmbc.com.cn/mobilePlatform/appserver/lcbpPay.do' |
| 6 | 6 | ||
| 7 | // prod | 7 | // prod | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <view class="container"> | 2 | <view class="container"> |
| 3 | <!-- 自定义弹窗 --> | 3 | <!-- 自定义弹窗 --> |
| 4 | <custom-modal ref="customModalRef" :title="modalConfig.title" :content="modalConfig.content" :showCancel="modalConfig.showCancel" :cancelText="modalConfig.cancelText" :confirmText="modalConfig.confirmText" @confirm="onModalConfirm" /> | 4 | <custom-modal ref="customModalRef" :cancelText="modalConfig.cancelText" :confirmText="modalConfig.confirmText" |
| 5 | 5 | :content="modalConfig.content" :showCancel="modalConfig.showCancel" | |
| 6 | :title="modalConfig.title" @confirm="onModalConfirm"/> | ||
| 7 | |||
| 6 | <!-- 考官选择类型 --> | 8 | <!-- 考官选择类型 --> |
| 7 | <!-- <view class="radio-section"> | 9 | <!-- <view class="radio-section"> |
| 8 | <radio-group class="radio-group" @change="onSelfSelectChange"> | 10 | <radio-group class="radio-group" @change="onSelfSelectChange"> |
| ... | @@ -16,23 +18,28 @@ | ... | @@ -16,23 +18,28 @@ |
| 16 | </label> | 18 | </label> |
| 17 | </radio-group> | 19 | </radio-group> |
| 18 | </view> --> | 20 | </view> --> |
| 19 | 21 | ||
| 20 | <!-- 温馨提示 --> | 22 | <!-- 温馨提示 --> |
| 21 | <view v-if="form.selfSelect == '1'" class="tip-box"> | 23 | <view v-if="form.selfSelect == '1'" class="tip-box"> |
| 22 | <text class="tip-text">温馨提示: 您可以自行录入考官信息,如果暂时没有合适的考官,也可以选择由省跆协指派(支持多选)进行考点申报,同时请尽快完成考点考官的认证。</text> | 24 | <text class="tip-text">温馨提示: |
| 25 | 您可以自行录入考官信息,如果暂时没有合适的考官,也可以选择由省跆协指派(支持多选)进行考点申报,同时请尽快完成考点考官的认证。 | ||
| 26 | </text> | ||
| 23 | </view> | 27 | </view> |
| 24 | 28 | ||
| 25 | <!-- 省跆协指派提示 --> | 29 | <!-- 省跆协指派提示 --> |
| 26 | <view v-if="form.selfSelect == '0'" class="tip-box"> | 30 | <view v-if="form.selfSelect == '0'" class="tip-box"> |
| 27 | <text class="tip-text">温馨提示:关于考官指派,请联系{{ shenForm.baseName || '' }},联系电话:{{ shenForm.phone || '' }}</text> | 31 | <text class="tip-text">温馨提示:关于考官指派,请联系{{ shenForm.baseName || '' }},联系电话:{{ |
| 32 | shenForm.phone || '' | ||
| 33 | }} | ||
| 34 | </text> | ||
| 28 | </view> | 35 | </view> |
| 29 | 36 | ||
| 30 | <view class="section"> | 37 | <view class="section"> |
| 31 | <!-- 自行录入考官区域 --> | 38 | <!-- 自行录入考官区域 --> |
| 32 | <view v-if="form.selfSelect == '1'" class="section examiner-section"> | 39 | <view v-if="form.selfSelect == '1'" class="section examiner-section"> |
| 33 | <button class="add-btn" @click="handelAddExamine">+ 添加考官</button> | 40 | <button class="add-btn" @click="handelAddExamine">+ 添加考官</button> |
| 34 | </view> | 41 | </view> |
| 35 | 42 | ||
| 36 | <view v-if="form.selfSelect == '1'" class="examiner-list"> | 43 | <view v-if="form.selfSelect == '1'" class="examiner-list"> |
| 37 | <view v-for="(item, index) in list" :key="item.id" class="examiner-item"> | 44 | <view v-for="(item, index) in list" :key="item.id" class="examiner-item"> |
| 38 | <view class="info"> | 45 | <view class="info"> |
| ... | @@ -56,6 +63,7 @@ import {ref} from 'vue' | ... | @@ -56,6 +63,7 @@ import {ref} from 'vue' |
| 56 | import {onLoad, onShow} from '@dcloudio/uni-app' | 63 | import {onLoad, onShow} from '@dcloudio/uni-app' |
| 57 | import * as api from '@/common/api.js' | 64 | import * as api from '@/common/api.js' |
| 58 | import customModal from '@/components/custom-modal.vue' | 65 | import customModal from '@/components/custom-modal.vue' |
| 66 | |||
| 59 | const app = getApp(); | 67 | const app = getApp(); |
| 60 | const form = ref({ | 68 | const form = ref({ |
| 61 | selfSelect: '1' // 1:自行录入 0:省跆协指派 | 69 | selfSelect: '1' // 1:自行录入 0:省跆协指派 |
| ... | @@ -85,7 +93,7 @@ onLoad((option) => { | ... | @@ -85,7 +93,7 @@ onLoad((option) => { |
| 85 | 93 | ||
| 86 | onShow(() => { | 94 | onShow(() => { |
| 87 | // if (memId.value) { | 95 | // if (memId.value) { |
| 88 | getExaminer() | 96 | getExaminer() |
| 89 | // } | 97 | // } |
| 90 | getShenMemberInfoFn() | 98 | getShenMemberInfoFn() |
| 91 | }) | 99 | }) |
| ... | @@ -147,7 +155,7 @@ async function handelSubmit() { | ... | @@ -147,7 +155,7 @@ async function handelSubmit() { |
| 147 | if (form.value.selfSelect == '1' && list.value.length == 0) { | 155 | if (form.value.selfSelect == '1' && list.value.length == 0) { |
| 148 | return uni.showToast({title: '请添加考官', icon: 'none'}) | 156 | return uni.showToast({title: '请添加考官', icon: 'none'}) |
| 149 | } | 157 | } |
| 150 | 158 | ||
| 151 | modalAction = 'success' | 159 | modalAction = 'success' |
| 152 | modalConfig.value = { | 160 | modalConfig.value = { |
| 153 | title: '提示', | 161 | title: '提示', |
| ... | @@ -187,7 +195,7 @@ async function onModalConfirm() { | ... | @@ -187,7 +195,7 @@ async function onModalConfirm() { |
| 187 | } else if (modalAction === 'submitSuccess') { | 195 | } else if (modalAction === 'submitSuccess') { |
| 188 | uni.navigateBack() | 196 | uni.navigateBack() |
| 189 | } | 197 | } |
| 190 | modalAction = '' | 198 | // modalAction = '' |
| 191 | } | 199 | } |
| 192 | 200 | ||
| 193 | function confirmApply() { | 201 | function confirmApply() { | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <view class="exam-point-list"> | 2 | <view class="exam-point-list"> |
| 3 | <!-- 顶部申请按钮 --> | 3 | <!-- 顶部申请按钮 --> |
| 4 | <view class="apply-btn-box"> | 4 | <view class="apply-btn-box"> |
| 5 | <button class="apply-btn" :disabled="memberInfo.isPoints==0||formInfo.auditStatus==2||formInfo.auditStatus==1" @click="goApply">申请考点</button> | 5 | <button :disabled="memberInfo.isPoints==0||formInfo.auditStatus==2||formInfo.auditStatus==1" class="apply-btn" |
| 6 | </view> | 6 | @click="goApply">申请考点 |
| 7 | 7 | </button> | |
| 8 | <!-- 列表 --> | 8 | </view> |
| 9 | <view class="list-content"> | 9 | |
| 10 | <view v-if="list.length === 0 && !loading" class="empty-tip"> | 10 | <!-- 列表 --> |
| 11 | <text>暂无申请记录</text> | 11 | <view class="list-content"> |
| 12 | </view> | 12 | <view v-if="list.length === 0 && !loading" class="empty-tip"> |
| 13 | 13 | <text>暂无申请记录</text> | |
| 14 | <view | 14 | </view> |
| 15 | v-for="(item, index) in list" | 15 | |
| 16 | :key="index" | 16 | <view |
| 17 | class="list-item" | 17 | v-for="(item, index) in list" |
| 18 | :class="{ 'success-row': item.shenAuditStatus == 2 }" | 18 | :key="index" |
| 19 | > | 19 | :class="{ 'success-row': item.shenAuditStatus == 2 }" |
| 20 | <view class="item-row"> | 20 | class="list-item" |
| 21 | <text class="item-label">审核协会</text> | 21 | > |
| 22 | <text class="item-value">{{ item.auditDeptName || '-' }}</text> | 22 | <view class="item-row"> |
| 23 | </view> | 23 | <text class="item-label">审核协会</text> |
| 24 | <view class="item-row"> | 24 | <text class="item-value">{{ item.auditDeptName || '-' }}</text> |
| 25 | <text class="item-label">审核日期</text> | 25 | </view> |
| 26 | <text class="item-value">{{ formatDate(item.auditTime) }}</text> | 26 | <view class="item-row"> |
| 27 | </view> | 27 | <text class="item-label">审核日期</text> |
| 28 | <view class="item-row"> | 28 | <text class="item-value">{{ formatDate(item.auditTime) }}</text> |
| 29 | <text class="item-label">审核状态</text> | 29 | </view> |
| 30 | <text class="item-status" :class="getStatusClass(item.auditResult)"> | 30 | <view class="item-row"> |
| 31 | {{ item.auditResult == 0 ? '审核未通过' : '审核通过' }} | 31 | <text class="item-label">审核状态</text> |
| 32 | </text> | 32 | <text :class="getStatusClass(item.auditResult)" class="item-status"> |
| 33 | </view> | 33 | {{ item.auditResult == 1 ? '审核通过' : item.auditResult == 0 ? '审核拒绝' : '待审核' }} |
| 34 | <view class="item-row"> | 34 | </text> |
| 35 | <text class="item-label">理由</text> | 35 | </view> |
| 36 | <text class="item-value">{{ item.auditMsg ? item.auditMsg : '/' }}</text> | 36 | <view class="item-row"> |
| 37 | </view> | 37 | <text class="item-label">理由</text> |
| 38 | </view> | 38 | <text class="item-value">{{ item.auditMsg ? item.auditMsg : '/' }}</text> |
| 39 | 39 | </view> | |
| 40 | <view v-if="loading" class="loading-tip"> | 40 | </view> |
| 41 | <text>加载中...</text> | 41 | |
| 42 | </view> | 42 | <view v-if="loading" class="loading-tip"> |
| 43 | 43 | <text>加载中...</text> | |
| 44 | <view v-if="noMore && list.length > 0" class="no-more-tip"> | 44 | </view> |
| 45 | <text>没有更多了</text> | 45 | |
| 46 | </view> | 46 | <view v-if="noMore && list.length > 0" class="no-more-tip"> |
| 47 | </view> | 47 | <text>没有更多了</text> |
| 48 | </view> | 48 | </view> |
| 49 | </view> | ||
| 50 | </view> | ||
| 49 | </template> | 51 | </template> |
| 50 | 52 | ||
| 51 | <script setup> | 53 | <script setup> |
| 52 | import { ref } from 'vue' | 54 | import {ref} from 'vue' |
| 53 | import { onLoad, onReachBottom } from '@dcloudio/uni-app' | 55 | import {onLoad, onReachBottom} from '@dcloudio/uni-app' |
| 54 | import { getMyRecentExam } from '@/common/api' | 56 | import {getMyRecentExam} from '@/common/api' |
| 57 | import {onShow} from "@/unpackage/dist/dev/mp-weixin/common/vendor"; | ||
| 58 | |||
| 55 | const app = getApp() | 59 | const app = getApp() |
| 56 | const list = ref([]) | 60 | const list = ref([]) |
| 57 | const loading = ref(false) | 61 | const loading = ref(false) |
| ... | @@ -60,155 +64,161 @@ const pageNum = ref(1) | ... | @@ -60,155 +64,161 @@ const pageNum = ref(1) |
| 60 | const pageSize = ref(10) | 64 | const pageSize = ref(10) |
| 61 | const memberInfo = app.globalData.memberInfo | 65 | const memberInfo = app.globalData.memberInfo |
| 62 | const formInfo = ref({}) | 66 | const formInfo = ref({}) |
| 67 | |||
| 68 | onShow(() => { | ||
| 69 | loadData() | ||
| 70 | }) | ||
| 71 | |||
| 63 | onLoad(() => { | 72 | onLoad(() => { |
| 64 | loadData() | 73 | loadData() |
| 65 | }) | 74 | }) |
| 66 | 75 | ||
| 67 | function loadData() { | 76 | function loadData() { |
| 68 | if (loading.value) return | 77 | if (loading.value) return |
| 69 | loading.value = true | 78 | loading.value = true |
| 70 | 79 | ||
| 71 | getMyRecentExam().then(res => { | 80 | getMyRecentExam().then(res => { |
| 72 | formInfo.value = res.data | 81 | formInfo.value = res.data |
| 73 | if (res.data && res.data.auditLogs) { | 82 | if (res.data && res.data.auditLogs) { |
| 74 | try { | 83 | try { |
| 75 | list.value = JSON.parse(res.data.auditLogs) | 84 | list.value = JSON.parse(res.data.auditLogs) |
| 76 | } catch (e) { | 85 | } catch (e) { |
| 77 | list.value = [] | 86 | list.value = [] |
| 78 | } | 87 | } |
| 79 | } else { | 88 | } else { |
| 80 | list.value = [] | 89 | list.value = [] |
| 81 | } | 90 | } |
| 82 | }).finally(() => { | 91 | }).finally(() => { |
| 83 | loading.value = false | 92 | loading.value = false |
| 84 | }) | 93 | }) |
| 85 | } | 94 | } |
| 86 | 95 | ||
| 87 | onReachBottom(() => { | 96 | onReachBottom(() => { |
| 88 | if (!noMore.value) { | 97 | if (!noMore.value) { |
| 89 | pageNum.value++ | 98 | pageNum.value++ |
| 90 | loadData() | 99 | loadData() |
| 91 | } | 100 | } |
| 92 | }) | 101 | }) |
| 93 | 102 | ||
| 94 | function goApply() { | 103 | function goApply() { |
| 95 | uni.navigateTo({ | 104 | uni.navigateTo({ |
| 96 | url: '/pages/index/notice-examPointApply' | 105 | url: '/pages/index/notice-examPointApply' |
| 97 | }) | 106 | }) |
| 98 | } | 107 | } |
| 99 | 108 | ||
| 100 | 109 | ||
| 101 | function getStatusClass(status) { | 110 | function getStatusClass(status) { |
| 102 | return { | 111 | return { |
| 103 | 'status-1': status == 0, | 112 | 'status-2': status == 1, |
| 104 | 'status-2': status != 0, | 113 | 'status-1': status == 0, |
| 105 | } | 114 | } |
| 106 | } | 115 | } |
| 107 | 116 | ||
| 108 | function formatDate(dateStr) { | 117 | function formatDate(dateStr) { |
| 109 | if (!dateStr) return '-' | 118 | if (!dateStr) return '-' |
| 110 | const date = new Date(dateStr) | 119 | const date = new Date(dateStr) |
| 111 | const year = date.getFullYear() | 120 | const year = date.getFullYear() |
| 112 | const month = String(date.getMonth() + 1).padStart(2, '0') | 121 | const month = String(date.getMonth() + 1).padStart(2, '0') |
| 113 | const day = String(date.getDate()).padStart(2, '0') | 122 | const day = String(date.getDate()).padStart(2, '0') |
| 114 | return `${year}-${month}-${day}` | 123 | return `${year}-${month}-${day}` |
| 115 | } | 124 | } |
| 116 | </script> | 125 | </script> |
| 117 | 126 | ||
| 118 | <style lang="scss" scoped> | 127 | <style lang="scss" scoped> |
| 119 | .exam-point-list { | 128 | .exam-point-list { |
| 120 | min-height: 100vh; | 129 | min-height: 100vh; |
| 121 | background: #f5f5f5; | 130 | background: #f5f5f5; |
| 122 | } | 131 | } |
| 123 | 132 | ||
| 124 | .apply-btn-box { | 133 | .apply-btn-box { |
| 125 | padding: 20rpx 30rpx; | 134 | padding: 20rpx 30rpx; |
| 126 | } | 135 | } |
| 127 | 136 | ||
| 128 | .apply-btn { | 137 | .apply-btn { |
| 129 | width: 100%; | 138 | width: 100%; |
| 130 | height: 80rpx; | 139 | height: 80rpx; |
| 131 | line-height: 80rpx; | 140 | line-height: 80rpx; |
| 132 | background: #C4121B; | 141 | background: #C4121B; |
| 133 | color: #fff; | 142 | color: #fff; |
| 134 | font-size: 28rpx; | 143 | font-size: 28rpx; |
| 135 | border-radius: 44rpx; | 144 | border-radius: 44rpx; |
| 136 | border: none; | 145 | border: none; |
| 137 | 146 | ||
| 138 | &::after { | 147 | &::after { |
| 139 | border: none; | 148 | border: none; |
| 140 | } | 149 | } |
| 141 | 150 | ||
| 142 | &[disabled] { | 151 | &[disabled] { |
| 143 | background: #f3d4d5 !important; | 152 | background: #f3d4d5 !important; |
| 144 | color: #b7b5b5 !important; | 153 | color: #b7b5b5 !important; |
| 145 | border: 2rpx solid #e0e0e0 !important; | 154 | border: 2rpx solid #e0e0e0 !important; |
| 146 | opacity: 1; | 155 | opacity: 1; |
| 147 | } | 156 | } |
| 148 | } | 157 | } |
| 158 | |||
| 149 | .list-content { | 159 | .list-content { |
| 150 | padding: 0 20rpx 20rpx; | 160 | padding: 0 20rpx 20rpx; |
| 151 | } | 161 | } |
| 152 | 162 | ||
| 153 | .empty-tip, | 163 | .empty-tip, |
| 154 | .loading-tip, | 164 | .loading-tip, |
| 155 | .no-more-tip { | 165 | .no-more-tip { |
| 156 | text-align: center; | 166 | text-align: center; |
| 157 | padding: 60rpx 0; | 167 | padding: 60rpx 0; |
| 158 | color: #999; | 168 | color: #999; |
| 159 | font-size: 26rpx; | 169 | font-size: 26rpx; |
| 160 | } | 170 | } |
| 161 | 171 | ||
| 162 | .list-item { | 172 | .list-item { |
| 163 | background: #fff; | 173 | background: #fff; |
| 164 | border-radius: 16rpx; | 174 | border-radius: 16rpx; |
| 165 | padding: 24rpx; | 175 | padding: 24rpx; |
| 166 | margin-bottom: 20rpx; | 176 | margin-bottom: 20rpx; |
| 167 | } | 177 | } |
| 168 | 178 | ||
| 169 | .list-item.success-row { | 179 | .list-item.success-row { |
| 170 | border-left: 6rpx solid #19be6b; | 180 | border-left: 6rpx solid #19be6b; |
| 171 | } | 181 | } |
| 172 | 182 | ||
| 173 | .item-row { | 183 | .item-row { |
| 174 | display: flex; | 184 | display: flex; |
| 175 | margin-bottom: 16rpx; | 185 | margin-bottom: 16rpx; |
| 176 | 186 | ||
| 177 | &:last-child { | 187 | &:last-child { |
| 178 | margin-bottom: 0; | 188 | margin-bottom: 0; |
| 179 | } | 189 | } |
| 180 | } | 190 | } |
| 181 | 191 | ||
| 182 | .item-label { | 192 | .item-label { |
| 183 | width: 140rpx; | 193 | width: 140rpx; |
| 184 | font-size: 26rpx; | 194 | font-size: 26rpx; |
| 185 | color: #999; | 195 | color: #999; |
| 186 | } | 196 | } |
| 187 | 197 | ||
| 188 | .item-value { | 198 | .item-value { |
| 189 | flex: 1; | 199 | flex: 1; |
| 190 | font-size: 26rpx; | 200 | font-size: 26rpx; |
| 191 | color: #333; | 201 | color: #333; |
| 192 | } | 202 | } |
| 193 | 203 | ||
| 194 | .item-status { | 204 | .item-status { |
| 195 | font-size: 26rpx; | 205 | font-size: 26rpx; |
| 196 | padding: 4rpx 16rpx; | 206 | padding: 4rpx 16rpx; |
| 197 | border-radius: 20rpx; | 207 | border-radius: 20rpx; |
| 198 | } | 208 | } |
| 199 | 209 | ||
| 200 | .status-1 { | 210 | .status-1 { |
| 201 | background: #fff7e6; | 211 | background: #fff7e6; |
| 202 | color: #fa8c16; | 212 | color: #fa8c16; |
| 203 | } | 213 | } |
| 204 | 214 | ||
| 205 | .status-2 { | 215 | .status-2 { |
| 206 | background: #e6fff7; | 216 | background: #e6fff7; |
| 207 | color: #52c41a; | 217 | color: #52c41a; |
| 208 | } | 218 | } |
| 209 | 219 | ||
| 210 | .status-3 { | 220 | .status-3 { |
| 211 | background: #fff1f0; | 221 | background: #fff1f0; |
| 212 | color: #ff4d4f; | 222 | color: #ff4d4f; |
| 213 | } | 223 | } |
| 214 | </style> | 224 | </style> | ... | ... |
-
Please register or sign in to post a comment