|
@@ -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,
|
|
|
|
|
|
- };
|
|
|
+};
|
|
|
}
|