@yilianjituan/yilian_dgerm 0.0.1-alpha.38 → 0.0.1-alpha.39

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 (145) hide show
  1. package/.eslintrc.js +0 -0
  2. package/LICENSE +0 -0
  3. package/README.md +0 -0
  4. package/dist/business/Entry/index.d.ts +0 -0
  5. package/dist/business/Entry/index.interface.d.ts +0 -0
  6. package/dist/business/Entry/index.interface.js +0 -0
  7. package/dist/business/Entry/index.js +0 -0
  8. package/dist/business/Entry/index.scss +0 -0
  9. package/dist/business/TestBtn/index.d.ts +0 -0
  10. package/dist/business/TestBtn/index.interface.d.ts +0 -0
  11. package/dist/business/TestBtn/index.interface.js +0 -0
  12. package/dist/business/TestBtn/index.js +0 -0
  13. package/dist/commonAxios/Axios.d.ts +0 -0
  14. package/dist/commonAxios/Axios.js +0 -0
  15. package/dist/commonAxios/http.d.ts +0 -0
  16. package/dist/commonAxios/http.js +0 -0
  17. package/dist/commonAxios/index.d.ts +0 -0
  18. package/dist/commonAxios/index.js +0 -0
  19. package/dist/commonAxios/juicer.d.ts +0 -0
  20. package/dist/commonAxios/juicer.js +0 -0
  21. package/dist/commonData/address.d.ts +0 -0
  22. package/dist/commonData/address.js +0 -0
  23. package/dist/commonImg/ic_im_no_archives_new.png +0 -0
  24. package/dist/commonType/globalEnum.d.ts +0 -0
  25. package/dist/commonType/globalEnum.js +0 -0
  26. package/dist/commonType/globalFun.d.ts +0 -0
  27. package/dist/commonType/globalFun.js +0 -0
  28. package/dist/components/BigImage/index.d.ts +0 -0
  29. package/dist/components/BigImage/index.interface.d.ts +0 -0
  30. package/dist/components/BigImage/index.interface.js +0 -0
  31. package/dist/components/BigImage/index.js +0 -0
  32. package/dist/components/CustomButtonModal/index.d.ts +0 -0
  33. package/dist/components/CustomButtonModal/index.interface.d.ts +0 -0
  34. package/dist/components/CustomButtonModal/index.interface.js +0 -0
  35. package/dist/components/CustomButtonModal/index.js +0 -0
  36. package/dist/components/DateTimePicker/index.d.ts +0 -0
  37. package/dist/components/DateTimePicker/index.interface.d.ts +0 -0
  38. package/dist/components/DateTimePicker/index.interface.js +0 -0
  39. package/dist/components/DateTimePicker/index.js +0 -0
  40. package/dist/components/DropDownSelect/index.d.ts +0 -0
  41. package/dist/components/DropDownSelect/index.interface.d.ts +6 -1
  42. package/dist/components/DropDownSelect/index.interface.js +0 -0
  43. package/dist/components/DropDownSelect/index.js +49 -20
  44. package/dist/components/EmptyDom/index.d.ts +0 -0
  45. package/dist/components/EmptyDom/index.interface.d.ts +0 -0
  46. package/dist/components/EmptyDom/index.interface.js +0 -0
  47. package/dist/components/EmptyDom/index.js +0 -0
  48. package/dist/components/Entry/index.d.ts +0 -0
  49. package/dist/components/Entry/index.interface.d.ts +0 -0
  50. package/dist/components/Entry/index.interface.js +0 -0
  51. package/dist/components/Entry/index.js +0 -0
  52. package/dist/components/Entry/index.scss +0 -0
  53. package/dist/components/ExportExcels/ExportExcels.scss +0 -0
  54. package/dist/components/ExportExcels/index.d.ts +0 -0
  55. package/dist/components/ExportExcels/index.interface.d.ts +0 -0
  56. package/dist/components/ExportExcels/index.interface.js +0 -0
  57. package/dist/components/ExportExcels/index.js +0 -0
  58. package/dist/components/FileUpload/fileUtil.d.ts +0 -0
  59. package/dist/components/FileUpload/fileUtil.js +0 -0
  60. package/dist/components/FileUpload/index.d.ts +0 -0
  61. package/dist/components/FileUpload/index.interface.d.ts +0 -0
  62. package/dist/components/FileUpload/index.interface.js +0 -0
  63. package/dist/components/FileUpload/index.js +0 -0
  64. package/dist/components/FileUpload/index.scss +0 -0
  65. package/dist/components/FilterRadio/index.d.ts +0 -0
  66. package/dist/components/FilterRadio/index.interface.d.ts +0 -0
  67. package/dist/components/FilterRadio/index.interface.js +0 -0
  68. package/dist/components/FilterRadio/index.js +0 -0
  69. package/dist/components/FilterRadio/index.scss +0 -0
  70. package/dist/components/MyBtn/index.d.ts +0 -0
  71. package/dist/components/MyBtn/index.interface.d.ts +0 -0
  72. package/dist/components/MyBtn/index.interface.js +0 -0
  73. package/dist/components/MyBtn/index.js +0 -0
  74. package/dist/components/NumberInput/index.d.ts +0 -0
  75. package/dist/components/NumberInput/index.interface.d.ts +0 -0
  76. package/dist/components/NumberInput/index.interface.js +0 -0
  77. package/dist/components/NumberInput/index.js +0 -0
  78. package/dist/components/NumberInput/index.scss +0 -0
  79. package/dist/components/OcrCommon/index.config.d.ts +0 -0
  80. package/dist/components/OcrCommon/index.config.js +0 -0
  81. package/dist/components/OcrCommon/index.d.ts +0 -0
  82. package/dist/components/OcrCommon/index.interface.d.ts +0 -0
  83. package/dist/components/OcrCommon/index.interface.js +0 -0
  84. package/dist/components/OcrCommon/index.js +0 -0
  85. package/dist/components/OcrCommon/index.scss +0 -0
  86. package/dist/components/PageTemplate/index.d.ts +0 -0
  87. package/dist/components/PageTemplate/index.interface.d.ts +0 -0
  88. package/dist/components/PageTemplate/index.interface.js +0 -0
  89. package/dist/components/PageTemplate/index.js +0 -0
  90. package/dist/components/PageTemplate/index.scss +0 -0
  91. package/dist/components/ReactEcharts/index.d.ts +0 -0
  92. package/dist/components/ReactEcharts/index.interface.d.ts +0 -0
  93. package/dist/components/ReactEcharts/index.interface.js +0 -0
  94. package/dist/components/ReactEcharts/index.js +0 -0
  95. package/dist/components/SelectMax/index.d.ts +0 -0
  96. package/dist/components/SelectMax/index.interface.d.ts +0 -0
  97. package/dist/components/SelectMax/index.interface.js +0 -0
  98. package/dist/components/SelectMax/index.js +0 -0
  99. package/dist/components/SelectPosition/index.d.ts +0 -0
  100. package/dist/components/SelectPosition/index.interface.d.ts +0 -0
  101. package/dist/components/SelectPosition/index.interface.js +0 -0
  102. package/dist/components/SelectPosition/index.js +0 -0
  103. package/dist/components/SelectPosition/index.scss +0 -0
  104. package/dist/components/SuperCascader/index.d.ts +0 -0
  105. package/dist/components/SuperCascader/index.interface.d.ts +0 -0
  106. package/dist/components/SuperCascader/index.interface.js +0 -0
  107. package/dist/components/SuperCascader/index.js +0 -0
  108. package/dist/components/SuperInput/index.d.ts +0 -0
  109. package/dist/components/SuperInput/index.interface.d.ts +0 -0
  110. package/dist/components/SuperInput/index.interface.js +0 -0
  111. package/dist/components/SuperInput/index.js +0 -0
  112. package/dist/components/TabsMode/index.d.ts +0 -0
  113. package/dist/components/TabsMode/index.interface.d.ts +0 -0
  114. package/dist/components/TabsMode/index.interface.js +0 -0
  115. package/dist/components/TabsMode/index.js +0 -0
  116. package/dist/components/TypographyText/index.d.ts +0 -0
  117. package/dist/components/TypographyText/index.interface.d.ts +0 -0
  118. package/dist/components/TypographyText/index.interface.js +0 -0
  119. package/dist/components/TypographyText/index.js +0 -0
  120. package/dist/components/TypographyText/index.scss +0 -0
  121. package/dist/components/VideoProgressModal/index.d.ts +0 -0
  122. package/dist/components/VideoProgressModal/index.interface.d.ts +0 -0
  123. package/dist/components/VideoProgressModal/index.interface.js +0 -0
  124. package/dist/components/VideoProgressModal/index.js +0 -0
  125. package/dist/components/VideoProgressModal/index.scss +0 -0
  126. package/dist/components/YLModal/drag.d.ts +0 -0
  127. package/dist/components/YLModal/drag.js +0 -0
  128. package/dist/components/YLModal/index.d.ts +0 -0
  129. package/dist/components/YLModal/index.interface.d.ts +0 -0
  130. package/dist/components/YLModal/index.interface.js +0 -0
  131. package/dist/components/YLModal/index.js +0 -0
  132. package/dist/index.d.ts +0 -0
  133. package/dist/index.js +0 -0
  134. package/dist/react-app-env.d.ts +0 -0
  135. package/dist/utils/common.d.ts +0 -0
  136. package/dist/utils/common.js +0 -0
  137. package/dist/utils/index.d.ts +0 -0
  138. package/dist/utils/index.js +0 -0
  139. package/dist/utils/notificationHelper.d.ts +0 -0
  140. package/dist/utils/notificationHelper.js +0 -0
  141. package/dist/utils/responseMessage.d.ts +0 -0
  142. package/dist/utils/responseMessage.js +0 -0
  143. package/dist/utils/userSessionActions.d.ts +0 -0
  144. package/dist/utils/userSessionActions.js +0 -0
  145. package/package.json +2 -2
