|
|
|
|
@ -1,6 +1,165 @@
|
|
|
|
|
"use strict";
|
|
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[88665],{
|
|
|
|
|
|
|
|
|
|
/***/ 15680:
|
|
|
|
|
/*!**********************************************!*\
|
|
|
|
|
!*** ./src/components/AsyncButton/index.tsx ***!
|
|
|
|
|
\**********************************************/
|
|
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
/* harmony export */ Z: function() { return /* binding */ AsyncButton; }
|
|
|
|
|
/* harmony export */ });
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js */ 39647);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 3113);
|
|
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ 59301);
|
|
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["children"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var AsyncButton = function AsyncButton(_ref) {
|
|
|
|
|
var children = _ref.children,
|
|
|
|
|
props = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default()(_ref, _excluded);
|
|
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(false),
|
|
|
|
|
_useState2 = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2),
|
|
|
|
|
btnLoading = _useState2[0],
|
|
|
|
|
setBtnLoading = _useState2[1];
|
|
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, props), {}, {
|
|
|
|
|
loading: btnLoading,
|
|
|
|
|
onClick: ( /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee(e) {
|
|
|
|
|
return _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context.prev = 0;
|
|
|
|
|
setBtnLoading(true);
|
|
|
|
|
_context.next = 4;
|
|
|
|
|
return props.onClick(e);
|
|
|
|
|
case 4:
|
|
|
|
|
setBtnLoading(false);
|
|
|
|
|
_context.next = 11;
|
|
|
|
|
break;
|
|
|
|
|
case 7:
|
|
|
|
|
_context.prev = 7;
|
|
|
|
|
_context.t0 = _context["catch"](0);
|
|
|
|
|
console.error(_context.t0);
|
|
|
|
|
setBtnLoading(false);
|
|
|
|
|
case 11:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee, null, [[0, 7]]);
|
|
|
|
|
}));
|
|
|
|
|
return function (_x) {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}()),
|
|
|
|
|
children: children
|
|
|
|
|
}));
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 73788:
|
|
|
|
|
/*!*****************************************************************************!*\
|
|
|
|
|
!*** ./src/pages/Shixuns/Edit/body/Environment/Label/index.tsx + 1 modules ***!
|
|
|
|
|
\*****************************************************************************/
|
|
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
Z: function() { return /* binding */ Environment_Label; }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
|
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Environment/Label/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var Labelmodules = ({"label":"label___CZ1_z","left":"left___ZKFRV","right":"right___zVTRn","error":"error___oNJNo"});
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
|
|
|
var tooltip = __webpack_require__(6848);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Shixuns/Edit/body/Environment/Label/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Label = function Label(_ref) {
|
|
|
|
|
var name = _ref.name,
|
|
|
|
|
tooltipTitle = _ref.tooltipTitle,
|
|
|
|
|
children = _ref.children,
|
|
|
|
|
required = _ref.required,
|
|
|
|
|
errorKey = _ref.errorKey,
|
|
|
|
|
errorValue = _ref.errorValue,
|
|
|
|
|
errorName = _ref.errorName,
|
|
|
|
|
_ref$errorStyle = _ref.errorStyle,
|
|
|
|
|
errorStyle = _ref$errorStyle === void 0 ? {} : _ref$errorStyle,
|
|
|
|
|
_ref$nameWidth = _ref.nameWidth,
|
|
|
|
|
nameWidth = _ref$nameWidth === void 0 ? 112 : _ref$nameWidth,
|
|
|
|
|
nameStyle = _ref.nameStyle,
|
|
|
|
|
_ref$align = _ref.align,
|
|
|
|
|
align = _ref$align === void 0 ? 'center' : _ref$align,
|
|
|
|
|
_ref$contentStyle = _ref.contentStyle,
|
|
|
|
|
contentStyle = _ref$contentStyle === void 0 ? {} : _ref$contentStyle;
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(_react_17_0_2_react.Fragment, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Labelmodules.label,
|
|
|
|
|
style: {
|
|
|
|
|
alignItems: align
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Labelmodules.left,
|
|
|
|
|
style: objectSpread2_default()({
|
|
|
|
|
width: nameWidth
|
|
|
|
|
}, nameStyle),
|
|
|
|
|
children: [required && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: "*"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
children: name
|
|
|
|
|
}), !!tooltipTitle && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
title: tooltipTitle,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-xiaowenhao2"
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Labelmodules.right,
|
|
|
|
|
style: contentStyle,
|
|
|
|
|
children: [children, errorName && errorValue === errorKey && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Labelmodules.error,
|
|
|
|
|
style: errorStyle,
|
|
|
|
|
children: errorName
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var Environment_Label = (Label);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 51381:
|
|
|
|
|
/*!***************************************************************************!*\
|
|
|
|
|
!*** ./src/pages/Shixuns/New/components/ApplyModal/index.tsx + 1 modules ***!
|
|
|
|
|
@ -318,6 +477,479 @@ var ApplyModal = function ApplyModal(_ref) {
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 36713:
|
|
|
|
|
/*!***************************************************************************************************!*\
|
|
|
|
|
!*** ./src/pages/User/Detail/ExperImentMirror/components/ModifyMirrorModal/index.tsx + 1 modules ***!
|
|
|
|
|
\***************************************************************************************************/
|
|
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
Z: function() { return /* binding */ components_ModifyMirrorModal; }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js
|
|
|
|
|
var toConsumableArray = __webpack_require__(37205);
|
|
|
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
|
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
|
|
|
var slicedToArray = __webpack_require__(79800);
|
|
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
|
|
|
|
var es_form = __webpack_require__(78241);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
|
|
var message = __webpack_require__(8591);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
|
|
var modal = __webpack_require__(43418);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
|
|
|
var input = __webpack_require__(36920);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
|
|
|
var tooltip = __webpack_require__(6848);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
|
|
|
|
|
var es_select = __webpack_require__(57809);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
|
|
var fetch = __webpack_require__(5219);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/ExperImentMirror/components/ModifyMirrorModal/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var ModifyMirrorModalmodules = ({"errorTip":"errorTip___BUYuF","btns":"btns___Z2phb","confirm":"confirm___ll5DO","cancel":"cancel___DyFvN","formWrap":"formWrap___MybKc","addtag":"addtag___Sn2NP","aBtn":"aBtn___euGab"});
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/AsyncButton/index.tsx
|
|
|
|
|
var AsyncButton = __webpack_require__(15680);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/ExperImentMirror/components/ModifyMirrorModal/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ModifyMirrorModal = function ModifyMirrorModal(_ref) {
|
|
|
|
|
var visible = _ref.visible,
|
|
|
|
|
mirrorId = _ref.mirrorId,
|
|
|
|
|
mirrorInfo = _ref.mirrorInfo,
|
|
|
|
|
setVisible = _ref.setVisible,
|
|
|
|
|
getData = _ref.getData;
|
|
|
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
|
|
form = _Form$useForm2[0];
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)({}),
|
|
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
|
|
formValue = _useState2[0],
|
|
|
|
|
setFormValue = _useState2[1];
|
|
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(''),
|
|
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
|
|
errorMsg = _useState4[0],
|
|
|
|
|
setErrorMsg = _useState4[1];
|
|
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
|
|
btnLoading = _useState6[0],
|
|
|
|
|
setBtnLoading = _useState6[1];
|
|
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
|
|
selectedTag = _useState8[0],
|
|
|
|
|
setSelectedTag = _useState8[1];
|
|
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
|
|
addtags = _useState10[0],
|
|
|
|
|
setAddTags = _useState10[1];
|
|
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(''),
|
|
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
|
|
tagError = _useState12[0],
|
|
|
|
|
setTagError = _useState12[1];
|
|
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
|
|
tags = _useState14[0],
|
|
|
|
|
setTags = _useState14[1];
|
|
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(1),
|
|
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
|
|
id = _useState16[0],
|
|
|
|
|
setId = _useState16[1];
|
|
|
|
|
|
|
|
|
|
// useEffect(() => {
|
|
|
|
|
// if (mirrorId != undefined && visible) {
|
|
|
|
|
// getMirrorInfo()
|
|
|
|
|
// }
|
|
|
|
|
// }, [mirrorId, visible])
|
|
|
|
|
|
|
|
|
|
// const getMirrorInfo = async () => {
|
|
|
|
|
// const res = await Fetch(`/api/user_mirrors/${mirrorId}.json`, {
|
|
|
|
|
// method: 'get',
|
|
|
|
|
// })
|
|
|
|
|
// if (res?.status === 0) {
|
|
|
|
|
// form.setFieldsValue({ ...res?.data });
|
|
|
|
|
// setFormValue({ ...res?.data })
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
if (mirrorId != undefined && visible) {
|
|
|
|
|
gettags();
|
|
|
|
|
console.log(123);
|
|
|
|
|
console.log(mirrorInfo);
|
|
|
|
|
setSelectedTag(mirrorInfo.tags);
|
|
|
|
|
form.setFieldsValue(objectSpread2_default()({}, mirrorInfo));
|
|
|
|
|
setFormValue(objectSpread2_default()({}, mirrorInfo));
|
|
|
|
|
}
|
|
|
|
|
}, [mirrorId, visible]);
|
|
|
|
|
var gettags = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context.next = 2;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/tyimages/tags_list.json", {
|
|
|
|
|
method: 'post'
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
|
|
setTags(res === null || res === void 0 ? void 0 : res.tags);
|
|
|
|
|
}
|
|
|
|
|
// setDataSource(res?.data?.results)
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
return function gettags() {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var onCancel = function onCancel() {
|
|
|
|
|
setVisible(false);
|
|
|
|
|
setFormValue({});
|
|
|
|
|
form.setFieldsValue({});
|
|
|
|
|
};
|
|
|
|
|
var onOk = /*#__PURE__*/function () {
|
|
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
var formValue, res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context2.t0 = (objectSpread2_default());
|
|
|
|
|
_context2.t1 = {};
|
|
|
|
|
_context2.next = 4;
|
|
|
|
|
return form.validateFields();
|
|
|
|
|
case 4:
|
|
|
|
|
_context2.t2 = _context2.sent;
|
|
|
|
|
formValue = (0, _context2.t0)(_context2.t1, _context2.t2);
|
|
|
|
|
setBtnLoading(true);
|
|
|
|
|
_context2.next = 9;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/tyimages/image_update.json", {
|
|
|
|
|
method: 'post',
|
|
|
|
|
body: {
|
|
|
|
|
imageId: mirrorId,
|
|
|
|
|
imageName: formValue === null || formValue === void 0 ? void 0 : formValue.imageName,
|
|
|
|
|
description: formValue === null || formValue === void 0 ? void 0 : formValue.description,
|
|
|
|
|
tags: selectedTag.concat(addtags.map(function (item) {
|
|
|
|
|
return item.value;
|
|
|
|
|
}))
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 9:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success('修改成功');
|
|
|
|
|
getData();
|
|
|
|
|
}
|
|
|
|
|
setBtnLoading(false);
|
|
|
|
|
setVisible(false);
|
|
|
|
|
case 13:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}));
|
|
|
|
|
return function onOk() {
|
|
|
|
|
return _ref3.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var checkMirrornameExist = /*#__PURE__*/function () {
|
|
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(value) {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context3.next = 2;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/user_mirrors/check_mirror_name.json", {
|
|
|
|
|
method: 'post',
|
|
|
|
|
body: {
|
|
|
|
|
type_name: value,
|
|
|
|
|
id: mirrorId
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context3.sent;
|
|
|
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) === 0)) {
|
|
|
|
|
_context3.next = 7;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _context3.abrupt("return", {
|
|
|
|
|
state: false
|
|
|
|
|
});
|
|
|
|
|
case 7:
|
|
|
|
|
return _context3.abrupt("return", {
|
|
|
|
|
state: true,
|
|
|
|
|
msg: res === null || res === void 0 ? void 0 : res.message
|
|
|
|
|
});
|
|
|
|
|
case 8:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee3);
|
|
|
|
|
}));
|
|
|
|
|
return function checkMirrornameExist(_x) {
|
|
|
|
|
return _ref4.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
|
|
|
|
|
centered: true,
|
|
|
|
|
width: 620,
|
|
|
|
|
title: "\u4FEE\u6539\u955C\u50CF\u4FE1\u606F",
|
|
|
|
|
maskClosable: false,
|
|
|
|
|
open: visible,
|
|
|
|
|
destroyOnClose: true,
|
|
|
|
|
footer: null,
|
|
|
|
|
onCancel: onCancel,
|
|
|
|
|
afterClose: function afterClose() {
|
|
|
|
|
setTags([]);
|
|
|
|
|
setAddTags([]);
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
marginTop: 20
|
|
|
|
|
},
|
|
|
|
|
form: form,
|
|
|
|
|
scrollToFirstError: true,
|
|
|
|
|
layout: "vertical",
|
|
|
|
|
className: ModifyMirrorModalmodules.formWrap,
|
|
|
|
|
initialValues: {
|
|
|
|
|
imageName: mirrorInfo === null || mirrorInfo === void 0 ? void 0 : mirrorInfo.imageName
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
display: 'flex',
|
|
|
|
|
alignItems: 'center'
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
label: "\u955C\u50CF\u540D\u79F0",
|
|
|
|
|
name: "imageName",
|
|
|
|
|
colon: false,
|
|
|
|
|
className: ModifyMirrorModalmodules.errorTip,
|
|
|
|
|
rules: [
|
|
|
|
|
// { required: true,message:''},
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '镜像名称不能为空'
|
|
|
|
|
}, {
|
|
|
|
|
max: 32,
|
|
|
|
|
message: '最多输入32个字符'
|
|
|
|
|
}, {
|
|
|
|
|
pattern: /^(?![-\d])[A-Za-z0-9-]{2,32}(?<!-)$/,
|
|
|
|
|
message: '长度2-32位,只能由数字、字母-组成,不能以数字和-开头、且不能以-结尾'
|
|
|
|
|
}
|
|
|
|
|
// {
|
|
|
|
|
// validator: async (rule, value) => {
|
|
|
|
|
// const res = await checkMirrornameExist(value);
|
|
|
|
|
// return res?.state === true ? Promise.reject(res?.msg) : Promise.resolve()
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
],
|
|
|
|
|
initialValue: mirrorInfo === null || mirrorInfo === void 0 ? void 0 : mirrorInfo.imageName,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
|
|
size: "large",
|
|
|
|
|
maxLength: 60,
|
|
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u955C\u50CF\u540D\u79F0",
|
|
|
|
|
style: {
|
|
|
|
|
width: 544
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
title: "\u957F\u5EA62-32\u4F4D\uFF0C\u53EA\u80FD\u7531\u6570\u5B57\u3001\u5B57\u6BCD-\u7EC4\u6210\uFF0C\u4E0D\u80FD\u4EE5\u6570\u5B57\u548C-\u5F00\u5934\u3001\u4E14\u4E0D\u80FD\u4EE5-\u7ED3\u5C3E",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-tishi11 current ml10 mt25",
|
|
|
|
|
style: {
|
|
|
|
|
color: '#9096A3'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
|
|
|
|
|
label: "\u955C\u50CF\u6807\u7B7E",
|
|
|
|
|
name: "mirrorTags",
|
|
|
|
|
colon: false,
|
|
|
|
|
className: ModifyMirrorModalmodules.errorTip,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
|
|
value: selectedTag,
|
|
|
|
|
style: {
|
|
|
|
|
width: 456
|
|
|
|
|
},
|
|
|
|
|
mode: "multiple",
|
|
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u6807\u7B7E",
|
|
|
|
|
options: tags === null || tags === void 0 ? void 0 : tags.map(function (item) {
|
|
|
|
|
return {
|
|
|
|
|
value: item,
|
|
|
|
|
label: item
|
|
|
|
|
};
|
|
|
|
|
}),
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
console.log(e);
|
|
|
|
|
setSelectedTag(e);
|
|
|
|
|
}
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: ModifyMirrorModalmodules.aBtn,
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setId(id + 1);
|
|
|
|
|
setAddTags(addtags.concat({
|
|
|
|
|
id: id,
|
|
|
|
|
value: ''
|
|
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
children: "\u6DFB\u52A0\u6807\u7B7E"
|
|
|
|
|
})]
|
|
|
|
|
}), addtags.length != 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
label: "\u6DFB\u52A0\u6807\u7B7E",
|
|
|
|
|
name: "addTags",
|
|
|
|
|
required: true,
|
|
|
|
|
colon: false,
|
|
|
|
|
className: ModifyMirrorModalmodules.errorTip,
|
|
|
|
|
rules: [{
|
|
|
|
|
validator: function () {
|
|
|
|
|
var _validator = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(rule, value) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!((addtags === null || addtags === void 0 ? void 0 : addtags.findIndex(function (item) {
|
|
|
|
|
return !item.value;
|
|
|
|
|
})) > -1)) {
|
|
|
|
|
_context4.next = 2;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _context4.abrupt("return", Promise.reject('请填写标签名称'));
|
|
|
|
|
case 2:
|
|
|
|
|
return _context4.abrupt("return", Promise.resolve());
|
|
|
|
|
case 3:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context4.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee4);
|
|
|
|
|
}));
|
|
|
|
|
function validator(_x2, _x3) {
|
|
|
|
|
return _validator.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return validator;
|
|
|
|
|
}()
|
|
|
|
|
}],
|
|
|
|
|
children: addtags === null || addtags === void 0 ? void 0 : addtags.map(function (item, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
|
|
value: item.value,
|
|
|
|
|
style: {
|
|
|
|
|
width: 500,
|
|
|
|
|
marginBottom: 15
|
|
|
|
|
},
|
|
|
|
|
placeholder: "\u8BF7\u586B\u5199\u6807\u7B7E\u540D\u79F0",
|
|
|
|
|
size: "large",
|
|
|
|
|
maxLength: 32,
|
|
|
|
|
showCount: true,
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
console.log(addtags);
|
|
|
|
|
var value = e.target.value;
|
|
|
|
|
addtags[index].value = value;
|
|
|
|
|
setAddTags(toConsumableArray_default()(addtags));
|
|
|
|
|
}
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 20,
|
|
|
|
|
color: '#E30000',
|
|
|
|
|
cursor: 'pointer'
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
var newtags = addtags.filter(function (val, key) {
|
|
|
|
|
return val.id !== item.id;
|
|
|
|
|
});
|
|
|
|
|
setAddTags(toConsumableArray_default()(newtags));
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-piliangshanchu3"
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}, item.id);
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
label: "\u955C\u50CF\u63CF\u8FF0",
|
|
|
|
|
name: "description",
|
|
|
|
|
colon: false,
|
|
|
|
|
style: {
|
|
|
|
|
width: '100%'
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.TextArea, {
|
|
|
|
|
maxLength: 128,
|
|
|
|
|
showCount: true,
|
|
|
|
|
style: {
|
|
|
|
|
width: '100%'
|
|
|
|
|
},
|
|
|
|
|
rows: 4,
|
|
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u63CF\u8FF0",
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
form.setFieldsValue(objectSpread2_default()(objectSpread2_default()({}, form.getFieldsValue()), {}, {
|
|
|
|
|
description: e.target.value
|
|
|
|
|
}));
|
|
|
|
|
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), {}, {
|
|
|
|
|
description: e.target.value
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: ModifyMirrorModalmodules.btns,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
|
|
onClick: onCancel,
|
|
|
|
|
className: ModifyMirrorModalmodules.cancel,
|
|
|
|
|
children: "\u53D6\u6D88 "
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AsyncButton/* AsyncButton */.Z, {
|
|
|
|
|
type: "primary",
|
|
|
|
|
className: ModifyMirrorModalmodules.confirm,
|
|
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context5.next = 2;
|
|
|
|
|
return onOk();
|
|
|
|
|
case 2:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context5.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee5);
|
|
|
|
|
})),
|
|
|
|
|
children: "\u786E\u8BA4"
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var components_ModifyMirrorModal = (ModifyMirrorModal);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 18129:
|
|
|
|
|
/*!**********************************************************************!*\
|
|
|
|
|
!*** ./src/pages/User/Detail/ExperImentMirror/index.tsx + 3 modules ***!
|
|
|
|
|
@ -641,6 +1273,7 @@ var ClassroomListPage = function ClassroomListPage(_ref) {
|
|
|
|
|
'deactivated': '已弃用',
|
|
|
|
|
'deleted': '已删除',
|
|
|
|
|
'deleting': '删除中',
|
|
|
|
|
'error': '错误',
|
|
|
|
|
'queued': '排队中/创建中',
|
|
|
|
|
'reactivating': '取消弃用中',
|
|
|
|
|
'rejected': '已拒绝共享镜像',
|
|
|
|
|
@ -1025,7 +1658,7 @@ var ClassroomListPage = function ClassroomListPage(_ref) {
|
|
|
|
|
setSelectedInfo(record);
|
|
|
|
|
},
|
|
|
|
|
children: "\u7F16\u8F91"
|
|
|
|
|
}), (record === null || record === void 0 ? void 0 : record.status) === 1 && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
}), (record === null || record === void 0 ? void 0 : record.imageStatus) === 'active' && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "".concat((record === null || record === void 0 ? void 0 : record.imageStatus) !== 'queued' && ExperImentMirrormodules.deleteicon),
|
|
|
|
|
style: {
|
|
|
|
|
@ -1682,6 +2315,17 @@ var ClassroomListPage = function ClassroomListPage(_ref) {
|
|
|
|
|
};
|
|
|
|
|
})(ClassroomListPage));
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 76241:
|
|
|
|
|
/*!*********************************************!*\
|
|
|
|
|
!*** ./src/pages/tasks/vnc-view/index.less ***!
|
|
|
|
|
\*********************************************/
|
|
|
|
|
/***/ (function() {
|
|
|
|
|
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
|
|
|
|
}]);
|