@zgfe/modules-dm 1.0.57-zhongyuan.66 → 1.0.57-zhongyuan.69
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.
|
@@ -21,6 +21,7 @@ import { Card, Form, Input, Upload, message, Table, Button, Space, Empty, Spin }
|
|
|
21
21
|
import { LoadingOutlined, PlusOutlined, SlidersTwoTone } from '@ant-design/icons';
|
|
22
22
|
import React, { useState, useContext, useEffect } from 'react';
|
|
23
23
|
import { IconFont, BizGlobalDataContext, ajax } from '@zgfe/business-lib';
|
|
24
|
+
import { fetchEventAttrs } from '@zgfe/business-lib/es/utils/eventApi';
|
|
24
25
|
import apis from '../../../constants/api';
|
|
25
26
|
import request from '../../../utils/ajax';
|
|
26
27
|
import { guid } from '../../../utils/index';
|
|
@@ -264,7 +265,7 @@ var RightDetail = function RightDetail(props) {
|
|
|
264
265
|
}();
|
|
265
266
|
var handleButtonPage = /*#__PURE__*/function () {
|
|
266
267
|
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(flag) {
|
|
267
|
-
var filterJsonList, obj, xifenList, attrFilterJsonList, modulePageJsonList,
|
|
268
|
+
var filterJsonList, obj, xifenList, attrFilterJsonList, modulePageJsonList, _attrListApi$filter, _attrListApi$filter2, attrListApi, moduleAttrObj, pageAttrObj, _obj, obj1, allFilterObj, globalDimensionsList, resultParams;
|
|
268
269
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
269
270
|
while (1) switch (_context3.prev = _context3.next) {
|
|
270
271
|
case 0:
|
|
@@ -300,55 +301,65 @@ var RightDetail = function RightDetail(props) {
|
|
|
300
301
|
});
|
|
301
302
|
// page module 的值拼接
|
|
302
303
|
modulePageJsonList = [];
|
|
303
|
-
if (eventNameMap && (currentMap === null || currentMap === void 0 ? void 0 : currentMap.eventName)) {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
})) === null || _eventNameMap$current2 === void 0 ? void 0 : _eventNameMap$current2[0];
|
|
307
|
-
pageAttrObj = (_eventNameMap$current3 = eventNameMap[currentMap === null || currentMap === void 0 ? void 0 : currentMap.eventName]) === null || _eventNameMap$current3 === void 0 ? void 0 : (_eventNameMap$current4 = _eventNameMap$current3.attrList.filter(function (o) {
|
|
308
|
-
return o.label == (currentMap === null || currentMap === void 0 ? void 0 : currentMap.pageAttrName);
|
|
309
|
-
})) === null || _eventNameMap$current4 === void 0 ? void 0 : _eventNameMap$current4[0];
|
|
310
|
-
if (moduleAttrObj) {
|
|
311
|
-
_obj = {
|
|
312
|
-
attrId: moduleAttrObj.id,
|
|
313
|
-
attrName: moduleAttrObj.label,
|
|
314
|
-
dimensionSub: moduleAttrObj.dimensionSub,
|
|
315
|
-
label: moduleAttrObj.label,
|
|
316
|
-
operator: 'equal',
|
|
317
|
-
propCategory: 'eventProp',
|
|
318
|
-
type: moduleAttrObj.type,
|
|
319
|
-
values: moduleAttrObj === null || moduleAttrObj === void 0 ? void 0 : moduleAttrObj.values
|
|
320
|
-
};
|
|
321
|
-
modulePageJsonList.push(_obj);
|
|
322
|
-
}
|
|
323
|
-
if (pageAttrObj) {
|
|
324
|
-
obj1 = {
|
|
325
|
-
attrId: pageAttrObj.id,
|
|
326
|
-
attrName: pageAttrObj.label,
|
|
327
|
-
dimensionSub: pageAttrObj.dimensionSub,
|
|
328
|
-
label: pageAttrObj.label,
|
|
329
|
-
operator: 'equal',
|
|
330
|
-
propCategory: 'eventProp',
|
|
331
|
-
type: pageAttrObj.type,
|
|
332
|
-
values: pageAttrObj === null || pageAttrObj === void 0 ? void 0 : pageAttrObj.values
|
|
333
|
-
};
|
|
334
|
-
modulePageJsonList.push(obj1);
|
|
335
|
-
}
|
|
304
|
+
if (!(eventNameMap && (currentMap === null || currentMap === void 0 ? void 0 : currentMap.eventName))) {
|
|
305
|
+
_context3.next = 14;
|
|
306
|
+
break;
|
|
336
307
|
}
|
|
308
|
+
_context3.next = 9;
|
|
309
|
+
return fetchEventAttrs(currentMap === null || currentMap === void 0 ? void 0 : currentMap.eventId, currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId);
|
|
310
|
+
case 9:
|
|
311
|
+
attrListApi = _context3.sent;
|
|
312
|
+
// 事件下的细分
|
|
313
|
+
moduleAttrObj = (_attrListApi$filter = attrListApi.filter(function (o) {
|
|
314
|
+
return o.label == (currentMap === null || currentMap === void 0 ? void 0 : currentMap.moduleAttrName);
|
|
315
|
+
})) === null || _attrListApi$filter === void 0 ? void 0 : _attrListApi$filter[0];
|
|
316
|
+
pageAttrObj = (_attrListApi$filter2 = attrListApi.filter(function (o) {
|
|
317
|
+
return o.label == (currentMap === null || currentMap === void 0 ? void 0 : currentMap.pageAttrName);
|
|
318
|
+
})) === null || _attrListApi$filter2 === void 0 ? void 0 : _attrListApi$filter2[0];
|
|
319
|
+
if (moduleAttrObj) {
|
|
320
|
+
_obj = {
|
|
321
|
+
attrId: moduleAttrObj.id,
|
|
322
|
+
attrName: moduleAttrObj.label,
|
|
323
|
+
dimensionSub: moduleAttrObj.dimensionSub,
|
|
324
|
+
label: moduleAttrObj.label,
|
|
325
|
+
operator: 'equal',
|
|
326
|
+
propCategory: 'eventProp',
|
|
327
|
+
type: moduleAttrObj.type,
|
|
328
|
+
values: [currentTreeData === null || currentTreeData === void 0 ? void 0 : currentTreeData.moduleAttrName]
|
|
329
|
+
};
|
|
330
|
+
modulePageJsonList.push(_obj);
|
|
331
|
+
}
|
|
332
|
+
if (pageAttrObj) {
|
|
333
|
+
obj1 = {
|
|
334
|
+
attrId: pageAttrObj.id,
|
|
335
|
+
attrName: pageAttrObj.label,
|
|
336
|
+
dimensionSub: pageAttrObj.dimensionSub,
|
|
337
|
+
label: pageAttrObj.label,
|
|
338
|
+
operator: 'equal',
|
|
339
|
+
propCategory: 'eventProp',
|
|
340
|
+
type: pageAttrObj.type,
|
|
341
|
+
values: [currentTreeData === null || currentTreeData === void 0 ? void 0 : currentTreeData.pageAttrName]
|
|
342
|
+
};
|
|
343
|
+
modulePageJsonList.push(obj1);
|
|
344
|
+
}
|
|
345
|
+
case 14:
|
|
337
346
|
allFilterObj = {
|
|
338
347
|
relation: 'and',
|
|
339
348
|
conditions: [].concat(_toConsumableArray(filterJsonList), attrFilterJsonList, modulePageJsonList)
|
|
340
349
|
}; // console.log(allFilterObj, 'allFilterObj');
|
|
341
350
|
// 细分的 属性值
|
|
342
351
|
globalDimensionsList = [];
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
+
if (xifenList) {
|
|
353
|
+
xifenList.forEach(function (o) {
|
|
354
|
+
var obj = {
|
|
355
|
+
propCategory: o.inquire.propCategory,
|
|
356
|
+
type: o.inquire.type,
|
|
357
|
+
attrId: o.inquire.id,
|
|
358
|
+
attrName: o.inquire.label
|
|
359
|
+
};
|
|
360
|
+
globalDimensionsList.push(obj);
|
|
361
|
+
});
|
|
362
|
+
}
|
|
352
363
|
resultParams = {
|
|
353
364
|
data: {
|
|
354
365
|
chartType: 'line',
|
|
@@ -376,7 +387,7 @@ var RightDetail = function RightDetail(props) {
|
|
|
376
387
|
}
|
|
377
388
|
});
|
|
378
389
|
});
|
|
379
|
-
case
|
|
390
|
+
case 19:
|
|
380
391
|
case "end":
|
|
381
392
|
return _context3.stop();
|
|
382
393
|
}
|
|
@@ -396,31 +407,36 @@ var RightDetail = function RightDetail(props) {
|
|
|
396
407
|
}, [currentTreeData]);
|
|
397
408
|
var xunapi = /*#__PURE__*/function () {
|
|
398
409
|
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
399
|
-
var haveEventName, haveModuleAttr, havePageAttr, objConditions, b1, b7, b30;
|
|
410
|
+
var haveEventName, attrListApi, haveModuleAttr, havePageAttr, objConditions, b1, b7, b30;
|
|
400
411
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
401
412
|
while (1) switch (_context4.prev = _context4.next) {
|
|
402
413
|
case 0:
|
|
403
414
|
// console.log(currentTreeData, currentMap, eventGroupList,eventNameMap, 'currentTreeData');
|
|
404
415
|
haveEventName = eventNameMap === null || eventNameMap === void 0 ? void 0 : eventNameMap[currentTreeData.eventName]; // 查找事件
|
|
405
|
-
|
|
416
|
+
_context4.next = 3;
|
|
417
|
+
return fetchEventAttrs(currentTreeData === null || currentTreeData === void 0 ? void 0 : currentTreeData.eventId, currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId);
|
|
418
|
+
case 3:
|
|
419
|
+
attrListApi = _context4.sent;
|
|
420
|
+
// 事件下的细分
|
|
421
|
+
haveModuleAttr = attrListApi.find(function (o) {
|
|
406
422
|
return o.label == (currentMap === null || currentMap === void 0 ? void 0 : currentMap.moduleAttrName);
|
|
407
423
|
}); // 事件模块的属性
|
|
408
424
|
if (haveModuleAttr) {
|
|
409
425
|
haveModuleAttr['values'] = [currentTreeData.moduleAttrName];
|
|
410
426
|
}
|
|
411
|
-
havePageAttr =
|
|
427
|
+
havePageAttr = attrListApi.find(function (o) {
|
|
412
428
|
return o.label == (currentMap === null || currentMap === void 0 ? void 0 : currentMap.pageAttrName);
|
|
413
429
|
}); // 事件页面的属性
|
|
414
430
|
if (havePageAttr) {
|
|
415
431
|
havePageAttr['values'] = [currentTreeData.pageAttrName];
|
|
416
432
|
}
|
|
417
433
|
if (haveModuleAttr) {
|
|
418
|
-
_context4.next =
|
|
434
|
+
_context4.next = 11;
|
|
419
435
|
break;
|
|
420
436
|
}
|
|
421
437
|
message.warning("".concat(currentMap === null || currentMap === void 0 ? void 0 : currentMap.moduleAttrName, "\u4E0B\u7684").concat(currentMap === null || currentMap === void 0 ? void 0 : currentMap.pageAttrName, "\u6CA1\u6709"));
|
|
422
438
|
return _context4.abrupt("return");
|
|
423
|
-
case
|
|
439
|
+
case 11:
|
|
424
440
|
objConditions = [{
|
|
425
441
|
attrId: haveModuleAttr === null || haveModuleAttr === void 0 ? void 0 : haveModuleAttr.id,
|
|
426
442
|
propCategory: 'eventProp',
|
|
@@ -441,17 +457,17 @@ var RightDetail = function RightDetail(props) {
|
|
|
441
457
|
attrName: havePageAttr === null || havePageAttr === void 0 ? void 0 : havePageAttr.label
|
|
442
458
|
}]; // console.log(objConditions, 'kkk');
|
|
443
459
|
setInterviewLoading(true);
|
|
444
|
-
_context4.next =
|
|
460
|
+
_context4.next = 15;
|
|
445
461
|
return dayValues(objConditions, moment().subtract(1, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD'), [1, 0]);
|
|
446
|
-
case
|
|
462
|
+
case 15:
|
|
447
463
|
b1 = _context4.sent;
|
|
448
|
-
_context4.next =
|
|
464
|
+
_context4.next = 18;
|
|
449
465
|
return dayValues(objConditions, moment().subtract(7, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD'), [7, 0]);
|
|
450
|
-
case
|
|
466
|
+
case 18:
|
|
451
467
|
b7 = _context4.sent;
|
|
452
|
-
_context4.next =
|
|
468
|
+
_context4.next = 21;
|
|
453
469
|
return dayValues(objConditions, moment().subtract(30, 'days').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD'), [30, 0]);
|
|
454
|
-
case
|
|
470
|
+
case 21:
|
|
455
471
|
b30 = _context4.sent;
|
|
456
472
|
setInterviewLoading(false);
|
|
457
473
|
setData([{
|
|
@@ -461,7 +477,7 @@ var RightDetail = function RightDetail(props) {
|
|
|
461
477
|
nearlyDays: b7,
|
|
462
478
|
nearlyDays1: b30
|
|
463
479
|
}]);
|
|
464
|
-
case
|
|
480
|
+
case 24:
|
|
465
481
|
case "end":
|
|
466
482
|
return _context4.stop();
|
|
467
483
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-dm",
|
|
3
|
-
"version": "1.0.57-zhongyuan.
|
|
3
|
+
"version": "1.0.57-zhongyuan.69",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"typings": "es/index.d.ts",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@types/lodash": "^4.14.182",
|
|
47
47
|
"@umijs/fabric": "^2.8.1",
|
|
48
48
|
"@umijs/test": "^3.0.5",
|
|
49
|
-
"@zgfe/business-lib": "1.2.
|
|
49
|
+
"@zgfe/business-lib": "1.2.71-hxd.39",
|
|
50
50
|
"antd": "4.24.10",
|
|
51
51
|
"dumi": "^1.1.0",
|
|
52
52
|
"father-build": "^1.17.2",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"umi-request": "^1.4.0",
|
|
58
58
|
"yorkie": "^2.0.0"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "cf0b1932bc6f8258b52b79ade3fe3eb8170313ed",
|
|
61
61
|
"gitHooks": {
|
|
62
62
|
"pre-commit": "lint-staged"
|
|
63
63
|
}
|