wt-enjoy-link-antd-repack 4.1.17
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +26 -0
- package/dist/esm/assets/location.png +0 -0
- package/dist/esm/component/BiuAButton/index.d.ts +18 -0
- package/dist/esm/component/BiuAButton/index.js +8 -0
- package/dist/esm/component/BiuACard/index.d.ts +2 -0
- package/dist/esm/component/BiuACard/index.js +9 -0
- package/dist/esm/component/BiuACascader/index.d.ts +10 -0
- package/dist/esm/component/BiuACascader/index.js +8 -0
- package/dist/esm/component/BiuADatePicker/index.d.ts +19 -0
- package/dist/esm/component/BiuADatePicker/index.js +18 -0
- package/dist/esm/component/BiuAForm/index.d.ts +7 -0
- package/dist/esm/component/BiuAForm/index.js +10 -0
- package/dist/esm/component/BiuAInput/index.d.ts +14 -0
- package/dist/esm/component/BiuAInput/index.js +32 -0
- package/dist/esm/component/BiuASelect/index.d.ts +6 -0
- package/dist/esm/component/BiuASelect/index.js +14 -0
- package/dist/esm/component/BiuASwitch/index.d.ts +2 -0
- package/dist/esm/component/BiuASwitch/index.js +9 -0
- package/dist/esm/component/BiuATimePicker/index.d.ts +4 -0
- package/dist/esm/component/BiuATimePicker/index.js +8 -0
- package/dist/esm/component/BiuATreeSelect/index.d.ts +2 -0
- package/dist/esm/component/BiuATreeSelect/index.js +8 -0
- package/dist/esm/component/BiuBar/index.d.ts +13 -0
- package/dist/esm/component/BiuBar/index.js +42 -0
- package/dist/esm/component/BiuComSelect/index.d.ts +24 -0
- package/dist/esm/component/BiuComSelect/index.js +104 -0
- package/dist/esm/component/BiuCue/index.d.ts +18 -0
- package/dist/esm/component/BiuCue/index.js +44 -0
- package/dist/esm/component/BiuCustomSelect/index.d.ts +19 -0
- package/dist/esm/component/BiuCustomSelect/index.js +153 -0
- package/dist/esm/component/BiuCustomTable/index.d.ts +14 -0
- package/dist/esm/component/BiuCustomTable/index.js +76 -0
- package/dist/esm/component/BiuCustomerOperCard/component/editTable.d.ts +8 -0
- package/dist/esm/component/BiuCustomerOperCard/component/editTable.js +264 -0
- package/dist/esm/component/BiuCustomerOperCard/component/index.d.ts +1 -0
- package/dist/esm/component/BiuCustomerOperCard/component/index.js +1 -0
- package/dist/esm/component/BiuCustomerOperCard/index.d.ts +20 -0
- package/dist/esm/component/BiuCustomerOperCard/index.js +56 -0
- package/dist/esm/component/BiuCustomerOperCard/type.d.ts +117 -0
- package/dist/esm/component/BiuCustomerOperCard/type.js +1 -0
- package/dist/esm/component/BiuCustomerOperCard/utils.d.ts +48 -0
- package/dist/esm/component/BiuCustomerOperCard/utils.js +236 -0
- package/dist/esm/component/BiuDescriptions/index.d.ts +9 -0
- package/dist/esm/component/BiuDescriptions/index.js +39 -0
- package/dist/esm/component/BiuDetailDrawer/index.d.ts +15 -0
- package/dist/esm/component/BiuDetailDrawer/index.js +54 -0
- package/dist/esm/component/BiuDivider/index.d.ts +4 -0
- package/dist/esm/component/BiuDivider/index.js +29 -0
- package/dist/esm/component/BiuField/component/AddressTableSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/AddressTableSelect.js +150 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/index.d.ts +3 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/index.js +3 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertSubValue.d.ts +2 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertSubValue.js +49 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertUnSubValue.d.ts +2 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertUnSubValue.js +98 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useInConvertUnSubValue.d.ts +5 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useInConvertUnSubValue.js +82 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/index.d.ts +14 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/index.js +393 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/type.d.ts +123 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/type.js +1 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/utils.d.ts +5 -0
- package/dist/esm/component/BiuField/component/DepartOrgSelect/utils.js +59 -0
- package/dist/esm/component/BiuField/component/OMSSystem/cityAreaSelect.d.ts +12 -0
- package/dist/esm/component/BiuField/component/OMSSystem/cityAreaSelect.js +130 -0
- package/dist/esm/component/BiuField/component/OMSSystem/warehouseSel.d.ts +7 -0
- package/dist/esm/component/BiuField/component/OMSSystem/warehouseSel.js +80 -0
- package/dist/esm/component/BiuField/component/SNInput.d.ts +13 -0
- package/dist/esm/component/BiuField/component/SNInput.js +622 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.d.ts +23 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/addressSelect.js +187 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/base.d.ts +13 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/base.js +153 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/goodSelect.d.ts +21 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/goodSelect.js +238 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/index.d.ts +3 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/index.js +66 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/interface.d.ts +16 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/interface.js +1 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.d.ts +24 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.js +164 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/package.d.ts +3 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/package.js +149 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/supplierSelect.d.ts +18 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/supplierSelect.js +145 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseAreaSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseAreaSelect.js +113 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseInfoSelects.d.ts +18 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/warehouseInfoSelects.js +100 -0
- package/dist/esm/component/BiuField/component/appliedgoodsTypeSelect.d.ts +9 -0
- package/dist/esm/component/BiuField/component/appliedgoodsTypeSelect.js +75 -0
- package/dist/esm/component/BiuField/component/autoComplete.d.ts +8 -0
- package/dist/esm/component/BiuField/component/autoComplete.js +82 -0
- package/dist/esm/component/BiuField/component/boxTypeSelect.d.ts +11 -0
- package/dist/esm/component/BiuField/component/boxTypeSelect.js +139 -0
- package/dist/esm/component/BiuField/component/businessdistrictselect.d.ts +55 -0
- package/dist/esm/component/BiuField/component/businessdistrictselect.js +414 -0
- package/dist/esm/component/BiuField/component/carrierInfoSelect.d.ts +13 -0
- package/dist/esm/component/BiuField/component/carrierInfoSelect.js +145 -0
- package/dist/esm/component/BiuField/component/channelSelect.d.ts +8 -0
- package/dist/esm/component/BiuField/component/channelSelect.js +94 -0
- package/dist/esm/component/BiuField/component/cityAreaCascader.d.ts +11 -0
- package/dist/esm/component/BiuField/component/cityAreaCascader.js +86 -0
- package/dist/esm/component/BiuField/component/clientInfoTableSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/clientInfoTableSelect.js +175 -0
- package/dist/esm/component/BiuField/component/customMenu.d.ts +3 -0
- package/dist/esm/component/BiuField/component/customMenu.js +110 -0
- package/dist/esm/component/BiuField/component/databaseSelect.d.ts +6 -0
- package/dist/esm/component/BiuField/component/databaseSelect.js +42 -0
- package/dist/esm/component/BiuField/component/departmentTreeSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/departmentTreeSelect.js +107 -0
- package/dist/esm/component/BiuField/component/dicNameSelect.d.ts +12 -0
- package/dist/esm/component/BiuField/component/dicNameSelect.js +53 -0
- package/dist/esm/component/BiuField/component/dicTypeSelect.d.ts +41 -0
- package/dist/esm/component/BiuField/component/dicTypeSelect.js +84 -0
- package/dist/esm/component/BiuField/component/dockingPartySelect.d.ts +8 -0
- package/dist/esm/component/BiuField/component/dockingPartySelect.js +63 -0
- package/dist/esm/component/BiuField/component/editLocationSelect.d.ts +18 -0
- package/dist/esm/component/BiuField/component/editLocationSelect.js +119 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/accountSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/accountSelect.js +36 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/addresSelect.d.ts +14 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/addresSelect.js +97 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/platformSelect.d.ts +7 -0
- package/dist/esm/component/BiuField/component/electronicFaceSheet/platformSelect.js +73 -0
- package/dist/esm/component/BiuField/component/goodsTypeSelect.d.ts +10 -0
- package/dist/esm/component/BiuField/component/goodsTypeSelect.js +92 -0
- package/dist/esm/component/BiuField/component/index.d.ts +37 -0
- package/dist/esm/component/BiuField/component/index.js +37 -0
- package/dist/esm/component/BiuField/component/interfaceNameSelect.d.ts +9 -0
- package/dist/esm/component/BiuField/component/interfaceNameSelect.js +65 -0
- package/dist/esm/component/BiuField/component/lpnSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/lpnSelect.js +88 -0
- package/dist/esm/component/BiuField/component/orderTypeSelect.d.ts +15 -0
- package/dist/esm/component/BiuField/component/orderTypeSelect.js +79 -0
- package/dist/esm/component/BiuField/component/orderTypeTableSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/orderTypeTableSelect.js +45 -0
- package/dist/esm/component/BiuField/component/parkSelect.d.ts +12 -0
- package/dist/esm/component/BiuField/component/parkSelect.js +88 -0
- package/dist/esm/component/BiuField/component/personnelinfoselect.d.ts +57 -0
- package/dist/esm/component/BiuField/component/personnelinfoselect.js +431 -0
- package/dist/esm/component/BiuField/component/propertNameSelect.d.ts +9 -0
- package/dist/esm/component/BiuField/component/propertNameSelect.js +114 -0
- package/dist/esm/component/BiuField/component/shipperTableSelect.d.ts +3 -0
- package/dist/esm/component/BiuField/component/shipperTableSelect.js +94 -0
- package/dist/esm/component/BiuField/component/userSelect.d.ts +8 -0
- package/dist/esm/component/BiuField/component/userSelect.js +163 -0
- package/dist/esm/component/BiuField/component/warehouseAreaSelect.d.ts +9 -0
- package/dist/esm/component/BiuField/component/warehouseAreaSelect.js +103 -0
- package/dist/esm/component/BiuField/component/warehouseInfoSelect.d.ts +13 -0
- package/dist/esm/component/BiuField/component/warehouseInfoSelect.js +92 -0
- package/dist/esm/component/BiuField/component/warehouseLoctionSelect.d.ts +14 -0
- package/dist/esm/component/BiuField/component/warehouseLoctionSelect.js +124 -0
- package/dist/esm/component/BiuField/index.d.ts +8 -0
- package/dist/esm/component/BiuField/index.js +607 -0
- package/dist/esm/component/BiuFileInput/index.d.ts +11 -0
- package/dist/esm/component/BiuFileInput/index.js +53 -0
- package/dist/esm/component/BiuForm/index.d.ts +12 -0
- package/dist/esm/component/BiuForm/index.js +241 -0
- package/dist/esm/component/BiuForm/type.d.ts +45 -0
- package/dist/esm/component/BiuForm/type.js +1 -0
- package/dist/esm/component/BiuForm/utils.d.ts +2 -0
- package/dist/esm/component/BiuForm/utils.js +46 -0
- package/dist/esm/component/BiuIcon/index.d.ts +3 -0
- package/dist/esm/component/BiuIcon/index.js +15 -0
- package/dist/esm/component/BiuMapSelectSite/index.d.ts +48 -0
- package/dist/esm/component/BiuMapSelectSite/index.js +453 -0
- package/dist/esm/component/BiuModal/index.d.ts +24 -0
- package/dist/esm/component/BiuModal/index.js +239 -0
- package/dist/esm/component/BiuOperForm/index.d.ts +15 -0
- package/dist/esm/component/BiuOperForm/index.js +375 -0
- package/dist/esm/component/BiuOperForm/type.d.ts +23 -0
- package/dist/esm/component/BiuOperForm/type.js +1 -0
- package/dist/esm/component/BiuOperTable/index.d.ts +15 -0
- package/dist/esm/component/BiuOperTable/index.js +349 -0
- package/dist/esm/component/BiuOperTable/type.d.ts +142 -0
- package/dist/esm/component/BiuOperTable/type.js +1 -0
- package/dist/esm/component/BiuOperTable/utils.d.ts +6 -0
- package/dist/esm/component/BiuOperTable/utils.js +13 -0
- package/dist/esm/component/BiuPagination/index.d.ts +14 -0
- package/dist/esm/component/BiuPagination/index.js +34 -0
- package/dist/esm/component/BiuResizeTable/component/biuTableCell.d.ts +1 -0
- package/dist/esm/component/BiuResizeTable/component/biuTableCell.js +74 -0
- package/dist/esm/component/BiuResizeTable/component/index.d.ts +1 -0
- package/dist/esm/component/BiuResizeTable/component/index.js +1 -0
- package/dist/esm/component/BiuResizeTable/index.d.ts +2 -0
- package/dist/esm/component/BiuResizeTable/index.js +71 -0
- package/dist/esm/component/BiuResizeTable/index.less +19 -0
- package/dist/esm/component/BiuSplit/index.d.ts +32 -0
- package/dist/esm/component/BiuSplit/index.js +57 -0
- package/dist/esm/component/BiuTable/component/index.d.ts +3 -0
- package/dist/esm/component/BiuTable/component/index.js +3 -0
- package/dist/esm/component/BiuTable/component/tableActionBarRender.d.ts +9 -0
- package/dist/esm/component/BiuTable/component/tableActionBarRender.js +88 -0
- package/dist/esm/component/BiuTable/component/tableCellRender.d.ts +14 -0
- package/dist/esm/component/BiuTable/component/tableCellRender.js +108 -0
- package/dist/esm/component/BiuTable/component/tableSettingRender.d.ts +2 -0
- package/dist/esm/component/BiuTable/component/tableSettingRender.js +345 -0
- package/dist/esm/component/BiuTable/context.d.ts +2 -0
- package/dist/esm/component/BiuTable/context.js +2 -0
- package/dist/esm/component/BiuTable/hooks/index.d.ts +1 -0
- package/dist/esm/component/BiuTable/hooks/index.js +1 -0
- package/dist/esm/component/BiuTable/hooks/useFetchData.d.ts +4 -0
- package/dist/esm/component/BiuTable/hooks/useFetchData.js +64 -0
- package/dist/esm/component/BiuTable/index.d.ts +42 -0
- package/dist/esm/component/BiuTable/index.js +484 -0
- package/dist/esm/component/BiuTable/type.d.ts +168 -0
- package/dist/esm/component/BiuTable/type.js +1 -0
- package/dist/esm/component/BiuTable/utils.d.ts +10 -0
- package/dist/esm/component/BiuTable/utils.js +117 -0
- package/dist/esm/component/BiuTableLink/index.d.ts +11 -0
- package/dist/esm/component/BiuTableLink/index.js +54 -0
- package/dist/esm/component/BiuTableSelect/index.d.ts +49 -0
- package/dist/esm/component/BiuTableSelect/index.js +209 -0
- package/dist/esm/component/BiuTabs/index.d.ts +4 -0
- package/dist/esm/component/BiuTabs/index.js +18 -0
- package/dist/esm/component/BiuVirtualTable/index.d.ts +21 -0
- package/dist/esm/component/BiuVirtualTable/index.js +161 -0
- package/dist/esm/component/index.d.ts +35 -0
- package/dist/esm/component/index.js +35 -0
- package/dist/esm/constant/Cache_Key.d.ts +28 -0
- package/dist/esm/constant/Cache_Key.js +28 -0
- package/dist/esm/constant/DateTime.d.ts +12 -0
- package/dist/esm/constant/DateTime.js +15 -0
- package/dist/esm/constant/External.d.ts +64 -0
- package/dist/esm/constant/External.js +260 -0
- package/dist/esm/constant/Gateway_Path.d.ts +5 -0
- package/dist/esm/constant/Gateway_Path.js +5 -0
- package/dist/esm/constant/Layout.d.ts +210 -0
- package/dist/esm/constant/Layout.js +215 -0
- package/dist/esm/constant/Regexp.d.ts +109 -0
- package/dist/esm/constant/Regexp.js +130 -0
- package/dist/esm/constant/index.d.ts +6 -0
- package/dist/esm/constant/index.js +6 -0
- package/dist/esm/hooks/index.d.ts +6 -0
- package/dist/esm/hooks/index.js +6 -0
- package/dist/esm/hooks/useAuth.d.ts +4 -0
- package/dist/esm/hooks/useAuth.js +22 -0
- package/dist/esm/hooks/useCurrentSystem.d.ts +6 -0
- package/dist/esm/hooks/useCurrentSystem.js +15 -0
- package/dist/esm/hooks/useLayoutInfo.d.ts +10 -0
- package/dist/esm/hooks/useLayoutInfo.js +14 -0
- package/dist/esm/hooks/useReducerState.d.ts +16 -0
- package/dist/esm/hooks/useReducerState.js +43 -0
- package/dist/esm/hooks/useUserInfo.d.ts +4 -0
- package/dist/esm/hooks/useUserInfo.js +15 -0
- package/dist/esm/hooks/useWareInfo.d.ts +4 -0
- package/dist/esm/hooks/useWareInfo.js +15 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/package/index.d.ts +1 -0
- package/dist/esm/package/index.js +1 -0
- package/dist/esm/package/requestWrapper/baseRequest.d.ts +3 -0
- package/dist/esm/package/requestWrapper/baseRequest.js +47 -0
- package/dist/esm/package/requestWrapper/index.d.ts +4 -0
- package/dist/esm/package/requestWrapper/index.js +402 -0
- package/dist/esm/package/requestWrapper/type.d.ts +36 -0
- package/dist/esm/package/requestWrapper/type.js +1 -0
- package/dist/esm/package/requestWrapper/utils.d.ts +10 -0
- package/dist/esm/package/requestWrapper/utils.js +35 -0
- package/dist/esm/utils/authUtils.d.ts +18 -0
- package/dist/esm/utils/authUtils.js +36 -0
- package/dist/esm/utils/cacheUtils.d.ts +4 -0
- package/dist/esm/utils/cacheUtils.js +24 -0
- package/dist/esm/utils/chainUtils.d.ts +26 -0
- package/dist/esm/utils/chainUtils.js +54 -0
- package/dist/esm/utils/dateUtils.d.ts +23 -0
- package/dist/esm/utils/dateUtils.js +55 -0
- package/dist/esm/utils/decimalUtils.d.ts +5 -0
- package/dist/esm/utils/decimalUtils.js +7 -0
- package/dist/esm/utils/excelUtils.d.ts +22 -0
- package/dist/esm/utils/excelUtils.js +153 -0
- package/dist/esm/utils/index.d.ts +11 -0
- package/dist/esm/utils/index.js +11 -0
- package/dist/esm/utils/layoutUtils.d.ts +1 -0
- package/dist/esm/utils/layoutUtils.js +13 -0
- package/dist/esm/utils/objectUtils.d.ts +1 -0
- package/dist/esm/utils/objectUtils.js +3 -0
- package/dist/esm/utils/soundUtils.d.ts +5 -0
- package/dist/esm/utils/soundUtils.js +29 -0
- package/dist/esm/utils/stringUtils.d.ts +24 -0
- package/dist/esm/utils/stringUtils.js +39 -0
- package/dist/esm/utils/sysUtils.d.ts +4 -0
- package/dist/esm/utils/sysUtils.js +4 -0
- package/package.json +59 -0
@@ -0,0 +1,345 @@
|
|
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
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
3
|
+
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."); }
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
10
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
11
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
12
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
13
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
15
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
16
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
17
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
18
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
20
|
+
import { HolderOutlined, ToTopOutlined } from '@ant-design/icons';
|
21
|
+
import { Button, Form, InputNumber, Space, Switch, Table, Tag, notification } from 'antd';
|
22
|
+
import React, { useCallback, useContext, useEffect, useMemo } from 'react';
|
23
|
+
import ReactDragListView from 'react-drag-listview';
|
24
|
+
import { ColumnsContext } from "../context";
|
25
|
+
import { BiuAButton, BiuAInput, BiuASwitch } from "../..";
|
26
|
+
import { GATEWAY_ROUTE_MDM } from "../../../constant";
|
27
|
+
import { useUserInfo } from "../../../hooks";
|
28
|
+
import { request } from "../../../package";
|
29
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
30
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
31
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
32
|
+
export var TableSettingRender = /*#__PURE__*/React.memo(function () {
|
33
|
+
var pathname = window.location.hash || '-1';
|
34
|
+
var _useUserInfo = useUserInfo(),
|
35
|
+
_useUserInfo2 = _slicedToArray(_useUserInfo, 1),
|
36
|
+
_useUserInfo2$ = _useUserInfo2[0],
|
37
|
+
_useUserInfo2$2 = _useUserInfo2$ === void 0 ? {
|
38
|
+
employeecode: ''
|
39
|
+
} : _useUserInfo2$,
|
40
|
+
employeecode = _useUserInfo2$2.employeecode;
|
41
|
+
var _Form$useForm = Form.useForm(),
|
42
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
43
|
+
form = _Form$useForm2[0];
|
44
|
+
var _useContext = useContext(ColumnsContext),
|
45
|
+
selectedSetting = _useContext.selectedSetting,
|
46
|
+
setSelectedSetting = _useContext.setSelectedSetting,
|
47
|
+
customSettings = _useContext.customSettings,
|
48
|
+
setCustomSettings = _useContext.setCustomSettings,
|
49
|
+
baseColumns = _useContext.baseColumns,
|
50
|
+
selectedLayout = _useContext.selectedLayout,
|
51
|
+
setSelectedLayout = _useContext.setSelectedLayout,
|
52
|
+
putSelectedLayout = _useContext.putSelectedLayout,
|
53
|
+
moveSelectedLayout = _useContext.moveSelectedLayout;
|
54
|
+
var toTopColumn = useCallback(function (index) {
|
55
|
+
moveSelectedLayout(index, 0);
|
56
|
+
}, [moveSelectedLayout]);
|
57
|
+
useEffect(function () {
|
58
|
+
if ((selectedLayout === null || selectedLayout === void 0 ? void 0 : selectedLayout.id) === '0000') {
|
59
|
+
form.setFieldsValue({
|
60
|
+
layoutName: '',
|
61
|
+
defaultTemplate: false
|
62
|
+
});
|
63
|
+
return;
|
64
|
+
}
|
65
|
+
form.setFieldsValue({
|
66
|
+
layoutName: selectedSetting === null || selectedSetting === void 0 ? void 0 : selectedSetting.layoutName,
|
67
|
+
defaultTemplate: (selectedSetting === null || selectedSetting === void 0 ? void 0 : selectedSetting.defaultTemplate) === 1
|
68
|
+
});
|
69
|
+
}, [form, selectedSetting === null || selectedSetting === void 0 ? void 0 : selectedSetting.layoutName, selectedSetting === null || selectedSetting === void 0 ? void 0 : selectedSetting.defaultTemplate, selectedLayout === null || selectedLayout === void 0 ? void 0 : selectedLayout.id]);
|
70
|
+
var moveColumn = useCallback(function (dragIndex, hoverIndex) {
|
71
|
+
moveSelectedLayout(dragIndex, hoverIndex);
|
72
|
+
}, [moveSelectedLayout]);
|
73
|
+
var putColumn = useCallback(function (index, data) {
|
74
|
+
putSelectedLayout(index, data);
|
75
|
+
}, [putSelectedLayout]);
|
76
|
+
var deleteSettings = useCallback( /*#__PURE__*/function () {
|
77
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
78
|
+
var id;
|
79
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
80
|
+
while (1) switch (_context.prev = _context.next) {
|
81
|
+
case 0:
|
82
|
+
id = _ref.id;
|
83
|
+
_context.next = 3;
|
84
|
+
return request({
|
85
|
+
apiName: 'mdm.layout.layoutDelete',
|
86
|
+
requestConfig: {
|
87
|
+
GatewayRoute: GATEWAY_ROUTE_MDM
|
88
|
+
},
|
89
|
+
data: {
|
90
|
+
id: id
|
91
|
+
}
|
92
|
+
});
|
93
|
+
case 3:
|
94
|
+
setCustomSettings(function (cs) {
|
95
|
+
return cs.filter(function (n) {
|
96
|
+
return n.id !== id;
|
97
|
+
});
|
98
|
+
});
|
99
|
+
case 4:
|
100
|
+
case "end":
|
101
|
+
return _context.stop();
|
102
|
+
}
|
103
|
+
}, _callee);
|
104
|
+
}));
|
105
|
+
return function (_x) {
|
106
|
+
return _ref2.apply(this, arguments);
|
107
|
+
};
|
108
|
+
}(), [setCustomSettings]);
|
109
|
+
var handleUpdateCustomLayout = useCallback( /*#__PURE__*/function () {
|
110
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(values) {
|
111
|
+
var isUpdate, layoutSetting, result, index;
|
112
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
113
|
+
while (1) switch (_context2.prev = _context2.next) {
|
114
|
+
case 0:
|
115
|
+
isUpdate = customSettings.some(function (layout) {
|
116
|
+
return layout.layoutName === values.layoutName;
|
117
|
+
});
|
118
|
+
layoutSetting = _objectSpread(_objectSpread(_objectSpread({}, selectedSetting), {}, {
|
119
|
+
systemName: '-',
|
120
|
+
moduleName: pathname,
|
121
|
+
layoutJson: JSON.stringify(selectedLayout),
|
122
|
+
templateType: 1,
|
123
|
+
employeCode: employeecode
|
124
|
+
}, values), {}, {
|
125
|
+
defaultTemplate: values !== null && values !== void 0 && values.defaultTemplate ? 1 : 0
|
126
|
+
});
|
127
|
+
_context2.prev = 2;
|
128
|
+
_context2.next = 5;
|
129
|
+
return request({
|
130
|
+
apiName: 'mdm.layout.layoutOper',
|
131
|
+
requestConfig: {
|
132
|
+
GatewayRoute: GATEWAY_ROUTE_MDM
|
133
|
+
},
|
134
|
+
data: _objectSpread({}, layoutSetting)
|
135
|
+
});
|
136
|
+
case 5:
|
137
|
+
result = _context2.sent;
|
138
|
+
notification.success({
|
139
|
+
message: '成功',
|
140
|
+
description: "\u6A21\u677F".concat(isUpdate ? '修改' : '新增', "\u6210\u529F\uFF0C\u53EF\u624B\u52A8\u5207\u6362\u81F3\u9ED8\u8BA4\u6A21\u677F\uFF01")
|
141
|
+
});
|
142
|
+
layoutSetting.id = result;
|
143
|
+
|
144
|
+
/**
|
145
|
+
* 新增的是默认模板,其他模板都要调整为非默认
|
146
|
+
*/
|
147
|
+
if (layoutSetting.defaultTemplate === 1) {
|
148
|
+
setCustomSettings(function (cs) {
|
149
|
+
return cs.map(function (layout) {
|
150
|
+
return _objectSpread(_objectSpread({}, layout), {}, {
|
151
|
+
defaultTemplate: 0
|
152
|
+
});
|
153
|
+
});
|
154
|
+
});
|
155
|
+
}
|
156
|
+
if (isUpdate) {
|
157
|
+
index = customSettings.findIndex(function (layout) {
|
158
|
+
return layout.layoutName === values.layoutName;
|
159
|
+
});
|
160
|
+
setCustomSettings(function (cs) {
|
161
|
+
cs.splice(index, 1, _objectSpread({}, layoutSetting));
|
162
|
+
return cs;
|
163
|
+
});
|
164
|
+
} else {
|
165
|
+
setCustomSettings(function (cs) {
|
166
|
+
return [].concat(_toConsumableArray(cs), [_objectSpread({}, layoutSetting)]);
|
167
|
+
});
|
168
|
+
}
|
169
|
+
setSelectedSetting(_objectSpread({}, layoutSetting));
|
170
|
+
_context2.next = 16;
|
171
|
+
break;
|
172
|
+
case 13:
|
173
|
+
_context2.prev = 13;
|
174
|
+
_context2.t0 = _context2["catch"](2);
|
175
|
+
notification.error({
|
176
|
+
message: '失败',
|
177
|
+
description: _context2.t0.message
|
178
|
+
});
|
179
|
+
case 16:
|
180
|
+
case "end":
|
181
|
+
return _context2.stop();
|
182
|
+
}
|
183
|
+
}, _callee2, null, [[2, 13]]);
|
184
|
+
}));
|
185
|
+
return function (_x2) {
|
186
|
+
return _ref3.apply(this, arguments);
|
187
|
+
};
|
188
|
+
}(), [customSettings, employeecode, pathname, selectedLayout, selectedSetting, setCustomSettings, setSelectedSetting]);
|
189
|
+
var columns = useMemo(function () {
|
190
|
+
return [{
|
191
|
+
dataIndex: 'opera',
|
192
|
+
align: 'center',
|
193
|
+
width: 45,
|
194
|
+
render: function render() {
|
195
|
+
return /*#__PURE__*/_jsx(HolderOutlined, {
|
196
|
+
style: {
|
197
|
+
cursor: 'move',
|
198
|
+
marginRight: 8
|
199
|
+
}
|
200
|
+
});
|
201
|
+
}
|
202
|
+
}, {
|
203
|
+
align: 'center',
|
204
|
+
width: 50,
|
205
|
+
render: function render(text, record, index) {
|
206
|
+
return /*#__PURE__*/_jsx(Button, {
|
207
|
+
icon: /*#__PURE__*/_jsx(ToTopOutlined, {}),
|
208
|
+
type: "text",
|
209
|
+
onClick: function onClick() {
|
210
|
+
return toTopColumn(index);
|
211
|
+
}
|
212
|
+
});
|
213
|
+
}
|
214
|
+
}, {
|
215
|
+
title: '列名',
|
216
|
+
dataIndex: 'title',
|
217
|
+
width: 120
|
218
|
+
}, {
|
219
|
+
title: '字段名称',
|
220
|
+
dataIndex: 'dataIndex',
|
221
|
+
width: 150
|
222
|
+
}, {
|
223
|
+
title: '列宽',
|
224
|
+
dataIndex: 'width',
|
225
|
+
width: 150,
|
226
|
+
render: function render(text, record, index) {
|
227
|
+
var _record$width;
|
228
|
+
return /*#__PURE__*/_jsx(InputNumber, {
|
229
|
+
style: {
|
230
|
+
width: '100%'
|
231
|
+
},
|
232
|
+
value: (_record$width = record.width) !== null && _record$width !== void 0 ? _record$width : 150,
|
233
|
+
onChange: function onChange(value) {
|
234
|
+
if (putColumn) putColumn(index, _objectSpread(_objectSpread({}, record), {}, {
|
235
|
+
width: value
|
236
|
+
}));
|
237
|
+
}
|
238
|
+
});
|
239
|
+
}
|
240
|
+
}, {
|
241
|
+
title: '表格列显示',
|
242
|
+
dataIndex: 'noShow',
|
243
|
+
width: 120,
|
244
|
+
render: function render(text, record, index) {
|
245
|
+
return /*#__PURE__*/_jsx(Switch, {
|
246
|
+
checked: !record.noShow,
|
247
|
+
onChange: function onChange(value) {
|
248
|
+
if (putColumn) putColumn(index, _objectSpread(_objectSpread({}, record), {}, {
|
249
|
+
noShow: !value
|
250
|
+
}));
|
251
|
+
}
|
252
|
+
});
|
253
|
+
}
|
254
|
+
}];
|
255
|
+
}, [putColumn, toTopColumn]);
|
256
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
257
|
+
children: [/*#__PURE__*/_jsx(Space, {
|
258
|
+
wrap: true,
|
259
|
+
style: {
|
260
|
+
marginBottom: '4px'
|
261
|
+
},
|
262
|
+
children: customSettings.map(function (layout) {
|
263
|
+
return /*#__PURE__*/_jsxs(Tag, {
|
264
|
+
color: layout.id === (selectedSetting === null || selectedSetting === void 0 ? void 0 : selectedSetting.id) ? 'gold' : '',
|
265
|
+
closable: layout.id !== (selectedSetting === null || selectedSetting === void 0 ? void 0 : selectedSetting.id) && (layout === null || layout === void 0 ? void 0 : layout.id) !== '0000',
|
266
|
+
onClick: function onClick() {
|
267
|
+
setSelectedSetting(_objectSpread({}, layout));
|
268
|
+
if ((layout === null || layout === void 0 ? void 0 : layout.id) === '0000') {
|
269
|
+
setSelectedLayout(_toConsumableArray(baseColumns));
|
270
|
+
return;
|
271
|
+
}
|
272
|
+
setSelectedLayout(_toConsumableArray(JSON.parse((layout === null || layout === void 0 ? void 0 : layout.layoutJson) || '[]')));
|
273
|
+
},
|
274
|
+
onClose: function onClose() {
|
275
|
+
deleteSettings(layout);
|
276
|
+
},
|
277
|
+
style: {
|
278
|
+
margin: '0',
|
279
|
+
cursor: 'pointer'
|
280
|
+
},
|
281
|
+
children: [layout === null || layout === void 0 ? void 0 : layout.layoutName, +(layout === null || layout === void 0 ? void 0 : layout.defaultTemplate) === 1 ? '🌟' : '']
|
282
|
+
}, layout.id);
|
283
|
+
})
|
284
|
+
}), /*#__PURE__*/_jsx(ReactDragListView, {
|
285
|
+
onDragEnd: function onDragEnd(oldIndex, newIndex) {
|
286
|
+
if (moveColumn) moveColumn(oldIndex - 1, newIndex - 1);
|
287
|
+
},
|
288
|
+
handleSelector: 'span[aria-label="holder"]',
|
289
|
+
children: /*#__PURE__*/_jsx(Table, {
|
290
|
+
scroll: {
|
291
|
+
y: 400,
|
292
|
+
x: 450
|
293
|
+
},
|
294
|
+
rowKey: "dataIndex",
|
295
|
+
pagination: false,
|
296
|
+
columns: columns,
|
297
|
+
dataSource: selectedLayout || []
|
298
|
+
})
|
299
|
+
}), /*#__PURE__*/_jsx(Form, {
|
300
|
+
layout: "inline",
|
301
|
+
form: form,
|
302
|
+
onFinish: handleUpdateCustomLayout,
|
303
|
+
children: /*#__PURE__*/_jsxs("div", {
|
304
|
+
style: {
|
305
|
+
width: '100%',
|
306
|
+
paddingTop: '4px',
|
307
|
+
display: 'flex',
|
308
|
+
alignItems: 'center'
|
309
|
+
},
|
310
|
+
children: [/*#__PURE__*/_jsx(Form.Item, {
|
311
|
+
noStyle: true,
|
312
|
+
name: "layoutName",
|
313
|
+
rules: [{
|
314
|
+
required: true
|
315
|
+
}],
|
316
|
+
children: /*#__PURE__*/_jsx(BiuAInput, {
|
317
|
+
placeholder: "\u8BF7\u8F93\u5165\u6A21\u677F\u540D\u79F0\uFF01",
|
318
|
+
style: {
|
319
|
+
flex: '1',
|
320
|
+
marginRight: '10px'
|
321
|
+
}
|
322
|
+
})
|
323
|
+
}, "layoutName"), /*#__PURE__*/_jsx(Form.Item, {
|
324
|
+
noStyle: true,
|
325
|
+
name: "defaultTemplate",
|
326
|
+
valuePropName: "checked",
|
327
|
+
rules: [{
|
328
|
+
required: false
|
329
|
+
}],
|
330
|
+
children: /*#__PURE__*/_jsx(BiuASwitch, {})
|
331
|
+
}, "defaultTemplate"), /*#__PURE__*/_jsx(Form.Item, {
|
332
|
+
noStyle: true,
|
333
|
+
children: /*#__PURE__*/_jsx(BiuAButton, {
|
334
|
+
style: {
|
335
|
+
marginLeft: '8px'
|
336
|
+
},
|
337
|
+
type: "primary",
|
338
|
+
htmlType: "submit",
|
339
|
+
children: "\u63D0\u4EA4\u6A21\u677F"
|
340
|
+
})
|
341
|
+
})]
|
342
|
+
})
|
343
|
+
})]
|
344
|
+
});
|
345
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './useFetchData';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./useFetchData";
|
@@ -0,0 +1,64 @@
|
|
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 = ["current", "pageSize"];
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
10
|
+
import { usePagination } from 'ahooks';
|
11
|
+
export var useFetchData = function useFetchData(_ref) {
|
12
|
+
var fetchData = _ref.fetchData;
|
13
|
+
var _usePagination = usePagination(
|
14
|
+
// 接口 请求页
|
15
|
+
function (_ref2) {
|
16
|
+
var _ref2$current = _ref2.current,
|
17
|
+
page = _ref2$current === void 0 ? 1 : _ref2$current,
|
18
|
+
_ref2$pageSize = _ref2.pageSize,
|
19
|
+
size = _ref2$pageSize === void 0 ? 20 : _ref2$pageSize,
|
20
|
+
requestParams = _objectWithoutProperties(_ref2, _excluded);
|
21
|
+
return fetchData(_objectSpread({
|
22
|
+
page: page,
|
23
|
+
size: size
|
24
|
+
}, requestParams)).then(function () {
|
25
|
+
var result = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
26
|
+
var _result$total = result.total,
|
27
|
+
total = _result$total === void 0 ? 0 : _result$total,
|
28
|
+
_result$rows = result.rows,
|
29
|
+
list = _result$rows === void 0 ? [] : _result$rows,
|
30
|
+
summary = result.summary;
|
31
|
+
return {
|
32
|
+
total: total,
|
33
|
+
list: list,
|
34
|
+
summary: summary
|
35
|
+
};
|
36
|
+
}).catch(function () {
|
37
|
+
return {
|
38
|
+
total: 0,
|
39
|
+
list: [],
|
40
|
+
summary: undefined
|
41
|
+
};
|
42
|
+
});
|
43
|
+
}, {
|
44
|
+
manual: true,
|
45
|
+
throttleWait: 500,
|
46
|
+
defaultCurrent: 1,
|
47
|
+
defaultPageSize: 20
|
48
|
+
}),
|
49
|
+
run = _usePagination.run,
|
50
|
+
data = _usePagination.data,
|
51
|
+
loading = _usePagination.loading,
|
52
|
+
pagination = _usePagination.pagination;
|
53
|
+
|
54
|
+
/**
|
55
|
+
* 返回重构之后的数据源以及需求的相关属性
|
56
|
+
*/
|
57
|
+
return {
|
58
|
+
run: run,
|
59
|
+
loading: loading,
|
60
|
+
pagination: pagination,
|
61
|
+
dataSource: (data === null || data === void 0 ? void 0 : data.list) || [],
|
62
|
+
summary: (data === null || data === void 0 ? void 0 : data.summary) || {}
|
63
|
+
};
|
64
|
+
};
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import type { BiuTableActionType, BiuColumnType } from "..";
|
3
|
+
export declare const TableInstance: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
4
|
+
tableId?: string | undefined;
|
5
|
+
runFirst?: boolean | undefined;
|
6
|
+
searchForm?: boolean | undefined;
|
7
|
+
tablePostfixOptions?: import("..").BiuTableColumnOpearType[] | undefined;
|
8
|
+
containerStyle?: React.CSSProperties | undefined;
|
9
|
+
operationOptions?: import("..").BiuTableTopOperaType[] | undefined;
|
10
|
+
columns?: BiuColumnType[] | undefined;
|
11
|
+
headLine?: number | undefined;
|
12
|
+
hidePagination?: boolean | undefined;
|
13
|
+
dataAllocation?: ((baseDataSource: Record<string, any>[]) => Record<string, any>[]) | undefined;
|
14
|
+
postData?: ((baseDataSource: Record<string, any>) => Record<string, any>[]) | undefined;
|
15
|
+
request: (params: any) => Promise<any>;
|
16
|
+
onPageChange?: ((page?: number | undefined, pageSize?: number | undefined) => void) | undefined;
|
17
|
+
onPageShowSizeChange?: ((page?: number | undefined, pageSize?: number | undefined) => void) | undefined;
|
18
|
+
rowKey?: string | undefined;
|
19
|
+
onReset?: (() => void) | undefined;
|
20
|
+
} & Omit<import("antd").TableProps<any>, "columns"> & React.RefAttributes<BiuTableActionType>>>;
|
21
|
+
export declare const BiuTable: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
22
|
+
tableId?: string | undefined;
|
23
|
+
runFirst?: boolean | undefined;
|
24
|
+
searchForm?: boolean | undefined;
|
25
|
+
tablePostfixOptions?: import("..").BiuTableColumnOpearType[] | undefined;
|
26
|
+
containerStyle?: React.CSSProperties | undefined;
|
27
|
+
operationOptions?: import("..").BiuTableTopOperaType[] | undefined;
|
28
|
+
columns?: BiuColumnType[] | undefined;
|
29
|
+
headLine?: number | undefined;
|
30
|
+
hidePagination?: boolean | undefined;
|
31
|
+
dataAllocation?: ((baseDataSource: Record<string, any>[]) => Record<string, any>[]) | undefined;
|
32
|
+
postData?: ((baseDataSource: Record<string, any>) => Record<string, any>[]) | undefined;
|
33
|
+
request: (params: any) => Promise<any>;
|
34
|
+
onPageChange?: ((page?: number | undefined, pageSize?: number | undefined) => void) | undefined;
|
35
|
+
onPageShowSizeChange?: ((page?: number | undefined, pageSize?: number | undefined) => void) | undefined;
|
36
|
+
rowKey?: string | undefined;
|
37
|
+
onReset?: (() => void) | undefined;
|
38
|
+
} & Omit<import("antd").TableProps<any>, "columns"> & React.RefAttributes<BiuTableActionType>>>;
|
39
|
+
export * from './component';
|
40
|
+
export * from './type';
|
41
|
+
export * from './utils';
|
42
|
+
export * from './hooks';
|