From 0613ed385d398a5c274f95a550e03616868e7ab6 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Tue, 1 Jun 2021 16:26:35 +0800 Subject: [PATCH 01/17] =?UTF-8?q?fix:=20=E5=88=AA=E9=99=A4=E7=B5=84?= =?UTF-8?q?=E7=B9=94=E5=9C=8B=E9=9A=9B=E5=8C=96=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 5 ++--- frontend/src/lang/tw.js | 5 ++--- frontend/src/lang/zh.js | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index cab9e7f4d3..229d206ae6 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -482,13 +482,12 @@ export default { create: 'Create', modify: 'Modify', delete: 'Delete', - delete_confirm: '删除该组织会关联删除该组织下的所有资源(如:相关工作空间,项目,测试用例等),确定要删除吗?', + delete_confirm: 'Deleting the organization will be associated with deleting the subordinate organization, Are you sure you want to delete it?', input_name: 'Please enter name', select_organization: 'Please select organization', search_by_name: 'Search by name', special_characters_are_not_supported: 'Format error (special characters are not supported and cannot start and end with \'-\')', - select: 'Select organization', - delete_warning: '删除该组织将同步删除该组织下所有相关工作空间和相关工作空间下的所有项目,以及项目中的所有用例、接口测试、性能测试等,确定要删除吗?' + select: 'Select organization' }, system_parameter_setting: { mailbox_service_settings: 'Mail Settings', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 1c404707c1..dd6c9738a4 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -482,13 +482,12 @@ export default { create: '創建組織', modify: '修改組織', delete: '删除組織', - delete_confirm: '删除該組織會關聯刪除該組織的所有資源,確定要删除吗?', + delete_confirm: '删除該組織會關聯刪除該組織的下屬組織,確定要删除吗?', input_name: '請輸入組織名稱', select_organization: '请選擇組織', search_by_name: '根据名稱搜索', special_characters_are_not_supported: '格式錯誤(不支持特殊字符,且不能以\'-\'開頭結尾)', - select: '選擇組織', - delete_warning: '確定要删除組織吗?' + select: '選擇組織' }, system_parameter_setting: { mailbox_service_settings: '郵件設置', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index c30a864b76..84ec25e52b 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -482,13 +482,12 @@ export default { create: '创建组织', modify: '修改组织', delete: '删除组织', - delete_confirm: '删除该组织会关联删除该组织下的所有资源(如:相关工作空间,项目,测试用例等),确定要删除吗?', + delete_confirm: '删除该组织会关联删除该组织的下属组织,确定要删除吗?', input_name: '请输入组织名称', select_organization: '请选择组织', search_by_name: '根据名称搜索', special_characters_are_not_supported: '格式错误(不支持特殊字符,且不能以\'-\'开头结尾)', - select: '选择组织', - delete_warning: '删除该组织将同步删除该组织下所有相关工作空间和相关工作空间下的所有项目,以及项目中的所有用例、接口测试、性能测试等,确定要删除吗?' + select: '选择组织' }, system_parameter_setting: { mailbox_service_settings: '邮件设置', From 98f69d4eaf9e12641f6dec47fa4c43479c9c0fbf Mon Sep 17 00:00:00 2001 From: junjie Date: Wed, 2 Jun 2021 10:20:03 +0800 Subject: [PATCH 02/17] =?UTF-8?q?feat(=E6=95=B0=E6=8D=AE=E6=BA=90):?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E6=A0=A1=E9=AA=8C=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/datasource/service/DatasourceService.java | 8 ++++++-- backend/src/main/resources/i18n/messages_en_US.properties | 1 + backend/src/main/resources/i18n/messages_zh_CN.properties | 1 + backend/src/main/resources/i18n/messages_zh_TW.properties | 1 + frontend/src/views/system/datasource/form.vue | 4 ++-- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java b/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java index b05370b044..66bf1189f9 100644 --- a/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java +++ b/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java @@ -91,7 +91,11 @@ public class DatasourceService { DatasourceProvider datasourceProvider = ProviderFactory.getProvider(datasource.getType()); DatasourceRequest datasourceRequest = new DatasourceRequest(); datasourceRequest.setDatasource(datasource); - datasourceProvider.test(datasourceRequest); + try { + datasourceProvider.test(datasourceRequest); + } catch (Exception e) { + throw new RuntimeException(Translator.get("i18n_datasource_check_fail")); + } } public List getTables(Datasource datasource) throws Exception { @@ -144,7 +148,7 @@ public class DatasourceService { datasourceRequest.setDatasource(datasource); datasourceProvider.initDataSource(datasourceRequest); LogUtil.info("Succsss to init datasource connection pool: " + datasource.getName()); - }catch (Exception e){ + } catch (Exception e) { LogUtil.error("Failed to init datasource connection pool: " + datasource.getName(), e); } }); diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index a89f27a5a3..7bf0bf2b15 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -243,3 +243,4 @@ i18n_auth_source_be_canceled=This Auth Resource Already Be Canceled i18n_username_exists=ID is already exists i18n_ds_name_exists=Datasource name exists i18n_sync_job_exists=There is already a synchronization task running, please try again later +i18n_datasource_check_fail=Invalid,please check config diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index 5a3a318e9e..6ef78e0a4f 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -245,3 +245,4 @@ i18n_auth_source_be_canceled=当前资源授权权限已经被取消 i18n_username_exists=用户ID已存在 i18n_ds_name_exists=数据源名称已存在 i18n_sync_job_exists=已经有同步任务在运行,稍后重试 +i18n_datasource_check_fail=校验失败,请检查配置信息 diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index 49c3d8d98a..fe3e55190d 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -245,3 +245,4 @@ i18n_auth_source_be_canceled=當前資源授權權限已經被取消 i18n_username_exists=用戶ID已存在 i18n_ds_name_exists=數據源名稱已存在 i18n_sync_job_exists=已經有同步任務在運行,稍後重試 +i18n_datasource_check_fail=校驗失敗,請檢查配置信息 diff --git a/frontend/src/views/system/datasource/form.vue b/frontend/src/views/system/datasource/form.vue index 608d39f498..1263890d8b 100644 --- a/frontend/src/views/system/datasource/form.vue +++ b/frontend/src/views/system/datasource/form.vue @@ -29,10 +29,10 @@ - + - + From 52179d814c59209515324ae8caee59ff66f702d8 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Jun 2021 10:23:21 +0800 Subject: [PATCH 03/17] =?UTF-8?q?fix:=20=E3=80=90ID1003566=E3=80=91?= =?UTF-8?q?=E3=80=90=E4=BB=AA=E8=A1=A8=E7=9B=98=E3=80=91=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E7=9B=98=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2=E7=9A=84=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=A1=B5=EF=BC=8C=E6=BB=9A=E5=8A=A8=E6=9D=A1=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E5=9C=A8=E5=88=97=E8=A1=A8=E6=A1=86=E5=86=85=E4=BE=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/panel/filter/filterDialog.vue | 8 ++++++++ frontend/src/views/panel/filter/index.vue | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/panel/filter/filterDialog.vue b/frontend/src/views/panel/filter/filterDialog.vue index a9ca25e5d7..036d0da230 100644 --- a/frontend/src/views/panel/filter/filterDialog.vue +++ b/frontend/src/views/panel/filter/filterDialog.vue @@ -593,6 +593,9 @@ export default { .filter-dialog-tabs { border: 1px solid #E6E6E6; height: 100%; + >>> div.el-tabs__content { + height: calc(100% - 55px); + } } .filter-common { @@ -604,6 +607,11 @@ export default { margin: 20px 10px !important; } + .component-result-content { + height: calc(50vh - 140px); + overflow-y: auto; + } + .link-text { font-weight: 450 !important; color: #409EFF; diff --git a/frontend/src/views/panel/filter/index.vue b/frontend/src/views/panel/filter/index.vue index ef8285731b..242e34ceca 100644 --- a/frontend/src/views/panel/filter/index.vue +++ b/frontend/src/views/panel/filter/index.vue @@ -99,7 +99,7 @@ export default { padding-top: 0px; padding-bottom: 0px; position: relative; - height: 940px; + // height: 940px; max-height: 976px; } .filter-header { From 82b66cb263fc151794fea538fd00852bf6bb876c Mon Sep 17 00:00:00 2001 From: taojinlong Date: Wed, 2 Jun 2021 10:46:06 +0800 Subject: [PATCH 04/17] =?UTF-8?q?fix:=20=E6=A0=A1=E9=AA=8C=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=BA=90=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/dataease/datasource/provider/JdbcProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/dataease/datasource/provider/JdbcProvider.java b/backend/src/main/java/io/dataease/datasource/provider/JdbcProvider.java index 533edf96b9..cfc122406b 100644 --- a/backend/src/main/java/io/dataease/datasource/provider/JdbcProvider.java +++ b/backend/src/main/java/io/dataease/datasource/provider/JdbcProvider.java @@ -232,7 +232,7 @@ public class JdbcProvider extends DatasourceProvider { } catch (Exception e) { throw new Exception("ERROR: " + e.getMessage(), e); } finally { - con.close(); + if(con != null){con.close();} } } From c3fce400381fb18f5863cc3fa69bbf5dc0cd9ac7 Mon Sep 17 00:00:00 2001 From: junjie Date: Wed, 2 Jun 2021 11:03:43 +0800 Subject: [PATCH 05/17] =?UTF-8?q?feat(frontend):logo=E7=AD=89=E5=B0=BA?= =?UTF-8?q?=E5=AF=B8=E8=B0=83=E6=95=B4=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 3 ++- frontend/src/lang/tw.js | 3 ++- frontend/src/lang/zh.js | 3 ++- frontend/src/styles/topbar.scss | 4 ++++ frontend/src/views/login/index.vue | 8 ++++++-- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 2c9e49c281..b2749a9168 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -985,7 +985,8 @@ export default { loginLogo: 'Login page header logo', loginImage: 'Picture on the right side of the login page', loginTitle: 'Login page title', - title: 'System name' + title: 'System name', + advice_size: 'Advice picture size' }, auth: { authConfig: 'Auth Config', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index cede5bd3a4..f65bcc240f 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -985,7 +985,8 @@ export default { loginLogo: '登陸頁面頭部 Logo', loginImage: '登陸頁面右側圖片', loginTitle: '登陸頁面標題', - title: '系統名稱' + title: '系統名稱', + advice_size: '建議圖片大小' }, auth: { authConfig: '權限配置', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 37f3874bdf..04b6c9c927 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -985,7 +985,8 @@ export default { loginLogo: '登录页面头部logo', loginImage: '登录页面右侧图片', loginTitle: '登录页面标题', - title: '系统名称' + title: '系统名称', + advice_size: '建议图片大小' }, auth: { authConfig: '权限配置', diff --git a/frontend/src/styles/topbar.scss b/frontend/src/styles/topbar.scss index c52d51d01d..2403e9733b 100644 --- a/frontend/src/styles/topbar.scss +++ b/frontend/src/styles/topbar.scss @@ -19,6 +19,10 @@ // color: rgb(191, 203, 217); color: rgba(255,255,255,0.87); float: left; + img{ + width: auto; + max-height: 45px; + } } .el-menu { float: left; diff --git a/frontend/src/views/login/index.vue b/frontend/src/views/login/index.vue index cbf50f8a8a..02a47191ce 100644 --- a/frontend/src/views/login/index.vue +++ b/frontend/src/views/login/index.vue @@ -180,9 +180,13 @@ export default { margin-top: 20px; } img{ - width: 240px; + /*width: 240px;*/ + width: auto; + max-height: 60px; @media only screen and (max-width: 1280px) { - width: 200px; + /*width: 200px;*/ + width: auto; + max-height: 50px; } } } From 3825be261cf4be028f7c5ff1f6e2a803e6df7b24 Mon Sep 17 00:00:00 2001 From: junjie Date: Wed, 2 Jun 2021 11:06:03 +0800 Subject: [PATCH 06/17] =?UTF-8?q?feat(backend):=E6=8F=90=E7=A4=BA=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/datasource/service/DatasourceService.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java b/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java index 66bf1189f9..8a2eee16a5 100644 --- a/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java +++ b/backend/src/main/java/io/dataease/datasource/service/DatasourceService.java @@ -91,11 +91,7 @@ public class DatasourceService { DatasourceProvider datasourceProvider = ProviderFactory.getProvider(datasource.getType()); DatasourceRequest datasourceRequest = new DatasourceRequest(); datasourceRequest.setDatasource(datasource); - try { - datasourceProvider.test(datasourceRequest); - } catch (Exception e) { - throw new RuntimeException(Translator.get("i18n_datasource_check_fail")); - } + datasourceProvider.test(datasourceRequest); } public List getTables(Datasource datasource) throws Exception { From cf62ecefbd96aa116d2e7535dd19a999f603fcb5 Mon Sep 17 00:00:00 2001 From: junjie Date: Wed, 2 Jun 2021 11:31:25 +0800 Subject: [PATCH 07/17] =?UTF-8?q?feat(frontend):icon=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/panel/list/PanelList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/panel/list/PanelList.vue b/frontend/src/views/panel/list/PanelList.vue index a6915fa836..de9b7c46da 100644 --- a/frontend/src/views/panel/list/PanelList.vue +++ b/frontend/src/views/panel/list/PanelList.vue @@ -115,7 +115,7 @@ {{ $t('panel.create_public_links') }} - + {{ $t('panel.to_default_panel') }} From f837c0edf433a4d5b5eb4f23f9054e241f888382 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Jun 2021 11:35:38 +0800 Subject: [PATCH 08/17] =?UTF-8?q?fix:=20=E3=80=90ID1004028=E3=80=91?= =?UTF-8?q?=E8=AE=BF=E9=97=AE=E5=85=AC=E5=85=B1=E9=93=BE=E6=8E=A5=E6=80=BB?= =?UTF-8?q?=E6=98=AF=E6=8F=90=E7=A4=BA=E9=A1=B5=E9=9D=A2=E6=97=A0=E6=95=88?= =?UTF-8?q?=EF=BC=8C=E8=B7=B3=E8=BD=AC=E5=88=B0=E7=99=BB=E5=BD=95=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/dataease/service/panel/PanelLinkService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/dataease/service/panel/PanelLinkService.java b/backend/src/main/java/io/dataease/service/panel/PanelLinkService.java index 4048fe7fb5..d5a8abca72 100644 --- a/backend/src/main/java/io/dataease/service/panel/PanelLinkService.java +++ b/backend/src/main/java/io/dataease/service/panel/PanelLinkService.java @@ -119,7 +119,7 @@ public class PanelLinkService { public Boolean validateHeads(PanelLink panelLink) throws Exception{ HttpServletRequest request = ServletUtils.request(); String token = request.getHeader("LINK-PWD-TOKEN"); - if (StringUtils.isEmpty(token)) return false; + if (StringUtils.isEmpty(token) || StringUtils.equals("undefined", token) || StringUtils.equals("null", token)) return false; boolean verify = JWTUtils.verifyLink(token, panelLink.getResourceId(), decryptParam(panelLink.getPwd())); return verify; } From c2cb12c73b33bb35d09d8239dfb14c434a5565a9 Mon Sep 17 00:00:00 2001 From: junjie Date: Wed, 2 Jun 2021 11:59:33 +0800 Subject: [PATCH 09/17] =?UTF-8?q?feat(fix):=E6=B7=BB=E5=8A=A0db=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=EF=BC=8C=E9=BB=98=E8=AE=A4=E5=8A=A0=E4=B8=8A?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataease/service/dataset/DataSetTableService.java | 4 ---- frontend/src/views/dataset/add/AddDB.vue | 11 +++++++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java index 36b1e343f2..71fd2a9f7b 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -102,10 +102,6 @@ public class DataSetTableService { datasetTable.setCreateBy(AuthUtils.getUser().getUsername()); datasetTable.setCreateTime(System.currentTimeMillis()); DataTableInfoDTO dataTableInfoDTO = new DataTableInfoDTO(); - if (StringUtils.equalsIgnoreCase("db", datasetTable.getType())) { - dataTableInfoDTO.setTable(datasetTable.getName()); - datasetTable.setInfo(new Gson().toJson(dataTableInfoDTO)); - } int insert = datasetTableMapper.insert(datasetTable); // 添加表成功后,获取当前表字段和类型,抽象到dataease数据库 if (insert == 1) { diff --git a/frontend/src/views/dataset/add/AddDB.vue b/frontend/src/views/dataset/add/AddDB.vue index be014f8dcf..44bf4daa1c 100644 --- a/frontend/src/views/dataset/add/AddDB.vue +++ b/frontend/src/views/dataset/add/AddDB.vue @@ -120,17 +120,24 @@ export default { save() { // console.log(this.checkTableList); // console.log(this.scene); + let ds = {} + this.options.forEach(ele => { + if (ele.id === this.dataSource) { + ds = ele + } + }) const sceneId = this.param.id const dataSourceId = this.dataSource const tables = [] const mode = this.mode this.checkTableList.forEach(function(name) { tables.push({ - name: name, + name: ds.name + '_' + name, sceneId: sceneId, dataSourceId: dataSourceId, type: 'db', - mode: parseInt(mode) + mode: parseInt(mode), + info: JSON.stringify({ table: name }) }) }) post('/dataset/table/batchAdd', tables).then(response => { From eb39fb744dfaf926c17a29878a48caaa11d23e94 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Wed, 2 Jun 2021 13:05:26 +0800 Subject: [PATCH 10/17] =?UTF-8?q?fix:=20=E5=88=B7=E6=96=B0token=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=A0=A1=E9=AA=8C=E7=94=A8=E6=88=B7=EF=BC=9B=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/dataease/auth/filter/JWTFilter.java | 6 +++++- .../main/resources/i18n/messages_en_US.properties | 1 + .../main/resources/i18n/messages_zh_CN.properties | 7 ++++--- .../main/resources/i18n/messages_zh_TW.properties | 1 + frontend/src/lang/en.js | 4 ++++ frontend/src/lang/tw.js | 8 ++++++-- frontend/src/lang/zh.js | 12 ++++++++---- frontend/src/utils/message.js | 4 ++-- 8 files changed, 31 insertions(+), 12 deletions(-) diff --git a/backend/src/main/java/io/dataease/auth/filter/JWTFilter.java b/backend/src/main/java/io/dataease/auth/filter/JWTFilter.java index f7a4b6ea33..4729dcb089 100644 --- a/backend/src/main/java/io/dataease/auth/filter/JWTFilter.java +++ b/backend/src/main/java/io/dataease/auth/filter/JWTFilter.java @@ -7,6 +7,7 @@ import io.dataease.auth.service.AuthUserService; import io.dataease.auth.util.JWTUtils; import io.dataease.commons.utils.CommonBeanFactory; import io.dataease.commons.utils.ServletUtils; +import io.dataease.i18n.Translator; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.subject.Subject; @@ -26,7 +27,7 @@ public class JWTFilter extends BasicHttpAuthenticationFilter { private Logger LOGGER = LoggerFactory.getLogger(this.getClass()); - public final static String expireMessage = "login token is expire"; + public final static String expireMessage = "Login token is expire."; /*@Autowired private AuthUserService authUserService;*/ @@ -102,6 +103,9 @@ public class JWTFilter extends BasicHttpAuthenticationFilter { TokenInfo tokenInfo = JWTUtils.tokenInfoByToken(token); AuthUserService authUserService = CommonBeanFactory.getBean(AuthUserService.class); SysUserEntity user = authUserService.getUserById(tokenInfo.getUserId()); + if(user == null){ + throw new Exception(Translator.get("i18n_not_find_user")); + } String password = user.getPassword(); // 删除老token操作时间 diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index 7bf0bf2b15..06784d2f0f 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -244,3 +244,4 @@ i18n_username_exists=ID is already exists i18n_ds_name_exists=Datasource name exists i18n_sync_job_exists=There is already a synchronization task running, please try again later i18n_datasource_check_fail=Invalid,please check config +i18n_not_find_user=Can not find user. \ No newline at end of file diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index 6ef78e0a4f..a6e9f29685 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -232,8 +232,8 @@ i18n_template_system=系统模板 i18n_template_self=用户模板 i18n_name_cant_repeat_same_group=同一分组下名称不能重复 i18n_chart_count=记录数* -i18n_excel_have_merge_region=Excel存在合并单元格 -i18n_cron_expression_error=Cron表达式校验错误 +i18n_excel_have_merge_region=Excel 存在合并单元格 +i18n_cron_expression_error=Cron 表达式校验错误 i18n_same_folder_can_not_repeat=相同的目录下名称不能重复 i18n_default_panel=默认仪表板 i18n_panel_list=仪表板 @@ -242,7 +242,8 @@ i18n_union_already_exists=关联关系已存在 i18n_union_field_exists=两个数据集之间关联不能出现多次相同字段 i18n_cron_time_error=开始时间不能大于结束时间 i18n_auth_source_be_canceled=当前资源授权权限已经被取消 -i18n_username_exists=用户ID已存在 +i18n_username_exists=用户 ID 已存在 i18n_ds_name_exists=数据源名称已存在 i18n_sync_job_exists=已经有同步任务在运行,稍后重试 i18n_datasource_check_fail=校验失败,请检查配置信息 +i18n_not_find_user=未找到用户 \ No newline at end of file diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index fe3e55190d..55266c1429 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -246,3 +246,4 @@ i18n_username_exists=用戶ID已存在 i18n_ds_name_exists=數據源名稱已存在 i18n_sync_job_exists=已經有同步任務在運行,稍後重試 i18n_datasource_check_fail=校驗失敗,請檢查配置信息 +i18n_not_find_user=未找到用戶 \ No newline at end of file diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 2c9e49c281..97f3465a40 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -268,6 +268,10 @@ export default { not_equals: 'Not equals', between: 'between', current_user: 'Current User' + }, + message_box: { + alert: 'Alert', + confirm: 'Confirm' } }, monitor: 'Monitor', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index cede5bd3a4..41323c3948 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -83,8 +83,8 @@ export default { thirdpartyTips: '本地不能模拟,请结合自己业务进行模拟!!!', expires: '登陸信息过期,请重新登陸', tokenError: '信息错误,请重新登陸', - username_error: '請輸入正確的ID', - password_error: '密碼不小於8位' + username_error: '請輸入正確的 ID', + password_error: '密碼不小於 8 位' }, commons: { close: '关闭', @@ -268,6 +268,10 @@ export default { not_equals: '不等與', between: '之间', current_user: '是当前用戶' + }, + message_box: { + alert: '警告', + confirm: '確認' } }, monitor: '监控', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 37f3874bdf..0a21ff9ab8 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -81,10 +81,10 @@ export default { any: '随便填', thirdparty: '第三方登录', thirdpartyTips: '本地不能模拟,请结合自己业务进行模拟!!!', - expires: '登录token过期,请重新登录', - tokenError: 'token错误,请重新登录', - username_error: '请输入正确的ID', - password_error: '密码不小于8位' + expires: '登录信息过期,请重新登录', + tokenError: '登陆信息错误,请重新登录', + username_error: '请输入正确的 ID', + password_error: '密码不小于 8 位' }, commons: { close: '关闭', @@ -268,6 +268,10 @@ export default { not_equals: '不等于', between: '之间', current_user: '是当前用户' + }, + message_box: { + alert: '警告', + confirm: '确认' } }, monitor: '监控', diff --git a/frontend/src/utils/message.js b/frontend/src/utils/message.js index 6fb5c6d1cc..fd72e88a30 100644 --- a/frontend/src/utils/message.js +++ b/frontend/src/utils/message.js @@ -1,7 +1,7 @@ import { MessageBox, Message } from 'element-ui' import i18n from '@/lang' export const $alert = (message, callback, options) => { - const title = i18n.t('common.message_box.alert') + const title = i18n.t('commons.message_box.alert') MessageBox.alert(message, title, options).then(() => { callback() }) @@ -14,7 +14,7 @@ export const $confirm = (message, callback, options = {}) => { type: 'warning', ...options } - const title = i18n.t('common.message_box.confirm') + const title = i18n.t('commons.message_box.confirm') MessageBox.confirm(message, title, defaultOptions).then(() => { callback() }) From 24d1c35d0f97b192a9415fab3461510b19fbe1ad Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Jun 2021 13:52:01 +0800 Subject: [PATCH 11/17] =?UTF-8?q?feat:=20=E7=94=A8=E6=88=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=A2=9E=E5=8A=A0=E6=8E=92=E5=BA=8F=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/sys/base/BaseGridRequest.java | 15 ++++++++-- .../dataease/service/sys/SysUserService.java | 16 +++++----- frontend/src/utils/index.js | 29 +++++++++++++++++++ frontend/src/views/system/user/index.vue | 27 ++++++++++++----- 4 files changed, 69 insertions(+), 18 deletions(-) diff --git a/backend/src/main/java/io/dataease/controller/sys/base/BaseGridRequest.java b/backend/src/main/java/io/dataease/controller/sys/base/BaseGridRequest.java index 4448c64b82..63ce8e97c3 100644 --- a/backend/src/main/java/io/dataease/controller/sys/base/BaseGridRequest.java +++ b/backend/src/main/java/io/dataease/controller/sys/base/BaseGridRequest.java @@ -3,6 +3,7 @@ package io.dataease.controller.sys.base; import io.dataease.base.mapper.ext.query.GridExample; import lombok.Data; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import java.io.Serializable; import java.util.List; @@ -13,12 +14,20 @@ public class BaseGridRequest implements Serializable { private List conditions; + private List orders; + public GridExample convertExample(){ GridExample gridExample = new GridExample(); - if (CollectionUtils.isEmpty(conditions))return gridExample; + if (CollectionUtils.isNotEmpty(conditions)) { + GridExample.Criteria criteria = gridExample.createCriteria(); + conditions.forEach(criteria::addCondtion); + } + + if (CollectionUtils.isNotEmpty(orders)){ + String orderByClause = String.join(", ", orders); + gridExample.setOrderByClause(orderByClause); + } - GridExample.Criteria criteria = gridExample.createCriteria(); - conditions.forEach(criteria::addCondtion); return gridExample; } } diff --git a/backend/src/main/java/io/dataease/service/sys/SysUserService.java b/backend/src/main/java/io/dataease/service/sys/SysUserService.java index eb1d6ac33f..d5a067fbb1 100644 --- a/backend/src/main/java/io/dataease/service/sys/SysUserService.java +++ b/backend/src/main/java/io/dataease/service/sys/SysUserService.java @@ -51,16 +51,16 @@ public class SysUserService { public List query(BaseGridRequest request) { - List sysUsers = sysUserMapper.selectByExample(new SysUserExample()); + /* List sysUsers = sysUserMapper.selectByExample(new SysUserExample()); List lists = sysUsers.stream().map(ele -> { SysUserGridResponse response = new SysUserGridResponse(); BeanUtils.copyBean(response, ele); return response; - }).collect(Collectors.toList()); + }).collect(Collectors.toList());*/ GridExample gridExample = request.convertExample(); - List query = extSysUserMapper.query(gridExample); + List lists = extSysUserMapper.query(gridExample); lists.forEach(item -> { - for (SysUserGridResponse response : query) { + /*for (SysUserGridResponse response : query) { if (item.getUserId().equals(response.getUserId())) { item.setId(response.getId()); List roles = response.getRoles(); @@ -69,10 +69,10 @@ public class SysUserService { item.setRoleIds(roleIds); item.setDept(response.getDept()); } - } -// List roles = item.getRoles(); -// List roleIds = roles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList()); -// item.setRoleIds(roleIds); + }*/ + List roles = item.getRoles(); + List roleIds = roles.stream().map(SysUserRole::getRoleId).collect(Collectors.toList()); + item.setRoleIds(roleIds); }); return lists; } diff --git a/frontend/src/utils/index.js b/frontend/src/utils/index.js index 51d03ede6b..e871fcc8b5 100644 --- a/frontend/src/utils/index.js +++ b/frontend/src/utils/index.js @@ -221,6 +221,35 @@ export function formatCondition(param) { } return result } +/** + * 驼峰转下划线 + * @param {*} name + * @returns + */ +export function toLine(name) { + return name.replace(/([A-Z])/g, '_$1').toLowerCase() +} +export function addOrder(order, orders) { + order.field = toLine(order.field) + if (order.value.startsWith('desc')) { + order.value = 'desc' + } else { + order.value = 'asc' + } + orders = orders || [] + for (let index = 0; index < orders.length; index++) { + const element = orders[index] + if (order.field === element.field) { + orders[index] = order + return + } + } + orders.push(order) +} + +export function formatOrders(orders) { + return orders.map(order => order.field + ' ' + order.value) +} export function formatQuickCondition(param, quickField) { let quickObj = null diff --git a/frontend/src/views/system/user/index.vue b/frontend/src/views/system/user/index.vue index eb68e88b03..287b26702d 100644 --- a/frontend/src/views/system/user/index.vue +++ b/frontend/src/views/system/user/index.vue @@ -8,6 +8,7 @@ :pagination-config="paginationConfig" @select="select" @search="search" + @sort-change="sortChange" > - + - + @@ -43,12 +44,12 @@ - + - + @@ -163,7 +164,7 @@ import LayoutContent from '@/components/business/LayoutContent' import ComplexTable from '@/components/business/complex-table' // import { checkPermission } from '@/utils/permission' -import { formatCondition, formatQuickCondition } from '@/utils/index' +import { formatCondition, formatQuickCondition, addOrder, formatOrders } from '@/utils/index' import { PHONE_REGEX } from '@/utils/validate' import { LOAD_CHILDREN_OPTIONS, LOAD_ROOT_OPTIONS } from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect' @@ -295,7 +296,9 @@ export default { edit: ['user:edit'], del: ['user:del'], editPwd: ['user:editPwd'] - } + }, + orderConditions: [], + last_condition: null } }, mounted() { @@ -305,13 +308,23 @@ export default { }, methods: { + sortChange({ column, prop, order }) { + if (prop === 'dept') { + prop = 'deptId' + } + this.orderConditions = [] + addOrder({ field: prop, value: order }, this.orderConditions) + this.search(this.last_condition) + }, select(selection) { }, search(condition) { - condition = formatQuickCondition(condition, 'username') + this.last_condition = condition + condition = formatQuickCondition(condition, 'nick_name') const temp = formatCondition(condition) const param = temp || {} + param['orders'] = formatOrders(this.orderConditions) const { currentPage, pageSize } = this.paginationConfig userLists(currentPage, pageSize, param).then(response => { this.data = response.data.listObject From db71599447db1641768e63a78a40753a7a76ed53 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Jun 2021 14:27:47 +0800 Subject: [PATCH 12/17] =?UTF-8?q?feat:=20=E5=88=A0=E9=99=A4=E9=9D=9E?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/utils/index.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/frontend/src/utils/index.js b/frontend/src/utils/index.js index e871fcc8b5..8c281ca759 100644 --- a/frontend/src/utils/index.js +++ b/frontend/src/utils/index.js @@ -1,7 +1,4 @@ -/** - * Created by PanJiaChen on 16/11/18. - */ export function timeSection(date, type) { if (!date) { return null From af4e85e10c2383b99095b422e4a57782a7b82d16 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Jun 2021 15:14:29 +0800 Subject: [PATCH 13/17] =?UTF-8?q?fix:=20=E4=BB=AA=E8=A1=A8=E7=9B=98=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=A0=91=E7=8A=B6=E7=BB=93=E6=9E=84=E4=B8=8D?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/panel/filter/filterDialog.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/panel/filter/filterDialog.vue b/frontend/src/views/panel/filter/filterDialog.vue index 036d0da230..d8e7108096 100644 --- a/frontend/src/views/panel/filter/filterDialog.vue +++ b/frontend/src/views/panel/filter/filterDialog.vue @@ -401,7 +401,10 @@ export default { }, loadTable(sceneId) { loadTable({ sceneId: sceneId, sort: 'type asc,create_time desc,name asc' }).then(res => { - this.sceneDatas = res.data + res && res.data && (this.sceneDatas = res.data.map(tb => { + tb.type = 'db' + return tb + })) }) }, From 5871e153877965f06747706f312cc201bdde9403 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Jun 2021 15:23:06 +0800 Subject: [PATCH 14/17] =?UTF-8?q?fix:=20=E7=BB=84=E4=BB=B6=E6=A0=91?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=AE=8C=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/panel/filter/filterDialog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/panel/filter/filterDialog.vue b/frontend/src/views/panel/filter/filterDialog.vue index d8e7108096..72caacdb66 100644 --- a/frontend/src/views/panel/filter/filterDialog.vue +++ b/frontend/src/views/panel/filter/filterDialog.vue @@ -611,7 +611,7 @@ export default { } .component-result-content { - height: calc(50vh - 140px); + height: calc(50vh - 150px); overflow-y: auto; } From 34d58277ab36f8c0df339ff58bf7a45002984a5e Mon Sep 17 00:00:00 2001 From: taojinlong Date: Wed, 2 Jun 2021 15:35:03 +0800 Subject: [PATCH 15/17] =?UTF-8?q?feat:=20=E6=8A=BD=E5=8F=96=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=EF=BC=8C=E6=94=AF=E6=8C=81=E6=95=B0=E6=8D=AE=E6=BA=90?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=20column=20name=20=E4=B8=BA=E4=B8=AD?= =?UTF-8?q?=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/commons/utils/DorisTableUtils.java | 2 +- .../io/dataease/service/dataset/DataSetTableService.java | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/io/dataease/commons/utils/DorisTableUtils.java b/backend/src/main/java/io/dataease/commons/utils/DorisTableUtils.java index 4f6757bcd3..a027f10e89 100644 --- a/backend/src/main/java/io/dataease/commons/utils/DorisTableUtils.java +++ b/backend/src/main/java/io/dataease/commons/utils/DorisTableUtils.java @@ -18,7 +18,7 @@ public class DorisTableUtils { return "f_" + Md5Utils.md5(dorisName); } - public static String excelColumnName(String filedName) { + public static String columnName(String filedName) { return "C_" + Md5Utils.md5(filedName); } } diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java index 71fd2a9f7b..45b4303c4f 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -541,11 +541,7 @@ public class DataSetTableService { datasetTableField.setTableId(datasetTable.getId()); datasetTableField.setOriginName(filed.getFieldName()); datasetTableField.setName(filed.getRemarks()); - if (StringUtils.equalsIgnoreCase(datasetTable.getType(), "excel")) { - datasetTableField.setDataeaseName(DorisTableUtils.excelColumnName(filed.getFieldName())); - } else { - datasetTableField.setDataeaseName(filed.getFieldName()); - } + datasetTableField.setDataeaseName(DorisTableUtils.columnName(filed.getFieldName())); datasetTableField.setType(filed.getFieldType()); if (ObjectUtils.isEmpty(ds)) { datasetTableField.setDeType(transFieldType(filed.getFieldType())); From 47392eead83908cd9ec57b2775d37ec1c54e21de Mon Sep 17 00:00:00 2001 From: junjie Date: Wed, 2 Jun 2021 16:16:20 +0800 Subject: [PATCH 16/17] =?UTF-8?q?feat(fix):=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E9=87=8D=E5=90=AF=E6=89=A7=E8=A1=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=EF=BC=9B=E5=89=8D=E7=AB=AFform=E6=A0=A1=E9=AA=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../job/sechedule/ScheduleManager.java | 34 +++++++++++++++++-- frontend/src/views/chart/group/Group.vue | 1 + frontend/src/views/dataset/group/Group.vue | 1 + 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/dataease/job/sechedule/ScheduleManager.java b/backend/src/main/java/io/dataease/job/sechedule/ScheduleManager.java index 53a2c4852d..79f06b6784 100644 --- a/backend/src/main/java/io/dataease/job/sechedule/ScheduleManager.java +++ b/backend/src/main/java/io/dataease/job/sechedule/ScheduleManager.java @@ -2,9 +2,16 @@ package io.dataease.job.sechedule; import io.dataease.commons.utils.LogUtil; import org.quartz.*; +import org.quartz.impl.triggers.CronTriggerImpl; import org.springframework.stereotype.Component; import javax.annotation.Resource; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -73,7 +80,9 @@ public class ScheduleManager { triggerBuilder.withIdentity(triggerKey); - triggerBuilder.startAt(startTime); + if (startTime.before(new Date())) { + triggerBuilder.startAt(getNTimeByCron(cron)); + } if (endTime != null) { triggerBuilder.endAt(endTime); @@ -149,7 +158,9 @@ public class ScheduleManager { triggerBuilder.withIdentity(triggerKey);// 触发器名,触发器组 - triggerBuilder.startAt(startTime); + if (startTime.before(new Date())) { + triggerBuilder.startAt(getNTimeByCron(cron)); + } if (endTime != null) { triggerBuilder.endAt(endTime); @@ -395,4 +406,23 @@ public class ScheduleManager { return returnMap; } + + public static Date getNTimeByCron(String cron) { + try { + CronTriggerImpl cronTriggerImpl = new CronTriggerImpl(); + cronTriggerImpl.setCronExpression(cron); + Calendar calendar = Calendar.getInstance(); + Date now = calendar.getTime(); +// calendar.add(java.util.Calendar.YEAR, 1); + calendar.add(Calendar.MONTH, 2); + + List dates = TriggerUtils.computeFireTimesBetween(cronTriggerImpl, null, now, calendar.getTime()); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String nextTime = dateFormat.format(dates.get(0)); + Date date = dateFormat.parse(nextTime); + return date; + } catch (Exception e) { + throw new RuntimeException(e); + } + } } diff --git a/frontend/src/views/chart/group/Group.vue b/frontend/src/views/chart/group/Group.vue index 6e37a985d6..06d17d430f 100644 --- a/frontend/src/views/chart/group/Group.vue +++ b/frontend/src/views/chart/group/Group.vue @@ -445,6 +445,7 @@ export default { }, close() { + this.$refs['groupForm'].resetFields() this.editGroup = false this.groupForm = { name: '', diff --git a/frontend/src/views/dataset/group/Group.vue b/frontend/src/views/dataset/group/Group.vue index c41fcd43af..6aaac29707 100644 --- a/frontend/src/views/dataset/group/Group.vue +++ b/frontend/src/views/dataset/group/Group.vue @@ -458,6 +458,7 @@ export default { }, close() { + this.$refs['groupForm'].resetFields() this.editGroup = false this.groupForm = { name: '', From d6a421109e11b4b5ffff8615e666f1b8733784ac Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 2 Jun 2021 16:21:56 +0800 Subject: [PATCH 17/17] =?UTF-8?q?fix:=20=E8=BF=87=E6=BB=A4=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=BC=B9=E6=A1=86=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/styles/index.scss | 8 ++++++-- frontend/src/views/panel/edit/index.vue | 2 +- frontend/src/views/panel/filter/filterDialog.vue | 9 +++++---- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/frontend/src/styles/index.scss b/frontend/src/styles/index.scss index 44ea9d2e00..5f4cf7b031 100644 --- a/frontend/src/styles/index.scss +++ b/frontend/src/styles/index.scss @@ -90,11 +90,15 @@ div:focus { width: 50% !important; .el-dialog__header{ - background-color: #f4f4f5; + // background-color: #f4f4f5; padding: 10px 20px !important; + + .el-dialog__headerbtn { + top: 15px !important; + } } .el-dialog__body{ - padding: 1px 20px !important; + padding: 1px 15px !important; } } diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 41277a5ad9..31ffdab3af 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -127,7 +127,7 @@ :in-draw="false" /> -
+
{{ $t('commons.cancel') }} {{ $t('commons.confirm') }} diff --git a/frontend/src/views/panel/filter/filterDialog.vue b/frontend/src/views/panel/filter/filterDialog.vue index 72caacdb66..bf47ec0b71 100644 --- a/frontend/src/views/panel/filter/filterDialog.vue +++ b/frontend/src/views/panel/filter/filterDialog.vue @@ -521,7 +521,7 @@ export default { .ms-main-container { height: 100%; min-height: 400px; - + padding: 5px 10px; } .filter-field { @@ -588,13 +588,14 @@ export default { } .filter-content { - height: calc(50vh - 130px); + height: calc(50vh - 120px); top: 160px; } .filter-dialog-tabs { border: 1px solid #E6E6E6; + padding: 10px; height: 100%; >>> div.el-tabs__content { height: calc(100% - 55px); @@ -602,12 +603,12 @@ export default { } .filter-common { - margin: 10px 10px; + margin: 10px 5px; } .component-header { - margin: 20px 10px !important; + margin: 5px 5px 15px; } .component-result-content {