|
|
@@ -27,6 +27,7 @@ import {
|
|
|
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
|
|
|
|
|
import {useRef, useState} from "react";
|
|
|
+import globalMessage from "@/app/_modules/globalMessage";
|
|
|
|
|
|
//查询表格数据API
|
|
|
const queryAPI = "/api/system/dept/list";
|
|
|
@@ -265,7 +266,7 @@ export default function Dept() {
|
|
|
|
|
|
if (body != undefined) {
|
|
|
if (body.code == 200) {
|
|
|
- App.useApp().message.success(body.msg);
|
|
|
+ globalMessage.success(body.msg);
|
|
|
if (actionTableRef.current) {
|
|
|
actionTableRef.current.reload();
|
|
|
}
|
|
|
@@ -273,7 +274,7 @@ export default function Dept() {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- App.useApp().message.error(body.msg);
|
|
|
+ globalMessage.error(body.msg);
|
|
|
return false;
|
|
|
}
|
|
|
return false;
|
|
|
@@ -343,7 +344,7 @@ export default function Dept() {
|
|
|
|
|
|
if (body !== undefined) {
|
|
|
if (body.code == 200) {
|
|
|
- App.useApp().message.success(body.msg);
|
|
|
+ globalMessage.success(body.msg);
|
|
|
//刷新列表
|
|
|
if (actionTableRef.current) {
|
|
|
actionTableRef.current.reload();
|
|
|
@@ -351,7 +352,7 @@ export default function Dept() {
|
|
|
setIsShowModifyDataModal(false);
|
|
|
return true;
|
|
|
}
|
|
|
- App.useApp().message.error(body.msg);
|
|
|
+ globalMessage.error(body.msg);
|
|
|
return false;
|
|
|
}
|
|
|
};
|
|
|
@@ -418,13 +419,13 @@ export default function Dept() {
|
|
|
});
|
|
|
if (body !== undefined) {
|
|
|
if (body.code == 200) {
|
|
|
- App.useApp().message.success("删除成功");
|
|
|
+ globalMessage.success("删除成功");
|
|
|
//刷新列表
|
|
|
if (actionTableRef.current) {
|
|
|
actionTableRef.current.reload();
|
|
|
}
|
|
|
} else {
|
|
|
- App.useApp().message.error(body.msg);
|
|
|
+ globalMessage.error(body.msg);
|
|
|
}
|
|
|
}
|
|
|
setDeleteModalVisible(false);
|