修改接口路径

This commit is contained in:
linlihong 2024-09-09 09:44:56 +08:00
parent 905c460bf3
commit 7abb43c29a
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>
@ -54,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([
{ {
@ -99,16 +99,17 @@ const rules: Record<string, Rule[]> = {
], ],
}; };
const url = ref({ const url = ref({
getData: 'cet/getData', getData: 'cet/getDataByStudent',
}); });
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,
}); });
console.log(1231); loading.value = false;
if (tableData.value.length > 0) { if (tableData.value.length > 0) {
isShow.value = true; isShow.value = true;
} else { } else {