Merge remote-tracking branch 'origin/master'
Showing
3 changed files
with
27 additions
and
11 deletions
| ... | @@ -299,7 +299,7 @@ function selectFN(ec) { | ... | @@ -299,7 +299,7 @@ function selectFN(ec) { |
| 299 | } | 299 | } |
| 300 | }) | 300 | }) |
| 301 | const arr = encodeURIComponent(JSON.stringify(chosen)) | 301 | const arr = encodeURIComponent(JSON.stringify(chosen)) |
| 302 | let path = `/level/chooseExaminer?type=${form.value.type}&chosen=${arr}&ec=${ec}` | 302 | let path = `/level/chooseExaminer?pageType=2&type=${form.value.type}&chosen=${arr}&ec=${ec}` |
| 303 | uni.navigateTo({ | 303 | uni.navigateTo({ |
| 304 | url: path | 304 | url: path |
| 305 | }); | 305 | }); | ... | ... |
| ... | @@ -5,7 +5,11 @@ | ... | @@ -5,7 +5,11 @@ |
| 5 | 5 | ||
| 6 | <!-- 顶部添加考官按钮 --> | 6 | <!-- 顶部添加考官按钮 --> |
| 7 | <view class="add-btn-box"> | 7 | <view class="add-btn-box"> |
| 8 | <button class="btn-red-kx mini" @click="openAddExaminer"> | 8 | <!-- <button class="btn-red-kx mini" @click="openAddExaminer"> |
| 9 | <uni-icons type="personadd" size="14" color="#AD181F"></uni-icons> | ||
| 10 | 选择考官 | ||
| 11 | </button> --> | ||
| 12 | <button class="btn-red-kx mini" @click="addExaminer"> | ||
| 9 | <uni-icons type="personadd" size="14" color="#AD181F"></uni-icons> | 13 | <uni-icons type="personadd" size="14" color="#AD181F"></uni-icons> |
| 10 | 添加考官 | 14 | 添加考官 |
| 11 | </button> | 15 | </button> |
| ... | @@ -113,7 +117,6 @@ | ... | @@ -113,7 +117,6 @@ |
| 113 | ec = option.ec | 117 | ec = option.ec |
| 114 | } | 118 | } |
| 115 | 119 | ||
| 116 | console.log('pageType.value',pageType.value) | ||
| 117 | getList() | 120 | getList() |
| 118 | }) | 121 | }) |
| 119 | onShow(()=> { | 122 | onShow(()=> { |
| ... | @@ -235,14 +238,16 @@ | ... | @@ -235,14 +238,16 @@ |
| 235 | modalAction = '' | 238 | modalAction = '' |
| 236 | } | 239 | } |
| 237 | } | 240 | } |
| 238 | 241 | function addExaminer(){ | |
| 242 | addForm.value.name = '' | ||
| 243 | addForm.value.certCode = '' | ||
| 244 | searchResult.value = null | ||
| 245 | searchNoData.value = false | ||
| 246 | addPopup.value.open() | ||
| 247 | } | ||
| 239 | // 打开添加考官弹窗 | 248 | // 打开添加考官弹窗 |
| 240 | function openAddExaminer() { | 249 | function openAddExaminer() { |
| 241 | // addForm.value.name = '' | 250 | |
| 242 | // addForm.value.certCode = '' | ||
| 243 | // searchResult.value = null | ||
| 244 | // searchNoData.value = false | ||
| 245 | // addPopup.value.open() | ||
| 246 | const chosenStr = JSON.stringify(list.value) | 251 | const chosenStr = JSON.stringify(list.value) |
| 247 | uni.navigateTo({ | 252 | uni.navigateTo({ |
| 248 | url: `/myCenter/chooseExaminer?memId=${app.globalData.memberInfo.memId}&chosen=${chosenStr}` | 253 | url: `/myCenter/chooseExaminer?memId=${app.globalData.memberInfo.memId}&chosen=${chosenStr}` |
| ... | @@ -284,6 +289,15 @@ | ... | @@ -284,6 +289,15 @@ |
| 284 | // 执行添加考官 | 289 | // 执行添加考官 |
| 285 | let pendingAddRow = null | 290 | let pendingAddRow = null |
| 286 | function doAddExaminer(row) { | 291 | function doAddExaminer(row) { |
| 292 | |||
| 293 | if(row.canChoose != 1 && pageType.value != 1){ | ||
| 294 | uni.showToast({ | ||
| 295 | title: '该考官资质已过期!', | ||
| 296 | duration: 3000, | ||
| 297 | icon: 'none' | ||
| 298 | }) | ||
| 299 | return | ||
| 300 | } | ||
| 287 | pendingAddRow = row | 301 | pendingAddRow = row |
| 288 | modalAction = 'add' | 302 | modalAction = 'add' |
| 289 | modalConfig.value = { | 303 | modalConfig.value = { |
| ... | @@ -304,6 +318,8 @@ | ... | @@ -304,6 +318,8 @@ |
| 304 | 318 | ||
| 305 | .add-btn-box { | 319 | .add-btn-box { |
| 306 | padding: 20rpx 30rpx; | 320 | padding: 20rpx 30rpx; |
| 321 | display: flex; | ||
| 322 | justify-content: space-between; | ||
| 307 | 323 | ||
| 308 | .btn-red-kx { | 324 | .btn-red-kx { |
| 309 | width: 100%; | 325 | width: 100%; | ... | ... |
| ... | @@ -37,7 +37,7 @@ import {ref} from 'vue' | ... | @@ -37,7 +37,7 @@ import {ref} from 'vue' |
| 37 | import { onLoad ,onShow} from '@dcloudio/uni-app' | 37 | import { onLoad ,onShow} from '@dcloudio/uni-app' |
| 38 | import * as api from '@/common/api.js' | 38 | import * as api from '@/common/api.js' |
| 39 | import config from '@/config.js' | 39 | import config from '@/config.js' |
| 40 | 40 | const app = getApp(); | |
| 41 | const loading = ref(true) | 41 | const loading = ref(true) |
| 42 | const infoList = ref([]) | 42 | const infoList = ref([]) |
| 43 | const chosen = ref([]) | 43 | const chosen = ref([]) |
| ... | @@ -58,7 +58,7 @@ console.log('222',chosen.value) | ... | @@ -58,7 +58,7 @@ console.log('222',chosen.value) |
| 58 | async function getList() { | 58 | async function getList() { |
| 59 | loading.value = true | 59 | loading.value = true |
| 60 | try { | 60 | try { |
| 61 | const res = await api.listApi({chooseFlag: 1}) | 61 | const res = await api.listApi({memId: app.globalData.memberInfo.memId}) |
| 62 | infoList.value = res.rows || [] | 62 | infoList.value = res.rows || [] |
| 63 | } catch (err) { | 63 | } catch (err) { |
| 64 | console.error('获取考官列表失败:', err) | 64 | console.error('获取考官列表失败:', err) | ... | ... |
-
Please register or sign in to post a comment