main
黄海 9 months ago
parent 5f4e528fb5
commit 14499bf08c

@ -1,6 +1,6 @@
<template>
<div class="footer flx-center">
<a href="https://github.com/HalseySpicy" target="_blank"> 2022 © Geeker-Admin By Geeker Technology. </a>
<a javascript="void(0)" target="_blank"> 2024 © 东北师大理想软件股份有限公司 </a>
</div>
</template>

@ -56,8 +56,10 @@ const getStageSelect = async () => {
const stageSelectChange = async e => {
proTable.value!.searchParam.subject_id = "";
subjectEnum.value.splice(0, subjectEnum.value.length);
const res = await getSubjectList({ stage_id: e, pageNum: 1, pageSize: 100 });
subjectEnum.value.push(...res.data.list);
if (e) {
const res = await getSubjectList({ stage_id: e, pageNum: 1, pageSize: 100 });
subjectEnum.value.push(...res.data.list);
}
initParam.stage_id = e;
initParam.subject_id = "";
};

@ -1,6 +1,13 @@
<template>
<div class="table-box">
<ProTable ref="proTable" :columns="columns" :request-api="getTableList" :toolButton="_toolButton" :border="true">
<ProTable
ref="proTable"
:columns="columns"
:request-api="getTableList"
:initParam="initParam"
:toolButton="_toolButton"
:border="true"
>
<!-- 表格 header 按钮 -->
<template #tableHeader="">
<el-button type="primary" :icon="CirclePlus" @click="openDrawer('新增')"></el-button>
@ -29,6 +36,7 @@ import { CirclePlus, Delete, EditPen } from "@element-plus/icons-vue";
// ProTable
const proTable = ref<ProTableInstance>();
const initParam = reactive({ stage_id: "" });
const _toolButton = ["refresh"];
@ -36,6 +44,11 @@ const getTableList = (params: any) => {
return getSubjectList(params);
};
const stageSelectChange = async e => {
console.log(e);
initParam.stage_id = e;
};
//
const columns = reactive<ColumnProps<Subject.ResSubjectList>[]>([
{ type: "index", width: 70, label: "序号" },
@ -52,7 +65,7 @@ const columns = reactive<ColumnProps<Subject.ResSubjectList>[]>([
{ stage_id: 6, stage_name: "高中" },
{ stage_id: 7, stage_name: "职业" }
],
search: { el: "select", props: { filterable: true } },
search: { el: "select", props: { onChange: stageSelectChange } },
fieldNames: { label: "stage_name", value: "stage_id" }
},
{ prop: "sort_id", label: "排序号" },

Loading…
Cancel
Save