Browse Source

Merge branch 'zhangtao' of gitadmin/tuoheng_pilot_web into develop

pull/109/head
zhangtao 1 year ago
parent
commit
2677e70773
7 changed files with 8 additions and 15 deletions
  1. +0
    -2
      .env.development
  2. +1
    -3
      .env.localhost
  3. +1
    -3
      .env.production
  4. +1
    -3
      .env.test
  5. +1
    -1
      package.json
  6. +1
    -1
      src/router/guard/permission-guard.js
  7. +3
    -2
      src/views/system-manage/role-manage/components/AuthModal.vue

+ 0
- 2
.env.development View File

VITE_APP_GLOB_BASE_API = '' VITE_APP_GLOB_BASE_API = ''


VITE_AUTHORITY = 'http://192.168.11.11:8090' VITE_AUTHORITY = 'http://192.168.11.11:8090'
VITE_CLIENT_ID = 'tuoheng-pilot-admin'
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA=='

+ 1
- 3
.env.localhost View File

# mock base api # mock base api
VITE_APP_GLOB_BASE_API_MOCK = '/api-mock' VITE_APP_GLOB_BASE_API_MOCK = '/api-mock'


#VITE_AUTHORITY = 'http://192.168.11.11:8090'
# VITE_AUTHORITY = 'http://192.168.11.11:8090'
VITE_AUTHORITY = 'https://login-test.t-aaron.com' VITE_AUTHORITY = 'https://login-test.t-aaron.com'
VITE_CLIENT_ID = 'tuoheng-pilot-admin'
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA=='

+ 1
- 3
.env.production View File

# base api # base api
VITE_APP_GLOB_BASE_API = '' VITE_APP_GLOB_BASE_API = ''


VITE_AUTHORITY = 'https://oidc.t-aaron.com'
VITE_CLIENT_ID = 'tuoheng-pilot-admin'
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA=='
VITE_AUTHORITY = 'https://oidc.t-aaron.com'

+ 1
- 3
.env.test View File

# base api # base api
VITE_APP_GLOB_BASE_API = '' VITE_APP_GLOB_BASE_API = ''


VITE_AUTHORITY = 'https://login-test.t-aaron.com'
VITE_CLIENT_ID = 'tuoheng-pilot-admin'
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA=='
VITE_AUTHORITY = 'https://login-test.t-aaron.com'

+ 1
- 1
package.json View File

"eslint-plugin-vue": "^8.5.0", "eslint-plugin-vue": "^8.5.0",
"esno": "^0.13.0", "esno": "^0.13.0",
"fs-extra": "^10.0.1", "fs-extra": "^10.0.1",
"naive-ui": "^2.27.0",
"naive-ui": "^2.34.3",
"sass": "^1.49.11", "sass": "^1.49.11",
"unocss": "^0.16.4", "unocss": "^0.16.4",
"unplugin-vue-components": "^0.18.5", "unplugin-vue-components": "^0.18.5",

+ 1
- 1
src/router/guard/permission-guard.js View File



export function createPermissionGuard(router) { export function createPermissionGuard(router) {
const userStore = useUserStore() const userStore = useUserStore()
// userStore.getUserInfos()
const permissionStore = usePermissionStore() const permissionStore = usePermissionStore()
router.beforeEach(async(to, from, next) => { router.beforeEach(async(to, from, next) => {
const oidcUser = await getUserInfo() const oidcUser = await getUserInfo()
if (oidcUser) { if (oidcUser) {
userStore.getUserInfos()
const hasRoutes = !!permissionStore.permissionRoutes.length const hasRoutes = !!permissionStore.permissionRoutes.length
if (hasRoutes) { if (hasRoutes) {
next() next()

+ 3
- 2
src/views/system-manage/role-manage/components/AuthModal.vue View File

<n-tabs type="line" animated> <n-tabs type="line" animated>
<n-tab-pane display-directive="show" name="pc" tab="管理端菜单"> <n-tab-pane display-directive="show" name="pc" tab="管理端菜单">
<n-tree <n-tree
v-show="tabsTreeVisible"
v-if="tabsTreeVisible"
ref="adminTreeRef" ref="adminTreeRef"
block-line block-line
cascade cascade
</n-tab-pane> </n-tab-pane>
<n-tab-pane display-directive="show" name="mp" tab="小程序菜单"> <n-tab-pane display-directive="show" name="mp" tab="小程序菜单">
<n-tree <n-tree
v-show="tabsTreeVisible"
v-if="tabsTreeVisible"
ref="miniTreeRef" ref="miniTreeRef"
block-line block-line
cascade cascade
}) })


function handleConfirm() { function handleConfirm() {
console.log(adminTreeRef.value, miniTreeRef.value)
const adminCheckedData = adminTreeRef.value.getCheckedData() const adminCheckedData = adminTreeRef.value.getCheckedData()
const adminIndeterminateData = adminTreeRef.value.getIndeterminateData() const adminIndeterminateData = adminTreeRef.value.getIndeterminateData()
const miniCheckedData = miniTreeRef.value.getCheckedData() const miniCheckedData = miniTreeRef.value.getCheckedData()

Loading…
Cancel
Save