@zgfe/modules-settings 2.0.0-zhongyuan.34 → 2.0.0-zhongyuan.36

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.
@@ -150,6 +150,8 @@ declare let apis: {
150
150
  uploadTree: string;
151
151
  downloadHelpFile: string;
152
152
  getAppAutoEvent: string;
153
+ getEventLog: string;
154
+ addEvent: string;
153
155
  getMenuCode: string;
154
156
  addMenuCode: string;
155
157
  updateMenuCode: string;
@@ -210,6 +210,10 @@ var apis = {
210
210
  downloadHelpFile: '/zg/web/v2/approve/point/template/recommend-scheme',
211
211
  // 查询应用埋点控制开关
212
212
  getAppAutoEvent: '/zg/web/v2/approve/getAppAutoEvent',
213
+ //埋点日志
214
+ getEventLog: '/zg/web/v2/approve/point/event/log',
215
+ // 事件新增
216
+ addEvent: '/zg/web/v2/event/addEvent',
213
217
  // menuCode
214
218
  getMenuCode: '/zg/web/v2/systemSettings/query-menu-list',
215
219
  addMenuCode: '/zg/web/v2/systemSettings/save-menu',
@@ -1,5 +1,5 @@
1
1
  import { ColumnsType } from 'antd/es/table/interface';
2
- declare const columnsEvent: (gotoPage?: Function, isControl?: boolean) => ColumnsType<{
2
+ declare const columnsEvent: (gotoPage?: Function, isControl?: boolean, getPointMap?: Function) => ColumnsType<{
3
3
  pageId: number;
4
4
  }>;
5
5
  declare const demandTabList: ({
@@ -8,7 +8,7 @@ import { IconFont } from '@zgfe/business-lib';
8
8
  import { Image } from 'antd';
9
9
  import React from 'react';
10
10
  var classPrefix = 'system-setting-create-demand';
11
- var columnsEvent = function columnsEvent(gotoPage, isControl) {
11
+ var columnsEvent = function columnsEvent(gotoPage, isControl, getPointMap) {
12
12
  return [{
13
13
  title: '页面名称',
14
14
  dataIndex: 'pageName',
@@ -51,10 +51,10 @@ var columnsEvent = function columnsEvent(gotoPage, isControl) {
51
51
  dataIndex: 'eventName',
52
52
  width: 153,
53
53
  ellipsis: true,
54
- render: function render(eventName) {
54
+ render: function render(eventName, data) {
55
55
  return /*#__PURE__*/React.createElement("a", {
56
56
  onClick: function onClick() {
57
- return gotoPage && gotoPage('event', eventName);
57
+ return getPointMap && getPointMap(data);
58
58
  }
59
59
  }, eventName);
60
60
  }
@@ -35,6 +35,7 @@ import BackConfirm from './backConfirm';
35
35
  import constants from '../../utils/constants';
36
36
  import { jsPDF } from 'jspdf';
37
37
  import domtoimage from 'dom-to-image';
38
+ import CreateMetaDrawer from '../pointMap/createMetaDrawer';
38
39
  var getImgUrl = function getImgUrl(src, pageId) {
39
40
  return constants.regExp.url.test(src) ? src : "".concat(window.location.origin, "/web/img/report/").concat(pageId, "/").concat(src);
40
41
  // return constants.regExp.url.test(src)
@@ -111,7 +112,7 @@ var CreateDemand = function CreateDemand(props) {
111
112
  _useState30 = _slicedToArray(_useState29, 2),
112
113
  demandData = _useState30[0],
113
114
  setDemandData = _useState30[1];
114
- var _useState31 = useState(0),
115
+ var _useState31 = useState(2),
115
116
  _useState32 = _slicedToArray(_useState31, 2),
116
117
  demandStatus = _useState32[0],
117
118
  setDemandStatus = _useState32[1];
@@ -176,6 +177,15 @@ var CreateDemand = function CreateDemand(props) {
176
177
  _useState60 = _slicedToArray(_useState59, 2),
177
178
  tabIndex = _useState60[0],
178
179
  setTabIndex = _useState60[1];
180
+ //查看埋点内容
181
+ var _useState61 = useState(false),
182
+ _useState62 = _slicedToArray(_useState61, 2),
183
+ createMetaShow = _useState62[0],
184
+ setCreateMetaShow = _useState62[1];
185
+ var _useState63 = useState({}),
186
+ _useState64 = _slicedToArray(_useState63, 2),
187
+ metaData = _useState64[0],
188
+ setMetaData = _useState64[1];
179
189
  useEffect(function () {
180
190
  if (props.demandId) {
181
191
  getDemand();
@@ -183,10 +193,10 @@ var CreateDemand = function CreateDemand(props) {
183
193
  getNode();
184
194
  }
185
195
  }, [props.demandId]);
186
- var _useState61 = useState(false),
187
- _useState62 = _slicedToArray(_useState61, 2),
188
- isControl = _useState62[0],
189
- setIsControl = _useState62[1];
196
+ var _useState65 = useState(false),
197
+ _useState66 = _slicedToArray(_useState65, 2),
198
+ isControl = _useState66[0],
199
+ setIsControl = _useState66[1];
190
200
  var getAppAutoEvent = function getAppAutoEvent() {
191
201
  request(apis.getAppAutoEvent, {
192
202
  method: 'post',
@@ -350,7 +360,8 @@ var CreateDemand = function CreateDemand(props) {
350
360
  }),
351
361
  pointEventStatus: type != 'flow' ? pointEventInfo === null || pointEventInfo === void 0 ? void 0 : pointEventInfo.map(function (item) {
352
362
  return item.status;
353
- }) : []
363
+ }) : [],
364
+ eventList: pointEventInfo
354
365
  }, data)
355
366
  }).then(function (res) {
356
367
  if ((res === null || res === void 0 ? void 0 : res.code) === '100000') {
@@ -673,7 +684,7 @@ var CreateDemand = function CreateDemand(props) {
673
684
  };
674
685
  // 新的埋点表格列表
675
686
  var newColumns = function newColumns() {
676
- var columns = [].concat(_toConsumableArray(columnsEvent(gotoPage, isControl)), [{
687
+ var columns = [].concat(_toConsumableArray(columnsEvent(gotoPage, isControl, getPointMap)), [{
677
688
  title: '状态',
678
689
  width: 120,
679
690
  dataIndex: 'status',
@@ -887,6 +898,11 @@ var CreateDemand = function CreateDemand(props) {
887
898
  })[0];
888
899
  return data[key];
889
900
  };
901
+ //查看埋点详情
902
+ var getPointMap = function getPointMap(data) {
903
+ setMetaData(data);
904
+ setCreateMetaShow(true);
905
+ };
890
906
  return /*#__PURE__*/React.createElement("div", {
891
907
  className: classPrefix
892
908
  }, /*#__PURE__*/React.createElement("div", {
@@ -1077,18 +1093,20 @@ var CreateDemand = function CreateDemand(props) {
1077
1093
  className: "button",
1078
1094
  onClick: function onClick() {
1079
1095
  props.setIsShowSelectList && props.setIsShowSelectList(function (val) {
1080
- setPointEventInfo(val.map(function (val) {
1096
+ console.log(val, 'sbum');
1097
+ setPointEventInfo([].concat(_toConsumableArray(pointEventInfo || []), _toConsumableArray(val.map(function (val) {
1081
1098
  return _objectSpread(_objectSpread({}, val), {}, {
1082
1099
  status: 0
1083
1100
  });
1084
- }));
1101
+ }))));
1085
1102
  onCreate('save', {
1086
1103
  pointEventIds: val.map(function (res) {
1087
1104
  return res.id;
1088
1105
  }),
1089
1106
  pointEventStatus: val.map(function (res) {
1090
1107
  return 0;
1091
- })
1108
+ }),
1109
+ eventList: val
1092
1110
  });
1093
1111
  }, pointEventInfo);
1094
1112
  }
@@ -1114,7 +1132,8 @@ var CreateDemand = function CreateDemand(props) {
1114
1132
  }),
1115
1133
  pointEventStatus: list.map(function (res) {
1116
1134
  return res.status;
1117
- })
1135
+ }),
1136
+ eventList: list
1118
1137
  });
1119
1138
  }
1120
1139
  }, "\u79FB\u9664")), isRead ? null : (demandStatus == 3 || demandStatus == 4) && (/*#__PURE__*/React.createElement(Button, {
@@ -1350,6 +1369,14 @@ var CreateDemand = function CreateDemand(props) {
1350
1369
  },
1351
1370
  showTime: true,
1352
1371
  disabled: isRead
1353
- })));
1372
+ })), /*#__PURE__*/React.createElement(CreateMetaDrawer, {
1373
+ isShow: createMetaShow,
1374
+ data: metaData,
1375
+ isEdit: false,
1376
+ // selectTreeName={props.selectTreeName}
1377
+ onClose: function onClose() {
1378
+ return setCreateMetaShow(false);
1379
+ }
1380
+ }));
1354
1381
  };
1355
1382
  export default CreateDemand;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { CreateMetaDrawerProps } from './types';
3
+ declare const CreateMeta: React.FC<CreateMetaDrawerProps>;
4
+ export default CreateMeta;