lcl 9 months ago
parent
commit
5b6e46097b
3 changed files with 470 additions and 746 deletions
  1. 401 677
      pnpm-lock.yaml
  2. 2 2
      src/utils/getUrl/getUrl.js
  3. 67 67
      src/views/Template/ApiGroup/hook.tsx

File diff suppressed because it is too large
+ 401 - 677
pnpm-lock.yaml


+ 2 - 2
src/utils/getUrl/getUrl.js

@@ -64,7 +64,7 @@ const getURL = () => {
 const getAllPlate = () => {
   return new Promise(async (resolve, reject) => {
     postRequest(
-      "http://test.config.kexiaoshuang.com/api/apiinfo/groupsforadmin",
+      "http://test.skbconfig.kexiaoshuang.com/api/apiinfo/groupsforadmin",
       {
         key: "kxs#2024"
       }
@@ -99,7 +99,7 @@ const getGroupUrl = async (checkPlate = []) => {
       );
     }, 5000);
     postRequest(
-      "http://test.config.kexiaoshuang.com/api/apiinfo/listforadmin",
+      "http://test.skbconfig.kexiaoshuang.com/api/apiinfo/listforadmin",
       parameters
     )
       .then(async res => {

+ 67 - 67
src/views/Template/ApiGroup/hook.tsx

@@ -73,77 +73,77 @@ export function useApiGroup() {
     loading.value = true;
     console.log('form:', form);
     console.log('pagination:', pagination);
-    const { data, other }: any = http.request(UrlList.KxsConfigServer.ApiGrouplist.method, UrlList.KxsConfigServer.ApiGrouplist.url, { ...form, page_size: pagination.pageSize, page_num: pagination.currentPage });
-    console.log('data:', data);
-    console.log('other:', other);
-    dataList.value = data;
-    pagination.total = other.Count;
-    setTimeout(() => {
-      loading.value = false;
-    }, 500);
-  }
-  onMounted(() => {
-    onSearch();
-  });
+    const { data, other }: any = http.Request({ method: UrlList.KxsConfigServer.ApiGrouplist.method, url: UrlList.KxsConfigServer.ApiGrouplist.url, { ...form, page_size: pagination.pageSize, page_num: pagination.currentPage }});
+  console.log('data:', data);
+  console.log('other:', other);
+  dataList.value = data;
+  pagination.total = other.Count;
+  setTimeout(() => {
+    loading.value = false;
+  }, 500);
+}
+onMounted(() => {
+  onSearch();
+});
 
-  // 删除
-  function handleDelete(row) {
-    ElMessageBox.confirm(
-      `是否删除该api接口分组? `,
-      "提示",
-      {
-        confirmButtonText: "删除",
-        cancelButtonText: "取消",
+// 删除
+function handleDelete(row) {
+  ElMessageBox.confirm(
+    `是否删除该api接口分组? `,
+    "提示",
+    {
+      confirmButtonText: "删除",
+      cancelButtonText: "取消",
+      type: "warning"
+    }
+  ).then(async () => {
+    const { status, info }: any = await http.request(KxsConfigServer.ApiGroupdelete.method, KxsConfigServer.ApiGroupdelete.url, { Id: row.Id });
+    if (status === "1") {
+      ElMessage({
+        message: "删除成功",
+        type: "success"
+      });
+      onSearch();
+    } else {
+      ElMessageBox.alert(info, "提示", {
+        confirmButtonText: "关闭",
         type: "warning"
-      }
-    ).then(async () => {
-      const { status, info }: any = await http.request(KxsConfigServer.ApiGroupdelete.method, KxsConfigServer.ApiGroupdelete.url, { Id: row.Id });
-      if (status === "1") {
-        ElMessage({
-          message: "删除成功",
-          type: "success"
-        });
-        onSearch();
-      } else {
-        ElMessageBox.alert(info, "提示", {
-          confirmButtonText: "关闭",
-          type: "warning"
-        });
-      };
-    })
-  }
+      });
+    };
+  })
+}
 
-  // 新增
-  const addVisible = ref(false);
-  function handleAdd() {
-    addVisible.value = true;
-  };
+// 新增
+const addVisible = ref(false);
+function handleAdd() {
+  addVisible.value = true;
+};
 
-  // 修改
-  const editVisible = ref(false);
-  const editFormData = ref({});
-  function handleUpdate(row) {
-    editVisible.value = true;
-    // 表格数据赋值
-    editFormData.value = row;
-  };
+// 修改
+const editVisible = ref(false);
+const editFormData = ref({});
+function handleUpdate(row) {
+  editVisible.value = true;
+  // 表格数据赋值
+  editFormData.value = row;
+};
 
-  return {
-    form,
-    loading,
-    columns,
-    dataList,
-    pagination,
-    onSearch,
-    handleSizeChange,
-    handleCurrentChange,
-    handleSelectionChange,
-    handleAdd,
-    addVisible,
-    handleUpdate,
-    editVisible,
-    editFormData,
-    handleDelete,
+return {
+  form,
+  loading,
+  columns,
+  dataList,
+  pagination,
+  onSearch,
+  handleSizeChange,
+  handleCurrentChange,
+  handleSelectionChange,
+  handleAdd,
+  addVisible,
+  handleUpdate,
+  editVisible,
+  editFormData,
+  handleDelete,
 
-  };
+};
 }

Some files were not shown because too many files changed in this diff