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.
564 lines
23 KiB
564 lines
23 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[5599],{
|
|
|
|
/***/ 87526:
|
|
/*!*****************************************!*\
|
|
!*** ./src/components/NoData/index.tsx ***!
|
|
\*****************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 93314);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd */ 3113);
|
|
var __defProp = Object.defineProperty;
|
|
var __defProps = Object.defineProperties;
|
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
|
|
|
|
|
const noData = ({
|
|
img,
|
|
buttonProps = {},
|
|
styles = {},
|
|
customText,
|
|
ButtonText,
|
|
ButtonClick,
|
|
Buttonclass,
|
|
ButtonTwo,
|
|
imgStyles,
|
|
loading = false
|
|
}) => {
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
"section",
|
|
{
|
|
className: "tc animated fadeIn",
|
|
style: __spreadValues(__spreadValues({}, { color: "#999", margin: "100px auto", visibility: loading ? "hidden" : "visible" }), styles)
|
|
},
|
|
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("img", { src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_1__, style: __spreadProps(__spreadValues({}, imgStyles), { pointerEvents: "none", userSelect: "none" }) }),
|
|
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", { className: "mt20 font14" }, customText || "\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),
|
|
ButtonText && /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP, __spreadValues({ className: Buttonclass, onClick: ButtonClick }, buttonProps), ButtonText),
|
|
ButtonTwo && ButtonTwo
|
|
);
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = (noData);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 47256:
|
|
/*!***********************************************************!*\
|
|
!*** ./src/pages/User/Detail/Paths/index.tsx + 3 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_Paths; }
|
|
});
|
|
|
|
// 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__(67866);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
|
|
var skeleton = __webpack_require__(56511);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
var pagination = __webpack_require__(53864);
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/Paths/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Pathsmodules = ({"flex_box_center":"flex_box_center___IuXaZ","flex_space_between":"flex_space_between___FgiDp","flex_box_vertical_center":"flex_box_vertical_center____WBjP","flex_box_center_end":"flex_box_center_end___CPJQF","flex_box_column":"flex_box_column___ivE9u","wrap":"wrap___iwvHC","midWrap":"midWrap___JC0F2","color999":"color999___aMrEh","orderWrap":"orderWrap___gxKVG","orderIconWrap":"orderIconWrap___O1L7r","orderAsc":"orderAsc___aghh_","orderDesc":"orderDesc___q0uG2","color0152d9":"color0152d9___UuR9f","h10":"h10___dl8aJ","cursorPointer":"cursorPointer___mLanQ","orderTextWrap":"orderTextWrap___ghSqq","cardWrap":"cardWrap___Wv0mR","countWrap":"countWrap___NIkIb","type":"type___m6IRF"});
|
|
// 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/table/index.js + 85 modules
|
|
var table = __webpack_require__(14491);
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/Paths/components/Items/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Itemsmodules = ({"flex_box_center":"flex_box_center___n5pEG","flex_space_between":"flex_space_between___L_HRa","flex_box_vertical_center":"flex_box_vertical_center___zOctL","flex_box_center_end":"flex_box_center_end___DyJfV","flex_box_column":"flex_box_column___NS2Dc","wrap":"wrap___gPCi1","createIconWrap":"createIconWrap___za5EO","createIcon":"createIcon___X8anF","leftIcon":"leftIcon___LNfFE","rightIcon":"rightIcon___viUSa","createTextWrap":"createTextWrap___Dt6o2","createText":"createText___EqVCQ","tagWrap":"tagWrap___P1scY","payWrap":"payWrap___PREW8","tagName":"tagName___xzzOb","tagJupyterWrap":"tagJupyterWrap___aiBoW","tagJupyterNameWrap":"tagJupyterNameWrap___oX9QT","tagJupyterName":"tagJupyterName___wcrcb","imgWrap":"imgWrap___AsfvG","cardBottom":"cardBottom____ghZa","bottomNameWrap":"bottomNameWrap___O6cIY","bottomName":"bottomName___s6i6n","bottomContentWrap":"bottomContentWrap___BqnnB","bottomOwnerName":"bottomOwnerName___D8FPl","bottomVisitsCount":"bottomVisitsCount___TFnc8","excellentTag":"excellentTag___IyAVX","righttag":"righttag___QMlGE","tagY":"tagY___S9fxB","tagB":"tagB___R3ZdV","text":"text___vAK5m"});
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.11@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(99232);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(13462);
|
|
// EXTERNAL MODULE: ./src/components/ui-customization/index.tsx + 34 modules
|
|
var ui_customization = __webpack_require__(26324);
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/Paths/components/Items/table.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Items = ({ data, number, params, setParams, getPaths }) => {
|
|
const columns = [
|
|
{
|
|
title: "\u5E8F\u53F7",
|
|
dataIndex: "index",
|
|
key: "index",
|
|
width: 55,
|
|
render: (text, item, index) => /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, number + index + 1)
|
|
},
|
|
{
|
|
title: "\u5B9E\u8DF5\u8BFE\u7A0B\u540D\u79F0",
|
|
dataIndex: "name",
|
|
// width: 150,
|
|
// ellipsis: true,
|
|
sorter: true,
|
|
sortOrder: params.sort_by === "name" ? params.sort_direction === "desc" ? "descend" : "ascend" : null,
|
|
key: "name",
|
|
render: (text) => /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: text, placement: "bottomLeft" }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: Itemsmodules.text }, text))
|
|
},
|
|
{
|
|
title: "\u7BA1\u7406\u5458",
|
|
dataIndex: "owner_name",
|
|
key: "owner_name",
|
|
width: 78,
|
|
ellipsis: true,
|
|
render: (text) => /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: text || "--", placement: "bottomLeft" }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, text || "--"))
|
|
},
|
|
{
|
|
title: "\u5408\u4F5C\u8005",
|
|
dataIndex: "members",
|
|
key: "members",
|
|
width: 134,
|
|
ellipsis: true,
|
|
render: (text) => /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: text.join("\u3001"), placement: "bottomLeft" }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, text.join("\u3001")))
|
|
},
|
|
{
|
|
title: "\u5B66\u4E60\u4EBA\u6570",
|
|
dataIndex: "members_count",
|
|
width: 80,
|
|
key: "members_count",
|
|
render: (text) => /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-grey-666" }, text)
|
|
},
|
|
{
|
|
title: "\u521B\u5EFA\u65F6\u95F4",
|
|
dataIndex: "created_at",
|
|
key: "created_at",
|
|
sorter: true,
|
|
sortOrder: params.sort_by === "created_at" ? params.sort_direction === "desc" ? "descend" : "ascend" : null,
|
|
width: 110,
|
|
render: (text) => /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-grey-666" }, dayjs_min_default()(text).format("YYYY-MM-DD"))
|
|
},
|
|
{
|
|
title: "\u7AE0\u8282\u6570",
|
|
dataIndex: "stages_count",
|
|
width: 70,
|
|
key: "stages_count",
|
|
render: (text) => /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-grey-666" }, text)
|
|
},
|
|
{
|
|
title: "\u5B9E\u8BAD\u6570",
|
|
dataIndex: "shixuns_count",
|
|
width: 70,
|
|
key: "shixuns_count",
|
|
render: (text) => /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-grey-666" }, text)
|
|
},
|
|
{
|
|
title: "\u8BFE\u7A0B\u6807\u7B7E",
|
|
dataIndex: "excellent",
|
|
width: 88,
|
|
key: "excellent",
|
|
align: "center",
|
|
render: (text, v) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, v.featured > 0 && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Itemsmodules.tagY }, v.featured === 1 && "\u56FD\u5BB6\u4E00\u6D41", v.featured === 2 && "\u519B\u961F\u4E00\u6D41", v.featured === 3 && "\u7701\u7EA7\u4E00\u6D41", v.featured === 4 && "\u7CBE\u54C1\u8BFE\u7A0B"), text && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Itemsmodules.tagB }, "\u5F00\u653E\u8BFE\u7A0B"), !(v == null ? void 0 : v.featured) && !text && /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "c-grey-666" }, "- -"));
|
|
}
|
|
},
|
|
{
|
|
title: "\u64CD\u4F5C",
|
|
dataIndex: "name",
|
|
key: "name",
|
|
width: 65,
|
|
align: "right",
|
|
render: (text, item) => {
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"span",
|
|
{
|
|
className: "current-primary",
|
|
onClick: (e) => {
|
|
e.stopPropagation();
|
|
(0,util/* openNewWindow */.xg)(`/paths/${item.id}`);
|
|
}
|
|
},
|
|
"\u8BE6\u60C5"
|
|
);
|
|
}
|
|
}
|
|
];
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /* @__PURE__ */ _react_17_0_2_react.createElement(ui_customization/* CustomTable */.Gi, null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
table["default"],
|
|
{
|
|
style: { cursor: "pointer" },
|
|
onRow: (record) => {
|
|
return {
|
|
onClick: (e) => {
|
|
window.open(`/paths/${record.id}`, "_blank");
|
|
}
|
|
};
|
|
},
|
|
onChange: (a, b, c) => {
|
|
if (c.field)
|
|
params.sort_by = c.field;
|
|
if (!c.order)
|
|
params["sort_direction"] = "asc";
|
|
if (c.order === "ascend")
|
|
params["sort_direction"] = "asc";
|
|
if (c.order === "descend")
|
|
params["sort_direction"] = "desc";
|
|
if (!c.order)
|
|
params["sort_direction"] = "asc";
|
|
setParams(params);
|
|
getPaths(params);
|
|
},
|
|
pagination: false,
|
|
dataSource: data,
|
|
columns
|
|
}
|
|
)));
|
|
};
|
|
/* harmony default export */ var Items_table = (Items);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js
|
|
var lodash = __webpack_require__(89392);
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
var authority = __webpack_require__(88141);
|
|
;// CONCATENATED MODULE: ./src/pages/User/Detail/Paths/index.tsx
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __objRest = (source, exclude) => {
|
|
var target = {};
|
|
for (var prop in source)
|
|
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
target[prop] = source[prop];
|
|
if (source != null && __getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(source)) {
|
|
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
target[prop] = source[prop];
|
|
}
|
|
return target;
|
|
};
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Paths = (_a) => {
|
|
var _b = _a, {
|
|
user,
|
|
userDetail,
|
|
globalSetting,
|
|
loading,
|
|
dispatch
|
|
} = _b, props = __objRest(_b, [
|
|
"user",
|
|
"userDetail",
|
|
"globalSetting",
|
|
"loading",
|
|
"dispatch"
|
|
]);
|
|
var _a2, _b2;
|
|
const [searchParams] = (0,_umi_production_exports.useSearchParams)();
|
|
const location = (0,_umi_production_exports.useLocation)();
|
|
const username = (0,_react_17_0_2_react.useRef)();
|
|
const [params, setParams] = (0,_react_17_0_2_react.useState)({});
|
|
const [count, setCount] = (0,_react_17_0_2_react.useState)(0);
|
|
const [data, setData] = (0,_react_17_0_2_react.useState)([]);
|
|
const [isCurrent, setIsCurrent] = (0,_react_17_0_2_react.useState)();
|
|
const [showSearchText, setShowSearchText] = (0,_react_17_0_2_react.useState)(false);
|
|
const [plainOptions, setPlainOptions] = (0,_react_17_0_2_react.useState)([
|
|
{ label: /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "icon-juxingfenbu font14" }), value: 1 },
|
|
{ label: /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "icon-liebiaofenbu font14" }), value: 2 }
|
|
]);
|
|
const [showType, setShowType] = (0,_react_17_0_2_react.useState)(parseInt(localStorage.getItem("PathShowtype")) || 1);
|
|
const throttleCategory = (0,_react_17_0_2_react.useRef)((0,lodash.throttle)((category) => handleChangeCategory(category), 500, { trailing: false }));
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
throttleCategory.current = (0,lodash.throttle)(handleChangeCategory, 500, { trailing: false });
|
|
}, [params]);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
var _a3;
|
|
username.current = (_a3 = location.pathname.split("/")) == null ? void 0 : _a3[2];
|
|
const query = {
|
|
category: searchParams.get("category") || "",
|
|
status: searchParams.get("category") === "manage" ? tagsTwo.map((item) => item.id).includes(searchParams.get("status")) ? searchParams.get("status") : "" : searchParams.get("category") === "study" || searchParams.get("category") === "collect" ? tags.map((item) => item.id).includes(searchParams.get("status")) ? searchParams.get("status") : "" : "",
|
|
page: 1,
|
|
per_page: 15,
|
|
sort_by: "updated_at",
|
|
sort_direction: "desc",
|
|
username: username.current
|
|
};
|
|
setParams(query);
|
|
getPaths(query);
|
|
}, [location.pathname]);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
var _a3;
|
|
setIsCurrent(((_a3 = user.userInfo) == null ? void 0 : _a3.login) === username.current);
|
|
}, [(_a2 = user.userInfo) == null ? void 0 : _a2.login, username.current]);
|
|
const getPaths = (query) => __async(void 0, null, function* () {
|
|
const res = yield dispatch({
|
|
type: "userDetail/getPaths",
|
|
payload: query
|
|
});
|
|
if (res) {
|
|
setCount((res == null ? void 0 : res.count) || 0);
|
|
setData((res == null ? void 0 : res.subjects) || []);
|
|
}
|
|
});
|
|
const handleChangeCategory = (category) => {
|
|
var _a3;
|
|
params.category = category;
|
|
params.status = "";
|
|
if ((_a3 = window.location.href.toString()) == null ? void 0 : _a3.includes("category")) {
|
|
(0,util/* replaceParamVal */.jz)("category", category);
|
|
(0,util/* replaceParamVal */.jz)("status", "");
|
|
} else {
|
|
window.history.replaceState(null, "", window.location.href.indexOf("?") > -1 ? window.location.href + `&category=${category}` : `?category=${category}`);
|
|
}
|
|
params.page = 1;
|
|
setParams(params);
|
|
getPaths(params);
|
|
};
|
|
const handleChangeStatus = (status) => {
|
|
var _a3;
|
|
params.status = status;
|
|
params.page = 1;
|
|
if ((_a3 = window.location.href.toString()) == null ? void 0 : _a3.includes("status")) {
|
|
(0,util/* replaceParamVal */.jz)("status", status);
|
|
} else {
|
|
window.history.replaceState(null, "", window.location.href.indexOf("?") > -1 ? window.location.href + `&status=${status}` : `?status=${status}`);
|
|
}
|
|
setParams(params);
|
|
getPaths(params);
|
|
};
|
|
const handleChangeOrder = (sort_direction) => {
|
|
params.sort_direction = sort_direction;
|
|
setParams(params);
|
|
getPaths(params);
|
|
};
|
|
const handleChangeOrderField = (sort_by) => {
|
|
params.sort_by = sort_by;
|
|
params.sort_direction = "desc";
|
|
setParams(params);
|
|
getPaths(params);
|
|
};
|
|
const handleChangePage = (page, pageSize) => {
|
|
params.page = page;
|
|
params.per_page = pageSize;
|
|
setParams(params);
|
|
getPaths(params);
|
|
};
|
|
const handleSearch = (v) => {
|
|
params.search = v;
|
|
params.page = 1;
|
|
setParams(params);
|
|
getPaths(params);
|
|
};
|
|
const handleInputChange = (v) => {
|
|
params.search = v;
|
|
setParams(params);
|
|
};
|
|
const renderCategoryText = () => {
|
|
let category = params.category == "collect" ? "\u5171\u6536\u85CF" : "\u5171\u53C2\u4E0E";
|
|
let status = "";
|
|
if (params.category === "collect") {
|
|
status = "";
|
|
}
|
|
if (params.category === "manage") {
|
|
status = "\u53D1\u5E03";
|
|
}
|
|
if (params.category === "study") {
|
|
status = "\u5B66\u4E60";
|
|
}
|
|
if (!params.category) {
|
|
status = "\u5B9E\u8DF5\u8BFE\u7A0B";
|
|
}
|
|
return `${category}${count}\u4E2A${status}`;
|
|
};
|
|
const renderOrderText = () => {
|
|
if (params.sort_by === "updated_at") {
|
|
return "\u6700\u8FD1\u66F4\u65B0";
|
|
}
|
|
if (params.sort_by === "created_at") {
|
|
return "\u6700\u65B0\u521B\u5EFA";
|
|
}
|
|
if (params.sort_by === "name") {
|
|
return "\u540D\u79F0\u6392\u5E8F";
|
|
}
|
|
return "";
|
|
};
|
|
const tabs = [
|
|
{ id: "", name: "\u5168\u90E8" },
|
|
{ id: "manage", name: `${isCurrent ? "\u6211" : "TA"}\u7BA1\u7406\u7684` },
|
|
{ id: "study", name: `${isCurrent ? "\u6211" : "TA"}\u5B66\u4E60\u7684` },
|
|
{ id: "collect", name: `${isCurrent ? "\u6211" : "TA"}\u6536\u85CF\u7684` },
|
|
{ id: "payed", name: `${isCurrent ? "\u6211" : "TA"}\u8D2D\u4E70\u7684` }
|
|
];
|
|
const tags = [
|
|
{ id: "", name: "\u5168\u90E8" },
|
|
{ id: "unfinished", name: "\u672A\u5B8C\u6210" },
|
|
{ id: "finished", name: "\u5DF2\u5B8C\u6210" }
|
|
];
|
|
const tagsTwo = [
|
|
{ id: "", name: "\u5168\u90E8" },
|
|
{ id: "editing", name: "\u7F16\u8F91\u4E2D" },
|
|
{ id: "applying", name: "\u5F85\u5BA1\u6838" },
|
|
{ id: "published", name: "\u5DF2\u53D1\u5E03" }
|
|
];
|
|
const realTags = params.category === "manage" ? tagsTwo : (params == null ? void 0 : params.category) === "study" || (params == null ? void 0 : params.category) === "collect" || (params == null ? void 0 : params.category) === "payed" ? tags : [];
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Pathsmodules.wrap }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
ui_customization/* CustomTabs */.YG,
|
|
{
|
|
value: params.category,
|
|
onChange: handleChangeCategory,
|
|
tabBarExtraContent: /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
ui_customization/* CustomInput */.t7,
|
|
{
|
|
style: { width: 303 },
|
|
placeholder: "\u641C\u7D22\u5B9E\u8DF5\u8BFE\u7A0B",
|
|
value: params.search,
|
|
onChange: handleSearch,
|
|
onInputChange: handleInputChange
|
|
}
|
|
),
|
|
className: "mb25",
|
|
dataSource: tabs
|
|
}
|
|
), isCurrent && !!params.category && /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
ui_customization/* CustomTags */.qp,
|
|
{
|
|
title: "\u72B6\u6001",
|
|
value: params.status,
|
|
onChange: handleChangeStatus,
|
|
dataSource: realTags,
|
|
titleWidth: 28
|
|
}
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Pathsmodules.midWrap }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
ui_customization/* SuperiorSort */.cq,
|
|
{
|
|
sortValue: params.sort_direction,
|
|
dropValue: params.sort_by,
|
|
onSort: handleChangeOrder,
|
|
onDrop: handleChangeOrderField
|
|
}
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Pathsmodules.type }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"i",
|
|
{
|
|
className: showType === 1 ? `iconfont icon-fenbu ${Pathsmodules.cursorPointer} ${Pathsmodules.color0152d9}` : `iconfont icon-fenbu ${Pathsmodules.cursorPointer}`,
|
|
onClick: () => {
|
|
setShowType(1);
|
|
localStorage.setItem("PathShowtype", "1");
|
|
}
|
|
}
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: Pathsmodules.orderDesc }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"i",
|
|
{
|
|
className: showType === 2 ? `iconfont icon-fenbu-2 ${Pathsmodules.cursorPointer} ${Pathsmodules.color0152d9} ` : `iconfont icon-fenbu-2 ${Pathsmodules.cursorPointer}`,
|
|
onClick: () => {
|
|
setShowType(2);
|
|
localStorage.setItem("PathShowtype", "2");
|
|
}
|
|
}
|
|
))), !(((_b2 = user.userInfo) == null ? void 0 : _b2.identity) === "student" && !(0,authority/* isSuperAdmins */.Ny)()) && /* @__PURE__ */ _react_17_0_2_react.createElement(ui_customization/* CustomButton */.op, { style: { marginLeft: "auto" }, className: Pathsmodules.btn, onClick: () => _umi_production_exports.history.push(`/paths/new?username=${username.current}`) }, "\u65B0\u5EFA\u5B9E\u8DF5\u8BFE\u7A0B")), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
skeleton/* default */.Z,
|
|
{
|
|
loading: loading["userDetail/getPaths"],
|
|
active: true,
|
|
paragraph: { rows: 5 }
|
|
},
|
|
showType == 1 && /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
ui_customization/* CourseList */.cQ,
|
|
{
|
|
dataSource: data,
|
|
right: 23,
|
|
col: 3,
|
|
wrapWidth: 887,
|
|
loading: false
|
|
}
|
|
),
|
|
showType != 1 && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "mt10", style: { minHeight: 400 } }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
Items_table,
|
|
{
|
|
number: (params.page - 1) * params.per_page,
|
|
data,
|
|
params,
|
|
setParams,
|
|
getPaths
|
|
}
|
|
)),
|
|
count > 0 && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Pathsmodules.countWrap }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
pagination/* default */.Z,
|
|
{
|
|
showQuickJumper: true,
|
|
showSizeChanger: true,
|
|
pageSizeOptions: ["10", "15", "50", "100", "200"],
|
|
total: count,
|
|
onChange: (page, pageSize) => {
|
|
handleChangePage(page, pageSize);
|
|
},
|
|
pageSize: params.per_page,
|
|
hideOnSinglePage: true,
|
|
current: params.page
|
|
}
|
|
))
|
|
));
|
|
};
|
|
/* harmony default export */ var Detail_Paths = ((0,_umi_production_exports.connect)(
|
|
({
|
|
user,
|
|
userDetail,
|
|
loading,
|
|
globalSetting
|
|
}) => ({
|
|
user,
|
|
userDetail,
|
|
globalSetting,
|
|
loading: loading.effects
|
|
})
|
|
)(Paths));
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |