@zgfe/modules-settings 2.0.0-zhongyuan.37 → 2.0.0-zhongyuan.39

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.
@@ -1087,11 +1087,11 @@ var CreateDemand = function CreateDemand(props) {
1087
1087
  className: "button",
1088
1088
  onClick: function onClick() {
1089
1089
  props.setIsShowSelectList && props.setIsShowSelectList(function (val) {
1090
- setPointEventInfo([].concat(_toConsumableArray(pointEventInfo || []), _toConsumableArray(val.map(function (val) {
1090
+ setPointEventInfo(_toConsumableArray(val.map(function (val) {
1091
1091
  return _objectSpread(_objectSpread({}, val), {}, {
1092
1092
  status: 0
1093
1093
  });
1094
- }))));
1094
+ })));
1095
1095
  onCreate('save', {
1096
1096
  pointEventIds: val.map(function (res) {
1097
1097
  return res.id;
@@ -80,7 +80,7 @@ var PageInfo = function PageInfo(props) {
80
80
  isChange = _useState18[0],
81
81
  setIsChange = _useState18[1];
82
82
  // props.isSelect
83
- var _useState19 = useState(props.isSelect),
83
+ var _useState19 = useState(false),
84
84
  _useState20 = _slicedToArray(_useState19, 1),
85
85
  isSelect = _useState20[0];
86
86
  var _useState21 = useState(),
@@ -205,38 +205,38 @@ var PageInfo = function PageInfo(props) {
205
205
  uuid: res.data.detail.uuid,
206
206
  zosFileKey: res.data.detail.zosFileKey
207
207
  } : undefined);
208
- if (!isSelect) {
209
- // getPointTree()
210
- setEventAttrList(res.data.eventInfos ? res.data.eventInfos.map(function (item, index) {
211
- return {
212
- id: item.id,
213
- eventId: item.eventId,
214
- eventName: item.eventName,
215
- describe: item.pointDescribe,
216
- pointSelect: item.pointSelect,
217
- pv: item.pv,
218
- imgPath: item.zosImgUrl ? getImgUrl(item.zosImgUrl, props.pageData.id) : '',
219
- key: uuid(),
220
- index: index,
221
- approvalStatus: item.approvalStatus,
222
- operationType: item.operationType,
223
- del: item.del || 1
224
- };
225
- }) : []);
226
- //计算出当前上线和下线总合数量
227
- setNavList(navList.map(function (nav) {
228
- var sum = 0;
229
- res.data.eventInfos && res.data.eventInfos.map(function (item, index) {
230
- if (nav.value == item.del) {
231
- sum += 1;
232
- }
233
- });
234
- return _objectSpread(_objectSpread({}, nav), {}, {
235
- sum: sum
236
- });
237
- }));
238
- }
208
+ // if (!isSelect) {
209
+ // getPointTree()
210
+ setEventAttrList(res.data.eventInfos ? res.data.eventInfos.map(function (item, index) {
211
+ return {
212
+ id: item.id,
213
+ eventId: item.eventId,
214
+ eventName: item.eventName,
215
+ describe: item.pointDescribe,
216
+ pointSelect: item.pointSelect,
217
+ pv: item.pv,
218
+ imgPath: item.zosImgUrl ? getImgUrl(item.zosImgUrl, props.pageData.id) : '',
219
+ key: uuid(),
220
+ index: index,
221
+ approvalStatus: item.approvalStatus,
222
+ operationType: item.operationType,
223
+ del: item.del || 0
224
+ };
225
+ }) : []);
226
+ //计算出当前上线和下线总合数量
227
+ setNavList(navList.map(function (nav) {
228
+ var sum = 0;
229
+ res.data.eventInfos && res.data.eventInfos.map(function (item, index) {
230
+ if (nav.value == item.del) {
231
+ sum += 1;
232
+ }
233
+ });
234
+ return _objectSpread(_objectSpread({}, nav), {}, {
235
+ sum: sum
236
+ });
237
+ }));
239
238
  }
239
+ // }
240
240
  }).catch(function (err) {
241
241
  console.log(err);
242
242
  });
@@ -623,49 +623,16 @@ var PageInfo = function PageInfo(props) {
623
623
  size: 16
624
624
  }), "\u5708\u9009")));
625
625
  }
626
- },
627
- // {
628
- // title: '访问量',
629
- // dataIndex: 'pv',
630
- // key: 'pv',
631
- // width: 92,
632
- // render: (pv) => {
633
- // return <div className={`${classPrefix}-content-select`}>{pv || pv === 0 ? pv : '-'}</div>;
634
- // },
635
- // },
636
- {
637
- title: '数据量',
638
- children: [{
639
- title: '昨日',
640
- dataIndex: 'time1',
641
- key: 'time1',
642
- width: 80,
643
- render: function render(value) {
644
- return /*#__PURE__*/React.createElement("div", {
645
- className: "".concat(classPrefix, "-content-select")
646
- }, value || value === 0 ? value : '-');
647
- }
648
- }, {
649
- title: '近7天',
650
- dataIndex: 'time1',
651
- key: 'time1',
652
- width: 80,
653
- render: function render(value) {
654
- return /*#__PURE__*/React.createElement("div", {
655
- className: "".concat(classPrefix, "-content-select")
656
- }, value || value === 0 ? value : '-');
657
- }
658
- }, {
659
- title: '近30天',
660
- dataIndex: 'time1',
661
- key: 'time1',
662
- width: 80,
663
- render: function render(value) {
664
- return /*#__PURE__*/React.createElement("div", {
665
- className: "".concat(classPrefix, "-content-select")
666
- }, value || value === 0 ? value : '-');
667
- }
668
- }]
626
+ }, {
627
+ title: '访问量',
628
+ dataIndex: 'pv',
629
+ key: 'pv',
630
+ width: 92,
631
+ render: function render(pv) {
632
+ return /*#__PURE__*/React.createElement("div", {
633
+ className: "".concat(classPrefix, "-content-select")
634
+ }, pv || pv === 0 ? pv : '-');
635
+ }
669
636
  }], _toConsumableArray(isEdit || isSelect ? [{
670
637
  title: '操作',
671
638
  dataIndex: 'set',
@@ -1088,6 +1055,12 @@ var PageInfo = function PageInfo(props) {
1088
1055
  rowKey: 'uuid',
1089
1056
  dataSource: (eventAttrList || []).filter(function (item) {
1090
1057
  return new RegExp(_.escapeRegExp(eventKey), 'i').test(item.eventName || '');
1058
+ }).filter(function (res) {
1059
+ if (isEdit || isSelect) {
1060
+ return true;
1061
+ } else {
1062
+ return res.del == navIndex;
1063
+ }
1091
1064
  }),
1092
1065
  scroll: {
1093
1066
  y: window.innerHeight - 380
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-settings",
3
- "version": "2.0.0-zhongyuan.37",
3
+ "version": "2.0.0-zhongyuan.39",
4
4
  "private": false,
5
5
  "module": "es/index.js",
6
6
  "typings": "es/index.d.ts",
@@ -67,7 +67,7 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "a667f46efb6a9e7877b79b29b3d15cc5eb53a53e",
70
+ "gitHead": "e488c012eedb30482fbc67ed376e8f425b28231c",
71
71
  "gitHooks": {
72
72
  "pre-commit": "lint-staged"
73
73
  }