component-shipinlv 1.0.9 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/dist/AuthClient/qr/index.css.js +1 -1
  2. package/dist/UI/DialogDrawerFooter.css.js +1 -1
  3. package/dist/UI/FileSize.css.d.ts +5 -0
  4. package/dist/UI/FileSize.css.js +6 -0
  5. package/dist/UI/FileSize.d.ts +10 -0
  6. package/dist/UI/FileSize.js +63 -0
  7. package/dist/UI/LoadError.css.js +1 -1
  8. package/dist/UI/Time.d.ts +8 -0
  9. package/dist/UI/Time.js +19 -0
  10. package/dist/UI/duration.css.d.ts +5 -0
  11. package/dist/UI/duration.css.js +6 -0
  12. package/dist/UI/duration.d.ts +6 -0
  13. package/dist/UI/duration.js +49 -0
  14. package/dist/UI/text-input.d.ts +13 -0
  15. package/dist/UI/text-input.js +108 -0
  16. package/dist/UI/text-input.less +19 -0
  17. package/dist/VideoPublish/creat-task/index.css.d.ts +5 -0
  18. package/dist/VideoPublish/creat-task/index.css.js +6 -0
  19. package/dist/VideoPublish/creat-task/index.d.ts +8 -0
  20. package/dist/VideoPublish/creat-task/index.js +454 -0
  21. package/dist/VideoPublish/creat-task/select-list.css.d.ts +5 -0
  22. package/dist/VideoPublish/creat-task/select-list.css.js +6 -0
  23. package/dist/VideoPublish/creat-task/select-list.d.ts +8 -0
  24. package/dist/VideoPublish/creat-task/select-list.js +258 -0
  25. package/dist/VideoPublish/creat-task/task-list.css.d.ts +5 -0
  26. package/dist/VideoPublish/creat-task/task-list.css.js +6 -0
  27. package/dist/VideoPublish/creat-task/task-list.d.ts +9 -0
  28. package/dist/VideoPublish/creat-task/task-list.js +300 -0
  29. package/dist/VideoPublish/index.css.d.ts +5 -0
  30. package/dist/VideoPublish/index.css.js +6 -0
  31. package/dist/VideoPublish/index.d.ts +9 -0
  32. package/dist/VideoPublish/index.js +106 -0
  33. package/dist/VideoPublish/index.less +38 -0
  34. package/dist/VideoPublish/task-list/index.d.ts +7 -0
  35. package/dist/VideoPublish/task-list/index.js +120 -0
  36. package/dist/VideoPublish/task-list/index.less +5 -0
  37. package/dist/VideoPublish/video-account/index.d.ts +7 -0
  38. package/dist/VideoPublish/video-account/index.js +109 -0
  39. package/dist/VideoPublish/video-account/index.less +5 -0
  40. package/dist/asset/image/platform/bilibili.png +0 -0
  41. package/dist/asset/image/platform/douyin.png +0 -0
  42. package/dist/asset/image/platform/douyu.png +0 -0
  43. package/dist/asset/image/platform/huya.png +0 -0
  44. package/dist/asset/image/platform/kuaishou.png +0 -0
  45. package/dist/asset/image/platform/youtube.png +0 -0
  46. package/dist/component/media-kind.d.ts +10 -0
  47. package/dist/component/media-kind.js +24 -0
  48. package/dist/component/media-show.d.ts +13 -0
  49. package/dist/component/media-show.js +84 -0
  50. package/dist/component/media-show.less +53 -0
  51. package/dist/component/video-platform/logo.d.ts +22 -0
  52. package/dist/component/video-platform/logo.js +72 -0
  53. package/dist/component/video-platform/logo.less +42 -0
  54. package/dist/component/videoKindTag/index.d.ts +13 -0
  55. package/dist/component/videoKindTag/index.js +44 -0
  56. package/dist/global.less +4 -0
  57. package/dist/index.d.ts +5 -0
  58. package/dist/index.js +5 -0
  59. package/dist/join-client/index.css.js +1 -1
  60. package/dist/lib/Tool.d.ts +4 -1
  61. package/dist/lib/Tool.js +39 -0
  62. package/dist/lib/component/getImageUrl.d.ts +2 -0
  63. package/dist/lib/component/getImageUrl.js +8 -0
  64. package/dist/lib/component/getSoundUrl.d.ts +2 -0
  65. package/dist/lib/component/getSoundUrl.js +9 -0
  66. package/dist/lib/component/getVideoUrl.d.ts +2 -0
  67. package/dist/lib/component/getVideoUrl.js +9 -0
  68. package/dist/lib/isInClient.js +2 -1
  69. package/dist/lib/request.js +1 -1
  70. package/dist/lib/updateUserInfo.js +1 -0
  71. package/dist/renewal-vip/index.js +2 -1
  72. package/dist/service/api/VideoPublishController.d.ts +11 -0
  73. package/dist/service/api/VideoPublishController.js +85 -0
  74. package/dist/service/api/VideoPublishTaskController.d.ts +8 -0
  75. package/dist/service/api/VideoPublishTaskController.js +29 -0
  76. package/dist/types/VideoPublish.d.ts +112 -0
  77. package/dist/types/VideoPublish.js +0 -0
  78. package/dist/typings.d.ts +3 -0
  79. package/package.json +1 -1
