Merge branch 'dev' into test
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -64,11 +64,11 @@ function filterAsyncRoutes(routes = [], firstRoute = true) {
|
|||||||
children: [],
|
children: [],
|
||||||
}
|
}
|
||||||
|
|
||||||
if (route.route === '/' && firstRoute) {
|
// if (route.route === '/' && firstRoute) {
|
||||||
curRoute['redirect'] = route.subMenu[0].route
|
// curRoute['redirect'] = route.subMenu[0].route
|
||||||
} else if (route.subMenu && route.type === 1) {
|
// } else if (route.subMenu && route.type === 1) {
|
||||||
curRoute['redirect'] = `${route.subMenu[0].route}`
|
// curRoute['redirect'] = `${route.subMenu[0].route}`
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (route.subMenu && route.subMenu.length) {
|
if (route.subMenu && route.subMenu.length) {
|
||||||
curRoute.children = filterAsyncRoutes(route.subMenu, false)
|
curRoute.children = filterAsyncRoutes(route.subMenu, false)
|
||||||
@@ -84,7 +84,6 @@ function filterAsyncRoutes(routes = [], firstRoute = true) {
|
|||||||
curRoute.component = loadRouteView(route.components)
|
curRoute.component = loadRouteView(route.components)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
ret.push(curRoute)
|
ret.push(curRoute)
|
||||||
})
|
})
|
||||||
return ret
|
return ret
|
||||||
@@ -122,7 +121,6 @@ export const usePermissionStore = defineStore('permission', {
|
|||||||
generateRoutes() {
|
generateRoutes() {
|
||||||
const menus = JSON.parse(localStorage.getItem('menu'))
|
const menus = JSON.parse(localStorage.getItem('menu'))
|
||||||
const accessRoutes = filterAsyncRoutes(menus)
|
const accessRoutes = filterAsyncRoutes(menus)
|
||||||
// console.log(accessRoutes)
|
|
||||||
window.localStorage.setItem('roles', JSON.stringify(findType3Routes(menus)))
|
window.localStorage.setItem('roles', JSON.stringify(findType3Routes(menus)))
|
||||||
this.accessRoutes = accessRoutes
|
this.accessRoutes = accessRoutes
|
||||||
return accessRoutes
|
return accessRoutes
|
||||||
|
|||||||
@@ -513,7 +513,7 @@ const getList = async () => {
|
|||||||
pageSize: pagination.value.pageSize,
|
pageSize: pagination.value.pageSize,
|
||||||
name: queryParams.value.word,
|
name: queryParams.value.word,
|
||||||
})
|
})
|
||||||
data.value = res.data.data || []
|
data.value = res.data.data.sort((a, b) => b.status - a.status) || []
|
||||||
pagination.value.itemCount = res.data.total
|
pagination.value.itemCount = res.data.total
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
$message.error(error.msg)
|
$message.error(error.msg)
|
||||||
|
|||||||
@@ -109,14 +109,15 @@ async function handleLogin() {
|
|||||||
lStorage.remove('loginInfo')
|
lStorage.remove('loginInfo')
|
||||||
}
|
}
|
||||||
await addDynamicRoutes()
|
await addDynamicRoutes()
|
||||||
// if (query.redirect) {
|
// console.log(query)
|
||||||
// const path = query.redirect
|
if (query.redirect) {
|
||||||
// Reflect.deleteProperty(query, 'redirect')
|
const path = query.redirect
|
||||||
// router.push({ path, query })
|
Reflect.deleteProperty(query, 'redirect')
|
||||||
// } else {
|
router.push({ path, query })
|
||||||
// router.push('/workbench')
|
} else {
|
||||||
// }
|
|
||||||
router.push('/workbench')
|
router.push('/workbench')
|
||||||
|
}
|
||||||
|
// router.push('/workbench')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
$message.removeMessage()
|
$message.removeMessage()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ const columns = ref([
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
render: (row) => {
|
render: (row) => {
|
||||||
return h('img', {
|
return h('img', {
|
||||||
src: row.icon,
|
src: row.icon[0].url,
|
||||||
width: 50,
|
width: 50,
|
||||||
height: 50,
|
height: 50,
|
||||||
})
|
})
|
||||||
@@ -195,7 +195,7 @@ const getList = async () => {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
})) || []
|
})) || []
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
pagination.value.itemCount = res.data.total
|
pagination.value.itemCount = res.data.total
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user