Merge remote-tracking branch 'origin/developer' into developer
This commit is contained in:
30
src/api/recruit/recruitMajorCategory.ts
Normal file
30
src/api/recruit/recruitMajorCategory.ts
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
import request from "/@/utils/request"
|
||||||
|
|
||||||
|
// ========== 基础CRUD接口 ==========
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询列表数据
|
||||||
|
* @param query - 查询参数对象
|
||||||
|
* @returns Promise<分页数据>
|
||||||
|
*/
|
||||||
|
export function fetchList(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/recruit/recruitMajorCategory/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取专业类目树结构
|
||||||
|
* @param obj - 查询参数对象(包含ID等)
|
||||||
|
* @returns Promise<数据详情>
|
||||||
|
*/
|
||||||
|
export function majorCateTree(obj?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/recruit/recruitMajorCategory/majorCateTree',
|
||||||
|
method: 'get',
|
||||||
|
params: obj
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
106
src/api/recruit/recruitPolicyFile.ts
Normal file
106
src/api/recruit/recruitPolicyFile.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from "/@/utils/request"
|
||||||
|
|
||||||
|
// ========== 基础CRUD接口 ==========
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询列表数据
|
||||||
|
* @param query - 查询参数对象
|
||||||
|
* @returns Promise<分页数据>
|
||||||
|
*/
|
||||||
|
export function fetchList(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/recruit/recruitPolicyFile/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
* @param obj - 要新增的数据对象
|
||||||
|
* @returns Promise<boolean> - 操作结果
|
||||||
|
*/
|
||||||
|
export function addObj(obj?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/recruit/recruitPolicyFile',
|
||||||
|
method: 'post',
|
||||||
|
data: obj
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取详情数据
|
||||||
|
* @param obj - 查询参数对象(包含ID等)
|
||||||
|
* @returns Promise<数据详情>
|
||||||
|
*/
|
||||||
|
export function getObj(obj?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/recruit/recruitPolicyFile/details',
|
||||||
|
method: 'get',
|
||||||
|
params: obj
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除数据
|
||||||
|
* @param ids - 要删除的ID数组
|
||||||
|
* @returns Promise<操作结果>
|
||||||
|
*/
|
||||||
|
export function delObjs(ids?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/recruit/recruitPolicyFile',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新数据
|
||||||
|
* @param obj - 要更新的数据对象
|
||||||
|
* @returns Promise<操作结果>
|
||||||
|
*/
|
||||||
|
export function putObj(obj?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/recruit/recruitPolicyFile',
|
||||||
|
method: 'put',
|
||||||
|
data: obj
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========== 工具函数 ==========
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证字段值唯一性
|
||||||
|
* @param rule - 验证规则对象
|
||||||
|
* @param value - 要验证的值
|
||||||
|
* @param callback - 验证回调函数
|
||||||
|
* @param isEdit - 是否为编辑模式
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* // 在表单验证规则中使用
|
||||||
|
* fieldName: [
|
||||||
|
* {
|
||||||
|
* validator: (rule, value, callback) => {
|
||||||
|
* validateExist(rule, value, callback, form.id !== '');
|
||||||
|
* },
|
||||||
|
* trigger: 'blur',
|
||||||
|
* },
|
||||||
|
* ]
|
||||||
|
*/
|
||||||
|
export function validateExist(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||||
|
// 编辑模式下跳过验证
|
||||||
|
if (isEdit) {
|
||||||
|
return callback();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询是否存在相同值
|
||||||
|
getObj({ [rule.field]: value }).then((response) => {
|
||||||
|
const result = response.data;
|
||||||
|
if (result !== null && result.length > 0) {
|
||||||
|
callback(new Error('数据已经存在'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
106
src/api/recruit/recruitSchoolHistory.ts
Normal file
106
src/api/recruit/recruitSchoolHistory.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from "/@/utils/request"
|
||||||
|
|
||||||
|
// ========== 基础CRUD接口 ==========
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询列表数据
|
||||||
|
* @param query - 查询参数对象
|
||||||
|
* @returns Promise<分页数据>
|
||||||
|
*/
|
||||||
|
export function fetchList(query?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/recruit/recruitSchoolHistory/page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
* @param obj - 要新增的数据对象
|
||||||
|
* @returns Promise<boolean> - 操作结果
|
||||||
|
*/
|
||||||
|
export function addObj(obj?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/recruit/recruitSchoolHistory',
|
||||||
|
method: 'post',
|
||||||
|
data: obj
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取详情数据
|
||||||
|
* @param obj - 查询参数对象(包含ID等)
|
||||||
|
* @returns Promise<数据详情>
|
||||||
|
*/
|
||||||
|
export function getObj(obj?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/recruit/recruitSchoolHistory/details',
|
||||||
|
method: 'get',
|
||||||
|
params: obj
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除数据
|
||||||
|
* @param ids - 要删除的ID数组
|
||||||
|
* @returns Promise<操作结果>
|
||||||
|
*/
|
||||||
|
export function delObjs(ids?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/recruit/recruitSchoolHistory',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新数据
|
||||||
|
* @param obj - 要更新的数据对象
|
||||||
|
* @returns Promise<操作结果>
|
||||||
|
*/
|
||||||
|
export function putObj(obj?: Object) {
|
||||||
|
return request({
|
||||||
|
url: '/recruit/recruitSchoolHistory',
|
||||||
|
method: 'put',
|
||||||
|
data: obj
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========== 工具函数 ==========
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证字段值唯一性
|
||||||
|
* @param rule - 验证规则对象
|
||||||
|
* @param value - 要验证的值
|
||||||
|
* @param callback - 验证回调函数
|
||||||
|
* @param isEdit - 是否为编辑模式
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* // 在表单验证规则中使用
|
||||||
|
* fieldName: [
|
||||||
|
* {
|
||||||
|
* validator: (rule, value, callback) => {
|
||||||
|
* validateExist(rule, value, callback, form.id !== '');
|
||||||
|
* },
|
||||||
|
* trigger: 'blur',
|
||||||
|
* },
|
||||||
|
* ]
|
||||||
|
*/
|
||||||
|
export function validateExist(rule: any, value: any, callback: any, isEdit: boolean) {
|
||||||
|
// 编辑模式下跳过验证
|
||||||
|
if (isEdit) {
|
||||||
|
return callback();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询是否存在相同值
|
||||||
|
getObj({ [rule.field]: value }).then((response) => {
|
||||||
|
const result = response.data;
|
||||||
|
if (result !== null && result.length > 0) {
|
||||||
|
callback(new Error('数据已经存在'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@@ -176,7 +176,6 @@ const dataRules = reactive({
|
|||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
}],
|
}],
|
||||||
path: [{validator: rule.overLength, trigger: 'blur'}, {required: true, message: '路径不能为空', trigger: 'blur'}],
|
path: [{validator: rule.overLength, trigger: 'blur'}, {required: true, message: '路径不能为空', trigger: 'blur'}],
|
||||||
icon: [{validator: rule.overLength, trigger: 'blur'}, {required: true, message: '图标不能为空', trigger: 'blur'}],
|
|
||||||
permission: [{validator: rule.overLength, trigger: 'blur'}, {
|
permission: [{validator: rule.overLength, trigger: 'blur'}, {
|
||||||
required: true,
|
required: true,
|
||||||
message: '权限代码不能为空',
|
message: '权限代码不能为空',
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="visible"
|
v-model="visible"
|
||||||
:title="dialogTitle"
|
:title="dialogTitle"
|
||||||
width="50%"
|
width="80%"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
@@ -122,7 +122,13 @@ defineExpose({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.role-group {
|
.role-group {
|
||||||
|
width: 100%;
|
||||||
|
flex: 0 0 100%;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px 12px;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
@@ -137,8 +143,9 @@ defineExpose({
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
align-items: flex-start;
|
||||||
|
|
||||||
/* 每个按钮独立边框,换行后左侧也有边线 */
|
/* 每个分组内按钮可换行,分组之间不重叠 */
|
||||||
:deep(.el-radio-button) {
|
:deep(.el-radio-button) {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="tab-index-container">
|
<div class="tab-index-container">
|
||||||
<!-- 搜索表单 -->
|
<!-- 搜索表单 -->
|
||||||
<search-form
|
<search-form v-show="showSearch" :model="queryForm" ref="searchFormRef" @keyup-enter="getDataList">
|
||||||
v-show="showSearch"
|
|
||||||
:model="queryForm"
|
|
||||||
ref="searchFormRef"
|
|
||||||
@keyup-enter="getDataList"
|
|
||||||
>
|
|
||||||
<template #default="{ visible }">
|
<template #default="{ visible }">
|
||||||
<template v-if="visible">
|
<template v-if="visible">
|
||||||
<el-form-item label="招生计划" prop="groupId">
|
<el-form-item label="招生计划" prop="groupId">
|
||||||
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划" @change="chanMajor">
|
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划" @change="chanMajor">
|
||||||
<el-option
|
<el-option v-for="item in planList" :key="item.id" :label="item.groupName" :value="item.id" />
|
||||||
v-for="item in planList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.groupName"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="学院" prop="deptCode">
|
<el-form-item label="学院" prop="deptCode">
|
||||||
<el-select v-model="queryForm.deptCode" filterable clearable placeholder="请选择学院">
|
<el-select v-model="queryForm.deptCode" filterable clearable placeholder="请选择学院">
|
||||||
<el-option
|
<el-option v-for="item in deptList" :key="item.deptCode" :label="item.deptName" :value="item.deptCode" />
|
||||||
v-for="item in deptList"
|
|
||||||
:key="item.deptCode"
|
|
||||||
:label="item.deptName"
|
|
||||||
:value="item.deptCode"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="录取专业" prop="confirmedMajor">
|
<el-form-item label="录取专业" prop="confirmedMajor">
|
||||||
@@ -46,32 +31,17 @@
|
|||||||
<template v-else>
|
<template v-else>
|
||||||
<el-form-item label="缴费状态" prop="paystatus">
|
<el-form-item label="缴费状态" prop="paystatus">
|
||||||
<el-select v-model="queryForm.paystatus" filterable clearable placeholder="请选择缴费状态">
|
<el-select v-model="queryForm.paystatus" filterable clearable placeholder="请选择缴费状态">
|
||||||
<el-option
|
<el-option v-for="item in paystatusList" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
v-for="item in paystatusList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="推送状态" prop="pushed">
|
<el-form-item label="推送状态" prop="pushed">
|
||||||
<el-select v-model="queryForm.pushed" filterable clearable placeholder="请选择推送状态">
|
<el-select v-model="queryForm.pushed" filterable clearable placeholder="请选择推送状态">
|
||||||
<el-option
|
<el-option v-for="item in pushedList" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
v-for="item in pushedList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="报到状态" prop="backSchoolState">
|
<el-form-item label="报到状态" prop="backSchoolState">
|
||||||
<el-select v-model="queryForm.backSchoolState" filterable clearable placeholder="请选择报到状态">
|
<el-select v-model="queryForm.backSchoolState" filterable clearable placeholder="请选择报到状态">
|
||||||
<el-option
|
<el-option v-for="item in backSchoolStateList" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
v-for="item in backSchoolStateList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -86,30 +56,11 @@
|
|||||||
|
|
||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<div class="action-buttons-wrapper mb15">
|
<div class="action-buttons-wrapper mb15">
|
||||||
<el-button
|
<el-button type="warning" plain icon="Download" @click="handleExport"> 名单导出 </el-button>
|
||||||
type="warning"
|
<el-button v-if="hasAuth('recruit_recruitstudentsignup_allCX')" type="primary" plain icon="Search" class="ml10" @click="updateAllFS">
|
||||||
plain
|
|
||||||
icon="Download"
|
|
||||||
@click="handleExport"
|
|
||||||
>
|
|
||||||
名单导出
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
v-if="hasAuth('recruit_recruitstudentsignup_allCX')"
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="Search"
|
|
||||||
class="ml10"
|
|
||||||
@click="updateAllFS"
|
|
||||||
>
|
|
||||||
批量查询
|
批量查询
|
||||||
</el-button>
|
</el-button>
|
||||||
<right-toolbar
|
<right-toolbar @queryTable="getDataList" class="ml10" style="float: right" v-model:showSearch="showSearch"></right-toolbar>
|
||||||
@queryTable="getDataList"
|
|
||||||
class="ml10"
|
|
||||||
style="float: right; "
|
|
||||||
v-model:showSearch="showSearch"
|
|
||||||
></right-toolbar>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
@@ -161,14 +112,15 @@
|
|||||||
{
|
{
|
||||||
label: '报到状态',
|
label: '报到状态',
|
||||||
layout: 'horizontal',
|
layout: 'horizontal',
|
||||||
content: getBackSchoolStateConfig(scope.row.backSchoolState)?.label
|
content: getBackSchoolStateConfig(scope.row.backSchoolState)?.label,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '备注信息',
|
label: '备注信息',
|
||||||
content: scope.row.backSchoolRemark,
|
content: scope.row.backSchoolRemark,
|
||||||
contentClass: 'reason-content'
|
contentClass: 'reason-content',
|
||||||
}
|
},
|
||||||
]">
|
]"
|
||||||
|
>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<ClickableTag
|
<ClickableTag
|
||||||
:type="getBackSchoolStateConfig(scope.row.backSchoolState)?.type || 'info'"
|
:type="getBackSchoolStateConfig(scope.row.backSchoolState)?.type || 'info'"
|
||||||
@@ -219,18 +171,21 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="pushed" label="推送状态" width="110" align="center" show-overflow-tooltip>
|
<el-table-column prop="pushed" label="推送状态" width="110" align="center" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag
|
<el-tag :type="getStatusConfig(pushedList, scope.row.pushed)?.type">
|
||||||
:type="getStatusConfig(pushedList, scope.row.pushed)?.type"
|
|
||||||
>
|
|
||||||
{{ getStatusConfig(pushedList, scope.row.pushed)?.label }}
|
{{ getStatusConfig(pushedList, scope.row.pushed)?.label }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="200" align="center" fixed="right">
|
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="hasAuth('recruit_recruitstudentsignup_show') && scope.row.pushed == '1' && scope.row.paiedOffline != '10' && (scope.row.clfPayCode != undefined && scope.row.clfPayCode != '')"
|
v-if="
|
||||||
|
hasAuth('recruit_recruitstudentsignup_show') &&
|
||||||
|
scope.row.pushed == '1' &&
|
||||||
|
scope.row.paiedOffline != '10' &&
|
||||||
|
scope.row.clfPayCode != undefined &&
|
||||||
|
scope.row.clfPayCode != ''
|
||||||
|
"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
:icon="Tickets"
|
:icon="Tickets"
|
||||||
@@ -238,14 +193,20 @@
|
|||||||
>
|
>
|
||||||
支付二维码
|
支付二维码
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button v-if="hasAuth('recruit_recruitstudentsignup_back')" type="primary" link icon="EditPen" @click="handleCheckIn(scope.row)">
|
||||||
|
报到
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="hasAuth('recruit_recruitstudentsignup_back')"
|
v-if="hasAuth('recruit_recruitstudentsignup_leaveSchool')"
|
||||||
type="primary"
|
type="primary"
|
||||||
link
|
link
|
||||||
icon="EditPen"
|
icon="EditPen"
|
||||||
@click="handleCheckIn(scope.row)"
|
@click="handleLeaveSchool(scope.row, false)"
|
||||||
>
|
>
|
||||||
报到
|
退档
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="hasAuth('recruit_leaveSchool_force')" type="primary" link icon="EditPen" @click="handleLeaveSchool(scope.row, true)">
|
||||||
|
强制退档
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -253,11 +214,7 @@
|
|||||||
|
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<div class="pagination-wrapper">
|
<div class="pagination-wrapper">
|
||||||
<pagination
|
<pagination v-bind="state.pagination" @current-change="currentChangeHandle" @size-change="sizeChangeHandle" />
|
||||||
v-bind="state.pagination"
|
|
||||||
@current-change="currentChangeHandle"
|
|
||||||
@size-change="sizeChangeHandle"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -273,8 +230,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div style="padding-top: 20px;">
|
<div style="padding-top: 20px">
|
||||||
<div id="payQrcode1" style="display: inline-block;">
|
<div id="payQrcode1" style="display: inline-block">
|
||||||
{{ payQrcode1Msg }}
|
{{ payQrcode1Msg }}
|
||||||
</div>
|
</div>
|
||||||
<!-- <vue-qr :text="payQrcode1" :size="200" v-if="showPrise1" style="display: inline-block"></vue-qr> -->
|
<!-- <vue-qr :text="payQrcode1" :size="200" v-if="showPrise1" style="display: inline-block"></vue-qr> -->
|
||||||
@@ -289,7 +246,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- <vue-qr :text="payQrcode3" :size="200" v-if="showPrise3" style="display: inline-block"></vue-qr> -->
|
<!-- <vue-qr :text="payQrcode3" :size="200" v-if="showPrise3" style="display: inline-block"></vue-qr> -->
|
||||||
</div>
|
</div>
|
||||||
<span style="color: red;padding-top: 20px;">** 此界面为查询学生缴款二维码,如有收不到微信推送,或手机号填错的,可直接在此扫码支付,支付成功后,请手动点击"立即查询"按钮,查询该生的缴费情况;因财政收费系统有一定的滞后性,如点击"立即查询"后任显示未交费,请稍后再继续查询,或重新点击"立即查询"按钮 **</span>
|
<span style="color: red; padding-top: 20px"
|
||||||
|
>**
|
||||||
|
此界面为查询学生缴款二维码,如有收不到微信推送,或手机号填错的,可直接在此扫码支付,支付成功后,请手动点击"立即查询"按钮,查询该生的缴费情况;因财政收费系统有一定的滞后性,如点击"立即查询"后任显示未交费,请稍后再继续查询,或重新点击"立即查询"按钮
|
||||||
|
**</span
|
||||||
|
>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<stu-check-in ref="stuCheckInRef" @reload="refreshChange" />
|
<stu-check-in ref="stuCheckInRef" @reload="refreshChange" />
|
||||||
@@ -297,43 +258,43 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="backSchoolCheckinTabIndex">
|
<script setup lang="ts" name="backSchoolCheckinTabIndex">
|
||||||
import { ref, reactive, onMounted, nextTick, defineAsyncComponent, defineExpose } from 'vue'
|
import { ref, reactive, onMounted, nextTick, defineAsyncComponent, defineExpose } from 'vue';
|
||||||
import { useAuth } from '/@/hooks/auth'
|
import { useAuth } from '/@/hooks/auth';
|
||||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
import { BasicTableProps, useTable } from '/@/hooks/table';
|
||||||
import { useMessage } from '/@/hooks/message'
|
import { useMessage, useMessageBox } from '/@/hooks/message';
|
||||||
import { getList } from '/@/api/recruit/recruitstudentplangroup'
|
import { getList } from '/@/api/recruit/recruitstudentplangroup';
|
||||||
import { backSchoolStuPage } from '/@/api/recruit/recruitstudentsignup'
|
import { backSchoolStuPage, leaveSchool } from '/@/api/recruit/recruitstudentsignup';
|
||||||
import { getDeptList } from '/@/api/basic/basicclass'
|
import { getDeptList } from '/@/api/basic/basicclass';
|
||||||
import { listPlanByCondition as planMajor } from '/@/api/recruit/recruitstudentplan'
|
import { listPlanByCondition as planMajor } from '/@/api/recruit/recruitstudentplan';
|
||||||
import { updateFs, updateAllFS as updateAllFSApi } from '/@/api/finance/financenormalstu'
|
import { updateFs, updateAllFS as updateAllFSApi } from '/@/api/finance/financenormalstu';
|
||||||
import { getDicts } from '/@/api/admin/dict'
|
import { getDicts } from '/@/api/admin/dict';
|
||||||
import { PAY_STATUS_LIST,PUSHED_STATUS_LIST,getStatusConfig, getCheckInStatusConfig } from '/@/config/global'
|
import { PAY_STATUS_LIST, PUSHED_STATUS_LIST, getStatusConfig, getCheckInStatusConfig } from '/@/config/global';
|
||||||
import { CircleCheck, CircleClose, DocumentChecked, Warning, Clock, Tickets } from '@element-plus/icons-vue'
|
import { CircleCheck, CircleClose, DocumentChecked, Warning, Clock, Tickets } from '@element-plus/icons-vue';
|
||||||
|
|
||||||
const StuCheckIn = defineAsyncComponent(() => import('./stu-check-in.vue'))
|
const StuCheckIn = defineAsyncComponent(() => import('./stu-check-in.vue'));
|
||||||
const GenderTag = defineAsyncComponent(() => import('/@/components/GenderTag/index.vue'))
|
const GenderTag = defineAsyncComponent(() => import('/@/components/GenderTag/index.vue'));
|
||||||
const SearchForm = defineAsyncComponent(() => import('/@/components/SearchForm/index.vue'))
|
const SearchForm = defineAsyncComponent(() => import('/@/components/SearchForm/index.vue'));
|
||||||
const ClickableTag = defineAsyncComponent(() => import('/@/components/ClickableTag/index.vue'))
|
const ClickableTag = defineAsyncComponent(() => import('/@/components/ClickableTag/index.vue'));
|
||||||
const DetailPopover = defineAsyncComponent(() => import('/@/components/DetailPopover/index.vue'))
|
const DetailPopover = defineAsyncComponent(() => import('/@/components/DetailPopover/index.vue'));
|
||||||
const { hasAuth } = useAuth()
|
const { hasAuth } = useAuth();
|
||||||
// 消息提示 hooks
|
// 消息提示 hooks
|
||||||
const message = useMessage()
|
const message = useMessage();
|
||||||
|
|
||||||
// 表格引用
|
// 表格引用
|
||||||
const tableRef = ref()
|
const tableRef = ref();
|
||||||
const searchFormRef = ref()
|
const searchFormRef = ref();
|
||||||
const stuCheckInRef = ref()
|
const stuCheckInRef = ref();
|
||||||
|
|
||||||
// 搜索表单显示状态
|
// 搜索表单显示状态
|
||||||
const showSearch = ref(true)
|
const showSearch = ref(true);
|
||||||
|
|
||||||
// 数据
|
// 数据
|
||||||
const planList = ref<any[]>([])
|
const planList = ref<any[]>([]);
|
||||||
const planMajorList = ref<any[]>([])
|
const planMajorList = ref<any[]>([]);
|
||||||
const deptList = ref<any[]>([])
|
const deptList = ref<any[]>([]);
|
||||||
const backSchoolStateList = ref<any[]>([])
|
const backSchoolStateList = ref<any[]>([]);
|
||||||
const paystatusList = PAY_STATUS_LIST
|
const paystatusList = PAY_STATUS_LIST;
|
||||||
const pushedList = PUSHED_STATUS_LIST
|
const pushedList = PUSHED_STATUS_LIST;
|
||||||
|
|
||||||
// 查询表单
|
// 查询表单
|
||||||
const queryForm = reactive({
|
const queryForm = reactive({
|
||||||
@@ -345,33 +306,33 @@ const queryForm = reactive({
|
|||||||
pushed: '',
|
pushed: '',
|
||||||
backSchoolState: '',
|
backSchoolState: '',
|
||||||
isOut: '1',
|
isOut: '1',
|
||||||
auditStatus: '20'
|
auditStatus: '20',
|
||||||
})
|
});
|
||||||
|
|
||||||
// 弹窗状态
|
// 弹窗状态
|
||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false);
|
||||||
const tableData = ref<any[]>([])
|
const tableData = ref<any[]>([]);
|
||||||
const payQrcode1 = ref('')
|
const payQrcode1 = ref('');
|
||||||
const showPrise1 = ref(false)
|
const showPrise1 = ref(false);
|
||||||
const payQrcode1Msg = ref('')
|
const payQrcode1Msg = ref('');
|
||||||
const payQrcode2 = ref('')
|
const payQrcode2 = ref('');
|
||||||
const payQrcode2Msg = ref('')
|
const payQrcode2Msg = ref('');
|
||||||
const showPrise2 = ref(false)
|
const showPrise2 = ref(false);
|
||||||
const payQrcode3 = ref('')
|
const payQrcode3 = ref('');
|
||||||
const payQrcode3Msg = ref('')
|
const payQrcode3Msg = ref('');
|
||||||
const showPrise3 = ref(false)
|
const showPrise3 = ref(false);
|
||||||
|
|
||||||
// 获取学院名称
|
// 获取学院名称
|
||||||
const getDeptName = (deptCode: string) => {
|
const getDeptName = (deptCode: string) => {
|
||||||
const item = deptList.value.find(item => item.deptCode === deptCode)
|
const item = deptList.value.find((item) => item.deptCode === deptCode);
|
||||||
return item ? item.deptName : ''
|
return item ? item.deptName : '';
|
||||||
}
|
};
|
||||||
|
|
||||||
// 获取专业名称
|
// 获取专业名称
|
||||||
const getMajorName = (majorCode: string) => {
|
const getMajorName = (majorCode: string) => {
|
||||||
const item = planMajorList.value.find(item => item.majorCode === majorCode)
|
const item = planMajorList.value.find((item) => item.majorCode === majorCode);
|
||||||
return item ? item.majorName : ''
|
return item ? item.majorName : '';
|
||||||
}
|
};
|
||||||
|
|
||||||
// 获取报到状态配置(用于 ClickableTag)
|
// 获取报到状态配置(用于 ClickableTag)
|
||||||
const getBackSchoolStateConfig = (value: string) => {
|
const getBackSchoolStateConfig = (value: string) => {
|
||||||
@@ -380,204 +341,213 @@ const getBackSchoolStateConfig = (value: string) => {
|
|||||||
CircleClose,
|
CircleClose,
|
||||||
DocumentChecked,
|
DocumentChecked,
|
||||||
Warning,
|
Warning,
|
||||||
Clock
|
Clock,
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 表格状态
|
// 表格状态
|
||||||
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 backSchoolStuPage(params)
|
const response = await backSchoolStuPage(params);
|
||||||
return {
|
return {
|
||||||
data: {
|
data: {
|
||||||
records: response.data.records,
|
records: response.data.records,
|
||||||
total: response.data.total
|
total: response.data.total,
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
createdIsNeed: false
|
};
|
||||||
})
|
},
|
||||||
|
createdIsNeed: false,
|
||||||
|
});
|
||||||
|
|
||||||
// 使用 table hook
|
// 使用 table hook
|
||||||
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle, downBlobFile } = useTable(state)
|
const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle, downBlobFile } = useTable(state);
|
||||||
|
|
||||||
// 招生计划改变
|
// 招生计划改变
|
||||||
const chanMajor = async () => {
|
const chanMajor = async () => {
|
||||||
if (queryForm.groupId) {
|
if (queryForm.groupId) {
|
||||||
await getMajorList(queryForm.groupId)
|
await getMajorList(queryForm.groupId);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 获取专业列表
|
// 获取专业列表
|
||||||
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 || []
|
planMajorList.value = data.data || [];
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.error('获取专业列表失败', error)
|
console.error('获取专业列表失败', error);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 初始化
|
// 初始化
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
try {
|
try {
|
||||||
// 查询报到状态字典
|
// 查询报到状态字典
|
||||||
const dictData = await getDicts('check_in_status')
|
const dictData = await getDicts('check_in_status');
|
||||||
backSchoolStateList.value = dictData.data || []
|
backSchoolStateList.value = dictData.data || [];
|
||||||
|
|
||||||
// 查询二级学院信息
|
// 查询二级学院信息
|
||||||
const deptData = await getDeptList()
|
const deptData = await getDeptList();
|
||||||
deptList.value = deptData.data || []
|
deptList.value = deptData.data || [];
|
||||||
|
|
||||||
// 获取招生计划列表
|
// 获取招生计划列表
|
||||||
const planData = await getList()
|
const planData = await getList();
|
||||||
planList.value = planData.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);
|
||||||
}
|
}
|
||||||
|
|
||||||
getDataList()
|
getDataList();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.error('初始化失败', error)
|
console.error('初始化失败', error);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 打开报到窗口
|
// 打开报到窗口
|
||||||
const handleCheckIn = (row: any) => {
|
const handleCheckIn = (row: any) => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
stuCheckInRef.value?.init(row, state.pagination?.current || 1)
|
stuCheckInRef.value?.init(row, state.pagination?.current || 1);
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 刷新回调
|
// 刷新回调
|
||||||
const refreshChange = () => {
|
const refreshChange = () => {
|
||||||
getDataList()
|
getDataList();
|
||||||
}
|
};
|
||||||
|
|
||||||
// 批量查询
|
// 批量查询
|
||||||
const updateAllFS = async () => {
|
const updateAllFS = async () => {
|
||||||
if (!queryForm.groupId) {
|
if (!queryForm.groupId) {
|
||||||
message.warning('招生计划不能为空')
|
message.warning('招生计划不能为空');
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const plan = planList.value.find(e => e.id === queryForm.groupId)
|
const plan = planList.value.find((e) => e.id === queryForm.groupId);
|
||||||
if (!plan) return
|
if (!plan) return;
|
||||||
|
|
||||||
const data = await updateAllFSApi({ year: plan.year, stuSource: '1' })
|
const data = await updateAllFSApi({ year: plan.year, stuSource: '1' });
|
||||||
if (data.data.code == '200') {
|
if (data.data.code == '200') {
|
||||||
message.success('正在更新所有缴费单状态,请稍后查看更新结果')
|
message.success('正在更新所有缴费单状态,请稍后查看更新结果');
|
||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
// console.log(error)
|
// console.log(error)
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
const handleExport = async () => {
|
const handleExport = async () => {
|
||||||
if (!queryForm.groupId) {
|
if (!queryForm.groupId) {
|
||||||
message.warning('招生计划不能为空')
|
message.warning('招生计划不能为空');
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await downBlobFile(
|
await downBlobFile('/recruit/recruitstudentsignup/exportBackData', queryForm, '招生名单导出.xls');
|
||||||
'/recruit/recruitstudentsignup/exportBackData',
|
|
||||||
queryForm,
|
|
||||||
'招生名单导出.xls'
|
|
||||||
)
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.error(error.msg || '导出失败')
|
message.error(error.msg || '导出失败');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 立即查询
|
// 立即查询
|
||||||
const updateFS = async () => {
|
const updateFS = async () => {
|
||||||
if (tableData.value.length === 0) return
|
if (tableData.value.length === 0) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const serialNumber = tableData.value[0].serialNumber.substring(1, tableData.value[0].serialNumber.length)
|
const serialNumber = tableData.value[0].serialNumber.substring(1, tableData.value[0].serialNumber.length);
|
||||||
await updateFs({ serialNumber })
|
await updateFs({ serialNumber });
|
||||||
message.success('已提交查询请求,请等待1分钟后重新查询')
|
message.success('已提交查询请求,请等待1分钟后重新查询');
|
||||||
dialogFormVisible.value = false
|
dialogFormVisible.value = false;
|
||||||
getDataList()
|
getDataList();
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
message.error(error.msg || '查询失败')
|
message.error(error.msg || '查询失败');
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 显示支付二维码
|
// 显示支付二维码
|
||||||
const showPayCode = (row: any) => {
|
const showPayCode = (row: any) => {
|
||||||
showPrise1.value = false
|
showPrise1.value = false;
|
||||||
showPrise2.value = false
|
showPrise2.value = false;
|
||||||
showPrise3.value = false
|
showPrise3.value = false;
|
||||||
|
|
||||||
payQrcode1.value = ''
|
payQrcode1.value = '';
|
||||||
payQrcode2.value = ''
|
payQrcode2.value = '';
|
||||||
payQrcode3.value = ''
|
payQrcode3.value = '';
|
||||||
|
|
||||||
if (row.clfPayCode && row.clfPayCode != '') {
|
if (row.clfPayCode && row.clfPayCode != '') {
|
||||||
payQrcode1Msg.value = '材料费、代办费'
|
payQrcode1Msg.value = '材料费、代办费';
|
||||||
showPrise1.value = true
|
showPrise1.value = true;
|
||||||
payQrcode1.value = 'https://jscz.govpay.ccb.com/online/fsjf?PyF_BillNo=' + row.clfPayCode + '&Verf_CD=blank&Admn_Rgon_Cd=320400'
|
payQrcode1.value = 'https://jscz.govpay.ccb.com/online/fsjf?PyF_BillNo=' + row.clfPayCode + '&Verf_CD=blank&Admn_Rgon_Cd=320400';
|
||||||
} else {
|
} else {
|
||||||
payQrcode1Msg.value = ''
|
payQrcode1Msg.value = '';
|
||||||
showPrise1.value = false
|
showPrise1.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (row.xfPayCode && row.xfPayCode != '') {
|
if (row.xfPayCode && row.xfPayCode != '') {
|
||||||
payQrcode2Msg.value = '学费'
|
payQrcode2Msg.value = '学费';
|
||||||
showPrise2.value = true
|
showPrise2.value = true;
|
||||||
payQrcode2.value = 'https://jscz.govpay.ccb.com/online/fsjf?PyF_BillNo=' + row.xfPayCode + '&Verf_CD=blank&Admn_Rgon_Cd=320400'
|
payQrcode2.value = 'https://jscz.govpay.ccb.com/online/fsjf?PyF_BillNo=' + row.xfPayCode + '&Verf_CD=blank&Admn_Rgon_Cd=320400';
|
||||||
} else {
|
} else {
|
||||||
payQrcode2Msg.value = ''
|
payQrcode2Msg.value = '';
|
||||||
showPrise2.value = false
|
showPrise2.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (row.zdbPayCode && row.zdbPayCode != '') {
|
if (row.zdbPayCode && row.zdbPayCode != '') {
|
||||||
payQrcode3Msg.value = '中德班学费'
|
payQrcode3Msg.value = '中德班学费';
|
||||||
showPrise3.value = true
|
showPrise3.value = true;
|
||||||
payQrcode3.value = 'https://jscz.govpay.ccb.com/online/fsjf?PyF_BillNo=' + row.zdbPayCode + '&Verf_CD=blank&Admn_Rgon_Cd=320400'
|
payQrcode3.value = 'https://jscz.govpay.ccb.com/online/fsjf?PyF_BillNo=' + row.zdbPayCode + '&Verf_CD=blank&Admn_Rgon_Cd=320400';
|
||||||
} else {
|
} else {
|
||||||
payQrcode3Msg.value = ''
|
payQrcode3Msg.value = '';
|
||||||
showPrise3.value = false
|
showPrise3.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
tableData.value = [row]
|
tableData.value = [row];
|
||||||
dialogFormVisible.value = true
|
dialogFormVisible.value = true;
|
||||||
}
|
};
|
||||||
|
|
||||||
// 重置查询
|
// 重置查询
|
||||||
const resetQuery = () => {
|
const resetQuery = () => {
|
||||||
searchFormRef.value?.resetFields()
|
searchFormRef.value?.resetFields();
|
||||||
queryForm.groupId = ''
|
queryForm.groupId = '';
|
||||||
queryForm.deptCode = ''
|
queryForm.deptCode = '';
|
||||||
queryForm.confirmedMajor = ''
|
queryForm.confirmedMajor = '';
|
||||||
queryForm.search = ''
|
queryForm.search = '';
|
||||||
queryForm.paystatus = ''
|
queryForm.paystatus = '';
|
||||||
queryForm.pushed = ''
|
queryForm.pushed = '';
|
||||||
queryForm.backSchoolState = ''
|
queryForm.backSchoolState = '';
|
||||||
queryForm.isOut = '1'
|
queryForm.isOut = '1';
|
||||||
queryForm.auditStatus = '20'
|
queryForm.auditStatus = '20';
|
||||||
if (planList.value.length > 0) {
|
if (planList.value.length > 0) {
|
||||||
queryForm.groupId = planList.value[0].id
|
queryForm.groupId = planList.value[0].id;
|
||||||
}
|
|
||||||
getDataList()
|
|
||||||
}
|
}
|
||||||
|
getDataList();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleLeaveSchool = (row: any, force: any) => {
|
||||||
|
var str = force? '强制' : '';
|
||||||
|
useMessageBox()
|
||||||
|
.confirm('是否确认'+str+'办理退档操作?请谨慎操作')
|
||||||
|
.then(() => {
|
||||||
|
return leaveSchool({ 'id':row.id,'force':force });
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
message.success('操作成功');
|
||||||
|
getDataList();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// 暴露方法供父组件调用
|
// 暴露方法供父组件调用
|
||||||
defineExpose({
|
defineExpose({
|
||||||
init
|
init,
|
||||||
})
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init();
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -588,7 +558,6 @@ onMounted(() => {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.action-buttons-wrapper {
|
.action-buttons-wrapper {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,7 +208,7 @@
|
|||||||
<el-table-column label="家长电话1" align="center" prop="parentTelOne" show-overflow-tooltip></el-table-column>
|
<el-table-column label="家长电话1" align="center" prop="parentTelOne" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column label="家长电话2" align="center" prop="parentTelTwo" show-overflow-tooltip></el-table-column>
|
<el-table-column label="家长电话2" align="center" prop="parentTelTwo" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="remarks" label="备注" align="center" show-overflow-tooltip />
|
<el-table-column prop="remarks" label="备注" align="center" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="100" align="center" fixed="right">
|
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="hasAuth('recruit_newstucheckin_edit')"
|
v-if="hasAuth('recruit_newstucheckin_edit')"
|
||||||
@@ -219,6 +219,19 @@
|
|||||||
>
|
>
|
||||||
报到
|
报到
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
v-if="hasAuth('recruit_recruitstudentsignup_leaveSchool')"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
icon="EditPen"
|
||||||
|
@click="handleLeaveSchool(scope.row, false)"
|
||||||
|
>
|
||||||
|
退档
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="hasAuth('recruit_leaveSchool_force')" type="primary" link icon="EditPen" @click="handleLeaveSchool(scope.row, true)">
|
||||||
|
强制退档
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -240,7 +253,7 @@
|
|||||||
import { ref, reactive, onMounted, defineAsyncComponent } from 'vue'
|
import { ref, reactive, onMounted, defineAsyncComponent } from 'vue'
|
||||||
import { useAuth } from '/@/hooks/auth'
|
import { useAuth } from '/@/hooks/auth'
|
||||||
import { BasicTableProps, useTable } from '/@/hooks/table'
|
import { BasicTableProps, useTable } from '/@/hooks/table'
|
||||||
import { useMessage } from '/@/hooks/message'
|
import {useMessage, useMessageBox} from '/@/hooks/message'
|
||||||
import { fetchList } from '/@/api/recruit/newstucheckin'
|
import { fetchList } from '/@/api/recruit/newstucheckin'
|
||||||
import { getDictsByTypes } from '/@/api/admin/dict'
|
import { getDictsByTypes } from '/@/api/admin/dict'
|
||||||
import { useDict } from '/@/hooks/dict'
|
import { useDict } from '/@/hooks/dict'
|
||||||
@@ -251,6 +264,7 @@ import { getList } from '/@/api/recruit/recruitstudentplangroup'
|
|||||||
import DetailPopover from '/@/components/DetailPopover/index.vue'
|
import DetailPopover from '/@/components/DetailPopover/index.vue'
|
||||||
import ClickableTag from '/@/components/ClickableTag/index.vue'
|
import ClickableTag from '/@/components/ClickableTag/index.vue'
|
||||||
import { InfoFilled, CircleCheck, CircleClose, DocumentChecked, Warning, Clock } from '@element-plus/icons-vue'
|
import { InfoFilled, CircleCheck, CircleClose, DocumentChecked, Warning, Clock } from '@element-plus/icons-vue'
|
||||||
|
import {leaveSchool} from "/@/api/recruit/recruitstudentsignup";
|
||||||
|
|
||||||
const StuCheckIn = defineAsyncComponent(() => import('./stu-check-in.vue'))
|
const StuCheckIn = defineAsyncComponent(() => import('./stu-check-in.vue'))
|
||||||
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||||
@@ -430,6 +444,19 @@ const init = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleLeaveSchool = (row: any, force: any) => {
|
||||||
|
var str = force? '强制' : '';
|
||||||
|
useMessageBox()
|
||||||
|
.confirm('是否确认'+str+'办理退档操作?请谨慎操作')
|
||||||
|
.then(() => {
|
||||||
|
return leaveSchool({ 'id':row.id,'force':force });
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
message.success('操作成功');
|
||||||
|
getDataList();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
|
|||||||
129
src/views/recruit/recruitMajorCategory/index.vue
Normal file
129
src/views/recruit/recruitMajorCategory/index.vue
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
<template>
|
||||||
|
<div class="layout-padding">
|
||||||
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
|
|
||||||
|
<!-- 操作按钮区域 -->
|
||||||
|
<el-row>
|
||||||
|
<div class="mb8" style="width: 100%">
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
:export="'recruit_recruitMajorCategory_export'"
|
||||||
|
@exportExcel="exportExcel"
|
||||||
|
class="ml10 mr20"
|
||||||
|
style="float: right;"
|
||||||
|
@queryTable="getDataList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 数据表格区域 -->
|
||||||
|
<el-table
|
||||||
|
:data="state.dataList"
|
||||||
|
v-loading="state.loading"
|
||||||
|
border
|
||||||
|
:cell-style="tableStyle.cellStyle"
|
||||||
|
:header-cell-style="tableStyle.headerCellStyle"
|
||||||
|
@selection-change="selectionChangHandle"
|
||||||
|
@sort-change="sortChangeHandle"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" label="#" width="40" />
|
||||||
|
<el-table-column
|
||||||
|
prop="oneCategory"
|
||||||
|
label="一级类目"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="twoCategory"
|
||||||
|
label="二级类目"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="oneTitle"
|
||||||
|
label="一级类目名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="twoTitle"
|
||||||
|
label="二级类目"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<pagination
|
||||||
|
@size-change="sizeChangeHandle"
|
||||||
|
@current-change="currentChangeHandle"
|
||||||
|
v-bind="state.pagination"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 导入excel弹窗 (需要在 upms-biz/resources/file 下维护模板) -->
|
||||||
|
<upload-excel
|
||||||
|
ref="excelUploadRef"
|
||||||
|
title="导入"
|
||||||
|
url="/recruit/recruitMajorCategory/import"
|
||||||
|
temp-url="/admin/sys-file/local/file/recruitMajorCategory.xlsx"
|
||||||
|
@refreshDataList="getDataList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts" name="systemRecruitMajorCategory">
|
||||||
|
// ========== 导入声明 ==========
|
||||||
|
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||||
|
import { fetchList } from "/@/api/recruit/recruitMajorCategory";
|
||||||
|
|
||||||
|
// ========== 组件声明 ==========
|
||||||
|
// 异步加载表单弹窗组件
|
||||||
|
|
||||||
|
// ========== 字典数据 ==========
|
||||||
|
|
||||||
|
// ========== 组件引用 ==========
|
||||||
|
const excelUploadRef = ref(); // Excel上传弹窗引用
|
||||||
|
const queryRef = ref(); // 查询表单引用
|
||||||
|
|
||||||
|
// ========== 响应式数据 ==========
|
||||||
|
const showSearch = ref(true); // 是否显示搜索区域
|
||||||
|
const selectObjs = ref([]) as any; // 表格多选数据
|
||||||
|
const multiple = ref(true); // 是否多选
|
||||||
|
|
||||||
|
// ========== 表格状态 ==========
|
||||||
|
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||||
|
queryForm: {}, // 查询参数
|
||||||
|
pageList: fetchList // 分页查询方法
|
||||||
|
});
|
||||||
|
|
||||||
|
// ========== Hook引用 ==========
|
||||||
|
// 表格相关Hook
|
||||||
|
const {
|
||||||
|
getDataList,
|
||||||
|
currentChangeHandle,
|
||||||
|
sizeChangeHandle,
|
||||||
|
sortChangeHandle,
|
||||||
|
downBlobFile,
|
||||||
|
tableStyle
|
||||||
|
} = useTable(state);
|
||||||
|
|
||||||
|
// ========== 方法定义 ==========
|
||||||
|
/**
|
||||||
|
* 重置查询条件
|
||||||
|
*/
|
||||||
|
const resetQuery = () => {
|
||||||
|
// 清空搜索条件
|
||||||
|
queryRef.value?.resetFields();
|
||||||
|
// 清空多选
|
||||||
|
selectObjs.value = [];
|
||||||
|
// 重新查询
|
||||||
|
getDataList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表格多选事件处理
|
||||||
|
* @param objs 选中的数据行
|
||||||
|
*/
|
||||||
|
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||||
|
selectObjs.value = objs.map(({ id }) => id);
|
||||||
|
multiple.value = !objs.length;
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
252
src/views/recruit/recruitPolicyFile/form.vue
Normal file
252
src/views/recruit/recruitPolicyFile/form.vue
Normal file
@@ -0,0 +1,252 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog :title="form.id ? '编辑' : '新增'" v-model="visible"
|
||||||
|
:close-on-click-modal="false" draggable>
|
||||||
|
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading">
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="24" class="mb20">
|
||||||
|
<el-form-item label="标题" prop="title">
|
||||||
|
<el-input v-model="form.title" placeholder="请输入标题"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" class="mb20">
|
||||||
|
<el-form-item label="文件地址" prop="fileUrl">
|
||||||
|
<el-upload
|
||||||
|
:action="uploadUrl"
|
||||||
|
class="avatar-uploader"
|
||||||
|
name="file"
|
||||||
|
:headers="headers"
|
||||||
|
:data="uploadData"
|
||||||
|
:show-file-list="false"
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
:http-request="httpRequest"
|
||||||
|
:limit="1"
|
||||||
|
:accept="['.jpg,.jpeg,.png,.gif,.pdf']"
|
||||||
|
:on-success="handleUploadSuccess">
|
||||||
|
<div v-if="form.fileUrl" class="avatar-wrapper">
|
||||||
|
<img :src="baseUrl + form.fileUrl" class="avatar"/>
|
||||||
|
</div>
|
||||||
|
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<!-- <el-col :span="12" class="mb20">-->
|
||||||
|
<!-- <el-form-item label="1 资助政策文件" prop="type">-->
|
||||||
|
<!-- <el-input v-model="form.type" placeholder="请输入1 资助政策文件"/>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="visible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="onSubmit" :disabled="loading">确 认</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts" name="RecruitPolicyFileDialog">
|
||||||
|
// ========== 1. 导入语句 ==========
|
||||||
|
import { useMessage } from "/@/hooks/message";
|
||||||
|
import { getObj, addObj, putObj } from '/@/api/recruit/recruitPolicyFile';
|
||||||
|
import {Plus} from "@element-plus/icons-vue";
|
||||||
|
import {reactive, ref} from "vue";
|
||||||
|
import axios from "axios";
|
||||||
|
import { Session } from '/@/utils/storage'
|
||||||
|
|
||||||
|
// ========== 2. 组件定义 ==========
|
||||||
|
// 定义组件事件
|
||||||
|
const emit = defineEmits(['refresh']);
|
||||||
|
|
||||||
|
// ========== 3. 响应式数据定义 ==========
|
||||||
|
// 基础响应式变量
|
||||||
|
const dataFormRef = ref(); // 表单引用
|
||||||
|
const visible = ref(false); // 弹窗显示状态
|
||||||
|
const loading = ref(false); // 加载状态
|
||||||
|
const baseUrl = import.meta.env.VITE_API_URL
|
||||||
|
|
||||||
|
// 表单数据对象
|
||||||
|
const form = reactive({
|
||||||
|
id: '', // 主键
|
||||||
|
fileUrl: '', // 文件地址
|
||||||
|
title: '', // 标题
|
||||||
|
type: '', // 1 资助政策文件
|
||||||
|
});
|
||||||
|
|
||||||
|
const uploadUrl = baseUrl + '/recruit/file/uploadAttachment'
|
||||||
|
// 请求头
|
||||||
|
const headers = computed(() => {
|
||||||
|
return {
|
||||||
|
"Authorization": 'Bearer ' + Session.getToken()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const uploadData = reactive({})
|
||||||
|
const fileReader = ref<FileReader | null>(null)
|
||||||
|
|
||||||
|
const httpRequest = (options: any) => {
|
||||||
|
const file = options.file
|
||||||
|
if (file && fileReader.value) {
|
||||||
|
fileReader.value.readAsDataURL(file)
|
||||||
|
fileReader.value.onload = () => {
|
||||||
|
const base64Str = fileReader.value?.result as string
|
||||||
|
const config = {
|
||||||
|
url: uploadUrl,
|
||||||
|
method: 'post',
|
||||||
|
headers: headers.value,
|
||||||
|
data: {
|
||||||
|
base64Str: base64Str.split(',')[1]
|
||||||
|
},
|
||||||
|
timeout: 10000,
|
||||||
|
onUploadProgress: function (progressEvent: any) {
|
||||||
|
progressEvent.percent = progressEvent.loaded / progressEvent.total * 100
|
||||||
|
options.onProgress(progressEvent, file)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
axios(config)
|
||||||
|
.then((res: any) => {
|
||||||
|
options.onSuccess(res, file)
|
||||||
|
})
|
||||||
|
.catch((err: any) => {
|
||||||
|
options.onError(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 上传前验证
|
||||||
|
const beforeUpload = (file: File) => {
|
||||||
|
const isLt5M = file.size < 10 * 1024 * 1024
|
||||||
|
if (!isLt5M) {
|
||||||
|
useMessage().error('文件大小不能超过10M')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
// 通用上传成功回调(单文件 - avatar模式)
|
||||||
|
const handleUploadSuccess = (res:any) => {
|
||||||
|
const fileUrl = res.data.fileUrl
|
||||||
|
form['fileUrl'] = fileUrl
|
||||||
|
}
|
||||||
|
// ========== 4. 字典数据处理 ==========
|
||||||
|
|
||||||
|
// ========== 5. 表单校验规则 ==========
|
||||||
|
const dataRules = ref({
|
||||||
|
title: [
|
||||||
|
{ required: true, message: '请输入标题', trigger: 'blur' },
|
||||||
|
{ min: 2, max: 50, message: '长度在 2 到 50 个字符', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
fileUrl: [
|
||||||
|
{ required: true, message: '请上传文件', trigger: 'blur' },
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
// ========== 6. 方法定义 ==========
|
||||||
|
// 获取详情数据
|
||||||
|
const getRecruitPolicyFileData = async (id: string) => {
|
||||||
|
try {
|
||||||
|
loading.value = true;
|
||||||
|
const { data } = await getObj({ id: id });
|
||||||
|
// 直接将第一条数据赋值给表单
|
||||||
|
Object.assign(form, data[0]);
|
||||||
|
} catch (error) {
|
||||||
|
useMessage().error('获取数据失败');
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 打开弹窗方法
|
||||||
|
const openDialog = (id: string) => {
|
||||||
|
visible.value = true;
|
||||||
|
form.id = '';
|
||||||
|
|
||||||
|
// 重置表单数据
|
||||||
|
nextTick(() => {
|
||||||
|
dataFormRef.value?.resetFields();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 获取RecruitPolicyFile信息
|
||||||
|
if (id) {
|
||||||
|
form.id = id;
|
||||||
|
getRecruitPolicyFileData(id);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 提交表单方法
|
||||||
|
const onSubmit = async () => {
|
||||||
|
loading.value = true; // 防止重复提交
|
||||||
|
|
||||||
|
// 表单校验
|
||||||
|
const valid = await dataFormRef.value.validate().catch(() => {});
|
||||||
|
if (!valid) {
|
||||||
|
loading.value = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 根据是否有ID判断是新增还是修改
|
||||||
|
form.id ? await putObj(form) : await addObj(form);
|
||||||
|
useMessage().success(form.id ? '修改成功' : '添加成功');
|
||||||
|
visible.value = false;
|
||||||
|
emit('refresh'); // 通知父组件刷新列表
|
||||||
|
} catch (err: any) {
|
||||||
|
useMessage().error(err.msg);
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
// 初始化 FileReader
|
||||||
|
onMounted(() => {
|
||||||
|
if (!window.FileReader) {
|
||||||
|
useMessage().error('您的浏览器不支持 FileReader API!')
|
||||||
|
} else {
|
||||||
|
fileReader.value = new FileReader()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// ========== 7. 对外暴露 ==========
|
||||||
|
// 暴露方法给父组件
|
||||||
|
defineExpose({
|
||||||
|
openDialog
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.avatar-uploader {
|
||||||
|
:deep(.el-upload) {
|
||||||
|
border: 1px dashed var(--el-border-color);
|
||||||
|
border-radius: 6px;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: var(--el-transition-duration-fast);
|
||||||
|
width: 148px;
|
||||||
|
height: 148px;
|
||||||
|
&:hover {
|
||||||
|
border-color: var(--el-color-primary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar-uploader-icon {
|
||||||
|
font-size: 28px;
|
||||||
|
color: #8c939d;
|
||||||
|
width: 148px;
|
||||||
|
height: 148px;
|
||||||
|
line-height: 148px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatar-wrapper {
|
||||||
|
width: 148px;
|
||||||
|
height: 148px;
|
||||||
|
.avatar {
|
||||||
|
width: 148px;
|
||||||
|
height: 148px;
|
||||||
|
display: block;
|
||||||
|
object-fit: cover;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
219
src/views/recruit/recruitPolicyFile/index.vue
Normal file
219
src/views/recruit/recruitPolicyFile/index.vue
Normal file
@@ -0,0 +1,219 @@
|
|||||||
|
<template>
|
||||||
|
<div class="layout-padding">
|
||||||
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
|
|
||||||
|
<!-- 操作按钮区域 -->
|
||||||
|
<el-row>
|
||||||
|
<div class="mb8" style="width: 100%">
|
||||||
|
<el-button
|
||||||
|
icon="folder-add"
|
||||||
|
type="primary"
|
||||||
|
class="ml10"
|
||||||
|
@click="formDialogRef.openDialog()"
|
||||||
|
v-auth="'recruit_recruitPolicyFile_add'"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
:disabled="multiple"
|
||||||
|
icon="Delete"
|
||||||
|
type="primary"
|
||||||
|
v-auth="'recruit_recruitPolicyFile_del'"
|
||||||
|
@click="handleDelete(selectObjs)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
:export="'recruit_recruitPolicyFile_export'"
|
||||||
|
@exportExcel="exportExcel"
|
||||||
|
class="ml10 mr20"
|
||||||
|
style="float: right;"
|
||||||
|
@queryTable="getDataList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 数据表格区域 -->
|
||||||
|
<el-table
|
||||||
|
:data="state.dataList"
|
||||||
|
v-loading="state.loading"
|
||||||
|
border
|
||||||
|
:cell-style="tableStyle.cellStyle"
|
||||||
|
:header-cell-style="tableStyle.headerCellStyle"
|
||||||
|
@selection-change="selectionChangHandle"
|
||||||
|
@sort-change="sortChangeHandle"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="40" align="center" />
|
||||||
|
<el-table-column type="index" label="#" width="40" />
|
||||||
|
<el-table-column
|
||||||
|
prop="fileUrl"
|
||||||
|
label="文件"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 100px; height: 100px;"
|
||||||
|
:src="baseUrl+scope.row.fileUrl"
|
||||||
|
:preview-src-list="[baseUrl+scope.row.fileUrl]"
|
||||||
|
:z-index="9999"
|
||||||
|
fit="cover"
|
||||||
|
>
|
||||||
|
<template #progress="{ activeIndex, total }">
|
||||||
|
<span>{{ activeIndex + 1 + '-' + total }}</span>
|
||||||
|
</template>
|
||||||
|
</el-image>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
prop="title"
|
||||||
|
label="标题"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<!-- <el-table-column -->
|
||||||
|
<!-- prop="type" -->
|
||||||
|
<!-- label="1 资助政策文件" -->
|
||||||
|
<!-- show-overflow-tooltip-->
|
||||||
|
<!-- />-->
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
icon="edit-pen"
|
||||||
|
text
|
||||||
|
type="primary"
|
||||||
|
v-auth="'recruit_recruitPolicyFile_edit'"
|
||||||
|
@click="formDialogRef.openDialog(scope.row.id)"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
icon="delete"
|
||||||
|
text
|
||||||
|
type="primary"
|
||||||
|
v-auth="'recruit_recruitPolicyFile_del'"
|
||||||
|
@click="handleDelete([scope.row.id])"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<pagination
|
||||||
|
@size-change="sizeChangeHandle"
|
||||||
|
@current-change="currentChangeHandle"
|
||||||
|
v-bind="state.pagination"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 编辑、新增弹窗 -->
|
||||||
|
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||||
|
|
||||||
|
<!-- 导入excel弹窗 (需要在 upms-biz/resources/file 下维护模板) -->
|
||||||
|
<upload-excel
|
||||||
|
ref="excelUploadRef"
|
||||||
|
title="导入"
|
||||||
|
url="/recruit/recruitPolicyFile/import"
|
||||||
|
temp-url="/admin/sys-file/local/file/recruitPolicyFile.xlsx"
|
||||||
|
@refreshDataList="getDataList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts" name="systemRecruitPolicyFile">
|
||||||
|
// ========== 导入声明 ==========
|
||||||
|
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||||
|
import { fetchList, delObjs } from "/@/api/recruit/recruitPolicyFile";
|
||||||
|
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||||
|
import { useDict } from '/@/hooks/dict';
|
||||||
|
const baseUrl = import.meta.env.VITE_API_URL
|
||||||
|
|
||||||
|
// ========== 组件声明 ==========
|
||||||
|
// 异步加载表单弹窗组件
|
||||||
|
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||||
|
|
||||||
|
// ========== 字典数据 ==========
|
||||||
|
|
||||||
|
// ========== 组件引用 ==========
|
||||||
|
const formDialogRef = ref(); // 表单弹窗引用
|
||||||
|
const excelUploadRef = ref(); // Excel上传弹窗引用
|
||||||
|
const queryRef = ref(); // 查询表单引用
|
||||||
|
|
||||||
|
// ========== 响应式数据 ==========
|
||||||
|
const showSearch = ref(true); // 是否显示搜索区域
|
||||||
|
const selectObjs = ref([]) as any; // 表格多选数据
|
||||||
|
const multiple = ref(true); // 是否多选
|
||||||
|
|
||||||
|
// ========== 表格状态 ==========
|
||||||
|
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||||
|
queryForm: {}, // 查询参数
|
||||||
|
pageList: fetchList // 分页查询方法
|
||||||
|
});
|
||||||
|
|
||||||
|
// ========== Hook引用 ==========
|
||||||
|
// 表格相关Hook
|
||||||
|
const {
|
||||||
|
getDataList,
|
||||||
|
currentChangeHandle,
|
||||||
|
sizeChangeHandle,
|
||||||
|
sortChangeHandle,
|
||||||
|
downBlobFile,
|
||||||
|
tableStyle
|
||||||
|
} = useTable(state);
|
||||||
|
|
||||||
|
// ========== 方法定义 ==========
|
||||||
|
/**
|
||||||
|
* 重置查询条件
|
||||||
|
*/
|
||||||
|
const resetQuery = () => {
|
||||||
|
// 清空搜索条件
|
||||||
|
queryRef.value?.resetFields();
|
||||||
|
// 清空多选
|
||||||
|
selectObjs.value = [];
|
||||||
|
// 重新查询
|
||||||
|
getDataList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出Excel文件
|
||||||
|
*/
|
||||||
|
const exportExcel = () => {
|
||||||
|
downBlobFile(
|
||||||
|
'/recruit/recruitPolicyFile/export',
|
||||||
|
Object.assign(state.queryForm, { ids: selectObjs }),
|
||||||
|
'recruitPolicyFile.xlsx'
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表格多选事件处理
|
||||||
|
* @param objs 选中的数据行
|
||||||
|
*/
|
||||||
|
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||||
|
selectObjs.value = objs.map(({ id }) => id);
|
||||||
|
multiple.value = !objs.length;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据处理
|
||||||
|
* @param ids 要删除的数据ID数组
|
||||||
|
*/
|
||||||
|
const handleDelete = async (ids: string[]) => {
|
||||||
|
try {
|
||||||
|
await useMessageBox().confirm('此操作将永久删除');
|
||||||
|
} catch {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await delObjs(ids);
|
||||||
|
getDataList();
|
||||||
|
useMessage().success('删除成功');
|
||||||
|
} catch (err: any) {
|
||||||
|
useMessage().error(err.msg);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
124
src/views/recruit/recruitSchoolHistory/form.vue
Normal file
124
src/views/recruit/recruitSchoolHistory/form.vue
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog :title="form.id ? '编辑' : '新增'" v-model="visible"
|
||||||
|
:close-on-click-modal="false" draggable>
|
||||||
|
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading">
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12" class="mb20">
|
||||||
|
<el-form-item label="学校代码" prop="schoolCode">
|
||||||
|
<el-input v-model="form.schoolCode" placeholder="请输入学校代码"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" class="mb20">
|
||||||
|
<el-form-item label="原名称" prop="oldName">
|
||||||
|
<el-input v-model="form.oldName" placeholder="请输入原名称"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" class="mb20">
|
||||||
|
<el-form-item label="新名称" prop="newName">
|
||||||
|
<el-input v-model="form.newName" placeholder="请输入新名称"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="visible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="onSubmit" :disabled="loading">确 认</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts" name="RecruitSchoolHistoryDialog">
|
||||||
|
// ========== 1. 导入语句 ==========
|
||||||
|
import { useDict } from '/@/hooks/dict';
|
||||||
|
import { rule } from '/@/utils/validate';
|
||||||
|
import { useMessage } from "/@/hooks/message";
|
||||||
|
import { getObj, addObj, putObj, validateExist } from '/@/api/recruit/recruitSchoolHistory';
|
||||||
|
|
||||||
|
// ========== 2. 组件定义 ==========
|
||||||
|
// 定义组件事件
|
||||||
|
const emit = defineEmits(['refresh']);
|
||||||
|
|
||||||
|
// ========== 3. 响应式数据定义 ==========
|
||||||
|
// 基础响应式变量
|
||||||
|
const dataFormRef = ref(); // 表单引用
|
||||||
|
const visible = ref(false); // 弹窗显示状态
|
||||||
|
const loading = ref(false); // 加载状态
|
||||||
|
|
||||||
|
// 表单数据对象
|
||||||
|
const form = reactive({
|
||||||
|
id: '', // 主键
|
||||||
|
schoolCode: '', // 学校代码
|
||||||
|
oldName: '', // 原名称
|
||||||
|
newName: '', // 新名称
|
||||||
|
});
|
||||||
|
|
||||||
|
// ========== 4. 字典数据处理 ==========
|
||||||
|
|
||||||
|
// ========== 5. 表单校验规则 ==========
|
||||||
|
const dataRules = ref({
|
||||||
|
});
|
||||||
|
|
||||||
|
// ========== 6. 方法定义 ==========
|
||||||
|
// 获取详情数据
|
||||||
|
const getRecruitSchoolHistoryData = async (id: string) => {
|
||||||
|
try {
|
||||||
|
loading.value = true;
|
||||||
|
const { data } = await getObj({ id: id });
|
||||||
|
// 直接将第一条数据赋值给表单
|
||||||
|
Object.assign(form, data[0]);
|
||||||
|
} catch (error) {
|
||||||
|
useMessage().error('获取数据失败');
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 打开弹窗方法
|
||||||
|
const openDialog = (id: string) => {
|
||||||
|
visible.value = true;
|
||||||
|
form.id = '';
|
||||||
|
|
||||||
|
// 重置表单数据
|
||||||
|
nextTick(() => {
|
||||||
|
dataFormRef.value?.resetFields();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 获取RecruitSchoolHistory信息
|
||||||
|
if (id) {
|
||||||
|
form.id = id;
|
||||||
|
getRecruitSchoolHistoryData(id);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 提交表单方法
|
||||||
|
const onSubmit = async () => {
|
||||||
|
loading.value = true; // 防止重复提交
|
||||||
|
|
||||||
|
// 表单校验
|
||||||
|
const valid = await dataFormRef.value.validate().catch(() => {});
|
||||||
|
if (!valid) {
|
||||||
|
loading.value = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 根据是否有ID判断是新增还是修改
|
||||||
|
form.id ? await putObj(form) : await addObj(form);
|
||||||
|
useMessage().success(form.id ? '修改成功' : '添加成功');
|
||||||
|
visible.value = false;
|
||||||
|
emit('refresh'); // 通知父组件刷新列表
|
||||||
|
} catch (err: any) {
|
||||||
|
useMessage().error(err.msg);
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// ========== 7. 对外暴露 ==========
|
||||||
|
// 暴露方法给父组件
|
||||||
|
defineExpose({
|
||||||
|
openDialog
|
||||||
|
});
|
||||||
|
</script>
|
||||||
213
src/views/recruit/recruitSchoolHistory/index.vue
Normal file
213
src/views/recruit/recruitSchoolHistory/index.vue
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
<template>
|
||||||
|
<div class="layout-padding">
|
||||||
|
<div class="layout-padding-auto layout-padding-view">
|
||||||
|
|
||||||
|
<!-- 操作按钮区域 -->
|
||||||
|
<el-row>
|
||||||
|
<div class="mb8" style="width: 100%">
|
||||||
|
<el-button
|
||||||
|
icon="folder-add"
|
||||||
|
type="primary"
|
||||||
|
class="ml10"
|
||||||
|
@click="formDialogRef.openDialog()"
|
||||||
|
v-auth="'recruit_recruitSchoolHistory_add'"
|
||||||
|
>
|
||||||
|
新增
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
icon="upload-filled"
|
||||||
|
type="primary"
|
||||||
|
class="ml10"
|
||||||
|
@click="excelUploadRef.show()"
|
||||||
|
v-auth="'recruit_recruitSchoolHistory_add'"
|
||||||
|
>
|
||||||
|
导入
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
plain
|
||||||
|
:disabled="multiple"
|
||||||
|
icon="Delete"
|
||||||
|
type="primary"
|
||||||
|
v-auth="'recruit_recruitSchoolHistory_del'"
|
||||||
|
@click="handleDelete(selectObjs)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
<right-toolbar
|
||||||
|
v-model:showSearch="showSearch"
|
||||||
|
:export="'recruit_recruitSchoolHistory_export'"
|
||||||
|
@exportExcel="exportExcel"
|
||||||
|
class="ml10 mr20"
|
||||||
|
style="float: right;"
|
||||||
|
@queryTable="getDataList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 数据表格区域 -->
|
||||||
|
<el-table
|
||||||
|
:data="state.dataList"
|
||||||
|
v-loading="state.loading"
|
||||||
|
border
|
||||||
|
:cell-style="tableStyle.cellStyle"
|
||||||
|
:header-cell-style="tableStyle.headerCellStyle"
|
||||||
|
@selection-change="selectionChangHandle"
|
||||||
|
@sort-change="sortChangeHandle"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="40" align="center" />
|
||||||
|
<el-table-column type="index" label="#" width="40" />
|
||||||
|
<el-table-column
|
||||||
|
prop="schoolCode"
|
||||||
|
label="学校代码"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="oldName"
|
||||||
|
label="原名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="newName"
|
||||||
|
label="新名称"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
icon="edit-pen"
|
||||||
|
text
|
||||||
|
type="primary"
|
||||||
|
v-auth="'recruit_recruitSchoolHistory_edit'"
|
||||||
|
@click="formDialogRef.openDialog(scope.row.id)"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
icon="delete"
|
||||||
|
text
|
||||||
|
type="primary"
|
||||||
|
v-auth="'recruit_recruitSchoolHistory_del'"
|
||||||
|
@click="handleDelete([scope.row.id])"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<pagination
|
||||||
|
@size-change="sizeChangeHandle"
|
||||||
|
@current-change="currentChangeHandle"
|
||||||
|
v-bind="state.pagination"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 编辑、新增弹窗 -->
|
||||||
|
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||||
|
|
||||||
|
<!-- 导入excel弹窗 (需要在 upms-biz/resources/file 下维护模板) -->
|
||||||
|
<upload-excel
|
||||||
|
ref="excelUploadRef"
|
||||||
|
title="导入"
|
||||||
|
url="/recruit/recruitSchoolHistory/import"
|
||||||
|
temp-url="/admin/sys-file/local/file/recruitSchoolHistory.xlsx"
|
||||||
|
@refreshDataList="getDataList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts" name="systemRecruitSchoolHistory">
|
||||||
|
// ========== 导入声明 ==========
|
||||||
|
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||||
|
import { fetchList, delObjs } from "/@/api/recruit/recruitSchoolHistory";
|
||||||
|
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||||
|
import { useDict } from '/@/hooks/dict';
|
||||||
|
|
||||||
|
// ========== 组件声明 ==========
|
||||||
|
// 异步加载表单弹窗组件
|
||||||
|
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||||
|
|
||||||
|
// ========== 字典数据 ==========
|
||||||
|
|
||||||
|
// ========== 组件引用 ==========
|
||||||
|
const formDialogRef = ref(); // 表单弹窗引用
|
||||||
|
const excelUploadRef = ref(); // Excel上传弹窗引用
|
||||||
|
const queryRef = ref(); // 查询表单引用
|
||||||
|
|
||||||
|
// ========== 响应式数据 ==========
|
||||||
|
const showSearch = ref(true); // 是否显示搜索区域
|
||||||
|
const selectObjs = ref([]) as any; // 表格多选数据
|
||||||
|
const multiple = ref(true); // 是否多选
|
||||||
|
|
||||||
|
// ========== 表格状态 ==========
|
||||||
|
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||||
|
queryForm: {}, // 查询参数
|
||||||
|
pageList: fetchList // 分页查询方法
|
||||||
|
});
|
||||||
|
|
||||||
|
// ========== Hook引用 ==========
|
||||||
|
// 表格相关Hook
|
||||||
|
const {
|
||||||
|
getDataList,
|
||||||
|
currentChangeHandle,
|
||||||
|
sizeChangeHandle,
|
||||||
|
sortChangeHandle,
|
||||||
|
downBlobFile,
|
||||||
|
tableStyle
|
||||||
|
} = useTable(state);
|
||||||
|
|
||||||
|
// ========== 方法定义 ==========
|
||||||
|
/**
|
||||||
|
* 重置查询条件
|
||||||
|
*/
|
||||||
|
const resetQuery = () => {
|
||||||
|
// 清空搜索条件
|
||||||
|
queryRef.value?.resetFields();
|
||||||
|
// 清空多选
|
||||||
|
selectObjs.value = [];
|
||||||
|
// 重新查询
|
||||||
|
getDataList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出Excel文件
|
||||||
|
*/
|
||||||
|
const exportExcel = () => {
|
||||||
|
downBlobFile(
|
||||||
|
'/recruit/recruitSchoolHistory/export',
|
||||||
|
Object.assign(state.queryForm, { ids: selectObjs }),
|
||||||
|
'recruitSchoolHistory.xlsx'
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表格多选事件处理
|
||||||
|
* @param objs 选中的数据行
|
||||||
|
*/
|
||||||
|
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||||
|
selectObjs.value = objs.map(({ id }) => id);
|
||||||
|
multiple.value = !objs.length;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据处理
|
||||||
|
* @param ids 要删除的数据ID数组
|
||||||
|
*/
|
||||||
|
const handleDelete = async (ids: string[]) => {
|
||||||
|
try {
|
||||||
|
await useMessageBox().confirm('此操作将永久删除');
|
||||||
|
} catch {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
await delObjs(ids);
|
||||||
|
getDataList();
|
||||||
|
useMessage().success('删除成功');
|
||||||
|
} catch (err: any) {
|
||||||
|
useMessage().error(err.msg);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -1,57 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" v-model="visible" width="800px">
|
||||||
:title="!dataForm.id ? '新增' : '修改'"
|
<el-form :model="dataForm" :rules="dataRule" ref="dataFormRef" @keyup.enter="dataFormSubmit" label-width="100px">
|
||||||
:close-on-click-modal="false"
|
|
||||||
v-model="visible"
|
|
||||||
width="800px"
|
|
||||||
>
|
|
||||||
<el-form :model="dataForm" :rules="dataRule" ref="dataFormRef" @keyup.enter="dataFormSubmit"
|
|
||||||
label-width="100px">
|
|
||||||
|
|
||||||
<el-form-item label="招生计划" prop="groupId">
|
<el-form-item label="招生计划" prop="groupId">
|
||||||
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划">
|
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划">
|
||||||
<el-option
|
<el-option v-for="item in planList" :key="item.id" :label="item.groupName" :value="item.id"> </el-option>
|
||||||
v-for="item in planList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.groupName"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="专业代码" prop="majorCode">
|
<el-form-item label="专业序号" prop="majorCode">
|
||||||
<el-input v-model="dataForm.majorCode" placeholder="专业代码"></el-input>
|
<el-input v-model="dataForm.majorCode" placeholder="专业序号"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="专业名称" prop="majorName">
|
<el-form-item label="专业名称" prop="majorName">
|
||||||
<el-input v-model="dataForm.majorName" placeholder="专业名称"></el-input>
|
<el-input v-model="dataForm.majorName" placeholder="专业名称"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="专业规范名称" class="form-item-cascader">
|
||||||
|
<el-cascader v-model="chooseMajorCate" :options="majorCateTreeData" @change="handleChange" style="width: 100%" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="所属学院" prop="deptCode">
|
<el-form-item label="所属学院" prop="deptCode">
|
||||||
<el-select v-model="dataForm.deptCode" filterable placeholder="请选择">
|
<el-select v-model="dataForm.deptCode" filterable placeholder="请选择">
|
||||||
<el-option
|
<el-option v-for="item in deptList" :key="item.deptCode" :label="item.deptName" :value="item.deptCode"> </el-option>
|
||||||
v-for="item in deptList"
|
|
||||||
:key="item.deptCode"
|
|
||||||
:label="item.deptName"
|
|
||||||
:value="item.deptCode">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="学制" prop="learnYear">
|
<el-form-item label="学制" prop="learnYear">
|
||||||
<el-select v-model="dataForm.learnYear" filterable placeholder="请选择学制">
|
<el-select v-model="dataForm.learnYear" filterable placeholder="请选择学制">
|
||||||
<el-option
|
<el-option v-for="item in majorYears" :key="item.value" :label="item.label" :value="item.value"> </el-option>
|
||||||
v-for="item in majorYears"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="层次" prop="majorLevel">
|
<el-form-item label="层次" prop="majorLevel">
|
||||||
<el-select v-model="dataForm.majorLevel" filterable placeholder="请选择层次">
|
<el-select v-model="dataForm.majorLevel" filterable placeholder="请选择层次">
|
||||||
<el-option
|
<el-option v-for="item in ccList" :key="item.label" :label="item.label" :value="item.label"> </el-option>
|
||||||
v-for="item in ccList"
|
|
||||||
:key="item.label"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.label">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-row>
|
<el-row>
|
||||||
@@ -61,7 +37,6 @@
|
|||||||
<el-radio v-for="item in yes_no_type" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
|
<el-radio v-for="item in yes_no_type" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="订单班" prop="isOrder">
|
<el-form-item label="订单班" prop="isOrder">
|
||||||
@@ -69,7 +44,6 @@
|
|||||||
<el-radio v-for="item in yes_no_type" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
|
<el-radio v-for="item in yes_no_type" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="联院班" prop="isUnion">
|
<el-form-item label="联院班" prop="isUnion">
|
||||||
@@ -81,50 +55,25 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item label="正式专业代码" prop="stuworkMajorCode">
|
<el-form-item label="正式专业代码" prop="stuworkMajorCode">
|
||||||
<el-select v-model="dataForm.stuworkMajorCode" filterable placeholder="请选择正式专业代码">
|
<el-select v-model="dataForm.stuworkMajorCode" filterable placeholder="请选择正式专业代码">
|
||||||
<el-option
|
<el-option v-for="item in offcialZydmList" :key="item.majorCode" :label="item.majorCodeAndName" :value="item.majorCode"> </el-option>
|
||||||
v-for="item in offcialZydmList"
|
|
||||||
:key="item.majorCode"
|
|
||||||
:label="item.majorCodeAndName"
|
|
||||||
:value="item.majorCode">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="初中费用" prop="czFee">
|
<el-form-item label="初中费用" prop="czFee">
|
||||||
<el-input-number
|
<el-input-number v-model="dataForm.czFee" controls-position="right" :min="0" :max="999999" :precision="2" placeholder="请输入初中费用">
|
||||||
v-model="dataForm.czFee"
|
|
||||||
controls-position="right"
|
|
||||||
:min="0"
|
|
||||||
:max="999999"
|
|
||||||
:precision="2"
|
|
||||||
placeholder="请输入初中费用"
|
|
||||||
>
|
|
||||||
</el-input-number>
|
</el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="高中费用" prop="gzFee">
|
<el-form-item label="高中费用" prop="gzFee">
|
||||||
<el-input-number
|
<el-input-number v-model="dataForm.gzFee" controls-position="right" :min="0" :max="999999" :precision="2" placeholder="请输入高中费用">
|
||||||
v-model="dataForm.gzFee"
|
|
||||||
controls-position="right"
|
|
||||||
:min="0"
|
|
||||||
:max="999999"
|
|
||||||
:precision="2"
|
|
||||||
placeholder="请输入高中费用"
|
|
||||||
>
|
|
||||||
</el-input-number>
|
</el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="技职校费用" prop="jzxFee">
|
<el-form-item label="技职校费用" prop="jzxFee">
|
||||||
<el-input-number
|
<el-input-number v-model="dataForm.jzxFee" controls-position="right" :min="0" :max="999999" :precision="2" placeholder="请输入技职校费用">
|
||||||
v-model="dataForm.jzxFee"
|
|
||||||
controls-position="right"
|
|
||||||
:min="0"
|
|
||||||
:max="999999"
|
|
||||||
:precision="2"
|
|
||||||
placeholder="请输入技职校费用" >
|
|
||||||
</el-input-number>
|
</el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -148,106 +97,93 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, nextTick } from 'vue'
|
import { ref, reactive, nextTick } from 'vue';
|
||||||
import { ElNotification } from 'element-plus'
|
import { ElNotification } from 'element-plus';
|
||||||
import { addObj, getObj, putObj } from '/@/api/recruit/recruitstudentplan'
|
import { addObj, getObj, putObj } from '/@/api/recruit/recruitstudentplan';
|
||||||
import { getDeptList } from '/@/api/basic/basicclass'
|
import { getDeptList } from '/@/api/basic/basicclass';
|
||||||
import { getList } from '/@/api/recruit/recruitstudentplangroup'
|
import { getList } from '/@/api/recruit/recruitstudentplangroup';
|
||||||
import { getMajorNameList } from '/@/api/basic/major'
|
import { getMajorNameList } from '/@/api/basic/major';
|
||||||
import { getDictsByTypes } from '/@/api/admin/dict'
|
import { getDictsByTypes } from '/@/api/admin/dict';
|
||||||
import { useDict } from '/@/hooks/dict'
|
import { useDict } from '/@/hooks/dict';
|
||||||
|
import { majorCateTree } from '/@/api/recruit/recruitMajorCategory';
|
||||||
|
|
||||||
// Emits
|
// Emits
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'refreshDataList'): void
|
(e: 'refreshDataList'): void;
|
||||||
}>()
|
}>();
|
||||||
|
|
||||||
// 字典数据
|
// 字典数据
|
||||||
const { yes_no_type } = useDict('yes_no_type')
|
const { yes_no_type } = useDict('yes_no_type');
|
||||||
|
|
||||||
// 表单引用
|
// 表单引用
|
||||||
const dataFormRef = ref()
|
const dataFormRef = ref();
|
||||||
|
|
||||||
// 响应式数据
|
// 响应式数据
|
||||||
const visible = ref(false)
|
const visible = ref(false);
|
||||||
const canSubmit = ref(false)
|
const canSubmit = ref(false);
|
||||||
const cityPlanIdList = ref<any[]>([])
|
const cityPlanIdList = ref<any[]>([]);
|
||||||
const offcialZydmList = ref<any[]>([])
|
const offcialZydmList = ref<any[]>([]);
|
||||||
const planList = ref<any[]>([])
|
const planList = ref<any[]>([]);
|
||||||
const deptList = ref<any[]>([])
|
const deptList = ref<any[]>([]);
|
||||||
const ccList = ref<any[]>([])
|
const ccList = ref<any[]>([]);
|
||||||
const majorYears = ref<any[]>([])
|
const majorYears = ref<any[]>([]);
|
||||||
const tuitionFeeList = ref<any[]>([])
|
const tuitionFeeList = ref<any[]>([]);
|
||||||
|
const majorCateTreeData = ref<any[]>([]);
|
||||||
|
const chooseMajorCate = ref<any[]>([]);
|
||||||
|
|
||||||
const dataForm = reactive({
|
const dataForm = reactive({
|
||||||
id: "",
|
id: '',
|
||||||
groupId: "",
|
groupId: '',
|
||||||
majorCode: "",
|
majorCode: '',
|
||||||
majorName: "",
|
standardMajorCode: '',
|
||||||
deptCode: "",
|
standardMajorTwoCode: '',
|
||||||
learnYear: "",
|
majorName: '',
|
||||||
majorLevel: "",
|
deptCode: '',
|
||||||
isZd: "0",
|
learnYear: '',
|
||||||
isOrder: "0",
|
majorLevel: '',
|
||||||
remarks: "",
|
isZd: '0',
|
||||||
stuworkMajorCode: "",
|
isOrder: '0',
|
||||||
isUnion: "0",
|
remarks: '',
|
||||||
|
stuworkMajorCode: '',
|
||||||
|
isUnion: '0',
|
||||||
tuitionFee: 0,
|
tuitionFee: 0,
|
||||||
czFee: 0,
|
czFee: 0,
|
||||||
gzFee: 0,
|
gzFee: 0,
|
||||||
jzxFee: 0,
|
jzxFee: 0,
|
||||||
sort: 0
|
sort: 0,
|
||||||
})
|
});
|
||||||
|
|
||||||
const dataRule = {
|
const dataRule = {
|
||||||
majorCode: [
|
majorCode: [
|
||||||
{ required: true, message: '专业代码不能为空', trigger: 'blur' },
|
{ required: true, message: '专业代码不能为空', trigger: 'blur' },
|
||||||
{ min: 1, max: 6, message: '专业代码长度不大于6个字符', trigger: 'blur' }
|
{ min: 1, max: 6, message: '专业代码长度不大于6个字符', trigger: 'blur' },
|
||||||
],
|
|
||||||
tuitionFee: [
|
|
||||||
{ required: true, message: '学费不能为空', trigger: 'blur' }
|
|
||||||
],
|
],
|
||||||
|
tuitionFee: [{ required: true, message: '学费不能为空', trigger: 'blur' }],
|
||||||
majorName: [
|
majorName: [
|
||||||
{ required: true, message: '专业名称不能为空', trigger: 'blur' },
|
{ required: true, message: '专业名称不能为空', trigger: 'blur' },
|
||||||
{ min: 1, max: 200, message: '专业名称长度不大于200个字符', trigger: 'blur' }
|
{ min: 1, max: 200, message: '专业名称长度不大于200个字符', trigger: 'blur' },
|
||||||
],
|
|
||||||
groupId: [
|
|
||||||
{ required: true, message: '招生计划不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
learnYear: [
|
|
||||||
{ required: true, message: '学制不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
deptCode: [
|
|
||||||
{ required: true, message: '学院不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
majorLevel: [
|
|
||||||
{ required: true, message: '层次不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
isOrder: [
|
|
||||||
{ required: true, message: '订单班不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
isZd: [
|
|
||||||
{ required: true, message: '订单班不能为空', trigger: 'blur' }
|
|
||||||
],
|
|
||||||
isUnion: [
|
|
||||||
{ required: true, message: '联院班不能为空', trigger: 'blur' }
|
|
||||||
],
|
],
|
||||||
|
groupId: [{ required: true, message: '招生计划不能为空', trigger: 'blur' }],
|
||||||
|
learnYear: [{ required: true, message: '学制不能为空', trigger: 'blur' }],
|
||||||
|
deptCode: [{ required: true, message: '学院不能为空', trigger: 'blur' }],
|
||||||
|
majorLevel: [{ required: true, message: '层次不能为空', trigger: 'blur' }],
|
||||||
|
isOrder: [{ required: true, message: '订单班不能为空', trigger: 'blur' }],
|
||||||
|
isZd: [{ required: true, message: '订单班不能为空', trigger: 'blur' }],
|
||||||
|
isUnion: [{ required: true, message: '联院班不能为空', trigger: 'blur' }],
|
||||||
czFee: [
|
czFee: [
|
||||||
{ required: true, message: '初中费用不能为空', trigger: 'blur' },
|
{ required: true, message: '初中费用不能为空', trigger: 'blur' },
|
||||||
{ type: 'number', min: 0, message: '初中费用不能小于0', trigger: 'blur' }
|
{ type: 'number', min: 0, message: '初中费用不能小于0', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
gzFee: [
|
gzFee: [
|
||||||
{ required: true, message: '高中费用不能为空', trigger: 'blur' },
|
{ required: true, message: '高中费用不能为空', trigger: 'blur' },
|
||||||
{ type: 'number', min: 0, message: '高中费用不能小于0', trigger: 'blur' }
|
{ type: 'number', min: 0, message: '高中费用不能小于0', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
jzxFee: [
|
jzxFee: [
|
||||||
{ required: true, message: '技职校费用不能为空', trigger: 'blur' },
|
{ required: true, message: '技职校费用不能为空', trigger: 'blur' },
|
||||||
{ type: 'number', min: 0, message: '技职校费用不能小于0', trigger: 'blur' }
|
{ type: 'number', min: 0, message: '技职校费用不能小于0', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
remarks: [
|
remarks: [{ min: 1, max: 100, message: '备注长度不大于100个字符', trigger: 'blur' }],
|
||||||
{ min: 1, max: 100, message: '备注长度不大于100个字符', trigger: 'blur' }
|
};
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断市平台招生专业是否占用,占用不可选
|
* 判断市平台招生专业是否占用,占用不可选
|
||||||
@@ -263,57 +199,62 @@ const dataRule = {
|
|||||||
const setFeeDefaults = () => {
|
const setFeeDefaults = () => {
|
||||||
if (tuitionFeeList.value.length > 0) {
|
if (tuitionFeeList.value.length > 0) {
|
||||||
// 初中费用:字典值 1
|
// 初中费用:字典值 1
|
||||||
const czFeeItem = tuitionFeeList.value.find((item: any) => item.label === '1')
|
const czFeeItem = tuitionFeeList.value.find((item: any) => item.label === '1');
|
||||||
|
|
||||||
if (czFeeItem) {
|
if (czFeeItem) {
|
||||||
dataForm.czFee = Number(czFeeItem.value) || 0
|
dataForm.czFee = Number(czFeeItem.value) || 0;
|
||||||
}
|
}
|
||||||
// 高中费用:字典值 2
|
// 高中费用:字典值 2
|
||||||
const gzFeeItem = tuitionFeeList.value.find((item: any) => item.label === '2')
|
const gzFeeItem = tuitionFeeList.value.find((item: any) => item.label === '2');
|
||||||
if (gzFeeItem) {
|
if (gzFeeItem) {
|
||||||
dataForm.gzFee = Number(gzFeeItem.value) || 0
|
dataForm.gzFee = Number(gzFeeItem.value) || 0;
|
||||||
}
|
}
|
||||||
// 技职校费用:字典值 3
|
// 技职校费用:字典值 3
|
||||||
const jzxFeeItem = tuitionFeeList.value.find((item: any) => item.label === '3')
|
const jzxFeeItem = tuitionFeeList.value.find((item: any) => item.label === '3');
|
||||||
if (jzxFeeItem) {
|
if (jzxFeeItem) {
|
||||||
dataForm.jzxFee = Number(jzxFeeItem.value) || 0
|
dataForm.jzxFee = Number(jzxFeeItem.value) || 0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
const initData = (id: string | null) => {
|
const initData = (id: string | null) => {
|
||||||
// 查询二级学院信息
|
// 查询二级学院信息
|
||||||
getDeptList().then((data: any) => {
|
getDeptList().then((data: any) => {
|
||||||
deptList.value = data.data
|
deptList.value = data.data;
|
||||||
})
|
});
|
||||||
|
|
||||||
// 获取招生计划列表
|
// 获取招生计划列表
|
||||||
getList().then((data: any) => {
|
getList().then((data: any) => {
|
||||||
planList.value = data.data
|
planList.value = data.data;
|
||||||
// 新增时,默认选中第一个招生计划
|
// 新增时,默认选中第一个招生计划
|
||||||
if (!id && data.data && data.data.length > 0) {
|
if (!id && data.data && data.data.length > 0) {
|
||||||
dataForm.groupId = data.data[0]?.id || ''
|
dataForm.groupId = data.data[0]?.id || '';
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
// 获取正式专业代码列表
|
// 获取正式专业代码列表
|
||||||
getMajorNameList().then((data: any) => {
|
getMajorNameList().then((data: any) => {
|
||||||
offcialZydmList.value = data.data
|
offcialZydmList.value = data.data;
|
||||||
})
|
});
|
||||||
|
|
||||||
// 获取数据字典(一次获取多个)
|
// 获取数据字典(一次获取多个)
|
||||||
getDictsByTypes(['basic_major_years', 'basic_major_level', 'tuition_fee']).then((res: any) => {
|
getDictsByTypes(['basic_major_years', 'basic_major_level', 'tuition_fee']).then((res: any) => {
|
||||||
majorYears.value = res.data?.basic_major_years || []
|
majorYears.value = res.data?.basic_major_years || [];
|
||||||
ccList.value = res.data?.basic_major_level || []
|
ccList.value = res.data?.basic_major_level || [];
|
||||||
tuitionFeeList.value = res.data?.tuition_fee || []
|
tuitionFeeList.value = res.data?.tuition_fee || [];
|
||||||
|
|
||||||
// 新增时,根据学费字典设置费用默认值
|
// 新增时,根据学费字典设置费用默认值
|
||||||
if (!id) {
|
if (!id) {
|
||||||
setFeeDefaults()
|
setFeeDefaults();
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//查询专业目录树结构
|
||||||
|
majorCateTree({}).then((res: any) => {
|
||||||
|
majorCateTreeData.value = res.data;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// 表单提交
|
// 表单提交
|
||||||
const dataFormSubmit = () => {
|
const dataFormSubmit = () => {
|
||||||
@@ -327,73 +268,99 @@ const dataFormSubmit = () => {
|
|||||||
// }
|
// }
|
||||||
dataFormRef.value?.validate((valid: boolean) => {
|
dataFormRef.value?.validate((valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
canSubmit.value = false
|
canSubmit.value = false;
|
||||||
if (dataForm.id) {
|
if (dataForm.id) {
|
||||||
putObj(dataForm).then(() => {
|
putObj(dataForm)
|
||||||
|
.then(() => {
|
||||||
ElNotification.success({
|
ElNotification.success({
|
||||||
title: '成功',
|
title: '成功',
|
||||||
message: '修改成功'
|
message: '修改成功',
|
||||||
})
|
});
|
||||||
visible.value = false
|
visible.value = false;
|
||||||
emit('refreshDataList')
|
emit('refreshDataList');
|
||||||
}).catch(() => {
|
|
||||||
canSubmit.value = true
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
canSubmit.value = true;
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
addObj(dataForm).then(() => {
|
addObj(dataForm)
|
||||||
|
.then(() => {
|
||||||
ElNotification.success({
|
ElNotification.success({
|
||||||
title: '成功',
|
title: '成功',
|
||||||
message: '添加成功'
|
message: '添加成功',
|
||||||
})
|
});
|
||||||
visible.value = false
|
visible.value = false;
|
||||||
emit('refreshDataList')
|
emit('refreshDataList');
|
||||||
}).catch(() => {
|
|
||||||
canSubmit.value = true
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
canSubmit.value = true;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
|
const handleChange = (value: any) => {
|
||||||
|
dataForm.standardMajorCode = value[0];
|
||||||
|
dataForm.standardMajorTwoCode = value[1];
|
||||||
|
};
|
||||||
|
|
||||||
// 初始化方法
|
// 初始化方法
|
||||||
const init = (id: string | null) => {
|
const init = (id: string | null) => {
|
||||||
visible.value = true
|
visible.value = true;
|
||||||
canSubmit.value = true
|
canSubmit.value = true;
|
||||||
dataForm.id = ""
|
dataForm.id = '';
|
||||||
|
|
||||||
// 重置表单数据
|
// 重置表单数据
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
dataFormRef.value?.resetFields()
|
dataFormRef.value?.resetFields();
|
||||||
})
|
});
|
||||||
|
|
||||||
initData(id)
|
initData(id);
|
||||||
|
|
||||||
// 获取详情数据
|
// 获取详情数据
|
||||||
if (id) {
|
if (id) {
|
||||||
dataForm.id = id
|
dataForm.id = id;
|
||||||
getObj(id).then((response: any) => {
|
getObj(id)
|
||||||
|
.then((response: any) => {
|
||||||
if (response && response.data) {
|
if (response && response.data) {
|
||||||
Object.assign(dataForm, response.data)
|
Object.assign(dataForm, response.data);
|
||||||
|
if (dataForm.standardMajorCode && dataForm.standardMajorTwoCode) {
|
||||||
|
chooseMajorCate.value = [dataForm.standardMajorCode, dataForm.standardMajorTwoCode];
|
||||||
|
}else{
|
||||||
|
chooseMajorCate.value = [];
|
||||||
|
}
|
||||||
// 获取市平台对应年份下的招生计划
|
// 获取市平台对应年份下的招生计划
|
||||||
// getCityPlan({ id: dataForm.id }).then((data: any) => {
|
// getCityPlan({ id: dataForm.id }).then((data: any) => {
|
||||||
// cityPlanIdList.value = data.data
|
// cityPlanIdList.value = data.data
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
|
||||||
// 错误处理
|
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// 错误处理
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
// 新增模式:initData 中已处理默认招生计划和费用默认值
|
// 新增模式:initData 中已处理默认招生计划和费用默认值
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// 暴露方法给父组件
|
// 暴露方法给父组件
|
||||||
defineExpose({
|
defineExpose({
|
||||||
init
|
init,
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.form-item-cascader {
|
||||||
|
:deep(.el-form-item__content) {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
:deep(.el-cascader) {
|
||||||
|
width: 100%;
|
||||||
|
min-width: 360px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.dialog-footer {
|
.dialog-footer {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog title="招生计划专业调整" append-to-body width="70%" :close-on-click-modal="false" v-model="visible">
|
<el-dialog title="招生计划专业调整" append-to-body width="98%" :close-on-click-modal="false" v-model="visible">
|
||||||
<el-form :model="dataForm" ref="dataFormRef" class="mb4">
|
<el-form :model="dataForm" ref="dataFormRef" class="mb4">
|
||||||
<el-form-item label="招生计划名称" prop="groupName">
|
<el-form-item label="招生计划名称" prop="groupName">
|
||||||
<el-input v-model="dataForm.groupName" placeholder="招生计划名称" disabled style="width: 200px"></el-input>
|
<el-input v-model="dataForm.groupName" placeholder="招生计划名称" disabled style="width: 200px"></el-input>
|
||||||
|
|||||||
@@ -923,9 +923,10 @@ const majorChange = (id: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 退学
|
// 退学
|
||||||
const handleUpdate = (id: string, groupId: string, feeAgency: string) => {
|
const handleUpdate = (id: string, groupId: string, feeAgency: string,force:booleam) => {
|
||||||
messageBox.confirm('是否确认办理退学操作?请谨慎操作').then(() => {
|
var str=force?"强制":"";
|
||||||
return leaveSchool({ id, groupId, feeAgency })
|
messageBox.confirm('是否确认'+str+'办理退档操作?请谨慎操作').then(() => {
|
||||||
|
return leaveSchool({ id, groupId, feeAgency ,force})
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
message.success('操作成功')
|
message.success('操作成功')
|
||||||
getDataList()
|
getDataList()
|
||||||
@@ -1018,10 +1019,16 @@ const getActionMenuItems = (row: any) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
command: 'leaveSchool',
|
command: 'leaveSchool',
|
||||||
label: '退学',
|
label: '退档',
|
||||||
icon: Close,
|
icon: Close,
|
||||||
visible: () => hasAuth('recruit_recruitstudentsignup_leaveSchool') && row.canQuit
|
visible: () => hasAuth('recruit_recruitstudentsignup_leaveSchool') && row.canQuit
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
command: 'forceLeaveSchool',
|
||||||
|
label: '强制退档',
|
||||||
|
icon: Close,
|
||||||
|
visible: () => hasAuth('recruit_leaveSchool_force') && row.canQuit
|
||||||
|
},
|
||||||
// 复学
|
// 复学
|
||||||
{
|
{
|
||||||
command: 'reEntry',
|
command: 'reEntry',
|
||||||
@@ -1081,7 +1088,10 @@ const handleMoreCommand = (command: string, row: any) => {
|
|||||||
addOrUpdateHandle(row.id, 1)
|
addOrUpdateHandle(row.id, 1)
|
||||||
break
|
break
|
||||||
case 'leaveSchool':
|
case 'leaveSchool':
|
||||||
handleUpdate(row.id, row.groupId, row.feeAgency)
|
handleUpdate(row.id, row.groupId, row.feeAgency,false)
|
||||||
|
break
|
||||||
|
case 'forceLeaveSchool':
|
||||||
|
handleUpdate(row.id, row.groupId, row.feeAgency, true)
|
||||||
break
|
break
|
||||||
case 'reEntry':
|
case 'reEntry':
|
||||||
reEntry(row.id)
|
reEntry(row.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user