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.
Files changed (41) hide show
  1. package/dist/Product/dict.d.ts +16 -0
  2. package/dist/Product/dict.js +93 -0
  3. package/dist/UI/PageContentWarp.d.ts +6 -0
  4. package/dist/UI/PageContentWarp.js +44 -10
  5. package/dist/UI/PageContentWarp.less +48 -0
  6. package/dist/VideoPublish/creat-task/hour-enabled.d.ts +9 -0
  7. package/dist/VideoPublish/creat-task/hour-enabled.js +42 -0
  8. package/dist/VideoPublish/creat-task/hour-enabled.less +24 -0
  9. package/dist/VideoPublish/creat-task/index.js +22 -2
  10. package/dist/VideoPublish/index.js +1 -1
  11. package/dist/VideoPublish/task-list/index.js +108 -43
  12. package/dist/VideoPublish/task-list/index.less +4 -1
  13. package/dist/VideoPublish/task-list/plan/list.d.ts +8 -0
  14. package/dist/VideoPublish/task-list/plan/list.js +230 -0
  15. package/dist/VideoPublish/task-list/plan/list.less +8 -0
  16. package/dist/VideoPublish/task-list/plan/status.d.ts +13 -0
  17. package/dist/VideoPublish/task-list/plan/status.js +48 -0
  18. package/dist/VideoPublish/task-list/query.d.ts +8 -0
  19. package/dist/VideoPublish/task-list/query.js +57 -0
  20. package/dist/VideoPublish/task-list/query.less +19 -0
  21. package/dist/VideoPublish/video-account/index.js +65 -14
  22. package/dist/VideoPublish/video-account/index.less +21 -0
  23. package/dist/VideoPublish/video-account/query.d.ts +8 -0
  24. package/dist/VideoPublish/video-account/query.js +92 -0
  25. package/dist/VideoPublish/video-account/query.less +15 -0
  26. package/dist/component/video-platform/logo.d.ts +7 -7
  27. package/dist/component/video-platform/logo.js +41 -27
  28. package/dist/lib/Tool.d.ts +1 -1
  29. package/dist/service/api/ProductController.d.ts +3 -0
  30. package/dist/service/api/ProductController.js +31 -7
  31. package/dist/service/api/VideoPublishController.d.ts +4 -0
  32. package/dist/service/api/VideoPublishController.js +3 -2
  33. package/dist/service/api/VideoPublishTaskController.d.ts +1 -1
  34. package/dist/service/api/VideoPublishTaskPlanController.d.ts +5 -0
  35. package/dist/service/api/VideoPublishTaskPlanController.js +28 -0
  36. package/dist/types/VideoPublish.d.ts +26 -10
  37. package/dist/types/VideoPublishTaskPlan.d.ts +22 -0
  38. package/dist/types/VideoPublishTaskPlan.js +0 -0
  39. package/package.json +2 -1
  40. package/dist/UI/PageContentWarp.css.d.ts +0 -5
  41. package/dist/UI/PageContentWarp.css.js +0 -6
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ productType: string;
4
+ env?: Global.Env;
5
+ }
6
+ interface ProductTypeDict {
7
+ [productType: string]: ProductTypeList;
8
+ }
9
+ interface ProductTypeList {
10
+ productType: string;
11
+ icon?: React.ReactNode;
12
+ title: string;
13
+ color: string;
14
+ }
15
+ declare const ProductTypeDict: React.FC<Props>;
16
+ export default ProductTypeDict;
@@ -0,0 +1,93 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import React, { useEffect, useState } from 'react';
3
+ import { Tag } from 'antd';
4
+ import { useRequest } from "@umijs/hooks";
5
+ import * as ProductController from "../service/api/ProductController";
6
+ import Tool from "../lib/Tool";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
8
+ var ProductTypeInfo = {
9
+ list: [],
10
+ status: '' // loading | success | fail
11
+ };
12
+
13
+ var ProductTypeDict = function ProductTypeDict(_ref) {
14
+ var productType = _ref.productType,
15
+ env = _ref.env;
16
+ var _useState = useState([]),
17
+ _useState2 = _slicedToArray(_useState, 2),
18
+ productList = _useState2[0],
19
+ setProductList = _useState2[1];
20
+ var _useState3 = useState({}),
21
+ _useState4 = _slicedToArray(_useState3, 2),
22
+ videoPublishTaskStatusDict = _useState4[0],
23
+ setProductTypeDict = _useState4[1];
24
+ var _useRequest = useRequest(function () {
25
+ return ProductController.list({
26
+ webDomain: document.location.hostname
27
+ }, {
28
+ env: env
29
+ });
30
+ }, {
31
+ manual: true,
32
+ onSuccess: function onSuccess(list) {
33
+ onList(list);
34
+ Tool.event.run('component-product-list', list);
35
+ },
36
+ onError: function onError() {
37
+ ProductTypeInfo.status = 'fail';
38
+ }
39
+ }),
40
+ loadingProduct = _useRequest.loading,
41
+ runProduct = _useRequest.run;
42
+ var onList = function onList(list) {
43
+ setProductList(list);
44
+ ProductTypeInfo.status = 'success';
45
+ ProductTypeInfo.list = list;
46
+ var dict = {};
47
+ list.forEach(function (items) {
48
+ dict[items.productType] = {
49
+ productType: items.productType,
50
+ // icon: items,
51
+ title: items.name,
52
+ color: ''
53
+ };
54
+ });
55
+ setProductTypeDict(dict);
56
+ };
57
+ var itemData = videoPublishTaskStatusDict[productType] || {
58
+ icon: '',
59
+ title: '',
60
+ color: ''
61
+ };
62
+ var getColor = function getColor(color) {
63
+ if (color) {
64
+ return color;
65
+ }
66
+ var matchColor = (parseInt(productType || '', 36) || 0).toString(16);
67
+ if (!matchColor) {
68
+ matchColor = 'gray';
69
+ } else {
70
+ matchColor = '#' + "".concat(matchColor, "0000000").slice(0, 6);
71
+ }
72
+ return matchColor;
73
+ };
74
+ useEffect(function () {
75
+ Tool.event.on('component-product-list', function (list) {
76
+ onList(list);
77
+ });
78
+ if (['success'].includes(ProductTypeInfo.status)) {
79
+ Tool.event.run('component-product-list', ProductTypeInfo.list);
80
+ return;
81
+ }
82
+ if (['loading'].includes(ProductTypeInfo.status)) {
83
+ return;
84
+ }
85
+ ProductTypeInfo.status = 'loading';
86
+ runProduct();
87
+ }, []);
88
+ return productType ? /*#__PURE__*/_jsxs(Tag, {
89
+ color: getColor(itemData.color),
90
+ children: [itemData.icon, " ", itemData.title || productType]
91
+ }) : null;
92
+ };
93
+ export default ProductTypeDict;
@@ -1,11 +1,17 @@
1
1
  import React from 'react';
