变更
This commit is contained in:
parent
40fb1c11ae
commit
8767d7e857
|
@ -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: '',
|
||||||
|
@ -311,14 +312,23 @@ 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;
|
||||||
if(res.data.code === 1){
|
try {
|
||||||
tableData.value = res.data.data.records;
|
const res = await myAxios.post('/api/goods/update', {...tableData.value });
|
||||||
}else{
|
if (res.data.code === 1) {
|
||||||
|
tableData.value = res.data.data.records;
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
message: '获取数据失败',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message:'获取数据失败'
|
message: '发生错误',
|
||||||
})
|
});
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user