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