a7e065e9 by lttnew

自己添加考官

1 parent 2af85581
......@@ -299,7 +299,7 @@ function selectFN(ec) {
}
})
const arr = encodeURIComponent(JSON.stringify(chosen))
let path = `/level/chooseExaminer?type=${form.value.type}&chosen=${arr}&ec=${ec}`
let path = `/level/chooseExaminer?pageType=2&type=${form.value.type}&chosen=${arr}&ec=${ec}`
uni.navigateTo({
url: path
});
......
......@@ -5,7 +5,11 @@
<!-- 顶部添加考官按钮 -->
<view class="add-btn-box">
<button class="btn-red-kx mini" @click="openAddExaminer">
<!-- <button class="btn-red-kx mini" @click="openAddExaminer">
<uni-icons type="personadd" size="14" color="#AD181F"></uni-icons>
选择考官
</button> -->
<button class="btn-red-kx mini" @click="addExaminer">
<uni-icons type="personadd" size="14" color="#AD181F"></uni-icons>
添加考官
</button>
......@@ -113,7 +117,6 @@
ec = option.ec
}
console.log('pageType.value',pageType.value)
getList()
})
onShow(()=> {
......@@ -235,14 +238,16 @@
modalAction = ''
}
}
function addExaminer(){
addForm.value.name = ''
addForm.value.certCode = ''
searchResult.value = null
searchNoData.value = false
addPopup.value.open()
}
// 打开添加考官弹窗
function openAddExaminer() {
// addForm.value.name = ''
// addForm.value.certCode = ''
// searchResult.value = null
// searchNoData.value = false
// addPopup.value.open()
const chosenStr = JSON.stringify(list.value)
uni.navigateTo({
url: `/myCenter/chooseExaminer?memId=${app.globalData.memberInfo.memId}&chosen=${chosenStr}`
......@@ -284,6 +289,15 @@
// 执行添加考官
let pendingAddRow = null
function doAddExaminer(row) {
if(row.canChoose != 1 && pageType.value != 1){
uni.showToast({
title: '该考官资质已过期!',
duration: 3000,
icon: 'none'
})
return
}
pendingAddRow = row
modalAction = 'add'
modalConfig.value = {
......@@ -304,6 +318,8 @@
.add-btn-box {
padding: 20rpx 30rpx;
display: flex;
justify-content: space-between;
.btn-red-kx {
width: 100%;
......
......@@ -37,7 +37,7 @@ import {ref} from 'vue'
import { onLoad ,onShow} from '@dcloudio/uni-app'
import * as api from '@/common/api.js'
import config from '@/config.js'
const app = getApp();
const loading = ref(true)
const infoList = ref([])
const chosen = ref([])
......@@ -58,7 +58,7 @@ console.log('222',chosen.value)
async function getList() {
loading.value = true
try {
const res = await api.listApi({chooseFlag: 1})
const res = await api.listApi({memId: app.globalData.memberInfo.memId})
infoList.value = res.rows || []
} catch (err) {
console.error('获取考官列表失败:', err)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!