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.
1623 lines
74 KiB
1623 lines
74 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[253],{
|
|
|
|
/***/ 99399:
|
|
/*!*********************************************!*\
|
|
!*** ./src/components/SelectUser/index.tsx ***!
|
|
\*********************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js */ 37205);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_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_test1_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_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_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_test1_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_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! antd */ 78241);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! antd */ 95237);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! antd */ 57809);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! antd */ 10249);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! antd */ 88522);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! antd */ 3113);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! antd */ 24905);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! antd */ 6848);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! antd */ 8591);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! antd */ 1710);
|
|
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! umi */ 80184);
|
|
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! moment */ 61186);
|
|
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_7__);
|
|
/* harmony import */ var react_infinite_scroller__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react-infinite-scroller */ 26724);
|
|
/* harmony import */ var react_infinite_scroller__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react_infinite_scroller__WEBPACK_IMPORTED_MODULE_8__);
|
|
/* harmony import */ var _assets_images_icons_search_png__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/assets/images/icons/search.png */ 58143);
|
|
/* harmony import */ var _service_classrooms__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/service/classrooms */ 18356);
|
|
/* harmony import */ var _components_ui_customization__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @/components/ui-customization */ 7401);
|
|
/* harmony import */ var _components_ui_customization_reset_less_modules__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @/components/ui-customization/reset.less?modules */ 3878);
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var no_data = [];
|
|
function SearchForm(_ref) {
|
|
var onSearch = _ref.onSearch,
|
|
schools = _ref.schools;
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z, {
|
|
colon: false,
|
|
layout: "horizontal",
|
|
onFinish: onSearch,
|
|
initialValues: {
|
|
keyword: '',
|
|
school_name: '',
|
|
search_type: '1'
|
|
},
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z, {
|
|
style: {
|
|
flexWrap: 'nowrap'
|
|
},
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z.Item, {
|
|
name: "search_type",
|
|
label: "\u641C\u7D22\u7C7B\u578B",
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_16__["default"], {
|
|
popupClassName: _components_ui_customization_reset_less_modules__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z.selectdown,
|
|
style: {
|
|
width: 106
|
|
},
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_16__["default"].Option, {
|
|
value: "1",
|
|
children: "\u59D3\u540D"
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_16__["default"].Option, {
|
|
value: "2",
|
|
children: "\u624B\u673A\u53F7"
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_16__["default"].Option, {
|
|
value: "3",
|
|
children: "\u90AE\u7BB1"
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z.Item, {
|
|
style: {
|
|
marginLeft: 20
|
|
},
|
|
label: "\u641C\u7D22\u5185\u5BB9",
|
|
name: "keyword",
|
|
rules: [{
|
|
required: true,
|
|
message: '请输入搜索内容'
|
|
}],
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z, {
|
|
allowClear: true,
|
|
style: {
|
|
width: 300
|
|
},
|
|
size: "middle"
|
|
})
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z.Item, {
|
|
style: {
|
|
marginLeft: 20
|
|
},
|
|
label: "\u5355\u4F4D",
|
|
name: "school_name",
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .Z, {
|
|
options: schools,
|
|
style: {
|
|
width: 300
|
|
},
|
|
size: "middle",
|
|
showSearch: true,
|
|
filterOption: function filterOption(inputValue, option) {
|
|
return option.value.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1;
|
|
},
|
|
placeholder: "\u8BF7\u8F93\u5165\u5355\u4F4D\u540D\u79F0"
|
|
})
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .ZP, {
|
|
type: "primary",
|
|
style: {
|
|
background: '#F6F7F9 linear-gradient(180deg, #FFFFFF 0%, #F6F7F9 100%)',
|
|
boxShadow: '0px 2px 4px 0px #E0DFE1, inset 0px 1px 3px 0px rgba(255,255,255,0.5)',
|
|
borderRadius: 16,
|
|
color: '#165DFF',
|
|
marginLeft: 40,
|
|
border: '1px solid #BACFFE'
|
|
},
|
|
htmlType: "submit",
|
|
children: "\u641C\u7D22"
|
|
})]
|
|
})
|
|
});
|
|
}
|
|
var Types = /*#__PURE__*/function (Types) {
|
|
Types[Types["INITDATA"] = 0] = "INITDATA";
|
|
Types[Types["INITSCHOOLS"] = 1] = "INITSCHOOLS";
|
|
Types[Types["SHOWLOADING"] = 2] = "SHOWLOADING";
|
|
Types[Types["SELECTEDIDS"] = 3] = "SELECTEDIDS";
|
|
Types[Types["SETQUERY"] = 4] = "SETQUERY";
|
|
Types[Types["SETPAGE"] = 5] = "SETPAGE";
|
|
return Types;
|
|
}(Types || {});
|
|
function reducer(state, action) {
|
|
switch (action.type) {
|
|
case Types.INITDATA:
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4___default()(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4___default()({}, state), action.payload);
|
|
case Types.SETQUERY:
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4___default()(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4___default()({}, state), action.payload);
|
|
case Types.SETPAGE:
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4___default()(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4___default()({}, state), {}, {
|
|
page: action.payload,
|
|
reload: false
|
|
});
|
|
case Types.SHOWLOADING:
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4___default()(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4___default()({}, state), {}, {
|
|
loading: action.payload
|
|
});
|
|
case Types.INITSCHOOLS:
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4___default()(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4___default()({}, state), {}, {
|
|
schools: action.payload
|
|
});
|
|
case Types.SELECTEDIDS:
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4___default()(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4___default()({}, state), {}, {
|
|
selectedIds: action.payload
|
|
});
|
|
default:
|
|
throw new Error();
|
|
}
|
|
}
|
|
var initialState = {
|
|
data: [],
|
|
schools: [],
|
|
loading: false,
|
|
selectedIds: [],
|
|
query: null,
|
|
page: 1,
|
|
count: 0,
|
|
reload: false
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = (function (_ref2) {
|
|
var onSelect = _ref2.onSelect,
|
|
onCancel = _ref2.onCancel,
|
|
container_id = _ref2.container_id,
|
|
container_type = _ref2.container_type;
|
|
var _useReducer = (0,react__WEBPACK_IMPORTED_MODULE_5__.useReducer)(reducer, initialState),
|
|
_useReducer2 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useReducer, 2),
|
|
state = _useReducer2[0],
|
|
dispatch = _useReducer2[1];
|
|
var data = state.data,
|
|
schools = state.schools,
|
|
loading = state.loading,
|
|
selectedIds = state.selectedIds,
|
|
page = state.page,
|
|
count = state.count,
|
|
query = state.query,
|
|
reload = state.reload;
|
|
(0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {
|
|
function init() {
|
|
return _init.apply(this, arguments);
|
|
}
|
|
function _init() {
|
|
_init = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee() {
|
|
var _yield$searchSchoolTe, users, user_count;
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.next = 2;
|
|
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_10__/* .searchSchoolTeacherList */ .nQ)(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4___default()(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_4___default()({}, query), {}, {
|
|
page: page,
|
|
container_type: container_type,
|
|
container_id: container_id
|
|
}));
|
|
case 2:
|
|
_yield$searchSchoolTe = _context.sent;
|
|
users = _yield$searchSchoolTe.users;
|
|
user_count = _yield$searchSchoolTe.user_count;
|
|
dispatch({
|
|
type: Types.INITDATA,
|
|
payload: {
|
|
data: reload ? users : [].concat(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1___default()(data), _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1___default()(users)),
|
|
count: user_count
|
|
}
|
|
});
|
|
case 6:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return _init.apply(this, arguments);
|
|
}
|
|
if (query) {
|
|
init();
|
|
}
|
|
}, [page, query, reload, container_id, container_type]);
|
|
(0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {
|
|
function initSchools() {
|
|
return _initSchools.apply(this, arguments);
|
|
}
|
|
function _initSchools() {
|
|
_initSchools = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee2() {
|
|
var _yield$getSchoolList, school_names;
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
_context2.next = 2;
|
|
return (0,_service_classrooms__WEBPACK_IMPORTED_MODULE_10__/* .getSchoolList */ .K$)({});
|
|
case 2:
|
|
_yield$getSchoolList = _context2.sent;
|
|
school_names = _yield$getSchoolList.school_names;
|
|
dispatch({
|
|
type: Types.INITSCHOOLS,
|
|
payload: school_names.map(function (item) {
|
|
return {
|
|
value: item
|
|
};
|
|
})
|
|
});
|
|
case 5:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return _initSchools.apply(this, arguments);
|
|
}
|
|
initSchools();
|
|
}, []);
|
|
var columns = [{
|
|
title: "",
|
|
dataIndex: "added",
|
|
width: 40,
|
|
ellipsis: true,
|
|
render: function render(add, record) {
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_20__/* ["default"] */ .Z, {
|
|
value: record.numid,
|
|
checked: selectedIds.includes(record.numid),
|
|
disabled: !!add
|
|
});
|
|
}
|
|
}, {
|
|
title: "姓名",
|
|
width: 100,
|
|
ellipsis: true,
|
|
align: 'left',
|
|
dataIndex: "username",
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("div", {
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .Z, {
|
|
placement: "bottom",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(umi__WEBPACK_IMPORTED_MODULE_6__.Link, {
|
|
style: {
|
|
color: '#000000'
|
|
},
|
|
className: "bold c-black",
|
|
to: "/users/".concat(record.login),
|
|
target: "_blank",
|
|
children: text || '--'
|
|
})
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: "手机",
|
|
width: 100,
|
|
dataIndex: "phone",
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .Z, {
|
|
placement: "bottom",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("span", {
|
|
style: {
|
|
color: '#000000'
|
|
},
|
|
children: text || '--'
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: "邮箱",
|
|
dataIndex: "email",
|
|
width: 100,
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .Z, {
|
|
placement: "bottom",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("span", {
|
|
style: {
|
|
color: '#000000'
|
|
},
|
|
children: text || '--'
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: "学号/工号",
|
|
width: 100,
|
|
dataIndex: "student_number",
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .Z, {
|
|
placement: "bottom",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("span", {
|
|
style: {
|
|
color: '#000000'
|
|
},
|
|
children: text || '--'
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: "学校/单位",
|
|
width: 150,
|
|
dataIndex: "school_name",
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .Z, {
|
|
placement: "bottom",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("span", {
|
|
style: {
|
|
color: '#000000'
|
|
},
|
|
children: text || '--'
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: "院系/部门",
|
|
dataIndex: "depart_name",
|
|
width: 130,
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .Z, {
|
|
placement: "bottom",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("span", {
|
|
style: {
|
|
color: '#000000'
|
|
},
|
|
children: text || '--'
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: "实名认证",
|
|
dataIndex: "auth",
|
|
width: 100,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("span", {
|
|
style: {
|
|
color: '#000000'
|
|
},
|
|
children: text ? '是' : "否"
|
|
});
|
|
}
|
|
}, {
|
|
title: "最后登录时间",
|
|
dataIndex: "last_login_on",
|
|
width: 140,
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_21__/* ["default"] */ .Z, {
|
|
placement: "bottom",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("span", {
|
|
style: {
|
|
color: '#000000'
|
|
},
|
|
children: moment__WEBPACK_IMPORTED_MODULE_7___default()(text).format("YYYY-MM-DD HH:mm")
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: "状态",
|
|
dataIndex: "added",
|
|
width: 80,
|
|
render: function render(text) {
|
|
if (text === 1) {
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("span", {
|
|
style: {
|
|
color: '#000000'
|
|
},
|
|
children: "\u5DF2\u6DFB\u52A0"
|
|
});
|
|
}
|
|
}
|
|
}];
|
|
function onSearch(values) {
|
|
dispatch({
|
|
type: Types.SETQUERY,
|
|
payload: {
|
|
page: 1,
|
|
reload: true,
|
|
query: values
|
|
}
|
|
});
|
|
}
|
|
function onLoadMore(nextPage) {
|
|
dispatch({
|
|
type: Types.SETPAGE,
|
|
payload: nextPage
|
|
});
|
|
}
|
|
function onTriggerUser(id) {
|
|
var index = selectedIds.indexOf(id);
|
|
if (index >= 0) {
|
|
selectedIds.splice(index, 1);
|
|
} else {
|
|
selectedIds.push(id);
|
|
}
|
|
dispatch({
|
|
type: Types.SELECTEDIDS,
|
|
payload: _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_1___default()(selectedIds)
|
|
});
|
|
}
|
|
function onOk() {
|
|
if (selectedIds.length === 0) {
|
|
antd__WEBPACK_IMPORTED_MODULE_22__/* ["default"] */ .ZP.warning('请先在下面列表中选择要添加成员');
|
|
} else {
|
|
onSelect(selectedIds, container_id);
|
|
//*添加成功后,清空选项
|
|
dispatch({
|
|
type: Types.INITDATA,
|
|
payload: {
|
|
data: [],
|
|
count: 0,
|
|
page: 1,
|
|
selectedIds: [],
|
|
query: null,
|
|
reload: false
|
|
}
|
|
});
|
|
}
|
|
}
|
|
var hasMore = count > page * 10;
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("div", {
|
|
className: "select-user-container",
|
|
style: {
|
|
paddingBottom: 20
|
|
},
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(SearchForm, {
|
|
onSearch: onSearch,
|
|
schools: schools
|
|
}), !query ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("div", {
|
|
className: "tc font16 c-light-black mt40 pb30",
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("img", {
|
|
src: _assets_images_icons_search_png__WEBPACK_IMPORTED_MODULE_9__,
|
|
width: "100",
|
|
alt: ""
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("br", {}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("p", {
|
|
className: "mt20",
|
|
children: "\u8BF7\u641C\u7D22\u8981\u6DFB\u52A0\u7684\u4EBA\u5458"
|
|
})]
|
|
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.Fragment, {
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("div", {
|
|
className: "flexd-table-header mt20",
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_components_ui_customization__WEBPACK_IMPORTED_MODULE_11__/* .CustomTable */ .Gi, {
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_23__/* ["default"] */ .Z, {
|
|
pagination: false,
|
|
dataSource: no_data,
|
|
columns: columns
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)("div", {
|
|
style: {
|
|
maxHeight: 260,
|
|
overflow: 'auto',
|
|
marginBottom: 20
|
|
},
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)((react_infinite_scroller__WEBPACK_IMPORTED_MODULE_8___default()), {
|
|
initialLoad: false,
|
|
pageStart: 1,
|
|
threshold: 20,
|
|
loadMore: onLoadMore,
|
|
hasMore: hasMore,
|
|
useWindow: false,
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(_components_ui_customization__WEBPACK_IMPORTED_MODULE_11__/* .CustomTable */ .Gi, {
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_23__/* ["default"] */ .Z, {
|
|
loading: loading,
|
|
showHeader: false,
|
|
pagination: false,
|
|
dataSource: data,
|
|
columns: columns,
|
|
onRow: function onRow(record) {
|
|
return {
|
|
onClick: function onClick(_) {
|
|
if (record.added !== 1) {
|
|
onTriggerUser(record.numid);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
})
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsxs)("div", {
|
|
className: "flex-container flex-end",
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .ZP, {
|
|
type: "ghost",
|
|
style: {
|
|
marginRight: 10,
|
|
border: '1px solid #C3CFE0',
|
|
color: '#464F66'
|
|
},
|
|
onClick: onCancel,
|
|
children: "\u53D6\u6D88"
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__.jsx)(antd__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .ZP, {
|
|
style: {
|
|
background: '#F6F7F9 linear-gradient(180deg, #FFFFFF 0%, #F6F7F9 100%)',
|
|
boxShadow: '0px 2px 4px 0px #E0DFE1, inset 0px 1px 3px 0px rgba(255,255,255,0.5)',
|
|
borderRadius: 2,
|
|
color: '#165DFF',
|
|
border: '1px solid #BACFFE'
|
|
},
|
|
type: "primary",
|
|
onClick: onOk,
|
|
children: "\u786E\u5B9A"
|
|
})]
|
|
})]
|
|
})]
|
|
});
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ 74815:
|
|
/*!**********************************************************************!*\
|
|
!*** ./src/pages/Innovation/Detail/components/DataSetPane/index.tsx ***!
|
|
\**********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd */ 6848);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd */ 8591);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 3113);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd */ 1710);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var _service_innovation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/service/innovation */ 9735);
|
|
/* harmony import */ var react_copy_to_clipboard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-copy-to-clipboard */ 56102);
|
|
/* harmony import */ var react_copy_to_clipboard__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_copy_to_clipboard__WEBPACK_IMPORTED_MODULE_3__);
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var columns = [{
|
|
title: '文件名',
|
|
dataIndex: 'filename',
|
|
width: '19%',
|
|
ellipsis: true
|
|
}, {
|
|
title: '备注',
|
|
dataIndex: 'description',
|
|
width: '19%',
|
|
ellipsis: true
|
|
}, {
|
|
title: '创建时间',
|
|
dataIndex: 'created_on',
|
|
width: '19%',
|
|
ellipsis: true
|
|
}, {
|
|
title: '文件路径',
|
|
dataIndex: 'path',
|
|
width: '19%',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", {
|
|
style: {
|
|
display: 'flex'
|
|
},
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(antd__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
|
|
title: text,
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("span", {
|
|
style: {
|
|
width: '80%',
|
|
display: 'inline-block',
|
|
whiteSpace: 'nowrap',
|
|
overflow: 'hidden',
|
|
textOverflow: 'ellipsis'
|
|
},
|
|
children: text
|
|
})
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(react_copy_to_clipboard__WEBPACK_IMPORTED_MODULE_3__.CopyToClipboard, {
|
|
text: text,
|
|
onCopy: function onCopy() {
|
|
return antd__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP.success('复制成功');
|
|
},
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("i", {
|
|
className: "iconfont icon-fuzhi2 current ml5 mr40",
|
|
style: {
|
|
color: '#165DFF',
|
|
marginLeft: 30
|
|
}
|
|
})
|
|
})]
|
|
});
|
|
}
|
|
}, {
|
|
title: '最后修改人',
|
|
dataIndex: 'author',
|
|
width: '14%',
|
|
ellipsis: true
|
|
}, {
|
|
title: '大小',
|
|
dataIndex: 'filesize',
|
|
// align: 'right',
|
|
width: '10%',
|
|
ellipsis: true
|
|
}];
|
|
var DataSetPane = function DataSetPane(_ref) {
|
|
var detail = _ref.detail;
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(detail),
|
|
_useState2 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),
|
|
dataSource = _useState2[0],
|
|
setDataSource = _useState2[1];
|
|
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(1),
|
|
_useState4 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_0___default()(_useState3, 2),
|
|
currentPage = _useState4[0],
|
|
setCurrentPage = _useState4[1];
|
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
if (detail) {
|
|
setDataSource(detail);
|
|
}
|
|
}, [detail]);
|
|
var pagination = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
|
return {
|
|
position: ['bottomCenter'],
|
|
pageSize: 10,
|
|
showSizeChanger: false,
|
|
current: currentPage,
|
|
showQuickJumper: {
|
|
goButton: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP, {
|
|
children: "GO"
|
|
})
|
|
},
|
|
total: dataSource === null || dataSource === void 0 ? void 0 : dataSource.data_sets_count,
|
|
onChange: function onChange(page) {
|
|
setCurrentPage(page);
|
|
(0,_service_innovation__WEBPACK_IMPORTED_MODULE_2__/* .getProjectDataSet */ .pV)("".concat(detail === null || detail === void 0 ? void 0 : detail.id), {
|
|
limit: 10,
|
|
page: page
|
|
}).then(function (res) {
|
|
setDataSource(res);
|
|
});
|
|
}
|
|
};
|
|
}, [currentPage, dataSource]);
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(antd__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, {
|
|
columns: columns,
|
|
dataSource: dataSource === null || dataSource === void 0 ? void 0 : dataSource.data_sets,
|
|
rowKey: "attachment_id",
|
|
pagination: pagination
|
|
});
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = (/*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.memo)(DataSetPane));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 44404:
|
|
/*!**********************************************************************!*\
|
|
!*** ./src/pages/Innovation/Tasks/Collaborate/index.tsx + 4 modules ***!
|
|
\**********************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ Collaborate; }
|
|
});
|
|
|
|
// 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/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/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
|
|
var _umi_production_exports = __webpack_require__(80184);
|
|
// 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: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
var es_button = __webpack_require__(3113);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
|
|
var skeleton = __webpack_require__(61621);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
var pagination = __webpack_require__(58421);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(67390);
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
var authority = __webpack_require__(13277);
|
|
// 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/radio/index.js + 5 modules
|
|
var es_radio = __webpack_require__(5112);
|
|
;// CONCATENATED MODULE: ./src/pages/Innovation/Tasks/Collaborate/components/ChangeManagerModal/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var ChangeManagerModalmodules = ({"title":"title___rpaor","content":"content___Hb0l5","add":"add___THwHB","colorBlue":"colorBlue___yc4F8","radio":"radio___hn9Vt"});
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Innovation/Tasks/Collaborate/components/ChangeManagerModal/index.tsx
|
|
|
|
|
|
|
|
|
|
var _excluded = ["shixunsDetail", "globalSetting", "loading", "dispatch", "onReloadData"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ChangeManagerModal = function ChangeManagerModal(_ref) {
|
|
var shixunsDetail = _ref.shixunsDetail,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
onReloadData = _ref.onReloadData,
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
var _useState = (0,_react_17_0_2_react.useState)(),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
radioValue = _useState2[0],
|
|
setRadioValue = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
managerList = _useState4[0],
|
|
setManagerList = _useState4[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
if (shixunsDetail.actionTabs.key === 'Collaborators-ChangeManager') {
|
|
handleGetChangeManager();
|
|
}
|
|
}, [shixunsDetail.actionTabs.key]);
|
|
var handleGetChangeManager = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var _shixunsDetail$action;
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.next = 2;
|
|
return dispatch({
|
|
type: 'shixunsDetail/getChangeManager',
|
|
payload: {
|
|
id: (_shixunsDetail$action = shixunsDetail.actionTabs.params) === null || _shixunsDetail$action === void 0 ? void 0 : _shixunsDetail$action.id
|
|
}
|
|
});
|
|
case 2:
|
|
res = _context.sent;
|
|
setManagerList(res || []);
|
|
case 4:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function handleGetChangeManager() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var handleAddCollaborator = function handleAddCollaborator() {
|
|
var _shixunsDetail$action2;
|
|
dispatch({
|
|
type: 'shixunsDetail/setActionTabs',
|
|
payload: {
|
|
key: 'Collaborators-AddCollaborator',
|
|
params: {
|
|
id: (_shixunsDetail$action2 = shixunsDetail.actionTabs.params) === null || _shixunsDetail$action2 === void 0 ? void 0 : _shixunsDetail$action2.id
|
|
}
|
|
}
|
|
});
|
|
};
|
|
var handleOk = /*#__PURE__*/function () {
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
var _shixunsDetail$action3;
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
if (radioValue) {
|
|
_context2.next = 3;
|
|
break;
|
|
}
|
|
message/* default */.ZP.info('所选人员为空,没有更换成功');
|
|
return _context2.abrupt("return");
|
|
case 3:
|
|
_context2.next = 5;
|
|
return dispatch({
|
|
type: 'shixunsDetail/changeManager',
|
|
payload: {
|
|
id: (_shixunsDetail$action3 = shixunsDetail.actionTabs.params) === null || _shixunsDetail$action3 === void 0 ? void 0 : _shixunsDetail$action3.id,
|
|
user_id: radioValue
|
|
}
|
|
});
|
|
case 5:
|
|
res = _context2.sent;
|
|
handleCancel();
|
|
if (res) {
|
|
onReloadData();
|
|
message/* default */.ZP.info(res.message);
|
|
}
|
|
case 8:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return function handleOk() {
|
|
return _ref3.apply(this, arguments);
|
|
};
|
|
}();
|
|
var handleCancel = function handleCancel() {
|
|
dispatch({
|
|
type: 'shixunsDetail/setActionTabs',
|
|
payload: {}
|
|
});
|
|
setRadioValue(null);
|
|
};
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
centered: true,
|
|
keyboard: false,
|
|
closable: false,
|
|
title: "\u66F4\u6362\u7BA1\u7406\u5458",
|
|
open: shixunsDetail.actionTabs.key === 'Collaborators-ChangeManager',
|
|
confirmLoading: loading.effects['shixunsDetail/changeManager'],
|
|
onOk: handleOk,
|
|
onCancel: handleCancel,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: ChangeManagerModalmodules.title,
|
|
children: ["\u9009\u62E9\u7684\u6210\u5458\u5C06\u4F1A\u6210\u4E3A\u65B0\u7684\u7BA1\u7406\u5458", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u60A8\u5C06\u4E0D\u518D\u62E5\u6709\u7BA1\u7406\u5458\u7684\u6743\u9650\uFF0C\u4F46\u60A8\u4ECD\u662F\u5408\u4F5C\u56E2\u961F\u7684\u4E00\u5458"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ChangeManagerModalmodules.content,
|
|
children: managerList.length ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Group */.ZP.Group, {
|
|
value: radioValue,
|
|
onChange: function onChange(e) {
|
|
return setRadioValue(e.target.value);
|
|
},
|
|
children: managerList.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
className: ChangeManagerModalmodules.radio,
|
|
value: item.user_id,
|
|
children: item.name
|
|
}, index);
|
|
})
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: ChangeManagerModalmodules.add,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
children: ["\u8BF7\u5148\u5C06\u65B0\u7684\u7BA1\u7406\u5458\u901A\u8FC7", /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
className: ChangeManagerModalmodules.colorBlue,
|
|
onClick: handleAddCollaborator,
|
|
children: "\"\u6DFB\u52A0\u5408\u4F5C\u8005\""
|
|
}), "\u52A0\u5165\u5408\u4F5C\u8005\u5217\u8868"]
|
|
})
|
|
})
|
|
})]
|
|
})
|
|
});
|
|
};
|
|
/* harmony default export */ var components_ChangeManagerModal = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
var shixunsDetail = _ref4.shixunsDetail,
|
|
loading = _ref4.loading,
|
|
globalSetting = _ref4.globalSetting;
|
|
return {
|
|
shixunsDetail: shixunsDetail,
|
|
globalSetting: globalSetting,
|
|
loading: loading
|
|
};
|
|
})(ChangeManagerModal));
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tabs/index.js + 24 modules
|
|
var tabs = __webpack_require__(99313);
|
|
// EXTERNAL MODULE: ./src/components/SelectUser/index.tsx
|
|
var SelectUser = __webpack_require__(99399);
|
|
;// CONCATENATED MODULE: ./src/pages/Innovation/Tasks/Collaborate/components/AddCollaborator/index.tsx
|
|
|
|
|
|
|
|
|
|
var TabPane = tabs/* default */.Z.TabPane;
|
|
/* harmony default export */ var AddCollaborator = (function (_ref) {
|
|
var visible = _ref.visible,
|
|
onCancel = _ref.onCancel,
|
|
onSelectGroup = _ref.onSelectGroup,
|
|
shixunId = _ref.shixunId,
|
|
onSelectCollaborator = _ref.onSelectCollaborator;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
title: "\u6DFB\u52A0\u5408\u4F5C\u8005",
|
|
open: visible,
|
|
width: 1100,
|
|
centered: true,
|
|
keyboard: false,
|
|
onCancel: onCancel,
|
|
maskClosable: false,
|
|
destroyOnClose: true,
|
|
forceRender: true,
|
|
bodyStyle: {
|
|
minHeight: 400,
|
|
padding: '0 20px 20px 20px'
|
|
},
|
|
footer: null,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z, {
|
|
defaultActiveKey: "1",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TabPane, {
|
|
tab: "\u641C\u7D22\u6DFB\u52A0",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(SelectUser/* default */.Z, {
|
|
type: 1,
|
|
onCancel: onCancel,
|
|
container_type: 2,
|
|
container_id: shixunId,
|
|
onSelect: onSelectCollaborator
|
|
})
|
|
}, "1")
|
|
})
|
|
});
|
|
});
|
|
;// CONCATENATED MODULE: ./src/pages/Innovation/Tasks/Collaborate/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Collaboratemodules = ({"bg":"bg___Onnmh","wrap":"wrap___VTtdp","modal":"modal___MArZa","content":"content___a69LK","head":"head____zVzr","headCount":"headCount___GhK7o","button":"button___DoAh3","itemWrap":"itemWrap___UR35k","imgWrap":"imgWrap___DpS0R","img":"img___N9se3","manager":"manager___m4Mzg","itemContent":"itemContent___Ut7hr","nameWrap":"nameWrap___y73uS","name":"name___hJUHg","actionGroup":"actionGroup___QEytf","deleteIcon":"deleteIcon___XGFcN","schoolWrap":"schoolWrap___qsoOp","school":"school___yh8l2","countWrap":"countWrap___MQKPn","deletetitle":"deletetitle___nAICN","yseTitle":"yseTitle___t5fzp"});
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/PlusOutlined.js + 1 modules
|
|
var PlusOutlined = __webpack_require__(62772);
|
|
// EXTERNAL MODULE: ./src/components/Header/index.tsx + 5 modules
|
|
var Header = __webpack_require__(38096);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(35325);
|
|
;// CONCATENATED MODULE: ./src/pages/Innovation/Tasks/Collaborate/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Collaborators = function Collaborators(_ref) {
|
|
var shixunsDetail = _ref.shixunsDetail,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
user = _ref.user,
|
|
dispatch = _ref.dispatch,
|
|
position = _ref.position;
|
|
var shixunId = (0,_react_17_0_2_react.useRef)();
|
|
var _useState = (0,_react_17_0_2_react.useState)(0),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
count = _useState2[0],
|
|
setCount = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
collaboratorList = _useState4[0],
|
|
setCollaboratorList = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)({
|
|
id: null,
|
|
page: 1
|
|
}),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
params = _useState6[0],
|
|
setParams = _useState6[1];
|
|
var param = (0,_umi_production_exports.useParams)();
|
|
var _useState7 = (0,_react_17_0_2_react.useState)({}),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
items = _useState8[0],
|
|
setitems = _useState8[1];
|
|
|
|
// const editable = user.userInfo?.shixun?.editable;
|
|
// const isAdminOrCreator =
|
|
// user.userInfo?.role <= 2 || user.userInfo?.shixun?.is_creator;
|
|
|
|
//添加合作者权限
|
|
var addAuth = (0,_react_17_0_2_react.useMemo)(function () {
|
|
return (0,authority/* isSuperAdmins */.Ny)() || (items === null || items === void 0 ? void 0 : items.current_user_is_creator) || (items === null || items === void 0 ? void 0 : items.current_user_is_partner);
|
|
}, [authority/* isSuperAdmins */.Ny, items]);
|
|
//删除合作者权限
|
|
var deleteAuth = (0,_react_17_0_2_react.useMemo)(function () {
|
|
return (0,authority/* isSuperAdmins */.Ny)() || (items === null || items === void 0 ? void 0 : items.current_user_is_creator);
|
|
}, [authority/* isSuperAdmins */.Ny, items]);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
shixunId.current = param === null || param === void 0 ? void 0 : param.taskId;
|
|
params.id = param === null || param === void 0 ? void 0 : param.taskId;
|
|
setParams(params);
|
|
getCollaboratorsData(params);
|
|
}, []);
|
|
var getCollaboratorsData = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(query) {
|
|
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/sci/projects/".concat(param === null || param === void 0 ? void 0 : param.taskId, "/get_project_partners.json"), {
|
|
method: 'get'
|
|
});
|
|
case 2:
|
|
res = _context.sent;
|
|
if (res) {
|
|
setCollaboratorList(res.users || []);
|
|
setCount(res.users_count);
|
|
setitems(res);
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function getCollaboratorsData(_x) {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var handleReloadData = /*#__PURE__*/function () {
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
var courseParams;
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
params.page = 1;
|
|
setParams(params);
|
|
courseParams = (0,Header/* getCourseParam */.g)();
|
|
_context2.next = 5;
|
|
return dispatch({
|
|
type: 'user/getUserInfo',
|
|
payload: courseParams
|
|
});
|
|
case 5:
|
|
_context2.next = 7;
|
|
return getCollaboratorsData(params);
|
|
case 7:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return function handleReloadData() {
|
|
return _ref3.apply(this, arguments);
|
|
};
|
|
}();
|
|
var handleChangePage = function handleChangePage(page) {
|
|
params.page = page;
|
|
setParams(params);
|
|
getCollaboratorsData(params);
|
|
};
|
|
var handleDelete = function handleDelete(userId) {
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
title: '提示',
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collaboratemodules.modal,
|
|
children: "\u786E\u5B9A\u8981\u5220\u9664\u5417\uFF1F"
|
|
}),
|
|
onOk: function () {
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
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/sci/projects/".concat(param === null || param === void 0 ? void 0 : param.taskId, "/del_project_partner.json"), {
|
|
method: 'DELETE',
|
|
body: {
|
|
user_id: userId
|
|
}
|
|
});
|
|
case 2:
|
|
res = _context3.sent;
|
|
message/* default */.ZP.info('删除成功');
|
|
params.page = 1;
|
|
setParams(params);
|
|
getCollaboratorsData(params);
|
|
case 7:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
function onOk() {
|
|
return _onOk.apply(this, arguments);
|
|
}
|
|
return onOk;
|
|
}()
|
|
});
|
|
};
|
|
var handleAddCollaborator = function handleAddCollaborator() {
|
|
dispatch({
|
|
type: 'shixunsDetail/setActionTabs',
|
|
payload: {
|
|
key: 'Collaborators-AddCollaborator',
|
|
params: {
|
|
id: shixunId.current
|
|
}
|
|
}
|
|
});
|
|
};
|
|
function onCancel() {
|
|
dispatch({
|
|
type: 'shixunsDetail/setActionTabs',
|
|
payload: {}
|
|
});
|
|
}
|
|
var AddCollaboratorOption = {
|
|
visible: shixunsDetail.actionTabs.key === 'Collaborators-AddCollaborator',
|
|
onCancel: onCancel,
|
|
shixunId: shixunId.current,
|
|
onSelectCollaborator: function () {
|
|
var _onSelectCollaborator = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(user_ids) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
onCancel();
|
|
_context4.next = 3;
|
|
return (0,fetch/* default */.ZP)("/api/sci/projects/".concat(shixunId.current, "/bacht_add_project_partners.json"), {
|
|
method: 'POST',
|
|
body: {
|
|
user_ids: user_ids
|
|
}
|
|
});
|
|
case 3:
|
|
res = _context4.sent;
|
|
if (res) {
|
|
message/* default */.ZP.success('添加成功');
|
|
handleReloadData();
|
|
}
|
|
case 5:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
}));
|
|
function onSelectCollaborator(_x2) {
|
|
return _onSelectCollaborator.apply(this, arguments);
|
|
}
|
|
return onSelectCollaborator;
|
|
}(),
|
|
onSelectGroup: function () {
|
|
var _onSelectGroup = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(group_id) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
onCancel();
|
|
_context5.next = 3;
|
|
return dispatch({
|
|
type: 'shixunsDetail/addTeachGroupMember',
|
|
payload: {
|
|
identifier: shixunId.current,
|
|
group_id: group_id.group_id
|
|
}
|
|
});
|
|
case 3:
|
|
res = _context5.sent;
|
|
if (res) {
|
|
message/* default */.ZP.success('添加成功');
|
|
handleReloadData();
|
|
}
|
|
case 5:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _callee5);
|
|
}));
|
|
function onSelectGroup(_x3) {
|
|
return _onSelectGroup.apply(this, arguments);
|
|
}
|
|
return onSelectGroup;
|
|
}()
|
|
};
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Collaboratemodules.wrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Collaboratemodules.content,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Collaboratemodules.head,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: Collaboratemodules.headCount,
|
|
children: ["\u5408\u4F5C\u8005\uFF08", count, "\u4EBA\uFF09"]
|
|
}), addAuth && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
className: Collaboratemodules.button,
|
|
style: {
|
|
marginRight: position === 'detail' ? 0 : '20px'
|
|
},
|
|
onClick: handleAddCollaborator,
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(PlusOutlined/* default */.Z, {}),
|
|
children: "\u6DFB\u52A0\u5408\u4F5C\u8005"
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collaboratemodules.list,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton/* default */.Z, {
|
|
loading: false,
|
|
active: true,
|
|
avatar: {
|
|
size: 40
|
|
},
|
|
paragraph: {
|
|
rows: 3
|
|
},
|
|
className: "mt30",
|
|
children: collaboratorList.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
display: 'inline-block',
|
|
width: '50%'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Collaboratemodules.itemWrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
target: "_blank",
|
|
className: Collaboratemodules.imgWrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
alt: "\u7528\u6237\u5934\u50CF",
|
|
height: "48",
|
|
width: "48",
|
|
className: Collaboratemodules.img,
|
|
src: "".concat(env/* default */.Z.IMG_SERVER, "/images/").concat(item === null || item === void 0 ? void 0 : item.image_url)
|
|
}), (item === null || item === void 0 ? void 0 : item.is_creator) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collaboratemodules.manager,
|
|
children: "\u521B\u5EFA\u8005"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Collaboratemodules.itemContent,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Collaboratemodules.nameWrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
target: "_blank",
|
|
className: Collaboratemodules.name,
|
|
children: item === null || item === void 0 ? void 0 : item.user_name
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collaboratemodules.actionGroup,
|
|
children: !(item !== null && item !== void 0 && item.is_creator) && deleteAuth ? /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
className: Collaboratemodules.deletetitle,
|
|
onClick: function onClick() {
|
|
return handleDelete(item.id);
|
|
},
|
|
children: "\u5220\u9664"
|
|
}) : null
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
className: Collaboratemodules.schoolWrap,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: Collaboratemodules.school,
|
|
children: item === null || item === void 0 ? void 0 : item.school_name
|
|
})
|
|
})]
|
|
})]
|
|
})
|
|
}, index);
|
|
})
|
|
})
|
|
})]
|
|
}), count > 10 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Collaboratemodules.countWrap,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
showQuickJumper: false,
|
|
showSizeChanger: false,
|
|
total: count,
|
|
onChange: function onChange(page) {
|
|
return handleChangePage(page);
|
|
},
|
|
pageSize: 10,
|
|
current: params.page
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(components_ChangeManagerModal, {
|
|
onReloadData: handleReloadData
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AddCollaborator, objectSpread2_default()({}, AddCollaboratorOption))]
|
|
});
|
|
};
|
|
/* harmony default export */ var Collaborate = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
var shixunsDetail = _ref4.shixunsDetail,
|
|
loading = _ref4.loading,
|
|
globalSetting = _ref4.globalSetting,
|
|
user = _ref4.user;
|
|
return {
|
|
shixunsDetail: shixunsDetail,
|
|
globalSetting: globalSetting,
|
|
user: user,
|
|
loading: loading
|
|
};
|
|
})(Collaborators));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 9735:
|
|
/*!***********************************!*\
|
|
!*** ./src/service/innovation.ts ***!
|
|
\***********************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ $L: function() { return /* binding */ createProject; },
|
|
/* harmony export */ M3: function() { return /* binding */ forkProject; },
|
|
/* harmony export */ NV: function() { return /* binding */ editProject; },
|
|
/* harmony export */ T: function() { return /* binding */ getProjectDetail; },
|
|
/* harmony export */ V1: function() { return /* binding */ getMirrorRepos; },
|
|
/* harmony export */ ie: function() { return /* binding */ startEnvironment; },
|
|
/* harmony export */ ln: function() { return /* binding */ getDataSetList; },
|
|
/* harmony export */ pV: function() { return /* binding */ getProjectDataSet; },
|
|
/* harmony export */ th: function() { return /* binding */ deleteProject; }
|
|
/* harmony export */ });
|
|
/* unused harmony exports getProjectList, removeDataSets */
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/fetch */ 35325);
|
|
|
|
|
|
|
|
//创建项目与编辑项目
|
|
|
|
function createProject(_x) {
|
|
return _createProject.apply(this, arguments);
|
|
}
|
|
function _createProject() {
|
|
_createProject = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
return _context.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP)('/api/sci/projects.json', {
|
|
method: 'post',
|
|
body: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return _createProject.apply(this, arguments);
|
|
}
|
|
function editProject(_x2, _x3) {
|
|
return _editProject.apply(this, arguments);
|
|
}
|
|
function _editProject() {
|
|
_editProject = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee2(params, id) {
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
return _context2.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP)("/api/sci/projects/".concat(id, ".json"), {
|
|
method: 'put',
|
|
body: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return _editProject.apply(this, arguments);
|
|
}
|
|
function getMirrorRepos(_x4) {
|
|
return _getMirrorRepos.apply(this, arguments);
|
|
}
|
|
|
|
//获取项目列表
|
|
function _getMirrorRepos() {
|
|
_getMirrorRepos = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee3(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
return _context3.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP)('/api/sci/projects/sci_mirror_repositories.json', {
|
|
method: 'get',
|
|
params: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
return _getMirrorRepos.apply(this, arguments);
|
|
}
|
|
function getProjectList(_x5) {
|
|
return _getProjectList.apply(this, arguments);
|
|
}
|
|
function _getProjectList() {
|
|
_getProjectList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
|
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
return _context4.abrupt("return", Fetch('/api/sci/projects.json', {
|
|
method: 'get',
|
|
params: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
}));
|
|
return _getProjectList.apply(this, arguments);
|
|
}
|
|
function deleteProject(_x6, _x7) {
|
|
return _deleteProject.apply(this, arguments);
|
|
}
|
|
function _deleteProject() {
|
|
_deleteProject = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee5(id, params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee5$(_context5) {
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
return _context5.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP)("/api/sci/projects/".concat(id, ".json"), {
|
|
method: 'delete',
|
|
body: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _callee5);
|
|
}));
|
|
return _deleteProject.apply(this, arguments);
|
|
}
|
|
function getProjectDetail(_x8) {
|
|
return _getProjectDetail.apply(this, arguments);
|
|
}
|
|
function _getProjectDetail() {
|
|
_getProjectDetail = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee6(id) {
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee6$(_context6) {
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
case 0:
|
|
return _context6.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP)("/api/sci/projects/".concat(id, ".json"), {
|
|
method: 'get'
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context6.stop();
|
|
}
|
|
}, _callee6);
|
|
}));
|
|
return _getProjectDetail.apply(this, arguments);
|
|
}
|
|
function getDataSetList(_x9) {
|
|
return _getDataSetList.apply(this, arguments);
|
|
}
|
|
function _getDataSetList() {
|
|
_getDataSetList = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee7(params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee7$(_context7) {
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
case 0:
|
|
return _context7.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP)('/api/sci/projects/data_sets.json', {
|
|
method: 'get',
|
|
params: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context7.stop();
|
|
}
|
|
}, _callee7);
|
|
}));
|
|
return _getDataSetList.apply(this, arguments);
|
|
}
|
|
function removeDataSets(_x10) {
|
|
return _removeDataSets.apply(this, arguments);
|
|
}
|
|
function _removeDataSets() {
|
|
_removeDataSets = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(id) {
|
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
case 0:
|
|
return _context8.abrupt("return", Fetch("/api/sci/projects/".concat(id, "/remove_data_sets.json"), {
|
|
method: 'get'
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context8.stop();
|
|
}
|
|
}, _callee8);
|
|
}));
|
|
return _removeDataSets.apply(this, arguments);
|
|
}
|
|
function startEnvironment(_x11) {
|
|
return _startEnvironment.apply(this, arguments);
|
|
}
|
|
function _startEnvironment() {
|
|
_startEnvironment = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee9(id) {
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee9$(_context9) {
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
case 0:
|
|
return _context9.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP)("/api/sci/projects/".concat(id, "/start_environment.json"), {
|
|
method: 'post'
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context9.stop();
|
|
}
|
|
}, _callee9);
|
|
}));
|
|
return _startEnvironment.apply(this, arguments);
|
|
}
|
|
function forkProject(_x12, _x13) {
|
|
return _forkProject.apply(this, arguments);
|
|
}
|
|
function _forkProject() {
|
|
_forkProject = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee10(id, params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee10$(_context10) {
|
|
while (1) switch (_context10.prev = _context10.next) {
|
|
case 0:
|
|
return _context10.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP)("/api/sci/projects/".concat(id, "/fork_sci_project.json"), {
|
|
method: 'post',
|
|
body: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context10.stop();
|
|
}
|
|
}, _callee10);
|
|
}));
|
|
return _forkProject.apply(this, arguments);
|
|
}
|
|
function getProjectDataSet(_x14, _x15) {
|
|
return _getProjectDataSet.apply(this, arguments);
|
|
}
|
|
function _getProjectDataSet() {
|
|
_getProjectDataSet = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee11(id, params) {
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee11$(_context11) {
|
|
while (1) switch (_context11.prev = _context11.next) {
|
|
case 0:
|
|
return _context11.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP)("/api/sci/projects/".concat(id, "/get_data_sets.json"), {
|
|
method: 'get',
|
|
params: params
|
|
}));
|
|
case 1:
|
|
case "end":
|
|
return _context11.stop();
|
|
}
|
|
}, _callee11);
|
|
}));
|
|
return _getProjectDataSet.apply(this, arguments);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ 3878:
|
|
/*!************************************************************!*\
|
|
!*** ./src/components/ui-customization/reset.less?modules ***!
|
|
\************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ __webpack_exports__.Z = ({"flex_box_center":"flex_box_center___vG4eV","flex_space_between":"flex_space_between___qVVxe","flex_box_vertical_center":"flex_box_vertical_center___P8Z8s","flex_box_center_end":"flex_box_center_end___VMme3","flex_box_column":"flex_box_column___VMHwm","dropdownmenus":"dropdownmenus___oVzoj","popupClassNames":"popupClassNames___OcZq7","selectdown":"selectdown___mmcA8"});
|
|
|
|
/***/ })
|
|
|
|
}]); |