@vtx/components 3.1.9 → 3.1.12
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/lib/index.js +16 -0
- package/lib/index.js.map +1 -1
- package/lib/style/index.less +2 -2
- package/lib/style/themes/compact.less +1 -1
- package/lib/style/themes/dark.less +9 -7
- package/lib/style/themes/default.less +7 -5
- package/lib/style/themes/index.less +1 -1
- package/lib/style/themes/variable.less +5 -5
- package/lib/vtx-datagrid/index.js +2 -2
- package/lib/vtx-datagrid/index.js.map +1 -1
- package/lib/vtx-datagrid/style/index.css +28 -5
- package/lib/vtx-datagrid/style/index.less +27 -8
- package/lib/vtx-date-picker/style/css.js.map +1 -1
- package/lib/vtx-date-picker/style/index.js.map +1 -1
- package/lib/vtx-date-picker/style/index.less +1 -1
- package/lib/vtx-import2/CheckResult.js +46 -0
- package/lib/vtx-import2/CheckResult.js.map +1 -0
- package/lib/vtx-import2/Content.js +110 -0
- package/lib/vtx-import2/Content.js.map +1 -0
- package/lib/vtx-import2/DownloadSvg.js +51 -0
- package/lib/vtx-import2/DownloadSvg.js.map +1 -0
- package/lib/vtx-import2/ImportResult.js +52 -0
- package/lib/vtx-import2/ImportResult.js.map +1 -0
- package/lib/vtx-import2/UploadSvg.js +51 -0
- package/lib/vtx-import2/UploadSvg.js.map +1 -0
- package/lib/vtx-import2/index.js +223 -0
- package/lib/vtx-import2/index.js.map +1 -0
- package/lib/vtx-import2/style/css.js +10 -0
- package/lib/vtx-import2/style/css.js.map +1 -0
- package/lib/vtx-import2/style/index.css +125 -0
- package/lib/vtx-import2/style/index.js +10 -0
- package/lib/vtx-import2/style/index.js.map +1 -0
- package/lib/vtx-import2/style/index.less +102 -0
- package/lib/vtx-search-map-input/index.js +6 -2
- package/lib/vtx-search-map-input/index.js.map +1 -1
- package/lib/vtx-statistics-column/style/index.less +2 -2
- package/lib/vtx-upload/index.js +13 -2
- package/lib/vtx-upload/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var DownloadSvg = function DownloadSvg() {
|
|
13
|
+
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
width: "48",
|
|
16
|
+
height: "48",
|
|
17
|
+
viewBox: "0 0 48 48",
|
|
18
|
+
style: {
|
|
19
|
+
flexShrink: 0
|
|
20
|
+
}
|
|
21
|
+
}, /*#__PURE__*/_react["default"].createElement("defs", null), /*#__PURE__*/_react["default"].createElement("path", {
|
|
22
|
+
className: "a",
|
|
23
|
+
fill: "#e3fff3",
|
|
24
|
+
d: "M88.358,82.88m-24,0a24,24,0,1,0,24-24A24,24,0,0,0,64.358,82.88Z",
|
|
25
|
+
transform: "translate(-64.358 -58.88)"
|
|
26
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
27
|
+
className: "b",
|
|
28
|
+
fill: "#05c46d",
|
|
29
|
+
d: "M281.991,241.484H269.017a1.041,1.041,0,0,1-.714-.284l-2.955-2.784a1.036,1.036,0,0,0-.714-.284h-5.676a3.583,3.583,0,0,0-3.572,3.593v21.5a3.583,3.583,0,0,0,3.572,3.593h23.031a3.583,3.583,0,0,0,3.571-3.593V245.079a3.58,3.58,0,0,0-3.569-3.6Zm-6,15.429-4.2,4.074a1.934,1.934,0,0,1-2.681.016l-4.123-3.9a1.967,1.967,0,0,1-.084-2.765,1.936,1.936,0,0,1,2.749-.085l.864.817v-5.571a1.945,1.945,0,1,1,3.889,0v5.465l.888-.861a1.934,1.934,0,0,1,2.749.049A1.969,1.969,0,0,1,275.986,256.913Z",
|
|
30
|
+
transform: "translate(-245.153 -228.623)"
|
|
31
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
32
|
+
className: "c",
|
|
33
|
+
fill: "#1dce75",
|
|
34
|
+
d: "M285.563,245.08a3.583,3.583,0,0,0-3.572-3.593H269.018a1.041,1.041,0,0,1-.714-.284l-2.955-2.787a1.036,1.036,0,0,0-.714-.284h-5.676a3.583,3.583,0,0,0-3.572,3.593v21.5a3.583,3.583,0,0,0,3.572,3.593h8.859a24,24,0,0,0,17.743-16.047V245.08Zm-9.577,11.834-4.2,4.074a1.933,1.933,0,0,1-2.681.016l-4.123-3.9a1.967,1.967,0,0,1-.084-2.765,1.936,1.936,0,0,1,2.749-.085l.864.817V249.5a1.945,1.945,0,1,1,3.889,0v5.465l.888-.861a1.934,1.934,0,0,1,2.749.049A1.969,1.969,0,0,1,275.987,256.913Z",
|
|
35
|
+
transform: "translate(-245.154 -228.623)"
|
|
36
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
37
|
+
className: "d",
|
|
38
|
+
fill: "#3cd38e",
|
|
39
|
+
d: "M269.017,241.464a1.044,1.044,0,0,1-.714-.282l-2.955-2.768a1.039,1.039,0,0,0-.714-.282h-5.676a3.572,3.572,0,0,0-3.572,3.571v16.959c.3.011.6.019.9.019a23.842,23.842,0,0,0,8.743-1.649l-.052-.049a1.944,1.944,0,1,1,2.664-2.833l.864.812v-5.535a1.945,1.945,0,1,1,3.889,0v3.015a23.932,23.932,0,0,0,6.852-10.975H269.017Z",
|
|
40
|
+
transform: "translate(-245.179 -228.563)"
|
|
41
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
42
|
+
className: "e",
|
|
43
|
+
fill: "#48e1aa",
|
|
44
|
+
d: "M268.791,241.436a1.016,1.016,0,0,1-.486-.255l-2.958-2.768a1.039,1.039,0,0,0-.714-.282h-5.676a3.572,3.572,0,0,0-3.572,3.571v7.963a23.884,23.884,0,0,0,13.406-8.229Z",
|
|
45
|
+
transform: "translate(-245.202 -228.578)"
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
var _default = DownloadSvg;
|
|
50
|
+
exports["default"] = _default;
|
|
51
|
+
//# sourceMappingURL=DownloadSvg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DownloadSvg.js","names":["DownloadSvg","flexShrink"],"sources":["vtx-import2/DownloadSvg.jsx"],"sourcesContent":["import React from 'react';\n\nconst DownloadSvg = () => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 48 48\"\n style={{ flexShrink: 0 }}\n >\n <defs></defs>\n <path\n className=\"a\"\n fill=\"#e3fff3\"\n d=\"M88.358,82.88m-24,0a24,24,0,1,0,24-24A24,24,0,0,0,64.358,82.88Z\"\n transform=\"translate(-64.358 -58.88)\"\n />\n <path\n className=\"b\"\n fill=\"#05c46d\"\n d=\"M281.991,241.484H269.017a1.041,1.041,0,0,1-.714-.284l-2.955-2.784a1.036,1.036,0,0,0-.714-.284h-5.676a3.583,3.583,0,0,0-3.572,3.593v21.5a3.583,3.583,0,0,0,3.572,3.593h23.031a3.583,3.583,0,0,0,3.571-3.593V245.079a3.58,3.58,0,0,0-3.569-3.6Zm-6,15.429-4.2,4.074a1.934,1.934,0,0,1-2.681.016l-4.123-3.9a1.967,1.967,0,0,1-.084-2.765,1.936,1.936,0,0,1,2.749-.085l.864.817v-5.571a1.945,1.945,0,1,1,3.889,0v5.465l.888-.861a1.934,1.934,0,0,1,2.749.049A1.969,1.969,0,0,1,275.986,256.913Z\"\n transform=\"translate(-245.153 -228.623)\"\n />\n <path\n className=\"c\"\n fill=\"#1dce75\"\n d=\"M285.563,245.08a3.583,3.583,0,0,0-3.572-3.593H269.018a1.041,1.041,0,0,1-.714-.284l-2.955-2.787a1.036,1.036,0,0,0-.714-.284h-5.676a3.583,3.583,0,0,0-3.572,3.593v21.5a3.583,3.583,0,0,0,3.572,3.593h8.859a24,24,0,0,0,17.743-16.047V245.08Zm-9.577,11.834-4.2,4.074a1.933,1.933,0,0,1-2.681.016l-4.123-3.9a1.967,1.967,0,0,1-.084-2.765,1.936,1.936,0,0,1,2.749-.085l.864.817V249.5a1.945,1.945,0,1,1,3.889,0v5.465l.888-.861a1.934,1.934,0,0,1,2.749.049A1.969,1.969,0,0,1,275.987,256.913Z\"\n transform=\"translate(-245.154 -228.623)\"\n />\n <path\n className=\"d\"\n fill=\"#3cd38e\"\n d=\"M269.017,241.464a1.044,1.044,0,0,1-.714-.282l-2.955-2.768a1.039,1.039,0,0,0-.714-.282h-5.676a3.572,3.572,0,0,0-3.572,3.571v16.959c.3.011.6.019.9.019a23.842,23.842,0,0,0,8.743-1.649l-.052-.049a1.944,1.944,0,1,1,2.664-2.833l.864.812v-5.535a1.945,1.945,0,1,1,3.889,0v3.015a23.932,23.932,0,0,0,6.852-10.975H269.017Z\"\n transform=\"translate(-245.179 -228.563)\"\n />\n <path\n className=\"e\"\n fill=\"#48e1aa\"\n d=\"M268.791,241.436a1.016,1.016,0,0,1-.486-.255l-2.958-2.768a1.039,1.039,0,0,0-.714-.282h-5.676a3.572,3.572,0,0,0-3.572,3.571v7.963a23.884,23.884,0,0,0,13.406-8.229Z\"\n transform=\"translate(-245.202 -228.578)\"\n />\n </svg>\n );\n};\n\nexport default DownloadSvg;\n"],"mappings":";;;;;;;AAAA;;;;AAEA,IAAMA,WAAW,GAAG,SAAdA,WAAc,GAAM;EACtB,oBACI;IACI,KAAK,EAAC,4BADV;IAEI,KAAK,EAAC,IAFV;IAGI,MAAM,EAAC,IAHX;IAII,OAAO,EAAC,WAJZ;IAKI,KAAK,EAAE;MAAEC,UAAU,EAAE;IAAd;EALX,gBAOI,6CAPJ,eAQI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,iEAHN;IAII,SAAS,EAAC;EAJd,EARJ,eAcI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,6dAHN;IAII,SAAS,EAAC;EAJd,EAdJ,eAoBI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,6dAHN;IAII,SAAS,EAAC;EAJd,EApBJ,eA0BI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,yTAHN;IAII,SAAS,EAAC;EAJd,EA1BJ,eAgCI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,oKAHN;IAII,SAAS,EAAC;EAJd,EAhCJ,CADJ;AAyCH,CA1CD;;eA4CeD,W"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _icons = require("@ant-design/icons");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
var ImportResult = function ImportResult(_ref) {
|
|
17
|
+
var result = _ref.result,
|
|
18
|
+
errorFile = _ref.errorFile,
|
|
19
|
+
errorURL = _ref.errorURL,
|
|
20
|
+
errorDownloadName = _ref.errorDownloadName;
|
|
21
|
+
var url = errorURL && errorFile && "".concat(errorURL, "?fileName=").concat(errorFile, "&downloadName=").concat(errorDownloadName || '');
|
|
22
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
23
|
+
className: "vtx-import2-result-warp"
|
|
24
|
+
}, result ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_icons.CheckCircleFilled, {
|
|
25
|
+
style: {
|
|
26
|
+
color: '#52C41A',
|
|
27
|
+
fontSize: '80px'
|
|
28
|
+
}
|
|
29
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
30
|
+
className: "vtx-import2-result"
|
|
31
|
+
}, "\u5BFC\u5165\u6210\u529F")) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_icons.CloseCircleFilled, {
|
|
32
|
+
style: {
|
|
33
|
+
color: '#ff4d4f',
|
|
34
|
+
fontSize: '80px'
|
|
35
|
+
}
|
|
36
|
+
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
37
|
+
className: "vtx-import2-result"
|
|
38
|
+
}, "\u5BFC\u5165\u5931\u8D25"), url && /*#__PURE__*/_react["default"].createElement("a", {
|
|
39
|
+
className: "vtx-import2-result-error-tips",
|
|
40
|
+
href: url
|
|
41
|
+
}, "\u4E0B\u8F7D\u6587\u4EF6\uFF0C\u67E5\u770B\u5BFC\u5165\u5931\u8D25\u539F\u56E0")));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
ImportResult.propTypes = {
|
|
45
|
+
result: _propTypes["default"].bool,
|
|
46
|
+
errorURL: _propTypes["default"].string,
|
|
47
|
+
errorFile: _propTypes["default"].string,
|
|
48
|
+
errorDownloadName: _propTypes["default"].string
|
|
49
|
+
};
|
|
50
|
+
var _default = ImportResult;
|
|
51
|
+
exports["default"] = _default;
|
|
52
|
+
//# sourceMappingURL=ImportResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImportResult.js","names":["ImportResult","result","errorFile","errorURL","errorDownloadName","url","color","fontSize","propTypes","PropTypes","bool","string"],"sources":["vtx-import2/ImportResult.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { CheckCircleFilled, CloseCircleFilled } from '@ant-design/icons';\n\nconst ImportResult = ({ result, errorFile, errorURL, errorDownloadName }) => {\n const url =\n errorURL &&\n errorFile &&\n `${errorURL}?fileName=${errorFile}&downloadName=${errorDownloadName || ''}`;\n return (\n <div className=\"vtx-import2-result-warp\">\n {result ? (\n <>\n <CheckCircleFilled style={{ color: '#52C41A', fontSize: '80px' }} />\n <span className=\"vtx-import2-result\">导入成功</span>\n </>\n ) : (\n <>\n <CloseCircleFilled style={{ color: '#ff4d4f', fontSize: '80px' }} />\n <span className=\"vtx-import2-result\">导入失败</span>\n {url && (\n <a className=\"vtx-import2-result-error-tips\" href={url}>\n 下载文件,查看导入失败原因\n </a>\n )}\n </>\n )}\n </div>\n );\n};\n\nImportResult.propTypes = {\n result: PropTypes.bool,\n errorURL: PropTypes.string,\n errorFile: PropTypes.string,\n errorDownloadName: PropTypes.string,\n};\n\nexport default ImportResult;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAEA,IAAMA,YAAY,GAAG,SAAfA,YAAe,OAAwD;EAAA,IAArDC,MAAqD,QAArDA,MAAqD;EAAA,IAA7CC,SAA6C,QAA7CA,SAA6C;EAAA,IAAlCC,QAAkC,QAAlCA,QAAkC;EAAA,IAAxBC,iBAAwB,QAAxBA,iBAAwB;EACzE,IAAMC,GAAG,GACLF,QAAQ,IACRD,SADA,cAEGC,QAFH,uBAEwBD,SAFxB,2BAEkDE,iBAAiB,IAAI,EAFvE,CADJ;EAIA,oBACI;IAAK,SAAS,EAAC;EAAf,GACKH,MAAM,gBACH,+EACI,gCAAC,wBAAD;IAAmB,KAAK,EAAE;MAAEK,KAAK,EAAE,SAAT;MAAoBC,QAAQ,EAAE;IAA9B;EAA1B,EADJ,eAEI;IAAM,SAAS,EAAC;EAAhB,8BAFJ,CADG,gBAMH,+EACI,gCAAC,wBAAD;IAAmB,KAAK,EAAE;MAAED,KAAK,EAAE,SAAT;MAAoBC,QAAQ,EAAE;IAA9B;EAA1B,EADJ,eAEI;IAAM,SAAS,EAAC;EAAhB,8BAFJ,EAGKF,GAAG,iBACA;IAAG,SAAS,EAAC,+BAAb;IAA6C,IAAI,EAAEA;EAAnD,oFAJR,CAPR,CADJ;AAoBH,CAzBD;;AA2BAL,YAAY,CAACQ,SAAb,GAAyB;EACrBP,MAAM,EAAEQ,qBAAA,CAAUC,IADG;EAErBP,QAAQ,EAAEM,qBAAA,CAAUE,MAFC;EAGrBT,SAAS,EAAEO,qBAAA,CAAUE,MAHA;EAIrBP,iBAAiB,EAAEK,qBAAA,CAAUE;AAJR,CAAzB;eAOeX,Y"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var UploadSvg = function UploadSvg() {
|
|
13
|
+
return /*#__PURE__*/_react["default"].createElement("svg", {
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
width: "48",
|
|
16
|
+
height: "48",
|
|
17
|
+
viewBox: "0 0 48 48",
|
|
18
|
+
style: {
|
|
19
|
+
flexShrink: 0
|
|
20
|
+
}
|
|
21
|
+
}, /*#__PURE__*/_react["default"].createElement("defs", null), /*#__PURE__*/_react["default"].createElement("path", {
|
|
22
|
+
className: "a",
|
|
23
|
+
fill: "#e9ecff",
|
|
24
|
+
d: "M91.072,82.88m-24,0a24,24,0,1,0,24-24A24,24,0,0,0,67.072,82.88Z",
|
|
25
|
+
transform: "translate(-67.072 -58.88)"
|
|
26
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
27
|
+
className: "b",
|
|
28
|
+
fill: "#6c6cea",
|
|
29
|
+
d: "M263.967,241.484H250.918a1.05,1.05,0,0,1-.718-.284l-2.972-2.784a1.045,1.045,0,0,0-.718-.284H240.8a3.593,3.593,0,0,0-3.592,3.593v21.5a3.593,3.593,0,0,0,3.592,3.593h23.163a3.593,3.593,0,0,0,3.592-3.593V245.079a3.59,3.59,0,0,0-3.589-3.6Zm-5.881,13.44a1.952,1.952,0,0,1-2.764.049l-.893-.861v5.465a1.956,1.956,0,1,1-3.911,0V254l-.869.817a1.955,1.955,0,1,1-2.68-2.847l4.146-3.9a1.953,1.953,0,0,1,2.7.016l4.223,4.074a1.951,1.951,0,0,1,.052,2.765Z",
|
|
30
|
+
transform: "translate(-228.184 -228.623)"
|
|
31
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
32
|
+
className: "c",
|
|
33
|
+
fill: "#757bf2",
|
|
34
|
+
d: "M267.558,245.08a3.593,3.593,0,0,0-3.592-3.593H250.918a1.05,1.05,0,0,1-.718-.284l-2.972-2.787a1.045,1.045,0,0,0-.718-.284H240.8a3.593,3.593,0,0,0-3.592,3.593v21.5a3.593,3.593,0,0,0,3.592,3.593h10.7a24.089,24.089,0,0,0,16.05-18.307V245.08Zm-9.473,9.845a1.953,1.953,0,0,1-2.764.049l-.893-.861v5.465a1.956,1.956,0,1,1-3.911,0V254l-.869.817a1.955,1.955,0,1,1-2.68-2.847l4.146-3.9a1.953,1.953,0,0,1,2.7.016l4.223,4.074a1.951,1.951,0,0,1,.052,2.765Z",
|
|
35
|
+
transform: "translate(-228.184 -228.623)"
|
|
36
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
37
|
+
className: "d",
|
|
38
|
+
fill: "#8486f8",
|
|
39
|
+
d: "M250.841,241.464a1.044,1.044,0,0,1-.714-.282l-2.955-2.768a1.039,1.039,0,0,0-.714-.282h-5.676a3.572,3.572,0,0,0-3.571,3.571v17.662l.147,0a23.808,23.808,0,0,0,13.088-3.9v-1.562l-.864.812a1.943,1.943,0,1,1-2.664-2.83l4.123-3.881a1.942,1.942,0,0,1,2.681.016l2.371,2.287a23.835,23.835,0,0,0,4.416-8.851h-9.666Z",
|
|
40
|
+
transform: "translate(-228.121 -228.561)"
|
|
41
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
42
|
+
className: "e",
|
|
43
|
+
fill: "#8d92f8",
|
|
44
|
+
d: "M250.442,241.382a1.072,1.072,0,0,1-.315-.2l-2.955-2.768a1.039,1.039,0,0,0-.714-.282h-5.676a3.572,3.572,0,0,0-3.571,3.571v8.477a23.93,23.93,0,0,0,13.232-8.8Z",
|
|
45
|
+
transform: "translate(-228.139 -228.577)"
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
var _default = UploadSvg;
|
|
50
|
+
exports["default"] = _default;
|
|
51
|
+
//# sourceMappingURL=UploadSvg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UploadSvg.js","names":["UploadSvg","flexShrink"],"sources":["vtx-import2/UploadSvg.jsx"],"sourcesContent":["import React from 'react';\n\nconst UploadSvg = () => {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"48\"\n height=\"48\"\n viewBox=\"0 0 48 48\"\n style={{ flexShrink: 0 }}\n >\n <defs></defs>\n <path\n className=\"a\"\n fill=\"#e9ecff\"\n d=\"M91.072,82.88m-24,0a24,24,0,1,0,24-24A24,24,0,0,0,67.072,82.88Z\"\n transform=\"translate(-67.072 -58.88)\"\n />\n <path\n className=\"b\"\n fill=\"#6c6cea\"\n d=\"M263.967,241.484H250.918a1.05,1.05,0,0,1-.718-.284l-2.972-2.784a1.045,1.045,0,0,0-.718-.284H240.8a3.593,3.593,0,0,0-3.592,3.593v21.5a3.593,3.593,0,0,0,3.592,3.593h23.163a3.593,3.593,0,0,0,3.592-3.593V245.079a3.59,3.59,0,0,0-3.589-3.6Zm-5.881,13.44a1.952,1.952,0,0,1-2.764.049l-.893-.861v5.465a1.956,1.956,0,1,1-3.911,0V254l-.869.817a1.955,1.955,0,1,1-2.68-2.847l4.146-3.9a1.953,1.953,0,0,1,2.7.016l4.223,4.074a1.951,1.951,0,0,1,.052,2.765Z\"\n transform=\"translate(-228.184 -228.623)\"\n />\n <path\n className=\"c\"\n fill=\"#757bf2\"\n d=\"M267.558,245.08a3.593,3.593,0,0,0-3.592-3.593H250.918a1.05,1.05,0,0,1-.718-.284l-2.972-2.787a1.045,1.045,0,0,0-.718-.284H240.8a3.593,3.593,0,0,0-3.592,3.593v21.5a3.593,3.593,0,0,0,3.592,3.593h10.7a24.089,24.089,0,0,0,16.05-18.307V245.08Zm-9.473,9.845a1.953,1.953,0,0,1-2.764.049l-.893-.861v5.465a1.956,1.956,0,1,1-3.911,0V254l-.869.817a1.955,1.955,0,1,1-2.68-2.847l4.146-3.9a1.953,1.953,0,0,1,2.7.016l4.223,4.074a1.951,1.951,0,0,1,.052,2.765Z\"\n transform=\"translate(-228.184 -228.623)\"\n />\n <path\n className=\"d\"\n fill=\"#8486f8\"\n d=\"M250.841,241.464a1.044,1.044,0,0,1-.714-.282l-2.955-2.768a1.039,1.039,0,0,0-.714-.282h-5.676a3.572,3.572,0,0,0-3.571,3.571v17.662l.147,0a23.808,23.808,0,0,0,13.088-3.9v-1.562l-.864.812a1.943,1.943,0,1,1-2.664-2.83l4.123-3.881a1.942,1.942,0,0,1,2.681.016l2.371,2.287a23.835,23.835,0,0,0,4.416-8.851h-9.666Z\"\n transform=\"translate(-228.121 -228.561)\"\n />\n <path\n className=\"e\"\n fill=\"#8d92f8\"\n d=\"M250.442,241.382a1.072,1.072,0,0,1-.315-.2l-2.955-2.768a1.039,1.039,0,0,0-.714-.282h-5.676a3.572,3.572,0,0,0-3.571,3.571v8.477a23.93,23.93,0,0,0,13.232-8.8Z\"\n transform=\"translate(-228.139 -228.577)\"\n />\n </svg>\n );\n};\n\nexport default UploadSvg;\n"],"mappings":";;;;;;;AAAA;;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY,GAAM;EACpB,oBACI;IACI,KAAK,EAAC,4BADV;IAEI,KAAK,EAAC,IAFV;IAGI,MAAM,EAAC,IAHX;IAII,OAAO,EAAC,WAJZ;IAKI,KAAK,EAAE;MAAEC,UAAU,EAAE;IAAd;EALX,gBAOI,6CAPJ,eAQI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,iEAHN;IAII,SAAS,EAAC;EAJd,EARJ,eAcI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,ybAHN;IAII,SAAS,EAAC;EAJd,EAdJ,eAoBI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,4bAHN;IAII,SAAS,EAAC;EAJd,EApBJ,eA0BI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,mTAHN;IAII,SAAS,EAAC;EAJd,EA1BJ,eAgCI;IACI,SAAS,EAAC,GADd;IAEI,IAAI,EAAC,SAFT;IAGI,CAAC,EAAC,8JAHN;IAII,SAAS,EAAC;EAJd,EAhCJ,CADJ;AAyCH,CA1CD;;eA4CeD,S"}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _antd = require("antd");
|
|
15
|
+
|
|
16
|
+
var _Content = _interopRequireDefault(require("./Content"));
|
|
17
|
+
|
|
18
|
+
var _ImportResult = _interopRequireDefault(require("./ImportResult"));
|
|
19
|
+
|
|
20
|
+
var _ahooks = require("ahooks");
|
|
21
|
+
|
|
22
|
+
var _utils = require("@vtx/utils");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
+
|
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
+
|
|
30
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
|
+
|
|
32
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
33
|
+
|
|
34
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
35
|
+
|
|
36
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
37
|
+
|
|
38
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
39
|
+
|
|
40
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
|
+
|
|
42
|
+
var _getUrlParam = (0, _utils.getUrlParam)(),
|
|
43
|
+
token = _getUrlParam.token;
|
|
44
|
+
|
|
45
|
+
var VtxImport2 = function VtxImport2(props) {
|
|
46
|
+
var visible = props.visible,
|
|
47
|
+
close = props.close,
|
|
48
|
+
title = props.title,
|
|
49
|
+
accept = props.accept,
|
|
50
|
+
fileKey = props.fileKey,
|
|
51
|
+
uploadURL = props.uploadURL,
|
|
52
|
+
postData = props.postData,
|
|
53
|
+
errorURL = props.errorURL,
|
|
54
|
+
templateURL = props.templateURL,
|
|
55
|
+
afterUpload = props.afterUpload,
|
|
56
|
+
errorDownloadName = props.errorDownloadName;
|
|
57
|
+
|
|
58
|
+
var _useState = (0, _react.useState)(0),
|
|
59
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
60
|
+
status = _useState2[0],
|
|
61
|
+
setStatus = _useState2[1];
|
|
62
|
+
|
|
63
|
+
var _useState3 = (0, _react.useState)(false),
|
|
64
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
65
|
+
result = _useState4[0],
|
|
66
|
+
setResult = _useState4[1];
|
|
67
|
+
|
|
68
|
+
var _useState5 = (0, _react.useState)(5),
|
|
69
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
70
|
+
countdown = _useState6[0],
|
|
71
|
+
setCountdown = _useState6[1];
|
|
72
|
+
|
|
73
|
+
var _useState7 = (0, _react.useState)([]),
|
|
74
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
75
|
+
fileList = _useState8[0],
|
|
76
|
+
setFileList = _useState8[1];
|
|
77
|
+
|
|
78
|
+
var _useState9 = (0, _react.useState)(undefined),
|
|
79
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
80
|
+
interval = _useState10[0],
|
|
81
|
+
setInterval = _useState10[1];
|
|
82
|
+
|
|
83
|
+
var _useState11 = (0, _react.useState)(''),
|
|
84
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
85
|
+
errorFile = _useState12[0],
|
|
86
|
+
setErrorFile = _useState12[1];
|
|
87
|
+
|
|
88
|
+
var _useState13 = (0, _react.useState)(false),
|
|
89
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
90
|
+
uploading = _useState14[0],
|
|
91
|
+
setUploading = _useState14[1];
|
|
92
|
+
|
|
93
|
+
(0, _ahooks.useInterval)(function () {
|
|
94
|
+
if (countdown === 0) {
|
|
95
|
+
return close();
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
setCountdown(countdown - 1);
|
|
99
|
+
}, interval); // 获取上传地址(拼接参数)
|
|
100
|
+
|
|
101
|
+
var getPostURL = function getPostURL() {
|
|
102
|
+
var postUrl = uploadURL;
|
|
103
|
+
var postArray = [];
|
|
104
|
+
|
|
105
|
+
for (var k in postData) {
|
|
106
|
+
if (postData[k] !== undefined && postData[k] !== null && postData[k] !== '') {
|
|
107
|
+
postArray.push("".concat(k, "=").concat(encodeURIComponent(postData[k])));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return postArray.length > 0 ? "".concat(postUrl, "?").concat(postArray.join('&')) : postUrl;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var dealResult = function dealResult(response) {
|
|
115
|
+
setUploading(false);
|
|
116
|
+
var parseData = JSON.parse(response);
|
|
117
|
+
setStatus(1);
|
|
118
|
+
|
|
119
|
+
if (typeof props.afterUpload === 'function') {
|
|
120
|
+
afterUpload(parseData);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (parseData.result === 0) {
|
|
124
|
+
setResult(true);
|
|
125
|
+
setCountdown(5);
|
|
126
|
+
setInterval(1000);
|
|
127
|
+
} else if (parseData.result === 1) {
|
|
128
|
+
setResult(false);
|
|
129
|
+
|
|
130
|
+
if (parseData.data) {
|
|
131
|
+
setErrorFile(parseData.data);
|
|
132
|
+
} else {
|
|
133
|
+
_antd.message.error((parseData === null || parseData === void 0 ? void 0 : parseData.msg) || '服务器异常');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
var onUpload = function onUpload() {
|
|
139
|
+
if (fileList.length === 0) {
|
|
140
|
+
return _antd.message.info('请选择需要上传的文件');
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
setUploading(true);
|
|
144
|
+
var postUrl = getPostURL();
|
|
145
|
+
var fmd = new FormData();
|
|
146
|
+
fmd.append(fileKey, fileList[0]);
|
|
147
|
+
var request = new XMLHttpRequest();
|
|
148
|
+
request.open('POST', postUrl);
|
|
149
|
+
request.setRequestHeader('Authorization', token ? "Bear ".concat(token) : '');
|
|
150
|
+
request.setRequestHeader('access_token', token ? "".concat(token) : '');
|
|
151
|
+
|
|
152
|
+
request.onreadystatechange = function (e) {
|
|
153
|
+
if (e.target.readyState == 4) {
|
|
154
|
+
dealResult(e.target.response);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
request.send(fmd);
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
var againUpload = function againUpload() {
|
|
162
|
+
setStatus(0);
|
|
163
|
+
setInterval(undefined);
|
|
164
|
+
setFileList([]);
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
var modelProps = {
|
|
168
|
+
visible: visible,
|
|
169
|
+
width: 392,
|
|
170
|
+
maskClosable: false,
|
|
171
|
+
footer: [/*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
172
|
+
key: "closeWindow",
|
|
173
|
+
onClick: close
|
|
174
|
+
}, "\u5173\u95ED".concat(status === 1 && result ? '(' + countdown + ')' : '')), (status === 0 || status === 1 && !result) && /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
175
|
+
key: "uploadSubmit",
|
|
176
|
+
type: "primary",
|
|
177
|
+
loading: uploading,
|
|
178
|
+
onClick: status === 0 ? onUpload : againUpload
|
|
179
|
+
}, status === 0 ? '上传' : result ? "\u5BFC\u5165(".concat(countdown, ")") : '再次上传')],
|
|
180
|
+
onCancel: close,
|
|
181
|
+
title: /*#__PURE__*/_react["default"].createElement("div", {
|
|
182
|
+
className: "vtx-import2-modal-header-title"
|
|
183
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
184
|
+
className: "vtx-import2-modal-header-text"
|
|
185
|
+
}, title), /*#__PURE__*/_react["default"].createElement("span", {
|
|
186
|
+
className: "vtx-import2-modal-header-subtitle"
|
|
187
|
+
}, "\u5BFC\u5165"))
|
|
188
|
+
};
|
|
189
|
+
return /*#__PURE__*/_react["default"].createElement(_antd.Modal, modelProps, status === 0 ? /*#__PURE__*/_react["default"].createElement(_Content["default"], {
|
|
190
|
+
fileList: fileList,
|
|
191
|
+
setFileList: setFileList,
|
|
192
|
+
accept: accept,
|
|
193
|
+
fileKey: fileKey,
|
|
194
|
+
templateURL: templateURL
|
|
195
|
+
}) : /*#__PURE__*/_react["default"].createElement(_ImportResult["default"], {
|
|
196
|
+
result: result,
|
|
197
|
+
errorFile: errorFile,
|
|
198
|
+
errorURL: errorURL,
|
|
199
|
+
errorDownloadName: errorDownloadName
|
|
200
|
+
}));
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
VtxImport2.defaultProps = {
|
|
204
|
+
fileKey: 'file',
|
|
205
|
+
accept: 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv',
|
|
206
|
+
postData: {}
|
|
207
|
+
};
|
|
208
|
+
VtxImport2.propTypes = {
|
|
209
|
+
visible: _propTypes["default"].bool,
|
|
210
|
+
templateURL: _propTypes["default"].string,
|
|
211
|
+
uploadURL: _propTypes["default"].string,
|
|
212
|
+
title: _propTypes["default"].string,
|
|
213
|
+
postData: _propTypes["default"].object,
|
|
214
|
+
fileKey: _propTypes["default"].string,
|
|
215
|
+
accept: _propTypes["default"].string,
|
|
216
|
+
close: _propTypes["default"].func,
|
|
217
|
+
errorURL: _propTypes["default"].string,
|
|
218
|
+
errorDownloadName: _propTypes["default"].string,
|
|
219
|
+
afterUpload: _propTypes["default"].func
|
|
220
|
+
};
|
|
221
|
+
var _default = VtxImport2;
|
|
222
|
+
exports["default"] = _default;
|
|
223
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["getUrlParam","token","VtxImport2","props","visible","close","title","accept","fileKey","uploadURL","postData","errorURL","templateURL","afterUpload","errorDownloadName","useState","status","setStatus","result","setResult","countdown","setCountdown","fileList","setFileList","undefined","interval","setInterval","errorFile","setErrorFile","uploading","setUploading","useInterval","getPostURL","postUrl","postArray","k","push","encodeURIComponent","length","join","dealResult","response","parseData","JSON","parse","data","message","error","msg","onUpload","info","fmd","FormData","append","request","XMLHttpRequest","open","setRequestHeader","onreadystatechange","e","target","readyState","send","againUpload","modelProps","width","maskClosable","footer","onCancel","defaultProps","propTypes","PropTypes","bool","string","object","func"],"sources":["vtx-import2/index.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Button, message, Modal } from 'antd';\nimport Content from './Content';\nimport { useState } from 'react';\nimport ImportResult from './ImportResult';\nimport { useInterval } from 'ahooks';\nimport { getUrlParam } from '@vtx/utils';\n\nconst { token } = getUrlParam();\n\nconst VtxImport2 = props => {\n const {\n visible,\n close,\n title,\n accept,\n fileKey,\n uploadURL,\n postData,\n errorURL,\n templateURL,\n afterUpload,\n errorDownloadName,\n } = props;\n const [status, setStatus] = useState(0);\n const [result, setResult] = useState(false);\n const [countdown, setCountdown] = useState(5);\n const [fileList, setFileList] = useState([]);\n const [interval, setInterval] = useState(undefined);\n const [errorFile, setErrorFile] = useState('');\n const [uploading, setUploading] = useState(false);\n useInterval(() => {\n if (countdown === 0) {\n return close();\n }\n setCountdown(countdown - 1);\n }, interval);\n\n // 获取上传地址(拼接参数)\n const getPostURL = () => {\n const postUrl = uploadURL;\n const postArray = [];\n for (const k in postData) {\n if (postData[k] !== undefined && postData[k] !== null && postData[k] !== '') {\n postArray.push(`${k}=${encodeURIComponent(postData[k])}`);\n }\n }\n return postArray.length > 0 ? `${postUrl}?${postArray.join('&')}` : postUrl;\n };\n\n const dealResult = response => {\n setUploading(false);\n const parseData = JSON.parse(response);\n setStatus(1);\n if (typeof props.afterUpload === 'function') {\n afterUpload(parseData);\n }\n if (parseData.result === 0) {\n setResult(true);\n setCountdown(5);\n setInterval(1000);\n } else if (parseData.result === 1) {\n setResult(false);\n if (parseData.data) {\n setErrorFile(parseData.data);\n } else {\n message.error(parseData?.msg || '服务器异常');\n }\n }\n };\n\n const onUpload = () => {\n if (fileList.length === 0) {\n return message.info('请选择需要上传的文件');\n }\n setUploading(true);\n const postUrl = getPostURL();\n const fmd = new FormData();\n fmd.append(fileKey, fileList[0]);\n const request = new XMLHttpRequest();\n request.open('POST', postUrl);\n\n request.setRequestHeader('Authorization', token ? `Bear ${token}` : '');\n request.setRequestHeader('access_token', token ? `${token}` : '');\n request.onreadystatechange = e => {\n if (e.target.readyState == 4) {\n dealResult(e.target.response);\n }\n };\n\n request.send(fmd);\n };\n\n const againUpload = () => {\n setStatus(0);\n setInterval(undefined);\n setFileList([]);\n };\n\n const modelProps = {\n visible,\n width: 392,\n maskClosable: false,\n footer: [\n <Button key=\"closeWindow\" onClick={close}>\n {`关闭${status === 1 && result ? '(' + countdown + ')' : ''}`}\n </Button>,\n (status === 0 || (status === 1 && !result)) && (\n <Button\n key=\"uploadSubmit\"\n type=\"primary\"\n loading={uploading}\n onClick={status === 0 ? onUpload : againUpload}\n >\n {status === 0 ? '上传' : result ? `导入(${countdown})` : '再次上传'}\n </Button>\n ),\n ],\n onCancel: close,\n title: (\n <div className=\"vtx-import2-modal-header-title\">\n <span className=\"vtx-import2-modal-header-text\">{title}</span>\n <span className=\"vtx-import2-modal-header-subtitle\">导入</span>\n </div>\n ),\n };\n return (\n <Modal {...modelProps}>\n {status === 0 ? (\n <Content\n fileList={fileList}\n setFileList={setFileList}\n accept={accept}\n fileKey={fileKey}\n templateURL={templateURL}\n />\n ) : (\n <ImportResult\n result={result}\n errorFile={errorFile}\n errorURL={errorURL}\n errorDownloadName={errorDownloadName}\n />\n )}\n </Modal>\n );\n};\n\nVtxImport2.defaultProps = {\n fileKey: 'file',\n accept:\n 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv',\n postData: {},\n};\n\nVtxImport2.propTypes = {\n visible: PropTypes.bool,\n templateURL: PropTypes.string,\n uploadURL: PropTypes.string,\n title: PropTypes.string,\n postData: PropTypes.object,\n fileKey: PropTypes.string,\n accept: PropTypes.string,\n close: PropTypes.func,\n errorURL: PropTypes.string,\n errorDownloadName: PropTypes.string,\n afterUpload: PropTypes.func,\n};\n\nexport default VtxImport2;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;AAEA,mBAAkB,IAAAA,kBAAA,GAAlB;AAAA,IAAQC,KAAR,gBAAQA,KAAR;;AAE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,CADJ;AAoBH,CAxID;;AA0IAZ,UAAU,CAACmE,YAAX,GAA0B;EACtB7D,OAAO,EAAE,MADa;EAEtBD,MAAM,EACF,qGAHkB;EAItBG,QAAQ,EAAE;AAJY,CAA1B;AAOAR,UAAU,CAACoE,SAAX,GAAuB;EACnBlE,OAAO,EAAEmE,qBAAA,CAAUC,IADA;EAEnB5D,WAAW,EAAE2D,qBAAA,CAAUE,MAFJ;EAGnBhE,SAAS,EAAE8D,qBAAA,CAAUE,MAHF;EAInBnE,KAAK,EAAEiE,qBAAA,CAAUE,MAJE;EAKnB/D,QAAQ,EAAE6D,qBAAA,CAAUG,MALD;EAMnBlE,OAAO,EAAE+D,qBAAA,CAAUE,MANA;EAOnBlE,MAAM,EAAEgE,qBAAA,CAAUE,MAPC;EAQnBpE,KAAK,EAAEkE,qBAAA,CAAUI,IARE;EASnBhE,QAAQ,EAAE4D,qBAAA,CAAUE,MATD;EAUnB3D,iBAAiB,EAAEyD,qBAAA,CAAUE,MAVV;EAWnB5D,WAAW,EAAE0D,qBAAA,CAAUI;AAXJ,CAAvB;eAcezE,U"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["vtx-import2/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\nimport 'antd/lib/button/style';\nimport 'antd/lib/message/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA;;AACA"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
.vtx-datagrid-modal {
|
|
2
|
+
background-color: '#f8f8f8';
|
|
3
|
+
}
|
|
4
|
+
.vtx-import2-modal-header-title {
|
|
5
|
+
color: rgba(0, 0, 0, 0.85);
|
|
6
|
+
}
|
|
7
|
+
.vtx-import2-modal-header-title .vtx-import2-modal-header-text {
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
}
|
|
10
|
+
.vtx-import2-modal-header-title .vtx-import2-modal-header-subtitle {
|
|
11
|
+
font-weight: 700;
|
|
12
|
+
}
|
|
13
|
+
.vtx-import2-modal-header-title .vtx-import2-modal-header-subtitle::before {
|
|
14
|
+
margin: 0 4px;
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
content: '>';
|
|
17
|
+
}
|
|
18
|
+
.vtx-import2-content-box {
|
|
19
|
+
position: relative;
|
|
20
|
+
display: -webkit-box;
|
|
21
|
+
display: -ms-flexbox;
|
|
22
|
+
display: flex;
|
|
23
|
+
-webkit-box-align: center;
|
|
24
|
+
-ms-flex-align: center;
|
|
25
|
+
align-items: center;
|
|
26
|
+
height: 80px;
|
|
27
|
+
padding: 16px 16px 16px 48px;
|
|
28
|
+
color: #1890ff;
|
|
29
|
+
font-size: 14px;
|
|
30
|
+
background-color: #f5f5f5;
|
|
31
|
+
border-radius: 4px;
|
|
32
|
+
}
|
|
33
|
+
.vtx-import2-content-box .vtx-import2-download {
|
|
34
|
+
margin-left: 16px;
|
|
35
|
+
}
|
|
36
|
+
.vtx-import2-content-box .vtx-import2-file-list {
|
|
37
|
+
display: -webkit-box;
|
|
38
|
+
display: -ms-flexbox;
|
|
39
|
+
display: flex;
|
|
40
|
+
-webkit-box-orient: vertical;
|
|
41
|
+
-webkit-box-direction: normal;
|
|
42
|
+
-ms-flex-direction: column;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
-webkit-box-pack: justify;
|
|
45
|
+
-ms-flex-pack: justify;
|
|
46
|
+
justify-content: space-between;
|
|
47
|
+
width: 100%;
|
|
48
|
+
margin-left: 16px;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
white-space: nowrap;
|
|
51
|
+
text-overflow: ellipsis;
|
|
52
|
+
}
|
|
53
|
+
.vtx-import2-content-box .vtx-import2-file-list .vtx-import2-text {
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
}
|
|
56
|
+
.vtx-import2-content-box .vtx-import2-file-list .vtx-import2-file-item {
|
|
57
|
+
display: -webkit-box;
|
|
58
|
+
display: -ms-flexbox;
|
|
59
|
+
display: flex;
|
|
60
|
+
-webkit-box-align: center;
|
|
61
|
+
-ms-flex-align: center;
|
|
62
|
+
align-items: center;
|
|
63
|
+
-webkit-box-pack: justify;
|
|
64
|
+
-ms-flex-pack: justify;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
color: rgba(0, 0, 0, 0.65);
|
|
67
|
+
}
|
|
68
|
+
.vtx-import2-content-box .vtx-import2-file-list .vtx-import2-file-item .vtx-import2-file-name {
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
text-overflow: ellipsis;
|
|
72
|
+
}
|
|
73
|
+
.vtx-import2-content-box:first-child {
|
|
74
|
+
margin-bottom: 20px;
|
|
75
|
+
}
|
|
76
|
+
.vtx-import2-content-box .vtx-import2-content-mark {
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: 0;
|
|
79
|
+
left: 0;
|
|
80
|
+
display: -webkit-box;
|
|
81
|
+
display: -ms-flexbox;
|
|
82
|
+
display: flex;
|
|
83
|
+
-webkit-box-align: center;
|
|
84
|
+
-ms-flex-align: center;
|
|
85
|
+
align-items: center;
|
|
86
|
+
-webkit-box-pack: center;
|
|
87
|
+
-ms-flex-pack: center;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
width: 28px;
|
|
90
|
+
height: 22px;
|
|
91
|
+
color: #fff;
|
|
92
|
+
background-color: #1890ff;
|
|
93
|
+
border: 1px solid #1890ff;
|
|
94
|
+
border-radius: 4px 0;
|
|
95
|
+
opacity: 0.6;
|
|
96
|
+
}
|
|
97
|
+
.vtx-import2-result-warp {
|
|
98
|
+
display: -webkit-box;
|
|
99
|
+
display: -ms-flexbox;
|
|
100
|
+
display: flex;
|
|
101
|
+
-webkit-box-orient: vertical;
|
|
102
|
+
-webkit-box-direction: normal;
|
|
103
|
+
-ms-flex-direction: column;
|
|
104
|
+
flex-direction: column;
|
|
105
|
+
-webkit-box-align: center;
|
|
106
|
+
-ms-flex-align: center;
|
|
107
|
+
align-items: center;
|
|
108
|
+
padding: 12px 0;
|
|
109
|
+
}
|
|
110
|
+
.vtx-import2-result-warp .vtx-import2-result {
|
|
111
|
+
margin-top: 20px;
|
|
112
|
+
margin-bottom: 12px;
|
|
113
|
+
color: rgba(0, 0, 0, 0.85);
|
|
114
|
+
font-weight: 700;
|
|
115
|
+
font-size: 24px;
|
|
116
|
+
}
|
|
117
|
+
.vtx-import2-result-warp .vtx-import2-result-success-tips {
|
|
118
|
+
color: rgba(0, 0, 0, 0.45);
|
|
119
|
+
font-size: 14px;
|
|
120
|
+
}
|
|
121
|
+
.vtx-import2-result-warp .vtx-import2-result-error-tips {
|
|
122
|
+
color: #1890ff;
|
|
123
|
+
font-size: 14px;
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["vtx-import2/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\nimport 'antd/lib/button/style';\nimport 'antd/lib/message/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA;;AACA"}
|