@bit-sun/business-component 1.0.17 → 1.1.3

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.
@@ -0,0 +1,2 @@
1
+ declare const _default: (storageKeyString: string, seconds?: number, tipsCallFunction?: (() => {}) | undefined) => void;
2
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "1.0.17",
3
+ "version": "1.1.3",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -32,6 +32,7 @@
32
32
  "axios": "^0.24.0",
33
33
  "classnames": "^2.3.1",
34
34
  "loadsh": "^0.0.4",
35
+ "querystring": "^0.2.1",
35
36
  "react": "^16.12.0",
36
37
  "react-beautiful-dnd": "10.0.0"
37
38
  },
@@ -46,4 +47,4 @@
46
47
  "publishConfig": {
47
48
  "access": "public"
48
49
  }
49
- }
50
+ }
@@ -177,6 +177,10 @@ class DataValidation extends React.Component {
177
177
  if (typeof cell.v === 'string') {
178
178
  cell.m = cell.v = cell.m.trim();
179
179
  }
180
+ if (typeof cell.v === 'number') {
181
+ cell.v = cell.v.toString()
182
+ cell.m = cell.v
183
+ }
180
184
  }
181
185
  // console.log(postion);
182
186
  },
@@ -210,6 +214,13 @@ class DataValidation extends React.Component {
210
214
  defaultRowHeight: 20, //自定义行高
211
215
  defaultColWidth: 120, //自定义列宽
212
216
  config: {},
217
+ // celldata:
218
+ // data && data.length !== 0 ? data : _.flattenDeep(Array.from({ length: 100 }).map((a, b) => Array.from({ length: 100 }).map((c, d) => ({
219
+ // "r": b,
220
+ // "c": d,
221
+ // "v": { "ct": { "fa": "@", "t": "s" }, }
222
+ // }))))
223
+ // ,
213
224
  celldata:
214
225
  data && data.length !== 0 ? data : _.flattenDeep(Array.from({ length: 100 }).map((a, b) => Array.from({ length: 100 }).map((c, d) => ({
215
226
  "r": b,
@@ -61,7 +61,7 @@ const QueryMutipleInput = ({ onValueChange }) => {
61
61
 
62
62
  return (
63
63
  <div className={'query_input'}>
64
- <div class="query_input_show">
64
+ <div className="query_input_show">
65
65
  <Input
66
66
  value={value}
67
67
  onChange={outerChange}
@@ -0,0 +1,115 @@
1
+ .search_select {
2
+ &_show {
3
+ display: flex;
4
+ }
5
+
6
+ &_expand_button {
7
+ position: relative;
8
+ width: 30px;
9
+ color: #ffffff;
10
+ cursor: pointer;
11
+
12
+ span {
13
+ position: absolute;
14
+ height: 20px;
15
+ line-height: 14px;
16
+ left: 50%;
17
+ top: 50%;
18
+ transform: translate(-50%, -50%);
19
+ }
20
+ }
21
+
22
+ &_wrapper {
23
+ position: relative;
24
+ display: flex;
25
+ min-height: 60vh;
26
+ max-height: 60vh;
27
+ overflow: hidden;
28
+ font-size: 14px;
29
+
30
+ &_click_flag {
31
+ position: absolute;
32
+ z-index: 10;
33
+ &_arrow {
34
+ transform: rotate(0deg);
35
+ transition: transform 0.5s;
36
+ }
37
+ &_arrow_1 {
38
+ transform: rotate(-180deg);
39
+ transition: transform 0.5s;
40
+ }
41
+ }
42
+
43
+ &_left {
44
+ width: 28%;
45
+ overflow-y: hidden;
46
+ //background-color: yellow;
47
+ transition: all 0.3s;
48
+ margin-left: 20px;
49
+ }
50
+
51
+ &_left1 {
52
+ width: 0;
53
+ height: 0;
54
+ transition: all 0.3s;
55
+ display: none;
56
+ }
57
+
58
+ &_right {
59
+ width: 70%;
60
+ margin-left: 1%;
61
+ //background-color: pink;
62
+ }
63
+
64
+ &_right1 {
65
+ width: 100%;
66
+ margin-left: 20px;
67
+ //background-color: green;
68
+ }
69
+
70
+ &_right, _right1 {
71
+ overflow-x: auto;
72
+ }
73
+
74
+ .select_list_columns {
75
+ width: 100%;
76
+ height: calc(60vh - 60px);
77
+ overflow-y: auto;
78
+ border: 1px solid #d8d8d8;
79
+ &_tips {
80
+ background: #eee;
81
+ padding: 6px 20px;
82
+ margin-bottom: 10px;
83
+ }
84
+ &_formItems {
85
+ padding: 0 20px;
86
+ }
87
+ }
88
+ .select_list_searchButton {
89
+ display: flex;
90
+ margin: 10px 0px;
91
+ justify-content: flex-end;
92
+ }
93
+
94
+ .select_list_button_space {
95
+ margin-right: 10px;
96
+ }
97
+
98
+ .select_list_selectTips {
99
+ display: flex;
100
+ justify-content: space-between;
101
+ height: 34px;
102
+ line-height: 32px;
103
+ background-color: #eee;
104
+ margin-bottom: 10px;
105
+ padding: 0 12px;
106
+ }
107
+
108
+ .select_list_selectAll {
109
+ position: relative;
110
+ top: -40px;
111
+ left: 20px;
112
+ width: 160px;
113
+ }
114
+ }
115
+ }
@@ -0,0 +1,130 @@
1
+ ---
2
+ nav:
3
+ title: '组件'
4
+ order: 1
5
+ group:
6
+ title: 组件
7
+ order: 0
8
+ title: 档案选择器
9
+ order: 2
10
+ ---
11
+
12
+ ## SearchSelect
13
+
14
+ Demo:
15
+
16
+ ```tsx
17
+ import React, { useRef } from 'react';
18
+ import { SearchSelect } from '@bit-sun/business-component';
19
+
20
+ export default () => {
21
+ const selectProps = {
22
+ mode: 'multiple',
23
+ maxTagCount: 1,
24
+ }
25
+
26
+ const DictionaryUC000013 = [{ text: '共享', value: '10' }, { text: '私有', value: '20' }]
27
+ const modalTableProps = {
28
+ modalTableTitle: '选择供应商',
29
+ tableSearchForm:[
30
+ { name: 'qp-name-like', label: '客户名称' }, // field: { type: 'input', props: { placeholder: '8888'}}
31
+ { name: 'qp-code-like', label: '客户编码' },
32
+ { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
33
+ type: 'select',
34
+ props: {
35
+ mode: 'multiple',
36
+ notFoundContent: '暂无数据',
37
+ allowClear: true,
38
+ showSearch: true,
39
+ showArrow: true,
40
+ maxTagCount: 1,
41
+ optionFilterProp: 'children',
42
+ filterOption: (input: string, option: { props: { children: string } }) =>
43
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
44
+ },
45
+ },
46
+ initialSource: [{ text: '英伦宝贝儿童用品有限公司', value: 'A0001' }]
47
+ },
48
+ { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
49
+ type: 'select',
50
+ props: {
51
+ mode: 'multiple',
52
+ notFoundContent: '暂无数据',
53
+ allowClear: true,
54
+ showSearch: true,
55
+ showArrow: true,
56
+ maxTagCount: 1,
57
+ optionFilterProp: 'children',
58
+ filterOption: (input: string, option: { props: { children: string } }) =>
59
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
60
+ },
61
+ },
62
+ initialSource: [{ text: '上海哲雄母婴用品有限公司', value: 'F002' }, { text: '上海英伦宝贝儿童用品有限公司', value: 'F001' }]
63
+ },
64
+ { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
65
+ type: 'select',
66
+ props: {
67
+ mode: 'multiple',
68
+ notFoundContent: '暂无数据',
69
+ allowClear: true,
70
+ showSearch: true,
71
+ showArrow: true,
72
+ maxTagCount: 1,
73
+ optionFilterProp: 'children',
74
+ filterOption: (input: string, option: { props: { children: string } }) =>
75
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
76
+ },
77
+ },
78
+ initialSource: [{ text: '上海哲雄母婴用品有限公司', value: 'F002' }, { text: '上海英伦宝贝儿童用品有限公司', value: 'F001' }]
79
+ },
80
+ { name: 'qp-sharingType-eq', type: 'select', label: '共享类型', initialSource: DictionaryUC000013 }, // 页面可以直接使用getDictionarySource('UC000013')
81
+ ],
82
+ tableColumns: [
83
+ {
84
+ title: '客户编码',
85
+ dataIndex: 'code',
86
+ },
87
+ {
88
+ title: '客户名称',
89
+ dataIndex: 'name',
90
+ },
91
+ {
92
+ title: '归属集团',
93
+ dataIndex: 'conglomerateName',
94
+ },
95
+ {
96
+ title: '归属法人公司',
97
+ dataIndex: 'legalCompanyName',
98
+ },
99
+ {
100
+ title: '归属核算主体',
101
+ dataIndex: 'accountingName',
102
+ },
103
+ {
104
+ title: '共享类型',
105
+ dataIndex: 'sharingType',
106
+ render: (text) => DictionaryUC000013?.find((i) => i.value === text)?.text, // getDictionaryTextByValue('UC000013', text)
107
+ },
108
+ ]
109
+ }
110
+
111
+ const onValueChange = (value) => {
112
+ console.log(value)
113
+ }
114
+
115
+ return (
116
+ <div>
117
+ <SearchSelect
118
+ // initValue={{value: '20220105001', label: 'LH公司'}} // 单选
119
+ // initValue={[{value: '20220105001', label: 'LH公司'}]} // 多选
120
+ selectProps={selectProps}
121
+ modalTableProps={modalTableProps}
122
+ selectDataUrl='http://test.i-baby.net/bop/api/supplier'
123
+ onValueChange={onValueChange}
124
+ />
125
+ </div>
126
+ );
127
+ };
128
+ ```
129
+
130
+ More skills for writing demo: https://d.umijs.org/guide/demo-principle