@luck-design-biz/luckda 0.0.16-9 → 0.0.17

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.
@@ -10,13 +10,13 @@ var _excluded = ["namespace", "formState", "formMode", "formOperates", "loading"
10
10
  _excluded2 = ["dataSets", "doAction", "resources"],
11
11
  _excluded3 = ["id", "header", "title", "readOnly", "extraConfig", "renderTopLeft"],
12
12
  _excluded4 = ["ldId", "initData", "overModel"];
13
- import React, { forwardRef, Fragment, useContext, useImperativeHandle, useRef, useState } from 'react';
13
+ import React, { useContext, useRef, forwardRef, Fragment, useImperativeHandle, useState } from 'react';
14
14
  import { connect, getDvaApp, useRouteMatch } from 'umi';
15
15
  import PropTypes from 'prop-types';
16
- import { useAsyncEffect, useCreation, useMemoizedFn } from 'ahooks';
16
+ import { useCreation, useMemoizedFn, useAsyncEffect } from 'ahooks';
17
17
  import { BasicDivider } from 'luck-design';
18
18
  import { ChildrenUtil } from '@luck-design-biz/base/utils';
19
- import { FormBtn, FormList, FormListAffix } from '@luck-design-biz/base/FormList';
19
+ import { FormList, FormListAffix, FormBtn } from '@luck-design-biz/base/FormList';
20
20
  import buildLdAutoForm from '../LdAutoForm';
21
21
  import buildLdGridForm from '../LdGridForm';
22
22
  import { Collapse } from '@luck-design-biz/base';
@@ -24,7 +24,7 @@ import { LuckDaContext } from '../Builder';
24
24
  import { LuckDaPopContext } from '../LdPop';
25
25
  import createModel from './model';
26
26
  import { onBatchSubmitAction } from '../../helper/action';
27
- import { isArray, mapValues, sortBy } from 'lodash';
27
+ import { isArray, sortBy, mapValues } from 'lodash';
28
28
  import { BpmButton } from '@luck-design-biz/base/bpm';
29
29
  import { readBehaviorCall } from '../../services';
30
30
 
package/es/helper/form.js CHANGED
@@ -86,6 +86,7 @@ export function translator() {
86
86
  label: '不满足验证要求'
87
87
  })
88
88
  }];
89
+ if (allConfig['desensitized']) _props.desensitized = allConfig['desensitized']; // 脱敏
89
90
  return _props;
90
91
  }
91
92
 
@@ -16,7 +16,10 @@ function buildComponent(props) {
16
16
  rest = _objectWithoutProperties(props, _excluded);
17
17
  var formId = "annex_".concat(_formId);
18
18
  var getUrl = function getUrl(behaviorKey, _note, docUid) {
19
- var ticketData = rest.ticketData;
19
+ var ticketData = rest.ticketData,
20
+ formData = rest.formData,
21
+ mainFormLdId = rest.mainFormLdId;
22
+ var PRIMARY_KEY = window.appConfig.constraintKeys.PRIMARY;
20
23
  var params = omitBy({
21
24
  moduleCode: moduleCode,
22
25
  bucket: bucket,
@@ -24,7 +27,7 @@ function buildComponent(props) {
24
27
  tag: formId,
25
28
  note: _note || note,
26
29
  active: !(behaviorKey === 'loadFileGrid' || rest.formMode === 'add' || rest.formMode === 'update'),
27
- docUid: docUid || ticketData && ticketData[window.appConfig.constraintKeys.PRIMARY]
30
+ docUid: docUid || formData[mainFormLdId] && formData[mainFormLdId][PRIMARY_KEY] || ticketData && ticketData[PRIMARY_KEY]
28
31
  }, isNil);
29
32
  return "".concat(window.appConfig.OSS_HOST_V3, "?").concat(stringify(params));
30
33
  };
@@ -97,6 +97,7 @@ function translator() {
97
97
  label: '不满足验证要求'
98
98
  })
99
99
  }];
100
+ if (allConfig['desensitized']) _props.desensitized = allConfig['desensitized']; // 脱敏
100
101
  return _props;
101
102
  }
102
103
 
@@ -23,7 +23,10 @@ function buildComponent(props) {
23
23
  rest = (0, _objectWithoutProperties2.default)(props, _excluded);
24
24
  var formId = "annex_".concat(_formId);
25
25
  var getUrl = function getUrl(behaviorKey, _note, docUid) {
26
- var ticketData = rest.ticketData;
26
+ var ticketData = rest.ticketData,
27
+ formData = rest.formData,
28
+ mainFormLdId = rest.mainFormLdId;
29
+ var PRIMARY_KEY = window.appConfig.constraintKeys.PRIMARY;
27
30
  var params = (0, _lodash.omitBy)({
28
31
  moduleCode: moduleCode,
29
32
  bucket: bucket,
@@ -31,7 +34,7 @@ function buildComponent(props) {
31
34
  tag: formId,
32
35
  note: _note || note,
33
36
  active: !(behaviorKey === 'loadFileGrid' || rest.formMode === 'add' || rest.formMode === 'update'),
34
- docUid: docUid || ticketData && ticketData[window.appConfig.constraintKeys.PRIMARY]
37
+ docUid: docUid || formData[mainFormLdId] && formData[mainFormLdId][PRIMARY_KEY] || ticketData && ticketData[PRIMARY_KEY]
35
38
  }, _lodash.isNil);
36
39
  return "".concat(window.appConfig.OSS_HOST_V3, "?").concat((0, _querystring.stringify)(params));
37
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luck-design-biz/luckda",
3
- "version": "0.0.16-9",
3
+ "version": "0.0.17",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",