wargerm 0.6.24 → 0.7.0
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.
- package/dist/components/Calendar/index.d.ts +1 -1
- package/dist/components/Calendar/utils.d.ts +8 -8
- package/dist/components/Cascader/index.d.ts +3 -3
- package/dist/components/DatePicker/index.d.ts +1 -1
- package/dist/components/DragBox/index.d.ts +2 -2
- package/dist/components/Modal/dialog.d.ts +2 -2
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/ModalTips/dialog.d.ts +1 -1
- package/dist/components/ModalTips/index.d.ts +1 -1
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/components/Video/index.d.ts +2 -2
- package/dist/components/WDatePicker/index.d.ts +1 -1
- package/dist/hooks/useCallbackRef.d.ts +6 -0
- package/dist/hooks/useForceUpdate.d.ts +3 -0
- package/dist/index.css +12243 -34
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.css +12243 -34
- package/dist/index.esm.js +355 -339
- package/dist/index.js +357 -362
- package/package.json +90 -91
package/dist/index.esm.js
CHANGED
@@ -1,66 +1,23 @@
|
|
1
|
+
import 'antd/dist/reset.css';
|
1
2
|
import React, { useRef, useEffect, useMemo, useState, useCallback, useImperativeHandle, memo, forwardRef, createRef } from 'react';
|
2
3
|
import { cloneDeep, uniqBy, isEmpty } from 'lodash-es';
|
3
4
|
import { useSyncExternalStore } from 'use-sync-external-store/shim';
|
4
|
-
import 'antd
|
5
|
-
import _Button from 'antd/es/button';
|
6
|
-
import 'antd/es/dropdown/style';
|
7
|
-
import _Dropdown from 'antd/es/dropdown';
|
8
|
-
import 'antd/es/menu/style';
|
9
|
-
import _Menu from 'antd/es/menu';
|
5
|
+
import { Menu, Dropdown, Button, Input, Upload as Upload$1, Modal as Modal$2, message, InputNumber, DatePicker, Radio, Space, Checkbox, Select, Switch, Tooltip, TreeSelect as TreeSelect$1, Cascader, Form, Row, Col, Spin, Pagination, Breadcrumb, ConfigProvider } from 'antd';
|
10
6
|
import { createFromIconfontCN, PlusOutlined, SearchOutlined, ReloadOutlined, CloseCircleOutlined, EllipsisOutlined, ExclamationCircleOutlined, EyeOutlined, EditOutlined, DeleteOutlined, LeftOutlined, RightOutlined, CloseOutlined } from '@ant-design/icons';
|
11
|
-
import 'antd/es/input/style';
|
12
|
-
import _Input from 'antd/es/input';
|
13
|
-
import 'antd/es/modal/style';
|
14
|
-
import _Modal from 'antd/es/modal';
|
15
|
-
import 'antd/es/message/style';
|
16
|
-
import _message from 'antd/es/message';
|
17
|
-
import 'antd/es/upload/style';
|
18
|
-
import _Upload from 'antd/es/upload';
|
19
7
|
import FileViewer from 'react-file-viewer';
|
20
|
-
import 'antd/es/input-number/style';
|
21
|
-
import _InputNumber from 'antd/es/input-number';
|
22
|
-
import 'antd/es/pagination/style';
|
23
|
-
import _Pagination from 'antd/es/pagination';
|
24
|
-
import 'antd/es/spin/style';
|
25
|
-
import _Spin from 'antd/es/spin';
|
26
|
-
import 'antd/es/tooltip/style';
|
27
|
-
import _Tooltip from 'antd/es/tooltip';
|
28
8
|
import classnames from 'classnames';
|
29
|
-
import 'antd/es/space/style';
|
30
|
-
import _Space from 'antd/es/space';
|
31
|
-
import 'antd/es/radio/style';
|
32
|
-
import _Radio from 'antd/es/radio';
|
33
|
-
import 'antd/es/date-picker/style';
|
34
|
-
import _DatePicker from 'antd/es/date-picker';
|
35
9
|
import zhCN from 'antd/es/date-picker/locale/zh_CN';
|
36
|
-
import
|
37
|
-
import '
|
38
|
-
import 'antd/es/checkbox/style';
|
39
|
-
import _Checkbox from 'antd/es/checkbox';
|
40
|
-
import 'antd/es/row/style';
|
41
|
-
import _Row from 'antd/es/row';
|
42
|
-
import 'antd/es/col/style';
|
43
|
-
import _Col from 'antd/es/col';
|
44
|
-
import 'antd/es/form/style';
|
45
|
-
import _Form from 'antd/es/form';
|
46
|
-
import 'antd/es/select/style';
|
47
|
-
import _Select from 'antd/es/select';
|
48
|
-
import 'antd/es/switch/style';
|
49
|
-
import _Switch from 'antd/es/switch';
|
50
|
-
import 'antd/es/tree-select/style';
|
51
|
-
import _TreeSelect from 'antd/es/tree-select';
|
52
|
-
import 'antd/es/cascader/style';
|
53
|
-
import _Cascader from 'antd/es/cascader';
|
10
|
+
import dayjs, { extend, weekdaysMin } from 'dayjs';
|
11
|
+
import 'dayjs/locale/zh-cn';
|
54
12
|
import CountUp from 'react-countup';
|
55
13
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
56
|
-
import SwiperCore, { Pagination, Navigation, Autoplay, Virtual } from 'swiper';
|
57
|
-
import 'antd/es/breadcrumb/style';
|
58
|
-
import _Breadcrumb from 'antd/es/breadcrumb';
|
14
|
+
import SwiperCore, { Pagination as Pagination$1, Navigation, Autoplay, Virtual } from 'swiper';
|
59
15
|
import ReactDOM from 'react-dom';
|
60
16
|
import ProTable from '@ant-design/pro-table';
|
61
|
-
import '
|
62
|
-
import
|
17
|
+
import weekday from 'dayjs/plugin/weekday';
|
18
|
+
import localeData from 'dayjs/plugin/localeData';
|
63
19
|
import zhCN$1 from 'antd/es/locale/zh_CN';
|
20
|
+
import weekOfYear from 'dayjs/plugin/weekOfYear';
|
64
21
|
import Player from 'xgplayer';
|
65
22
|
import FlvPlayer from 'xgplayer-flv.js';
|
66
23
|
import HlsJsPlayer from 'xgplayer-hls.js';
|
@@ -1834,7 +1791,9 @@ function getNodePath(node) {
|
|
1834
1791
|
var result;
|
1835
1792
|
|
1836
1793
|
while (parent) {
|
1837
|
-
|
1794
|
+
var _result;
|
1795
|
+
|
1796
|
+
result = order === 'asc' ? (_result = result) === null || _result === void 0 ? void 0 : _result.concat(parent) : [parent].concat(result);
|
1838
1797
|
parent = parent.parentElement;
|
1839
1798
|
}
|
1840
1799
|
|
@@ -1869,6 +1828,8 @@ function getNodeXPath(node) {
|
|
1869
1828
|
|
1870
1829
|
function clickCollection() {
|
1871
1830
|
document.addEventListener('click', function (e) {
|
1831
|
+
var _path;
|
1832
|
+
|
1872
1833
|
// 点击事件
|
1873
1834
|
var _config = new RequestTemplateClick({
|
1874
1835
|
eventType: 'click'
|
@@ -1876,7 +1837,7 @@ function clickCollection() {
|
|
1876
1837
|
var path = e.path;
|
1877
1838
|
if (path === undefined) path = e.target ? getNodePath(e.target) : []; // 获取被点击的元素到最外层元素组成的数组
|
1878
1839
|
|
1879
|
-
var target = path.find(function (el) {
|
1840
|
+
var target = (_path = path) === null || _path === void 0 ? void 0 : _path.find(function (el) {
|
1880
1841
|
return el.hasAttribute && (el.hasAttribute('data-warden-container') || el.hasAttribute('data-warden-event-id') || el.hasAttribute('data-warden-title'));
|
1881
1842
|
});
|
1882
1843
|
if (!target) return;
|
@@ -2245,23 +2206,40 @@ var wTracing = _objectSpread2({
|
|
2245
2206
|
var _excluded = ["multiple", "children", "disabled"];
|
2246
2207
|
|
2247
2208
|
var WButton = function WButton(props) {
|
2209
|
+
var _multiple$children;
|
2210
|
+
|
2248
2211
|
var multiple = props.multiple,
|
2249
2212
|
children = props.children,
|
2250
2213
|
disabled = props.disabled,
|
2251
2214
|
extraProps = _objectWithoutProperties(props, _excluded);
|
2252
2215
|
|
2253
|
-
var menu = /*#__PURE__*/React.createElement(
|
2216
|
+
var menu = /*#__PURE__*/React.createElement(Menu, {
|
2254
2217
|
onClick: multiple && multiple.handleMenuClick
|
2255
2218
|
}, multiple && multiple.children && multiple.children.map(function (child, index) {
|
2256
|
-
return /*#__PURE__*/React.createElement(
|
2219
|
+
return /*#__PURE__*/React.createElement(Menu.Item, {
|
2257
2220
|
key: index
|
2258
2221
|
}, child);
|
2259
2222
|
}));
|
2260
|
-
return multiple ?
|
2261
|
-
|
2262
|
-
|
2263
|
-
|
2264
|
-
|
2223
|
+
return multiple ?
|
2224
|
+
/*#__PURE__*/
|
2225
|
+
// <Dropdown.Button
|
2226
|
+
// disabled={disabled}
|
2227
|
+
// onClick={multiple && multiple.handleClick}
|
2228
|
+
// overlay={menu}
|
2229
|
+
// >
|
2230
|
+
// {children}
|
2231
|
+
// </Dropdown.Button>
|
2232
|
+
React.createElement(Dropdown.Button, {
|
2233
|
+
menu: {
|
2234
|
+
items: multiple === null || multiple === void 0 ? void 0 : (_multiple$children = multiple.children) === null || _multiple$children === void 0 ? void 0 : _multiple$children.map(function (child, index) {
|
2235
|
+
return {
|
2236
|
+
key: (child === null || child === void 0 ? void 0 : child.key) || index,
|
2237
|
+
label: (child === null || child === void 0 ? void 0 : child.label) || child
|
2238
|
+
};
|
2239
|
+
}),
|
2240
|
+
onClick: multiple && multiple.handleMenuClick
|
2241
|
+
}
|
2242
|
+
}, children) : /*#__PURE__*/React.createElement(Button, _objectSpread2({
|
2265
2243
|
disabled: disabled
|
2266
2244
|
}, extraProps), children);
|
2267
2245
|
};
|
@@ -2290,15 +2268,15 @@ var index = createFromIconfontCN({
|
|
2290
2268
|
var WInput = function WInput(props) {
|
2291
2269
|
var extraProps = _extends({}, props);
|
2292
2270
|
|
2293
|
-
return /*#__PURE__*/React.createElement(
|
2271
|
+
return /*#__PURE__*/React.createElement(Input, _objectSpread2({}, extraProps));
|
2294
2272
|
};
|
2295
2273
|
|
2296
2274
|
var Index = WInput;
|
2297
|
-
Index.TextArea =
|
2275
|
+
Index.TextArea = Input.TextArea;
|
2298
2276
|
WInput.defaultProps = {};
|
2299
2277
|
|
2300
2278
|
var _excluded$1 = ["value", "onChange", "onRemove", "beforeUpload", "uploadButton", "maxCount", "splitStr", "fetchMethod", "getFileList", "type"];
|
2301
|
-
var Dragger =
|
2279
|
+
var Dragger = Upload$1.Dragger;
|
2302
2280
|
|
2303
2281
|
function Index$1(_ref, ref) {
|
2304
2282
|
var value = _ref.value,
|
@@ -2379,13 +2357,13 @@ function Index$1(_ref, ref) {
|
|
2379
2357
|
var isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
2380
2358
|
|
2381
2359
|
if (!isJpgOrPng) {
|
2382
|
-
|
2360
|
+
message.error('You can only upload JPG/PNG file!');
|
2383
2361
|
}
|
2384
2362
|
|
2385
2363
|
var isLt2M = file.size / 1024 / 1024 < 2;
|
2386
2364
|
|
2387
2365
|
if (!isLt2M) {
|
2388
|
-
|
2366
|
+
message.error('Image must smaller than 2MB!');
|
2389
2367
|
}
|
2390
2368
|
|
2391
2369
|
return beforeUpload ? beforeUpload(file) : isJpgOrPng && isLt2M;
|
@@ -2557,7 +2535,7 @@ function Index$1(_ref, ref) {
|
|
2557
2535
|
|
2558
2536
|
return setProgress(Math.floor(percent));
|
2559
2537
|
}
|
2560
|
-
}, props), fileList.length >= maxCount ? null : uploadButton ? uploadButton : uploadButtonDom) : /*#__PURE__*/React.createElement(
|
2538
|
+
}, props), fileList.length >= maxCount ? null : uploadButton ? uploadButton : uploadButtonDom) : /*#__PURE__*/React.createElement(Upload$1, _objectSpread2({
|
2561
2539
|
accept: "image/*",
|
2562
2540
|
fileList: fileList,
|
2563
2541
|
listType: "picture-card",
|
@@ -2578,8 +2556,8 @@ function Index$1(_ref, ref) {
|
|
2578
2556
|
|
2579
2557
|
return setProgress(Math.floor(percent));
|
2580
2558
|
}
|
2581
|
-
}, props), fileList.length >= maxCount ? null : uploadButton ? uploadButton : uploadButtonDom), /*#__PURE__*/React.createElement(
|
2582
|
-
|
2559
|
+
}, props), fileList.length >= maxCount ? null : uploadButton ? uploadButton : uploadButtonDom), /*#__PURE__*/React.createElement(Modal$2, {
|
2560
|
+
open: previewVisible,
|
2583
2561
|
title: previewTitle,
|
2584
2562
|
footer: null,
|
2585
2563
|
onCancel: handleCancel
|
@@ -2604,18 +2582,18 @@ var Upload = /*#__PURE__*/React.forwardRef(Index$1);
|
|
2604
2582
|
var WInputNumber = function WInputNumber(props) {
|
2605
2583
|
var extraProps = _extends({}, props);
|
2606
2584
|
|
2607
|
-
return /*#__PURE__*/React.createElement(
|
2585
|
+
return /*#__PURE__*/React.createElement(InputNumber, _objectSpread2({}, extraProps));
|
2608
2586
|
};
|
2609
2587
|
|
2610
2588
|
WInputNumber.defaultProps = {};
|
2611
2589
|
|
2612
2590
|
var _excluded$2 = ["getRangePickerValue", "panelType"];
|
2613
|
-
|
2591
|
+
dayjs.locale('zh-cn');
|
2614
2592
|
|
2615
2593
|
var WDatePicker = function WDatePicker(props) {
|
2616
2594
|
var extraProps = _extends({}, props);
|
2617
2595
|
|
2618
|
-
return /*#__PURE__*/React.createElement(
|
2596
|
+
return /*#__PURE__*/React.createElement(DatePicker, _objectSpread2({
|
2619
2597
|
locale: zhCN
|
2620
2598
|
}, extraProps));
|
2621
2599
|
};
|
@@ -2667,41 +2645,41 @@ var RangePicker = function RangePicker(props) {
|
|
2667
2645
|
}
|
2668
2646
|
}, /*#__PURE__*/React.createElement("div", {
|
2669
2647
|
id: "withinDateNav"
|
2670
|
-
}, /*#__PURE__*/React.createElement(
|
2648
|
+
}, /*#__PURE__*/React.createElement(Radio.Group, {
|
2671
2649
|
optionType: "button",
|
2672
2650
|
buttonStyle: "solid",
|
2673
2651
|
value: radioValue,
|
2674
2652
|
onChange: function onChange(e) {
|
2675
2653
|
setRadioValue(e.target.value);
|
2676
2654
|
}
|
2677
|
-
}, /*#__PURE__*/React.createElement(
|
2655
|
+
}, /*#__PURE__*/React.createElement(Space, {
|
2678
2656
|
direction: "vertical",
|
2679
2657
|
size: 'middle'
|
2680
|
-
}, /*#__PURE__*/React.createElement(
|
2658
|
+
}, /*#__PURE__*/React.createElement(Radio.Button, {
|
2681
2659
|
value: '1',
|
2682
2660
|
onClick: function onClick() {
|
2683
|
-
setRangePickerValue([
|
2661
|
+
setRangePickerValue([dayjs().startOf('day'), dayjs().endOf('day')]);
|
2684
2662
|
}
|
2685
|
-
}, /*#__PURE__*/React.createElement("span", null, "\u4ECA\u65E5")), /*#__PURE__*/React.createElement(
|
2663
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u4ECA\u65E5")), /*#__PURE__*/React.createElement(Radio.Button, {
|
2686
2664
|
value: '2',
|
2687
2665
|
onClick: function onClick() {
|
2688
|
-
setRangePickerValue([
|
2666
|
+
setRangePickerValue([dayjs().startOf('week'), dayjs().endOf('week')]);
|
2689
2667
|
}
|
2690
|
-
}, /*#__PURE__*/React.createElement("span", null, "\u672C\u5468")), /*#__PURE__*/React.createElement(
|
2668
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u672C\u5468")), /*#__PURE__*/React.createElement(Radio.Button, {
|
2691
2669
|
value: '3',
|
2692
2670
|
onClick: function onClick() {
|
2693
|
-
setRangePickerValue([
|
2671
|
+
setRangePickerValue([dayjs().startOf('month'), dayjs().endOf('month')]);
|
2694
2672
|
}
|
2695
|
-
}, /*#__PURE__*/React.createElement("span", null, "\u672C\u6708")), /*#__PURE__*/React.createElement(
|
2673
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u672C\u6708")), /*#__PURE__*/React.createElement(Radio.Button, {
|
2696
2674
|
value: '4',
|
2697
2675
|
onClick: function onClick() {
|
2698
|
-
setRangePickerValue([
|
2676
|
+
setRangePickerValue([dayjs().startOf('year'), dayjs().endOf('year')]);
|
2699
2677
|
}
|
2700
2678
|
}, /*#__PURE__*/React.createElement("span", null, "\u672C\u5E74")))))), /*#__PURE__*/React.createElement("div", null, originalPanel));
|
2701
2679
|
}
|
2702
2680
|
}, extraProps));
|
2703
2681
|
} else if (panelType === 'outside') {
|
2704
|
-
return /*#__PURE__*/React.createElement(
|
2682
|
+
return /*#__PURE__*/React.createElement(Space, {
|
2705
2683
|
split: /*#__PURE__*/React.createElement("span", {
|
2706
2684
|
style: {
|
2707
2685
|
color: '#768CAD'
|
@@ -2709,27 +2687,27 @@ var RangePicker = function RangePicker(props) {
|
|
2709
2687
|
}, "\u2014\u2014")
|
2710
2688
|
}, /*#__PURE__*/React.createElement("div", {
|
2711
2689
|
id: "outsideNav"
|
2712
|
-
}, /*#__PURE__*/React.createElement(
|
2690
|
+
}, /*#__PURE__*/React.createElement(Radio.Group, {
|
2713
2691
|
optionType: "button",
|
2714
2692
|
buttonStyle: "solid",
|
2715
2693
|
value: radioValue,
|
2716
2694
|
onChange: function onChange(e) {
|
2717
2695
|
setRadioValue(e.target.value);
|
2718
2696
|
}
|
2719
|
-
}, /*#__PURE__*/React.createElement(
|
2697
|
+
}, /*#__PURE__*/React.createElement(Radio.Button, {
|
2720
2698
|
value: '1',
|
2721
2699
|
onClick: function onClick() {
|
2722
|
-
setRangePickerValue([
|
2700
|
+
setRangePickerValue([dayjs().startOf('year'), dayjs().endOf('year')]);
|
2723
2701
|
}
|
2724
|
-
}, /*#__PURE__*/React.createElement("span", null, "\u5E74")), /*#__PURE__*/React.createElement(
|
2702
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u5E74")), /*#__PURE__*/React.createElement(Radio.Button, {
|
2725
2703
|
value: '2',
|
2726
2704
|
onClick: function onClick() {
|
2727
|
-
setRangePickerValue([
|
2705
|
+
setRangePickerValue([dayjs().startOf('month'), dayjs().endOf('month')]);
|
2728
2706
|
}
|
2729
|
-
}, /*#__PURE__*/React.createElement("span", null, "\u6708")), /*#__PURE__*/React.createElement(
|
2707
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u6708")), /*#__PURE__*/React.createElement(Radio.Button, {
|
2730
2708
|
value: '3',
|
2731
2709
|
onClick: function onClick() {
|
2732
|
-
setRangePickerValue([
|
2710
|
+
setRangePickerValue([dayjs().startOf('day'), dayjs().endOf('day')]);
|
2733
2711
|
}
|
2734
2712
|
}, /*#__PURE__*/React.createElement("span", null, "\u65E5")))), /*#__PURE__*/React.createElement(RangePicker, _objectSpread2({
|
2735
2713
|
locale: zhCN,
|
@@ -2741,7 +2719,7 @@ var RangePicker = function RangePicker(props) {
|
|
2741
2719
|
}, extraProps)));
|
2742
2720
|
}
|
2743
2721
|
|
2744
|
-
return /*#__PURE__*/React.createElement(
|
2722
|
+
return /*#__PURE__*/React.createElement(DatePicker.RangePicker, _objectSpread2({
|
2745
2723
|
locale: zhCN
|
2746
2724
|
}, extraProps));
|
2747
2725
|
};
|
@@ -2756,23 +2734,23 @@ var WRadio = function WRadio(props) {
|
|
2756
2734
|
var sideButtonStyle = props.sideButtonStyle,
|
2757
2735
|
extraProps = _objectWithoutProperties(props, _excluded$3);
|
2758
2736
|
|
2759
|
-
return /*#__PURE__*/React.createElement(
|
2737
|
+
return /*#__PURE__*/React.createElement(Radio, _objectSpread2({}, extraProps));
|
2760
2738
|
};
|
2761
2739
|
|
2762
2740
|
var Index$3 = WRadio;
|
2763
|
-
Index$3.Group =
|
2764
|
-
Index$3.Button =
|
2741
|
+
Index$3.Group = Radio.Group;
|
2742
|
+
Index$3.Button = Radio.Button;
|
2765
2743
|
WRadio.defaultProps = {};
|
2766
2744
|
|
2767
2745
|
var WCheckbox = function WCheckbox(props) {
|
2768
2746
|
var extraProps = _extends({}, props);
|
2769
2747
|
|
2770
|
-
return /*#__PURE__*/React.createElement(
|
2748
|
+
return /*#__PURE__*/React.createElement(Checkbox, _objectSpread2({}, extraProps));
|
2771
2749
|
};
|
2772
2750
|
|
2773
2751
|
WCheckbox.defaultProps = {};
|
2774
2752
|
var Index$4 = WCheckbox;
|
2775
|
-
Index$4.Group =
|
2753
|
+
Index$4.Group = Checkbox.Group;
|
2776
2754
|
|
2777
2755
|
/*
|
2778
2756
|
* @Author: lijin
|
@@ -2986,7 +2964,7 @@ var WSelect = function WSelect(props) {
|
|
2986
2964
|
label = _ref2.label,
|
2987
2965
|
extraProps = _objectWithoutProperties(_ref2, _excluded2);
|
2988
2966
|
|
2989
|
-
return /*#__PURE__*/React.createElement(
|
2967
|
+
return /*#__PURE__*/React.createElement(Select.Option, _objectSpread2({
|
2990
2968
|
key: value,
|
2991
2969
|
value: value
|
2992
2970
|
}, extraProps), label) || /*#__PURE__*/React.createElement(React.Fragment, null);
|
@@ -3020,7 +2998,7 @@ var WSelect = function WSelect(props) {
|
|
3020
2998
|
label: text,
|
3021
2999
|
value: key
|
3022
3000
|
});
|
3023
|
-
valueEnumNode.push( /*#__PURE__*/React.createElement(
|
3001
|
+
valueEnumNode.push( /*#__PURE__*/React.createElement(Select.Option, {
|
3024
3002
|
key: key,
|
3025
3003
|
value: key
|
3026
3004
|
}, text));
|
@@ -3033,7 +3011,7 @@ var WSelect = function WSelect(props) {
|
|
3033
3011
|
isUnmount = true;
|
3034
3012
|
};
|
3035
3013
|
}, [JSON.stringify(params || {})]);
|
3036
|
-
return /*#__PURE__*/React.createElement(
|
3014
|
+
return /*#__PURE__*/React.createElement(Select, _objectSpread2({
|
3037
3015
|
showSearch: true,
|
3038
3016
|
filterOption: function filterOption(input, option) {
|
3039
3017
|
var _ref3;
|
@@ -3051,20 +3029,20 @@ var Option = function Option(props) {
|
|
3051
3029
|
var children = props.children,
|
3052
3030
|
extraProps = _objectWithoutProperties(props, _excluded3);
|
3053
3031
|
|
3054
|
-
return /*#__PURE__*/React.createElement(
|
3032
|
+
return /*#__PURE__*/React.createElement(Select.Option, _objectSpread2({}, extraProps), children);
|
3055
3033
|
};
|
3056
3034
|
|
3057
3035
|
var Index$5 = WSelect;
|
3058
3036
|
Index$5.Option = Option;
|
3059
|
-
var Select = /*#__PURE__*/memo(Index$5);
|
3060
3037
|
|
3061
3038
|
var _excluded$6 = ["defaultValue", "format", "value", "onChange"],
|
3062
3039
|
_excluded2$1 = ["defaultValue", "value", "format", "showTime", "onChange"];
|
3063
|
-
|
3040
|
+
dayjs.locale('zh-cn');
|
3064
3041
|
|
3065
3042
|
var momentValue = function momentValue(value) {
|
3066
3043
|
if (value) {
|
3067
|
-
|
3044
|
+
var a = dayjs.isDayjs(value);
|
3045
|
+
return a ? value : dayjs(value);
|
3068
3046
|
}
|
3069
3047
|
|
3070
3048
|
return value;
|
@@ -3077,7 +3055,7 @@ var WDatePicker$1 = function WDatePicker(props) {
|
|
3077
3055
|
_onChange = props.onChange,
|
3078
3056
|
extraProps = _objectWithoutProperties(props, _excluded$6);
|
3079
3057
|
|
3080
|
-
return /*#__PURE__*/React.createElement(
|
3058
|
+
return /*#__PURE__*/React.createElement(DatePicker, _objectSpread2(_objectSpread2({
|
3081
3059
|
locale: zhCN,
|
3082
3060
|
defaultValue: momentValue(defaultValue),
|
3083
3061
|
value: momentValue(value)
|
@@ -3085,9 +3063,9 @@ var WDatePicker$1 = function WDatePicker(props) {
|
|
3085
3063
|
format: format
|
3086
3064
|
} : {}), {}, {
|
3087
3065
|
onChange: function onChange(v) {
|
3088
|
-
var
|
3066
|
+
var _momentValue, _momentValue2;
|
3089
3067
|
|
3090
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange((
|
3068
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange((_momentValue = momentValue(v)) === null || _momentValue === void 0 ? void 0 : _momentValue.format(format || (extraProps.showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD')), (_momentValue2 = momentValue(v)) === null || _momentValue2 === void 0 ? void 0 : _momentValue2.format(format || (extraProps.showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD')));
|
3091
3069
|
}
|
3092
3070
|
}, extraProps));
|
3093
3071
|
};
|
@@ -3102,15 +3080,15 @@ var RangePicker$1 = function RangePicker(props) {
|
|
3102
3080
|
_onChange2 = props.onChange,
|
3103
3081
|
extraProps = _objectWithoutProperties(props, _excluded2$1);
|
3104
3082
|
|
3105
|
-
return /*#__PURE__*/React.createElement(
|
3083
|
+
return /*#__PURE__*/React.createElement(DatePicker.RangePicker, _objectSpread2({
|
3106
3084
|
locale: zhCN,
|
3107
3085
|
showTime: showTime,
|
3108
3086
|
defaultValue: defaultValue ? [momentValue(defaultValue[0]), momentValue(defaultValue[1])] : undefined,
|
3109
3087
|
value: value ? [momentValue(value[0]), momentValue(value[1])] : undefined,
|
3110
3088
|
onChange: function onChange(v) {
|
3111
|
-
var _momentValue4, _momentValue5, _momentValue6
|
3089
|
+
var _momentValue3, _momentValue4, _momentValue5, _momentValue6;
|
3112
3090
|
|
3113
|
-
_onChange2 === null || _onChange2 === void 0 ? void 0 : _onChange2([((
|
3091
|
+
_onChange2 === null || _onChange2 === void 0 ? void 0 : _onChange2([((_momentValue3 = momentValue(v[0])) === null || _momentValue3 === void 0 ? void 0 : _momentValue3.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '', ((_momentValue4 = momentValue(v[1])) === null || _momentValue4 === void 0 ? void 0 : _momentValue4.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || ''], [((_momentValue5 = momentValue(v[0])) === null || _momentValue5 === void 0 ? void 0 : _momentValue5.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '', ((_momentValue6 = momentValue(v[1])) === null || _momentValue6 === void 0 ? void 0 : _momentValue6.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '']);
|
3114
3092
|
}
|
3115
3093
|
}, extraProps));
|
3116
3094
|
};
|
@@ -3122,7 +3100,7 @@ Index$6.RangePicker = RangePicker$1;
|
|
3122
3100
|
var WSwitch = function WSwitch(props) {
|
3123
3101
|
var extraProps = _extends({}, props);
|
3124
3102
|
|
3125
|
-
return /*#__PURE__*/React.createElement(
|
3103
|
+
return /*#__PURE__*/React.createElement(Switch, _objectSpread2({}, extraProps));
|
3126
3104
|
};
|
3127
3105
|
|
3128
3106
|
WSwitch.defaultProps = {};
|
@@ -3203,12 +3181,12 @@ var NumericInput = /*#__PURE__*/function (_React$Component) {
|
|
3203
3181
|
var title = value ? /*#__PURE__*/React.createElement("span", {
|
3204
3182
|
className: "numeric-input-title"
|
3205
3183
|
}, value !== '-' ? formatNumber(value) : '-') : '输入一个数字';
|
3206
|
-
return /*#__PURE__*/React.createElement(
|
3184
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
3207
3185
|
trigger: ['focus'],
|
3208
3186
|
title: title,
|
3209
3187
|
placement: "topLeft",
|
3210
3188
|
overlayClassName: "numeric-input"
|
3211
|
-
}, /*#__PURE__*/React.createElement(
|
3189
|
+
}, /*#__PURE__*/React.createElement(Input, _objectSpread2(_objectSpread2({}, this.props), {}, {
|
3212
3190
|
onChange: this.onChange,
|
3213
3191
|
onBlur: this.onBlur,
|
3214
3192
|
maxLength: 64
|
@@ -3236,7 +3214,7 @@ var TreeSelect = function TreeSelect(_ref) {
|
|
3236
3214
|
|
3237
3215
|
var renderTree = function renderTree(data) {
|
3238
3216
|
return data === null || data === void 0 ? void 0 : data.map(function (item) {
|
3239
|
-
return /*#__PURE__*/React.createElement(
|
3217
|
+
return /*#__PURE__*/React.createElement(TreeSelect$1.TreeNode, {
|
3240
3218
|
value: item[treeNodeValueProp],
|
3241
3219
|
title: item[treeNodeLabelProp],
|
3242
3220
|
key: item[treeNodeValueProp]
|
@@ -3297,7 +3275,7 @@ var TreeSelect = function TreeSelect(_ref) {
|
|
3297
3275
|
isUnmount = true;
|
3298
3276
|
};
|
3299
3277
|
}, [JSON.stringify(params)]);
|
3300
|
-
return /*#__PURE__*/React.createElement(
|
3278
|
+
return /*#__PURE__*/React.createElement(TreeSelect$1, _objectSpread2({
|
3301
3279
|
showSearch: true,
|
3302
3280
|
treeNodeFilterProp: "title",
|
3303
3281
|
treeDefaultExpandAll: true
|
@@ -3305,7 +3283,7 @@ var TreeSelect = function TreeSelect(_ref) {
|
|
3305
3283
|
};
|
3306
3284
|
|
3307
3285
|
var Index$7 = TreeSelect;
|
3308
|
-
Index$7.TreeNode =
|
3286
|
+
Index$7.TreeNode = TreeSelect$1.TreeNode;
|
3309
3287
|
|
3310
3288
|
var _excluded$8 = ["request", "options", "onLoad", "value", "onChange", "params"];
|
3311
3289
|
|
@@ -3373,7 +3351,7 @@ var WCascader = function WCascader(props) {
|
|
3373
3351
|
isUnmount = true;
|
3374
3352
|
};
|
3375
3353
|
}, [JSON.stringify(params)]);
|
3376
|
-
return /*#__PURE__*/React.createElement(
|
3354
|
+
return /*#__PURE__*/React.createElement(Cascader, _objectSpread2({
|
3377
3355
|
value: typeof value === 'string' ? [value] : value,
|
3378
3356
|
onChange: function onChange(v, options) {
|
3379
3357
|
_onChange === null || _onChange === void 0 ? void 0 : _onChange(v, options);
|
@@ -3402,7 +3380,7 @@ var WForm = function WForm(props, ref) {
|
|
3402
3380
|
deps = props.deps,
|
3403
3381
|
extraProps = _objectWithoutProperties(props, _excluded$9);
|
3404
3382
|
|
3405
|
-
var _Form$useForm =
|
3383
|
+
var _Form$useForm = Form.useForm(),
|
3406
3384
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
3407
3385
|
form = _Form$useForm2[0];
|
3408
3386
|
|
@@ -3462,17 +3440,17 @@ var WForm = function WForm(props, ref) {
|
|
3462
3440
|
};
|
3463
3441
|
}
|
3464
3442
|
|
3465
|
-
return /*#__PURE__*/React.createElement(
|
3443
|
+
return /*#__PURE__*/React.createElement(Col, _objectSpread2(_objectSpread2({
|
3466
3444
|
className: "pl12 pr12"
|
3467
3445
|
}, colProps), {}, {
|
3468
3446
|
key: c.dataIndex
|
3469
|
-
}), /*#__PURE__*/React.createElement(
|
3447
|
+
}), /*#__PURE__*/React.createElement(Form.Item, _objectSpread2(_objectSpread2({
|
3470
3448
|
initialValue: c.initialValue
|
3471
3449
|
}, c.formItemProps), {}, {
|
3472
3450
|
name: c.dataIndex,
|
3473
3451
|
label: c.title,
|
3474
3452
|
labelCol: labelCol
|
3475
|
-
}), /*#__PURE__*/React.createElement(
|
3453
|
+
}), /*#__PURE__*/React.createElement(Index$5, _objectSpread2(_objectSpread2({
|
3476
3454
|
placeholder: "\u8BF7\u9009\u62E9",
|
3477
3455
|
disabled: disabled,
|
3478
3456
|
onLoad: function onLoad(opt) {
|
@@ -3505,11 +3483,11 @@ var WForm = function WForm(props, ref) {
|
|
3505
3483
|
};
|
3506
3484
|
}
|
3507
3485
|
|
3508
|
-
return /*#__PURE__*/React.createElement(
|
3486
|
+
return /*#__PURE__*/React.createElement(Col, _objectSpread2(_objectSpread2({
|
3509
3487
|
className: "pl12 pr12"
|
3510
3488
|
}, colProps), {}, {
|
3511
3489
|
key: c.dataIndex
|
3512
|
-
}), /*#__PURE__*/React.createElement(
|
3490
|
+
}), /*#__PURE__*/React.createElement(Form.Item, _objectSpread2(_objectSpread2({
|
3513
3491
|
initialValue: c.initialValue
|
3514
3492
|
}, c.formItemProps), {}, {
|
3515
3493
|
name: c.dataIndex,
|
@@ -3533,11 +3511,11 @@ var WForm = function WForm(props, ref) {
|
|
3533
3511
|
};
|
3534
3512
|
}
|
3535
3513
|
|
3536
|
-
return /*#__PURE__*/React.createElement(
|
3514
|
+
return /*#__PURE__*/React.createElement(Col, _objectSpread2(_objectSpread2({
|
3537
3515
|
className: "pl12 pr12"
|
3538
3516
|
}, colProps), {}, {
|
3539
3517
|
key: c.dataIndex
|
3540
|
-
}), /*#__PURE__*/React.createElement(
|
3518
|
+
}), /*#__PURE__*/React.createElement(Form.Item, _objectSpread2(_objectSpread2({
|
3541
3519
|
initialValue: c.initialValue
|
3542
3520
|
}, c.formItemProps), {}, {
|
3543
3521
|
name: c.dataIndex,
|
@@ -3569,11 +3547,11 @@ var WForm = function WForm(props, ref) {
|
|
3569
3547
|
};
|
3570
3548
|
}
|
3571
3549
|
|
3572
|
-
return /*#__PURE__*/React.createElement(
|
3550
|
+
return /*#__PURE__*/React.createElement(Col, _objectSpread2(_objectSpread2({
|
3573
3551
|
className: "pl12 pr12"
|
3574
3552
|
}, colProps), {}, {
|
3575
3553
|
key: c.dataIndex
|
3576
|
-
}), /*#__PURE__*/React.createElement(
|
3554
|
+
}), /*#__PURE__*/React.createElement(Form.Item, _objectSpread2(_objectSpread2({
|
3577
3555
|
initialValue: c.initialValue
|
3578
3556
|
}, c.formItemProps), {}, {
|
3579
3557
|
name: c.dataIndex,
|
@@ -3616,11 +3594,11 @@ var WForm = function WForm(props, ref) {
|
|
3616
3594
|
};
|
3617
3595
|
}
|
3618
3596
|
|
3619
|
-
return /*#__PURE__*/React.createElement(
|
3597
|
+
return /*#__PURE__*/React.createElement(Col, _objectSpread2(_objectSpread2({
|
3620
3598
|
className: "pl12 pr12"
|
3621
3599
|
}, colProps), {}, {
|
3622
3600
|
key: c.dataIndex
|
3623
|
-
}), /*#__PURE__*/React.createElement(
|
3601
|
+
}), /*#__PURE__*/React.createElement(Form.Item, _objectSpread2(_objectSpread2({
|
3624
3602
|
initialValue: c.initialValue
|
3625
3603
|
}, c.formItemProps), {}, {
|
3626
3604
|
name: c.dataIndex,
|
@@ -3649,11 +3627,11 @@ var WForm = function WForm(props, ref) {
|
|
3649
3627
|
};
|
3650
3628
|
}
|
3651
3629
|
|
3652
|
-
return /*#__PURE__*/React.createElement(
|
3630
|
+
return /*#__PURE__*/React.createElement(Col, _objectSpread2(_objectSpread2({
|
3653
3631
|
className: "pl12 pr12"
|
3654
3632
|
}, colProps), {}, {
|
3655
3633
|
key: c.dataIndex
|
3656
|
-
}), /*#__PURE__*/React.createElement(
|
3634
|
+
}), /*#__PURE__*/React.createElement(Form.Item, _objectSpread2(_objectSpread2({
|
3657
3635
|
initialValue: c.initialValue
|
3658
3636
|
}, c.formItemProps), {}, {
|
3659
3637
|
name: c.dataIndex,
|
@@ -3693,11 +3671,11 @@ var WForm = function WForm(props, ref) {
|
|
3693
3671
|
};
|
3694
3672
|
}
|
3695
3673
|
|
3696
|
-
return /*#__PURE__*/React.createElement(
|
3674
|
+
return /*#__PURE__*/React.createElement(Col, _objectSpread2(_objectSpread2({
|
3697
3675
|
className: "pl12 pr12"
|
3698
3676
|
}, colProps), {}, {
|
3699
3677
|
key: c.dataIndex
|
3700
|
-
}), /*#__PURE__*/React.createElement(
|
3678
|
+
}), /*#__PURE__*/React.createElement(Form.Item, _objectSpread2(_objectSpread2({
|
3701
3679
|
initialValue: c.initialValue
|
3702
3680
|
}, c.formItemProps), {}, {
|
3703
3681
|
name: c.dataIndex,
|
@@ -3748,11 +3726,11 @@ var WForm = function WForm(props, ref) {
|
|
3748
3726
|
};
|
3749
3727
|
}
|
3750
3728
|
|
3751
|
-
return /*#__PURE__*/React.createElement(
|
3729
|
+
return /*#__PURE__*/React.createElement(Col, _objectSpread2(_objectSpread2({
|
3752
3730
|
className: "pl12 pr12"
|
3753
3731
|
}, colProps), {}, {
|
3754
3732
|
key: c.dataIndex
|
3755
|
-
}), /*#__PURE__*/React.createElement(
|
3733
|
+
}), /*#__PURE__*/React.createElement(Form.Item, _objectSpread2(_objectSpread2({
|
3756
3734
|
initialValue: c.initialValue
|
3757
3735
|
}, c.formItemProps), {}, {
|
3758
3736
|
name: c.dataIndex,
|
@@ -3791,11 +3769,11 @@ var WForm = function WForm(props, ref) {
|
|
3791
3769
|
setColumnsFields(function (preColumnsFields) {
|
3792
3770
|
return _objectSpread2(_objectSpread2({}, preColumnsFields), {}, _defineProperty({}, c.dataIndex, _options2));
|
3793
3771
|
});
|
3794
|
-
return /*#__PURE__*/React.createElement(
|
3772
|
+
return /*#__PURE__*/React.createElement(Col, _objectSpread2(_objectSpread2({
|
3795
3773
|
className: "pl12 pr12"
|
3796
3774
|
}, colProps), {}, {
|
3797
3775
|
key: c.dataIndex
|
3798
|
-
}), /*#__PURE__*/React.createElement(
|
3776
|
+
}), /*#__PURE__*/React.createElement(Form.Item, _objectSpread2(_objectSpread2({
|
3799
3777
|
initialValue: c.initialValue,
|
3800
3778
|
valuePropName: "checked"
|
3801
3779
|
}, c.formItemProps), {}, {
|
@@ -3814,11 +3792,11 @@ var WForm = function WForm(props, ref) {
|
|
3814
3792
|
};
|
3815
3793
|
}
|
3816
3794
|
|
3817
|
-
return /*#__PURE__*/React.createElement(
|
3795
|
+
return /*#__PURE__*/React.createElement(Col, _objectSpread2(_objectSpread2({
|
3818
3796
|
className: "pl12 pr12"
|
3819
3797
|
}, colProps), {}, {
|
3820
3798
|
key: c.dataIndex
|
3821
|
-
}), /*#__PURE__*/React.createElement(
|
3799
|
+
}), /*#__PURE__*/React.createElement(Form.Item, _objectSpread2(_objectSpread2({
|
3822
3800
|
initialValue: c.initialValue
|
3823
3801
|
}, c.formItemProps), {}, {
|
3824
3802
|
name: c.dataIndex,
|
@@ -3844,11 +3822,11 @@ var WForm = function WForm(props, ref) {
|
|
3844
3822
|
columnsFields: columnsFields // columnsFieldsRef,
|
3845
3823
|
|
3846
3824
|
}), form);
|
3847
|
-
return baseitem ? /*#__PURE__*/React.createElement(
|
3825
|
+
return baseitem ? /*#__PURE__*/React.createElement(Col, _objectSpread2(_objectSpread2({
|
3848
3826
|
className: "pl12 pr12"
|
3849
3827
|
}, colProps), {}, {
|
3850
3828
|
key: c.dataIndex
|
3851
|
-
}), /*#__PURE__*/React.createElement(
|
3829
|
+
}), /*#__PURE__*/React.createElement(Form.Item, _objectSpread2(_objectSpread2({
|
3852
3830
|
initialValue: c.initialValue
|
3853
3831
|
}, c.formItemProps), {}, {
|
3854
3832
|
name: c.dataIndex,
|
@@ -3864,11 +3842,11 @@ var WForm = function WForm(props, ref) {
|
|
3864
3842
|
};
|
3865
3843
|
}
|
3866
3844
|
|
3867
|
-
return /*#__PURE__*/React.createElement(
|
3845
|
+
return /*#__PURE__*/React.createElement(Col, _objectSpread2(_objectSpread2({
|
3868
3846
|
className: "pl12 pr12"
|
3869
3847
|
}, colProps), {}, {
|
3870
3848
|
key: c.dataIndex
|
3871
|
-
}), /*#__PURE__*/React.createElement(
|
3849
|
+
}), /*#__PURE__*/React.createElement(Form.Item, _objectSpread2(_objectSpread2({
|
3872
3850
|
initialValue: c.initialValue
|
3873
3851
|
}, c.formItemProps), {}, {
|
3874
3852
|
name: c.dataIndex,
|
@@ -3888,11 +3866,11 @@ var WForm = function WForm(props, ref) {
|
|
3888
3866
|
};
|
3889
3867
|
}
|
3890
3868
|
|
3891
|
-
return /*#__PURE__*/React.createElement(
|
3869
|
+
return /*#__PURE__*/React.createElement(Col, _objectSpread2(_objectSpread2({
|
3892
3870
|
className: "pl12 pr12"
|
3893
3871
|
}, colProps), {}, {
|
3894
3872
|
key: c.dataIndex
|
3895
|
-
}), /*#__PURE__*/React.createElement(
|
3873
|
+
}), /*#__PURE__*/React.createElement(Form.Item, _objectSpread2(_objectSpread2({
|
3896
3874
|
initialValue: c.initialValue
|
3897
3875
|
}, c.formItemProps), {}, {
|
3898
3876
|
name: c.dataIndex,
|
@@ -3911,11 +3889,11 @@ var WForm = function WForm(props, ref) {
|
|
3911
3889
|
};
|
3912
3890
|
}
|
3913
3891
|
|
3914
|
-
return /*#__PURE__*/React.createElement(
|
3892
|
+
return /*#__PURE__*/React.createElement(Col, _objectSpread2(_objectSpread2({
|
3915
3893
|
className: "pl12 pr12"
|
3916
3894
|
}, colProps), {}, {
|
3917
3895
|
key: c.dataIndex
|
3918
|
-
}), /*#__PURE__*/React.createElement(
|
3896
|
+
}), /*#__PURE__*/React.createElement(Form.Item, _objectSpread2(_objectSpread2({
|
3919
3897
|
initialValue: c.initialValue
|
3920
3898
|
}, c.formItemProps), {}, {
|
3921
3899
|
name: c.dataIndex,
|
@@ -3970,32 +3948,32 @@ var WForm = function WForm(props, ref) {
|
|
3970
3948
|
if (c.valueType === 'date' && searchForm[c.dataIndex]) {
|
3971
3949
|
var _c$fieldProps;
|
3972
3950
|
|
3973
|
-
searchForm[c.dataIndex] = searchForm[c.dataIndex] &&
|
3951
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && dayjs(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps = c.fieldProps) === null || _c$fieldProps === void 0 ? void 0 : _c$fieldProps.format) || 'YYYY-MM-DD');
|
3974
3952
|
}
|
3975
3953
|
|
3976
3954
|
if (c.valueType === 'dateTime' && searchForm[c.dataIndex]) {
|
3977
3955
|
var _c$fieldProps2;
|
3978
3956
|
|
3979
|
-
searchForm[c.dataIndex] = searchForm[c.dataIndex] &&
|
3957
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && dayjs(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps2 = c.fieldProps) === null || _c$fieldProps2 === void 0 ? void 0 : _c$fieldProps2.format) || 'YYYY-MM-DD HH:mm:ss');
|
3980
3958
|
}
|
3981
3959
|
|
3982
3960
|
if (c.valueType === 'dateMonth' && searchForm[c.dataIndex]) {
|
3983
3961
|
var _c$fieldProps3;
|
3984
3962
|
|
3985
|
-
searchForm[c.dataIndex] = searchForm[c.dataIndex] &&
|
3963
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && dayjs(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps3 = c.fieldProps) === null || _c$fieldProps3 === void 0 ? void 0 : _c$fieldProps3.format) || 'YYYY-MM');
|
3986
3964
|
}
|
3987
3965
|
|
3988
3966
|
if (c.valueType === 'dateYear' && searchForm[c.dataIndex]) {
|
3989
3967
|
var _c$fieldProps4;
|
3990
3968
|
|
3991
|
-
searchForm[c.dataIndex] = searchForm[c.dataIndex] &&
|
3969
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && dayjs(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps4 = c.fieldProps) === null || _c$fieldProps4 === void 0 ? void 0 : _c$fieldProps4.format) || 'YYYY');
|
3992
3970
|
}
|
3993
3971
|
|
3994
3972
|
if (c.valueType === 'dateRange' && searchForm[c.dataIndex]) {
|
3995
3973
|
searchForm[c.dataIndex] = searchForm[c.dataIndex].map(function (item) {
|
3996
3974
|
var _c$fieldProps5;
|
3997
3975
|
|
3998
|
-
return item && searchForm[c.dataIndex] &&
|
3976
|
+
return item && searchForm[c.dataIndex] && dayjs(item).format((c === null || c === void 0 ? void 0 : (_c$fieldProps5 = c.fieldProps) === null || _c$fieldProps5 === void 0 ? void 0 : _c$fieldProps5.format) || 'YYYY-MM-DD');
|
3999
3977
|
});
|
4000
3978
|
}
|
4001
3979
|
|
@@ -4003,7 +3981,7 @@ var WForm = function WForm(props, ref) {
|
|
4003
3981
|
searchForm[c.dataIndex] = searchForm[c.dataIndex].map(function (item) {
|
4004
3982
|
var _c$fieldProps6;
|
4005
3983
|
|
4006
|
-
return item &&
|
3984
|
+
return item && dayjs(item).format((c === null || c === void 0 ? void 0 : (_c$fieldProps6 = c.fieldProps) === null || _c$fieldProps6 === void 0 ? void 0 : _c$fieldProps6.format) || 'YYYY-MM-DD HH:mm:ss');
|
4007
3985
|
});
|
4008
3986
|
}
|
4009
3987
|
}
|
@@ -4030,32 +4008,32 @@ var WForm = function WForm(props, ref) {
|
|
4030
4008
|
if (c.valueType === 'date' && searchForm[c.dataIndex]) {
|
4031
4009
|
var _c$fieldProps7;
|
4032
4010
|
|
4033
|
-
searchForm[c.dataIndex] = searchForm[c.dataIndex] &&
|
4011
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && dayjs(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps7 = c.fieldProps) === null || _c$fieldProps7 === void 0 ? void 0 : _c$fieldProps7.format) || 'YYYY-MM-DD');
|
4034
4012
|
}
|
4035
4013
|
|
4036
4014
|
if (c.valueType === 'dateTime' && searchForm[c.dataIndex]) {
|
4037
4015
|
var _c$fieldProps8;
|
4038
4016
|
|
4039
|
-
searchForm[c.dataIndex] = searchForm[c.dataIndex] &&
|
4017
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && dayjs(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps8 = c.fieldProps) === null || _c$fieldProps8 === void 0 ? void 0 : _c$fieldProps8.format) || 'YYYY-MM-DD HH:mm:ss');
|
4040
4018
|
}
|
4041
4019
|
|
4042
4020
|
if (c.valueType === 'dateMonth' && searchForm[c.dataIndex]) {
|
4043
4021
|
var _c$fieldProps9;
|
4044
4022
|
|
4045
|
-
searchForm[c.dataIndex] = searchForm[c.dataIndex] &&
|
4023
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && dayjs(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps9 = c.fieldProps) === null || _c$fieldProps9 === void 0 ? void 0 : _c$fieldProps9.format) || 'YYYY-MM');
|
4046
4024
|
}
|
4047
4025
|
|
4048
4026
|
if (c.valueType === 'dateYear' && searchForm[c.dataIndex]) {
|
4049
4027
|
var _c$fieldProps10;
|
4050
4028
|
|
4051
|
-
searchForm[c.dataIndex] = searchForm[c.dataIndex] &&
|
4029
|
+
searchForm[c.dataIndex] = searchForm[c.dataIndex] && dayjs(searchForm[c.dataIndex]).format((c === null || c === void 0 ? void 0 : (_c$fieldProps10 = c.fieldProps) === null || _c$fieldProps10 === void 0 ? void 0 : _c$fieldProps10.format) || 'YYYY');
|
4052
4030
|
}
|
4053
4031
|
|
4054
4032
|
if (c.valueType === 'dateRange' && searchForm[c.dataIndex]) {
|
4055
4033
|
searchForm[c.dataIndex] = searchForm[c.dataIndex].map(function (item) {
|
4056
4034
|
var _c$fieldProps11;
|
4057
4035
|
|
4058
|
-
return item && searchForm[c.dataIndex] &&
|
4036
|
+
return item && searchForm[c.dataIndex] && dayjs(item).format((c === null || c === void 0 ? void 0 : (_c$fieldProps11 = c.fieldProps) === null || _c$fieldProps11 === void 0 ? void 0 : _c$fieldProps11.format) || 'YYYY-MM-DD');
|
4059
4037
|
});
|
4060
4038
|
}
|
4061
4039
|
|
@@ -4063,7 +4041,7 @@ var WForm = function WForm(props, ref) {
|
|
4063
4041
|
searchForm[c.dataIndex] = searchForm[c.dataIndex].map(function (item) {
|
4064
4042
|
var _c$fieldProps12;
|
4065
4043
|
|
4066
|
-
return item &&
|
4044
|
+
return item && dayjs(item).format((c === null || c === void 0 ? void 0 : (_c$fieldProps12 = c.fieldProps) === null || _c$fieldProps12 === void 0 ? void 0 : _c$fieldProps12.format) || 'YYYY-MM-DD HH:mm:ss');
|
4067
4045
|
});
|
4068
4046
|
}
|
4069
4047
|
}
|
@@ -4121,7 +4099,7 @@ var WForm = function WForm(props, ref) {
|
|
4121
4099
|
}
|
4122
4100
|
};
|
4123
4101
|
}, []);
|
4124
|
-
return /*#__PURE__*/React.createElement(
|
4102
|
+
return /*#__PURE__*/React.createElement(Form, _objectSpread2({
|
4125
4103
|
style: {
|
4126
4104
|
width: '100%'
|
4127
4105
|
},
|
@@ -4134,9 +4112,9 @@ var WForm = function WForm(props, ref) {
|
|
4134
4112
|
setchangedValues(changedValues);
|
4135
4113
|
},
|
4136
4114
|
form: form
|
4137
|
-
}, extraProps), /*#__PURE__*/React.createElement(
|
4115
|
+
}, extraProps), /*#__PURE__*/React.createElement(Row, null, filterForm, filterExtraColumnsForm, search && search.hideSubmit ? null : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Col, _objectSpread2({
|
4138
4116
|
className: "pl20"
|
4139
|
-
}, search ? search === null || search === void 0 ? void 0 : search.searchButtonConfig : {}), /*#__PURE__*/React.createElement(
|
4117
|
+
}, search ? search === null || search === void 0 ? void 0 : search.searchButtonConfig : {}), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement("div", {
|
4140
4118
|
style: {
|
4141
4119
|
display: 'flex'
|
4142
4120
|
}
|
@@ -4180,9 +4158,9 @@ var WForm = function WForm(props, ref) {
|
|
4180
4158
|
icon: /*#__PURE__*/React.createElement(ReloadOutlined, null),
|
4181
4159
|
onClick: handleRest
|
4182
4160
|
}, search && search.resetText ? search.resetText : '重置')) : null))), search && (search === null || search === void 0 ? void 0 : search.tableBarDom) && (search === null || search === void 0 ? void 0 : search.tableBarDom.map(function (dom) {
|
4183
|
-
return /*#__PURE__*/React.createElement(
|
4161
|
+
return /*#__PURE__*/React.createElement(Col, _objectSpread2({
|
4184
4162
|
className: "pr20"
|
4185
|
-
}, search ? search === null || search === void 0 ? void 0 : search.searchButtonConfig : {}), /*#__PURE__*/React.createElement(
|
4163
|
+
}, search ? search === null || search === void 0 ? void 0 : search.searchButtonConfig : {}), /*#__PURE__*/React.createElement(Form.Item, null, dom));
|
4186
4164
|
})))));
|
4187
4165
|
};
|
4188
4166
|
|
@@ -4405,7 +4383,7 @@ function Table(_ref) {
|
|
4405
4383
|
if (c.showTitle) {
|
4406
4384
|
var _columnsFields$c$data;
|
4407
4385
|
|
4408
|
-
return /*#__PURE__*/React.createElement(
|
4386
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
4409
4387
|
key: c.dataIndex,
|
4410
4388
|
placement: "top",
|
4411
4389
|
title: record[c.dataIndex]
|
@@ -4658,7 +4636,7 @@ function Table(_ref) {
|
|
4658
4636
|
setFormSearch({});
|
4659
4637
|
};
|
4660
4638
|
|
4661
|
-
return /*#__PURE__*/React.createElement(
|
4639
|
+
return /*#__PURE__*/React.createElement(Spin, {
|
4662
4640
|
spinning: loading
|
4663
4641
|
}, /*#__PURE__*/React.createElement("div", {
|
4664
4642
|
className: "form"
|
@@ -4748,7 +4726,7 @@ function Table(_ref) {
|
|
4748
4726
|
justifyContent: 'center',
|
4749
4727
|
alignItems: 'center'
|
4750
4728
|
}
|
4751
|
-
}, none || '暂无数据')))), _typeof(pagination) === 'object' && /*#__PURE__*/React.createElement(
|
4729
|
+
}, none || '暂无数据')))), _typeof(pagination) === 'object' && /*#__PURE__*/React.createElement(Pagination, _objectSpread2({
|
4752
4730
|
style: {
|
4753
4731
|
textAlign: 'right'
|
4754
4732
|
},
|
@@ -5199,7 +5177,7 @@ var Index$b = function Index(_ref) {
|
|
5199
5177
|
|
5200
5178
|
var _excluded$f = ["data", "onClick", "slidesPerView", "rowKey", "onSwiperChange", "renderItem"];
|
5201
5179
|
|
5202
|
-
SwiperCore.use([Pagination, Navigation, Autoplay, Virtual]);
|
5180
|
+
SwiperCore.use([Pagination$1, Navigation, Autoplay, Virtual]);
|
5203
5181
|
|
5204
5182
|
var Index$c = function Index(props) {
|
5205
5183
|
var data = props.data,
|
@@ -5880,7 +5858,7 @@ var Index$d = function Index(_ref) {
|
|
5880
5858
|
className = _ref.className,
|
5881
5859
|
props = _objectWithoutProperties(_ref, _excluded$g);
|
5882
5860
|
|
5883
|
-
return /*#__PURE__*/React.createElement(
|
5861
|
+
return /*#__PURE__*/React.createElement(Breadcrumb, _objectSpread2({
|
5884
5862
|
className: className || 'default',
|
5885
5863
|
separator: ">>",
|
5886
5864
|
itemRender: itemRender,
|
@@ -5952,7 +5930,7 @@ var controlShow = function controlShow(f1, f2, value, timer) {
|
|
5952
5930
|
|
5953
5931
|
function DialogModel(props, ref) {
|
5954
5932
|
var width = props.width,
|
5955
|
-
|
5933
|
+
open = props.open,
|
5956
5934
|
destroyOnClose = props.destroyOnClose,
|
5957
5935
|
closeCb = props.closeCb,
|
5958
5936
|
onClose = props.onClose,
|
@@ -5962,17 +5940,17 @@ function DialogModel(props, ref) {
|
|
5962
5940
|
className = _props$className === void 0 ? 'default-dialog' : _props$className,
|
5963
5941
|
style = props.style;
|
5964
5942
|
|
5965
|
-
var _useState = useState(
|
5943
|
+
var _useState = useState(open),
|
5966
5944
|
_useState2 = _slicedToArray(_useState, 2),
|
5967
5945
|
modelShow = _useState2[0],
|
5968
5946
|
setModelShow = _useState2[1];
|
5969
5947
|
|
5970
|
-
var _useState3 = useState(
|
5948
|
+
var _useState3 = useState(open),
|
5971
5949
|
_useState4 = _slicedToArray(_useState3, 2),
|
5972
5950
|
modelShowAync = _useState4[0],
|
5973
5951
|
setModelShowAync = _useState4[1];
|
5974
5952
|
|
5975
|
-
var _useState5 = useState(
|
5953
|
+
var _useState5 = useState(open),
|
5976
5954
|
_useState6 = _slicedToArray(_useState5, 2),
|
5977
5955
|
flag = _useState6[0],
|
5978
5956
|
setFlag = _useState6[1];
|
@@ -6111,18 +6089,18 @@ function DialogModel(props, ref) {
|
|
6111
6089
|
}, []);
|
6112
6090
|
useEffect(function () {
|
6113
6091
|
var timer;
|
6114
|
-
setFlag(
|
6092
|
+
setFlag(open);
|
6115
6093
|
|
6116
|
-
if (
|
6117
|
-
timer = controlShow(setModelShow, setModelShowAync,
|
6094
|
+
if (open) {
|
6095
|
+
timer = controlShow(setModelShow, setModelShowAync, open, 30);
|
6118
6096
|
} else {
|
6119
|
-
timer = controlShow(setModelShowAync, setModelShow,
|
6097
|
+
timer = controlShow(setModelShowAync, setModelShow, open, 1000);
|
6120
6098
|
}
|
6121
6099
|
|
6122
6100
|
return function () {
|
6123
6101
|
timer && clearTimeout(timer);
|
6124
6102
|
};
|
6125
|
-
}, [
|
6103
|
+
}, [open]);
|
6126
6104
|
useEffect(function () {
|
6127
6105
|
if (modelShow) {
|
6128
6106
|
setHasVisit(true);
|
@@ -6143,8 +6121,8 @@ function DialogModel(props, ref) {
|
|
6143
6121
|
|
6144
6122
|
var Dialog = /*#__PURE__*/React.forwardRef(DialogModel);
|
6145
6123
|
|
6146
|
-
var _excluded$i = ["
|
6147
|
-
_excluded2$3 = ["
|
6124
|
+
var _excluded$i = ["open", "width", "closeCb", "onClose", "className", "style"],
|
6125
|
+
_excluded2$3 = ["open"];
|
6148
6126
|
|
6149
6127
|
var Modal = /*#__PURE__*/function (_React$PureComponent) {
|
6150
6128
|
_inherits(Modal, _React$PureComponent);
|
@@ -6255,7 +6233,7 @@ var Modal = /*#__PURE__*/function (_React$PureComponent) {
|
|
6255
6233
|
key: "render",
|
6256
6234
|
value: function render() {
|
6257
6235
|
var _this$props4 = this.props,
|
6258
|
-
|
6236
|
+
open = _this$props4.open,
|
6259
6237
|
width = _this$props4.width,
|
6260
6238
|
closeCb = _this$props4.closeCb,
|
6261
6239
|
onClose = _this$props4.onClose,
|
@@ -6267,7 +6245,7 @@ var Modal = /*#__PURE__*/function (_React$PureComponent) {
|
|
6267
6245
|
ref: this.containerRef,
|
6268
6246
|
closeCb: closeCb,
|
6269
6247
|
onClose: onClose,
|
6270
|
-
|
6248
|
+
open: open,
|
6271
6249
|
width: width,
|
6272
6250
|
className: className,
|
6273
6251
|
style: style
|
@@ -6292,7 +6270,7 @@ Modal.show = function (config) {
|
|
6292
6270
|
if (Modals[modelSysbol]) return;
|
6293
6271
|
|
6294
6272
|
var props = _objectSpread2(_objectSpread2({}, config), {}, {
|
6295
|
-
|
6273
|
+
open: true
|
6296
6274
|
});
|
6297
6275
|
|
6298
6276
|
var container = document.createElement('div');
|
@@ -6322,18 +6300,18 @@ Modal.show = function (config) {
|
|
6322
6300
|
|
6323
6301
|
manager.setShow = setShow;
|
6324
6302
|
|
6325
|
-
var
|
6303
|
+
var open = props.open,
|
6326
6304
|
trueProps = _objectWithoutProperties(props, _excluded2$3);
|
6327
6305
|
|
6328
6306
|
useEffect(function () {
|
6329
6307
|
manager.mounted = true;
|
6330
|
-
setShow(
|
6308
|
+
setShow(open);
|
6331
6309
|
}, []);
|
6332
6310
|
return /*#__PURE__*/React.createElement(Modal, _objectSpread2(_objectSpread2({}, trueProps), {}, {
|
6333
6311
|
closeCb: function closeCb() {
|
6334
6312
|
return manager.mounted && manager.destory();
|
6335
6313
|
},
|
6336
|
-
|
6314
|
+
open: show
|
6337
6315
|
}));
|
6338
6316
|
};
|
6339
6317
|
|
@@ -6367,24 +6345,24 @@ var controlShow$1 = function controlShow(f1, f2, value, timer) {
|
|
6367
6345
|
|
6368
6346
|
function DialogModel$1(props) {
|
6369
6347
|
var width = props.width,
|
6370
|
-
|
6348
|
+
open = props.open,
|
6371
6349
|
closeCb = props.closeCb,
|
6372
6350
|
onClose = props.onClose,
|
6373
6351
|
_props$className = props.className,
|
6374
6352
|
className = _props$className === void 0 ? 'default-dialog' : _props$className,
|
6375
6353
|
style = props.style;
|
6376
6354
|
|
6377
|
-
var _useState = useState(
|
6355
|
+
var _useState = useState(open),
|
6378
6356
|
_useState2 = _slicedToArray(_useState, 2),
|
6379
6357
|
modelShow = _useState2[0],
|
6380
6358
|
setModelShow = _useState2[1];
|
6381
6359
|
|
6382
|
-
var _useState3 = useState(
|
6360
|
+
var _useState3 = useState(open),
|
6383
6361
|
_useState4 = _slicedToArray(_useState3, 2),
|
6384
6362
|
modelShowAync = _useState4[0],
|
6385
6363
|
setModelShowAync = _useState4[1];
|
6386
6364
|
|
6387
|
-
var _useState5 = useState(
|
6365
|
+
var _useState5 = useState(open),
|
6388
6366
|
_useState6 = _slicedToArray(_useState5, 2),
|
6389
6367
|
flag = _useState6[0],
|
6390
6368
|
setFlag = _useState6[1];
|
@@ -6426,25 +6404,25 @@ function DialogModel$1(props) {
|
|
6426
6404
|
}, [modelShowAync, modelShow, props]);
|
6427
6405
|
useEffect(function () {
|
6428
6406
|
var timer;
|
6429
|
-
setFlag(
|
6407
|
+
setFlag(open);
|
6430
6408
|
|
6431
|
-
if (
|
6432
|
-
timer = controlShow$1(setModelShow, setModelShowAync,
|
6409
|
+
if (open) {
|
6410
|
+
timer = controlShow$1(setModelShow, setModelShowAync, open, 30);
|
6433
6411
|
} else {
|
6434
|
-
timer = controlShow$1(setModelShowAync, setModelShow,
|
6412
|
+
timer = controlShow$1(setModelShowAync, setModelShow, open, 1000);
|
6435
6413
|
}
|
6436
6414
|
|
6437
6415
|
return function () {
|
6438
6416
|
timer && clearTimeout(timer);
|
6439
6417
|
};
|
6440
|
-
}, [
|
6418
|
+
}, [open]);
|
6441
6419
|
useEffect(function () {
|
6442
6420
|
!modelShow && typeof closeCb === 'function' && closeCb();
|
6443
6421
|
}, [modelShow]);
|
6444
6422
|
return renderChildren;
|
6445
6423
|
}
|
6446
6424
|
|
6447
|
-
var _excluded$j = ["
|
6425
|
+
var _excluded$j = ["open"];
|
6448
6426
|
|
6449
6427
|
var Modal$1 = /*#__PURE__*/function (_React$PureComponent) {
|
6450
6428
|
_inherits(Modal, _React$PureComponent);
|
@@ -6527,7 +6505,7 @@ var Modal$1 = /*#__PURE__*/function (_React$PureComponent) {
|
|
6527
6505
|
key: "render",
|
6528
6506
|
value: function render() {
|
6529
6507
|
var _this$props4 = this.props,
|
6530
|
-
|
6508
|
+
open = _this$props4.open,
|
6531
6509
|
width = _this$props4.width,
|
6532
6510
|
closeCb = _this$props4.closeCb,
|
6533
6511
|
onClose = _this$props4.onClose,
|
@@ -6536,7 +6514,7 @@ var Modal$1 = /*#__PURE__*/function (_React$PureComponent) {
|
|
6536
6514
|
return /*#__PURE__*/React.createElement(DialogModel$1, {
|
6537
6515
|
closeCb: closeCb,
|
6538
6516
|
onClose: onClose,
|
6539
|
-
|
6517
|
+
open: open,
|
6540
6518
|
width: width,
|
6541
6519
|
className: className,
|
6542
6520
|
style: style
|
@@ -6558,7 +6536,7 @@ Modal$1.show = function (config) {
|
|
6558
6536
|
if (ModalContainer) return;
|
6559
6537
|
|
6560
6538
|
var props = _objectSpread2(_objectSpread2({}, config), {}, {
|
6561
|
-
|
6539
|
+
open: true
|
6562
6540
|
});
|
6563
6541
|
|
6564
6542
|
var container = ModalContainer = document.createElement('div');
|
@@ -6584,18 +6562,18 @@ Modal$1.show = function (config) {
|
|
6584
6562
|
|
6585
6563
|
manager.setShow = setShow;
|
6586
6564
|
|
6587
|
-
var
|
6565
|
+
var open = props.open,
|
6588
6566
|
trueProps = _objectWithoutProperties(props, _excluded$j);
|
6589
6567
|
|
6590
6568
|
useEffect(function () {
|
6591
6569
|
manager.mounted = true;
|
6592
|
-
setShow(
|
6570
|
+
setShow(open);
|
6593
6571
|
}, []);
|
6594
6572
|
return /*#__PURE__*/React.createElement(Modal$1, _objectSpread2(_objectSpread2({}, trueProps), {}, {
|
6595
6573
|
closeCb: function closeCb() {
|
6596
6574
|
return manager.mounted && manager.destory();
|
6597
6575
|
},
|
6598
|
-
|
6576
|
+
open: show
|
6599
6577
|
}));
|
6600
6578
|
};
|
6601
6579
|
|
@@ -6614,7 +6592,7 @@ function DragBox(_ref) {
|
|
6614
6592
|
children = _ref.children,
|
6615
6593
|
closeIcon = _ref.closeIcon,
|
6616
6594
|
onClose = _ref.onClose,
|
6617
|
-
|
6595
|
+
open = _ref.open,
|
6618
6596
|
isDrag = _ref.isDrag,
|
6619
6597
|
isResize = _ref.isResize,
|
6620
6598
|
className = _ref.className,
|
@@ -6633,18 +6611,18 @@ function DragBox(_ref) {
|
|
6633
6611
|
useEffect(function () {
|
6634
6612
|
var timer = null;
|
6635
6613
|
|
6636
|
-
if (
|
6637
|
-
setDelayVisiable(
|
6614
|
+
if (open) {
|
6615
|
+
setDelayVisiable(open);
|
6638
6616
|
} else {
|
6639
6617
|
timer = setTimeout(function () {
|
6640
|
-
setDelayVisiable(
|
6618
|
+
setDelayVisiable(open);
|
6641
6619
|
}, 1000);
|
6642
6620
|
}
|
6643
6621
|
|
6644
6622
|
return function () {
|
6645
6623
|
timer && clearTimeout(timer);
|
6646
6624
|
};
|
6647
|
-
}, [
|
6625
|
+
}, [open]);
|
6648
6626
|
useEffect(function () {
|
6649
6627
|
var tltleEl = titleRef.current;
|
6650
6628
|
var containerEl = containerRef.current;
|
@@ -6754,10 +6732,10 @@ function DragBox(_ref) {
|
|
6754
6732
|
rElOnmousedown = null;
|
6755
6733
|
}
|
6756
6734
|
};
|
6757
|
-
}, [isDrag, delayVisiable,
|
6735
|
+
}, [isDrag, delayVisiable, open, isResize]);
|
6758
6736
|
return delayVisiable ? /*#__PURE__*/React.createElement("div", {
|
6759
6737
|
ref: containerRef,
|
6760
|
-
className: "drag-container ".concat(
|
6738
|
+
className: "drag-container ".concat(open ? 'animation-fade' : 'animation-fade-out', " ").concat(className),
|
6761
6739
|
style: _objectSpread2({
|
6762
6740
|
animationDelay: "0.3s"
|
6763
6741
|
}, style || {})
|
@@ -6785,14 +6763,14 @@ function DragBox(_ref) {
|
|
6785
6763
|
}, children)) : /*#__PURE__*/React.createElement(React.Fragment, null);
|
6786
6764
|
}
|
6787
6765
|
|
6788
|
-
var _excluded$k = ["columns", "extraColumns", "search", "
|
6766
|
+
var _excluded$k = ["columns", "extraColumns", "search", "open", "setOpen", "modalFormOpend", "disabled", "submitMethod", "onSubmitSuccess", "title", "record", "onFormChange", "formItemChild", "onCancel", "modalHeaderSolt", "modalFooterSolt", "formProps"];
|
6789
6767
|
|
6790
6768
|
var ModalForm = function ModalForm(props, ref) {
|
6791
6769
|
var columns = props.columns,
|
6792
6770
|
extraColumns = props.extraColumns,
|
6793
6771
|
search = props.search,
|
6794
|
-
|
6795
|
-
|
6772
|
+
open = props.open,
|
6773
|
+
setOpen = props.setOpen,
|
6796
6774
|
modalFormOpend = props.modalFormOpend,
|
6797
6775
|
disabled = props.disabled,
|
6798
6776
|
submitMethod = props.submitMethod,
|
@@ -6849,7 +6827,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
6849
6827
|
return {
|
6850
6828
|
formRef: formRef.current,
|
6851
6829
|
onSubmit: onSubmit,
|
6852
|
-
modalFormvisible:
|
6830
|
+
modalFormvisible: open,
|
6853
6831
|
setFieldsValue: setFieldsValue
|
6854
6832
|
};
|
6855
6833
|
});
|
@@ -6877,7 +6855,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
6877
6855
|
|
6878
6856
|
var handleCancel = function handleCancel() {
|
6879
6857
|
onCancel && onCancel();
|
6880
|
-
|
6858
|
+
setOpen(false);
|
6881
6859
|
};
|
6882
6860
|
|
6883
6861
|
var onSubmit = /*#__PURE__*/function () {
|
@@ -6897,7 +6875,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
6897
6875
|
|
6898
6876
|
_context2.next = 5;
|
6899
6877
|
return submitMethod(values, function () {
|
6900
|
-
|
6878
|
+
setOpen(false);
|
6901
6879
|
onCancel && onCancel();
|
6902
6880
|
});
|
6903
6881
|
|
@@ -6926,10 +6904,10 @@ var ModalForm = function ModalForm(props, ref) {
|
|
6926
6904
|
if (formIntance) {
|
6927
6905
|
setFieldsValue(record);
|
6928
6906
|
}
|
6929
|
-
}, [
|
6930
|
-
return /*#__PURE__*/React.createElement(
|
6907
|
+
}, [open, record, formIntance]);
|
6908
|
+
return /*#__PURE__*/React.createElement(Modal$2, _objectSpread2(_objectSpread2({
|
6931
6909
|
title: title,
|
6932
|
-
|
6910
|
+
open: open,
|
6933
6911
|
forceRender: true
|
6934
6912
|
}, disabled ? {
|
6935
6913
|
footer: null
|
@@ -6981,8 +6959,8 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6981
6959
|
|
6982
6960
|
var _useState = useState(false),
|
6983
6961
|
_useState2 = _slicedToArray(_useState, 2),
|
6984
|
-
|
6985
|
-
|
6962
|
+
open = _useState2[0],
|
6963
|
+
setOpen = _useState2[1];
|
6986
6964
|
|
6987
6965
|
var _useState3 = useState({}),
|
6988
6966
|
_useState4 = _slicedToArray(_useState3, 2),
|
@@ -7002,7 +6980,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7002
6980
|
});
|
7003
6981
|
|
7004
6982
|
var openFormModel = function openFormModel(options) {
|
7005
|
-
|
6983
|
+
setOpen(true);
|
7006
6984
|
setModalFormConfig(options);
|
7007
6985
|
};
|
7008
6986
|
|
@@ -7079,7 +7057,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7079
7057
|
});
|
7080
7058
|
},
|
7081
7059
|
delete: function _delete(item, record, index) {
|
7082
|
-
|
7060
|
+
Modal$2.confirm({
|
7083
7061
|
title: '删除',
|
7084
7062
|
icon: /*#__PURE__*/React.createElement(ExclamationCircleOutlined, null),
|
7085
7063
|
content: '是否确定要删除吗?',
|
@@ -7174,71 +7152,106 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7174
7152
|
|
7175
7153
|
if (tableAction && showMoreNum > 0 && showMoreNum < tableActionList.length) {
|
7176
7154
|
var tableAction1 = tableActionList === null || tableActionList === void 0 ? void 0 : tableActionList.slice(0, showMoreNum);
|
7177
|
-
var tableAction2 = tableActionList === null || tableActionList === void 0 ? void 0 : tableActionList.slice(showMoreNum);
|
7178
|
-
|
7179
|
-
|
7180
|
-
|
7181
|
-
|
7182
|
-
|
7183
|
-
|
7184
|
-
|
7185
|
-
|
7186
|
-
|
7187
|
-
|
7188
|
-
|
7189
|
-
|
7190
|
-
|
7191
|
-
|
7192
|
-
|
7193
|
-
|
7194
|
-
|
7195
|
-
|
7196
|
-
|
7197
|
-
|
7198
|
-
|
7199
|
-
|
7200
|
-
|
7201
|
-
|
7202
|
-
|
7155
|
+
var tableAction2 = tableActionList === null || tableActionList === void 0 ? void 0 : tableActionList.slice(showMoreNum); // const menu = (
|
7156
|
+
// <Menu>
|
7157
|
+
// {tableAction2.map((item: any, i: number) => {
|
7158
|
+
// let btn = actionConfig[item.type];
|
7159
|
+
// if (btn) {
|
7160
|
+
// return (
|
7161
|
+
// <Menu.Item key={i}>
|
7162
|
+
// <a
|
7163
|
+
// key={btn.key}
|
7164
|
+
// onClick={async e => {
|
7165
|
+
// e.stopPropagation();
|
7166
|
+
// let info = null;
|
7167
|
+
// if (item.fetchInfo) {
|
7168
|
+
// info = await item.fetchInfo(record);
|
7169
|
+
// }
|
7170
|
+
// actionHandler[item.type]?.(item, info || record, index);
|
7171
|
+
// }}
|
7172
|
+
// >
|
7173
|
+
// {btn.icon} {btn.title}
|
7174
|
+
// </a>
|
7175
|
+
// </Menu.Item>
|
7176
|
+
// );
|
7177
|
+
// }
|
7178
|
+
// return (
|
7179
|
+
// <Menu.Item key={i}>
|
7180
|
+
// {actionHandler[item.type]?.(item, record, index)}
|
7181
|
+
// </Menu.Item>
|
7182
|
+
// );
|
7183
|
+
// })}
|
7184
|
+
// </Menu>
|
7185
|
+
// );
|
7186
|
+
|
7187
|
+
var menu = {
|
7188
|
+
items: tableAction2.map(function (item, i) {
|
7189
|
+
var _actionHandler$item$t2;
|
7190
|
+
|
7191
|
+
var btn = actionConfig[item.type];
|
7192
|
+
|
7193
|
+
if (btn) {
|
7194
|
+
return {
|
7195
|
+
key: i,
|
7196
|
+
label: /*#__PURE__*/React.createElement("a", {
|
7197
|
+
key: btn.key,
|
7198
|
+
onClick: function () {
|
7199
|
+
var _onClick = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(e) {
|
7200
|
+
var _actionHandler$item$t;
|
7201
|
+
|
7202
|
+
var info;
|
7203
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
7204
|
+
while (1) {
|
7205
|
+
switch (_context5.prev = _context5.next) {
|
7206
|
+
case 0:
|
7207
|
+
e.stopPropagation();
|
7208
|
+
info = null;
|
7209
|
+
|
7210
|
+
if (!item.fetchInfo) {
|
7211
|
+
_context5.next = 6;
|
7212
|
+
break;
|
7213
|
+
}
|
7214
|
+
|
7215
|
+
_context5.next = 5;
|
7216
|
+
return item.fetchInfo(record);
|
7217
|
+
|
7218
|
+
case 5:
|
7219
|
+
info = _context5.sent;
|
7220
|
+
|
7221
|
+
case 6:
|
7222
|
+
(_actionHandler$item$t = actionHandler[item.type]) === null || _actionHandler$item$t === void 0 ? void 0 : _actionHandler$item$t.call(actionHandler, item, info || record, index);
|
7223
|
+
|
7224
|
+
case 7:
|
7225
|
+
case "end":
|
7226
|
+
return _context5.stop();
|
7203
7227
|
}
|
7228
|
+
}
|
7229
|
+
}, _callee5);
|
7230
|
+
}));
|
7204
7231
|
|
7205
|
-
|
7206
|
-
|
7207
|
-
|
7208
|
-
case 5:
|
7209
|
-
info = _context5.sent;
|
7210
|
-
|
7211
|
-
case 6:
|
7212
|
-
(_actionHandler$item$t = actionHandler[item.type]) === null || _actionHandler$item$t === void 0 ? void 0 : _actionHandler$item$t.call(actionHandler, item, info || record, index);
|
7213
|
-
|
7214
|
-
case 7:
|
7215
|
-
case "end":
|
7216
|
-
return _context5.stop();
|
7217
|
-
}
|
7232
|
+
function onClick(_x3) {
|
7233
|
+
return _onClick.apply(this, arguments);
|
7218
7234
|
}
|
7219
|
-
}, _callee5);
|
7220
|
-
}));
|
7221
7235
|
|
7222
|
-
|
7223
|
-
|
7224
|
-
}
|
7225
|
-
|
7226
|
-
|
7227
|
-
}()
|
7228
|
-
}, btn.icon, " ", btn.title));
|
7229
|
-
}
|
7236
|
+
return onClick;
|
7237
|
+
}()
|
7238
|
+
}, btn.icon, " ", btn.title)
|
7239
|
+
};
|
7240
|
+
}
|
7230
7241
|
|
7231
|
-
|
7232
|
-
|
7233
|
-
|
7234
|
-
|
7242
|
+
return {
|
7243
|
+
key: i,
|
7244
|
+
label: (_actionHandler$item$t2 = actionHandler[item.type]) === null || _actionHandler$item$t2 === void 0 ? void 0 : _actionHandler$item$t2.call(actionHandler, item, record, index)
|
7245
|
+
};
|
7246
|
+
})
|
7247
|
+
};
|
7235
7248
|
return [].concat(_toConsumableArray(tableAction1.map(function (item, i) {
|
7236
7249
|
var _actionHandler$item$t4;
|
7237
7250
|
|
7238
7251
|
var btn = actionConfig[item.type];
|
7239
7252
|
|
7240
7253
|
if (btn) {
|
7241
|
-
return /*#__PURE__*/React.createElement(
|
7254
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
7242
7255
|
title: btn.title,
|
7243
7256
|
key: i
|
7244
7257
|
}, /*#__PURE__*/React.createElement("a", {
|
@@ -7289,8 +7302,8 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7289
7302
|
return /*#__PURE__*/React.createElement("span", {
|
7290
7303
|
key: i
|
7291
7304
|
}, (_actionHandler$item$t4 = actionHandler[item.type]) === null || _actionHandler$item$t4 === void 0 ? void 0 : _actionHandler$item$t4.call(actionHandler, item, record, index));
|
7292
|
-
})), [/*#__PURE__*/React.createElement(
|
7293
|
-
|
7305
|
+
})), [/*#__PURE__*/React.createElement(Dropdown, {
|
7306
|
+
menu: menu,
|
7294
7307
|
key: 'more'
|
7295
7308
|
}, /*#__PURE__*/React.createElement("a", {
|
7296
7309
|
key: "more"
|
@@ -7302,7 +7315,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7302
7315
|
var btn = actionConfig[item.type];
|
7303
7316
|
|
7304
7317
|
if (btn) {
|
7305
|
-
return /*#__PURE__*/React.createElement(
|
7318
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
7306
7319
|
title: btn.title,
|
7307
7320
|
key: i
|
7308
7321
|
}, /*#__PURE__*/React.createElement("a", {
|
@@ -7326,10 +7339,10 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7326
7339
|
var tableBarDom = useMemo(function () {
|
7327
7340
|
return renderTableBar === null || renderTableBar === void 0 ? void 0 : renderTableBar.map(function (item) {
|
7328
7341
|
if (item.type === 'add') {
|
7329
|
-
return /*#__PURE__*/React.createElement(
|
7342
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
7330
7343
|
title: "\u65B0\u589E",
|
7331
7344
|
key: "add"
|
7332
|
-
}, /*#__PURE__*/React.createElement(
|
7345
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
7333
7346
|
key: "add",
|
7334
7347
|
type: "primary",
|
7335
7348
|
onClick: function onClick() {
|
@@ -7418,14 +7431,14 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7418
7431
|
formSearchRef.current = obj;
|
7419
7432
|
}
|
7420
7433
|
}, [columns]);
|
7421
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
7434
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, open && /*#__PURE__*/React.createElement(ModalForm$1, _objectSpread2(_objectSpread2({
|
7422
7435
|
ref: modalFormRef,
|
7423
7436
|
title: modalFormConfig.type || '新增',
|
7424
|
-
|
7437
|
+
open: open,
|
7425
7438
|
record: modalFormConfig.record,
|
7426
7439
|
formItemChild: modalFormConfig.formItemChild,
|
7427
7440
|
disabled: modalFormConfig.type == '查看',
|
7428
|
-
|
7441
|
+
setOpen: setOpen,
|
7429
7442
|
submitMethod: function () {
|
7430
7443
|
var _submitMethod = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(values, loading) {
|
7431
7444
|
return regeneratorRuntime.wrap(function _callee8$(_context8) {
|
@@ -7636,12 +7649,13 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7636
7649
|
|
7637
7650
|
var index$4 = /*#__PURE__*/React.forwardRef(TabelCard);
|
7638
7651
|
|
7652
|
+
extend(localeData);
|
7639
7653
|
var YEAER_MONTH_FORMAT_EN = 'YYYY-MM';
|
7640
7654
|
|
7641
|
-
var
|
7642
|
-
|
7643
|
-
_ =
|
7644
|
-
rest =
|
7655
|
+
var _dayjs$weekdaysMin = weekdaysMin(),
|
7656
|
+
_dayjs$weekdaysMin2 = _toArray(_dayjs$weekdaysMin),
|
7657
|
+
_ = _dayjs$weekdaysMin2[0],
|
7658
|
+
rest = _dayjs$weekdaysMin2.slice(1); // 将星期天放置数组最后
|
7645
7659
|
|
7646
7660
|
|
7647
7661
|
var WEEk_HEADER = [].concat(_toConsumableArray(rest), [_]); // 日历布局为6 * 7单元格
|
@@ -7652,33 +7666,34 @@ var INIT_DAYS = Array(TOTAL_LENGTH).fill(0).map(function (_, index) {
|
|
7652
7666
|
return +index + 1;
|
7653
7667
|
});
|
7654
7668
|
|
7655
|
-
|
7669
|
+
dayjs.extend(weekday);
|
7670
|
+
dayjs.locale('zh-cn');
|
7656
7671
|
/**
|
7657
7672
|
* 获取当前月的天数
|
7658
7673
|
*/
|
7659
7674
|
|
7660
|
-
console.log(
|
7675
|
+
console.log(dayjs().format('YYYY-MM-DD'), 'dayjs()');
|
7661
7676
|
function getMonthDays(date) {
|
7662
|
-
return
|
7677
|
+
return dayjs(date).daysInMonth();
|
7663
7678
|
}
|
7664
7679
|
/**
|
7665
7680
|
* 获取当前月第一天是星期几
|
7666
7681
|
*/
|
7667
7682
|
|
7668
7683
|
function getWeekDays(date) {
|
7669
|
-
return
|
7684
|
+
return dayjs(date).startOf('month').weekday();
|
7670
7685
|
}
|
7671
7686
|
/**
|
7672
7687
|
* 获取当前星期第一天到星期天
|
7673
7688
|
*/
|
7674
7689
|
|
7675
7690
|
function getWeekList(date) {
|
7676
|
-
var weekOfDay = parseInt(
|
7677
|
-
// let last_monday =
|
7678
|
-
// let last_sunday =
|
7691
|
+
var weekOfDay = parseInt(dayjs(date).format('E')); //计算今天是这周第几天
|
7692
|
+
// let last_monday = dayjs().startOf('day').subtract(weekOfDay - 1, 'days').format('YYYY-MM-DD');//周一日期
|
7693
|
+
// let last_sunday = dayjs().startOf('day').subtract(weekOfDay - 7, 'days').format('YYYY-MM-DD');//周日日期
|
7679
7694
|
|
7680
7695
|
return ['时间'].concat(_toConsumableArray(new Array(7).fill('').map(function (item, index) {
|
7681
|
-
return
|
7696
|
+
return dayjs(date).startOf('day').subtract(weekOfDay - (index + 1), 'days').format('YYYY-MM-DD');
|
7682
7697
|
})));
|
7683
7698
|
}
|
7684
7699
|
/**
|
@@ -7686,7 +7701,7 @@ function getWeekList(date) {
|
|
7686
7701
|
*/
|
7687
7702
|
|
7688
7703
|
function getLastMonth(date) {
|
7689
|
-
return
|
7704
|
+
return dayjs(date).subtract(1, 'month').format(YEAER_MONTH_FORMAT_EN);
|
7690
7705
|
}
|
7691
7706
|
/**
|
7692
7707
|
* 格式化日期为两个单词,例如:‘1’号 格式为 ‘01’
|
@@ -7725,36 +7740,36 @@ function initCalendar(date) {
|
|
7725
7740
|
// 填充上个月的天数
|
7726
7741
|
if (i < currentWeekDay) {
|
7727
7742
|
// lastDays.push(totalDaysInLastMonth);
|
7728
|
-
var daySting =
|
7743
|
+
var daySting = dayjs(dayjs(date).subtract(1, 'month').format(YEAER_MONTH_FORMAT_EN) + '-' + totalDaysInLastMonth).format('YYYY-MM-DD');
|
7729
7744
|
lastDays.push({
|
7730
7745
|
date: daySting,
|
7731
7746
|
text: formatDayWithTwoWords(totalDaysInLastMonth),
|
7732
7747
|
isCurrentMonth: false,
|
7733
|
-
isCurrentDay:
|
7748
|
+
isCurrentDay: dayjs().format('YYYY-MM-DD') == daySting
|
7734
7749
|
});
|
7735
7750
|
totalDaysInLastMonth--;
|
7736
7751
|
} // 填充下个月的天数
|
7737
7752
|
else if (i >= totalDaysInMonth + currentWeekDay) {
|
7738
7753
|
// nextDays.push(nextFirstDate);
|
7739
|
-
var _daySting =
|
7754
|
+
var _daySting = dayjs(dayjs(date).add(1, 'month').format(YEAER_MONTH_FORMAT_EN) + '-' + nextFirstDate).format('YYYY-MM-DD');
|
7740
7755
|
|
7741
7756
|
nextDays.push({
|
7742
7757
|
date: _daySting,
|
7743
7758
|
text: formatDayWithTwoWords(nextFirstDate),
|
7744
7759
|
isCurrentMonth: false,
|
7745
|
-
isCurrentDay:
|
7760
|
+
isCurrentDay: dayjs().format('YYYY-MM-DD') == _daySting
|
7746
7761
|
});
|
7747
7762
|
nextFirstDate++;
|
7748
7763
|
} // 填充当前月天数
|
7749
7764
|
else {
|
7750
7765
|
// currentDays.push(i - currentWeekDay + 1);
|
7751
|
-
var _daySting2 =
|
7766
|
+
var _daySting2 = dayjs(dayjs(date).format(YEAER_MONTH_FORMAT_EN) + '-' + (i - currentWeekDay + 1)).format('YYYY-MM-DD');
|
7752
7767
|
|
7753
7768
|
currentDays.push({
|
7754
7769
|
date: _daySting2,
|
7755
7770
|
text: formatDayWithTwoWords(i - currentWeekDay + 1),
|
7756
7771
|
isCurrentMonth: true,
|
7757
|
-
isCurrentDay:
|
7772
|
+
isCurrentDay: dayjs().format('YYYY-MM-DD') == _daySting2
|
7758
7773
|
});
|
7759
7774
|
}
|
7760
7775
|
} // 上个月需要倒序显示
|
@@ -7769,7 +7784,7 @@ function initCalendar(date) {
|
|
7769
7784
|
function initWeekCalendar(type, date) {
|
7770
7785
|
var weekLength = type == 'week' ? 8 : 2;
|
7771
7786
|
var dayTime = ['08:00', '08:30', '09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00', '14:30', '15:00', '15:30', '16:00', '16:30', '17:00', '17:30'];
|
7772
|
-
var weekOfDay = parseInt(
|
7787
|
+
var weekOfDay = parseInt(dayjs(date).format('E')); //计算今天是这周第几天
|
7773
7788
|
|
7774
7789
|
var days = [];
|
7775
7790
|
|
@@ -7782,7 +7797,7 @@ function initWeekCalendar(type, date) {
|
|
7782
7797
|
});
|
7783
7798
|
} else {
|
7784
7799
|
days.push({
|
7785
|
-
date: type == 'week' ?
|
7800
|
+
date: type == 'week' ? dayjs(date).startOf('day').subtract(weekOfDay - i % weekLength, 'days').format('YYYY-MM-DD') + " ".concat(dayTime[timeIndex]) : dayjs(date).format('YYYY-MM-DD') + " ".concat(dayTime[timeIndex])
|
7786
7801
|
});
|
7787
7802
|
}
|
7788
7803
|
}
|
@@ -7790,7 +7805,8 @@ function initWeekCalendar(type, date) {
|
|
7790
7805
|
return days;
|
7791
7806
|
}
|
7792
7807
|
|
7793
|
-
|
7808
|
+
dayjs.extend(weekOfYear);
|
7809
|
+
dayjs.locale('zh-cn');
|
7794
7810
|
|
7795
7811
|
function Calendar(_ref, ref) {
|
7796
7812
|
var value = _ref.value,
|
@@ -7809,7 +7825,7 @@ function Calendar(_ref, ref) {
|
|
7809
7825
|
days = _useState2[0],
|
7810
7826
|
setDays = _useState2[1];
|
7811
7827
|
|
7812
|
-
var _useState3 = useState(
|
7828
|
+
var _useState3 = useState(dayjs()),
|
7813
7829
|
_useState4 = _slicedToArray(_useState3, 2),
|
7814
7830
|
datevalue = _useState4[0],
|
7815
7831
|
setDatevalue = _useState4[1];
|
@@ -7822,7 +7838,7 @@ function Calendar(_ref, ref) {
|
|
7822
7838
|
var weekLabelArray = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'];
|
7823
7839
|
|
7824
7840
|
var getweekDay = function getweekDay(date) {
|
7825
|
-
var index =
|
7841
|
+
var index = dayjs(date).day();
|
7826
7842
|
|
7827
7843
|
if (index == 0) {
|
7828
7844
|
index = 7;
|
@@ -7845,7 +7861,7 @@ function Calendar(_ref, ref) {
|
|
7845
7861
|
}
|
7846
7862
|
}, [type, datevalue, dateString]);
|
7847
7863
|
useEffect(function () {
|
7848
|
-
setDatevalue(value ||
|
7864
|
+
setDatevalue(value || dayjs());
|
7849
7865
|
}, [value]);
|
7850
7866
|
useEffect(function () {
|
7851
7867
|
onChange && onChange(datevalue);
|
@@ -7854,18 +7870,18 @@ function Calendar(_ref, ref) {
|
|
7854
7870
|
var handleUp = function handleUp() {
|
7855
7871
|
if (type == 'day' || type == 'week') {
|
7856
7872
|
if (type == 'day') {
|
7857
|
-
var lastDay =
|
7873
|
+
var lastDay = dayjs(datevalue).subtract(1, 'days');
|
7858
7874
|
setOneWeekDays(['时间'].concat(_toConsumableArray(getweekDay(lastDay))));
|
7859
7875
|
setDays(initWeekCalendar(type, lastDay));
|
7860
7876
|
setDatevalue(lastDay);
|
7861
7877
|
} else {
|
7862
|
-
var lastWeek =
|
7878
|
+
var lastWeek = dayjs().week(dayjs(datevalue).week() - 1);
|
7863
7879
|
setOneWeekDays(getWeekList(lastWeek));
|
7864
7880
|
setDays(initWeekCalendar(type, lastWeek));
|
7865
7881
|
setDatevalue(lastWeek);
|
7866
7882
|
}
|
7867
7883
|
} else {
|
7868
|
-
var lastMonth =
|
7884
|
+
var lastMonth = dayjs(datevalue).subtract(1, 'month');
|
7869
7885
|
setDays(initCalendar(lastMonth));
|
7870
7886
|
setDatevalue(lastMonth);
|
7871
7887
|
}
|
@@ -7874,18 +7890,18 @@ function Calendar(_ref, ref) {
|
|
7874
7890
|
var handleDown = function handleDown() {
|
7875
7891
|
if (type == 'day' || type == 'week') {
|
7876
7892
|
if (type == 'day') {
|
7877
|
-
var lastDay =
|
7893
|
+
var lastDay = dayjs(datevalue).add(1, 'days');
|
7878
7894
|
setOneWeekDays(['时间'].concat(_toConsumableArray(getweekDay(lastDay))));
|
7879
7895
|
setDays(initWeekCalendar(type, lastDay));
|
7880
7896
|
setDatevalue(lastDay);
|
7881
7897
|
} else {
|
7882
|
-
var lastWeek =
|
7898
|
+
var lastWeek = dayjs().week(dayjs(datevalue).week() + 1);
|
7883
7899
|
setOneWeekDays(getWeekList(lastWeek));
|
7884
7900
|
setDays(initWeekCalendar(type, lastWeek));
|
7885
7901
|
setDatevalue(lastWeek);
|
7886
7902
|
}
|
7887
7903
|
} else {
|
7888
|
-
var lastMonth =
|
7904
|
+
var lastMonth = dayjs(datevalue).add(1, 'month');
|
7889
7905
|
setDays(initCalendar(lastMonth));
|
7890
7906
|
setDatevalue(lastMonth);
|
7891
7907
|
}
|
@@ -7905,15 +7921,15 @@ function Calendar(_ref, ref) {
|
|
7905
7921
|
});
|
7906
7922
|
return /*#__PURE__*/React.createElement("div", {
|
7907
7923
|
className: "content_container"
|
7908
|
-
}, /*#__PURE__*/React.createElement(
|
7924
|
+
}, /*#__PURE__*/React.createElement(ConfigProvider, {
|
7909
7925
|
locale: zhCN$1
|
7910
7926
|
}, !dateString && /*#__PURE__*/React.createElement("div", {
|
7911
7927
|
className: "toolbar_container"
|
7912
|
-
}, /*#__PURE__*/React.createElement(
|
7928
|
+
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
7913
7929
|
icon: /*#__PURE__*/React.createElement(LeftOutlined, null),
|
7914
7930
|
type: "text",
|
7915
7931
|
onClick: handleUp
|
7916
|
-
}), type == 'day' ? /*#__PURE__*/React.createElement(
|
7932
|
+
}), type == 'day' ? /*#__PURE__*/React.createElement(DatePicker, {
|
7917
7933
|
allowClear: false,
|
7918
7934
|
value: datevalue,
|
7919
7935
|
onChange: function onChange(date) {
|
@@ -7924,20 +7940,20 @@ function Calendar(_ref, ref) {
|
|
7924
7940
|
style: {
|
7925
7941
|
width: '250px'
|
7926
7942
|
}
|
7927
|
-
}) : type == 'week' ? /*#__PURE__*/React.createElement(
|
7943
|
+
}) : type == 'week' ? /*#__PURE__*/React.createElement(DatePicker, {
|
7928
7944
|
allowClear: false,
|
7929
7945
|
value: datevalue,
|
7930
7946
|
style: {
|
7931
7947
|
width: '250px'
|
7932
7948
|
},
|
7933
|
-
format: "".concat(
|
7949
|
+
format: "".concat(dayjs(datevalue).startOf('week').format('YYYY-MM-DD'), " ~ ").concat(dayjs(datevalue).endOf('week').format('YYYY-MM-DD')),
|
7934
7950
|
picker: "week",
|
7935
7951
|
onChange: function onChange(date) {
|
7936
7952
|
setOneWeekDays(getWeekList(date));
|
7937
7953
|
setDays(initWeekCalendar(type, date));
|
7938
7954
|
setDatevalue(date);
|
7939
7955
|
}
|
7940
|
-
}) : /*#__PURE__*/React.createElement(
|
7956
|
+
}) : /*#__PURE__*/React.createElement(DatePicker, {
|
7941
7957
|
allowClear: false,
|
7942
7958
|
value: datevalue,
|
7943
7959
|
picker: "month",
|
@@ -7948,7 +7964,7 @@ function Calendar(_ref, ref) {
|
|
7948
7964
|
style: {
|
7949
7965
|
width: '250px'
|
7950
7966
|
}
|
7951
|
-
}), /*#__PURE__*/React.createElement(
|
7967
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
7952
7968
|
icon: /*#__PURE__*/React.createElement(RightOutlined, null),
|
7953
7969
|
type: "text",
|
7954
7970
|
onClick: handleDown
|
@@ -8471,7 +8487,7 @@ function VideoPlayer(_ref, ref) {
|
|
8471
8487
|
setCurrentPlayerIndex(playerIndex);
|
8472
8488
|
setCurrentLayoutIndex(index);
|
8473
8489
|
}
|
8474
|
-
}, /*#__PURE__*/React.createElement(
|
8490
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
8475
8491
|
placement: "top",
|
8476
8492
|
title: item.title
|
8477
8493
|
}, item.icon || /*#__PURE__*/React.createElement(IconFont, {
|
@@ -8482,7 +8498,7 @@ function VideoPlayer(_ref, ref) {
|
|
8482
8498
|
|
8483
8499
|
var index$6 = /*#__PURE__*/forwardRef(VideoPlayer);
|
8484
8500
|
|
8485
|
-
var _excluded$m = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "
|
8501
|
+
var _excluded$m = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "open", "autoplay", "videoInit", "enableMemory", "lastPlayTimeHideDelay"];
|
8486
8502
|
|
8487
8503
|
var DEFAULT_PLAY_BACK_RATE = [0.5, 0.75, 1, 1.5, 2]; // 默认记忆提示文字展示时长(s)
|
8488
8504
|
|
@@ -8503,8 +8519,8 @@ var index$7 = (function (_ref) {
|
|
8503
8519
|
setParentIndex = _ref.setCurrentIndex,
|
8504
8520
|
className = _ref.className,
|
8505
8521
|
style = _ref.style,
|
8506
|
-
_ref$
|
8507
|
-
|
8522
|
+
_ref$open = _ref.open,
|
8523
|
+
open = _ref$open === void 0 ? true : _ref$open,
|
8508
8524
|
_ref$autoplay = _ref.autoplay,
|
8509
8525
|
autoplay = _ref$autoplay === void 0 ? false : _ref$autoplay,
|
8510
8526
|
_ref$videoInit = _ref.videoInit,
|
@@ -8590,23 +8606,23 @@ var index$7 = (function (_ref) {
|
|
8590
8606
|
/** 弹窗中的视频关闭以后重置 */
|
8591
8607
|
|
8592
8608
|
useEffect(function () {
|
8593
|
-
if (!
|
8609
|
+
if (!open) {
|
8594
8610
|
handleReset();
|
8595
8611
|
}
|
8596
|
-
}, [handleReset,
|
8612
|
+
}, [handleReset, open]);
|
8597
8613
|
/** 当 currentIndex 改变以后自动播放下一个 */
|
8598
8614
|
|
8599
8615
|
useEffect(function () {
|
8600
|
-
if (!player.current || !
|
8616
|
+
if (!player.current || !open) {
|
8601
8617
|
return;
|
8602
8618
|
}
|
8603
8619
|
|
8604
8620
|
handlePlayNext(currentIndex !== null && currentIndex !== void 0 ? currentIndex : currentPlayerIndex.current);
|
8605
|
-
}, [currentIndex, handlePlayNext,
|
8621
|
+
}, [currentIndex, handlePlayNext, open]);
|
8606
8622
|
/** 播放器初始化并绑定事件 */
|
8607
8623
|
|
8608
8624
|
useEffect(function () {
|
8609
|
-
if (!
|
8625
|
+
if (!open || isEmpty(videoUrls) || player.current) {
|
8610
8626
|
return;
|
8611
8627
|
}
|
8612
8628
|
|
@@ -8652,11 +8668,11 @@ var index$7 = (function (_ref) {
|
|
8652
8668
|
|
8653
8669
|
handleSetCurrentIndex();
|
8654
8670
|
});
|
8655
|
-
}, [autoplay, enableMemory, handleSetCurrentIndex, id, isLoop, videoUrls, videoUrls.length,
|
8671
|
+
}, [autoplay, enableMemory, handleSetCurrentIndex, id, isLoop, videoUrls, videoUrls.length, open]);
|
8656
8672
|
/** 读取缓存的播放记忆并跳转 */
|
8657
8673
|
|
8658
8674
|
useEffect(function () {
|
8659
|
-
if (enableMemory &&
|
8675
|
+
if (enableMemory && open) {
|
8660
8676
|
var _JSON$parse;
|
8661
8677
|
|
8662
8678
|
var _ref2 = ((_JSON$parse = JSON.parse(localStorage.getItem('videoPlayedTime') || '{}')) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse[id]) || {},
|
@@ -8672,7 +8688,7 @@ var index$7 = (function (_ref) {
|
|
8672
8688
|
});
|
8673
8689
|
});
|
8674
8690
|
}
|
8675
|
-
}, [
|
8691
|
+
}, [open, enableMemory, handleSetCurrentIndex, id]);
|
8676
8692
|
/** 加载清晰度配置 */
|
8677
8693
|
|
8678
8694
|
useEffect(function () {
|
@@ -8681,7 +8697,7 @@ var index$7 = (function (_ref) {
|
|
8681
8697
|
}
|
8682
8698
|
}, [currentIndex, definitionList]);
|
8683
8699
|
var getRef = useCallback(function (ref) {
|
8684
|
-
if (ref &&
|
8700
|
+
if (ref && open) {
|
8685
8701
|
var newConfig = _objectSpread2(_objectSpread2({}, config.current), {}, {
|
8686
8702
|
el: ref,
|
8687
8703
|
url: videoUrls[0],
|
@@ -8704,7 +8720,7 @@ var index$7 = (function (_ref) {
|
|
8704
8720
|
|
8705
8721
|
config.current = newConfig;
|
8706
8722
|
}
|
8707
|
-
}, [
|
8723
|
+
}, [open, id, videoUrls, lastPlayTimeHideDelay, enableMemory]);
|
8708
8724
|
return /*#__PURE__*/React.createElement("div", {
|
8709
8725
|
className: className,
|
8710
8726
|
ref: getRef,
|
@@ -8967,7 +8983,7 @@ function NtTable(_ref) {
|
|
8967
8983
|
if (c.showTitle) {
|
8968
8984
|
var _columnsFields$c$data;
|
8969
8985
|
|
8970
|
-
return /*#__PURE__*/React.createElement(
|
8986
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
8971
8987
|
key: c.dataIndex,
|
8972
8988
|
placement: "top",
|
8973
8989
|
title: record[c.dataIndex]
|
@@ -9220,7 +9236,7 @@ function NtTable(_ref) {
|
|
9220
9236
|
setFormSearch({});
|
9221
9237
|
};
|
9222
9238
|
|
9223
|
-
return /*#__PURE__*/React.createElement(
|
9239
|
+
return /*#__PURE__*/React.createElement(Spin, {
|
9224
9240
|
spinning: loading
|
9225
9241
|
}, /*#__PURE__*/React.createElement("div", {
|
9226
9242
|
className: "form"
|
@@ -9311,7 +9327,7 @@ function NtTable(_ref) {
|
|
9311
9327
|
justifyContent: 'center',
|
9312
9328
|
alignItems: 'center'
|
9313
9329
|
}
|
9314
|
-
}, none || '暂无数据')))), _typeof(pagination) === 'object' && /*#__PURE__*/React.createElement(
|
9330
|
+
}, none || '暂无数据')))), _typeof(pagination) === 'object' && /*#__PURE__*/React.createElement(Pagination, _objectSpread2({
|
9315
9331
|
style: {
|
9316
9332
|
textAlign: 'right',
|
9317
9333
|
marginTop: '10px'
|
@@ -10106,7 +10122,7 @@ function WaterLevelCharts(config) {
|
|
10106
10122
|
/*
|
10107
10123
|
* @Author: lijin
|
10108
10124
|
* @Date: 2021-09-09 11:02:54
|
10109
|
-
* @LastEditTime: 2023-02-
|
10125
|
+
* @LastEditTime: 2023-02-21 14:29:33
|
10110
10126
|
* @LastEditors: lijin
|
10111
10127
|
* @Description:
|
10112
10128
|
* @FilePath: \wargerm\src\index.ts
|
@@ -10119,4 +10135,4 @@ if (REACT_APP_ENV == 'development') {
|
|
10119
10135
|
document.documentElement.setAttribute(COLOR_ATTR_NAME, 'sd');
|
10120
10136
|
}
|
10121
10137
|
|
10122
|
-
export { Index$b as AutoScroll, Index$d as Breadcrumb, WButton as Button, index$5 as Calendar, index$3 as Card, WCascader as Cascader, Index$4 as Checkbox, Index$a as CountUp, Index$2 as DatePicker, DragBox, index as IconFont, Index as Input, WInputNumber as InputNumber, LineEcharts, Modal, ModalForm$1 as ModalForm, Modal$1 as ModalTips, index$8 as NtTable, Index$9 as Number, NumericInput, Index$3 as Radio, index$2 as RequestRenderDom, Select, Index$c as Swiper, WSwitch as Switch, index$4 as TabelCard, index$1 as Table, Index$7 as TreeSelect, Upload, index$7 as Video, index$6 as VideoPlayer, Index$6 as WDatePicker, WForm$1 as WForm, WaterLevelCharts, WebsocketHeart, useEventEmitter, useStateWithCall, wTracing, create as whox, wmox };
|
10138
|
+
export { Index$b as AutoScroll, Index$d as Breadcrumb, WButton as Button, index$5 as Calendar, index$3 as Card, WCascader as Cascader, Index$4 as Checkbox, Index$a as CountUp, Index$2 as DatePicker, DragBox, index as IconFont, Index as Input, WInputNumber as InputNumber, LineEcharts, Modal, ModalForm$1 as ModalForm, Modal$1 as ModalTips, index$8 as NtTable, Index$9 as Number, NumericInput, Index$3 as Radio, index$2 as RequestRenderDom, Index$5 as Select, Index$c as Swiper, WSwitch as Switch, index$4 as TabelCard, index$1 as Table, Index$7 as TreeSelect, Upload, index$7 as Video, index$6 as VideoPlayer, Index$6 as WDatePicker, WForm$1 as WForm, WaterLevelCharts, WebsocketHeart, useEventEmitter, useStateWithCall, wTracing, create as whox, wmox };
|