component-shipinlv 2.3.6 → 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 +45 -26
- package/dist/AuthClient/qr/index.css.js +1 -1
- 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/lib/Tool.d.ts +1 -1
- package/dist/phone/index.d.ts +8 -0
- package/dist/phone/index.js +62 -0
- package/dist/phone/index.less +170 -0
- package/dist/typings.d.ts +1 -1
- package/package.json +1 -1
@@ -0,0 +1,323 @@
|
|
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 { useRequest } from "@umijs/hooks";
|
5
|
+
import VideoPublishTaskController from "../../service/api/VideoPublishTaskController";
|
6
|
+
import React, { useEffect, useState } from "react";
|
7
|
+
import { Button, Checkbox, Popover, Space, Table } from "antd";
|
8
|
+
import Duration from "../../UI/duration";
|
9
|
+
import FileSize from "../../UI/FileSize";
|
10
|
+
import Time from "../../UI/Time";
|
11
|
+
import styles from "./task-list.css";
|
12
|
+
import DialogDrawerFooter from "../../UI/DialogDrawerFooter";
|
13
|
+
import { VideoKindTag } from "../..";
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
15
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
16
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
17
|
+
var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
|
18
|
+
var apiUrl = _ref.apiUrl,
|
19
|
+
_ref$defaultSelectLis = _ref.defaultSelectList,
|
20
|
+
defaultSelectList = _ref$defaultSelectLis === void 0 ? [] : _ref$defaultSelectLis,
|
21
|
+
productType = _ref.productType,
|
22
|
+
_ref$onFinish = _ref.onFinish,
|
23
|
+
onFinish = _ref$onFinish === void 0 ? function () {} : _ref$onFinish;
|
24
|
+
var _useState = useState([]),
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
26
|
+
listData = _useState2[0],
|
27
|
+
setListData = _useState2[1];
|
28
|
+
var _useState3 = useState({
|
29
|
+
current: 1,
|
30
|
+
pageSize: 20,
|
31
|
+
total: 0,
|
32
|
+
simple: true,
|
33
|
+
showSizeChanger: false
|
34
|
+
}),
|
35
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
36
|
+
pagination = _useState4[0],
|
37
|
+
setPagination = _useState4[1];
|
38
|
+
var _useState5 = useState({}),
|
39
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
40
|
+
selectDict = _useState6[0],
|
41
|
+
setSelectDict = _useState6[1];
|
42
|
+
var columns = [{
|
43
|
+
title: ' ',
|
44
|
+
dataIndex: 'id',
|
45
|
+
key: 'id',
|
46
|
+
render: function render(id, record) {
|
47
|
+
return (record === null || record === void 0 ? void 0 : record.taskStatus) === 'finish' || record !== null && record !== void 0 && record.finishUrl || record !== null && record !== void 0 && record.videoFinishUrl ? /*#__PURE__*/_jsx(Checkbox, {
|
48
|
+
value: id,
|
49
|
+
checked: !!selectDict[id],
|
50
|
+
onChange: function onChange(e) {
|
51
|
+
return onCheck(record, e.target.checked);
|
52
|
+
}
|
53
|
+
}) : null;
|
54
|
+
}
|
55
|
+
}, {
|
56
|
+
title: '序号',
|
57
|
+
dataIndex: 'id',
|
58
|
+
key: 'id'
|
59
|
+
}, {
|
60
|
+
title: '封面',
|
61
|
+
dataIndex: 'mediaFileCoverList',
|
62
|
+
key: 'mediaFileCoverList',
|
63
|
+
render: function render(mediaFileCoverList, record) {
|
64
|
+
var coverUrl = (mediaFileCoverList === null || mediaFileCoverList === void 0 ? void 0 : mediaFileCoverList[0]) || '';
|
65
|
+
return /*#__PURE__*/_jsx(Popover, {
|
66
|
+
title: /*#__PURE__*/_jsxs(_Fragment, {
|
67
|
+
children: ["\u4EFB\u52A1\u7F16\u53F7\uFF1A", record === null || record === void 0 ? void 0 : record.id]
|
68
|
+
}),
|
69
|
+
content: /*#__PURE__*/_jsx("div", {
|
70
|
+
className: "taskCoverUrl big",
|
71
|
+
style: {
|
72
|
+
backgroundImage: coverUrl ? "url('".concat(coverUrl, "')") : undefined
|
73
|
+
}
|
74
|
+
}),
|
75
|
+
children: /*#__PURE__*/_jsx("div", {
|
76
|
+
className: "taskCoverUrl",
|
77
|
+
style: {
|
78
|
+
backgroundImage: coverUrl ? "url('".concat(coverUrl, "')") : undefined
|
79
|
+
}
|
80
|
+
})
|
81
|
+
});
|
82
|
+
}
|
83
|
+
}, {
|
84
|
+
title: /*#__PURE__*/_jsx(_Fragment, {
|
85
|
+
children: "\u7C7B\u578B\u6807\u7B7E"
|
86
|
+
}),
|
87
|
+
dataIndex: 'videoKindTag',
|
88
|
+
key: 'videoKindTag',
|
89
|
+
render: function render(videoKindTag, record) {
|
90
|
+
return /*#__PURE__*/_jsx(VideoKindTag, {
|
91
|
+
videoKindTag: videoKindTag
|
92
|
+
});
|
93
|
+
}
|
94
|
+
}, {
|
95
|
+
title: /*#__PURE__*/_jsx(_Fragment, {
|
96
|
+
children: "\u5E26\u8D27/\u5C0F\u7A0B\u5E8F"
|
97
|
+
}),
|
98
|
+
dataIndex: 'kindTagValue',
|
99
|
+
key: 'kindTagValue',
|
100
|
+
render: function render(kindTagValue, record) {
|
101
|
+
return /*#__PURE__*/_jsx(Popover, {
|
102
|
+
title: kindTagValue,
|
103
|
+
children: /*#__PURE__*/_jsx("div", {
|
104
|
+
className: "kindTagValue",
|
105
|
+
children: kindTagValue
|
106
|
+
})
|
107
|
+
});
|
108
|
+
}
|
109
|
+
}, {
|
110
|
+
title: /*#__PURE__*/_jsx(_Fragment, {
|
111
|
+
children: "\u5546\u54C1\u6807\u9898"
|
112
|
+
}),
|
113
|
+
dataIndex: 'goodsTitle',
|
114
|
+
key: 'goodsTitle',
|
115
|
+
render: function render(goodsTitle, record) {
|
116
|
+
return /*#__PURE__*/_jsx(Popover, {
|
117
|
+
title: goodsTitle,
|
118
|
+
children: /*#__PURE__*/_jsx("div", {
|
119
|
+
className: "goodsTitle",
|
120
|
+
children: goodsTitle
|
121
|
+
})
|
122
|
+
});
|
123
|
+
}
|
124
|
+
}, {
|
125
|
+
title: '备注',
|
126
|
+
dataIndex: 'remark',
|
127
|
+
key: 'remark',
|
128
|
+
render: function render(remark, record) {
|
129
|
+
return /*#__PURE__*/_jsx(Popover, {
|
130
|
+
title: "\u5907\u6CE8",
|
131
|
+
content: remark,
|
132
|
+
children: /*#__PURE__*/_jsx("div", {
|
133
|
+
className: "remark",
|
134
|
+
children: remark
|
135
|
+
})
|
136
|
+
});
|
137
|
+
}
|
138
|
+
}, {
|
139
|
+
title: /*#__PURE__*/_jsx(_Fragment, {
|
140
|
+
children: "\u65F6\u957F"
|
141
|
+
}),
|
142
|
+
dataIndex: 'videoDuration',
|
143
|
+
key: 'videoDuration',
|
144
|
+
render: function render(videoDuration, record) {
|
145
|
+
return videoDuration > 0 ? /*#__PURE__*/_jsx(Duration, {
|
146
|
+
duration: videoDuration
|
147
|
+
}) : '-';
|
148
|
+
}
|
149
|
+
}, {
|
150
|
+
title: /*#__PURE__*/_jsx(_Fragment, {
|
151
|
+
children: "\u5927\u5C0F"
|
152
|
+
}),
|
153
|
+
dataIndex: 'videoSize',
|
154
|
+
key: 'videoSize',
|
155
|
+
render: function render(videoSize, record) {
|
156
|
+
return videoSize > 0 ? /*#__PURE__*/_jsx(FileSize, {
|
157
|
+
fileSize: videoSize
|
158
|
+
}) : '-';
|
159
|
+
}
|
160
|
+
}, {
|
161
|
+
title: '创建时间',
|
162
|
+
dataIndex: 'created',
|
163
|
+
key: 'created',
|
164
|
+
render: function render(created) {
|
165
|
+
return /*#__PURE__*/_jsx(Time, {
|
166
|
+
time: created
|
167
|
+
});
|
168
|
+
}
|
169
|
+
}];
|
170
|
+
var _useRequest = useRequest(function () {
|
171
|
+
var _VideoPublishTaskCont;
|
172
|
+
var current = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pagination.current;
|
173
|
+
return VideoPublishTaskController === null || VideoPublishTaskController === void 0 || (_VideoPublishTaskCont = VideoPublishTaskController[productType]) === null || _VideoPublishTaskCont === void 0 ? void 0 : _VideoPublishTaskCont.call(VideoPublishTaskController, apiUrl, {
|
174
|
+
taskStatus: 'finish',
|
175
|
+
current: current,
|
176
|
+
pageSize: pagination.pageSize
|
177
|
+
});
|
178
|
+
}, {
|
179
|
+
onSuccess: function onSuccess(result) {
|
180
|
+
// listData.push( ...result.list );
|
181
|
+
pagination.total = result.pagination.total;
|
182
|
+
setPagination(_objectSpread({}, pagination));
|
183
|
+
setListData(_toConsumableArray(result.list));
|
184
|
+
}
|
185
|
+
}),
|
186
|
+
run = _useRequest.run,
|
187
|
+
loading = _useRequest.loading,
|
188
|
+
error = _useRequest.error;
|
189
|
+
var onCheck = function onCheck(items, checked) {
|
190
|
+
if (checked) {
|
191
|
+
selectDict[items.id] = {
|
192
|
+
id: items.id,
|
193
|
+
title: items.title,
|
194
|
+
videoSize: items.videoSize,
|
195
|
+
videoDuration: items.videoDuration,
|
196
|
+
videoFinishUrl: items.videoFinishUrl || items.finishUrl || '',
|
197
|
+
videoKindTag: items.videoKindTag || '',
|
198
|
+
kindTagValue: items.kindTagValue || '',
|
199
|
+
introduction: items.introduction || '',
|
200
|
+
goodsTitle: items.goodsTitle || '',
|
201
|
+
publishCoverFrom: items.publishCoverFrom || '',
|
202
|
+
whoCanView: items.whoCanView || '0',
|
203
|
+
downloadContent: items.downloadContent || '1'
|
204
|
+
};
|
205
|
+
} else {
|
206
|
+
delete selectDict[items.id];
|
207
|
+
}
|
208
|
+
setSelectDict(_objectSpread({}, selectDict));
|
209
|
+
};
|
210
|
+
var onSelectCurrentPage = function onSelectCurrentPage() {
|
211
|
+
//全选本页
|
212
|
+
listData.forEach(function (items) {
|
213
|
+
if (!items.finishUrl && !items.videoFinishUrl) {
|
214
|
+
return;
|
215
|
+
}
|
216
|
+
selectDict[items.id] = {
|
217
|
+
id: items.id,
|
218
|
+
title: items.title,
|
219
|
+
videoSize: items.videoSize,
|
220
|
+
videoDuration: items.videoDuration,
|
221
|
+
videoFinishUrl: items.videoFinishUrl || items.finishUrl || '',
|
222
|
+
videoKindTag: items.videoKindTag || '',
|
223
|
+
kindTagValue: items.kindTagValue || '',
|
224
|
+
introduction: items.introduction || '',
|
225
|
+
goodsTitle: items.goodsTitle || '',
|
226
|
+
publishCoverFrom: items.publishCoverFrom || '',
|
227
|
+
whoCanView: items.whoCanView || '0',
|
228
|
+
downloadContent: items.downloadContent || '1'
|
229
|
+
};
|
230
|
+
});
|
231
|
+
setSelectDict(_objectSpread({}, selectDict));
|
232
|
+
};
|
233
|
+
var onCancelCurrentPage = function onCancelCurrentPage() {
|
234
|
+
listData.forEach(function (items) {
|
235
|
+
if (!selectDict[items.id]) {
|
236
|
+
return;
|
237
|
+
}
|
238
|
+
delete selectDict[items.id];
|
239
|
+
});
|
240
|
+
setSelectDict(_objectSpread({}, selectDict));
|
241
|
+
};
|
242
|
+
var onSubmit = function onSubmit() {
|
243
|
+
// const list: VideoPublish.VideoSelectList[] = []
|
244
|
+
// Object.values( selectDict ).forEach( items => {
|
245
|
+
// list.push({
|
246
|
+
// id: items.id,
|
247
|
+
// title: items.title,
|
248
|
+
// videoSize: items.videoSize,
|
249
|
+
// videoDuration: items.videoDuration,
|
250
|
+
// })
|
251
|
+
// });
|
252
|
+
onFinish(Object.values(selectDict));
|
253
|
+
};
|
254
|
+
useEffect(function () {
|
255
|
+
defaultSelectList === null || defaultSelectList === void 0 || defaultSelectList.forEach(function (items) {
|
256
|
+
selectDict[items.id] = items;
|
257
|
+
});
|
258
|
+
setSelectDict(_objectSpread({}, selectDict));
|
259
|
+
}, []);
|
260
|
+
return /*#__PURE__*/_jsxs(styles.videoPublishTaskList, {
|
261
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
262
|
+
className: "operate",
|
263
|
+
children: [/*#__PURE__*/_jsx("div", {
|
264
|
+
className: "left",
|
265
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
266
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
267
|
+
size: "small",
|
268
|
+
type: "primary",
|
269
|
+
ghost: true,
|
270
|
+
onClick: onSelectCurrentPage,
|
271
|
+
children: "\u9009\u62E9\u672C\u9875"
|
272
|
+
}), /*#__PURE__*/_jsx(Button, {
|
273
|
+
size: "small",
|
274
|
+
type: "primary",
|
275
|
+
ghost: true,
|
276
|
+
onClick: onCancelCurrentPage,
|
277
|
+
children: "\u53D6\u6D88\u9009\u62E9\u672C\u9875"
|
278
|
+
})]
|
279
|
+
})
|
280
|
+
}), /*#__PURE__*/_jsxs("div", {
|
281
|
+
className: "showInfo",
|
282
|
+
children: ["\u5DF2\u9009\u62E9\uFF1A", /*#__PURE__*/_jsx("strong", {
|
283
|
+
className: "high",
|
284
|
+
children: Object.keys(selectDict).length
|
285
|
+
}), /*#__PURE__*/_jsx("small", {
|
286
|
+
children: "\u6761"
|
287
|
+
})]
|
288
|
+
})]
|
289
|
+
}), /*#__PURE__*/_jsx(Table, {
|
290
|
+
size: "small",
|
291
|
+
bordered: true,
|
292
|
+
rowKey: function rowKey(record) {
|
293
|
+
return "".concat(record.id);
|
294
|
+
},
|
295
|
+
loading: loading,
|
296
|
+
columns: columns,
|
297
|
+
locale: {
|
298
|
+
emptyText: error ? /*#__PURE__*/_jsx("a", {
|
299
|
+
onClick: function onClick() {
|
300
|
+
return run();
|
301
|
+
},
|
302
|
+
children: "\u91CD\u8BD5"
|
303
|
+
}) : '[无]'
|
304
|
+
},
|
305
|
+
dataSource: listData,
|
306
|
+
pagination: pagination,
|
307
|
+
onChange: function onChange(_ref2) {
|
308
|
+
var current = _ref2.current;
|
309
|
+
pagination.current = current || 1;
|
310
|
+
run(pagination.current);
|
311
|
+
}
|
312
|
+
}), /*#__PURE__*/_jsx(DialogDrawerFooter, {
|
313
|
+
children: /*#__PURE__*/_jsx(Button, {
|
314
|
+
type: "primary",
|
315
|
+
onClick: function onClick() {
|
316
|
+
return onSubmit();
|
317
|
+
},
|
318
|
+
children: "\u786E\u5B9A"
|
319
|
+
})
|
320
|
+
})]
|
321
|
+
});
|
322
|
+
};
|
323
|
+
export default VideoPublishTaskList;
|
@@ -0,0 +1,35 @@
|
|
1
|
+
export default {
|
2
|
+
// videoPublish: styled.div`
|
3
|
+
// display: flex;
|
4
|
+
// flex-direction: row;
|
5
|
+
// height: 100%;
|
6
|
+
// .menu{
|
7
|
+
// display: flex;
|
8
|
+
// flex-direction: column;
|
9
|
+
// width: 180px;
|
10
|
+
// margin: 0 12px 0 0;
|
11
|
+
// padding: 0 10px 0 0;
|
12
|
+
// min-height: 100%;
|
13
|
+
// border-right: 1px solid #E8E8E8;
|
14
|
+
// .ant-menu{
|
15
|
+
// margin: 10px 0 0;
|
16
|
+
// }
|
17
|
+
// .ant-menu-light{
|
18
|
+
// background-color: transparent !important;
|
19
|
+
// border-right: none !important;
|
20
|
+
// }
|
21
|
+
// }
|
22
|
+
// .pageContents{
|
23
|
+
// flex: 1;
|
24
|
+
// padding: 10px 0 0 0;
|
25
|
+
// overflow-y: auto;
|
26
|
+
// .my-tabs{
|
27
|
+
// width: 100%;
|
28
|
+
// > .ant-tabs-nav{
|
29
|
+
// display: none;
|
30
|
+
// }
|
31
|
+
// }
|
32
|
+
// }
|
33
|
+
//
|
34
|
+
// `,
|
35
|
+
};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import "./index.less";
|
3
|
+
interface Props {
|
4
|
+
disabled?: boolean;
|
5
|
+
canPublish: boolean;
|
6
|
+
notVip: boolean;
|
7
|
+
contentHeight?: number | string;
|
8
|
+
productType: VideoPublish.ProductType;
|
9
|
+
apiUrl: string;
|
10
|
+
env?: Global.Env;
|
11
|
+
clientIdentity: string;
|
12
|
+
openLocalBrowser: (url: string) => void;
|
13
|
+
}
|
14
|
+
declare const VideoPublish: React.FC<Props>;
|
15
|
+
export default VideoPublish;
|
@@ -0,0 +1,191 @@
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
2
|
+
import React, { useEffect, useState } from "react";
|
3
|
+
import "./index.less";
|
4
|
+
import { Menu, Tabs } from "antd";
|
5
|
+
import isInClient from "../lib/isInClient";
|
6
|
+
import { FieldTimeOutlined, FileSearchOutlined, FileTextOutlined, PieChartOutlined, QuestionCircleOutlined, SettingOutlined, UsergroupAddOutlined, VideoCameraAddOutlined } from "@ant-design/icons";
|
7
|
+
import VideoPublishVideoAccount from "./video-account";
|
8
|
+
import VideoPublishLog from "./log";
|
9
|
+
import VideoPublishAccountManageSettingPage from "./account-manage/setting";
|
10
|
+
import VideoPublishAccountManageHomePage from "./account-manage/home";
|
11
|
+
import VideoPublishPublishVideoPlan from "./publish-task-plan";
|
12
|
+
import VideoPublishTaskPlanList from "./task-list/plan/list";
|
13
|
+
import VideoPublishStatisticPublish from "./video-publish-statistic";
|
14
|
+
import saveSid from "../lib/saveSid";
|
15
|
+
import VideoStudyPage from "../video-study";
|
16
|
+
import ActiveAccountMode from "../ActiveAccountMode";
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
18
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
19
|
+
var VideoPublish = function VideoPublish(_ref) {
|
20
|
+
var disabled = _ref.disabled,
|
21
|
+
_ref$canPublish = _ref.canPublish,
|
22
|
+
canPublish = _ref$canPublish === void 0 ? false : _ref$canPublish,
|
23
|
+
notVip = _ref.notVip,
|
24
|
+
contentHeight = _ref.contentHeight,
|
25
|
+
productType = _ref.productType,
|
26
|
+
apiUrl = _ref.apiUrl,
|
27
|
+
env = _ref.env,
|
28
|
+
clientIdentity = _ref.clientIdentity,
|
29
|
+
openLocalBrowser = _ref.openLocalBrowser;
|
30
|
+
var _useState = useState([]),
|
31
|
+
_useState2 = _slicedToArray(_useState, 2),
|
32
|
+
menuList = _useState2[0],
|
33
|
+
setMenuList = _useState2[1];
|
34
|
+
var _useState3 = useState(''),
|
35
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
36
|
+
activeKey = _useState4[0],
|
37
|
+
setActiveKey = _useState4[1];
|
38
|
+
var _useState5 = useState([]),
|
39
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
40
|
+
tabsItems = _useState6[0],
|
41
|
+
setTabsItems = _useState6[1];
|
42
|
+
var MenuAllList = [{
|
43
|
+
key: 'long-video-sales-create',
|
44
|
+
icon: /*#__PURE__*/_jsx(VideoCameraAddOutlined, {}),
|
45
|
+
label: '添加账号',
|
46
|
+
disabled: false,
|
47
|
+
children: /*#__PURE__*/_jsx(VideoPublishAccountManageHomePage, {
|
48
|
+
apiUrl: apiUrl,
|
49
|
+
env: env,
|
50
|
+
notVip: notVip,
|
51
|
+
canPublish: canPublish,
|
52
|
+
onMenu: function onMenu(key) {
|
53
|
+
return _onMenu(key);
|
54
|
+
}
|
55
|
+
})
|
56
|
+
}, {
|
57
|
+
key: 'video-account',
|
58
|
+
icon: /*#__PURE__*/_jsx(UsergroupAddOutlined, {}),
|
59
|
+
label: '管理账户',
|
60
|
+
children: /*#__PURE__*/_jsx(VideoPublishVideoAccount, {
|
61
|
+
disabled: disabled,
|
62
|
+
env: env
|
63
|
+
})
|
64
|
+
}, {
|
65
|
+
key: 'activeAccountMode',
|
66
|
+
icon: /*#__PURE__*/_jsx(FieldTimeOutlined, {}),
|
67
|
+
label: '养号模式',
|
68
|
+
forceRender: true,
|
69
|
+
children: /*#__PURE__*/_jsx(ActiveAccountMode, {
|
70
|
+
disabled: disabled,
|
71
|
+
env: env,
|
72
|
+
notVip: notVip
|
73
|
+
})
|
74
|
+
}, {
|
75
|
+
key: 'task-plan-list',
|
76
|
+
icon: /*#__PURE__*/_jsx(FileTextOutlined, {}),
|
77
|
+
label: '发布任务计划',
|
78
|
+
// disabled: ! canPublish,
|
79
|
+
children: /*#__PURE__*/_jsx(VideoPublishTaskPlanList, {
|
80
|
+
env: env,
|
81
|
+
publishTaskId: 0,
|
82
|
+
timeFromKind: "updated"
|
83
|
+
})
|
84
|
+
}, {
|
85
|
+
key: 'statistic',
|
86
|
+
icon: /*#__PURE__*/_jsx(PieChartOutlined, {}),
|
87
|
+
label: '统计',
|
88
|
+
children: /*#__PURE__*/_jsx(VideoPublishStatisticPublish, {})
|
89
|
+
}, {
|
90
|
+
key: 'setting',
|
91
|
+
icon: /*#__PURE__*/_jsx(SettingOutlined, {}),
|
92
|
+
label: '配置',
|
93
|
+
// disabled: ! canPublish,
|
94
|
+
children: /*#__PURE__*/_jsx(VideoPublishAccountManageSettingPage, {})
|
95
|
+
}, {
|
96
|
+
key: 'publish-log',
|
97
|
+
icon: /*#__PURE__*/_jsx(FileSearchOutlined, {}),
|
98
|
+
label: '发布日志',
|
99
|
+
// disabled: ! canPublish,
|
100
|
+
forceRender: canPublish,
|
101
|
+
children: /*#__PURE__*/_jsx(VideoPublishLog, {
|
102
|
+
env: env,
|
103
|
+
clientIdentity: clientIdentity
|
104
|
+
})
|
105
|
+
}, {
|
106
|
+
key: 'video-study',
|
107
|
+
icon: /*#__PURE__*/_jsx(QuestionCircleOutlined, {}),
|
108
|
+
label: '视频教程',
|
109
|
+
children: /*#__PURE__*/_jsx(VideoStudyPage, {
|
110
|
+
title: "\u53D1\u5E03\u529F\u80FD \xB7 \u89C6\u9891\u6559\u7A0B",
|
111
|
+
productType: "fafamao-video",
|
112
|
+
env: env,
|
113
|
+
openLocalBrowser: openLocalBrowser
|
114
|
+
})
|
115
|
+
}];
|
116
|
+
var _onMenu = function _onMenu(key) {
|
117
|
+
setActiveKey(key);
|
118
|
+
};
|
119
|
+
var onInit = function onInit() {
|
120
|
+
var _menuList$;
|
121
|
+
var tabsItems = [];
|
122
|
+
var menuList = [];
|
123
|
+
var isClient = isInClient();
|
124
|
+
MenuAllList.forEach(function (items) {
|
125
|
+
// 不渲染
|
126
|
+
if (isClient && items.key === 'media-space') {
|
127
|
+
return;
|
128
|
+
}
|
129
|
+
tabsItems.push(items);
|
130
|
+
menuList.push({
|
131
|
+
key: items.key,
|
132
|
+
icon: items.icon,
|
133
|
+
label: items.label,
|
134
|
+
disabled: items.disabled
|
135
|
+
});
|
136
|
+
});
|
137
|
+
setTabsItems([].concat(tabsItems));
|
138
|
+
setMenuList([].concat(menuList));
|
139
|
+
setActiveKey(((_menuList$ = menuList[0]) === null || _menuList$ === void 0 ? void 0 : _menuList$.key) || '');
|
140
|
+
saveSid();
|
141
|
+
setInterval(function () {
|
142
|
+
saveSid();
|
143
|
+
}, 3 * 6e4);
|
144
|
+
};
|
145
|
+
useEffect(function () {
|
146
|
+
onInit();
|
147
|
+
}, []);
|
148
|
+
return /*#__PURE__*/_jsxs("div", {
|
149
|
+
style: {
|
150
|
+
minHeight: contentHeight ? contentHeight : '100%'
|
151
|
+
},
|
152
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
153
|
+
className: "videoPublish",
|
154
|
+
style: {
|
155
|
+
height: contentHeight ? contentHeight : '100%'
|
156
|
+
},
|
157
|
+
children: [/*#__PURE__*/_jsx("div", {
|
158
|
+
className: "menuBox",
|
159
|
+
children: /*#__PURE__*/_jsx("div", {
|
160
|
+
className: "menuWarp",
|
161
|
+
children: /*#__PURE__*/_jsx(Menu, {
|
162
|
+
className: "menu",
|
163
|
+
onClick: function onClick(e) {
|
164
|
+
return _onMenu(e.key);
|
165
|
+
},
|
166
|
+
style: {
|
167
|
+
width: '100%'
|
168
|
+
},
|
169
|
+
mode: "inline"
|
170
|
+
// defaultSelectedKeys={[ activeKey ]}
|
171
|
+
,
|
172
|
+
selectedKeys: [activeKey],
|
173
|
+
items: menuList
|
174
|
+
})
|
175
|
+
})
|
176
|
+
}), /*#__PURE__*/_jsx("div", {
|
177
|
+
className: "pageContents",
|
178
|
+
children: /*#__PURE__*/_jsx(Tabs, {
|
179
|
+
activeKey: activeKey,
|
180
|
+
className: "my-tabs",
|
181
|
+
items: tabsItems
|
182
|
+
})
|
183
|
+
})]
|
184
|
+
}), /*#__PURE__*/_jsx(VideoPublishPublishVideoPlan, {
|
185
|
+
disabled: disabled,
|
186
|
+
env: env,
|
187
|
+
clientIdentity: clientIdentity
|
188
|
+
})]
|
189
|
+
});
|
190
|
+
};
|
191
|
+
export default VideoPublish;
|
@@ -0,0 +1,55 @@
|
|
1
|
+
.videoPublish {
|
2
|
+
display: flex;
|
3
|
+
flex-direction: row;
|
4
|
+
height: 100%;
|
5
|
+
position: static;
|
6
|
+
|
7
|
+
.menuBox {
|
8
|
+
display: flex;
|
9
|
+
flex-direction: column;
|
10
|
+
width: 180px;
|
11
|
+
//margin: 0 12px 0 0;
|
12
|
+
padding: 0 10px 0 0;
|
13
|
+
min-height: 100%;
|
14
|
+
height: 100%;
|
15
|
+
|
16
|
+
border-right: 1px solid #E8E8E8;
|
17
|
+
|
18
|
+
.menuWarp{
|
19
|
+
position: fixed;
|
20
|
+
width: 170px;
|
21
|
+
margin: 0 12px 0 0;
|
22
|
+
overflow-y: auto;
|
23
|
+
}
|
24
|
+
.menu{
|
25
|
+
}
|
26
|
+
|
27
|
+
.ant-menu {
|
28
|
+
|
29
|
+
}
|
30
|
+
|
31
|
+
.ant-menu-light {
|
32
|
+
background-color: transparent !important;
|
33
|
+
border-right: none !important;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
.pageContents {
|
38
|
+
flex: 1;
|
39
|
+
padding: 16px 16px 40px 16px ;
|
40
|
+
overflow-y: auto;
|
41
|
+
min-height: 60vh;
|
42
|
+
.my-tabs {
|
43
|
+
width: 100%;
|
44
|
+
.ktv-ai-pageContentBox{
|
45
|
+
> h2{
|
46
|
+
margin-top: 0;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
> .ant-tabs-nav {
|
51
|
+
display: none;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
3
|
+
import * as LocalServerController from "../../service/local/LocalServerController";
|
4
|
+
var chromeQuit = /*#__PURE__*/function () {
|
5
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(query) {
|
6
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
7
|
+
while (1) switch (_context.prev = _context.next) {
|
8
|
+
case 0:
|
9
|
+
return _context.abrupt("return", LocalServerController.chromeQuit(query));
|
10
|
+
case 1:
|
11
|
+
case "end":
|
12
|
+
return _context.stop();
|
13
|
+
}
|
14
|
+
}, _callee);
|
15
|
+
}));
|
16
|
+
return function chromeQuit(_x) {
|
17
|
+
return _ref.apply(this, arguments);
|
18
|
+
};
|
19
|
+
}();
|
20
|
+
export default chromeQuit;
|