@kmkf-fe-packages/services-components 2.2.25 → 2.2.27
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/useColumnsConfig.d.ts +1 -1
- package/dist/esm/components/File/index.js +0 -1
- package/dist/esm/components/PaymentVoucherCode/Preview.js +35 -9
- package/dist/esm/components/Picture/index.d.ts +5 -5
- package/dist/esm/components/Picture/index.js +20 -20
- package/dist/esm/components/PicturePro/index.d.ts +6 -6
- package/dist/esm/components/PicturePro/index.js +25 -25
- package/dist/esm/components/Select/index.d.ts +1 -0
- package/dist/esm/components/Select/index.js +19 -11
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/factory.js +1 -0
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import LogisticsInterception from "../components/LogisticsInterception";
|
|
2
2
|
import LogisticsMoreInterception from "../components/LogisticsMoreInterception";
|
|
3
|
-
export declare const newRenderColumnItem: (effects: any) => (item: any) => import("../components/
|
|
3
|
+
export declare const newRenderColumnItem: (effects: any) => (item: any) => import("../components/ActualPayment").default | import("../components/Address").default | import("../components/AfterSalesOrderId").default | import("../components/Alipay").default | import("../components/BS/BsExchange").default | import("../components/BS/BsGoods").default | import("../components/BS/BsLogistics").default | import("../components/BS/BsPosting").default | import("../components/BS/BsReissue").default | import("../components/BS/BsReturn").default | import("../components/BS/BsSystemOrder").default | import("../components/BsE3/BsGoods").default | import("../components/BsE3/BsReissueE3").default | import("../components/BuyerNick").default | import("../components/Calculation").default | import("../components/Cascader").default | import("../components/Checkbox").default | import("../components/CommonDataTime").default | import("../components/CommonInput").default | import("../components/CommonMultiStatus").default | import("../components/CommonSystemOrder").default | import("../components/CompletedUser").default | import("../components/DataTime").default | import("../components/EItemEnCode").default | import("../components/EItemId").default | import("../components/EItemSelect").default | import("../components/Input").default | import("../components/TypeInput").default | import("../components/Select").default | import("../components/SelectOption").default | import("../components/Radio").default | import("../components/TextArea").default | import("../components/Picture").default | import("../components/PicturePro").default | import("../components/MultSelect").default | import("../components/Grade").default | import("../components/Rate").default | import("../components/File").default | import("../components/PostIng").default | import("../components/SubForm").default | import("../components/TradeId").default | import("../components/ShopName").default | import("../components/ReceiverName").default | import("../components/ReceiverMobile").default | import("../components/ReceiverAddress").default | import("../components/TradeDateTime").default | import("../components/Logistics").default | import("../components/ReturnLogistics").default | import("../components/Remark").default | import("../components/SystemOrderNo").default | import("../components/Ordinary").default | import("../components/ThirdItemSelect").default | import("../components/Payment").default | import("../components/Reissue/Logistics").default | import("../components/JST/JstItemSelect").default | import("../components/JST/JstSendGood").default | import("../components/JST/JstSupply").default | import("../components/Public/Goods").default | import("../components/Public/ReissueGoods").default | import("../components/Public/Exchange").default | import("../components/FlowStatusSelect").default | import("../components/FlowMarkSelect").default | import("../components/FlowTag").default | import("../components/TemplateSelect").default | import("../components/WorkOrderId").default | LogisticsInterception | LogisticsMoreInterception | import("../components/LogisticsTrajectory").default | import("../components/LogisticsMoreTrajectory").default | import("../components/PlatForm").default | import("../components/ShopInput").default | import("../components/Submitter").default | import("../components/PrevSubmitter").default | import("../components/FlowCreator").default | import("../components/Handler").default | import("../components/FlowWorkOrderId").default | import("../components/StatusSelect").default | import("../components/NodeDeadLine").default | import("../components/HandlerDeadLine").default | import("../components/NodeStayDuration").default | import("../components/WLN/WlnGoods").default | import("../components/NodeInput").default | import("../components/FlowWorkOrderStatus").default | import("../components/MsgStatus").default | import("../components/WDT/WdtGoods").default | import("../components/WDT/WdtRessuie").default | import("../components/WDT/WdtReturn").default | import("../components/WDT/WdtExchange").default | import("../components/WDT/WdtShopSelect").default | import("../components/KM/KmVideo").default | import("../components/PaymentVoucherCode").default | import("../components/Label").default | import("../components/MemberLevel").default | import("../components/GY/GyGoods").default | import("../components/GY/GyReissue").default | import("../components/GY/GyReturn").default | import("../components/Public/AsyncSelect").default | import("../components/SKX/SkxIdInputSelect").default | import("../components/SKX/SkxGoods").default | import("../components/OrderSubForm").default | import("../components/FlowOverallStatusSelect").default;
|
|
4
4
|
export declare const useColumnsConfig: ({ queryWorkOrderDetail, flatTemplateList, shopList, sortState, onChangeSort, handleReset, handleSubmit, handleChangeSingleWorkOrderMark, userList, tbAppKey, isShare, openSingleColumnsFilter, openSingleColumnsSort, }: {
|
|
5
5
|
queryWorkOrderDetail?: ((p: any) => void) | undefined;
|
|
6
6
|
flatTemplateList?: any;
|
|
@@ -85,7 +85,6 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
85
85
|
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,
|
|
86
86
|
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 : '',
|
|
87
87
|
component: /*#__PURE__*/React.createElement(ApaasUploadFile, _extends({}, _this.componentConfig, {
|
|
88
|
-
uniqueKey: _this.id,
|
|
89
88
|
platform: p === null || p === void 0 ? void 0 : p.platform,
|
|
90
89
|
canDownload: canDownload,
|
|
91
90
|
hostUrl: "https://kefu.kuaimai.com"
|
|
@@ -27,6 +27,10 @@ var Preview = function Preview(_ref) {
|
|
|
27
27
|
}),
|
|
28
28
|
_usePdf2 = _slicedToArray(_usePdf, 1),
|
|
29
29
|
loading = _usePdf2[0];
|
|
30
|
+
var copyUrl = function copyUrl() {
|
|
31
|
+
copy(url);
|
|
32
|
+
message.success("复制图片链接成功");
|
|
33
|
+
};
|
|
30
34
|
var copyHandle = /*#__PURE__*/function () {
|
|
31
35
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
32
36
|
var _yield$navigator$perm, state;
|
|
@@ -43,9 +47,28 @@ var Preview = function Preview(_ref) {
|
|
|
43
47
|
state = _yield$navigator$perm.state;
|
|
44
48
|
if (state == "granted") {
|
|
45
49
|
html2canvas(canvasEl === null || canvasEl === void 0 ? void 0 : canvasEl.current, {
|
|
46
|
-
useCORS: true
|
|
50
|
+
useCORS: true,
|
|
51
|
+
// scale: 2,
|
|
52
|
+
width: 595,
|
|
53
|
+
height: 455,
|
|
54
|
+
onclone: function onclone(clonedDoc) {
|
|
55
|
+
var _clonedDoc$querySelec;
|
|
56
|
+
var ctx = (_clonedDoc$querySelec = clonedDoc.querySelector("canvas")) === null || _clonedDoc$querySelec === void 0 ? void 0 : _clonedDoc$querySelec.getContext("2d");
|
|
57
|
+
if (ctx) {
|
|
58
|
+
ctx.mozImageSmoothingEnabled = false;
|
|
59
|
+
ctx.webkitImageSmoothingEnabled = false;
|
|
60
|
+
ctx.msImageSmoothingEnabled = false;
|
|
61
|
+
ctx.imageSmoothingEnabled = false;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
47
64
|
}).then(function (canvas) {
|
|
48
|
-
var
|
|
65
|
+
var scale = window.devicePixelRatio || 1;
|
|
66
|
+
canvas.style.width = "".concat(canvas.width / scale, "px"); // [citation:1][citation:6]
|
|
67
|
+
canvas.style.height = "".concat(canvas.height / scale, "px");
|
|
68
|
+
|
|
69
|
+
// 将Canvas插入页面或转换为图片
|
|
70
|
+
// document.body.appendChild(canvas);
|
|
71
|
+
var imgUrl = canvas.toDataURL("image/png", 1.0);
|
|
49
72
|
var str = imgUrl.replace(/data:image\/png;base64,/, "");
|
|
50
73
|
var file = b64toBlob(str, "image/png");
|
|
51
74
|
var clipboardItemInput = new window.ClipboardItem({
|
|
@@ -55,17 +78,15 @@ var Preview = function Preview(_ref) {
|
|
|
55
78
|
message.success("复制图片成功");
|
|
56
79
|
});
|
|
57
80
|
} else {
|
|
58
|
-
|
|
59
|
-
message.success("复制图片链接成功");
|
|
81
|
+
copyUrl();
|
|
60
82
|
}
|
|
61
|
-
_context.next =
|
|
83
|
+
_context.next = 11;
|
|
62
84
|
break;
|
|
63
85
|
case 8:
|
|
64
86
|
_context.prev = 8;
|
|
65
87
|
_context.t0 = _context["catch"](0);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
case 12:
|
|
88
|
+
copyUrl();
|
|
89
|
+
case 11:
|
|
69
90
|
case "end":
|
|
70
91
|
return _context.stop();
|
|
71
92
|
}
|
|
@@ -78,7 +99,12 @@ var Preview = function Preview(_ref) {
|
|
|
78
99
|
return /*#__PURE__*/React.createElement("div", null, !loading && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
79
100
|
type: "link",
|
|
80
101
|
onClick: copyHandle
|
|
81
|
-
}, "\u590D\u5236\u51ED\u8BC1")
|
|
102
|
+
}, "\u590D\u5236\u51ED\u8BC1"), /*#__PURE__*/React.createElement(Button, {
|
|
103
|
+
type: "link",
|
|
104
|
+
onClick: function onClick() {
|
|
105
|
+
return copyUrl();
|
|
106
|
+
}
|
|
107
|
+
}, "\u590D\u5236\u94FE\u63A5")), /*#__PURE__*/React.createElement("canvas", {
|
|
82
108
|
ref: canvasEl
|
|
83
109
|
}));
|
|
84
110
|
};
|
|
@@ -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 item.startsWith(
|
|
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,9 +107,9 @@ 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
|
-
uniqueKey:
|
|
112
|
+
uniqueKey: 'picture',
|
|
113
113
|
hostUrl: hostUrl,
|
|
114
114
|
platform: _this.currenEnv
|
|
115
115
|
}))
|
|
@@ -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,6 +1,6 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import
|
|
1
|
+
import { ComponentInterface, PickOption, Record } from '../../type';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare type Value = {
|
|
5
5
|
url: string;
|
|
6
6
|
name: string;
|
|
@@ -11,13 +11,13 @@ declare class BasicPicturePro implements ComponentInterface {
|
|
|
11
11
|
sortField: string;
|
|
12
12
|
type: string;
|
|
13
13
|
rules: any[];
|
|
14
|
-
componentConfig: ComponentInterface[
|
|
14
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
15
15
|
isCombinationComponent: boolean;
|
|
16
16
|
formField: string;
|
|
17
17
|
canSort: boolean;
|
|
18
18
|
children: ComponentInterface[];
|
|
19
|
-
dataType: ComponentInterface[
|
|
20
|
-
currenEnv: ComponentInterface[
|
|
19
|
+
dataType: ComponentInterface['dataType'];
|
|
20
|
+
currenEnv: ComponentInterface['platform'];
|
|
21
21
|
constructor(options: PickOption);
|
|
22
22
|
formatPictures: (pictures: string) => string[];
|
|
23
23
|
render: (value: Value) => React.JSX.Element | null;
|
|
@@ -8,17 +8,17 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
8
8
|
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; }
|
|
9
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
10
|
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); }
|
|
11
|
-
import React from
|
|
12
|
-
import { ApaasUploadProAsync } from
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { ApaasUploadProAsync } from '@kmkf-fe-packages/basic-components';
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
14
14
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
15
|
import PictureName from "./PictureName";
|
|
16
16
|
import PictureUrl from "./PictureUrl";
|
|
17
|
-
import { isNull } from
|
|
17
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
18
18
|
import "./index.less";
|
|
19
|
-
import { Image, Tooltip, message } from
|
|
20
|
-
import { DownloadOutlined, CopyOutlined } from
|
|
21
|
-
import copy from
|
|
19
|
+
import { Image, Tooltip, message } from 'antd';
|
|
20
|
+
import { DownloadOutlined, CopyOutlined } from '@ant-design/icons';
|
|
21
|
+
import copy from 'copy-to-clipboard';
|
|
22
22
|
import { hostUrl } from "../../constant";
|
|
23
23
|
var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options) {
|
|
24
24
|
var _this = this,
|
|
@@ -37,9 +37,9 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
|
|
|
37
37
|
_defineProperty(this, "dataType", void 0);
|
|
38
38
|
_defineProperty(this, "currenEnv", void 0);
|
|
39
39
|
_defineProperty(this, "formatPictures", function (pictures) {
|
|
40
|
-
pictures = pictures.replace(/[\[\]]/g,
|
|
41
|
-
pictures = pictures.replace(/\s/g,
|
|
42
|
-
return pictures ? pictures.split(
|
|
40
|
+
pictures = pictures.replace(/[\[\]]/g, '');
|
|
41
|
+
pictures = pictures.replace(/\s/g, '');
|
|
42
|
+
return pictures ? pictures.split(',') : [];
|
|
43
43
|
});
|
|
44
44
|
_defineProperty(this, "render", function (value) {
|
|
45
45
|
var _document;
|
|
@@ -48,29 +48,29 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
|
|
|
48
48
|
}
|
|
49
49
|
var copyText = value.map(function (item) {
|
|
50
50
|
return item.name;
|
|
51
|
-
}).join(
|
|
51
|
+
}).join(',');
|
|
52
52
|
var onCopy = function onCopy() {
|
|
53
53
|
copy(copyText);
|
|
54
|
-
message.success(
|
|
54
|
+
message.success('图片名称复制成功');
|
|
55
55
|
};
|
|
56
56
|
return /*#__PURE__*/React.createElement("div", {
|
|
57
57
|
className: "pictureProClient"
|
|
58
58
|
}, /*#__PURE__*/React.createElement(Image.PreviewGroup, {
|
|
59
|
-
preview: _this.currenEnv ===
|
|
60
|
-
getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById(
|
|
59
|
+
preview: _this.currenEnv === 'ks' ? {
|
|
60
|
+
getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById('root')
|
|
61
61
|
} : true
|
|
62
62
|
}, value.map(function (item) {
|
|
63
63
|
var finalImage = "".concat(/^pic\/[\s\S]*$/.test(item.url) ? "".concat(hostUrl, "/").concat(item.url) : item.url, "?x-oss-process=image/resize,h_60,w_60");
|
|
64
64
|
var showImage = /^pic\/[\s\S]*$/.test(item.url) ? "".concat(hostUrl, "/").concat(item.url) : item.url;
|
|
65
65
|
var downloadHandle = function downloadHandle() {
|
|
66
|
-
if (_this.currenEnv ===
|
|
66
|
+
if (_this.currenEnv === 'pc') {
|
|
67
67
|
try {
|
|
68
68
|
fetch("".concat(hostUrl, "/").concat(item.url)).then(function (res) {
|
|
69
69
|
return res.blob();
|
|
70
70
|
}).then(function (blob) {
|
|
71
|
-
var a = document.createElement(
|
|
71
|
+
var a = document.createElement('a');
|
|
72
72
|
document.body.appendChild(a);
|
|
73
|
-
a.style.display =
|
|
73
|
+
a.style.display = 'none';
|
|
74
74
|
var url = window.URL.createObjectURL(blob);
|
|
75
75
|
a.href = url;
|
|
76
76
|
a.download = item.name;
|
|
@@ -83,7 +83,7 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
|
|
|
83
83
|
}
|
|
84
84
|
} else {
|
|
85
85
|
copy("".concat(hostUrl, "/").concat(item.url));
|
|
86
|
-
message.success(
|
|
86
|
+
message.success('图片链接复制成功');
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -96,15 +96,15 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
|
|
|
96
96
|
preview: {
|
|
97
97
|
src: showImage
|
|
98
98
|
},
|
|
99
|
-
width:
|
|
100
|
-
height:
|
|
99
|
+
width: '100%',
|
|
100
|
+
height: '100%'
|
|
101
101
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
102
102
|
title: item.name
|
|
103
103
|
}, /*#__PURE__*/React.createElement("div", {
|
|
104
104
|
className: "pictureProText"
|
|
105
105
|
}, item.name)), /*#__PURE__*/React.createElement("div", {
|
|
106
106
|
className: "pictureProOperate"
|
|
107
|
-
}, _this.currenEnv ===
|
|
107
|
+
}, _this.currenEnv === 'pc' ? /*#__PURE__*/React.createElement(DownloadOutlined, {
|
|
108
108
|
className: "downloadIcon",
|
|
109
109
|
onClick: downloadHandle
|
|
110
110
|
}) : /*#__PURE__*/React.createElement(CopyOutlined, {
|
|
@@ -142,9 +142,9 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
|
|
|
142
142
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
143
143
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
144
144
|
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,
|
|
145
|
-
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 :
|
|
145
|
+
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 : '',
|
|
146
146
|
component: /*#__PURE__*/React.createElement(ApaasUploadProAsync, _extends({}, _this.componentConfig, {
|
|
147
|
-
uniqueKey:
|
|
147
|
+
uniqueKey: 'picturePro',
|
|
148
148
|
hostUrl: hostUrl,
|
|
149
149
|
platform: _this.currenEnv
|
|
150
150
|
}))
|
|
@@ -166,15 +166,15 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
|
|
|
166
166
|
this.isCombinationComponent = true;
|
|
167
167
|
this.canSort = true;
|
|
168
168
|
this.children = [new PictureName(_objectSpread(_objectSpread({}, options), {}, {
|
|
169
|
-
name:
|
|
169
|
+
name: '图片名称',
|
|
170
170
|
id: "".concat(options.id, "_pictureProList_name"),
|
|
171
171
|
width: 250
|
|
172
172
|
})), new PictureUrl(_objectSpread(_objectSpread({}, options), {}, {
|
|
173
|
-
name:
|
|
173
|
+
name: '图片详情',
|
|
174
174
|
id: "".concat(options.id, "_pictureProList_url"),
|
|
175
175
|
width: 200
|
|
176
176
|
}))];
|
|
177
|
-
this.dataType =
|
|
177
|
+
this.dataType = 'object';
|
|
178
178
|
this.currenEnv = options === null || options === void 0 ? void 0 : (_options$effects = options.effects) === null || _options$effects === void 0 ? void 0 : _options$effects.env;
|
|
179
179
|
});
|
|
180
180
|
export default BasicPicturePro;
|
|
@@ -16,6 +16,7 @@ declare class BasicSelect implements ComponentInterface {
|
|
|
16
16
|
optionsMap: ComponentInterface["optionsMap"];
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
getKeyByComponentType: (type: string) => any;
|
|
19
|
+
getIsValue: () => boolean;
|
|
19
20
|
editRender: (p: any) => React.JSX.Element;
|
|
20
21
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
21
22
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -34,11 +34,14 @@ var typeMap = {
|
|
|
34
34
|
},
|
|
35
35
|
ERP_ORDER_STATUS: {
|
|
36
36
|
key: "erpOrderStatus"
|
|
37
|
+
},
|
|
38
|
+
JST_OUTBOUND_STATUS: {
|
|
39
|
+
key: "jstOutboundStatus"
|
|
37
40
|
}
|
|
38
41
|
};
|
|
39
42
|
var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
40
43
|
var _this = this,
|
|
41
|
-
_this$
|
|
44
|
+
_this$componentConfig6,
|
|
42
45
|
_this$options;
|
|
43
46
|
_classCallCheck(this, BasicSelect);
|
|
44
47
|
_defineProperty(this, "name", void 0);
|
|
@@ -57,16 +60,20 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
57
60
|
_defineProperty(this, "getKeyByComponentType", function (type) {
|
|
58
61
|
return typeMap[type].key || "";
|
|
59
62
|
});
|
|
63
|
+
_defineProperty(this, "getIsValue", function () {
|
|
64
|
+
var _this$componentConfig;
|
|
65
|
+
return ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.webUniqueKey) === "PLATFORM_STATUS" || _this.type === "JST_OUTBOUND_STATUS";
|
|
66
|
+
});
|
|
60
67
|
_defineProperty(this, "editRender", function (p) {
|
|
61
|
-
var _this$
|
|
68
|
+
var _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _this$componentConfig5;
|
|
62
69
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
63
70
|
title: _this.name,
|
|
64
71
|
name: _this.id,
|
|
65
72
|
rules: _this.rules,
|
|
66
73
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
67
74
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
68
|
-
required: (_this$
|
|
69
|
-
tooltip: (_this$
|
|
75
|
+
required: (_this$componentConfig2 = (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.required) !== null && _this$componentConfig2 !== void 0 ? _this$componentConfig2 : false,
|
|
76
|
+
tooltip: (_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.showTooltip ? (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.tooltip : "",
|
|
70
77
|
component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
|
|
71
78
|
placeholder: typeMap[_this.type].placeholder || "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
72
79
|
showSearch: true,
|
|
@@ -75,9 +82,10 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
75
82
|
});
|
|
76
83
|
});
|
|
77
84
|
_defineProperty(this, "renderClient", function (record) {
|
|
78
|
-
var _this$
|
|
85
|
+
var _this$optionsMap;
|
|
86
|
+
console.log("renderClient", record, _this.getIsValue());
|
|
79
87
|
// 特殊自定义组件为平台状态时匹配出label
|
|
80
|
-
var label =
|
|
88
|
+
var label = _this.getIsValue() ? (_this$optionsMap = _this.optionsMap) === null || _this$optionsMap === void 0 ? void 0 : _this$optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]] : record === null || record === void 0 ? void 0 : record[_this.id];
|
|
81
89
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
82
90
|
id: _this.id,
|
|
83
91
|
label: _this.name,
|
|
@@ -85,11 +93,11 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
85
93
|
}) : null;
|
|
86
94
|
});
|
|
87
95
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
88
|
-
var _this$
|
|
96
|
+
var _this$optionsMap2;
|
|
89
97
|
var type = _this.type;
|
|
90
98
|
var key = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)];
|
|
91
99
|
// 特殊自定义组件为平台状态时匹配出label
|
|
92
|
-
var label =
|
|
100
|
+
var label = _this.getIsValue() ? ((_this$optionsMap2 = _this.optionsMap) === null || _this$optionsMap2 === void 0 ? void 0 : _this$optionsMap2[key]) || "" : key;
|
|
93
101
|
return /*#__PURE__*/React.createElement("span", null, label !== null && label !== void 0 ? label : "--");
|
|
94
102
|
});
|
|
95
103
|
_defineProperty(this, "renderLog", function (r) {
|
|
@@ -102,11 +110,11 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
102
110
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type].key)];
|
|
103
111
|
});
|
|
104
112
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
105
|
-
var _this$
|
|
113
|
+
var _this$optionsMap3;
|
|
106
114
|
var type = _this.type;
|
|
107
115
|
var key = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)];
|
|
108
116
|
// 特殊自定义组件为平台状态时匹配出label
|
|
109
|
-
var label =
|
|
117
|
+
var label = _this.getIsValue() ? ((_this$optionsMap3 = _this.optionsMap) === null || _this$optionsMap3 === void 0 ? void 0 : _this$optionsMap3[key]) || "" : key;
|
|
110
118
|
return label !== null && label !== void 0 ? label : "--";
|
|
111
119
|
});
|
|
112
120
|
_defineProperty(this, "filterConfig", function (item) {
|
|
@@ -141,7 +149,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
141
149
|
this.canSort = true;
|
|
142
150
|
this.children = [];
|
|
143
151
|
this.dataType = "string";
|
|
144
|
-
this.options = ((_this$
|
|
152
|
+
this.options = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.options) || [];
|
|
145
153
|
this.optionsMap = (_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.reduce(function (prev, next) {
|
|
146
154
|
prev[next.value] = next.label;
|
|
147
155
|
return prev;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect, KmVideo, BasicTypeInput, SkxIdInputSelect, SkxGoods, BasicSelectOption, OrderSubForm, FlowOverallStatusSelect } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BsSystemOrder | CommonDataTime | BasicFile | FlowOverallStatusSelect | BasicPicture | BasicPicturePro | BasicSelect | ShopInput | WdtReissue | BasicInput | BasicTypeInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelectOption | BasicRadio | BasicTextArea | BasicMultSelect | BasicGrade | BasicRate | BasicPosting | SubForm | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsE3Goods | PublicGoods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | GyGoods | GyReissue | GyReturn | AsyncSelect | SkxIdInputSelect | SkxGoods | OrderSubForm;
|
package/dist/esm/factory.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.27",
|
|
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.2.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.2.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.2.27",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.2.27",
|
|
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": "58f53f4ddc7e22b5d5437bcb14d2d0f211bd6954",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|