parent
cb94de2417
commit
ea708dc2ab
File diff suppressed because it is too large
Load Diff
@ -1,313 +0,0 @@
|
||||
"use strict";
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[34044],{
|
||||
|
||||
/***/ 29614:
|
||||
/*!******************************************************************!*\
|
||||
!*** ./src/pages/Counselling/ExpertManage/index.tsx + 1 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 */ ExpertManage; }
|
||||
});
|
||||
|
||||
// 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__(80608);
|
||||
;// CONCATENATED MODULE: ./src/pages/Counselling/ExpertManage/index.less?modules
|
||||
// extracted by mini-css-extract-plugin
|
||||
/* harmony default export */ var ExpertManagemodules = ({"header_div":"header_div___ukQaU","header_title":"header_title___vJbgn","search":"search___kW3Xl","searchIcon":"searchIcon___lHgvP","clear_Data":"clear_Data____5XhW"});
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
||||
var es_form = __webpack_require__(78241);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
||||
var modal = __webpack_require__(43418);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 3 modules
|
||||
var input = __webpack_require__(92832);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
||||
var table = __webpack_require__(51945);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
||||
var pagination = __webpack_require__(86859);
|
||||
// EXTERNAL MODULE: ./src/service/materials.ts
|
||||
var materials = __webpack_require__(32013);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
||||
var jsx_runtime = __webpack_require__(37712);
|
||||
;// CONCATENATED MODULE: ./src/pages/Counselling/ExpertManage/index.tsx
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var Navigation = function Navigation(_ref) {
|
||||
var loading = _ref.loading;
|
||||
var _useState = (0,_react_17_0_2_react.useState)(),
|
||||
_useState2 = slicedToArray_default()(_useState, 2),
|
||||
keyword = _useState2[0],
|
||||
setkeyword = _useState2[1];
|
||||
var _useState3 = (0,_react_17_0_2_react.useState)(),
|
||||
_useState4 = slicedToArray_default()(_useState3, 2),
|
||||
typeId = _useState4[0],
|
||||
setTypeId = _useState4[1];
|
||||
var _useState5 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState6 = slicedToArray_default()(_useState5, 2),
|
||||
openMyModal = _useState6[0],
|
||||
setOpenMyModal = _useState6[1];
|
||||
var _Form$useForm = es_form/* default */.Z.useForm(),
|
||||
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
||||
myForm = _Form$useForm2[0];
|
||||
|
||||
//分页
|
||||
var _useState7 = (0,_react_17_0_2_react.useState)(0),
|
||||
_useState8 = slicedToArray_default()(_useState7, 2),
|
||||
total = _useState8[0],
|
||||
setTotal = _useState8[1];
|
||||
var _useState9 = (0,_react_17_0_2_react.useState)(1),
|
||||
_useState10 = slicedToArray_default()(_useState9, 2),
|
||||
page = _useState10[0],
|
||||
setPage = _useState10[1];
|
||||
var _useState11 = (0,_react_17_0_2_react.useState)(10),
|
||||
_useState12 = slicedToArray_default()(_useState11, 2),
|
||||
limit = _useState12[0],
|
||||
setLimit = _useState12[1];
|
||||
|
||||
//预约数据
|
||||
var _useState13 = (0,_react_17_0_2_react.useState)([]),
|
||||
_useState14 = slicedToArray_default()(_useState13, 2),
|
||||
tableData = _useState14[0],
|
||||
setTableData = _useState14[1];
|
||||
(0,_react_17_0_2_react.useEffect)(function () {
|
||||
getData(false);
|
||||
}, [page]);
|
||||
(0,_react_17_0_2_react.useEffect)(function () {
|
||||
getData(true);
|
||||
}, [keyword, limit]);
|
||||
var getData = function getData(flag) {
|
||||
if (flag) {
|
||||
setPage(1);
|
||||
}
|
||||
(0,materials/* substance_categories_query */.xb)({
|
||||
page: page,
|
||||
limit: limit,
|
||||
keyword: keyword
|
||||
}).then(function (res) {
|
||||
var _res$data, _res$data2;
|
||||
setTableData(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list);
|
||||
setTotal(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.count);
|
||||
});
|
||||
};
|
||||
var columns = [{
|
||||
title: '专家名称',
|
||||
dataIndex: 'title',
|
||||
ellipsis: true,
|
||||
width: 150
|
||||
}, {
|
||||
title: '职称',
|
||||
dataIndex: 'risk',
|
||||
ellipsis: true,
|
||||
width: 150
|
||||
}, {
|
||||
title: '工号',
|
||||
dataIndex: 'risk',
|
||||
ellipsis: true,
|
||||
width: 150
|
||||
}, {
|
||||
title: '简介',
|
||||
dataIndex: 'created_at',
|
||||
ellipsis: true
|
||||
}, {
|
||||
title: '操作',
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
render: function render(text, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: "#165DFF",
|
||||
cursor: "pointer"
|
||||
},
|
||||
onClick: function onClick() {
|
||||
setTypeId(record === null || record === void 0 ? void 0 : record.id);
|
||||
myForm.setFieldValue('neirong', record === null || record === void 0 ? void 0 : record.created_at);
|
||||
setOpenMyModal(true);
|
||||
},
|
||||
children: "\u7F16\u8F91"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: "#5F6367",
|
||||
marginLeft: "10px",
|
||||
cursor: "pointer"
|
||||
},
|
||||
onClick: function onClick() {
|
||||
modal/* default */.Z.confirm({
|
||||
centered: true,
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
title: "提示",
|
||||
content: "删除后,该用户将不再专家列表中展示,同时该用户将失去专家权限,无法被其他用户进行提问并解答,请确认是否需要将该用户删除专家身份?",
|
||||
onOk: function () {
|
||||
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
||||
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
||||
while (1) switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
function onOk() {
|
||||
return _onOk.apply(this, arguments);
|
||||
}
|
||||
return onOk;
|
||||
}()
|
||||
});
|
||||
},
|
||||
children: "\u5220\u9664"
|
||||
})]
|
||||
});
|
||||
}
|
||||
}];
|
||||
var onShowSizeChange = function onShowSizeChange(page, size) {
|
||||
setPage(page);
|
||||
setLimit(size);
|
||||
};
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: ExpertManagemodules.header_div,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: ExpertManagemodules.header_title,
|
||||
children: "\u4E13\u5BB6\u7BA1\u7406"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
||||
placeholder: "\u8BF7\u8F93\u5165\u4E13\u5BB6\u540D\u79F0\u641C\u7D22",
|
||||
size: "large",
|
||||
className: ExpertManagemodules.search,
|
||||
value: keyword,
|
||||
onChange: function onChange(e) {
|
||||
setkeyword(e.target.value);
|
||||
},
|
||||
onSearch: function onSearch(value) {
|
||||
setkeyword(value);
|
||||
},
|
||||
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
||||
className: "iconfont icon-sousuo9 font14 ".concat(ExpertManagemodules.searchIcon),
|
||||
onClick: function onClick() {
|
||||
setkeyword(keyword);
|
||||
getData(true);
|
||||
}
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: ExpertManagemodules.clear_Data,
|
||||
onClick: function onClick() {
|
||||
// setOpenMyModal(true)
|
||||
},
|
||||
children: "\u6DFB\u52A0\u4E13\u5BB6"
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: ExpertManagemodules.search_params
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
||||
pagination: false,
|
||||
dataSource: tableData,
|
||||
columns: columns
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
||||
children: total > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
style: {
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
padding: '10px 7px 20px 7px'
|
||||
},
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
||||
style: {
|
||||
color: '#656F87'
|
||||
},
|
||||
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: "c-light-primary",
|
||||
children: total
|
||||
}), "\u6761\u6570\u636E"]
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
onChange: onShowSizeChange,
|
||||
defaultCurrent: 1,
|
||||
pageSizeOptions: ['10', '20', '50', '100'],
|
||||
current: page || 1,
|
||||
pageSize: limit || 10,
|
||||
defaultPageSize: 10,
|
||||
total: total
|
||||
})]
|
||||
}) : ''
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
||||
maskClosable: false,
|
||||
centered: true,
|
||||
keyboard: false,
|
||||
destroyOnClose: true,
|
||||
className: ExpertManagemodules.my_modal,
|
||||
open: openMyModal,
|
||||
title: "\u7F16\u8F91\u7B80\u4ECB",
|
||||
width: "600px",
|
||||
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
||||
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
||||
while (1) switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
_context2.next = 2;
|
||||
return myForm.validateFields();
|
||||
case 2:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
}, _callee2);
|
||||
})),
|
||||
onCancel: function onCancel() {
|
||||
setOpenMyModal(false);
|
||||
myForm.resetFields();
|
||||
},
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z, {
|
||||
form: myForm,
|
||||
layout: "vertical",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
||||
label: "\u4E13\u5BB6\u63CF\u8FF0",
|
||||
name: "neirong",
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.TextArea, {
|
||||
placeholder: "\u8BF7\u5728\u6B64\u8F93\u5165\u4E13\u5BB6\u63CF\u8FF0",
|
||||
rows: 6
|
||||
})
|
||||
})
|
||||
})
|
||||
})]
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var ExpertManage = ((0,_umi_production_exports.connect)(function (_ref3) {
|
||||
var loading = _ref3.loading,
|
||||
engineeringNavigtion = _ref3.engineeringNavigtion;
|
||||
return objectSpread2_default()({
|
||||
loading: loading
|
||||
}, engineeringNavigtion);
|
||||
})(Navigation));
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue