From a8b9a4fbb2248da28ded7a0278d42f869ee1d87d Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 16 Jun 2021 18:03:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E5=88=A0=E9=99=A4=E4=B8=8D?= =?UTF-8?q?=E7=AD=89=E4=BA=8E=20=E4=B8=8D=E5=8C=85=E5=90=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/auth/config/F2CRealm.java | 14 ++++- .../condition-table/DeComplexInput.vue | 53 ++++++++++++++++ .../condition-table/DeComplexOperator.vue | 62 +++++++++++++++++++ frontend/src/main.js | 2 + frontend/src/views/system/user/index.vue | 3 +- 5 files changed, 129 insertions(+), 5 deletions(-) create mode 100644 frontend/src/components/business/condition-table/DeComplexInput.vue create mode 100644 frontend/src/components/business/condition-table/DeComplexOperator.vue diff --git a/backend/src/main/java/io/dataease/auth/config/F2CRealm.java b/backend/src/main/java/io/dataease/auth/config/F2CRealm.java index 29c269f10f..1f0ee7e60d 100644 --- a/backend/src/main/java/io/dataease/auth/config/F2CRealm.java +++ b/backend/src/main/java/io/dataease/auth/config/F2CRealm.java @@ -60,10 +60,18 @@ public class F2CRealm extends AuthorizingRealm { CacheUtils.get("lic_info", "lic"); }catch (Exception e) { LogUtil.error(e); + throw new AuthenticationException("lic error"); } - String token = (String) auth.getCredentials(); - // 解密获得username,用于和数据库进行对比 - TokenInfo tokenInfo = JWTUtils.tokenInfoByToken(token); + TokenInfo tokenInfo = null; + String token = null; + try { + token = (String) auth.getCredentials(); + // 解密获得username,用于和数据库进行对比 + tokenInfo = JWTUtils.tokenInfoByToken(token); + }catch (Exception e) { + throw new AuthenticationException(e); + } + Long userId = tokenInfo.getUserId(); String username = tokenInfo.getUsername(); if (username == null) { diff --git a/frontend/src/components/business/condition-table/DeComplexInput.vue b/frontend/src/components/business/condition-table/DeComplexInput.vue new file mode 100644 index 0000000000..9ff39ac3bf --- /dev/null +++ b/frontend/src/components/business/condition-table/DeComplexInput.vue @@ -0,0 +1,53 @@ + + + diff --git a/frontend/src/components/business/condition-table/DeComplexOperator.vue b/frontend/src/components/business/condition-table/DeComplexOperator.vue new file mode 100644 index 0000000000..1feec41b1d --- /dev/null +++ b/frontend/src/components/business/condition-table/DeComplexOperator.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/frontend/src/main.js b/frontend/src/main.js index ada2849a15..2dc827327e 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -20,6 +20,7 @@ import widgets from '@/components/widget' import Treeselect from '@riophae/vue-treeselect' import '@riophae/vue-treeselect/dist/vue-treeselect.css' import './utils/dialog' +import DeComplexInput from '@/components/business/condition-table/DeComplexInput' import '@/components/canvas/custom-component' // 注册自定义组件 Vue.config.productionTip = false @@ -69,6 +70,7 @@ Vue.use(filter) Vue.use(directives) Vue.use(message) Vue.component('Treeselect', Treeselect) +Vue.component('DeComplexInput', DeComplexInput) Vue.config.productionTip = false Vue.prototype.hasDataPermission = function(pTarget, pSource) { diff --git a/frontend/src/views/system/user/index.vue b/frontend/src/views/system/user/index.vue index 2cfa1a189c..fe93048dd3 100644 --- a/frontend/src/views/system/user/index.vue +++ b/frontend/src/views/system/user/index.vue @@ -162,7 +162,6 @@