forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
ac8f71577b
@ -49,6 +49,9 @@ public class JWTFilter extends BasicHttpAuthenticationFilter {
|
|||||||
protected boolean executeLogin(ServletRequest request, ServletResponse response) throws Exception {
|
protected boolean executeLogin(ServletRequest request, ServletResponse response) throws Exception {
|
||||||
HttpServletRequest httpServletRequest = (HttpServletRequest) request;
|
HttpServletRequest httpServletRequest = (HttpServletRequest) request;
|
||||||
String authorization = httpServletRequest.getHeader("Authorization");
|
String authorization = httpServletRequest.getHeader("Authorization");
|
||||||
|
if (StringUtils.startsWith(authorization, "Basic")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// 当没有出现登录超时 且需要刷新token 则执行刷新token
|
// 当没有出现登录超时 且需要刷新token 则执行刷新token
|
||||||
if (JWTUtils.loginExpire(authorization)){
|
if (JWTUtils.loginExpire(authorization)){
|
||||||
throw new AuthenticationException(expireMessage);
|
throw new AuthenticationException(expireMessage);
|
||||||
|
@ -12,6 +12,7 @@ import io.dataease.auth.util.JWTUtils;
|
|||||||
import io.dataease.auth.util.RsaUtil;
|
import io.dataease.auth.util.RsaUtil;
|
||||||
import io.dataease.commons.utils.BeanUtils;
|
import io.dataease.commons.utils.BeanUtils;
|
||||||
import io.dataease.commons.utils.CodingUtil;
|
import io.dataease.commons.utils.CodingUtil;
|
||||||
|
import io.dataease.commons.utils.LogUtil;
|
||||||
import io.dataease.commons.utils.ServletUtils;
|
import io.dataease.commons.utils.ServletUtils;
|
||||||
|
|
||||||
import io.dataease.exception.DataEaseException;
|
import io.dataease.exception.DataEaseException;
|
||||||
@ -84,8 +85,17 @@ public class AuthServer implements AuthApi {
|
|||||||
@Override
|
@Override
|
||||||
public String logout() {
|
public String logout() {
|
||||||
String token = ServletUtils.getToken();
|
String token = ServletUtils.getToken();
|
||||||
|
if (StringUtils.isEmpty(token) || StringUtils.equals("null", token) || StringUtils.equals("undefined", token)) {
|
||||||
|
return "success";
|
||||||
|
}
|
||||||
|
try{
|
||||||
Long userId = JWTUtils.tokenInfoByToken(token).getUserId();
|
Long userId = JWTUtils.tokenInfoByToken(token).getUserId();
|
||||||
authUserService.clearCache(userId);
|
authUserService.clearCache(userId);
|
||||||
|
}catch (Exception e) {
|
||||||
|
LogUtil.error(e);
|
||||||
|
return "fail";
|
||||||
|
}
|
||||||
|
|
||||||
return "success";
|
return "success";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,6 +64,7 @@ import { query, updateStatus } from '@/api/system/msg'
|
|||||||
import { getTypeName, loadMsgTypes } from '@/utils/webMsg'
|
import { getTypeName, loadMsgTypes } from '@/utils/webMsg'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
|
import { getToken } from '@/utils/auth'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -172,6 +173,11 @@ export default {
|
|||||||
query(currentPage, pageSize, param).then(response => {
|
query(currentPage, pageSize, param).then(response => {
|
||||||
this.data = response.data.listObject
|
this.data = response.data.listObject
|
||||||
this.paginationConfig.total = response.data.itemCount
|
this.paginationConfig.total = response.data.itemCount
|
||||||
|
}).catch(() => {
|
||||||
|
const token = getToken()
|
||||||
|
if (!token || token === 'null' || token === 'undefined') {
|
||||||
|
this.timer && clearInterval(this.timer)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getTypeName(value) {
|
getTypeName(value) {
|
||||||
|
@ -163,16 +163,17 @@ export default {
|
|||||||
this.unionDataChange()
|
this.unionDataChange()
|
||||||
},
|
},
|
||||||
'table': function() {
|
'table': function() {
|
||||||
if (this.table && this.table.sceneId) {
|
// if (this.table && this.table.sceneId) {
|
||||||
post('dataset/group/getScene/' + this.table.sceneId, {}, false).then(response => {
|
// post('dataset/group/getScene/' + this.table.sceneId, {}, false).then(response => {
|
||||||
this.currGroup = response.data
|
// this.currGroup = response.data
|
||||||
|
//
|
||||||
this.$nextTick(function() {
|
// this.$nextTick(function() {
|
||||||
this.sceneMode = true
|
// this.sceneMode = true
|
||||||
this.tableTree()
|
// this.tableTree()
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
this.treeNode(this.groupForm)
|
||||||
},
|
},
|
||||||
search(val) {
|
search(val) {
|
||||||
this.$emit('switchComponent', { name: '' })
|
this.$emit('switchComponent', { name: '' })
|
||||||
@ -236,7 +237,7 @@ export default {
|
|||||||
this.tableData = []
|
this.tableData = []
|
||||||
if (this.currGroup) {
|
if (this.currGroup) {
|
||||||
this.dsLoading = true
|
this.dsLoading = true
|
||||||
this.tables = [];
|
this.tables = []
|
||||||
post('/dataset/table/list', {
|
post('/dataset/table/list', {
|
||||||
sort: 'type asc,name asc,create_time desc',
|
sort: 'type asc,name asc,create_time desc',
|
||||||
sceneId: this.currGroup.id,
|
sceneId: this.currGroup.id,
|
||||||
@ -352,7 +353,7 @@ export default {
|
|||||||
if (!this.isTreeSearch) {
|
if (!this.isTreeSearch) {
|
||||||
if (node.data.id) {
|
if (node.data.id) {
|
||||||
this.dsLoading = true
|
this.dsLoading = true
|
||||||
this.tables = [];
|
this.tables = []
|
||||||
post('/dataset/table/listAndGroup', {
|
post('/dataset/table/listAndGroup', {
|
||||||
sort: 'type asc,name asc,create_time desc',
|
sort: 'type asc,name asc,create_time desc',
|
||||||
sceneId: node.data.id,
|
sceneId: node.data.id,
|
||||||
|
@ -105,7 +105,7 @@
|
|||||||
width="500"
|
width="500"
|
||||||
trigger="click"
|
trigger="click"
|
||||||
>
|
>
|
||||||
<dataset-group-selector-tree :fix-height="true" show-mode="union" :custom-type="customType" :mode="table.mode" @getTable="getTable" />
|
<dataset-group-selector-tree :fix-height="true" show-mode="union" :table="table" :custom-type="customType" :mode="table.mode" @getTable="getTable" />
|
||||||
<el-button slot="reference" size="mini" style="width: 100%;">
|
<el-button slot="reference" size="mini" style="width: 100%;">
|
||||||
<p class="table-name-css" :title="targetTable.name || $t('dataset.pls_slc_union_table')">{{ targetTable.name || $t('dataset.pls_slc_union_table') }}</p>
|
<p class="table-name-css" :title="targetTable.name || $t('dataset.pls_slc_union_table')">{{ targetTable.name || $t('dataset.pls_slc_union_table') }}</p>
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -206,6 +206,8 @@ export default {
|
|||||||
if (this.table.id) {
|
if (this.table.id) {
|
||||||
if (this.table.mode === 0) {
|
if (this.table.mode === 0) {
|
||||||
this.customType = ['db']
|
this.customType = ['db']
|
||||||
|
} else {
|
||||||
|
this.customType = ['db', 'sql', 'excel']
|
||||||
}
|
}
|
||||||
post('dataset/union/listByTableId/' + this.table.id, {}).then(response => {
|
post('dataset/union/listByTableId/' + this.table.id, {}).then(response => {
|
||||||
// console.log(response)
|
// console.log(response)
|
||||||
|
Loading…
Reference in New Issue
Block a user