学生查询修改

This commit is contained in:
Cool 2024-09-09 23:05:52 +08:00
parent 905c460bf3
commit 32fbd95a23
1 changed files with 5 additions and 3 deletions

View File

@ -7,7 +7,7 @@
<a-input v-model:value="search.name" placeholder="请输入学生姓名" />
</a-form-item>
<a-form-item label="学号" name="id">
<a-input v-model:value="search.id" placeholder="请输入学生学号" />
<a-input-number :controls="false" v-model:value="search.id" placeholder="请输入学生学号" />
</a-form-item>
<a-form-item>
<a-button type="primary" @click="handleSearch">查询</a-button>
@ -44,6 +44,7 @@ import { reactive, ref } from 'vue';
import type { UnwrapRef } from 'vue';
import { message } from 'ant-design-vue';
import type { Rule } from 'ant-design-vue/es/form';
import { table } from 'console';
interface FormState {
name: string;
id: string;
@ -99,7 +100,7 @@ const rules: Record<string, Rule[]> = {
],
};
const url = ref({
getData: 'cet/getData',
getData: '/cet_4/getDataByStudent',
});
const formRef = ref();
const handleSearch = () => {
@ -108,7 +109,8 @@ const handleSearch = () => {
url: url.value.getData,
params: search,
});
console.log(1231);
tableData.value = tableData.value.results;
console.log(tableData.value);
if (tableData.value.length > 0) {
isShow.value = true;
} else {