fix: 🐛 修复因接口调整而影响的调用页面的问题

This commit is contained in:
hxr
2024-05-04 13:15:06 +08:00
parent 088bc5e48f
commit 425841ad45
6 changed files with 13 additions and 14 deletions

View File

@@ -65,8 +65,8 @@ const {
// 编辑
async function handleEditClick(row: IObject) {
// 根据id获取数据进行填充
const response = await UserAPI.getFormData(row.id);
editModalRef.value?.setModalVisible(response.data);
const data = await UserAPI.getFormData(row.id);
editModalRef.value?.setModalVisible(data);
}
// 其他工具栏
function handleToolbarClick(name: string) {

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { uploadFileApi } from "@/api/file";
import FileAPI from "@/api/file";
const imgUrl = ref("");
const canvas = ref();
@@ -68,7 +68,7 @@ const handleToFile = async () => {
const file = dataURLtoFile(canvas.value.toDataURL(), "签名.png");
if (!file) return;
const { data } = await uploadFileApi(file);
const data = await FileAPI.upload(file);
handleClearSign();
imgUrl.value = data.url;
};

View File

@@ -254,7 +254,7 @@ function handleSubmit() {
})
.finally(() => (loading.value = false));
} else {
DeptAPI.update(formData)
DeptAPI.add(formData)
.then(() => {
ElMessage.success("新增成功");
closeDialog();