vue2-client 1.6.48 → 1.6.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +625 -622
  2. package/index.js +30 -30
  3. package/package.json +81 -81
  4. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +316 -316
  5. package/src/base-client/components/common/CitySelect/CitySelect.vue +247 -247
  6. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +733 -733
  7. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +508 -508
  8. package/src/base-client/components/common/FormGroupEdit/FormGroupEdit.vue +140 -140
  9. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -165
  10. package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
  11. package/src/base-client/components/common/Upload/Upload.vue +168 -168
  12. package/src/base-client/components/common/XAddForm/XAddForm.vue +325 -325
  13. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +279 -279
  14. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  15. package/src/base-client/components/common/XForm/XForm.vue +180 -180
  16. package/src/base-client/components/common/XForm/XFormItem.vue +513 -513
  17. package/src/base-client/components/common/XForm/XTreeSelect.vue +184 -184
  18. package/src/base-client/components/common/XFormCol/XFormCol.vue +38 -38
  19. package/src/base-client/components/common/XFormTable/XFormTable.vue +336 -336
  20. package/src/base-client/components/common/XFormTable/index.md +97 -97
  21. package/src/base-client/components/common/XImportExcel/XImportExcel.vue +132 -132
  22. package/src/base-client/components/common/XTable/XTable.vue +6 -5
  23. package/src/base-client/components/common/XTreeOne/XTreeOne.vue +111 -111
  24. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
  25. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +807 -807
  26. package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
  27. package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
  28. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
  29. package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
  30. package/src/base-client/plugins/AppData.js +76 -76
  31. package/src/base-client/plugins/GetLoginInfoService.js +179 -179
  32. package/src/base-client/plugins/PagedList.js +177 -177
  33. package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
  34. package/src/base-client/plugins/i18n-extend.js +32 -32
  35. package/src/components/Ellipsis/Ellipsis.vue +65 -65
  36. package/src/components/Ellipsis/index.md +38 -38
  37. package/src/components/NumberInfo/index.md +43 -43
  38. package/src/components/STable/README.md +341 -341
  39. package/src/components/STable/index.js +318 -318
  40. package/src/components/Trend/index.md +45 -45
  41. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  42. package/src/components/checkbox/ImgCheckbox.vue +163 -163
  43. package/src/components/exception/ExceptionPage.vue +70 -70
  44. package/src/components/form/FormRow.vue +52 -52
  45. package/src/components/index.js +36 -36
  46. package/src/components/menu/SideMenu.vue +62 -62
  47. package/src/components/menu/menu.js +273 -273
  48. package/src/components/page/header/index.less +40 -40
  49. package/src/components/setting/Setting.vue +235 -235
  50. package/src/components/table/StandardTable.vue +141 -141
  51. package/src/components/table/advance/ActionColumns.vue +158 -158
  52. package/src/components/table/advance/SearchArea.vue +355 -355
  53. package/src/components/tool/AStepItem.vue +60 -60
  54. package/src/components/tool/AvatarList.vue +68 -68
  55. package/src/components/tool/Drawer.vue +142 -142
  56. package/src/components/tool/TagSelect.vue +83 -83
  57. package/src/components/transition/PageToggleTransition.vue +97 -97
  58. package/src/config/CreateQueryConfig.js +307 -307
  59. package/src/config/default/admin.config.js +18 -18
  60. package/src/config/default/setting.config.js +46 -46
  61. package/src/config/replacer/resolve.config.js +67 -67
  62. package/src/layouts/CommonLayout.vue +42 -42
  63. package/src/layouts/ComponentLayoutOne.vue +47 -47
  64. package/src/layouts/PageLayout.vue +151 -151
  65. package/src/layouts/SinglePageView.vue +116 -116
  66. package/src/layouts/footer/PageFooter.vue +49 -49
  67. package/src/layouts/header/AdminHeader.vue +134 -134
  68. package/src/layouts/header/HeaderAvatar.vue +64 -64
  69. package/src/layouts/header/HeaderNotice.vue +176 -176
  70. package/src/layouts/header/HeaderSearch.vue +67 -67
  71. package/src/layouts/header/InstitutionDetail.vue +181 -181
  72. package/src/layouts/header/index.less +92 -92
  73. package/src/layouts/tabs/TabsHead.vue +190 -190
  74. package/src/layouts/tabs/TabsView.vue +379 -379
  75. package/src/mock/goods/index.js +108 -108
  76. package/src/pages/login/Login.vue +369 -366
  77. package/src/pages/report/ReportTable.js +124 -124
  78. package/src/pages/report/ReportTableHome.vue +28 -28
  79. package/src/pages/resourceManage/orgListManage.vue +98 -98
  80. package/src/pages/system/file/index.vue +317 -317
  81. package/src/pages/system/settings/index.vue +126 -126
  82. package/src/pages/system/settings/modifyPassword.vue +109 -109
  83. package/src/router/async/config.async.js +28 -28
  84. package/src/router/async/router.map.js +68 -68
  85. package/src/router/index.js +27 -27
  86. package/src/services/api/DictionaryDetailsViewApi.js +6 -6
  87. package/src/services/api/LogDetailsViewApi.js +10 -10
  88. package/src/services/api/QueryParamsDetailsViewApi.js +6 -6
  89. package/src/services/api/TicketDetailsViewApi.js +34 -34
  90. package/src/services/api/cas.js +79 -79
  91. package/src/services/api/common.js +9 -0
  92. package/src/services/api/commonTempTable.js +10 -10
  93. package/src/services/api/index.js +17 -17
  94. package/src/services/api/logininfor/index.js +6 -6
  95. package/src/services/api/manage.js +8 -8
  96. package/src/services/apiService.js +14 -14
  97. package/src/services/user.js +67 -67
  98. package/src/store/modules/index.js +4 -4
  99. package/src/theme/default/nprogress.less +76 -76
  100. package/src/theme/default/style.less +58 -58
  101. package/src/utils/EncryptUtil.js +53 -53
  102. package/src/utils/colors.js +107 -107
  103. package/src/utils/excel/Blob.js +180 -180
  104. package/src/utils/excel/Export2Excel.js +141 -141
  105. package/src/utils/formatter.js +68 -68
  106. package/src/utils/i18n.js +80 -80
  107. package/src/utils/map-utils.js +37 -37
  108. package/src/utils/theme-color-replacer-extend.js +91 -91
  109. package/src/utils/themeUtil.js +100 -100
  110. package/src/utils/util.js +230 -230
  111. package/vue.config.js +106 -106
