From 24570117bb085ea2d57ada7950b130c9e74b25fc Mon Sep 17 00:00:00 2001 From: limengnan <420004014@qq.com> Date: Fri, 11 Apr 2025 14:32:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataset/manage/DatasetGroupManage.java | 3 + core/core-frontend/config/dev.ts | 4 +- core/core-frontend/package.json | 3 +- core/core-frontend/src/api/dataset.ts | 8 +- .../src/assets/newimg/camvassvg/dv-form.svg | 1 + .../src/assets/newimg/camvassvg/dv-map.svg | 1 + .../src/assets/newimg/camvassvg/dv-media.svg | 1 + .../assets/newimg/camvassvg/dv-template.svg | 1 + .../src/assets/newimg/camvassvg/dv-text.svg | 1 + .../src/assets/newimg/camvassvg/dv-view.svg | 1 + .../src/assets/newimg/camvassvg/矩形 (2).svg | 1 + .../src/assets/newimg/dvCanvas/u101.png | Bin 0 -> 557 bytes .../src/assets/newimg/dvCanvas/u4860.png | Bin 0 -> 536 bytes .../src/assets/newimg/dvCanvas/u4867.png | Bin 0 -> 543 bytes .../src/assets/newimg/dvCanvas/u4876.png | Bin 0 -> 401 bytes .../src/assets/newimg/dvCanvas/u4884.png | Bin 0 -> 626 bytes .../src/assets/newimg/dvCanvas/u4891.png | Bin 0 -> 547 bytes .../src/assets/newimg/dvCanvas/u4905.png | Bin 0 -> 403 bytes .../src/assets/newimg/dvCanvas/u4912.png | Bin 0 -> 262 bytes .../src/assets/newimg/dvCanvas/u4919.png | Bin 0 -> 314 bytes .../data-visualization/DvToolbar.vue | 142 +- .../components/handle-more/src/HandleMore.vue | 6 +- .../visualization/ComponentButtonLabel.vue | 10 +- .../v-query/QueryConditionConfiguration.vue | 7 +- .../core-frontend/src/models/tree/TreeNode.ts | 2 + core/core-frontend/src/permission.ts | 6 +- core/core-frontend/src/router/establish.ts | 6 +- core/core-frontend/src/router/index.ts | 21 + .../src/store/modules/interactive.ts | 11 + .../src/store/modules/permission.ts | 31 +- core/core-frontend/src/style/custom-theme.css | 29 + core/core-frontend/src/style/index.less | 27 +- core/core-frontend/src/style/mixin.less | 30 + .../views/chart/components/editor/index.vue | 2 +- .../visualized/data/dataset/form/AddSql.vue | 1 + .../visualized/data/dataset/form/index.vue | 8 +- .../visualized/data/datasource/FinishPage.vue | 2 +- .../src/viewsnew/application/index.vue | 23 +- .../application/module/Leftmenu/index.vue | 54 +- .../service/dataset/DatasetDetail.vue | 60 + .../service/dataset/ExportExcel.vue | 582 +++ .../service/dataset/auth-tree/AuthTree.vue | 245 ++ .../service/dataset/auth-tree/FilterFiled.vue | 1095 +++++ .../service/dataset/auth-tree/RowAuth.vue | 327 ++ .../service/dataset/form/AddSql.vue | 1661 ++++++++ .../service/dataset/form/CalcFieldEdit.vue | 897 +++++ .../service/dataset/form/CodeMirror.vue | 156 + .../service/dataset/form/CreatDsGroup.vue | 454 +++ .../service/dataset/form/DatasetUnion.vue | 1421 +++++++ .../service/dataset/form/FieldMore.vue | 251 ++ .../service/dataset/form/UnionEdit.vue | 167 + .../service/dataset/form/UnionFieldList.vue | 200 + .../service/dataset/form/UnionItemEdit.vue | 297 ++ .../service/dataset/form/index.vue | 3588 +++++++++++++++++ .../application/service/dataset/form/util.ts | 172 + .../application/service/dataset/index.vue | 1562 +++++++ .../application/service/dataset/options.js | 38 + .../service/datasource/BaseInfoContent.vue | 86 + .../service/datasource/BaseInfoItem.vue | 35 + .../service/datasource/ExcelInfo.vue | 78 + .../service/datasource/FinishPage.vue | 176 + .../service/datasource/SheetTabs.vue | 204 + .../service/datasource/form/ApiAuthConfig.vue | 75 + .../service/datasource/form/ApiBody.vue | 286 ++ .../datasource/form/ApiHttpRequestDraw.vue | 1155 ++++++ .../datasource/form/ApiHttpRequestForm.vue | 249 ++ .../service/datasource/form/ApiKeyValue.vue | 288 ++ .../service/datasource/form/ApiTestModel.js | 154 + .../service/datasource/form/ApiVariable.vue | 345 ++ .../service/datasource/form/CodeEdit.vue | 70 + .../service/datasource/form/CreatDsGroup.vue | 494 +++ .../service/datasource/form/DsTypeList.vue | 187 + .../service/datasource/form/EditorDetail.vue | 1884 +++++++++ .../service/datasource/form/ExcelDetail.vue | 875 ++++ .../service/datasource/form/Pagination.vue | 229 ++ .../service/datasource/form/ace-config.ts | 15 + .../service/datasource/form/convert.js | 184 + .../service/datasource/form/format-utils.js | 185 + .../service/datasource/form/index.vue | 1163 ++++++ .../service/datasource/form/option.ts | 197 + .../application/service/datasource/index.vue | 2459 +++++++++++ .../viewsnew/application/service/header.vue | 104 + .../viewsnew/common/ComponentStyleEditor.vue | 56 + .../src/viewsnew/common/DeAppApply.vue | 430 ++ .../src/viewsnew/common/DeResourceArrow.vue | 83 + .../viewsnew/common/DeResourceCreateOpt.vue | 260 ++ .../viewsnew/common/DeResourceCreateOptV2.vue | 49 + .../viewsnew/common/DeResourceGroupOpt.vue | 455 +++ .../src/viewsnew/common/DeResourceTree.vue | 925 +++++ .../viewsnew/common/DeTemplatePreviewList.vue | 113 + .../src/viewsnew/common/DvDetailInfo.vue | 67 + .../viewsnew/common/MultiplexingCanvas.vue | 159 + .../dataset/union/DatasetGroupInfoDTO.java | 2 + 93 files changed, 27313 insertions(+), 79 deletions(-) create mode 100644 core/core-frontend/src/assets/newimg/camvassvg/dv-form.svg create mode 100644 core/core-frontend/src/assets/newimg/camvassvg/dv-map.svg create mode 100644 core/core-frontend/src/assets/newimg/camvassvg/dv-media.svg create mode 100644 core/core-frontend/src/assets/newimg/camvassvg/dv-template.svg create mode 100644 core/core-frontend/src/assets/newimg/camvassvg/dv-text.svg create mode 100644 core/core-frontend/src/assets/newimg/camvassvg/dv-view.svg create mode 100644 core/core-frontend/src/assets/newimg/camvassvg/矩形 (2).svg create mode 100644 core/core-frontend/src/assets/newimg/dvCanvas/u101.png create mode 100644 core/core-frontend/src/assets/newimg/dvCanvas/u4860.png create mode 100644 core/core-frontend/src/assets/newimg/dvCanvas/u4867.png create mode 100644 core/core-frontend/src/assets/newimg/dvCanvas/u4876.png create mode 100644 core/core-frontend/src/assets/newimg/dvCanvas/u4884.png create mode 100644 core/core-frontend/src/assets/newimg/dvCanvas/u4891.png create mode 100644 core/core-frontend/src/assets/newimg/dvCanvas/u4905.png create mode 100644 core/core-frontend/src/assets/newimg/dvCanvas/u4912.png create mode 100644 core/core-frontend/src/assets/newimg/dvCanvas/u4919.png create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/DatasetDetail.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/ExportExcel.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/auth-tree/AuthTree.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/auth-tree/FilterFiled.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/auth-tree/RowAuth.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/form/AddSql.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/form/CalcFieldEdit.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/form/CodeMirror.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/form/CreatDsGroup.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/form/DatasetUnion.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/form/FieldMore.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/form/UnionEdit.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/form/UnionFieldList.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/form/UnionItemEdit.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/form/index.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/form/util.ts create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/index.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/dataset/options.js create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoContent.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoItem.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/ExcelInfo.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/FinishPage.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/SheetTabs.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/ApiAuthConfig.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/ApiBody.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/ApiHttpRequestDraw.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/ApiHttpRequestForm.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/ApiKeyValue.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/ApiTestModel.js create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/ApiVariable.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/CodeEdit.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/CreatDsGroup.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/DsTypeList.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/EditorDetail.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/ExcelDetail.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/Pagination.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/ace-config.ts create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/convert.js create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/format-utils.js create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/index.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/form/option.ts create mode 100644 core/core-frontend/src/viewsnew/application/service/datasource/index.vue create mode 100644 core/core-frontend/src/viewsnew/application/service/header.vue create mode 100644 core/core-frontend/src/viewsnew/common/ComponentStyleEditor.vue create mode 100644 core/core-frontend/src/viewsnew/common/DeAppApply.vue create mode 100644 core/core-frontend/src/viewsnew/common/DeResourceArrow.vue create mode 100644 core/core-frontend/src/viewsnew/common/DeResourceCreateOpt.vue create mode 100644 core/core-frontend/src/viewsnew/common/DeResourceCreateOptV2.vue create mode 100644 core/core-frontend/src/viewsnew/common/DeResourceGroupOpt.vue create mode 100644 core/core-frontend/src/viewsnew/common/DeResourceTree.vue create mode 100644 core/core-frontend/src/viewsnew/common/DeTemplatePreviewList.vue create mode 100644 core/core-frontend/src/viewsnew/common/DvDetailInfo.vue create mode 100644 core/core-frontend/src/viewsnew/common/MultiplexingCanvas.vue diff --git a/core/core-backend/src/main/java/io/gisbi/dataset/manage/DatasetGroupManage.java b/core/core-backend/src/main/java/io/gisbi/dataset/manage/DatasetGroupManage.java index d76bbfa..3fab742 100644 --- a/core/core-backend/src/main/java/io/gisbi/dataset/manage/DatasetGroupManage.java +++ b/core/core-backend/src/main/java/io/gisbi/dataset/manage/DatasetGroupManage.java @@ -218,6 +218,9 @@ public class DatasetGroupManage { if (ObjectUtils.isNotEmpty(request.getLeaf())) { queryWrapper.eq("node_type", request.getLeaf() ? "dataset" : "folder"); } + if (ObjectUtils.isNotEmpty(request.getAppId())) { + queryWrapper.eq("app_id", request.getAppId()); + } String info = CommunityUtils.getInfo(); if (StringUtils.isNotBlank(info)) { queryWrapper.notExists(String.format(info, "core_dataset_group.id")); diff --git a/core/core-frontend/config/dev.ts b/core/core-frontend/config/dev.ts index 54e66e3..eeb8073 100644 --- a/core/core-frontend/config/dev.ts +++ b/core/core-frontend/config/dev.ts @@ -2,13 +2,13 @@ export default { server: { proxy: { '/api/f': { - target: 'http://192.168.1.16:8100', + target: 'http://192.168.1.38:8100', changeOrigin: true, rewrite: path => path.replace(/^\/api\/f/, '') }, // 使用 proxy 实例 '/api': { - target: 'http://192.168.1.16:8100', + target: 'http://192.168.1.38:8100', changeOrigin: true, rewrite: path => path.replace(/^\/api/, '') } diff --git a/core/core-frontend/package.json b/core/core-frontend/package.json index c0a2b57..8ec4bce 100644 --- a/core/core-frontend/package.json +++ b/core/core-frontend/package.json @@ -3,7 +3,7 @@ "private": true, "version": "0.0.0", "scripts": { - "dev": "cross-env NODE_OPTIONS=--max_old_space_size=4096 vite --mode dev --host 0.0.0.0", + "dev": "cross-env NODE_OPTIONS=--max_old_space_size=8196 vite --mode dev --host 0.0.0.0", "build:flush": "cd ./flushbonading && rimraf ./demo.html && npm i && node ./index.js", "ts:check": "vue-tsc --noEmit", "build:base": "cross-env NODE_OPTIONS=--max_old_space_size=4096 vite build --mode base && npm run build:flush", @@ -26,6 +26,7 @@ "@vueuse/core": "^9.13.0", "ace-builds": "^1.15.3", "axios": "^1.3.3", + "codemirror": "^6.0.1", "cross-env": "^7.0.3", "crypto-js": "^4.1.1", "dayjs": "^1.11.9", diff --git a/core/core-frontend/src/api/dataset.ts b/core/core-frontend/src/api/dataset.ts index 018e6f6..160b089 100644 --- a/core/core-frontend/src/api/dataset.ts +++ b/core/core-frontend/src/api/dataset.ts @@ -7,6 +7,7 @@ export interface DatasetOrFolder { action?: string id?: number | string pid?: number | string + appId?: number | string nodeType: 'folder' | 'dataset' union?: Array<{}> allFields?: Array<{}> @@ -151,8 +152,11 @@ export const perDelete = async (id): Promise => { }) } -export const getDatasourceList = async (weight?: number): Promise => { - const data = { busiFlag: 'datasource' } +export const getDatasourceList = async (weight: number,appId:any): Promise => { + const data = { + busiFlag: 'datasource', + appId:appId + } if (weight) { data['weight'] = weight } diff --git a/core/core-frontend/src/assets/newimg/camvassvg/dv-form.svg b/core/core-frontend/src/assets/newimg/camvassvg/dv-form.svg new file mode 100644 index 0000000..16c0584 --- /dev/null +++ b/core/core-frontend/src/assets/newimg/camvassvg/dv-form.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/core/core-frontend/src/assets/newimg/camvassvg/dv-map.svg b/core/core-frontend/src/assets/newimg/camvassvg/dv-map.svg new file mode 100644 index 0000000..290e2e3 --- /dev/null +++ b/core/core-frontend/src/assets/newimg/camvassvg/dv-map.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/core/core-frontend/src/assets/newimg/camvassvg/dv-media.svg b/core/core-frontend/src/assets/newimg/camvassvg/dv-media.svg new file mode 100644 index 0000000..f4d6cfb --- /dev/null +++ b/core/core-frontend/src/assets/newimg/camvassvg/dv-media.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/core/core-frontend/src/assets/newimg/camvassvg/dv-template.svg b/core/core-frontend/src/assets/newimg/camvassvg/dv-template.svg new file mode 100644 index 0000000..38372f9 --- /dev/null +++ b/core/core-frontend/src/assets/newimg/camvassvg/dv-template.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/core/core-frontend/src/assets/newimg/camvassvg/dv-text.svg b/core/core-frontend/src/assets/newimg/camvassvg/dv-text.svg new file mode 100644 index 0000000..36615fc --- /dev/null +++ b/core/core-frontend/src/assets/newimg/camvassvg/dv-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/core/core-frontend/src/assets/newimg/camvassvg/dv-view.svg b/core/core-frontend/src/assets/newimg/camvassvg/dv-view.svg new file mode 100644 index 0000000..02f4537 --- /dev/null +++ b/core/core-frontend/src/assets/newimg/camvassvg/dv-view.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/core/core-frontend/src/assets/newimg/camvassvg/矩形 (2).svg b/core/core-frontend/src/assets/newimg/camvassvg/矩形 (2).svg new file mode 100644 index 0000000..91b48aa --- /dev/null +++ b/core/core-frontend/src/assets/newimg/camvassvg/矩形 (2).svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/core/core-frontend/src/assets/newimg/dvCanvas/u101.png b/core/core-frontend/src/assets/newimg/dvCanvas/u101.png new file mode 100644 index 0000000000000000000000000000000000000000..6b70b8c6d87399e6273b0660396abbdd17674b61 GIT binary patch literal 557 zcmV+|0@D47P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0m4Z{K~y+Tjg!Ai zTtN`WXZGI7!QJ5%!ZiUct`KZ2`~xggq%c(!Or?ULjg?IbAw>caQU!}N0TYP$2iRCx zSR|DSLW&d$DqJDFA3HB+p*w!}-6miXeD{H2cYf{LnK#R-8l@u3hRgynP0|1;(WyG! z8E)3!a$@Z&6TgS-!|^@DJc?nSaO!4^;Z4eHegxSIzJakKTbbms!L>VV=s4I1=Fag6 zmX^V_kDby?9LKG`s~q&LW(>W+?wqZ)(~h_(ftk8RL@7Mt4?!R1*sDpBbhuKTM=7I) zzXT+8$+<7hX7eEmh@LkZjc$_XQ`oQc?GHik zZk_4}6IH8kpiQf~HFCP7#GN~$ts=^~7JOs>6NW^pEzE&jqPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0j)_yK~y+Tm6JV7 z13?gmcR~s!2`E@tSXf$E`UmVREYk=U78aH%6)fyhD5OYX5v(jMEVNUwh@fC$pIMEEXq}bzj5hYd z=e1t&;=kxG(uRxGG;UMw*cT*?u{J-{0CHwySdo6J)oPkFMb?IBZ$7P^lT-{PPC|nb z3nes?FvL|V^q~D1&J05s)& z%9F1%tfAMTsaoo-1@3%0oqp6BH&p^k;9AR>Oy-(3o*Lo`wfNOOg$!7aXNMJS@HO6d z))jX`Za&cd*%#=hrtKCB$*JA836k;zK`>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0kla(K~y+Tl~TVi zL_rXqeH4f1C?qGLP$+c%0SbwNLa$KJDHJ3c3CXo8g;t^vx#9|iMnXqI=MPXQ6z&qq zd$&9Lp2Uwevv1sScN|}`+1>eOzTIzj;jhqWkF>Ri)oL}A(Ekyo=@&V5^5ldqCqZ{(@qg_Sg5wB8C%S5YKsyg|8$y0 zye7i1B?m)?#h?{IDHfB~r9U=WQTI(r#P5NwFPdF9a0;t`A{=Q-y$Kw!m zFLnhm;*`qyDyJ~DW~)#rps%6c&M2*%GOWTj!KG$FC-y;y(}l$7b-)8@Z*mC3iS=b(_#3+y=nQ`3W7;q zI0uyg+;l#lzw%5IsPL7hMNsM{v1Uan#rrw}B62LE+}lhTh82mofO2-Iu?No<=RX_% h4P<4g)5q%!fDhUyb1)LIqbdLZ002ovPDHLkV1lln>Ouej literal 0 HcmV?d00001 diff --git a/core/core-frontend/src/assets/newimg/dvCanvas/u4876.png b/core/core-frontend/src/assets/newimg/dvCanvas/u4876.png new file mode 100644 index 0000000000000000000000000000000000000000..714be3eb2cbe782e830050a7b75c3ee58a827e99 GIT binary patch literal 401 zcmeAS@N?(olHy`uVBq!ia0vp^f*{Pn1|+R>-G2co#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!1~pF?#}Etux07~zF*}O1oxhp0@xcPNpooYi z8#Zj&az*`vsL1USCA*eXDMyuQVnEQ<+MiIveelrESt5_+&hxMfK02net*&6&&;O12 z`OKWchjxB#yd)tXcVBIC-MxqjO0g3Xnj7*e_yiV&AG;AZNwFp_@Kw+y9+!})|8`px zdoE=>XWR7E_Y-%ORc!iI22RnBlf^sSH(k{+RLhZm|NXMX^RgvvHx4FGi}g5T;tVV~fOo}&|gcbz}=H7j)QhhNj`tM$KjR7~aNiOM$L88P_|m)Xm8 tLCIV6Y(C0vTaw=$7v>!s`Jc7Hzu31lecF$=2Ebrs@O1TaS?83{1OPD?q&olr literal 0 HcmV?d00001 diff --git a/core/core-frontend/src/assets/newimg/dvCanvas/u4884.png b/core/core-frontend/src/assets/newimg/dvCanvas/u4884.png new file mode 100644 index 0000000000000000000000000000000000000000..5b32bb5c9d91728937a052859a2e58546947832a GIT binary patch literal 626 zcmV-&0*(ENP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0tZP%K~y+TjZ?pC z6hRbzZ|;51XD!BPK)a-EiHsJT8M&5ECM1H7RF9cu(3CwV8F)G6c!Re z!RCqt6f8Ul+-7%1kIU^mzc;rhUZHnivGaa@`{sMQOhA^~H8#8g=cM{GV27DrMf3Cb zc)uua5%EJ1Y>3EKRq$UhnKL5(iZT3{^1^*8tbJDHW`<6kTh}w7TlPe|y??Lgp#F0!Hf-EKEhpP5hL_=t(x7;Q^9aBv#rZ&~QIwRTbCp8N-Nepb6809Z0SCkPaS!2sGw zA7*_x9F8XRq_qJR0iRD2VuHjRC$qs+-U~*A5+i>Ah?ni5u%^ znz$Nz3LK+pm0;i6JA2NZ2!R=(VrE5gNqaFRby)b=LZk7$%1=cUML%%pw_&+(?tuvD zhw~Jx+zk~|0F4&$^R41H*u;jUZk>CgN+UP1g?|A(edx0J%h{{H0dQpdrqt7Tx&QzG M07*qoM6N<$g5dWRy8r+H literal 0 HcmV?d00001 diff --git a/core/core-frontend/src/assets/newimg/dvCanvas/u4891.png b/core/core-frontend/src/assets/newimg/dvCanvas/u4891.png new file mode 100644 index 0000000000000000000000000000000000000000..f3a33c5507e46b0f89406c6cd7fbdef610253ee5 GIT binary patch literal 547 zcmV+;0^I$HP)5r00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0k}y-K~y+TjZ!^J z98na#_qxGhXB`VIQ|2e6NMT_i#6XIGji7}>7E%OaBM3HHNk|=1g-wwze;|e6wjotW zihzxU#V%|y^FAct&fJ_gzFkD!)zi$}^Ugi*zVjXhq}U))-Ef{i7Fk|>Ii0ij?Twu{>;n^O1h4zkI6W%g>zd`R~rN_mSccBG2VA#Nueif zF0r19e!t&R)n`>nKO#keQ$XkJ4m zy)4WA#^o_48dRh&kQ^HLh?QP5=@4d{;W$xJgJWP{>w-8z(ZfZ(%~~l!zB+%>Y`$WW z4J5w;Y6#(XfjOqy8yN%~L*Q^#FGDyZgX=KHEGqLRHrl{+Pp?QASaDkDBR;p%o&*k$Ln~TEZ0|8v9{H)ziW3%khcos#gw#yuI+a%8 l>`By21s>H9+HN@`?f-&$+KSS%NRa>l002ovPDHLkV1jcu=kNdk literal 0 HcmV?d00001 diff --git a/core/core-frontend/src/assets/newimg/dvCanvas/u4905.png b/core/core-frontend/src/assets/newimg/dvCanvas/u4905.png new file mode 100644 index 0000000000000000000000000000000000000000..dc1084ae6ee485c2be9e7277285bcb8231c32444 GIT binary patch literal 403 zcmV;E0c`$>P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0VqjCK~y+T&6B-O z12GK8?WhtRBK01D$KXMDfxbfr-T-w#u(4JuNJtEftPE_O7?C<4v4GTpyEtXJi*a&M z$z9U|8$ZdCo&00x!-0}$Qjs;Kp-*G&Df~cRk3L|88wId(jwh(_Dr)mE9H)B4%tK&) zZk&5U#DNG7_t}=-(E3((!NH8Zk9Bs^)zcyjit}30`aA@`Al!qjk=+dBC;~z)K^c7E zqoR{dm1u_OGERF|evKTVZWHv7v@-@CGr(hOJZ|dxEKYaGCeT{HjkKO2!qS`fi=tS@ z=?>Whf8ie`PznyB`%TkKopaYQ+Q1Hn(Ul&M_fMW{9*1|5>ZKp<(0>Z0@IorRBP!oa x53Mwh^vhAI-@XHcm%Y{}-BPdHvUHDZ=U%pMgisv1{}>#oPrAP9QM!@+_Yft`i+0S&y!YODq`yMO=UVmlf{Oca$T<{ z-%*@iwarW9)I_b?*+041I78Mb@LalkTKV~=Ok49<&1_?HS?k-c|8VAhOm}Mxd~o(Y z(}}HdZze7inHP2T^r36YL2Hdw`KO(UKFsQx_hdsYV}-umh81_uZvr}#!PC{xWt~$( F699TFoCi^G-1*7DL z|MrLf^E$k9>(D4{nAlioH^J%vgVBS>&)4$`BtByFkU#O&C&2C|!=u*!JiUMR+~J*X zUw@6UtJ7i0hGu&m9ex%|OZkQ`j62x_co;U_XJ%zRpjFt+Tw`;m&w#njL*h?L(k|sg zXaBOCVr8Bo9uV_k{=}CC0`J|A=lqv+=;YOQFl3OhXmU8y!MfUMY63&o;e-dg49A%a z(sdI4e9u=5>Cs@|icu(S`1pAG`s import dvFilter from '@/assets/svg/dv-filter.svg' import dvMaterial from '@/assets/svg/dv-material.svg' -import dvMedia from '@/assets/svg/dv-media.svg' +import dvMedia from '@/assets/newimg/camvassvg/dv-media.svg' // 媒体 + +import dvMap from '@/assets/newimg/camvassvg/dv-map.svg' // 地图 + + import dvMoreCom from '@/assets/svg/dv-more-com.svg' import dvTab from '@/assets/svg/dv-tab.svg' -import dvText from '@/assets/svg/dv-text.svg' -import dvView from '@/assets/svg/dv-view.svg' +import dvText from '@/assets/newimg/camvassvg/dv-text.svg' // 文本 +import dvView from '@/assets/newimg/camvassvg/dv-view.svg' // echarts图表 + +import dvForm from '@/assets/newimg/camvassvg/dv-form.svg' // echarts图表 + +import dvTemplate from '@/assets/newimg/camvassvg/dv-template.svg' // 模版 + + + + +// import dvView from '@/assets/newimg/dvCanvas/u4876.png' + import icon_params_setting from '@/assets/svg/icon_params_setting.svg' import icon_copy_filled from '@/assets/svg/icon_copy_filled.svg' import icon_left_outlined from '@/assets/svg/icon_left_outlined.svg' -import icon_undo_outlined from '@/assets/svg/icon_undo_outlined.svg' -import icon_redo_outlined from '@/assets/svg/icon_redo_outlined.svg' +// import icon_undo_outlined from '@/assets/svg/icon_undo_outlined.svg' +// import icon_redo_outlined from '@/assets/svg/icon_redo_outlined.svg' import { ElMessage, ElMessageBox } from 'element-plus-secondary' import eventBus from '@/utils/eventBus' import { ref, nextTick, computed, toRefs, onBeforeUnmount, onMounted } from 'vue' @@ -327,7 +341,7 @@ const fullScreenPreview = () => { {{ dvInfo.name }} -
+
+
+ +
撤销
+
+
+ +
重做
+
+
+ + { > + + + + + + + + + + + + + + + { > - - - + @@ -406,12 +449,33 @@ const fullScreenPreview = () => { > + + + + + + + + +
@@ -508,7 +572,7 @@ const fullScreenPreview = () => { height: @top-bar-height; white-space: nowrap; overflow-x: auto; - background: #1a1a1a; + background: rgb(37,38,38); color: #ffffff; box-shadow: 0px 2px 4px 0px rgba(31, 35, 41, 0.12); display: flex; @@ -526,13 +590,18 @@ const fullScreenPreview = () => { flex-direction: column; .name-area { position: relative; - line-height: 24px; - height: 24px; + line-height: 46px; + height: 46px; font-size: 16px; width: 300px; overflow: hidden; cursor: pointer; color: @dv-canvas-main-font-color; + font-weight: 700; + font-style: normal; + font-size: 16px; + color: #F2F4F5; + input { position: absolute; left: 0; @@ -603,4 +672,35 @@ const fullScreenPreview = () => { margin-right: 20px; margin-left: 10px; } +.undo-redo{ + width: 47px; + height: 47px; + display: flex; + justify-content: center; + // items-content: center; + align-content: center; + flex-wrap: wrap; + border-radius: 3px; + cursor: pointer; + .undo-redo-text{ + width: 100%; + font-family: '微软雅黑'; + font-weight: 400; + font-style: normal; + font-size: 12px; + color: #F2F4F5; + text-align: center; + padding-top: 5px; + } + +} +.undo-redo:hover{ + background-color: rgba(54, 55, 56, 1); + } + .tabline{ + width: 1px; + height: 20px; + background-color: rgba(24, 24, 24, 1); + margin: 0px 10px; + } diff --git a/core/core-frontend/src/components/handle-more/src/HandleMore.vue b/core/core-frontend/src/components/handle-more/src/HandleMore.vue index f1fefab..3d3e5d9 100644 --- a/core/core-frontend/src/components/handle-more/src/HandleMore.vue +++ b/core/core-frontend/src/components/handle-more/src/HandleMore.vue @@ -20,7 +20,7 @@ withDefaults( inTable?: boolean }>(), { - placement: 'bottom-end', + placement: 'right-start', iconSize: '16px', inTable: false } @@ -53,9 +53,9 @@ const emit = defineEmits(['handleCommand']) :key="ele.label" :disabled="ele.disabled" > - + {{ ele.label }} diff --git a/core/core-frontend/src/components/visualization/ComponentButtonLabel.vue b/core/core-frontend/src/components/visualization/ComponentButtonLabel.vue index 47aab01..6c27534 100644 --- a/core/core-frontend/src/components/visualization/ComponentButtonLabel.vue +++ b/core/core-frontend/src/components/visualization/ComponentButtonLabel.vue @@ -21,7 +21,9 @@ const emits = defineEmits(['customClick']) - {{ title }} + + + {{ title }} @@ -34,18 +36,18 @@ const emits = defineEmits(['customClick']) } } .group_inner { - padding: 8px; + padding: 0px 10px 4px; display: flex; cursor: pointer; flex-direction: column; align-items: center; border-radius: 4px; - color: #a6a6a6; + color: #ffffff; span { float: left; font-size: 12px; - margin-top: 8px; + margin-top: 5px; line-height: 12px; } &:hover { diff --git a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue index f4ef293..dd20d23 100644 --- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue +++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue @@ -3308,7 +3308,8 @@ defineExpose({ } .query-condition-list { height: 100%; - background: #f5f6f7; + // background: #f5f6f7; + background: rgb(38,38,38); border-right: 1px solid #dee0e3; width: 208px; overflow-y: auto; @@ -3377,7 +3378,7 @@ defineExpose({ position: sticky; top: 0; justify-content: space-between; - background: #fff; + background: transparent; z-index: 5; .ed-radio { height: 20px; @@ -3497,7 +3498,7 @@ defineExpose({ position: sticky; top: 0; justify-content: space-between; - background: #fff; + background: transparent; z-index: 5; .ed-checkbox { height: 20px; diff --git a/core/core-frontend/src/models/tree/TreeNode.ts b/core/core-frontend/src/models/tree/TreeNode.ts index 8348b9b..fd1f1a6 100644 --- a/core/core-frontend/src/models/tree/TreeNode.ts +++ b/core/core-frontend/src/models/tree/TreeNode.ts @@ -1,6 +1,7 @@ export interface BusiTreeNode { id: string | number pid: string | number + appId: string | number name: string leaf?: boolean weight: number @@ -10,6 +11,7 @@ export interface BusiTreeNode { } export interface BusiTreeRequest { + appId?: string busiFlag?: string leaf?: boolean weight?: number diff --git a/core/core-frontend/src/permission.ts b/core/core-frontend/src/permission.ts index 7783acb..8dc286b 100644 --- a/core/core-frontend/src/permission.ts +++ b/core/core-frontend/src/permission.ts @@ -25,7 +25,7 @@ const { loadStart, loadDone } = usePageLoading() const whiteList = ['/login', '/de-link', '/chart-view', '/admin-login', '/401'] // 不重定向白名单 const embeddedWindowWhiteList = ['/dvCanvas', '/dashboard', '/preview', '/dataset-embedded-form'] -const embeddedRouteWhiteList = ['/dataset-embedded', '/dataset-form', '/dataset-embedded-form'] +const embeddedRouteWhiteList = ['/dataset-embedded', '/dataset-form','/datasetForm', '/dataset-embedded-form'] router.beforeEach(async (to, from, next) => { start() loadStart() @@ -138,6 +138,10 @@ router.beforeEach(async (to, from, next) => { next({ path: '/dataset-embedded-form', query: to.query }) return } + if (to.path.includes('/datasetForm')) { + next({ path: '/datasetEmbeddedForm', query: to.query }) + return + } permissionStore.setCurrentPath(to.path) next() } else if ( diff --git a/core/core-frontend/src/router/establish.ts b/core/core-frontend/src/router/establish.ts index c7e5023..fab8e5a 100644 --- a/core/core-frontend/src/router/establish.ts +++ b/core/core-frontend/src/router/establish.ts @@ -1,8 +1,12 @@ import { isExternal } from '@/utils/validate' import { cloneDeep } from 'lodash' import { XpackComponent } from '@/components/plugin' +// const modules = import.meta.glob('../viewsnew/**/*.vue') +// export const Layout = () => import('@/viewsnew/layout/index.vue') + const modules = import.meta.glob('../views/**/*.vue') export const Layout = () => import('@/layout/index.vue') + const xpackComName = 'components/plugin' export const LayoutTransition = () => import('@/layout/components/LayoutTransition.vue') // 后端控制路由生成 @@ -33,13 +37,13 @@ export const generateRoutesFn2 = (routes: AppCustomRouteRecordRaw[]): AppRouteRe meta: route.meta, props: route.props as Recordable } - if (route.component) { let comModule = null if (route.component === xpackComName) { comModule = XpackComponent } else if (!route.component.startsWith('Layout')) { comModule = modules[`../views/${route.component}/index.vue`] + // comModule = modules[`../viewsnew/${route.component}/index.vue`] } if (route.component === 'Layout') { diff --git a/core/core-frontend/src/router/index.ts b/core/core-frontend/src/router/index.ts index 66d7161..e79af10 100644 --- a/core/core-frontend/src/router/index.ts +++ b/core/core-frontend/src/router/index.ts @@ -177,6 +177,27 @@ export const routes: AppRouteRecordRaw[] = [ hidden: true, meta: {}, component: () => import('@/viewsnew/application/index.vue') + }, + { + path: '/datasetnew', + name: 'datasetnew', + hidden: true, + meta: {}, + component: () => import('@/viewsnew/application/service/dataset/index.vue') + }, + { + path: '/datasetForm', + name: 'datasetForm', + hidden: true, + meta: {}, + component: () => import('@/viewsnew/application/service/dataset/form/index.vue') + }, + { + path: '/datasourcenew', + name: 'datasourcenew', + hidden: true, + meta: {}, + component: () => import('@/viewsnew/application/service/datasource/index.vue') } ] diff --git a/core/core-frontend/src/store/modules/interactive.ts b/core/core-frontend/src/store/modules/interactive.ts index d14641a..71cb088 100644 --- a/core/core-frontend/src/store/modules/interactive.ts +++ b/core/core-frontend/src/store/modules/interactive.ts @@ -1,5 +1,7 @@ import { defineStore } from 'pinia' import { store } from '@/store' +import { ref} from 'vue' + import { queryTreeApi, queryBusiTreeApi } from '@/api/visualization/dataVisualization' import { getDatasetTree } from '@/api/dataset' import { listDatasources } from '@/api/datasource' @@ -7,6 +9,8 @@ import type { BusiTreeRequest, BusiTreeNode } from '@/models/tree/TreeNode' import { pathValid } from '@/store/modules/permission' import { useCache } from '@/hooks/web/useCache' import { useAppStoreWithOut } from '@/store/modules/app' +import { useRoute } from 'vue-router' + const appStore = useAppStoreWithOut() const { wsCache } = useCache() export interface InnerInteractive { @@ -58,6 +62,7 @@ export const interactiveStore = defineStore('interactive', { menuAuth: false } this.data[flag] = tempData + if (flag === 0) { wsCache.set('panel-weight', {}) } @@ -68,7 +73,13 @@ export const interactiveStore = defineStore('interactive', { } let res = resParam if (!resParam) { + const route = useRoute() + const appId:any = ref('') + if (route.query.id) { + appId.value = route.query.id + } const method = apiMap[flag] + param.appId = appId.value res = await method(param) } this.data[flag] = convertInteractive(res) diff --git a/core/core-frontend/src/store/modules/permission.ts b/core/core-frontend/src/store/modules/permission.ts index 94f9d00..97a75ba 100644 --- a/core/core-frontend/src/store/modules/permission.ts +++ b/core/core-frontend/src/store/modules/permission.ts @@ -46,9 +46,38 @@ export const usePermissionStore = defineStore('permission', { }, generateRoutes(routers?: AppCustomRouteRecordRaw[] | string[]): Promise { return new Promise(resolve => { + let aaaa= [{ + children: null, + component: "application", + hidden: false, + inLayout: true, + meta:{ + icon: null, + title: "平台项目" + } , + name: "application", + path: "/application", + plugin: false, + redirect: null, + top: true + },{ + children: null, + component: "visualized/view/panel", + hidden: false, + inLayout: true, + meta:{ + icon: null, + title: "仪表板" + } , + name: "panel", + path: "/panel", + plugin: false, + redirect: null, + top: true + }] + let routerMap: AppRouteRecordRaw[] = [] routerMap = generateRoutesFn2(routers as AppCustomRouteRecordRaw[]) || [] - this.addRouters = routerMap.concat([ { path: '/:catchAll(.*)', diff --git a/core/core-frontend/src/style/custom-theme.css b/core/core-frontend/src/style/custom-theme.css index 3d6b6e1..fb343bb 100644 --- a/core/core-frontend/src/style/custom-theme.css +++ b/core/core-frontend/src/style/custom-theme.css @@ -194,3 +194,32 @@ .vjs-custom-skin > .video-js .vjs-control-bar .vjs-fullscreen-control { order: 6; } + + +.ed-dialog { + --ed-dialog-bg-color: rgba(33, 33, 33, 1); +} +.ed-dialog__title{ + font-family: 'Arial Negreta', 'Arial Normal', 'Arial'; + font-weight: 700; + font-style: normal; + font-size: 16px; + color: #F2F4F5; +} + .ed-form-item__label{ + font-family: 'Arial Normal', 'Arial'; + font-weight: 400; + font-style: normal; + font-size: 14px; + color: #D2D2D2; +} +.ed-pagination__total{ + color: #fff; +} + + + +.ed-dialog__body{ + color: #fff; +} + diff --git a/core/core-frontend/src/style/index.less b/core/core-frontend/src/style/index.less index 4abbe0d..9fe2199 100644 --- a/core/core-frontend/src/style/index.less +++ b/core/core-frontend/src/style/index.less @@ -172,7 +172,7 @@ body { width: 24px !important; font-size: 16px !important; border-radius: 4px; - color: #646a73 !important; + color: #ffffff !important; &[aria-expanded='true'] { background: rgba(31, 35, 41, 0.1); @@ -671,3 +671,28 @@ strong { .ed-main{ overflow: hidden !important; } + +// 新样式 + +.ed-drawer{ + background: rgba(33, 33, 33, 1) !important; +} +.ed-drawer__footer{ + background: rgba(33, 33, 33, 1) !important; +} +.ed-dialog__body{ + color: #fff; +} +.ed-radio__label{ + color: #fff ; +} +.ed-radio__input.is-checked+.ed-radio__label{ + color: #fff !important; +} +.ed-checkbox__label{ + color: #fff !important; +} + +.ed-checkbox__label:hover{ + color: #fff ; +} \ No newline at end of file diff --git a/core/core-frontend/src/style/mixin.less b/core/core-frontend/src/style/mixin.less index e933e36..bf020a9 100644 --- a/core/core-frontend/src/style/mixin.less +++ b/core/core-frontend/src/style/mixin.less @@ -17,3 +17,33 @@ right: -@width; } } + + +:deep(.ed-pagination__total){ + color: #fff; +} +:deep(.ed-pagination__goto){ + color: #fff; +} +:deep(.ed-dialog__body){ + color: #fff; +} +:deep(.ed-checkbox__label){ + color: #fff; +} + + +:deep(.ed-radio__label){ + color: #fff ; +} +// :deep(.ed-checkbox__label){ +// color: #fff !important; +// } +// :deep(.is-checked){ +// :deep(.ed-radio__label){ +// color: #fff; +// } + +// } + + diff --git a/core/core-frontend/src/views/chart/components/editor/index.vue b/core/core-frontend/src/views/chart/components/editor/index.vue index 81ab051..0859f1f 100644 --- a/core/core-frontend/src/views/chart/components/editor/index.vue +++ b/core/core-frontend/src/views/chart/components/editor/index.vue @@ -5250,7 +5250,7 @@ span { position: relative; line-height: 24px; height: 24px; - font-size: 14px !important; + font-size: 14px; overflow: hidden; cursor: pointer; input { diff --git a/core/core-frontend/src/views/visualized/data/dataset/form/AddSql.vue b/core/core-frontend/src/views/visualized/data/dataset/form/AddSql.vue index 7cc8633..052f071 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/form/AddSql.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/form/AddSql.vue @@ -263,6 +263,7 @@ const getNodeField = ({ datasourceId, tableName }) => { } const getDatasource = () => { + debugger getDatasourceList().then(res => { const _list = (res as unknown as DataSource[]) || [] if (_list && _list.length > 0 && _list[0].id === '0') { diff --git a/core/core-frontend/src/views/visualized/data/dataset/form/index.vue b/core/core-frontend/src/views/visualized/data/dataset/form/index.vue index aa0c031..bcc2609 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/form/index.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/form/index.vue @@ -66,6 +66,11 @@ import { cloneDeep, debounce } from 'lodash-es' import { XpackComponent } from '@/components/plugin' import { iconFieldMap } from '@/components/icon-group/field-list' import { iconDatasourceMap } from '@/components/icon-group/datasource-list' +const route = useRoute() +const appId:any = ref('') +if (route.query.appId) { + appId.value = route.query.appId +} interface DragEvent extends MouseEvent { dataTransfer: DataTransfer } @@ -81,7 +86,6 @@ const { wsCache } = useCache() const appStore = useAppStoreWithOut() const embeddedStore = useEmbedded() const { t } = useI18n() -const route = useRoute() const { push } = useRouter() const quotaTableHeight = ref(238) const creatDsFolder = ref() @@ -1332,7 +1336,7 @@ const getSqlResultHeight = () => { sqlResultHeight.value = (document.querySelector('.sql-result') as HTMLElement).offsetHeight } const getDatasource = (weight?: number) => { - getDatasourceList(weight).then(res => { + getDatasourceList(weight,appId.value).then(res => { const _list = (res as unknown as DataSource[]) || [] if (_list && _list.length > 0 && _list[0].id === '0') { state.dataSourceList = dfsChild(_list[0].children) diff --git a/core/core-frontend/src/views/visualized/data/datasource/FinishPage.vue b/core/core-frontend/src/views/visualized/data/datasource/FinishPage.vue index 3cd3335..75377c7 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/FinishPage.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/FinishPage.vue @@ -66,7 +66,7 @@ const handleChange = (val: boolean) => {

{{ $t('auth.dataset') }}

-

{{ t('data_source.or_large_screen') }}

+

{{ t('data_source.or_large_screen') }}1

{{ t('data_source.go_to_create') }} diff --git a/core/core-frontend/src/viewsnew/application/index.vue b/core/core-frontend/src/viewsnew/application/index.vue index f1e8c9a..fa9b1aa 100644 --- a/core/core-frontend/src/viewsnew/application/index.vue +++ b/core/core-frontend/src/viewsnew/application/index.vue @@ -46,22 +46,22 @@ function updateClick(row:any){ paramsObj.value = row isAppPopUp.value = true } -function routerClick(item){ +function routerClick(item,path){ router.push({ - path: '/module', + path: path, query: { id: item.id } }) } -function delClick(id){ - ElMessageBox.confirm('您确定删除该项目模块及内容吗?', { +function delClick(row){ + ElMessageBox.confirm('您确定删除'+ row.name+'项目及所有模块吗?', { confirmButtonType: 'primary', type: 'warning', confirmButtonText: '确定', cancelButtonText: '取消', }).then(() => { - applicationDel(id).then(res => { + applicationDel(row.id).then(res => { if(res.data.code == '0'){ getDatasetList() ElMessage.success('删除成功') @@ -107,16 +107,17 @@ function delClick(id){
- + + - +
预览
-
模块配置
+
模块配置
@@ -284,3 +285,9 @@ function delClick(id){ cursor: pointer; } + \ No newline at end of file diff --git a/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue b/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue index 29f65b5..f8ca5f8 100644 --- a/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue +++ b/core/core-frontend/src/viewsnew/application/module/Leftmenu/index.vue @@ -423,33 +423,33 @@ function delTreeClic(){ // 删除 color: #F2F4F5; } :deep(.ed-input__wrapper){ - background-color: rgba(37, 38, 38, 1); - box-sizing: border-box; - border-width: 1px; - border-style: solid; - border-color: rgba(51, 51, 51, 0); - border-radius: 4px; - box-shadow:0 0 0 1px rgba(67, 67, 67, 1) ; - } - :deep(.ed-input__inner){ - background-color: rgba(37, 38, 38, 1); - box-sizing: border-box; - border-width: 1px; - border-style: solid; - border-color: rgba(51, 51, 51, 0); - border-radius: 4px; - color: #fff; - } - :deep(.ed-input__wrapper:hover){ - box-shadow:0 0 0 1px rgba(80, 80, 80, 1) ; - } - :deep(.ed-input.is-disabled .ed-input__wrapper){ - background-color: rgba(37, 38, 38, 0); - box-shadow:0 0 0 1px rgba(80, 80, 80, 1) ; - } - :deep(.ed-input.is-disabled .ed-input__inner){ - background-color: rgba(37, 38, 38, 0); - } + background-color: rgba(37, 38, 38, 1); + box-sizing: border-box; + border-width: 1px; + border-style: solid; + border-color: rgba(51, 51, 51, 0); + border-radius: 4px; + box-shadow:0 0 0 1px rgba(67, 67, 67, 1) ; +} +:deep(.ed-input__inner){ + background-color: rgba(37, 38, 38, 1); + box-sizing: border-box; + border-width: 1px; + border-style: solid; + border-color: rgba(51, 51, 51, 0); + border-radius: 4px; + color: #fff; +} +:deep(.ed-input__wrapper:hover){ + box-shadow:0 0 0 1px rgba(80, 80, 80, 1) ; +} +:deep(.ed-input.is-disabled .ed-input__wrapper){ + background-color: rgba(37, 38, 38, 0); + box-shadow:0 0 0 1px rgba(80, 80, 80, 1) ; +} +:deep(.ed-input.is-disabled .ed-input__inner){ + background-color: rgba(37, 38, 38, 0); +} diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/DatasetDetail.vue b/core/core-frontend/src/viewsnew/application/service/dataset/DatasetDetail.vue new file mode 100644 index 0000000..50b398e --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/DatasetDetail.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/ExportExcel.vue b/core/core-frontend/src/viewsnew/application/service/dataset/ExportExcel.vue new file mode 100644 index 0000000..013c755 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/ExportExcel.vue @@ -0,0 +1,582 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/auth-tree/AuthTree.vue b/core/core-frontend/src/viewsnew/application/service/dataset/auth-tree/AuthTree.vue new file mode 100644 index 0000000..cc42e93 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/auth-tree/AuthTree.vue @@ -0,0 +1,245 @@ + + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/auth-tree/FilterFiled.vue b/core/core-frontend/src/viewsnew/application/service/dataset/auth-tree/FilterFiled.vue new file mode 100644 index 0000000..2338c84 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/auth-tree/FilterFiled.vue @@ -0,0 +1,1095 @@ + + + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/auth-tree/RowAuth.vue b/core/core-frontend/src/viewsnew/application/service/dataset/auth-tree/RowAuth.vue new file mode 100644 index 0000000..e4b8cd8 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/auth-tree/RowAuth.vue @@ -0,0 +1,327 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/form/AddSql.vue b/core/core-frontend/src/viewsnew/application/service/dataset/form/AddSql.vue new file mode 100644 index 0000000..5f44d2d --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/form/AddSql.vue @@ -0,0 +1,1661 @@ + + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/form/CalcFieldEdit.vue b/core/core-frontend/src/viewsnew/application/service/dataset/form/CalcFieldEdit.vue new file mode 100644 index 0000000..866e5a1 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/form/CalcFieldEdit.vue @@ -0,0 +1,897 @@ + + + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/form/CodeMirror.vue b/core/core-frontend/src/viewsnew/application/service/dataset/form/CodeMirror.vue new file mode 100644 index 0000000..7f7d239 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/form/CodeMirror.vue @@ -0,0 +1,156 @@ + + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/form/CreatDsGroup.vue b/core/core-frontend/src/viewsnew/application/service/dataset/form/CreatDsGroup.vue new file mode 100644 index 0000000..da581b6 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/form/CreatDsGroup.vue @@ -0,0 +1,454 @@ + + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/form/DatasetUnion.vue b/core/core-frontend/src/viewsnew/application/service/dataset/form/DatasetUnion.vue new file mode 100644 index 0000000..1c84b31 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/form/DatasetUnion.vue @@ -0,0 +1,1421 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/form/FieldMore.vue b/core/core-frontend/src/viewsnew/application/service/dataset/form/FieldMore.vue new file mode 100644 index 0000000..5f2f8dc --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/form/FieldMore.vue @@ -0,0 +1,251 @@ + + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/form/UnionEdit.vue b/core/core-frontend/src/viewsnew/application/service/dataset/form/UnionEdit.vue new file mode 100644 index 0000000..5bc3374 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/form/UnionEdit.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/form/UnionFieldList.vue b/core/core-frontend/src/viewsnew/application/service/dataset/form/UnionFieldList.vue new file mode 100644 index 0000000..a5269c5 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/form/UnionFieldList.vue @@ -0,0 +1,200 @@ + + + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/form/UnionItemEdit.vue b/core/core-frontend/src/viewsnew/application/service/dataset/form/UnionItemEdit.vue new file mode 100644 index 0000000..3949adb --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/form/UnionItemEdit.vue @@ -0,0 +1,297 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/form/index.vue b/core/core-frontend/src/viewsnew/application/service/dataset/form/index.vue new file mode 100644 index 0000000..9aaab39 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/form/index.vue @@ -0,0 +1,3588 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/form/util.ts b/core/core-frontend/src/viewsnew/application/service/dataset/form/util.ts new file mode 100644 index 0000000..39330ec --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/form/util.ts @@ -0,0 +1,172 @@ +import { useI18n } from '@/hooks/web/useI18n' +import SnowflakeId from 'snowflake-id' +const snowflake = new SnowflakeId() + +const { t } = useI18n() + +const guid = () => { + return snowflake.generate() +} + +const timestampFormatDate = (timestamp, showMs?: boolean) => { + if (!timestamp || timestamp === -1) { + return '-' + } + + const date = new Date(timestamp) + + const y = date.getFullYear() + + let MM = date.getMonth() + 1 + MM = (MM < 10 ? '0' + MM : MM) as number + + let d = date.getDate() + d = (d < 10 ? '0' + d : d) as number + + let h = date.getHours() + h = (h < 10 ? '0' + h : h) as number + + let m = date.getMinutes() + m = (m < 10 ? '0' + m : m) as number + + let s = date.getSeconds() + s = (s < 10 ? '0' + s : s) as number + + let format = y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s + + if (showMs === true) { + const ms = date.getMilliseconds() + format += ':' + ms + } + + return format +} + +const defaultValueScopeList = [ + { label: t('dataset.scope_edit'), value: 'EDIT' }, + { label: t('dataset.scope_all'), value: 'ALLSCOPE' } +] +const fieldOptions = [ + { label: t('dataset.text'), value: 'TEXT' }, + { label: t('dataset.value'), value: 'LONG' }, + { + label: t('dataset.value') + '(' + t('dataset.float') + ')', + value: 'DOUBLE' + }, + { label: t('dataset.time_year'), value: 'DATETIME-YEAR' }, + { + label: t('dataset.time_year_month'), + value: 'DATETIME-YEAR-MONTH', + children: [ + { + value: 'YYYY-MM', + label: 'YYYY-MM' + }, + { + value: 'YYYY/MM', + label: 'YYYY/MM' + } + ] + }, + { + label: t('dataset.time_year_month_day'), + value: 'DATETIME-YEAR-MONTH-DAY', + children: [ + { + value: 'YYYY-MM-DD', + label: 'YYYY-MM-DD' + }, + { + value: 'YYYY/MM/DD', + label: 'YYYY/MM/DD' + } + ] + }, + { + label: t('dataset.time_all'), + value: 'DATETIME', + children: [ + { + value: 'YYYY-MM-DD HH:mm:ss', + label: 'YYYY-MM-DD HH:MI:SS' + }, + { + value: 'YYYY/MM/DD HH:mm:ss', + label: 'YYYY/MM/DD HH:MI:SS' + } + ] + } +] + +const getFieldName = (fields, name) => { + let n = name + n = n + '_copy' + for (let i = 0; i < fields.length; i++) { + const field = fields[i] + if (field.name === n) { + n = getFieldName(fields, n) + } + } + return n +} + +const timeTypes = [ + 'yyyy-MM-dd', + 'yyyy/MM/dd', + 'yyyy-MM-dd HH:mm:ss', + 'yyyy/MM/dd HH:mm:ss', + 'custom' +] + +type NodeType = 'db' | 'sql' +type UnionType = 'left' | 'right' | 'inner' +interface UnionField { + currentField: Field + parentField: Field +} +interface Node { + tableName: string + type: NodeType + datasourceId: string + id: string + unionType: UnionType + unionFields: UnionField[] + info: string + sqlVariableDetails: string + currentDsFields: Field[] + children?: Node[] + confirm?: boolean + isShadow?: boolean + flag?: string +} + +interface Field { + checked: boolean + deExtractType: number + deType: number + name: string + type: string + originName: string + id: string +} + +interface DataSource { + id: string + name: string + children?: DataSource[] +} + +export { + NodeType, + UnionType, + UnionField, + DataSource, + Node, + Field, + timestampFormatDate, + defaultValueScopeList, + fieldOptions, + guid, + getFieldName, + timeTypes +} diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/index.vue b/core/core-frontend/src/viewsnew/application/service/dataset/index.vue new file mode 100644 index 0000000..cc7556c --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/index.vue @@ -0,0 +1,1562 @@ + + + + + + + + \ No newline at end of file diff --git a/core/core-frontend/src/viewsnew/application/service/dataset/options.js b/core/core-frontend/src/viewsnew/application/service/dataset/options.js new file mode 100644 index 0000000..c015d8c --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/dataset/options.js @@ -0,0 +1,38 @@ +function formatEnum(ele) { + return { + value: ele, + label: `chart.filter_${ele.replace(' ', '_')}` + } +} + +function toLine(name) { + return name.replace(/([A-Z])/g, '_$1').toLowerCase() +} +const textEnum = ['eq', 'not_eq', 'like', 'not like', 'null', 'not_null', 'empty', 'not_empty'] +const textOptions = textEnum.map(formatEnum) + +const dateEnum = ['eq', 'not_eq', 'lt', 'gt', 'le', 'ge'] +const dateOptions = dateEnum.concat(['null', 'not_null']).map(formatEnum) + +const valueEnum = [...dateEnum] +const valueOptions = valueEnum.map(formatEnum) + +const sysParams = ['eq', 'not_eq', 'like', 'not like', 'in', 'not in'] +const textOptionsForSysParams = sysParams.map(formatEnum) + +const sysParamsEnum = ['userId', 'userName', 'userEmail'] + +const sysParamsIlns = sysParamsEnum.map(_ => { + return { value: `\${sysParams.${_}}`, label: `auth.sysParams_type.${toLine(_)}` } +}) + +const fieldEnums = ['text', 'time', 'value', 'value', 'value', 'location', 'binary', 'url'] + +export { + textOptions, + dateOptions, + valueOptions, + textOptionsForSysParams, + sysParamsIlns, + fieldEnums +} diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoContent.vue b/core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoContent.vue new file mode 100644 index 0000000..f424e28 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoContent.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoItem.vue b/core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoItem.vue new file mode 100644 index 0000000..777620d --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoItem.vue @@ -0,0 +1,35 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/ExcelInfo.vue b/core/core-frontend/src/viewsnew/application/service/datasource/ExcelInfo.vue new file mode 100644 index 0000000..ad2bdb6 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/ExcelInfo.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/FinishPage.vue b/core/core-frontend/src/viewsnew/application/service/datasource/FinishPage.vue new file mode 100644 index 0000000..4246f7d --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/FinishPage.vue @@ -0,0 +1,176 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/SheetTabs.vue b/core/core-frontend/src/viewsnew/application/service/datasource/SheetTabs.vue new file mode 100644 index 0000000..3866f4f --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/SheetTabs.vue @@ -0,0 +1,204 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiAuthConfig.vue b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiAuthConfig.vue new file mode 100644 index 0000000..7d7dd79 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiAuthConfig.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiBody.vue b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiBody.vue new file mode 100644 index 0000000..1f0ff8f --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiBody.vue @@ -0,0 +1,286 @@ + + + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiHttpRequestDraw.vue b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiHttpRequestDraw.vue new file mode 100644 index 0000000..fc271e6 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiHttpRequestDraw.vue @@ -0,0 +1,1155 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiHttpRequestForm.vue b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiHttpRequestForm.vue new file mode 100644 index 0000000..befa496 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiHttpRequestForm.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiKeyValue.vue b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiKeyValue.vue new file mode 100644 index 0000000..61473c1 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiKeyValue.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiTestModel.js b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiTestModel.js new file mode 100644 index 0000000..1f0347c --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiTestModel.js @@ -0,0 +1,154 @@ +export class BaseConfig { + set(options, notUndefined) { + options = this.initOptions(options) + for (const name in options) { + if (Object.prototype.hasOwnProperty.call(options, name)) { + if (!(this[name] instanceof Array)) { + if (notUndefined === true) { + this[name] = options[name] === undefined ? this[name] : options[name] + } else { + this[name] = options[name] + } + } + } + } + } + + sets(types, options) { + options = this.initOptions(options) + if (types) { + for (const name in types) { + if ( + Object.prototype.hasOwnProperty.call(types, name) && + Object.prototype.hasOwnProperty.call(options, name) + ) { + options[name].forEach(o => { + this[name].push(new types[name](o)) + }) + } + } + } + } + + initOptions(options) { + return options || {} + } + + isValid() { + return true + } +} + +export class KeyValue extends BaseConfig { + constructor(options) { + options = options || {} + options.enable = options.enable === undefined ? true : options.enable + + super() + this.name = undefined + this.value = undefined + this.type = undefined + this.files = undefined + this.enable = undefined + this.uuid = undefined + this.time = undefined + this.contentType = undefined + this.set(options) + } + + isValid() { + return (!!this.name || !!this.value) && this.type !== 'file' + } + + isFile() { + return (!!this.name || !!this.value) && this.type === 'file' + } +} + +export class Body extends BaseConfig { + constructor(options) { + super() + this.type = 'KeyValue' + this.raw = undefined + this.kvs = [] + this.binary = [] + this.set(options) + this.sets({ kvs: KeyValue }, { binary: KeyValue }, options) + } + + isValid() { + if (this.isKV()) { + return this.kvs.some(kv => { + return kv.isValid() + }) + } else { + return !!this.raw + } + } + + isKV() { + return [BODY_TYPE.FORM_DATA, BODY_TYPE.WWW_FORM, BODY_TYPE.BINARY].indexOf(this.type) > 0 + } +} + +export const BODY_TYPE = { + KV: 'KeyValue', + FORM_DATA: 'Form_Data', + RAW: 'Raw', + WWW_FORM: 'WWW_FORM', + XML: 'XML', + JSON: 'JSON' +} + +export class Scenario extends BaseConfig { + constructor(options = {}) { + super() + this.id = undefined + this.name = undefined + this.url = undefined + this.variables = [] + this.headers = [] + this.requests = [] + this.environmentId = undefined + this.dubboConfig = undefined + this.environment = undefined + this.enableCookieShare = false + this.enable = true + this.databaseConfigs = [] + this.tcpConfig = undefined + this.set(options) + this.sets( + { + variables: KeyValue, + headers: KeyValue + }, + options + ) + } + + initOptions(options = {}) { + options.databaseConfigs = options.databaseConfigs || [] + return options + } + + clone() { + const clone = new Scenario(this) + return clone + } + + isValid() { + if (this.enable) { + for (let i = 0; i < this.requests.length; i++) { + const validator = this.requests[i].isValid(this.environmentId, this.environment) + if (!validator.isValid) { + return validator + } + } + } + return { isValid: true } + } + + isReference() { + return this.id.indexOf('#') !== -1 + } +} diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiVariable.vue b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiVariable.vue new file mode 100644 index 0000000..23ec05d --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiVariable.vue @@ -0,0 +1,345 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/CodeEdit.vue b/core/core-frontend/src/viewsnew/application/service/datasource/form/CodeEdit.vue new file mode 100644 index 0000000..555f274 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/CodeEdit.vue @@ -0,0 +1,70 @@ + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/CreatDsGroup.vue b/core/core-frontend/src/viewsnew/application/service/datasource/form/CreatDsGroup.vue new file mode 100644 index 0000000..cca24f2 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/CreatDsGroup.vue @@ -0,0 +1,494 @@ + + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/DsTypeList.vue b/core/core-frontend/src/viewsnew/application/service/datasource/form/DsTypeList.vue new file mode 100644 index 0000000..4e067df --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/DsTypeList.vue @@ -0,0 +1,187 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/EditorDetail.vue b/core/core-frontend/src/viewsnew/application/service/datasource/form/EditorDetail.vue new file mode 100644 index 0000000..4959a8c --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/EditorDetail.vue @@ -0,0 +1,1884 @@ + + + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/ExcelDetail.vue b/core/core-frontend/src/viewsnew/application/service/datasource/form/ExcelDetail.vue new file mode 100644 index 0000000..a4485fa --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/ExcelDetail.vue @@ -0,0 +1,875 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/Pagination.vue b/core/core-frontend/src/viewsnew/application/service/datasource/form/Pagination.vue new file mode 100644 index 0000000..e02b84e --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/Pagination.vue @@ -0,0 +1,229 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/ace-config.ts b/core/core-frontend/src/viewsnew/application/service/datasource/form/ace-config.ts new file mode 100644 index 0000000..2cc06d5 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/ace-config.ts @@ -0,0 +1,15 @@ +import ace from 'ace-builds' +import themeChromeUrl from 'ace-builds/src-noconflict/theme-chrome?url' +ace.config.setModuleUrl('ace/theme/chrome', themeChromeUrl) + +import modeJsonUrl from 'ace-builds/src-noconflict/mode-json?url' +ace.config.setModuleUrl('ace/mode/json', modeJsonUrl) + +import modeXmlUrl from 'ace-builds/src-noconflict/mode-xml?url' +ace.config.setModuleUrl('ace/mode/xml', modeXmlUrl) + +import modeTextUrl from 'ace-builds/src-noconflict/mode-text?url' +ace.config.setModuleUrl('ace/mode/text', modeTextUrl) + +import 'ace-builds/src-noconflict/ext-language_tools' +ace.require('ace/ext/language_tools') diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/convert.js b/core/core-frontend/src/viewsnew/application/service/datasource/form/convert.js new file mode 100644 index 0000000..3331f09 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/convert.js @@ -0,0 +1,184 @@ +import { isString, isObject, isNumber, isNull, isInteger, isEmpty, isBoolean } from 'lodash-es' +const isArray = Array.isArray + +class Convert { + constructor() { + this._option = { + $id: 'http://example.com/root.json', + $schema: 'http://json-schema.org/draft-07/schema#' + } + this._object = null + } + + /** + * 转换函数 + * @param {*} object 需要转换的对象 + * @param {*} ?option 可选参数,目前只有能设置 root 节点的 $id 和 $schema + */ + format(object, option = {}) { + // 数据校验,确保传入的的object只能是对象或数组 + if (!isObject(object)) { + throw new TypeError('传入参数只能是对象或数组') + } + // 合并属性 + this._option = Object.assign(this._option, option) + // 需要转换的对象 + this._object = object + let convertRes + // 数组类型和对象类型结构不一样 + if (isArray(object)) { + convertRes = this._arrayToSchema() + } else { + convertRes = this._objectToSchema() + } + // 释放 + this._object = null + return convertRes + } + + /** + * 数组类型转换成JSONSCHEMA + */ + _arrayToSchema() { + // root节点基本信息 + const result = this._value2object(this._object, this._option.$id, '', true) + if (this._object.length > 0) { + const itemArr = [] + for (let index = 0; index < this._object.length; index++) { + // 创建items对象的基本信息 + const objectItem = this._object[index] + let item = this._value2object(objectItem, `#/items`, 'items') + if (isObject(objectItem) && !isEmpty(objectItem)) { + // 递归遍历 + const objectItemSchema = this._json2schema(objectItem, `#/items`) + // 合并对象 + item = Object.assign(item, objectItemSchema) + } + itemArr.push(item) + } + result['items'] = itemArr + } + return result + } + + /** + * 对象类型转换成JSONSCHEMA + */ + _objectToSchema() { + let baseResult = this._value2object(this._object, this._option.$id, '', true) + const objectSchema = this._json2schema(this._object) + baseResult = Object.assign(baseResult, objectSchema) + return baseResult + } + + _json2schema(object, name = '') { + // 如果递归值不是对象,那么return掉 + if (!isObject(object)) { + return + } + // 处理当前路径$id + if (name === '' || name === undefined) { + name = '#' + } + const result = {} + // 判断传入object是对象还是数组。 + if (isArray(object)) { + result.items = {} + } else { + result.properties = {} + } + // 遍历传入的对象 + for (const key in object) { + if (Object.prototype.hasOwnProperty.call(object, key)) { + const element = object[key] + // 如果只是undefined。跳过 + if (element === undefined) { + continue + } + const $id = `${name}/properties/${key}` + // 判断当前 element 的值 是否也是对象,如果是就继续递归,不是就赋值给result + if (!result['properties']) { + continue + } + if (isObject(element)) { + // 创建当前属性的基本信息 + result['properties'][key] = this._value2object(element, $id, key) + if (isArray(element)) { + // 针对空数组和有值的数组做不同处理 + if (element.length > 0) { + // 是数组 + const itemArr = [] + for (let index = 0; index < element.length; index++) { + const elementItem = element[index] + // 创建items对象的基本信息 + let item = this._value2object(elementItem, `${$id}/items`, key + 'items') + // 判断第一项是否是对象,且对象属性不为空 + if (isObject(elementItem) && !isEmpty(elementItem)) { + // 新增的properties才合并进来 + item = Object.assign(item, this._json2schema(elementItem, `${$id}/items`)) + } + itemArr.push(item) + } + result['properties'][key]['items'] = itemArr + } + } else { + // 不是数组,递归遍历获取,然后合并对象属性 + result['properties'][key] = Object.assign( + result['properties'][key], + this._json2schema(element, $id) + ) + } + } else { + // 一般属性直接获取基本信息 + if (result['properties']) { + result['properties'][key] = this._value2object(element, $id, key) + } + } + } + } + return result + } + + /** + * 把json的值转换成对象类型 + * @param {*} value + * @param {*} $id + * @param {*} key + */ + _value2object(value, $id, key = '', root = false) { + const objectTemplate = { + $id: $id, + title: `The ${key} Schema`, + mock: { + mock: value + } + } + + // 判断是否为初始化root数据 + if (root) { + objectTemplate['$schema'] = this._option.$schema + objectTemplate['title'] = `The Root Schema` + objectTemplate['mock'] = undefined + } + if (isBoolean(value)) { + objectTemplate.type = 'boolean' + } else if (isInteger(value)) { + objectTemplate.type = 'integer' + } else if (isNumber(value)) { + objectTemplate.type = 'number' + } else if (isString(value)) { + objectTemplate.type = 'string' + } else if (isNull(value)) { + objectTemplate.type = 'null' + } else if (isArray(value)) { + objectTemplate.type = 'array' + objectTemplate['mock'] = undefined + } else if (isObject(value)) { + objectTemplate.type = 'object' + objectTemplate['mock'] = undefined + } + + return objectTemplate + } +} +export default Convert diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/format-utils.js b/core/core-frontend/src/viewsnew/application/service/datasource/form/format-utils.js new file mode 100644 index 0000000..38bee39 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/format-utils.js @@ -0,0 +1,185 @@ +export function formatJson(json) { + let i = 0 + let il = 0 + const tab = ' ' + let newJson = '' + let indentLevel = 0 + let inString = false + let currentChar = null + let flag = false + for (i = 0, il = json.length; i < il; i += 1) { + currentChar = json.charAt(i) + switch (currentChar) { + case '{': + if (i !== 0 && json.charAt(i - 1) === '$') { + newJson += currentChar + flag = true + } else if (!inString) { + newJson += currentChar + '\n' + repeat(tab, indentLevel + 1) + indentLevel += 1 + } else { + newJson += currentChar + } + break + case '[': + if (!inString) { + newJson += currentChar + '\n' + repeat(tab, indentLevel + 1) + indentLevel += 1 + } else { + newJson += currentChar + } + break + case '}': + if (flag) { + newJson += currentChar + flag = false + } else if (!inString) { + indentLevel -= 1 + newJson += '\n' + repeat(tab, indentLevel) + currentChar + } else { + newJson += currentChar + } + break + case ']': + if (!inString) { + indentLevel -= 1 + newJson += '\n' + repeat(tab, indentLevel) + currentChar + } else { + newJson += currentChar + } + break + case ',': + if (!inString) { + newJson += ',\n' + repeat(tab, indentLevel) + } else { + newJson += currentChar + } + break + case ':': + if (!inString) { + newJson += ': ' + } else { + newJson += currentChar + } + break + case ' ': + case '\n': + case '\t': + if (inString) { + newJson += currentChar + } + break + case '"': + if (i > 0 && json.charAt(i - 1) !== '\\') { + inString = !inString + } + newJson += currentChar + break + default: + newJson += currentChar + break + } + } + return newJson +} + +function repeat(s, count) { + return new Array(count + 1).join(s) +} + +export function formatXml(text) { + // 去掉多余的空格 + text = + '\n' + + text.replace(/(<\w+)(\s.*?>)/g, function ($0, name, props) { + return name + ' ' + props.replace(/\s+(\w+=)/g, ' $1') + }) + // 把注释编码 + text = text.replace(//g, function ($0, text) { + var ret = '' + return ret + }) + // 调整格式 + var rgx = /\n(<(([^\?]).+?)(?:\s|\s*?>|\s*?(\/)>)(?:.*?(?:(?:(\/)>)|(?:<(\/)\2>)))?)/gm + var nodeStack = [] + var output = text.replace( + rgx, + function ($0, all, name, isBegin, isCloseFull1, isCloseFull2, isFull1, isFull2) { + var isClosed = + isCloseFull1 === '/' || isCloseFull2 === '/' || isFull1 === '/' || isFull2 === '/' + var prefix = '' + if (isBegin === '!') { + prefix = getPrefix(nodeStack.length) + } else { + if (isBegin !== '/') { + prefix = getPrefix(nodeStack.length) + if (!isClosed) { + nodeStack.push(name) + } + } else { + nodeStack.pop() + prefix = getPrefix(nodeStack.length) + } + } + var ret = '\n' + prefix + all + return ret + } + ) + var outputText = output.substring(1) + // 把注释还原并解码,调格式 + outputText = outputText.replace(/(\s*)/g, function ($0, prefix, text) { + if (prefix.charAt(0) === '\r') { + prefix = prefix.substring(1) + } + text = unescape(text).replace(/\r/g, '\n') + var ret = '\n' + prefix + '' + return ret + }) + return outputText.replace(/\s+$/g, '').replace(/\r/g, '\r\n') +} + +/** + * @param time 时间 + * @param cFormat 格式 + * @returns {string|null} 字符串 + * @example formatTime('2018-1-29', '{y}/{m}/{d} {h}:{i}:{s}') // -> 2018/01/29 00:00:00 + */ +export function formatTime(time, cFormat) { + if (arguments.length === 0) return null + if ((time + '').length === 10) { + time = +time * 1000 + } + const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}' + let date + if (typeof time === 'object') { + date = time + } else { + date = new Date(time) + } + const formatObj = { + y: date.getFullYear(), + m: date.getMonth() + 1, + d: date.getDate(), + h: date.getHours(), + i: date.getMinutes(), + s: date.getSeconds(), + a: date.getDay() + } + return format.replace(/{([ymdhisa])+}/g, (result, key) => { + let value = formatObj[key] + if (key === 'a') return ['一', '二', '三', '四', '五', '六', '日'][value - 1] + if (result.length > 0 && value < 10) { + value = '0' + value + } + return value || 0 + }) +} + +function getPrefix(prefixIndex) { + var span = ' ' + var output = [] + for (var i = 0; i < prefixIndex; ++i) { + output.push(span) + } + return output.join('') +} diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/index.vue b/core/core-frontend/src/viewsnew/application/service/datasource/form/index.vue new file mode 100644 index 0000000..a280cc6 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/index.vue @@ -0,0 +1,1163 @@ + + + + + + \ No newline at end of file diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/option.ts b/core/core-frontend/src/viewsnew/application/service/datasource/form/option.ts new file mode 100644 index 0000000..19e9afe --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/option.ts @@ -0,0 +1,197 @@ +import { useI18n } from '@/hooks/web/useI18n' +const { t } = useI18n() + +export const dsTypes = [ + { + type: 'db2', + name: 'Db2', + catalog: 'OLTP', + extraParams: '' + }, + { + type: 'mysql', + name: 'MySQL', + catalog: 'OLTP', + extraParams: + 'characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true' + }, + { + type: 'TiDB', + name: 'TiDB', + catalog: 'OLTP', + extraParams: + 'characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true' + }, + { + type: 'impala', + name: 'Apache Impala', + catalog: 'OLAP', + extraParams: 'AuthMech=0' + }, + { + type: 'mariadb', + name: 'MariaDB', + catalog: 'OLTP', + extraParams: + 'characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true' + }, + { + type: 'doris', + name: 'Apache Doris', + catalog: 'OLAP', + extraParams: + 'characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true' + }, + { + type: 'es', + name: 'Elasticsearch', + catalog: 'OLAP', + extraParams: '' + }, + { + type: 'StarRocks', + name: 'StarRocks', + catalog: 'OLAP', + extraParams: + 'characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true' + }, + { + type: 'pg', + name: 'PostgreSQL', + catalog: 'OLTP', + extraParams: '' + }, + { + type: 'sqlServer', + name: 'SQL Server', + catalog: 'OLTP', + extraParams: '' + }, + { + type: 'oracle', + name: 'Oracle', + catalog: 'OLTP', + extraParams: '', + charset: [ + 'Default', + 'GBK', + 'BIG5', + 'ISO-8859-1', + 'UTF-8', + 'UTF-16', + 'CP850', + 'EUC_JP', + 'EUC_KR' + ], + targetCharset: ['Default', 'GBK', 'UTF-8'] + }, + { + type: 'mongo', + name: 'Mongodb-BI', + catalog: 'OLTP', + extraParams: 'rebuildschema=true&authSource=admin' + }, + { + type: 'ck', + name: 'ClickHouse', + catalog: 'OLAP', + extraParams: '' + }, + { + type: 'redshift', + name: 'AWS Redshift', + catalog: 'DL', + extraParams: '' + }, + { + type: 'API', + name: 'API', + catalog: 'OTHER', + extraParams: '' + }, + { + type: 'Excel', + name: 'Excel', + catalog: 'LOCAL', + extraParams: '' + } +] + +export const typeList = ['OLTP', 'OLAP', 'DL', 'OTHER', 'LOCAL'] +export const nameMap = { + OLTP: 'OLTP', + OLAP: 'OLAP', + DL: t('datasource.dl'), + OTHER: t('data_source.api_data'), + LOCAL: t('datasource.local_file') +} + +export interface Configuration { + dataBase: string + jdbcUrl: string + urlType: string + connectionType: string + schema: string + extraParams: string + username: string + password: string + host: string + authMethod: string + port: string + initialPoolSize: string + minPoolSize: string + maxPoolSize: string + queryTimeout: string + useSSH: boolean + sshHost: string + sshPort: string + sshUserName: string + sshType: string + sshPassword: string +} + +export interface ApiConfiguration { + id: string + name: string + type: string + deTableName: string + method: string + copy: boolean + url: string + status: string + useJsonPath: boolean + serialNumber: number +} + +export interface SyncSetting { + id: string + updateType: string + syncRate: string + simpleCronValue: number + simpleCronType: string + startTime: number + endTime: number + endLimit: string + cron: string +} + +export interface Node { + name: string + createBy: string + creator: string + copy: boolean + createTime: string + id: number | string + size: number + description: string + type: string + nodeType: string + fileName: string + syncSetting?: SyncSetting + editType?: number + configuration?: Configuration + apiConfiguration?: ApiConfiguration[] + paramsConfiguration?: ApiConfiguration[] + weight?: number + lastSyncTime?: number | string +} diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/index.vue b/core/core-frontend/src/viewsnew/application/service/datasource/index.vue new file mode 100644 index 0000000..2d523c9 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/datasource/index.vue @@ -0,0 +1,2459 @@ + + + + + + + \ No newline at end of file diff --git a/core/core-frontend/src/viewsnew/application/service/header.vue b/core/core-frontend/src/viewsnew/application/service/header.vue new file mode 100644 index 0000000..32f0256 --- /dev/null +++ b/core/core-frontend/src/viewsnew/application/service/header.vue @@ -0,0 +1,104 @@ + + + + diff --git a/core/core-frontend/src/viewsnew/common/ComponentStyleEditor.vue b/core/core-frontend/src/viewsnew/common/ComponentStyleEditor.vue new file mode 100644 index 0000000..bfc40a0 --- /dev/null +++ b/core/core-frontend/src/viewsnew/common/ComponentStyleEditor.vue @@ -0,0 +1,56 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/common/DeAppApply.vue b/core/core-frontend/src/viewsnew/common/DeAppApply.vue new file mode 100644 index 0000000..75699cd --- /dev/null +++ b/core/core-frontend/src/viewsnew/common/DeAppApply.vue @@ -0,0 +1,430 @@ + + + + + + diff --git a/core/core-frontend/src/viewsnew/common/DeResourceArrow.vue b/core/core-frontend/src/viewsnew/common/DeResourceArrow.vue new file mode 100644 index 0000000..418861b --- /dev/null +++ b/core/core-frontend/src/viewsnew/common/DeResourceArrow.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/common/DeResourceCreateOpt.vue b/core/core-frontend/src/viewsnew/common/DeResourceCreateOpt.vue new file mode 100644 index 0000000..5657e68 --- /dev/null +++ b/core/core-frontend/src/viewsnew/common/DeResourceCreateOpt.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/common/DeResourceCreateOptV2.vue b/core/core-frontend/src/viewsnew/common/DeResourceCreateOptV2.vue new file mode 100644 index 0000000..34b453d --- /dev/null +++ b/core/core-frontend/src/viewsnew/common/DeResourceCreateOptV2.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/common/DeResourceGroupOpt.vue b/core/core-frontend/src/viewsnew/common/DeResourceGroupOpt.vue new file mode 100644 index 0000000..e50ae35 --- /dev/null +++ b/core/core-frontend/src/viewsnew/common/DeResourceGroupOpt.vue @@ -0,0 +1,455 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/common/DeResourceTree.vue b/core/core-frontend/src/viewsnew/common/DeResourceTree.vue new file mode 100644 index 0000000..21f2674 --- /dev/null +++ b/core/core-frontend/src/viewsnew/common/DeResourceTree.vue @@ -0,0 +1,925 @@ + + + + + + diff --git a/core/core-frontend/src/viewsnew/common/DeTemplatePreviewList.vue b/core/core-frontend/src/viewsnew/common/DeTemplatePreviewList.vue new file mode 100644 index 0000000..305fadc --- /dev/null +++ b/core/core-frontend/src/viewsnew/common/DeTemplatePreviewList.vue @@ -0,0 +1,113 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/common/DvDetailInfo.vue b/core/core-frontend/src/viewsnew/common/DvDetailInfo.vue new file mode 100644 index 0000000..cdfafe2 --- /dev/null +++ b/core/core-frontend/src/viewsnew/common/DvDetailInfo.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/core/core-frontend/src/viewsnew/common/MultiplexingCanvas.vue b/core/core-frontend/src/viewsnew/common/MultiplexingCanvas.vue new file mode 100644 index 0000000..e839928 --- /dev/null +++ b/core/core-frontend/src/viewsnew/common/MultiplexingCanvas.vue @@ -0,0 +1,159 @@ + + + + + + + diff --git a/sdk/api/api-base/src/main/java/io/gisbi/api/dataset/union/DatasetGroupInfoDTO.java b/sdk/api/api-base/src/main/java/io/gisbi/api/dataset/union/DatasetGroupInfoDTO.java index 3ff2d56..5ccaa66 100644 --- a/sdk/api/api-base/src/main/java/io/gisbi/api/dataset/union/DatasetGroupInfoDTO.java +++ b/sdk/api/api-base/src/main/java/io/gisbi/api/dataset/union/DatasetGroupInfoDTO.java @@ -23,6 +23,8 @@ public class DatasetGroupInfoDTO extends DatasetNodeDTO { private String sql; + private String appId; + private Long total; private String creator;