wt-antd 4.2.42 → 4.2.44

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.
@@ -1,15 +1,15 @@
1
1
  import React from 'react';
2
2
  export declare const BiuADatePicker: React.NamedExoticComponent<import("styled-components/dist/types").Substitute<(import("antd/lib/date-picker/generatePicker").PickerProps<import("moment").Moment> & {
3
- status?: "" | "warning" | "error" | undefined;
3
+ status?: "" | "error" | "warning" | undefined;
4
4
  dropdownClassName?: string | undefined;
5
5
  popupClassName?: string | undefined;
6
6
  }) & React.RefAttributes<React.Component<import("antd/lib/date-picker/generatePicker").PickerProps<import("moment").Moment> & {
7
- status?: "" | "warning" | "error" | undefined;
7
+ status?: "" | "error" | "warning" | undefined;
8
8
  dropdownClassName?: string | undefined;
9
9
  popupClassName?: string | undefined;
10
10
  }, unknown, any>>, import("styled-components/dist/types").BaseObject>>;
11
11
  export declare const BiuAMouthPicker: React.MemoExoticComponent<import("antd/lib/date-picker/generatePicker/interface").PickerComponentClass<Omit<import("antd/lib/date-picker/generatePicker").PickerProps<import("moment").Moment> & {
12
- status?: "" | "warning" | "error" | undefined;
12
+ status?: "" | "error" | "warning" | undefined;
13
13
  dropdownClassName?: string | undefined;
14
14
  popupClassName?: string | undefined;
15
15
  }, "picker">, unknown>>;
@@ -2,6 +2,6 @@ import React from 'react';
2
2
  export { Form as BiuAForm } from 'antd';
3
3
  export declare const BiuAFormItem: React.MemoExoticComponent<(<Values = any>(props: import("antd").FormItemProps<Values>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
4
4
  useStatus: () => {
5
- status?: "" | "warning" | "error" | "success" | "validating" | undefined;
5
+ status?: "" | "error" | "success" | "warning" | "validating" | undefined;
6
6
  };
7
7
  }>;
@@ -9,7 +9,7 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
9
9
  /**
10
10
  * 0:入库 1:出库 2:移库 3:冻结 4:调整 5:属性变更
11
11
  */
12
- orderType: 0 | 3 | 1 | 4 | 2 | 5;
12
+ orderType: 0 | 1 | 2 | 3 | 4 | 5;
13
13
  isFirstLoad: boolean;
14
14
  onFetchData?: ((res: any) => any) | undefined;
15
15
  } & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
@@ -37,6 +37,7 @@ export declare class BiuMapSelectSite extends React.PureComponent<BiuMapSelectSi
37
37
  componentDidUpdate(): void;
38
38
  init: () => void;
39
39
  mapDrawMarker: (lng: any, lat: any) => void;
40
+ getGeocoder: () => void;
40
41
  invokeSearchPOI: (name: string) => Promise<any>;
41
42
  invokeAutoComplete: (name: string) => Promise<any>;
42
43
  search: (value: string) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,KAAK,UAAU,GAAG;IAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CACvB,CAAA;AAED,KAAK,YAAY,GAAG;IAClB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,UAAU,EAAE,GAAG,EAAE,CAAA;IACjB,SAAS,EAAE,GAAG,EAAE,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,GAAG,CAAA;CACjB,GAAG,UAAU,CAAA;AAEd,MAAM,MAAM,yBAAyB,GAAG;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,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,MAAM,KAAG,QAAQ,GAAG,CAAC,CAYtD;IAGD,MAAM,UAAiB,MAAM,mBAiD5B;IACD,cAAc,wBAAmD;IAGjE,YAAY,WAAY,MAAM,QAAQ,GAAG,UAWxC;IAGD,UAAU,QAAS,MAAM,OAAO,MAAM,UA4CrC;IAGD,eAAe,SAAU,GAAG,UA0B3B;IAGD,WAAW,aAgCV;IAGD,QAAQ,aAeP;IAGD,YAAY,aAKX;IAED,MAAM;CAkDP"}
@@ -101,6 +101,10 @@ export var BiuMapSelectSite = /*#__PURE__*/function (_React$PureComponent) {
101
101
  // map.plugin(['AMap.PlaceSearch'], () => {
102
102
  // map.addControl(new AMap.PlaceSearch());
103
103
  // });
104
+ if (_this.props.textAddress) {
105
+ _this.getGeocoder();
106
+ return false;
107
+ }
104
108
  // 默认位置
105
109
  if (_this.props.position && _this.props.position.lng && _this.props.position.lat) {
106
110
  _this.mapDrawMarker(_this.props.position.lng, _this.props.position.lat);
@@ -157,6 +161,37 @@ export var BiuMapSelectSite = /*#__PURE__*/function (_React$PureComponent) {
157
161
  }
158
162
  map.setCenter([lng, lat]); // 设置地图中心点
159
163
  });
