@zgfe/modules-settings 1.2.20-role.13 → 1.2.20-role.14
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/es/components/selectAppWrapper/index.d.ts +2 -1
- package/es/components/selectAppWrapper/index.js +15 -10
- package/es/modules/companySetting/role/index.js +5 -5
- package/es/modules/companySetting/role/setDataRangeDialog/index.d.ts +2 -1
- package/es/modules/companySetting/role/setDataRangeDialog/index.js +3 -3
- package/package.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { AppInfoProps } from '@zgfe/business-lib/es/context';
|
|
2
3
|
declare const SetDataRangeDialog: React.FC<{
|
|
3
|
-
|
|
4
|
+
currentSelectAppInfo: AppInfoProps;
|
|
4
5
|
onChangeCondition: (data: any[]) => void;
|
|
5
6
|
currentJson: any[];
|
|
6
7
|
}>;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
8
|
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."); }
|
|
3
9
|
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); }
|
|
@@ -9,7 +15,7 @@ import { Spin } from 'antd';
|
|
|
9
15
|
import { BizUserCondition, BizGlobalDataContext, ajax } from '@zgfe/business-lib';
|
|
10
16
|
import convertAttributeData from './util';
|
|
11
17
|
var SetDataRangeDialog = function SetDataRangeDialog(props) {
|
|
12
|
-
var
|
|
18
|
+
var currentSelectAppInfo = props.currentSelectAppInfo,
|
|
13
19
|
onChangeCondition = props.onChangeCondition,
|
|
14
20
|
currentJson = props.currentJson;
|
|
15
21
|
var _useContext = useContext(BizGlobalDataContext),
|
|
@@ -49,11 +55,11 @@ var SetDataRangeDialog = function SetDataRangeDialog(props) {
|
|
|
49
55
|
useEffect(function () {
|
|
50
56
|
// 请求下拉数据
|
|
51
57
|
initData();
|
|
52
|
-
}, [
|
|
58
|
+
}, [currentSelectAppInfo]);
|
|
53
59
|
var initData = function initData() {
|
|
54
|
-
loadUserProps(
|
|
55
|
-
loadEvents(
|
|
56
|
-
loadEnvList(
|
|
60
|
+
loadUserProps(currentSelectAppInfo.app_id);
|
|
61
|
+
loadEvents(currentSelectAppInfo.app_id);
|
|
62
|
+
loadEnvList(currentSelectAppInfo.app_id);
|
|
57
63
|
};
|
|
58
64
|
function loadUserProps(appId) {
|
|
59
65
|
setLoadUsers(true);
|
|
@@ -115,10 +121,10 @@ var SetDataRangeDialog = function SetDataRangeDialog(props) {
|
|
|
115
121
|
eventGroupList: newStore.eventGroupList,
|
|
116
122
|
userPropList: newStore.userPropList,
|
|
117
123
|
eventEnvList: newStore.eventEnvList,
|
|
118
|
-
currentApp: {
|
|
119
|
-
appId:
|
|
124
|
+
currentApp: _objectSpread({
|
|
125
|
+
appId: currentSelectAppInfo.app_id,
|
|
120
126
|
platform: 0
|
|
121
|
-
},
|
|
127
|
+
}, currentSelectAppInfo),
|
|
122
128
|
authority: authority
|
|
123
129
|
}
|
|
124
130
|
}, /*#__PURE__*/React.createElement(BizUserCondition, {
|
|
@@ -126,14 +132,13 @@ var SetDataRangeDialog = function SetDataRangeDialog(props) {
|
|
|
126
132
|
openBusinessDataCondition: true,
|
|
127
133
|
openOrderDataCondition: true,
|
|
128
134
|
openTagCondition: true,
|
|
129
|
-
userTagsData: [],
|
|
130
135
|
defaultValue: currentJson,
|
|
131
136
|
onChange: onChangeCondition,
|
|
132
137
|
orConditionNum: 3,
|
|
133
138
|
andConditionNum: 8,
|
|
134
139
|
eventAttrNum: 3,
|
|
135
140
|
isRealTime: true,
|
|
136
|
-
key:
|
|
141
|
+
key: currentSelectAppInfo.app_id
|
|
137
142
|
})) : /*#__PURE__*/React.createElement(Spin, {
|
|
138
143
|
tip: "\u57FA\u7840\u6570\u636E\u52A0\u8F7D\u4E2D"
|
|
139
144
|
}));
|
|
@@ -127,10 +127,10 @@ var RoleList = function RoleList(props) {
|
|
|
127
127
|
_useState44 = _slicedToArray(_useState43, 2),
|
|
128
128
|
dataRangeDialogTitle = _useState44[0],
|
|
129
129
|
setDataRangeDialogTitle = _useState44[1];
|
|
130
|
-
var _useState45 = useState(
|
|
130
|
+
var _useState45 = useState({}),
|
|
131
131
|
_useState46 = _slicedToArray(_useState45, 2),
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
currentSelectAppInfo = _useState46[0],
|
|
133
|
+
setCurrentSelectAppInfo = _useState46[1];
|
|
134
134
|
var _useState47 = useState([]),
|
|
135
135
|
_useState48 = _slicedToArray(_useState47, 2),
|
|
136
136
|
appCondition = _useState48[0],
|
|
@@ -775,7 +775,7 @@ var RoleList = function RoleList(props) {
|
|
|
775
775
|
className: "custom-item"
|
|
776
776
|
}, node, !appList.includes(option.app_id) ? null : /*#__PURE__*/React.createElement("div", {
|
|
777
777
|
onClick: function onClick(e) {
|
|
778
|
-
|
|
778
|
+
setCurrentSelectAppInfo(option);
|
|
779
779
|
setDataRangeDialogTitle(node);
|
|
780
780
|
setIsModalOpen(true);
|
|
781
781
|
var currentJson = appCondition.filter(function (item) {
|
|
@@ -1071,7 +1071,7 @@ var RoleList = function RoleList(props) {
|
|
|
1071
1071
|
isModalOpen: isModalOpen,
|
|
1072
1072
|
setIsModalOpen: setIsModalOpen,
|
|
1073
1073
|
dataRangeDialogTitle: dataRangeDialogTitle,
|
|
1074
|
-
|
|
1074
|
+
currentSelectAppInfo: currentSelectAppInfo,
|
|
1075
1075
|
setConditionFn: setConditionFn,
|
|
1076
1076
|
isRoleAuthStatus: isRoleAuthStatus,
|
|
1077
1077
|
setIsRoleAuthStatus: setIsRoleAuthStatus,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import './index.less';
|
|
3
|
+
import { AppInfoProps } from '@zgfe/business-lib/es/context';
|
|
3
4
|
declare const SetDataRangeDialog: React.FC<{
|
|
4
5
|
isModalOpen: boolean;
|
|
5
6
|
setIsModalOpen: Function;
|
|
6
7
|
dataRangeDialogTitle: ReactNode;
|
|
7
|
-
|
|
8
|
+
currentSelectAppInfo: AppInfoProps;
|
|
8
9
|
setConditionFn: Function;
|
|
9
10
|
currentJson: any[];
|
|
10
11
|
setCurrentJson: Function;
|
|
@@ -8,7 +8,7 @@ var SetDataRangeDialog = function SetDataRangeDialog(props) {
|
|
|
8
8
|
var isModalOpen = props.isModalOpen,
|
|
9
9
|
setIsModalOpen = props.setIsModalOpen,
|
|
10
10
|
dataRangeDialogTitle = props.dataRangeDialogTitle,
|
|
11
|
-
|
|
11
|
+
currentSelectAppInfo = props.currentSelectAppInfo,
|
|
12
12
|
setConditionFn = props.setConditionFn,
|
|
13
13
|
currentJson = props.currentJson,
|
|
14
14
|
setCurrentJson = props.setCurrentJson,
|
|
@@ -21,7 +21,7 @@ var SetDataRangeDialog = function SetDataRangeDialog(props) {
|
|
|
21
21
|
if (!currentJson) return;
|
|
22
22
|
var res = util.validateUserCondition(currentJson);
|
|
23
23
|
if (res) return message.error(res);
|
|
24
|
-
setConditionFn(
|
|
24
|
+
setConditionFn(currentSelectAppInfo.app_id, currentJson);
|
|
25
25
|
setIsModalOpen(false);
|
|
26
26
|
}
|
|
27
27
|
return /*#__PURE__*/React.createElement(BizDialog, {
|
|
@@ -55,7 +55,7 @@ var SetDataRangeDialog = function SetDataRangeDialog(props) {
|
|
|
55
55
|
}, "\u5B9A\u4E49"), /*#__PURE__*/React.createElement("div", {
|
|
56
56
|
className: "config-value"
|
|
57
57
|
}), /*#__PURE__*/React.createElement(SelectAppWrapper, {
|
|
58
|
-
|
|
58
|
+
currentSelectAppInfo: currentSelectAppInfo,
|
|
59
59
|
onChangeCondition: onChangeCondition,
|
|
60
60
|
currentJson: currentJson
|
|
61
61
|
})) : null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-settings",
|
|
3
|
-
"version": "1.2.20-role.
|
|
3
|
+
"version": "1.2.20-role.14",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"umi-request": "^1.4.0",
|
|
52
52
|
"yorkie": "^2.0.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "904367c808e0f31a5dac6ad348d197fa9f1312c8",
|
|
55
55
|
"gitHooks": {
|
|
56
56
|
"pre-commit": "lint-staged"
|
|
57
57
|
}
|