@lambo-design/shared 1.0.0-beta.200 → 1.0.0-beta.202

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 (58) hide show
  1. package/config/config.js +1 -0
  2. package/config/themes/atrovirens/atrovirens.css +563 -563
  3. package/config/themes/blue/blue.css +563 -563
  4. package/config/themes/blue-white/blue-white.css +563 -563
  5. package/config/themes/blue-white-tight/blue-white-tight.css +564 -564
  6. package/config/themes/deep/deep.css +563 -563
  7. package/config/themes/default/default.css +563 -563
  8. package/config/themes/eap/eap.css +563 -563
  9. package/config/themes/gold/gold.css +563 -563
  10. package/config/themes/lime/lime.css +563 -563
  11. package/config/themes/orange/orange.css +563 -563
  12. package/config/themes/red/red.css +563 -563
  13. package/nstyles/common.less +197 -197
  14. package/nstyles/components/404.less +46 -46
  15. package/nstyles/components/button.less +34 -34
  16. package/nstyles/components/date-picker.less +37 -37
  17. package/nstyles/components/drawer.less +20 -20
  18. package/nstyles/components/dropdown.less +18 -18
  19. package/nstyles/components/excel-flow.less +72 -72
  20. package/nstyles/components/form.less +303 -303
  21. package/nstyles/components/layout/collect.less +10 -10
  22. package/nstyles/components/layout/detail-view.less +107 -107
  23. package/nstyles/components/layout/full-screen.less +7 -7
  24. package/nstyles/components/layout/other-menu.less +142 -142
  25. package/nstyles/components/layout/page-view.less +101 -101
  26. package/nstyles/components/layout/sider-trigger.less +41 -41
  27. package/nstyles/components/layout/tags-nav.less +113 -113
  28. package/nstyles/components/modal.less +85 -85
  29. package/nstyles/components/panel.less +31 -31
  30. package/nstyles/components/select.less +3 -3
  31. package/nstyles/components/sign.less +27 -27
  32. package/nstyles/components/tree.less +159 -159
  33. package/nstyles/components/upload.less +131 -131
  34. package/nstyles/index.less +5 -5
  35. package/nstyles/reset.less +65 -65
  36. package/nstyles/third/ag.less +173 -173
  37. package/nstyles/third/index.less +11 -11
  38. package/nstyles/third/view-design.less +356 -356
  39. package/nstyles/variables/base.less +143 -143
  40. package/nstyles/variables/index.less +4 -4
  41. package/nstyles/variables/theme/default/button.less +7 -7
  42. package/nstyles/variables/theme/default/common.less +57 -57
  43. package/nstyles/variables/theme/default/index.less +7 -7
  44. package/nstyles/variables/theme/default/layout.less +40 -40
  45. package/nstyles/variables/theme/default/table.less +37 -37
  46. package/nstyles/variables/theme/default/tag.less +3 -3
  47. package/nstyles/variables/theme/default/upload.less +3 -3
  48. package/nstyles/variables/theme/index.less +13 -13
  49. package/nstyles/variables/theme/small/button.less +7 -7
  50. package/nstyles/variables/theme/small/common.less +39 -39
  51. package/nstyles/variables/theme/small/index.less +5 -5
  52. package/nstyles/variables/theme/small/layout.less +21 -21
  53. package/nstyles/variables/theme/small/table.less +17 -17
  54. package/nstyles/variables/theme/small/tag.less +3 -3
  55. package/package.json +1 -1
  56. package/utils/dict/index.js +33 -0
  57. package/utils/n/api.js +8 -0
  58. package/utils/platform.js +74 -0