package/.eslintrc.js CHANGED
File without changes
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from "antd";
2
3
  export interface OptionItem {
3
4
  /**
@@ -11,7 +12,7 @@ export interface OptionItem {
11
12
  /**
12
13
  * @description list展示项
13
14
  */
14
- lable: (item: any) => string;
15
+ lable: (item: any) => string | React.ReactNode;
15
16
  }
16
17
  export interface DropDownSelectProps extends SelectProps {
17
18
  /**
@@ -71,4 +72,8 @@ export interface DropDownSelectProps extends SelectProps {
71
72
  * @description 是否开启搜索查询
72
73
  */
73
74
  changeNoSearch?: boolean;
75
+ /**
76
+ * @description 是否初始化搜索
77
+ */
78
+ isInitSearch?: boolean;
74
79
  }
File without changes
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["http", "url", "method", "handleSelect", "showValue", "customInput", "searchValue", "additionalParameters", "dynamicParameter", "beforeSearch", "filterOptionsCallback", "onChange", "changeNoSearch", "mode"];
2
+ var _excluded = ["http", "url", "method", "handleSelect", "showValue", "customInput", "searchValue", "additionalParameters", "dynamicParameter", "beforeSearch", "filterOptionsCallback", "onChange", "changeNoSearch", "mode", "isInitSearch"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
5
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -45,6 +45,8 @@ var Index = function Index(props) {
45
45
  changeNoSearch = _props$changeNoSearch === void 0 ? true : _props$changeNoSearch,
46
46
  _props$mode = props.mode,
47
47
  mode = _props$mode === void 0 ? undefined : _props$mode,
48
+ _props$isInitSearch = props.isInitSearch,
49
+ isInitSearch = _props$isInitSearch === void 0 ? false : _props$isInitSearch,
48
50
  prop = _objectWithoutProperties(props, _excluded);
49
51
  var id = showValue.id,
50
52
  value = showValue.value,
@@ -60,8 +62,14 @@ var Index = function Index(props) {
60
62
  var totalPagesRef = useRef(1); //总页数
61
63
  var pageRef = useRef(1); //当前页
62
64
  var paramsRef = useRef(''); //查询参数·
65
+ var selectValueRef = useRef(''); //当前选中的值
63
66
  var storeListRef = useRef([]); //列表
64
67
  var selectRef = useRef({});
68
+ var _useState5 = useState(true),
69
+ _useState6 = _slicedToArray(_useState5, 2),
70
+ isFetchedData = _useState6[0],
71
+ setIsFetchedData = _useState6[1]; // 是否需要获取数据
72
+ var _additionalParameters = dynamicParameter && beforeSearch ? beforeSearch(dynamicParameter) : additionalParameters;
65
73
 
66
74
  /**
67
75
  * 查询接口
@@ -89,7 +97,7 @@ var Index = function Index(props) {
89
97
  */
90
98
  var getStoreList = /*#__PURE__*/function () {
91
99
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(type) {
92
- var _additionalParameters, data, target, options;
100
+ var data, target, options;
93
101
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
94
102
  while (1) switch (_context2.prev = _context2.next) {
95
103
  case 0:
@@ -100,20 +108,20 @@ var Index = function Index(props) {
100
108
  return _context2.abrupt("return");
101
109
  case 2:
102
110
  setSelectState(true);
103
- _additionalParameters = dynamicParameter && beforeSearch ? beforeSearch(dynamicParameter) : additionalParameters;
104
- _context2.next = 6;
105
- return inquireDiseases(_objectSpread(_defineProperty(_defineProperty(_defineProperty({}, searchValue, paramsRef.current), "pageNo", pageRef.current), "pageSize", 10), _additionalParameters ? _additionalParameters : {}));
106
- case 6:
111
+ _context2.next = 5;
112
+ return inquireDiseases(_objectSpread(_defineProperty(_defineProperty(_defineProperty({}, searchValue, paramsRef.current), "pageNo", pageRef.current), "pageSize", 10), _additionalParameters || {}));
113
+ case 5:
107
114
  data = _context2.sent;
108
115
  if (data.code === "OK") {
109
116
  target = data.result;
110
117
  totalPagesRef.current = target.totalPages;
111
- options = filterOptionsCallback ? filterOptionsCallback(target.content) : target.content || target;
118
+ options = filterOptionsCallback ? filterOptionsCallback(target.content || target) : target.content || target;
112
119
  storeListRef.current = type === 'scoll' ? [].concat(_toConsumableArray(storeListRef.current), _toConsumableArray(options)) : options;
113
120
  setStoreList(storeListRef.current || []);
121
+ setIsFetchedData(false); // 设置不需要获取数据
114
122
  setSelectState(false);
115
123
  }
116
- case 8:
124
+ case 7:
117
125
  case "end":
118
126
  return _context2.stop();
119
127
  }
@@ -124,8 +132,14 @@ var Index = function Index(props) {
124
132
  };
125
133
  }();
126
134
  useEffect(function () {
127
- getStoreList();
128
- }, []);
135
+ if (isInitSearch) {
136
+ getStoreList();
137
+ }
138
+ }, [isInitSearch]);
139
+ useEffect(function () {
140
+ setIsFetchedData(true); // 设置需要获取数据
141
+ }, [_additionalParameters]);
142
+
129
143
  // 搜索
130
144
  var onFilterChange = _.debounce(function (e) {
131
145
  if (typeof e === 'string') {
@@ -134,15 +148,17 @@ var Index = function Index(props) {
134
148
  getStoreList();
135
149
  }
136
150
  }, 300);
151
+
137
152
  // 选择
138
153
  var onChangeSelect = function onChangeSelect(value, option) {
139
154
  var _selectRef$current;
140
155
  if (changeNoSearch && typeof value === 'string') {
141
- paramsRef.current = value;
156
+ selectValueRef.current = value;
142
157
  }
143
158
  mode === undefined && ((_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.blur());
144
159
  handleSelect === null || handleSelect === void 0 || handleSelect(value, option);
145
160
  };
161
+
146
162
  // 下拉加载
147
163
  var companyScroll = function companyScroll(e) {
148
164
  var target = e.target;
@@ -150,22 +166,34 @@ var Index = function Index(props) {
150
166
  scrollHeight = target.scrollHeight,
151
167
  scrollTop = target.scrollTop;
152
168
  if (Math.ceil(scrollTop + offsetHeight) === scrollHeight) {
153
- pageRef.current = pageRef.current + 1;
154
- if (pageRef.current <= totalPagesRef.current) {
155
- getStoreList('scoll');
169
+ if (pageRef.current < totalPagesRef.current) {
170
+ // 检查当前页是否小于总页数
171
+ pageRef.current += 1; // 增加当前页码
172
+ getStoreList('scoll'); // 获取下一页数据
156
173
  }
157
174
  }
158
175
  };
176
+
159
177
  // 失焦
160
178
  var onBlurSelect = function onBlurSelect() {
161
- return !!paramsRef.current && handleSelect && handleSelect(paramsRef.current);
179
+ paramsRef.current && setIsFetchedData(true); // 如果有搜索内容,则需要获取数据
180
+ if (!!selectValueRef.current) {
181
+ handleSelect === null || handleSelect === void 0 || handleSelect(selectValueRef.current);
182
+ }
162
183
  };
184
+
185
+ // 聚焦
163
186
  var onFocusSelect = function onFocusSelect() {
164
- paramsRef.current = '';
165
- pageRef.current = 1;
166
- setStoreList([]); // 获取焦点时重置列表,否则会偶现没有滚动条
167
- getStoreList();
187
+ if (isFetchedData) {
188
+ // 需要获取数据
189
+ paramsRef.current = '';
190
+ pageRef.current = 1; // 重置当前页码
191
+ setStoreList([]); // 获取焦点时重置列表,否则会偶现没有滚动条
192
+ getStoreList();
193
+ }
168
194
  };
195
+
196
+ // 下拉框渲染
169
197
  var renderCom = function renderCom() {
170
198
  var dropdownRender = function dropdownRender(menu) {
171
199
  return /*#__PURE__*/React.createElement("div", null, menu, /*#__PURE__*/React.createElement("div", {
@@ -210,7 +238,8 @@ var Index = function Index(props) {
210
238
  }
211
239
  });
212
240
  return /*#__PURE__*/React.createElement(Select, _extends({}, commonProps, {
213
- ref: selectRef
241
+ ref: selectRef,
242
+ filterOption: false
214
243
  }), options);
215
244
  };
216
245
  return renderCom();
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/index.d.ts CHANGED
File without changes
package/dist/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yilianjituan/yilian_dgerm",
3
- "version": "0.0.1-alpha.38",
3
+ "version": "0.0.1-alpha.39",
4
4
  "description": "A react library developed with dumi",
5
5
  "keywords": [
6
6
  "React",
@@ -59,7 +59,7 @@
59
59
  "@ant-design/icons": "^5.5.1",
60
60
  "@hanyk/rc-viewer": "^0.0.3",
61
61
  "ahooks": "^3.7.2",
62
- "antd": "^5.18.0",
62
+ "antd": "^5.21.6",
63
63
  "axios": "^1.7.7",
64
64
  "copy-to-clipboard": "^3.3.3",
65
65
  "dayjs": "^1.11.11",