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.
Files changed (117) hide show
  1. package/dist/Auth/index.js +45 -26
  2. package/dist/AuthClient/qr/index.css.js +1 -1
  3. package/dist/PhonePublish/account-manage/home.d.ts +11 -0
  4. package/dist/PhonePublish/account-manage/home.js +243 -0
  5. package/dist/PhonePublish/account-manage/home.less +28 -0
  6. package/dist/PhonePublish/account-manage/index.d.ts +3 -0
  7. package/dist/PhonePublish/account-manage/index.js +56 -0
  8. package/dist/PhonePublish/account-manage/index.less +59 -0
  9. package/dist/PhonePublish/account-manage/list.d.ts +17 -0
  10. package/dist/PhonePublish/account-manage/list.js +443 -0
  11. package/dist/PhonePublish/account-manage/list.less +95 -0
  12. package/dist/PhonePublish/account-manage/setting/index.d.ts +6 -0
  13. package/dist/PhonePublish/account-manage/setting/index.js +199 -0
  14. package/dist/PhonePublish/account-manage/setting/index.less +11 -0
  15. package/dist/PhonePublish/create-task/base/index.d.ts +10 -0
  16. package/dist/PhonePublish/create-task/base/index.js +386 -0
  17. package/dist/PhonePublish/create-task/base/index.less +64 -0
  18. package/dist/PhonePublish/create-task/getVideoGoodsUrl.d.ts +2 -0
  19. package/dist/PhonePublish/create-task/getVideoGoodsUrl.js +136 -0
  20. package/dist/PhonePublish/create-task/hour-enabled.d.ts +9 -0
  21. package/dist/PhonePublish/create-task/hour-enabled.js +42 -0
  22. package/dist/PhonePublish/create-task/hour-enabled.less +24 -0
  23. package/dist/PhonePublish/create-task/index.d.ts +11 -0
  24. package/dist/PhonePublish/create-task/index.js +449 -0
  25. package/dist/PhonePublish/create-task/index.less +75 -0
  26. package/dist/PhonePublish/create-task/select-list.css.d.ts +5 -0
  27. package/dist/PhonePublish/create-task/select-list.css.js +6 -0
  28. package/dist/PhonePublish/create-task/select-list.d.ts +8 -0
  29. package/dist/PhonePublish/create-task/select-list.js +304 -0
  30. package/dist/PhonePublish/create-task/task-list.css.d.ts +5 -0
  31. package/dist/PhonePublish/create-task/task-list.css.js +6 -0
  32. package/dist/PhonePublish/create-task/task-list.d.ts +9 -0
  33. package/dist/PhonePublish/create-task/task-list.js +323 -0
  34. package/dist/PhonePublish/index.css.d.ts +2 -0
  35. package/dist/PhonePublish/index.css.js +35 -0
  36. package/dist/PhonePublish/index.d.ts +15 -0
  37. package/dist/PhonePublish/index.js +191 -0
  38. package/dist/PhonePublish/index.less +55 -0
  39. package/dist/PhonePublish/lib/chrome-quit.d.ts +2 -0
  40. package/dist/PhonePublish/lib/chrome-quit.js +20 -0
  41. package/dist/PhonePublish/log/index.d.ts +8 -0
  42. package/dist/PhonePublish/log/index.js +186 -0
  43. package/dist/PhonePublish/log/index.less +81 -0
  44. package/dist/PhonePublish/publish-task-plan/index.d.ts +9 -0
  45. package/dist/PhonePublish/publish-task-plan/index.js +32 -0
  46. package/dist/PhonePublish/publish-task-plan/index.less +4 -0
  47. package/dist/PhonePublish/publish-task-plan/tool-bak.txt +219 -0
  48. package/dist/PhonePublish/publish-task-plan/tool.d.ts +29 -0
  49. package/dist/PhonePublish/publish-task-plan/tool.js +720 -0
  50. package/dist/PhonePublish/task-list/index.d.ts +8 -0
  51. package/dist/PhonePublish/task-list/index.js +224 -0
  52. package/dist/PhonePublish/task-list/index.less +8 -0
  53. package/dist/PhonePublish/task-list/plan/list.d.ts +12 -0
  54. package/dist/PhonePublish/task-list/plan/list.js +290 -0
  55. package/dist/PhonePublish/task-list/plan/list.less +87 -0
  56. package/dist/PhonePublish/task-list/plan/operate.d.ts +8 -0
  57. package/dist/PhonePublish/task-list/plan/operate.js +145 -0
  58. package/dist/PhonePublish/task-list/plan/query.d.ts +8 -0
  59. package/dist/PhonePublish/task-list/plan/query.js +89 -0
  60. package/dist/PhonePublish/task-list/plan/query.less +9 -0
  61. package/dist/PhonePublish/task-list/plan/status.d.ts +13 -0
  62. package/dist/PhonePublish/task-list/plan/status.js +53 -0
  63. package/dist/PhonePublish/task-list/query.d.ts +8 -0
  64. package/dist/PhonePublish/task-list/query.js +76 -0
  65. package/dist/PhonePublish/task-list/query.less +19 -0
  66. package/dist/PhonePublish/task-list/who-can-view.d.ts +12 -0
  67. package/dist/PhonePublish/task-list/who-can-view.js +37 -0
  68. package/dist/PhonePublish/video-account/ban/index.d.ts +10 -0
  69. package/dist/PhonePublish/video-account/ban/index.js +94 -0
  70. package/dist/PhonePublish/video-account/ban/index.less +4 -0
  71. package/dist/PhonePublish/video-account/base-info.d.ts +13 -0
  72. package/dist/PhonePublish/video-account/base-info.js +75 -0
  73. package/dist/PhonePublish/video-account/base-info.less +92 -0
  74. package/dist/PhonePublish/video-account/create.d.ts +8 -0
  75. package/dist/PhonePublish/video-account/create.js +174 -0
  76. package/dist/PhonePublish/video-account/group.d.ts +9 -0
  77. package/dist/PhonePublish/video-account/group.js +255 -0
  78. package/dist/PhonePublish/video-account/group.less +10 -0
  79. package/dist/PhonePublish/video-account/index.d.ts +8 -0
  80. package/dist/PhonePublish/video-account/index.js +403 -0
  81. package/dist/PhonePublish/video-account/index.less +92 -0
  82. package/dist/PhonePublish/video-account/query.d.ts +8 -0
  83. package/dist/PhonePublish/video-account/query.js +115 -0
  84. package/dist/PhonePublish/video-account/query.less +18 -0
  85. package/dist/PhonePublish/video-publish-statistic/account-trend/index.d.ts +8 -0
  86. package/dist/PhonePublish/video-publish-statistic/account-trend/index.js +173 -0
  87. package/dist/PhonePublish/video-publish-statistic/account-trend/index.less +3 -0
  88. package/dist/PhonePublish/video-publish-statistic/account-trend/kind-list.d.ts +7 -0
  89. package/dist/PhonePublish/video-publish-statistic/account-trend/kind-list.js +22 -0
  90. package/dist/PhonePublish/video-publish-statistic/account-trend/query.d.ts +9 -0
  91. package/dist/PhonePublish/video-publish-statistic/account-trend/query.js +54 -0
  92. package/dist/PhonePublish/video-publish-statistic/account-trend/query.less +3 -0
  93. package/dist/PhonePublish/video-publish-statistic/index.d.ts +2 -0
  94. package/dist/PhonePublish/video-publish-statistic/index.js +37 -0
  95. package/dist/PhonePublish/video-publish-statistic/kind.d.ts +16 -0
  96. package/dist/PhonePublish/video-publish-statistic/kind.js +57 -0
  97. package/dist/PhonePublish/video-publish-statistic/operation/list.d.ts +7 -0
  98. package/dist/PhonePublish/video-publish-statistic/operation/list.js +242 -0
  99. package/dist/PhonePublish/video-publish-statistic/operation/list.less +10 -0
  100. package/dist/PhonePublish/video-publish-statistic/operation/query.d.ts +8 -0
  101. package/dist/PhonePublish/video-publish-statistic/operation/query.js +56 -0
  102. package/dist/PhonePublish/video-publish-statistic/operation/query.less +3 -0
  103. package/dist/PhonePublish/video-publish-statistic/publish-plan/list.d.ts +8 -0
  104. package/dist/PhonePublish/video-publish-statistic/publish-plan/list.js +257 -0
  105. package/dist/PhonePublish/video-publish-statistic/publish-plan/list.less +105 -0
  106. package/dist/PhonePublish/video-publish-statistic/publish-plan/query.d.ts +9 -0
  107. package/dist/PhonePublish/video-publish-statistic/publish-plan/query.js +79 -0
  108. package/dist/PhonePublish/video-publish-statistic/publish-plan/query.less +3 -0
  109. package/dist/VideoPublish/account-manage/list.js +1 -1
  110. package/dist/index.d.ts +1 -0
  111. package/dist/index.js +1 -0
  112. package/dist/lib/Tool.d.ts +1 -1
  113. package/dist/phone/index.d.ts +8 -0
  114. package/dist/phone/index.js +62 -0
  115. package/dist/phone/index.less +170 -0
  116. package/dist/typings.d.ts +1 -1
  117. package/package.json +1 -1
