fix: 🐛 修复因接口调整而影响的调用页面的问题
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -254,7 +254,7 @@ function handleSubmit() {
|
||||
})
|
||||
.finally(() => (loading.value = false));
|
||||
} else {
|
||||
DeptAPI.update(formData)
|
||||
DeptAPI.add(formData)
|
||||
.then(() => {
|
||||
ElMessage.success("新增成功");
|
||||
closeDialog();
|
||||
|
||||
Reference in New Issue
Block a user