component-shipinlv 1.1.7 → 1.1.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/UI/DialogDrawer.css.js +1 -1
- package/dist/UI/LayoutContent.js +2 -2
- package/dist/UI/LayoutContent.less +3 -3
- package/dist/VideoPublish/account-manage/home.js +3 -1
- package/dist/VideoPublish/account-manage/list.js +19 -44
- package/dist/VideoPublish/account-manage/list.less +0 -72
- package/dist/VideoPublish/create-task/base/index.js +1 -0
- package/dist/VideoPublish/create-task/index.js +6 -4
- package/dist/VideoPublish/index.d.ts +1 -1
- package/dist/VideoPublish/index.js +16 -4
- package/dist/VideoPublish/log/index.d.ts +1 -1
- package/dist/VideoPublish/log/index.js +2 -2
- package/dist/VideoPublish/proxy/create.d.ts +8 -0
- package/dist/VideoPublish/proxy/create.js +154 -0
- package/dist/VideoPublish/proxy/list.d.ts +9 -0
- package/dist/VideoPublish/proxy/list.js +245 -0
- package/dist/VideoPublish/proxy/list.less +3 -0
- package/dist/VideoPublish/proxy/query.d.ts +9 -0
- package/dist/VideoPublish/proxy/query.js +75 -0
- package/dist/VideoPublish/proxy/query.less +10 -0
- package/dist/VideoPublish/publish-task-plan/index.d.ts +1 -1
- package/dist/VideoPublish/publish-task-plan/index.js +2 -2
- package/dist/VideoPublish/publish-task-plan/tool.d.ts +2 -2
- package/dist/VideoPublish/publish-task-plan/tool.js +3 -3
- package/dist/VideoPublish/task-list/index.js +1 -1
- package/dist/VideoPublish/task-list/plan/list.js +4 -6
- package/dist/VideoPublish/task-list/plan/list.less +73 -0
- package/dist/VideoPublish/video-account/base-info.d.ts +12 -0
- package/dist/VideoPublish/video-account/base-info.js +69 -0
- package/dist/VideoPublish/video-account/base-info.less +92 -0
- package/dist/VideoPublish/video-account/index.js +40 -8
- package/dist/VideoPublish/video-account/index.less +10 -0
- package/dist/component/{media-show.d.ts → media-show/index.d.ts} +4 -4
- package/dist/component/{media-show.js → media-show/index.js} +10 -35
- package/dist/component/media-show/index.less +0 -0
- package/dist/component/media-show/render.d.ts +10 -0
- package/dist/component/media-show/render.js +111 -0
- package/dist/component/{media-show.less → media-show/render.less} +2 -1
- package/dist/lib/Tool.js +4 -2
- package/dist/lib/request.js +105 -77
- package/dist/service/api/VideoPublishVideoAccountProxyController.d.ts +11 -0
- package/dist/service/api/VideoPublishVideoAccountProxyController.js +105 -0
- package/dist/types/VideoPublishTaskPlan.d.ts +1 -0
- package/dist/types/VideoPublishVideoAccount.d.ts +11 -0
- package/dist/types/VideoPublishVideoAccountProxy.d.ts +32 -0
- package/dist/types/VideoPublishVideoAccountProxy.js +0 -0
- package/dist/typings/VideoPublishVideoAccount.d.ts +4 -2
- package/dist/window.d.ts +2 -0
- package/package.json +1 -1
@@ -2,5 +2,5 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLit
|
|
2
2
|
var _templateObject;
|
3
3
|
import styled from 'styled-components';
|
4
4
|
export default {
|
5
|
-
DrawerDialog: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ktv-ai-drawerDialog {\n .ant-drawer-body {\n background-color: #f5f5f5;\n }\n &.light{\n .ant-drawer-body {\n background-color: #FFF;\n }\n }\n }\n "])))
|
5
|
+
DrawerDialog: styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ktv-ai-drawerDialog {\n .ant-drawer-body {\n //background-color: #f5f5f5;\n }\n &.light{\n .ant-drawer-body {\n //background-color: #FFF;\n }\n }\n }\n "])))
|
6
6
|
};
|
package/dist/UI/LayoutContent.js
CHANGED
@@ -35,7 +35,7 @@ var LayoutContent = function LayoutContent(_ref) {
|
|
35
35
|
}
|
36
36
|
};
|
37
37
|
return /*#__PURE__*/_jsxs("div", {
|
38
|
-
className: "
|
38
|
+
className: "layoutContent ".concat(className),
|
39
39
|
children: [/*#__PURE__*/_jsxs("div", {
|
40
40
|
className: "pageTitle ".concat(!title ? "noTitle" : ''),
|
41
41
|
children: [title, /*#__PURE__*/_jsx("span", {
|
@@ -51,7 +51,7 @@ var LayoutContent = function LayoutContent(_ref) {
|
|
51
51
|
})
|
52
52
|
})]
|
53
53
|
}), /*#__PURE__*/_jsxs("div", {
|
54
|
-
className: "
|
54
|
+
className: "layoutContentWarp",
|
55
55
|
children: [leftExtInfo && /*#__PURE__*/_jsx("div", {
|
56
56
|
className: "leftExtInfo",
|
57
57
|
children: leftExtInfo
|
@@ -1,4 +1,4 @@
|
|
1
|
-
.
|
1
|
+
.layoutContent {
|
2
2
|
background: rgba(255, 255, 255, 0.86 );
|
3
3
|
//margin: 0 0 0 15px;
|
4
4
|
padding: 10px 15px;
|
@@ -37,7 +37,7 @@
|
|
37
37
|
}
|
38
38
|
}
|
39
39
|
|
40
|
-
.
|
40
|
+
.layoutContentWarp {
|
41
41
|
padding: 6px 0;
|
42
42
|
}
|
43
43
|
|
@@ -51,7 +51,7 @@
|
|
51
51
|
|
52
52
|
@media screen and (max-width: 800px) {
|
53
53
|
// 折叠菜单,
|
54
|
-
.
|
54
|
+
.layoutContent{
|
55
55
|
padding: 8px;
|
56
56
|
.pageTitle {
|
57
57
|
padding: 5px 15px 10px 0;
|
@@ -19,10 +19,12 @@ var VideoPublishAccountManageHomePage = function VideoPublishAccountManageHomePa
|
|
19
19
|
userId: 0,
|
20
20
|
platform: 'douyin',
|
21
21
|
groupId: 0,
|
22
|
-
uniqueId:
|
22
|
+
uniqueId: '',
|
23
23
|
accountId: '',
|
24
24
|
avatar: '',
|
25
25
|
bindPhone: '',
|
26
|
+
groupName: "",
|
27
|
+
nicknameRemark: "",
|
26
28
|
nickname: '',
|
27
29
|
signature: '',
|
28
30
|
isLoginValid: false,
|
@@ -1,18 +1,19 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
1
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
2
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
3
4
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
4
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
5
6
|
import React, { useEffect, useState, useRef } from 'react';
|
6
|
-
import {
|
7
|
+
import { Button, Divider, Dropdown, Empty, Input, Space, Tooltip } from 'antd';
|
7
8
|
import "./list.less";
|
8
|
-
import { PlusCircleOutlined, SearchOutlined
|
9
|
+
import { PlusCircleOutlined, SearchOutlined } from '@ant-design/icons';
|
9
10
|
import { useRequest } from "@umijs/hooks";
|
10
11
|
import * as VideoPublishVideoAccountController from "../../service/api/VideoPublishVideoAccountController";
|
11
12
|
import PageContentWarp from "../../UI/PageContentWarp";
|
12
13
|
// import goAuth from "../../lib/goAuth";
|
13
14
|
import getLocalUserInfo from "../../lib/getLocalUserInfo";
|
14
15
|
import event from "../../lib/event";
|
15
|
-
import
|
16
|
+
import { VideoPlatformList } from "../../component/video-platform/logo";
|
16
17
|
import toast from "../../lib/toast";
|
17
18
|
import Notification from "../../lib/notification";
|
18
19
|
import Money from "../../UI/Money";
|
@@ -20,6 +21,7 @@ import AccountManageSettingConfig from "../../lib/accountManageSettingConfig";
|
|
20
21
|
import VideoPlatform from "../../component/video-platform/logo";
|
21
22
|
import isInstalledChrome from "../../component/is-installed-chrome";
|
22
23
|
import Tool from "../../lib/Tool";
|
24
|
+
import VideoPublishVideoAccountBaseInfo from "../video-account/base-info";
|
23
25
|
import { jsx as _jsx } from "react/jsx-runtime";
|
24
26
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
25
27
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -108,11 +110,13 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
108
110
|
userId: 0,
|
109
111
|
platform: 'd',
|
110
112
|
groupId: 0,
|
111
|
-
|
113
|
+
groupName: '',
|
114
|
+
uniqueId: '',
|
112
115
|
accountId: '',
|
113
116
|
avatar: '',
|
114
117
|
bindPhone: '',
|
115
118
|
nickname: '',
|
119
|
+
nicknameRemark: '',
|
116
120
|
signature: '',
|
117
121
|
isLoginValid: false,
|
118
122
|
followerCount: 0,
|
@@ -236,7 +240,7 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
236
240
|
})
|
237
241
|
});
|
238
242
|
};
|
239
|
-
var
|
243
|
+
var _onDel = function onDel(id) {
|
240
244
|
runDel(id);
|
241
245
|
};
|
242
246
|
useEffect(function () {
|
@@ -347,47 +351,18 @@ var HomePageAccountList = function HomePageAccountList(_ref) {
|
|
347
351
|
return null;
|
348
352
|
}
|
349
353
|
}
|
350
|
-
return /*#__PURE__*/
|
351
|
-
|
354
|
+
return /*#__PURE__*/_jsx(VideoPublishVideoAccountBaseInfo, {
|
355
|
+
id: item.id,
|
356
|
+
className: currentId == item.id ? "active" : '',
|
357
|
+
index: index + 1,
|
358
|
+
accountInfo: _objectSpread({}, item),
|
359
|
+
onDel: function onDel(id) {
|
360
|
+
return _onDel(id);
|
361
|
+
},
|
352
362
|
onClick: function onClick() {
|
353
363
|
return onCurrentId(item.id);
|
354
|
-
}
|
355
|
-
|
356
|
-
className: "index",
|
357
|
-
children: index + 1
|
358
|
-
}), /*#__PURE__*/_jsx(Popconfirm, {
|
359
|
-
title: "\u5220\u9664\u8D26\u6237",
|
360
|
-
description: "\u786E\u5B9A\u5220\u9664\u8D26\u6237\uFF1F\u5220\u9664\u4E4B\u540E\u4E0D\u80FD\u53D1\u5E03\u89C6\u9891\u4E86",
|
361
|
-
onConfirm: function onConfirm() {
|
362
|
-
return onDel(item.id);
|
363
|
-
},
|
364
|
-
children: /*#__PURE__*/_jsx("a", {
|
365
|
-
className: "del",
|
366
|
-
children: /*#__PURE__*/_jsx(CloseOutlined, {})
|
367
|
-
})
|
368
|
-
}), /*#__PURE__*/_jsxs("div", {
|
369
|
-
className: "avatar",
|
370
|
-
children: [/*#__PURE__*/_jsx(Avatar, {
|
371
|
-
className: "avatarUrl",
|
372
|
-
size: 46,
|
373
|
-
src: item.avatar || 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'
|
374
|
-
}), /*#__PURE__*/_jsx(Tooltip, {
|
375
|
-
title: item.isLoginValid ? '登录有效' : '登录失效',
|
376
|
-
children: /*#__PURE__*/_jsx("div", {
|
377
|
-
className: "isLoginValid"
|
378
|
-
})
|
379
|
-
})]
|
380
|
-
}), /*#__PURE__*/_jsxs("div", {
|
381
|
-
className: "shopName",
|
382
|
-
children: [/*#__PURE__*/_jsx(VideoPlatformLogo, {
|
383
|
-
platform: item.platform,
|
384
|
-
size: 14
|
385
|
-
}), shopName, "\u5907\u6CE8", /*#__PURE__*/_jsx("div", {
|
386
|
-
className: "uniqueId",
|
387
|
-
children: item.uniqueId
|
388
|
-
})]
|
389
|
-
})]
|
390
|
-
}, item.id);
|
364
|
+
}
|
365
|
+
});
|
391
366
|
})
|
392
367
|
}), listData.length == 0 && /*#__PURE__*/_jsxs("div", {
|
393
368
|
className: "empty",
|
@@ -50,26 +50,6 @@
|
|
50
50
|
padding: 6px 10px;
|
51
51
|
margin: 3px 0;
|
52
52
|
border-radius: 5px;
|
53
|
-
.index{
|
54
|
-
position: absolute;
|
55
|
-
top: 10px;
|
56
|
-
right: 4px;
|
57
|
-
font-size: 12px;
|
58
|
-
font-style: normal;
|
59
|
-
opacity: 0.3;
|
60
|
-
}
|
61
|
-
.del{
|
62
|
-
position: absolute;
|
63
|
-
bottom: 7px;
|
64
|
-
right: 4px;
|
65
|
-
padding: 3px;
|
66
|
-
font-size: 12px;
|
67
|
-
color: #FFF;
|
68
|
-
border-radius: 3px;
|
69
|
-
background-color: #C00;
|
70
|
-
line-height: 1em;
|
71
|
-
display: none;
|
72
|
-
}
|
73
53
|
&:hover{
|
74
54
|
background-color: #dcf0f6;
|
75
55
|
.del{
|
@@ -81,58 +61,6 @@
|
|
81
61
|
color: #0063ed;
|
82
62
|
font-weight: bold;
|
83
63
|
}
|
84
|
-
&.valid{
|
85
|
-
.isLoginValid{
|
86
|
-
background-color: #00bc00;
|
87
|
-
}
|
88
|
-
.shopName{
|
89
|
-
color: #005a00;
|
90
|
-
}
|
91
|
-
}
|
92
|
-
&.invalid{
|
93
|
-
background-color: #e1e1e1;
|
94
|
-
.isLoginValid{
|
95
|
-
background-color: red;
|
96
|
-
}
|
97
|
-
.shopName{
|
98
|
-
color: #999;
|
99
|
-
font-weight: 300;
|
100
|
-
}
|
101
|
-
.avatarUrl{
|
102
|
-
opacity: 0.5;
|
103
|
-
filter: grayscale(100%);
|
104
|
-
}
|
105
|
-
}
|
106
|
-
.avatar{
|
107
|
-
position: relative;
|
108
|
-
width: 40px;
|
109
|
-
//box-shadow: 0 0 5px #EEE;
|
110
|
-
.isLoginValid{
|
111
|
-
position: absolute;
|
112
|
-
left: 35px;
|
113
|
-
top: 35px;
|
114
|
-
width: 8px;
|
115
|
-
height: 8px;
|
116
|
-
border-radius: 100px;
|
117
|
-
}
|
118
|
-
}
|
119
|
-
.shopName{
|
120
|
-
max-width: 150px;
|
121
|
-
color: #666;
|
122
|
-
display: inline-block;
|
123
|
-
text-overflow: ellipsis;
|
124
|
-
//line-height: 30px;
|
125
|
-
font-size: 14px;
|
126
|
-
padding: 4px 0 0 12px;
|
127
|
-
word-break: keep-all;
|
128
|
-
white-space: nowrap;
|
129
|
-
overflow: hidden;
|
130
|
-
}
|
131
|
-
.uniqueId{
|
132
|
-
padding: 3px 0 0;
|
133
|
-
font-size: 12px;
|
134
|
-
opacity: 0.6;
|
135
|
-
}
|
136
64
|
}
|
137
65
|
}
|
138
66
|
}
|
@@ -146,6 +146,7 @@ var VideoPublishCreateTaskBase = function VideoPublishCreateTaskBase(_ref) {
|
|
146
146
|
message: '请选择账户'
|
147
147
|
}],
|
148
148
|
children: /*#__PURE__*/_jsx(TreeSelect, {
|
149
|
+
treeDefaultExpandAll: true,
|
149
150
|
disabled: loadingAccountList || treeVideoAccountData.length === 0,
|
150
151
|
treeData: treeVideoAccountData
|
151
152
|
// value={ [] }
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
3
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
3
4
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
4
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
5
6
|
import React, { useState } from "react";
|
@@ -86,7 +87,7 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
|
|
86
87
|
};
|
87
88
|
var onLocalList = /*#__PURE__*/function () {
|
88
89
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
89
|
-
var result, fileList
|
90
|
+
var result, fileList;
|
90
91
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
91
92
|
while (1) switch (_context.prev = _context.next) {
|
92
93
|
case 0:
|
@@ -104,7 +105,8 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
|
|
104
105
|
case 7:
|
105
106
|
fileList = result === null || result === void 0 ? void 0 : result.filePaths;
|
106
107
|
console.log('list:', fileList);
|
107
|
-
|
108
|
+
// 本地选择,累加
|
109
|
+
// const localSelectList: VideoPublish.VideoSelectList[] = [];
|
108
110
|
fileList.forEach(function (filePath) {
|
109
111
|
localSelectList.push({
|
110
112
|
id: 0,
|
@@ -120,9 +122,9 @@ var VideoPublishCreateTask = function VideoPublishCreateTask(_ref) {
|
|
120
122
|
goodsTitle: ''
|
121
123
|
});
|
122
124
|
});
|
123
|
-
setLocalSelectList(localSelectList);
|
125
|
+
setLocalSelectList(_toConsumableArray(localSelectList));
|
124
126
|
setLoadingSelectLocal(false);
|
125
|
-
case
|
127
|
+
case 12:
|
126
128
|
case "end":
|
127
129
|
return _context.stop();
|
128
130
|
}
|
@@ -4,13 +4,14 @@ import "./index.less";
|
|
4
4
|
import { Menu, Tabs } from "antd";
|
5
5
|
import VideoPublishCreateTask from "./create-task";
|
6
6
|
import isInClient from "../lib/isInClient";
|
7
|
-
import { ClockCircleOutlined, FileSearchOutlined, SettingOutlined, UsergroupAddOutlined, VideoCameraAddOutlined } from "@ant-design/icons";
|
7
|
+
import { ClockCircleOutlined, FileSearchOutlined, GlobalOutlined, SettingOutlined, UsergroupAddOutlined, VideoCameraAddOutlined } from "@ant-design/icons";
|
8
8
|
import VideoPublishVideoAccount from "./video-account";
|
9
9
|
import VideoPublishTaskList from "./task-list";
|
10
10
|
import VideoPublishLog from "./log";
|
11
11
|
import VideoPublishAccountManageSettingPage from "./account-manage/setting";
|
12
12
|
import VideoPublishAccountManageHomePage from "./account-manage/home";
|
13
13
|
import VideoPublishPublishVideoPlan from "./publish-task-plan";
|
14
|
+
import VideoPublishVideoAccountProxy from "./proxy/list";
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
15
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
16
17
|
var VideoPublish = function VideoPublish(_ref) {
|
@@ -21,7 +22,7 @@ var VideoPublish = function VideoPublish(_ref) {
|
|
21
22
|
productType = _ref.productType,
|
22
23
|
apiUrl = _ref.apiUrl,
|
23
24
|
env = _ref.env,
|
24
|
-
|
25
|
+
clientIdentity = _ref.clientIdentity;
|
25
26
|
var _useState = useState([]),
|
26
27
|
_useState2 = _slicedToArray(_useState, 2),
|
27
28
|
menuList = _useState2[0],
|
@@ -54,6 +55,17 @@ var VideoPublish = function VideoPublish(_ref) {
|
|
54
55
|
disabled: disabled,
|
55
56
|
env: env
|
56
57
|
})
|
58
|
+
}, {
|
59
|
+
key: 'proxy',
|
60
|
+
icon: /*#__PURE__*/_jsx(GlobalOutlined, {}),
|
61
|
+
label: '网络代理',
|
62
|
+
children: /*#__PURE__*/_jsx(VideoPublishVideoAccountProxy, {
|
63
|
+
disabled: disabled,
|
64
|
+
env: env,
|
65
|
+
onMenu: function onMenu(e) {
|
66
|
+
return _onMenu(e);
|
67
|
+
}
|
68
|
+
})
|
57
69
|
}, {
|
58
70
|
key: 'creat-task',
|
59
71
|
icon: /*#__PURE__*/_jsx(VideoCameraAddOutlined, {}),
|
@@ -88,7 +100,7 @@ var VideoPublish = function VideoPublish(_ref) {
|
|
88
100
|
forceRender: canPublish,
|
89
101
|
children: /*#__PURE__*/_jsx(VideoPublishLog, {
|
90
102
|
env: env,
|
91
|
-
|
103
|
+
clientIdentity: clientIdentity
|
92
104
|
})
|
93
105
|
}];
|
94
106
|
var _onMenu = function _onMenu(key) {
|
@@ -157,7 +169,7 @@ var VideoPublish = function VideoPublish(_ref) {
|
|
157
169
|
})]
|
158
170
|
}), /*#__PURE__*/_jsx(VideoPublishPublishVideoPlan, {
|
159
171
|
env: env,
|
160
|
-
|
172
|
+
clientIdentity: clientIdentity
|
161
173
|
})]
|
162
174
|
});
|
163
175
|
};
|
@@ -14,7 +14,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
15
15
|
var MaxLine = 10000;
|
16
16
|
var VideoPublishLog = function VideoPublishLog(_ref) {
|
17
|
-
var
|
17
|
+
var clientIdentity = _ref.clientIdentity,
|
18
18
|
env = _ref.env;
|
19
19
|
var _useState = useState(0),
|
20
20
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -52,7 +52,7 @@ var VideoPublishLog = function VideoPublishLog(_ref) {
|
|
52
52
|
case 'not-login':
|
53
53
|
// 上报
|
54
54
|
VideoPublishVideoAccountController.saveLoginStatus({
|
55
|
-
|
55
|
+
clientIdentity: clientIdentity,
|
56
56
|
platformVideoAccountId: data.platformAccountId,
|
57
57
|
platform: data.platform,
|
58
58
|
isLogin: false,
|
@@ -0,0 +1,154 @@
|
|
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, InputNumber } from 'antd';
|
5
|
+
import { useRequest } from "@umijs/hooks";
|
6
|
+
import PageContentWarp from "../../UI/PageContentWarp";
|
7
|
+
import DialogDrawerFooter from "../../UI/DialogDrawerFooter";
|
8
|
+
import * as VideoPublishVideoAccountProxyController from "../../service/api/VideoPublishVideoAccountProxyController";
|
9
|
+
import toast from "../../lib/toast";
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
11
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
12
|
+
var VideoPublishVideoAccountProxyCreate = function VideoPublishVideoAccountProxyCreate(_ref) {
|
13
|
+
var env = _ref.env,
|
14
|
+
id = _ref.id,
|
15
|
+
_onSuccess = _ref.onSuccess;
|
16
|
+
var _Form$useForm = Form.useForm(),
|
17
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
18
|
+
form = _Form$useForm2[0];
|
19
|
+
var _useState = useState({
|
20
|
+
id: 0,
|
21
|
+
ip: '',
|
22
|
+
port: 0,
|
23
|
+
title: '',
|
24
|
+
area: '',
|
25
|
+
enabled: true,
|
26
|
+
username: '',
|
27
|
+
password: '',
|
28
|
+
created: 0,
|
29
|
+
updated: 0
|
30
|
+
}),
|
31
|
+
_useState2 = _slicedToArray(_useState, 2),
|
32
|
+
detailData = _useState2[0],
|
33
|
+
setDetailData = _useState2[1];
|
34
|
+
var _useRequest = useRequest(function () {
|
35
|
+
return VideoPublishVideoAccountProxyController.detail({
|
36
|
+
id: id
|
37
|
+
}, {
|
38
|
+
env: env
|
39
|
+
});
|
40
|
+
}, {
|
41
|
+
manual: id <= 0,
|
42
|
+
onSuccess: function onSuccess(result) {
|
43
|
+
setDetailData(result);
|
44
|
+
form.setFieldsValue(_objectSpread({}, result));
|
45
|
+
}
|
46
|
+
}),
|
47
|
+
loadingDetail = _useRequest.loading,
|
48
|
+
runDetail = _useRequest.run;
|
49
|
+
var _useRequest2 = useRequest(function (data) {
|
50
|
+
return VideoPublishVideoAccountProxyController.create(data, {
|
51
|
+
env: env
|
52
|
+
});
|
53
|
+
}, {
|
54
|
+
manual: true,
|
55
|
+
onSuccess: function onSuccess(result) {
|
56
|
+
toast('操作成功');
|
57
|
+
_onSuccess();
|
58
|
+
}
|
59
|
+
}),
|
60
|
+
loading = _useRequest2.loading,
|
61
|
+
run = _useRequest2.run;
|
62
|
+
var onFinish = function onFinish(values) {
|
63
|
+
run(_objectSpread(_objectSpread({}, values), {}, {
|
64
|
+
id: id
|
65
|
+
}));
|
66
|
+
};
|
67
|
+
return /*#__PURE__*/_jsx(PageContentWarp, {
|
68
|
+
loading: loadingDetail,
|
69
|
+
className: "videoAccountGroupCreate",
|
70
|
+
children: /*#__PURE__*/_jsxs(Form, {
|
71
|
+
labelCol: {
|
72
|
+
span: 6
|
73
|
+
},
|
74
|
+
form: form,
|
75
|
+
disabled: loading,
|
76
|
+
onFinish: onFinish,
|
77
|
+
children: [/*#__PURE__*/_jsx(Form.Item, {
|
78
|
+
name: "title",
|
79
|
+
label: "\u6807\u9898",
|
80
|
+
rules: [{
|
81
|
+
max: 60,
|
82
|
+
message: '最多60个字符'
|
83
|
+
}],
|
84
|
+
children: /*#__PURE__*/_jsx(Input, {
|
85
|
+
placeholder: "\u8F93\u5165\u6807\u9898/\u5907\u6CE8"
|
86
|
+
})
|
87
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
88
|
+
name: "ip",
|
89
|
+
label: "IP \u5730\u5740",
|
90
|
+
rules: [{
|
91
|
+
max: 60,
|
92
|
+
message: '最多60个字符'
|
93
|
+
}, {
|
94
|
+
required: true,
|
95
|
+
message: '必填选项'
|
96
|
+
}],
|
97
|
+
children: /*#__PURE__*/_jsx(Input, {
|
98
|
+
placeholder: "\u8F93\u5165 IP\u5730\u5740"
|
99
|
+
})
|
100
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
101
|
+
name: "port",
|
102
|
+
label: "\u7AEF\u53E3",
|
103
|
+
rules: [{
|
104
|
+
required: true,
|
105
|
+
message: '必填选项'
|
106
|
+
}],
|
107
|
+
children: /*#__PURE__*/_jsx(InputNumber, {
|
108
|
+
min: 0,
|
109
|
+
max: 65535,
|
110
|
+
precision: 0,
|
111
|
+
placeholder: "\u8F93\u5165 \u7AEF\u53E3"
|
112
|
+
})
|
113
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
114
|
+
name: "username",
|
115
|
+
label: "\u7528\u6237\u540D",
|
116
|
+
rules: [{
|
117
|
+
max: 60,
|
118
|
+
message: '最多60个字符'
|
119
|
+
}],
|
120
|
+
children: /*#__PURE__*/_jsx(Input, {
|
121
|
+
placeholder: "\u8F93\u5165 \u7528\u6237\u540D"
|
122
|
+
})
|
123
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
124
|
+
name: "password",
|
125
|
+
label: "\u5BC6\u7801",
|
126
|
+
rules: [{
|
127
|
+
max: 60,
|
128
|
+
message: '最多60个字符'
|
129
|
+
}],
|
130
|
+
children: /*#__PURE__*/_jsx(Input, {
|
131
|
+
placeholder: "\u8F93\u5165 \u5BC6\u7801"
|
132
|
+
})
|
133
|
+
}), /*#__PURE__*/_jsx(Form.Item, {
|
134
|
+
name: "area",
|
135
|
+
label: "IP\u5730\u5740 \u5F52\u5C5E\u5730",
|
136
|
+
rules: [{
|
137
|
+
max: 60,
|
138
|
+
message: '最多60个字符'
|
139
|
+
}],
|
140
|
+
children: /*#__PURE__*/_jsx(Input, {
|
141
|
+
placeholder: "\u8F93\u5165IP\u5730\u5740 \u5F52\u5C5E\u5730\uFF0C\u53EA\u662F\u65B9\u4FBF\u7BA1\u7406"
|
142
|
+
})
|
143
|
+
}), /*#__PURE__*/_jsx(DialogDrawerFooter, {
|
144
|
+
children: /*#__PURE__*/_jsx(Button, {
|
145
|
+
type: "primary",
|
146
|
+
htmlType: "submit",
|
147
|
+
loading: loading,
|
148
|
+
children: "\u4FDD\u5B58"
|
149
|
+
})
|
150
|
+
})]
|
151
|
+
})
|
152
|
+
});
|
153
|
+
};
|
154
|
+
export default VideoPublishVideoAccountProxyCreate;
|