ronds-metadata 1.3.64 → 1.3.65
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "antd/es/button/style";
|
|
2
|
-
import _Button from "antd/es/button";
|
|
3
1
|
import "antd/es/table/style";
|
|
4
2
|
import _Table from "antd/es/table";
|
|
3
|
+
import "antd/es/button/style";
|
|
4
|
+
import _Button from "antd/es/button";
|
|
5
5
|
import "antd/es/select/style";
|
|
6
6
|
import _Select from "antd/es/select";
|
|
7
7
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
@@ -9,6 +9,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
9
9
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
10
10
|
import { CloseCircleFilled, ArrowRightOutlined } from '@ant-design/icons';
|
|
11
11
|
import React from 'react';
|
|
12
|
+
import Editable from '../../../../comps/Editable';
|
|
12
13
|
var MapTable = function MapTable(props) {
|
|
13
14
|
var columnSource = props.columnSource,
|
|
14
15
|
dataSource = props.dataSource,
|
|
@@ -25,6 +26,7 @@ var MapTable = function MapTable(props) {
|
|
|
25
26
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
26
27
|
disableArray = _React$useState4[0],
|
|
27
28
|
setDisableArray = _React$useState4[1];
|
|
29
|
+
var editableStreamRef = React.useRef();
|
|
28
30
|
var triggerChange = function triggerChange(changedValue) {
|
|
29
31
|
onChange && onChange(_objectSpread({
|
|
30
32
|
mapping: mapping
|
|
@@ -90,14 +92,22 @@ var MapTable = function MapTable(props) {
|
|
|
90
92
|
width: '100%',
|
|
91
93
|
height: '100%'
|
|
92
94
|
}
|
|
93
|
-
}, /*#__PURE__*/React.createElement(
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
96
|
+
style: {
|
|
97
|
+
width: '40%'
|
|
98
|
+
}
|
|
99
|
+
}, /*#__PURE__*/React.createElement(Editable, {
|
|
100
|
+
type: "single",
|
|
96
101
|
columns: columnSource,
|
|
97
102
|
dataSource: dataSource,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
103
|
+
onRowConfirm: function onRowConfirm() {},
|
|
104
|
+
onRowDelete: function onRowDelete() {},
|
|
105
|
+
getStreamInstance: function getStreamInstance(stream) {
|
|
106
|
+
return editableStreamRef.current = stream;
|
|
107
|
+
},
|
|
108
|
+
onRowClick: function onRowClick(record) {},
|
|
109
|
+
onMove: function onMove(data) {}
|
|
110
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
101
111
|
style: {
|
|
102
112
|
marginTop: '40px'
|
|
103
113
|
}
|
|
@@ -117,13 +127,17 @@ var MapTable = function MapTable(props) {
|
|
|
117
127
|
return onBtnClick(index);
|
|
118
128
|
}
|
|
119
129
|
}));
|
|
120
|
-
})), /*#__PURE__*/React.createElement(
|
|
130
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
131
|
+
style: {
|
|
132
|
+
width: '40%'
|
|
133
|
+
}
|
|
134
|
+
}, /*#__PURE__*/React.createElement(_Table, {
|
|
121
135
|
className: "ronds-edit-table",
|
|
122
136
|
bordered: true,
|
|
123
137
|
columns: columnTarget,
|
|
124
138
|
dataSource: dataTarget,
|
|
125
139
|
pagination: false,
|
|
126
140
|
size: "small"
|
|
127
|
-
}))));
|
|
141
|
+
})))));
|
|
128
142
|
};
|
|
129
143
|
export default MapTable;
|
|
@@ -166,7 +166,7 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
166
166
|
}, [sourceEnums, targetEnums]);
|
|
167
167
|
var getEnumDataByUrl = React.useCallback( /*#__PURE__*/function () {
|
|
168
168
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(http, pid, page) {
|
|
169
|
-
var server, _url, res, _res;
|
|
169
|
+
var server, _url, res, _res, resGet;
|
|
170
170
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
171
171
|
while (1) switch (_context.prev = _context.next) {
|
|
172
172
|
case 0:
|
|
@@ -183,30 +183,31 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
183
183
|
case 6:
|
|
184
184
|
res = _context.sent;
|
|
185
185
|
_res = (res === null || res === void 0 ? void 0 : res.total) ? res === null || res === void 0 ? void 0 : res.list : res;
|
|
186
|
+
console.warn('======================== interface get ========================', _res);
|
|
186
187
|
totalRef.current = res === null || res === void 0 ? void 0 : res.total;
|
|
187
188
|
if (!(_res && _res.length > 0)) {
|
|
188
|
-
_context.next =
|
|
189
|
+
_context.next = 22;
|
|
189
190
|
break;
|
|
190
191
|
}
|
|
191
192
|
if (!((http === null || http === void 0 ? void 0 : http.isCascader) && http.url.indexOf('{pid}') === -1)) {
|
|
192
|
-
_context.next =
|
|
193
|
+
_context.next = 13;
|
|
193
194
|
break;
|
|
194
195
|
}
|
|
195
196
|
return _context.abrupt("return", _res);
|
|
196
|
-
case
|
|
197
|
+
case 13:
|
|
197
198
|
if (!(http === null || http === void 0 ? void 0 : http.isGroup)) {
|
|
198
|
-
_context.next =
|
|
199
|
+
_context.next = 15;
|
|
199
200
|
break;
|
|
200
201
|
}
|
|
201
202
|
return _context.abrupt("return", _res);
|
|
202
|
-
case
|
|
203
|
+
case 15:
|
|
203
204
|
if (!(http === null || http === void 0 ? void 0 : http.isTreeSelect)) {
|
|
204
|
-
_context.next =
|
|
205
|
+
_context.next = 17;
|
|
205
206
|
break;
|
|
206
207
|
}
|
|
207
208
|
return _context.abrupt("return", _res);
|
|
208
|
-
case
|
|
209
|
-
|
|
209
|
+
case 17:
|
|
210
|
+
resGet = _res.map(function (it) {
|
|
210
211
|
if (http === null || http === void 0 ? void 0 : http.isCascader) {
|
|
211
212
|
return {
|
|
212
213
|
value: it[(http === null || http === void 0 ? void 0 : http.key) || 'id'],
|
|
@@ -214,17 +215,20 @@ var SourceConfig = function SourceConfig(props) {
|
|
|
214
215
|
isLeaf: it['isLeaf'] ? it['isLeaf'] : false
|
|
215
216
|
};
|
|
216
217
|
} else {
|
|
218
|
+
console.warn('======================== result ========================', it);
|
|
217
219
|
return {
|
|
218
220
|
value: it[(http === null || http === void 0 ? void 0 : http.key) || 'id'],
|
|
219
221
|
label: it[(http === null || http === void 0 ? void 0 : http.value) || 'name'],
|
|
220
222
|
disabled: false
|
|
221
223
|
};
|
|
222
224
|
}
|
|
223
|
-
})
|
|
224
|
-
|
|
225
|
+
});
|
|
226
|
+
console.warn('========================== value =======================', resGet);
|
|
227
|
+
return _context.abrupt("return", resGet);
|
|
228
|
+
case 22:
|
|
225
229
|
console.warn("".concat(_url, " is not return success result"));
|
|
226
230
|
return _context.abrupt("return", []);
|
|
227
|
-
case
|
|
231
|
+
case 24:
|
|
228
232
|
case "end":
|
|
229
233
|
return _context.stop();
|
|
230
234
|
}
|