同步路由
@@ -215,8 +216,9 @@
取 消
确 定
@@ -546,12 +548,14 @@ const pageSize = ref(10)
const tableData = ref([])
const searchInfo = ref({})
const apiGroupOptions = ref([])
-
+const apiGroupMap = ref({})
const getGroup = async() => {
const res = await getApiGroups()
if (res.code === 0) {
- apiGroupOptions.value = res.data.map(item => ({ label: item, value: item }))
+ const groups = res.data.groups
+ apiGroupOptions.value = groups.map(item => ({ label: item, value: item }))
+ apiGroupMap.value = res.data.apiGroupMap
}
}
@@ -576,9 +580,13 @@ const closeSyncDialog = () => {
syncApiFlag.value = false
}
+const syncing = ref(false)
+
const enterSyncDialog = async() => {
+ syncing.value = true
const res = await enterSyncApi(syncApiData.value)
+ syncing.value = false
if (res.code === 0) {
ElMessage({
type: 'success',
@@ -688,6 +696,11 @@ const syncApiFlag = ref(false)
const onSync = async() => {
const res = await syncApi()
if (res.code === 0) {
+ res.data.newApis.forEach(item => {
+ item.apiGroup = apiGroupMap.value[item.path.split('/')[1]]
+ console.log(apiGroupMap.value)
+ })
+
syncApiData.value = res.data
syncApiFlag.value = true
}
diff --git a/web/src/view/systemTools/autoCodeAdmin/index.vue b/web/src/view/systemTools/autoCodeAdmin/index.vue
index 64efc4c0e..5c68ac2cf 100644
--- a/web/src/view/systemTools/autoCodeAdmin/index.vue
+++ b/web/src/view/systemTools/autoCodeAdmin/index.vue
@@ -190,6 +190,10 @@
/>
+
+
+ API路径: [{{ autoFunc.method }}] /{{ autoFunc.abbreviation }}/{{ autoFunc.router }}
+