@@ -1,39 +1,39 @@
1
- .ind-small-theme {
2
- --ind-menu-desc-margin-top: 0px;
3
- --ind-sc-padding-top: 10px; // 值来自四川
4
-
5
- // 压缩padding
6
- // --ind-padding-xs: 4px;
7
- --ind-padding-sm: 8px;
8
-
9
- // card的样式
10
- --ivu-card-head-padding: 6px 12px;
11
- --ivu-card-head-line-height: 36px;
12
- --ivu-card-head-height: 36px;
13
- --ivu-card-body-padding: 6px;
14
-
15
- // 表单的样式
16
- --input-height: 26px; //30px; // 24px; // small 24px // 值来自四川 // 又改一版
17
- --ivu-form-item-label-padding: 6px 8px 6px 0; // 6px 8px 6px 0; 值来自四川 // 又改一版
18
- --ivu-form-v6stle-item-label-paddingleft: 12px;
19
- --ivu-form-item-content-padding: 4px 6px;
20
- --ivu-form-item-label-before-left: 4px;
21
- --ivu-form-item-content-line-height: 26px; //30px; //24px; // 值来自四川 // 又改一版
22
-
23
- // tree样式
24
- --ind-tree-wrapper-width: 100%;
25
- --tree-content-padding: var(--ind-padding-xs);
26
- --ivu-tree-margin: var(--ind-padding-xs) 0;
27
-
28
- // drawer样式
29
- --ind-drawer-content-padding: 6px;
30
- --ind-drawer-footer-padding: 10px 16px;
31
-
32
- // 报表指标样式
33
- --report-index-model-panel-padding: var(--tree-content-padding);
34
- --report-index-options-padding-right: var(--tree-content-padding);
35
-
36
- // 表格
37
- --ind-table-button-padding: 6px; // var(--ind-padding-xs);
38
- --input-height-table: 24px; // 表格输入框的高度
39
- }
1
+ .ind-small-theme {
2
+ --ind-menu-desc-margin-top: 0px;
3
+ --ind-sc-padding-top: 10px; // 值来自四川
4
+
5
+ // 压缩padding
6
+ // --ind-padding-xs: 4px;
7
+ --ind-padding-sm: 8px;
8
+
9
+ // card的样式
10
+ --ivu-card-head-padding: 6px 12px;
11
+ --ivu-card-head-line-height: 36px;
12
+ --ivu-card-head-height: 36px;
13
+ --ivu-card-body-padding: 6px;
14
+
15
+ // 表单的样式
16
+ --input-height: 26px; //30px; // 24px; // small 24px // 值来自四川 // 又改一版
17
+ --ivu-form-item-label-padding: 6px 8px 6px 0; // 6px 8px 6px 0; 值来自四川 // 又改一版
18
+ --ivu-form-v6stle-item-label-paddingleft: 12px;
19
+ --ivu-form-item-content-padding: 4px 6px;
20
+ --ivu-form-item-label-before-left: 4px;
21
+ --ivu-form-item-content-line-height: 26px; //30px; //24px; // 值来自四川 // 又改一版
22
+
23
+ // tree样式
24
+ --ind-tree-wrapper-width: 100%;
25
+ --tree-content-padding: var(--ind-padding-xs);
26
+ --ivu-tree-margin: var(--ind-padding-xs) 0;
27
+
28
+ // drawer样式
29
+ --ind-drawer-content-padding: 6px;
30
+ --ind-drawer-footer-padding: 10px 16px;
31
+
32
+ // 报表指标样式
33
+ --report-index-model-panel-padding: var(--tree-content-padding);
34
+ --report-index-options-padding-right: var(--tree-content-padding);
35
+
36
+ // 表格
37
+ --ind-table-button-padding: 6px; // var(--ind-padding-xs);
38
+ --input-height-table: 24px; // 表格输入框的高度
39
+ }
@@ -1,5 +1,5 @@
1
- @import './button.less';
2
- @import './common.less';
3
- @import './layout.less';
4
- @import './table.less';
5
- @import './tag.less';
1
+ @import './button.less';
2
+ @import './common.less';
3
+ @import './layout.less';
4
+ @import './table.less';
5
+ @import './tag.less';
@@ -1,21 +1,21 @@
1
- .ind-small-theme {
2
- // basic layout 系统布局变量 -begin
3
- --ivu-menu-item-font-size: var(--ind-font-size-md);
4
-
5
- --menu-icon-margin-right: var(--ind-padding-xs);
6
- // basic layout 系统布局变量 -end
7
-
8
- // page-view layout 系统布局变量 -begin
9
- --ind-panel-vertical-margin: var(--ind-padding-xs); // 12px;
10
- --ind-panel-horizon-margin: var(--ind-padding-xs); // var(--ind-padding-sm);
11
- // page-view layout 系统布局变量 -end
12
-
13
- // --input-height: 30px; // 24px; // small 24px 挪common.less去了
14
- --search-margin-bottom: var(--ind-padding-xs); // var(--ind-padding-sm); // 24px; // 6px;
15
- --search-button-margin: var(--ind-padding-xs); // var(--ind-padding-sm);
16
-
17
- --menu-name-padding: 0 14px 0 10px; // var(--ind-padding-xs) 14px var(--ind-padding-xs) 10px; // 标题行padding
18
- --menu-title-font-size: 16px;
19
- --menu-title-color: #17233d;
20
- --page-content-padding: var(--ind-padding-xs); // 12px;
21
- }
1
+ .ind-small-theme {
2
+ // basic layout 系统布局变量 -begin
3
+ --ivu-menu-item-font-size: var(--ind-font-size-md);
4
+
5
+ --menu-icon-margin-right: var(--ind-padding-xs);
6
+ // basic layout 系统布局变量 -end
7
+
8
+ // page-view layout 系统布局变量 -begin
9
+ --ind-panel-vertical-margin: var(--ind-padding-xs); // 12px;
10
+ --ind-panel-horizon-margin: var(--ind-padding-xs); // var(--ind-padding-sm);
11
+ // page-view layout 系统布局变量 -end
12
+
13
+ // --input-height: 30px; // 24px; // small 24px 挪common.less去了
14
+ --search-margin-bottom: var(--ind-padding-xs); // var(--ind-padding-sm); // 24px; // 6px;
15
+ --search-button-margin: var(--ind-padding-xs); // var(--ind-padding-sm);
16
+
17
+ --menu-name-padding: 0 14px 0 10px; // var(--ind-padding-xs) 14px var(--ind-padding-xs) 10px; // 标题行padding
18
+ --menu-title-font-size: 16px;
19
+ --menu-title-color: #17233d;
20
+ --page-content-padding: var(--ind-padding-xs); // 12px;
21
+ }
@@ -1,17 +1,17 @@
1
- .ind-small-theme {
2
- --ind-table-padding: var(--ind-padding-sm);
3
- --ind-ag-cell-widget-spacing: 12px;
4
-
5
- --ind-ag-grid-size: 4px;
6
- --ind-ag-font-size: var(--ind-font-size-md); // var(--ind-font-size-sm);
7
- --ind-ag-list-item-height: calc(var(--ag-grid-size) * 6);
8
- --ind-ag-cell-horizontal-padding: 3px; // 0px
9
-
10
- // 以下是 ag 没有的
11
- --ind-ag-cell-icon-margin-left: 3px;
12
- --ind-ag-cell-header-horizontal-padding: 0px;
13
- --ind-ag-cell-line-height: 14px;
14
-
15
- --ind-unit-switch-bottom: 10px;
16
- --ind-other-button-top: 2px;
17
- }
1
+ .ind-small-theme {
2
+ --ind-table-padding: var(--ind-padding-sm);
3
+ --ind-ag-cell-widget-spacing: 12px;
4
+
5
+ --ind-ag-grid-size: 4px;
6
+ --ind-ag-font-size: var(--ind-font-size-md); // var(--ind-font-size-sm);
7
+ --ind-ag-list-item-height: calc(var(--ag-grid-size) * 6);
8
+ --ind-ag-cell-horizontal-padding: 3px; // 0px
9
+
10
+ // 以下是 ag 没有的
11
+ --ind-ag-cell-icon-margin-left: 3px;
12
+ --ind-ag-cell-header-horizontal-padding: 0px;
13
+ --ind-ag-cell-line-height: 14px;
14
+
15
+ --ind-unit-switch-bottom: 10px;
16
+ --ind-other-button-top: 2px;
17
+ }
@@ -1,3 +1,3 @@
1
- .ind-small-theme {
2
- --ind-tag-height: 18px; //22px // 16px;; // 值来自四川 // 又改一版
3
- }
1
+ .ind-small-theme {
2
+ --ind-tag-height: 18px; //22px // 16px;; // 值来自四川 // 又改一版
3
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/shared",
3
- "version": "1.0.0-beta.200",
3
+ "version": "1.0.0-beta.202",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -2,6 +2,8 @@ import config from '../../config/config'
2
2
  import ajax from '../ajax'
3
3
  import { builtInDictKeys, builtInDictMap, builtInDictList} from './built-in-dict'
4
4
  import { setSessionStorage, getSessionStorage} from "../platform";
5
+ import { axiosN as axios } from '../n/reuqest/axiosN'
6
+ const CONTEXT = '/user-manage-server'
5
7
 
6
8
  export async function getAllDict(dictIdArray) {
7
9
  if (dictIdArray.length > 0) {
@@ -73,3 +75,34 @@ export async function getDictMap(dictId) {
73
75
  console.error(`getDictsMap error dictId=${dictId}`, error)
74
76
  }
75
77
  }
78
+
79
+ async function getDictApi(dictId) {
80
+ const dictValue = getSessionStorage(dictId)
81
+ if (!!dictValue) {
82
+ return dictValue
83
+ }
84
+ try {
85
+ const { data } = await axios.get(`${CONTEXT}/dict/getDicts`, { params: { dictId } })
86
+ setSessionStorage(dictId, data)
87
+ return data
88
+ } catch (error) {
89
+ console.error(`getDict error dictId=${dictId}`, error)
90
+ }
91
+ }
92
+ export async function getDictsMap(dictIdArr) {
93
+ if (dictIdArr.length > 0) {
94
+ const resultMap = {}
95
+ const result = await Promise.all(dictIdArr.map((dictId) => getDictApi(dictId)))
96
+ dictIdArr.forEach((dictId, i) => {
97
+ if (result[i]) {
98
+ const resultValue = {}
99
+ result[i].forEach((item) => {
100
+ resultValue[item.K] = item.V
101
+ })
102
+
103
+ resultMap[dictId] = { data: resultValue, renderData: result[i] }
104
+ }
105
+ })
106
+ return resultMap
107
+ }
108
+ }
package/utils/n/api.js ADDED
@@ -0,0 +1,8 @@
1
+ import { axiosN } from './reuqest/axiosN'
2
+ import config from '../../config/config'
3
+
4
+ const CONTEXT = `${config.immServerContext}/manage/pub/dateperiod`
5
+
6
+ export function getWeeksByMonthAPI(params) {
7
+ return axiosN.get(`${CONTEXT}/getWeekByMonth`, { params })
8
+ }
package/utils/platform.js CHANGED
@@ -515,6 +515,80 @@ export const getChangeTableDatas = (oldData, newData) => {
515
515
  return list
516
516
  }
517
517
 
518
+ /**
519
+ * 合并数组并去重
520
+ * @param oldRow
521
+ * @param newRow
522
+ * @param key
523
+ * @returns {*[]}
524
+ */
525
+ export const removeDup = (oldRow,newRow,key) => {
526
+ let resultMap = {};
527
+ for(let o of oldRow){
528
+ resultMap[o[key]] = o;
529
+ }
530
+ for (let n of newRow) {
531
+ resultMap[n[key]] = n;
532
+ }
533
+ let result = []
534
+ for (let row in resultMap) {
535
+ result.push(resultMap[row])
536
+ }
537
+ return result;
538
+ }
539
+ /**
540
+ * 获取数组修改的数据
541
+ * @param oldRow
542
+ * @param newRow
543
+ * @param key
544
+ * @returns {{delList: *[], addList: *[]}}
545
+ */
546
+ export const getChangeData = (oldRow,newRow,key) =>{
547
+ let oldMap = {};
548
+ for(let o of oldRow){
549
+ if (key){
550
+ oldMap[o[key]] = o;
551
+ } else {
552
+ oldMap[o] = o;
553
+ }
554
+ }
555
+ let newMap = {}
556
+ for(let n of newRow){
557
+ if (key){
558
+ newMap[n[key]] = n;
559
+ } else {
560
+ newMap[n] = n;
561
+ }
562
+ }
563
+ let addList = []
564
+ for (let n of newRow) {
565
+ if (key){
566
+ if (!oldMap[n[key]]) {
567
+ addList.push(n);
568
+ }
569
+ } else {
570
+ if (!oldMap[n]) {
571
+ addList.push(n);
572
+ }
573
+ }
574
+ }
575
+ let delList = []
576
+ for (let o of oldRow) {
577
+ if (key){
578
+ if (!newMap[o[key]]) {
579
+ delList.push(o);
580
+ }
581
+ } else {
582
+ if (!newMap[o]) {
583
+ delList.push(o);
584
+ }
585
+ }
586
+ }
587
+ return {
588
+ addList,delList
589
+ }
590
+ }
591
+
518
592
  /**
519
593
  * @param {Array} arr1
520
594
  * @param {Array} arr2