@zgfe/modules-dm 1.0.56-zhongyuan.8 → 1.0.57-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/constants/api.d.ts +29 -0
- package/es/constants/api.js +34 -1
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/modules/CutsModal.d.ts +81 -34
- package/es/modules/clear-rule/addRule.d.ts +10 -0
- package/es/modules/clear-rule/addRule.js +614 -0
- package/es/modules/clear-rule/css/index.css +256 -0
- package/es/modules/clear-rule/css/index.less +270 -0
- package/es/modules/clear-rule/demo/index.d.ts +3 -0
- package/es/modules/clear-rule/demo/index.js +6 -0
- package/es/modules/clear-rule/importMetaDialog/demo/index.d.ts +3 -0
- package/es/modules/clear-rule/importMetaDialog/demo/index.js +28 -0
- package/es/modules/clear-rule/importMetaDialog/index.d.ts +7 -0
- package/es/modules/clear-rule/importMetaDialog/index.js +165 -0
- package/es/modules/clear-rule/importMetaDialog/styles/index.less +91 -0
- package/es/modules/clear-rule/index.d.ts +4 -0
- package/es/modules/clear-rule/index.js +529 -0
- package/es/modules/dataManage/collectionAttributeList.js +424 -43
- package/es/modules/dataManage/collectionEventList.js +1 -1
- package/es/modules/dataManage/components/createMetaDrawer.js +5 -6
- package/es/modules/dataManage/components/eventGroupingDrawer.js +13 -4
- package/es/modules/dataManage/components/panelList.d.ts +6 -0
- package/es/modules/dataManage/components/panelList.js +172 -0
- package/es/modules/dataManage/components/tablePlus.d.ts +1 -0
- package/es/modules/dataManage/components/tablePlus.js +160 -46
- package/es/modules/dataManage/components/virtualTablePlus.js +4 -0
- package/es/modules/dataManage/demo/index.js +1 -2
- package/es/modules/dataManage/styles/index.less +10 -0
- package/es/modules/dataMap/component/drawerAdd.js +2 -0
- package/es/modules/dataMap/component/leftTree.js +7 -3
- package/es/modules/dataMap/component/rightDetail.js +59 -93
- package/es/modules/dataMap/component/selectAttr.d.ts +7 -0
- package/es/modules/dataMap/component/selectAttr.js +91 -0
- package/es/modules/dataMap/component/viewMapSetting.d.ts +24 -0
- package/es/modules/dataMap/component/viewMapSetting.js +161 -0
- package/es/modules/dataMap/css/index.css +196 -168
- package/es/modules/dataMap/css/index.less +213 -185
- package/es/modules/dataMap/mapSetting.js +21 -4
- package/es/modules/dataReal/css/index.css +50 -48
- package/es/modules/dataReal/css/index.less +53 -51
- package/es/modules/dataReal/index1.js +84 -57
- package/es/modules/dataReal/table.js +40 -7
- package/es/modules/formulate-rule/addFormulate.d.ts +20 -0
- package/es/modules/formulate-rule/addFormulate.js +328 -0
- package/es/modules/formulate-rule/addRule.d.ts +19 -0
- package/es/modules/formulate-rule/addRule.js +553 -0
- package/es/modules/formulate-rule/data.d.ts +16 -0
- package/es/modules/formulate-rule/data.js +46 -0
- package/es/modules/formulate-rule/demo/index.d.ts +3 -0
- package/es/modules/formulate-rule/demo/index.js +6 -0
- package/es/modules/formulate-rule/index.d.ts +4 -0
- package/es/modules/formulate-rule/index.js +448 -0
- package/package.json +2 -2
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
|
+
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."); }
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
|
+
import { BizDialog, BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
|
|
14
|
+
import React, { useContext, useState } from 'react';
|
|
15
|
+
import { Upload, Spin, message, Button } from 'antd';
|
|
16
|
+
import { LoadingOutlined } from '@ant-design/icons';
|
|
17
|
+
import './styles/index.less';
|
|
18
|
+
import apis from '../../../constants/api';
|
|
19
|
+
import request from '../../../utils/ajax';
|
|
20
|
+
var Dragger = Upload.Dragger;
|
|
21
|
+
var classPrefix = 'import-meta-modal';
|
|
22
|
+
var ImportModal = function ImportModal(props) {
|
|
23
|
+
var _useState = useState(),
|
|
24
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
25
|
+
fileData = _useState2[0],
|
|
26
|
+
setFileData = _useState2[1];
|
|
27
|
+
var _useState3 = useState(false),
|
|
28
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
29
|
+
uploading = _useState4[0],
|
|
30
|
+
setUploading = _useState4[1];
|
|
31
|
+
var _useState5 = useState(false),
|
|
32
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
33
|
+
loading = _useState6[0],
|
|
34
|
+
setLoading = _useState6[1];
|
|
35
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
36
|
+
currentApp = _useContext.currentApp,
|
|
37
|
+
isDemo = _useContext.isDemo;
|
|
38
|
+
var UploadProps = {
|
|
39
|
+
name: 'file',
|
|
40
|
+
maxCount: 1,
|
|
41
|
+
accept: '.xls,.xlsx',
|
|
42
|
+
showUploadList: false,
|
|
43
|
+
onChange: function onChange(info) {
|
|
44
|
+
var _info$file = info.file,
|
|
45
|
+
status = _info$file.status,
|
|
46
|
+
size = _info$file.size;
|
|
47
|
+
var isLt10M = size / 1024 / 1024 < 10;
|
|
48
|
+
setUploading(status === 'uploading');
|
|
49
|
+
if (status !== 'uploading') {
|
|
50
|
+
if (info.fileList.length > 0 && isLt10M) {
|
|
51
|
+
setFileData(info.fileList[0].originFileObj);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (status === 'removed') {} else if (status === 'error') {}
|
|
55
|
+
},
|
|
56
|
+
beforeUpload: function beforeUpload(file) {
|
|
57
|
+
var isLt10M = file.size / 1024 / 1024 < 10;
|
|
58
|
+
if (!isLt10M) {
|
|
59
|
+
message.error('支持 xls、xlsx 格式,最大10M');
|
|
60
|
+
}
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
// 下载模板
|
|
65
|
+
var onDownloadTemplate = function onDownloadTemplate() {
|
|
66
|
+
// window.open(`/元数据-批量上传事件模板.xlsx`);
|
|
67
|
+
request(apis.rule.downloadTemple, {
|
|
68
|
+
method: 'post',
|
|
69
|
+
data: {},
|
|
70
|
+
responseType: 'blob',
|
|
71
|
+
fileName: "\u81EA\u5B9A\u4E49\u89C4\u5219\u5BFC\u5165\u6A21\u677F"
|
|
72
|
+
}).then(function (res) {});
|
|
73
|
+
};
|
|
74
|
+
// 上传文件
|
|
75
|
+
var onOk = function onOk() {
|
|
76
|
+
if (!fileData) {
|
|
77
|
+
message.warning('请选择文件');
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
var formData = new FormData();
|
|
81
|
+
formData.append('appId', currentApp.appId);
|
|
82
|
+
formData.append('file', fileData);
|
|
83
|
+
setLoading(true);
|
|
84
|
+
request(apis.rule.uploadFile, {
|
|
85
|
+
method: 'post',
|
|
86
|
+
data: formData
|
|
87
|
+
}).then(function (res) {
|
|
88
|
+
if (!res) return;
|
|
89
|
+
message.success('导入成功');
|
|
90
|
+
props.onSuccess && props.onSuccess(res.data);
|
|
91
|
+
}).catch(function (e) {
|
|
92
|
+
console.log(e);
|
|
93
|
+
}).finally(function () {
|
|
94
|
+
setLoading(false);
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
return /*#__PURE__*/React.createElement(BizDialog, {
|
|
98
|
+
title: "\u5BFC\u5165\u89C4\u5219",
|
|
99
|
+
open: true,
|
|
100
|
+
className: classPrefix,
|
|
101
|
+
onCancel: props.onCancel,
|
|
102
|
+
onOk: onOk,
|
|
103
|
+
confirmLoading: loading,
|
|
104
|
+
okButtonProps: {
|
|
105
|
+
disabled: isDemo
|
|
106
|
+
},
|
|
107
|
+
closable: true,
|
|
108
|
+
closeIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
109
|
+
type: "qingchu"
|
|
110
|
+
}),
|
|
111
|
+
footer: /*#__PURE__*/React.createElement("div", {
|
|
112
|
+
className: "".concat(classPrefix, "-footer")
|
|
113
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
114
|
+
className: "".concat(classPrefix, "-export-btn"),
|
|
115
|
+
onClick: onDownloadTemplate
|
|
116
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
117
|
+
type: "xiazai1",
|
|
118
|
+
className: "".concat(classPrefix, "-icon-export")
|
|
119
|
+
}), "\u4E0B\u8F7D\u5BFC\u5165\u6A21\u7248"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
120
|
+
onClick: props.onCancel
|
|
121
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
|
|
122
|
+
type: "primary",
|
|
123
|
+
onClick: onOk
|
|
124
|
+
}, "\u786E\u5B9A")))
|
|
125
|
+
}, /*#__PURE__*/React.createElement(Spin, {
|
|
126
|
+
className: "".concat(classPrefix, "-spin"),
|
|
127
|
+
spinning: uploading,
|
|
128
|
+
tip: "\u4E0A\u4F20\u4E2D",
|
|
129
|
+
indicator: /*#__PURE__*/React.createElement(LoadingOutlined, {
|
|
130
|
+
className: "".concat(classPrefix, "-spin-icon"),
|
|
131
|
+
spin: true,
|
|
132
|
+
onPointerEnterCapture: undefined,
|
|
133
|
+
onPointerLeaveCapture: undefined
|
|
134
|
+
})
|
|
135
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
136
|
+
style: {
|
|
137
|
+
marginBottom: 16
|
|
138
|
+
}
|
|
139
|
+
}, "\u5141\u8BB8\u4ECE\u6587\u4EF6\u6279\u91CF\u521B\u5EFA\u89C4\u5219\u3002\u4E0D\u5141\u8BB8\u66F4\u65B0\u73B0\u6709\u89C4\u5219\u3002"), fileData ? (/*#__PURE__*/React.createElement("div", {
|
|
140
|
+
className: "".concat(classPrefix, "-show-container")
|
|
141
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
142
|
+
className: "".concat(classPrefix, "-show-container-content")
|
|
143
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
144
|
+
type: "file-excel",
|
|
145
|
+
className: "".concat(classPrefix, "-show-container-content-icon")
|
|
146
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
147
|
+
className: "".concat(classPrefix, "-show-container-content-file")
|
|
148
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
149
|
+
className: "".concat(classPrefix, "-show-container-content-file-title")
|
|
150
|
+
}, fileData.name), /*#__PURE__*/React.createElement("div", {
|
|
151
|
+
className: "".concat(classPrefix, "-show-container-content-file-size")
|
|
152
|
+
}, fileData.size ? (fileData.size / 1024).toFixed(1) : '', " kb"))), /*#__PURE__*/React.createElement(Upload, _objectSpread({}, UploadProps), /*#__PURE__*/React.createElement("a", {
|
|
153
|
+
className: "".concat(classPrefix, "-upload-txt")
|
|
154
|
+
}, "\u91CD\u65B0\u4E0A\u4F20")))) : (/*#__PURE__*/React.createElement(Dragger, _objectSpread({
|
|
155
|
+
className: "".concat(classPrefix, "-export-container")
|
|
156
|
+
}, UploadProps), /*#__PURE__*/React.createElement(IconFont, {
|
|
157
|
+
type: "file-add",
|
|
158
|
+
className: "".concat(classPrefix, "-icon-file")
|
|
159
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
160
|
+
className: "".concat(classPrefix, "-export-container-h1")
|
|
161
|
+
}, "\u5C06\u6570\u636E\u6587\u4EF6\u62D6\u5230\u6B64\u5904 \u6216", /*#__PURE__*/React.createElement("a", null, "\u70B9\u51FB\u4E0A\u4F20")), /*#__PURE__*/React.createElement("div", {
|
|
162
|
+
className: "".concat(classPrefix, "-export-container-h2")
|
|
163
|
+
}, "\u652F\u6301 xls\u3001xlsx \u683C\u5F0F\uFF0C\u6700\u592710M")))));
|
|
164
|
+
};
|
|
165
|
+
export default ImportModal;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
|
+
|
|
3
|
+
.import-meta-modal {
|
|
4
|
+
&-icon-file {
|
|
5
|
+
color: @primary-color;
|
|
6
|
+
font-size: 48px !important;
|
|
7
|
+
}
|
|
8
|
+
&-icon-export {
|
|
9
|
+
margin-right: @margin-xss;
|
|
10
|
+
}
|
|
11
|
+
&-export-btn {
|
|
12
|
+
display: block;
|
|
13
|
+
width: fit-content;
|
|
14
|
+
// margin-top: @margin-md;
|
|
15
|
+
}
|
|
16
|
+
.ant-upload.ant-upload-drag {
|
|
17
|
+
background: #fafafb;
|
|
18
|
+
/* io/中性/N2-置灰信息 */
|
|
19
|
+
border: 1px dashed #ccd0d4;
|
|
20
|
+
}
|
|
21
|
+
.ant-upload.ant-upload-drag .ant-upload {
|
|
22
|
+
padding: 40px 0;
|
|
23
|
+
}
|
|
24
|
+
&-export-container {
|
|
25
|
+
border-radius: 4px;
|
|
26
|
+
&-h1 {
|
|
27
|
+
margin-top: -8px;
|
|
28
|
+
margin-bottom: 4px;
|
|
29
|
+
}
|
|
30
|
+
&-h2 {
|
|
31
|
+
color: @text-color-secondary;
|
|
32
|
+
font-size: 12px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-show-container {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: space-between;
|
|
40
|
+
padding: 24px;
|
|
41
|
+
background: #fafafb;
|
|
42
|
+
/* io/中性/N1-按钮边框 线色 */
|
|
43
|
+
border: 1px solid #e6e7ea;
|
|
44
|
+
border-radius: 4px;
|
|
45
|
+
&-content {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
&-icon {
|
|
49
|
+
margin-right: 12px;
|
|
50
|
+
color: @primary-color;
|
|
51
|
+
font-size: 40px !important;
|
|
52
|
+
}
|
|
53
|
+
&-file {
|
|
54
|
+
&-title {
|
|
55
|
+
font-size: 16px;
|
|
56
|
+
}
|
|
57
|
+
&-size {
|
|
58
|
+
color: @text-color-secondary;
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&-spin {
|
|
66
|
+
background: #fafafb;
|
|
67
|
+
border: 1px solid #e6e7ea;
|
|
68
|
+
border-radius: 4px;
|
|
69
|
+
&-icon.anticon {
|
|
70
|
+
color: @primary-color;
|
|
71
|
+
font-size: 24px;
|
|
72
|
+
}
|
|
73
|
+
.ant-spin-text {
|
|
74
|
+
margin-top: @margin-xs;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&-upload-txt {
|
|
79
|
+
font-size: 16px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.ant-modal-body {
|
|
83
|
+
padding-top: 8px !important;
|
|
84
|
+
}
|
|
85
|
+
&-footer {
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: row;
|
|
88
|
+
align-items: center;
|
|
89
|
+
justify-content: space-between;
|
|
90
|
+
}
|
|
91
|
+
}
|