This commit is contained in:
guochunsi
2026-01-22 13:51:26 +08:00
parent d09130f11b
commit 0ac87d8fc6

View File

@@ -649,10 +649,6 @@
</div> </div>
</template> </template>
<!-- 图片预览-->
<el-dialog title="图片预览" v-model="dialogUploadVisible" append-to-body >
</el-dialog>
</el-dialog> </el-dialog>
</template> </template>
@@ -662,7 +658,6 @@ import { ElNotification } from 'element-plus'
import { Picture } from '@element-plus/icons-vue' import { Picture } from '@element-plus/icons-vue'
import { useMessage, useMessageBox } from '/@/hooks/message' import { useMessage, useMessageBox } from '/@/hooks/message'
import { getObj, putObj, addObj ,makeCorrectScore} from '/@/api/recruit/recruitstudentsignup' import { getObj, putObj, addObj ,makeCorrectScore} from '/@/api/recruit/recruitstudentsignup'
import { list as listByGroupId } from '/@/api/recruit/recruitstudentschool'
import { getList } from "/@/api/recruit/recruitstudentplangroup" import { getList } from "/@/api/recruit/recruitstudentplangroup"
import { listByEdu } from "/@/api/recruit/recruitstudentplan" import { listByEdu } from "/@/api/recruit/recruitstudentplan"
import { getDictsByTypes } from "/@/api/admin/dict" import { getDictsByTypes } from "/@/api/admin/dict"
@@ -671,7 +666,7 @@ import { areaList, areaSonList } from "/@/api/recruit/recruitstudentschool"
import { list as scoreList } from "/@/api/recruit/recruitstudentplancorrectscoreconfig" import { list as scoreList } from "/@/api/recruit/recruitstudentplancorrectscoreconfig"
import { queryAllTeacher } from "/@/api/professional/professionaluser/teacherbase" import { queryAllTeacher } from "/@/api/professional/professionaluser/teacherbase"
import { getNationalList } from "/@/api/basic/basicnation" import { getNationalList } from "/@/api/basic/basicnation"
import { verifyIdCardAll, verifyAdmissionNumber } from '/@/utils/toolsValidate' import { verifyIdCardAll, verifyAdmissionNumber, verifyPhone } from '/@/utils/toolsValidate'
import { AUDIT_STATUS_LIST, getStatusConfig } from '/@/config/global' import { AUDIT_STATUS_LIST, getStatusConfig } from '/@/config/global'
const message = useMessage() const message = useMessage()
@@ -692,7 +687,6 @@ const title = ref("")
const { yes_no_type, sexy, color_discrimination } = useDict('yes_no_type', 'sexy', 'color_discrimination') const { yes_no_type, sexy, color_discrimination } = useDict('yes_no_type', 'sexy', 'color_discrimination')
const eduList = ref<any[]>([]) const eduList = ref<any[]>([])
const imgList = ref<string[]>([])
const type = ref<number | null>(null) const type = ref<number | null>(null)
const isShow = ref(false) const isShow = ref(false)
const isEdit = ref(false) const isEdit = ref(false)
@@ -712,7 +706,6 @@ const areaAreaList = ref<any[]>([])
const areaHomeProvinceList = ref<any[]>([]) const areaHomeProvinceList = ref<any[]>([])
const areaHomeCityList = ref<any[]>([]) const areaHomeCityList = ref<any[]>([])
const areaHomeAreaList = ref<any[]>([]) const areaHomeAreaList = ref<any[]>([])
const dialogUploadVisible = ref(false)
const sevenMajorList = ref<any[]>([]) const sevenMajorList = ref<any[]>([])
const sixMajorList = ref<any[]>([]) const sixMajorList = ref<any[]>([])
const fiveMajorList = ref<any[]>([]) const fiveMajorList = ref<any[]>([])
@@ -801,7 +794,7 @@ const dataForm = reactive({
householdPicList: [] as string[] householdPicList: [] as string[]
}) })
const dataRule = { const dataRule = reactive({
groupId: [ groupId: [
{required: true, message: '招生计划不能为空', trigger: 'change'} {required: true, message: '招生计划不能为空', trigger: 'change'}
], ],
@@ -870,9 +863,6 @@ const dataRule = {
trigger: 'blur' trigger: 'blur'
} }
], ],
otherProvince: [
{required: true, message: '外省不能为空', trigger: 'change'}
],
residenceProvince: [ residenceProvince: [
{required: true, message: '户口所在地不能为空', trigger: 'change'} {required: true, message: '户口所在地不能为空', trigger: 'change'}
], ],
@@ -900,24 +890,19 @@ const dataRule = {
parentName: [ parentName: [
{required: true, message: '家长姓名不能为空', trigger: 'change'} {required: true, message: '家长姓名不能为空', trigger: 'change'}
], ],
parentTel_1: [ parentTelOne: [
{required: true, message: '家长手机不能为空', trigger: 'change'} {required: true, message: '家长手机不能为空', trigger: 'change'},
{
validator: (rule: any, value: any, callback: any) => {
if (value && !verifyPhone(value)) {
callback(new Error('请输入正确的手机号码'))
} else {
callback()
}
},
trigger: 'blur'
}
], ],
// wishMajorOne: [
// {
// validator: (rule: any, value: any, callback: any) => {
// // 新增时不需要验证,修改时需要验证
// if (!dataForm.id) {
// callback()
// } else if (!value) {
// callback(new Error('拟报专业不能为空'))
// } else {
// callback()
// }
// },
// trigger: 'change'
// }
// ],
contactName: [ contactName: [
{required: true, message: '联系人不能为空', trigger: 'change'} {required: true, message: '联系人不能为空', trigger: 'change'}
], ],
@@ -927,7 +912,7 @@ const dataRule = {
correctedScore:[ correctedScore:[
{required: true, message: '折算分不能为空', trigger: 'change'} {required: true, message: '折算分不能为空', trigger: 'change'}
] ]
} })
// 初始化 // 初始化
const init = (id: string | null, typeParam: number) => { const init = (id: string | null, typeParam: number) => {
@@ -1136,12 +1121,6 @@ const changeEducation = () => {
loadMajorListAndGroup() loadMajorListAndGroup()
} }
const handlePicCardPreview = (file: string) => {
const array = file.split(",")
imgList.value = array
dialogUploadVisible.value = true
}
const initData = () => { const initData = () => {
// 联系人(教职工) // 联系人(教职工)
queryAllTeacher().then((res: any) => { queryAllTeacher().then((res: any) => {
@@ -1356,7 +1335,6 @@ const updateTuitionByMajorAndEducation = () => {
const dataFormSubmit = (state: string) => { const dataFormSubmit = (state: string) => {
dataForm.auditStatus = state dataForm.auditStatus = state
let submitTitle = "确认通过该学生的报名申请么?" let submitTitle = "确认通过该学生的报名申请么?"
// 新增模式 // 新增模式
if (!dataForm.id) { if (!dataForm.id) {
submitTitle = "确认保存并提交该学生的报名信息么?" submitTitle = "确认保存并提交该学生的报名信息么?"
@@ -1377,38 +1355,42 @@ const dataFormSubmit = (state: string) => {
} }
} }
if (dataForm.degreeOfEducation == '1' && (dataForm.score == undefined || dataForm.score == '')) { // 清空相关验证规则
ElNotification.error({ dataRule.score = []
title: '错误', dataRule.fullScore = []
message: '初中生报名请填写成绩' dataRule.jsOtherCity = []
}) dataRule.otherProvince = []
return if (dataForm.degreeOfEducation == '1') {
dataRule.score = [
{required: true, message: '初中生报名请填写成绩', trigger: 'change'}
]
if(dataForm.schoolArea){
if(dataForm.schoolArea == '3'){
// 外省外市
dataRule.fullScore = [
{required: true, message: '外地初中生报名请填写当地总分', trigger: 'change'}
]
dataRule.otherProvince = [
{required: true, message: '初中生请选择学校归属地和所在省市', trigger: 'change'}
]
} }
if (dataForm.degreeOfEducation == '1' && dataForm.schoolArea == '3' && (dataForm.fullScore == undefined || dataForm.fullScore == '')) { if(dataForm.schoolArea == '2'){
ElNotification.error({ // 本省外市
title: '错误', dataRule.jsOtherCity = [
message: '外地初中生报名请填写当地总分' {required: true, message: '初中生请选择学校归属地和所在省市', trigger: 'change'}
}) ]
return
} }
if (dataForm.degreeOfEducation == '1' && dataForm.schoolArea == '2' && (dataForm.schoolArea == undefined || dataForm.jsOtherCity == undefined) && state == 20) {
ElNotification.error({
title: '错误',
message: '初中生审核请选择学校归属地和所在省市'
})
return
} }
if (dataForm.degreeOfEducation == '1' && dataForm.schoolArea == '3' && (dataForm.schoolArea == undefined || dataForm.otherProvince == undefined) && state == 20) { }
ElNotification.error({
title: '错误', // 先进行表单验证,验证成功后再弹出确认框
message: '初中生审核请选择学校归属地和所在省市' dataFormRef.value?.validate((valid: boolean) => {
}) if (!valid) {
return return
} }
// 表单验证通过,弹出确认框
messageBox.confirm(submitTitle).then(() => { messageBox.confirm(submitTitle).then(() => {
dataFormRef.value?.validate((valid: boolean) => {
if (valid) {
canSubmit.value = false canSubmit.value = false
if (dataForm.id) { if (dataForm.id) {
// 编辑模式 // 编辑模式
@@ -1429,11 +1411,10 @@ const dataFormSubmit = (state: string) => {
canSubmit.value = true canSubmit.value = true
}) })
} }
}
})
}).catch(() => { }).catch(() => {
// 用户取消 // 用户取消
}) })
})
} }
// 监听招生计划变化(新增模式下需要加载分数线数据) // 监听招生计划变化(新增模式下需要加载分数线数据)