164
+ _defineProperty(_assertThisInitialized(_this), "getGeocoder", function () {
165
+ var that = _assertThisInitialized(_this);
166
+ AMap.plugin('AMap.Geocoder', function () {
167
+ var _that$props;
168
+ var geocoder = new AMap.Geocoder({
169
+ enableHighAccuracy: true,
170
+ // 是否使用高精度定位,默认:true
171
+ timeout: 10000,
172
+ // 超过10秒后停止定位,默认:5s
173
+ buttonPosition: 'RB',
174
+ // 定位按钮的停靠位置
175
+ buttonOffset: new AMap.Pixel(10, 20),
176
+ // 定位按钮距离对应角落的距离
177
+ zoomToAccuracy: true
178
+ });
179
+ // map.addControl(geocoder)
180
+ geocoder.getLocation((_that$props = that.props) === null || _that$props === void 0 ? void 0 : _that$props.textAddress, function (status, result) {
181
+ console.log('geocoder.getLocation', status, result);
182
+ if (status === 'complete' && result.geocodes.length) {
183
+ var geocode = result.geocodes[0];
184
+ map.setCenter(geocode.location); // 根据地址设置地图中心点
185
+ that.mark = new AMap.Marker({
186
+ position: geocode.location,
187
+ map: map // 添加到地图上
188
+ });
189
+ } else {
190
+ console.error('根据地址查询失败');
191
+ }
192
+ });
193
+ });
194
+ });
160
195
  _defineProperty(_assertThisInitialized(_this), "invokeSearchPOI", /*#__PURE__*/function () {
161
196
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(name) {
162
197
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -264,7 +299,7 @@ export var BiuMapSelectSite = /*#__PURE__*/function (_React$PureComponent) {
264
299
  _context3.t0 = _context3["catch"](9);
265
300
  case 17:
266
301
  _context3.prev = 17;
267
- if (result) {
302
+ if (!(!result || result.length === 0)) {
268
303
  _context3.next = 22;
269
304
  break;
270
305
  }
@@ -51,4 +51,4 @@ export declare const BiuTableSelect: React.MemoExoticComponent<React.ForwardRefE
51
51
  */
52
52
  mode?: string | undefined;
53
53
  ownflag?: boolean | undefined;
54
- } & Pick<SelectProps<any, import("antd/lib/select").DefaultOptionType>, "showSearch" | "allowClear"> & Pick<TableProps<any>, "dataSource" | "onRow"> & React.RefAttributes<unknown>>>;
54
+ } & Pick<SelectProps<any, import("antd/lib/select").DefaultOptionType>, "allowClear" | "showSearch"> & Pick<TableProps<any>, "onRow" | "dataSource"> & React.RefAttributes<unknown>>>;
@@ -178,7 +178,7 @@ var middlewareHandler = /*#__PURE__*/function () {
178
178
  duration: 3,
179
179
  type: 'error'
180
180
  });
181
- } else if (code === 799) {
181
+ } else if (code === 799 || code === 401) {
182
182
  setAuthToken('');
183
183
  notification.open({
184
184
  key: '799',
@@ -3,6 +3,6 @@ import { UpdateVersionData } from '..';
3
3
  * 判断是否为子系统
4
4
  */
5
5
  export declare const IsSubSYS: boolean;
6
- export declare const compareVersions: (version1: string, version2: string | undefined | null) => 0 | 1 | -1;
6
+ export declare const compareVersions: (version1: string, version2: string | undefined | null) => 1 | -1 | 0;
7
7
  export declare const getSystemByUrl: (route: string) => "wms" | "mdm" | "sso" | undefined;
8
8
  export declare const updateVersionHandle: (data: UpdateVersionData) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wt-antd",
3
- "version": "4.2.42",
3
+ "version": "4.2.44",
4
4
  "description": "万通业务组件",
5
5
  "sideEffects": false,
6
6
  "main": "dist/esm/index.js",
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAA;AA6RhD,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,kBAAkB,KAAK,OAAO,CAAC,CAAC,CAuCtE,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,kBAAkB,KAAK,OAAO,CAAC,CAAC,CAsBxE,CAAA;AAED,cAAc,QAAQ,CAAA"}