venus-design 1.1.21 → 1.1.24
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/Config/api.d.ts +6 -0
- package/dist/Config/api.js +154 -118
- package/dist/DataView/index.js +0 -1
- package/dist/DataView/resizable/index.js +14 -5
- package/dist/Drawer/index.js +6 -3
- package/dist/ProForm/index.d.ts +14 -2
- package/dist/ProForm/index.js +122 -35
- package/dist/RadioAndInput/index.js +1 -0
- package/dist/SelectCompoments/SelectUserOrDeptBySeclevel/selectPanel/dept.js +4 -4
- package/dist/SelectCompoments/SelectUserOrDeptBySeclevel/selectPanel/user.js +19 -15
- package/dist/SelectCompoments/SelectUserOrDeptBySeclevel/styles.less +1 -0
- package/dist/VenusAdjust/index.js +8 -4
- package/dist/VenusAdjust/interface.d.ts +10 -9
- package/dist/VenusDesignCom/components/Form.js +1 -1
- package/dist/VenusDetail/handleVenusDetailFunctions.js +6 -4
- package/dist/VenusDetail/staticAttr.js +74 -26
- package/dist/VenusForm/VenusFormScriptEngine.d.ts +96 -0
- package/dist/VenusForm/VenusFormScriptEngine.js +207 -0
- package/dist/VenusForm/VenusFormScriptUtils.d.ts +7 -0
- package/dist/VenusForm/VenusFormScriptUtils.js +190 -0
- package/dist/VenusForm/index.js +226 -37
- package/dist/VenusForm/interface.d.ts +4 -2
- package/dist/VenusForm/staticAttr.d.ts +1 -0
- package/dist/VenusForm/staticAttr.js +90 -62
- package/dist/VenusTable/components/filterDrawer/index.js +6 -3
- package/dist/VenusTable/components/filterDrawer/staticAttr.js +5 -4
- package/dist/VenusTable/index.js +46 -39
- package/dist/VenusTable/staticAttr.js +16 -10
- package/dist/VenusTable/style.css +2 -6
- package/dist/VenusUploadSecLevel/index.js +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -30,7 +30,8 @@ import { ProTable } from '@ant-design/pro-components';
|
|
|
30
30
|
import { SlidersOutlined } from '@ant-design/icons';
|
|
31
31
|
import { saveAs } from "file-saver";
|
|
32
32
|
import * as ExcelJs from 'exceljs';
|
|
33
|
-
import { DrawerDataAuth } from "../..";
|
|
33
|
+
import { DrawerDataAuth, storage } from "../..";
|
|
34
|
+
import { StyleProvider, legacyLogicalPropertiesTransformer } from "@ant-design/cssinjs";
|
|
34
35
|
|
|
35
36
|
// 拖拽辅助线
|
|
36
37
|
var ResizeGuideLine = function ResizeGuideLine(_ref) {
|
|
@@ -108,7 +109,8 @@ var ResizableTabel = function ResizableTabel(props) {
|
|
|
108
109
|
var sceneId = props.dataSceneIid || "";
|
|
109
110
|
var tableContainerRef = useRef(null);
|
|
110
111
|
var resizeDataRef = useRef(null);
|
|
111
|
-
|
|
112
|
+
var tableKey = props.key || "";
|
|
113
|
+
var drawerKey = tableKey + sceneId;
|
|
112
114
|
// 获取 AntD 内部滚动层
|
|
113
115
|
//@ts-ignore
|
|
114
116
|
var getScrollEl = function getScrollEl() {
|
|
@@ -343,9 +345,16 @@ var ResizableTabel = function ResizableTabel(props) {
|
|
|
343
345
|
}
|
|
344
346
|
}
|
|
345
347
|
};
|
|
348
|
+
//只要venus用户能看见权限配置按钮
|
|
349
|
+
var userInfo = storage.getSessionItem("user");
|
|
346
350
|
//是否有权限
|
|
347
351
|
var hasPermission = props.permission || props.permissionViewFn != undefined && props.permissionViewFn();
|
|
348
352
|
return /*#__PURE__*/React.createElement("div", {
|
|
353
|
+
id: "VenusProTable"
|
|
354
|
+
}, /*#__PURE__*/React.createElement(StyleProvider, {
|
|
355
|
+
hashPriority: "high",
|
|
356
|
+
transformers: [legacyLogicalPropertiesTransformer]
|
|
357
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
349
358
|
ref: tableContainerRef,
|
|
350
359
|
style: {
|
|
351
360
|
width: '100%',
|
|
@@ -389,7 +398,7 @@ var ResizableTabel = function ResizableTabel(props) {
|
|
|
389
398
|
onClick: function onClick() {
|
|
390
399
|
return getData(pageSizeG);
|
|
391
400
|
}
|
|
392
|
-
}, props.exportButtonConfig), "\u5BFC\u51FA")].concat(_toConsumableArray(res), [hasPermission && /*#__PURE__*/React.createElement(_Tooltip, {
|
|
401
|
+
}, props.exportButtonConfig), "\u5BFC\u51FA")].concat(_toConsumableArray(res), [hasPermission && userInfo && userInfo.username == "venus" && /*#__PURE__*/React.createElement(_Tooltip, {
|
|
393
402
|
title: "\u6743\u9650\u914D\u7F6E"
|
|
394
403
|
}, /*#__PURE__*/React.createElement(SlidersOutlined, {
|
|
395
404
|
onClick: function onClick() {
|
|
@@ -404,11 +413,11 @@ var ResizableTabel = function ResizableTabel(props) {
|
|
|
404
413
|
}
|
|
405
414
|
})), /*#__PURE__*/React.createElement(DrawerDataAuth, {
|
|
406
415
|
open: qxVisible,
|
|
407
|
-
|
|
416
|
+
venuskey: drawerKey,
|
|
408
417
|
onClose: function onClose() {
|
|
409
418
|
return setQxVisible(false);
|
|
410
419
|
},
|
|
411
420
|
title: "\u6743\u9650\u914D\u7F6E"
|
|
412
|
-
}));
|
|
421
|
+
}))));
|
|
413
422
|
};
|
|
414
423
|
export default ResizableTabel;
|
package/dist/Drawer/index.js
CHANGED
|
@@ -91,7 +91,7 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
91
91
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
92
92
|
isEdit = _useState6[0],
|
|
93
93
|
setisEdit = _useState6[1];
|
|
94
|
-
var key = props.
|
|
94
|
+
var key = props.venuskey || "";
|
|
95
95
|
var _Form$useForm = _Form.useForm(),
|
|
96
96
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
97
97
|
form = _Form$useForm2[0];
|
|
@@ -137,8 +137,10 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
137
137
|
* 监听抽屉展开,查询数据,表单回显
|
|
138
138
|
*/
|
|
139
139
|
useEffect(function () {
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
if (props.open) {
|
|
141
|
+
getData(getMenuId() + key);
|
|
142
|
+
}
|
|
143
|
+
}, [props.open]);
|
|
142
144
|
|
|
143
145
|
/**
|
|
144
146
|
* 保存
|
|
@@ -190,6 +192,7 @@ export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
190
192
|
destroyOnClose: true,
|
|
191
193
|
onClose: function onClose() {
|
|
192
194
|
props.onClose(false);
|
|
195
|
+
form.resetFields();
|
|
193
196
|
}
|
|
194
197
|
},
|
|
195
198
|
width: 300,
|
package/dist/ProForm/index.d.ts
CHANGED
|
@@ -40,12 +40,24 @@ export declare const VenusFormSelect: (props: any) => React.JSX.Element;
|
|
|
40
40
|
* @returns
|
|
41
41
|
*/
|
|
42
42
|
export declare const VenusFormText: (props: any) => React.JSX.Element;
|
|
43
|
+
type DefaultValueType = 'now' | 'today' | 'yesterday' | 'tomorrow' | 'startOfMonth' | 'endOfMonth' | 'startOfYear' | 'endOfYear' | 'firstDayOfWeek' | 'lastDayOfWeek' | string;
|
|
44
|
+
interface VenusFormDatePickerProps {
|
|
45
|
+
comAttr?: {
|
|
46
|
+
defaultValue?: DefaultValueType;
|
|
47
|
+
format?: string;
|
|
48
|
+
showTime?: boolean;
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
};
|
|
51
|
+
placeholder?: string;
|
|
52
|
+
disabled?: boolean;
|
|
53
|
+
[key: string]: any;
|
|
54
|
+
}
|
|
43
55
|
/**
|
|
44
56
|
* 选择时间
|
|
45
57
|
* @param props
|
|
46
58
|
* @returns
|
|
47
59
|
*/
|
|
48
|
-
export declare const VenusFormDatePicker: (props:
|
|
60
|
+
export declare const VenusFormDatePicker: (props: VenusFormDatePickerProps) => React.JSX.Element;
|
|
49
61
|
/**
|
|
50
62
|
* 选择时间
|
|
51
63
|
* @param props
|
|
@@ -53,7 +65,7 @@ export declare const VenusFormDatePicker: (props: any) => React.JSX.Element;
|
|
|
53
65
|
*/
|
|
54
66
|
export declare const VenusFormDateRangePicker: (props: any) => React.JSX.Element;
|
|
55
67
|
/**
|
|
56
|
-
*
|
|
68
|
+
* 选择数字区间
|
|
57
69
|
* @param props
|
|
58
70
|
* @returns
|
|
59
71
|
*/
|
package/dist/ProForm/index.js
CHANGED
|
@@ -51,25 +51,32 @@ var _excluded = ["children", "pageLoading", "pageFormClassName", "submitter", "s
|
|
|
51
51
|
_excluded23 = ["comAttr", "valueEnum", "options", "placeholder", "labelInValue", "disabled", "key"],
|
|
52
52
|
_excluded24 = ["comAttr", "placeholder", "disabled", "defaultValue"],
|
|
53
53
|
_excluded25 = ["comAttr", "placeholder", "disabled"],
|
|
54
|
-
_excluded26 = ["
|
|
54
|
+
_excluded26 = ["defaultValue", "format", "showTime"],
|
|
55
55
|
_excluded27 = ["comAttr", "placeholder", "disabled"],
|
|
56
|
-
_excluded28 = ["comAttr", "
|
|
57
|
-
_excluded29 = ["comAttr", "valueEnum", "options", "placeholder", "disabled"],
|
|
56
|
+
_excluded28 = ["comAttr", "placeholder", "disabled"],
|
|
57
|
+
_excluded29 = ["comAttr", "radioAttr", "valueEnum", "options", "placeholder", "disabled"],
|
|
58
58
|
_excluded30 = ["comAttr", "valueEnum", "options", "placeholder", "disabled"],
|
|
59
|
-
_excluded31 = ["comAttr", "
|
|
60
|
-
_excluded32 = ["comAttr", "placeholder", "disabled"],
|
|
61
|
-
_excluded33 = ["comAttr", "placeholder", "disabled"
|
|
62
|
-
_excluded34 = ["comAttr", "placeholder", "disabled", "
|
|
63
|
-
_excluded35 = ["comAttr", "placeholder", "disabled"],
|
|
64
|
-
_excluded36 = ["comAttr", "placeholder", "disabled"
|
|
65
|
-
_excluded37 = ["comAttr", "
|
|
66
|
-
_excluded38 = ["comAttr", "request", "
|
|
59
|
+
_excluded31 = ["comAttr", "valueEnum", "options", "placeholder", "disabled"],
|
|
60
|
+
_excluded32 = ["comAttr", "placeholder", "disabled", "minRows"],
|
|
61
|
+
_excluded33 = ["comAttr", "placeholder", "disabled"],
|
|
62
|
+
_excluded34 = ["comAttr", "placeholder", "disabled", "isDuo"],
|
|
63
|
+
_excluded35 = ["comAttr", "placeholder", "disabled", "unit", "unitName"],
|
|
64
|
+
_excluded36 = ["comAttr", "placeholder", "disabled"],
|
|
65
|
+
_excluded37 = ["comAttr", "placeholder", "disabled", "isDuo"],
|
|
66
|
+
_excluded38 = ["comAttr", "request", "placeholder", "disabled"],
|
|
67
67
|
_excluded39 = ["comAttr", "request", "fieldNames", "otherKeys", "placeholder", "disabled"],
|
|
68
|
-
_excluded40 = ["comAttr", "
|
|
68
|
+
_excluded40 = ["comAttr", "request", "fieldNames", "otherKeys", "placeholder", "disabled"],
|
|
69
69
|
_excluded41 = ["comAttr", "placeholder", "disabled", "isDuo"],
|
|
70
70
|
_excluded42 = ["comAttr", "placeholder", "disabled", "isDuo"],
|
|
71
71
|
_excluded43 = ["comAttr", "placeholder", "disabled", "isDuo"],
|
|
72
|
-
_excluded44 = ["comAttr", "placeholder", "disabled", "isDuo"]
|
|
72
|
+
_excluded44 = ["comAttr", "placeholder", "disabled", "isDuo"],
|
|
73
|
+
_excluded45 = ["comAttr", "placeholder", "disabled", "isDuo"];
|
|
74
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
75
|
+
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."); }
|
|
76
|
+
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); }
|
|
77
|
+
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; }
|
|
78
|
+
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; } }
|
|
79
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
73
80
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
74
81
|
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; }
|
|
75
82
|
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; }
|
|
@@ -79,6 +86,7 @@ import { CheckBoxInput, NumberPercent, NumberUnit, RadioAndInput, Search, TreeSe
|
|
|
79
86
|
import "./styles.less";
|
|
80
87
|
import { StyleProvider, legacyLogicalPropertiesTransformer } from "@ant-design/cssinjs";
|
|
81
88
|
import { ProFormDigitRange } from '@ant-design/pro-components';
|
|
89
|
+
import dayjs from 'dayjs';
|
|
82
90
|
var RangePicker = _DatePicker.RangePicker;
|
|
83
91
|
var ProForm = function ProForm(props) {
|
|
84
92
|
var children = props.children,
|
|
@@ -600,24 +608,103 @@ export var VenusFormText = function VenusFormText(props) {
|
|
|
600
608
|
defaultValue: defaultValue
|
|
601
609
|
}, comAttr)));
|
|
602
610
|
};
|
|
611
|
+
|
|
612
|
+
// 普通日期字符串或 dayjs 支持的格式
|
|
613
|
+
|
|
614
|
+
var DEFAULT_VALUE_MAP = {
|
|
615
|
+
now: function now() {
|
|
616
|
+
return dayjs();
|
|
617
|
+
},
|
|
618
|
+
today: function today() {
|
|
619
|
+
return dayjs().startOf('day');
|
|
620
|
+
},
|
|
621
|
+
yesterday: function yesterday() {
|
|
622
|
+
return dayjs().subtract(1, 'day').startOf('day');
|
|
623
|
+
},
|
|
624
|
+
tomorrow: function tomorrow() {
|
|
625
|
+
return dayjs().add(1, 'day').startOf('day');
|
|
626
|
+
},
|
|
627
|
+
startOfMonth: function startOfMonth() {
|
|
628
|
+
return dayjs().startOf('month');
|
|
629
|
+
},
|
|
630
|
+
endOfMonth: function endOfMonth() {
|
|
631
|
+
return dayjs().endOf('month');
|
|
632
|
+
},
|
|
633
|
+
startOfYear: function startOfYear() {
|
|
634
|
+
return dayjs().startOf('year');
|
|
635
|
+
},
|
|
636
|
+
endOfYear: function endOfYear() {
|
|
637
|
+
return dayjs().endOf('year');
|
|
638
|
+
},
|
|
639
|
+
firstDayOfWeek: function firstDayOfWeek() {
|
|
640
|
+
return dayjs().startOf('week').add(1, 'day');
|
|
641
|
+
},
|
|
642
|
+
// dayjs 默认周日为一周开始,+1 调整为周一
|
|
643
|
+
lastDayOfWeek: function lastDayOfWeek() {
|
|
644
|
+
return dayjs().endOf('week').add(1, 'day');
|
|
645
|
+
}
|
|
646
|
+
};
|
|
647
|
+
|
|
603
648
|
/**
|
|
604
649
|
* 选择时间
|
|
605
650
|
* @param props
|
|
606
651
|
* @returns
|
|
607
652
|
*/
|
|
653
|
+
|
|
608
654
|
export var VenusFormDatePicker = function VenusFormDatePicker(props) {
|
|
609
655
|
var _props$comAttr20 = props.comAttr,
|
|
610
656
|
comAttr = _props$comAttr20 === void 0 ? {} : _props$comAttr20,
|
|
611
657
|
placeholder = props.placeholder,
|
|
612
658
|
disabled = props.disabled,
|
|
613
659
|
others = _objectWithoutProperties(props, _excluded25);
|
|
660
|
+
var defaultValue = comAttr.defaultValue,
|
|
661
|
+
format = comAttr.format,
|
|
662
|
+
showTime = comAttr.showTime,
|
|
663
|
+
restComAttr = _objectWithoutProperties(comAttr, _excluded26);
|
|
664
|
+
|
|
665
|
+
// 解析默认值
|
|
666
|
+
var resolveDefaultValue = function resolveDefaultValue(val) {
|
|
667
|
+
if (val === undefined || val === null || val === '') return undefined;
|
|
668
|
+
|
|
669
|
+
// 预定义关键字
|
|
670
|
+
if (typeof val === 'string' && DEFAULT_VALUE_MAP[val]) {
|
|
671
|
+
return DEFAULT_VALUE_MAP[val]();
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
// 相对时间表达式:+1d, -3m, +2y
|
|
675
|
+
if (typeof val === 'string' && /^[+-]\d+[dmyw]$/.test(val)) {
|
|
676
|
+
var match = val.match(/^([+-])(\d+)([dmyw])$/);
|
|
677
|
+
if (match) {
|
|
678
|
+
var _match = _slicedToArray(match, 4),
|
|
679
|
+
sign = _match[1],
|
|
680
|
+
num = _match[2],
|
|
681
|
+
unit = _match[3];
|
|
682
|
+
var amount = sign === '+' ? parseInt(num) : -parseInt(num);
|
|
683
|
+
var dayjsUnit = {
|
|
684
|
+
d: 'day',
|
|
685
|
+
m: 'month',
|
|
686
|
+
y: 'year',
|
|
687
|
+
w: 'week'
|
|
688
|
+
}[unit];
|
|
689
|
+
return dayjs().add(amount, dayjsUnit);
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
// 普通日期字符串
|
|
694
|
+
return dayjs(val);
|
|
695
|
+
};
|
|
696
|
+
var resolvedValue = resolveDefaultValue(defaultValue);
|
|
614
697
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(_DatePicker, _extends({
|
|
615
698
|
style: {
|
|
616
699
|
width: '100%'
|
|
617
700
|
},
|
|
618
701
|
placeholder: placeholder,
|
|
619
|
-
disabled: disabled
|
|
620
|
-
|
|
702
|
+
disabled: disabled,
|
|
703
|
+
format: format,
|
|
704
|
+
showTime: showTime
|
|
705
|
+
}, restComAttr, {
|
|
706
|
+
defaultValue: resolvedValue
|
|
707
|
+
})));
|
|
621
708
|
};
|
|
622
709
|
/**
|
|
623
710
|
* 选择时间
|
|
@@ -629,7 +716,7 @@ export var VenusFormDateRangePicker = function VenusFormDateRangePicker(props) {
|
|
|
629
716
|
comAttr = _props$comAttr21 === void 0 ? {} : _props$comAttr21,
|
|
630
717
|
placeholder = props.placeholder,
|
|
631
718
|
disabled = props.disabled,
|
|
632
|
-
others = _objectWithoutProperties(props,
|
|
719
|
+
others = _objectWithoutProperties(props, _excluded27);
|
|
633
720
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(RangePicker, _extends({
|
|
634
721
|
style: {
|
|
635
722
|
width: '100%'
|
|
@@ -639,7 +726,7 @@ export var VenusFormDateRangePicker = function VenusFormDateRangePicker(props) {
|
|
|
639
726
|
}, comAttr)));
|
|
640
727
|
};
|
|
641
728
|
/**
|
|
642
|
-
*
|
|
729
|
+
* 选择数字区间
|
|
643
730
|
* @param props
|
|
644
731
|
* @returns
|
|
645
732
|
*/
|
|
@@ -648,7 +735,7 @@ export var VenusFormNumberRange = function VenusFormNumberRange(props) {
|
|
|
648
735
|
comAttr = _props$comAttr22 === void 0 ? {} : _props$comAttr22,
|
|
649
736
|
placeholder = props.placeholder,
|
|
650
737
|
disabled = props.disabled,
|
|
651
|
-
others = _objectWithoutProperties(props,
|
|
738
|
+
others = _objectWithoutProperties(props, _excluded28);
|
|
652
739
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(ProFormDigitRange, _extends({
|
|
653
740
|
placeholder: placeholder,
|
|
654
741
|
disabled: disabled
|
|
@@ -670,7 +757,7 @@ export var VenusFormRadioGroup = function VenusFormRadioGroup(props) {
|
|
|
670
757
|
options = props.options,
|
|
671
758
|
placeholder = props.placeholder,
|
|
672
759
|
disabled = props.disabled,
|
|
673
|
-
others = _objectWithoutProperties(props,
|
|
760
|
+
others = _objectWithoutProperties(props, _excluded29);
|
|
674
761
|
var renderOps = function renderOps() {
|
|
675
762
|
if (options) {
|
|
676
763
|
return options.map(function (ls) {
|
|
@@ -700,7 +787,7 @@ export var VenusFormCheckBoxInputGroup = function VenusFormCheckBoxInputGroup(pr
|
|
|
700
787
|
options = props.options,
|
|
701
788
|
placeholder = props.placeholder,
|
|
702
789
|
disabled = props.disabled,
|
|
703
|
-
others = _objectWithoutProperties(props,
|
|
790
|
+
others = _objectWithoutProperties(props, _excluded30);
|
|
704
791
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(CheckBoxInput, props));
|
|
705
792
|
};
|
|
706
793
|
/**
|
|
@@ -714,7 +801,7 @@ export var VenusFormCheckBoxGroup = function VenusFormCheckBoxGroup(props) {
|
|
|
714
801
|
options = props.options,
|
|
715
802
|
placeholder = props.placeholder,
|
|
716
803
|
disabled = props.disabled,
|
|
717
|
-
others = _objectWithoutProperties(props,
|
|
804
|
+
others = _objectWithoutProperties(props, _excluded31);
|
|
718
805
|
var renderOps = function renderOps() {
|
|
719
806
|
if (options) {
|
|
720
807
|
return options.map(function (ls) {
|
|
@@ -743,7 +830,7 @@ export var VenusFormTextarea = function VenusFormTextarea(props) {
|
|
|
743
830
|
placeholder = props.placeholder,
|
|
744
831
|
disabled = props.disabled,
|
|
745
832
|
minRows = props.minRows,
|
|
746
|
-
others = _objectWithoutProperties(props,
|
|
833
|
+
others = _objectWithoutProperties(props, _excluded32);
|
|
747
834
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(_Input.TextArea, _extends({
|
|
748
835
|
autoSize: {
|
|
749
836
|
minRows: minRows ? minRows : 3
|
|
@@ -763,7 +850,7 @@ export var VenusFormNumber = function VenusFormNumber(props) {
|
|
|
763
850
|
comAttr = _props$comAttr27 === void 0 ? {} : _props$comAttr27,
|
|
764
851
|
placeholder = props.placeholder,
|
|
765
852
|
disabled = props.disabled,
|
|
766
|
-
others = _objectWithoutProperties(props,
|
|
853
|
+
others = _objectWithoutProperties(props, _excluded33);
|
|
767
854
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(_InputNumber, _extends({
|
|
768
855
|
style: {
|
|
769
856
|
width: "100%",
|
|
@@ -784,7 +871,7 @@ export var VenusFormUploadImage = function VenusFormUploadImage(props) {
|
|
|
784
871
|
placeholder = props.placeholder,
|
|
785
872
|
disabled = props.disabled,
|
|
786
873
|
isDuo = props.isDuo,
|
|
787
|
-
others = _objectWithoutProperties(props,
|
|
874
|
+
others = _objectWithoutProperties(props, _excluded34);
|
|
788
875
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(UploadImage, _extends({
|
|
789
876
|
placeholder: placeholder,
|
|
790
877
|
disabled: disabled
|
|
@@ -802,7 +889,7 @@ export var VenusFormNumberUnit = function VenusFormNumberUnit(props) {
|
|
|
802
889
|
disabled = props.disabled,
|
|
803
890
|
unit = props.unit,
|
|
804
891
|
unitName = props.unitName,
|
|
805
|
-
others = _objectWithoutProperties(props,
|
|
892
|
+
others = _objectWithoutProperties(props, _excluded35);
|
|
806
893
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(NumberUnit, _extends({
|
|
807
894
|
unitName: unitName,
|
|
808
895
|
unit: unit,
|
|
@@ -820,7 +907,7 @@ export var VenusFormNumberPercent = function VenusFormNumberPercent(props) {
|
|
|
820
907
|
comAttr = _props$comAttr30 === void 0 ? {} : _props$comAttr30,
|
|
821
908
|
placeholder = props.placeholder,
|
|
822
909
|
disabled = props.disabled,
|
|
823
|
-
others = _objectWithoutProperties(props,
|
|
910
|
+
others = _objectWithoutProperties(props, _excluded36);
|
|
824
911
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(NumberPercent, _extends({
|
|
825
912
|
placeholder: placeholder,
|
|
826
913
|
disabled: disabled
|
|
@@ -837,7 +924,7 @@ export var VenusFormUpload = function VenusFormUpload(props) {
|
|
|
837
924
|
placeholder = props.placeholder,
|
|
838
925
|
disabled = props.disabled,
|
|
839
926
|
isDuo = props.isDuo,
|
|
840
|
-
others = _objectWithoutProperties(props,
|
|
927
|
+
others = _objectWithoutProperties(props, _excluded37);
|
|
841
928
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(Upload, _extends({
|
|
842
929
|
placeholder: placeholder,
|
|
843
930
|
isDuo: isDuo,
|
|
@@ -855,7 +942,7 @@ export var VenusFormTreeSelect = function VenusFormTreeSelect(props) {
|
|
|
855
942
|
request = props.request,
|
|
856
943
|
placeholder = props.placeholder,
|
|
857
944
|
disabled = props.disabled,
|
|
858
|
-
others = _objectWithoutProperties(props,
|
|
945
|
+
others = _objectWithoutProperties(props, _excluded38);
|
|
859
946
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(TreeSelect, _extends({
|
|
860
947
|
request: request,
|
|
861
948
|
placeholder: placeholder,
|
|
@@ -875,7 +962,7 @@ export var VenusFormSearch = function VenusFormSearch(props) {
|
|
|
875
962
|
otherKeys = props.otherKeys,
|
|
876
963
|
placeholder = props.placeholder,
|
|
877
964
|
disabled = props.disabled,
|
|
878
|
-
others = _objectWithoutProperties(props,
|
|
965
|
+
others = _objectWithoutProperties(props, _excluded39);
|
|
879
966
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(Search, _extends({
|
|
880
967
|
request: request,
|
|
881
968
|
placeholder: placeholder,
|
|
@@ -897,7 +984,7 @@ export var VenusFormSwitch = function VenusFormSwitch(props) {
|
|
|
897
984
|
otherKeys = props.otherKeys,
|
|
898
985
|
placeholder = props.placeholder,
|
|
899
986
|
disabled = props.disabled,
|
|
900
|
-
others = _objectWithoutProperties(props,
|
|
987
|
+
others = _objectWithoutProperties(props, _excluded40);
|
|
901
988
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(_Switch, _extends({
|
|
902
989
|
disabled: disabled
|
|
903
990
|
}, comAttr)));
|
|
@@ -913,7 +1000,7 @@ export var VenusFormRate = function VenusFormRate(props) {
|
|
|
913
1000
|
placeholder = props.placeholder,
|
|
914
1001
|
disabled = props.disabled,
|
|
915
1002
|
isDuo = props.isDuo,
|
|
916
|
-
others = _objectWithoutProperties(props,
|
|
1003
|
+
others = _objectWithoutProperties(props, _excluded41);
|
|
917
1004
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(_Rate, _extends({
|
|
918
1005
|
disabled: disabled
|
|
919
1006
|
}, comAttr)));
|
|
@@ -929,7 +1016,7 @@ export var VenusFormSlider = function VenusFormSlider(props) {
|
|
|
929
1016
|
placeholder = props.placeholder,
|
|
930
1017
|
disabled = props.disabled,
|
|
931
1018
|
isDuo = props.isDuo,
|
|
932
|
-
others = _objectWithoutProperties(props,
|
|
1019
|
+
others = _objectWithoutProperties(props, _excluded42);
|
|
933
1020
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(_Slider, _extends({
|
|
934
1021
|
disabled: disabled
|
|
935
1022
|
}, comAttr)));
|
|
@@ -946,7 +1033,7 @@ export var VenusFormUploadPro = function VenusFormUploadPro(props) {
|
|
|
946
1033
|
placeholder = props.placeholder,
|
|
947
1034
|
disabled = props.disabled,
|
|
948
1035
|
isDuo = props.isDuo,
|
|
949
|
-
others = _objectWithoutProperties(props,
|
|
1036
|
+
others = _objectWithoutProperties(props, _excluded43);
|
|
950
1037
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(VenusUploadSecLevelForm, _extends({
|
|
951
1038
|
placeholder: placeholder,
|
|
952
1039
|
isDuo: isDuo,
|
|
@@ -964,7 +1051,7 @@ export var VenusFormEditor = function VenusFormEditor(props) {
|
|
|
964
1051
|
placeholder = props.placeholder,
|
|
965
1052
|
disabled = props.disabled,
|
|
966
1053
|
isDuo = props.isDuo,
|
|
967
|
-
others = _objectWithoutProperties(props,
|
|
1054
|
+
others = _objectWithoutProperties(props, _excluded44);
|
|
968
1055
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(VenusEditor, _extends({
|
|
969
1056
|
disabled: disabled
|
|
970
1057
|
}, comAttr)));
|
|
@@ -978,7 +1065,7 @@ export var VenusFormUploadSecLevel = function VenusFormUploadSecLevel(props) {
|
|
|
978
1065
|
placeholder = props.placeholder,
|
|
979
1066
|
disabled = props.disabled,
|
|
980
1067
|
isDuo = props.isDuo,
|
|
981
|
-
others = _objectWithoutProperties(props,
|
|
1068
|
+
others = _objectWithoutProperties(props, _excluded45);
|
|
982
1069
|
return /*#__PURE__*/React.createElement(FormItem2, others, /*#__PURE__*/React.createElement(VenusUploadSecLevel, _extends({
|
|
983
1070
|
placeholder: placeholder,
|
|
984
1071
|
isDuo: isDuo,
|
|
@@ -86,6 +86,7 @@ var RadioAndInput = function RadioAndInput(props) {
|
|
|
86
86
|
},
|
|
87
87
|
onChange: onRadio,
|
|
88
88
|
value: value,
|
|
89
|
+
defaultValue: props.defaultValue,
|
|
89
90
|
placeholder: placeholder,
|
|
90
91
|
disabled: disabled
|
|
91
92
|
}, comAttr), renderOps()), radioAttr.showFlag ? /*#__PURE__*/React.createElement(_Input, _extends({}, radioAttr, {
|
|
@@ -7,8 +7,6 @@ import "antd/es/button/style";
|
|
|
7
7
|
import _Button from "antd/es/button";
|
|
8
8
|
import "antd/es/tree/style";
|
|
9
9
|
import _Tree from "antd/es/tree";
|
|
10
|
-
import "antd/es/message/style";
|
|
11
|
-
import _message from "antd/es/message";
|
|
12
10
|
import "antd/es/input/style";
|
|
13
11
|
import _Input from "antd/es/input";
|
|
14
12
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
@@ -90,7 +88,9 @@ var VenusDept = function VenusDept(props) {
|
|
|
90
88
|
var onSelect = function onSelect(selectedKey, e) {
|
|
91
89
|
if (selectedKey.length > 1) {
|
|
92
90
|
if (!props.isMultiple) {
|
|
93
|
-
|
|
91
|
+
setSelectedKeys([selectedKey[selectedKey.length - 1]]);
|
|
92
|
+
var selectData = e.selectedNodes[e.selectedNodes.length - 1];
|
|
93
|
+
setSelectRows([selectData]);
|
|
94
94
|
} else {
|
|
95
95
|
setSelectedKeys(selectedKey);
|
|
96
96
|
setSelectRows(e.selectedNodes);
|
|
@@ -212,7 +212,7 @@ var VenusDept = function VenusDept(props) {
|
|
|
212
212
|
onSelect: onSelect,
|
|
213
213
|
blockNode: true,
|
|
214
214
|
multiple: true,
|
|
215
|
-
|
|
215
|
+
defaultExpandedKeys: [1]
|
|
216
216
|
//selectable={false}
|
|
217
217
|
,
|
|
218
218
|
height: 364,
|
|
@@ -222,19 +222,20 @@ var VenusUser = function VenusUser(props) {
|
|
|
222
222
|
var user = info.node,
|
|
223
223
|
selectedFlag = info.selected;
|
|
224
224
|
if (user.type === "dept") {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
225
|
+
_message.warning("请选择用户!");
|
|
226
|
+
/*const deptKeysSet = new Set([...selectedDepartments, ...selectedKeys, ...dataKeysData]);
|
|
227
|
+
const updatedDeptKeys = updateSelection(deptKeysSet, user.key, selectedFlag);
|
|
228
|
+
if (updatedDeptKeys.length > 1 && !props.isMultiple) {
|
|
229
|
+
message.warning("不能多选!");
|
|
230
|
+
} else {
|
|
231
|
+
if(props.maxSelectCount&&updatedDeptKeys.length>props.maxSelectCount){
|
|
232
|
+
message.warning("最多选择"+props.maxSelectCount+"个部门!");
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
setSelectedKeys(updatedDeptKeys);
|
|
236
|
+
onSelectedDepartments(updatedDeptKeys);
|
|
237
|
+
dataKeysData = updatedDeptKeys;
|
|
238
|
+
}*/
|
|
238
239
|
} else {
|
|
239
240
|
user.name = user.title || user.username;
|
|
240
241
|
var updatedUserRows = updateUserSelection(selectedRow, user, selectedFlag);
|
|
@@ -243,7 +244,10 @@ var VenusUser = function VenusUser(props) {
|
|
|
243
244
|
})), _toConsumableArray(selectedKeysValue)));
|
|
244
245
|
var updatedUserKeys = Array.from(userKeysSet);
|
|
245
246
|
if (updatedUserKeys.length > 1 && !props.isMultiple) {
|
|
246
|
-
|
|
247
|
+
var selectData = updatedUserRows[updatedUserRows.length - 1];
|
|
248
|
+
setSelectedRow([selectData]);
|
|
249
|
+
setSelectedKeys(selectedKeysValue);
|
|
250
|
+
dataKeysData = selectedKeysValue;
|
|
247
251
|
} else {
|
|
248
252
|
if (props.maxSelectCount && updatedUserKeys.length > props.maxSelectCount) {
|
|
249
253
|
_message.warning("最多选择" + props.maxSelectCount + "个用户!");
|
|
@@ -532,7 +536,7 @@ var VenusUser = function VenusUser(props) {
|
|
|
532
536
|
}, /*#__PURE__*/React.createElement(_Tree, {
|
|
533
537
|
onSelect: onSelect,
|
|
534
538
|
blockNode: true,
|
|
535
|
-
multiple:
|
|
539
|
+
multiple: props.isMultiple,
|
|
536
540
|
defaultExpandedKeys: ["dept_1"]
|
|
537
541
|
//selectable={false}
|
|
538
542
|
,
|
|
@@ -47,6 +47,9 @@ var VenusAdjust = function VenusAdjust(props) {
|
|
|
47
47
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
48
48
|
data = _useState8[0],
|
|
49
49
|
setData = _useState8[1];
|
|
50
|
+
useEffect(function () {
|
|
51
|
+
setData(props.data);
|
|
52
|
+
}, [props.data]);
|
|
50
53
|
/**
|
|
51
54
|
* 根据场景标识查询表单对象
|
|
52
55
|
*/
|
|
@@ -150,11 +153,11 @@ var VenusAdjust = function VenusAdjust(props) {
|
|
|
150
153
|
key: props.dataViewIidBefore,
|
|
151
154
|
loading: false //加载中
|
|
152
155
|
,
|
|
153
|
-
dataViewIid: props.dataViewIidBefore //数据视图标识
|
|
156
|
+
dataViewIid: props.dataViewIidBefore || "" //数据视图标识
|
|
154
157
|
,
|
|
155
|
-
dataSceneIid: props.
|
|
158
|
+
dataSceneIid: props.dataSceneIidBefore || "" //数据场景标识
|
|
156
159
|
,
|
|
157
|
-
data: props.
|
|
160
|
+
data: props.dataBefore || {} //详情数据
|
|
158
161
|
,
|
|
159
162
|
dataAfter: data,
|
|
160
163
|
detailColumn: detailData
|
|
@@ -177,6 +180,7 @@ var VenusAdjust = function VenusAdjust(props) {
|
|
|
177
180
|
,
|
|
178
181
|
onFinish: ( /*#__PURE__*/function () {
|
|
179
182
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(v) {
|
|
183
|
+
var _props$onFinish;
|
|
180
184
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
181
185
|
while (1) switch (_context3.prev = _context3.next) {
|
|
182
186
|
case 0:
|
|
@@ -184,7 +188,7 @@ var VenusAdjust = function VenusAdjust(props) {
|
|
|
184
188
|
return saveSubmitIng(true);
|
|
185
189
|
case 2:
|
|
186
190
|
_context3.next = 4;
|
|
187
|
-
return props.onFinish(v);
|
|
191
|
+
return (_props$onFinish = props.onFinish) === null || _props$onFinish === void 0 ? void 0 : _props$onFinish.call(props, v);
|
|
188
192
|
case 4:
|
|
189
193
|
_context3.next = 6;
|
|
190
194
|
return saveSubmitIng(false);
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
* 调整组件(暂时不用)
|
|
3
3
|
*/
|
|
4
4
|
export interface VenusAdjustInterface {
|
|
5
|
-
onFinish
|
|
6
|
-
onCancel
|
|
7
|
-
dataViewIid
|
|
8
|
-
dataSceneIid
|
|
9
|
-
dataViewIidBefore
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
onFinish?: Function;
|
|
6
|
+
onCancel?: Function;
|
|
7
|
+
dataViewIid?: string;
|
|
8
|
+
dataSceneIid?: string;
|
|
9
|
+
dataViewIidBefore?: string;
|
|
10
|
+
dataBefore?: object;
|
|
11
|
+
dataSceneIidBefore?: string;
|
|
12
|
+
data?: object;
|
|
13
|
+
formData?: [];
|
|
13
14
|
form?: any;
|
|
14
|
-
detailData
|
|
15
|
+
detailData?: [];
|
|
15
16
|
}
|
|
@@ -88,7 +88,7 @@ var VenusDesignForm = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
88
88
|
var onValuesChange = function onValuesChange(values, allValues) {
|
|
89
89
|
var _formRef$current;
|
|
90
90
|
var formData = ((_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.getFormDataField()) || [];
|
|
91
|
-
var data = setVenusFormFormate(formData,
|
|
91
|
+
var data = setVenusFormFormate(formData, allValues);
|
|
92
92
|
if (props.conf.type != "view") {
|
|
93
93
|
var cleaned = Object.fromEntries(Object.entries(data).filter(function (_ref2) {
|
|
94
94
|
var _ref3 = _slicedToArray(_ref2, 2),
|