component-shipinlv 2.3.7 → 2.3.8
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/Auth/index.js +4 -4
- package/dist/PhonePublish/account-manage/home.d.ts +11 -0
- package/dist/PhonePublish/account-manage/home.js +243 -0
- package/dist/PhonePublish/account-manage/home.less +28 -0
- package/dist/PhonePublish/account-manage/index.d.ts +3 -0
- package/dist/PhonePublish/account-manage/index.js +56 -0
- package/dist/PhonePublish/account-manage/index.less +59 -0
- package/dist/PhonePublish/account-manage/list.d.ts +17 -0
- package/dist/PhonePublish/account-manage/list.js +443 -0
- package/dist/PhonePublish/account-manage/list.less +95 -0
- package/dist/PhonePublish/account-manage/setting/index.d.ts +6 -0
- package/dist/PhonePublish/account-manage/setting/index.js +199 -0
- package/dist/PhonePublish/account-manage/setting/index.less +11 -0
- package/dist/PhonePublish/create-task/base/index.d.ts +10 -0
- package/dist/PhonePublish/create-task/base/index.js +386 -0
- package/dist/PhonePublish/create-task/base/index.less +64 -0
- package/dist/PhonePublish/create-task/getVideoGoodsUrl.d.ts +2 -0
- package/dist/PhonePublish/create-task/getVideoGoodsUrl.js +136 -0
- package/dist/PhonePublish/create-task/hour-enabled.d.ts +9 -0
- package/dist/PhonePublish/create-task/hour-enabled.js +42 -0
- package/dist/PhonePublish/create-task/hour-enabled.less +24 -0
- package/dist/PhonePublish/create-task/index.d.ts +11 -0
- package/dist/PhonePublish/create-task/index.js +449 -0
- package/dist/PhonePublish/create-task/index.less +75 -0
- package/dist/PhonePublish/create-task/select-list.css.d.ts +5 -0
- package/dist/PhonePublish/create-task/select-list.css.js +6 -0
- package/dist/PhonePublish/create-task/select-list.d.ts +8 -0
- package/dist/PhonePublish/create-task/select-list.js +304 -0
- package/dist/PhonePublish/create-task/task-list.css.d.ts +5 -0
- package/dist/PhonePublish/create-task/task-list.css.js +6 -0
- package/dist/PhonePublish/create-task/task-list.d.ts +9 -0
- package/dist/PhonePublish/create-task/task-list.js +323 -0
- package/dist/PhonePublish/index.css.d.ts +2 -0
- package/dist/PhonePublish/index.css.js +35 -0
- package/dist/PhonePublish/index.d.ts +15 -0
- package/dist/PhonePublish/index.js +191 -0
- package/dist/PhonePublish/index.less +55 -0
- package/dist/PhonePublish/lib/chrome-quit.d.ts +2 -0
- package/dist/PhonePublish/lib/chrome-quit.js +20 -0
- package/dist/PhonePublish/log/index.d.ts +8 -0
- package/dist/PhonePublish/log/index.js +186 -0
- package/dist/PhonePublish/log/index.less +81 -0
- package/dist/PhonePublish/publish-task-plan/index.d.ts +9 -0
- package/dist/PhonePublish/publish-task-plan/index.js +32 -0
- package/dist/PhonePublish/publish-task-plan/index.less +4 -0
- package/dist/PhonePublish/publish-task-plan/tool-bak.txt +219 -0
- package/dist/PhonePublish/publish-task-plan/tool.d.ts +29 -0
- package/dist/PhonePublish/publish-task-plan/tool.js +720 -0
- package/dist/PhonePublish/task-list/index.d.ts +8 -0
- package/dist/PhonePublish/task-list/index.js +224 -0
- package/dist/PhonePublish/task-list/index.less +8 -0
- package/dist/PhonePublish/task-list/plan/list.d.ts +12 -0
- package/dist/PhonePublish/task-list/plan/list.js +290 -0
- package/dist/PhonePublish/task-list/plan/list.less +87 -0
- package/dist/PhonePublish/task-list/plan/operate.d.ts +8 -0
- package/dist/PhonePublish/task-list/plan/operate.js +145 -0
- package/dist/PhonePublish/task-list/plan/query.d.ts +8 -0
- package/dist/PhonePublish/task-list/plan/query.js +89 -0
- package/dist/PhonePublish/task-list/plan/query.less +9 -0
- package/dist/PhonePublish/task-list/plan/status.d.ts +13 -0
- package/dist/PhonePublish/task-list/plan/status.js +53 -0
- package/dist/PhonePublish/task-list/query.d.ts +8 -0
- package/dist/PhonePublish/task-list/query.js +76 -0
- package/dist/PhonePublish/task-list/query.less +19 -0
- package/dist/PhonePublish/task-list/who-can-view.d.ts +12 -0
- package/dist/PhonePublish/task-list/who-can-view.js +37 -0
- package/dist/PhonePublish/video-account/ban/index.d.ts +10 -0
- package/dist/PhonePublish/video-account/ban/index.js +94 -0
- package/dist/PhonePublish/video-account/ban/index.less +4 -0
- package/dist/PhonePublish/video-account/base-info.d.ts +13 -0
- package/dist/PhonePublish/video-account/base-info.js +75 -0
- package/dist/PhonePublish/video-account/base-info.less +92 -0
- package/dist/PhonePublish/video-account/create.d.ts +8 -0
- package/dist/PhonePublish/video-account/create.js +174 -0
- package/dist/PhonePublish/video-account/group.d.ts +9 -0
- package/dist/PhonePublish/video-account/group.js +255 -0
- package/dist/PhonePublish/video-account/group.less +10 -0
- package/dist/PhonePublish/video-account/index.d.ts +8 -0
- package/dist/PhonePublish/video-account/index.js +403 -0
- package/dist/PhonePublish/video-account/index.less +92 -0
- package/dist/PhonePublish/video-account/query.d.ts +8 -0
- package/dist/PhonePublish/video-account/query.js +115 -0
- package/dist/PhonePublish/video-account/query.less +18 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/index.d.ts +8 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/index.js +173 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/index.less +3 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/kind-list.d.ts +7 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/kind-list.js +22 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/query.d.ts +9 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/query.js +54 -0
- package/dist/PhonePublish/video-publish-statistic/account-trend/query.less +3 -0
- package/dist/PhonePublish/video-publish-statistic/index.d.ts +2 -0
- package/dist/PhonePublish/video-publish-statistic/index.js +37 -0
- package/dist/PhonePublish/video-publish-statistic/kind.d.ts +16 -0
- package/dist/PhonePublish/video-publish-statistic/kind.js +57 -0
- package/dist/PhonePublish/video-publish-statistic/operation/list.d.ts +7 -0
- package/dist/PhonePublish/video-publish-statistic/operation/list.js +242 -0
- package/dist/PhonePublish/video-publish-statistic/operation/list.less +10 -0
- package/dist/PhonePublish/video-publish-statistic/operation/query.d.ts +8 -0
- package/dist/PhonePublish/video-publish-statistic/operation/query.js +56 -0
- package/dist/PhonePublish/video-publish-statistic/operation/query.less +3 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/list.d.ts +8 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/list.js +257 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/list.less +105 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/query.d.ts +9 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/query.js +79 -0
- package/dist/PhonePublish/video-publish-statistic/publish-plan/query.less +3 -0
- package/dist/VideoPublish/account-manage/list.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/phone/index.d.ts +8 -0
- package/dist/phone/index.js +62 -0
- package/dist/phone/index.less +170 -0
- package/package.json +1 -1
@@ -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 "../../../VideoPublish/video-publish-statistic/account-trend/query";
|
13
|
+
import { Line } from '@ant-design/plots';
|
14
|
+
import VideoPublishStatisticOperationKindListPage from "./kind-list";
|
15
|
+
import sleep from "../../../lib/sleep";
|
16
|
+
import { VideoPublishStatisticOperationKindDict } from "../../../VideoPublish/video-publish-statistic/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,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,37 @@
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
2
|
+
import _objectDestructuringEmpty from "@babel/runtime/helpers/esm/objectDestructuringEmpty";
|
3
|
+
import VideoPublishStatisticPublishList from "./publish-plan/list";
|
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 "../../VideoPublish/video-publish-statistic/operation/list";
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
10
|
+
var VideoPublishStatisticPublish = function VideoPublishStatisticPublish(_ref) {
|
11
|
+
_objectDestructuringEmpty(_ref);
|
12
|
+
var _useState = useState([{
|
13
|
+
key: 'publish-video',
|
14
|
+
label: '发布任务',
|
15
|
+
children: /*#__PURE__*/_jsx(VideoPublishStatisticPublishList, {
|
16
|
+
env: getApiEnv(),
|
17
|
+
timeFromKind: "updated"
|
18
|
+
})
|
19
|
+
}, {
|
20
|
+
key: 'operation',
|
21
|
+
label: '视频数据',
|
22
|
+
children: /*#__PURE__*/_jsx(VideoPublishStatisticOperationList, {
|
23
|
+
env: getApiEnv()
|
24
|
+
})
|
25
|
+
}]),
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
27
|
+
itemsTabs = _useState2[0],
|
28
|
+
setItemsTabs = _useState2[1];
|
29
|
+
return /*#__PURE__*/_jsx(LayoutContent, {
|
30
|
+
children: /*#__PURE__*/_jsx(Tabs, {
|
31
|
+
defaultActiveKey: "publish-video",
|
32
|
+
items: itemsTabs,
|
33
|
+
type: "card"
|
34
|
+
})
|
35
|
+
});
|
36
|
+
};
|
37
|
+
export default VideoPublishStatisticPublish;
|
@@ -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;
|
@@ -0,0 +1,242 @@
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
4
|
+
import React, { useState } from "react";
|
5
|
+
import "./list.less";
|
6
|
+
import { useRequest } from "@umijs/hooks";
|
7
|
+
import * as VideoPublishStatisticOperationController from "../../../service/api/VideoPublishStatisticOperationController";
|
8
|
+
import { Button, Table, Tag } from "antd";
|
9
|
+
import VideoPublishVideoAccountBaseInfo from "../../../VideoPublish/video-account/base-info";
|
10
|
+
import LayoutContent from "../../../UI/LayoutContent";
|
11
|
+
import VideoPublishStatisticOperationListQuery from "./query";
|
12
|
+
import dayjs from "dayjs";
|
13
|
+
import Money from "../../../UI/Money";
|
14
|
+
import Tool from "../../../lib/Tool";
|
15
|
+
import VideoPublishStatisticAccountTrend from "../../../VideoPublish/video-publish-statistic/account-trend";
|
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";
|
19
|
+
var VideoPublishStatisticOperationList = function VideoPublishStatisticOperationList(_ref) {
|
20
|
+
var env = _ref.env;
|
21
|
+
var _useState = useState([]),
|
22
|
+
_useState2 = _slicedToArray(_useState, 2),
|
23
|
+
listData = _useState2[0],
|
24
|
+
setListData = _useState2[1];
|
25
|
+
var _useState3 = useState({
|
26
|
+
current: 1,
|
27
|
+
pageSize: 100,
|
28
|
+
total: 0,
|
29
|
+
simple: true,
|
30
|
+
showSizeChanger: false,
|
31
|
+
showQuickJumper: false
|
32
|
+
}),
|
33
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
34
|
+
pagination = _useState4[0],
|
35
|
+
setPagination = _useState4[1];
|
36
|
+
var _useState5 = useState({
|
37
|
+
time: Date.now() - 86400e3
|
38
|
+
}),
|
39
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
40
|
+
query = _useState6[0],
|
41
|
+
setQuery = _useState6[1];
|
42
|
+
var columns = [{
|
43
|
+
title: '序号',
|
44
|
+
dataIndex: '-',
|
45
|
+
key: '-',
|
46
|
+
render: function render(_, _1) {
|
47
|
+
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
48
|
+
return index + 1;
|
49
|
+
}
|
50
|
+
}, {
|
51
|
+
title: '发布账号',
|
52
|
+
dataIndex: 'platform',
|
53
|
+
key: 'platform',
|
54
|
+
render: function render(platform, record) {
|
55
|
+
return /*#__PURE__*/_jsx(VideoPublishVideoAccountBaseInfo, {
|
56
|
+
accountInfo: record === null || record === void 0 ? void 0 : record.accountInfo
|
57
|
+
});
|
58
|
+
}
|
59
|
+
}, {
|
60
|
+
title: '播放数',
|
61
|
+
dataIndex: 'play',
|
62
|
+
key: 'play',
|
63
|
+
render: function render(play) {
|
64
|
+
return /*#__PURE__*/_jsx(Money, {
|
65
|
+
pre: "",
|
66
|
+
end: "",
|
67
|
+
value: play,
|
68
|
+
precision: 0
|
69
|
+
});
|
70
|
+
}
|
71
|
+
}, {
|
72
|
+
title: '点赞数',
|
73
|
+
dataIndex: 'digg',
|
74
|
+
key: 'digg',
|
75
|
+
render: function render(digg) {
|
76
|
+
return /*#__PURE__*/_jsx(Money, {
|
77
|
+
pre: "",
|
78
|
+
end: "",
|
79
|
+
value: digg,
|
80
|
+
precision: 0
|
81
|
+
});
|
82
|
+
}
|
83
|
+
}, {
|
84
|
+
title: '分享数',
|
85
|
+
dataIndex: 'share',
|
86
|
+
key: 'share',
|
87
|
+
render: function render(share) {
|
88
|
+
return /*#__PURE__*/_jsx(Money, {
|
89
|
+
pre: "",
|
90
|
+
end: "",
|
91
|
+
value: share,
|
92
|
+
precision: 0
|
93
|
+
});
|
94
|
+
}
|
95
|
+
}, {
|
96
|
+
title: '评论数',
|
97
|
+
dataIndex: 'comment',
|
98
|
+
key: 'comment',
|
99
|
+
render: function render(comment) {
|
100
|
+
return /*#__PURE__*/_jsx(Money, {
|
101
|
+
pre: "",
|
102
|
+
end: "",
|
103
|
+
value: comment,
|
104
|
+
precision: 0
|
105
|
+
});
|
106
|
+
}
|
107
|
+
}, {
|
108
|
+
title: '净增粉丝',
|
109
|
+
dataIndex: 'netFans',
|
110
|
+
key: 'netFans',
|
111
|
+
render: function render(netFans) {
|
112
|
+
return /*#__PURE__*/_jsx(Money, {
|
113
|
+
pre: "",
|
114
|
+
end: "",
|
115
|
+
value: netFans,
|
116
|
+
precision: 0,
|
117
|
+
color: netFans < 0 ? '#C00' : ''
|
118
|
+
});
|
119
|
+
}
|
120
|
+
}, {
|
121
|
+
title: '掉粉',
|
122
|
+
dataIndex: 'cancelFans',
|
123
|
+
key: 'cancelFans',
|
124
|
+
render: function render(cancelFans) {
|
125
|
+
return /*#__PURE__*/_jsx(Money, {
|
126
|
+
pre: "",
|
127
|
+
end: "",
|
128
|
+
value: cancelFans,
|
129
|
+
precision: 0
|
130
|
+
});
|
131
|
+
}
|
132
|
+
}, {
|
133
|
+
title: '主页访问',
|
134
|
+
dataIndex: 'homepageView',
|
135
|
+
key: 'homepageView',
|
136
|
+
render: function render(homepageView) {
|
137
|
+
return /*#__PURE__*/_jsx(Money, {
|
138
|
+
pre: "",
|
139
|
+
end: "",
|
140
|
+
value: homepageView,
|
141
|
+
precision: 0
|
142
|
+
});
|
143
|
+
}
|
144
|
+
}, {
|
145
|
+
title: '总粉丝数',
|
146
|
+
dataIndex: 'totalFans',
|
147
|
+
key: 'totalFans',
|
148
|
+
render: function render(totalFans) {
|
149
|
+
return /*#__PURE__*/_jsx(Money, {
|
150
|
+
pre: "",
|
151
|
+
end: "",
|
152
|
+
value: totalFans,
|
153
|
+
precision: 0
|
154
|
+
});
|
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
|
+
}
|
171
|
+
}];
|
172
|
+
var _onQuery = function onQuery(query) {
|
173
|
+
setQuery(_objectSpread({}, query));
|
174
|
+
runTaskList(query, 1);
|
175
|
+
};
|
176
|
+
var _useRequest = useRequest(function () {
|
177
|
+
var postQuery = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : query;
|
178
|
+
var current = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : pagination.current;
|
179
|
+
return VideoPublishStatisticOperationController.list({
|
180
|
+
year: postQuery.time > 100000 ? dayjs(postQuery.time).year() : new Date().getFullYear(),
|
181
|
+
month: postQuery.time > 100000 ? dayjs(postQuery.time).month() + 1 : 1,
|
182
|
+
day: postQuery.time > 100000 ? dayjs(postQuery.time).date() : 1,
|
183
|
+
current: current,
|
184
|
+
pageSize: pagination.pageSize
|
185
|
+
}, {
|
186
|
+
env: env
|
187
|
+
});
|
188
|
+
}, {
|
189
|
+
onSuccess: function onSuccess(result) {
|
190
|
+
result.list.sort(function (a, b) {
|
191
|
+
return b.accountInfo.id - a.accountInfo.id;
|
192
|
+
});
|
193
|
+
setListData(_toConsumableArray(result.list));
|
194
|
+
// setPagination( result.pagination );
|
195
|
+
}
|
196
|
+
}),
|
197
|
+
runTaskList = _useRequest.run,
|
198
|
+
loadingTaskList = _useRequest.loading,
|
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
|
+
};
|
215
|
+
return /*#__PURE__*/_jsx(LayoutContent, {
|
216
|
+
loading: loadingTaskList,
|
217
|
+
error: errorTaskList,
|
218
|
+
onReload: runTaskList,
|
219
|
+
title: "\u89C6\u9891\u7ECF\u8425\u6570\u636E",
|
220
|
+
className: "video-publish-statistic-operation-list",
|
221
|
+
extInfo: /*#__PURE__*/_jsx(VideoPublishStatisticOperationListQuery, {
|
222
|
+
defaultQuery: query,
|
223
|
+
onQuery: function onQuery(query) {
|
224
|
+
return _onQuery(query);
|
225
|
+
}
|
226
|
+
}),
|
227
|
+
children: /*#__PURE__*/_jsx(Table, {
|
228
|
+
size: "small",
|
229
|
+
bordered: true,
|
230
|
+
rowKey: function rowKey(record) {
|
231
|
+
return "".concat(record.accountInfo.id);
|
232
|
+
}
|
233
|
+
// rowClassName={ ( record ) => `row-${ record.status }` }
|
234
|
+
,
|
235
|
+
loading: false,
|
236
|
+
columns: columns,
|
237
|
+
dataSource: listData,
|
238
|
+
pagination: false
|
239
|
+
})
|
240
|
+
});
|
241
|
+
};
|
242
|
+
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;
|