This commit is contained in:
sa_10_0 2024-10-31 16:25:23 +08:00
parent 40fb1c11ae
commit 8767d7e857

View File

@ -266,6 +266,7 @@ const editDialogVisible = ref(false);
const types = ref(''); const types = ref('');
const Region = ref(''); const Region = ref('');
let selectedProduct = ref(''); let selectedProduct = ref('');
const loading = ref(false)
let editForm = ref({ let editForm = ref({
id: '', id: '',
goodImg: '', goodImg: '',
@ -312,13 +313,22 @@ const handleDelete = (index: number, row: any) => {
}; };
const searchParams: any = ref({}) const searchParams: any = ref({})
const getTableData = async () => { const getTableData = async () => {
const res = await myAxios.post('/api/goods/update',{...tableData.value}) loading.value = true;
try {
const res = await myAxios.post('/api/goods/update', {...tableData.value });
if (res.data.code === 1) { if (res.data.code === 1) {
tableData.value = res.data.data.records; tableData.value = res.data.data.records;
} else { } else {
ElMessage({ ElMessage({
message:'获取数据失败' message: '获取数据失败',
}) });
}
} catch (error) {
ElMessage({
message: '发生错误',
});
} finally {
loading.value = false;
} }
} }