2
+ import './PageContentWarp.less';
2
3
  interface Props {
4
+ id?: string;
3
5
  title?: React.ReactNode;
6
+ subtitle?: React.ReactNode;
7
+ disabledTitleBorder?: boolean;
4
8
  className?: string;
5
9
  minHeight?: number | string;
6
10
  loading?: boolean;
7
11
  loadingDom?: React.ReactNode;
12
+ needLogin?: boolean;
8
13
  error?: Error | null;
14
+ leftExtInfo?: React.ReactNode;
9
15
  extInfo?: React.ReactNode;
10
16
  children?: React.ReactNode;
11
17
  errorNode?: (err: Error) => React.ReactNode;
@@ -1,34 +1,57 @@
1
1
  import React from 'react';
2
- import styles from "./PageContentWarp.css";
2
+ import "./PageContentWarp.less";
3
3
  import LoadError from "./LoadError";
4
4
  import { LoadingOutlined } from '@ant-design/icons';
5
+ import { Space } from "antd";
5
6
  import { jsx as _jsx } from "react/jsx-runtime";
6
- import { Fragment as _Fragment } from "react/jsx-runtime";
7
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
+ import { Fragment as _Fragment } from "react/jsx-runtime";
8
9
  var PageContentWarp = function PageContentWarp(_ref) {
9
- var _ref$title = _ref.title,
10
+ var id = _ref.id,
11
+ _ref$title = _ref.title,
10
12
  title = _ref$title === void 0 ? '' : _ref$title,
13
+ disabledTitleBorder = _ref.disabledTitleBorder,
11
14
  _ref$className = _ref.className,
12
15
  className = _ref$className === void 0 ? '' : _ref$className,
13
16
  _ref$minHeight = _ref.minHeight,
14
17
  minHeight = _ref$minHeight === void 0 ? -1 : _ref$minHeight,
15
18
  _ref$loading = _ref.loading,
16
19
  loading = _ref$loading === void 0 ? false : _ref$loading,
20
+ needLogin = _ref.needLogin,
21
+ _ref$leftExtInfo = _ref.leftExtInfo,
22
+ leftExtInfo = _ref$leftExtInfo === void 0 ? '' : _ref$leftExtInfo,
17
23
  _ref$loadingDom = _ref.loadingDom,
18
24
  loadingDom = _ref$loadingDom === void 0 ? '' : _ref$loadingDom,
19
25
  _ref$extInfo = _ref.extInfo,
20
26
  extInfo = _ref$extInfo === void 0 ? '' : _ref$extInfo,
27
+ subtitle = _ref.subtitle,
21
28
  children = _ref.children,
22
29
  error = _ref.error,
23
30
  errorNode = _ref.errorNode,
24
31
  onReload = _ref.onReload;
25
- return /*#__PURE__*/_jsxs(styles.PageContentBox, {
26
- className: "ktv-ai-pageContentBox ".concat(className),
32
+ return /*#__PURE__*/_jsxs("div", {
33
+ id: id,
34
+ className: "pageContentBox ".concat(className),
27
35
  style: {
28
- minHeight: minHeight ? minHeight : 'auto'
36
+ minHeight: minHeight ? minHeight : undefined
29
37
  },
30
- children: [title && /*#__PURE__*/_jsx("h2", {
31
- children: title
38
+ children: [/*#__PURE__*/_jsxs("div", {
39
+ className: "pageTitle ".concat(disabledTitleBorder ? 'noTitleBorder' : '', " ").concat(!title && 'noTitle', " ").concat(!title && !extInfo ? 'noTitles' : ''),
40
+ children: [title && /*#__PURE__*/_jsx("span", {
41
+ className: "title",
42
+ children: title
43
+ }), /*#__PURE__*/_jsx("span", {
44
+ className: "subtitle",
45
+ children: subtitle
46
+ }), /*#__PURE__*/_jsx("div", {
47
+ className: "extInfo",
48
+ children: /*#__PURE__*/_jsx(Space, {
49
+ size: "middle",
50
+ children: Array.isArray(extInfo) ? /*#__PURE__*/_jsx(Space, {
51
+ children: extInfo
52
+ }) : extInfo
53
+ })
54
+ })]
32
55
  }), error ? /*#__PURE__*/_jsx(_Fragment, {
33
56
  children: errorNode && errorNode(error) ? errorNode(error) : /*#__PURE__*/_jsx(LoadError, {
34
57
  title: error.message,
@@ -37,10 +60,21 @@ var PageContentWarp = function PageContentWarp(_ref) {
37
60
  })
38
61
  }) : /*#__PURE__*/_jsx(_Fragment, {
39
62
  children: loading ? loadingDom ? loadingDom : /*#__PURE__*/_jsx("div", {
40
- className: "pageContentBoxLoading ktv-ai-loading",
63
+ className: "pageContentBoxLoading loading",
41
64
  children: /*#__PURE__*/_jsx(LoadingOutlined, {})
42
- }) : children
65
+ }) : /*#__PURE__*/_jsxs(_Fragment, {
66
+ children: [leftExtInfo && /*#__PURE__*/_jsx("div", {
67
+ className: "leftExtInfo",
68
+ children: leftExtInfo
69
+ }), children
70
+ // needLogin && ! userInfo.isLogin ?
71
+ // <AuthNotLogin />
72
+ // :
73
+ // children
74
+ ]
75
+ })
43
76
  })]
44
77
  });
45
78
  };
79
+
46
80
  export default PageContentWarp;
@@ -0,0 +1,48 @@
1
+ .pageContentBox{
2
+ .loading{
3
+ padding: 20px;
4
+ text-align: center;
5
+ display: flex;
6
+ flex-direction: row;
7
+ justify-content: center;
8
+ font-size: 30px;
9
+ }
10
+
11
+ .pageTitle {
12
+ position: relative;
13
+ padding: 5px 15px 12px 0;
14
+ font-size: 18px;
15
+ font-weight: 400;
16
+ color: #333;
17
+ border-bottom: 1px solid #eee;
18
+ line-height: 1.2em;
19
+ margin: 0 0 12px 0;
20
+ &.noTitles {
21
+ display: none;
22
+ }
23
+ &.noTitle {
24
+ border-bottom: none;
25
+ }
26
+ &.noTitleBorder{
27
+ border-bottom: none;
28
+ }
29
+ .subtitle{
30
+ padding-right: 10px;
31
+ padding-left: 10px;
32
+ font-weight: 300;
33
+ }
34
+ .subtitle {
35
+ font-size: 15px;
36
+ display: inline-block;
37
+ color: #888;
38
+ }
39
+ .extInfo {
40
+ position: absolute;
41
+ bottom: 6px;
42
+ right: 0;
43
+ font-size: 14px;
44
+ line-height: 38px;
45
+ }
46
+ }
47
+
48
+ }
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import "./hour-enabled.less";
3
+ interface Props {
4
+ disabled?: boolean;
5
+ hourEnabled: number[];
6
+ onHourEnabled: (hourEnabled: number[]) => void;
7
+ }
8
+ declare const VideoPublishCreateTaskHourSelect: React.FC<Props>;
9
+ export default VideoPublishCreateTaskHourSelect;
@@ -0,0 +1,42 @@
1
+ import React from "react";
2
+ import "./hour-enabled.less";
3
+ import { Col, Row } from "antd";
4
+ import { jsxs as _jsxs } from "react/jsx-runtime";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ var VideoPublishCreateTaskHourSelect = function VideoPublishCreateTaskHourSelect(_ref) {
7
+ var disabled = _ref.disabled,
8
+ _ref$hourEnabled = _ref.hourEnabled,
9
+ hourEnabled = _ref$hourEnabled === void 0 ? [] : _ref$hourEnabled,
10
+ _ref$onHourEnabled = _ref.onHourEnabled,
11
+ onHourEnabled = _ref$onHourEnabled === void 0 ? function () {} : _ref$onHourEnabled;
12
+ var onHour = function onHour(hour) {
13
+ if (disabled) {
14
+ return;
15
+ }
16
+ var index = hourEnabled.indexOf(hour);
17
+ if (index > -1) {
18
+ hourEnabled.splice(index, 1);
19
+ } else {
20
+ hourEnabled.push(hour);
21
+ }
22
+ onHourEnabled(hourEnabled);
23
+ };
24
+ return /*#__PURE__*/_jsx("div", {
25
+ className: "videoPublishCreatTaskHourSelect",
26
+ children: /*#__PURE__*/_jsx(Row, {
27
+ children: Array(24).join(',').split(',').map(function (item, i) {
28
+ return /*#__PURE__*/_jsx(Col, {
29
+ span: 3,
30
+ children: /*#__PURE__*/_jsxs("div", {
31
+ className: "items-hour ".concat(disabled ? 'disabled' : '', " ").concat(hourEnabled.includes(i) ? 'active' : ''),
32
+ onClick: function onClick() {
33
+ return onHour(i);
34
+ },
35
+ children: [i, ":00"]
36
+ })
37
+ }, i);
38
+ })
39
+ })
40
+ });
41
+ };
42
+ export default VideoPublishCreateTaskHourSelect;
@@ -0,0 +1,24 @@
1
+ .videoPublishCreatTaskHourSelect{
2
+ max-width: 720px;
3
+ .items-hour{
4
+ background-color: #F2F2F2;
5
+ padding: 7px 0;
6
+ line-height: 1em;
7
+ margin: 0 3px 3px 0;
8
+ text-align: center;
9
+ border-radius: 2px;
10
+ -webkit-user-select: none;
11
+ -ms-user-select: none;
12
+ user-select: none;
13
+ cursor: pointer;
14
+ transition: all 0.3s ease-in-out;
15
+ -webkit-transition: all 0.3s ease-in-out;
16
+ &.active{
17
+ background-color: #722ED1;
18
+ color: #FFF;
19
+ }
20
+ &.disabled{
21
+ cursor: not-allowed !important;
22
+ }
23
+ }
24
+ }
@@ -14,8 +14,9 @@ import VideoPublishTaskList from "./task-list";
14
14
  import VideoPublishSelectList from "./select-list";
15
15
  import { useRequest } from "@umijs/hooks";
16
16
  import * as VideoPublishController from "../../service/api/VideoPublishController";
17
- import VideoPlatformLogo from "../../component/video-platform/logo";
17
+ import VideoPlatform from "../../component/video-platform/logo";
18
18
  import fileSelect from "../../base/fileSelect";
19
+ import VideoPublishCreateTaskHourEnabled from "./hour-enabled";
19
20
  import { jsx as _jsx } from "react/jsx-runtime";
20
21
  import { Fragment as _Fragment } from "react/jsx-runtime";
21
22
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -26,6 +27,7 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
26
27
  env = _ref.env;
27
28
  var _useState = useState({
28
29
  videoFrom: productType ? 'task' : 'local',
30
+ taskFromProductType: productType,
29
31
  accountList: [],
30
32
  normalVideoRate: 1,
31
33
  normalVideoRateType: 'hour',
@@ -36,6 +38,7 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
36
38
  salesVideoRateType: 'hour',
37
39
  salesDayMaxCount: 2,
38
40
  salesVideoKindRateType: '',
41
+ hourEnabled: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],
39
42
  videoList: []
40
43
  }),
41
44
  _useState2 = _slicedToArray(_useState, 2),
@@ -59,6 +62,10 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
59
62
  setTreeVideoAccountData = _useState10[1];
60
63
  var _useRequest = useRequest(function () {
61
64
  return VideoPublishController.videoAccountList({
65
+ isLoginValid: '',
66
+ // | '1' | '0';
67
+ keyword: '',
68
+ platform: '',
62
69
  current: 1,
63
70
  pageSize: 300 // 服务器 固定死了 300;
64
71
  }, {
@@ -87,7 +94,7 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
87
94
  }) : items.followerCount;
88
95
  dict[items.groupId].children.push({
89
96
  title: /*#__PURE__*/_jsxs(_Fragment, {
90
- children: [/*#__PURE__*/_jsx(VideoPlatformLogo, {
97
+ children: [/*#__PURE__*/_jsx(VideoPlatform, {
91
98
  platform: items.platform,
92
99
  size: 14
93
100
  }), " ", items.nickname, /*#__PURE__*/_jsxs(styles.followerCount, {
@@ -457,6 +464,19 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
457
464
  children: "\u4E00\u6B21\u6027\u5168\u53D1\u5E03"
458
465
  })]
459
466
  })
467
+ }), /*#__PURE__*/_jsx(Divider, {
468
+ orientation: "left",
469
+ children: "\u54EA\u4E9B\u5C0F\u65F6\u533A\u95F4\u53EF\u53D1"
470
+ }), /*#__PURE__*/_jsx(Form.Item, {
471
+ label: "\u65F6\u95F4\u6BB5",
472
+ children: /*#__PURE__*/_jsx(VideoPublishCreateTaskHourEnabled, {
473
+ disabled: true,
474
+ hourEnabled: formData.hourEnabled,
475
+ onHourEnabled: function onHourEnabled(hourEnabled) {
476
+ formData.hourEnabled = hourEnabled;
477
+ setFormData(_objectSpread({}, formData));
478
+ }
479
+ })
460
480
  }), /*#__PURE__*/_jsx(Divider, {
461
481
  orientation: "left",
462
482
  children: "\u5176\u4ED6\u8BBE\u7F6E"
@@ -41,7 +41,7 @@ var VideoPublish = function VideoPublish(_ref) {
41
41
  }, {
42
42
  key: 'task-list',
43
43
  icon: /*#__PURE__*/_jsx(ClockCircleOutlined, {}),
44
- label: '发布任务',
44
+ label: '发布列表',
45
45
  children: /*#__PURE__*/_jsx(VideoPublishTaskList, {
46
46
  disabled: disabled,
47
47
  env: env
@@ -1,12 +1,18 @@
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 { Popover, Table, Tag } from "antd";
8
+ import { Button, Space, Table, Tag } from "antd";
9
+ import VideoPublishTaskListQuery from "./query";
10
+ import Time from "../../UI/Time";
11
+ import Money from "../../UI/Money";
12
+ import ProductTypeDict from "../../Product/dict";
13
+ import Tool from "../../lib/Tool";
14
+ import VideoPublishTaskPlanList from "./plan/list";
8
15
  import { jsx as _jsx } from "react/jsx-runtime";
9
- import { jsxs as _jsxs } from "react/jsx-runtime";
10
16
  import { Fragment as _Fragment } from "react/jsx-runtime";
11
17
  var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
12
18
  var disabled = _ref.disabled,
@@ -19,11 +25,23 @@ var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
19
25
  current: 1,
20
26
  pageSize: 20,
21
27
  total: 0,
22
- simple: true
28
+ simple: true,
29
+ showSizeChanger: false,
30
+ showQuickJumper: false
23
31
  }),
24
32
  _useState4 = _slicedToArray(_useState3, 2),
25
33
  pagination = _useState4[0],
26
34
  setPagination = _useState4[1];
35
+ var _useState5 = useState({
36
+ startTime: 0,
37
+ // Date.now(),
38
+ endTime: 0 //Date.now(),
39
+ // taskStatus: '',
40
+ // keyword: '',
41
+ }),
42
+ _useState6 = _slicedToArray(_useState5, 2),
43
+ query = _useState6[0],
44
+ setQuery = _useState6[1];
27
45
  var columns = [{
28
46
  title: '序号',
29
47
  dataIndex: '-',
@@ -37,57 +55,85 @@ var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
37
55
  dataIndex: 'id',
38
56
  key: 'id'
39
57
  }, {
40
- title: '平台',
41
- dataIndex: 'platform',
42
- key: 'platform'
58
+ title: '视频来源',
59
+ dataIndex: 'videoFrom',
60
+ key: 'videoFrom',
61
+ render: function render(videoFrom, record) {
62
+ if (videoFrom === 'local') {
63
+ return /*#__PURE__*/_jsx(Tag, {
64
+ children: "\u672C\u5730\u7535\u8111"
65
+ });
66
+ }
67
+ return /*#__PURE__*/_jsx(ProductTypeDict, {
68
+ productType: (record === null || record === void 0 ? void 0 : record.taskFromProductType) || '任务'
69
+ });
70
+ }
43
71
  }, {
44
- title: '名称',
45
- dataIndex: 'nickname',
46
- key: 'nickname',
47
- render: function render(nickname, record) {
48
- return /*#__PURE__*/_jsx(Popover, {
49
- title: "\u6807\u9898",
50
- content: nickname,
51
- children: /*#__PURE__*/_jsxs("div", {
52
- className: "title",
53
- children: [nickname, /*#__PURE__*/_jsx("div", {
54
- children: record === null || record === void 0 ? void 0 : record.accountId
55
- })]
56
- })
72
+ title: '视频数量',
73
+ dataIndex: 'videoAmount',
74
+ key: 'videoAmount',
75
+ render: function render(videoAmount) {
76
+ return /*#__PURE__*/_jsx(Money, {
77
+ pre: "",
78
+ value: videoAmount,
79
+ end: "\u4E2A",
80
+ precision: 0
57
81
  });
58
82
  }
59
83
  }, {
60
84
  title: /*#__PURE__*/_jsx(_Fragment, {
61
- children: "\u662F\u5426\u767B\u5F55"
85
+ children: "\u72B6\u6001"
62
86
  }),
63
- dataIndex: 'isLoginValid',
64
- key: 'isLoginValid',
65
- render: function render(isLoginValid, record) {
66
- return isLoginValid ? /*#__PURE__*/_jsx(Tag, {
67
- color: "green",
68
- children: "\u5DF2\u767B\u5F55"
69
- }) : /*#__PURE__*/_jsx(Tag, {
70
- color: "red",
71
- children: "\u672A\u767B\u5F55"
72
- });
73
- }
87
+ dataIndex: 'taskStatus',
88
+ key: 'taskStatus'
74
89
  }, {
75
90
  title: /*#__PURE__*/_jsx(_Fragment, {
76
- children: "\u89C6\u9891\u6570\u91CF"
91
+ children: "\u5F00\u59CB\u65F6\u95F4"
77
92
  }),
78
- dataIndex: 'videoCount',
79
- key: 'videoCount'
93
+ dataIndex: 'startTime',
94
+ key: 'startTime',
95
+ render: function render(startTime) {
96
+ return /*#__PURE__*/_jsx(Time, {
97
+ time: startTime
98
+ });
99
+ }
80
100
  }, {
81
- title: '粉丝数',
82
- dataIndex: 'followerCount',
83
- key: 'followerCount'
101
+ title: '创建时间',
102
+ dataIndex: 'created',
103
+ key: 'created',
104
+ render: function render(created) {
105
+ return /*#__PURE__*/_jsx(Time, {
106
+ time: created
107
+ });
108
+ }
109
+ }, {
110
+ title: '发布计划',
111
+ dataIndex: '——',
112
+ key: '——',
113
+ render: function render(_, record) {
114
+ return /*#__PURE__*/_jsx(Space, {
115
+ children: /*#__PURE__*/_jsx(Button, {
116
+ type: "link",
117
+ size: "small",
118
+ onClick: function onClick() {
119
+ return onTaskPlan((record === null || record === void 0 ? void 0 : record.id) || 0);
120
+ },
121
+ children: "\u67E5\u770B"
122
+ })
123
+ });
124
+ }
84
125
  }];
126
+ var _onQuery = function onQuery(query) {
127
+ setQuery(_objectSpread({}, query));
128
+ runTaskList(query, 1);
129
+ };
85
130
  var _useRequest = useRequest(function () {
86
- var current = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : pagination.current;
87
- return VideoPublishController.taskList({
88
- current: 1,
131
+ var postQuery = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : query;
132
+ var current = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : pagination.current;
133
+ return VideoPublishController.taskList(_objectSpread(_objectSpread({}, postQuery), {}, {
134
+ current: current,
89
135
  pageSize: pagination.pageSize
90
- }, {
136
+ }), {
91
137
  env: env
92
138
  });
93
139
  }, {
@@ -99,12 +145,28 @@ var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
99
145
  runTaskList = _useRequest.run,
100
146
  loadingTaskList = _useRequest.loading,
101
147
  errorTaskList = _useRequest.error;
148
+ var onTaskPlan = function onTaskPlan(publishTaskId) {
149
+ var dialog = Tool.drawer({
150
+ title: '视频任务计划',
151
+ content: /*#__PURE__*/_jsx(VideoPublishTaskPlanList, {
152
+ env: env,
153
+ publishTaskId: publishTaskId
154
+ }),
155
+ width: 920
156
+ });
157
+ };
102
158
  return /*#__PURE__*/_jsx(PageContentWarp, {
103
159
  loading: loadingTaskList,
104
160
  error: errorTaskList,
105
161
  onReload: runTaskList,
106
- title: "\u53D1\u5E03\u4EFB\u52A1",
162
+ title: "\u53D1\u5E03\u5217\u8868",
107
163
  className: "videoPublishTaskList",
164
+ extInfo: /*#__PURE__*/_jsx(VideoPublishTaskListQuery, {
165
+ defaultQuery: query,
166
+ onQuery: function onQuery(query) {
167
+ return _onQuery(query);
168
+ }
169
+ }),
108
170
  children: /*#__PURE__*/_jsx(Table, {
109
171
  size: "small",
110
172
  bordered: true,
@@ -114,7 +176,10 @@ var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
114
176
  loading: false,
115
177
  columns: columns,
116
178
  dataSource: listData,
117
- pagination: false
179
+ pagination: pagination,
180
+ onChange: function onChange(page, filters, sorter, extra) {
181
+ runTaskList(query, page.current);
182
+ }
118
183
  })
119
184
  });
120
185
  };
@@ -1,5 +1,8 @@
1
- .videoPublishVideoAccountList{
1
+ .videoPublishTaskList{
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  height: 100%;
5
+ .ant-pagination-options{
6
+ display: none;
7
+ }
5
8
  }
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import "./list.less";
3
+ interface Props {
4
+ env?: Global.Env;
5
+ publishTaskId: number;
6
+ }
7
+ declare const VideoPublishTaskPlanList: React.FC<Props>;
8
+ export default VideoPublishTaskPlanList;