Merge branch 'developer' of ssh://code.cyweb.top:30033/scj/zhxy/v3/cloud-ui into developer
This commit is contained in:
@@ -30,7 +30,7 @@ export const fetchListStatic = (query?: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addObj = (obj: any) => {
|
export const addObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/recruit/recruitprestudent',
|
url: '/recruit/recruitprestudent/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -42,7 +42,7 @@ export const addObj = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addObjStu = (obj: any) => {
|
export const addObjStu = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/recruit/recruitprestudent/saveStuData',
|
url: '/recruit/recruitprestudent/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -54,8 +54,9 @@ export const addObjStu = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const getObj = (id: string | number) => {
|
export const getObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/recruit/recruitprestudent/${id}`,
|
url: `/recruit/recruitprestudent/getById`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: {id:id}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -65,8 +66,9 @@ export const getObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const delObj = (id: string | number) => {
|
export const delObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/recruit/recruitprestudent/${id}`,
|
url: `/recruit/recruitprestudent/deleteById`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data:{id:id}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -76,8 +78,8 @@ export const delObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const putObj = (obj: any) => {
|
export const putObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/recruit/recruitprestudent',
|
url: '/recruit/recruitprestudent/edit',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -89,7 +91,7 @@ export const putObj = (obj: any) => {
|
|||||||
export const sureDJ = (obj: any) => {
|
export const sureDJ = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/recruit/recruitprestudent/sureDJ',
|
url: '/recruit/recruitprestudent/sureDJ',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export const list = (query?: any) => {
|
|||||||
*/
|
*/
|
||||||
export const addObj = (obj: any) => {
|
export const addObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/recruit/recruitstudentplancorrectscoreconfig',
|
url: '/recruit/recruitstudentplancorrectscoreconfig/add',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
@@ -42,8 +42,9 @@ export const addObj = (obj: any) => {
|
|||||||
*/
|
*/
|
||||||
export const getObj = (id: string | number) => {
|
export const getObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/recruit/recruitstudentplancorrectscoreconfig/${id}`,
|
url: `/recruit/recruitstudentplancorrectscoreconfig/getById`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params:{id:id}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -53,8 +54,9 @@ export const getObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const delObj = (id: string | number) => {
|
export const delObj = (id: string | number) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/recruit/recruitstudentplancorrectscoreconfig/${id}`,
|
url: `/recruit/recruitstudentplancorrectscoreconfig/deleteById`,
|
||||||
method: 'delete',
|
method: 'post',
|
||||||
|
data:{id:id}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -64,8 +66,8 @@ export const delObj = (id: string | number) => {
|
|||||||
*/
|
*/
|
||||||
export const putObj = (obj: any) => {
|
export const putObj = (obj: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/recruit/recruitstudentplancorrectscoreconfig',
|
url: '/recruit/recruitstudentplancorrectscoreconfig/edit',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -71,3 +71,15 @@ export const putObj = (obj: any) => {
|
|||||||
data: obj,
|
data: obj,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新
|
||||||
|
* @param obj
|
||||||
|
*/
|
||||||
|
export const editQuickField = (obj: any) => {
|
||||||
|
return request({
|
||||||
|
url: '/recruit/recruitstudentplangroup/editQuickField',
|
||||||
|
method: 'post',
|
||||||
|
data: obj,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
@@ -290,7 +290,8 @@ const init = async () => {
|
|||||||
// 修改开关
|
// 修改开关
|
||||||
const changeSm = async (row: any) => {
|
const changeSm = async (row: any) => {
|
||||||
try {
|
try {
|
||||||
await editQuickField(row)
|
let parmas={id:row.id,sm:row.sm}
|
||||||
|
await editQuickField(parmas)
|
||||||
message.success('修改成功')
|
message.success('修改成功')
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.error(error.msg || '修改失败')
|
message.error(error.msg || '修改失败')
|
||||||
|
|||||||
@@ -1,272 +1,257 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog title="招生计划专业调整" append-to-body width="90%" :close-on-click-modal="false" v-model="visible">
|
||||||
title="招生计划专业调整"
|
<el-form :model="dataForm" ref="dataFormRef" label-width="140px">
|
||||||
append-to-body
|
<el-form-item label="招生计划名称" prop="groupName">
|
||||||
width="90%"
|
<el-input v-model="dataForm.groupName" placeholder="招生计划名称" disabled></el-input>
|
||||||
:close-on-click-modal="false"
|
</el-form-item>
|
||||||
v-model="visible">
|
</el-form>
|
||||||
<el-form :model="dataForm" ref="dataFormRef" label-width="140px">
|
<el-tabs v-model="activiName" @tab-click="handleChange">
|
||||||
<el-form-item label="招生计划名称" prop="groupName">
|
<el-tab-pane v-for="item in deptList" :key="item.deptCode" :label="item.deptName" :name="item.deptCode">
|
||||||
<el-input v-model="dataForm.groupName" placeholder="招生计划名称" disabled></el-input>
|
<div style="margin-top: 20px">
|
||||||
</el-form-item>
|
<el-table :data="dataList" border stripe v-loading="dataListLoading">
|
||||||
</el-form>
|
<el-table-column prop="majorName" header-align="center" align="center" label="专业">
|
||||||
<el-tabs v-model="activiName" @tab-click="handleChange">
|
<template #default="scope">
|
||||||
<el-tab-pane v-for="item in deptList"
|
<span>{{ scope.row.majorName + ' || ' + scope.row.majorCode + ' || ' + scope.row.learnYear + ' 年制' }}</span>
|
||||||
:key="item.deptCode"
|
</template>
|
||||||
:label="item.deptName"
|
</el-table-column>
|
||||||
:name="item.deptCode">
|
<el-table-column prop="planStudentNum" header-align="center" align="center" label="计划总数" width="180px">
|
||||||
<div style="margin-top: 20px;">
|
<template #default="scope">
|
||||||
<el-table
|
<el-input-number
|
||||||
:data="dataList"
|
style="width: 80%"
|
||||||
border
|
v-model="scope.row.planStudentNum"
|
||||||
stripe
|
:min="0"
|
||||||
v-loading="dataListLoading">
|
:max="999"
|
||||||
<el-table-column
|
@change="updateMajor(scope.row, 'planStudentNum')"
|
||||||
prop="majorName"
|
width="100px"
|
||||||
header-align="center"
|
></el-input-number>
|
||||||
align="center"
|
</template>
|
||||||
label="专业"
|
</el-table-column>
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
<span>{{ scope.row.majorName+' || '+scope.row.majorCode+' || '+scope.row.learnYear+' 年制'}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="planStudentNum"
|
|
||||||
header-align="center"
|
|
||||||
align="center"
|
|
||||||
label="计划总数"
|
|
||||||
width="180px"
|
|
||||||
>
|
|
||||||
<template #default="scope">
|
|
||||||
<el-input-number style="width: 80%" v-model="scope.row.planStudentNum" :min="0" :max="999" @change="updateMajor(scope.row)" width="100px"></el-input-number>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
<!-- <el-table-column-->
|
||||||
prop="needStudentNum"
|
<!-- prop="needStudentNum"-->
|
||||||
header-align="center"
|
<!-- header-align="center"-->
|
||||||
align="center"
|
<!-- align="center"-->
|
||||||
label="控制数"
|
<!-- label="控制数"-->
|
||||||
width="180px"
|
<!-- width="180px"-->
|
||||||
>
|
<!-- >-->
|
||||||
<template #default="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>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
|
|
||||||
<el-table-column
|
<!-- <el-table-column-->
|
||||||
prop="needStudentOverNum"
|
<!-- prop="needStudentOverNum"-->
|
||||||
header-align="center"
|
<!-- header-align="center"-->
|
||||||
align="center"
|
<!-- align="center"-->
|
||||||
label="预留"
|
<!-- label="预留"-->
|
||||||
width="180px"
|
<!-- width="180px"-->
|
||||||
>
|
<!-- >-->
|
||||||
<template #default="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>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column prop="scoreLine" header-align="center" align="center" label="录取线" width="180px">
|
||||||
prop="scoreLine"
|
<template #default="scope">
|
||||||
header-align="center"
|
<el-input-number
|
||||||
align="center"
|
style="width: 80%"
|
||||||
label="录取线"
|
v-model="scope.row.scoreLine"
|
||||||
width="180px"
|
:min="0"
|
||||||
>
|
:max="999"
|
||||||
<template #default="scope">
|
@change="updateMajor(scope.row, 'scoreLine')"
|
||||||
<el-input-number style="width: 80%" v-model="scope.row.scoreLine" :min="0" :max="999"
|
></el-input-number>
|
||||||
@change="updateMajor(scope.row)"></el-input-number>
|
</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="degreeOfEducation" header-align="center" align="center" label="生源">
|
||||||
<el-table-column
|
<template #default="scope">
|
||||||
prop="degreeOfEducation"
|
<el-select
|
||||||
header-align="center"
|
v-model="scope.row.degreeOfEducation"
|
||||||
align="center"
|
placeholder="请选择生源"
|
||||||
label="生源">
|
style="width: 100%; text-align: center"
|
||||||
<template #default="scope">
|
multiple
|
||||||
<el-select v-model="scope.row.degreeOfEducation" placeholder="请选择生源" style=" width: 100%;text-align:center" multiple
|
@change="updateMajor(scope.row,'degreeOfEducation')"
|
||||||
@change="updateMajor(scope.row)">
|
>
|
||||||
<el-option
|
<el-option v-for="item in degreeOfEducationList" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
||||||
v-for="item in degreeOfEducationList"
|
</el-select>
|
||||||
:key="item.value"
|
</template>
|
||||||
:label="item.label"
|
</el-table-column>
|
||||||
:value="item.value">
|
</el-table>
|
||||||
</el-option>
|
</div>
|
||||||
</el-select>
|
</el-tab-pane>
|
||||||
</template>
|
</el-tabs>
|
||||||
</el-table-column>
|
</el-dialog>
|
||||||
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue';
|
||||||
import { useMessage, useMessageBox } from '/@/hooks/message'
|
import { useMessage, useMessageBox } from '/@/hooks/message';
|
||||||
import { ElNotification } from 'element-plus'
|
import { ElNotification } from 'element-plus';
|
||||||
import { listPlanByCondition as list, delObj ,putObj} from '/@/api/recruit/recruitstudentplan'
|
import { listPlanByCondition as list, delObj, putObj, editQuickField } from '/@/api/recruit/recruitstudentplan';
|
||||||
import { fetchSecondTree } from '/@/api/basic/basicdept'
|
import { fetchSecondTree } from '/@/api/basic/basicdept';
|
||||||
import { getDicts } from "/@/api/admin/dict"
|
import { getDicts } from '/@/api/admin/dict';
|
||||||
|
|
||||||
// 消息提示 hooks
|
// 消息提示 hooks
|
||||||
const message = useMessage()
|
const message = useMessage();
|
||||||
const messageBox = useMessageBox()
|
const messageBox = useMessageBox();
|
||||||
|
|
||||||
// 表单引用
|
// 表单引用
|
||||||
const dataFormRef = ref()
|
const dataFormRef = ref();
|
||||||
|
|
||||||
// 响应式数据
|
// 响应式数据
|
||||||
const visible = ref(false)
|
const visible = ref(false);
|
||||||
const activiName = ref("11")
|
const activiName = ref('11');
|
||||||
const dataList = ref<any[]>([])
|
const dataList = ref<any[]>([]);
|
||||||
const deptList = ref<any[]>([])
|
const deptList = ref<any[]>([]);
|
||||||
const degreeOfEducationList = ref<any[]>([])
|
const degreeOfEducationList = ref<any[]>([]);
|
||||||
const dataListLoading = ref(false)
|
const dataListLoading = ref(false);
|
||||||
|
|
||||||
const dataForm = reactive({
|
const dataForm = reactive({
|
||||||
groupId: "",
|
groupId: '',
|
||||||
groupName: "",
|
groupName: '',
|
||||||
deptCode: "11",
|
deptCode: '11',
|
||||||
})
|
});
|
||||||
|
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
const initData = () => {
|
const initData = () => {
|
||||||
degreeOfEducationList.value = []
|
degreeOfEducationList.value = [];
|
||||||
// 获取数据字典
|
// 获取数据字典
|
||||||
getDicts("finance_student_source").then((res: any) => {
|
getDicts('finance_student_source')
|
||||||
degreeOfEducationList.value = res.data || []
|
.then((res: any) => {
|
||||||
}).catch((error: any) => {
|
degreeOfEducationList.value = res.data || [];
|
||||||
message.error('获取字典数据失败:' + (error.msg || '未知错误'))
|
})
|
||||||
degreeOfEducationList.value = []
|
.catch((error: any) => {
|
||||||
})
|
message.error('获取字典数据失败:' + (error.msg || '未知错误'));
|
||||||
}
|
degreeOfEducationList.value = [];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// 获取部门列表
|
// 获取部门列表
|
||||||
const getDepartment = () => {
|
const getDepartment = () => {
|
||||||
fetchSecondTree().then((res: any) => {
|
fetchSecondTree()
|
||||||
deptList.value = res.data || []
|
.then((res: any) => {
|
||||||
}).catch((error: any) => {
|
deptList.value = res.data || [];
|
||||||
message.error('获取部门列表失败:' + (error.msg || '未知错误'))
|
})
|
||||||
deptList.value = []
|
.catch((error: any) => {
|
||||||
})
|
message.error('获取部门列表失败:' + (error.msg || '未知错误'));
|
||||||
}
|
deptList.value = [];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// 更新专业
|
// 更新专业
|
||||||
const updateMajor = (row: any) => {
|
const updateMajor = (row: any, type: any) => {
|
||||||
if (!row || !row.planId) {
|
if (!row || !row.id) {
|
||||||
message.error('缺少必要的参数:planId')
|
message.error('缺少计划主键');
|
||||||
return
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (row.degreeOfEducation && Array.isArray(row.degreeOfEducation) && row.degreeOfEducation.length != 0) {
|
||||||
|
row.degreeOfEducations = row.degreeOfEducation.join(',');
|
||||||
|
} else {
|
||||||
|
row.degreeOfEducations = '';
|
||||||
|
}
|
||||||
|
let params = {} as any;
|
||||||
|
params.id = row.id;
|
||||||
|
if (type == 'planStudentNum') {
|
||||||
|
params.planStudentNum=row.planStudentNum
|
||||||
|
}
|
||||||
|
if (type == 'scoreLine') {
|
||||||
|
params.scoreLine=row.scoreLine
|
||||||
|
}
|
||||||
|
if (type == 'degreeOfEducation') {
|
||||||
|
params.degreeOfEducation=row.degreeOfEducations
|
||||||
}
|
}
|
||||||
|
|
||||||
if (row.degreeOfEducation && Array.isArray(row.degreeOfEducation) && row.degreeOfEducation.length != 0) {
|
editQuickField(params)
|
||||||
row.degreeOfEducations = row.degreeOfEducation.join(",")
|
.then(() => {
|
||||||
} else {
|
ElNotification.success({
|
||||||
row.degreeOfEducations = ""
|
title: '成功',
|
||||||
}
|
message: '修改成功',
|
||||||
|
});
|
||||||
putObj({
|
})
|
||||||
id: row.planId,
|
.catch((error: any) => {
|
||||||
planStudentNum: row.planStudentNum || 0,
|
message.error('修改失败:' + (error.msg || '未知错误'));
|
||||||
planStudentBoyNum: row.planStudentBoyNum || 0,
|
});
|
||||||
planStudentGirlNum: row.planStudentGirlNum || 0,
|
};
|
||||||
needStudentNum: row.needStudentNum || 0,
|
|
||||||
needStudentOverNum: row.needStudentOverNum || 0,
|
|
||||||
scoreLine: row.scoreLine || 0,
|
|
||||||
scoreMinLine: row.scoreMinLine || 0,
|
|
||||||
degreeOfEducations: row.degreeOfEducations || ""
|
|
||||||
}).then(() => {
|
|
||||||
ElNotification.success({
|
|
||||||
title: '成功',
|
|
||||||
message: '修改成功'
|
|
||||||
})
|
|
||||||
}).catch((error: any) => {
|
|
||||||
message.error('修改失败:' + (error.msg || '未知错误'))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 标签切换
|
// 标签切换
|
||||||
const handleChange = (tab: any) => {
|
const handleChange = (tab: any) => {
|
||||||
dataForm.deptCode = tab.name
|
dataForm.deptCode = tab.paneName;
|
||||||
getDataList()
|
getDataList();
|
||||||
}
|
};
|
||||||
|
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
const getDataList = () => {
|
const getDataList = () => {
|
||||||
if (!dataForm.groupId) {
|
if (!dataForm.groupId) {
|
||||||
dataListLoading.value = false
|
dataListLoading.value = false;
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dataList.value = []
|
dataList.value = [];
|
||||||
dataListLoading.value = true
|
dataListLoading.value = true;
|
||||||
if (dataForm.deptCode == '') {
|
if (dataForm.deptCode == '') {
|
||||||
dataForm.deptCode = "11"
|
dataForm.deptCode = '11';
|
||||||
}
|
}
|
||||||
list({ groupId: dataForm.groupId, deptCode: dataForm.deptCode }).then((response: any) => {
|
list({ groupId: dataForm.groupId, deptCode: dataForm.deptCode })
|
||||||
dataList.value = response.data || []
|
.then((response: any) => {
|
||||||
dataList.value.forEach((e: any) => {
|
dataList.value = response.data || [];
|
||||||
if (e.degreeOfEducation && typeof e.degreeOfEducation === 'string') {
|
dataList.value.forEach((e: any) => {
|
||||||
e.degreeOfEducation = e.degreeOfEducation.split(",")
|
if (e.degreeOfEducation && typeof e.degreeOfEducation === 'string') {
|
||||||
}
|
e.degreeOfEducation = e.degreeOfEducation.split(',');
|
||||||
})
|
}
|
||||||
dataListLoading.value = false
|
});
|
||||||
}).catch((error: any) => {
|
dataListLoading.value = false;
|
||||||
message.error('获取数据失败:' + (error.msg || '未知错误'))
|
})
|
||||||
dataListLoading.value = false
|
.catch((error: any) => {
|
||||||
})
|
message.error('获取数据失败:' + (error.msg || '未知错误'));
|
||||||
}
|
dataListLoading.value = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
const deleteHandle = async (id: string) => {
|
const deleteHandle = async (id: string) => {
|
||||||
try {
|
try {
|
||||||
await messageBox.confirm('是否确认删除本条数据?请谨慎操作')
|
await messageBox.confirm('是否确认删除本条数据?请谨慎操作');
|
||||||
await delObj(id)
|
await delObj(id);
|
||||||
message.success('删除成功')
|
message.success('删除成功');
|
||||||
getDataList()
|
getDataList();
|
||||||
} catch {
|
} catch {
|
||||||
// 用户取消
|
// 用户取消
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// 初始化方法
|
// 初始化方法
|
||||||
const init = (row: any) => {
|
const init = (row: any) => {
|
||||||
if (!row) {
|
if (!row) {
|
||||||
message.error('初始化参数错误')
|
message.error('初始化参数错误');
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!row.id || !row.groupName) {
|
if (!row.id || !row.groupName) {
|
||||||
message.error('缺少必要的参数:id 或 groupName')
|
message.error('缺少必要的参数:id 或 groupName');
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
visible.value = true
|
visible.value = true;
|
||||||
dataForm.deptCode = "11"
|
dataForm.deptCode = '11';
|
||||||
dataForm.groupName = row.groupName || ''
|
dataForm.groupName = row.groupName || '';
|
||||||
dataForm.groupId = row.id || ''
|
dataForm.groupId = row.id || '';
|
||||||
initData()
|
initData();
|
||||||
getDepartment()
|
getDepartment();
|
||||||
getDataList()
|
getDataList();
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.error('初始化失败:' + (error.message || '未知错误'))
|
message.error('初始化失败:' + (error.message || '未知错误'));
|
||||||
visible.value = false
|
visible.value = false;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// 暴露方法给父组件
|
// 暴露方法给父组件
|
||||||
defineExpose({
|
defineExpose({
|
||||||
init,
|
init,
|
||||||
deleteHandle
|
deleteHandle,
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -131,7 +131,7 @@
|
|||||||
type="success"
|
type="success"
|
||||||
link
|
link
|
||||||
icon="CircleCheck"
|
icon="CircleCheck"
|
||||||
@click="sureDJ(scope.row.id)"
|
@click="handllSureDj(scope.row.id)"
|
||||||
>
|
>
|
||||||
确认对接
|
确认对接
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -330,7 +330,7 @@ const addOrUpdateHandle = (id?: string | null) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 确认对接
|
// 确认对接
|
||||||
const sureDJ = async (id: string) => {
|
const handllSureDj = async (id: string) => {
|
||||||
try {
|
try {
|
||||||
await messageBox.confirm('是否确认已对接?请谨慎操作')
|
await messageBox.confirm('是否确认已对接?请谨慎操作')
|
||||||
await sureDJ({ id, isDj: '1' })
|
await sureDJ({ id, isDj: '1' })
|
||||||
|
|||||||
@@ -16,372 +16,365 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="layout-padding">
|
<div class="layout-padding">
|
||||||
<div class="layout-padding-auto layout-padding-view">
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<el-form :model="queryForm" inline ref="searchFormRef">
|
<el-form :model="queryForm" inline ref="searchFormRef">
|
||||||
<el-form-item label="招生计划名称" prop="groupName">
|
<el-form-item label="招生计划名称" prop="groupName">
|
||||||
<el-input v-model="queryForm.groupName" placeholder="招生计划名称" />
|
<el-input v-model="queryForm.groupName" placeholder="招生计划名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
|
||||||
<el-button icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<div class="mb15">
|
<div class="mb15">
|
||||||
<el-button
|
<el-button v-if="permissions.recruit_recruitstudentplangroup_add" type="primary" icon="FolderAdd" @click="addOrUpdateHandle">
|
||||||
v-if="permissions.recruit_recruitstudentplangroup_add"
|
新 增
|
||||||
type="primary"
|
</el-button>
|
||||||
icon="FolderAdd"
|
<el-button v-if="permissions.recruit_recruitexampeople_add" type="primary" plain icon="UserFilled" class="ml10" @click="editExam">
|
||||||
@click="addOrUpdateHandle"
|
审核人员
|
||||||
>
|
</el-button>
|
||||||
新 增
|
</div>
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
v-if="permissions.recruit_recruitexampeople_add"
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="UserFilled"
|
|
||||||
class="ml10"
|
|
||||||
@click="editExam"
|
|
||||||
>
|
|
||||||
审核人员
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<el-table
|
<el-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
:data="state.dataList"
|
:data="state.dataList"
|
||||||
v-loading="state.loading"
|
v-loading="state.loading"
|
||||||
border
|
border
|
||||||
stripe
|
stripe
|
||||||
:cell-style="tableStyle.cellStyle"
|
:cell-style="tableStyle.cellStyle"
|
||||||
:header-cell-style="tableStyle.headerCellStyle"
|
:header-cell-style="tableStyle.headerCellStyle"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" label="序号" width="60" align="center" />
|
<el-table-column type="index" label="序号" width="60" align="center" />
|
||||||
<el-table-column prop="groupName" label="招生计划名称" align="center" show-overflow-tooltip />
|
<el-table-column prop="groupName" label="招生计划名称" align="center" show-overflow-tooltip />
|
||||||
<el-table-column prop="startDate" label="报名时间段" align="center" show-overflow-tooltip>
|
<el-table-column prop="startDate" label="报名时间段" align="center" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div class="date-cell">
|
<div class="date-cell">
|
||||||
<el-icon class="date-icon"><Calendar /></el-icon>
|
<el-icon class="date-icon"><Calendar /></el-icon>
|
||||||
<span class="date-text">{{ dateFormat(scope.row.startDate, 'YYYY-mm-dd') + ' 至 ' + dateFormat(scope.row.endDate, 'YYYY-mm-dd') }}</span>
|
<span class="date-text">{{
|
||||||
</div>
|
dateFormat(scope.row.startDate, 'YYYY-mm-dd') + ' 至 ' + dateFormat(scope.row.endDate, 'YYYY-mm-dd')
|
||||||
</template>
|
}}</span>
|
||||||
</el-table-column>
|
</div>
|
||||||
<el-table-column prop="maintenanceStartDate" label="维护时间段" align="center" show-overflow-tooltip>
|
</template>
|
||||||
<template #default="scope">
|
</el-table-column>
|
||||||
<div class="date-cell">
|
<el-table-column prop="maintenanceStartDate" label="维护时间段" align="center" show-overflow-tooltip>
|
||||||
<el-icon class="date-icon"><Calendar /></el-icon>
|
<template #default="scope">
|
||||||
<span class="date-text">{{ dateFormat(scope.row.maintenanceStartDate, 'YYYY-mm-dd') + ' 至 ' + dateFormat(scope.row.maintenanceEndDate, 'YYYY-mm-dd') }}</span>
|
<div class="date-cell">
|
||||||
</div>
|
<el-icon class="date-icon"><Calendar /></el-icon>
|
||||||
</template>
|
<span class="date-text">{{
|
||||||
</el-table-column>
|
dateFormat(scope.row.maintenanceStartDate, 'YYYY-mm-dd') + ' 至 ' + dateFormat(scope.row.maintenanceEndDate, 'YYYY-mm-dd')
|
||||||
<el-table-column prop="czSignStart" label="开启初中生报名" align="center" width="140">
|
}}</span>
|
||||||
<template #default="scope">
|
</div>
|
||||||
<el-switch
|
</template>
|
||||||
v-model="scope.row.czSignStart"
|
</el-table-column>
|
||||||
active-text="是"
|
<el-table-column prop="czSignStart" label="开启初中生报名" align="center" width="140">
|
||||||
inactive-text="否"
|
<template #default="scope">
|
||||||
active-value="1"
|
<el-switch
|
||||||
inactive-value="0"
|
v-model="scope.row.czSignStart"
|
||||||
@change="changeSm(scope.row)"
|
active-text="是"
|
||||||
/>
|
inactive-text="否"
|
||||||
</template>
|
active-value="1"
|
||||||
</el-table-column>
|
inactive-value="0"
|
||||||
<el-table-column prop="gzSignStart" label="开启高中生报名" align="center" width="140">
|
@change="changeSm(scope.row, 'czSignStart')"
|
||||||
<template #default="scope">
|
/>
|
||||||
<el-switch
|
</template>
|
||||||
v-model="scope.row.gzSignStart"
|
</el-table-column>
|
||||||
active-text="是"
|
<el-table-column prop="gzSignStart" label="开启高中生报名" align="center" width="140">
|
||||||
inactive-text="否"
|
<template #default="scope">
|
||||||
active-value="1"
|
<el-switch
|
||||||
inactive-value="0"
|
v-model="scope.row.gzSignStart"
|
||||||
@change="changeSm(scope.row)"
|
active-text="是"
|
||||||
/>
|
inactive-text="否"
|
||||||
</template>
|
active-value="1"
|
||||||
</el-table-column>
|
inactive-value="0"
|
||||||
<el-table-column prop="jzxSignStart" label="开启技职校报名" align="center" width="140">
|
@change="changeSm(scope.row, 'gzSignStart')"
|
||||||
<template #default="scope">
|
/>
|
||||||
<el-switch
|
</template>
|
||||||
v-model="scope.row.jzxSignStart"
|
</el-table-column>
|
||||||
active-text="是"
|
<el-table-column prop="jzxSignStart" label="开启技职校报名" align="center" width="140">
|
||||||
inactive-text="否"
|
<template #default="scope">
|
||||||
active-value="1"
|
<el-switch
|
||||||
inactive-value="0"
|
v-model="scope.row.jzxSignStart"
|
||||||
@change="changeSm(scope.row)"
|
active-text="是"
|
||||||
/>
|
inactive-text="否"
|
||||||
</template>
|
active-value="1"
|
||||||
</el-table-column>
|
inactive-value="0"
|
||||||
<el-table-column prop="isPreStart" label="开启预登记" align="center" width="130">
|
@change="changeSm(scope.row, 'jzxSignStart')"
|
||||||
<template #default="scope">
|
/>
|
||||||
<el-switch
|
</template>
|
||||||
v-model="scope.row.isPreStart"
|
</el-table-column>
|
||||||
active-text="是"
|
<el-table-column prop="isPreStart" label="开启预登记" align="center" width="130">
|
||||||
inactive-text="否"
|
<template #default="scope">
|
||||||
active-value="1"
|
<el-switch
|
||||||
inactive-value="0"
|
v-model="scope.row.isPreStart"
|
||||||
@change="changeSm(scope.row)"
|
active-text="是"
|
||||||
/>
|
inactive-text="否"
|
||||||
</template>
|
active-value="1"
|
||||||
</el-table-column>
|
inactive-value="0"
|
||||||
<el-table-column label="操作" width="240" align="center" fixed="right">
|
@change="changeSm(scope.row, 'isPreStart')"
|
||||||
<template #default="scope">
|
/>
|
||||||
<el-button
|
</template>
|
||||||
v-if="permissions.recruit_recruitstudentplangroup_edit"
|
</el-table-column>
|
||||||
type="primary"
|
<el-table-column label="操作" width="240" align="center" fixed="right">
|
||||||
link
|
<template #default="scope">
|
||||||
icon="EditPen"
|
<el-button
|
||||||
@click="addOrUpdateHandle(scope.row.id)"
|
v-if="permissions.recruit_recruitstudentplangroup_edit"
|
||||||
>
|
type="primary"
|
||||||
调整
|
link
|
||||||
</el-button>
|
icon="EditPen"
|
||||||
<el-button
|
@click="addOrUpdateHandle(scope.row.id)"
|
||||||
v-if="permissions.recruit_recruitstudentplangroup_edit"
|
>
|
||||||
type="primary"
|
调整
|
||||||
link
|
</el-button>
|
||||||
icon="Switch"
|
<el-button v-if="permissions.recruit_recruitstudentplangroup_edit" type="primary" link icon="Switch" @click="majorHandle(scope.row)">
|
||||||
@click="majorHandle(scope.row)"
|
专业调整
|
||||||
>
|
</el-button>
|
||||||
专业调整
|
<el-button v-if="permissions.recruit_recruitstudentplangroup_del" type="primary" link icon="Delete" @click="deleteHandle(scope.row.id)">
|
||||||
</el-button>
|
删除
|
||||||
<el-button
|
</el-button>
|
||||||
v-if="permissions.recruit_recruitstudentplangroup_del"
|
</template>
|
||||||
type="primary"
|
</el-table-column>
|
||||||
link
|
</el-table>
|
||||||
icon="Delete"
|
|
||||||
@click="deleteHandle(scope.row.id)"
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<pagination
|
<pagination v-bind="state.pagination" @current-change="currentChangeHandle" @size-change="sizeChangeHandle" />
|
||||||
v-bind="state.pagination"
|
|
||||||
@current-change="currentChangeHandle"
|
|
||||||
@size-change="sizeChangeHandle"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<table-form v-if="addOrUpdateVisible" ref="addOrUpdateRef" @refreshDataList="getDataList" />
|
<table-form v-if="addOrUpdateVisible" ref="addOrUpdateRef" @refreshDataList="getDataList" />
|
||||||
<major-group-by-dept-form ref="majorGroupByDeptRef" />
|
<major-group-by-dept-form ref="majorGroupByDeptRef" />
|
||||||
<exam-people-index v-if="exitExamVisible" ref="examPeopleIndexRef" />
|
<exam-people-index v-if="exitExamVisible" ref="examPeopleIndexRef" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 预登记二维码弹窗 -->
|
<!-- 预登记二维码弹窗 -->
|
||||||
<el-dialog v-model="dialogFormVisible" title="预登记二维码" width="10%" height="50%" @close="dialogFormVisible=false">
|
<el-dialog v-model="dialogFormVisible" title="预登记二维码" width="10%" height="50%" @close="dialogFormVisible = false">
|
||||||
<!-- <vue-qr :text="payQrcode" :size="200"></vue-qr>-->
|
<!-- <vue-qr :text="payQrcode" :size="200"></vue-qr>-->
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="recruitstudentplangroup">
|
<script setup lang="ts" name="recruitstudentplangroup">
|
||||||
import { ref, reactive, computed, onMounted, nextTick, defineAsyncComponent } from 'vue'
|
import { ref, reactive, computed, onMounted, nextTick, defineAsyncComponent } from 'vue';
|
||||||
import { storeToRefs } from 'pinia'
|
import { storeToRefs } from 'pinia';
|
||||||
import { useUserInfo } from '/@/stores/userInfo'
|
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 { delObj, fetchList, putObj } from '/@/api/recruit/recruitstudentplangroup'
|
import { delObj, fetchList, putObj, editQuickField } from '/@/api/recruit/recruitstudentplangroup';
|
||||||
import { formatDate } from '/@/utils/formatTime'
|
import { formatDate } from '/@/utils/formatTime';
|
||||||
import { Calendar } from '@element-plus/icons-vue'
|
import { Calendar } from '@element-plus/icons-vue';
|
||||||
// import vueQr from 'vue-qr'
|
// import vueQr from 'vue-qr'
|
||||||
|
|
||||||
const TableForm = defineAsyncComponent(() => import('./enrolplantemplate-form.vue'))
|
const TableForm = defineAsyncComponent(() => import('./enrolplantemplate-form.vue'));
|
||||||
const MajorGroupByDeptForm = defineAsyncComponent(() => import('@/views/recruit/recruitplanmajor/majorGroupByDept.vue'))
|
const MajorGroupByDeptForm = defineAsyncComponent(() => import('@/views/recruit/recruitplanmajor/majorGroupByDept.vue'));
|
||||||
const ExamPeopleIndex = defineAsyncComponent(() => import('@/views/recruit/recruitexampeople/index.vue'))
|
const ExamPeopleIndex = defineAsyncComponent(() => import('@/views/recruit/recruitexampeople/index.vue'));
|
||||||
|
|
||||||
// 使用 Pinia store
|
// 使用 Pinia store
|
||||||
const userInfoStore = useUserInfo()
|
const userInfoStore = useUserInfo();
|
||||||
const { userInfos } = storeToRefs(userInfoStore)
|
const { userInfos } = storeToRefs(userInfoStore);
|
||||||
|
|
||||||
// 创建权限对象
|
// 创建权限对象
|
||||||
const permissions = computed(() => {
|
const permissions = computed(() => {
|
||||||
const perms: Record<string, boolean> = {}
|
const perms: Record<string, boolean> = {};
|
||||||
userInfos.value.authBtnList.forEach((perm: string) => {
|
userInfos.value.authBtnList.forEach((perm: string) => {
|
||||||
perms[perm] = true
|
perms[perm] = true;
|
||||||
})
|
});
|
||||||
return perms
|
return perms;
|
||||||
})
|
});
|
||||||
|
|
||||||
// 消息提示 hooks
|
// 消息提示 hooks
|
||||||
const message = useMessage()
|
const message = useMessage();
|
||||||
const messageBox = useMessageBox()
|
const messageBox = useMessageBox();
|
||||||
|
|
||||||
// 表格引用
|
// 表格引用
|
||||||
const tableRef = ref()
|
const tableRef = ref();
|
||||||
const searchFormRef = ref()
|
const searchFormRef = ref();
|
||||||
const addOrUpdateRef = ref()
|
const addOrUpdateRef = ref();
|
||||||
const majorGroupByDeptRef = ref()
|
const majorGroupByDeptRef = ref();
|
||||||
const examPeopleIndexRef = ref()
|
const examPeopleIndexRef = ref();
|
||||||
|
|
||||||
// 弹窗状态
|
// 弹窗状态
|
||||||
const addOrUpdateVisible = ref(false)
|
const addOrUpdateVisible = ref(false);
|
||||||
const exitExamVisible = ref(false)
|
const exitExamVisible = ref(false);
|
||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false);
|
||||||
|
|
||||||
// 数据
|
// 数据
|
||||||
const payQrcode = ref('')
|
const payQrcode = ref('');
|
||||||
|
|
||||||
// 查询表单
|
// 查询表单
|
||||||
const queryForm = reactive({
|
const queryForm = reactive({
|
||||||
groupName: ''
|
groupName: '',
|
||||||
})
|
});
|
||||||
|
|
||||||
// 日期格式化
|
// 日期格式化
|
||||||
const dateFormat = (date: string | null | undefined, format: string) => {
|
const dateFormat = (date: string | null | undefined, format: string) => {
|
||||||
if (!date) return '-'
|
if (!date) return '-';
|
||||||
try {
|
try {
|
||||||
return formatDate(new Date(date), format)
|
return formatDate(new Date(date), format);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return date
|
return date;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// 表格状态
|
// 表格状态
|
||||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||||
queryForm: queryForm,
|
queryForm: queryForm,
|
||||||
pageList: async (params: any) => {
|
pageList: async (params: any) => {
|
||||||
const response = await fetchList(params)
|
const response = await fetchList(params);
|
||||||
return {
|
return {
|
||||||
data: {
|
data: {
|
||||||
records: response.data.records,
|
records: response.data.records,
|
||||||
total: response.data.total
|
total: response.data.total,
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
|
|
||||||
// 使用 table hook
|
// 使用 table hook
|
||||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state)
|
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state);
|
||||||
|
|
||||||
// 初始化(如果需要初始化逻辑可以在这里添加)
|
// 初始化(如果需要初始化逻辑可以在这里添加)
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
// 初始化逻辑
|
// 初始化逻辑
|
||||||
}
|
};
|
||||||
|
|
||||||
// 显示二维码
|
// 显示二维码
|
||||||
const showQrCode = (row: any) => {
|
const showQrCode = (row: any) => {
|
||||||
payQrcode.value = '123'
|
payQrcode.value = '123';
|
||||||
dialogFormVisible.value = true
|
dialogFormVisible.value = true;
|
||||||
}
|
};
|
||||||
|
|
||||||
// 修改开关
|
// 修改开关
|
||||||
const changeSm = async (row: any) => {
|
const changeSm = async (row: any, type: any) => {
|
||||||
try {
|
try {
|
||||||
await putObj(row)
|
let params = {} as any;
|
||||||
message.success('修改成功')
|
params.id = row.id;
|
||||||
} catch (error: any) {
|
if (type == 'czSignStart') {
|
||||||
message.error(error.msg || '修改失败')
|
params['czSignStart'] = row.czSignStart;
|
||||||
}
|
}
|
||||||
}
|
if (type == 'gzSignStart') {
|
||||||
|
params['gzSignStart'] = row.gzSignStart;
|
||||||
|
}
|
||||||
|
if (type == 'jzxSignStart') {
|
||||||
|
params['jzxSignStart'] = row.jzxSignStart;
|
||||||
|
}
|
||||||
|
if (type == 'isPreStart') {
|
||||||
|
params['isPreStart'] = row.isPreStart;
|
||||||
|
}
|
||||||
|
await editQuickField(params);
|
||||||
|
message.success('修改成功');
|
||||||
|
} catch (error: any) {
|
||||||
|
message.error(error.msg || '修改失败');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 新增 / 修改
|
// 新增 / 修改
|
||||||
const addOrUpdateHandle = (id?: string) => {
|
const addOrUpdateHandle = (id?: string) => {
|
||||||
addOrUpdateVisible.value = true
|
addOrUpdateVisible.value = true;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
addOrUpdateRef.value?.init(id)
|
addOrUpdateRef.value?.init(id);
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 编辑审核人员
|
// 编辑审核人员
|
||||||
const editExam = () => {
|
const editExam = () => {
|
||||||
exitExamVisible.value = true
|
exitExamVisible.value = true;
|
||||||
// 如果组件已经加载,立即初始化
|
// 如果组件已经加载,立即初始化
|
||||||
if (examPeopleIndexRef.value && typeof examPeopleIndexRef.value.init === 'function') {
|
if (examPeopleIndexRef.value && typeof examPeopleIndexRef.value.init === 'function') {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
try {
|
try {
|
||||||
examPeopleIndexRef.value.init()
|
examPeopleIndexRef.value.init();
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.error('初始化审核人员弹窗失败:' + (error.message || '未知错误'))
|
message.error('初始化审核人员弹窗失败:' + (error.message || '未知错误'));
|
||||||
exitExamVisible.value = false
|
exitExamVisible.value = false;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
// 否则等待 watch 监听器处理
|
// 否则等待 watch 监听器处理
|
||||||
}
|
};
|
||||||
|
|
||||||
// 监听组件引用变化,当组件加载完成后自动初始化
|
// 监听组件引用变化,当组件加载完成后自动初始化
|
||||||
watch(examPeopleIndexRef, (newVal) => {
|
watch(
|
||||||
if (newVal && exitExamVisible.value) {
|
examPeopleIndexRef,
|
||||||
nextTick(() => {
|
(newVal) => {
|
||||||
if (newVal && typeof newVal.init === 'function') {
|
if (newVal && exitExamVisible.value) {
|
||||||
try {
|
nextTick(() => {
|
||||||
newVal.init()
|
if (newVal && typeof newVal.init === 'function') {
|
||||||
} catch (error: any) {
|
try {
|
||||||
message.error('初始化审核人员弹窗失败:' + (error.message || '未知错误'))
|
newVal.init();
|
||||||
exitExamVisible.value = false
|
} catch (error: any) {
|
||||||
}
|
message.error('初始化审核人员弹窗失败:' + (error.message || '未知错误'));
|
||||||
}
|
exitExamVisible.value = false;
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
}, { immediate: true })
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
);
|
||||||
|
|
||||||
// 专业调整
|
// 专业调整
|
||||||
const majorHandle = (row: any) => {
|
const majorHandle = (row: any) => {
|
||||||
if (!row || !row.id) {
|
if (!row || !row.id) {
|
||||||
message.warning('请选择有效的招生计划')
|
message.warning('请选择有效的招生计划');
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
majorGroupByDeptRef.value?.init(row)
|
majorGroupByDeptRef.value?.init(row);
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
const deleteHandle = async (id: string) => {
|
const deleteHandle = async (id: string) => {
|
||||||
try {
|
try {
|
||||||
await messageBox.confirm('是否确认删除本条数据?请谨慎操作')
|
await messageBox.confirm('是否确认删除本条数据?请谨慎操作');
|
||||||
await delObj(id)
|
await delObj(id);
|
||||||
message.success('删除成功')
|
message.success('删除成功');
|
||||||
getDataList()
|
getDataList();
|
||||||
} catch {
|
} catch {
|
||||||
// 用户取消
|
// 用户取消
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// 重置查询
|
// 重置查询
|
||||||
const resetQuery = () => {
|
const resetQuery = () => {
|
||||||
searchFormRef.value?.resetFields()
|
searchFormRef.value?.resetFields();
|
||||||
queryForm.groupName = ''
|
queryForm.groupName = '';
|
||||||
getDataList()
|
getDataList();
|
||||||
}
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init();
|
||||||
getDataList()
|
getDataList();
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
/* 时间段图标和文字垂直对齐 */
|
/* 时间段图标和文字垂直对齐 */
|
||||||
.date-cell {
|
.date-cell {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.date-icon {
|
.date-icon {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
color: #909399;
|
color: #909399;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.date-text {
|
.date-text {
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 开启报名开关文字颜色 */
|
/* 开启报名开关文字颜色 */
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user