This commit is contained in:
guochunsi
2026-01-14 18:32:09 +08:00
parent 6055033289
commit 8166fa31e0
33 changed files with 3926 additions and 3383 deletions

View File

@@ -2,12 +2,13 @@
<el-dialog
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
width="600px"
v-model="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataFormRef" @keyup.enter="dataFormSubmit"
label-width="140px">
label-width="120px">
<el-form-item label="招生计划" prop="groupId">
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划" size="small" style="width: 100%" :disabled="!!dataForm.id">
<el-select v-model="dataForm.groupId" filterable placeholder="请选择招生计划" :disabled="!!dataForm.id">
<el-option
v-for="item in planList"
:key="item.id"
@@ -17,7 +18,7 @@
</el-select>
</el-form-item>
<el-form-item label="地区" prop="regionId">
<el-select v-model="dataForm.regionId" filterable placeholder="请选择地区" size="small" style="width: 100%">
<el-select v-model="dataForm.regionId" filterable placeholder="请选择地区">
<el-option
v-for="item in regionList"
:key="item.code"
@@ -27,7 +28,7 @@
</el-select>
</el-form-item>
<el-form-item label="分数线" prop="fullScore">
<el-input-number v-model="dataForm.fullScore" :min="0" :max="999" style="width: 100%"></el-input-number>
<el-input-number v-model="dataForm.fullScore" :min="0" :max="999"></el-input-number>
</el-form-item>
</el-form>
@@ -43,9 +44,9 @@
<script setup lang="ts">
import { ref, reactive, nextTick } from 'vue'
import { ElNotification } from 'element-plus'
import { addObj, getObj, putObj } from '@/api/recruit/recruitstudentplancorrectscoreconfig'
import { areaList } from "@/api/recruit/recruitstudentschool"
import { list } from "@/api/recruit/recruitstudentplangroup"
import { addObj, getObj, putObj } from '/@/api/recruit/recruitstudentplancorrectscoreconfig'
import { areaList } from '/@/api/recruit/recruitstudentschool'
import { list } from '/@/api/recruit/recruitstudentplangroup'
// Emits
const emit = defineEmits<{

View File

@@ -1,25 +1,8 @@
<!--
- Copyright (c) 2018-2025, cyweb All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- Neither the name of the pig4cloud.com developer nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-->
<template>
<div class="layout-padding">
<div class="layout-padding-auto layout-padding-view">
<!-- 搜索表单 -->
<el-form :model="queryForm" inline class="mb-4" ref="searchFormRef">
<el-form :model="queryForm" inline ref="searchFormRef">
<el-form-item label="招生计划" prop="groupId">
<el-select v-model="queryForm.groupId" filterable clearable placeholder="请选择招生计划">
<el-option
@@ -32,7 +15,7 @@
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="getDataList">查询</el-button>
<el-button type="primary" plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
<el-button plain icon="Refresh" class="ml10" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
@@ -44,7 +27,7 @@
icon="FolderAdd"
@click="addOrUpdateHandle"
>
新增
</el-button>
</div>
@@ -98,7 +81,7 @@
/>
<!-- 弹窗, 新增 / 修改 -->
<table-form v-if="addOrUpdateVisible" ref="addOrUpdateRef" @refreshDataList="getDataList" />
<table-form ref="addOrUpdateRef" @refreshDataList="getDataList" />
</div>
</div>
</template>
@@ -186,8 +169,9 @@ const init = async () => {
}
// 新增 / 修改
const addOrUpdateHandle = (id?: string) => {
addOrUpdateVisible.value = true
const addOrUpdateHandle = (payload?: string | MouseEvent) => {
// 新增按钮未传参时会传入 MouseEvent这里统一转换为 id 或 null
const id = typeof payload === 'string' ? payload : null
nextTick(() => {
addOrUpdateRef.value?.init(id)
})