@zgfe/modules-dm 1.0.42-alpha.9 → 1.0.56-zhongyuan.1
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/components/demo.js +1 -1
- package/es/constants/api.d.ts +37 -0
- package/es/constants/api.js +62 -1
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/modules/CutsModal.d.ts +66 -0
- package/es/modules/CutsModal.js +52 -0
- package/es/modules/dataManage/collectionAttributeList.d.ts +3 -0
- package/es/modules/dataManage/collectionAttributeList.js +516 -81
- package/es/modules/dataManage/collectionEventList.d.ts +6 -0
- package/es/modules/dataManage/collectionEventList.js +479 -62
- package/es/modules/dataManage/components/createAttrDrawer.d.ts +4 -0
- package/es/modules/dataManage/components/createAttrDrawer.js +264 -0
- package/es/modules/dataManage/components/createMetaDrawer.d.ts +4 -0
- package/es/modules/dataManage/components/createMetaDrawer.js +618 -0
- package/es/modules/dataManage/components/createVirtualDrawer.js +19 -19
- package/es/modules/dataManage/components/creditPop/imgs/link.png +0 -0
- package/es/modules/dataManage/components/creditPop/imgs/png01.png +0 -0
- package/es/modules/dataManage/components/creditPop/imgs/png02.png +0 -0
- package/es/modules/dataManage/components/creditPop/imgs/png03.png +0 -0
- package/es/modules/dataManage/components/creditPop/imgs/png04.png +0 -0
- package/es/modules/dataManage/components/creditPop/index.d.ts +5 -0
- package/es/modules/dataManage/components/creditPop/index.js +89 -0
- package/es/modules/dataManage/components/creditPop/index.less +121 -0
- package/es/modules/dataManage/components/deleteConfirm.d.ts +9 -0
- package/es/modules/dataManage/components/deleteConfirm.js +36 -0
- package/es/modules/dataManage/components/deleteUserAttrConfirm.d.ts +9 -0
- package/es/modules/dataManage/components/deleteUserAttrConfirm.js +57 -0
- package/es/modules/dataManage/components/depositPop/imgs/link.png +0 -0
- package/es/modules/dataManage/components/depositPop/imgs/png01.png +0 -0
- package/es/modules/dataManage/components/depositPop/imgs/png02.png +0 -0
- package/es/modules/dataManage/components/depositPop/index.d.ts +5 -0
- package/es/modules/dataManage/components/depositPop/index.js +89 -0
- package/es/modules/dataManage/components/depositPop/index.less +115 -0
- package/es/modules/dataManage/components/developModal/index.css +36 -0
- package/es/modules/dataManage/components/developModal/index.d.ts +5 -0
- package/es/modules/dataManage/components/developModal/index.js +224 -0
- package/es/modules/dataManage/components/developModal/index.less +36 -0
- package/es/modules/dataManage/components/editTxt/index.d.ts +5 -0
- package/es/modules/dataManage/components/editTxt/index.js +123 -0
- package/es/modules/dataManage/components/editTxt/index.less +44 -0
- package/es/modules/dataManage/components/editTxt/types.d.ts +48 -0
- package/es/modules/dataManage/components/editTxt/types.js +1 -0
- package/es/modules/dataManage/components/eventFilter/index.js +13 -13
- package/es/modules/dataManage/components/eventGroupingDrawer.js +41 -44
- package/es/modules/dataManage/components/importAttrDialog/demo/index.d.ts +2 -0
- package/es/modules/dataManage/components/importAttrDialog/demo/index.js +28 -0
- package/es/modules/dataManage/components/importAttrDialog/index.d.ts +7 -0
- package/es/modules/dataManage/components/importAttrDialog/index.js +157 -0
- package/es/modules/dataManage/components/importAttrDialog/styles/index.less +90 -0
- package/es/modules/dataManage/components/importMetaDialog/demo/index.d.ts +2 -0
- package/es/modules/dataManage/components/importMetaDialog/demo/index.js +28 -0
- package/es/modules/dataManage/components/importMetaDialog/index.d.ts +7 -0
- package/es/modules/dataManage/components/importMetaDialog/index.js +157 -0
- package/es/modules/dataManage/components/importMetaDialog/styles/index.less +91 -0
- package/es/modules/dataManage/components/selectAttributes.js +10 -10
- package/es/modules/dataManage/components/tablePlus.d.ts +4 -0
- package/es/modules/dataManage/components/tablePlus.js +625 -94
- package/es/modules/dataManage/components/virtualTablePlus.js +7 -7
- package/es/modules/dataManage/demo/index.js +79 -16
- package/es/modules/dataManage/detailedData/DetailedDataForm.d.ts +5 -0
- package/es/modules/dataManage/detailedData/DetailedDataForm.js +216 -0
- package/es/modules/dataManage/detailedData/index.d.ts +24 -0
- package/es/modules/dataManage/detailedData/index.js +403 -0
- package/es/modules/dataManage/detailedData/useColumns.d.ts +34 -0
- package/es/modules/dataManage/detailedData/useColumns.js +135 -0
- package/es/modules/dataManage/index.d.ts +9 -4
- package/es/modules/dataManage/index.js +142 -50
- package/es/modules/dataManage/styles/detailed.less +74 -0
- package/es/modules/dataManage/styles/index.less +364 -10
- package/es/modules/dataManage/types.d.ts +8 -0
- package/es/modules/dataManage/virtualEventList.js +13 -13
- package/es/modules/dataMap/component/data.d.ts +7 -0
- package/es/modules/dataMap/component/data.js +257 -0
- package/es/modules/dataMap/component/drawerAdd.d.ts +6 -0
- package/es/modules/dataMap/component/drawerAdd.js +376 -0
- package/es/modules/dataMap/component/leftTree.d.ts +6 -0
- package/es/modules/dataMap/component/leftTree.js +227 -0
- package/es/modules/dataMap/component/rightDetail.d.ts +7 -0
- package/es/modules/dataMap/component/rightDetail.js +680 -0
- package/es/modules/dataMap/component/selectAttr.d.ts +7 -0
- package/es/modules/dataMap/component/selectAttr.js +92 -0
- package/es/modules/dataMap/css/index.css +163 -0
- package/es/modules/dataMap/css/index.less +177 -0
- package/es/modules/dataMap/demo/index.d.ts +2 -0
- package/es/modules/dataMap/demo/index.js +6 -0
- package/es/modules/dataMap/img/empty-data.png +0 -0
- package/es/modules/dataMap/index.d.ts +2 -0
- package/es/modules/dataMap/index.js +80 -0
- package/es/modules/dataMap/mapDetail.d.ts +3 -0
- package/es/modules/dataMap/mapDetail.js +44 -0
- package/es/modules/dataMap/mapSetting.d.ts +6 -0
- package/es/modules/dataMap/mapSetting.js +148 -0
- package/es/modules/dataPlan/addEventOrUser.js +31 -30
- package/es/modules/dataPlan/addPlan.js +29 -27
- package/es/modules/dataPlan/eventList.js +2 -2
- package/es/modules/dataPlan/index.js +10 -10
- package/es/modules/dataPlan/search.js +6 -5
- package/es/modules/dataPlan/tablePlus.js +3 -3
- package/es/modules/dataPlan/userAttributeList.js +5 -5
- package/es/modules/dataReal/css/index.css +48 -0
- package/es/modules/dataReal/css/index.less +51 -0
- package/es/modules/dataReal/demo/index.d.ts +2 -0
- package/es/modules/dataReal/demo/index.js +6 -0
- package/es/modules/dataReal/index1.d.ts +28 -0
- package/es/modules/dataReal/index1.js +215 -0
- package/es/modules/dataReal/table.d.ts +5 -0
- package/es/modules/dataReal/table.js +258 -0
- package/es/store/index.js +11 -11
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +9 -1
- package/package.json +8 -4
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
3
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
4
|
+
eventGroupList = _useContext.eventGroupList;
|
|
5
|
+
// 按钮点击 事件分析
|
|
6
|
+
// page: { alias: '按钮名称', name: 'button_name' },
|
|
7
|
+
// filter: [
|
|
8
|
+
// { alias: '客户端版本', name: 'current_version' },
|
|
9
|
+
// { alias: '应⽤名称', name: 'app_name' },
|
|
10
|
+
// { alias: '模块名称', name: 'func_module' },
|
|
11
|
+
// { alias: '模块ID', name: 'func_module_id' },
|
|
12
|
+
// { alias: '模块版本', name: 'func_module_ver' },
|
|
13
|
+
// { alias: '⻚⾯展示名称', name: 'page_name' },
|
|
14
|
+
// ],
|
|
15
|
+
// const buttonAnalyze = {
|
|
16
|
+
// name: '元素点击',
|
|
17
|
+
// attrs: {
|
|
18
|
+
// page: 'button_name',
|
|
19
|
+
// filter: [
|
|
20
|
+
// 'current_version',
|
|
21
|
+
// 'app_name',
|
|
22
|
+
// 'func_module',
|
|
23
|
+
// 'func_module_id',
|
|
24
|
+
// 'func_module_ver',
|
|
25
|
+
// 'page_name',
|
|
26
|
+
// ],
|
|
27
|
+
// },
|
|
28
|
+
// };
|
|
29
|
+
export var buttonAnalyze = {
|
|
30
|
+
name: '安卓自定义事件',
|
|
31
|
+
attrs: {
|
|
32
|
+
page: 'eventProp-115',
|
|
33
|
+
filter: ['eventProp-115', 'app_name', 'func_module', 'func_module_id', 'func_module_ver', 'page_name']
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
// let [buttonAnalyzeParams,setButtonAnalyzeParams] =useState<dongchaParamsType>()
|
|
37
|
+
// useEffect(()=>{
|
|
38
|
+
// try{
|
|
39
|
+
// eventGroupList?.[0].eventList.forEach((o) => {
|
|
40
|
+
// if (o.name || o.alias == buttonAnalyze.name) {
|
|
41
|
+
// const haveFilter = o.attrList.filter((m:any) => buttonAnalyze.attrs.filter.includes(m!.key));
|
|
42
|
+
// const pageId = o.attrList.filter((m) => m?.key == buttonAnalyze.attrs.page);
|
|
43
|
+
// setButtonAnalyzeParams({
|
|
44
|
+
// data: {
|
|
45
|
+
// chartType: 'line',
|
|
46
|
+
// module: 'insight',
|
|
47
|
+
// userGroup: [0],
|
|
48
|
+
// targets: [
|
|
49
|
+
// {
|
|
50
|
+
// alias: o.name,
|
|
51
|
+
// filters: haveFilter,
|
|
52
|
+
// analysisDimension: { analysisIndex: 'number' },
|
|
53
|
+
// eventGroupId: 0,
|
|
54
|
+
// eventId: o.id,
|
|
55
|
+
// eventName:o.name,
|
|
56
|
+
// type: 'event',
|
|
57
|
+
// },
|
|
58
|
+
// ],
|
|
59
|
+
// },
|
|
60
|
+
// });
|
|
61
|
+
// console.log(haveFilter, pageId,buttonAnalyzeParams,'包含了');
|
|
62
|
+
// throw Error("用来终止循环的")
|
|
63
|
+
// }
|
|
64
|
+
// });
|
|
65
|
+
// }catch(error){
|
|
66
|
+
// // console.log(error);
|
|
67
|
+
// }
|
|
68
|
+
// },[])
|
|
69
|
+
// export {
|
|
70
|
+
// buttonAnalyzeParams
|
|
71
|
+
// }
|
|
72
|
+
// 拼给洞察页面的 参数
|
|
73
|
+
// globalFilters 属性里面没有value值时需要处理下。要不就是在上传时处理下没有value值这条数据不要
|
|
74
|
+
// globalFilters:{conditions:[{
|
|
75
|
+
// relation: 'and',
|
|
76
|
+
// conditions: [{
|
|
77
|
+
// attrId : 219,
|
|
78
|
+
// attrName: "url",
|
|
79
|
+
// label :"url",
|
|
80
|
+
// operator : "gt",
|
|
81
|
+
// propCategory : "eventProp",
|
|
82
|
+
// type : 2,
|
|
83
|
+
// values: ['http://127.0.0.1:9000'],
|
|
84
|
+
// }]
|
|
85
|
+
// }]},
|
|
86
|
+
// 点击当前页面的 参数
|
|
87
|
+
// let obj = {
|
|
88
|
+
// data: {
|
|
89
|
+
// chartType: 'line',
|
|
90
|
+
// module: 'insight',
|
|
91
|
+
// userGroup: [0],
|
|
92
|
+
// globalDimensions: [
|
|
93
|
+
// {
|
|
94
|
+
// propCategory: 'eventProp',
|
|
95
|
+
// type: 1,
|
|
96
|
+
// attrId: 219,
|
|
97
|
+
// attrName: 'url',
|
|
98
|
+
// },
|
|
99
|
+
// ],
|
|
100
|
+
// targets: [
|
|
101
|
+
// {
|
|
102
|
+
// filters: {
|
|
103
|
+
// relation: 'and',
|
|
104
|
+
// conditions: [
|
|
105
|
+
// {
|
|
106
|
+
// attrId: 219,
|
|
107
|
+
// propCategory: 'eventProp',
|
|
108
|
+
// type: 1,
|
|
109
|
+
// operator: 'equal',
|
|
110
|
+
// values: [],
|
|
111
|
+
// dimensionSub: 'event_attr',
|
|
112
|
+
// label: 'url',
|
|
113
|
+
// attrName: 'url',
|
|
114
|
+
// },
|
|
115
|
+
// ],
|
|
116
|
+
// },
|
|
117
|
+
// analysisDimension: {
|
|
118
|
+
// analysisIndex: 'number',
|
|
119
|
+
// },
|
|
120
|
+
// eventGroupId: 0,
|
|
121
|
+
// eventId: 42,
|
|
122
|
+
// eventName: 'revenue',
|
|
123
|
+
// type: 'event',
|
|
124
|
+
// },
|
|
125
|
+
// ],
|
|
126
|
+
// },
|
|
127
|
+
// };
|
|
128
|
+
// const buttonAnalyzeParams = useRef<dongchaParamsType>(); // 拼接的数据
|
|
129
|
+
// const pageAnalyzeParams = useRef<dongchaParamsType>(); // 拼接的数据
|
|
130
|
+
// const pagePracticeParams = useRef<dongchaParamsType>(); // 拼接的数据
|
|
131
|
+
// const pageClickParams = useRef<dongchaParamsType>(); // 拼接的数据
|
|
132
|
+
// // 点击事件分析的事件和属性
|
|
133
|
+
// const buttonAnalyze = {
|
|
134
|
+
// name: '安卓自定义事件',
|
|
135
|
+
// attrs: {
|
|
136
|
+
// page: 'eventProp-115',
|
|
137
|
+
// filters: [
|
|
138
|
+
// 'eventProp-115',
|
|
139
|
+
// 'app_name',
|
|
140
|
+
// 'func_module',
|
|
141
|
+
// 'func_module_id',
|
|
142
|
+
// 'func_module_ver',
|
|
143
|
+
// 'page_name',
|
|
144
|
+
// ],
|
|
145
|
+
// },
|
|
146
|
+
// };
|
|
147
|
+
// // 页面浏览详情分析
|
|
148
|
+
// const pageAnalyze={
|
|
149
|
+
// name: '浏览⻚⾯',
|
|
150
|
+
// attrs: {
|
|
151
|
+
// page: 'page_name',
|
|
152
|
+
// filters: [
|
|
153
|
+
// 'current_version',
|
|
154
|
+
// 'app_name',
|
|
155
|
+
// 'app_version',
|
|
156
|
+
// 'func_module',
|
|
157
|
+
// 'func_module_id',
|
|
158
|
+
// 'func_module_ver',
|
|
159
|
+
// ],
|
|
160
|
+
// },
|
|
161
|
+
// }
|
|
162
|
+
// // 页面实验浏览分析
|
|
163
|
+
// const pagePractice={
|
|
164
|
+
// name: '浏览⻚⾯',
|
|
165
|
+
// attrs: {
|
|
166
|
+
// page: 'page_name',
|
|
167
|
+
// filters: [
|
|
168
|
+
// 'current_version',
|
|
169
|
+
// 'app_name',
|
|
170
|
+
// 'app_version',
|
|
171
|
+
// 'func_module',
|
|
172
|
+
// 'func_module_id',
|
|
173
|
+
// 'func_module_ver',
|
|
174
|
+
// 'test_order_id',
|
|
175
|
+
// 'test_order_item_id',
|
|
176
|
+
// 'test_order_name',
|
|
177
|
+
// ],
|
|
178
|
+
// },
|
|
179
|
+
// }
|
|
180
|
+
// // 页面点击浏览分析
|
|
181
|
+
// const pageClick={
|
|
182
|
+
// name: '浏览⻚⾯',
|
|
183
|
+
// attrs: {
|
|
184
|
+
// page: 'page_name',
|
|
185
|
+
// filters: [
|
|
186
|
+
// 'current_version',
|
|
187
|
+
// 'app_name',
|
|
188
|
+
// 'app_version',
|
|
189
|
+
// 'func_module',
|
|
190
|
+
// 'func_module_id',
|
|
191
|
+
// 'func_module_ver',
|
|
192
|
+
// ],
|
|
193
|
+
// },
|
|
194
|
+
// }
|
|
195
|
+
// const getPageView = (params:{name:string,attrs:{page:string,filters:string[]}[]}|any,resultParams:any) => {
|
|
196
|
+
// try {
|
|
197
|
+
// eventGroupList?.[0].eventList.forEach((o) => {
|
|
198
|
+
// if (o.name || o.alias == params.name) {
|
|
199
|
+
// const haveFilter = o.attrList.filter((m: any) =>
|
|
200
|
+
// params.attrs!.filters?.includes(m!.key),
|
|
201
|
+
// );
|
|
202
|
+
// const pageId = o.attrList.filter((m) => m?.key == params.attrs.page);
|
|
203
|
+
// resultParams.current = {
|
|
204
|
+
// data: {
|
|
205
|
+
// chartType: 'line',
|
|
206
|
+
// module: 'insight',
|
|
207
|
+
// userGroup: [0],
|
|
208
|
+
// targets: [
|
|
209
|
+
// {
|
|
210
|
+
// alias: o.name,
|
|
211
|
+
// filters: haveFilter,
|
|
212
|
+
// analysisDimension: { analysisIndex: 'number' },
|
|
213
|
+
// eventGroupId: 0,
|
|
214
|
+
// eventId: o.id,
|
|
215
|
+
// eventName: o.name,
|
|
216
|
+
// type: 'event',
|
|
217
|
+
// },
|
|
218
|
+
// ],
|
|
219
|
+
// },
|
|
220
|
+
// };
|
|
221
|
+
// console.log(haveFilter, pageId, resultParams, '包含了');
|
|
222
|
+
// throw Error('用来终止循环的');
|
|
223
|
+
// }
|
|
224
|
+
// });
|
|
225
|
+
// } catch (error) {
|
|
226
|
+
// }
|
|
227
|
+
// };
|
|
228
|
+
// {
|
|
229
|
+
// time: '2024-12-18',
|
|
230
|
+
// eventName: '事件名称',
|
|
231
|
+
// userId: '2022-01-12',
|
|
232
|
+
// data:JSON.stringify({
|
|
233
|
+
// base: {
|
|
234
|
+
// appkey: 'appkeynsjnfjs',
|
|
235
|
+
// ip: '127.0.0.1',
|
|
236
|
+
// sdk: 'sdjfioemve',
|
|
237
|
+
// sdkv: '所发生的',
|
|
238
|
+
// did: 'dvdf',
|
|
239
|
+
// },
|
|
240
|
+
// detail: [
|
|
241
|
+
// { cuid: 'iwoei', msg: '自定义事件', pr: '自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件' },
|
|
242
|
+
// { cuid: 'iwoei', msg: '自定义事件1', pr: '自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件' },
|
|
243
|
+
// { cuid: 'iwoei', msg: '自定义事件2', pr: '自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件' },
|
|
244
|
+
// { cuid: 'iwoei', msg: '自定义事件3', pr: '自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件' },
|
|
245
|
+
// { cuid: 'iwoei', msg: '自定义事件4', pr: '自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件' },
|
|
246
|
+
// { cuid: 'iwoei', msg: '自定义事件5', pr: '自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件' },
|
|
247
|
+
// { cuid: 'iwoei', msg: '自定义事件6', pr: '自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件' },
|
|
248
|
+
// { cuid: 'iwoei', msg: '自定义事件7', pr: '自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件' },
|
|
249
|
+
// { cuid: 'iwoei', msg: '自定义事件8', pr: '自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件' },
|
|
250
|
+
// { cuid: 'iwoei', msg: '自定义事件9', pr: '自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件' },
|
|
251
|
+
// { cuid: 'iwoei', msg: '自定义事件10', pr: '自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件' },
|
|
252
|
+
// { cuid: 'iwoei', msg: '自定义事件11', pr: '自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件自定义事件' },
|
|
253
|
+
// ],
|
|
254
|
+
// paramAppId: 2,
|
|
255
|
+
// paramUserId: 4,
|
|
256
|
+
// },
|
|
257
|
+
// )}
|
|
@@ -0,0 +1,376 @@
|
|
|
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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
8
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
9
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
10
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
11
|
+
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."); }
|
|
12
|
+
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; } }
|
|
13
|
+
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; }
|
|
14
|
+
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; } }
|
|
15
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
16
|
+
import React, { useEffect, useRef, useState, useContext } from 'react';
|
|
17
|
+
import { Input, Button, Drawer, Form, Typography, message } from 'antd';
|
|
18
|
+
import { IconFont, BizAttrConditionGroup, BizEventSelector, BizAttributeSelector, BizGlobalDataContext } from '@zgfe/business-lib';
|
|
19
|
+
import UseModal from '../../CutsModal';
|
|
20
|
+
import apis from '../../../constants/api';
|
|
21
|
+
import request from '../../../utils/ajax';
|
|
22
|
+
var Link = Typography.Link;
|
|
23
|
+
var pageClassName = 'mapSetting';
|
|
24
|
+
var DrawerAdd = function DrawerAdd(props) {
|
|
25
|
+
var _useState = useState(false),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
isOpen = _useState2[0],
|
|
28
|
+
setIsOpen = _useState2[1];
|
|
29
|
+
var _Form$useForm = Form.useForm(),
|
|
30
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
31
|
+
form = _Form$useForm2[0];
|
|
32
|
+
var formInitialValues = {
|
|
33
|
+
name: ''
|
|
34
|
+
};
|
|
35
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
36
|
+
currentApp = _useContext.currentApp;
|
|
37
|
+
// 关闭抽屉并重置表单
|
|
38
|
+
useEffect(function () {
|
|
39
|
+
setIsOpen(props.open);
|
|
40
|
+
}, [props.open]);
|
|
41
|
+
var closeDrawer = function closeDrawer() {
|
|
42
|
+
setIsOpen(false);
|
|
43
|
+
form.resetFields(); // 表单重置
|
|
44
|
+
conditionRef.current.deleteAll(); // 重置固定筛选数组
|
|
45
|
+
props.handleClose();
|
|
46
|
+
};
|
|
47
|
+
var onClose = function onClose() {
|
|
48
|
+
var a = form.isFieldsTouched(); // 检查字段是否被用户操作过 true:操作 false:没操作
|
|
49
|
+
if (a) {
|
|
50
|
+
UseModal({
|
|
51
|
+
onOk: closeDrawer,
|
|
52
|
+
content: '当前设置尚未保存,是否确定离开?',
|
|
53
|
+
okText: '直接离开',
|
|
54
|
+
cancelText: '取消'
|
|
55
|
+
});
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
closeDrawer();
|
|
59
|
+
};
|
|
60
|
+
var handleAddMap = /*#__PURE__*/function () {
|
|
61
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
62
|
+
var values;
|
|
63
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
64
|
+
while (1) switch (_context.prev = _context.next) {
|
|
65
|
+
case 0:
|
|
66
|
+
_context.next = 2;
|
|
67
|
+
return form.validateFields();
|
|
68
|
+
case 2:
|
|
69
|
+
values = _context.sent;
|
|
70
|
+
if (!values.errorFields) {
|
|
71
|
+
_context.next = 5;
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
return _context.abrupt("return");
|
|
75
|
+
case 5:
|
|
76
|
+
UseModal({
|
|
77
|
+
onOk: submitAdd,
|
|
78
|
+
content: '地图保存完成后,将无法修改!',
|
|
79
|
+
okText: '直接提交',
|
|
80
|
+
cancelText: '取消'
|
|
81
|
+
});
|
|
82
|
+
case 6:
|
|
83
|
+
case "end":
|
|
84
|
+
return _context.stop();
|
|
85
|
+
}
|
|
86
|
+
}, _callee);
|
|
87
|
+
}));
|
|
88
|
+
return function handleAddMap() {
|
|
89
|
+
return _ref.apply(this, arguments);
|
|
90
|
+
};
|
|
91
|
+
}();
|
|
92
|
+
var submitAdd = /*#__PURE__*/function () {
|
|
93
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
94
|
+
var _values$inquire;
|
|
95
|
+
var values, inquireIndex, filterNoNull, objFilter;
|
|
96
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
97
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
98
|
+
case 0:
|
|
99
|
+
_context2.next = 2;
|
|
100
|
+
return form.validateFields();
|
|
101
|
+
case 2:
|
|
102
|
+
values = _context2.sent;
|
|
103
|
+
inquireIndex = values === null || values === void 0 ? void 0 : (_values$inquire = values.inquire) === null || _values$inquire === void 0 ? void 0 : _values$inquire.map(function (o, index) {
|
|
104
|
+
return {
|
|
105
|
+
inquire: _objectSpread(_objectSpread({}, o.inquire), {}, {
|
|
106
|
+
index: index + 1
|
|
107
|
+
})
|
|
108
|
+
};
|
|
109
|
+
}); // 固定筛选 全部定位 operator: 'equal'
|
|
110
|
+
filterNoNull = filter === null || filter === void 0 ? void 0 : filter.conditions.map(function (o) {
|
|
111
|
+
return _objectSpread(_objectSpread({}, o), {}, {
|
|
112
|
+
operator: 'equal'
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
objFilter = _objectSpread(_objectSpread({}, filter), {}, {
|
|
116
|
+
conditions: filterNoNull
|
|
117
|
+
});
|
|
118
|
+
request(apis.dataMap.saveMap, {
|
|
119
|
+
method: 'post',
|
|
120
|
+
data: {
|
|
121
|
+
mapName: values.name,
|
|
122
|
+
eventId: values.event.event.id,
|
|
123
|
+
eventName: values.event.event.name,
|
|
124
|
+
filterJson: JSON.stringify(objFilter),
|
|
125
|
+
attributeJson: JSON.stringify(inquireIndex),
|
|
126
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
127
|
+
pageAttrName: values.page.name || values.page.label,
|
|
128
|
+
remarkAttrName: values.remark.name || values.remark.label,
|
|
129
|
+
moduleAttrName: values.model.name || values.model.label
|
|
130
|
+
}
|
|
131
|
+
}).then(function (res) {
|
|
132
|
+
if (!res) return;
|
|
133
|
+
message.success('创建成功');
|
|
134
|
+
closeDrawer();
|
|
135
|
+
});
|
|
136
|
+
case 7:
|
|
137
|
+
case "end":
|
|
138
|
+
return _context2.stop();
|
|
139
|
+
}
|
|
140
|
+
}, _callee2);
|
|
141
|
+
}));
|
|
142
|
+
return function submitAdd() {
|
|
143
|
+
return _ref2.apply(this, arguments);
|
|
144
|
+
};
|
|
145
|
+
}();
|
|
146
|
+
// 地图事件
|
|
147
|
+
var _useState3 = useState({}),
|
|
148
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
149
|
+
event = _useState4[0],
|
|
150
|
+
setEvent = _useState4[1]; // 当前选择的地图事件
|
|
151
|
+
var onEventChange = function onEventChange(value) {
|
|
152
|
+
setEvent(value.event);
|
|
153
|
+
setCount(0);
|
|
154
|
+
setFilter(undefined);
|
|
155
|
+
};
|
|
156
|
+
// 筛选属性组
|
|
157
|
+
var _useState5 = useState(),
|
|
158
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
159
|
+
filter = _useState6[0],
|
|
160
|
+
setFilter = _useState6[1];
|
|
161
|
+
// 事件的筛选属性
|
|
162
|
+
var conditionRef = useRef();
|
|
163
|
+
// 筛选条件个数
|
|
164
|
+
var _useState7 = useState(0),
|
|
165
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
166
|
+
count = _useState8[0],
|
|
167
|
+
setCount = _useState8[1];
|
|
168
|
+
// 筛选条件改变
|
|
169
|
+
var onChangeFilters = function onChangeFilters(data) {
|
|
170
|
+
setFilter(data);
|
|
171
|
+
};
|
|
172
|
+
// 添加筛选
|
|
173
|
+
var onAdd = function onAdd() {
|
|
174
|
+
setTimeout(function () {
|
|
175
|
+
conditionRef.current.add();
|
|
176
|
+
}, 0);
|
|
177
|
+
};
|
|
178
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Drawer, {
|
|
179
|
+
title: "\u65B0\u589E\u5730\u56FE",
|
|
180
|
+
placement: "right",
|
|
181
|
+
onClose: onClose,
|
|
182
|
+
open: isOpen,
|
|
183
|
+
width: "800px",
|
|
184
|
+
footer: /*#__PURE__*/React.createElement("div", {
|
|
185
|
+
className: "".concat(pageClassName, "_footer")
|
|
186
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
187
|
+
style: {
|
|
188
|
+
marginRight: '8px'
|
|
189
|
+
},
|
|
190
|
+
onClick: function onClick() {
|
|
191
|
+
onClose();
|
|
192
|
+
}
|
|
193
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
|
|
194
|
+
type: "primary",
|
|
195
|
+
onClick: handleAddMap
|
|
196
|
+
}, "\u65B0\u589E"))
|
|
197
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
198
|
+
className: "".concat(pageClassName, "_addMap_tip")
|
|
199
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
200
|
+
type: "tishi"
|
|
201
|
+
}), " \u5730\u56FE\u6570\u636E\u6BCF\u65E5\u66F4\u65B0\u4E00\u6B21\uFF0C\u65B0\u5EFA\u4E0E\u4FEE\u6539\u5730\u56FE\u6B21\u65E5\u5B8C\u6210\u66F4\u65B0"), /*#__PURE__*/React.createElement("div", {
|
|
202
|
+
className: "".concat(pageClassName)
|
|
203
|
+
}, /*#__PURE__*/React.createElement(Form, {
|
|
204
|
+
form: form,
|
|
205
|
+
labelCol: {
|
|
206
|
+
span: 4
|
|
207
|
+
},
|
|
208
|
+
wrapperCol: {
|
|
209
|
+
span: 20
|
|
210
|
+
},
|
|
211
|
+
labelAlign: "left",
|
|
212
|
+
initialValues: formInitialValues,
|
|
213
|
+
autoComplete: "off",
|
|
214
|
+
className: "mapSetting_addMap_form"
|
|
215
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
216
|
+
label: "\u5730\u56FE\u540D\u79F0",
|
|
217
|
+
name: "name",
|
|
218
|
+
rules: [{
|
|
219
|
+
required: true,
|
|
220
|
+
message: '地图名称不可为空'
|
|
221
|
+
}]
|
|
222
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
223
|
+
placeholder: "\u8BF7\u8F93\u5165\u5730\u56FE\u540D\u79F0"
|
|
224
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
225
|
+
label: "\u5730\u56FE\u4E8B\u4EF6",
|
|
226
|
+
name: "event",
|
|
227
|
+
rules: [{
|
|
228
|
+
required: true,
|
|
229
|
+
message: '地图事件不可为空'
|
|
230
|
+
}]
|
|
231
|
+
}, /*#__PURE__*/React.createElement(BizEventSelector, {
|
|
232
|
+
showAllEvent: false,
|
|
233
|
+
showBuiltInTarget: false,
|
|
234
|
+
popupContainer: false,
|
|
235
|
+
defaultSelectAble: false,
|
|
236
|
+
destroyPopupOnHide: true,
|
|
237
|
+
value: {
|
|
238
|
+
event: event
|
|
239
|
+
},
|
|
240
|
+
onChange: onEventChange,
|
|
241
|
+
placeholder: "\u8BF7\u9009\u62E9\u4E8B\u4EF6"
|
|
242
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
243
|
+
label: "\u5C55\u793A\u9875\u9762",
|
|
244
|
+
name: "page",
|
|
245
|
+
rules: [{
|
|
246
|
+
required: true,
|
|
247
|
+
message: '展示页面不可为空'
|
|
248
|
+
}]
|
|
249
|
+
}, /*#__PURE__*/React.createElement(BizAttributeSelector, {
|
|
250
|
+
eventIdList: [event.id],
|
|
251
|
+
enableDelete: false,
|
|
252
|
+
enableEventProp: true,
|
|
253
|
+
enableEnvProp: false,
|
|
254
|
+
enableUserProp: false,
|
|
255
|
+
placeholder: "\u8BF7\u9009\u62E9\u5C55\u793A\u9875\u9762"
|
|
256
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
257
|
+
label: "\u5907\u6CE8\u540D\u79F0",
|
|
258
|
+
name: "remark",
|
|
259
|
+
rules: [{
|
|
260
|
+
required: true,
|
|
261
|
+
message: '备注名称不可为空'
|
|
262
|
+
}]
|
|
263
|
+
}, /*#__PURE__*/React.createElement(BizAttributeSelector, {
|
|
264
|
+
eventIdList: [event.id],
|
|
265
|
+
enableDelete: false,
|
|
266
|
+
enableEventProp: true,
|
|
267
|
+
enableEnvProp: false,
|
|
268
|
+
enableUserProp: false,
|
|
269
|
+
placeholder: "\u8BF7\u9009\u62E9\u5907\u6CE8\u540D\u79F0"
|
|
270
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
271
|
+
label: "\u6240\u5C5E\u6A21\u5757",
|
|
272
|
+
name: "model",
|
|
273
|
+
rules: [{
|
|
274
|
+
required: true,
|
|
275
|
+
message: '所属模块不可为空'
|
|
276
|
+
}]
|
|
277
|
+
}, /*#__PURE__*/React.createElement(BizAttributeSelector, {
|
|
278
|
+
eventIdList: [event.id],
|
|
279
|
+
enableDelete: false,
|
|
280
|
+
enableEventProp: true,
|
|
281
|
+
enableEnvProp: false,
|
|
282
|
+
enableUserProp: false,
|
|
283
|
+
placeholder: "\u8BF7\u9009\u62E9\u6240\u5C5E\u6A21\u5757"
|
|
284
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
285
|
+
label: "\u56FA\u5B9A\u7B5B\u9009"
|
|
286
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
287
|
+
className: "".concat(pageClassName, "_addMap_propTitle")
|
|
288
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
289
|
+
className: "".concat(pageClassName, "_addMap_propTitleLeft")
|
|
290
|
+
}, "\u5C5E\u6027\u540D"), /*#__PURE__*/React.createElement("span", {
|
|
291
|
+
className: "".concat(pageClassName, "_addMap_propTitleRight")
|
|
292
|
+
}, "\u5C5E\u6027\u503C")), /*#__PURE__*/React.createElement(BizAttrConditionGroup, {
|
|
293
|
+
ref: conditionRef,
|
|
294
|
+
value: filter,
|
|
295
|
+
enableEventProp: true,
|
|
296
|
+
enableEnvProp: false,
|
|
297
|
+
enableUserProp: false,
|
|
298
|
+
enableDelete: true,
|
|
299
|
+
eventIdList: [event.id],
|
|
300
|
+
onChange: onChangeFilters,
|
|
301
|
+
onConditionsCount: setCount
|
|
302
|
+
}), count < 10 ? (/*#__PURE__*/React.createElement(Link, {
|
|
303
|
+
target: "_blank",
|
|
304
|
+
onClick: function onClick() {
|
|
305
|
+
return onAdd();
|
|
306
|
+
}
|
|
307
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
308
|
+
type: "tianjia3",
|
|
309
|
+
style: {
|
|
310
|
+
marginRight: '10px',
|
|
311
|
+
verticalAlign: 'middle'
|
|
312
|
+
}
|
|
313
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
314
|
+
style: {
|
|
315
|
+
verticalAlign: 'middle'
|
|
316
|
+
}
|
|
317
|
+
}, "\u6DFB\u52A0\u7B5B\u9009"))) : null), /*#__PURE__*/React.createElement(Form.Item, {
|
|
318
|
+
label: "\u67E5\u8BE2\u5C5E\u6027"
|
|
319
|
+
}, /*#__PURE__*/React.createElement(Form.List, {
|
|
320
|
+
name: "inquire"
|
|
321
|
+
}, function (fields, _ref3) {
|
|
322
|
+
var add = _ref3.add,
|
|
323
|
+
remove = _ref3.remove;
|
|
324
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, fields.map(function (field) {
|
|
325
|
+
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
326
|
+
key: field.key,
|
|
327
|
+
noStyle: true,
|
|
328
|
+
shouldUpdate: function shouldUpdate(prevValues, curValues) {
|
|
329
|
+
return prevValues.sights !== curValues.sights;
|
|
330
|
+
}
|
|
331
|
+
}, function () {
|
|
332
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
333
|
+
className: "".concat(pageClassName, "_addMap_propValueList")
|
|
334
|
+
}, /*#__PURE__*/React.createElement(Form.Item, _objectSpread(_objectSpread({}, field), {}, {
|
|
335
|
+
name: [field.name, 'inquire'],
|
|
336
|
+
style: {
|
|
337
|
+
width: '100%'
|
|
338
|
+
}
|
|
339
|
+
}), /*#__PURE__*/React.createElement(BizAttributeSelector, {
|
|
340
|
+
eventIdList: [event.id],
|
|
341
|
+
enableDelete: false,
|
|
342
|
+
enableEventProp: true,
|
|
343
|
+
enableEnvProp: false,
|
|
344
|
+
enableUserProp: false,
|
|
345
|
+
placeholder: "\u8BF7\u9009\u62E9\u5C5E\u6027"
|
|
346
|
+
})), /*#__PURE__*/React.createElement(IconFont, {
|
|
347
|
+
type: "qingchu",
|
|
348
|
+
className: "".concat(pageClassName, "_closeIco"),
|
|
349
|
+
onClick: function onClick() {
|
|
350
|
+
return remove(field.name);
|
|
351
|
+
}
|
|
352
|
+
}));
|
|
353
|
+
});
|
|
354
|
+
}), fields.length >= 5 ? null : (/*#__PURE__*/React.createElement(Form.Item, {
|
|
355
|
+
style: {
|
|
356
|
+
margin: '8px 0px 0px 0px'
|
|
357
|
+
}
|
|
358
|
+
}, /*#__PURE__*/React.createElement(Link, {
|
|
359
|
+
target: "_blank",
|
|
360
|
+
onClick: function onClick() {
|
|
361
|
+
return add();
|
|
362
|
+
}
|
|
363
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
364
|
+
type: "tianjia3",
|
|
365
|
+
style: {
|
|
366
|
+
marginRight: '10px',
|
|
367
|
+
verticalAlign: 'middle'
|
|
368
|
+
}
|
|
369
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
370
|
+
style: {
|
|
371
|
+
verticalAlign: 'middle'
|
|
372
|
+
}
|
|
373
|
+
}, "\u6DFB\u52A0\u7B5B\u9009")))));
|
|
374
|
+
}))))));
|
|
375
|
+
};
|
|
376
|
+
export default DrawerAdd;
|