a
This commit is contained in:
@@ -129,7 +129,7 @@ const getTabStaticDataList = async () => {
|
||||
tableData.value = []
|
||||
dataListLoading.value = true
|
||||
const response = await getTabStaticDataListApi(queryForm)
|
||||
tableData.value = response.data.data || []
|
||||
tableData.value = response.data || []
|
||||
} catch (error) {
|
||||
console.error('获取统计数据失败', error)
|
||||
} finally {
|
||||
@@ -151,7 +151,7 @@ const resetQuery = () => {
|
||||
const init = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
planList.value = data.data.data || []
|
||||
planList.value = data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
getTabStaticDataList()
|
||||
|
||||
@@ -154,7 +154,7 @@ const init = async () => {
|
||||
const getGradeData = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
gradeList.value = data.data.data || []
|
||||
gradeList.value = data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取入学年份失败', error)
|
||||
}
|
||||
@@ -164,7 +164,7 @@ const getGradeData = async () => {
|
||||
const getDeptData = async () => {
|
||||
try {
|
||||
const data = await getDeptList()
|
||||
deptList.value = data.data.data || []
|
||||
deptList.value = data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取学院列表失败', error)
|
||||
}
|
||||
@@ -174,7 +174,7 @@ const getDeptData = async () => {
|
||||
const getClassData = async () => {
|
||||
try {
|
||||
const data = await getClasslist()
|
||||
classData.value = data.data.data || []
|
||||
classData.value = data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取班级列表失败', error)
|
||||
}
|
||||
@@ -185,7 +185,7 @@ const getList = async () => {
|
||||
try {
|
||||
tableLoading.value = true
|
||||
const response = await getDataStatistics(queryForm)
|
||||
tableData.value = response.data.data || []
|
||||
tableData.value = response.data || []
|
||||
} catch (error) {
|
||||
console.error('获取数据失败', error)
|
||||
} finally {
|
||||
|
||||
@@ -120,7 +120,7 @@ const init = async (formData: any, pageData: any) => {
|
||||
|
||||
try {
|
||||
const data = await getTypeValue('check_in_status')
|
||||
checkInStatusData.value = data.data.data || []
|
||||
checkInStatusData.value = data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取字典数据失败', error)
|
||||
}
|
||||
|
||||
@@ -361,8 +361,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await backSchoolStuPage(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
records: response.data.records,
|
||||
total: response.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -383,7 +383,7 @@ const chanMajor = async () => {
|
||||
const getMajorList = async (groupId: string) => {
|
||||
try {
|
||||
const data = await planMajor({ groupId })
|
||||
planMajorList.value = data.data.data || []
|
||||
planMajorList.value = data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取专业列表失败', error)
|
||||
}
|
||||
@@ -394,15 +394,15 @@ const init = async () => {
|
||||
try {
|
||||
// 查询报到状态字典
|
||||
const dictData = await getTypeValue('check_in_status')
|
||||
backSchoolStateList.value = dictData.data.data || []
|
||||
backSchoolStateList.value = dictData.data || []
|
||||
|
||||
// 查询二级学院信息
|
||||
const deptData = await getDeptList()
|
||||
deptList.value = deptData.data.data || []
|
||||
deptList.value = deptData.data || []
|
||||
|
||||
// 获取招生计划列表
|
||||
const planData = await list()
|
||||
planList.value = planData.data.data || []
|
||||
planList.value = planData.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
await getMajorList(queryForm.groupId)
|
||||
|
||||
@@ -174,8 +174,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
})
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
records: response.data.records,
|
||||
total: response.data.total
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ const init = async () => {
|
||||
const getGradeData = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
gradeList.value = data.data.data || []
|
||||
gradeList.value = data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取入学年份失败', error)
|
||||
}
|
||||
@@ -164,7 +164,7 @@ const getGradeData = async () => {
|
||||
const getDeptData = async () => {
|
||||
try {
|
||||
const data = await getDeptList()
|
||||
deptList.value = data.data.data || []
|
||||
deptList.value = data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取学院列表失败', error)
|
||||
}
|
||||
@@ -174,7 +174,7 @@ const getDeptData = async () => {
|
||||
const getClassData = async () => {
|
||||
try {
|
||||
const data = await getClasslist()
|
||||
classData.value = data.data.data || []
|
||||
classData.value = data.data || []
|
||||
} catch (error) {
|
||||
console.error('获取班级列表失败', error)
|
||||
}
|
||||
@@ -185,7 +185,7 @@ const getList = async () => {
|
||||
try {
|
||||
tableLoading.value = true
|
||||
const response = await getDataStatistics(queryForm)
|
||||
tableData.value = response.data.data || []
|
||||
tableData.value = response.data || []
|
||||
} catch (error) {
|
||||
console.error('获取数据失败', error)
|
||||
} finally {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :visible.sync="newStuCheckInDialog" width="40%">
|
||||
<el-form :model="form" :rules="rules" ref="form" label-width="120px"
|
||||
<el-dialog v-model="newStuCheckInDialog" width="40%">
|
||||
<el-form :model="form" :rules="rules" ref="formRef" label-width="120px"
|
||||
class="demo-ruleForm">
|
||||
|
||||
<el-form-item label="姓名" prop="realName">
|
||||
@@ -46,14 +46,13 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="宿舍号" prop="roomNo" v-if="isRoomTab && form.isRoom=='1'">
|
||||
<!-- <el-select v-model="form.roomNo" filterable placeholder="请选择房间号" :remote-method="remoteMethod" style=" width: 80% ">-->
|
||||
<el-select
|
||||
v-model="form.roomNo"
|
||||
filterable
|
||||
remote
|
||||
placeholder="请选择宿舍号"
|
||||
:remote-method="remoteMethod"
|
||||
@change="change"
|
||||
@change="handleRoomNoChange"
|
||||
:loading="loading"
|
||||
style=" width: 80% "
|
||||
>
|
||||
@@ -66,9 +65,8 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="床号" prop="bedNo" v-if="isRoomTab && form.isRoom=='1'">
|
||||
<el-select v-model="form.bedNo" filterable placeholder="请选择床号" style=" width: 80% ">
|
||||
<el-select v-model="form.bedNo" filterable placeholder="请选择床号" style=" width: 80% " :key="bedNoKey">
|
||||
<el-option
|
||||
v-for="item in bedNoData"
|
||||
:key="item.bedNo"
|
||||
@@ -83,7 +81,7 @@
|
||||
<el-input v-model="form.remarks" :rows="2" style=" width: 80%"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="checkIn('form')" v-loading="submitLoading">确定</el-button>
|
||||
<el-button type="primary" @click="checkIn" v-loading="submitLoading">确定</el-button>
|
||||
<el-button @click="newStuCheckInDialog = false">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -91,188 +89,208 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getDataByRoomNo} from "/@/api/stuwork/dormroom";
|
||||
import {fearchRoomStuNum} from "/@/api/stuwork/dormroomstudent";
|
||||
import {getDictByType} from "/@/api/contract/contract";
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, watch } from 'vue'
|
||||
import { useMessage } from '/@/hooks/message'
|
||||
import { getDataByRoomNo } from "/@/api/stuwork/dormroom"
|
||||
import { fearchRoomStuNum } from "/@/api/stuwork/dormroomstudent"
|
||||
import { getDictByType } from "/@/api/contract/contract"
|
||||
import { putObj } from '@/api/recruit/newstucheckin'
|
||||
|
||||
import {putObj} from '@/api/recruit/newstucheckin'
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'reload', page: any): void
|
||||
}>()
|
||||
|
||||
export default {
|
||||
name: "stu-check-in",
|
||||
data() {
|
||||
return {
|
||||
page:{},
|
||||
newStuCheckInDialog:false,
|
||||
bedNoData:[],
|
||||
roomNoList:[],
|
||||
checkInStatusData:[],
|
||||
loading:false,
|
||||
isRoomTab:false,
|
||||
yesOrNoData:[{label:'否', value:'0'},{label:'是', value:'1'}],
|
||||
genderData:[{label:'女', value:'2'},{label:'男', value:'1'}],
|
||||
submitLoading:false,
|
||||
form:{
|
||||
name:"",
|
||||
checkInStatus:"",
|
||||
gender:"",
|
||||
idNumber:"",
|
||||
isRoom:"",
|
||||
roomNo:"",
|
||||
bedNo:"",
|
||||
remarks:"",
|
||||
residenceDetail:"",
|
||||
parentName:"",
|
||||
parentTelOne:"",
|
||||
parentTelTwo:""
|
||||
},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入姓名', trigger: [ "blur","change"] }
|
||||
],
|
||||
gender: [
|
||||
{ required: true, message: '请输入性别', trigger: [ "blur","change"] }
|
||||
],
|
||||
idNumber: [
|
||||
{ required: true, message: '请输入身份证号', trigger: [ "blur","change"] }
|
||||
],
|
||||
checkInStatus: [
|
||||
{ required: true, message: '请输入报到状态', trigger: [ "blur","change"] }
|
||||
],
|
||||
isRoom: [
|
||||
{ required: true, message: '请选择是否住宿', trigger: [ "blur","change"] }
|
||||
],
|
||||
roomNo: [
|
||||
{ required: true, message: '请选择宿舍号', trigger: [ "blur","change"] }
|
||||
],
|
||||
bedNo: [
|
||||
{ required: true, message: '请选择床位号', trigger: [ "blur","change"] }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'form.checkInStatus':{
|
||||
handler(newVal){
|
||||
if(newVal==='1'){
|
||||
this.isRoomTab = true
|
||||
}else {
|
||||
this.isRoomTab = false
|
||||
}
|
||||
},
|
||||
},
|
||||
// 消息提示
|
||||
const message = useMessage()
|
||||
|
||||
'form.roomNo':{
|
||||
handler(newVal){
|
||||
console.log(newVal)
|
||||
if (newVal){
|
||||
this.fearchRoomStuNums(newVal)
|
||||
}
|
||||
}
|
||||
},
|
||||
// 表单引用
|
||||
const formRef = ref()
|
||||
|
||||
'form.isRoom':{
|
||||
handler(newVal){
|
||||
if (newVal === '0'){
|
||||
this.form.roomNo = ''
|
||||
this.form.bedNo = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
// 响应式数据
|
||||
const page = ref<any>({})
|
||||
const newStuCheckInDialog = ref(false)
|
||||
const bedNoData = ref<any[]>([])
|
||||
const roomNoList = ref<any[]>([])
|
||||
const checkInStatusData = ref<any[]>([])
|
||||
const loading = ref(false)
|
||||
const isRoomTab = ref(false)
|
||||
const bedNoKey = ref(0) // 用于强制更新床号选择器
|
||||
|
||||
},
|
||||
methods:{
|
||||
initForm(){
|
||||
this.form.name = ""
|
||||
this.form.checkInStatus = ""
|
||||
this.form.gender = ""
|
||||
this.form.idNumber = ""
|
||||
this.form.isRoom = ""
|
||||
this.form.roomNo = ""
|
||||
this.form.bedNo = ""
|
||||
this.form.remarks = ""
|
||||
this.form.residenceDetail="";
|
||||
this.form.parentName="";
|
||||
this.form.parentTelOne="";
|
||||
this.form.parentTelTwo="";
|
||||
},
|
||||
init(formData,page){
|
||||
this.initForm();
|
||||
this.page = page
|
||||
this.submitLoading = false
|
||||
this.newStuCheckInDialog = true
|
||||
const yesOrNoData = [
|
||||
{ label: '否', value: '0' },
|
||||
{ label: '是', value: '1' }
|
||||
]
|
||||
|
||||
Object.assign(this.form,formData)
|
||||
if(formData.roomNo){
|
||||
this.remoteMethod(formData.roomNo);
|
||||
this.fearchRoomStuNums(formData.bedNo);
|
||||
}
|
||||
getDictByType('check_in_status').then(data=>{
|
||||
this.checkInStatusData = data.data.data
|
||||
const genderData = [
|
||||
{ label: '女', value: '2' },
|
||||
{ label: '男', value: '1' }
|
||||
]
|
||||
|
||||
const submitLoading = ref(false)
|
||||
|
||||
const form = reactive({
|
||||
name: "",
|
||||
checkInStatus: "",
|
||||
gender: "",
|
||||
idNumber: "",
|
||||
isRoom: "",
|
||||
roomNo: "",
|
||||
bedNo: "",
|
||||
remarks: "",
|
||||
residenceDetail: "",
|
||||
parentName: "",
|
||||
parentTelOne: "",
|
||||
parentTelTwo: ""
|
||||
})
|
||||
|
||||
const rules = {
|
||||
name: [
|
||||
{ required: true, message: '请输入姓名', trigger: ["blur", "change"] }
|
||||
],
|
||||
gender: [
|
||||
{ required: true, message: '请输入性别', trigger: ["blur", "change"] }
|
||||
],
|
||||
idNumber: [
|
||||
{ required: true, message: '请输入身份证号', trigger: ["blur", "change"] }
|
||||
],
|
||||
checkInStatus: [
|
||||
{ required: true, message: '请输入报到状态', trigger: ["blur", "change"] }
|
||||
],
|
||||
isRoom: [
|
||||
{ required: true, message: '请选择是否住宿', trigger: ["blur", "change"] }
|
||||
],
|
||||
roomNo: [
|
||||
{ required: true, message: '请选择宿舍号', trigger: ["blur", "change"] }
|
||||
],
|
||||
bedNo: [
|
||||
{ required: true, message: '请选择床位号', trigger: ["blur", "change"] }
|
||||
],
|
||||
}
|
||||
|
||||
// 监听报到状态变化
|
||||
watch(() => form.checkInStatus, (newVal) => {
|
||||
if (newVal === '1') {
|
||||
isRoomTab.value = true
|
||||
} else {
|
||||
isRoomTab.value = false
|
||||
}
|
||||
})
|
||||
|
||||
// 监听宿舍号变化
|
||||
watch(() => form.roomNo, (newVal) => {
|
||||
console.log(newVal)
|
||||
if (newVal) {
|
||||
fearchRoomStuNums(newVal)
|
||||
}
|
||||
})
|
||||
|
||||
// 监听是否住宿变化
|
||||
watch(() => form.isRoom, (newVal) => {
|
||||
if (newVal === '0') {
|
||||
form.roomNo = ''
|
||||
form.bedNo = ''
|
||||
}
|
||||
})
|
||||
|
||||
// 初始化表单
|
||||
const initForm = () => {
|
||||
form.name = ""
|
||||
form.checkInStatus = ""
|
||||
form.gender = ""
|
||||
form.idNumber = ""
|
||||
form.isRoom = ""
|
||||
form.roomNo = ""
|
||||
form.bedNo = ""
|
||||
form.remarks = ""
|
||||
form.residenceDetail = ""
|
||||
form.parentName = ""
|
||||
form.parentTelOne = ""
|
||||
form.parentTelTwo = ""
|
||||
}
|
||||
|
||||
// 初始化方法
|
||||
const init = (formData: any, pageData: any) => {
|
||||
initForm()
|
||||
page.value = pageData
|
||||
submitLoading.value = false
|
||||
newStuCheckInDialog.value = true
|
||||
|
||||
Object.assign(form, formData)
|
||||
if (formData.roomNo) {
|
||||
remoteMethod(formData.roomNo)
|
||||
fearchRoomStuNums(formData.bedNo)
|
||||
}
|
||||
getDictByType('check_in_status').then(data => {
|
||||
checkInStatusData.value = data.data
|
||||
})
|
||||
console.log("OKKK")
|
||||
}
|
||||
|
||||
// 报到提交
|
||||
const checkIn = () => {
|
||||
submitLoading.value = true
|
||||
formRef.value?.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
putObj(form).then(() => {
|
||||
message.success('报到成功')
|
||||
emit('reload', page.value)
|
||||
newStuCheckInDialog.value = false
|
||||
submitLoading.value = false
|
||||
}).catch(() => {
|
||||
submitLoading.value = false
|
||||
})
|
||||
console.log("OKKK")
|
||||
},
|
||||
checkIn(form) {
|
||||
let _that = this
|
||||
_that.submitLoading = true;
|
||||
_that.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
// console.log("form",this.form)
|
||||
// _that.formLoading = true
|
||||
putObj(this.form).then(data => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '报到成功',
|
||||
type: 'success'
|
||||
})
|
||||
_that.$emit("reload",this.page);
|
||||
_that.newStuCheckInDialog = false
|
||||
_that.submitLoading = false
|
||||
})
|
||||
// _that.formLoading = false
|
||||
}else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
//实时检索宿舍号
|
||||
remoteMethod(query) {
|
||||
if (query != '' && query.length>=3) {
|
||||
let data = {'roomNo':query}
|
||||
this.loading = true
|
||||
let _this = this
|
||||
getDataByRoomNo(data).then(data=>{
|
||||
_this.roomNoList = data.data.data;
|
||||
console.log("this.roomNoList")
|
||||
console.log(_this.roomNoList)
|
||||
_this.loading = false
|
||||
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
//查询此房间为几人间
|
||||
fearchRoomStuNums(roomNo){
|
||||
var data = {"roomNo":roomNo}
|
||||
fearchRoomStuNum(data).then(data =>{
|
||||
this.bedNoData = data.data.data;
|
||||
})
|
||||
},
|
||||
isRoomDisable(notBedNo){
|
||||
if(undefined != notBedNo && "" != notBedNo){
|
||||
return true
|
||||
}else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
change(){
|
||||
this.form.bedNo='';
|
||||
this.$forceUpdate()
|
||||
} else {
|
||||
submitLoading.value = false
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 实时检索宿舍号
|
||||
const remoteMethod = (query: string) => {
|
||||
if (query != '' && query.length >= 3) {
|
||||
const data = { 'roomNo': query }
|
||||
loading.value = true
|
||||
getDataByRoomNo(data).then(data => {
|
||||
roomNoList.value = data.data
|
||||
console.log("this.roomNoList")
|
||||
console.log(roomNoList.value)
|
||||
loading.value = false
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 查询此房间为几人间
|
||||
const fearchRoomStuNums = (roomNo: string) => {
|
||||
const data = { "roomNo": roomNo }
|
||||
fearchRoomStuNum(data).then(data => {
|
||||
bedNoData.value = data.data
|
||||
})
|
||||
}
|
||||
|
||||
// 判断床位是否禁用
|
||||
const isRoomDisable = (notBedNo: any) => {
|
||||
if (undefined != notBedNo && "" != notBedNo) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// 宿舍号变化时清空床号
|
||||
const handleRoomNoChange = () => {
|
||||
form.bedNo = ''
|
||||
bedNoKey.value++ // 强制更新床号选择器
|
||||
}
|
||||
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible"
|
||||
v-model="visible"
|
||||
append-to-body
|
||||
>
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="140px">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataFormRef" @keyup.enter="dataFormSubmit" label-width="140px">
|
||||
|
||||
<el-form-item label="模拟学生" prop="serialNumber">
|
||||
<el-select
|
||||
@@ -15,7 +15,7 @@
|
||||
remote
|
||||
clearable
|
||||
reserve-keyword
|
||||
:disabled="!dataForm.id ? false : true" placeholder="请选择唯一号" size="small" style="width: 100%"
|
||||
:disabled="!!dataForm.id" placeholder="请选择唯一号" size="small" style="width: 100%"
|
||||
:remote-method="remoteTeacherByQuery"
|
||||
>
|
||||
<el-option
|
||||
@@ -27,7 +27,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="来源" prop="isOut">
|
||||
<el-select v-model="dataForm.isOut" filterable disabled placeholder="请选择来源" size="small" style="width: 100%" >
|
||||
<el-select v-model="dataForm.isOut" filterable disabled placeholder="请选择来源" size="small" style="width: 100%" >
|
||||
<el-option
|
||||
v-for="item in isOutList"
|
||||
:key="item.value"
|
||||
@@ -37,7 +37,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟报专业1" prop="wishMajorOne">
|
||||
<el-select v-model="dataForm.wishMajorOne" filterable placeholder="请选择拟报专业1" size="small" style="width: 100%">
|
||||
<el-select v-model="dataForm.wishMajorOne" filterable placeholder="请选择拟报专业1" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.zydm"
|
||||
@@ -49,7 +49,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟报专业2" prop="wishMajorTwo">
|
||||
<el-select v-model="dataForm.wishMajorTwo" filterable placeholder="请选择拟报专业2" size="small" style="width: 100%">
|
||||
<el-select v-model="dataForm.wishMajorTwo" filterable placeholder="请选择拟报专业2" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.zydm"
|
||||
@@ -61,7 +61,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟报专业3" prop="wishMajorThree">
|
||||
<el-select v-model="dataForm.wishMajorThree" filterable placeholder="请选择拟报专业3" size="small" style="width: 100%">
|
||||
<el-select v-model="dataForm.wishMajorThree" filterable placeholder="请选择拟报专业3" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.zydm"
|
||||
@@ -73,7 +73,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="录取专业" prop="confirmedMajor">
|
||||
<el-select v-model="dataForm.confirmedMajor" filterable placeholder="请选择录取专业" size="small" style="width: 100%">
|
||||
<el-select v-model="dataForm.confirmedMajor" filterable placeholder="请选择录取专业" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planMajorEduList"
|
||||
:key="item.zydm"
|
||||
@@ -83,181 +83,213 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit" v-if="canSubmit">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addMNObj, getMNObj, putMNObj} from '@/api/recruit/recruitImitateAdjustBatch'
|
||||
import {getList} from "@/api/recruit/recruitstudentsignup";
|
||||
import {list as planMajor, listByEdu} from "@/api/recruit/recruitplanmajor";
|
||||
import {queryTeacherStationInfo} from "@/api/professional/teacherbase";
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, nextTick } from 'vue'
|
||||
import { ElNotification } from 'element-plus'
|
||||
import { addMNObj, getMNObj, putMNObj } from '@/api/recruit/recruitImitateAdjustBatch'
|
||||
import { getList } from "@/api/recruit/recruitstudentsignup"
|
||||
import { list as planMajor, listByEdu } from "@/api/recruit/recruitplanmajor"
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
id:"",
|
||||
serialNumber:"",
|
||||
groupId:"",
|
||||
wishMajorOne:'',
|
||||
wishMajorTwo:'',
|
||||
wishMajorThree:'',
|
||||
confirmedMajor:'',
|
||||
isOut:'',
|
||||
degreeOfEducation:"",
|
||||
name:"",
|
||||
gender:"",
|
||||
idNumber:"",
|
||||
},
|
||||
disabled:false,
|
||||
serialNumberList:[],
|
||||
planMajorEduList:[],
|
||||
isOutList:[{label:"学校",value:"0"},{label:"市平台",value:"1"}],
|
||||
planMajorList:[],
|
||||
dataRule: {
|
||||
serialNumber: [
|
||||
{ required: true, message: '模拟学生不能为空', trigger: 'blur' },
|
||||
],
|
||||
confirmedMajor: [
|
||||
{ required: true, message: '录取专业不能为空', trigger: 'blur' },
|
||||
],
|
||||
}
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'refreshDataList'): void
|
||||
}>()
|
||||
|
||||
// 表单引用
|
||||
const dataFormRef = ref()
|
||||
|
||||
// 响应式数据
|
||||
const visible = ref(false)
|
||||
const canSubmit = ref(false)
|
||||
const disabled = ref(false)
|
||||
const serialNumberList = ref<any[]>([])
|
||||
const planMajorEduList = ref<any[]>([])
|
||||
const planMajorList = ref<any[]>([])
|
||||
|
||||
const isOutList = [
|
||||
{ label: "学校", value: "0" },
|
||||
{ label: "市平台", value: "1" }
|
||||
]
|
||||
|
||||
const dataForm = reactive({
|
||||
id: "",
|
||||
serialNumber: "",
|
||||
groupId: "",
|
||||
batchNo: "",
|
||||
wishMajorOne: '',
|
||||
wishMajorTwo: '',
|
||||
wishMajorThree: '',
|
||||
confirmedMajor: '',
|
||||
isOut: '',
|
||||
degreeOfEducation: "",
|
||||
name: "",
|
||||
gender: "",
|
||||
idNumber: "",
|
||||
oldConfirmedMajor: ""
|
||||
})
|
||||
|
||||
const dataRule = {
|
||||
serialNumber: [
|
||||
{ required: true, message: '模拟学生不能为空', trigger: 'blur' },
|
||||
],
|
||||
confirmedMajor: [
|
||||
{ required: true, message: '录取专业不能为空', trigger: 'blur' },
|
||||
],
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断拟报专业是否已经占用,占用不可选
|
||||
*/
|
||||
const isDisable = (zydm: string) => {
|
||||
if (zydm == dataForm.wishMajorOne
|
||||
|| zydm == dataForm.wishMajorTwo
|
||||
|| zydm == dataForm.wishMajorThree
|
||||
) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化数据
|
||||
const initData = () => {
|
||||
planMajorList.value = []
|
||||
serialNumberList.value = []
|
||||
planMajor({ groupId: dataForm.groupId }).then((data: any) => {
|
||||
planMajorList.value = data.data
|
||||
})
|
||||
}
|
||||
|
||||
// 远程搜索学生
|
||||
const remoteTeacherByQuery = (query: string) => {
|
||||
serialNumberList.value = []
|
||||
if (query !== '') {
|
||||
setTimeout(() => {
|
||||
getList({ groupId: dataForm.groupId, name: query }).then((response: any) => {
|
||||
serialNumberList.value = response.data
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
}
|
||||
|
||||
// 学生选择变化
|
||||
const changeStu = () => {
|
||||
planMajorEduList.value = []
|
||||
dataForm.wishMajorOne = ''
|
||||
dataForm.wishMajorTwo = ''
|
||||
dataForm.wishMajorThree = ''
|
||||
dataForm.degreeOfEducation = ""
|
||||
dataForm.oldConfirmedMajor = ""
|
||||
dataForm.name = ""
|
||||
dataForm.idNumber = ""
|
||||
dataForm.confirmedMajor = ""
|
||||
dataForm.gender = ""
|
||||
dataForm.isOut = ""
|
||||
serialNumberList.value.forEach(e => {
|
||||
if (e.serialNumber == dataForm.serialNumber) {
|
||||
dataForm.wishMajorOne = e.wishMajorOne
|
||||
dataForm.wishMajorTwo = e.wishMajorTwo
|
||||
dataForm.wishMajorThree = e.wishMajorThree
|
||||
dataForm.degreeOfEducation = e.degreeOfEducation
|
||||
dataForm.name = e.name
|
||||
dataForm.idNumber = e.idNumber
|
||||
dataForm.gender = e.gender
|
||||
dataForm.isOut = e.isOut
|
||||
dataForm.confirmedMajor = e.confirmedMajor
|
||||
dataForm.oldConfirmedMajor = e.confirmedMajor
|
||||
getMajorListByEdu()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 根据学历获取专业列表
|
||||
const getMajorListByEdu = () => {
|
||||
planMajorEduList.value = []
|
||||
listByEdu({ groupId: dataForm.groupId, degreeOfEducation: dataForm.degreeOfEducation }).then((res: any) => {
|
||||
planMajorEduList.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
// 表单提交
|
||||
const dataFormSubmit = () => {
|
||||
dataFormRef.value?.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
if (dataForm.oldConfirmedMajor == dataForm.confirmedMajor) {
|
||||
ElNotification.error({
|
||||
title: '错误',
|
||||
message: '模拟调整的专业不能和原录取专业相同,请检查'
|
||||
})
|
||||
return
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
init (id,groupId,batchNo) {
|
||||
this.dataForm.id = id || null;
|
||||
this.dataForm.batchNo = batchNo;
|
||||
this.dataForm.groupId= groupId;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.planMajorEduList = [];
|
||||
this.initData();
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
getMNObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
this.getMajorListByEdu();
|
||||
})
|
||||
}else{
|
||||
this.disabled = true;
|
||||
}
|
||||
canSubmit.value = false
|
||||
if (dataForm.id) {
|
||||
putMNObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '修改成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 判断拟报专业是否已经占用,占用不可选
|
||||
* @param notBedNo
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isDisable(zydm){
|
||||
if(zydm == this.dataForm.wishMajorOne
|
||||
|| zydm == this.dataForm.wishMajorTwo
|
||||
|| zydm == this.dataForm.wishMajorThree
|
||||
){
|
||||
return true
|
||||
}else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
initData() {
|
||||
this.planMajorList=[];
|
||||
this.serialNumberList=[];
|
||||
planMajor({groupId: this.dataForm.groupId}).then(data =>{
|
||||
this.planMajorList = data.data.data;
|
||||
});
|
||||
// getList({groupId:this.dataForm.groupId}).then(data =>{
|
||||
// this.serialNumberList = data.data.data
|
||||
// });
|
||||
},
|
||||
remoteTeacherByQuery(query) {
|
||||
this.serialNumberList = []
|
||||
if (query !== '') {
|
||||
setTimeout(() => {
|
||||
getList({groupId:this.dataForm.groupId,name:query}).then(response => {
|
||||
this.serialNumberList = response.data.data
|
||||
})
|
||||
}, 200);
|
||||
}
|
||||
},
|
||||
changeStu(){
|
||||
let _this = this;
|
||||
_this.planMajorEduList = [];
|
||||
_this.dataForm.wishMajorOne='';
|
||||
_this.dataForm.wishMajorTwo='';
|
||||
_this.dataForm.wishMajorThree='';
|
||||
_this.dataForm.degreeOfEducation = "";
|
||||
_this.dataForm.oldConfirmedMajor = "";
|
||||
_this.dataForm.name = "";
|
||||
_this.dataForm.idNumber = "";
|
||||
_this.dataForm.confirmedMajor = "";
|
||||
_this.dataForm.gender = "";
|
||||
_this.dataForm.isOut = "";
|
||||
console.log(_this.dataForm);
|
||||
_this.serialNumberList.forEach(e=>{
|
||||
if(e.serialNumber == _this.dataForm.serialNumber){
|
||||
_this.dataForm.wishMajorOne = e.wishMajorOne;
|
||||
_this.dataForm.wishMajorTwo = e.wishMajorTwo;
|
||||
_this.dataForm.wishMajorThree = e.wishMajorThree;
|
||||
_this.dataForm.degreeOfEducation = e.degreeOfEducation;
|
||||
_this.dataForm.name = e.name;
|
||||
_this.dataForm.idNumber = e.idNumber;
|
||||
|
||||
_this.dataForm.gender = e.gender;
|
||||
_this.dataForm.isOut = e.isOut;
|
||||
_this.dataForm.confirmedMajor = e.confirmedMajor;
|
||||
_this.dataForm.oldConfirmedMajor = e.confirmedMajor;
|
||||
_this.getMajorListByEdu();
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
getMajorListByEdu(){
|
||||
this.planMajorEduList=[];
|
||||
listByEdu({groupId: this.dataForm.groupId,degreeOfEducation:this.dataForm.degreeOfEducation}).then(res=> {
|
||||
this.planMajorEduList = res.data.data;
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if(this.dataForm.oldConfirmedMajor == this.dataForm.confirmedMajor){
|
||||
this.$notify.error('模拟调整的专业不能和原录取专业相同,请检查');
|
||||
return
|
||||
}
|
||||
this.canSubmit = false;
|
||||
if (this.dataForm.id) {
|
||||
putMNObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addMNObj(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
addMNObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '添加成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化方法
|
||||
const init = (id: string | null, groupId: string, batchNo: string) => {
|
||||
dataForm.id = id || ""
|
||||
dataForm.batchNo = batchNo
|
||||
dataForm.groupId = groupId
|
||||
visible.value = true
|
||||
canSubmit.value = true
|
||||
planMajorEduList.value = []
|
||||
initData()
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields()
|
||||
if (dataForm.id) {
|
||||
getMNObj(dataForm.id).then((response: any) => {
|
||||
Object.assign(dataForm, response.data)
|
||||
getMajorListByEdu()
|
||||
})
|
||||
} else {
|
||||
disabled.value = true
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="140px">
|
||||
v-model="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataFormRef" @keyup.enter="dataFormSubmit" label-width="140px">
|
||||
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable :disabled="!dataForm.id ? false : true" placeholder="请选择招生计划" size="small" style="width: 100%">
|
||||
<el-select v-model="dataForm.groupId" filterable :disabled="!!dataForm.id" placeholder="请选择招生计划" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
@@ -20,94 +20,119 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit" v-if="canSubmit">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addObj, getObj, putObj} from '@/api/recruit/recruitImitateAdjustBatch'
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, nextTick } from 'vue'
|
||||
import { ElNotification } from 'element-plus'
|
||||
import { addObj, getObj, putObj } from '@/api/recruit/recruitImitateAdjustBatch'
|
||||
import { list } from "@/api/recruit/recruitstudentplangroup"
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
id:"",
|
||||
batchName:"",
|
||||
groupId:"",
|
||||
},
|
||||
disabled:false,
|
||||
planList: [],
|
||||
areaList:[],
|
||||
deptList:[],
|
||||
dataRule: {
|
||||
groupId: [
|
||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' },
|
||||
],
|
||||
batchName: [
|
||||
{ required: true, message: '批次名称不能为空', trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: '批次名称长度不大于20个字符', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.initData();
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
})
|
||||
}else{
|
||||
this.disabled = true;
|
||||
}
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'refreshDataList'): void
|
||||
}>()
|
||||
|
||||
// 表单引用
|
||||
const dataFormRef = ref()
|
||||
|
||||
// 响应式数据
|
||||
const visible = ref(false)
|
||||
const canSubmit = ref(false)
|
||||
const disabled = ref(false)
|
||||
const planList = ref<any[]>([])
|
||||
|
||||
const dataForm = reactive({
|
||||
id: "",
|
||||
batchName: "",
|
||||
groupId: "",
|
||||
})
|
||||
|
||||
const dataRule = {
|
||||
groupId: [
|
||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' },
|
||||
],
|
||||
batchName: [
|
||||
{ required: true, message: '批次名称不能为空', trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: '批次名称长度不大于20个字符', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
|
||||
// 初始化数据
|
||||
const initData = () => {
|
||||
list().then((data: any) => {
|
||||
planList.value = data.data
|
||||
if (!dataForm.id) {
|
||||
dataForm.groupId = planList.value[0].id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 表单提交
|
||||
const dataFormSubmit = () => {
|
||||
dataFormRef.value?.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
canSubmit.value = false
|
||||
if (dataForm.id) {
|
||||
putObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '修改成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
list().then(data =>{
|
||||
this.planList = data.data.data
|
||||
if(!this.dataForm.id){
|
||||
this.dataForm.groupId=this.planList[0].id
|
||||
}
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
if (this.dataForm.id) {
|
||||
putObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addObj(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
addObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '添加成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化方法
|
||||
const init = (id: string | null) => {
|
||||
dataForm.id = id || ""
|
||||
visible.value = true
|
||||
canSubmit.value = true
|
||||
initData()
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields()
|
||||
if (dataForm.id) {
|
||||
getObj(dataForm.id).then((response: any) => {
|
||||
Object.assign(dataForm, response.data)
|
||||
})
|
||||
} else {
|
||||
disabled.value = true
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -131,8 +131,7 @@ import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { list } from '/@/api/recruit/recruitstudentplangroup'
|
||||
import { addObj, delObj, fetchList } from '/@/api/recruit/recruitImitateAdjustBatch'
|
||||
import request from '/@/utils/request'
|
||||
import { delObj, fetchList } from '/@/api/recruit/recruitImitateAdjustBatch'
|
||||
|
||||
const TableForm = defineAsyncComponent(() => import('./detaiform.vue'))
|
||||
const MnTable = defineAsyncComponent(() => import('./mnTable.vue'))
|
||||
@@ -181,8 +180,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
records: response.data.records,
|
||||
total: response.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -196,13 +195,13 @@ const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle, downBlob
|
||||
const init = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
planList.value = data.data.data || []
|
||||
planList.value = data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
// 初始化失败
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,9 +249,9 @@ const deleteHandle = async (id: string) => {
|
||||
// 重置查询
|
||||
const resetQuery = () => {
|
||||
searchFormRef.value?.resetFields()
|
||||
Object.keys(queryForm).forEach(key => {
|
||||
queryForm[key] = ''
|
||||
})
|
||||
queryForm.groupId = ''
|
||||
queryForm.batchName = ''
|
||||
queryForm.batchCode = ''
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
|
||||
@@ -2,215 +2,245 @@
|
||||
<el-dialog
|
||||
title="模拟列表"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible"
|
||||
v-model="visible"
|
||||
width="80%"
|
||||
>
|
||||
<el-form :inline="true" >
|
||||
<el-form :inline="true">
|
||||
<el-form-item>
|
||||
<el-button v-if="permissions.recruit_recruitImitateAdjustBatch_add" icon="el-icon-plus" size="small" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
<el-button v-if="permissions.recruit_recruitImitateAdjustBatch_add" :icon="Plus" size="small" type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="avue-crud">
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
stripe
|
||||
v-loading="dataListLoading">
|
||||
<el-table-column
|
||||
prop="serialNumber"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="唯一号">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="姓名">
|
||||
</el-table-column>
|
||||
<div class="avue-crud">
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
stripe
|
||||
v-loading="dataListLoading">
|
||||
<el-table-column
|
||||
prop="serialNumber"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="唯一号">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="姓名">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="gender"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="性别">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.gender==1">男</span>
|
||||
<span v-if="scope.row.gender==2">女</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="degreeOfEducation"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="学历">
|
||||
<template slot-scope="scope">
|
||||
{{global.getLabelValueByPropes(eduList,scope.row.degreeOfEducation,{'key':'value','value':'label'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="wishMajorOne"
|
||||
header-align="center"
|
||||
width="100px"
|
||||
align="center"
|
||||
label="拟报专业1">
|
||||
<template slot-scope="scope">
|
||||
{{global.getLabelValueByPropes2(planMajorList,scope.row.wishMajorOne,{'key':'zydm','value':'zymc'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="wishMajorTwo"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="100px"
|
||||
label="拟报专业2">
|
||||
<template slot-scope="scope">
|
||||
{{global.getLabelValueByPropes2(planMajorList,scope.row.wishMajorTwo,{'key':'zydm','value':'zymc'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="gender"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="性别">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.gender==1">男</span>
|
||||
<span v-if="scope.row.gender==2">女</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="degreeOfEducation"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="学历">
|
||||
<template #default="scope">
|
||||
{{global.getLabelValueByPropes(eduList,scope.row.degreeOfEducation,{'key':'value','value':'label'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="wishMajorOne"
|
||||
header-align="center"
|
||||
width="100px"
|
||||
align="center"
|
||||
label="拟报专业1">
|
||||
<template #default="scope">
|
||||
{{global.getLabelValueByPropes2(planMajorList,scope.row.wishMajorOne,{'key':'zydm','value':'zymc'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="wishMajorTwo"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="100px"
|
||||
label="拟报专业2">
|
||||
<template #default="scope">
|
||||
{{global.getLabelValueByPropes2(planMajorList,scope.row.wishMajorTwo,{'key':'zydm','value':'zymc'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="wishMajorThree"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="100px"
|
||||
label="拟报专业3">
|
||||
<template slot-scope="scope">
|
||||
{{global.getLabelValueByPropes2(planMajorList,scope.row.wishMajorThree,{'key':'zydm','value':'zymc'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="oldConfirmedMajor"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="原录取专业">
|
||||
<template slot-scope="scope">
|
||||
{{global.getLabelValueByPropes2(planMajorList,scope.row.oldConfirmedMajor,{'key':'zydm','value':'zymc'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="confirmedMajor"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="模拟录取专业">
|
||||
<template slot-scope="scope">
|
||||
{{global.getLabelValueByPropes2(planMajorList,scope.row.confirmedMajor,{'key':'zydm','value':'zymc'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="isOut"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="120"
|
||||
label="来源">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.isOut==0">学校</span>
|
||||
<span v-if="scope.row.isOut==1">市平台</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="permissions.recruit_recruitImitateAdjustBatch_edit" type="text" size="small" icon="el-icon-edit" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button v-if="permissions.recruit_recruitImitateAdjustBatch_del" type="text" size="small" icon="el-icon-delete" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-table-column
|
||||
prop="wishMajorThree"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="100px"
|
||||
label="拟报专业3">
|
||||
<template #default="scope">
|
||||
{{global.getLabelValueByPropes2(planMajorList,scope.row.wishMajorThree,{'key':'zydm','value':'zymc'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="oldConfirmedMajor"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="原录取专业">
|
||||
<template #default="scope">
|
||||
{{global.getLabelValueByPropes2(planMajorList,scope.row.oldConfirmedMajor,{'key':'zydm','value':'zymc'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="confirmedMajor"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="模拟录取专业">
|
||||
<template #default="scope">
|
||||
{{global.getLabelValueByPropes2(planMajorList,scope.row.confirmedMajor,{'key':'zydm','value':'zymc'})}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="isOut"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="120"
|
||||
label="来源">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.isOut==0">学校</span>
|
||||
<span v-if="scope.row.isOut==1">市平台</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="操作">
|
||||
<template #default="scope">
|
||||
<el-button v-if="permissions.recruit_recruitImitateAdjustBatch_edit" type="text" size="small" :icon="Edit" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
|
||||
<el-button v-if="permissions.recruit_recruitImitateAdjustBatch_del" type="text" size="small" :icon="Delete" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
|
||||
<add-m-n-stu v-if="addMnStuVisible" ref="addMnStu" @refreshDataList="getDataList"></add-m-n-stu>
|
||||
<add-m-n-stu v-if="addMnStuVisible" ref="addMnStuRef" @refreshDataList="getDataList"></add-m-n-stu>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getMNStuList,delMNObj} from '@/api/recruit/recruitImitateAdjustBatch'
|
||||
import {list as planMajor} from "@/api/recruit/recruitplanmajor";
|
||||
import {mapGetters} from "vuex";
|
||||
import addMNStu from './addMNStu'
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, computed, nextTick, defineAsyncComponent } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { Plus, Edit, Delete } from '@element-plus/icons-vue'
|
||||
import { getMNStuList, delMNObj } from '@/api/recruit/recruitImitateAdjustBatch'
|
||||
import { list as planMajor } from "@/api/recruit/recruitplanmajor"
|
||||
import { getTypeValue } from "@/api/admin/dict"
|
||||
// @ts-ignore
|
||||
import global from '@/components/tools/commondict'
|
||||
import {getTypeValue} from "@/api/admin/dict";
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
batchNo:"",
|
||||
groupId:""
|
||||
},
|
||||
dataListLoading: false,
|
||||
addMnStuVisible: false,
|
||||
global:global,
|
||||
disabled:false,
|
||||
dataRule: {
|
||||
},
|
||||
planAllMajorList:[],
|
||||
dataList: [],
|
||||
eduList:[],
|
||||
const AddMNStu = defineAsyncComponent(() => import('./addMNStu.vue'))
|
||||
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['permissions'])
|
||||
},
|
||||
components: {
|
||||
addMNStu
|
||||
},
|
||||
methods: {
|
||||
init (batchNo,groupId) {
|
||||
this.dataForm.batchNo = batchNo;
|
||||
this.dataForm.groupId = groupId;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.initData();
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'refreshDataList'): void
|
||||
}>()
|
||||
|
||||
},
|
||||
// 新增 / 修改
|
||||
addOrUpdateHandle (id) {
|
||||
this.addMnStuVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addMnStu.init(id,this.dataForm.groupId,this.dataForm.batchNo)
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteHandle (id) {
|
||||
this.$confirm('是否确认删除本条数据?请谨慎操作', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function () {
|
||||
return delMNObj(id)
|
||||
}).then(data => {
|
||||
this.$message.success('删除成功')
|
||||
this.getDataList()
|
||||
})
|
||||
},
|
||||
getDataList(){
|
||||
this.dataList=[]
|
||||
this.dataListLoading = true
|
||||
this.$emit('refreshDataList')
|
||||
getMNStuList(this.dataForm).then(response => {
|
||||
this.dataList = response.data.data
|
||||
})
|
||||
this.dataListLoading = false
|
||||
},
|
||||
initData(){
|
||||
this.eduList=[];
|
||||
getTypeValue('finance_student_source').then(res=>{
|
||||
this.eduList=res.data.data
|
||||
})
|
||||
this.planMajorList=[];
|
||||
planMajor({groupId: this.dataForm.groupId}).then(data =>{
|
||||
this.planMajorList = data.data.data;
|
||||
this.getDataList();
|
||||
});
|
||||
},
|
||||
}
|
||||
// 使用 Pinia store
|
||||
const userInfoStore = useUserInfo()
|
||||
const { userInfos } = storeToRefs(userInfoStore)
|
||||
|
||||
// 创建权限对象
|
||||
const permissions = computed(() => {
|
||||
const perms: Record<string, boolean> = {}
|
||||
userInfos.value.authBtnList.forEach((perm: string) => {
|
||||
perms[perm] = true
|
||||
})
|
||||
return perms
|
||||
})
|
||||
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
// 组件引用
|
||||
const addMnStuRef = ref()
|
||||
|
||||
// 响应式数据
|
||||
const visible = ref(false)
|
||||
const canSubmit = ref(false)
|
||||
const dataListLoading = ref(false)
|
||||
const addMnStuVisible = ref(false)
|
||||
|
||||
const dataForm = reactive({
|
||||
batchNo: "",
|
||||
groupId: ""
|
||||
})
|
||||
|
||||
const dataList = ref<any[]>([])
|
||||
const eduList = ref<any[]>([])
|
||||
const planMajorList = ref<any[]>([])
|
||||
|
||||
// 初始化方法
|
||||
const init = (batchNo: string, groupId: string) => {
|
||||
dataForm.batchNo = batchNo
|
||||
dataForm.groupId = groupId
|
||||
visible.value = true
|
||||
canSubmit.value = true
|
||||
initData()
|
||||
}
|
||||
|
||||
// 新增 / 修改
|
||||
const addOrUpdateHandle = (id?: string) => {
|
||||
addMnStuVisible.value = true
|
||||
nextTick(() => {
|
||||
addMnStuRef.value?.init(id || null, dataForm.groupId, dataForm.batchNo)
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
const deleteHandle = async (id: string) => {
|
||||
try {
|
||||
await messageBox.confirm('是否确认删除本条数据?请谨慎操作')
|
||||
await delMNObj(id)
|
||||
message.success('删除成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
|
||||
// 获取数据列表
|
||||
const getDataList = () => {
|
||||
dataList.value = []
|
||||
dataListLoading.value = true
|
||||
emit('refreshDataList')
|
||||
getMNStuList(dataForm).then((response: any) => {
|
||||
dataList.value = response.data
|
||||
dataListLoading.value = false
|
||||
}).catch(() => {
|
||||
dataListLoading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化数据
|
||||
const initData = () => {
|
||||
eduList.value = []
|
||||
getTypeValue('finance_student_source').then((res: any) => {
|
||||
eduList.value = res.data
|
||||
})
|
||||
planMajorList.value = []
|
||||
planMajor({ groupId: dataForm.groupId }).then((data: any) => {
|
||||
planMajorList.value = data.data
|
||||
getDataList()
|
||||
})
|
||||
}
|
||||
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.avue-crud {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -166,8 +166,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
records: response.data.records,
|
||||
total: response.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -196,7 +196,7 @@ const remoteTeacherByQuery = (query: string) => {
|
||||
if (query !== '') {
|
||||
setTimeout(() => {
|
||||
queryTeacherBaseByNoByAssets(query).then(response => {
|
||||
teacherList.value = response.data.data
|
||||
teacherList.value = response.data
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||
v-model="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataFormRef" @keyup.enter="dataFormSubmit"
|
||||
label-width="140px">
|
||||
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
@@ -106,187 +106,212 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit" v-if="canSubmit">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addObj, getObj, putObj,getCityPlan} from '@/api/recruit/recruitplanmajor'
|
||||
import {getDeptList} from "@/api/basic/basicclass";
|
||||
import {getDictByType} from "@/api/contract/contract";
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
import {getMajorNameList} from "@/api/basic/major";
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, nextTick } from 'vue'
|
||||
import { ElNotification } from 'element-plus'
|
||||
import { addObj, getObj, putObj, getCityPlan } from '@/api/recruit/recruitplanmajor'
|
||||
import { getDeptList } from "@/api/basic/basicclass"
|
||||
import { getDictByType } from "@/api/contract/contract"
|
||||
import { list } from "@/api/recruit/recruitstudentplangroup"
|
||||
import { getMajorNameList } from "@/api/basic/major"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
id: "",
|
||||
groupId: "",
|
||||
zydm: "",
|
||||
zymc: "",
|
||||
zygfmc: "",
|
||||
deptCode: "",
|
||||
xz: "",
|
||||
cc: "",
|
||||
isZd: "0",
|
||||
isOrder: "0",
|
||||
remarks: "",
|
||||
offcialZydm: "",
|
||||
isUnion:"0",
|
||||
tuitionFee:0,
|
||||
cityPlanId:null
|
||||
},
|
||||
cityPlanIdList:[],
|
||||
offcialZydmList: [],
|
||||
planList: [],
|
||||
yeNoList: [],
|
||||
deptList: [],
|
||||
ccList: [],
|
||||
majorYears: [],
|
||||
dataRule: {
|
||||
zydm: [
|
||||
{required: true, message: '专业代码不能为空', trigger: 'blur'},
|
||||
{min: 1, max: 6, message: '专业代码长度不大于6个字符', trigger: 'blur'}
|
||||
],
|
||||
tuitionFee: [
|
||||
{required: true, message: '学费不能为空', trigger: 'blur'}
|
||||
],
|
||||
zymc: [
|
||||
{required: true, message: '专业名称不能为空', trigger: 'blur'},
|
||||
{min: 1, max: 200, message: '专业名称长度不大于200个字符', trigger: 'blur'}
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'refreshDataList'): void
|
||||
}>()
|
||||
|
||||
],
|
||||
zygfmc: [
|
||||
{required: true, message: '专业规范名称不能为空', trigger: 'blur'},
|
||||
{min: 1, max: 200, message: '专业规范名称长度不大于200个字符', trigger: 'blur'}
|
||||
],
|
||||
groupId: [
|
||||
{required: true, message: '招生计划不能为空', trigger: 'blur'}
|
||||
],
|
||||
xz: [
|
||||
{required: true, message: '学制不能为空', trigger: 'blur'}
|
||||
],
|
||||
deptCode: [
|
||||
{required: true, message: '学院不能为空', trigger: 'blur'}
|
||||
],
|
||||
cc: [
|
||||
{required: true, message: '层次不能为空', trigger: 'blur'}
|
||||
],
|
||||
isOrder: [
|
||||
{required: true, message: '订单班不能为空', trigger: 'blur'}
|
||||
],
|
||||
isZd: [
|
||||
{required: true, message: '订单班不能为空', trigger: 'blur'}
|
||||
],
|
||||
isUnion: [
|
||||
{required: true, message: '联院班不能为空', trigger: 'blur'}
|
||||
],
|
||||
remarks: [
|
||||
{min: 1, max: 100, message: '备注长度不大于100个字符', trigger: 'blur'}
|
||||
],
|
||||
}
|
||||
// 表单引用
|
||||
const dataFormRef = ref()
|
||||
|
||||
// 响应式数据
|
||||
const visible = ref(false)
|
||||
const canSubmit = ref(false)
|
||||
const cityPlanIdList = ref<any[]>([])
|
||||
const offcialZydmList = ref<any[]>([])
|
||||
const planList = ref<any[]>([])
|
||||
const yesNoList = ref<any[]>([])
|
||||
const deptList = ref<any[]>([])
|
||||
const ccList = ref<any[]>([])
|
||||
const majorYears = ref<any[]>([])
|
||||
|
||||
const dataForm = reactive({
|
||||
id: "",
|
||||
groupId: "",
|
||||
zydm: "",
|
||||
zymc: "",
|
||||
zygfmc: "",
|
||||
deptCode: "",
|
||||
xz: "",
|
||||
cc: "",
|
||||
isZd: "0",
|
||||
isOrder: "0",
|
||||
remarks: "",
|
||||
offcialZydm: "",
|
||||
isUnion: "0",
|
||||
tuitionFee: 0,
|
||||
cityPlanId: null as string | null,
|
||||
cityPlanIds: [] as string[],
|
||||
cityPlanName: "",
|
||||
cityPlanYear: "",
|
||||
sort: 0
|
||||
})
|
||||
|
||||
const dataRule = {
|
||||
zydm: [
|
||||
{ required: true, message: '专业代码不能为空', trigger: 'blur' },
|
||||
{ min: 1, max: 6, message: '专业代码长度不大于6个字符', trigger: 'blur' }
|
||||
],
|
||||
tuitionFee: [
|
||||
{ required: true, message: '学费不能为空', trigger: 'blur' }
|
||||
],
|
||||
zymc: [
|
||||
{ required: true, message: '专业名称不能为空', trigger: 'blur' },
|
||||
{ min: 1, max: 200, message: '专业名称长度不大于200个字符', trigger: 'blur' }
|
||||
],
|
||||
zygfmc: [
|
||||
{ required: true, message: '专业规范名称不能为空', trigger: 'blur' },
|
||||
{ min: 1, max: 200, message: '专业规范名称长度不大于200个字符', trigger: 'blur' }
|
||||
],
|
||||
groupId: [
|
||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' }
|
||||
],
|
||||
xz: [
|
||||
{ required: true, message: '学制不能为空', trigger: 'blur' }
|
||||
],
|
||||
deptCode: [
|
||||
{ required: true, message: '学院不能为空', trigger: 'blur' }
|
||||
],
|
||||
cc: [
|
||||
{ required: true, message: '层次不能为空', trigger: 'blur' }
|
||||
],
|
||||
isOrder: [
|
||||
{ required: true, message: '订单班不能为空', trigger: 'blur' }
|
||||
],
|
||||
isZd: [
|
||||
{ required: true, message: '订单班不能为空', trigger: 'blur' }
|
||||
],
|
||||
isUnion: [
|
||||
{ required: true, message: '联院班不能为空', trigger: 'blur' }
|
||||
],
|
||||
remarks: [
|
||||
{ min: 1, max: 100, message: '备注长度不大于100个字符', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断市平台招生专业是否占用,占用不可选
|
||||
*/
|
||||
const isCityDisable = (id: string) => {
|
||||
if (!dataForm.cityPlanIds || !Array.isArray(dataForm.cityPlanIds)) {
|
||||
return false
|
||||
}
|
||||
return dataForm.cityPlanIds.some(e => e == id)
|
||||
}
|
||||
|
||||
// 初始化数据
|
||||
const initData = () => {
|
||||
// 查询二级学院信息
|
||||
getDeptList().then((data: any) => {
|
||||
deptList.value = data.data
|
||||
})
|
||||
list().then((data: any) => {
|
||||
planList.value = data.data
|
||||
if (!dataForm.id) {
|
||||
dataForm.groupId = planList.value[0]?.id || ""
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.initData();
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
//获取市平台对应年份下的招生计划
|
||||
getCityPlan({id:this.dataForm.id}).then(data =>{
|
||||
this.cityPlanIdList = data.data.data
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 判断市平台招生专业是否占用,占用不可选
|
||||
* @param notBedNo
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isCityDisable(id){
|
||||
var returnFlag = false;
|
||||
this.dataForm.cityPlanIds.forEach(e=>{
|
||||
if(e == id){
|
||||
returnFlag = true;
|
||||
}
|
||||
})
|
||||
return returnFlag;
|
||||
},
|
||||
initData() {
|
||||
//查询二级学院信息
|
||||
getDeptList().then(data => {
|
||||
this.deptList = data.data.data
|
||||
})
|
||||
list().then(data => {
|
||||
this.planList = data.data.data
|
||||
if (!this.dataForm.id) {
|
||||
this.dataForm.groupId = this.planList[0].id;
|
||||
}
|
||||
});
|
||||
getMajorNameList().then(data =>{
|
||||
this.offcialZydmList = data.data.data
|
||||
})
|
||||
//获取数据字典
|
||||
getDictByType("yes_no").then(res => {
|
||||
this.yesNoList = res.data.data
|
||||
})
|
||||
getDictByType("basic_major_years").then(res => {
|
||||
this.majorYears = res.data.data
|
||||
})
|
||||
getDictByType("basic_major_level").then(res => {
|
||||
this.ccList = res.data.data
|
||||
})
|
||||
})
|
||||
getMajorNameList().then((data: any) => {
|
||||
offcialZydmList.value = data.data
|
||||
})
|
||||
// 获取数据字典
|
||||
getDictByType("yes_no").then((res: any) => {
|
||||
yesNoList.value = res.data
|
||||
})
|
||||
getDictByType("basic_major_years").then((res: any) => {
|
||||
majorYears.value = res.data
|
||||
})
|
||||
getDictByType("basic_major_level").then((res: any) => {
|
||||
ccList.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
if(this.dataForm.cityPlanId !=null){
|
||||
this.cityPlanIdList.forEach(e=>{
|
||||
if(e.id == this.dataForm.cityPlanId){
|
||||
this.dataForm.cityPlanName = e.schoolMajorName;
|
||||
this.dataForm.cityPlanYear = e.educational;
|
||||
}
|
||||
// 表单提交
|
||||
const dataFormSubmit = () => {
|
||||
if (dataForm.cityPlanId != null) {
|
||||
cityPlanIdList.value.forEach(e => {
|
||||
if (e.id == dataForm.cityPlanId) {
|
||||
dataForm.cityPlanName = e.schoolMajorName
|
||||
dataForm.cityPlanYear = e.educational
|
||||
}
|
||||
})
|
||||
}
|
||||
dataFormRef.value?.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
canSubmit.value = false
|
||||
if (dataForm.id) {
|
||||
putObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '修改成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
} else {
|
||||
addObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '添加成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
}
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
if (this.dataForm.id) {
|
||||
putObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addObj(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化方法
|
||||
const init = (id: string | null) => {
|
||||
dataForm.id = id || ""
|
||||
visible.value = true
|
||||
canSubmit.value = true
|
||||
initData()
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields()
|
||||
if (dataForm.id) {
|
||||
getObj(dataForm.id).then((response: any) => {
|
||||
Object.assign(dataForm, response.data)
|
||||
// 获取市平台对应年份下的招生计划
|
||||
getCityPlan({ id: dataForm.id }).then((data: any) => {
|
||||
cityPlanIdList.value = data.data
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -252,8 +252,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
records: response.data.records,
|
||||
total: response.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -268,18 +268,18 @@ const init = async () => {
|
||||
try {
|
||||
// 查询二级学院信息
|
||||
const deptData = await getDeptList()
|
||||
deptList.value = deptData.data.data || []
|
||||
deptList.value = deptData.data || []
|
||||
|
||||
// 获取招生计划列表
|
||||
const planData = await list()
|
||||
planList.value = planData.data.data || []
|
||||
planList.value = planData.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
|
||||
// 获取专业名称列表
|
||||
const majorData = await getMajorNameList()
|
||||
offcialZydmList.value = majorData.data.data || []
|
||||
offcialZydmList.value = majorData.data || []
|
||||
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
append-to-body
|
||||
width="90%"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" ref="dataForm" label-width="140px">
|
||||
v-model="visible">
|
||||
<el-form :model="dataForm" ref="dataFormRef" label-width="140px">
|
||||
<el-form-item label="招生计划名称" prop="groupName">
|
||||
<el-input v-model="dataForm.groupName" placeholder="招生计划名称" disabled></el-input>
|
||||
</el-form-item>
|
||||
@@ -27,8 +27,8 @@
|
||||
align="center"
|
||||
label="专业"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span >{{ scope.row.zymc+' || '+scope.row.zydm+' || '+scope.row.xz+' 年制'}}</span>
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.zymc+' || '+scope.row.zydm+' || '+scope.row.xz+' 年制'}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -38,7 +38,7 @@
|
||||
label="计划总数"
|
||||
width="180px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<el-input-number style="width: 80%" v-model="scope.row.planStudentNum" :min="0" :max="999" @change="updateMajor(scope.row)" width="100px"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -50,7 +50,7 @@
|
||||
label="控制数"
|
||||
width="180px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<el-input-number style="width: 80%" v-model="scope.row.needStudentNum" :min="0" :max="999"
|
||||
@change="updateMajor(scope.row)"></el-input-number>
|
||||
</template>
|
||||
@@ -63,7 +63,7 @@
|
||||
label="预留"
|
||||
width="180px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<el-input-number style="width: 80%" v-model="scope.row.needStudentOverNum" :min="0" :max="999"
|
||||
@change="updateMajor(scope.row)"></el-input-number>
|
||||
</template>
|
||||
@@ -76,7 +76,7 @@
|
||||
label="录取线"
|
||||
width="180px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<el-input-number style="width: 80%" v-model="scope.row.scoreLine" :min="0" :max="999"
|
||||
@change="updateMajor(scope.row)"></el-input-number>
|
||||
</template>
|
||||
@@ -86,7 +86,7 @@
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="生源">
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<el-select v-model="scope.row.degreeOfEducation" placeholder="请选择生源" style=" width: 100%;text-align:center" multiple
|
||||
@change="updateMajor(scope.row)">
|
||||
<el-option
|
||||
@@ -104,124 +104,140 @@
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {list, delObj} from '@/api/recruit/recruitplanmajor'
|
||||
import {putObj} from '@/api/recruit/recruitstudentplan'
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
||||
import { ElNotification } from 'element-plus'
|
||||
import { list, delObj } from '@/api/recruit/recruitplanmajor'
|
||||
import { putObj } from '@/api/recruit/recruitstudentplan'
|
||||
import { fetchSecondTree } from "@/api/basic/basicdept"
|
||||
import { getDictByType } from "@/api/contract/contract"
|
||||
|
||||
import {mapGetters} from 'vuex'
|
||||
import global from '@/components/tools/commondict'
|
||||
import {fetchSecondTree} from "@/api/basic/basicdept";
|
||||
import {getDictByType} from "@/api/contract/contract";
|
||||
// 消息提示 hooks
|
||||
const message = useMessage()
|
||||
const messageBox = useMessageBox()
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataForm: {
|
||||
groupId: "",
|
||||
groupName: "",
|
||||
deptCode: "11",
|
||||
},
|
||||
activiName: "11",
|
||||
global: global,
|
||||
dataList: [],
|
||||
deptList: [],
|
||||
degreeOfEducationList:[],
|
||||
dataListLoading: false,
|
||||
visible: false,
|
||||
tableLoading: false,
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['permissions'])
|
||||
},
|
||||
methods: {
|
||||
init(row) {
|
||||
this.visible = true;
|
||||
this.dataForm.deptCode = "11";
|
||||
this.dataForm.groupName = row.groupName;
|
||||
this.dataForm.groupId = row.id;
|
||||
this.initData()
|
||||
this.getDepartment();
|
||||
this.getDataList()
|
||||
},
|
||||
initData(){
|
||||
this.degreeOfEducationList=[];
|
||||
//获取数据字典
|
||||
getDictByType("finance_student_source").then(res => {
|
||||
this.degreeOfEducationList = res.data.data
|
||||
})
|
||||
},
|
||||
getDepartment() {
|
||||
fetchSecondTree().then(res => {
|
||||
this.deptList = res.data.data
|
||||
})
|
||||
},
|
||||
updateMajor(row) {
|
||||
if(row.degreeOfEducation.length!=0){
|
||||
row.degreeOfEducations = row.degreeOfEducation.join(",");
|
||||
}else{
|
||||
row.degreeOfEducations="";
|
||||
// 表单引用
|
||||
const dataFormRef = ref()
|
||||
|
||||
// 响应式数据
|
||||
const visible = ref(false)
|
||||
const activiName = ref("11")
|
||||
const dataList = ref<any[]>([])
|
||||
const deptList = ref<any[]>([])
|
||||
const degreeOfEducationList = ref<any[]>([])
|
||||
const dataListLoading = ref(false)
|
||||
|
||||
const dataForm = reactive({
|
||||
groupId: "",
|
||||
groupName: "",
|
||||
deptCode: "11",
|
||||
})
|
||||
|
||||
// 初始化数据
|
||||
const initData = () => {
|
||||
degreeOfEducationList.value = []
|
||||
// 获取数据字典
|
||||
getDictByType("finance_student_source").then((res: any) => {
|
||||
degreeOfEducationList.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取部门列表
|
||||
const getDepartment = () => {
|
||||
fetchSecondTree().then((res: any) => {
|
||||
deptList.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新专业
|
||||
const updateMajor = (row: any) => {
|
||||
if (row.degreeOfEducation && row.degreeOfEducation.length != 0) {
|
||||
row.degreeOfEducations = row.degreeOfEducation.join(",")
|
||||
} else {
|
||||
row.degreeOfEducations = ""
|
||||
}
|
||||
putObj({
|
||||
id: row.planId,
|
||||
planStudentNum: row.planStudentNum,
|
||||
planStudentBoyNum: row.planStudentBoyNum,
|
||||
planStudentGirlNum: row.planStudentGirlNum,
|
||||
needStudentNum: row.needStudentNum,
|
||||
needStudentOverNum: row.needStudentOverNum,
|
||||
scoreLine: row.scoreLine,
|
||||
scoreMinLine: row.scoreMinLine,
|
||||
degreeOfEducations: row.degreeOfEducations
|
||||
}).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '修改成功'
|
||||
})
|
||||
}).catch(() => {
|
||||
// 错误处理
|
||||
})
|
||||
}
|
||||
|
||||
// 标签切换
|
||||
const handleChange = (tab: any) => {
|
||||
dataForm.deptCode = tab.name
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 获取数据列表
|
||||
const getDataList = () => {
|
||||
dataList.value = []
|
||||
dataListLoading.value = true
|
||||
if (dataForm.deptCode == '') {
|
||||
dataForm.deptCode = "11"
|
||||
}
|
||||
list({ groupId: dataForm.groupId, deptCode: dataForm.deptCode }).then((response: any) => {
|
||||
dataList.value = response.data
|
||||
dataList.value.forEach(e => {
|
||||
if (e.degreeOfEducation) {
|
||||
e.degreeOfEducation = e.degreeOfEducation.split(",")
|
||||
}
|
||||
putObj({
|
||||
id: row.planId,
|
||||
planStudentNum: row.planStudentNum,
|
||||
planStudentBoyNum: row.planStudentBoyNum,
|
||||
planStudentGirlNum: row.planStudentGirlNum,
|
||||
needStudentNum: row.needStudentNum,
|
||||
needStudentOverNum:row.needStudentOverNum,
|
||||
scoreLine: row.scoreLine,
|
||||
scoreMinLine: row.scoreMinLine,
|
||||
degreeOfEducations: row.degreeOfEducations
|
||||
}).then(res => {
|
||||
this.$notify.success('修改成功')
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
handleChange(tab, event) {
|
||||
this.dataForm.deptCode = tab.name;
|
||||
this.getDataList()
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataList = []
|
||||
this.dataListLoading = true
|
||||
if (this.dataForm.deptCode == '') {
|
||||
this.dataForm.deptCode = "11";
|
||||
}
|
||||
list({groupId: this.dataForm.groupId, deptCode: this.dataForm.deptCode}).then(response => {
|
||||
this.dataList = response.data.data
|
||||
this.dataList.forEach(e=>{
|
||||
if(e.degreeOfEducation){
|
||||
e.degreeOfEducation = e.degreeOfEducation.split(",")
|
||||
}
|
||||
})
|
||||
})
|
||||
this.dataListLoading = false
|
||||
},
|
||||
})
|
||||
dataListLoading.value = false
|
||||
}).catch(() => {
|
||||
dataListLoading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
deleteHandle(id) {
|
||||
this.$confirm('是否确认删除本条数据?请谨慎操作', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function () {
|
||||
return delObj(id)
|
||||
}).then(data => {
|
||||
this.$message.success('删除成功')
|
||||
this.getDataList()
|
||||
})
|
||||
}
|
||||
// 删除
|
||||
const deleteHandle = async (id: string) => {
|
||||
try {
|
||||
await messageBox.confirm('是否确认删除本条数据?请谨慎操作')
|
||||
await delObj(id)
|
||||
message.success('删除成功')
|
||||
getDataList()
|
||||
} catch {
|
||||
// 用户取消
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
// 初始化方法
|
||||
const init = (row: any) => {
|
||||
visible.value = true
|
||||
dataForm.deptCode = "11"
|
||||
dataForm.groupName = row.groupName
|
||||
dataForm.groupId = row.id
|
||||
initData()
|
||||
getDepartment()
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
init,
|
||||
deleteHandle
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.avue-crud {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="140px">
|
||||
v-model="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataFormRef" @keyup.enter="dataFormSubmit" label-width="140px">
|
||||
|
||||
<el-form-item label="招生计划名称" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划" size="small" style="width: 100%;" :disabled="!dataForm.id ? false : true">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="招生计划名称" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划" size="small" style="width: 100%;" :disabled="!!dataForm.id">
|
||||
<el-option
|
||||
v-for="item in planListLocal"
|
||||
:key="item.id"
|
||||
:label="item.groupName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="姓名"></el-input>
|
||||
</el-form-item>
|
||||
@@ -25,7 +25,7 @@
|
||||
<el-input v-model="dataForm.idCard" placeholder="身份证"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="gender">
|
||||
<el-select v-model="dataForm.gender" style="width: 100%" >
|
||||
<el-select v-model="dataForm.gender" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in sexyList"
|
||||
:key="item.value"
|
||||
@@ -38,20 +38,10 @@
|
||||
<el-input v-model="dataForm.admission" placeholder="准考证"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="中考成绩" prop="achievement">
|
||||
<el-input-number v-model="dataForm.achievement" :min=0 :max=700 placeholder="中考成绩" style="width: 100%"></el-input-number>
|
||||
<el-input-number v-model="dataForm.achievement" :min="0" :max="700" placeholder="中考成绩" style="width: 100%"></el-input-number>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="联系人" prop="contactsNo">-->
|
||||
<!-- <el-select v-model="dataForm.contactsNo" filterable clearable placeholder="" size="small" style="width: 100%" >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in contactNameList"-->
|
||||
<!-- :key="item.teacherNo"-->
|
||||
<!-- :label="item.realName+'-'+item.deptCode"-->
|
||||
<!-- :value="item.teacherNo">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="对接人" prop="djUser" v-if="permissions.recruit_recruitprestudent_dj_sure">
|
||||
<el-select v-model="dataForm.djUser" filterable clearable placeholder="" size="small" style="width: 100%" >
|
||||
<el-select v-model="dataForm.djUser" filterable clearable placeholder="" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in contactNameList"
|
||||
:key="item.teacherNo"
|
||||
@@ -61,7 +51,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="学校" prop="schoolId">
|
||||
<el-select v-model="dataForm.schoolId" filterable placeholder="请选择学校" size="small" style="width: 100%;" >
|
||||
<el-select v-model="dataForm.schoolId" filterable placeholder="请选择学校" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in schoolList"
|
||||
:key="item.id"
|
||||
@@ -72,7 +62,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业1" prop="planMajorOne">
|
||||
<el-select v-model="dataForm.planMajorOne" filterable placeholder="请选择拟报专业1" size="small" style="width: 100%;" >
|
||||
<el-select v-model="dataForm.planMajorOne" filterable placeholder="请选择拟报专业1" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
@@ -84,8 +74,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟报专业2" prop="planMajorTwo">
|
||||
<el-select v-model="dataForm.planMajorTwo" filterable clearable placeholder="请选择拟报专业2" size="small" style="width: 100%;"
|
||||
>
|
||||
<el-select v-model="dataForm.planMajorTwo" filterable clearable placeholder="请选择拟报专业2" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
@@ -97,7 +86,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟报专业3" prop="planMajorThree">
|
||||
<el-select v-model="dataForm.planMajorThree" filterable clearable placeholder="请选择拟报专业3" size="small" style="width: 100%;" >
|
||||
<el-select v-model="dataForm.planMajorThree" filterable clearable placeholder="请选择拟报专业3" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
@@ -109,7 +98,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟报专业4" prop="planMajorFour">
|
||||
<el-select v-model="dataForm.planMajorFour" filterable clearable placeholder="请选择拟报专业4" size="small" style="width: 100%;" >
|
||||
<el-select v-model="dataForm.planMajorFour" filterable clearable placeholder="请选择拟报专业4" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
@@ -121,7 +110,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拟报专业5" prop="planMajorFive">
|
||||
<el-select v-model="dataForm.planMajorFive" filterable clearable placeholder="请选择拟报专业5" size="small" style="width: 100%;" >
|
||||
<el-select v-model="dataForm.planMajorFive" filterable clearable placeholder="请选择拟报专业5" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
@@ -134,7 +123,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业6" prop="planMajorSix">
|
||||
<el-select v-model="dataForm.planMajorSix" filterable clearable placeholder="请选择拟报专业6" size="small" style="width: 100%;" >
|
||||
<el-select v-model="dataForm.planMajorSix" filterable clearable placeholder="请选择拟报专业6" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
@@ -147,7 +136,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业7" prop="planMajorSeven">
|
||||
<el-select v-model="dataForm.planMajorSeven" filterable clearable placeholder="请选择拟报专业5" size="small" style="width: 100%;" >
|
||||
<el-select v-model="dataForm.planMajorSeven" filterable clearable placeholder="请选择拟报专业7" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
@@ -160,7 +149,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业8" prop="planMajorEight">
|
||||
<el-select v-model="dataForm.planMajorEight" filterable clearable placeholder="请选择拟报专业8" size="small" style="width: 100%;" >
|
||||
<el-select v-model="dataForm.planMajorEight" filterable clearable placeholder="请选择拟报专业8" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
@@ -173,7 +162,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业9" prop="planMajorNine">
|
||||
<el-select v-model="dataForm.planMajorNine" filterable clearable placeholder="请选择拟报专业9" size="small" style="width: 100%;" >
|
||||
<el-select v-model="dataForm.planMajorNine" filterable clearable placeholder="请选择拟报专业9" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
@@ -186,7 +175,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业10" prop="planMajorTen">
|
||||
<el-select v-model="dataForm.planMajorTen" filterable clearable placeholder="请选择拟报专业10" size="small" style="width: 100%;" >
|
||||
<el-select v-model="dataForm.planMajorTen" filterable clearable placeholder="请选择拟报专业10" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
@@ -199,7 +188,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业11" prop="planMajorEleven">
|
||||
<el-select v-model="dataForm.planMajorEleven" filterable clearable placeholder="请选择拟报专业11" size="small" style="width: 100%;" >
|
||||
<el-select v-model="dataForm.planMajorEleven" filterable clearable placeholder="请选择拟报专业11" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
@@ -212,7 +201,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="拟报专业12" prop="planMajorTwelve">
|
||||
<el-select v-model="dataForm.planMajorTwelve" filterable clearable placeholder="请选择拟报专业12" size="small" style="width: 100%;" >
|
||||
<el-select v-model="dataForm.planMajorTwelve" filterable clearable placeholder="请选择拟报专业12" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in planMajorList"
|
||||
:key="item.id"
|
||||
@@ -225,171 +214,223 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit" v-if="canSubmit">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getObj,addObjStu,putObj} from '@/api/recruit/recruitprestudent'
|
||||
import {queryAllTeacherByRecruit} from "@/api/professional/teacherbase";
|
||||
import {mapGetters} from "vuex";
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
export default {
|
||||
props:["planList","planMajorList","schoolList"],
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
contactNameList:[],
|
||||
sexyList: [
|
||||
{
|
||||
label: '男',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '女',
|
||||
value: '2'
|
||||
}
|
||||
],
|
||||
dataForm: {
|
||||
groupId:"",
|
||||
name:"",
|
||||
gender:"",
|
||||
phone:"",
|
||||
idCard:"",
|
||||
schoolId:"",
|
||||
planMajorOne:"",
|
||||
planMajorTwo:"",
|
||||
planMajorThree:"",
|
||||
planMajorFour:"",
|
||||
planMajorFive:"",
|
||||
planMajorSix:"",
|
||||
planMajorSeven:"",
|
||||
planMajorEight:"",
|
||||
planMajorNine:"",
|
||||
planMajorTen:"",
|
||||
planMajorEleven:"",
|
||||
planMajorTwelve:"",
|
||||
admission:"",
|
||||
achievement:"",
|
||||
contactsNo:"",
|
||||
djUser:""
|
||||
},
|
||||
dataRule: {
|
||||
planMajorOne: [
|
||||
{ required: true, message: '拟报专业1不能为空', trigger: 'blur' }
|
||||
],
|
||||
groupId: [
|
||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '姓名不能为空', trigger: 'blur' },
|
||||
{ min: 1,max:20, message: "姓名长度最多20位", trigger: "blur" }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: '电话不能为空', trigger: 'blur' },
|
||||
{ min: 11,max:11, message: "电话号码长度为11位", trigger: "blur" }
|
||||
],
|
||||
gender: [
|
||||
{ required: true, message: '性别不能为空', trigger: 'blur' }
|
||||
],
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, computed, nextTick } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useUserInfo } from '/@/stores/userInfo'
|
||||
import { ElNotification } from 'element-plus'
|
||||
import { getObj, addObjStu, putObj } from '@/api/recruit/recruitprestudent'
|
||||
import { queryAllTeacherByRecruit } from "@/api/professional/teacherbase"
|
||||
import { list } from "@/api/recruit/recruitstudentplangroup"
|
||||
|
||||
schoolId: [
|
||||
{ required: true, message: '学校不能为空', trigger: 'blur' }
|
||||
],
|
||||
// admission: [
|
||||
// { required: true, message: '准考证不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
// achievement: [
|
||||
// { required: true, message: '中考成绩不能为空', trigger: 'blur' }
|
||||
// ],
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['permissions'])
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
let _this = this;
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
queryAllTeacherByRecruit().then(res =>{
|
||||
this.contactNameList = res.data.data
|
||||
});
|
||||
if (this.dataForm.id) {
|
||||
// Props
|
||||
const props = defineProps<{
|
||||
planList?: any[]
|
||||
planMajorList?: any[]
|
||||
schoolList?: any[]
|
||||
}>()
|
||||
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
_this.dataForm = response.data.data
|
||||
_this.dataForm.year = this.dataForm.year+"";
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'refreshDataList'): void
|
||||
}>()
|
||||
|
||||
})
|
||||
// 使用 Pinia store
|
||||
const userInfoStore = useUserInfo()
|
||||
const { userInfos } = storeToRefs(userInfoStore)
|
||||
|
||||
}else {
|
||||
list().then(data => {
|
||||
_this.planList = data.data.data
|
||||
_this.dataForm.groupId = _this.planList[0].id;
|
||||
})
|
||||
}
|
||||
// 创建权限对象
|
||||
const permissions = computed(() => {
|
||||
const perms: Record<string, boolean> = {}
|
||||
userInfos.value.authBtnList.forEach((perm: string) => {
|
||||
perms[perm] = true
|
||||
})
|
||||
return perms
|
||||
})
|
||||
|
||||
// 表单引用
|
||||
const dataFormRef = ref()
|
||||
|
||||
// 响应式数据
|
||||
const visible = ref(false)
|
||||
const canSubmit = ref(false)
|
||||
const contactNameList = ref<any[]>([])
|
||||
const planListLocal = ref<any[]>([])
|
||||
|
||||
const sexyList = [
|
||||
{
|
||||
label: '男',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '女',
|
||||
value: '2'
|
||||
}
|
||||
]
|
||||
|
||||
const dataForm = reactive({
|
||||
id: "",
|
||||
groupId: "",
|
||||
name: "",
|
||||
gender: "",
|
||||
phone: "",
|
||||
idCard: "",
|
||||
schoolId: "",
|
||||
planMajorOne: "",
|
||||
planMajorTwo: "",
|
||||
planMajorThree: "",
|
||||
planMajorFour: "",
|
||||
planMajorFive: "",
|
||||
planMajorSix: "",
|
||||
planMajorSeven: "",
|
||||
planMajorEight: "",
|
||||
planMajorNine: "",
|
||||
planMajorTen: "",
|
||||
planMajorEleven: "",
|
||||
planMajorTwelve: "",
|
||||
admission: "",
|
||||
achievement: null as number | null,
|
||||
contactsNo: "",
|
||||
djUser: null as string | null,
|
||||
djTime: null as string | null,
|
||||
djName: null as string | null,
|
||||
djDept: null as string | null,
|
||||
isDj: "0",
|
||||
year: ""
|
||||
})
|
||||
|
||||
const dataRule = {
|
||||
planMajorOne: [
|
||||
{ required: true, message: '拟报专业1不能为空', trigger: 'blur' }
|
||||
],
|
||||
groupId: [
|
||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '姓名不能为空', trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: "姓名长度最多20位", trigger: "blur" }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: '电话不能为空', trigger: 'blur' },
|
||||
{ min: 11, max: 11, message: "电话号码长度为11位", trigger: "blur" }
|
||||
],
|
||||
gender: [
|
||||
{ required: true, message: '性别不能为空', trigger: 'blur' }
|
||||
],
|
||||
schoolId: [
|
||||
{ required: true, message: '学校不能为空', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断拟报专业是否已经占用,占用不可选
|
||||
*/
|
||||
const isDisable = (id: string) => {
|
||||
if (id == dataForm.planMajorOne
|
||||
|| id == dataForm.planMajorTwo
|
||||
|| id == dataForm.planMajorThree
|
||||
|| id == dataForm.planMajorFour
|
||||
|| id == dataForm.planMajorFive
|
||||
|| id == dataForm.planMajorSix
|
||||
|| id == dataForm.planMajorSeven
|
||||
|| id == dataForm.planMajorEight
|
||||
|| id == dataForm.planMajorNine
|
||||
|| id == dataForm.planMajorTen
|
||||
|| id == dataForm.planMajorEleven
|
||||
|| id == dataForm.planMajorTwelve
|
||||
) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// 表单提交
|
||||
const dataFormSubmit = () => {
|
||||
dataFormRef.value?.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
canSubmit.value = false
|
||||
if (dataForm.id) {
|
||||
putObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '修改成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
},
|
||||
isDisable(id){
|
||||
if(id==this.dataForm.planMajorOne
|
||||
||id==this.dataForm.planMajorTwo
|
||||
||id==this.dataForm.planMajorThree
|
||||
||id==this.dataForm.planMajorFour
|
||||
||id==this.dataForm.planMajorFive
|
||||
||id==this.dataForm.planMajorSix
|
||||
||id==this.dataForm.planMajorSeven
|
||||
||id==this.dataForm.planMajorEight
|
||||
||id==this.dataForm.planMajorNine
|
||||
||id==this.dataForm.planMajorTen
|
||||
||id==this.dataForm.planMajorEleven
|
||||
||id==this.dataForm.planMajorTwelve
|
||||
){
|
||||
return true
|
||||
}else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
if (this.dataForm.id) {
|
||||
putObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
this.dataForm.djUser=null;
|
||||
this.dataForm.djTime=null;
|
||||
this.dataForm.djName=null;
|
||||
this.dataForm.djDept=null;
|
||||
this.dataForm.isDj="0";
|
||||
addObjStu(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dataForm.djUser = null
|
||||
dataForm.djTime = null
|
||||
dataForm.djName = null
|
||||
dataForm.djDept = null
|
||||
dataForm.isDj = "0"
|
||||
addObjStu(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '添加成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化方法
|
||||
const init = (id: string | null) => {
|
||||
dataForm.id = id || ""
|
||||
visible.value = true
|
||||
canSubmit.value = true
|
||||
|
||||
// 初始化 planListLocal,优先使用 props,如果没有则使用空数组
|
||||
planListLocal.value = props.planList ? [...props.planList] : []
|
||||
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields()
|
||||
queryAllTeacherByRecruit().then((res: any) => {
|
||||
contactNameList.value = res.data
|
||||
})
|
||||
if (dataForm.id) {
|
||||
getObj(dataForm.id).then((response: any) => {
|
||||
Object.assign(dataForm, response.data)
|
||||
if (dataForm.year) {
|
||||
dataForm.year = String(dataForm.year)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
list().then((data: any) => {
|
||||
planListLocal.value = data.data
|
||||
if (planListLocal.value.length > 0) {
|
||||
dataForm.groupId = planListLocal.value[0].id
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -267,8 +267,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
records: response.data.records,
|
||||
total: response.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -283,18 +283,18 @@ const init = async () => {
|
||||
try {
|
||||
// 获取部门列表
|
||||
const deptData = await getDeptListByLevelTwo()
|
||||
deptList.value = deptData.data.data || []
|
||||
deptList.value = deptData.data || []
|
||||
|
||||
// 获取招生计划列表
|
||||
const planData = await list()
|
||||
planList.value = planData.data.data || []
|
||||
planList.value = planData.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
await getMajor(queryForm.groupId)
|
||||
|
||||
// 获取学校列表
|
||||
const schoolData = await schoolListApi({ groupId: queryForm.groupId })
|
||||
schoolList.value = schoolData.data.data || []
|
||||
schoolList.value = schoolData.data || []
|
||||
}
|
||||
|
||||
getDataList()
|
||||
@@ -308,7 +308,7 @@ const changeG = async () => {
|
||||
if (queryForm.groupId) {
|
||||
await getMajor(queryForm.groupId)
|
||||
const schoolData = await schoolListApi({ groupId: queryForm.groupId })
|
||||
schoolList.value = schoolData.data.data || []
|
||||
schoolList.value = schoolData.data || []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ const changeG = async () => {
|
||||
const getMajor = async (groupId: string) => {
|
||||
try {
|
||||
const data = await listcz({ groupId })
|
||||
planMajorList.value = data.data.data || []
|
||||
planMajorList.value = data.data || []
|
||||
getDataList()
|
||||
} catch (error) {
|
||||
console.error('获取专业列表失败', error)
|
||||
|
||||
@@ -84,8 +84,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await fetchListStatic(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data || [],
|
||||
total: response.data.data?.length || 0
|
||||
records: response.data || [],
|
||||
total: response.data?.length || 0
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -99,7 +99,7 @@ const { getDataList, tableStyle, downBlobFile } = useTable(state)
|
||||
const init = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
planList.value = data.data.data || []
|
||||
planList.value = data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
getDataList()
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="140px">
|
||||
v-model="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataFormRef" @keyup.enter="dataFormSubmit" label-width="140px">
|
||||
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable :disabled="!dataForm.id ? false : true" placeholder="请选择招生计划" size="small" style="width: 100%">
|
||||
<el-select v-model="dataForm.groupId" filterable :disabled="!!dataForm.id" placeholder="请选择招生计划" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
@@ -23,101 +23,125 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit" v-if="canSubmit">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addObj, getObj, putObj} from '@/api/recruit/recruitschoolcode'
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, nextTick } from 'vue'
|
||||
import { ElNotification } from 'element-plus'
|
||||
import { addObj, getObj, putObj } from '@/api/recruit/recruitschoolcode'
|
||||
import { list } from "@/api/recruit/recruitstudentplangroup"
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
id:"",
|
||||
groupId:"",
|
||||
schoolName:"",
|
||||
schoolCode:"",
|
||||
},
|
||||
disabled:false,
|
||||
planList: [],
|
||||
areaList:[],
|
||||
deptList:[],
|
||||
dataRule: {
|
||||
groupId: [
|
||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' },
|
||||
],
|
||||
schoolName: [
|
||||
{ required: true, message: '学校名称不能为空', trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: '学校名称长度不大于20个字符', trigger: 'blur' }
|
||||
],
|
||||
schoolCode: [
|
||||
{ required: true, message: '学校代码不能为空', trigger: 'blur' },
|
||||
{ min: 4, max: 4, message: '学校代码长度为4个字符', trigger: 'blur' }
|
||||
],
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'refreshDataList'): void
|
||||
}>()
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.initData();
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
this.dataForm.area = this.dataForm.area+"";
|
||||
})
|
||||
}else{
|
||||
this.disabled = true;
|
||||
}
|
||||
// 表单引用
|
||||
const dataFormRef = ref()
|
||||
|
||||
// 响应式数据
|
||||
const visible = ref(false)
|
||||
const canSubmit = ref(false)
|
||||
const planList = ref<any[]>([])
|
||||
|
||||
const dataForm = reactive({
|
||||
id: "",
|
||||
groupId: "",
|
||||
schoolName: "",
|
||||
schoolCode: "",
|
||||
area: ""
|
||||
})
|
||||
|
||||
const dataRule = {
|
||||
groupId: [
|
||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' },
|
||||
],
|
||||
schoolName: [
|
||||
{ required: true, message: '学校名称不能为空', trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: '学校名称长度不大于20个字符', trigger: 'blur' }
|
||||
],
|
||||
schoolCode: [
|
||||
{ required: true, message: '学校代码不能为空', trigger: 'blur' },
|
||||
{ min: 4, max: 4, message: '学校代码长度为4个字符', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
|
||||
// 初始化数据
|
||||
const initData = () => {
|
||||
list().then((data: any) => {
|
||||
planList.value = data.data
|
||||
if (!dataForm.id) {
|
||||
dataForm.groupId = planList.value[0]?.id || ""
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 表单提交
|
||||
const dataFormSubmit = () => {
|
||||
dataFormRef.value?.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
canSubmit.value = false
|
||||
if (dataForm.id) {
|
||||
putObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '修改成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
list().then(data =>{
|
||||
this.planList = data.data.data
|
||||
if(!this.dataForm.id){
|
||||
this.dataForm.groupId=this.planList[0].id
|
||||
}
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
if (this.dataForm.id) {
|
||||
putObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addObj(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
addObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '添加成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化方法
|
||||
const init = (id: string | null) => {
|
||||
dataForm.id = id || ""
|
||||
visible.value = true
|
||||
canSubmit.value = true
|
||||
initData()
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields()
|
||||
if (dataForm.id) {
|
||||
getObj(dataForm.id).then((response: any) => {
|
||||
Object.assign(dataForm, response.data)
|
||||
if (dataForm.area) {
|
||||
dataForm.area = String(dataForm.area)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -233,8 +233,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
records: response.data.records,
|
||||
total: response.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -248,7 +248,7 @@ const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTa
|
||||
const init = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
planList.value = data.data.data || []
|
||||
planList.value = data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
@@ -303,13 +303,13 @@ const submitUpload = async () => {
|
||||
}
|
||||
})
|
||||
|
||||
if (res.data.data === 'fail') {
|
||||
if (res.data === 'fail') {
|
||||
message.error('请上传正确的学校代码模板')
|
||||
return
|
||||
}
|
||||
if (res.data && res.data.data === 0) {
|
||||
if (res.data && res.data === 0) {
|
||||
message.error(res.data.msg)
|
||||
} else if (res.data && res.data.data === 10) {
|
||||
} else if (res.data && res.data === 10) {
|
||||
message.error(res.data.msg)
|
||||
} else {
|
||||
message.success('操作成功')
|
||||
|
||||
@@ -234,8 +234,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
records: response.data.records,
|
||||
total: response.data.total
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||
v-model="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataFormRef" @keyup.enter="dataFormSubmit"
|
||||
label-width="140px">
|
||||
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划" size="small" style="width: 100%" :disabled="!dataForm.id ? false : true">
|
||||
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划" size="small" style="width: 100%" :disabled="!!dataForm.id">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
@@ -17,7 +17,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="地区" prop="regionId">
|
||||
<el-select v-model="dataForm.regionId" filterable placeholder="请选择地区" size="small" style="width: 100%" >
|
||||
<el-select v-model="dataForm.regionId" filterable placeholder="请选择地区" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in regionList"
|
||||
:key="item.code"
|
||||
@@ -31,99 +31,127 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit" v-if="canSubmit">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addObj, getObj, putObj} from '@/api/recruit/recruitstudentplancorrectscoreconfig'
|
||||
import {areaList} from "@/api/recruit/recruitstudentschool";
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, nextTick } from 'vue'
|
||||
import { ElNotification } from 'element-plus'
|
||||
import { addObj, getObj, putObj } from '@/api/recruit/recruitstudentplancorrectscoreconfig'
|
||||
import { areaList } from "@/api/recruit/recruitstudentschool"
|
||||
import { list } from "@/api/recruit/recruitstudentplangroup"
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
id: "",
|
||||
groupId: "",
|
||||
regionId:"",
|
||||
fullScore:""
|
||||
},
|
||||
regionList:[],
|
||||
planList:[],
|
||||
dataRule: {
|
||||
groupId: [
|
||||
{required: true, message: '招生计划不能为空', trigger: 'blur'}
|
||||
],
|
||||
regionId:[
|
||||
{required: true, message: '地区不能为空', trigger: 'blur'}
|
||||
],
|
||||
fullScore:[
|
||||
{required: true, message: '分数线不能为空', trigger: 'blur'}
|
||||
],
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'refreshDataList'): void
|
||||
}>()
|
||||
|
||||
// 表单引用
|
||||
const dataFormRef = ref()
|
||||
|
||||
// 响应式数据
|
||||
const visible = ref(false)
|
||||
const canSubmit = ref(false)
|
||||
const regionList = ref<any[]>([])
|
||||
const planList = ref<any[]>([])
|
||||
|
||||
const dataForm = reactive({
|
||||
id: "",
|
||||
groupId: "",
|
||||
regionId: "",
|
||||
fullScore: null as number | null,
|
||||
regionName: ""
|
||||
})
|
||||
|
||||
const dataRule = {
|
||||
groupId: [
|
||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' }
|
||||
],
|
||||
regionId: [
|
||||
{ required: true, message: '地区不能为空', trigger: 'blur' }
|
||||
],
|
||||
fullScore: [
|
||||
{ required: true, message: '分数线不能为空', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
|
||||
// 初始化数据
|
||||
const initData = () => {
|
||||
list().then((data: any) => {
|
||||
planList.value = data.data
|
||||
})
|
||||
areaList({ type: "0", parentId: "11" }).then((data: any) => {
|
||||
regionList.value = data.data
|
||||
})
|
||||
}
|
||||
|
||||
// 表单提交
|
||||
const dataFormSubmit = () => {
|
||||
dataFormRef.value?.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
canSubmit.value = false
|
||||
regionList.value.forEach(e => {
|
||||
if (e.code == dataForm.regionId) {
|
||||
dataForm.regionName = e.name
|
||||
}
|
||||
})
|
||||
if (dataForm.id) {
|
||||
putObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '修改成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
} else {
|
||||
addObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '添加成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
init(id) {
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.$nextTick(() => {
|
||||
this.initData();
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
list().then(data => {
|
||||
this.planList = data.data.data
|
||||
});
|
||||
areaList({type:"0",parentId:"11"}).then(data =>{
|
||||
this.regionList = data.data.data;
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
this.regionList.forEach(e=>{
|
||||
if(e.code == this.dataForm.regionId){
|
||||
this.dataForm.regionName =e.name;
|
||||
}
|
||||
});
|
||||
if (this.dataForm.id) {
|
||||
putObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addObj(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化方法
|
||||
const init = (id: string | null) => {
|
||||
dataForm.id = id || ""
|
||||
visible.value = true
|
||||
canSubmit.value = true
|
||||
nextTick(() => {
|
||||
initData()
|
||||
dataFormRef.value?.resetFields()
|
||||
if (dataForm.id) {
|
||||
getObj(dataForm.id).then((response: any) => {
|
||||
Object.assign(dataForm, response.data)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -160,8 +160,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
records: response.data.records,
|
||||
total: response.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -175,7 +175,7 @@ const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTa
|
||||
const init = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
planList.value = data.data.data || []
|
||||
planList.value = data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
|
||||
@@ -166,8 +166,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
records: response.data.records,
|
||||
total: response.data.total
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,40 +2,68 @@
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="140px">
|
||||
<el-form-item label="年份" prop="year">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="dataForm.year"
|
||||
type="year"
|
||||
format="yyyy"
|
||||
value-format="yyyy"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="招生计划名称" prop="groupName">
|
||||
<el-input v-model="dataForm.groupName" placeholder="招生计划名称"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="报名开始时间" prop="startDate" >
|
||||
<el-date-picker v-model="dataForm.startDate" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" filterable clearable style="width: 100%"
|
||||
:picker-options="startDatePicker" type="datetime" ></el-date-picker>
|
||||
v-model="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataFormRef" @keyup.enter="dataFormSubmit" label-width="140px">
|
||||
<el-form-item label="年份" prop="year">
|
||||
<el-date-picker
|
||||
style="width: 100%"
|
||||
v-model="dataForm.year"
|
||||
type="year"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="报名截止时间" prop="endDate" >
|
||||
<el-date-picker v-model="dataForm.endDate" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" filterable clearable style="width: 100%"
|
||||
:picker-options="endDatePicker" type="datetime" ></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="维护开始时间" prop="maintenanceStartDate" >
|
||||
<el-date-picker v-model="dataForm.maintenanceStartDate" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" filterable clearable style="width: 100%"
|
||||
:picker-options="maintenanceStartDatePicker" type="datetime" ></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="维护结束时间" prop="maintenanceEndDate" >
|
||||
<el-date-picker v-model="dataForm.maintenanceEndDate" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" filterable clearable style="width: 100%"
|
||||
:picker-options="maintenanceEndDatePicker" type="datetime" ></el-date-picker>
|
||||
<el-form-item label="招生计划名称" prop="groupName">
|
||||
<el-input v-model="dataForm.groupName" placeholder="招生计划名称"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="初中生报名" prop="czSignStart" >
|
||||
<el-select v-model="dataForm.czSignStart" placeholder="请选择初中生报名" style=" width: 100%">
|
||||
<el-form-item label="报名开始时间" prop="startDate">
|
||||
<el-date-picker
|
||||
v-model="dataForm.startDate"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
:disabled-date="startDateDisabledDate"
|
||||
type="datetime"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="报名截止时间" prop="endDate">
|
||||
<el-date-picker
|
||||
v-model="dataForm.endDate"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
:disabled-date="endDateDisabledDate"
|
||||
type="datetime"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="维护开始时间" prop="maintenanceStartDate">
|
||||
<el-date-picker
|
||||
v-model="dataForm.maintenanceStartDate"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
:disabled-date="maintenanceStartDateDisabledDate"
|
||||
type="datetime"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="维护结束时间" prop="maintenanceEndDate">
|
||||
<el-date-picker
|
||||
v-model="dataForm.maintenanceEndDate"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
:disabled-date="maintenanceEndDateDisabledDate"
|
||||
type="datetime"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="初中生报名" prop="czSignStart">
|
||||
<el-select v-model="dataForm.czSignStart" placeholder="请选择初中生报名" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in yesNoList"
|
||||
:key="item.value"
|
||||
@@ -44,8 +72,8 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="高中生报名" prop="gzSignStart" >
|
||||
<el-select v-model="dataForm.gzSignStart" placeholder="请选择初中生报名" style=" width: 100%">
|
||||
<el-form-item label="高中生报名" prop="gzSignStart">
|
||||
<el-select v-model="dataForm.gzSignStart" placeholder="请选择高中生报名" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in yesNoList"
|
||||
:key="item.value"
|
||||
@@ -54,8 +82,8 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="技职校报名" prop="jzxSignStart" >
|
||||
<el-select v-model="dataForm.jzxSignStart" placeholder="请选择初中生报名" style=" width: 100%">
|
||||
<el-form-item label="技职校报名" prop="jzxSignStart">
|
||||
<el-select v-model="dataForm.jzxSignStart" placeholder="请选择技职校报名" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in yesNoList"
|
||||
:key="item.value"
|
||||
@@ -66,160 +94,172 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit" v-if="canSubmit">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addObj, getObj, putObj} from '@/api/recruit/recruitstudentplangroup'
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, nextTick, computed } from 'vue'
|
||||
import { ElNotification } from 'element-plus'
|
||||
import { addObj, getObj, putObj } from '@/api/recruit/recruitstudentplangroup'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
startDatePicker: this.beginDate(),
|
||||
endDatePicker: this.processDate(),
|
||||
maintenanceStartDatePicker: this.mainBeginDate(),
|
||||
maintenanceEndDatePicker: this.mainEndDate(),
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
year:"",
|
||||
groupName:"",
|
||||
startDate:"",
|
||||
endDate:"",
|
||||
maintenanceStartDate:"",
|
||||
maintenanceEndDate:"",
|
||||
feeAgency:0,
|
||||
czSignStart:"",
|
||||
gzSignStart:"",
|
||||
jzxSignStart:""
|
||||
},
|
||||
yesNoList:[{"label": "否", "value": "0"},{"label": "是", "value": "1"}],
|
||||
dataRule: {
|
||||
year: [
|
||||
{ required: true, message: '年份不能为空', trigger: 'blur' }
|
||||
],
|
||||
groupName: [
|
||||
{ required: true, message: '招生计划名称不能为空', trigger: 'blur' },
|
||||
{ min: 0, max: 30, message: '长度在 0 到 30 个字符', trigger: 'blur'}
|
||||
],
|
||||
startDate: [
|
||||
{ required: true, message: '报名开始时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
endDate: [
|
||||
{ required: true, message: '报名截止时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
maintenanceStartDate: [
|
||||
{ required: true, message: '维护开始时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
maintenanceEndDate: [
|
||||
{ required: true, message: '维护截止时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
feeAgency: [
|
||||
{ required: true, message: '代办费不能为空', trigger: 'blur' }
|
||||
],
|
||||
czSignStart: [
|
||||
{ required: true, message: '初中生不能为空', trigger: 'blur' }
|
||||
],
|
||||
gzSignStart: [
|
||||
{ required: true, message: '高中生不能为空', trigger: 'blur' }
|
||||
],
|
||||
jzxSignStart: [
|
||||
{ required: true, message: '技职校不能为空', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'refreshDataList'): void
|
||||
}>()
|
||||
|
||||
beginDate(){
|
||||
const self = this
|
||||
return {
|
||||
disabledDate(time){
|
||||
if (self.dataForm.endDate) { //如果结束时间不为空,则小于结束时间
|
||||
return new Date(self.dataForm.endDate).getTime() < time.getTime()
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
processDate() {
|
||||
const self = this
|
||||
return {
|
||||
disabledDate(time) {
|
||||
if (self.dataForm.startDate) { //如果开始时间不为空,则结束时间大于开始时间
|
||||
return new Date(self.dataForm.startDate).getTime() > time.getTime()
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mainBeginDate(){
|
||||
const self = this
|
||||
return {
|
||||
disabledDate(time){
|
||||
if (self.dataForm.maintenanceEndDate) { //如果结束时间不为空,则小于结束时间
|
||||
return new Date(self.dataForm.maintenanceEndDate).getTime() < time.getTime()
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mainEndDate() {
|
||||
const self = this
|
||||
return {
|
||||
disabledDate(time) {
|
||||
if (self.dataForm.maintenanceStartDate) { //如果开始时间不为空,则结束时间大于开始时间
|
||||
return new Date(self.dataForm.maintenanceStartDate).getTime() > time.getTime()
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
init (id) {
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
this.dataForm.year = this.dataForm.year+"";
|
||||
})
|
||||
}
|
||||
// 表单引用
|
||||
const dataFormRef = ref()
|
||||
|
||||
// 响应式数据
|
||||
const visible = ref(false)
|
||||
const canSubmit = ref(false)
|
||||
|
||||
const yesNoList = [
|
||||
{ label: "否", value: "0" },
|
||||
{ label: "是", value: "1" }
|
||||
]
|
||||
|
||||
const dataForm = reactive({
|
||||
id: "",
|
||||
year: "",
|
||||
groupName: "",
|
||||
startDate: "",
|
||||
endDate: "",
|
||||
maintenanceStartDate: "",
|
||||
maintenanceEndDate: "",
|
||||
feeAgency: 0,
|
||||
czSignStart: "",
|
||||
gzSignStart: "",
|
||||
jzxSignStart: ""
|
||||
})
|
||||
|
||||
const dataRule = {
|
||||
year: [
|
||||
{ required: true, message: '年份不能为空', trigger: 'blur' }
|
||||
],
|
||||
groupName: [
|
||||
{ required: true, message: '招生计划名称不能为空', trigger: 'blur' },
|
||||
{ min: 0, max: 30, message: '长度在 0 到 30 个字符', trigger: 'blur' }
|
||||
],
|
||||
startDate: [
|
||||
{ required: true, message: '报名开始时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
endDate: [
|
||||
{ required: true, message: '报名截止时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
maintenanceStartDate: [
|
||||
{ required: true, message: '维护开始时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
maintenanceEndDate: [
|
||||
{ required: true, message: '维护截止时间不能为空', trigger: 'blur' }
|
||||
],
|
||||
feeAgency: [
|
||||
{ required: true, message: '代办费不能为空', trigger: 'blur' }
|
||||
],
|
||||
czSignStart: [
|
||||
{ required: true, message: '初中生不能为空', trigger: 'blur' }
|
||||
],
|
||||
gzSignStart: [
|
||||
{ required: true, message: '高中生不能为空', trigger: 'blur' }
|
||||
],
|
||||
jzxSignStart: [
|
||||
{ required: true, message: '技职校不能为空', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
|
||||
// 日期选择器的禁用日期函数
|
||||
const startDateDisabledDate = (time: Date) => {
|
||||
if (dataForm.endDate) {
|
||||
return new Date(dataForm.endDate).getTime() < time.getTime()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const endDateDisabledDate = (time: Date) => {
|
||||
if (dataForm.startDate) {
|
||||
return new Date(dataForm.startDate).getTime() > time.getTime()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const maintenanceStartDateDisabledDate = (time: Date) => {
|
||||
if (dataForm.maintenanceEndDate) {
|
||||
return new Date(dataForm.maintenanceEndDate).getTime() < time.getTime()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
const maintenanceEndDateDisabledDate = (time: Date) => {
|
||||
if (dataForm.maintenanceStartDate) {
|
||||
return new Date(dataForm.maintenanceStartDate).getTime() > time.getTime()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 表单提交
|
||||
const dataFormSubmit = () => {
|
||||
dataFormRef.value?.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
canSubmit.value = false
|
||||
if (dataForm.id) {
|
||||
putObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '修改成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
if (this.dataForm.id) {
|
||||
putObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addObj(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
addObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '添加成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化方法
|
||||
const init = (id: string | null) => {
|
||||
dataForm.id = id || ""
|
||||
visible.value = true
|
||||
canSubmit.value = true
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields()
|
||||
if (dataForm.id) {
|
||||
getObj(dataForm.id).then((response: any) => {
|
||||
Object.assign(dataForm, response.data)
|
||||
if (dataForm.year) {
|
||||
dataForm.year = String(dataForm.year)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -239,8 +239,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
records: response.data.records,
|
||||
total: response.data.total
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '新增' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="140px">
|
||||
v-model="visible">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataFormRef" @keyup.enter="dataFormSubmit" label-width="140px">
|
||||
|
||||
<el-form-item label="招生计划" prop="groupId">
|
||||
<el-select v-model="dataForm.groupId" filterable :disabled="!dataForm.id ? false : true" placeholder="请选择招生计划" size="small" style="width: 100%">
|
||||
<el-select v-model="dataForm.groupId" filterable :disabled="!!dataForm.id" placeholder="请选择招生计划" size="small" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in planList"
|
||||
:key="item.id"
|
||||
@@ -29,9 +29,9 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="地区" prop="area">
|
||||
<el-select v-model="dataForm.area" filterable placeholder="请选择地区" size="small" style="width: 100%;">
|
||||
<el-select v-model="dataForm.area" filterable placeholder="请选择地区" size="small" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in areaList"
|
||||
v-for="item in areaListData"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code">
|
||||
@@ -40,111 +40,136 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="canSubmit">确定</el-button>
|
||||
</span>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit" v-if="canSubmit">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addObj, areaList, getObj, putObj} from '@/api/recruit/recruitstudentschool'
|
||||
import {getDeptList} from "@/api/basic/basicclass";
|
||||
import {list} from "@/api/recruit/recruitstudentplangroup";
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, nextTick } from 'vue'
|
||||
import { ElNotification } from 'element-plus'
|
||||
import { addObj, areaList, getObj, putObj } from '@/api/recruit/recruitstudentschool'
|
||||
import { getDeptList } from "@/api/basic/basicclass"
|
||||
import { list } from "@/api/recruit/recruitstudentplangroup"
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
canSubmit: false,
|
||||
dataForm: {
|
||||
id:"",
|
||||
groupId:"",
|
||||
area:"",
|
||||
xy:"",
|
||||
schoolName:"",
|
||||
},
|
||||
disabled:false,
|
||||
planList: [],
|
||||
areaList:[],
|
||||
deptList:[],
|
||||
dataRule: {
|
||||
groupId: [
|
||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' },
|
||||
],
|
||||
schoolName: [
|
||||
{ required: true, message: '学校名称不能为空', trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: '学校名称长度不大于20个字符', trigger: 'blur' }
|
||||
],
|
||||
// Emits
|
||||
const emit = defineEmits<{
|
||||
(e: 'refreshDataList'): void
|
||||
}>()
|
||||
|
||||
area: [
|
||||
{ required: true, message: '地区不能为空', trigger: 'blur' },
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
this.dataForm.id = id || null;
|
||||
this.visible = true;
|
||||
this.canSubmit = true;
|
||||
this.initData();
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
this.dataForm.area = this.dataForm.area+"";
|
||||
})
|
||||
}else{
|
||||
this.disabled = true;
|
||||
}
|
||||
// 表单引用
|
||||
const dataFormRef = ref()
|
||||
|
||||
// 响应式数据
|
||||
const visible = ref(false)
|
||||
const canSubmit = ref(false)
|
||||
const planList = ref<any[]>([])
|
||||
const areaListData = ref<any[]>([])
|
||||
const deptList = ref<any[]>([])
|
||||
|
||||
const dataForm = reactive({
|
||||
id: "",
|
||||
groupId: "",
|
||||
area: "",
|
||||
xy: "",
|
||||
schoolName: ""
|
||||
})
|
||||
|
||||
const dataRule = {
|
||||
groupId: [
|
||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' },
|
||||
],
|
||||
schoolName: [
|
||||
{ required: true, message: '学校名称不能为空', trigger: 'blur' },
|
||||
{ min: 1, max: 20, message: '学校名称长度不大于20个字符', trigger: 'blur' }
|
||||
],
|
||||
area: [
|
||||
{ required: true, message: '地区不能为空', trigger: 'blur' },
|
||||
],
|
||||
}
|
||||
|
||||
// 初始化数据
|
||||
const initData = () => {
|
||||
// 查询二级学院信息
|
||||
getDeptList().then((data: any) => {
|
||||
deptList.value = data.data
|
||||
deptList.value.push({ deptCode: "190", deptName: "招生就业处" })
|
||||
})
|
||||
list().then((data: any) => {
|
||||
planList.value = data.data
|
||||
if (!dataForm.id) {
|
||||
dataForm.groupId = planList.value[0]?.id || ""
|
||||
}
|
||||
})
|
||||
// 获取所有省
|
||||
areaList({ type: "0", parentId: 112 }).then((res: any) => {
|
||||
areaListData.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
// 表单提交
|
||||
const dataFormSubmit = () => {
|
||||
dataFormRef.value?.validate((valid: boolean) => {
|
||||
if (valid) {
|
||||
canSubmit.value = false
|
||||
if (dataForm.id) {
|
||||
putObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '修改成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
//查询二级学院信息
|
||||
getDeptList().then(data => {
|
||||
this.deptList = data.data.data
|
||||
this.deptList.push({deptCode:"190",deptName:"招生就业处"})
|
||||
})
|
||||
list().then(data =>{
|
||||
this.planList = data.data.data
|
||||
if(!this.dataForm.id){
|
||||
this.dataForm.groupId=this.planList[0].id
|
||||
}
|
||||
});
|
||||
//获取所有省
|
||||
areaList({type:"0",parentId:112}).then(res=>{
|
||||
this.areaList = res.data.data;
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.canSubmit = false;
|
||||
if (this.dataForm.id) {
|
||||
putObj(this.dataForm).then(data => {
|
||||
this.$notify.success('修改成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
} else {
|
||||
addObj(this.dataForm).then(data => {
|
||||
this.$notify.success('添加成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
this.canSubmit = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
addObj(dataForm).then(() => {
|
||||
ElNotification.success({
|
||||
title: '成功',
|
||||
message: '添加成功'
|
||||
})
|
||||
visible.value = false
|
||||
emit('refreshDataList')
|
||||
}).catch(() => {
|
||||
canSubmit.value = true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化方法
|
||||
const init = (id: string | null) => {
|
||||
dataForm.id = id || ""
|
||||
visible.value = true
|
||||
canSubmit.value = true
|
||||
initData()
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields()
|
||||
if (dataForm.id) {
|
||||
getObj(dataForm.id).then((response: any) => {
|
||||
Object.assign(dataForm, response.data)
|
||||
if (dataForm.area) {
|
||||
dataForm.area = String(dataForm.area)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 暴露方法给父组件
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -181,8 +181,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
records: response.data.records,
|
||||
total: response.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -197,16 +197,16 @@ const init = async () => {
|
||||
try {
|
||||
// 查询二级学院信息
|
||||
const deptData = await getDeptList()
|
||||
deptList.value = deptData.data.data || []
|
||||
deptList.value = deptData.data || []
|
||||
deptList.value.push({ deptCode: '190', deptName: '招生就业处' })
|
||||
|
||||
// 获取所有省
|
||||
const areaData = await areaList({ type: '0', parentId: 112 })
|
||||
provinceList.value = areaData.data.data || []
|
||||
provinceList.value = areaData.data || []
|
||||
|
||||
// 获取招生计划列表
|
||||
const planData = await list()
|
||||
planList.value = planData.data.data || []
|
||||
planList.value = planData.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
init(){
|
||||
let _this = this;
|
||||
list().then(data =>{
|
||||
_this.planList = data.data.data
|
||||
_this.planList = data.data
|
||||
_this.dataForm.groupId=_this.planList[0].id;
|
||||
this.getDataList();
|
||||
});
|
||||
@@ -78,8 +78,8 @@ export default {
|
||||
this.indexArray=[];
|
||||
this.dataForm.degreeOfEducation='1';
|
||||
getAreaStatic(this.dataForm).then(response =>{
|
||||
this.list = response.data.data.data;
|
||||
this.chartOption = response.data.data.option
|
||||
this.list = response.data;
|
||||
this.chartOption = response.data.option
|
||||
})
|
||||
},
|
||||
exportExcel: function(form,url) {
|
||||
|
||||
@@ -63,7 +63,7 @@ export default {
|
||||
init(){
|
||||
let _this = this;
|
||||
list().then(data =>{
|
||||
_this.planList = data.data.data
|
||||
_this.planList = data.data
|
||||
_this.dataForm.groupId=_this.planList[0].id;
|
||||
this.getDataList();
|
||||
});
|
||||
@@ -72,7 +72,7 @@ export default {
|
||||
this.list = [];
|
||||
this.indexArray=[];
|
||||
getContantByUserStatic(this.dataForm).then(response =>{
|
||||
this.list = response.data.data;
|
||||
this.list = response.data;
|
||||
let count = 0
|
||||
for (let rowIndex = 0; rowIndex < this.list.length; ) {
|
||||
this.indexArray.push(rowIndex)
|
||||
|
||||
@@ -64,7 +64,7 @@ export default {
|
||||
init(){
|
||||
let _this = this;
|
||||
list().then(data =>{
|
||||
_this.planList = data.data.data
|
||||
_this.planList = data.data
|
||||
_this.dataForm.groupId=_this.planList[0].id;
|
||||
this.getDataList();
|
||||
});
|
||||
@@ -73,7 +73,7 @@ export default {
|
||||
this.list = [];
|
||||
this.indexArray=[];
|
||||
getContantByDeptStatic(this.dataForm).then(response =>{
|
||||
this.list = response.data.data;
|
||||
this.list = response.data;
|
||||
})
|
||||
},
|
||||
exportExcel: function(form,url) {
|
||||
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
init(){
|
||||
let _this = this;
|
||||
list().then(data =>{
|
||||
_this.planList = data.data.data
|
||||
_this.planList = data.data
|
||||
_this.dataForm.groupId=_this.planList[0].id;
|
||||
this.getDataList();
|
||||
});
|
||||
@@ -77,7 +77,7 @@ export default {
|
||||
this.list = [];
|
||||
this.indexArray=[];
|
||||
getContantByUserStatic(this.dataForm).then(response =>{
|
||||
this.list = response.data.data;
|
||||
this.list = response.data;
|
||||
let count = 0
|
||||
for (let rowIndex = 0; rowIndex < this.list.length; ) {
|
||||
this.indexArray.push(rowIndex)
|
||||
|
||||
@@ -822,15 +822,15 @@ export default {
|
||||
this.areaHAList=[];
|
||||
//获取数据字典
|
||||
getDictByType("finance_student_source").then(edu => {
|
||||
_this.eduList = edu.data.data
|
||||
_this.eduList = edu.data
|
||||
//获取数据字典代办费
|
||||
getDictByType("agency_fee").then(fee => {
|
||||
_this.agencyFeeList = fee.data.data
|
||||
_this.agencyFeeList = fee.data
|
||||
//获取数据字典学费
|
||||
getDictByType("tuition_fee").then(res => {
|
||||
_this.tuitionFeeList = res.data.data
|
||||
_this.tuitionFeeList = res.data
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
this.dataForm = response.data
|
||||
this.dataForm.scorePhotoList=[];
|
||||
this.dataForm.graPicList=[];
|
||||
this.dataForm.yyPicList=[];
|
||||
@@ -865,7 +865,7 @@ export default {
|
||||
}
|
||||
});
|
||||
listByEdu({groupId: this.dataForm.groupId,degreeOfEducation:this.dataForm.degreeOfEducation}).then(e=>{
|
||||
_this.planMajorList = e.data.data;
|
||||
_this.planMajorList = e.data;
|
||||
if (1 != _this.dataForm.degreeOfEducation) {
|
||||
_this.gzAuditChange();
|
||||
}
|
||||
@@ -888,12 +888,12 @@ export default {
|
||||
});
|
||||
//获取招生计划下的学校和分数线
|
||||
scoreList({groupId:_this.dataForm.groupId}).then(data =>{
|
||||
_this.schoolCodeList = data.data.data;
|
||||
_this.schoolCodeList = data.data;
|
||||
});
|
||||
let areas = [];
|
||||
//获取户口所在 省市区
|
||||
areaList({type: 0}).then(data => {
|
||||
areas = data.data.data;
|
||||
areas = data.data;
|
||||
//省
|
||||
let pid = "";
|
||||
areas.forEach(e=>{
|
||||
@@ -1012,7 +1012,7 @@ export default {
|
||||
this.sixMajorList=[];
|
||||
this.sevenMajorList=[];
|
||||
listByEdu({groupId: this.dataForm.groupId,degreeOfEducation:this.dataForm.degreeOfEducation}).then(e=>{
|
||||
_this.planMajorList = e.data.data;
|
||||
_this.planMajorList = e.data;
|
||||
if (1 != _this.dataForm.degreeOfEducation) {
|
||||
_this.gzAuditChange();
|
||||
}
|
||||
@@ -1043,14 +1043,14 @@ export default {
|
||||
let _this = this;
|
||||
//联系人(教职工)
|
||||
queryAllTeacher().then(res =>{
|
||||
_this.contactNameList = res.data.data
|
||||
_this.contactNameList = res.data
|
||||
});
|
||||
//查询二级学院信息
|
||||
getDeptList().then(data => {
|
||||
_this.deptList = data.data.data
|
||||
_this.deptList = data.data
|
||||
})
|
||||
list().then(data => {
|
||||
_this.planList = data.data.data
|
||||
_this.planList = data.data
|
||||
});
|
||||
|
||||
|
||||
@@ -1167,9 +1167,9 @@ export default {
|
||||
}
|
||||
areaSonList({code: code}).then(data => {
|
||||
if(type==1){
|
||||
this.areaCList = data.data.data;
|
||||
this.areaCList = data.data;
|
||||
}else{
|
||||
this.areaAList = data.data.data;
|
||||
this.areaAList = data.data;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1188,9 +1188,9 @@ export default {
|
||||
}
|
||||
areaSonList({code: code}).then(data => {
|
||||
if(type==1){
|
||||
this.areaHCList = data.data.data;
|
||||
this.areaHCList = data.data;
|
||||
}else{
|
||||
this.areaHAList = data.data.data;
|
||||
this.areaHAList = data.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -69,7 +69,7 @@ export default {
|
||||
this.circleShow = true;
|
||||
this.$nextTick(() => {
|
||||
getTypeValue("dorm_jw").then(data=>{
|
||||
let arr = data.data.data;
|
||||
let arr = data.data;
|
||||
arr.forEach(e=>{
|
||||
if(e.label=='bj'){
|
||||
_this.form.raidus=e.value;
|
||||
|
||||
@@ -110,7 +110,7 @@ export default {
|
||||
methods: {
|
||||
initDept() {
|
||||
getDeptList().then(data => {
|
||||
this.deptList = data.data.data
|
||||
this.deptList = data.data
|
||||
})
|
||||
|
||||
},
|
||||
@@ -141,13 +141,13 @@ export default {
|
||||
},
|
||||
initPlanGroup(){
|
||||
list().then(data =>{
|
||||
this.planList = data.data.data
|
||||
this.planList = data.data
|
||||
this.dataForm.groupId=this.planList[0].id;
|
||||
});
|
||||
},
|
||||
getTableList(groupId){
|
||||
dormApplyAnalysis({"groupId":groupId}).then(response => {
|
||||
this.dataList = response.data.data
|
||||
this.dataList = response.data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -78,8 +78,8 @@ const init = async () => {
|
||||
list()
|
||||
])
|
||||
|
||||
deptCodes.value = deptResponse.data.data || []
|
||||
planList.value = planData.data.data || []
|
||||
deptCodes.value = deptResponse.data || []
|
||||
planList.value = planData.data || []
|
||||
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
@@ -96,11 +96,11 @@ const getDataList = async () => {
|
||||
dataListLoading.value = true
|
||||
dataList.value = []
|
||||
const response = await inSchoolSocreStatic(queryForm)
|
||||
if (response.data.data && response.data.data.length > 0) {
|
||||
response.data.data.forEach((e: any) => {
|
||||
if (response.data && response.data.length > 0) {
|
||||
response.data.forEach((e: any) => {
|
||||
dataList.value.push(e.map)
|
||||
})
|
||||
headList.value = response.data.data[0].list || []
|
||||
headList.value = response.data[0].list || []
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取数据失败', error)
|
||||
|
||||
@@ -699,7 +699,7 @@ export default {
|
||||
if (query !== '') {
|
||||
setTimeout(() => {
|
||||
queryTeacherBaseByNo(query).then(response => {
|
||||
this.teacherList = response.data.data
|
||||
this.teacherList = response.data
|
||||
})
|
||||
}, 200);
|
||||
}
|
||||
@@ -910,22 +910,22 @@ export default {
|
||||
init() {
|
||||
//查询二级学院信息
|
||||
getDeptList().then(data => {
|
||||
this.deptList = data.data.data
|
||||
this.deptList = data.data
|
||||
})
|
||||
list().then(data => {
|
||||
this.planList = data.data.data
|
||||
this.planList = data.data
|
||||
this.dataForm.groupId = this.planList[0].id;
|
||||
this.getDataList()
|
||||
this.chanMajor()
|
||||
});
|
||||
getTypeValue('finance_student_source').then(res => {
|
||||
this.eduList = res.data.data
|
||||
this.eduList = res.data
|
||||
})
|
||||
//所有经办人
|
||||
getUserListByRole(ROLE_CODE.ROLE_RECRUIT_SECOND).then(res => {
|
||||
this.auditorList = res.data.data;
|
||||
this.auditorList = res.data;
|
||||
getUserListByRole(ROLE_CODE.ROLE_RECRUIT).then(re => {
|
||||
re.data.data.forEach(r => {
|
||||
re.data.forEach(r => {
|
||||
this.auditorList.push(r)
|
||||
});
|
||||
this.auditorList = this.unique(this.auditorList);
|
||||
@@ -949,7 +949,7 @@ export default {
|
||||
chanMajor() {
|
||||
this.planMajorList = [];
|
||||
planMajor({groupId: this.dataForm.groupId}).then(data => {
|
||||
this.planMajorList = data.data.data;
|
||||
this.planMajorList = data.data;
|
||||
});
|
||||
},
|
||||
handleFilter() {
|
||||
@@ -964,8 +964,8 @@ export default {
|
||||
current: this.pageIndex,
|
||||
size: this.pageSize
|
||||
}, this.dataForm)).then(response => {
|
||||
this.dataList = response.data.data.records
|
||||
this.totalPage = response.data.data.total
|
||||
this.dataList = response.data.records
|
||||
this.totalPage = response.data.total
|
||||
})
|
||||
this.dataListLoading = false
|
||||
},
|
||||
@@ -1065,7 +1065,7 @@ export default {
|
||||
this.lqtzsShow = false;
|
||||
}
|
||||
toWord(row).then(res => {
|
||||
this.pdfPath = "/recruit/file/previewPdf?filePath=" + encodeURIComponent(res.data.data);
|
||||
this.pdfPath = "/recruit/file/previewPdf?filePath=" + encodeURIComponent(res.data);
|
||||
this.lqtzsVisible = true;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -538,7 +538,7 @@ export default {
|
||||
//查找所有班级
|
||||
getClassData(){
|
||||
getClassListByRole().then(data=>{
|
||||
this.classList = data.data.data
|
||||
this.classList = data.data
|
||||
})
|
||||
},
|
||||
sendImg(){
|
||||
@@ -765,23 +765,23 @@ export default {
|
||||
init(){
|
||||
//查询二级学院信息
|
||||
getDeptList().then(data => {
|
||||
this.deptList = data.data.data
|
||||
this.deptList = data.data
|
||||
})
|
||||
this.getClassData();
|
||||
list().then(data =>{
|
||||
this.planList = data.data.data
|
||||
this.planList = data.data
|
||||
this.dataForm.groupId=this.planList[0].id;
|
||||
this.getDataList()
|
||||
this.chanMajor()
|
||||
});
|
||||
getTypeValue('finance_student_source').then(res=>{
|
||||
this.eduList=res.data.data
|
||||
this.eduList=res.data
|
||||
})
|
||||
//所有经办人
|
||||
getUserListByRole(ROLE_CODE.ROLE_RECRUIT_SECOND).then(res=>{
|
||||
this.auditorList = res.data.data;
|
||||
this.auditorList = res.data;
|
||||
getUserListByRole(ROLE_CODE.ROLE_RECRUIT).then(re=>{
|
||||
re.data.data.forEach(r=>{
|
||||
re.data.forEach(r=>{
|
||||
this.auditorList.push(r)
|
||||
});
|
||||
this.auditorList = this.unique(this.auditorList);
|
||||
@@ -805,7 +805,7 @@ export default {
|
||||
chanMajor(){
|
||||
this.planMajorList=[];
|
||||
planMajor({groupId: this.dataForm.groupId}).then(data =>{
|
||||
this.planMajorList = data.data.data;
|
||||
this.planMajorList = data.data;
|
||||
});
|
||||
},
|
||||
handleFilter(){
|
||||
@@ -821,8 +821,8 @@ export default {
|
||||
current: this.pageIndex,
|
||||
size: this.pageSize
|
||||
},this.dataForm)).then(response => {
|
||||
this.dataList = response.data.data.records
|
||||
this.totalPage = response.data.data.total
|
||||
this.dataList = response.data.records
|
||||
this.totalPage = response.data.total
|
||||
})
|
||||
this.dataListLoading = false
|
||||
},
|
||||
@@ -840,7 +840,7 @@ export default {
|
||||
changeclass(row){
|
||||
this.changeClassList=[];
|
||||
getMajorClass(row).then(response => {
|
||||
this.changeClassList = response.data.data
|
||||
this.changeClassList = response.data
|
||||
|
||||
this.changeClassVisible = true
|
||||
this.changeForm.id=row.id;
|
||||
@@ -964,7 +964,7 @@ export default {
|
||||
this.lqtzsShow = false;
|
||||
}
|
||||
toWord(row).then(res=>{
|
||||
this.pdfPath = "/recruit/file/previewPdf?filePath="+encodeURIComponent(res.data.data);
|
||||
this.pdfPath = "/recruit/file/previewPdf?filePath="+encodeURIComponent(res.data);
|
||||
this.lqtzsVisible = true;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -113,9 +113,9 @@ const init = async () => {
|
||||
list()
|
||||
])
|
||||
|
||||
deptCodes.value = deptResponse.data.data || []
|
||||
majorYears.value = majorYearsRes.data.data || []
|
||||
planList.value = planData.data.data || []
|
||||
deptCodes.value = deptResponse.data || []
|
||||
majorYears.value = majorYearsRes.data || []
|
||||
planList.value = planData.data || []
|
||||
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
@@ -132,7 +132,7 @@ const getDataList = async () => {
|
||||
dataListLoading.value = true
|
||||
dataList.value = []
|
||||
const response = await juniorlneStatic(queryForm)
|
||||
dataList.value = response.data.data || []
|
||||
dataList.value = response.data || []
|
||||
} catch (error) {
|
||||
console.error('获取数据失败', error)
|
||||
} finally {
|
||||
|
||||
@@ -356,8 +356,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await fetchListStuDorm(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
records: response.data.records,
|
||||
total: response.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -372,11 +372,11 @@ const init = async () => {
|
||||
try {
|
||||
// 查询二级学院信息
|
||||
const deptData = await getDeptList()
|
||||
deptList.value = deptData.data.data || []
|
||||
deptList.value = deptData.data || []
|
||||
|
||||
// 获取招生计划列表
|
||||
const planData = await list()
|
||||
planList.value = planData.data.data || []
|
||||
planList.value = planData.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
|
||||
@@ -238,12 +238,12 @@ export default {
|
||||
if (this.dataForm.id) {
|
||||
//获取数据字典代办费
|
||||
getDictByType("agency_fee").then(res => {
|
||||
_this.agencyFeeList = res.data.data
|
||||
_this.agencyFeeList = res.data
|
||||
//获取数据字典学费
|
||||
getDictByType("tuition_fee").then(res => {
|
||||
_this.tuitionFeeList = res.data.data
|
||||
_this.tuitionFeeList = res.data
|
||||
getObj(this.dataForm.id).then(response => {
|
||||
this.dataForm = response.data.data
|
||||
this.dataForm = response.data
|
||||
this.title = this.dataForm.serialNumber
|
||||
//获取文化程度对应的专业
|
||||
this.planMajorList=[];
|
||||
@@ -259,11 +259,11 @@ export default {
|
||||
}
|
||||
});
|
||||
listByEdu({groupId: this.dataForm.groupId,degreeOfEducation:this.dataForm.degreeOfEducation}).then(e=>{
|
||||
_this.planMajorList = e.data.data;
|
||||
_this.planMajorList = e.data;
|
||||
});
|
||||
//获取招生计划下的学校和分数线
|
||||
scoreList({groupId:_this.dataForm.groupId}).then(data =>{
|
||||
_this.schoolCodeList = data.data.data;
|
||||
_this.schoolCodeList = data.data;
|
||||
});
|
||||
|
||||
if ("1" == this.dataForm.degreeOfEducation) {
|
||||
@@ -291,7 +291,7 @@ export default {
|
||||
initData() {
|
||||
let _this = this;
|
||||
list().then(data => {
|
||||
_this.planList = data.data.data
|
||||
_this.planList = data.data
|
||||
});
|
||||
},
|
||||
changeCM(id){
|
||||
|
||||
@@ -339,7 +339,7 @@ const getDataList = async () => {
|
||||
dataList.value = []
|
||||
indexArray.value = []
|
||||
const response = await schoolAreaStatic(queryForm)
|
||||
dataList.value = response.data.data || []
|
||||
dataList.value = response.data || []
|
||||
|
||||
// 计算合并单元格的索引
|
||||
let count = 0
|
||||
|
||||
@@ -73,7 +73,7 @@ const { tableStyle, downBlobFile } = useTable()
|
||||
const init = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
planList.value = data.data.data || []
|
||||
planList.value = data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
getDataList()
|
||||
@@ -90,7 +90,7 @@ const getDataList = async () => {
|
||||
dataList.value = []
|
||||
indexArray.value = []
|
||||
const response = await getSchoolStatic(queryForm)
|
||||
dataList.value = response.data.data || []
|
||||
dataList.value = response.data || []
|
||||
} catch (error) {
|
||||
console.error('获取数据失败', error)
|
||||
} finally {
|
||||
|
||||
@@ -64,7 +64,7 @@ export default {
|
||||
this.form.homeAddressDetail = row.homeAddressDetail;
|
||||
this.$nextTick(() => {
|
||||
getTypeValue("dorm_jw").then(data => {
|
||||
let arr = data.data.data;
|
||||
let arr = data.data;
|
||||
arr.forEach(e => {
|
||||
if (e.label == 'bj') {
|
||||
_this.form.raidus = e.value;
|
||||
|
||||
@@ -92,8 +92,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await fetchListByStatic(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data || [],
|
||||
total: response.data.data?.length || 0
|
||||
records: response.data || [],
|
||||
total: response.data?.length || 0
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -108,7 +108,7 @@ const init = async () => {
|
||||
try {
|
||||
// 查询二级学院信息
|
||||
const deptData = await getDeptList()
|
||||
deptList.value = deptData.data.data || []
|
||||
deptList.value = deptData.data || []
|
||||
deptList.value.push({ deptCode: '小计(高中/职技校)', deptName: '小计(高中/职技校)' })
|
||||
deptList.value.push({ deptCode: '小计(初中)', deptName: '小计(初中)' })
|
||||
deptList.value.push({ deptCode: '小计(初中_联院大专)', deptName: '小计(初中_联院大专)' })
|
||||
@@ -116,7 +116,7 @@ const init = async () => {
|
||||
|
||||
// 获取招生计划列表
|
||||
const planData = await list()
|
||||
planList.value = planData.data.data || []
|
||||
planList.value = planData.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
getDataList()
|
||||
@@ -125,7 +125,7 @@ const init = async () => {
|
||||
|
||||
// 获取字典数据
|
||||
const eduRes = await getTypeValue('education_type')
|
||||
eduList.value = eduRes.data.data || []
|
||||
eduList.value = eduRes.data || []
|
||||
} catch (error) {
|
||||
console.error('初始化失败', error)
|
||||
}
|
||||
@@ -149,7 +149,7 @@ const chanMajor = async () => {
|
||||
planMajorList.value = []
|
||||
if (queryForm.groupId) {
|
||||
const data = await planMajor({ groupId: queryForm.groupId })
|
||||
planMajorList.value = data.data.data || []
|
||||
planMajorList.value = data.data || []
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取专业列表失败', error)
|
||||
|
||||
@@ -359,7 +359,7 @@ export default {
|
||||
this.houseList=[];
|
||||
this.sbPicList=[];
|
||||
this.hkPicList=[];
|
||||
this.dataForm = response.data.data
|
||||
this.dataForm = response.data
|
||||
this.title = this.dataForm.serialNumber
|
||||
if(this.dataForm.scorePhoto !=''){
|
||||
let obj={url:this.dataForm.scorePhoto,name:""};
|
||||
@@ -549,11 +549,11 @@ export default {
|
||||
initData() {
|
||||
let _this = this;
|
||||
list().then(data => {
|
||||
_this.planList = data.data.data
|
||||
_this.planList = data.data
|
||||
});
|
||||
//联系人(教职工)
|
||||
queryAllTeacher().then(res =>{
|
||||
_this.contactNameList = res.data.data
|
||||
_this.contactNameList = res.data
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
|
||||
@@ -233,8 +233,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
records: response.data.records,
|
||||
total: response.data.total
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -248,7 +248,7 @@ const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTa
|
||||
const init = async () => {
|
||||
try {
|
||||
const data = await list()
|
||||
planList.value = data.data.data || []
|
||||
planList.value = data.data || []
|
||||
if (planList.value.length > 0) {
|
||||
queryForm.groupId = planList.value[0].id
|
||||
}
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
current: page.currentPage,
|
||||
size: page.pageSize
|
||||
}, this.params)).then(response => {
|
||||
this.tableData = response.data.data.records
|
||||
this.page.total = response.data.data.total
|
||||
this.tableData = response.data.records
|
||||
this.page.total = response.data.total
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
@@ -201,8 +201,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
const response = await fetchList(params)
|
||||
return {
|
||||
data: {
|
||||
records: response.data.data.records,
|
||||
total: response.data.data.total
|
||||
records: response.data.records,
|
||||
total: response.data.total
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user