@luck-design-biz/luckda 0.0.20-UI-2 → 0.0.21-2
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/LdFormList/index.js +3 -3
- package/es/services.js +4 -1
- package/es/upload/Form/gridForm.js +14 -13
- package/es/upload/Form/index.js +2 -1
- package/lib/components/LdFormList/index.js +3 -3
- package/lib/services.js +4 -1
- package/lib/upload/Form/gridForm.js +14 -13
- package/lib/upload/Form/index.js +2 -1
- package/package.json +2 -1
|
@@ -25,7 +25,7 @@ import { LuckDaPopContext } from '../LdPop';
|
|
|
25
25
|
import createModel from './model';
|
|
26
26
|
import { onBatchSubmitAction } from '../../helper/action';
|
|
27
27
|
import { isArray, sortBy, mapValues } from 'lodash';
|
|
28
|
-
import { BpmButton } from '@luck-design-biz/
|
|
28
|
+
import { BpmButton } from '@luck-design-biz/bpm';
|
|
29
29
|
import { readBehaviorCall } from '../../services';
|
|
30
30
|
import { parse, stringify } from 'querystring';
|
|
31
31
|
|
|
@@ -71,7 +71,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
71
71
|
bizData = _useState6[0],
|
|
72
72
|
setBizData = _useState6[1];
|
|
73
73
|
var luckTheme = useCreation(function () {
|
|
74
|
-
return document.body.getAttribute(
|
|
74
|
+
return document.body.getAttribute('luck-theme');
|
|
75
75
|
}, []);
|
|
76
76
|
var _ref2 = useContext(LuckDaPopContext) || {},
|
|
77
77
|
defaultLayout = _ref2.affixLayout;
|
|
@@ -121,7 +121,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
121
121
|
bizData: bizData,
|
|
122
122
|
suppressDept: false,
|
|
123
123
|
showHistory: luckTheme === 'base' ? 'sider' : 'drawer',
|
|
124
|
-
placement: luckTheme === 'base' && (affixLayout || defaultLayout) !== 'top' ?
|
|
124
|
+
placement: luckTheme === 'base' && (affixLayout || defaultLayout) !== 'top' ? 'topRight' : 'bottomRight'
|
|
125
125
|
}, bpmButtonProps)));
|
|
126
126
|
};
|
|
127
127
|
useAsyncEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
package/es/services.js
CHANGED
|
@@ -30,7 +30,10 @@ function _readBehaviorCall() {
|
|
|
30
30
|
case 0:
|
|
31
31
|
return _context2.abrupt("return", request("".concat(api.LUCKDA_HOST, "/to/behavior/call?").concat(stringify(get)), {
|
|
32
32
|
method: 'POST',
|
|
33
|
-
body: post
|
|
33
|
+
body: post,
|
|
34
|
+
headers: {
|
|
35
|
+
'Content-Type': 'application/json;charset=UTF-8'
|
|
36
|
+
}
|
|
34
37
|
}));
|
|
35
38
|
case 1:
|
|
36
39
|
case "end":
|
|
@@ -114,17 +114,17 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
114
114
|
}
|
|
115
115
|
if (file.status === 'done' && file.response && file.response.code === 1) {
|
|
116
116
|
var _file$response2 = file.response,
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
list = _file$response2.list,
|
|
118
|
+
detail = _file$response2.detail;
|
|
119
119
|
var data = {
|
|
120
|
-
uid:
|
|
120
|
+
uid: detail[list[0]].fileName,
|
|
121
121
|
name: file.name,
|
|
122
122
|
size: file.size,
|
|
123
|
-
fileId:
|
|
124
|
-
stype:
|
|
123
|
+
fileId: detail[list[0]].fileName,
|
|
124
|
+
stype: detail[list[0]].fileExt,
|
|
125
125
|
username: currentUser && currentUser.sname,
|
|
126
126
|
uploadDate: moment().valueOf(),
|
|
127
|
-
previewUrl:
|
|
127
|
+
previewUrl: detail[list[0]].previewUrl
|
|
128
128
|
};
|
|
129
129
|
gridRef.current.changeData(null, data);
|
|
130
130
|
}
|
|
@@ -157,17 +157,18 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
157
157
|
data: formData
|
|
158
158
|
}).then(function (res) {
|
|
159
159
|
var code = res.code,
|
|
160
|
-
|
|
160
|
+
list = res.list,
|
|
161
|
+
detail = res.detail;
|
|
161
162
|
if (code === 1) {
|
|
162
163
|
setUploadLoading(false);
|
|
163
164
|
setVisible(false);
|
|
164
|
-
|
|
165
|
+
list.forEach(function (i, index) {
|
|
165
166
|
var data = {
|
|
166
|
-
uid: detail[
|
|
167
|
-
name:
|
|
168
|
-
size:
|
|
169
|
-
stype:
|
|
170
|
-
fileId: detail[
|
|
167
|
+
uid: detail[i].fileName,
|
|
168
|
+
name: detail[i].origFileName,
|
|
169
|
+
size: detail[i].fileSize,
|
|
170
|
+
stype: detail[i].fileExt,
|
|
171
|
+
fileId: detail[i].fileName,
|
|
171
172
|
username: currentUser && currentUser.sname,
|
|
172
173
|
note: snote,
|
|
173
174
|
uploadDate: moment().valueOf(),
|
package/es/upload/Form/index.js
CHANGED
|
@@ -14,7 +14,8 @@ function buildComponent(props) {
|
|
|
14
14
|
_props$note = props.note,
|
|
15
15
|
note = _props$note === void 0 ? '' : _props$note,
|
|
16
16
|
rest = _objectWithoutProperties(props, _excluded);
|
|
17
|
-
var formId = "annex_".concat(_formId);
|
|
17
|
+
var formId = "annex_".concat(_formId); //
|
|
18
|
+
|
|
18
19
|
var getUrl = function getUrl(behaviorKey, _note, docUid) {
|
|
19
20
|
var ticketData = rest.ticketData,
|
|
20
21
|
formData = rest.formData,
|
|
@@ -29,7 +29,7 @@ var _LdPop = require("../LdPop");
|
|
|
29
29
|
var _model = _interopRequireDefault(require("./model"));
|
|
30
30
|
var _action = require("../../helper/action");
|
|
31
31
|
var _lodash = require("lodash");
|
|
32
|
-
var _bpm = require("@luck-design-biz/
|
|
32
|
+
var _bpm = require("@luck-design-biz/bpm");
|
|
33
33
|
var _services = require("../../services");
|
|
34
34
|
var _querystring = require("querystring");
|
|
35
35
|
var _excluded = ["namespace", "formState", "formMode", "formOperates", "loading", "wrapperRef", "readOnly", "mainFormLdId", "renderFormList", "renderAffixLeft", "renderAffixRight", "beforeSubmit", "showSaveBtn", "saveBtnTitle", "affixLayout", "onValueChange", "afterSubmit", "renderFormExtra", "bpmButtonProps"],
|
|
@@ -78,7 +78,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
78
78
|
bizData = _useState6[0],
|
|
79
79
|
setBizData = _useState6[1];
|
|
80
80
|
var luckTheme = (0, _ahooks.useCreation)(function () {
|
|
81
|
-
return document.body.getAttribute(
|
|
81
|
+
return document.body.getAttribute('luck-theme');
|
|
82
82
|
}, []);
|
|
83
83
|
var _ref2 = (0, _react.useContext)(_LdPop.LuckDaPopContext) || {},
|
|
84
84
|
defaultLayout = _ref2.affixLayout;
|
|
@@ -128,7 +128,7 @@ var LdFormList = function LdFormList(_ref) {
|
|
|
128
128
|
bizData: bizData,
|
|
129
129
|
suppressDept: false,
|
|
130
130
|
showHistory: luckTheme === 'base' ? 'sider' : 'drawer',
|
|
131
|
-
placement: luckTheme === 'base' && (affixLayout || defaultLayout) !== 'top' ?
|
|
131
|
+
placement: luckTheme === 'base' && (affixLayout || defaultLayout) !== 'top' ? 'topRight' : 'bottomRight'
|
|
132
132
|
}, bpmButtonProps)));
|
|
133
133
|
};
|
|
134
134
|
(0, _ahooks.useAsyncEffect)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
package/lib/services.js
CHANGED
|
@@ -38,7 +38,10 @@ function _readBehaviorCall() {
|
|
|
38
38
|
case 0:
|
|
39
39
|
return _context2.abrupt("return", (0, _utils.request)("".concat(_ApiConfig.default.LUCKDA_HOST, "/to/behavior/call?").concat((0, _querystring.stringify)(get)), {
|
|
40
40
|
method: 'POST',
|
|
41
|
-
body: post
|
|
41
|
+
body: post,
|
|
42
|
+
headers: {
|
|
43
|
+
'Content-Type': 'application/json;charset=UTF-8'
|
|
44
|
+
}
|
|
42
45
|
}));
|
|
43
46
|
case 1:
|
|
44
47
|
case "end":
|
|
@@ -122,17 +122,17 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
122
122
|
}
|
|
123
123
|
if (file.status === 'done' && file.response && file.response.code === 1) {
|
|
124
124
|
var _file$response2 = file.response,
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
list = _file$response2.list,
|
|
126
|
+
detail = _file$response2.detail;
|
|
127
127
|
var data = {
|
|
128
|
-
uid:
|
|
128
|
+
uid: detail[list[0]].fileName,
|
|
129
129
|
name: file.name,
|
|
130
130
|
size: file.size,
|
|
131
|
-
fileId:
|
|
132
|
-
stype:
|
|
131
|
+
fileId: detail[list[0]].fileName,
|
|
132
|
+
stype: detail[list[0]].fileExt,
|
|
133
133
|
username: currentUser && currentUser.sname,
|
|
134
134
|
uploadDate: (0, _moment.default)().valueOf(),
|
|
135
|
-
previewUrl:
|
|
135
|
+
previewUrl: detail[list[0]].previewUrl
|
|
136
136
|
};
|
|
137
137
|
gridRef.current.changeData(null, data);
|
|
138
138
|
}
|
|
@@ -165,17 +165,18 @@ var UploadGridForm = function UploadGridForm(_ref) {
|
|
|
165
165
|
data: formData
|
|
166
166
|
}).then(function (res) {
|
|
167
167
|
var code = res.code,
|
|
168
|
-
|
|
168
|
+
list = res.list,
|
|
169
|
+
detail = res.detail;
|
|
169
170
|
if (code === 1) {
|
|
170
171
|
setUploadLoading(false);
|
|
171
172
|
setVisible(false);
|
|
172
|
-
|
|
173
|
+
list.forEach(function (i, index) {
|
|
173
174
|
var data = {
|
|
174
|
-
uid: detail[
|
|
175
|
-
name:
|
|
176
|
-
size:
|
|
177
|
-
stype:
|
|
178
|
-
fileId: detail[
|
|
175
|
+
uid: detail[i].fileName,
|
|
176
|
+
name: detail[i].origFileName,
|
|
177
|
+
size: detail[i].fileSize,
|
|
178
|
+
stype: detail[i].fileExt,
|
|
179
|
+
fileId: detail[i].fileName,
|
|
179
180
|
username: currentUser && currentUser.sname,
|
|
180
181
|
note: snote,
|
|
181
182
|
uploadDate: (0, _moment.default)().valueOf(),
|
package/lib/upload/Form/index.js
CHANGED
|
@@ -21,7 +21,8 @@ function buildComponent(props) {
|
|
|
21
21
|
_props$note = props.note,
|
|
22
22
|
note = _props$note === void 0 ? '' : _props$note,
|
|
23
23
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
24
|
-
var formId = "annex_".concat(_formId);
|
|
24
|
+
var formId = "annex_".concat(_formId); //
|
|
25
|
+
|
|
25
26
|
var getUrl = function getUrl(behaviorKey, _note, docUid) {
|
|
26
27
|
var ticketData = rest.ticketData,
|
|
27
28
|
formData = rest.formData,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luck-design-biz/luckda",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21-2",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@luck-design-biz/base": ">= 0.0.10",
|
|
65
|
+
"@luck-design-biz/bpm": ">= 0.0.1",
|
|
65
66
|
"luck-design": ">=0.1.51"
|
|
66
67
|
},
|
|
67
68
|
"description": "前端配置管理中心业务组件库",
|