@@ -1,76 +1,76 @@
1
- @import '~ant-design-vue/lib/style/themes/default';
2
-
3
- /* Make clicks pass-through */
4
- #nprogress {
5
- pointer-events: none;
6
- }
7
-
8
- #nprogress .bar {
9
- background: @primary-color;
10
-
11
- position: fixed;
12
- z-index: 1031;
13
- top: 0;
14
- left: 0;
15
-
16
- width: 100%;
17
- height: 2px;
18
- }
19
-
20
- /* Fancy blur effect */
21
- #nprogress .peg {
22
- display: block;
23
- position: absolute;
24
- right: 0;
25
- width: 100px;
26
- height: 100%;
27
- box-shadow: 0 0 10px @primary-color, 0 0 5px @primary-color;
28
- opacity: 1.0;
29
-
30
- -webkit-transform: rotate(3deg) translate(0px, -4px);
31
- -ms-transform: rotate(3deg) translate(0px, -4px);
32
- transform: rotate(3deg) translate(0px, -4px);
33
- }
34
-
35
- /* Remove these to get rid of the spinner */
36
- #nprogress .spinner {
37
- display: block;
38
- position: fixed;
39
- z-index: 1031;
40
- top: 15px;
41
- right: 15px;
42
- }
43
-
44
- #nprogress .spinner-icon {
45
- width: 18px;
46
- height: 18px;
47
- box-sizing: border-box;
48
-
49
- border: solid 2px transparent;
50
- border-top-color: @primary-color;
51
- border-left-color: @primary-color;
52
- border-radius: 50%;
53
-
54
- -webkit-animation: nprogress-spinner 400ms linear infinite;
55
- animation: nprogress-spinner 400ms linear infinite;
56
- }
57
-
58
- .nprogress-custom-parent {
59
- overflow: hidden;
60
- position: relative;
61
- }
62
-
63
- .nprogress-custom-parent #nprogress .spinner,
64
- .nprogress-custom-parent #nprogress .bar {
65
- position: absolute;
66
- }
67
-
68
- @-webkit-keyframes nprogress-spinner {
69
- 0% { -webkit-transform: rotate(0deg); }
70
- 100% { -webkit-transform: rotate(360deg); }
71
- }
72
- @keyframes nprogress-spinner {
73
- 0% { transform: rotate(0deg); }
74
- 100% { transform: rotate(360deg); }
75
- }
76
-
1
+ @import '~ant-design-vue/lib/style/themes/default';
2
+
3
+ /* Make clicks pass-through */
4
+ #nprogress {
5
+ pointer-events: none;
6
+ }
7
+
8
+ #nprogress .bar {
9
+ background: @primary-color;
10
+
11
+ position: fixed;
12
+ z-index: 1031;
13
+ top: 0;
14
+ left: 0;
15
+
16
+ width: 100%;
17
+ height: 2px;
18
+ }
19
+
20
+ /* Fancy blur effect */
21
+ #nprogress .peg {
22
+ display: block;
23
+ position: absolute;
24
+ right: 0;
25
+ width: 100px;
26
+ height: 100%;
27
+ box-shadow: 0 0 10px @primary-color, 0 0 5px @primary-color;
28
+ opacity: 1.0;
29
+
30
+ -webkit-transform: rotate(3deg) translate(0px, -4px);
31
+ -ms-transform: rotate(3deg) translate(0px, -4px);
32
+ transform: rotate(3deg) translate(0px, -4px);
33
+ }
34
+
35
+ /* Remove these to get rid of the spinner */
36
+ #nprogress .spinner {
37
+ display: block;
38
+ position: fixed;
39
+ z-index: 1031;
40
+ top: 15px;
41
+ right: 15px;
42
+ }
43
+
44
+ #nprogress .spinner-icon {
45
+ width: 18px;
46
+ height: 18px;
47
+ box-sizing: border-box;
48
+
49
+ border: solid 2px transparent;
50
+ border-top-color: @primary-color;
51
+ border-left-color: @primary-color;
52
+ border-radius: 50%;
53
+
54
+ -webkit-animation: nprogress-spinner 400ms linear infinite;
55
+ animation: nprogress-spinner 400ms linear infinite;
56
+ }
57
+
58
+ .nprogress-custom-parent {
59
+ overflow: hidden;
60
+ position: relative;
61
+ }
62
+
63
+ .nprogress-custom-parent #nprogress .spinner,
64
+ .nprogress-custom-parent #nprogress .bar {
65
+ position: absolute;
66
+ }
67
+
68
+ @-webkit-keyframes nprogress-spinner {
69
+ 0% { -webkit-transform: rotate(0deg); }
70
+ 100% { -webkit-transform: rotate(360deg); }
71
+ }
72
+ @keyframes nprogress-spinner {
73
+ 0% { transform: rotate(0deg); }
74
+ 100% { transform: rotate(360deg); }
75
+ }
76
+
@@ -1,58 +1,58 @@
1
- .week-mode{
2
- overflow: hidden;
3
- filter: invert(80%);
4
- }
5
- .beauty-scroll{
6
- scrollbar-color: @primary-color @primary-2;
7
- scrollbar-width: thin;
8
- -ms-overflow-style:none;
9
- position: relative;
10
- &::-webkit-scrollbar{
11
- width: 3px;
12
- height: 1px;
13
- }
14
- &::-webkit-scrollbar-thumb {
15
- border-radius: 3px;
16
- background: @primary-color;
17
- }
18
- &::-webkit-scrollbar-track {
19
- -webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
20
- border-radius: 3px;
21
- background: @primary-3;
22
- }
23
- }
24
- .split-right{
25
- &:not(:last-child) {
26
- border-right: 1px solid rgba(98, 98, 98, 0.2);
27
- }
28
- }
29
- .disabled{
30
- cursor: not-allowed;
31
- color: @disabled-color;
32
- pointer-events: none;
33
- }
34
-
35
- // 美化滚动条
36
- ::-webkit-scrollbar{
37
- height: 9px;
38
- width: 9px;
39
- }
40
-
41
- ::-webkit-scrollbar-thumb {
42
- border-radius: 10px;
43
- background: @primary-3;
44
- border-style: dashed;
45
- border-color: transparent;
46
- border-width: 2px;
47
- background-clip: padding-box;
48
- }
49
-
50
- ::-webkit-scrollbar-track {
51
- -webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
52
- border-radius: 10px;
53
- background: @primary-1;
54
- }
55
-
56
- ::-webkit-scrollbar-thumb:hover {
57
- background: @primary-3;
58
- }
1
+ .week-mode{
2
+ overflow: hidden;
3
+ filter: invert(80%);
4
+ }
5
+ .beauty-scroll{
6
+ scrollbar-color: @primary-color @primary-2;
7
+ scrollbar-width: thin;
8
+ -ms-overflow-style:none;
9
+ position: relative;
10
+ &::-webkit-scrollbar{
11
+ width: 3px;
12
+ height: 1px;
13
+ }
14
+ &::-webkit-scrollbar-thumb {
15
+ border-radius: 3px;
16
+ background: @primary-color;
17
+ }
18
+ &::-webkit-scrollbar-track {
19
+ -webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
20
+ border-radius: 3px;
21
+ background: @primary-3;
22
+ }
23
+ }
24
+ .split-right{
25
+ &:not(:last-child) {
26
+ border-right: 1px solid rgba(98, 98, 98, 0.2);
27
+ }
28
+ }
29
+ .disabled{
30
+ cursor: not-allowed;
31
+ color: @disabled-color;
32
+ pointer-events: none;
33
+ }
34
+
35
+ // 美化滚动条
36
+ ::-webkit-scrollbar{
37
+ height: 9px;
38
+ width: 9px;
39
+ }
40
+
41
+ ::-webkit-scrollbar-thumb {
42
+ border-radius: 10px;
43
+ background: @primary-3;
44
+ border-style: dashed;
45
+ border-color: transparent;
46
+ border-width: 2px;
47
+ background-clip: padding-box;
48
+ }
49
+
50
+ ::-webkit-scrollbar-track {
51
+ -webkit-box-shadow: inset 0 0 1px rgba(0,0,0,0);
52
+ border-radius: 10px;
53
+ background: @primary-1;
54
+ }
55
+
56
+ ::-webkit-scrollbar-thumb:hover {
57
+ background: @primary-3;
58
+ }
@@ -1,53 +1,53 @@
1
- import AesEncryptJS from 'crypto-js'
2
- import RsaEncryptJS from 'jsencrypt'
3
-
4
- export default {
5
- /**
6
- * AES加密
7
- * @param word
8
- * @returns {*}
9
- */
10
- AESEncrypt (word, encryKey) {
11
- const key = AesEncryptJS.enc.Utf8.parse(encryKey)
12
- const srcs = AesEncryptJS.enc.Utf8.parse(word)
13
- const encrypted = AesEncryptJS.AES.encrypt(srcs, key, { mode: AesEncryptJS.mode.ECB, padding: AesEncryptJS.pad.Pkcs7 })
14
- return encrypted.toString()
15
- },
16
- /**
17
- * AES解密
18
- * @param word
19
- * @returns {*}
20
- */
21
- AESDecrypt (word, encryKey) {
22
- const key = AesEncryptJS.enc.Utf8.parse(encryKey)
23
- const decrypt = AesEncryptJS.AES.decrypt(word, key, { mode: AesEncryptJS.mode.ECB, padding: AesEncryptJS.pad.Pkcs7 })
24
- const ret = AesEncryptJS.enc.Utf8.stringify(decrypt).toString()
25
- try {
26
- return JSON.parse(ret)
27
- } catch (e) {
28
- return ret
29
- }
30
- },
31
- /**
32
- * RSA加密
33
- * @param word
34
- * @returns {*}
35
- */
36
- RSAEncrypt (word) {
37
- const encrypt = new RsaEncryptJS()
38
- encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB')
39
- const resdata = encrypt.encrypt(word)
40
- return resdata.toString()
41
- },
42
- /**
43
- * RSA解密
44
- * @param word
45
- * @returns {*}
46
- */
47
- RSADecrypt (word) {
48
- const encrypt = new RsaEncryptJS()
49
- encrypt.setPrivateKey('MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKo++i9J9dzAFtbxwowKDCo2mxi7MXxE8A8VvssaydWjjgmEz/HHMPLOhi1182a1si4pWL0/MizKnquD7T2Bu4jpQbAFnkNYEMEyq/kw904Xl0JCQHYFuvnI99RE8Q3KlTP6kEUGDjV34EL6vBGJcQvArLtj1xoP8y0nIfJ2Pw5TAgMBAAECgYAGGB8IllMwxceLhjf6n1l0IWRH7FuHIUieoZ6k0p6rASHSgWiYNRMxfecbtX8zDAoG0QAWNi7rn40ygpR5gS1fWDAKhmnhKgQIT6wW0VmD4hraaeyP78iy8BLhlvblri2nCPIhDH5+l96v7D47ZZi3ZSOzcj89s1eS/k7/N4peEQJBAPEtGGJY+lBoCxQMhGyzuzDmgcS1Un1ZE2pt+XNCVl2b+T8fxWJH3tRRR8wOY5uvtPiK1HM/IjT0T5qwQeH8Yk0CQQC0tcv3d/bDb7bOe9QzUFDQkUSpTdPWAgMX2OVPxjdq3Sls9oA5+fGNYEy0OgyqTjde0b4iRzlD1O0OhLqPSUMfAkEAh5FIvqezdRU2/PsYSR4yoAdCdLdT+h/jGRVefhqQ/6eYUJJkWp15tTFHQX3pIe9/s6IeT/XyHYAjaxmevxAmlQJBAKSdhvQjf9KAjZKDEsa7vyJ/coCXuQUWSCMNHbcR5aGfXgE4e45UtUoIE1eKGcd6AM6LWhx3rR6xdFDpb9je8BkCQB0SpevGfOQkMk5i8xkEt9eeYP0fi8nv6eOUcK96EXbzs4jV2SAoQJ9oJegPtPROHbhIvVUmNQTbuP10Yjg59+8=')
50
- const resdata = encrypt.decrypt(word)
51
- return JSON.parse(resdata.toString())
52
- },
53
- }
1
+ import AesEncryptJS from 'crypto-js'
2
+ import RsaEncryptJS from 'jsencrypt'
3
+
4
+ export default {
5
+ /**
6
+ * AES加密
7
+ * @param word
8
+ * @returns {*}
9
+ */
10
+ AESEncrypt (word, encryKey) {
11
+ const key = AesEncryptJS.enc.Utf8.parse(encryKey)
12
+ const srcs = AesEncryptJS.enc.Utf8.parse(word)
13
+ const encrypted = AesEncryptJS.AES.encrypt(srcs, key, { mode: AesEncryptJS.mode.ECB, padding: AesEncryptJS.pad.Pkcs7 })
14
+ return encrypted.toString()
15
+ },
16
+ /**
17
+ * AES解密
18
+ * @param word
19
+ * @returns {*}
20
+ */
21
+ AESDecrypt (word, encryKey) {
22
+ const key = AesEncryptJS.enc.Utf8.parse(encryKey)
23
+ const decrypt = AesEncryptJS.AES.decrypt(word, key, { mode: AesEncryptJS.mode.ECB, padding: AesEncryptJS.pad.Pkcs7 })
24
+ const ret = AesEncryptJS.enc.Utf8.stringify(decrypt).toString()
25
+ try {
26
+ return JSON.parse(ret)
27
+ } catch (e) {
28
+ return ret
29
+ }
30
+ },
31
+ /**
32
+ * RSA加密
33
+ * @param word
34
+ * @returns {*}
35
+ */
36
+ RSAEncrypt (word) {
37
+ const encrypt = new RsaEncryptJS()
38
+ encrypt.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqPvovSfXcwBbW8cKMCgwqNpsYuzF8RPAPFb7LGsnVo44JhM/xxzDyzoYtdfNmtbIuKVi9PzIsyp6rg+09gbuI6UGwBZ5DWBDBMqv5MPdOF5dCQkB2Bbr5yPfURPENypUz+pBFBg41d+BC+rwRiXELwKy7Y9caD/MtJyHydj8OUwIDAQAB')
39
+ const resdata = encrypt.encrypt(word)
40
+ return resdata.toString()
41
+ },
42
+ /**
43
+ * RSA解密
44
+ * @param word
45
+ * @returns {*}
46
+ */
47
+ RSADecrypt (word) {
48
+ const encrypt = new RsaEncryptJS()
49
+ encrypt.setPrivateKey('MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAKo++i9J9dzAFtbxwowKDCo2mxi7MXxE8A8VvssaydWjjgmEz/HHMPLOhi1182a1si4pWL0/MizKnquD7T2Bu4jpQbAFnkNYEMEyq/kw904Xl0JCQHYFuvnI99RE8Q3KlTP6kEUGDjV34EL6vBGJcQvArLtj1xoP8y0nIfJ2Pw5TAgMBAAECgYAGGB8IllMwxceLhjf6n1l0IWRH7FuHIUieoZ6k0p6rASHSgWiYNRMxfecbtX8zDAoG0QAWNi7rn40ygpR5gS1fWDAKhmnhKgQIT6wW0VmD4hraaeyP78iy8BLhlvblri2nCPIhDH5+l96v7D47ZZi3ZSOzcj89s1eS/k7/N4peEQJBAPEtGGJY+lBoCxQMhGyzuzDmgcS1Un1ZE2pt+XNCVl2b+T8fxWJH3tRRR8wOY5uvtPiK1HM/IjT0T5qwQeH8Yk0CQQC0tcv3d/bDb7bOe9QzUFDQkUSpTdPWAgMX2OVPxjdq3Sls9oA5+fGNYEy0OgyqTjde0b4iRzlD1O0OhLqPSUMfAkEAh5FIvqezdRU2/PsYSR4yoAdCdLdT+h/jGRVefhqQ/6eYUJJkWp15tTFHQX3pIe9/s6IeT/XyHYAjaxmevxAmlQJBAKSdhvQjf9KAjZKDEsa7vyJ/coCXuQUWSCMNHbcR5aGfXgE4e45UtUoIE1eKGcd6AM6LWhx3rR6xdFDpb9je8BkCQB0SpevGfOQkMk5i8xkEt9eeYP0fi8nv6eOUcK96EXbzs4jV2SAoQJ9oJegPtPROHbhIvVUmNQTbuP10Yjg59+8=')
50
+ const resdata = encrypt.decrypt(word)
51
+ return JSON.parse(resdata.toString())
52
+ },
53
+ }
@@ -1,107 +1,107 @@
1
- const varyColor = require('webpack-theme-color-replacer/client/varyColor')
2
- const { generate } = require('@ant-design/colors')
3
- const { ADMIN, ANTD } = require('../config/default')
4
- const Config = require('../config')
5
-
6
- const themeMode = ADMIN.theme.mode
7
-
8
- // 获取 ant design 色系
9
- function getAntdColors (color, mode) {
10
- const options = mode && (mode === themeMode.NIGHT) ? { theme: 'dark' } : undefined
11
- return generate(color, options)
12
- }
13
-
14
- // 获取功能性颜色
15
- function getFunctionalColors (mode) {
16
- const options = mode && (mode === themeMode.NIGHT) ? { theme: 'dark' } : undefined
17
- let { success, warning, error } = ANTD.primary
18
- const { success: s1, warning: w1, error: e1 } = Config.theme
19
- success = success && s1
20
- warning = success && w1
21
- error = success && e1
22
- const successColors = generate(success, options)
23
- const warningColors = generate(warning, options)
24
- const errorColors = generate(error, options)
25
- return {
26
- success: successColors,
27
- warning: warningColors,
28
- error: errorColors
29
- }
30
- }
31
-
32
- // 获取菜单色系
33
- function getMenuColors (color, mode) {
34
- if (mode === themeMode.NIGHT) {
35
- return ANTD.primary.night.menuColors
36
- } else if (color === ANTD.primary.color) {
37
- return ANTD.primary.dark.menuColors
38
- } else {
39
- if (color === '#507CAD') {
40
- return [varyColor.darken(color, 0.33), color, color]
41
- } else {
42
- return [varyColor.darken(color, 0.93), varyColor.darken(color, 0.83), varyColor.darken(color, 0.73)]
43
- }
44
- }
45
- }
46
-
47
- // 获取主题模式切换色系
48
- function getThemeToggleColors (color, mode) {
49
- // 主色系
50
- const mainColors = getAntdColors(color, mode)
51
- const primary = mainColors[5]
52
- // 辅助色系,因为 antd 目前没针对夜间模式设计,所以增加辅助色系以保证夜间模式的正常切换
53
- const subColors = getAntdColors(primary, themeMode.LIGHT)
54
- // 菜单色系
55
- const menuColors = getMenuColors(color, mode)
56
- // 内容色系(包含背景色、文字颜色等)
57
- const themeCfg = ANTD.theme[mode]
58
- let contentColors = Object.keys(themeCfg)
59
- .map(key => themeCfg[key])
60
- .map(color => isHex(color) ? color : toNum3(color).join(','))
61
- // 内容色去重
62
- contentColors = [...new Set(contentColors)]
63
- // rgb 格式的主题色
64
- const rgbColors = [toNum3(primary).join(',')]
65
- const functionalColors = getFunctionalColors(mode)
66
- return { primary, mainColors, subColors, menuColors, contentColors, rgbColors, functionalColors }
67
- }
68
-
69
- function toNum3 (color) {
70
- if (isHex(color)) {
71
- return varyColor.toNum3(color)
72
- }
73
- let colorStr = ''
74
- if (isRgb(color)) {
75
- colorStr = color.slice(5, color.length)
76
- } else if (isRgba(color)) {
77
- colorStr = color.slice(6, color.lastIndexOf(','))
78
- }
79
- const rgb = colorStr.split(',')
80
- const r = parseInt(rgb[0])
81
- const g = parseInt(rgb[1])
82
- const b = parseInt(rgb[2])
83
- return [r, g, b]
84
- }
85
-
86
- function isHex (color) {
87
- return color.length >= 4 && color[0] === '#'
88
- }
89
-
90
- function isRgb (color) {
91
- return color.length >= 10 && color.slice(0, 3) === 'rgb'
92
- }
93
-
94
- function isRgba (color) {
95
- return color.length >= 13 && color.slice(0, 4) === 'rgba'
96
- }
97
-
98
- module.exports = {
99
- isHex,
100
- isRgb,
101
- isRgba,
102
- toNum3,
103
- getAntdColors,
104
- getMenuColors,
105
- getThemeToggleColors,
106
- getFunctionalColors
107
- }
1
+ const varyColor = require('webpack-theme-color-replacer/client/varyColor')
2
+ const { generate } = require('@ant-design/colors')
3
+ const { ADMIN, ANTD } = require('../config/default')
4
+ const Config = require('../config')
5
+
6
+ const themeMode = ADMIN.theme.mode
7
+
8
+ // 获取 ant design 色系
9
+ function getAntdColors (color, mode) {
10
+ const options = mode && (mode === themeMode.NIGHT) ? { theme: 'dark' } : undefined
11
+ return generate(color, options)
12
+ }
13
+
14
+ // 获取功能性颜色
15
+ function getFunctionalColors (mode) {
16
+ const options = mode && (mode === themeMode.NIGHT) ? { theme: 'dark' } : undefined
17
+ let { success, warning, error } = ANTD.primary
18
+ const { success: s1, warning: w1, error: e1 } = Config.theme
19
+ success = success && s1
20
+ warning = success && w1
21
+ error = success && e1
22
+ const successColors = generate(success, options)
23
+ const warningColors = generate(warning, options)
24
+ const errorColors = generate(error, options)
25
+ return {
26
+ success: successColors,
27
+ warning: warningColors,
28
+ error: errorColors
29
+ }
30
+ }
31
+
32
+ // 获取菜单色系
33
+ function getMenuColors (color, mode) {
34
+ if (mode === themeMode.NIGHT) {
35
+ return ANTD.primary.night.menuColors
36
+ } else if (color === ANTD.primary.color) {
37
+ return ANTD.primary.dark.menuColors
38
+ } else {
39
+ if (color === '#507CAD') {
40
+ return [varyColor.darken(color, 0.33), color, color]
41
+ } else {
42
+ return [varyColor.darken(color, 0.93), varyColor.darken(color, 0.83), varyColor.darken(color, 0.73)]
43
+ }
44
+ }
45
+ }
46
+
47
+ // 获取主题模式切换色系
48
+ function getThemeToggleColors (color, mode) {
49
+ // 主色系
50
+ const mainColors = getAntdColors(color, mode)
51
+ const primary = mainColors[5]
52
+ // 辅助色系,因为 antd 目前没针对夜间模式设计,所以增加辅助色系以保证夜间模式的正常切换
53
+ const subColors = getAntdColors(primary, themeMode.LIGHT)
54
+ // 菜单色系
55
+ const menuColors = getMenuColors(color, mode)
56
+ // 内容色系(包含背景色、文字颜色等)
57
+ const themeCfg = ANTD.theme[mode]
58
+ let contentColors = Object.keys(themeCfg)
59
+ .map(key => themeCfg[key])
60
+ .map(color => isHex(color) ? color : toNum3(color).join(','))
61
+ // 内容色去重
62
+ contentColors = [...new Set(contentColors)]
63
+ // rgb 格式的主题色
64
+ const rgbColors = [toNum3(primary).join(',')]
65
+ const functionalColors = getFunctionalColors(mode)
66
+ return { primary, mainColors, subColors, menuColors, contentColors, rgbColors, functionalColors }
67
+ }
68
+
69
+ function toNum3 (color) {
70
+ if (isHex(color)) {
71
+ return varyColor.toNum3(color)
72
+ }
73
+ let colorStr = ''
74
+ if (isRgb(color)) {
75
+ colorStr = color.slice(5, color.length)
76
+ } else if (isRgba(color)) {
77
+ colorStr = color.slice(6, color.lastIndexOf(','))
78
+ }
79
+ const rgb = colorStr.split(',')
80
+ const r = parseInt(rgb[0])
81
+ const g = parseInt(rgb[1])
82
+ const b = parseInt(rgb[2])
83
+ return [r, g, b]
84
+ }
85
+
86
+ function isHex (color) {
87
+ return color.length >= 4 && color[0] === '#'
88
+ }
89
+
90
+ function isRgb (color) {
91
+ return color.length >= 10 && color.slice(0, 3) === 'rgb'
92
+ }
93
+
94
+ function isRgba (color) {
95
+ return color.length >= 13 && color.slice(0, 4) === 'rgba'
96
+ }
97
+
98
+ module.exports = {
99
+ isHex,
100
+ isRgb,
101
+ isRgba,
102
+ toNum3,
103
+ getAntdColors,
104
+ getMenuColors,
105
+ getThemeToggleColors,
106
+ getFunctionalColors
107
+ }