component-shipinlv 2.2.5 → 2.2.6

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.
Files changed (28) hide show
  1. package/dist/ActiveAccountMode/task/index.js +38 -24
  2. package/dist/UI/Money/index.css.js +1 -1
  3. package/dist/UI/Money/index.js +18 -14
  4. package/dist/UI/PageContentWarp.js +2 -2
  5. package/dist/UI/PageContentWarp.less +9 -1
  6. package/dist/VideoPublish/account-manage/home.js +1 -0
  7. package/dist/VideoPublish/account-manage/list.js +3 -2
  8. package/dist/VideoPublish/account-manage/setting/index.js +42 -3
  9. package/dist/VideoPublish/video-publish-statistic/account-trend/index.d.ts +8 -0
  10. package/dist/VideoPublish/video-publish-statistic/account-trend/index.js +173 -0
  11. package/dist/VideoPublish/video-publish-statistic/account-trend/index.less +3 -0
  12. package/dist/VideoPublish/video-publish-statistic/account-trend/kind-list.d.ts +7 -0
  13. package/dist/VideoPublish/video-publish-statistic/account-trend/kind-list.js +22 -0
  14. package/dist/VideoPublish/video-publish-statistic/account-trend/query.d.ts +9 -0
  15. package/dist/VideoPublish/video-publish-statistic/account-trend/query.js +54 -0
  16. package/dist/VideoPublish/video-publish-statistic/account-trend/query.less +3 -0
  17. package/dist/VideoPublish/video-publish-statistic/kind.d.ts +16 -0
  18. package/dist/VideoPublish/video-publish-statistic/kind.js +57 -0
  19. package/dist/VideoPublish/video-publish-statistic/operation/list.js +41 -3
  20. package/dist/lib/Tool.d.ts +1 -1
  21. package/dist/lib/notification.js +1 -0
  22. package/dist/lib/save-path.less +2 -2
  23. package/dist/service/api/VideoPublishStatisticOperationController.d.ts +5 -0
  24. package/dist/service/api/VideoPublishStatisticOperationController.js +23 -0
  25. package/dist/types/VideoPublishStatisticOperation.d.ts +7 -0
  26. package/dist/types/VideoPublishVideoAccount.d.ts +1 -0
  27. package/dist/typings/VideoPublishAccountManageSetting.d.ts +2 -0
  28. package/package.json +3 -2
@@ -121,7 +121,7 @@ var ActiveAccountModeTask = /*#__PURE__*/function () {
121
121
  dayIndex = 0;
122
122
  case 22:
123
123
  if (!(dayIndex < setting.publishMaxDay)) {
124
- _context2.next = 69;
124
+ _context2.next = 75;
125
125
  break;
126
126
  }
127
127
  console.log('publishMaxDay:', dayIndex);
@@ -144,7 +144,7 @@ var ActiveAccountModeTask = /*#__PURE__*/function () {
144
144
  _context2.next = 34;
145
145
  return sleep(20e3);
146
146
  case 34:
147
- return _context2.abrupt("continue", 66);
147
+ return _context2.abrupt("continue", 72);
148
148
  case 35:
149
149
  // 把发布过的,做一个字段
150
150
  this.planDict = {};
@@ -169,62 +169,76 @@ var ActiveAccountModeTask = /*#__PURE__*/function () {
169
169
  _iterator2.s();
170
170
  case 41:
171
171
  if ((_step2 = _iterator2.n()).done) {
172
- _context2.next = 58;
172
+ _context2.next = 64;
173
173
  break;
174
174
  }
175
175
  accountItem = _step2.value;
176
+ if (accountItem.isLoginValid) {
177
+ _context2.next = 46;
178
+ break;
179
+ }
180
+ console.log('账号已掉线:', accountItem);
181
+ return _context2.abrupt("continue", 62);
182
+ case 46:
183
+ if (!accountItem.isBan) {
184
+ _context2.next = 49;
185
+ break;
186
+ }
187
+ console.log('账号已封:', accountItem);
188
+ return _context2.abrupt("continue", 62);
189
+ case 49:
176
190
  count = ((_this$planDict$accoun = this.planDict[accountItem.id]) === null || _this$planDict$accoun === void 0 ? void 0 : _this$planDict$accoun.length) || 0; // 需要指定路径
177
191
  if (accountItem.videoFromFolder) {
178
- _context2.next = 47;
192
+ _context2.next = 53;
179
193
  break;
180
194
  }
181
195
  console.log('no videoFromFolder :', accountItem.id, accountItem.nickname);
182
- return _context2.abrupt("continue", 56);
183
- case 47:
196
+ return _context2.abrupt("continue", 62);
197
+ case 53:
184
198
  // 删除 此账户下面,所有已经发布的视频
185
199
  this.checkDelFile(accountItem.id, accountItem.videoFromFolder);
186
200
  if (!(count >= setting.dayPublishMaxAmount)) {
187
- _context2.next = 51;
201
+ _context2.next = 57;
188
202
  break;
189
203
  }
190
204
  console.log('count 2:', count, setting.dayPublishMaxAmount);
191
- return _context2.abrupt("continue", 56);
192
- case 51:
205
+ return _context2.abrupt("continue", 62);
206
+ case 57:
193
207
  console.log('makePublishTask in:', accountItem.id, setting.dayPublishMaxAmount - count, dayIndex);
194
208
 
195
209
  // 生成任务
196
- _context2.next = 54;
210
+ _context2.next = 60;
197
211
  return this.makePublishTask(accountItem.id, setting.dayPublishMaxAmount - count, dayIndex).catch(function (err) {
198
212
  console.log('makePublishTask err:', err);
199
213
  });
200
- case 54:
201
- _context2.next = 56;
214
+ case 60:
215
+ _context2.next = 62;
202
216
  return sleep(3e3);
203
- case 56:
217
+ case 62:
204
218
  _context2.next = 41;
205
219
  break;
206
- case 58:
207
- _context2.next = 63;
220
+ case 64:
221
+ _context2.next = 69;
208
222
  break;
209
- case 60:
210
- _context2.prev = 60;
223
+ case 66:
224
+ _context2.prev = 66;
211
225
  _context2.t0 = _context2["catch"](39);
212
226
  _iterator2.e(_context2.t0);
213
- case 63:
214
- _context2.prev = 63;
227
+ case 69:
228
+ _context2.prev = 69;
215
229
  _iterator2.f();
216
- return _context2.finish(63);
217
- case 66:
230
+ return _context2.finish(69);
231
+ case 72:
218
232
  dayIndex++;
219
233
  _context2.next = 22;
220
234
  break;
221
- case 69:
235
+ case 75:
222
236
  this.onLoop();
223
- case 70:
237
+ case 76:
224
238
  case "end":
225
239
  return _context2.stop();
226
240
  }
227
- }, _callee2, this, [[39, 60, 63, 66]]);
241
+ }, _callee2, this, [[39, 66, 69, 72]]);
228
242
  }));
