component-shipinlv 1.3.10 → 1.3.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -446,7 +446,7 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
446
446
  return /*#__PURE__*/_jsx(VideoPublishVideoAccountBaseInfo, {
447
447
  id: item.id,
448
448
  className: currentId == item.id ? "active" : '',
449
- index: index + 1,
449
+ index: index,
450
450
  accountInfo: _objectSpread({}, item),
451
451
  onDel: function onDel(id) {
452
452
  return _onDel(id);
@@ -148,7 +148,8 @@ var VideoPublishCreateTaskBase = function VideoPublishCreateTaskBase(_ref) {
148
148
  children: /*#__PURE__*/_jsx(TreeSelect, {
149
149
  treeDefaultExpandAll: true,
150
150
  disabled: loadingAccountList || treeVideoAccountData.length === 0,
151
- treeData: treeVideoAccountData
151
+ treeData: treeVideoAccountData,
152
+ listHeight: 320
152
153
  // value={ [] }
153
154
  ,
154
155
  onChange: function onChange(idList) {
@@ -104,7 +104,8 @@ var VideoPublish = function VideoPublish(_ref) {
104
104
  // disabled: ! canPublish,
105
105
  children: /*#__PURE__*/_jsx(VideoPublishTaskPlanList, {
106
106
  env: env,
107
- publishTaskId: 0
107
+ publishTaskId: 0,
108
+ timeFromKind: "publishTime"
108
109
  })
109
110
  }, {
110
111
  key: 'statistic',
@@ -33,7 +33,7 @@
33
33
 
34
34
  .pageContents {
35
35
  flex: 1;
36
- padding: 16px 16px 0 16px ;
36
+ padding: 16px 16px 40px 16px ;
37
37
  overflow-y: auto;
38
38
 
39
39
  .my-tabs {
@@ -42,7 +42,8 @@ var VideoPublishLog = function VideoPublishLog(_ref) {
42
42
  wait: '<ClockCircleOutlined class="icon icon-wait" />',
43
43
  warn: '<WarningFilled class="icon icon-warn" />',
44
44
  fail: '<CloseSquareFilled class="icon icon-fail" />',
45
- success: '<CheckCircleFilled class="icon icon-success" />'
45
+ success: '<CheckCircleFilled class="icon icon-success" />',
46
+ finish: '<CheckCircleFilled class="icon icon-success" />'
46
47
  };
47
48
  var onLogDo = function onLogDo(data) {
48
49
  console.log('log data:', data);
@@ -186,7 +186,7 @@ var PublishTaskPlanClass = /*#__PURE__*/function () {
186
186
  coverExist = _context2.sent;
187
187
  if (!coverExist || !coverExist.isExist) {
188
188
  item.publishVideo.publishCoverUrl = '';
189
- errExistLog.message = '封面文件 本身已经不存在(可能被清理删除),将采用系统推荐封面';
189
+ errExistLog.message = '预判定:封面文件 本身已经不存在(可能被清理删除),将采用系统推荐封面<Divider />';
190
190
  this.onLog(errExistLog);
191
191
  }
192
192
  case 22:
@@ -37,7 +37,9 @@ var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
37
37
  var _useState5 = useState({
38
38
  startTime: 0,
39
39
  // Date.now(),
40
- endTime: 0 //Date.now(),
40
+ endTime: 0,
41
+ //Date.now(),
42
+ timeFromKind: 'publishTime'
41
43
  // taskStatus: '',
42
44
  // keyword: '',
43
45
  }),
@@ -170,7 +172,8 @@ var VideoPublishTaskList = function VideoPublishTaskList(_ref) {
170
172
  title: '发布任务计划',
171
173
  content: /*#__PURE__*/_jsx(VideoPublishTaskPlanList, {
172
174
  env: env,
173
- publishTaskId: publishTaskId
175
+ publishTaskId: publishTaskId,
176
+ timeFromKind: query.timeFromKind
174
177
  }),
175
178
  width: 1200
176
179
  });
@@ -6,6 +6,7 @@ interface Props {
6
6
  accountId?: number;
7
7
  startTime?: number;
8
8
  endTime?: number;
9
+ timeFromKind: VideoPublishStatisticPublish.TimeFromKind;
9
10
  }
10
11
  declare const VideoPublishTaskPlanList: React.FC<Props>;
11
12
  export default VideoPublishTaskPlanList;
@@ -27,7 +27,8 @@ var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
27
27
  _ref$startTime = _ref.startTime,
28
28
  startTime = _ref$startTime === void 0 ? 0 : _ref$startTime,
29
29
  _ref$endTime = _ref.endTime,
30
- endTime = _ref$endTime === void 0 ? 0 : _ref$endTime;
30
+ endTime = _ref$endTime === void 0 ? 0 : _ref$endTime,
31
+ timeFromKind = _ref.timeFromKind;
31
32
  var _useState = useState([]),
32
33
  _useState2 = _slicedToArray(_useState, 2),
33
34
  listData = _useState2[0],
@@ -179,7 +180,7 @@ var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
179
180
  }
180
181
  }, {
181
182
  title: /*#__PURE__*/_jsx(_Fragment, {
182
- children: "\u5BF9\u5916\u5C55\u793A"
183
+ children: "\u5B9A\u65F6"
183
184
  }),
184
185
  dataIndex: 'publishTime',
185
186
  key: 'publishTime',
@@ -230,6 +231,7 @@ var VideoPublishTaskPlanList = function VideoPublishTaskPlanList(_ref) {
230
231
  }, postQuery), {}, {
231
232
  startTime: postQuery.startTime > 10000 ? Math.floor(dayjs(postQuery.startTime).startOf('date').valueOf() * 0.001) || 0 : 0,
232
233
  endTime: postQuery.endTime > 10000 ? Math.floor(dayjs(postQuery.endTime).endOf('date').valueOf() * 0.001) || 0 : 0,
234
+ timeFromKind: timeFromKind,
233
235
  current: current,
234
236
  pageSize: pagination.pageSize
235
237
  }), {
@@ -1,8 +1,9 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import React, { useState } from 'react';
4
- import { Button, DatePicker, Form, Space } from "antd";
4
+ import { Button, DatePicker, Form, Select, Space } from "antd";
5
5
  import "./query.less";
6
+ import { ClockCircleOutlined, ExclamationCircleOutlined, SendOutlined } from "@ant-design/icons";
6
7
  import dayjs from "dayjs";
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -35,6 +36,24 @@ var VideoPublishTaskListQuery = function VideoPublishTaskListQuery(_ref) {
35
36
  onFinish: onFinish,
36
37
  children: /*#__PURE__*/_jsxs(Space, {
37
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, {
38
57
  children: /*#__PURE__*/_jsx(DatePicker.RangePicker, {
39
58
  defaultValue: query.startTime > 0 ? [query.startTime <= 0 ? null : dayjs(query.startTime), query.endTime <= 0 ? null : dayjs(query.endTime)] : undefined,
40
59
  disabledDate: function disabledDate(currentDate) {
@@ -13,7 +13,8 @@ var VideoPublishStatisticPublish = function VideoPublishStatisticPublish(_ref) {
13
13
  key: 'publish-video',
14
14
  label: '发布任务',
15
15
  children: /*#__PURE__*/_jsx(VideoPublishStatisticPublishList, {
16
- env: getApiEnv()
16
+ env: getApiEnv(),
17
+ timeFromKind: "publishTime"
17
18
  })
18
19
  }, {
19
20
  key: 'operation',
@@ -2,6 +2,7 @@ import React from "react";
2
2
  import "./list.less";
3
3
  interface Props {
4
4
  env?: Global.Env;
5
+ timeFromKind: VideoPublishStatisticPublish.TimeFromKind;
5
6
  }
6
7
  declare const VideoPublishStatisticPublishList: React.FC<Props>;
7
8
  export default VideoPublishStatisticPublishList;
@@ -16,7 +16,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
16
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
17
17
  import { Fragment as _Fragment } from "react/jsx-runtime";
18
18
  var VideoPublishStatisticPublishList = function VideoPublishStatisticPublishList(_ref) {
19
- var env = _ref.env;
19
+ var env = _ref.env,
20
+ _ref$timeFromKind = _ref.timeFromKind,
21
+ timeFromKind = _ref$timeFromKind === void 0 ? 'publishTime' : _ref$timeFromKind;
20
22
  var _useState = useState([]),
21
23
  _useState2 = _slicedToArray(_useState, 2),
22
24
  listData = _useState2[0],
@@ -33,6 +35,7 @@ var VideoPublishStatisticPublishList = function VideoPublishStatisticPublishList
33
35
  pagination = _useState4[0],
34
36
  setPagination = _useState4[1];
35
37
  var _useState5 = useState({
38
+ timeFromKind: timeFromKind,
36
39
  startTime: Date.now(),
37
40
  endTime: Date.now()
38
41
  // taskStatus: '',
@@ -173,8 +176,8 @@ var VideoPublishStatisticPublishList = function VideoPublishStatisticPublishList
173
176
  var postQuery = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : query;
174
177
  var current = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : pagination.current;
175
178
  return VideoPublishPublishStatisticController.list(_objectSpread(_objectSpread({}, postQuery), {}, {
176
- startTime: postQuery.startTime > 100000 ? Math.floor(dayjs(postQuery.startTime).startOf('date').valueOf() * 0.001) || 0 : 0,
177
- endTime: postQuery.endTime > 100000 ? Math.floor(dayjs(postQuery.endTime).endOf('date').valueOf() * 0.001) || 0 : 0,
179
+ startTime: postQuery.startTime > 10000 ? Math.floor(dayjs(postQuery.startTime).startOf('date').valueOf() * 0.001) || 0 : 0,
180
+ endTime: postQuery.endTime > 10000 ? Math.floor(dayjs(postQuery.endTime).endOf('date').valueOf() * 0.001) || 0 : 0,
178
181
  current: current,
179
182
  pageSize: pagination.pageSize
180
183
  }), {
@@ -216,7 +219,8 @@ var VideoPublishStatisticPublishList = function VideoPublishStatisticPublishList
216
219
  publishTaskId: 0,
217
220
  accountId: accountId,
218
221
  startTime: query.startTime,
219
- endTime: query.endTime
222
+ endTime: query.endTime,
223
+ timeFromKind: timeFromKind
220
224
  }),
221
225
  width: 1200
222
226
  });
@@ -1,9 +1,10 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import React, { useState } from 'react';
4
- import { Button, DatePicker, Form, Space } from "antd";
4
+ import { Button, DatePicker, Form, Select, Space } from "antd";
5
5
  import "./query.less";
6
6
  import dayjs from "dayjs";
7
+ import { ClockCircleOutlined, ExclamationCircleOutlined, SendOutlined } from "@ant-design/icons";
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
10
  var VideoPublishStatisticPublishListQuery = function VideoPublishStatisticPublishListQuery(_ref) {
@@ -35,6 +36,24 @@ var VideoPublishStatisticPublishListQuery = function VideoPublishStatisticPublis
35
36
  onFinish: onFinish,
36
37
  children: /*#__PURE__*/_jsxs(Space, {
37
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, {
38
57
  children: /*#__PURE__*/_jsx(DatePicker.RangePicker, {
39
58
  defaultValue: query.startTime > 10000 ? [query.startTime <= 0 ? null : dayjs(query.startTime), query.endTime <= 0 ? null : dayjs(query.endTime)] : [dayjs(), dayjs()],
40
59
  disabledDate: function disabledDate(currentDate) {
@@ -86,9 +86,9 @@ var VideoPlatform = function VideoPlatform(_ref) {
86
86
  var itemData = VideoPlatformDict[platform] || {
87
87
  name: platform
88
88
  };
89
- return /*#__PURE__*/_jsxs("span", {
89
+ return /*#__PURE__*/_jsxs("i", {
90
90
  className: "videoPlatformLogo ".concat(disabled ? 'disabled' : '', " ").concat(className),
91
- children: [/*#__PURE__*/_jsx("span", {
91
+ children: [/*#__PURE__*/_jsx("i", {
92
92
  className: "logo ".concat(platform || '', " "),
93
93
  style: {
94
94
  width: size,
@@ -44,5 +44,6 @@
44
44
  .name{
45
45
  //vertical-align: middle;
46
46
  display: inline-block;
47
+ font-style: normal;
47
48
  }
48
49
  }
@@ -161,7 +161,7 @@ declare const Tool: {
161
161
  OsPathSeparator(): string;
162
162
  getTitleByPath(path: string): string;
163
163
  h5Pay(query: Pay.H5PayQuery): void;
164
- notification(type: "error" | "success" | "info" | "warning", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
164
+ notification(type: "success" | "info" | "warning" | "error", message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
165
165
  notificationSuccess(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
166
166
  notificationError(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
167
167
  notificationWarning(message: string, description?: import("react").ReactNode, options?: NotificationOptions): void;
@@ -152,7 +152,7 @@ var openChrome = /*#__PURE__*/function () {
152
152
  }();
153
153
  var getOpenQuery = /*#__PURE__*/function () {
154
154
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(query, isNew, settingConfig, env) {
155
- var cmdList, url, openUrl, chromeProfileDir, publishExtensionDir;
155
+ var cmdList, url, openUrl, chromeProfileDir, position, publishExtensionDir;
156
156
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
157
157
  while (1) switch (_context4.prev = _context4.next) {
158
158
  case 0:
@@ -164,7 +164,9 @@ var getOpenQuery = /*#__PURE__*/function () {
164
164
  _action: query.action || '',
165
165
  _platformAccountId: query.platformAccountId,
166
166
  _nickname: query.nickname || '',
167
- _chromeProfileName: query.chromeProfileName || ''
167
+ _chromeProfileName: query.chromeProfileName || '',
168
+ _shipinlvMainPort: window.__ShipinlvMainPort || 0,
169
+ _shipinlvLocalServerPort: window.__ShipinlvLocalServerPort || 0
168
170
  });
169
171
  chromeProfileDir = settingConfig.chromeUserDataDir + '/' + query.chromeProfileName;
170
172
  _context4.t0 = Tool.getOsName();
@@ -203,26 +205,35 @@ var getOpenQuery = /*#__PURE__*/function () {
203
205
  case 16:
204
206
  notification.notificationError('不支持的系统', '发布不支持此系统');
205
207
  case 17:
208
+ position = {
209
+ x: 0,
210
+ y: 0
211
+ };
212
+ if (query.action === 'publish') {
213
+ position.x = -window.screen.width + 100;
214
+ position.y = 10;
215
+ }
216
+
206
217
  // 尺寸
207
- cmdList.push("--window-position=".concat(-window.screen.width + 20, ",10"));
218
+ cmdList.push("--window-position=".concat(position.x, ",").concat(position.y));
208
219
  cmdList.push("--window-size=".concat(window.screen.width, ",").concat(window.screen.height - 100));
209
220
  cmdList.push("--user-data-dir=".concat(chromeProfileDir));
210
221
  cmdList.push("--user-agent=".concat(userAgent()));
211
222
 
212
223
  // 不要检查
213
224
  cmdList.push('--no-first-run', '--no-default-browser-check', '--disable-default-apps');
214
- _context4.next = 24;
225
+ _context4.next = 26;
215
226
  return getPublishExtensionDir(env).catch(function (err) {
216
227
  notification.notificationError('获取插件地址失败', err.message);
217
228
  });
218
- case 24:
229
+ case 26:
219
230
  publishExtensionDir = _context4.sent;
220
231
  if (publishExtensionDir) {
221
- _context4.next = 27;
232
+ _context4.next = 29;
222
233
  break;
223
234
  }
224
235
  return _context4.abrupt("return", Promise.reject(new Error('获取插件地址失败')));
225
- case 27:
236
+ case 29:
226
237
  cmdList.push("--load-extension=".concat(publishExtensionDir));
227
238
  cmdList.push("".concat(openUrl));
228
239
  console.log('profileName:', cmdList, chromeProfileDir);
@@ -230,7 +241,7 @@ var getOpenQuery = /*#__PURE__*/function () {
230
241
  commandList: cmdList,
231
242
  chromeProfileDir: chromeProfileDir
232
243
  });
233
- case 31:
244
+ case 33:
234
245
  case "end":
235
246
  return _context4.stop();
236
247
  }
@@ -99,7 +99,9 @@ var requestApi = /*#__PURE__*/function () {
99
99
  if (['Failed to fetch', 'http error'].includes((_err2 = err) === null || _err2 === void 0 ? void 0 : _err2.message)) {
100
100
  err.message = '发生了一些问题,请稍后重试';
101
101
  }
102
- Tool.toastError(err.message);
102
+ if (!(options !== null && options !== void 0 && options.silent)) {
103
+ Tool.toastError(err.message);
104
+ }
103
105
  onError(pageUrl, url, err.message, JSON.stringify(err), options === null || options === void 0 ? void 0 : options.silent);
104
106
  reject(err);
105
107
  });
@@ -1,4 +1,7 @@
1
1
  export declare function list(body: {
2
+ timeFromKind: VideoPublishStatisticPublish.TimeFromKind;
3
+ startTime: number;
4
+ endTime: number;
2
5
  current: number;
3
6
  pageSize: number;
4
7
  }, options?: Global.RequestOptions): Promise<VideoPublishStatisticPublish.ListResult>;
@@ -1,6 +1,7 @@
1
1
  export declare function list(body: {
2
2
  publishTaskId: number;
3
3
  accountId: number;
4
+ timeFromKind: VideoPublishStatisticPublish.TimeFromKind;
4
5
  current: number;
5
6
  pageSize: number;
6
7
  }, options?: Global.RequestOptions): Promise<VideoPublishTaskPlan.ListResult>;
@@ -132,5 +132,6 @@ declare namespace VideoPublish {
132
132
  interface TaskListQuery {
133
133
  startTime: number;
134
134
  endTime: number;
135
+ timeFromKind: VideoPublishStatisticPublish.TimeFromKind;
135
136
  }
136
137
  }
@@ -1,4 +1,5 @@
1
1
  declare namespace VideoPublishStatisticPublish {
2
+ type TimeFromKind = 'created' | 'updated' | 'publishTime';
2
3
  interface List {
3
4
  finishAmount: number;
4
5
  progressAmount: number;
@@ -10,6 +11,7 @@ declare namespace VideoPublishStatisticPublish {
10
11
  pagination: Global.Pagination;
11
12
  }
12
13
  interface ListQuery {
14
+ timeFromKind: TimeFromKind;
13
15
  startTime: number;
14
16
  endTime: number;
15
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "1.3.10",
3
+ "version": "1.3.12",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",