You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1664 lines
62 KiB
1664 lines
62 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[9507],{
|
|
|
|
/***/ 56971:
|
|
/*!*****************************************!*\
|
|
!*** ./src/components/NoData/index.tsx ***!
|
|
\*****************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_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_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 93314);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 3113);
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var noData = function noData(_ref) {
|
|
var img = _ref.img,
|
|
_ref$buttonProps = _ref.buttonProps,
|
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
_ref$styles = _ref.styles,
|
|
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
|
customText = _ref.customText,
|
|
ButtonText = _ref.ButtonText,
|
|
ButtonClick = _ref.ButtonClick,
|
|
Buttonclass = _ref.Buttonclass,
|
|
ButtonTwo = _ref.ButtonTwo,
|
|
imgStyles = _ref.imgStyles,
|
|
_ref$loading = _ref.loading,
|
|
loading = _ref$loading === void 0 ? false : _ref$loading;
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section", {
|
|
className: "tc animated fadeIn",
|
|
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, {
|
|
color: '#999',
|
|
margin: '100px auto',
|
|
visibility: loading ? 'hidden' : 'visible'
|
|
}), styles),
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", {
|
|
src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__,
|
|
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, imgStyles), {}, {
|
|
pointerEvents: "none",
|
|
userSelect: "none"
|
|
})
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", {
|
|
className: "mt20 font14",
|
|
children: customText || '暂时还没有相关数据哦!'
|
|
}), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
|
|
className: Buttonclass,
|
|
onClick: ButtonClick
|
|
}, buttonProps), {}, {
|
|
children: ButtonText
|
|
})), ButtonTwo && ButtonTwo]
|
|
});
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = (noData);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 22685:
|
|
/*!***********************************************************************!*\
|
|
!*** ./src/pages/User/Detail/ResourceGuarantee/index.tsx + 8 modules ***!
|
|
\***********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"default": function() { return /* binding */ Detail_ResourceGuarantee; }
|
|
});
|
|
|
|
// 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: ./src/.umi-production/exports.ts + 15 modules
|
|
var _umi_production_exports = __webpack_require__(58011);
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/ResourceGuarantee/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var ResourceGuaranteemodules = ({"flex_box_center":"flex_box_center___HE4p2","flex_space_between":"flex_space_between___PWM7q","flex_box_vertical_center":"flex_box_vertical_center___Da0yH","flex_box_center_end":"flex_box_center_end___kv9AS","flex_box_column":"flex_box_column___FFov8","wrap":"wrap___fXH30","customTable":"customTable___ra3ry","rowHead":"rowHead___bBzMY","title":"title___HkPE_","date":"date___p5d5H","type":"type___KdB4i","status":"status___pIlwq","action":"action___NkTFk"});
|
|
// EXTERNAL MODULE: ./src/components/ui-customization/index.tsx + 34 modules
|
|
var ui_customization = __webpack_require__(75748);
|
|
// 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/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(39647);
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
var input = __webpack_require__(62680);
|
|
// 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/row/index.js
|
|
var row = __webpack_require__(95237);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
var table = __webpack_require__(90508);
|
|
// 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/message/index.js + 4 modules
|
|
var message = __webpack_require__(8591);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(56648);
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/ResourceGuarantee/ProjectReview/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var ProjectReviewmodules = ({"wrap":"wrap___ms6KB","real_name":"real_name___x0U_t","operationBtn":"operationBtn___AF4Wv","reject":"reject___gMcdw","approve":"approve___k3jBL","rejectBtn":"rejectBtn___FYT2j","approveBtn":"approveBtn___oOAOL","user_model":"user_model___AoAaQ","zybzForm":"zybzForm___vOiYW","dataPicker":"dataPicker___AQEiu","graaytitle":"graaytitle___hXTw9","must":"must___pDzlU"});
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(9498);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/ResourceGuarantee/components/UserInfoDialog/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var UserInfoDialogmodules = ({"flex_box_center":"flex_box_center___zhxtt","flex_space_between":"flex_space_between___st31J","flex_box_vertical_center":"flex_box_vertical_center___XBXcK","flex_box_center_end":"flex_box_center_end___Fd5u8","flex_box_column":"flex_box_column___u4g96","user_model":"user_model___mq6dG","con":"con___f2Hot"});
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.5@@ant-design/icons/es/icons/RightOutlined.js + 1 modules
|
|
var RightOutlined = __webpack_require__(89276);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/ResourceGuarantee/components/UserInfoDialog/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var UserInfoDialog = function UserInfoDialog(_ref) {
|
|
var globalSetting = _ref.globalSetting,
|
|
dispatch = _ref.dispatch,
|
|
user = _ref.user,
|
|
visibility = _ref.visibility,
|
|
handleOk = _ref.handleOk,
|
|
handleCancel = _ref.handleCancel,
|
|
data = _ref.data;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
|
|
centered: true,
|
|
width: 384,
|
|
title: "\u7533\u8BF7\u4EBA\u4FE1\u606F",
|
|
open: visibility,
|
|
footer: null,
|
|
onOk: handleOk,
|
|
onCancel: handleCancel,
|
|
className: UserInfoDialogmodules.user_model,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: UserInfoDialogmodules.con,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u7533\u8BF7\u4EBA\u59D3\u540D"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: data === null || data === void 0 ? void 0 : data.real_name
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
onClick: function onClick() {
|
|
_umi_production_exports.history.push("/users/".concat(data === null || data === void 0 ? void 0 : data.login));
|
|
},
|
|
children: ["\u67E5\u770B\u4E2A\u4EBA\u4E3B\u9875\u8BE6\u60C5", /*#__PURE__*/(0,jsx_runtime.jsx)(RightOutlined/* default */.Z, {
|
|
style: {
|
|
width: 'auto',
|
|
color: '#165DFF'
|
|
}
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: UserInfoDialogmodules.con,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u6240\u5C5E\u5355\u4F4D"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: data === null || data === void 0 ? void 0 : data.school_name
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: UserInfoDialogmodules.con,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u5B66\u9662"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: data === null || data === void 0 ? void 0 : data.department_name
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: UserInfoDialogmodules.con,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u8054\u7CFB\u7535\u8BDD"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: data === null || data === void 0 ? void 0 : data.phone
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: UserInfoDialogmodules.con,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u90AE\u7BB1"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: data === null || data === void 0 ? void 0 : data.email
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var components_UserInfoDialog = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
var globalSetting = _ref2.globalSetting,
|
|
user = _ref2.user;
|
|
return {
|
|
globalSetting: globalSetting,
|
|
user: user
|
|
};
|
|
})(UserInfoDialog));
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
|
|
var spin = __webpack_require__(71418);
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/ResourceGuarantee/components/ProjectInfoDialog/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var ProjectInfoDialogmodules = ({"flex_box_center":"flex_box_center___kgN9n","flex_space_between":"flex_space_between___Bs5VI","flex_box_vertical_center":"flex_box_vertical_center___nxqLi","flex_box_center_end":"flex_box_center_end____q_RU","flex_box_column":"flex_box_column___t12yw","user_model":"user_model___mCk6w","goto":"goto___GPJs3","info_title":"info_title___vIKml","info_warp":"info_warp___auzFu","info_item":"info_item___I2LoJ","item_text":"item_text___RsUwo"});
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/ResourceGuarantee/components/ProjectInfoDialog/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ProjectInfoDialog = function ProjectInfoDialog(_ref) {
|
|
var _dataInfo$shixun_envi, _dataInfo$shixun_envi2;
|
|
var globalSetting = _ref.globalSetting,
|
|
dispatch = _ref.dispatch,
|
|
user = _ref.user,
|
|
visibility = _ref.visibility,
|
|
handleOk = _ref.handleOk,
|
|
handleCancel = _ref.handleCancel,
|
|
id = _ref.id;
|
|
var _useState = (0,_react_17_0_2_react.useState)([]),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
dataInfo = _useState2[0],
|
|
setDataInfo = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(true),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
loading = _useState4[0],
|
|
setLoading = _useState4[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
if (visibility) {
|
|
getList();
|
|
}
|
|
}, [visibility]);
|
|
var getList = /*#__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:
|
|
setLoading(true);
|
|
_context.next = 3;
|
|
return (0,fetch/* default */.ZP)("/api/resource_ensures/".concat(id, "/shixun_detail.json"), {
|
|
method: 'get'
|
|
});
|
|
case 3:
|
|
res = _context.sent;
|
|
if (res.status == 0) {
|
|
console.log("Res", res);
|
|
setDataInfo(res.data);
|
|
}
|
|
setLoading(false);
|
|
case 6:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function getList() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var columns = [{
|
|
title: '实验镜像',
|
|
dataIndex: 'name',
|
|
key: 'name',
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: 'CPU',
|
|
dataIndex: 'cpu_limit',
|
|
key: 'cpu_limit',
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: [text, " \u6838"]
|
|
});
|
|
}
|
|
}, {
|
|
title: '最低CPU',
|
|
dataIndex: 'lower_cpu_limit',
|
|
key: 'lower_cpu_limit',
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: [text, " \u6838"]
|
|
});
|
|
}
|
|
}, {
|
|
title: '内存限制',
|
|
dataIndex: 'memory_limit',
|
|
key: 'memory_limit',
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: [text, " M"]
|
|
});
|
|
}
|
|
}, {
|
|
title: '内存要求',
|
|
dataIndex: 'request_limit',
|
|
key: 'request_limit',
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: [text, " M"]
|
|
});
|
|
}
|
|
}, {
|
|
title: '磁盘限制',
|
|
dataIndex: 'resource_limit',
|
|
key: 'resource_limit',
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: [text, " K"]
|
|
});
|
|
}
|
|
}];
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
|
|
centered: true,
|
|
width: 900,
|
|
title: dataInfo === null || dataInfo === void 0 ? void 0 : dataInfo.shixun_name,
|
|
open: visibility,
|
|
footer: null,
|
|
onOk: handleOk,
|
|
onCancel: handleCancel,
|
|
className: ProjectInfoDialogmodules.user_model,
|
|
children: [!loading && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ProjectInfoDialogmodules["goto"],
|
|
onClick: function onClick() {
|
|
window.open("/shixuns/".concat(dataInfo === null || dataInfo === void 0 ? void 0 : dataInfo.shixun_identifier, "/challenges"));
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
margin: '0 20px 0 25px',
|
|
fontSize: 16,
|
|
opacity: 0
|
|
},
|
|
children: dataInfo === null || dataInfo === void 0 ? void 0 : dataInfo.shixun_name
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
style: {
|
|
cursor: 'pointer'
|
|
},
|
|
children: ["\u67E5\u770B\u5B9E\u8DF5\u9879\u76EE\u8BE6\u60C5", /*#__PURE__*/(0,jsx_runtime.jsx)(RightOutlined/* default */.Z, {
|
|
style: {
|
|
width: 'auto',
|
|
color: '#165DFF'
|
|
}
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
|
|
spinning: loading,
|
|
children: [(dataInfo === null || dataInfo === void 0 || (_dataInfo$shixun_envi = dataInfo.shixun_environments) === null || _dataInfo$shixun_envi === void 0 ? void 0 : _dataInfo$shixun_envi.length) > 0 && (dataInfo === null || dataInfo === void 0 || (_dataInfo$shixun_envi2 = dataInfo.shixun_environments) === null || _dataInfo$shixun_envi2 === void 0 ? void 0 : _dataInfo$shixun_envi2.map(function (item, index) {
|
|
var jx_text_arr = item === null || item === void 0 ? void 0 : item.mirror_name.map(function (item2, i) {
|
|
return item2 + (i == (item === null || item === void 0 ? void 0 : item.mirror_name.length) - 1 ? '' : '、');
|
|
});
|
|
var jx_text = jx_text_arr.join('');
|
|
var jm_text_arr = item === null || item === void 0 ? void 0 : item.experiment_modes.map(function (item2, i) {
|
|
return item2 + (i == (item === null || item === void 0 ? void 0 : item.experiment_modes.length) - 1 ? '' : '、');
|
|
});
|
|
var jm_text = jm_text_arr.join('');
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
marginBottom: 30
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ProjectInfoDialogmodules.info_title,
|
|
children: item === null || item === void 0 ? void 0 : item.name
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ProjectInfoDialogmodules.info_warp,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ProjectInfoDialogmodules.info_item,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u5B9E\u9A8C\u8D44\u6E90"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: (item === null || item === void 0 ? void 0 : item.resource_type) == 1 ? '通用云' : '专有云'
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ProjectInfoDialogmodules.info_item,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u5B9E\u9A8C\u955C\u50CF"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ProjectInfoDialogmodules.item_text,
|
|
title: jx_text,
|
|
children: jx_text
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ProjectInfoDialogmodules.info_item,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u5B9E\u9A8C\u754C\u9762"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ProjectInfoDialogmodules.item_text,
|
|
title: jm_text,
|
|
children: jm_text
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
columns: columns,
|
|
dataSource: item === null || item === void 0 ? void 0 : item.shixun_service_configs,
|
|
pagination: false
|
|
})]
|
|
}, index);
|
|
})), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ProjectInfoDialogmodules.info_title,
|
|
children: "\u8D44\u6E90\u9700\u6C42"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ProjectInfoDialogmodules.info_warp,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ProjectInfoDialogmodules.info_item,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u8D44\u6E90\u89C4\u683C"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: dataInfo === null || dataInfo === void 0 ? void 0 : dataInfo.resource_spec
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ProjectInfoDialogmodules.info_item,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u673A\u5668\u6570\u91CF"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: dataInfo === null || dataInfo === void 0 ? void 0 : dataInfo.machine_num
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ProjectInfoDialogmodules.info_item,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u9884\u8BA1\u82B1\u8D39"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: dataInfo === null || dataInfo === void 0 ? void 0 : dataInfo.budget_money
|
|
})]
|
|
})]
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var components_ProjectInfoDialog = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
var globalSetting = _ref3.globalSetting,
|
|
user = _ref3.user;
|
|
return {
|
|
globalSetting: globalSetting,
|
|
user: user
|
|
};
|
|
})(ProjectInfoDialog));
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/ResourceGuarantee/ProjectReview/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["globalSetting", "user", "dispatch", "keyVal"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var TextArea = input/* default */.Z.TextArea;
|
|
var ProjectReview = function ProjectReview(_ref) {
|
|
var globalSetting = _ref.globalSetting,
|
|
user = _ref.user,
|
|
dispatch = _ref.dispatch,
|
|
keyVal = _ref.keyVal,
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
var _useState = (0,_react_17_0_2_react.useState)(0),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
activeStatus = _useState2[0],
|
|
setActiveStatus = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)({
|
|
tab_type: 1,
|
|
page: 1,
|
|
limit: 15,
|
|
sort_by: 'start_time',
|
|
sort: 'desc',
|
|
username: null,
|
|
keywords: null,
|
|
status: 0
|
|
}),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
params = _useState4[0],
|
|
setParams = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
result = _useState6[0],
|
|
setResult = _useState6[1];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(true),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
tableLoading = _useState8[0],
|
|
setTableLoading = _useState8[1];
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
userVisibility = _useState10[0],
|
|
setUserVisibility = _useState10[1];
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
objectVisibility = _useState12[0],
|
|
setObjectVisibility = _useState12[1];
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(null),
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
renderInfo = _useState14[0],
|
|
setRenderInfo = _useState14[1];
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
refuseVisibility = _useState16[0],
|
|
setRefuseVisibility = _useState16[1];
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
agreeVisibility = _useState18[0],
|
|
setAgreeVisibility = _useState18[1];
|
|
var _useState19 = (0,_react_17_0_2_react.useState)(''),
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
notes = _useState20[0],
|
|
setNotes = _useState20[1];
|
|
var _useState21 = (0,_react_17_0_2_react.useState)(''),
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
reason = _useState22[0],
|
|
setReason = _useState22[1];
|
|
var sort = [{
|
|
id: 'created_at',
|
|
name: '申请时间'
|
|
}, {
|
|
id: 'start_time',
|
|
name: '保障开始时间'
|
|
}, {
|
|
id: 'end_time',
|
|
name: '保障结束时间'
|
|
}, {
|
|
id: 'verify_time',
|
|
name: '审核时间'
|
|
}, {
|
|
id: 'people_number',
|
|
name: '保障人数'
|
|
}];
|
|
var columns = [{
|
|
title: '序号',
|
|
dataIndex: 'name',
|
|
key: 'name',
|
|
ellipsis: true,
|
|
fixed: 'left',
|
|
width: 60,
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: params.limit * (params.page - 1) + index + 1
|
|
});
|
|
}
|
|
}, {
|
|
title: '申请人',
|
|
dataIndex: 'content',
|
|
key: 'content',
|
|
render: function render(text, record, index) {
|
|
var _record$user_info;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: ProjectReviewmodules.real_name,
|
|
onClick: function onClick() {
|
|
setUserVisibility(true);
|
|
setRenderInfo(record);
|
|
},
|
|
children: record === null || record === void 0 || (_record$user_info = record.user_info) === null || _record$user_info === void 0 ? void 0 : _record$user_info.real_name
|
|
});
|
|
}
|
|
}, {
|
|
title: '保障单位',
|
|
dataIndex: 'school_name',
|
|
key: 'school_name',
|
|
width: 120,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '开始时间',
|
|
dataIndex: 'start_time',
|
|
key: 'start_time',
|
|
width: 140,
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#666666'
|
|
},
|
|
children: text ? dayjs_min_default()(text).format('YYYY-MM-DD HH:mm') : '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '结束时间',
|
|
dataIndex: 'end_time',
|
|
key: 'end_time',
|
|
width: 140,
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#666666'
|
|
},
|
|
children: text ? dayjs_min_default()(text).format('YYYY-MM-DD HH:mm') : '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '保障人数',
|
|
dataIndex: 'people_number',
|
|
key: 'people_number',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '实践项目',
|
|
dataIndex: 'shixun_name',
|
|
key: 'shixun_name',
|
|
width: 140,
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: record === null || record === void 0 ? void 0 : record.shixun_name,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
color: '#165DFF',
|
|
cursor: 'pointer',
|
|
overflow: 'hidden',
|
|
textOverflow: 'ellipsis',
|
|
whiteSpace: 'nowrap'
|
|
},
|
|
onClick: function onClick() {
|
|
setObjectVisibility(true);
|
|
setRenderInfo(record);
|
|
},
|
|
children: text
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: '申请时间',
|
|
dataIndex: 'created_at',
|
|
key: 'created_at',
|
|
width: 140,
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#666666'
|
|
},
|
|
children: text ? dayjs_min_default()(text).format('YYYY-MM-DD HH:mm') : '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '审核状态',
|
|
dataIndex: 'status_cn',
|
|
key: 'status_cn',
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '审核时间',
|
|
dataIndex: 'verify_time',
|
|
key: 'verify_time',
|
|
width: 140,
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#666666'
|
|
},
|
|
children: text ? dayjs_min_default()(text).format('YYYY-MM-DD HH:mm') : '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '审核人',
|
|
dataIndex: 'verifier_name',
|
|
key: 'verifier_name',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '备注',
|
|
dataIndex: 'verify_reason',
|
|
key: 'verify_reason',
|
|
width: 100,
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: record === null || record === void 0 ? void 0 : record.verify_reason,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
overflow: 'hidden',
|
|
textOverflow: 'ellipsis',
|
|
whiteSpace: 'nowrap'
|
|
},
|
|
children: text
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: '操作',
|
|
dataIndex: 'remark',
|
|
key: 'remark',
|
|
fixed: 'right',
|
|
ellipsis: true,
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
align: "middle",
|
|
justify: "space-between",
|
|
children: (record === null || record === void 0 ? void 0 : record.status_cn) == '审核中' ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "".concat(ProjectReviewmodules.operationBtn, " ").concat(ProjectReviewmodules.approve),
|
|
onClick: function onClick() {
|
|
setAgreeVisibility(true);
|
|
setRenderInfo(record);
|
|
},
|
|
children: "\u540C\u610F"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "".concat(ProjectReviewmodules.operationBtn, " ").concat(ProjectReviewmodules.reject),
|
|
onClick: function onClick() {
|
|
setReason('');
|
|
setRefuseVisibility(true);
|
|
setRenderInfo(record);
|
|
},
|
|
children: "\u62D2\u7EDD"
|
|
})]
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {})
|
|
});
|
|
}
|
|
}];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
params.keywords = keyVal;
|
|
params.page = 1;
|
|
setParams(objectSpread2_default()({}, params));
|
|
getList();
|
|
}, [keyVal]);
|
|
function getList() {
|
|
return _getList.apply(this, arguments);
|
|
}
|
|
function _getList() {
|
|
_getList = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
var result;
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
setTableLoading(true);
|
|
_context3.next = 3;
|
|
return (0,fetch/* default */.ZP)("/api/resource_ensures.json", {
|
|
method: 'get',
|
|
params: params
|
|
});
|
|
case 3:
|
|
result = _context3.sent;
|
|
if (result.status == 0) {
|
|
setResult(result.data);
|
|
}
|
|
setTableLoading(false);
|
|
case 6:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
return _getList.apply(this, arguments);
|
|
}
|
|
var handleChangeOrder = function handleChangeOrder(sort) {
|
|
params.sort = sort;
|
|
setParams(objectSpread2_default()({}, params));
|
|
getList();
|
|
};
|
|
var handleChangeOrderField = function handleChangeOrderField(sort_by) {
|
|
params.sort_by = sort_by;
|
|
params.sort = 'desc';
|
|
setParams(objectSpread2_default()({}, params));
|
|
getList();
|
|
};
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ProjectReviewmodules.wrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
align: "middle",
|
|
style: {
|
|
marginTop: 25
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTags */.qp, {
|
|
title: "\u72B6\u6001",
|
|
value: activeStatus,
|
|
onChange: function onChange(e) {
|
|
setActiveStatus(e);
|
|
params.status = e;
|
|
params.page = 1;
|
|
setParams(objectSpread2_default()({}, params));
|
|
getList();
|
|
},
|
|
dataSource: [{
|
|
name: '全部',
|
|
id: null
|
|
}, {
|
|
name: '待审核',
|
|
id: 0
|
|
}, {
|
|
name: '审核通过',
|
|
id: 1
|
|
}, {
|
|
name: '审核驳回',
|
|
id: 2
|
|
}],
|
|
titleWidth: 28,
|
|
style: {
|
|
flex: 1
|
|
}
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* SuperiorSort */.cq, {
|
|
dataSource: sort,
|
|
sortValue: params.sort,
|
|
dropValue: params.sort_by,
|
|
onSort: handleChangeOrder,
|
|
onDrop: handleChangeOrderField
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTable */.Gi, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
scroll: {
|
|
x: 1500
|
|
},
|
|
columns: columns,
|
|
loading: tableLoading,
|
|
dataSource: result === null || result === void 0 ? void 0 : result.list,
|
|
pagination: {
|
|
hideOnSinglePage: true,
|
|
pageSize: params.limit,
|
|
showSizeChanger: false,
|
|
current: params.page,
|
|
position: ["bottomRight"],
|
|
onChange: function onChange(page, pagesize) {
|
|
params.page = page;
|
|
setParams(objectSpread2_default()({}, params));
|
|
getList();
|
|
},
|
|
total: result === null || result === void 0 ? void 0 : result.count
|
|
}
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_UserInfoDialog, {
|
|
data: renderInfo === null || renderInfo === void 0 ? void 0 : renderInfo.user_info,
|
|
visibility: userVisibility,
|
|
handleOk: function handleOk() {
|
|
return setUserVisibility(false);
|
|
},
|
|
handleCancel: function handleCancel() {
|
|
return setUserVisibility(false);
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_ProjectInfoDialog, {
|
|
id: renderInfo === null || renderInfo === void 0 ? void 0 : renderInfo.id,
|
|
visibility: objectVisibility,
|
|
handleOk: function handleOk() {
|
|
return setObjectVisibility(false);
|
|
},
|
|
handleCancel: function handleCancel() {
|
|
return setObjectVisibility(false);
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
|
|
centered: true,
|
|
width: 400,
|
|
title: "\u62D2\u7EDD\u539F\u56E0",
|
|
open: refuseVisibility,
|
|
onOk: /*#__PURE__*/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:
|
|
if (!(reason.length == 0)) {
|
|
_context.next = 3;
|
|
break;
|
|
}
|
|
message/* default */.ZP.info('请填写原因');
|
|
return _context.abrupt("return");
|
|
case 3:
|
|
_context.next = 5;
|
|
return (0,fetch/* default */.ZP)("/api/resource_ensures/".concat(renderInfo === null || renderInfo === void 0 ? void 0 : renderInfo.id, "/verify.json"), {
|
|
method: 'post',
|
|
body: {
|
|
status: 2,
|
|
reason: reason
|
|
}
|
|
});
|
|
case 5:
|
|
res = _context.sent;
|
|
if (res.status == 0) {
|
|
message/* default */.ZP.success('审核完成');
|
|
setRefuseVisibility(false);
|
|
getList();
|
|
}
|
|
case 7:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
})),
|
|
okText: "\u4FDD\u5B58",
|
|
onCancel: function onCancel() {
|
|
setRefuseVisibility(false);
|
|
},
|
|
className: ProjectReviewmodules.user_model,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
color: '#000',
|
|
marginBottom: 6
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#E53333'
|
|
},
|
|
children: "*"
|
|
}), "\u539F\u56E0"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
|
|
value: reason,
|
|
onChange: function onChange(e) {
|
|
setReason(e.target.value);
|
|
},
|
|
maxLength: 200,
|
|
placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9",
|
|
rows: 5
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
|
|
centered: true,
|
|
width: 400,
|
|
title: "\u540C\u610F\u5BA1\u6838",
|
|
open: agreeVisibility,
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
_context2.next = 2;
|
|
return (0,fetch/* default */.ZP)("/api/resource_ensures/".concat(renderInfo === null || renderInfo === void 0 ? void 0 : renderInfo.id, "/verify.json"), {
|
|
method: 'post',
|
|
body: {
|
|
status: 1,
|
|
reason: notes
|
|
}
|
|
});
|
|
case 2:
|
|
res = _context2.sent;
|
|
if (res.status == 0) {
|
|
message/* default */.ZP.success('审核完成');
|
|
setAgreeVisibility(false);
|
|
getList();
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
})),
|
|
okText: "\u4FDD\u5B58",
|
|
onCancel: function onCancel() {
|
|
setAgreeVisibility(false);
|
|
},
|
|
className: ProjectReviewmodules.user_model,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
margin: '10px 0 20px 0',
|
|
color: '#000'
|
|
},
|
|
children: "\u662F\u5426\u786E\u5B9A\u540C\u610F\u8BE5\u7533\u8BF7\uFF1F"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
color: '#000',
|
|
marginBottom: 6
|
|
},
|
|
children: "\u5907\u6CE8"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
|
|
value: notes,
|
|
onChange: function onChange(e) {
|
|
setNotes(e.target.value);
|
|
},
|
|
maxLength: 200,
|
|
placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9",
|
|
autoSize: {
|
|
minRows: 5,
|
|
maxRows: 5
|
|
}
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var ResourceGuarantee_ProjectReview = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
var globalSetting = _ref4.globalSetting,
|
|
user = _ref4.user;
|
|
return {
|
|
globalSetting: globalSetting,
|
|
user: user
|
|
};
|
|
})(ProjectReview));
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/index.js + 66 modules
|
|
var date_picker = __webpack_require__(92641);
|
|
// 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/input-number/index.js + 14 modules
|
|
var input_number = __webpack_require__(97913);
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/ResourceGuarantee/Projectlist/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
var Projectlist_excluded = ["globalSetting", "user", "dispatch", "keyVal"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dayjs_min_default().locale('ZH-cn');
|
|
var timeFormat = 'YYYY-MM-DD HH:mm';
|
|
var RangePicker = date_picker["default"].RangePicker;
|
|
var Projectlist = function Projectlist(_ref) {
|
|
var globalSetting = _ref.globalSetting,
|
|
user = _ref.user,
|
|
dispatch = _ref.dispatch,
|
|
keyVal = _ref.keyVal,
|
|
props = objectWithoutProperties_default()(_ref, Projectlist_excluded);
|
|
var _useState = (0,_react_17_0_2_react.useState)(null),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
activeStatus = _useState2[0],
|
|
setActiveStatus = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
userVisibility = _useState4[0],
|
|
setUserVisibility = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)({
|
|
tab_type: 2,
|
|
page: 1,
|
|
limit: 15,
|
|
sort_by: 'start_time',
|
|
sort: 'desc',
|
|
username: null,
|
|
keywords: null,
|
|
passed_after_status: null
|
|
}),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
params = _useState6[0],
|
|
setParams = _useState6[1];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
result = _useState8[0],
|
|
setResult = _useState8[1];
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(true),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
tableLoading = _useState10[0],
|
|
setTableLoading = _useState10[1];
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
objectVisibility = _useState12[0],
|
|
setObjectVisibility = _useState12[1];
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(null),
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
renderInfo = _useState14[0],
|
|
setRenderInfo = _useState14[1];
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
editVisibility = _useState16[0],
|
|
setEditVisibility = _useState16[1];
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
form = _Form$useForm2[0];
|
|
var sort = [{
|
|
id: 'start_time',
|
|
name: '保障开始时间'
|
|
}, {
|
|
id: 'end_time',
|
|
name: '保障结束时间'
|
|
}, {
|
|
id: 'people_number',
|
|
name: '保障人数'
|
|
}, {
|
|
id: 'machine_num',
|
|
name: '机器数量'
|
|
}, {
|
|
id: 'budget_money',
|
|
name: '预估费用'
|
|
}];
|
|
var columns = [{
|
|
title: '序号',
|
|
dataIndex: 'name',
|
|
key: 'name',
|
|
ellipsis: true,
|
|
fixed: 'left',
|
|
width: 60,
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: params.limit * (params.page - 1) + index + 1
|
|
});
|
|
}
|
|
}, {
|
|
title: '保障标识',
|
|
dataIndex: 'identifier',
|
|
key: 'identifier',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '申请人',
|
|
dataIndex: 'content',
|
|
key: 'content',
|
|
render: function render(text, record, index) {
|
|
var _record$user_info;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: ProjectReviewmodules.real_name,
|
|
onClick: function onClick() {
|
|
setUserVisibility(true);
|
|
setRenderInfo(record);
|
|
},
|
|
children: record === null || record === void 0 || (_record$user_info = record.user_info) === null || _record$user_info === void 0 ? void 0 : _record$user_info.real_name
|
|
});
|
|
}
|
|
}, {
|
|
title: '保障单位',
|
|
dataIndex: 'school_name',
|
|
key: 'school_name',
|
|
width: 120,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '开始时间',
|
|
dataIndex: 'start_time',
|
|
key: 'start_time',
|
|
width: 140,
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#666666'
|
|
},
|
|
children: text ? dayjs_min_default()(text).format('YYYY-MM-DD HH:mm') : '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '结束时间',
|
|
dataIndex: 'end_time',
|
|
key: 'end_time',
|
|
width: 140,
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: '#666666'
|
|
},
|
|
children: text ? dayjs_min_default()(text).format('YYYY-MM-DD HH:mm') : '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '保障人数',
|
|
dataIndex: 'people_number',
|
|
key: 'people_number',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '实践项目',
|
|
dataIndex: 'shixun_name',
|
|
key: 'shixun_name',
|
|
width: 140,
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
title: record === null || record === void 0 ? void 0 : record.shixun_name,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
color: '#165DFF',
|
|
cursor: 'pointer',
|
|
overflow: 'hidden',
|
|
textOverflow: 'ellipsis',
|
|
whiteSpace: 'nowrap'
|
|
},
|
|
onClick: function onClick() {
|
|
setObjectVisibility(true);
|
|
setRenderInfo(record);
|
|
},
|
|
children: text
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: '状态',
|
|
dataIndex: 'passed_after_status',
|
|
key: 'passed_after_status',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: ['资源分配失败'].includes(text) ? '#E53333' : '#000000'
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '资源规格',
|
|
dataIndex: 'resource_spec',
|
|
key: 'resource_spec',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text || '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '机器数量',
|
|
dataIndex: 'machine_num',
|
|
key: 'machine_num',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text || '--'
|
|
});
|
|
}
|
|
}, {
|
|
title: '预估费用',
|
|
dataIndex: 'budget_money',
|
|
key: 'budget_money',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: [text, " \uFFE5"]
|
|
});
|
|
}
|
|
}, {
|
|
title: '延长时间',
|
|
dataIndex: 'extend_times',
|
|
key: 'extend_times',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: [text, " h"]
|
|
});
|
|
}
|
|
}, {
|
|
title: '操作',
|
|
dataIndex: 'remark',
|
|
key: 'remark',
|
|
fixed: 'right',
|
|
ellipsis: true,
|
|
render: function render(text, record, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
align: "middle",
|
|
justify: "space-between",
|
|
children: (record === null || record === void 0 ? void 0 : record.passed_after_status) != '已结束' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
onClick: function onClick() {
|
|
setRenderInfo(record);
|
|
form.resetFields();
|
|
form.setFieldsValue({
|
|
people_number: (record === null || record === void 0 ? void 0 : record.people_number) || '',
|
|
times: record !== null && record !== void 0 && record.start_time && record !== null && record !== void 0 && record.end_time ? [dayjs_min_default()(record === null || record === void 0 ? void 0 : record.start_time), dayjs_min_default()(record === null || record === void 0 ? void 0 : record.end_time)] : ['', ''],
|
|
extend_times: record === null || record === void 0 ? void 0 : record.extend_times
|
|
});
|
|
setEditVisibility(true);
|
|
},
|
|
style: {
|
|
cursor: "pointer",
|
|
color: '#165DFF',
|
|
margin: '0 5px'
|
|
},
|
|
children: "\u7F16\u8F91"
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {})
|
|
});
|
|
}
|
|
}];
|
|
var integerParser = function integerParser(value) {
|
|
return parseInt(value || '0', 10);
|
|
};
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
params.keywords = keyVal;
|
|
params.page = 1;
|
|
setParams(objectSpread2_default()({}, params));
|
|
getList();
|
|
}, [keyVal]);
|
|
function getList() {
|
|
return _getList.apply(this, arguments);
|
|
}
|
|
function _getList() {
|
|
_getList = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
var result;
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
setTableLoading(true);
|
|
_context2.next = 3;
|
|
return (0,fetch/* default */.ZP)("/api/resource_ensures.json", {
|
|
method: 'get',
|
|
params: params
|
|
});
|
|
case 3:
|
|
result = _context2.sent;
|
|
if (result.status == 0) {
|
|
setResult(result.data);
|
|
}
|
|
setTableLoading(false);
|
|
case 6:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return _getList.apply(this, arguments);
|
|
}
|
|
var handleChangeOrder = function handleChangeOrder(sort) {
|
|
params.sort = sort;
|
|
setParams(objectSpread2_default()({}, params));
|
|
getList();
|
|
};
|
|
var handleChangeOrderField = function handleChangeOrderField(sort_by) {
|
|
params.sort_by = sort_by;
|
|
params.sort = 'desc';
|
|
setParams(objectSpread2_default()({}, params));
|
|
getList();
|
|
};
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ProjectReviewmodules.wrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
align: "middle",
|
|
style: {
|
|
marginTop: 25
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTags */.qp, {
|
|
title: "\u72B6\u6001",
|
|
value: activeStatus,
|
|
onChange: function onChange(e) {
|
|
setActiveStatus(e);
|
|
params.passed_after_status = e;
|
|
params.page = 1;
|
|
setParams(objectSpread2_default()({}, params));
|
|
getList();
|
|
},
|
|
dataSource: [{
|
|
name: '全部',
|
|
id: null
|
|
}, {
|
|
name: '预约中',
|
|
id: 1
|
|
}, {
|
|
name: '购买中',
|
|
id: 2
|
|
}, {
|
|
name: '资源分配失败',
|
|
id: 3
|
|
}, {
|
|
name: '资源分配成功',
|
|
id: 4
|
|
}, {
|
|
name: '保障中',
|
|
id: 5
|
|
}, {
|
|
name: '已结束',
|
|
id: 6
|
|
}],
|
|
titleWidth: 28,
|
|
style: {
|
|
flex: 1
|
|
}
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* SuperiorSort */.cq, {
|
|
dataSource: sort,
|
|
sortValue: params.sort,
|
|
dropValue: params.sort_by,
|
|
onSort: handleChangeOrder,
|
|
onDrop: handleChangeOrderField
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTable */.Gi, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
scroll: {
|
|
x: 1500
|
|
},
|
|
columns: columns,
|
|
loading: tableLoading,
|
|
dataSource: result === null || result === void 0 ? void 0 : result.list,
|
|
pagination: {
|
|
hideOnSinglePage: true,
|
|
pageSize: params.limit,
|
|
showSizeChanger: false,
|
|
current: params.page,
|
|
position: ["bottomRight"],
|
|
onChange: function onChange(page, pagesize) {
|
|
params.page = page;
|
|
setParams(objectSpread2_default()({}, params));
|
|
getList();
|
|
},
|
|
total: result === null || result === void 0 ? void 0 : result.count
|
|
}
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_UserInfoDialog, {
|
|
data: renderInfo === null || renderInfo === void 0 ? void 0 : renderInfo.user_info,
|
|
visibility: userVisibility,
|
|
handleOk: function handleOk() {
|
|
return setUserVisibility(false);
|
|
},
|
|
handleCancel: function handleCancel() {
|
|
return setUserVisibility(false);
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_ProjectInfoDialog, {
|
|
id: renderInfo === null || renderInfo === void 0 ? void 0 : renderInfo.id,
|
|
visibility: objectVisibility,
|
|
handleOk: function handleOk() {
|
|
return setObjectVisibility(false);
|
|
},
|
|
handleCancel: function handleCancel() {
|
|
return setObjectVisibility(false);
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
centered: true,
|
|
width: 600,
|
|
title: "\u7F16\u8F91",
|
|
open: editVisibility,
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var formInfo, query, res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
formInfo = form.getFieldsValue();
|
|
_context.next = 3;
|
|
return form.validateFields();
|
|
case 3:
|
|
query = {
|
|
extend_times: formInfo === null || formInfo === void 0 ? void 0 : formInfo.extend_times,
|
|
people_number: formInfo === null || formInfo === void 0 ? void 0 : formInfo.people_number,
|
|
start_time: dayjs_min_default()(formInfo === null || formInfo === void 0 ? void 0 : formInfo.times[0]).format("YYYY-MM-DD HH:mm"),
|
|
end_time: dayjs_min_default()(formInfo === null || formInfo === void 0 ? void 0 : formInfo.times[1]).format("YYYY-MM-DD HH:mm")
|
|
};
|
|
_context.next = 6;
|
|
return (0,fetch/* default */.ZP)("/api/resource_ensures/".concat(renderInfo === null || renderInfo === void 0 ? void 0 : renderInfo.id, ".json"), {
|
|
method: 'put',
|
|
body: query
|
|
});
|
|
case 6:
|
|
res = _context.sent;
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.success("\u7F16\u8F91\u6210\u529F");
|
|
setEditVisibility(false);
|
|
getList();
|
|
}
|
|
case 8:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
})),
|
|
okText: "\u4FDD\u5B58",
|
|
onCancel: function onCancel() {
|
|
setEditVisibility(false);
|
|
},
|
|
className: ProjectReviewmodules.user_model,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
form: form,
|
|
layout: "horizontal",
|
|
className: ProjectReviewmodules.zybzForm,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
align: "middle",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: "c-grey-333 font16 mr10",
|
|
style: {
|
|
width: 110,
|
|
textAlign: 'right'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: ProjectReviewmodules.must,
|
|
children: "*"
|
|
}), "\u4FDD\u969C\u65F6\u95F4"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ProjectReviewmodules.graaytitle,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "",
|
|
name: "times",
|
|
rules: [{
|
|
required: true,
|
|
message: '请选择开始时间和结束时间'
|
|
}],
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RangePicker, {
|
|
disabledDate: function disabledDate(current) {
|
|
return current && current < dayjs_min_default()().startOf('days');
|
|
},
|
|
disabled: (renderInfo === null || renderInfo === void 0 ? void 0 : renderInfo.passed_after_status) != '预约中',
|
|
className: "".concat(ProjectReviewmodules.dataPicker),
|
|
format: timeFormat,
|
|
showTime: {
|
|
format: 'HH:mm'
|
|
},
|
|
bordered: false,
|
|
allowClear: false,
|
|
onChange: function onChange(value) {
|
|
if (value && value[0] && value[1]) {
|
|
var start = value[0].isBefore(dayjs_min_default()()) ? dayjs_min_default()().add(2, 'hours') : value[0];
|
|
form.setFieldValue('times', [start, value[1]]);
|
|
if (!value[1].isAfter(start)) {
|
|
message/* default */.ZP.error('结束时间需要大于起始时间');
|
|
form.setFieldValue('times', [start, '']);
|
|
}
|
|
} else {
|
|
form.setFieldValue('times', value);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
align: "middle",
|
|
className: "mt30",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: "c-grey-333 font16 mr10",
|
|
style: {
|
|
width: 110,
|
|
textAlign: 'right'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: ProjectReviewmodules.must,
|
|
children: "*"
|
|
}), "\u4FDD\u969C\u4EBA\u6570"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "",
|
|
name: "people_number",
|
|
rules: [{
|
|
required: true,
|
|
message: '请输入保障人数'
|
|
}],
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
disabled: (renderInfo === null || renderInfo === void 0 ? void 0 : renderInfo.passed_after_status) != '预约中',
|
|
parser: integerParser,
|
|
style: {
|
|
width: 200
|
|
},
|
|
placeholder: "\u8BF7\u8F93\u5165\u4FDD\u969C\u4EBA\u6570",
|
|
min: 1
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
align: "middle",
|
|
className: "mt30",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-grey-333 font16 mr10",
|
|
style: {
|
|
width: 110,
|
|
textAlign: 'right'
|
|
},
|
|
children: "\u5EF6\u957F\u4FDD\u969C\u65F6\u95F4"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "",
|
|
name: "extend_times",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
parser: integerParser,
|
|
style: {
|
|
width: 200
|
|
},
|
|
placeholder: "\u8BF7\u8F93\u5165\u5EF6\u957F\u4FDD\u969C\u65F6\u95F4",
|
|
min: renderInfo === null || renderInfo === void 0 ? void 0 : renderInfo.extend_times
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "ml10 c-grey-999 font14",
|
|
children: "h"
|
|
})]
|
|
})]
|
|
})
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var ResourceGuarantee_Projectlist = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
var globalSetting = _ref3.globalSetting,
|
|
user = _ref3.user;
|
|
return {
|
|
globalSetting: globalSetting,
|
|
user: user
|
|
};
|
|
})(Projectlist));
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/ResourceGuarantee/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ResourceGuarantee = function ResourceGuarantee(_ref) {
|
|
var globalSetting = _ref.globalSetting,
|
|
dispatch = _ref.dispatch,
|
|
user = _ref.user;
|
|
var _useState = (0,_react_17_0_2_react.useState)(null),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
activeTab = _useState2[0],
|
|
setActiveTab = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(''),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
keyVal = _useState4[0],
|
|
setKeyVal = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
dataSource = _useState6[0],
|
|
setDataSource = _useState6[1];
|
|
var handleSearch = function handleSearch(value) {
|
|
setKeyVal(value);
|
|
};
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
console.log('user.userInfo.role', user.userInfo.role);
|
|
if (user.userInfo.role == 1) {
|
|
setDataSource([{
|
|
id: '1',
|
|
name: '优先保障项目审核'
|
|
}, {
|
|
id: '2',
|
|
name: '优先保障项目列表'
|
|
}]);
|
|
setActiveTab('1');
|
|
} else if (user.userInfo.role == 2) {
|
|
setDataSource([{
|
|
id: '2',
|
|
name: '优先保障项目列表'
|
|
}]);
|
|
setActiveTab('2');
|
|
}
|
|
}, [user.userInfo.role]);
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
className: ResourceGuaranteemodules.wrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTabs */.YG, {
|
|
value: activeTab,
|
|
onChange: function onChange(e) {
|
|
setActiveTab(e);
|
|
},
|
|
tabBarExtraContent: /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomInput */.t7, {
|
|
style: {
|
|
width: 303
|
|
},
|
|
placeholder: "\u641C\u7D22\u5B9E\u8DF5\u9879\u76EE/\u7533\u8BF7\u4EBA/\u5355\u4F4D",
|
|
value: keyVal,
|
|
onChange: handleSearch
|
|
}),
|
|
dataSource: dataSource
|
|
}), user.userInfo.role == 1 && activeTab == '1' && /*#__PURE__*/(0,jsx_runtime.jsx)(ResourceGuarantee_ProjectReview, {
|
|
keyVal: keyVal
|
|
}), [1, 2].includes(user.userInfo.role) && activeTab == '2' && /*#__PURE__*/(0,jsx_runtime.jsx)(ResourceGuarantee_Projectlist, {
|
|
keyVal: keyVal
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var Detail_ResourceGuarantee = ((0,_umi_production_exports.connect)(function (_ref2) {
|
|
var globalSetting = _ref2.globalSetting,
|
|
user = _ref2.user;
|
|
return {
|
|
globalSetting: globalSetting,
|
|
user: user
|
|
};
|
|
})(ResourceGuarantee));
|
|
|
|
/***/ })
|
|
|
|
}]); |