@@ -0,0 +1,258 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
4
+ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
5
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
6
+ import React, { useState } from "react";
7
+ import { Button, Popover, Select, Space, Table } from "antd";
8
+ import Duration from "../../UI/duration";
9
+ import FileSize from "../../UI/FileSize";
10
+ import styles from "./select-list.css";
11
+ import TextInput from "../../UI/text-input";
12
+ import VideoKindTag, { VideoKindTagList } from "../../component/videoKindTag";
13
+ import { FolderOpenOutlined, UnorderedListOutlined } from "@ant-design/icons";
14
+ import { onMediaShowView } from "../../component/media-show";
15
+ import Tool from "../../lib/Tool";
16
+ import openInFolder from "../../base/openInFolder";
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
+ import { jsxs as _jsxs } from "react/jsx-runtime";
19
+ import { Fragment as _Fragment } from "react/jsx-runtime";
20
+ var VideoPublishSelectList = function VideoPublishSelectList(_ref) {
21
+ var _ref$from = _ref.from,
22
+ from = _ref$from === void 0 ? '' : _ref$from,
23
+ _ref$list = _ref.list,
24
+ list = _ref$list === void 0 ? [] : _ref$list,
25
+ _ref$onList = _ref.onList,
26
+ onList = _ref$onList === void 0 ? function () {} : _ref$onList;
27
+ var _useState = useState({}),
28
+ _useState2 = _slicedToArray(_useState, 2),
29
+ loadingOpenDirDict = _useState2[0],
30
+ setLoadingOpenDirDict = _useState2[1];
31
+ var columns = [{
32
+ title: '序号',
33
+ dataIndex: '-',
34
+ key: '-',
35
+ render: function render(_, _1) {
36
+ var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
37
+ return index + 1;
38
+ }
39
+ }, {
40
+ title: '编号',
41
+ dataIndex: 'id',
42
+ key: 'id'
43
+ }, {
44
+ title: '标题',
45
+ dataIndex: 'title',
46
+ key: 'title',
47
+ render: function render(title, record) {
48
+ var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
49
+ return /*#__PURE__*/_jsx(Popover, {
50
+ title: "\u6807\u9898",
51
+ content: title,
52
+ children: /*#__PURE__*/_jsx("div", {
53
+ className: "title",
54
+ children: /*#__PURE__*/_jsx(TextInput, {
55
+ className: "remarkInput",
56
+ maxLength: 20,
57
+ label: title || '',
58
+ value: title || '',
59
+ onFinish: function onFinish(title) {
60
+ onItem(index, 'title', title);
61
+ }
62
+ })
63
+ })
64
+ });
65
+ }
66
+ }, {
67
+ title: '简介',
68
+ dataIndex: 'introduction',
69
+ key: 'introduction',
70
+ render: function render(introduction, record) {
71
+ var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
72
+ return /*#__PURE__*/_jsx(Popover, {
73
+ title: "\u7B80\u4ECB",
74
+ content: introduction,
75
+ children: /*#__PURE__*/_jsx("div", {
76
+ className: "remark",
77
+ children: /*#__PURE__*/_jsx(TextInput, {
78
+ type: "textarea",
79
+ className: "remarkInput",
80
+ maxLength: 1000,
81
+ label: introduction || '',
82
+ value: introduction || '',
83
+ onFinish: function onFinish(introduction) {
84
+ onItem(index, 'introduction', introduction);
85
+ }
86
+ })
87
+ })
88
+ });
89
+ }
90
+ }, {
91
+ title: '类型标签',
92
+ dataIndex: 'videoKindTag',
93
+ key: 'videoKindTag',
94
+ render: function render(videoKindTag, record) {
95
+ var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
96
+ return /*#__PURE__*/_jsxs(Select, {
97
+ defaultValue: videoKindTag,
98
+ className: "videoKindTag",
99
+ onChange: function onChange(e) {
100
+ return onVideoKindTag(index, e);
101
+ },
102
+ children: [/*#__PURE__*/_jsxs(Select.Option, {
103
+ value: "",
104
+ children: [/*#__PURE__*/_jsx(UnorderedListOutlined, {}), " [\u65E0]"]
105
+ }), VideoKindTagList.map(function (item) {
106
+ return /*#__PURE__*/_jsx(Select.Option, {
107
+ value: item.videoKindTag,
108
+ children: /*#__PURE__*/_jsx(VideoKindTag, {
109
+ videoKindTag: item.videoKindTag
110
+ })
111
+ }, item.videoKindTag);
112
+ })]
113
+ });
114
+ }
115
+ }, {
116
+ title: '带货/小程序',
117
+ dataIndex: 'kindTagValue',
118
+ key: 'kindTagValue',
119
+ render: function render(kindTagValue, record) {
120
+ var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
121
+ return /*#__PURE__*/_jsx(Popover, {
122
+ title: "\u5E26\u8D27/\u5C0F\u7A0B\u5E8F",
123
+ content: kindTagValue,
124
+ children: /*#__PURE__*/_jsx("div", {
125
+ className: "remark",
126
+ children: /*#__PURE__*/_jsx(TextInput, {
127
+ className: "remarkInput",
128
+ label: kindTagValue || '',
129
+ value: kindTagValue || '',
130
+ onFinish: function onFinish(kindTagValue) {
131
+ onItem(index, 'kindTagValue', kindTagValue);
132
+ }
133
+ })
134
+ })
135
+ });
136
+ }
137
+ }, {
138
+ title: /*#__PURE__*/_jsx(_Fragment, {
139
+ children: "\u65F6\u957F"
140
+ }),
141
+ dataIndex: 'videoDuration',
142
+ key: 'videoDuration',
143
+ render: function render(videoDuration, record) {
144
+ return videoDuration > 0 ? /*#__PURE__*/_jsx(Duration, {
145
+ duration: videoDuration
146
+ }) : '-';
147
+ }
148
+ }, {
149
+ title: /*#__PURE__*/_jsx(_Fragment, {
150
+ children: "\u5927\u5C0F"
151
+ }),
152
+ dataIndex: 'videoSize',
153
+ key: 'videoSize',
154
+ render: function render(videoSize, record) {
155
+ return videoSize > 0 ? /*#__PURE__*/_jsx(FileSize, {
156
+ fileSize: videoSize
157
+ }) : '-';
158
+ }
159
+ }, {
160
+ title: /*#__PURE__*/_jsx(_Fragment, {
161
+ children: "\u89C6\u9891"
162
+ }),
163
+ dataIndex: 'videoFinishUrl',
164
+ key: 'videoFinishUrl',
165
+ render: function render(videoFinishUrl, record) {
166
+ var isLocalUrl = !/^https?:/i.test(videoFinishUrl);
167
+ return /*#__PURE__*/_jsx(Space, {
168
+ children: isLocalUrl ? /*#__PURE__*/_jsx(_Fragment, {
169
+ children: /*#__PURE__*/_jsx(Button, {
170
+ onClick: function onClick() {
171
+ return onOpenDir((record === null || record === void 0 ? void 0 : record.id) || 0, (record === null || record === void 0 ? void 0 : record.videoFinishUrl) || '');
172
+ },
173
+ loading: loadingOpenDirDict[(record === null || record === void 0 ? void 0 : record.id) || 0],
174
+ disabled: !(record !== null && record !== void 0 && record.videoFinishUrl),
175
+ icon: /*#__PURE__*/_jsx(FolderOpenOutlined, {}),
176
+ type: "link",
177
+ children: "\u67E5\u770B"
178
+ })
179
+ }) : /*#__PURE__*/_jsx(_Fragment, {
180
+ children: /*#__PURE__*/_jsx(Button, {
181
+ onClick: function onClick() {
182
+ return onVideoPreview((record === null || record === void 0 ? void 0 : record.videoFinishUrl) || '');
183
+ },
184
+ loading: loadingOpenDirDict[(record === null || record === void 0 ? void 0 : record.id) || 0],
185
+ disabled: !(record !== null && record !== void 0 && record.videoFinishUrl),
186
+ icon: /*#__PURE__*/_jsx(FolderOpenOutlined, {}),
187
+ type: "link",
188
+ children: "\u9884\u89C8"
189
+ })
190
+ })
191
+ });
192
+ }
193
+ }];
194
+ var onVideoKindTag = function onVideoKindTag(index, videoKindTag) {
195
+ console.log('onKindTagValue:', index, list);
196
+ list[index].videoKindTag = videoKindTag;
197
+ onList(_toConsumableArray(list));
198
+ };
199
+ var onItem = function onItem(index, filed, value) {
200
+ list[index][filed] = value;
201
+ onList(_toConsumableArray(list));
202
+ };
203
+ var onVideoPreview = function onVideoPreview(url) {
204
+ onMediaShowView('视频预览', url, 'video');
205
+ };
206
+ var onOpenDir = /*#__PURE__*/function () {
207
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(id, filePath) {
208
+ var fileResul;
209
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
210
+ while (1) switch (_context.prev = _context.next) {
211
+ case 0:
212
+ loadingOpenDirDict[id] = true;
213
+ setLoadingOpenDirDict(_objectSpread({}, loadingOpenDirDict));
214
+ _context.next = 4;
215
+ return openInFolder(filePath).catch(function (err) {
216
+ console.log("openInFolder:", err);
217
+ if (!(err !== null && err !== void 0 && err.success)) {
218
+ Tool.toastError(err === null || err === void 0 ? void 0 : err.message);
219
+ return;
220
+ }
221
+ console.log('open In Folder err:', err);
222
+ console.log('open In Folder err 2:', JSON.stringify(err));
223
+ Tool.toastError("\u6253\u5F00\u6587\u4EF6\u5931\u8D25\uFF1A".concat(err === null || err === void 0 ? void 0 : err.message, "\uFF01 \u6587\u4EF6\u5730\u5740\uFF1A ").concat(filePath));
224
+ });
225
+ case 4:
226
+ fileResul = _context.sent;
227
+ setTimeout(function () {
228
+ loadingOpenDirDict[id] = false;
229
+ setLoadingOpenDirDict(_objectSpread({}, loadingOpenDirDict));
230
+ }, 1e3);
231
+ case 6:
232
+ case "end":
233
+ return _context.stop();
234
+ }
235
+ }, _callee);
236
+ }));
237
+ return function onOpenDir(_x, _x2) {
238
+ return _ref2.apply(this, arguments);
239
+ };
240
+ }();
241
+ return /*#__PURE__*/_jsx(styles.videoPublishTaskSelectList, {
242
+ children: /*#__PURE__*/_jsx(Table, {
243
+ size: "small",
244
+ bordered: true,
245
+ scroll: {
246
+ y: window.innerHeight * 0.5
247
+ },
248
+ rowKey: function rowKey(record, index) {
249
+ return "".concat(index, "-").concat(record.id, "-").concat(record === null || record === void 0 ? void 0 : record.videoFinishUrl);
250
+ },
251
+ loading: false,
252
+ columns: columns,
253
+ dataSource: list,
254
+ pagination: false
255
+ })
256
+ });
257
+ };
258
+ export default VideoPublishSelectList;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ videoPublishTaskList: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
4
+ };
5
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject;
3
+ import styled from 'styled-components';
4
+ export default {
5
+ videoPublishTaskList: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n max-width: 860px;\n .remark{\n width: 120px;\n overflow: hidden;\n word-break: keep-all;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n .kindTagValue{\n width: 120px;\n overflow: hidden;\n word-break: keep-all;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n .operate{\n padding: 0 0 12px 0;\n display: flex;\n flex-direction: row;\n line-height: 24px;\n .left{\n flex: 2;\n }\n .showInfo{\n text-align: right;\n .high{\n color: #F60;\n }\n }\n }\n "])))
6
+ };
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface Props {
3
+ apiUrl: string;
4
+ defaultSelectList?: VideoPublish.VideoSelectList[];
5
+ productType: VideoPublish.ProductType;
6
+ onFinish: (list: VideoPublish.VideoSelectList[]) => void;
7
+ }
8
+ declare const VideoPublishTaskList: React.FC<Props>;
9
+ export default VideoPublishTaskList;
@@ -0,0 +1,300 @@
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: "\u65F6\u957F"
86
+ }),
87
+ dataIndex: 'videoDuration',
88
+ key: 'videoDuration',
89
+ render: function render(videoDuration, record) {
90
+ return videoDuration > 0 ? /*#__PURE__*/_jsx(Duration, {
91
+ duration: videoDuration
92
+ }) : '-';
93
+ }
94
+ }, {
95
+ title: /*#__PURE__*/_jsx(_Fragment, {
96
+ children: "\u5927\u5C0F"
97
+ }),
98
+ dataIndex: 'videoSize',
99
+ key: 'videoSize',
100
+ render: function render(videoSize, record) {
101
+ return videoSize > 0 ? /*#__PURE__*/_jsx(FileSize, {
102
+ fileSize: videoSize
103
+ }) : '-';
104
+ }
105
+ }, {
106
+ title: /*#__PURE__*/_jsx(_Fragment, {
107
+ children: "\u6807\u7B7E\u7C7B\u522B"
108
+ }),
109
+ dataIndex: 'videoKindTag',
110
+ key: 'videoKindTag',
111
+ render: function render(videoKindTag, record) {
112
+ return /*#__PURE__*/_jsx(VideoKindTag, {
113
+ videoKindTag: videoKindTag
114
+ });
115
+ }
116
+ }, {
117
+ title: /*#__PURE__*/_jsx(_Fragment, {
118
+ children: "\u6807\u7B7E\u503C"
119
+ }),
120
+ dataIndex: 'kindTagValue',
121
+ key: 'kindTagValue',
122
+ render: function render(kindTagValue, record) {
123
+ return /*#__PURE__*/_jsx(Popover, {
124
+ title: kindTagValue,
125
+ children: /*#__PURE__*/_jsx("div", {
126
+ className: "kindTagValue",
127
+ children: kindTagValue
128
+ })
129
+ });
130
+ }
131
+ }, {
132
+ title: '备注',
133
+ dataIndex: 'remark',
134
+ key: 'remark',
135
+ render: function render(remark, record) {
136
+ return /*#__PURE__*/_jsx(Popover, {
137
+ title: "\u5907\u6CE8",
138
+ content: remark,
139
+ children: /*#__PURE__*/_jsx("div", {
140
+ className: "remark",
141
+ children: remark
142
+ })
143
+ });
144
+ }
145
+ }, {
146
+ title: '创建时间',
147
+ dataIndex: 'created',
148
+ key: 'created',
149
+ render: function render(created) {
150
+ return /*#__PURE__*/_jsx(Time, {
151
+ time: created
152
+ });
153
+ }
154
+ }];
155
+ var _useRequest = useRequest(function () {
156
+ var _VideoPublishTaskCont;
157
+ var current = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pagination.current;
158
+ return VideoPublishTaskController === null || VideoPublishTaskController === void 0 || (_VideoPublishTaskCont = VideoPublishTaskController[productType]) === null || _VideoPublishTaskCont === void 0 ? void 0 : _VideoPublishTaskCont.call(VideoPublishTaskController, apiUrl, {
159
+ taskStatus: 'finish',
160
+ current: current,
161
+ pageSize: pagination.pageSize
162
+ });
163
+ }, {
164
+ onSuccess: function onSuccess(result) {
165
+ // listData.push( ...result.list );
166
+ pagination.total = result.pagination.total;
167
+ setPagination(_objectSpread({}, pagination));
168
+ setListData(_toConsumableArray(result.list));
169
+ }
170
+ }),
171
+ run = _useRequest.run,
172
+ loading = _useRequest.loading,
173
+ error = _useRequest.error;
174
+ var onCheck = function onCheck(items, checked) {
175
+ if (checked) {
176
+ selectDict[items.id] = {
177
+ id: items.id,
178
+ title: items.title,
179
+ videoSize: items.videoSize,
180
+ videoDuration: items.videoDuration,
181
+ videoFinishUrl: items.videoFinishUrl || items.finishUrl || '',
182
+ videoKindTag: items.videoKindTag || '',
183
+ kindTagValue: items.kindTagValue || '',
184
+ introduction: items.introduction || ''
185
+ };
186
+ } else {
187
+ delete selectDict[items.id];
188
+ }
189
+ setSelectDict(_objectSpread({}, selectDict));
190
+ };
191
+ var onSelectCurrentPage = function onSelectCurrentPage() {
192
+ //全选本页
193
+ listData.forEach(function (items) {
194
+ if (!items.finishUrl && !items.videoFinishUrl) {
195
+ return;
196
+ }
197
+ selectDict[items.id] = {
198
+ id: items.id,
199
+ title: items.title,
200
+ videoSize: items.videoSize,
201
+ videoDuration: items.videoDuration,
202
+ videoFinishUrl: items.videoFinishUrl || items.finishUrl || '',
203
+ videoKindTag: items.videoKindTag || '',
204
+ kindTagValue: items.kindTagValue || '',
205
+ introduction: items.introduction || ''
206
+ };
207
+ });
208
+ setSelectDict(_objectSpread({}, selectDict));
209
+ };
210
+ var onCancelCurrentPage = function onCancelCurrentPage() {
211
+ listData.forEach(function (items) {
212
+ if (!selectDict[items.id]) {
213
+ return;
214
+ }
215
+ delete selectDict[items.id];
216
+ });
217
+ setSelectDict(_objectSpread({}, selectDict));
218
+ };
219
+ var onSubmit = function onSubmit() {
220
+ // const list: VideoPublish.VideoSelectList[] = []
221
+ // Object.values( selectDict ).forEach( items => {
222
+ // list.push({
223
+ // id: items.id,
224
+ // title: items.title,
225
+ // videoSize: items.videoSize,
226
+ // videoDuration: items.videoDuration,
227
+ // })
228
+ // });
229
+ onFinish(Object.values(selectDict));
230
+ };
231
+ useEffect(function () {
232
+ defaultSelectList === null || defaultSelectList === void 0 || defaultSelectList.forEach(function (items) {
233
+ selectDict[items.id] = items;
234
+ });
235
+ setSelectDict(_objectSpread({}, selectDict));
236
+ }, []);
237
+ return /*#__PURE__*/_jsxs(styles.videoPublishTaskList, {
238
+ children: [/*#__PURE__*/_jsxs("div", {
239
+ className: "operate",
240
+ children: [/*#__PURE__*/_jsx("div", {
241
+ className: "left",
242
+ children: /*#__PURE__*/_jsxs(Space, {
243
+ children: [/*#__PURE__*/_jsx(Button, {
244
+ size: "small",
245
+ type: "primary",
246
+ ghost: true,
247
+ onClick: onSelectCurrentPage,
248
+ children: "\u9009\u62E9\u672C\u9875"
249
+ }), /*#__PURE__*/_jsx(Button, {
250
+ size: "small",
251
+ type: "primary",
252
+ ghost: true,
253
+ onClick: onCancelCurrentPage,
254
+ children: "\u53D6\u6D88\u9009\u62E9\u672C\u9875"
255
+ })]
256
+ })
257
+ }), /*#__PURE__*/_jsxs("div", {
258
+ className: "showInfo",
259
+ children: ["\u5DF2\u9009\u62E9\uFF1A", /*#__PURE__*/_jsx("strong", {
260
+ className: "high",
261
+ children: Object.keys(selectDict).length
262
+ }), /*#__PURE__*/_jsx("small", {
263
+ children: "\u6761"
264
+ })]
265
+ })]
266
+ }), /*#__PURE__*/_jsx(Table, {
267
+ size: "small",
268
+ bordered: true,
269
+ rowKey: function rowKey(record) {
270
+ return "".concat(record.id);
271
+ },
272
+ loading: loading,
273
+ columns: columns,
274
+ locale: {
275
+ emptyText: error ? /*#__PURE__*/_jsx("a", {
276
+ onClick: function onClick() {
277
+ return run();
278
+ },
279
+ children: "\u91CD\u8BD5"
280
+ }) : '[无]'
281
+ },
282
+ dataSource: listData,
283
+ pagination: pagination,
284
+ onChange: function onChange(_ref2) {
285
+ var current = _ref2.current;
286
+ pagination.current = current || 1;
287
+ run(pagination.current);
288
+ }
289
+ }), /*#__PURE__*/_jsx(DialogDrawerFooter, {
290
+ children: /*#__PURE__*/_jsx(Button, {
291
+ type: "primary",
292
+ onClick: function onClick() {
293
+ return onSubmit();
294
+ },
295
+ children: "\u786E\u5B9A"
296
+ })
297
+ })]
298
+ });
299
+ };
300
+ export default VideoPublishTaskList;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ videoPublish: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
4
+ };
5
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
+ var _templateObject;
3
+ import styled from 'styled-components';
4
+ export default {
5
+ videoPublish: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n height: 100%;\n .menu{\n display: flex;\n flex-direction: column;\n width: 180px;\n margin: 0 12px 0 0;\n padding: 0 10px 0 0;\n min-height: 100%;\n border-right: 1px solid #E8E8E8;\n .ant-menu{\n margin: 10px 0 0;\n }\n .ant-menu-light{\n background-color: transparent !important;\n border-right: none !important;\n }\n }\n .pageContents{\n flex: 1;\n padding: 10px 0 0 0;\n overflow-y: auto;\n .my-tabs{\n width: 100%;\n > .ant-tabs-nav{\n display: none;\n }\n }\n }\n\n "])))
6
+ };
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import "./index.less";
3
+ interface Props {
4
+ productType: VideoPublish.ProductType;
5
+ apiUrl: string;
6
+ env?: Global.Env;
7
+ }
8
+ declare const VideoPublish: React.FC<Props>;
9
+ export default VideoPublish;