Compare commits
3 Commits
2c848827b3
...
31df51dcc6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31df51dcc6 | ||
|
|
0caec67d4a | ||
|
|
5b3c7d8327 |
@@ -284,7 +284,12 @@ const initTable = async () => {
|
||||
if(['年','年度','年份','月','月度','月份','年月'].includes(item.fieldName)){
|
||||
config.searchSpan=3
|
||||
config.searchLabelWidth=60
|
||||
|
||||
if(item.fieldName.includes('年')){
|
||||
config.searchType='year'
|
||||
}else if(item.fieldName.includes('月')){
|
||||
config.searchType='select'
|
||||
config.dicData=[{label:'1月',value:'1'},{label:'2月',value:'2'},{label:'3月',value:'3'},{label:'4月',value:'4'},{label:'5月',value:'5'},{label:'6月',value:'6'},{label:'7月',value:'7'},{label:'8月',value:'8'},{label:'9月',value:'9'},{label:'10月',value:'10'},{label:'11月',value:'11'},{label:'12月',value:'12'}]
|
||||
}
|
||||
}
|
||||
if(!!item.isAmount){
|
||||
index==0?amountFieds.value.fistField=config.prop:''
|
||||
|
||||
@@ -9,7 +9,7 @@ import { useDictStoreWithOut } from '@/store/modules/dict'
|
||||
import { useUserStoreWithOut } from '@/store/modules/user'
|
||||
import { useLowStoreWithOut } from '@/store/modules/low'
|
||||
import { usePermissionStoreWithOut } from '@/store/modules/permission'
|
||||
|
||||
import * as authUtil from '@/utils/auth'
|
||||
const { start, done } = useNProgress()
|
||||
|
||||
const { loadStart, loadDone } = usePageLoading()
|
||||
@@ -64,7 +64,24 @@ router.beforeEach(async (to, from, next) => {
|
||||
loadStart()
|
||||
if (getAccessToken()) {
|
||||
if (to.path === '/login') {
|
||||
const queryParams = new URLSearchParams(window.location.search);
|
||||
const ticketUrl = queryParams.get('url');
|
||||
const ssUrl = queryParams.get('ssUrl');
|
||||
|
||||
if(ticketUrl!=null&&ssUrl==null){
|
||||
next()
|
||||
}else if(ticketUrl!=null&&ssUrl!==null){
|
||||
const accessToken =authUtil.getAccessToken();
|
||||
if(accessToken!=null){
|
||||
const urll=ticketUrl+"?ticket="+accessToken;
|
||||
window.location.href = urll+(ssUrl?"&redirect="+ssUrl:'');
|
||||
}else{
|
||||
next({ path: '/' })
|
||||
}
|
||||
}else{
|
||||
next({ path: '/' })
|
||||
}
|
||||
|
||||
} else {
|
||||
// 获取所有字典
|
||||
const dictStore = useDictStoreWithOut()
|
||||
|
||||
@@ -89,9 +89,6 @@ export default {
|
||||
appsData: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.fetchApps()
|
||||
},
|
||||
computed: {
|
||||
categorizedApps() {
|
||||
const result = {};
|
||||
@@ -135,6 +132,9 @@ export default {
|
||||
return Object.keys(this.filteredCategories).length;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.fetchApps()
|
||||
},
|
||||
methods: {
|
||||
async fetchApps() {
|
||||
try {
|
||||
|
||||
@@ -214,17 +214,23 @@ const handleLogin = async (params) => {
|
||||
if (redirect.value.indexOf('sso') !== -1) {
|
||||
window.location.href = window.location.href.replace('/login?redirect=', '')
|
||||
} else {
|
||||
const queryParams = new URLSearchParams(window.location.search)
|
||||
const ticketUrl = queryParams.get('url') // 获取查询参数值,例如 ?paramName=value 中的 value
|
||||
const accessToken = authUtil.getAccessToken()
|
||||
const queryParams = new URLSearchParams(window.location.search);
|
||||
const ticketUrl = queryParams.get('url'); // 获取查询参数值,例如 ?paramName=value 中的 value
|
||||
const accessToken =authUtil.getAccessToken();
|
||||
debugger
|
||||
console.log(accessToken)
|
||||
if (ticketUrl != null) {
|
||||
var urll = ticketUrl + '?ticket=' + accessToken
|
||||
window.location.href = urll
|
||||
} else {
|
||||
console.log(accessToken);
|
||||
if(ticketUrl!=null){
|
||||
|
||||
var urll=ticketUrl+"?ticket="+accessToken;
|
||||
var ssUrl=queryParams.get('ssUrl')
|
||||
window.location.href = urll+(ssUrl?"&redirect="+ssUrl:'');
|
||||
}else{
|
||||
push({ path: redirect.value || permissionStore.addRouters[0].path })
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
} finally {
|
||||
loginLoading.value = false
|
||||
|
||||
Reference in New Issue
Block a user