component-shipinlv 1.3.7 → 1.3.10
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/dist/UI/Money/index.css.js +1 -1
- package/dist/VideoPublish/account-manage/home.js +1 -1
- package/dist/VideoPublish/account-manage/list.js +1 -1
- package/dist/VideoPublish/account-manage/setting/index.js +2 -0
- package/dist/VideoPublish/publish-task-plan/tool.js +65 -11
- package/dist/VideoPublish/video-publish-statistic/index.js +28 -3
- package/dist/VideoPublish/video-publish-statistic/operation/list.d.ts +7 -0
- package/dist/VideoPublish/video-publish-statistic/operation/list.js +203 -0
- package/dist/VideoPublish/video-publish-statistic/operation/list.less +10 -0
- package/dist/VideoPublish/video-publish-statistic/operation/query.d.ts +8 -0
- package/dist/VideoPublish/video-publish-statistic/operation/query.js +56 -0
- package/dist/VideoPublish/video-publish-statistic/{list.js → publish-plan/list.js} +35 -9
- package/dist/VideoPublish/video-publish-statistic/{query.js → publish-plan/query.js} +1 -1
- package/dist/VideoPublish/video-publish-statistic/publish-plan/query.less +3 -0
- package/dist/component/isFileExist.d.ts +2 -0
- package/dist/component/isFileExist.js +50 -0
- package/dist/lib/Tool.d.ts +1 -1
- package/dist/lib/getPublishExtensionDir.d.ts +2 -0
- package/dist/lib/getPublishExtensionDir.js +55 -0
- package/dist/lib/openChrome.d.ts +1 -1
- package/dist/lib/openChrome.js +210 -113
- package/dist/lib/video-api/open-chrome.js +3 -1
- package/dist/service/api/VideoPublishStatisticOperationController.d.ts +7 -0
- package/dist/service/api/VideoPublishStatisticOperationController.js +28 -0
- package/dist/service/local/VideoPublishTaskController.js +1 -1
- package/dist/service/video-api/BaseController.d.ts +1 -0
- package/dist/service/video-api/BaseController.js +27 -0
- package/dist/service/video-api/FileController.d.ts +1 -0
- package/dist/service/video-api/FileController.js +27 -0
- package/dist/types/File.d.ts +8 -0
- package/dist/types/File.js +0 -0
- package/dist/types/VideoPublishStatisticOperation.d.ts +12 -0
- package/dist/types/VideoPublishStatisticOperation.js +0 -0
- package/dist/types/VideoPublishVideoAccount.d.ts +1 -0
- package/dist/types/VidepApiBase.d.ts +5 -0
- package/dist/types/VidepApiBase.js +0 -0
- package/package.json +1 -1
- /package/dist/VideoPublish/video-publish-statistic/{query.less → operation/query.less} +0 -0
- /package/dist/VideoPublish/video-publish-statistic/{list.d.ts → publish-plan/list.d.ts} +0 -0
- /package/dist/VideoPublish/video-publish-statistic/{list.less → publish-plan/list.less} +0 -0
- /package/dist/VideoPublish/video-publish-statistic/{query.d.ts → publish-plan/query.d.ts} +0 -0
|
@@ -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 }\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
|
};
|
|
@@ -110,7 +110,7 @@ var VideoPublishAccountManageHomePage = function VideoPublishAccountManageHomePa
|
|
|
110
110
|
url: 'https://creator.douyin.com/creator-micro/content/manage',
|
|
111
111
|
proxyInfo: accountDetail.proxyInfo,
|
|
112
112
|
isOpen: true
|
|
113
|
-
}, false);
|
|
113
|
+
}, false, env);
|
|
114
114
|
Tool.toast('正在打开浏览器, 请稍等...', 12);
|
|
115
115
|
};
|
|
116
116
|
var onOpenMenuItems = function onOpenMenuItems(platform) {
|
|
@@ -219,7 +219,7 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
|
219
219
|
url: 'https://creator.douyin.com/',
|
|
220
220
|
proxyInfo: proxyInfo,
|
|
221
221
|
isOpen: true // settingConfig.isChromeOpen,
|
|
222
|
-
}, true);
|
|
222
|
+
}, true, env);
|
|
223
223
|
|
|
224
224
|
// event.run('publish-video-account-add', {
|
|
225
225
|
// ...openChromeQuery,
|
|
@@ -89,6 +89,8 @@ var AccountManageSettingPage = function AccountManageSettingPage(_ref) {
|
|
|
89
89
|
children: /*#__PURE__*/_jsx(Switch, {
|
|
90
90
|
checkedChildren: "\u663E\u793A\u6D4F\u89C8\u5668",
|
|
91
91
|
unCheckedChildren: "\u9690\u85CF\u6D4F\u89C8\u5668",
|
|
92
|
+
checked: true,
|
|
93
|
+
disabled: true,
|
|
92
94
|
onChange: function onChange(isChromeOpen) {
|
|
93
95
|
formData.isChromeOpen = isChromeOpen;
|
|
94
96
|
setFormData(_objectSpread({}, formData));
|
|
@@ -14,6 +14,7 @@ import param from "../../component/param";
|
|
|
14
14
|
import { notification } from "antd";
|
|
15
15
|
import openChrome from "../../lib/openChrome";
|
|
16
16
|
import * as LocalVideoPublishTaskController from "../../service/local/VideoPublishTaskController";
|
|
17
|
+
import isFileExist from "../../component/isFileExist";
|
|
17
18
|
var PublishTaskPlanClass = /*#__PURE__*/function () {
|
|
18
19
|
function PublishTaskPlanClass(env) {
|
|
19
20
|
var clientIdentity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
@@ -128,7 +129,7 @@ var PublishTaskPlanClass = /*#__PURE__*/function () {
|
|
|
128
129
|
key: "doWork",
|
|
129
130
|
value: function () {
|
|
130
131
|
var _doWork = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(taskDetail) {
|
|
131
|
-
var item, saveBaseData, result, errMessage, code, errLog;
|
|
132
|
+
var item, saveBaseData, errExistLog, coverExist, errVideoExistLog, videoExist, result, errMessage, code, errLog;
|
|
132
133
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
133
134
|
while (1) switch (_context2.prev = _context2.next) {
|
|
134
135
|
case 0:
|
|
@@ -154,7 +155,7 @@ var PublishTaskPlanClass = /*#__PURE__*/function () {
|
|
|
154
155
|
platformAccountId: taskDetail.platformVideoAccountId
|
|
155
156
|
};
|
|
156
157
|
_context2.t0 = item.taskType;
|
|
157
|
-
_context2.next = _context2.t0 === "publish-video" ? 12 :
|
|
158
|
+
_context2.next = _context2.t0 === "publish-video" ? 12 : 37;
|
|
158
159
|
break;
|
|
159
160
|
case 12:
|
|
160
161
|
if (item.publishVideo) {
|
|
@@ -163,17 +164,69 @@ var PublishTaskPlanClass = /*#__PURE__*/function () {
|
|
|
163
164
|
}
|
|
164
165
|
console.warn("item publishVideo is empty!");
|
|
165
166
|
this.onReport(false, '', "publishVideo 不存在", saveBaseData);
|
|
166
|
-
return _context2.abrupt("break",
|
|
167
|
+
return _context2.abrupt("break", 43);
|
|
167
168
|
case 16:
|
|
168
|
-
|
|
169
|
+
if (!item.publishVideo.publishCoverUrl) {
|
|
170
|
+
_context2.next = 22;
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
errExistLog = {
|
|
174
|
+
platform: taskDetail.platform,
|
|
175
|
+
platformAccountId: taskDetail.platformVideoAccountId,
|
|
176
|
+
code: 'cover-not-exist',
|
|
177
|
+
nickname: taskDetail.nickname,
|
|
178
|
+
message: "",
|
|
179
|
+
status: 'fail',
|
|
180
|
+
taskId: item.taskId,
|
|
181
|
+
eventType: 'task-kind'
|
|
182
|
+
};
|
|
183
|
+
_context2.next = 20;
|
|
184
|
+
return isFileExist(item.publishVideo.publishCoverUrl).catch(function (err) {});
|
|
185
|
+
case 20:
|
|
186
|
+
coverExist = _context2.sent;
|
|
187
|
+
if (!coverExist || !coverExist.isExist) {
|
|
188
|
+
item.publishVideo.publishCoverUrl = '';
|
|
189
|
+
errExistLog.message = '封面文件 本身已经不存在(可能被清理删除),将采用系统推荐封面';
|
|
190
|
+
this.onLog(errExistLog);
|
|
191
|
+
}
|
|
192
|
+
case 22:
|
|
193
|
+
if (!item.publishVideo.videoUrl) {
|
|
194
|
+
_context2.next = 33;
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
errVideoExistLog = {
|
|
198
|
+
platform: taskDetail.platform,
|
|
199
|
+
platformAccountId: taskDetail.platformVideoAccountId,
|
|
200
|
+
code: 'video-not-exist',
|
|
201
|
+
nickname: taskDetail.nickname,
|
|
202
|
+
message: "",
|
|
203
|
+
status: 'fail',
|
|
204
|
+
taskId: item.taskId,
|
|
205
|
+
eventType: 'task-kind'
|
|
206
|
+
};
|
|
207
|
+
_context2.next = 26;
|
|
208
|
+
return isFileExist(item.publishVideo.videoUrl).catch(function (err) {});
|
|
209
|
+
case 26:
|
|
210
|
+
videoExist = _context2.sent;
|
|
211
|
+
if (!(!videoExist || !videoExist.isExist)) {
|
|
212
|
+
_context2.next = 33;
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
item.publishVideo.publishCoverUrl = '';
|
|
216
|
+
errVideoExistLog.message = '视频文件 本身已经不存在(可能被清理删除),任务失败';
|
|
217
|
+
this.onLog(errVideoExistLog);
|
|
218
|
+
this.onReport(false, '', errVideoExistLog.message, saveBaseData);
|
|
219
|
+
return _context2.abrupt("break", 43);
|
|
220
|
+
case 33:
|
|
221
|
+
_context2.next = 35;
|
|
169
222
|
return this.onPublishVideo(taskDetail.platform, taskDetail.platformVideoAccountId, taskDetail.nickname, taskDetail.chromeProfileName, taskDetail.taskInfo, taskDetail.proxyInfo).catch(function (err) {
|
|
170
223
|
console.warn("onPublishVideo err:", err);
|
|
171
224
|
// this.on Report(false, err?.message, saveBaseData );
|
|
172
225
|
});
|
|
173
|
-
case
|
|
226
|
+
case 35:
|
|
174
227
|
result = _context2.sent;
|
|
175
|
-
return _context2.abrupt("break",
|
|
176
|
-
case
|
|
228
|
+
return _context2.abrupt("break", 43);
|
|
229
|
+
case 37:
|
|
177
230
|
errMessage = '暂不支持 类型:' + item.taskType;
|
|
178
231
|
console.log(errMessage);
|
|
179
232
|
code = 'not-support-task-type';
|
|
@@ -189,10 +242,10 @@ var PublishTaskPlanClass = /*#__PURE__*/function () {
|
|
|
189
242
|
};
|
|
190
243
|
this.onLog(errLog);
|
|
191
244
|
this.onReport(false, code, errMessage, saveBaseData);
|
|
192
|
-
case
|
|
193
|
-
_context2.next =
|
|
245
|
+
case 43:
|
|
246
|
+
_context2.next = 45;
|
|
194
247
|
return this.doWorkWait();
|
|
195
|
-
case
|
|
248
|
+
case 45:
|
|
196
249
|
case "end":
|
|
197
250
|
return _context2.stop();
|
|
198
251
|
}
|
|
@@ -450,6 +503,7 @@ var PublishTaskPlanClass = /*#__PURE__*/function () {
|
|
|
450
503
|
key: "onPublishVideoDo",
|
|
451
504
|
value: function () {
|
|
452
505
|
var _onPublishVideoDo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(proxyInfo, query, settingConfig) {
|
|
506
|
+
var _this4 = this;
|
|
453
507
|
var _this;
|
|
454
508
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
455
509
|
while (1) switch (_context9.prev = _context9.next) {
|
|
@@ -500,7 +554,7 @@ var PublishTaskPlanClass = /*#__PURE__*/function () {
|
|
|
500
554
|
chromePath: settingConfig.chromePath,
|
|
501
555
|
chromeProfileName: query.chromeProfileName,
|
|
502
556
|
isOpen: query.open
|
|
503
|
-
}, false);
|
|
557
|
+
}, false, _this4.env);
|
|
504
558
|
} else if (lastEventId === 'fail') {
|
|
505
559
|
// query.onDownFail( data );
|
|
506
560
|
// this.on Report( false, data, {
|
|
@@ -1,11 +1,36 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
1
2
|
import _objectDestructuringEmpty from "@babel/runtime/helpers/esm/objectDestructuringEmpty";
|
|
2
|
-
import VideoPublishStatisticPublishList from "./list";
|
|
3
|
+
import VideoPublishStatisticPublishList from "./publish-plan/list";
|
|
3
4
|
import { getApiEnv } from "../../lib/getApiUrl";
|
|
5
|
+
import { Tabs } from "antd";
|
|
6
|
+
import React, { useState } from "react";
|
|
7
|
+
import LayoutContent from "../../UI/LayoutContent";
|
|
8
|
+
import VideoPublishStatisticOperationList from "./operation/list";
|
|
4
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
10
|
var VideoPublishStatisticPublish = function VideoPublishStatisticPublish(_ref) {
|
|
6
11
|
_objectDestructuringEmpty(_ref);
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
var _useState = useState([{
|
|
13
|
+
key: 'publish-video',
|
|
14
|
+
label: '发布任务',
|
|
15
|
+
children: /*#__PURE__*/_jsx(VideoPublishStatisticPublishList, {
|
|
16
|
+
env: getApiEnv()
|
|
17
|
+
})
|
|
18
|
+
}, {
|
|
19
|
+
key: 'operation',
|
|
20
|
+
label: '视频数据',
|
|
21
|
+
children: /*#__PURE__*/_jsx(VideoPublishStatisticOperationList, {
|
|
22
|
+
env: getApiEnv()
|
|
23
|
+
})
|
|
24
|
+
}]),
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
itemsTabs = _useState2[0],
|
|
27
|
+
setItemsTabs = _useState2[1];
|
|
28
|
+
return /*#__PURE__*/_jsx(LayoutContent, {
|
|
29
|
+
children: /*#__PURE__*/_jsx(Tabs, {
|
|
30
|
+
defaultActiveKey: "publish-video",
|
|
31
|
+
items: itemsTabs,
|
|
32
|
+
type: "card"
|
|
33
|
+
})
|
|
9
34
|
});
|
|
10
35
|
};
|
|
11
36
|
export default VideoPublishStatisticPublish;
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import React, { useState } from "react";
|
|
4
|
+
import "./list.less";
|
|
5
|
+
import { useRequest } from "@umijs/hooks";
|
|
6
|
+
import * as VideoPublishStatisticOperationController from "../../../service/api/VideoPublishStatisticOperationController";
|
|
7
|
+
import { Table } from "antd";
|
|
8
|
+
import VideoPublishVideoAccountBaseInfo from "../../video-account/base-info";
|
|
9
|
+
import LayoutContent from "../../../UI/LayoutContent";
|
|
10
|
+
import VideoPublishStatisticOperationListQuery from "./query";
|
|
11
|
+
import dayjs from "dayjs";
|
|
12
|
+
import Money from "../../../UI/Money";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
var VideoPublishStatisticOperationList = function VideoPublishStatisticOperationList(_ref) {
|
|
15
|
+
var env = _ref.env;
|
|
16
|
+
var _useState = useState([]),
|
|
17
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
+
listData = _useState2[0],
|
|
19
|
+
setListData = _useState2[1];
|
|
20
|
+
var _useState3 = useState({
|
|
21
|
+
current: 1,
|
|
22
|
+
pageSize: 100,
|
|
23
|
+
total: 0,
|
|
24
|
+
simple: true,
|
|
25
|
+
showSizeChanger: false,
|
|
26
|
+
showQuickJumper: false
|
|
27
|
+
}),
|
|
28
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
29
|
+
pagination = _useState4[0],
|
|
30
|
+
setPagination = _useState4[1];
|
|
31
|
+
var _useState5 = useState({
|
|
32
|
+
time: Date.now() - 86400e3
|
|
33
|
+
}),
|
|
34
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
35
|
+
query = _useState6[0],
|
|
36
|
+
setQuery = _useState6[1];
|
|
37
|
+
var columns = [{
|
|
38
|
+
title: '序号',
|
|
39
|
+
dataIndex: '-',
|
|
40
|
+
key: '-',
|
|
41
|
+
render: function render(_, _1) {
|
|
42
|
+
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
43
|
+
return index + 1;
|
|
44
|
+
}
|
|
45
|
+
}, {
|
|
46
|
+
title: '发布账号',
|
|
47
|
+
dataIndex: 'platform',
|
|
48
|
+
key: 'platform',
|
|
49
|
+
render: function render(platform, record) {
|
|
50
|
+
return /*#__PURE__*/_jsx(VideoPublishVideoAccountBaseInfo, {
|
|
51
|
+
accountInfo: record === null || record === void 0 ? void 0 : record.accountInfo
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}, {
|
|
55
|
+
title: '播放数',
|
|
56
|
+
dataIndex: 'play',
|
|
57
|
+
key: 'play',
|
|
58
|
+
render: function render(play) {
|
|
59
|
+
return /*#__PURE__*/_jsx(Money, {
|
|
60
|
+
pre: "",
|
|
61
|
+
end: "",
|
|
62
|
+
value: play,
|
|
63
|
+
precision: 0
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
title: '点赞数',
|
|
68
|
+
dataIndex: 'digg',
|
|
69
|
+
key: 'digg',
|
|
70
|
+
render: function render(digg) {
|
|
71
|
+
return /*#__PURE__*/_jsx(Money, {
|
|
72
|
+
pre: "",
|
|
73
|
+
end: "",
|
|
74
|
+
value: digg,
|
|
75
|
+
precision: 0
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}, {
|
|
79
|
+
title: '分享数',
|
|
80
|
+
dataIndex: 'share',
|
|
81
|
+
key: 'share',
|
|
82
|
+
render: function render(share) {
|
|
83
|
+
return /*#__PURE__*/_jsx(Money, {
|
|
84
|
+
pre: "",
|
|
85
|
+
end: "",
|
|
86
|
+
value: share,
|
|
87
|
+
precision: 0
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
91
|
+
title: '评论数',
|
|
92
|
+
dataIndex: 'comment',
|
|
93
|
+
key: 'comment',
|
|
94
|
+
render: function render(comment) {
|
|
95
|
+
return /*#__PURE__*/_jsx(Money, {
|
|
96
|
+
pre: "",
|
|
97
|
+
end: "",
|
|
98
|
+
value: comment,
|
|
99
|
+
precision: 0
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
title: '净增粉丝',
|
|
104
|
+
dataIndex: 'netFans',
|
|
105
|
+
key: 'netFans',
|
|
106
|
+
render: function render(netFans) {
|
|
107
|
+
return /*#__PURE__*/_jsx(Money, {
|
|
108
|
+
pre: "",
|
|
109
|
+
end: "",
|
|
110
|
+
value: netFans,
|
|
111
|
+
precision: 0
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}, {
|
|
115
|
+
title: '取关粉丝',
|
|
116
|
+
dataIndex: 'cancelFans',
|
|
117
|
+
key: 'cancelFans',
|
|
118
|
+
render: function render(cancelFans) {
|
|
119
|
+
return /*#__PURE__*/_jsx(Money, {
|
|
120
|
+
pre: "",
|
|
121
|
+
end: "",
|
|
122
|
+
value: cancelFans,
|
|
123
|
+
precision: 0
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}, {
|
|
127
|
+
title: '主页访问',
|
|
128
|
+
dataIndex: 'homepageView',
|
|
129
|
+
key: 'homepageView',
|
|
130
|
+
render: function render(homepageView) {
|
|
131
|
+
return /*#__PURE__*/_jsx(Money, {
|
|
132
|
+
pre: "",
|
|
133
|
+
end: "",
|
|
134
|
+
value: homepageView,
|
|
135
|
+
precision: 0
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}, {
|
|
139
|
+
title: '总粉丝数',
|
|
140
|
+
dataIndex: 'totalFans',
|
|
141
|
+
key: 'totalFans',
|
|
142
|
+
render: function render(totalFans) {
|
|
143
|
+
return /*#__PURE__*/_jsx(Money, {
|
|
144
|
+
pre: "",
|
|
145
|
+
end: "",
|
|
146
|
+
value: totalFans,
|
|
147
|
+
precision: 0
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}];
|
|
151
|
+
var _onQuery = function onQuery(query) {
|
|
152
|
+
setQuery(_objectSpread({}, query));
|
|
153
|
+
runTaskList(query, 1);
|
|
154
|
+
};
|
|
155
|
+
var _useRequest = useRequest(function () {
|
|
156
|
+
var postQuery = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : query;
|
|
157
|
+
var current = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : pagination.current;
|
|
158
|
+
return VideoPublishStatisticOperationController.list({
|
|
159
|
+
year: postQuery.time > 100000 ? dayjs(postQuery.time).year() : new Date().getFullYear(),
|
|
160
|
+
month: postQuery.time > 100000 ? dayjs(postQuery.time).month() + 1 : 1,
|
|
161
|
+
day: postQuery.time > 100000 ? dayjs(postQuery.time).date() : 1,
|
|
162
|
+
current: current,
|
|
163
|
+
pageSize: pagination.pageSize
|
|
164
|
+
}, {
|
|
165
|
+
env: env
|
|
166
|
+
});
|
|
167
|
+
}, {
|
|
168
|
+
onSuccess: function onSuccess(result) {
|
|
169
|
+
setListData(result.list);
|
|
170
|
+
// setPagination( result.pagination );
|
|
171
|
+
}
|
|
172
|
+
}),
|
|
173
|
+
runTaskList = _useRequest.run,
|
|
174
|
+
loadingTaskList = _useRequest.loading,
|
|
175
|
+
errorTaskList = _useRequest.error;
|
|
176
|
+
return /*#__PURE__*/_jsx(LayoutContent, {
|
|
177
|
+
loading: loadingTaskList,
|
|
178
|
+
error: errorTaskList,
|
|
179
|
+
onReload: runTaskList,
|
|
180
|
+
title: "\u89C6\u9891\u7ECF\u8425\u6570\u636E",
|
|
181
|
+
className: "video-publish-statistic-operation-list",
|
|
182
|
+
extInfo: /*#__PURE__*/_jsx(VideoPublishStatisticOperationListQuery, {
|
|
183
|
+
defaultQuery: query,
|
|
184
|
+
onQuery: function onQuery(query) {
|
|
185
|
+
return _onQuery(query);
|
|
186
|
+
}
|
|
187
|
+
}),
|
|
188
|
+
children: /*#__PURE__*/_jsx(Table, {
|
|
189
|
+
size: "small",
|
|
190
|
+
bordered: true,
|
|
191
|
+
rowKey: function rowKey(record) {
|
|
192
|
+
return "".concat(record.accountInfo.id);
|
|
193
|
+
}
|
|
194
|
+
// rowClassName={ ( record ) => `row-${ record.status }` }
|
|
195
|
+
,
|
|
196
|
+
loading: false,
|
|
197
|
+
columns: columns,
|
|
198
|
+
dataSource: listData,
|
|
199
|
+
pagination: false
|
|
200
|
+
})
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
export default VideoPublishStatisticOperationList;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './query.less';
|
|
3
|
+
interface Props {
|
|
4
|
+
defaultQuery: VideoPublishStatisticOperation.ListQuery;
|
|
5
|
+
onQuery: (query: VideoPublishStatisticOperation.ListQuery) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const VideoPublishStatisticOperationListQuery: React.FC<Props>;
|
|
8
|
+
export default VideoPublishStatisticOperationListQuery;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import { Button, DatePicker, Form, Space } from "antd";
|
|
5
|
+
import "./query.less";
|
|
6
|
+
import dayjs from "dayjs";
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
var VideoPublishStatisticOperationListQuery = function VideoPublishStatisticOperationListQuery(_ref) {
|
|
10
|
+
var defaultQuery = _ref.defaultQuery,
|
|
11
|
+
_ref$onQuery = _ref.onQuery,
|
|
12
|
+
onQuery = _ref$onQuery === void 0 ? function () {} : _ref$onQuery;
|
|
13
|
+
var _Form$useForm = Form.useForm(),
|
|
14
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
15
|
+
form = _Form$useForm2[0];
|
|
16
|
+
var _useState = useState(_objectSpread({}, defaultQuery)),
|
|
17
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
+
query = _useState2[0],
|
|
19
|
+
setQuery = _useState2[1];
|
|
20
|
+
var todayStart = dayjs(dayjs(Date.now()).format('YYYY-MM-DD 00:00:00')).valueOf();
|
|
21
|
+
var onTime = function onTime(startTime) {
|
|
22
|
+
query.time = startTime;
|
|
23
|
+
setQuery(_objectSpread({}, query));
|
|
24
|
+
};
|
|
25
|
+
var onFinish = function onFinish() {
|
|
26
|
+
var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
27
|
+
onQuery(_objectSpread(_objectSpread({}, query), values));
|
|
28
|
+
};
|
|
29
|
+
return /*#__PURE__*/_jsx("div", {
|
|
30
|
+
className: "videoPublishTaskPlanListQuery",
|
|
31
|
+
children: /*#__PURE__*/_jsx(Form, {
|
|
32
|
+
form: form,
|
|
33
|
+
initialValues: _objectSpread({}, query),
|
|
34
|
+
onFinish: onFinish,
|
|
35
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
36
|
+
children: [/*#__PURE__*/_jsx(Form.Item, {
|
|
37
|
+
children: /*#__PURE__*/_jsx(DatePicker, {
|
|
38
|
+
defaultValue: dayjs(query.time),
|
|
39
|
+
allowClear: false,
|
|
40
|
+
disabledDate: function disabledDate(currentDate) {
|
|
41
|
+
return currentDate.valueOf() >= todayStart || currentDate.valueOf() < new Date('2024-10-01').valueOf();
|
|
42
|
+
},
|
|
43
|
+
onChange: function onChange(dates) {
|
|
44
|
+
onTime((dates === null || dates === void 0 ? void 0 : dates.valueOf()) || 0);
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
48
|
+
type: "primary",
|
|
49
|
+
htmlType: "submit",
|
|
50
|
+
children: "\u641C\u7D22"
|
|
51
|
+
})]
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
export default VideoPublishStatisticOperationListQuery;
|
|
@@ -3,14 +3,14 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
3
3
|
import React, { useState } from "react";
|
|
4
4
|
import "./list.less";
|
|
5
5
|
import { useRequest } from "@umijs/hooks";
|
|
6
|
-
import * as VideoPublishPublishStatisticController from "
|
|
6
|
+
import * as VideoPublishPublishStatisticController from "../../../service/api/VideoPublishStatisticPublishController";
|
|
7
7
|
import { Button, Divider, Space, Table, Tag } from "antd";
|
|
8
|
-
import VideoPublishVideoAccountBaseInfo from "
|
|
9
|
-
import LayoutContent from "
|
|
8
|
+
import VideoPublishVideoAccountBaseInfo from "../../video-account/base-info";
|
|
9
|
+
import LayoutContent from "../../../UI/LayoutContent";
|
|
10
10
|
import VideoPublishStatisticPublishListQuery from "./query";
|
|
11
11
|
import dayjs from "dayjs";
|
|
12
|
-
import Tool from "
|
|
13
|
-
import VideoPublishTaskPlanList from "
|
|
12
|
+
import Tool from "../../../lib/Tool";
|
|
13
|
+
import VideoPublishTaskPlanList from "../../task-list/plan/list";
|
|
14
14
|
import { SwapRightOutlined } from "@ant-design/icons";
|
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -41,6 +41,14 @@ var VideoPublishStatisticPublishList = function VideoPublishStatisticPublishList
|
|
|
41
41
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
42
42
|
query = _useState6[0],
|
|
43
43
|
setQuery = _useState6[1];
|
|
44
|
+
var _useState7 = useState({
|
|
45
|
+
finish: 0,
|
|
46
|
+
fail: 0,
|
|
47
|
+
progress: 0
|
|
48
|
+
}),
|
|
49
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
50
|
+
amountInfo = _useState8[0],
|
|
51
|
+
setAmountInfo = _useState8[1];
|
|
44
52
|
var columns = [{
|
|
45
53
|
title: '序号',
|
|
46
54
|
dataIndex: '-',
|
|
@@ -61,13 +69,18 @@ var VideoPublishStatisticPublishList = function VideoPublishStatisticPublishList
|
|
|
61
69
|
}, {
|
|
62
70
|
title: '粉丝数',
|
|
63
71
|
dataIndex: 'followerCount',
|
|
64
|
-
key: 'followerCount'
|
|
72
|
+
key: 'followerCount',
|
|
73
|
+
render: function render(_, record) {
|
|
74
|
+
return record === null || record === void 0 ? void 0 : record.accountInfo.followerCount;
|
|
75
|
+
}
|
|
65
76
|
}, {
|
|
66
77
|
title: /*#__PURE__*/_jsx("div", {
|
|
67
78
|
className: "status-amount ",
|
|
68
79
|
children: /*#__PURE__*/_jsxs("span", {
|
|
69
80
|
className: "finish",
|
|
70
|
-
children: ["\u6210\u529F
|
|
81
|
+
children: ["\u6210\u529F", /*#__PURE__*/_jsx(Divider, {
|
|
82
|
+
type: "vertical"
|
|
83
|
+
}), amountInfo.finish, " ", /*#__PURE__*/_jsx("small", {
|
|
71
84
|
children: " / \u6761"
|
|
72
85
|
})]
|
|
73
86
|
})
|
|
@@ -90,7 +103,9 @@ var VideoPublishStatisticPublishList = function VideoPublishStatisticPublishList
|
|
|
90
103
|
className: "status-amount ",
|
|
91
104
|
children: /*#__PURE__*/_jsxs("span", {
|
|
92
105
|
className: "fail",
|
|
93
|
-
children: ["\u5931\u8D25
|
|
106
|
+
children: ["\u5931\u8D25", /*#__PURE__*/_jsx(Divider, {
|
|
107
|
+
type: "vertical"
|
|
108
|
+
}), amountInfo.fail, " ", /*#__PURE__*/_jsx("small", {
|
|
94
109
|
children: " / \u6761"
|
|
95
110
|
})]
|
|
96
111
|
})
|
|
@@ -111,7 +126,9 @@ var VideoPublishStatisticPublishList = function VideoPublishStatisticPublishList
|
|
|
111
126
|
className: "status-amount ",
|
|
112
127
|
children: /*#__PURE__*/_jsxs("span", {
|
|
113
128
|
className: "progress",
|
|
114
|
-
children: ["\u6267\u884C\u4E2D
|
|
129
|
+
children: ["\u6267\u884C\u4E2D", /*#__PURE__*/_jsx(Divider, {
|
|
130
|
+
type: "vertical"
|
|
131
|
+
}), amountInfo.progress, " ", /*#__PURE__*/_jsx("small", {
|
|
115
132
|
children: " / \u6761"
|
|
116
133
|
})]
|
|
117
134
|
})
|
|
@@ -167,6 +184,15 @@ var VideoPublishStatisticPublishList = function VideoPublishStatisticPublishList
|
|
|
167
184
|
onSuccess: function onSuccess(result) {
|
|
168
185
|
setListData(result.list);
|
|
169
186
|
setPagination(result.pagination);
|
|
187
|
+
amountInfo.finish = 0;
|
|
188
|
+
amountInfo.fail = 0;
|
|
189
|
+
amountInfo.progress = 0;
|
|
190
|
+
result.list.forEach(function (items) {
|
|
191
|
+
amountInfo.finish += items.finishAmount;
|
|
192
|
+
amountInfo.fail += items.failAmount;
|
|
193
|
+
amountInfo.progress += items.progressAmount;
|
|
194
|
+
});
|
|
195
|
+
setAmountInfo(_objectSpread({}, amountInfo));
|
|
170
196
|
}
|
|
171
197
|
}),
|
|
172
198
|
runTaskList = _useRequest.run,
|
|
@@ -36,7 +36,7 @@ var VideoPublishStatisticPublishListQuery = function VideoPublishStatisticPublis
|
|
|
36
36
|
children: /*#__PURE__*/_jsxs(Space, {
|
|
37
37
|
children: [/*#__PURE__*/_jsx(Form.Item, {
|
|
38
38
|
children: /*#__PURE__*/_jsx(DatePicker.RangePicker, {
|
|
39
|
-
defaultValue: query.startTime >
|
|
39
|
+
defaultValue: query.startTime > 10000 ? [query.startTime <= 0 ? null : dayjs(query.startTime), query.endTime <= 0 ? null : dayjs(query.endTime)] : [dayjs(), dayjs()],
|
|
40
40
|
disabledDate: function disabledDate(currentDate) {
|
|
41
41
|
return currentDate.valueOf() > todayEnd;
|
|
42
42
|
},
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
+
import * as FileController from "../service/video-api/FileController";
|
|
4
|
+
var isFileExist = /*#__PURE__*/function () {
|
|
5
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(filePath) {
|
|
6
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
7
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
8
|
+
case 0:
|
|
9
|
+
return _context2.abrupt("return", new Promise( /*#__PURE__*/function () {
|
|
10
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve, reject) {
|
|
11
|
+
var result;
|
|
12
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
13
|
+
while (1) switch (_context.prev = _context.next) {
|
|
14
|
+
case 0:
|
|
15
|
+
_context.next = 2;
|
|
16
|
+
return FileController.isExist({
|
|
17
|
+
filePath: filePath
|
|
18
|
+
}).catch(function (err) {
|
|
19
|
+
reject(err);
|
|
20
|
+
});
|
|
21
|
+
case 2:
|
|
22
|
+
result = _context.sent;
|
|
23
|
+
if (result) {
|
|
24
|
+
_context.next = 5;
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
return _context.abrupt("return");
|
|
28
|
+
case 5:
|
|
29
|
+
resolve(result);
|
|
30
|
+
case 6:
|
|
31
|
+
case "end":
|
|
32
|
+
return _context.stop();
|
|
33
|
+
}
|
|
34
|
+
}, _callee);
|
|
35
|
+
}));
|
|
36
|
+
return function (_x2, _x3) {
|
|
37
|
+
return _ref2.apply(this, arguments);
|
|
38
|
+
};
|
|
39
|
+
}()));
|
|
40
|
+
case 1:
|
|
41
|
+
case "end":
|
|
42
|
+
return _context2.stop();
|
|
43
|
+
}
|
|
44
|
+
}, _callee2);
|
|
45
|
+
}));
|
|
46
|
+
return function isFileExist(_x) {
|
|
47
|
+
return _ref.apply(this, arguments);
|
|
48
|
+
};
|
|
49
|
+
}();
|
|
50
|
+
export default isFileExist;
|