component-shipinlv 1.1.23 → 1.1.26
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/VideoPublish/index.js +4 -3
- package/dist/VideoPublish/publish-task-plan/index.d.ts +1 -0
- package/dist/VideoPublish/publish-task-plan/index.js +5 -1
- package/dist/VideoPublish/task-list/index.js +6 -3
- package/dist/VideoPublish/task-list/plan/list.js +35 -19
- package/dist/VideoPublish/task-list/plan/list.less +6 -0
- package/dist/VideoPublish/task-list/plan/operate.d.ts +8 -0
- package/dist/VideoPublish/task-list/plan/operate.js +73 -0
- package/dist/VideoPublish/task-list/plan/status.js +6 -1
- package/dist/global.less +3 -0
- package/dist/service/api/VideoPublishTaskPlanController.d.ts +6 -0
- package/dist/service/api/VideoPublishTaskPlanController.js +46 -0
- package/dist/types/PublishTaskPlan.d.ts +1 -0
- package/dist/types/VideoPublishTaskPlan.d.ts +2 -1
- package/package.json +1 -1
@@ -90,7 +90,7 @@ var VideoPublish = function VideoPublish(_ref) {
|
|
90
90
|
key: 'task-list',
|
91
91
|
icon: /*#__PURE__*/_jsx(ClockCircleOutlined, {}),
|
92
92
|
label: '发布列表',
|
93
|
-
disabled: !canPublish,
|
93
|
+
// disabled: ! canPublish,
|
94
94
|
children: /*#__PURE__*/_jsx(VideoPublishTaskList, {
|
95
95
|
disabled: disabled,
|
96
96
|
env: env
|
@@ -99,13 +99,13 @@ var VideoPublish = function VideoPublish(_ref) {
|
|
99
99
|
key: 'setting',
|
100
100
|
icon: /*#__PURE__*/_jsx(SettingOutlined, {}),
|
101
101
|
label: '配置',
|
102
|
-
disabled: !canPublish,
|
102
|
+
// disabled: ! canPublish,
|
103
103
|
children: /*#__PURE__*/_jsx(VideoPublishAccountManageSettingPage, {})
|
104
104
|
}, {
|
105
105
|
key: 'publish-log',
|
106
106
|
icon: /*#__PURE__*/_jsx(FileSearchOutlined, {}),
|
107
107
|
label: '发布日志',
|
108
|
-
disabled: !canPublish,
|
108
|
+
// disabled: ! canPublish,
|
109
109
|
forceRender: canPublish,
|
110
110
|
children: /*#__PURE__*/_jsx(VideoPublishLog, {
|
111
111
|
env: env,
|
@@ -177,6 +177,7 @@ var VideoPublish = function VideoPublish(_ref) {
|
|
177
177
|
})
|
178
178
|
})]
|
179
179
|
}), /*#__PURE__*/_jsx(VideoPublishPublishVideoPlan, {
|
180
|
+
disabled: disabled,
|
180
181
|
env: env,
|
181
182
|
clientIdentity: clientIdentity
|
182
183
|
})]
|
@@ -3,9 +3,13 @@ import "./index.less";
|
|
3
3
|
import PublishTaskPlanClass from "./tool";
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
5
|
var VideoPublishPublishVideoPlan = function VideoPublishPublishVideoPlan(_ref) {
|
6
|
-
var
|
6
|
+
var disabled = _ref.disabled,
|
7
|
+
env = _ref.env,
|
7
8
|
clientIdentity = _ref.clientIdentity;
|
8
9
|
useEffect(function () {
|
10
|
+
if (disabled) {
|
11
|
+
return;
|
12
|
+
}
|
9
13
|
var publishTaskPlan = new PublishTaskPlanClass(env, clientIdentity);
|
10
14
|
publishTaskPlan.onInit();
|
11
15
|
}, []);
|
@@ -84,8 +84,11 @@ var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
|
|
84
84
|
title: /*#__PURE__*/_jsx(_Fragment, {
|
85
85
|
children: "\u72B6\u6001"
|
86
86
|
}),
|
87
|
-
dataIndex: '
|
88
|
-
key: '
|
87
|
+
dataIndex: 'planStatus',
|
88
|
+
key: 'planStatus',
|
89
|
+
render: function render(planStatus) {
|
90
|
+
return ''; // <VideoPublishTaskPlanStatus status={ planStatus } />
|
91
|
+
}
|
89
92
|
}, {
|
90
93
|
title: /*#__PURE__*/_jsx(_Fragment, {
|
91
94
|
children: "\u5F00\u59CB\u65F6\u95F4"
|
@@ -152,7 +155,7 @@ var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
|
|
152
155
|
env: env,
|
153
156
|
publishTaskId: publishTaskId
|
154
157
|
}),
|
155
|
-
width:
|
158
|
+
width: 1200
|
156
159
|
});
|
157
160
|
};
|
158
161
|
return /*#__PURE__*/_jsx(PageContentWarp, {
|
@@ -5,15 +5,17 @@ import "./list.less";
|
|
5
5
|
import PageContentWarp from "../../../UI/PageContentWarp";
|
6
6
|
import { useRequest } from "@umijs/hooks";
|
7
7
|
import * as VideoPublishTaskPlanController from "../../../service/api/VideoPublishTaskPlanController";
|
8
|
-
import {
|
8
|
+
import { Popover, Table, Tooltip } from "antd";
|
9
9
|
import Time from "../../../UI/Time";
|
10
10
|
import VideoPublishTaskPlanStatus from "./status";
|
11
|
-
import { FileTextOutlined, VideoCameraOutlined } from "@ant-design/icons";
|
11
|
+
import { FileTextOutlined, QuestionCircleOutlined, VideoCameraOutlined } from "@ant-design/icons";
|
12
12
|
import VideoKindTag from "../../../component/videoKindTag";
|
13
13
|
import { onMediaShowView } from "../../../component/media-show";
|
14
14
|
import VideoPublishVideoAccountBaseInfo from "../../video-account/base-info";
|
15
|
+
import VideoPublishTaskPlanOperate from "./operate";
|
15
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
16
17
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
18
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
17
19
|
var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
|
18
20
|
var env = _ref.env,
|
19
21
|
_ref$publishTaskId = _ref.publishTaskId,
|
@@ -64,15 +66,27 @@ var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
|
|
64
66
|
accountInfo: record === null || record === void 0 ? void 0 : record.accountInfo
|
65
67
|
});
|
66
68
|
}
|
69
|
+
}, {
|
70
|
+
title: '来源任务',
|
71
|
+
dataIndex: 'productTaskId',
|
72
|
+
key: 'productTaskId'
|
67
73
|
}, {
|
68
74
|
title: /*#__PURE__*/_jsx(_Fragment, {
|
69
75
|
children: "\u72B6\u6001"
|
70
76
|
}),
|
71
77
|
dataIndex: 'status',
|
72
78
|
key: 'status',
|
73
|
-
render: function render(status) {
|
74
|
-
return /*#__PURE__*/
|
75
|
-
|
79
|
+
render: function render(status, record) {
|
80
|
+
return /*#__PURE__*/_jsxs("div", {
|
81
|
+
children: [/*#__PURE__*/_jsx(VideoPublishTaskPlanStatus, {
|
82
|
+
status: status
|
83
|
+
}), (record === null || record === void 0 ? void 0 : record.taskMessage) && /*#__PURE__*/_jsx(Tooltip, {
|
84
|
+
title: record === null || record === void 0 ? void 0 : record.taskMessage,
|
85
|
+
children: /*#__PURE__*/_jsx("a", {
|
86
|
+
className: "high",
|
87
|
+
children: /*#__PURE__*/_jsx(QuestionCircleOutlined, {})
|
88
|
+
})
|
89
|
+
})]
|
76
90
|
});
|
77
91
|
}
|
78
92
|
}, {
|
@@ -114,7 +128,7 @@ var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
|
|
114
128
|
});
|
115
129
|
}
|
116
130
|
}, {
|
117
|
-
title: '
|
131
|
+
title: '标签',
|
118
132
|
dataIndex: 'kindTagValue',
|
119
133
|
key: 'kindTagValue',
|
120
134
|
render: function render(kindTagValue, record) {
|
@@ -128,7 +142,7 @@ var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
|
|
128
142
|
});
|
129
143
|
}
|
130
144
|
}, {
|
131
|
-
title: '
|
145
|
+
title: '品标',
|
132
146
|
dataIndex: 'goodsTitle',
|
133
147
|
key: 'goodsTitle',
|
134
148
|
render: function render(goodsTitle, record) {
|
@@ -157,7 +171,7 @@ var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
|
|
157
171
|
}
|
158
172
|
}, {
|
159
173
|
title: /*#__PURE__*/_jsx(_Fragment, {
|
160
|
-
children: "\
|
174
|
+
children: "\u5BF9\u5916\u5C55\u793A"
|
161
175
|
}),
|
162
176
|
dataIndex: 'publishTime',
|
163
177
|
key: 'publishTime',
|
@@ -171,16 +185,16 @@ var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
|
|
171
185
|
dataIndex: '——',
|
172
186
|
key: '——',
|
173
187
|
render: function render(_, record) {
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
}
|
188
|
+
// const status = record?.status || '';
|
189
|
+
if (!record) {
|
190
|
+
return record;
|
191
|
+
}
|
192
|
+
return /*#__PURE__*/_jsx(VideoPublishTaskPlanOperate, {
|
193
|
+
itemData: record,
|
194
|
+
env: env,
|
195
|
+
onStatusChange: function onStatusChange() {
|
196
|
+
runTaskList();
|
197
|
+
}
|
184
198
|
});
|
185
199
|
}
|
186
200
|
}];
|
@@ -188,7 +202,6 @@ var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
|
|
188
202
|
setQuery(_objectSpread({}, query));
|
189
203
|
runTaskList(query, 1);
|
190
204
|
};
|
191
|
-
var onPause = function onPause(planId) {};
|
192
205
|
var _useRequest = useRequest(function () {
|
193
206
|
var postQuery = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : query;
|
194
207
|
var current = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : pagination.current;
|
@@ -229,6 +242,9 @@ var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
|
|
229
242
|
rowKey: function rowKey(record) {
|
230
243
|
return "".concat(record.id);
|
231
244
|
},
|
245
|
+
rowClassName: function rowClassName(record) {
|
246
|
+
return "row-".concat(record.status);
|
247
|
+
},
|
232
248
|
loading: false,
|
233
249
|
columns: columns,
|
234
250
|
dataSource: listData,
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import { Button, Popconfirm, Space } from "antd";
|
2
|
+
import React from "react";
|
3
|
+
import { useRequest } from "@umijs/hooks";
|
4
|
+
import * as VideoPublishTaskPlanController from "../../../service/api/VideoPublishTaskPlanController";
|
5
|
+
import { RedoOutlined, StopOutlined } from "@ant-design/icons";
|
6
|
+
import Tool from "../../../lib/Tool";
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
|
+
var VideoPublishTaskPlanOperate = function VideoPublishTaskPlanOperate(_ref) {
|
10
|
+
var env = _ref.env,
|
11
|
+
itemData = _ref.itemData,
|
12
|
+
_ref$onStatusChange = _ref.onStatusChange,
|
13
|
+
onStatusChange = _ref$onStatusChange === void 0 ? function () {} : _ref$onStatusChange;
|
14
|
+
var _useRequest = useRequest(function () {
|
15
|
+
return VideoPublishTaskPlanController.repeal({
|
16
|
+
planId: itemData.id
|
17
|
+
}, {
|
18
|
+
env: env
|
19
|
+
});
|
20
|
+
}, {
|
21
|
+
manual: true,
|
22
|
+
onSuccess: function onSuccess() {
|
23
|
+
Tool.toast('已经改为【废除】状态');
|
24
|
+
onStatusChange();
|
25
|
+
}
|
26
|
+
}),
|
27
|
+
runRepeal = _useRequest.run,
|
28
|
+
loadingRepeal = _useRequest.loading;
|
29
|
+
var _useRequest2 = useRequest(function () {
|
30
|
+
return VideoPublishTaskPlanController.retry({
|
31
|
+
planId: itemData.id
|
32
|
+
}, {
|
33
|
+
env: env
|
34
|
+
});
|
35
|
+
}, {
|
36
|
+
manual: true,
|
37
|
+
onSuccess: function onSuccess() {
|
38
|
+
Tool.toast('已经改为【等待】状态');
|
39
|
+
onStatusChange();
|
40
|
+
}
|
41
|
+
}),
|
42
|
+
runRetry = _useRequest2.run,
|
43
|
+
loadingRetry = _useRequest2.loading;
|
44
|
+
return /*#__PURE__*/_jsxs(Space, {
|
45
|
+
children: [/*#__PURE__*/_jsx(Popconfirm, {
|
46
|
+
title: "\u5E9F\u9664",
|
47
|
+
description: "\u5E9F\u9664\u540E\uFF0C\u4E0D\u53EF\u6062\u590D\uFF01",
|
48
|
+
onConfirm: function onConfirm() {
|
49
|
+
return runRepeal();
|
50
|
+
},
|
51
|
+
children: ['wait', 'fail'].includes(itemData.status) && /*#__PURE__*/_jsx(Button, {
|
52
|
+
type: "primary",
|
53
|
+
size: "small",
|
54
|
+
ghost: true,
|
55
|
+
danger: true,
|
56
|
+
icon: /*#__PURE__*/_jsx(StopOutlined, {}),
|
57
|
+
loading: loadingRepeal,
|
58
|
+
children: "\u5E9F\u9664"
|
59
|
+
})
|
60
|
+
}), ['fail', 'progress'].includes(itemData.status) && /*#__PURE__*/_jsx(Button, {
|
61
|
+
type: "primary",
|
62
|
+
size: "small",
|
63
|
+
ghost: true,
|
64
|
+
icon: /*#__PURE__*/_jsx(RedoOutlined, {}),
|
65
|
+
loading: loadingRetry,
|
66
|
+
onClick: function onClick() {
|
67
|
+
return runRetry();
|
68
|
+
},
|
69
|
+
children: "\u91CD\u8BD5"
|
70
|
+
})]
|
71
|
+
});
|
72
|
+
};
|
73
|
+
export default VideoPublishTaskPlanOperate;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { Tag } from 'antd';
|
3
|
-
import { CheckCircleOutlined, ClockCircleOutlined, LoadingOutlined, WarningOutlined } from "@ant-design/icons";
|
3
|
+
import { CheckCircleOutlined, ClockCircleOutlined, LoadingOutlined, StopOutlined, WarningOutlined } from "@ant-design/icons";
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
5
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
6
6
|
// ENUM('wait', 'progress', 'finish', 'fail')
|
@@ -25,6 +25,11 @@ export var VideoPublishTaskPlanStatusList = [{
|
|
25
25
|
icon: /*#__PURE__*/_jsx(WarningOutlined, {}),
|
26
26
|
title: '失败',
|
27
27
|
color: 'red'
|
28
|
+
}, {
|
29
|
+
status: 'repeal',
|
30
|
+
icon: /*#__PURE__*/_jsx(StopOutlined, {}),
|
31
|
+
title: '已废除',
|
32
|
+
color: ''
|
28
33
|
}];
|
29
34
|
var VideoPublishTaskPlanStatusDict = function () {
|
30
35
|
var dict = {};
|
package/dist/global.less
CHANGED
@@ -3,3 +3,9 @@ export declare function list(body: {
|
|
3
3
|
current: number;
|
4
4
|
pageSize: number;
|
5
5
|
}, options?: Global.RequestOptions): Promise<VideoPublishTaskPlan.ListResult>;
|
6
|
+
export declare function repeal(body: {
|
7
|
+
planId: number;
|
8
|
+
}, options?: Global.RequestOptions): Promise<boolean>;
|
9
|
+
export declare function retry(body: {
|
10
|
+
planId: number;
|
11
|
+
}, options?: Global.RequestOptions): Promise<boolean>;
|
@@ -25,4 +25,50 @@ function _list() {
|
|
25
25
|
}, _callee);
|
26
26
|
}));
|
27
27
|
return _list.apply(this, arguments);
|
28
|
+
}
|
29
|
+
export function repeal(_x3, _x4) {
|
30
|
+
return _repeal.apply(this, arguments);
|
31
|
+
}
|
32
|
+
function _repeal() {
|
33
|
+
_repeal = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body, options) {
|
34
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
35
|
+
while (1) switch (_context2.prev = _context2.next) {
|
36
|
+
case 0:
|
37
|
+
return _context2.abrupt("return", request(PublishDomainApi("user/publishTaskPlan/repeal", options === null || options === void 0 ? void 0 : options.env), _objectSpread({
|
38
|
+
method: 'POST',
|
39
|
+
headers: {
|
40
|
+
'Content-Type': 'application/json'
|
41
|
+
},
|
42
|
+
data: _objectSpread({}, body)
|
43
|
+
}, options || {})));
|
44
|
+
case 1:
|
45
|
+
case "end":
|
46
|
+
return _context2.stop();
|
47
|
+
}
|
48
|
+
}, _callee2);
|
49
|
+
}));
|
50
|
+
return _repeal.apply(this, arguments);
|
51
|
+
}
|
52
|
+
export function retry(_x5, _x6) {
|
53
|
+
return _retry.apply(this, arguments);
|
54
|
+
}
|
55
|
+
function _retry() {
|
56
|
+
_retry = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(body, options) {
|
57
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
58
|
+
while (1) switch (_context3.prev = _context3.next) {
|
59
|
+
case 0:
|
60
|
+
return _context3.abrupt("return", request(PublishDomainApi("user/publishTaskPlan/retry", options === null || options === void 0 ? void 0 : options.env), _objectSpread({
|
61
|
+
method: 'POST',
|
62
|
+
headers: {
|
63
|
+
'Content-Type': 'application/json'
|
64
|
+
},
|
65
|
+
data: _objectSpread({}, body)
|
66
|
+
}, options || {})));
|
67
|
+
case 1:
|
68
|
+
case "end":
|
69
|
+
return _context3.stop();
|
70
|
+
}
|
71
|
+
}, _callee3);
|
72
|
+
}));
|
73
|
+
return _retry.apply(this, arguments);
|
28
74
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
declare namespace VideoPublishTaskPlan {
|
2
|
-
type PlanStatus = 'wait' | 'progress' | 'finish' | 'fail';
|
2
|
+
type PlanStatus = 'wait' | 'progress' | 'finish' | 'fail' | 'repeal';
|
3
3
|
interface ListResult {
|
4
4
|
list: List[];
|
5
5
|
pagination: Global.Pagination;
|
@@ -16,6 +16,7 @@ declare namespace VideoPublishTaskPlan {
|
|
16
16
|
kindTagValue: string;
|
17
17
|
videoUrl: string;
|
18
18
|
publishTime: number;
|
19
|
+
taskMessage: string;
|
19
20
|
accountInfo: VideoPublishVideoAccount.BaseInfo;
|
20
21
|
}
|
21
22
|
interface ListQuery {
|