@@ -0,0 +1,145 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
+ import { Button, Popconfirm, Space } from "antd";
4
+ import React from "react";
5
+ import { useRequest } from "@umijs/hooks";
6
+ import * as VideoPublishTaskPlanController from "../../../service/api/VideoPublishTaskPlanController";
7
+ import { RedoOutlined, StopOutlined } from "@ant-design/icons";
8
+ import Tool from "../../../lib/Tool";
9
+ import { jsx as _jsx } from "react/jsx-runtime";
10
+ import { jsxs as _jsxs } from "react/jsx-runtime";
11
+ var VideoPublishTaskPlanOperate = function VideoPublishTaskPlanOperate(_ref) {
12
+ var env = _ref.env,
13
+ itemData = _ref.itemData,
14
+ _ref$onStatusChange = _ref.onStatusChange,
15
+ onStatusChange = _ref$onStatusChange === void 0 ? function () {} : _ref$onStatusChange;
16
+ // const getFileName = ( filePath: string ) => {
17
+ // const videoPathInfo = filePath.split(/[\/\\]/g);
18
+ // return videoPathInfo[ videoPathInfo.length - 1 ] || '';
19
+ // }
20
+
21
+ var videoRename = /*#__PURE__*/function () {
22
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(videoPath) {
23
+ var videoPathInfo, newName, newFilePath;
24
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
25
+ while (1) switch (_context2.prev = _context2.next) {
26
+ case 0:
27
+ videoPathInfo = videoPath.split(/[\/\\]/g);
28
+ newName = "repeal-" + Date.now() + '.' + Tool.getFileExt(videoPath);
29
+ newFilePath = videoPathInfo.slice(0, -1).join('/') + "/".concat(newName);
30
+ return _context2.abrupt("return", new Promise( /*#__PURE__*/function () {
31
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve, reject) {
32
+ var _window$getBridge;
33
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
34
+ while (1) switch (_context.prev = _context.next) {
35
+ case 0:
36
+ (_window$getBridge = window.getBridge()) === null || _window$getBridge === void 0 || _window$getBridge.fs.rename(videoPath, newFilePath, function (err) {
37
+ if (err) {
38
+ console.log('video Rename err:', err);
39
+ reject(err);
40
+ return;
41
+ }
42
+ resolve(newFilePath);
43
+ });
44
+ case 1:
45
+ case "end":
46
+ return _context.stop();
47
+ }
48
+ }, _callee);
49
+ }));
50
+ return function (_x2, _x3) {
51
+ return _ref3.apply(this, arguments);
52
+ };
53
+ }()));
54
+ case 4:
55
+ case "end":
56
+ return _context2.stop();
57
+ }
58
+ }, _callee2);
59
+ }));
60
+ return function videoRename(_x) {
61
+ return _ref2.apply(this, arguments);
62
+ };
63
+ }();
64
+ var _useRequest = useRequest(function () {
65
+ return VideoPublishTaskPlanController.repeal({
66
+ planId: itemData.id
67
+ }, {
68
+ env: env
69
+ });
70
+ }, {
71
+ manual: true,
72
+ onSuccess: function () {
73
+ var _onSuccess = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(result) {
74
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
75
+ while (1) switch (_context3.prev = _context3.next) {
76
+ case 0:
77
+ Tool.toast('已经改为【废除】状态');
78
+ // 释放本地文件
79
+ if (!(result.productType === "active-account-mode")) {
80
+ _context3.next = 4;
81
+ break;
82
+ }
83
+ _context3.next = 4;
84
+ return videoRename(result.videoUrl).catch(function (err) {});
85
+ case 4:
86
+ onStatusChange('repeal');
87
+ case 5:
88
+ case "end":
89
+ return _context3.stop();
90
+ }
91
+ }, _callee3);
92
+ }));
93
+ function onSuccess(_x4) {
94
+ return _onSuccess.apply(this, arguments);
95
+ }
96
+ return onSuccess;
97
+ }()
98
+ }),
99
+ runRepeal = _useRequest.run,
100
+ loadingRepeal = _useRequest.loading;
101
+ var _useRequest2 = useRequest(function () {
102
+ return VideoPublishTaskPlanController.retry({
103
+ planId: itemData.id
104
+ }, {
105
+ env: env
106
+ });
107
+ }, {
108
+ manual: true,
109
+ onSuccess: function onSuccess() {
110
+ Tool.toast('已经改为【等待】状态');
111
+ onStatusChange('wait');
112
+ }
113
+ }),
114
+ runRetry = _useRequest2.run,
115
+ loadingRetry = _useRequest2.loading;
116
+ return /*#__PURE__*/_jsxs(Space, {
117
+ children: [/*#__PURE__*/_jsx(Popconfirm, {
118
+ title: "\u5E9F\u9664",
119
+ description: "\u5E9F\u9664\u540E\uFF0C\u4E0D\u53EF\u6062\u590D\uFF01",
120
+ onConfirm: function onConfirm() {
121
+ return runRepeal();
122
+ },
123
+ children: ['wait', 'fail'].includes(itemData.status) && /*#__PURE__*/_jsx(Button, {
124
+ type: "primary",
125
+ size: "small",
126
+ ghost: true,
127
+ danger: true,
128
+ icon: /*#__PURE__*/_jsx(StopOutlined, {}),
129
+ loading: loadingRepeal,
130
+ children: "\u5E9F\u9664"
131
+ })
132
+ }), ['fail', 'progress'].includes(itemData.status) && /*#__PURE__*/_jsx(Button, {
133
+ type: "primary",
134
+ size: "small",
135
+ ghost: true,
136
+ icon: /*#__PURE__*/_jsx(RedoOutlined, {}),
137
+ loading: loadingRetry,
138
+ onClick: function onClick() {
139
+ return runRetry();
140
+ },
141
+ children: "\u91CD\u8BD5"
142
+ })]
143
+ });
144
+ };
145
+ export default VideoPublishTaskPlanOperate;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './query.less';
3
+ interface Props {
4
+ defaultQuery: VideoPublishTaskPlan.ListQuery;
5
+ onQuery: (query: VideoPublishTaskPlan.ListQuery) => void;
6
+ }
7
+ declare const VideoPublishTaskPlanListQuery: React.FC<Props>;
8
+ export default VideoPublishTaskPlanListQuery;
@@ -0,0 +1,89 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+ import React, { useState } from 'react';
4
+ import { Button, Form, Input, Select, Space, Tag } from "antd";
5
+ import "./query.less";
6
+ import { UnorderedListOutlined } from "@ant-design/icons";
7
+ import VideoPublishTaskPlanStatus, { VideoPublishTaskPlanStatusList } from "../../../VideoPublish/task-list/plan/status";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ import { jsxs as _jsxs } from "react/jsx-runtime";
10
+ var VideoPublishTaskPlanListQuery = function VideoPublishTaskPlanListQuery(_ref) {
11
+ var 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 _useState = useState(_objectSpread({}, defaultQuery)),
18
+ _useState2 = _slicedToArray(_useState, 2),
19
+ query = _useState2[0],
20
+ setQuery = _useState2[1];
21
+ var onFinish = function onFinish() {
22
+ var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
23
+ onQuery(_objectSpread(_objectSpread({}, query), values));
24
+ };
25
+ return /*#__PURE__*/_jsx("div", {
26
+ className: "videoPublishTaskPlanListQuery",
27
+ children: /*#__PURE__*/_jsx(Form, {
28
+ form: form,
29
+ initialValues: _objectSpread({}, query),
30
+ onFinish: onFinish,
31
+ children: /*#__PURE__*/_jsxs(Space, {
32
+ wrap: true,
33
+ children: [/*#__PURE__*/_jsx(Form.Item, {
34
+ name: "isBan",
35
+ className: "isBan",
36
+ children: /*#__PURE__*/_jsxs(Select, {
37
+ children: [/*#__PURE__*/_jsxs(Select, {
38
+ value: "",
39
+ children: [/*#__PURE__*/_jsx(UnorderedListOutlined, {}), " \u5C01\u7981\u72B6\u6001"]
40
+ }), /*#__PURE__*/_jsx(Select, {
41
+ value: "0",
42
+ children: /*#__PURE__*/_jsx(Tag, {
43
+ color: "green",
44
+ children: "\u6B63\u5E38"
45
+ })
46
+ }), /*#__PURE__*/_jsx(Select, {
47
+ value: "1",
48
+ children: /*#__PURE__*/_jsx(Tag, {
49
+ color: "red",
50
+ children: "\u88AB\u7981"
51
+ })
52
+ })]
53
+ })
54
+ }), /*#__PURE__*/_jsx(Form.Item, {
55
+ name: "status",
56
+ className: "status",
57
+ children: /*#__PURE__*/_jsxs(Select, {
58
+ children: [/*#__PURE__*/_jsxs(Select.Option, {
59
+ value: "",
60
+ children: [/*#__PURE__*/_jsx(UnorderedListOutlined, {}), " \u6240\u6709\u53D1\u5E03\u72B6\u6001"]
61
+ }), VideoPublishTaskPlanStatusList.map(function (items) {
62
+ return /*#__PURE__*/_jsx(Select.Option, {
63
+ value: items.status,
64
+ children: /*#__PURE__*/_jsx(VideoPublishTaskPlanStatus, {
65
+ status: items.status
66
+ })
67
+ }, items.status);
68
+ })]
69
+ })
70
+ }), /*#__PURE__*/_jsx(Form.Item, {
71
+ name: "keyword",
72
+ children: /*#__PURE__*/_jsx(Input
73
+ // value={ query.keyword }
74
+ , {
75
+ placeholder: "\u641C\u7D22\u8D26\u6237\u540D",
76
+ allowClear: true
77
+ // onChange={ e => onKeyWord( e.target.value ) }
78
+ // onPressEnter={ ( e ) => onSearch( e.target ) }
79
+ })
80
+ }), /*#__PURE__*/_jsx(Button, {
81
+ type: "primary",
82
+ htmlType: "submit",
83
+ children: "\u641C\u7D22"
84
+ })]
85
+ })
86
+ })
87
+ });
88
+ };
89
+ export default VideoPublishTaskPlanListQuery;
@@ -0,0 +1,9 @@
1
+ .videoPublishTaskPlanListQuery{
2
+ .isBan{
3
+ width: 150px;
4
+ }
5
+
6
+ .status{
7
+ width: 200px;
8
+ }
9
+ }
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ status: VideoPublishTaskPlan.PlanStatus;
4
+ }
5
+ interface VideoPublishTaskPlanStatusList {
6
+ status: VideoPublishTaskPlan.PlanStatus;
7
+ icon: React.ReactNode;
8
+ title: string;
9
+ color: string;
10
+ }
11
+ export declare const VideoPublishTaskPlanStatusList: VideoPublishTaskPlanStatusList[];
12
+ declare const VideoPublishTaskPlanStatus: React.FC<Props>;
13
+ export default VideoPublishTaskPlanStatus;
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+ import { Tag } from 'antd';
3
+ import { CheckCircleOutlined, ClockCircleOutlined, LoadingOutlined, StopOutlined, WarningOutlined } from "@ant-design/icons";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
+ // ENUM('wait', 'progress', 'finish', 'fail')
7
+ export var VideoPublishTaskPlanStatusList = [{
8
+ status: 'finish',
9
+ icon: /*#__PURE__*/_jsx(CheckCircleOutlined, {}),
10
+ title: '完成',
11
+ color: 'green'
12
+ }, {
13
+ // ENUM('wait', 'progress', 'finish', 'fail')
14
+ status: 'progress',
15
+ icon: /*#__PURE__*/_jsx(LoadingOutlined, {}),
16
+ title: '发布中',
17
+ color: 'blue'
18
+ }, {
19
+ status: 'wait',
20
+ icon: /*#__PURE__*/_jsx(ClockCircleOutlined, {}),
21
+ title: '等待',
22
+ color: ''
23
+ }, {
24
+ status: 'fail',
25
+ icon: /*#__PURE__*/_jsx(WarningOutlined, {}),
26
+ title: '失败',
27
+ color: 'red'
28
+ }, {
29
+ status: 'repeal',
30
+ icon: /*#__PURE__*/_jsx(StopOutlined, {}),
31
+ title: '已废除',
32
+ color: '#555'
33
+ }];
34
+ var VideoPublishTaskPlanStatusDict = function () {
35
+ var dict = {};
36
+ VideoPublishTaskPlanStatusList.forEach(function (items) {
37
+ dict[items.status] = items;
38
+ });
39
+ return dict;
40
+ }();
41
+ var VideoPublishTaskPlanStatus = function VideoPublishTaskPlanStatus(_ref) {
42
+ var status = _ref.status;
43
+ var itemData = VideoPublishTaskPlanStatusDict[status] || {
44
+ icon: '',
45
+ title: '',
46
+ color: ''
47
+ };
48
+ return status ? /*#__PURE__*/_jsxs(Tag, {
49
+ color: itemData.color,
50
+ children: [itemData.icon, " ", itemData.title || status]
51
+ }) : null;
52
+ };
53
+ export default VideoPublishTaskPlanStatus;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './query.less';
3
+ interface Props {
4
+ defaultQuery: VideoPublish.TaskListQuery;
5
+ onQuery: (query: VideoPublish.TaskListQuery) => void;
6
+ }
7
+ declare const VideoPublishTaskListQuery: React.FC<Props>;
8
+ export default VideoPublishTaskListQuery;
@@ -0,0 +1,76 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+ import React, { useState } from 'react';
4
+ import { Button, DatePicker, Form, Select, Space } from "antd";
5
+ import "./query.less";
6
+ import { ClockCircleOutlined, ExclamationCircleOutlined, SendOutlined } from "@ant-design/icons";
7
+ import dayjs from "dayjs";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ import { jsxs as _jsxs } from "react/jsx-runtime";
10
+ var VideoPublishTaskListQuery = function VideoPublishTaskListQuery(_ref) {
11
+ var 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 _useState = useState(_objectSpread({}, defaultQuery)),
18
+ _useState2 = _slicedToArray(_useState, 2),
19
+ query = _useState2[0],
20
+ setQuery = _useState2[1];
21
+ var todayEnd = dayjs(dayjs(Date.now()).format('YYYY-MM-DD 23:59:59')).valueOf();
22
+ var onTime = function onTime(startTime, endTime) {
23
+ query.startTime = startTime;
24
+ query.endTime = endTime;
25
+ setQuery(_objectSpread({}, query));
26
+ };
27
+ var onFinish = function onFinish() {
28
+ var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
29
+ onQuery(_objectSpread(_objectSpread({}, query), values));
30
+ };
31
+ return /*#__PURE__*/_jsx("div", {
32
+ className: "videoPublishTaskListQuery",
33
+ children: /*#__PURE__*/_jsx(Form, {
34
+ form: form,
35
+ initialValues: _objectSpread({}, query),
36
+ onFinish: onFinish,
37
+ children: /*#__PURE__*/_jsxs(Space, {
38
+ children: [/*#__PURE__*/_jsx(Form.Item, {
39
+ name: "timeFromKind",
40
+ children: /*#__PURE__*/_jsxs(Select, {
41
+ style: {
42
+ width: 160
43
+ },
44
+ value: form,
45
+ children: [/*#__PURE__*/_jsxs(Select.Option, {
46
+ value: "created",
47
+ children: [/*#__PURE__*/_jsx(ExclamationCircleOutlined, {}), " \u6309\u521B\u5EFA\u65F6\u95F4"]
48
+ }), /*#__PURE__*/_jsxs(Select.Option, {
49
+ value: "updated",
50
+ children: [/*#__PURE__*/_jsx(SendOutlined, {}), " \u6309\u53D1\u5E03\u65F6\u95F4"]
51
+ }), /*#__PURE__*/_jsxs(Select.Option, {
52
+ value: "publishTime",
53
+ children: [/*#__PURE__*/_jsx(ClockCircleOutlined, {}), " \u6309\u5B9A\u65F6\u65F6\u95F4"]
54
+ })]
55
+ })
56
+ }), /*#__PURE__*/_jsx(Form.Item, {
57
+ children: /*#__PURE__*/_jsx(DatePicker.RangePicker, {
58
+ defaultValue: query.startTime > 0 ? [query.startTime <= 0 ? null : dayjs(query.startTime), query.endTime <= 0 ? null : dayjs(query.endTime)] : undefined,
59
+ disabledDate: function disabledDate(currentDate) {
60
+ return currentDate.valueOf() > todayEnd;
61
+ },
62
+ onChange: function onChange(dates, dateStrings) {
63
+ var _dates$, _dates$2;
64
+ onTime((dates === null || dates === void 0 || (_dates$ = dates[0]) === null || _dates$ === void 0 ? void 0 : _dates$.valueOf()) || 0, (dates === null || dates === void 0 || (_dates$2 = dates[1]) === null || _dates$2 === void 0 ? void 0 : _dates$2.valueOf()) || 0);
65
+ }
66
+ })
67
+ }), /*#__PURE__*/_jsx(Button, {
68
+ type: "primary",
69
+ htmlType: "submit",
70
+ children: "\u641C\u7D22"
71
+ })]
72
+ })
73
+ })
74
+ });
75
+ };
76
+ export default VideoPublishTaskListQuery;
@@ -0,0 +1,19 @@
1
+ .videoPublishTaskListQuery{
2
+ .ant-form-item{
3
+ margin-bottom: 0 !important;
4
+ }
5
+
6
+ .taskStatus{
7
+ width: 120px;
8
+ }
9
+
10
+ .videoServerId{
11
+ width: 150px;
12
+ }
13
+
14
+ .imageWatermarkServerId{
15
+ width: 200px;
16
+
17
+ }
18
+
19
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ whoCanView: VideoPublish.WhoCanView;
4
+ }
5
+ interface VideoPublishTaskWhoCanViewList {
6
+ whoCanView: VideoPublish.WhoCanView;
7
+ title: string;
8
+ color: string;
9
+ }
10
+ export declare const VideoPublishTaskWhoCanViewList: VideoPublishTaskWhoCanViewList[];
11
+ declare const VideoPublishTaskWhoCanView: React.FC<Props>;
12
+ export default VideoPublishTaskWhoCanView;
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { Tag } from 'antd';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ // ENUM('wait', 'progress', 'finish', 'fail')
5
+ export var VideoPublishTaskWhoCanViewList = [{
6
+ whoCanView: '0',
7
+ title: '公开',
8
+ color: ''
9
+ }, {
10
+ whoCanView: '1',
11
+ title: '仅自己',
12
+ color: 'red'
13
+ }, {
14
+ whoCanView: '2',
15
+ title: '好友可见',
16
+ color: 'blue'
17
+ }];
18
+ var VideoPublishTaskWhoCanViewDict = function () {
19
+ var dict = {};
20
+ VideoPublishTaskWhoCanViewList.forEach(function (items) {
21
+ dict[items.whoCanView] = items;
22
+ });
23
+ return dict;
24
+ }();
25
+ var VideoPublishTaskWhoCanView = function VideoPublishTaskWhoCanView(_ref) {
26
+ var whoCanView = _ref.whoCanView;
27
+ var itemData = VideoPublishTaskWhoCanViewDict[whoCanView] || {
28
+ icon: '',
29
+ title: '',
30
+ color: ''
31
+ };
32
+ return whoCanView ? /*#__PURE__*/_jsx(Tag, {
33
+ color: itemData.color,
34
+ children: itemData.title || whoCanView
35
+ }) : null;
36
+ };
37
+ export default VideoPublishTaskWhoCanView;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ env?: Global.Env;
4
+ videoAccountId: number;
5
+ isBan: boolean;
6
+ notBanTime: number;
7
+ onSuccess: () => void;
8
+ }
9
+ declare const VideoAccountBan: React.FC<Props>;
10
+ export default VideoAccountBan;
@@ -0,0 +1,94 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
+ import React from 'react';
6
+ import { Button, DatePicker, Form, Switch } from 'antd';
7
+ import { useRequest } from "@umijs/hooks";
8
+ import * as VideoPublishVideoAccountController from "../../../service/api/VideoPublishVideoAccountController";
9
+ import PageContentWarp from "../../../UI/PageContentWarp";
10
+ import DialogDrawerFooter from "../../../UI/DialogDrawerFooter";
11
+ import toast from "../../../lib/toast";
12
+ import dayjs from "dayjs";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { jsxs as _jsxs } from "react/jsx-runtime";
15
+ var VideoAccountBan = function VideoAccountBan(_ref) {
16
+ var env = _ref.env,
17
+ videoAccountId = _ref.videoAccountId,
18
+ isBan = _ref.isBan,
19
+ notBanTime = _ref.notBanTime,
20
+ _ref$onSuccess = _ref.onSuccess,
21
+ _onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess;
22
+ var _Form$useForm = Form.useForm(),
23
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
24
+ form = _Form$useForm2[0];
25
+ var _useRequest = useRequest(function (data) {
26
+ return VideoPublishVideoAccountController.ban(_objectSpread(_objectSpread({}, data), {}, {
27
+ id: videoAccountId
28
+ }), {
29
+ env: env
30
+ });
31
+ }, {
32
+ manual: true,
33
+ onSuccess: function () {
34
+ var _onSuccess2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(result) {
35
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
36
+ while (1) switch (_context.prev = _context.next) {
37
+ case 0:
38
+ toast('已保存');
39
+ _onSuccess();
40
+ case 2:
41
+ case "end":
42
+ return _context.stop();
43
+ }
44
+ }, _callee);
45
+ }));
46
+ function onSuccess(_x) {
47
+ return _onSuccess2.apply(this, arguments);
48
+ }
49
+ return onSuccess;
50
+ }()
51
+ }),
52
+ run = _useRequest.run,
53
+ loading = _useRequest.loading;
54
+ var onFinish = function onFinish(values) {
55
+ run(_objectSpread(_objectSpread({}, values), {}, {
56
+ notBanTime: values.notBanTime ? Math.floor(values.notBanTime.valueOf() * 0.001) : 0
57
+ }));
58
+ };
59
+ return /*#__PURE__*/_jsx(PageContentWarp, {
60
+ className: "videoAccountBan",
61
+ children: /*#__PURE__*/_jsxs(Form, {
62
+ labelCol: {
63
+ span: 6
64
+ },
65
+ form: form,
66
+ initialValues: {
67
+ isBan: isBan,
68
+ notBanTime: notBanTime > 1e5 ? dayjs(notBanTime * 1e3) : null
69
+ },
70
+ disabled: loading,
71
+ onFinish: onFinish,
72
+ children: [/*#__PURE__*/_jsx(Form.Item, {
73
+ name: "isBan",
74
+ label: "\u662F\u5426\u88AB\u5C01\u7981",
75
+ children: /*#__PURE__*/_jsx(Switch, {
76
+ checkedChildren: "\u672A\u5C01\u7981",
77
+ unCheckedChildren: "\u5DF2\u5C01\u7981"
78
+ })
79
+ }), /*#__PURE__*/_jsx(Form.Item, {
80
+ name: "notBanTime",
81
+ label: "\u89E3\u5C01\u65F6\u95F4",
82
+ children: /*#__PURE__*/_jsx(DatePicker, {})
83
+ }), /*#__PURE__*/_jsx(DialogDrawerFooter, {
84
+ children: /*#__PURE__*/_jsx(Button, {
85
+ type: "primary",
86
+ htmlType: "submit",
87
+ loading: loading,
88
+ children: "\u4FDD\u5B58"
89
+ })
90
+ })]
91
+ })
92
+ });
93
+ };
94
+ export default VideoAccountBan;
@@ -0,0 +1,4 @@
1
+ .videoAccountBan{
2
+
3
+
4
+ }
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import "./base-info.less";
3
+ interface Props {
4
+ id?: number;
5
+ className?: string;
6
+ index?: number;
7
+ accountInfo?: VideoPublishVideoAccount.BaseInfo;
8
+ disabledDel?: boolean;
9
+ onDel?: (id: number) => void;
10
+ onClick?: () => void;
11
+ }
12
+ declare const VideoPublishVideoAccountBaseInfo: React.FC<Props>;
13
+ export default VideoPublishVideoAccountBaseInfo;