229
243
  function loop() {
230
244
  return _loop.apply(this, arguments);
@@ -2,5 +2,5 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLit
2
2
  var _templateObject;
3
3
  import styled from 'styled-components';
4
4
  export default {
5
- money: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n .yen{\n font-size: smaller;\n opacity: 0.8;\n font-weight: 300;\n }\n .value{\n font-weight: bold;\n padding-left: 2px;\n padding-right: 1px;\n &.zero{\n font-weight: 300;\n color: #AAA;\n }\n }\n "])))
5
+ money: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n .yen{\n font-size: smaller;\n opacity: 0.8;\n font-weight: 300;\n }\n .value{\n //font-weight: bold;\n padding-left: 2px;\n padding-right: 1px;\n &.zero{\n font-weight: 300;\n color: #AAA;\n }\n }\n "])))
6
6
  };
@@ -1,6 +1,7 @@
1
1
  import styles from "./index.css";
2
2
  import React from "react";
3
3
  import moneySimple from "../../lib/moneySimple";
4
+ import { Tooltip } from "antd";
4
5
  import { Fragment as _Fragment } from "react/jsx-runtime";
5
6
  import { jsx as _jsx } from "react/jsx-runtime";
6
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -17,20 +18,23 @@ var Money = function Money(_ref) {
17
18
  color = _ref.color,
18
19
  _ref$disabledMoneySim = _ref.disabledMoneySimple,
19
20
  disabledMoneySimple = _ref$disabledMoneySim === void 0 ? false : _ref$disabledMoneySim;
20
- return /*#__PURE__*/_jsxs(styles.money, {
21
- style: {
22
- color: color
23
- },
24
- children: [/*#__PURE__*/_jsx("span", {
25
- className: "yen",
26
- children: pre
27
- }), /*#__PURE__*/_jsx("span", {
28
- className: "value ".concat(value === 0 ? 'zero' : '', " "),
29
- children: typeof value === 'number' ? disabledMoneySimple ? parseFloat(value.toFixed(precision)) : moneySimple(value, false, precision) : ''
30
- }), /*#__PURE__*/_jsx("span", {
31
- className: "yen",
32
- children: end
33
- })]
21
+ return /*#__PURE__*/_jsx(Tooltip, {
22
+ title: value,
23
+ children: /*#__PURE__*/_jsxs(styles.money, {
24
+ style: {
25
+ color: color
26
+ },
27
+ children: [/*#__PURE__*/_jsx("span", {
28
+ className: "yen",
29
+ children: pre
30
+ }), /*#__PURE__*/_jsx("span", {
31
+ className: "value ".concat(value === 0 ? 'zero' : '', " "),
32
+ children: typeof value === 'number' ? disabledMoneySimple ? parseFloat(value.toFixed(precision)) : moneySimple(value, false, precision) : ''
33
+ }), /*#__PURE__*/_jsx("span", {
34
+ className: "yen",
35
+ children: end
36
+ })]
37
+ })
34
38
  });
35
39
  };
36
40
  export default Money;
@@ -37,10 +37,10 @@ var PageContentWarp = function PageContentWarp(_ref) {
37
37
  },
38
38
  children: [/*#__PURE__*/_jsxs("div", {
39
39
  className: "pageTitle ".concat(disabledTitleBorder ? 'noTitleBorder' : '', " ").concat(!title && 'noTitle', " ").concat(!title && !extInfo ? 'noTitles' : ''),
40
- children: [title && /*#__PURE__*/_jsx("span", {
40
+ children: [title && /*#__PURE__*/_jsx("div", {
41
41
  className: "title",
42
42
  children: title
43
- }), /*#__PURE__*/_jsx("span", {
43
+ }), /*#__PURE__*/_jsx("div", {
44
44
  className: "subtitle",
45
45
  children: subtitle
46
46
  }), /*#__PURE__*/_jsx("div", {
@@ -17,6 +17,11 @@
17
17
  border-bottom: 1px solid #eee;
18
18
  line-height: 1.2em;
19
19
  margin: 0 0 10px 0;
20
+ display: flex;
21
+ flex-direction: row;
22
+ .ant-form-item{
23
+ margin-bottom: 0 !important;
24
+ }
20
25
  &.noTitles {
21
26
  display: none;
22
27
  }
@@ -38,10 +43,13 @@
38
43
  }
39
44
  .extInfo {
40
45
  position: absolute;
41
- bottom: 6px;
46
+ bottom: 8px;
42
47
  right: 0;
43
48
  font-size: 14px;
44
49
  line-height: 38px;
50
+ .ant-form-item{
51
+ margin-bottom: 0 !important;
52
+ }
45
53
  }
46
54
  }
47
55
 
@@ -18,6 +18,7 @@ var VideoPublishAccountManageHomePage = function VideoPublishAccountManageHomePa
18
18
  onMenu = _ref.onMenu,
19
19
  canPublish = _ref.canPublish;
20
20
  var _useState = useState({
21
+ isBan: false,
21
22
  videoFromFolder: "",
22
23
  id: 0,
23
24
  userId: 0,
@@ -124,6 +124,7 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
124
124
  platform: 'd',
125
125
  groupId: 0,
126
126
  groupName: '',
127
+ isBan: false,
127
128
  uniqueId: '',
128
129
  accountId: '',
129
130
  avatar: '',
@@ -193,11 +194,11 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
193
194
  onMenu('setting');
194
195
  return _context.abrupt("return");
195
196
  case 10:
196
- if (!(listData.length >= 100)) {
197
+ if (!(listData.length >= 500)) {
197
198
  _context.next = 13;
198
199
  break;
199
200
  }
200
- notification.notificationError('这电脑绑定到上限了', '每台电脑最多绑定 100个账号');
201
+ notification.notificationError('这电脑绑定到上限了', '每台电脑最多绑定 500 个账号');
201
202
  return _context.abrupt("return");
202
203
  case 13:
203
204
  toast('正在启动浏览器,请扫码登录', 12);
@@ -4,13 +4,14 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import _objectDestructuringEmpty from "@babel/runtime/helpers/esm/objectDestructuringEmpty";
6
6
  import React, { useEffect, useState } from 'react';
7
- import { ConfigProvider, Divider, Form, InputNumber, Modal, Space, Switch, Tag, Tooltip } from 'antd';
7
+ import { ConfigProvider, Divider, Form, InputNumber, Modal, Space, Switch, Tag, TimePicker, Tooltip } from 'antd';
8
8
  import "./index.less";
9
9
  import LayoutContent from "../../../UI/LayoutContent";
10
10
  import AccountManageSettingConfig from "../../../lib/accountManageSettingConfig";
11
11
  import FileSelect from "../../../component/file-select";
12
12
  import Tool from "../../../lib/Tool";
13
13
  import FolderSelect from "../../../component/folder-select";
14
+ import dayjs from "dayjs";
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
16
17
  var AccountManageSettingPage = function AccountManageSettingPage(_ref) {
@@ -56,7 +57,10 @@ var AccountManageSettingPage = function AccountManageSettingPage(_ref) {
56
57
  span: 5
57
58
  },
58
59
  autoComplete: "off",
59
- initialValues: _objectSpread({}, formData),
60
+ initialValues: _objectSpread(_objectSpread({}, formData), {}, {
61
+ // defaultValue={}
62
+ queryDataTime: dayjs(formData.queryDataTime || '16:00', 'HH:mm')
63
+ }),
60
64
  children: [/*#__PURE__*/_jsx(ConfigProvider, {
61
65
  theme: {
62
66
  token: {
@@ -154,7 +158,42 @@ var AccountManageSettingPage = function AccountManageSettingPage(_ref) {
154
158
  _onFinish(formData);
155
159
  }
156
160
  })
157
- }), /*#__PURE__*/_jsx(Divider, {}), /*#__PURE__*/_jsx(Form.Item, {
161
+ }), /*#__PURE__*/_jsx(Divider, {
162
+ orientation: "left",
163
+ children: "\u67E5\u8BE2\u6570\u636E"
164
+ }), /*#__PURE__*/_jsx(Form.Item, {
165
+ label: "\u67E5\u8BE2\u57FA\u7840\u6570\u636E",
166
+ children: /*#__PURE__*/_jsxs(Space, {
167
+ size: 60,
168
+ children: [/*#__PURE__*/_jsx(Form.Item, {
169
+ name: "autoQueryData",
170
+ children: /*#__PURE__*/_jsx(Switch, {
171
+ disabled: true,
172
+ checkedChildren: "\u7A7A\u95F2\u4E3B\u52A8\u67E5\u8BE2\u6570\u636E",
173
+ unCheckedChildren: "\u4EC5\u53D1\u5E03\u65F6\u67E5\u8BE2\u6570\u636E",
174
+ onChange: function onChange(autoQueryData) {
175
+ formData.autoQueryData = autoQueryData;
176
+ setFormData(_objectSpread({}, formData));
177
+ _onFinish(formData);
178
+ }
179
+ })
180
+ }), /*#__PURE__*/_jsx(Form.Item, {
181
+ name: "queryDataTime",
182
+ label: "\u6BCF\u5929",
183
+ style: {
184
+ display: formData.autoQueryData ? '' : 'none'
185
+ },
186
+ children: /*#__PURE__*/_jsx(TimePicker, {
187
+ format: "HH:mm",
188
+ showNow: false,
189
+ minuteStep: 10
190
+ })
191
+ })]
192
+ })
193
+ }), /*#__PURE__*/_jsx(Divider, {
194
+ orientation: "left",
195
+ children: "\u4EFB\u52A1\u76F8\u5173"
196
+ }), /*#__PURE__*/_jsx(Form.Item, {
158
197
  label: "\u4EFB\u52A1\u901A\u77E5\u7AEF\u53E3",
159
198
  children: /*#__PURE__*/_jsxs(Space, {
160
199
  size: 20,
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface Props {
4
+ accountId: number;
5
+ env?: Global.Env;
6
+ }
7
+ declare const VideoPublishStatisticAccountTrend: React.FC<Props>;
8
+ export default VideoPublishStatisticAccountTrend;
@@ -0,0 +1,173 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
3
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
4
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
5
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
6
+ import React, { useState } from 'react';
7
+ import * as VideoPublishStatisticOperationController from "../../../service/api/VideoPublishStatisticOperationController";
8
+ import { useRequest } from "@umijs/hooks";
9
+ import dayjs from "dayjs";
10
+ import "./index.less";
11
+ import PageContentWarp from "../../../UI/PageContentWarp";
12
+ import VideoPublishStatisticAccountTrendQuery from "./query";
13
+ import { Line } from '@ant-design/plots';
14
+ import VideoPublishStatisticOperationKindListPage from "./kind-list";
15
+ import sleep from "../../../lib/sleep";
16
+ import { VideoPublishStatisticOperationKindDict } from "../kind";
17
+ import { Empty } from "antd";
18
+ import { jsx as _jsx } from "react/jsx-runtime";
19
+ // const ChartBoxId = 'video-publish-statistic-account-trend';
20
+ var VideoPublishStatisticAccountTrend = function VideoPublishStatisticAccountTrend(_ref) {
21
+ var accountId = _ref.accountId,
22
+ env = _ref.env;
23
+ var _useState = useState({
24
+ time: Date.now()
25
+ }),
26
+ _useState2 = _slicedToArray(_useState, 2),
27
+ query = _useState2[0],
28
+ setQuery = _useState2[1];
29
+ var _useState3 = useState('play'),
30
+ _useState4 = _slicedToArray(_useState3, 2),
31
+ kind = _useState4[0],
32
+ setKind = _useState4[1];
33
+ var _useState5 = useState([]),
34
+ _useState6 = _slicedToArray(_useState5, 2),
35
+ listData = _useState6[0],
36
+ setListData = _useState6[1];
37
+ var _useState7 = useState([]),
38
+ _useState8 = _slicedToArray(_useState7, 2),
39
+ dataList = _useState8[0],
40
+ setDataList = _useState8[1];
41
+ var _useState9 = useState(false),
42
+ _useState10 = _slicedToArray(_useState9, 2),
43
+ isShowChart = _useState10[0],
44
+ setIsShowChart = _useState10[1];
45
+ var config = {
46
+ xField: 'day',
47
+ yField: 'value',
48
+ colorField: 'kindName',
49
+ point: {
50
+ shapeField: 'circle',
51
+ sizeField: 4
52
+ },
53
+ interaction: {
54
+ tooltip: {
55
+ marker: false
56
+ }
57
+ },
58
+ style: {
59
+ lineWidth: 2
60
+ },
61
+ // label: {
62
+ // // 可手动配置 label 数据标签位置
63
+ // // position: 'middle',
64
+ // // 'top', 'bottom', 'middle',
65
+ // // 配置样式
66
+ // style: {
67
+ // fill: '#FFFFFF',
68
+ // opacity: 0.6,
69
+ // },
70
+ // },
71
+ xAxis: {
72
+ label: {
73
+ autoHide: false,
74
+ autoRotate: false
75
+ }
76
+ },
77
+ // yAxis: {
78
+ // min: 1,
79
+ // },
80
+ meta: {
81
+ day: {
82
+ alias: '日期',
83
+ min: 1
84
+ },
85
+ value: {
86
+ alias: '值'
87
+ // min: 0,
88
+ }
89
+ }
90
+ };
91
+
92
+ var _useRequest = useRequest(function () {
93
+ var postQuery = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : query;
94
+ return VideoPublishStatisticOperationController.accountTrend({
95
+ year: postQuery.time > 100000 ? dayjs(postQuery.time).year() : new Date().getFullYear(),
96
+ month: postQuery.time > 100000 ? parseInt(dayjs(postQuery.time).format('MM')) : 1,
97
+ accountId: accountId
98
+ }, {
99
+ env: env
100
+ });
101
+ }, {
102
+ onSuccess: function () {
103
+ var _onSuccess = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(result) {
104
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
105
+ while (1) switch (_context.prev = _context.next) {
106
+ case 0:
107
+ // 补齐 日期
108
+ result.forEach(function (items, i) {
109
+ items.kindName = VideoPublishStatisticOperationKindDict[items.kind].title || items.kind;
110
+ });
111
+ setListData(_toConsumableArray(result));
112
+ onDataList(result);
113
+ _context.next = 5;
114
+ return sleep(500);
115
+ case 5:
116
+ setIsShowChart(true);
117
+ case 6:
118
+ case "end":
119
+ return _context.stop();
120
+ }
121
+ }, _callee);
122
+ }));
123
+ function onSuccess(_x) {
124
+ return _onSuccess.apply(this, arguments);
125
+ }
126
+ return onSuccess;
127
+ }()
128
+ }),
129
+ run = _useRequest.run,
130
+ loading = _useRequest.loading,
131
+ error = _useRequest.error;
132
+ var onDataList = function onDataList() {
133
+ var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : listData;
134
+ var currentKind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : kind;
135
+ var dataList = [];
136
+ list.forEach(function (item) {
137
+ if (currentKind !== item.kind) {
138
+ return;
139
+ }
140
+ dataList.push(item);
141
+ });
142
+ console.log('dataList:', list, dataList);
143
+ setDataList([].concat(dataList));
144
+ };
145
+ var _onQuery = function onQuery(query) {
146
+ setQuery(_objectSpread({}, query));
147
+ console.log('on query:', query);
148
+ run(query);
149
+ };
150
+ return /*#__PURE__*/_jsx(PageContentWarp, {
151
+ className: "videoPublishStatisticAccountTrend",
152
+ title: /*#__PURE__*/_jsx(VideoPublishStatisticOperationKindListPage, {
153
+ kind: kind,
154
+ onChange: function onChange(kind) {
155
+ setKind(kind);
156
+ onDataList(listData, kind);
157
+ }
158
+ }),
159
+ extInfo: /*#__PURE__*/_jsx(VideoPublishStatisticAccountTrendQuery, {
160
+ loading: loading,
161
+ defaultQuery: query,
162
+ onQuery: function onQuery(query) {
163
+ return _onQuery(query);
164
+ }
165
+ }),
166
+ children: dataList.length == 0 ? /*#__PURE__*/_jsx(Empty, {
167
+ image: Empty.PRESENTED_IMAGE_SIMPLE
168
+ }) : isShowChart && /*#__PURE__*/_jsx(Line, _objectSpread(_objectSpread({}, config), {}, {
169
+ data: dataList
170
+ }))
171
+ });
172
+ };
173
+ export default VideoPublishStatisticAccountTrend;
@@ -0,0 +1,3 @@
1
+ .videoPublishStatisticAccountTrend{
2
+ min-height: 50vh;
3
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface Props {
3
+ kind: VideoPublishStatisticOperation.Kind;
4
+ onChange: (kind: VideoPublishStatisticOperation.Kind) => void;
5
+ }
6
+ declare const VideoPublishStatisticOperationKindListPage: React.FC<Props>;
7
+ export default VideoPublishStatisticOperationKindListPage;
@@ -0,0 +1,22 @@
1
+ import { VideoPublishStatisticOperationKindList } from "../kind";
2
+ import { Radio } from "antd";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ var VideoPublishStatisticOperationKindListPage = function VideoPublishStatisticOperationKindListPage(_ref) {
5
+ var kind = _ref.kind,
6
+ _onChange = _ref.onChange;
7
+ return /*#__PURE__*/_jsx("div", {
8
+ children: /*#__PURE__*/_jsx(Radio.Group, {
9
+ value: kind,
10
+ onChange: function onChange(e) {
11
+ return _onChange(e.target.value);
12
+ },
13
+ children: VideoPublishStatisticOperationKindList.map(function (items) {
14
+ return /*#__PURE__*/_jsx(Radio.Button, {
15
+ value: items.kind,
16
+ children: items.title
17
+ }, items.kind);
18
+ })
19
+ })
20
+ });
21
+ };
22
+ export default VideoPublishStatisticOperationKindListPage;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import './query.less';
3
+ interface Props {
4
+ loading: boolean;
5
+ defaultQuery: VideoPublishStatisticOperation.ListQuery;
6
+ onQuery: (query: VideoPublishStatisticOperation.ListQuery) => void;
7
+ }
8
+ declare const VideoPublishStatisticAccountTrendQuery: React.FC<Props>;
9
+ export default VideoPublishStatisticAccountTrendQuery;
@@ -0,0 +1,54 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import React from 'react';
3
+ import { Button, DatePicker, Form, Space } from "antd";
4
+ import "./query.less";
5
+ import dayjs from "dayjs";
6
+ import { SearchOutlined } from "@ant-design/icons";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ import { jsxs as _jsxs } from "react/jsx-runtime";
9
+ var VideoPublishStatisticAccountTrendQuery = function VideoPublishStatisticAccountTrendQuery(_ref) {
10
+ var loading = _ref.loading,
11
+ defaultQuery = _ref.defaultQuery,
12
+ _ref$onQuery = _ref.onQuery,
13
+ onQuery = _ref$onQuery === void 0 ? function () {} : _ref$onQuery;
14
+ var _Form$useForm = Form.useForm(),
15
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
16
+ form = _Form$useForm2[0];
17
+ var onFinish = function onFinish() {
18
+ var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
19
+ onQuery({
20
+ time: values.time.valueOf()
21
+ });
22
+ };
23
+ return /*#__PURE__*/_jsx("div", {
24
+ className: "videoPublishStatisticVaccountTrendQuery",
25
+ children: /*#__PURE__*/_jsx(Form, {
26
+ form: form,
27
+ initialValues: {
28
+ time: dayjs(defaultQuery.time)
29
+ },
30
+ disabled: loading,
31
+ onFinish: onFinish,
32
+ children: /*#__PURE__*/_jsxs(Space, {
33
+ children: [/*#__PURE__*/_jsx(Form.Item, {
34
+ name: "time",
35
+ children: /*#__PURE__*/_jsx(DatePicker
36
+ // defaultValue={ dayjs( defaultQuery.time ) }
37
+ , {
38
+ allowClear: false,
39
+ picker: "month"
40
+ })
41
+ }), /*#__PURE__*/_jsx(Form.Item, {
42
+ children: /*#__PURE__*/_jsx(Button, {
43
+ icon: /*#__PURE__*/_jsx(SearchOutlined, {}),
44
+ type: "primary",
45
+ htmlType: "submit",
46
+ loading: loading,
47
+ children: "\u641C\u7D22"
48
+ })
49
+ })]
50
+ })
51
+ })
52
+ });
53
+ };
54
+ export default VideoPublishStatisticAccountTrendQuery;
@@ -0,0 +1,3 @@
1
+ .videoPublishStatisticVaccountTrendQuery{
2
+
3
+ }
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ kind: VideoPublishStatisticOperation.Kind;
4
+ }
5
+ interface VideoPublishStatisticOperationKindDict {
6
+ [kind: string]: VideoPublishStatisticOperationKindList;
7
+ }
8
+ interface VideoPublishStatisticOperationKindList {
9
+ kind: VideoPublishStatisticOperation.Kind;
10
+ title: string;
11
+ color: string;
12
+ }
13
+ export declare const VideoPublishStatisticOperationKindList: VideoPublishStatisticOperationKindList[];
14
+ export declare const VideoPublishStatisticOperationKindDict: VideoPublishStatisticOperationKindDict;
15
+ declare const VideoPublishStatisticOperationKind: React.FC<Props>;
16
+ export default VideoPublishStatisticOperationKind;
@@ -0,0 +1,57 @@
1
+ import React from 'react';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ // 'cancel-fans' | 'comment' | 'digg' | 'homepage-view' | 'net-fans' | 'play' | 'share' | 'total-fans';
4
+ export var VideoPublishStatisticOperationKindList = [{
5
+ kind: 'play',
6
+ title: '播放',
7
+ color: '#F60'
8
+ }, {
9
+ kind: 'digg',
10
+ title: '点赞',
11
+ color: ''
12
+ }, {
13
+ kind: 'share',
14
+ title: '分享',
15
+ color: '#F60'
16
+ }, {
17
+ // ENUM('wait', 'progress', 'finish', 'fail')
18
+ kind: 'comment',
19
+ title: '评论数',
20
+ color: 'blue'
21
+ }, {
22
+ kind: 'net-fans',
23
+ title: '净增粉丝',
24
+ color: '#F60'
25
+ }, {
26
+ kind: 'cancel-fans',
27
+ title: '掉粉',
28
+ color: 'green'
29
+ }, {
30
+ kind: 'homepage-view',
31
+ title: '主页访问',
32
+ color: 'red'
33
+ }, {
34
+ kind: 'total-fans',
35
+ title: '总粉丝数',
36
+ color: '#F60'
37
+ }];
38
+ export var VideoPublishStatisticOperationKindDict = function () {
39
+ var dict = {};
40
+ VideoPublishStatisticOperationKindList.forEach(function (items) {
41
+ dict[items.kind] = items;
42
+ });
43
+ return dict;
44
+ }();
45
+ var VideoPublishStatisticOperationKind = function VideoPublishStatisticOperationKind(_ref) {
46
+ var kind = _ref.kind;
47
+ var itemData = VideoPublishStatisticOperationKindDict[kind] || {
48
+ icon: '',
49
+ title: '',
50
+ color: ''
51
+ };
52
+ return kind ? /*#__PURE__*/_jsx("span", {
53
+ color: itemData.color,
54
+ children: itemData.title || kind
55
+ }) : null;
56
+ };
57
+ export default VideoPublishStatisticOperationKind;
@@ -5,13 +5,17 @@ import React, { useState } from "react";
5
5
  import "./list.less";
6
6
  import { useRequest } from "@umijs/hooks";
7
7
  import * as VideoPublishStatisticOperationController from "../../../service/api/VideoPublishStatisticOperationController";
8
- import { Table } from "antd";
8
+ import { Button, Table, Tag } from "antd";
9
9
  import VideoPublishVideoAccountBaseInfo from "../../video-account/base-info";
10
10
  import LayoutContent from "../../../UI/LayoutContent";
11
11
  import VideoPublishStatisticOperationListQuery from "./query";
12
12
  import dayjs from "dayjs";
13
13
  import Money from "../../../UI/Money";
14
+ import Tool from "../../../lib/Tool";
15
+ import VideoPublishStatisticAccountTrend from "../account-trend";
14
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
+ import { Fragment as _Fragment } from "react/jsx-runtime";
18
+ import { jsxs as _jsxs } from "react/jsx-runtime";
15
19
  var VideoPublishStatisticOperationList = function VideoPublishStatisticOperationList(_ref) {
16
20
  var env = _ref.env;
17
21
  var _useState = useState([]),
@@ -109,11 +113,12 @@ var VideoPublishStatisticOperationList = function VideoPublishStatisticOperation
109
113
  pre: "",
110
114
  end: "",
111
115
  value: netFans,
112
- precision: 0
116
+ precision: 0,
117
+ color: netFans < 0 ? '#C00' : ''
113
118
  });
114
119
  }
115
120
  }, {
116
- title: '取关粉丝',
121
+ title: '掉粉',
117
122
  dataIndex: 'cancelFans',
118
123
  key: 'cancelFans',
119
124
  render: function render(cancelFans) {
@@ -148,6 +153,21 @@ var VideoPublishStatisticOperationList = function VideoPublishStatisticOperation
148
153
  precision: 0
149
154
  });
150
155
  }
156
+ }, {
157
+ title: '操作',
158
+ dataIndex: '_',
159
+ key: '_',
160
+ render: function render(_, record) {
161
+ return /*#__PURE__*/_jsx(Button, {
162
+ type: "link",
163
+ size: "small",
164
+ onClick: function onClick() {
165
+ var _record$accountInfo;
166
+ return onDetail((record === null || record === void 0 || (_record$accountInfo = record.accountInfo) === null || _record$accountInfo === void 0 ? void 0 : _record$accountInfo.id) || 0, (record === null || record === void 0 ? void 0 : record.accountInfo.nickname) || '');
167
+ },
168
+ children: "\u8D8B\u52BF\u56FE"
169
+ });
170
+ }
151
171
  }];
152
172
  var _onQuery = function onQuery(query) {
153
173
  setQuery(_objectSpread({}, query));
@@ -167,6 +187,9 @@ var VideoPublishStatisticOperationList = function VideoPublishStatisticOperation
167
187
  });
168
188
  }, {
169
189
  onSuccess: function onSuccess(result) {
190
+ result.list.sort(function (a, b) {
191
+ return b.accountInfo.id - a.accountInfo.id;
192
+ });
170
193
  setListData(_toConsumableArray(result.list));
171
194
  // setPagination( result.pagination );
172
195
  }
@@ -174,6 +197,21 @@ var VideoPublishStatisticOperationList = function VideoPublishStatisticOperation
174
197
  runTaskList = _useRequest.run,
175
198
  loadingTaskList = _useRequest.loading,
176
199
  errorTaskList = _useRequest.error;
200
+ var onDetail = function onDetail(accountId, nickname) {
201
+ Tool.drawer({
202
+ title: /*#__PURE__*/_jsxs(_Fragment, {
203
+ children: ["\u8D8B\u52BF\u56FE\uFF1A ", /*#__PURE__*/_jsx(Tag, {
204
+ color: "blue",
205
+ children: nickname
206
+ })]
207
+ }),
208
+ width: 980,
209
+ content: /*#__PURE__*/_jsx(VideoPublishStatisticAccountTrend, {
210
+ accountId: accountId,
211
+ env: env
212
+ })
213
+ });
214
+ };
177
215
  return /*#__PURE__*/_jsx(LayoutContent, {
178
216
  loading: loadingTaskList,
179
217
  error: errorTaskList,
@@ -162,7 +162,7 @@ declare const Tool: {
162
162
  getTitleByPath(path: string): string;
163
163
  getDirByPath(path: string): string;
164
164
  h5Pay(query: Pay.H5PayQuery): void;
165
- notification(type: "info" | "error" | "success" | "warning", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
165
+ notification(type: "error" | "success" | "info" | "warning", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
166
166
  notificationSuccess(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
167
167
  notificationError(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
168
168
  notificationWarning(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
@@ -4,6 +4,7 @@ import Tool from "./Tool";
4
4
  var notification = {
5
5
  notification: function notification(type, message, description) {
6
6
  var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
7
+ // @ts-ignore
7
8
  Notification[type](_objectSpread(_objectSpread({}, options), {}, {
8
9
  message: message,
9
10
  description: description
@@ -2,8 +2,8 @@
2
2
  .savePathContent{
3
3
  z-index: 30;
4
4
  .savePathWarp{
5
- display: flex;
6
- flex-direction: row;
5
+ display: flex ;
6
+ flex-direction: row ;
7
7
  .option{
8
8
  padding: 0 0 0 8px;
9
9
  }
@@ -5,3 +5,8 @@ export declare function list(body: {
5
5
  current: number;
6
6
  pageSize: number;
7
7
  }, options?: Global.RequestOptions): Promise<VideoPublishStatisticOperation.ListResult>;
8
+ export declare function accountTrend(body: {
9
+ accountId: number;
10
+ year: number;
11
+ month: number;
12
+ }, options?: Global.RequestOptions): Promise<VideoPublishStatisticOperation.AccountTrend[]>;
@@ -25,4 +25,27 @@ function _list() {
25
25
  }, _callee);
26
26
  }));
27
27
  return _list.apply(this, arguments);
28
+ }
29
+ export function accountTrend(_x3, _x4) {
30
+ return _accountTrend.apply(this, arguments);
31
+ }
32
+ function _accountTrend() {
33
+ _accountTrend = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body, options) {
34
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
35
+ while (1) switch (_context2.prev = _context2.next) {
36
+ case 0:
37
+ return _context2.abrupt("return", request(PublishDomainApi("user/videoAccountStatisticOperation/accountTrend", options === null || options === void 0 ? void 0 : options.env), _objectSpread({
38
+ method: 'POST',
39
+ headers: {
40
+ 'Content-Type': 'application/json'
41
+ },
42
+ data: _objectSpread({}, body)
43
+ }, options || {})));
44
+ case 1:
45
+ case "end":
46
+ return _context2.stop();
47
+ }
48
+ }, _callee2);
49
+ }));
50
+ return _accountTrend.apply(this, arguments);
28
51
  }
@@ -1,4 +1,5 @@
1
1
  declare namespace VideoPublishStatisticOperation {
2
+ type Kind = 'cancel-fans' | 'comment' | 'digg' | 'homepage-view' | 'net-fans' | 'play' | 'share' | 'total-fans';
2
3
  interface List {
3
4
  accountInfo: VideoPublishVideoAccount.BaseInfo;
4
5
  }
@@ -9,4 +10,10 @@ declare namespace VideoPublishStatisticOperation {
9
10
  interface ListQuery {
10
11
  time: number;
11
12
  }
13
+ interface AccountTrend {
14
+ kind: string;
15
+ value: number;
16
+ day: number;
17
+ kindName?: string;
18
+ }
12
19
  }
@@ -70,6 +70,7 @@ declare namespace VideoPublishVideoAccount {
70
70
  nicknameRemark: string;
71
71
  signature: string;
72
72
  isLoginValid: boolean;
73
+ isBan: boolean;
73
74
  followerCount: number;
74
75
  followingCount: number;
75
76
  favoritedCount: number;
@@ -5,5 +5,7 @@ declare namespace VideoPublishAccountManageSetting {
5
5
  chromePath: string;
6
6
  chromeUserDataDir: string;
7
7
  sendMessageToPort: number;
8
+ autoQueryData: boolean;
9
+ queryDataTime: string;
8
10
  }
9
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "2.2.5",
3
+ "version": "2.2.6",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -40,7 +40,7 @@
40
40
  "access": "public"
41
41
  },
42
42
  "peerDependencies": {
43
- "antd": "^5.21",
43
+ "antd": "^5.23",
44
44
  "react": ">=18.x",
45
45
  "react-dom": ">=18.x"
46
46
  },
@@ -67,6 +67,7 @@
67
67
  },
68
68
  "dependencies": {
69
69
  "@ant-design/icons": "^5.x",
70
+ "@ant-design/plots": "^2.3.3",
70
71
  "@babel/runtime": "^7.23.6",
71
72
  "@umijs/hooks": "^1.9.3",
72
73
  "component-shipinlv": "^2.2.3",