@kmkf-fe-packages/services-components 2.0.79-beta.32 → 2.0.79-beta.35
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/dist/esm/Hooks/useGoodsSourceFormat.js +35 -31
- package/dist/esm/components/Picture/index.d.ts +5 -5
- package/dist/esm/components/Picture/index.js +19 -19
- package/dist/esm/components/PicturePro/PictureUrl.d.ts +4 -4
- package/dist/esm/components/PicturePro/PictureUrl.js +7 -7
- package/dist/esm/type.d.ts +2 -2
- package/package.json +4 -4
|
@@ -85,14 +85,16 @@ var sortArr = function sortArr(arr) {
|
|
|
85
85
|
};
|
|
86
86
|
var findIndex = function findIndex(field, dataFilterConfig) {
|
|
87
87
|
var smallest = Number.MAX_VALUE;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
if (dataFilterConfig) {
|
|
89
|
+
field.children.forEach(function (child) {
|
|
90
|
+
var _child$children, _dataFilterConfig;
|
|
91
|
+
var key = child.dataIndex || child.formField;
|
|
92
|
+
var index = (_child$children = child.children) !== null && _child$children !== void 0 && _child$children.length ? findIndex(child, dataFilterConfig) : (_dataFilterConfig = dataFilterConfig[key]) === null || _dataFilterConfig === void 0 ? void 0 : _dataFilterConfig.index;
|
|
93
|
+
if (typeof index === "number" && index < smallest) {
|
|
94
|
+
smallest = index;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
96
98
|
return smallest < Number.MAX_VALUE ? smallest : void 0;
|
|
97
99
|
};
|
|
98
100
|
var filterTableColumn = function filterTableColumn(cols, dataFilterConfig) {
|
|
@@ -106,12 +108,12 @@ var filterTableColumn = function filterTableColumn(cols, dataFilterConfig) {
|
|
|
106
108
|
} else {
|
|
107
109
|
var _dataFilterConfig2;
|
|
108
110
|
var _key = col.dataIndex || col.formField;
|
|
109
|
-
return ((_dataFilterConfig2 = dataFilterConfig[_key]) === null || _dataFilterConfig2 === void 0 ? void 0 : _dataFilterConfig2.isShow) || !col.type || !(DEFAULT_FIELD_TYPE_LIST.includes(col.type) || col.type === TEMPLATE_ID);
|
|
111
|
+
return (dataFilterConfig === null || dataFilterConfig === void 0 ? void 0 : (_dataFilterConfig2 = dataFilterConfig[_key]) === null || _dataFilterConfig2 === void 0 ? void 0 : _dataFilterConfig2.isShow) || !col.type || !(DEFAULT_FIELD_TYPE_LIST.includes(col.type) || col.type === TEMPLATE_ID);
|
|
110
112
|
}
|
|
111
113
|
});
|
|
112
114
|
};
|
|
113
115
|
export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
|
|
114
|
-
var _goodsSource$sourceSe;
|
|
116
|
+
var _goodsSource$sourceSe, _goodsSource$sourceSe2, _goodsSource$sourceSe3;
|
|
115
117
|
var _useState = useState([]),
|
|
116
118
|
_useState2 = _slicedToArray(_useState, 2),
|
|
117
119
|
filterItems = _useState2[0],
|
|
@@ -143,8 +145,8 @@ export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
|
|
|
143
145
|
filterType: {
|
|
144
146
|
every: 0,
|
|
145
147
|
some: 1
|
|
146
|
-
}[(goodsSource === null || goodsSource === void 0 ? void 0 : goodsSource.sourceSettings.filterMode) || "every"],
|
|
147
|
-
preQueryComponents: goodsSource === null || goodsSource === void 0 ? void 0 : (_goodsSource$
|
|
148
|
+
}[(goodsSource === null || goodsSource === void 0 ? void 0 : (_goodsSource$sourceSe = goodsSource.sourceSettings) === null || _goodsSource$sourceSe === void 0 ? void 0 : _goodsSource$sourceSe.filterMode) || "every"],
|
|
149
|
+
preQueryComponents: goodsSource === null || goodsSource === void 0 ? void 0 : (_goodsSource$sourceSe2 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe2 === void 0 ? void 0 : (_goodsSource$sourceSe3 = _goodsSource$sourceSe2.filterRules) === null || _goodsSource$sourceSe3 === void 0 ? void 0 : _goodsSource$sourceSe3.map(function (rule) {
|
|
148
150
|
var _rule$leftValue, _rule$leftValue$split;
|
|
149
151
|
return {
|
|
150
152
|
key: (_rule$leftValue = rule.leftValue) === null || _rule$leftValue === void 0 ? void 0 : (_rule$leftValue$split = _rule$leftValue.split(".")[2]) === null || _rule$leftValue$split === void 0 ? void 0 : _rule$leftValue$split.replace(/#$/, ""),
|
|
@@ -156,6 +158,7 @@ export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
|
|
|
156
158
|
var _useColumnsConfig = useColumnsConfig({}),
|
|
157
159
|
tableColumnConfig = _useColumnsConfig.tableColumnConfig;
|
|
158
160
|
var workOrderDataToGoods = function workOrderDataToGoods(data, erp) {
|
|
161
|
+
var _goodsSource$sourceSe4;
|
|
159
162
|
// gy商品 接口返回,和选中的 都是这个
|
|
160
163
|
// brandName: "小白熊"
|
|
161
164
|
// brandNo: "BRD01"
|
|
@@ -201,7 +204,7 @@ export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
|
|
|
201
204
|
// keyMap: goodsSource?.sourceSettings.keyMap,
|
|
202
205
|
// });
|
|
203
206
|
var goods = {};
|
|
204
|
-
var keyMap = (goodsSource === null || goodsSource === void 0 ? void 0 : goodsSource.sourceSettings.keyMap) || {};
|
|
207
|
+
var keyMap = (goodsSource === null || goodsSource === void 0 ? void 0 : (_goodsSource$sourceSe4 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe4 === void 0 ? void 0 : _goodsSource$sourceSe4.keyMap) || {};
|
|
205
208
|
var ids = _toConsumableArray(new Set(Object.values(keyMap)));
|
|
206
209
|
var fieldMap = new Map();
|
|
207
210
|
ids.forEach(function (id) {
|
|
@@ -234,19 +237,20 @@ export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
|
|
|
234
237
|
return goods;
|
|
235
238
|
};
|
|
236
239
|
useEffect(function () {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
240
|
+
var _goodsSource$sourceSe5;
|
|
241
|
+
var _ref5 = (goodsSource === null || goodsSource === void 0 ? void 0 : (_goodsSource$sourceSe5 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe5 === void 0 ? void 0 : _goodsSource$sourceSe5.workOrder) || {},
|
|
242
|
+
flowTemplateKey = _ref5.flowTemplateKey,
|
|
243
|
+
nodeId = _ref5.nodeId;
|
|
244
|
+
if ((goodsSource === null || goodsSource === void 0 ? void 0 : goodsSource.source) === "workOrder" && flowTemplateKey && nodeId) {
|
|
241
245
|
setFilterItems([]);
|
|
242
246
|
setAllTableColumns([]);
|
|
243
|
-
setFlowTemplateKey(
|
|
247
|
+
setFlowTemplateKey(flowTemplateKey);
|
|
244
248
|
setFlowNodeId(nodeId);
|
|
245
249
|
setTemplateKey(undefined);
|
|
246
250
|
setTableColumns([]);
|
|
247
|
-
getPublishFlowDetail(
|
|
251
|
+
getPublishFlowDetail(flowTemplateKey).then(function (_ref6) {
|
|
248
252
|
var _data$flowConfig, _data$flowConfig$node, _currentNodeInfo$rela;
|
|
249
|
-
var data =
|
|
253
|
+
var data = _ref6.data;
|
|
250
254
|
var currentNodeInfo = data === null || data === void 0 ? void 0 : (_data$flowConfig = data.flowConfig) === null || _data$flowConfig === void 0 ? void 0 : (_data$flowConfig$node = _data$flowConfig.nodes) === null || _data$flowConfig$node === void 0 ? void 0 : _data$flowConfig$node.find(function (node) {
|
|
251
255
|
return node.id === nodeId;
|
|
252
256
|
});
|
|
@@ -258,12 +262,12 @@ export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
|
|
|
258
262
|
// });
|
|
259
263
|
if (workOrderTemplateId) {
|
|
260
264
|
queryColumnsConfig({
|
|
261
|
-
flowTemplateKey:
|
|
265
|
+
flowTemplateKey: flowTemplateKey,
|
|
262
266
|
nodeId: nodeId,
|
|
263
267
|
templateId: workOrderTemplateId
|
|
264
|
-
}).then(function (
|
|
265
|
-
var _data$fixedColumns;
|
|
266
|
-
var data =
|
|
268
|
+
}).then(function (_ref7) {
|
|
269
|
+
var _data$fixedColumns, _goodsSource$sourceSe13;
|
|
270
|
+
var data = _ref7.data;
|
|
267
271
|
var columnsList = data === null || data === void 0 ? void 0 : (_data$fixedColumns = data.fixedColumns) === null || _data$fixedColumns === void 0 ? void 0 : _data$fixedColumns.concat(data === null || data === void 0 ? void 0 : data.nonFixedColumns);
|
|
268
272
|
var newFilterItems = [];
|
|
269
273
|
columnsList === null || columnsList === void 0 ? void 0 : columnsList.forEach(function (l) {
|
|
@@ -277,22 +281,22 @@ export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
|
|
|
277
281
|
}
|
|
278
282
|
});
|
|
279
283
|
var filterConfigList = toArray(instance === null || instance === void 0 ? void 0 : instance.filterConfig(l)).filter(function (item) {
|
|
280
|
-
var _goodsSource$
|
|
281
|
-
return ((_goodsSource$
|
|
284
|
+
var _goodsSource$sourceSe6, _goodsSource$sourceSe7;
|
|
285
|
+
return ((_goodsSource$sourceSe6 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe6 === void 0 ? void 0 : (_goodsSource$sourceSe7 = _goodsSource$sourceSe6.dataFilterConfig[item.id]) === null || _goodsSource$sourceSe7 === void 0 ? void 0 : _goodsSource$sourceSe7.isFilter) && !(DEFAULT_FIELD_TYPE_LIST.includes(item.type) || item.type === TEMPLATE_ID);
|
|
282
286
|
});
|
|
283
287
|
newFilterItems = newFilterItems.concat(filterConfigList.map(function (item) {
|
|
284
|
-
var _goodsSource$
|
|
285
|
-
item.index = (_goodsSource$
|
|
288
|
+
var _goodsSource$sourceSe8, _goodsSource$sourceSe9;
|
|
289
|
+
item.index = (_goodsSource$sourceSe8 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe8 === void 0 ? void 0 : (_goodsSource$sourceSe9 = _goodsSource$sourceSe8.dataFilterConfig[item.id]) === null || _goodsSource$sourceSe9 === void 0 ? void 0 : _goodsSource$sourceSe9.index;
|
|
286
290
|
return item;
|
|
287
291
|
}));
|
|
288
292
|
});
|
|
289
293
|
var allTableColumns = sortArr(columnsList.reduce(tableColumnConfig, []).map(function (item) {
|
|
290
|
-
var _item$children, _goodsSource$
|
|
291
|
-
var _index = (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length ? findIndex(item, goodsSource.sourceSettings.dataFilterConfig) : (_goodsSource$
|
|
294
|
+
var _item$children, _goodsSource$sourceSe10, _goodsSource$sourceSe11, _goodsSource$sourceSe12;
|
|
295
|
+
var _index = (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length ? findIndex(item, (_goodsSource$sourceSe10 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe10 === void 0 ? void 0 : _goodsSource$sourceSe10.dataFilterConfig) : (_goodsSource$sourceSe11 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe11 === void 0 ? void 0 : (_goodsSource$sourceSe12 = _goodsSource$sourceSe11.dataFilterConfig[item.sortField]) === null || _goodsSource$sourceSe12 === void 0 ? void 0 : _goodsSource$sourceSe12.index;
|
|
292
296
|
item.index = _index;
|
|
293
297
|
return item;
|
|
294
298
|
}));
|
|
295
|
-
var newTableColumns = filterTableColumn(allTableColumns, goodsSource.sourceSettings.dataFilterConfig);
|
|
299
|
+
var newTableColumns = filterTableColumn(allTableColumns, (_goodsSource$sourceSe13 = goodsSource.sourceSettings) === null || _goodsSource$sourceSe13 === void 0 ? void 0 : _goodsSource$sourceSe13.dataFilterConfig);
|
|
296
300
|
setTableColumns(newTableColumns);
|
|
297
301
|
setFilterItems(sortArr(newFilterItems));
|
|
298
302
|
setAllTableColumns(allTableColumns);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare type Value = string[] | undefined;
|
|
4
4
|
declare class BasicPicture implements ComponentInterface {
|
|
5
5
|
name: string;
|
|
@@ -7,13 +7,13 @@ declare class BasicPicture implements ComponentInterface {
|
|
|
7
7
|
sortField: string;
|
|
8
8
|
type: string;
|
|
9
9
|
rules: any[];
|
|
10
|
-
componentConfig: ComponentInterface[
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
16
|
-
currenEnv: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
|
+
currenEnv: ComponentInterface["platform"];
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
formatPictures: (pictures: string) => string[];
|
|
19
19
|
render: (value: Value) => React.JSX.Element | null;
|
|
@@ -6,13 +6,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
6
|
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; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
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); }
|
|
9
|
-
import React from
|
|
10
|
-
import { Image } from
|
|
11
|
-
import { ApaasUploadAsync, ApaasUpload } from
|
|
12
|
-
import { imgResize } from
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { Image } from "antd";
|
|
11
|
+
import { ApaasUploadAsync, ApaasUpload } from "@kmkf-fe-packages/basic-components";
|
|
12
|
+
import { imgResize } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
14
14
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
-
import { isNull } from
|
|
15
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
16
|
import { hostUrl } from "../../constant";
|
|
17
17
|
var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
18
18
|
var _this = this,
|
|
@@ -31,9 +31,9 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
|
31
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
32
|
_defineProperty(this, "currenEnv", void 0);
|
|
33
33
|
_defineProperty(this, "formatPictures", function (pictures) {
|
|
34
|
-
pictures = pictures.replace(/[\[\]]/g,
|
|
35
|
-
pictures = pictures.replace(/\s/g,
|
|
36
|
-
return pictures ? pictures.split(
|
|
34
|
+
pictures = pictures.replace(/[\[\]]/g, "");
|
|
35
|
+
pictures = pictures.replace(/\s/g, "");
|
|
36
|
+
return pictures ? pictures.split(",") : [];
|
|
37
37
|
});
|
|
38
38
|
_defineProperty(this, "render", function (value) {
|
|
39
39
|
var _document;
|
|
@@ -41,20 +41,20 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
43
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Image.PreviewGroup, {
|
|
44
|
-
preview: _this.currenEnv ===
|
|
45
|
-
getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById(
|
|
44
|
+
preview: _this.currenEnv === "ks" ? {
|
|
45
|
+
getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById("root")
|
|
46
46
|
} : true
|
|
47
47
|
}, value === null || value === void 0 ? void 0 : value.map(function (pic) {
|
|
48
48
|
return /*#__PURE__*/React.createElement("div", {
|
|
49
49
|
style: {
|
|
50
|
-
marginRight:
|
|
51
|
-
display:
|
|
50
|
+
marginRight: "5px",
|
|
51
|
+
display: "inline-block"
|
|
52
52
|
}
|
|
53
53
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
54
54
|
width: 32,
|
|
55
|
-
src: imgResize(pic ||
|
|
55
|
+
src: imgResize(pic || ""),
|
|
56
56
|
preview: {
|
|
57
|
-
src: imgResize(pic ||
|
|
57
|
+
src: imgResize(pic || "", 0, 0)
|
|
58
58
|
}
|
|
59
59
|
}));
|
|
60
60
|
})));
|
|
@@ -64,13 +64,13 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
|
64
64
|
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
65
65
|
}
|
|
66
66
|
var finalPictures = _this.formatPictures(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_picture")]).map(function (item) {
|
|
67
|
-
return "".concat(hostUrl, "/").concat(item);
|
|
67
|
+
return item.startsWith("http") ? item : "".concat(hostUrl, "/").concat(item);
|
|
68
68
|
});
|
|
69
69
|
return /*#__PURE__*/React.createElement(Image.PreviewGroup, null, finalPictures === null || finalPictures === void 0 ? void 0 : finalPictures.map(function (pic) {
|
|
70
70
|
return /*#__PURE__*/React.createElement("div", {
|
|
71
71
|
style: {
|
|
72
|
-
marginRight:
|
|
73
|
-
display:
|
|
72
|
+
marginRight: "5px",
|
|
73
|
+
display: "inline-block"
|
|
74
74
|
},
|
|
75
75
|
onClick: function onClick(e) {
|
|
76
76
|
return e.stopPropagation();
|
|
@@ -107,7 +107,7 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
|
107
107
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
108
108
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
109
109
|
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
110
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
110
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
111
111
|
component: (_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.isSingleShop ? /*#__PURE__*/React.createElement(ApaasUpload, _this.componentConfig) : /*#__PURE__*/React.createElement(ApaasUploadAsync, _extends({}, _this.componentConfig, {
|
|
112
112
|
uniqueKey: _this.id,
|
|
113
113
|
hostUrl: hostUrl,
|
|
@@ -131,7 +131,7 @@ var BasicPicture = /*#__PURE__*/_createClass(function BasicPicture(options) {
|
|
|
131
131
|
this.isCombinationComponent = false;
|
|
132
132
|
this.canSort = true;
|
|
133
133
|
this.children = [];
|
|
134
|
-
this.dataType =
|
|
134
|
+
this.dataType = "string";
|
|
135
135
|
this.currenEnv = options === null || options === void 0 ? void 0 : (_options$effects = options.effects) === null || _options$effects === void 0 ? void 0 : _options$effects.env;
|
|
136
136
|
});
|
|
137
137
|
export default BasicPicture;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class PictureUrl implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
getParentId: () => string;
|
|
18
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -11,10 +11,10 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
11
11
|
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; }
|
|
12
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
13
|
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); }
|
|
14
|
-
import { Image } from
|
|
15
|
-
import React from
|
|
14
|
+
import { Image } from "antd";
|
|
15
|
+
import React from "react";
|
|
16
16
|
import ItemView from "../../commonComponents/ItemView";
|
|
17
|
-
import { isNull } from
|
|
17
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
18
|
import { hostUrl } from "../../constant";
|
|
19
19
|
var PictureUrl = /*#__PURE__*/_createClass(function PictureUrl(options) {
|
|
20
20
|
var _this = this;
|
|
@@ -32,7 +32,7 @@ var PictureUrl = /*#__PURE__*/_createClass(function PictureUrl(options) {
|
|
|
32
32
|
_defineProperty(this, "children", void 0);
|
|
33
33
|
_defineProperty(this, "dataType", void 0);
|
|
34
34
|
_defineProperty(this, "getParentId", function () {
|
|
35
|
-
var _this$id$split = _this.id.split(
|
|
35
|
+
var _this$id$split = _this.id.split("_"),
|
|
36
36
|
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
37
37
|
key = _this$id$split2[0],
|
|
38
38
|
name = _this$id$split2[1],
|
|
@@ -73,7 +73,7 @@ var PictureUrl = /*#__PURE__*/_createClass(function PictureUrl(options) {
|
|
|
73
73
|
});
|
|
74
74
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
75
75
|
var _this$getComponentVal;
|
|
76
|
-
return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
76
|
+
return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "";
|
|
77
77
|
});
|
|
78
78
|
_defineProperty(this, "filterConfig", function () {
|
|
79
79
|
return [];
|
|
@@ -84,11 +84,11 @@ var PictureUrl = /*#__PURE__*/_createClass(function PictureUrl(options) {
|
|
|
84
84
|
this.formField = options.id;
|
|
85
85
|
this.type = options.type;
|
|
86
86
|
this.componentConfig = options.componentConfig;
|
|
87
|
-
this.align =
|
|
87
|
+
this.align = "left";
|
|
88
88
|
this.width = 100;
|
|
89
89
|
this.isCombinationComponent = false;
|
|
90
90
|
this.canSort = false;
|
|
91
|
-
this.dataType =
|
|
91
|
+
this.dataType = "string";
|
|
92
92
|
this.children = [];
|
|
93
93
|
});
|
|
94
94
|
export default PictureUrl;
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -81,8 +81,8 @@ export interface ComponentInterface {
|
|
|
81
81
|
* @description 商品类组件选择商品来源配置
|
|
82
82
|
*/
|
|
83
83
|
goodsSource?: {
|
|
84
|
-
source
|
|
85
|
-
sourceSettings
|
|
84
|
+
source?: "workOrder" | "erp";
|
|
85
|
+
sourceSettings?: {
|
|
86
86
|
filterMode?: "some" | "every";
|
|
87
87
|
filterRules?: {
|
|
88
88
|
leftValue: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.0.79-beta.
|
|
3
|
+
"version": "2.0.79-beta.35",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "2.0.79-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.0.79-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.0.79-beta.35",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.0.79-beta.33",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "10636ed655bfe95949c84a2b59e9c8ee473cf89b",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|