소스 검색

第三方应用权限管理权限与视图获取失败

DOVER-GLOBAL\11047086 8 달 전
부모
커밋
6736059f1f

+ 2 - 2
admin.ui.plus-master/.env.development

@@ -3,8 +3,8 @@ ENV = 'development'
 
 # 本地环境接口地址
 # VITE_API_URL = 'http://ipos.biz:8070'
-#VITE_API_URL = 'http://localhost:8000'
+VITE_API_URL = 'http://localhost:8000'
 # VITE_API_URL = 'http://dev.hsfuel.com:8070'
-VITE_API_URL = 'http://47.101.220.106:8070'
+#VITE_API_URL = 'http://47.101.220.106:8070'
 # VITE_API_URL = 'http://ipos.biz:8070'
 

+ 2 - 2
admin.ui.plus-master/.env.production

@@ -9,7 +9,7 @@ VITE_PUBLIC_PATH = '/'
 
 # 线上环境接口地址
 # VITE_API_URL = 'http://ipos.biz:8070'
-#VITE_API_URL = 'http://localhost:8000'
+VITE_API_URL = 'http://localhost:8000'
 # VITE_API_URL = 'http://dev.hsfuel.com:8070'
-VITE_API_URL = 'http://47.101.220.106:8070'
+#VITE_API_URL = 'http://47.101.220.106:8070'
 # VITE_API_URL = 'http://ipos.biz:8070'

+ 1 - 0
admin.ui.plus-master/src/api/admin/data-contracts.ts

@@ -4631,6 +4631,7 @@ export interface OauthRole{
   description?:string|null
   /** 排序 */
   sort?: string|null
+  appid: number
 }
 /** 应用角色信息输出 */
 export interface ResultOutputListOauthRole{

+ 2 - 1
admin.ui.plus-master/src/views/admin/api/index.vue

@@ -103,7 +103,8 @@ const onQuery = async () => {
         return item.label?.toLocaleLowerCase().indexOf(keyword) > -1 || item.path?.toLocaleLowerCase().indexOf(keyword) > -1
       },
     })
-    state.formApiTreeData = listToTree(res.data.filter((a) => a.parentId === 0))
+    //state.formApiTreeData = listToTree(res.data.filter((a) => a.parentId === 0))
+    state.formApiTreeData = listToTree(res.data)
   } else {
     state.apiTreeData = []
     state.formApiTreeData = []

+ 1 - 1
admin.ui.plus-master/src/views/example/application/roleManage/components/role-form.vue

@@ -112,7 +112,7 @@ const onCancel = () => {
 const onSure = () => {
   formRef.value.validate(async (valid: boolean) => {
     if (!valid) return
-
+    debugger
     state.sureLoading = true
     let res = {} as any
     state.form.parentId = state.form.parentId && Number(state.form.parentId) > 0 ? state.form.parentId : undefined

+ 6 - 2
admin.ui.plus-master/src/views/example/application/roleManage/index.vue

@@ -165,6 +165,7 @@ const state = reactive({
   userListData: [] as UserDto[],
   roleId: undefined as number | undefined,
   roleName: '' as string | null | undefined,
+  appid:undefined as number | undefined
 })
 
 onMounted(() => {
@@ -184,6 +185,8 @@ const onQuery = async () => {
   const name = router.currentRoute.value.params.id
   const appData=await new PermissionApi().getApplyInfo({Name:name})
   state.filter.app=appData.data[0].name
+  debugger
+  state.appid = appData.data[0].id
   const res = await new PermissionApi().getRoleInfo({name:state.filter.roleName,AppID:appData.data[0].id}).catch(() => {
     state.loading = false
   })
@@ -222,12 +225,13 @@ const onQuery = async () => {
 const onAdd = (type: RoleType, row: OauthRole | undefined = undefined) => {
   switch (type) {
     case 1:
+      debugger
       state.roleFormTitle = '新增分组'
-      roleFormRef.value.open({ type: 1 })
+      roleFormRef.value.open({ type: 1 ,appid:state.appid})
       break
     case 2:
       state.roleFormTitle = '新增角色'
-      roleFormRef.value.open({ type: 2, parentId: row?.id, dataScope: 1 })
+      roleFormRef.value.open({ type: 2, parentId: row?.id, dataScope: 1,appid:state.appid })
       break
   }
 }