@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, {
|
|
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 {
|
|
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 {
|
|
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,
|
|
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
package/es/upload/Form/index.js
CHANGED
|
@@ -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[
|
|
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
|
};
|
package/lib/helper/form.js
CHANGED
package/lib/upload/Form/index.js
CHANGED
|
@@ -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[
|
|
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
|
};
|