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