component-shipinlv 1.0.10 → 1.0.12

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/PageContentWarp.d.ts +1 -1
  9. package/dist/UI/PageContentWarp.js +1 -1
  10. package/dist/UI/Time.d.ts +8 -0
  11. package/dist/UI/Time.js +19 -0
  12. package/dist/UI/duration.css.d.ts +5 -0
  13. package/dist/UI/duration.css.js +6 -0
  14. package/dist/UI/duration.d.ts +6 -0
  15. package/dist/UI/duration.js +49 -0
  16. package/dist/UI/text-input.d.ts +13 -0
  17. package/dist/UI/text-input.js +108 -0
  18. package/dist/UI/text-input.less +19 -0
  19. package/dist/VideoPublish/creat-task/index.css.d.ts +5 -0
  20. package/dist/VideoPublish/creat-task/index.css.js +6 -0
  21. package/dist/VideoPublish/creat-task/index.d.ts +9 -0
  22. package/dist/VideoPublish/creat-task/index.js +462 -0
  23. package/dist/VideoPublish/creat-task/select-list.css.d.ts +5 -0
  24. package/dist/VideoPublish/creat-task/select-list.css.js +6 -0
  25. package/dist/VideoPublish/creat-task/select-list.d.ts +8 -0
  26. package/dist/VideoPublish/creat-task/select-list.js +257 -0
  27. package/dist/VideoPublish/creat-task/task-list.css.d.ts +5 -0
  28. package/dist/VideoPublish/creat-task/task-list.css.js +6 -0
  29. package/dist/VideoPublish/creat-task/task-list.d.ts +9 -0
  30. package/dist/VideoPublish/creat-task/task-list.js +300 -0
  31. package/dist/VideoPublish/index.css.d.ts +5 -0
  32. package/dist/VideoPublish/index.css.js +6 -0
  33. package/dist/VideoPublish/index.d.ts +11 -0
  34. package/dist/VideoPublish/index.js +122 -0
  35. package/dist/VideoPublish/index.less +52 -0
  36. package/dist/VideoPublish/task-list/index.d.ts +8 -0
  37. package/dist/VideoPublish/task-list/index.js +121 -0
  38. package/dist/VideoPublish/task-list/index.less +5 -0
  39. package/dist/VideoPublish/video-account/index.d.ts +8 -0
  40. package/dist/VideoPublish/video-account/index.js +110 -0
  41. package/dist/VideoPublish/video-account/index.less +5 -0
  42. package/dist/asset/image/platform/bilibili.png +0 -0
  43. package/dist/asset/image/platform/douyin.png +0 -0
  44. package/dist/asset/image/platform/douyu.png +0 -0
  45. package/dist/asset/image/platform/huya.png +0 -0
  46. package/dist/asset/image/platform/kuaishou.png +0 -0
  47. package/dist/asset/image/platform/youtube.png +0 -0
  48. package/dist/component/media-kind.d.ts +10 -0
  49. package/dist/component/media-kind.js +24 -0
  50. package/dist/component/media-show.d.ts +13 -0
  51. package/dist/component/media-show.js +84 -0
  52. package/dist/component/media-show.less +53 -0
  53. package/dist/component/video-platform/logo.d.ts +22 -0
  54. package/dist/component/video-platform/logo.js +72 -0
  55. package/dist/component/video-platform/logo.less +42 -0
  56. package/dist/component/videoKindTag/index.d.ts +13 -0
  57. package/dist/component/videoKindTag/index.js +44 -0
  58. package/dist/global.less +4 -0
  59. package/dist/index.d.ts +5 -0
  60. package/dist/index.js +5 -0
  61. package/dist/join-client/index.css.js +1 -1
  62. package/dist/lib/Tool.d.ts +4 -1
  63. package/dist/lib/Tool.js +39 -0
  64. package/dist/lib/component/getImageUrl.d.ts +2 -0
  65. package/dist/lib/component/getImageUrl.js +8 -0
  66. package/dist/lib/component/getSoundUrl.d.ts +2 -0
  67. package/dist/lib/component/getSoundUrl.js +9 -0
  68. package/dist/lib/component/getVideoUrl.d.ts +2 -0
  69. package/dist/lib/component/getVideoUrl.js +9 -0
  70. package/dist/lib/isInClient.js +2 -1
  71. package/dist/lib/request.js +1 -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,257 @@
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
+ size: "small",
98
+ defaultValue: videoKindTag,
99
+ className: "videoKindTag",
100
+ onChange: function onChange(e) {
101
+ return onVideoKindTag(index, e);
102
+ },
103
+ children: [/*#__PURE__*/_jsxs(Select.Option, {
104
+ value: "",
105
+ children: [/*#__PURE__*/_jsx(UnorderedListOutlined, {}), " [\u65E0]"]
106
+ }), VideoKindTagList.map(function (item) {
107
+ return /*#__PURE__*/_jsx(Select.Option, {
108
+ value: item.videoKindTag,
109
+ children: /*#__PURE__*/_jsx(VideoKindTag, {
110
+ videoKindTag: item.videoKindTag
111
+ })
112
+ }, item.videoKindTag);
113
+ })]
114
+ });
115
+ }
116
+ }, {
117
+ title: '带货/小程序',
118
+ dataIndex: 'kindTagValue',
119
+ key: 'kindTagValue',
120
+ render: function render(kindTagValue, record) {
121
+ var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
122
+ return /*#__PURE__*/_jsx(Popover, {
123
+ title: "\u5E26\u8D27/\u5C0F\u7A0B\u5E8F/\u5B9A\u4F4D",
124
+ content: kindTagValue,
125
+ children: /*#__PURE__*/_jsx("div", {
126
+ className: "remark",
127
+ children: /*#__PURE__*/_jsx(TextInput, {
128
+ className: "remarkInput",
129
+ label: kindTagValue || '',
130
+ value: kindTagValue || '',
131
+ onFinish: function onFinish(kindTagValue) {
132
+ onItem(index, 'kindTagValue', kindTagValue);
133
+ }
134
+ })
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: /*#__PURE__*/_jsx(_Fragment, {
162
+ children: "\u89C6\u9891"
163
+ }),
164
+ dataIndex: 'videoFinishUrl',
165
+ key: 'videoFinishUrl',
166
+ render: function render(videoFinishUrl, record) {
167
+ var isLocalUrl = !/^https?:/i.test(videoFinishUrl);
168
+ return /*#__PURE__*/_jsx(Space, {
169
+ children: isLocalUrl ? /*#__PURE__*/_jsx(_Fragment, {
170
+ children: /*#__PURE__*/_jsx(Button, {
171
+ onClick: function onClick() {
172
+ return onOpenDir((record === null || record === void 0 ? void 0 : record.id) || 0, (record === null || record === void 0 ? void 0 : record.videoFinishUrl) || '');
173
+ },
174
+ loading: loadingOpenDirDict[(record === null || record === void 0 ? void 0 : record.id) || 0],
175
+ disabled: !(record !== null && record !== void 0 && record.videoFinishUrl),
176
+ icon: /*#__PURE__*/_jsx(FolderOpenOutlined, {}),
177
+ type: "link",
178
+ size: "small",
179
+ children: "\u67E5\u770B"
180
+ })
181
+ }) : /*#__PURE__*/_jsx(_Fragment, {
182
+ children: /*#__PURE__*/_jsx(Button, {
183
+ onClick: function onClick() {
184
+ return onVideoPreview((record === null || record === void 0 ? void 0 : record.videoFinishUrl) || '');
185
+ },
186
+ loading: loadingOpenDirDict[(record === null || record === void 0 ? void 0 : record.id) || 0],
187
+ disabled: !(record !== null && record !== void 0 && record.videoFinishUrl),
188
+ icon: /*#__PURE__*/_jsx(FolderOpenOutlined, {}),
189
+ type: "link",
190
+ children: "\u9884\u89C8"
191
+ })
192
+ })
193
+ });
194
+ }
195
+ }];
196
+ var onVideoKindTag = function onVideoKindTag(index, videoKindTag) {
197
+ console.log('onKindTagValue:', index, list);
198
+ list[index].videoKindTag = videoKindTag;
199
+ onList(_toConsumableArray(list));
200
+ };
201
+ var onItem = function onItem(index, filed, value) {
202
+ list[index][filed] = value;
203
+ onList(_toConsumableArray(list));
204
+ };
205
+ var onVideoPreview = function onVideoPreview(url) {
206
+ onMediaShowView('视频预览', url, 'video');
207
+ };
208
+ var onOpenDir = /*#__PURE__*/function () {
209
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(id, filePath) {
210
+ var fileResul;
211
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
212
+ while (1) switch (_context.prev = _context.next) {
213
+ case 0:
214
+ loadingOpenDirDict[id] = true;
215
+ setLoadingOpenDirDict(_objectSpread({}, loadingOpenDirDict));
216
+ _context.next = 4;
217
+ return openInFolder(filePath).catch(function (err) {
218
+ console.log("openInFolder:", err);
219
+ if (!(err !== null && err !== void 0 && err.success)) {
220
+ Tool.toastError(err === null || err === void 0 ? void 0 : err.message);
221
+ return;
222
+ }
223
+ console.log('open In Folder err:', err);
224
+ console.log('open In Folder err 2:', JSON.stringify(err));
225
+ 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));
226
+ });
227
+ case 4:
228
+ fileResul = _context.sent;
229
+ setTimeout(function () {
230
+ loadingOpenDirDict[id] = false;
231
+ setLoadingOpenDirDict(_objectSpread({}, loadingOpenDirDict));
232
+ }, 1e3);
233
+ case 6:
234
+ case "end":
235
+ return _context.stop();
236
+ }
237
+ }, _callee);
238
+ }));
239
+ return function onOpenDir(_x, _x2) {
240
+ return _ref2.apply(this, arguments);
241
+ };
242
+ }();
243
+ return /*#__PURE__*/_jsx(styles.videoPublishTaskSelectList, {
244
+ children: /*#__PURE__*/_jsx(Table, {
245
+ size: "small",
246
+ bordered: true,
247
+ rowKey: function rowKey(record, index) {
248
+ return "".concat(index, "-").concat(record.id, "-").concat(record === null || record === void 0 ? void 0 : record.videoFinishUrl);
249
+ },
250
+ loading: false,
251
+ columns: columns,
252
+ dataSource: list,
253
+ pagination: false
254
+ })
255
+ });
256
+ };
257
+ 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,11 @@
1
+ import React from "react";
2
+ import "./index.less";
3
+ interface Props {
4
+ disabled?: boolean;
5
+ contentHeight?: number | string;
6
+ productType: VideoPublish.ProductType;
7
+ apiUrl: string;
8
+ env?: Global.Env;
9
+ }
10
+ declare const VideoPublish: React.FC<Props>;
11
+ export default VideoPublish;