component-shipinlv 1.0.16 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Product/dict.d.ts +16 -0
- package/dist/Product/dict.js +93 -0
- package/dist/UI/PageContentWarp.d.ts +6 -0
- package/dist/UI/PageContentWarp.js +44 -10
- package/dist/UI/PageContentWarp.less +48 -0
- package/dist/VideoPublish/creat-task/hour-enabled.d.ts +9 -0
- package/dist/VideoPublish/creat-task/hour-enabled.js +42 -0
- package/dist/VideoPublish/creat-task/hour-enabled.less +24 -0
- package/dist/VideoPublish/creat-task/index.js +22 -2
- package/dist/VideoPublish/index.js +1 -1
- package/dist/VideoPublish/task-list/index.js +108 -43
- package/dist/VideoPublish/task-list/index.less +4 -1
- package/dist/VideoPublish/task-list/plan/list.d.ts +8 -0
- package/dist/VideoPublish/task-list/plan/list.js +230 -0
- package/dist/VideoPublish/task-list/plan/list.less +8 -0
- package/dist/VideoPublish/task-list/plan/status.d.ts +13 -0
- package/dist/VideoPublish/task-list/plan/status.js +48 -0
- package/dist/VideoPublish/task-list/query.d.ts +8 -0
- package/dist/VideoPublish/task-list/query.js +57 -0
- package/dist/VideoPublish/task-list/query.less +19 -0
- package/dist/VideoPublish/video-account/index.js +65 -14
- package/dist/VideoPublish/video-account/index.less +21 -0
- package/dist/VideoPublish/video-account/query.d.ts +8 -0
- package/dist/VideoPublish/video-account/query.js +92 -0
- package/dist/VideoPublish/video-account/query.less +15 -0
- package/dist/component/video-platform/logo.d.ts +7 -7
- package/dist/component/video-platform/logo.js +41 -27
- package/dist/lib/Tool.d.ts +1 -1
- package/dist/service/api/ProductController.d.ts +3 -0
- package/dist/service/api/ProductController.js +31 -7
- package/dist/service/api/VideoPublishController.d.ts +4 -0
- package/dist/service/api/VideoPublishController.js +3 -2
- package/dist/service/api/VideoPublishTaskController.d.ts +1 -1
- package/dist/service/api/VideoPublishTaskPlanController.d.ts +5 -0
- package/dist/service/api/VideoPublishTaskPlanController.js +28 -0
- package/dist/types/VideoPublish.d.ts +26 -10
- package/dist/types/VideoPublishTaskPlan.d.ts +22 -0
- package/dist/types/VideoPublishTaskPlan.js +0 -0
- package/package.json +2 -1
- package/dist/UI/PageContentWarp.css.d.ts +0 -5
- package/dist/UI/PageContentWarp.css.js +0 -6
@@ -0,0 +1,230 @@
|
|
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 "./list.less";
|
5
|
+
import PageContentWarp from "../../../UI/PageContentWarp";
|
6
|
+
import { useRequest } from "@umijs/hooks";
|
7
|
+
import * as VideoPublishTaskPlanController from "../../../service/api/VideoPublishTaskPlanController";
|
8
|
+
import { Button, Popover, Space, Table } from "antd";
|
9
|
+
// import VideoPublishTaskListQuery from "component-shipinlv/VideoPublish/task-list/query";
|
10
|
+
import Time from "../../../UI/Time";
|
11
|
+
import VideoPlatform from "../../../component/video-platform/logo";
|
12
|
+
import VideoPublishTaskPlanStatus from "./status";
|
13
|
+
import { FileTextOutlined, VideoCameraOutlined } from "@ant-design/icons";
|
14
|
+
import VideoKindTag from "../../../component/videoKindTag";
|
15
|
+
import { onMediaShowView } from "../../../component/media-show";
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
17
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
18
|
+
var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
|
19
|
+
var env = _ref.env,
|
20
|
+
_ref$publishTaskId = _ref.publishTaskId,
|
21
|
+
publishTaskId = _ref$publishTaskId === void 0 ? 0 : _ref$publishTaskId;
|
22
|
+
var _useState = useState([]),
|
23
|
+
_useState2 = _slicedToArray(_useState, 2),
|
24
|
+
listData = _useState2[0],
|
25
|
+
setListData = _useState2[1];
|
26
|
+
var _useState3 = useState({
|
27
|
+
current: 1,
|
28
|
+
pageSize: 20,
|
29
|
+
total: 0,
|
30
|
+
simple: true,
|
31
|
+
showSizeChanger: false,
|
32
|
+
showQuickJumper: false
|
33
|
+
}),
|
34
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
35
|
+
pagination = _useState4[0],
|
36
|
+
setPagination = _useState4[1];
|
37
|
+
var _useState5 = useState({
|
38
|
+
startTime: 0,
|
39
|
+
// Date.now(),
|
40
|
+
endTime: 0 //Date.now(),
|
41
|
+
// taskStatus: '',
|
42
|
+
// keyword: '',
|
43
|
+
}),
|
44
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
45
|
+
query = _useState6[0],
|
46
|
+
setQuery = _useState6[1];
|
47
|
+
var columns = [{
|
48
|
+
title: '序号',
|
49
|
+
dataIndex: '-',
|
50
|
+
key: '-',
|
51
|
+
render: function render(_, _1) {
|
52
|
+
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
53
|
+
return index + 1;
|
54
|
+
}
|
55
|
+
}, {
|
56
|
+
title: '编号',
|
57
|
+
dataIndex: 'id',
|
58
|
+
key: 'id'
|
59
|
+
}, {
|
60
|
+
title: '平台',
|
61
|
+
dataIndex: 'platform',
|
62
|
+
key: 'platform',
|
63
|
+
render: function render(platform, record) {
|
64
|
+
return /*#__PURE__*/_jsx(VideoPlatform, {
|
65
|
+
platform: platform,
|
66
|
+
showName: true
|
67
|
+
});
|
68
|
+
}
|
69
|
+
}, {
|
70
|
+
title: /*#__PURE__*/_jsx(_Fragment, {
|
71
|
+
children: "\u72B6\u6001"
|
72
|
+
}),
|
73
|
+
dataIndex: 'status',
|
74
|
+
key: 'status',
|
75
|
+
render: function render(status) {
|
76
|
+
return /*#__PURE__*/_jsx(VideoPublishTaskPlanStatus, {
|
77
|
+
status: status
|
78
|
+
});
|
79
|
+
}
|
80
|
+
}, {
|
81
|
+
title: '标题',
|
82
|
+
dataIndex: 'title',
|
83
|
+
key: 'title',
|
84
|
+
render: function render(title, record) {
|
85
|
+
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
86
|
+
return title && /*#__PURE__*/_jsx(Popover, {
|
87
|
+
title: "\u6807\u9898",
|
88
|
+
content: title,
|
89
|
+
children: /*#__PURE__*/_jsx("a", {
|
90
|
+
children: /*#__PURE__*/_jsx(FileTextOutlined, {})
|
91
|
+
})
|
92
|
+
});
|
93
|
+
}
|
94
|
+
}, {
|
95
|
+
title: '简介',
|
96
|
+
dataIndex: 'introduction',
|
97
|
+
key: 'introduction',
|
98
|
+
render: function render(introduction, record) {
|
99
|
+
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
100
|
+
return introduction && /*#__PURE__*/_jsx(Popover, {
|
101
|
+
title: "\u7B80\u4ECB",
|
102
|
+
content: introduction,
|
103
|
+
children: /*#__PURE__*/_jsx("a", {
|
104
|
+
children: /*#__PURE__*/_jsx(FileTextOutlined, {})
|
105
|
+
})
|
106
|
+
});
|
107
|
+
}
|
108
|
+
}, {
|
109
|
+
title: '类型标签',
|
110
|
+
dataIndex: 'videoKindTag',
|
111
|
+
key: 'videoKindTag',
|
112
|
+
render: function render(videoKindTag, record) {
|
113
|
+
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
114
|
+
return /*#__PURE__*/_jsx(VideoKindTag, {
|
115
|
+
videoKindTag: videoKindTag
|
116
|
+
});
|
117
|
+
}
|
118
|
+
}, {
|
119
|
+
title: '带货/小程序',
|
120
|
+
dataIndex: 'kindTagValue',
|
121
|
+
key: 'kindTagValue',
|
122
|
+
render: function render(kindTagValue, record) {
|
123
|
+
var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
124
|
+
return kindTagValue && /*#__PURE__*/_jsx(Popover, {
|
125
|
+
title: "\u5E26\u8D27/\u5C0F\u7A0B\u5E8F/\u5B9A\u4F4D",
|
126
|
+
content: kindTagValue,
|
127
|
+
children: /*#__PURE__*/_jsx("a", {
|
128
|
+
children: /*#__PURE__*/_jsx(FileTextOutlined, {})
|
129
|
+
})
|
130
|
+
});
|
131
|
+
}
|
132
|
+
}, {
|
133
|
+
title: /*#__PURE__*/_jsx(_Fragment, {
|
134
|
+
children: "\u89C6\u9891"
|
135
|
+
}),
|
136
|
+
dataIndex: 'videoUrl',
|
137
|
+
key: 'videoUrl',
|
138
|
+
render: function render(videoUrl) {
|
139
|
+
return /*#__PURE__*/_jsx("a", {
|
140
|
+
onClick: function onClick() {
|
141
|
+
return onMediaShowView('', videoUrl, 'video');
|
142
|
+
},
|
143
|
+
children: /*#__PURE__*/_jsx(VideoCameraOutlined, {})
|
144
|
+
});
|
145
|
+
}
|
146
|
+
}, {
|
147
|
+
title: /*#__PURE__*/_jsx(_Fragment, {
|
148
|
+
children: "\u53D1\u5E03\u65F6\u95F4"
|
149
|
+
}),
|
150
|
+
dataIndex: 'publishTime',
|
151
|
+
key: 'publishTime',
|
152
|
+
render: function render(publishTime) {
|
153
|
+
return /*#__PURE__*/_jsx(Time, {
|
154
|
+
time: publishTime
|
155
|
+
});
|
156
|
+
}
|
157
|
+
}, {
|
158
|
+
title: '操作',
|
159
|
+
dataIndex: '——',
|
160
|
+
key: '——',
|
161
|
+
render: function render(_, record) {
|
162
|
+
return /*#__PURE__*/_jsx(Space, {
|
163
|
+
children: /*#__PURE__*/_jsx(Button, {
|
164
|
+
type: "link",
|
165
|
+
size: "small",
|
166
|
+
disabled: true,
|
167
|
+
onChange: function onChange() {
|
168
|
+
return onPause((record === null || record === void 0 ? void 0 : record.id) || 0);
|
169
|
+
},
|
170
|
+
children: "\u5E9F\u9664"
|
171
|
+
})
|
172
|
+
});
|
173
|
+
}
|
174
|
+
}];
|
175
|
+
var onQuery = function onQuery(query) {
|
176
|
+
setQuery(_objectSpread({}, query));
|
177
|
+
runTaskList(query, 1);
|
178
|
+
};
|
179
|
+
var onPause = function onPause(planId) {};
|
180
|
+
var _useRequest = useRequest(function () {
|
181
|
+
var postQuery = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : query;
|
182
|
+
var current = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : pagination.current;
|
183
|
+
return VideoPublishTaskPlanController.list(_objectSpread(_objectSpread({
|
184
|
+
publishTaskId: publishTaskId
|
185
|
+
}, postQuery), {}, {
|
186
|
+
current: current,
|
187
|
+
pageSize: pagination.pageSize
|
188
|
+
}), {
|
189
|
+
env: env
|
190
|
+
});
|
191
|
+
}, {
|
192
|
+
onSuccess: function onSuccess(result) {
|
193
|
+
setListData(result.list);
|
194
|
+
setPagination(result.pagination);
|
195
|
+
}
|
196
|
+
}),
|
197
|
+
runTaskList = _useRequest.run,
|
198
|
+
loadingTaskList = _useRequest.loading,
|
199
|
+
errorTaskList = _useRequest.error;
|
200
|
+
return /*#__PURE__*/_jsx(PageContentWarp, {
|
201
|
+
loading: loadingTaskList,
|
202
|
+
error: errorTaskList,
|
203
|
+
onReload: runTaskList
|
204
|
+
// title="发布列表"
|
205
|
+
,
|
206
|
+
className: "videoPublishTaskPlanList"
|
207
|
+
// extInfo={(
|
208
|
+
// <VideoPublishTaskListQuery
|
209
|
+
// defaultQuery={ query }
|
210
|
+
// onQuery={ query => onQuery( query ) }
|
211
|
+
// />
|
212
|
+
// )}
|
213
|
+
,
|
214
|
+
children: /*#__PURE__*/_jsx(Table, {
|
215
|
+
size: "small",
|
216
|
+
bordered: true,
|
217
|
+
rowKey: function rowKey(record) {
|
218
|
+
return "".concat(record.id);
|
219
|
+
},
|
220
|
+
loading: false,
|
221
|
+
columns: columns,
|
222
|
+
dataSource: listData,
|
223
|
+
pagination: pagination,
|
224
|
+
onChange: function onChange(page, filters, sorter, extra) {
|
225
|
+
runTaskList(query, page.current);
|
226
|
+
}
|
227
|
+
})
|
228
|
+
});
|
229
|
+
};
|
230
|
+
export default VideoPublishTaskPlanList;
|
@@ -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,48 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Tag } from 'antd';
|
3
|
+
import { CheckCircleOutlined, ClockCircleOutlined, LoadingOutlined, 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
|
+
var VideoPublishTaskPlanStatusDict = function () {
|
30
|
+
var dict = {};
|
31
|
+
VideoPublishTaskPlanStatusList.forEach(function (items) {
|
32
|
+
dict[items.status] = items;
|
33
|
+
});
|
34
|
+
return dict;
|
35
|
+
}();
|
36
|
+
var VideoPublishTaskPlanStatus = function VideoPublishTaskPlanStatus(_ref) {
|
37
|
+
var status = _ref.status;
|
38
|
+
var itemData = VideoPublishTaskPlanStatusDict[status] || {
|
39
|
+
icon: '',
|
40
|
+
title: '',
|
41
|
+
color: ''
|
42
|
+
};
|
43
|
+
return status ? /*#__PURE__*/_jsxs(Tag, {
|
44
|
+
color: itemData.color,
|
45
|
+
children: [itemData.icon, " ", itemData.title || status]
|
46
|
+
}) : null;
|
47
|
+
};
|
48
|
+
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,57 @@
|
|
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, Space } from "antd";
|
5
|
+
import "./query.less";
|
6
|
+
import dayjs from "dayjs";
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
|
+
var VideoPublishTaskListQuery = function VideoPublishTaskListQuery(_ref) {
|
10
|
+
var defaultQuery = _ref.defaultQuery,
|
11
|
+
_ref$onQuery = _ref.onQuery,
|
12
|
+
onQuery = _ref$onQuery === void 0 ? function () {} : _ref$onQuery;
|
13
|
+
var _Form$useForm = Form.useForm(),
|
14
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
15
|
+
form = _Form$useForm2[0];
|
16
|
+
var _useState = useState(_objectSpread({}, defaultQuery)),
|
17
|
+
_useState2 = _slicedToArray(_useState, 2),
|
18
|
+
query = _useState2[0],
|
19
|
+
setQuery = _useState2[1];
|
20
|
+
var todayEnd = dayjs(dayjs(Date.now()).format('YYYY-MM-DD 23:59:59')).valueOf();
|
21
|
+
var onTime = function onTime(startTime, endTime) {
|
22
|
+
query.startTime = startTime;
|
23
|
+
query.endTime = endTime;
|
24
|
+
setQuery(_objectSpread({}, query));
|
25
|
+
};
|
26
|
+
var onFinish = function onFinish() {
|
27
|
+
var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
28
|
+
onQuery(_objectSpread(_objectSpread({}, query), values));
|
29
|
+
};
|
30
|
+
return /*#__PURE__*/_jsx("div", {
|
31
|
+
className: "videoPublishTaskListQuery",
|
32
|
+
children: /*#__PURE__*/_jsx(Form, {
|
33
|
+
form: form,
|
34
|
+
initialValues: _objectSpread({}, query),
|
35
|
+
onFinish: onFinish,
|
36
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
37
|
+
children: [/*#__PURE__*/_jsx(Form.Item, {
|
38
|
+
children: /*#__PURE__*/_jsx(DatePicker.RangePicker, {
|
39
|
+
defaultValue: query.startTime > 0 ? [query.startTime <= 0 ? null : dayjs(query.startTime), query.endTime <= 0 ? null : dayjs(query.endTime)] : undefined,
|
40
|
+
disabledDate: function disabledDate(currentDate) {
|
41
|
+
return currentDate.valueOf() > todayEnd;
|
42
|
+
},
|
43
|
+
onChange: function onChange(dates, dateStrings) {
|
44
|
+
var _dates$, _dates$2;
|
45
|
+
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);
|
46
|
+
}
|
47
|
+
})
|
48
|
+
}), /*#__PURE__*/_jsx(Button, {
|
49
|
+
type: "primary",
|
50
|
+
htmlType: "submit",
|
51
|
+
children: "\u641C\u7D22"
|
52
|
+
})]
|
53
|
+
})
|
54
|
+
})
|
55
|
+
});
|
56
|
+
};
|
57
|
+
export default VideoPublishTaskListQuery;
|
@@ -1,10 +1,13 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
2
3
|
import React, { useState } from "react";
|
3
4
|
import "./index.less";
|
4
5
|
import PageContentWarp from "../../UI/PageContentWarp";
|
5
6
|
import { useRequest } from "@umijs/hooks";
|
6
7
|
import * as VideoPublishController from "../../service/api/VideoPublishController";
|
7
|
-
import {
|
8
|
+
import { Avatar, Table, Tag } from "antd";
|
9
|
+
import VideoPublishVideoAccountListQuery from "./query";
|
10
|
+
import VideoPlatform from "../../component/video-platform/logo";
|
8
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
10
13
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -15,6 +18,24 @@ var VideoPublishVideoAccount = function VideoPublishVideoAccount(_ref) {
|
|
15
18
|
_useState2 = _slicedToArray(_useState, 2),
|
16
19
|
listData = _useState2[0],
|
17
20
|
setListData = _useState2[1];
|
21
|
+
var _useState3 = useState({
|
22
|
+
current: 1,
|
23
|
+
pageSize: 20,
|
24
|
+
total: 0,
|
25
|
+
simple: true,
|
26
|
+
showSizeChanger: false
|
27
|
+
}),
|
28
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
29
|
+
pagination = _useState4[0],
|
30
|
+
setPagination = _useState4[1];
|
31
|
+
var _useState5 = useState({
|
32
|
+
isLoginValid: '',
|
33
|
+
keyword: '',
|
34
|
+
platform: ''
|
35
|
+
}),
|
36
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
37
|
+
query = _useState6[0],
|
38
|
+
setQuery = _useState6[1];
|
18
39
|
var columns = [{
|
19
40
|
title: '序号',
|
20
41
|
dataIndex: '-',
|
@@ -30,21 +51,37 @@ var VideoPublishVideoAccount = function VideoPublishVideoAccount(_ref) {
|
|
30
51
|
}, {
|
31
52
|
title: '平台',
|
32
53
|
dataIndex: 'platform',
|
33
|
-
key: 'platform'
|
54
|
+
key: 'platform',
|
55
|
+
render: function render(platform, record) {
|
56
|
+
return /*#__PURE__*/_jsx(VideoPlatform, {
|
57
|
+
platform: platform,
|
58
|
+
showName: true
|
59
|
+
});
|
60
|
+
}
|
34
61
|
}, {
|
35
62
|
title: '名称',
|
36
63
|
dataIndex: 'nickname',
|
37
64
|
key: 'nickname',
|
38
65
|
render: function render(nickname, record) {
|
39
|
-
return /*#__PURE__*/
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
66
|
+
return /*#__PURE__*/_jsxs("div", {
|
67
|
+
className: "userInfo",
|
68
|
+
children: [/*#__PURE__*/_jsx("div", {
|
69
|
+
className: "avatar",
|
70
|
+
children: /*#__PURE__*/_jsx(Avatar, {
|
71
|
+
size: 40,
|
72
|
+
className: "avatarBox",
|
73
|
+
src: record === null || record === void 0 ? void 0 : record.avatar
|
74
|
+
})
|
75
|
+
}), /*#__PURE__*/_jsxs("div", {
|
76
|
+
className: "info",
|
77
|
+
children: [/*#__PURE__*/_jsx("strong", {
|
78
|
+
className: "nickname",
|
79
|
+
children: (record === null || record === void 0 ? void 0 : record.nickname) || '-'
|
80
|
+
}), /*#__PURE__*/_jsx("div", {
|
81
|
+
className: "userId",
|
45
82
|
children: record === null || record === void 0 ? void 0 : record.accountId
|
46
83
|
})]
|
47
|
-
})
|
84
|
+
})]
|
48
85
|
});
|
49
86
|
}
|
50
87
|
}, {
|
@@ -74,26 +111,40 @@ var VideoPublishVideoAccount = function VideoPublishVideoAccount(_ref) {
|
|
74
111
|
key: 'followerCount'
|
75
112
|
}];
|
76
113
|
var _useRequest = useRequest(function () {
|
77
|
-
|
114
|
+
var postQuery = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : query;
|
115
|
+
return VideoPublishController.videoAccountList(_objectSpread(_objectSpread({}, postQuery), {}, {
|
78
116
|
current: 1,
|
79
|
-
pageSize:
|
80
|
-
}, {
|
117
|
+
pageSize: 20
|
118
|
+
}), {
|
81
119
|
env: env
|
82
120
|
});
|
83
121
|
}, {
|
84
122
|
onSuccess: function onSuccess(result) {
|
85
123
|
setListData(result.list);
|
124
|
+
setPagination(result.pagination);
|
86
125
|
}
|
87
126
|
}),
|
88
127
|
runVideoAccount = _useRequest.run,
|
89
128
|
loadingVideoAccount = _useRequest.loading,
|
90
129
|
errorVideoAccount = _useRequest.error;
|
130
|
+
var _onQuery = function onQuery(query) {
|
131
|
+
setQuery(_objectSpread({}, query));
|
132
|
+
runVideoAccount(query);
|
133
|
+
};
|
91
134
|
return /*#__PURE__*/_jsx(PageContentWarp, {
|
92
135
|
loading: loadingVideoAccount,
|
93
136
|
error: errorVideoAccount,
|
94
|
-
onReload:
|
137
|
+
onReload: function onReload() {
|
138
|
+
return runVideoAccount(query);
|
139
|
+
},
|
95
140
|
title: "\u77ED\u89C6\u9891\u8D26\u6237",
|
96
141
|
className: "videoPublishVideoAccountList",
|
142
|
+
extInfo: /*#__PURE__*/_jsx(VideoPublishVideoAccountListQuery, {
|
143
|
+
defaultQuery: query,
|
144
|
+
onQuery: function onQuery(query) {
|
145
|
+
return _onQuery(query);
|
146
|
+
}
|
147
|
+
}),
|
97
148
|
children: /*#__PURE__*/_jsx(Table, {
|
98
149
|
size: "small",
|
99
150
|
bordered: true,
|
@@ -103,7 +154,7 @@ var VideoPublishVideoAccount = function VideoPublishVideoAccount(_ref) {
|
|
103
154
|
loading: false,
|
104
155
|
columns: columns,
|
105
156
|
dataSource: listData,
|
106
|
-
pagination:
|
157
|
+
pagination: pagination
|
107
158
|
})
|
108
159
|
});
|
109
160
|
};
|
@@ -2,4 +2,25 @@
|
|
2
2
|
display: flex;
|
3
3
|
flex-direction: column;
|
4
4
|
height: 100%;
|
5
|
+
|
6
|
+
.userInfo{
|
7
|
+
display: flex;
|
8
|
+
flex-direction: row;
|
9
|
+
.avatar{
|
10
|
+
.avatarBox{
|
11
|
+
box-shadow: 0 0 3px #AAA;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
.info{
|
15
|
+
margin: 0 0 0 10px;
|
16
|
+
.nickname{
|
17
|
+
display: inline-block;
|
18
|
+
}
|
19
|
+
.userId{
|
20
|
+
font-size: 12px;
|
21
|
+
color: #999;
|
22
|
+
font-weight: 300;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
5
26
|
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './query.less';
|
3
|
+
interface Props {
|
4
|
+
defaultQuery: VideoPublish.VideoAccountListQuery;
|
5
|
+
onQuery: (query: VideoPublish.VideoAccountListQuery) => void;
|
6
|
+
}
|
7
|
+
declare const VideoPublishVideoAccountListQuery: React.FC<Props>;
|
8
|
+
export default VideoPublishVideoAccountListQuery;
|
@@ -0,0 +1,92 @@
|
|
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 dayjs from "dayjs";
|
8
|
+
import VideoPlatform, { VideoPlatformList } from "../../component/video-platform/logo";
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
10
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
11
|
+
var VideoPublishVideoAccountListQuery = function VideoPublishVideoAccountListQuery(_ref) {
|
12
|
+
var defaultQuery = _ref.defaultQuery,
|
13
|
+
_ref$onQuery = _ref.onQuery,
|
14
|
+
onQuery = _ref$onQuery === void 0 ? function () {} : _ref$onQuery;
|
15
|
+
var _Form$useForm = Form.useForm(),
|
16
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
17
|
+
form = _Form$useForm2[0];
|
18
|
+
var _useState = useState(_objectSpread({}, defaultQuery)),
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
20
|
+
query = _useState2[0],
|
21
|
+
setQuery = _useState2[1];
|
22
|
+
var todayEnd = dayjs(dayjs(Date.now()).format('YYYY-MM-DD 23:59:59')).valueOf();
|
23
|
+
var onFinish = function onFinish() {
|
24
|
+
var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
25
|
+
onQuery(_objectSpread(_objectSpread({}, query), values));
|
26
|
+
};
|
27
|
+
return /*#__PURE__*/_jsx("div", {
|
28
|
+
className: "videoPublishVideoAccountListQuery",
|
29
|
+
children: /*#__PURE__*/_jsx(Form, {
|
30
|
+
form: form,
|
31
|
+
initialValues: _objectSpread({}, query),
|
32
|
+
onFinish: onFinish,
|
33
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
34
|
+
children: [/*#__PURE__*/_jsx(Form.Item, {
|
35
|
+
name: "platform",
|
36
|
+
className: "platform",
|
37
|
+
children: /*#__PURE__*/_jsxs(Select, {
|
38
|
+
children: [/*#__PURE__*/_jsxs(Select, {
|
39
|
+
value: "",
|
40
|
+
children: [/*#__PURE__*/_jsx(UnorderedListOutlined, {}), " \u6240\u6709\u5E73\u53F0"]
|
41
|
+
}), VideoPlatformList.map(function (item) {
|
42
|
+
return /*#__PURE__*/_jsx(Select, {
|
43
|
+
value: item.platform,
|
44
|
+
children: /*#__PURE__*/_jsx(VideoPlatform, {
|
45
|
+
platform: item.platform,
|
46
|
+
showName: true
|
47
|
+
})
|
48
|
+
}, item.platform);
|
49
|
+
})]
|
50
|
+
})
|
51
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
52
|
+
name: "isLoginValid",
|
53
|
+
className: "isLoginValid",
|
54
|
+
children: /*#__PURE__*/_jsxs(Select, {
|
55
|
+
children: [/*#__PURE__*/_jsxs(Select, {
|
56
|
+
value: "",
|
57
|
+
children: [/*#__PURE__*/_jsx(UnorderedListOutlined, {}), " \u6240\u6709\u8D26\u53F7"]
|
58
|
+
}), /*#__PURE__*/_jsx(Select, {
|
59
|
+
value: "1",
|
60
|
+
children: /*#__PURE__*/_jsx(Tag, {
|
61
|
+
color: "green",
|
62
|
+
children: "\u5DF2\u767B\u5F55"
|
63
|
+
})
|
64
|
+
}), /*#__PURE__*/_jsx(Select, {
|
65
|
+
value: "0",
|
66
|
+
children: /*#__PURE__*/_jsx(Tag, {
|
67
|
+
color: "red",
|
68
|
+
children: "\u672A\u767B\u5F55"
|
69
|
+
})
|
70
|
+
})]
|
71
|
+
})
|
72
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
73
|
+
name: "keyword",
|
74
|
+
className: "keyword",
|
75
|
+
children: /*#__PURE__*/_jsx(Input
|
76
|
+
// value={ query.keyword }
|
77
|
+
, {
|
78
|
+
placeholder: "\u641C\u7D22\u8D26\u53F7\u540D",
|
79
|
+
allowClear: true
|
80
|
+
// onChange={ e => onKeyWord( e.target.value ) }
|
81
|
+
// onPressEnter={ ( e ) => onSearch( e.target ) }
|
82
|
+
})
|
83
|
+
}), /*#__PURE__*/_jsx(Button, {
|
84
|
+
type: "primary",
|
85
|
+
htmlType: "submit",
|
86
|
+
children: "\u641C\u7D22"
|
87
|
+
})]
|
88
|
+
})
|
89
|
+
})
|
90
|
+
});
|
91
|
+
};
|
92
|
+
export default VideoPublishVideoAccountListQuery;
|