Michael Wang 3 år sedan
förälder
incheckning
fc67ccccfc
2 ändrade filer med 12 tillägg och 12 borttagningar
  1. 4 4
      src/api/subOrgPage.ts
  2. 8 8
      src/features/subOrg/SubOrg.vue

+ 4 - 4
src/api/subOrgPage.ts

@@ -24,7 +24,7 @@ export function updateSubOrg(params: {
 }
 }
 
 
 /** 禁用、启用机构 */
 /** 禁用、启用机构 */
-export function toggleSubOrg(enable: boolean, ids: number[]) {
+export function toggleSubOrgs(enable: boolean, ids: number[]) {
   return httpApp.post(
   return httpApp.post(
     `/api/ess/org/${enable ? "enable" : "disable"}`,
     `/api/ess/org/${enable ? "enable" : "disable"}`,
     new URLSearchParams([["ids", ids.join(",")]])
     new URLSearchParams([["ids", ids.join(",")]])
@@ -32,7 +32,7 @@ export function toggleSubOrg(enable: boolean, ids: number[]) {
 }
 }
 
 
 /** 删除机构 */
 /** 删除机构 */
-export function delOrg(ids: number[]) {
+export function delOrgs(ids: number[]) {
   return httpApp.post(
   return httpApp.post(
     `/api/ess/org/delete`,
     `/api/ess/org/delete`,
     new URLSearchParams([["ids", ids.join(",")]])
     new URLSearchParams([["ids", ids.join(",")]])
@@ -40,7 +40,7 @@ export function delOrg(ids: number[]) {
 }
 }
 
 
 /** 导入机构 */
 /** 导入机构 */
-export function importOrg(rootOrgId: number, file: File) {
+export function importOrgs(rootOrgId: number, file: File) {
   const f = new FormData();
   const f = new FormData();
   f.append("rootOrgId", rootOrgId + "");
   f.append("rootOrgId", rootOrgId + "");
   f.append("file", file);
   f.append("file", file);
@@ -48,7 +48,7 @@ export function importOrg(rootOrgId: number, file: File) {
 }
 }
 
 
 /** 导出机构 */
 /** 导出机构 */
-export function exportOrg(params: {
+export function exportOrgs(params: {
   rootOrgId: number;
   rootOrgId: number;
   code: string;
   code: string;
   name: string;
   name: string;

+ 8 - 8
src/features/subOrg/SubOrg.vue

@@ -120,11 +120,11 @@
 
 
 <script setup lang="ts">
 <script setup lang="ts">
 import {
 import {
-  delOrg,
-  exportOrg,
+  delOrgs,
+  exportOrgs,
   getSubOrgList,
   getSubOrgList,
-  importOrg,
-  toggleSubOrg,
+  importOrgs,
+  toggleSubOrgs,
   updateSubOrg,
   updateSubOrg,
 } from "@/api/subOrgPage";
 } from "@/api/subOrgPage";
 import { useMainStore } from "@/store";
 import { useMainStore } from "@/store";
@@ -258,7 +258,7 @@ function checkEmpty(): boolean {
 
 
 async function handleToggleOrg(enable: boolean, ids: number[]) {
 async function handleToggleOrg(enable: boolean, ids: number[]) {
   if (checkEmpty()) return;
   if (checkEmpty()) return;
-  await toggleSubOrg(enable, ids);
+  await toggleSubOrgs(enable, ids);
   await search();
   await search();
 }
 }
 
 
@@ -270,7 +270,7 @@ async function handleDelOrg(ids: number[]) {
     cancelText: "取消",
     cancelText: "取消",
     okText: "确定",
     okText: "确定",
     onOk: async () => {
     onOk: async () => {
-      await delOrg(ids);
+      await delOrgs(ids);
       await search();
       await search();
     },
     },
   });
   });
@@ -287,13 +287,13 @@ async function handleImport() {
     return;
     return;
   }
   }
 
 
-  await importOrg(rootOrgId, fileToImport);
+  await importOrgs(rootOrgId, fileToImport);
   message.success({ content: "导入成功" });
   message.success({ content: "导入成功" });
 }
 }
 /** </handleImport> */
 /** </handleImport> */
 
 
 async function handleExport() {
 async function handleExport() {
-  await exportOrg({ rootOrgId, name, code, enable });
+  await exportOrgs({ rootOrgId, name, code, enable });
   message.success({ content: "导出成功" });
   message.success({ content: "导出成功" });
 }
 }