Merge remote-tracking branch 'origin/DEV' into DEV

# Conflicts:
#	src/views/cet/cet-student-query.vue
This commit is contained in:
Cool 2024-09-09 23:07:28 +08:00
commit 3ffbf5d13e
1 changed files with 5 additions and 4 deletions

View File

@ -34,7 +34,7 @@
</a-row> </a-row>
</div> </div>
<div class="tableContent" v-if="isShow"> <div class="tableContent" v-if="isShow">
<a-table :dataSource="tableData" :columns="tableLabel" bordered :loading="loadding" size="middle" /> <a-table :dataSource="tableData" :columns="tableLabel" bordered :loading="loading" size="middle" />
</div> </div>
</div> </div>
</template> </template>
@ -44,7 +44,6 @@ 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;
@ -55,7 +54,7 @@ const search: UnwrapRef<FormState> = reactive({
id: '', id: '',
}); });
const isShow = ref(false); const isShow = ref(false);
const loadding = ref(false); const loading = ref(false);
const tableData = ref([]); const tableData = ref([]);
const tableLabel = ref([ const tableLabel = ref([
{ {
@ -105,12 +104,14 @@ const url = ref({
const formRef = ref(); const formRef = ref();
const handleSearch = () => { const handleSearch = () => {
formRef.value.validate().then(async () => { formRef.value.validate().then(async () => {
loading.value = true;
tableData.value = await defHttp.post({ tableData.value = await defHttp.post({
url: url.value.getData, url: url.value.getData,
params: search, params: search,
}); });
tableData.value = tableData.value.results; tableData.value = tableData.value.results;
console.log(tableData.value); console.log(tableData.value);
loading.value = false;
if (tableData.value.length > 0) { if (tableData.value.length > 0) {
isShow.value = true; isShow.value = true;
} else { } else {