a
This commit is contained in:
@@ -97,6 +97,10 @@ service.interceptors.request.use(
|
||||
*/
|
||||
const handleResponse = (response: AxiosResponse<any>) => {
|
||||
if (response.data.code === 1) {
|
||||
// 业务错误,统一弹出错误提示
|
||||
if (response.data.msg) {
|
||||
useMessage().error(response.data.msg);
|
||||
}
|
||||
throw response.data;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,14 +39,9 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="证件类型" prop="idCardType">
|
||||
<el-select v-model="dataForm.idCardType" filterable placeholder="请选择证件类型" class="w-full" :disabled="!isEdit">
|
||||
<el-option
|
||||
v-for="item in idCardTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-radio-group v-model="dataForm.idCardType" :disabled="!isEdit">
|
||||
<el-radio v-for="item in idCardTypeList" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -668,7 +663,7 @@
|
||||
import { ref, reactive, nextTick, watch, computed } from 'vue'
|
||||
import { ElNotification } from 'element-plus'
|
||||
import { Picture } from '@element-plus/icons-vue'
|
||||
import { useMessageBox } from '/@/hooks/message'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { getObj, putObj, addObj ,makeCorrectScore} from '/@/api/recruit/recruitstudentsignup'
|
||||
import { list as listByGroupId } from '/@/api/recruit/recruitstudentschool'
|
||||
import { getList } from "/@/api/recruit/recruitstudentplangroup"
|
||||
@@ -681,8 +676,8 @@ import { queryAllTeacher } from "/@/api/professional/professionaluser/teacherbas
|
||||
import { getNationalList } from "/@/api/basic/basicnation"
|
||||
import { verifyIdCardAll, verifyAdmissionNumber } from '/@/utils/toolsValidate'
|
||||
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'refreshDataList'): void
|
||||
@@ -796,7 +791,7 @@ const dataForm = reactive({
|
||||
jsOtherCity:"",
|
||||
householdPic:"",
|
||||
otherProvince:"",
|
||||
idCardType:"",
|
||||
idCardType:"0",
|
||||
scorePhotoList: [] as string[],
|
||||
graPicList: [] as string[],
|
||||
yyPicList: [] as string[],
|
||||
@@ -833,6 +828,9 @@ const dataRule = {
|
||||
residenceType: [
|
||||
{required: true, message: '户口性质不能为空', trigger: 'change'}
|
||||
],
|
||||
idCardType: [
|
||||
{required: true, message: '证件类型不能为空', trigger: 'change'}
|
||||
],
|
||||
idNumber: [
|
||||
{required: true, message: '身份证不能为空', trigger: 'change'},
|
||||
{
|
||||
@@ -1391,34 +1389,18 @@ const dataFormSubmit = (state: string) => {
|
||||
if (dataForm.id) {
|
||||
// 编辑模式
|
||||
putObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '操作成功'
|
||||
})
|
||||
message.success('操作成功')
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch((e: any) => {
|
||||
ElNotification.error({
|
||||
title: '错误',
|
||||
message: e || '操作失败'
|
||||
})
|
||||
}).finally(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
} else {
|
||||
// 新增模式
|
||||
addObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '新增成功'
|
||||
})
|
||||
message.success('新增成功')
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch((e: any) => {
|
||||
ElNotification.error({
|
||||
title: '错误',
|
||||
message: e || '新增失败'
|
||||
})
|
||||
}).finally(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user