学生查询修改
This commit is contained in:
parent
905c460bf3
commit
32fbd95a23
|
@ -7,7 +7,7 @@
|
||||||
<a-input v-model:value="search.name" placeholder="请输入学生姓名" />
|
<a-input v-model:value="search.name" placeholder="请输入学生姓名" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="学号" name="id">
|
<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-form-item>
|
<a-form-item>
|
||||||
<a-button type="primary" @click="handleSearch">查询</a-button>
|
<a-button type="primary" @click="handleSearch">查询</a-button>
|
||||||
|
@ -44,6 +44,7 @@ import { reactive, ref } from 'vue';
|
||||||
import type { UnwrapRef } from 'vue';
|
import type { UnwrapRef } from 'vue';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import type { Rule } from 'ant-design-vue/es/form';
|
import type { Rule } from 'ant-design-vue/es/form';
|
||||||
|
import { table } from 'console';
|
||||||
interface FormState {
|
interface FormState {
|
||||||
name: string;
|
name: string;
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -99,7 +100,7 @@ const rules: Record<string, Rule[]> = {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
const url = ref({
|
const url = ref({
|
||||||
getData: 'cet/getData',
|
getData: '/cet_4/getDataByStudent',
|
||||||
});
|
});
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
|
@ -108,7 +109,8 @@ const handleSearch = () => {
|
||||||
url: url.value.getData,
|
url: url.value.getData,
|
||||||
params: search,
|
params: search,
|
||||||
});
|
});
|
||||||
console.log(1231);
|
tableData.value = tableData.value.results;
|
||||||
|
console.log(tableData.value);
|
||||||
if (tableData.value.length > 0) {
|
if (tableData.value.length > 0) {
|
||||||
isShow.value = true;
|
isShow.value = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue