a
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<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
|
||||
@@ -35,7 +35,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>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
icon="FolderAdd"
|
||||
@click="addOrUpdateHandle"
|
||||
>
|
||||
新增
|
||||
新 增
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
/>
|
||||
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<table-form v-if="addOrUpdateVisible" ref="addOrUpdateRef" @refreshDataList="getDataList" />
|
||||
<table-form ref="addOrUpdateRef" @refreshDataList="getDataList" />
|
||||
<major-group-by-dept-form v-if="majorGroupByDeptVisible" ref="majorGroupByDeptRef" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -148,7 +148,6 @@ const addOrUpdateRef = ref()
|
||||
const majorGroupByDeptRef = ref()
|
||||
|
||||
// 弹窗状态
|
||||
const addOrUpdateVisible = ref(false)
|
||||
const majorGroupByDeptVisible = ref(false)
|
||||
|
||||
// 数据
|
||||
@@ -217,21 +216,14 @@ const init = async () => {
|
||||
}
|
||||
|
||||
// 新增 / 修改
|
||||
const addOrUpdateHandle = (id?: string) => {
|
||||
addOrUpdateVisible.value = true
|
||||
const addOrUpdateHandle = (payload?: any) => {
|
||||
// 兼容新增按钮未传参时自动传入的 MouseEvent
|
||||
const id = payload && typeof payload === 'object' ? null : payload
|
||||
nextTick(() => {
|
||||
addOrUpdateRef.value?.init(id)
|
||||
})
|
||||
}
|
||||
|
||||
// 专业调整
|
||||
const majorHandle = (row: any) => {
|
||||
majorGroupByDeptVisible.value = true
|
||||
nextTick(() => {
|
||||
majorGroupByDeptRef.value?.init(row)
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
const deleteHandle = async (id: string) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user