parent
92e046e084
commit
a4eceec8b4
File diff suppressed because it is too large
Load Diff
@ -1,709 +0,0 @@
|
||||
"use strict";
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[62369],{
|
||||
|
||||
/***/ 39970:
|
||||
/*!**********************************************************************!*\
|
||||
!*** ./src/pages/Magazinejor/component/Review/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 */ Review; }
|
||||
});
|
||||
|
||||
// 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/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/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: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
||||
var es_form = __webpack_require__(78241);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
||||
var message = __webpack_require__(8591);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
||||
var es_button = __webpack_require__(3113);
|
||||
// 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/spin/index.js + 1 modules
|
||||
var spin = __webpack_require__(71418);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
||||
var table = __webpack_require__(36546);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
||||
var pagination = __webpack_require__(19871);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/timeline/index.js + 5 modules
|
||||
var timeline = __webpack_require__(10777);
|
||||
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
||||
var _umi_production_exports = __webpack_require__(88271);
|
||||
;// CONCATENATED MODULE: ./src/pages/Magazinejor/component/Review/index.less?modules
|
||||
// extracted by mini-css-extract-plugin
|
||||
/* harmony default export */ var Reviewmodules = ({"wrap":"wrap___tUKGt","topWrap":"topWrap___b3T_x","title":"title___P7I3N","searchStyle":"searchStyle___iao6K","search":"search___JG596","searchIcon":"searchIcon___nHNTo","tableWrap":"tableWrap___KqyjW","TitleStyle":"TitleStyle___mIzD0","timeLineSty":"timeLineSty___Iv2Fo"});
|
||||
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.13@dayjs/dayjs.min.js
|
||||
var dayjs_min = __webpack_require__(61186);
|
||||
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
||||
// EXTERNAL MODULE: ./src/service/magazine.tsx
|
||||
var magazine = __webpack_require__(20103);
|
||||
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
||||
var NoData = __webpack_require__(63017);
|
||||
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 3 modules
|
||||
var PreviewAll = __webpack_require__(97672);
|
||||
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
||||
var fetch = __webpack_require__(82710);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
||||
var jsx_runtime = __webpack_require__(37712);
|
||||
;// CONCATENATED MODULE: ./src/pages/Magazinejor/component/Review/index.tsx
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var Journal = function Journal() {
|
||||
var urlParams = (0,_umi_production_exports.useParams)();
|
||||
var _useState = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState2 = slicedToArray_default()(_useState, 2),
|
||||
loading = _useState2[0],
|
||||
setLoading = _useState2[1];
|
||||
var _Form$useForm = es_form/* default */.Z.useForm(),
|
||||
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
||||
form = _Form$useForm2[0];
|
||||
var _useState3 = (0,_react_17_0_2_react.useState)(0),
|
||||
_useState4 = slicedToArray_default()(_useState3, 2),
|
||||
total = _useState4[0],
|
||||
setTotal = _useState4[1];
|
||||
var _useState5 = (0,_react_17_0_2_react.useState)([]),
|
||||
_useState6 = slicedToArray_default()(_useState5, 2),
|
||||
data = _useState6[0],
|
||||
setData = _useState6[1];
|
||||
var _useState7 = (0,_react_17_0_2_react.useState)(''),
|
||||
_useState8 = slicedToArray_default()(_useState7, 2),
|
||||
keyword = _useState8[0],
|
||||
setKeyword = _useState8[1];
|
||||
var _useState9 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState10 = slicedToArray_default()(_useState9, 2),
|
||||
timeLineVis = _useState10[0],
|
||||
setTimeLineVis = _useState10[1];
|
||||
var _useState11 = (0,_react_17_0_2_react.useState)([]),
|
||||
_useState12 = slicedToArray_default()(_useState11, 2),
|
||||
timeLineData = _useState12[0],
|
||||
setTimeLineData = _useState12[1];
|
||||
// const [refuseReason, setRefuseReason] = useState<string>('');
|
||||
var _useState13 = (0,_react_17_0_2_react.useState)({
|
||||
page: 1,
|
||||
limit: 10
|
||||
}),
|
||||
_useState14 = slicedToArray_default()(_useState13, 2),
|
||||
params = _useState14[0],
|
||||
setParams = _useState14[1];
|
||||
var _useState15 = (0,_react_17_0_2_react.useState)({
|
||||
content: "",
|
||||
type: ""
|
||||
}),
|
||||
_useState16 = slicedToArray_default()(_useState15, 2),
|
||||
previewData = _useState16[0],
|
||||
setPreviewData = _useState16[1];
|
||||
var monacoValueRef = (0,_react_17_0_2_react.useRef)();
|
||||
var getData = /*#__PURE__*/function () {
|
||||
var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
||||
var res, _res$data, _res$data2;
|
||||
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
||||
while (1) switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
setLoading(true);
|
||||
_context.next = 3;
|
||||
return (0,magazine/* getReviewList */.t_)(objectSpread2_default()(objectSpread2_default()({
|
||||
id: 1
|
||||
}, params), {}, {
|
||||
keyword: keyword
|
||||
}));
|
||||
case 3:
|
||||
res = _context.sent;
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
||||
setData((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) || 0);
|
||||
}
|
||||
setLoading(false);
|
||||
case 6:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return function getData() {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
var getProgressData = /*#__PURE__*/function () {
|
||||
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(article_id) {
|
||||
var res, _res$data3, tempData;
|
||||
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
||||
while (1) switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
_context2.next = 2;
|
||||
return (0,magazine/* getReviewProgress */.lp)({
|
||||
id: urlParams.id,
|
||||
article_id: article_id
|
||||
});
|
||||
case 2:
|
||||
res = _context2.sent;
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
||||
tempData = res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.map(function (item, index) {
|
||||
var color = (item === null || item === void 0 ? void 0 : item.status) == 'pending' ? '#3061D0' : (item === null || item === void 0 ? void 0 : item.status) == 'approved' ? '#00B187' : (item === null || item === void 0 ? void 0 : item.status) == 'rejected' ? '#ADB2B8' : (item === null || item === void 0 ? void 0 : item.status) == 'unstart' ? '#FA6400' : '#00CCFF';
|
||||
return {
|
||||
label: item !== null && item !== void 0 && item.audit_at ? dayjs_min_default()(item === null || item === void 0 ? void 0 : item.audit_at).format('YYYY-MM-DD HH:mm') : '--',
|
||||
color: color,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
||||
children: (item === null || item === void 0 ? void 0 : item.user_name) || '--'
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
||||
children: [(item === null || item === void 0 ? void 0 : item.status) == 'pending' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#3061D0'
|
||||
},
|
||||
children: "\u5BA1\u6838\u4E2D"
|
||||
}), (item === null || item === void 0 ? void 0 : item.status) == 'approved' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#00B187'
|
||||
},
|
||||
children: "\u5DF2\u901A\u8FC7"
|
||||
}), (item === null || item === void 0 ? void 0 : item.status) == 'rejected' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#ADB2B8'
|
||||
},
|
||||
children: "\u5DF2\u62D2\u7EDD"
|
||||
}), (item === null || item === void 0 ? void 0 : item.status) == 'unstart' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#FA6400'
|
||||
},
|
||||
children: "\u5F85\u5BA1\u6838"
|
||||
}), (item === null || item === void 0 ? void 0 : item.status) == 'submited' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#00CCFF'
|
||||
},
|
||||
children: "\u63D0\u4EA4"
|
||||
})]
|
||||
})]
|
||||
})
|
||||
};
|
||||
});
|
||||
setTimeLineData(tempData || []);
|
||||
}
|
||||
case 4:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
}, _callee2);
|
||||
}));
|
||||
return function getProgressData(_x) {
|
||||
return _ref2.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
(0,_react_17_0_2_react.useEffect)(function () {
|
||||
getData();
|
||||
}, []);
|
||||
var preview = /*#__PURE__*/function () {
|
||||
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(item) {
|
||||
var res;
|
||||
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
||||
while (1) switch (_context3.prev = _context3.next) {
|
||||
case 0:
|
||||
if (!(item.file_type === "txt")) {
|
||||
_context3.next = 5;
|
||||
break;
|
||||
}
|
||||
_context3.next = 3;
|
||||
return (0,fetch/* default */.ZP)(item.url, {
|
||||
method: "get",
|
||||
headers: {
|
||||
"Content-Type": "application/xml"
|
||||
}
|
||||
});
|
||||
case 3:
|
||||
res = _context3.sent;
|
||||
monacoValueRef.current = res;
|
||||
case 5:
|
||||
setPreviewData({
|
||||
type: item.file_type,
|
||||
content: item.url
|
||||
});
|
||||
case 6:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
}
|
||||
}, _callee3);
|
||||
}));
|
||||
return function preview(_x2) {
|
||||
return _ref3.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
var approveOrRefuse = /*#__PURE__*/function () {
|
||||
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(id, status, reject_reason) {
|
||||
var res;
|
||||
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
||||
while (1) switch (_context4.prev = _context4.next) {
|
||||
case 0:
|
||||
_context4.next = 2;
|
||||
return (0,magazine/* getMagazinCheck */.BL)({
|
||||
id: id,
|
||||
reject_reason: reject_reason,
|
||||
status: status
|
||||
});
|
||||
case 2:
|
||||
res = _context4.sent;
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
||||
message/* default */.ZP.success('操作成功');
|
||||
// setRefuseReason('');
|
||||
getData();
|
||||
}
|
||||
case 4:
|
||||
case "end":
|
||||
return _context4.stop();
|
||||
}
|
||||
}, _callee4);
|
||||
}));
|
||||
return function approveOrRefuse(_x3, _x4, _x5) {
|
||||
return _ref4.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
var columns = [{
|
||||
title: '标题',
|
||||
dataIndex: 'title',
|
||||
width: '20%',
|
||||
ellipsis: true,
|
||||
align: 'left',
|
||||
render: function render(text, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#17265F'
|
||||
},
|
||||
children: text || '--'
|
||||
});
|
||||
}
|
||||
}, {
|
||||
title: '投稿栏目',
|
||||
dataIndex: 'category_name',
|
||||
width: '10%',
|
||||
ellipsis: true,
|
||||
render: function render(text, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#17265F'
|
||||
},
|
||||
children: text || '--'
|
||||
});
|
||||
}
|
||||
}, {
|
||||
title: '投稿人',
|
||||
dataIndex: 'author_name',
|
||||
width: '10%',
|
||||
ellipsis: true,
|
||||
render: function render(text, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#17265F'
|
||||
},
|
||||
children: text || '--'
|
||||
});
|
||||
}
|
||||
}, {
|
||||
title: '审核进度',
|
||||
width: '12%',
|
||||
dataIndex: 'status',
|
||||
render: function render(text, record) {
|
||||
switch (text) {
|
||||
case 'pending':
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#3061D0'
|
||||
},
|
||||
children: "\u5BA1\u6838\u4E2D"
|
||||
});
|
||||
case 'approved':
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#00B187'
|
||||
},
|
||||
children: "\u5DF2\u901A\u8FC7"
|
||||
});
|
||||
case 'rejected':
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#ADB2B8'
|
||||
},
|
||||
children: "\u5DF2\u62D2\u7EDD"
|
||||
});
|
||||
case 'unstart':
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#FA6400'
|
||||
},
|
||||
children: "\u5F85\u5BA1\u6838"
|
||||
});
|
||||
}
|
||||
}
|
||||
}, {
|
||||
title: '上传附件',
|
||||
dataIndex: 'attachment',
|
||||
width: '12%',
|
||||
ellipsis: true,
|
||||
render: function render(text, record) {
|
||||
var _record$attachment2;
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#418DFF',
|
||||
cursor: 'pointer'
|
||||
},
|
||||
onClick: function onClick() {
|
||||
var _record$attachment;
|
||||
if (record !== null && record !== void 0 && (_record$attachment = record.attachment) !== null && _record$attachment !== void 0 && _record$attachment.url) {
|
||||
// openNewWindow(record?.attachment?.url)
|
||||
preview(record === null || record === void 0 ? void 0 : record.attachment);
|
||||
}
|
||||
},
|
||||
children: (record === null || record === void 0 || (_record$attachment2 = record.attachment) === null || _record$attachment2 === void 0 ? void 0 : _record$attachment2.title) || '--'
|
||||
});
|
||||
}
|
||||
}, {
|
||||
title: '提交日期',
|
||||
width: '16%',
|
||||
dataIndex: 'submit_at',
|
||||
ellipsis: true,
|
||||
render: function render(text) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#17265F'
|
||||
},
|
||||
children: text ? dayjs_min_default()(text).format('YYYY-MM-DD HH:mm') : '--'
|
||||
});
|
||||
}
|
||||
}, {
|
||||
title: '操作',
|
||||
align: 'right',
|
||||
dataIndex: 'created_at',
|
||||
render: function render(text, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [(record === null || record === void 0 ? void 0 : record.status) == 'rejected' && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
||||
type: "link",
|
||||
style: {
|
||||
color: '#3D60D1',
|
||||
padding: 0
|
||||
},
|
||||
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
||||
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
||||
while (1) switch (_context5.prev = _context5.next) {
|
||||
case 0:
|
||||
modal/* default */.Z.confirm({
|
||||
title: '查看原因',
|
||||
width: 550,
|
||||
centered: true,
|
||||
closable: true,
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
icon: null,
|
||||
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
style: {
|
||||
color: '#000'
|
||||
},
|
||||
children: (record === null || record === void 0 ? void 0 : record.reject_reason) || '--'
|
||||
})
|
||||
});
|
||||
case 1:
|
||||
case "end":
|
||||
return _context5.stop();
|
||||
}
|
||||
}, _callee5);
|
||||
})),
|
||||
children: "\u67E5\u770B\u539F\u56E0"
|
||||
}), (record === null || record === void 0 ? void 0 : record.status) == 'pending' && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
||||
type: "link",
|
||||
style: {
|
||||
color: '#3D60D1',
|
||||
padding: 0,
|
||||
marginLeft: '10px'
|
||||
},
|
||||
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
||||
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
||||
while (1) switch (_context6.prev = _context6.next) {
|
||||
case 0:
|
||||
_context6.next = 2;
|
||||
return getProgressData(record === null || record === void 0 ? void 0 : record.id);
|
||||
case 2:
|
||||
setTimeLineVis(true);
|
||||
case 3:
|
||||
case "end":
|
||||
return _context6.stop();
|
||||
}
|
||||
}, _callee6);
|
||||
})),
|
||||
children: "\u67E5\u770B\u8FDB\u5EA6"
|
||||
}), (record === null || record === void 0 ? void 0 : record.can_reviewed) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
||||
type: "link",
|
||||
style: {
|
||||
color: '#3D60D1',
|
||||
padding: 0,
|
||||
marginLeft: '10px'
|
||||
},
|
||||
onClick: function onClick() {
|
||||
modal/* default */.Z.confirm({
|
||||
title: '同意投稿',
|
||||
width: 550,
|
||||
centered: true,
|
||||
closable: true,
|
||||
icon: null,
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
onOk: function () {
|
||||
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
|
||||
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
|
||||
while (1) switch (_context7.prev = _context7.next) {
|
||||
case 0:
|
||||
_context7.next = 2;
|
||||
return approveOrRefuse(record === null || record === void 0 ? void 0 : record.id, 'approved', '');
|
||||
case 2:
|
||||
case "end":
|
||||
return _context7.stop();
|
||||
}
|
||||
}, _callee7);
|
||||
}));
|
||||
function onOk() {
|
||||
return _onOk.apply(this, arguments);
|
||||
}
|
||||
return onOk;
|
||||
}(),
|
||||
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
style: {
|
||||
color: '#000'
|
||||
},
|
||||
children: "\u786E\u5B9A\u540C\u610F\u6295\u7A3F\u5417\uFF1F"
|
||||
})
|
||||
});
|
||||
},
|
||||
children: "\u540C\u610F"
|
||||
}), (record === null || record === void 0 ? void 0 : record.can_reviewed) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
||||
type: "link",
|
||||
style: {
|
||||
color: '#3D60D1',
|
||||
padding: 0,
|
||||
marginLeft: '10px'
|
||||
},
|
||||
onClick: function onClick() {
|
||||
var refuseReason = '';
|
||||
modal/* default */.Z.info({
|
||||
title: '拒绝原因',
|
||||
width: 560,
|
||||
centered: true,
|
||||
closable: true,
|
||||
icon: null,
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
onOk: function () {
|
||||
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
|
||||
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
|
||||
while (1) switch (_context8.prev = _context8.next) {
|
||||
case 0:
|
||||
if (refuseReason) {
|
||||
_context8.next = 3;
|
||||
break;
|
||||
}
|
||||
message/* default */.ZP.info('请输入拒绝原因');
|
||||
return _context8.abrupt("return");
|
||||
case 3:
|
||||
_context8.next = 5;
|
||||
return approveOrRefuse(record === null || record === void 0 ? void 0 : record.id, 'rejected', refuseReason);
|
||||
case 5:
|
||||
case "end":
|
||||
return _context8.stop();
|
||||
}
|
||||
}, _callee8);
|
||||
}));
|
||||
function onOk() {
|
||||
return _onOk2.apply(this, arguments);
|
||||
}
|
||||
return onOk;
|
||||
}(),
|
||||
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
style: {
|
||||
color: "#5F6367",
|
||||
marginBottom: '10px'
|
||||
},
|
||||
children: "\u539F\u56E0"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.TextArea, {
|
||||
rows: 4,
|
||||
placeholder: "\u8BF7\u8F93\u5165\u62D2\u7EDD\u539F\u56E0",
|
||||
onChange: function onChange(e) {
|
||||
console.log(e);
|
||||
refuseReason = e.target.value;
|
||||
// setRefuseReason(e.target.value);
|
||||
}
|
||||
})
|
||||
})]
|
||||
})
|
||||
});
|
||||
},
|
||||
children: "\u62D2\u7EDD"
|
||||
})]
|
||||
});
|
||||
}
|
||||
}];
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
|
||||
spinning: loading,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Reviewmodules.wrap,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Reviewmodules.topWrap,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
||||
src: __webpack_require__(/*! ../../img/time.png */ 69871),
|
||||
width: 19
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: Reviewmodules.title,
|
||||
children: "\u6295\u7A3F\u5BA1\u6838"
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
||||
placeholder: "\u8BF7\u8F93\u5165\u6807\u9898\u8FDB\u884C\u641C\u7D22",
|
||||
size: "large",
|
||||
className: Reviewmodules.search,
|
||||
onChange: function onChange(e) {
|
||||
return setKeyword(e.target.value);
|
||||
},
|
||||
onSearch: function onSearch(value) {
|
||||
return setKeyword(value);
|
||||
},
|
||||
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
||||
className: "iconfont icon-sousuo9 font14 ".concat(Reviewmodules.searchIcon),
|
||||
onClick: function onClick() {
|
||||
getData();
|
||||
}
|
||||
})
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: Reviewmodules.tableWrap,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
||||
className: "".concat(Reviewmodules.TitleStyle),
|
||||
dataSource: data,
|
||||
columns: columns,
|
||||
bordered: false,
|
||||
size: "large",
|
||||
locale: {
|
||||
emptyText: /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {})
|
||||
},
|
||||
pagination: false
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
||||
className: "mt20",
|
||||
defaultCurrent: 1,
|
||||
current: params.page || 1,
|
||||
defaultPageSize: 10,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
showTotal: function showTotal(total) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
||||
children: ["\u5171 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#3061d0'
|
||||
},
|
||||
children: total
|
||||
}), " \u6761\u6570\u636E"]
|
||||
});
|
||||
},
|
||||
total: total,
|
||||
onChange: function onChange(page, pageSize) {
|
||||
params.page = page;
|
||||
params.limit = pageSize;
|
||||
setParams(objectSpread2_default()({}, params));
|
||||
getData();
|
||||
}
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
||||
title: "\u67E5\u770B\u8FDB\u5EA6",
|
||||
open: timeLineVis,
|
||||
width: 500,
|
||||
onOk: function onOk() {
|
||||
setTimeLineVis(false);
|
||||
},
|
||||
onCancel: function onCancel() {
|
||||
setTimeLineVis(false);
|
||||
},
|
||||
className: Reviewmodules.timeLineSty,
|
||||
maskClosable: false,
|
||||
centered: true,
|
||||
footer: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
||||
type: "primary",
|
||||
onClick: function onClick() {
|
||||
setTimeLineVis(false);
|
||||
},
|
||||
children: "\u786E\u5B9A"
|
||||
}, "back")],
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: Reviewmodules.timeline,
|
||||
style: {
|
||||
marginTop: 20
|
||||
},
|
||||
children: (timeLineData === null || timeLineData === void 0 ? void 0 : timeLineData.length) > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(timeline/* default */.Z, {
|
||||
mode: "left",
|
||||
items: timeLineData
|
||||
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
style: {
|
||||
textAlign: 'center',
|
||||
marginTop: 10
|
||||
},
|
||||
children: "\u6682\u65E0\u6570\u636E\uFF5E"
|
||||
})
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
|
||||
close: true,
|
||||
data: previewData === null || previewData === void 0 ? void 0 : previewData.content,
|
||||
type: previewData === null || previewData === void 0 ? void 0 : previewData.type,
|
||||
hasMask: true,
|
||||
monacoEditor: {
|
||||
value: monacoValueRef.current,
|
||||
language: "txt",
|
||||
onChange: function onChange() {},
|
||||
options: {
|
||||
readOnly: true,
|
||||
fontSize: 14,
|
||||
minimap: {
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
},
|
||||
onImgDimensions: null,
|
||||
onClose: function onClose() {
|
||||
setPreviewData({
|
||||
content: "",
|
||||
type: ""
|
||||
});
|
||||
}
|
||||
})]
|
||||
})
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var Review = (Journal);
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
@ -0,0 +1,833 @@
|
||||
"use strict";
|
||||
(self["webpackChunk"] = self["webpackChunk"] || []).push([[62369],{
|
||||
|
||||
/***/ 39970:
|
||||
/*!**********************************************************************!*\
|
||||
!*** ./src/pages/Magazinejor/component/Review/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 */ Review; }
|
||||
});
|
||||
|
||||
// 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/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/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: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
|
||||
var es_form = __webpack_require__(78241);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
||||
var message = __webpack_require__(8591);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/timeline/index.js + 5 modules
|
||||
var timeline = __webpack_require__(10777);
|
||||
// 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/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/spin/index.js + 1 modules
|
||||
var spin = __webpack_require__(71418);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
||||
var table = __webpack_require__(36546);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
||||
var pagination = __webpack_require__(19871);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
|
||||
var row = __webpack_require__(95237);
|
||||
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
|
||||
var col = __webpack_require__(43604);
|
||||
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
||||
var _umi_production_exports = __webpack_require__(88271);
|
||||
;// CONCATENATED MODULE: ./src/pages/Magazinejor/component/Review/index.less?modules
|
||||
// extracted by mini-css-extract-plugin
|
||||
/* harmony default export */ var Reviewmodules = ({"Onerow":"Onerow___NdM9a","MultiLine":"MultiLine___uuzwm","wrap":"wrap___tUKGt","topWrap":"topWrap___b3T_x","title":"title___P7I3N","searchStyle":"searchStyle___iao6K","search":"search___JG596","searchIcon":"searchIcon___nHNTo","tableWrap":"tableWrap___KqyjW","TitleStyle":"TitleStyle___mIzD0","tagSty":"tagSty___rXFdo","resonSty":"resonSty___koBVP","detailMcont":"detailMcont___j2jVO","label":"label___Jg6S8","info":"info___peHPA"});
|
||||
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.13@dayjs/dayjs.min.js
|
||||
var dayjs_min = __webpack_require__(61186);
|
||||
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
||||
// EXTERNAL MODULE: ./src/service/magazine.tsx
|
||||
var magazine = __webpack_require__(20103);
|
||||
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
||||
var NoData = __webpack_require__(63017);
|
||||
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 3 modules
|
||||
var PreviewAll = __webpack_require__(97672);
|
||||
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
||||
var fetch = __webpack_require__(82710);
|
||||
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
||||
var jsx_runtime = __webpack_require__(37712);
|
||||
;// CONCATENATED MODULE: ./src/pages/Magazinejor/component/Review/index.tsx
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var Journal = function Journal() {
|
||||
var _detailRecord$attachm2, _detailRecord$audit_p, _statusColor16, _detailRecord$audit_p2, _statusColor17, _detailRecord$audit_p3, _statusColor18, _detailRecord$audit_p4, _statusColor19, _detailRecord$audit_p5, _detailRecord$audit_p6, _detailRecord$audit_p7, _detailRecord$audit_p8, _statusColor20, _detailRecord$audit_p9, _detailRecord$audit_p10, _statusColor21, _detailRecord$audit_p11, _statusColor22, _detailRecord$audit_p12, _statusColor23, _detailRecord$audit_p13, _statusColor24, _detailRecord$audit_p14, _detailRecord$audit_p15, _detailRecord$audit_p16, _detailRecord$audit_p17, _statusColor25, _detailRecord$audit_p18, _detailRecord$audit_p19, _statusColor26, _detailRecord$audit_p20, _statusColor27, _detailRecord$audit_p21, _statusColor28, _detailRecord$audit_p22, _statusColor29, _detailRecord$audit_p23, _detailRecord$audit_p24, _detailRecord$audit_p25, _detailRecord$audit_p26, _statusColor30, _detailRecord$audit_p27;
|
||||
var urlParams = (0,_umi_production_exports.useParams)();
|
||||
var _useState = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState2 = slicedToArray_default()(_useState, 2),
|
||||
loading = _useState2[0],
|
||||
setLoading = _useState2[1];
|
||||
var _Form$useForm = es_form/* default */.Z.useForm(),
|
||||
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
||||
form = _Form$useForm2[0];
|
||||
var _useState3 = (0,_react_17_0_2_react.useState)(0),
|
||||
_useState4 = slicedToArray_default()(_useState3, 2),
|
||||
total = _useState4[0],
|
||||
setTotal = _useState4[1];
|
||||
var _useState5 = (0,_react_17_0_2_react.useState)([]),
|
||||
_useState6 = slicedToArray_default()(_useState5, 2),
|
||||
data = _useState6[0],
|
||||
setData = _useState6[1];
|
||||
var _useState7 = (0,_react_17_0_2_react.useState)(''),
|
||||
_useState8 = slicedToArray_default()(_useState7, 2),
|
||||
keyword = _useState8[0],
|
||||
setKeyword = _useState8[1];
|
||||
var _useState9 = (0,_react_17_0_2_react.useState)(false),
|
||||
_useState10 = slicedToArray_default()(_useState9, 2),
|
||||
timeLineVis = _useState10[0],
|
||||
setTimeLineVis = _useState10[1];
|
||||
var _useState11 = (0,_react_17_0_2_react.useState)([]),
|
||||
_useState12 = slicedToArray_default()(_useState11, 2),
|
||||
timeLineData = _useState12[0],
|
||||
setTimeLineData = _useState12[1];
|
||||
// const [refuseReason, setRefuseReason] = useState<string>('');
|
||||
var _useState13 = (0,_react_17_0_2_react.useState)({
|
||||
page: 1,
|
||||
limit: 10
|
||||
}),
|
||||
_useState14 = slicedToArray_default()(_useState13, 2),
|
||||
params = _useState14[0],
|
||||
setParams = _useState14[1];
|
||||
var _useState15 = (0,_react_17_0_2_react.useState)({
|
||||
content: "",
|
||||
type: ""
|
||||
}),
|
||||
_useState16 = slicedToArray_default()(_useState15, 2),
|
||||
previewData = _useState16[0],
|
||||
setPreviewData = _useState16[1];
|
||||
var monacoValueRef = (0,_react_17_0_2_react.useRef)();
|
||||
var _useState17 = (0,_react_17_0_2_react.useState)({}),
|
||||
_useState18 = slicedToArray_default()(_useState17, 2),
|
||||
detailRecord = _useState18[0],
|
||||
setDetailRecord = _useState18[1];
|
||||
var getData = /*#__PURE__*/function () {
|
||||
var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
||||
var res, _res$data, _res$data2;
|
||||
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
||||
while (1) switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
setLoading(true);
|
||||
_context.next = 3;
|
||||
return (0,magazine/* getReviewList */.t_)(objectSpread2_default()(objectSpread2_default()({
|
||||
id: 1
|
||||
}, params), {}, {
|
||||
keyword: keyword
|
||||
}));
|
||||
case 3:
|
||||
res = _context.sent;
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
||||
setData((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) || 0);
|
||||
}
|
||||
setLoading(false);
|
||||
case 6:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}, _callee);
|
||||
}));
|
||||
return function getData() {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
var getProgressData = /*#__PURE__*/function () {
|
||||
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(article_id) {
|
||||
var res, _res$data3, tempData;
|
||||
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
||||
while (1) switch (_context2.prev = _context2.next) {
|
||||
case 0:
|
||||
_context2.next = 2;
|
||||
return (0,magazine/* getReviewProgress */.lp)({
|
||||
id: 1,
|
||||
article_id: article_id
|
||||
});
|
||||
case 2:
|
||||
res = _context2.sent;
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
||||
tempData = res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.map(function (item, index) {
|
||||
var color = (item === null || item === void 0 ? void 0 : item.status) == 'pending' ? '#3061D0' : (item === null || item === void 0 ? void 0 : item.status) == 'approved' ? '#00B187' : (item === null || item === void 0 ? void 0 : item.status) == 'rejected' ? '#ADB2B8' : (item === null || item === void 0 ? void 0 : item.status) == 'unstart' ? '#FA6400' : '#00CCFF';
|
||||
return {
|
||||
label: item !== null && item !== void 0 && item.audit_at ? dayjs_min_default()(item === null || item === void 0 ? void 0 : item.audit_at).format('YYYY-MM-DD HH:mm') : '--',
|
||||
color: color,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
||||
children: (item === null || item === void 0 ? void 0 : item.user_name) || '--'
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
||||
children: [(item === null || item === void 0 ? void 0 : item.status) == 'pending' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#3061D0'
|
||||
},
|
||||
children: "\u5BA1\u6838\u4E2D"
|
||||
}), (item === null || item === void 0 ? void 0 : item.status) == 'approved' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#00B187'
|
||||
},
|
||||
children: "\u5DF2\u901A\u8FC7"
|
||||
}), (item === null || item === void 0 ? void 0 : item.status) == 'rejected' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#ADB2B8'
|
||||
},
|
||||
children: "\u5DF2\u62D2\u7EDD"
|
||||
}), (item === null || item === void 0 ? void 0 : item.status) == 'unstart' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#FA6400'
|
||||
},
|
||||
children: "\u5F85\u5BA1\u6838"
|
||||
}), (item === null || item === void 0 ? void 0 : item.status) == 'submited' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#00CCFF'
|
||||
},
|
||||
children: "\u63D0\u4EA4"
|
||||
})]
|
||||
})]
|
||||
})
|
||||
};
|
||||
});
|
||||
setTimeLineData(tempData || []);
|
||||
}
|
||||
case 4:
|
||||
case "end":
|
||||
return _context2.stop();
|
||||
}
|
||||
}, _callee2);
|
||||
}));
|
||||
return function getProgressData(_x) {
|
||||
return _ref2.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
(0,_react_17_0_2_react.useEffect)(function () {
|
||||
getData();
|
||||
}, []);
|
||||
var preview = /*#__PURE__*/function () {
|
||||
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(item) {
|
||||
var res;
|
||||
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
||||
while (1) switch (_context3.prev = _context3.next) {
|
||||
case 0:
|
||||
if (!(item.file_type === "txt")) {
|
||||
_context3.next = 5;
|
||||
break;
|
||||
}
|
||||
_context3.next = 3;
|
||||
return (0,fetch/* default */.ZP)(item.url, {
|
||||
method: "get",
|
||||
headers: {
|
||||
"Content-Type": "application/xml"
|
||||
}
|
||||
});
|
||||
case 3:
|
||||
res = _context3.sent;
|
||||
monacoValueRef.current = res;
|
||||
case 5:
|
||||
setPreviewData({
|
||||
type: item.file_type,
|
||||
content: item.url
|
||||
});
|
||||
case 6:
|
||||
case "end":
|
||||
return _context3.stop();
|
||||
}
|
||||
}, _callee3);
|
||||
}));
|
||||
return function preview(_x2) {
|
||||
return _ref3.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
var approveOrRefuse = /*#__PURE__*/function () {
|
||||
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(id, status, reject_reason) {
|
||||
var res;
|
||||
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
||||
while (1) switch (_context4.prev = _context4.next) {
|
||||
case 0:
|
||||
_context4.next = 2;
|
||||
return (0,magazine/* getMagazinCheck */.BL)({
|
||||
id: id,
|
||||
reject_reason: reject_reason,
|
||||
status: status
|
||||
});
|
||||
case 2:
|
||||
res = _context4.sent;
|
||||
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
||||
message/* default */.ZP.success('操作成功');
|
||||
// setRefuseReason('');
|
||||
getData();
|
||||
}
|
||||
case 4:
|
||||
case "end":
|
||||
return _context4.stop();
|
||||
}
|
||||
}, _callee4);
|
||||
}));
|
||||
return function approveOrRefuse(_x3, _x4, _x5) {
|
||||
return _ref4.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
var statusColor = {
|
||||
pending: {
|
||||
text: '审核中',
|
||||
color: '#FFA30A',
|
||||
bgcolor: "rgba(255,189,51,0.17)",
|
||||
dot: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
||||
src: __webpack_require__(/*! ../../img/pending.png */ 70031),
|
||||
width: 15
|
||||
})
|
||||
},
|
||||
unstart: {
|
||||
text: '待审核',
|
||||
color: '#FFA30A',
|
||||
bgcolor: "rgba(255,189,51,0.17)",
|
||||
dot: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
||||
src: __webpack_require__(/*! ../../img/pending.png */ 70031),
|
||||
width: 15
|
||||
})
|
||||
},
|
||||
approved: {
|
||||
text: '已同意',
|
||||
color: '#52C41A',
|
||||
bgcolor: "rgba(84,196,28,0.11)",
|
||||
dot: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
||||
src: __webpack_require__(/*! ../../img/approve.png */ 48163),
|
||||
width: 15
|
||||
})
|
||||
},
|
||||
rejected: {
|
||||
text: '已拒绝',
|
||||
color: '#FF4527',
|
||||
bgcolor: "rgba(255,79,51,0.17)",
|
||||
dot: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
||||
src: __webpack_require__(/*! ../../img/refuse.png */ 27772),
|
||||
width: 15
|
||||
})
|
||||
}
|
||||
};
|
||||
var columns = [{
|
||||
title: '标题',
|
||||
dataIndex: 'title',
|
||||
width: '20%',
|
||||
ellipsis: true,
|
||||
align: 'left',
|
||||
render: function render(text, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#17265F'
|
||||
},
|
||||
children: text || '--'
|
||||
});
|
||||
}
|
||||
}, {
|
||||
title: '投稿栏目',
|
||||
dataIndex: 'category_name',
|
||||
width: '10%',
|
||||
ellipsis: true,
|
||||
render: function render(text, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#17265F'
|
||||
},
|
||||
children: text || '--'
|
||||
});
|
||||
}
|
||||
}, {
|
||||
title: '投稿人',
|
||||
dataIndex: 'author_name',
|
||||
width: '10%',
|
||||
ellipsis: true,
|
||||
render: function render(text, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#17265F'
|
||||
},
|
||||
children: text || '--'
|
||||
});
|
||||
}
|
||||
}, {
|
||||
title: '审核进度',
|
||||
width: '18%',
|
||||
dataIndex: 'status',
|
||||
render: function render(text, record) {
|
||||
var _record$audit_progres, _statusColor, _record$audit_progres2, _statusColor2, _record$audit_progres3, _statusColor3, _record$audit_progres4, _statusColor4, _record$audit_progres5, _statusColor5, _record$audit_progres6, _record$audit_progres7, _statusColor6, _record$audit_progres8, _statusColor7, _record$audit_progres9, _statusColor8, _record$audit_progres10, _statusColor9, _record$audit_progres11, _statusColor10, _record$audit_progres12, _record$audit_progres13, _statusColor11, _record$audit_progres14, _statusColor12, _record$audit_progres15, _statusColor13, _record$audit_progres16, _statusColor14, _record$audit_progres17, _statusColor15, _record$audit_progres18;
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)(timeline/* default */.Z, {
|
||||
items: [{
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
||||
children: [record === null || record === void 0 || (_record$audit_progres = record.audit_progress) === null || _record$audit_progres === void 0 || (_record$audit_progres = _record$audit_progres[0]) === null || _record$audit_progres === void 0 ? void 0 : _record$audit_progres.level_name, " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: Reviewmodules.tagSty,
|
||||
style: {
|
||||
color: (_statusColor = statusColor[(record === null || record === void 0 || (_record$audit_progres2 = record.audit_progress) === null || _record$audit_progres2 === void 0 || (_record$audit_progres2 = _record$audit_progres2[0]) === null || _record$audit_progres2 === void 0 ? void 0 : _record$audit_progres2.status) || 'pending']) === null || _statusColor === void 0 ? void 0 : _statusColor.color,
|
||||
border: "1px solid ".concat((_statusColor2 = statusColor[(record === null || record === void 0 || (_record$audit_progres3 = record.audit_progress) === null || _record$audit_progres3 === void 0 || (_record$audit_progres3 = _record$audit_progres3[0]) === null || _record$audit_progres3 === void 0 ? void 0 : _record$audit_progres3.status) || 'pending']) === null || _statusColor2 === void 0 ? void 0 : _statusColor2.color),
|
||||
background: (_statusColor3 = statusColor[(record === null || record === void 0 || (_record$audit_progres4 = record.audit_progress) === null || _record$audit_progres4 === void 0 || (_record$audit_progres4 = _record$audit_progres4[0]) === null || _record$audit_progres4 === void 0 ? void 0 : _record$audit_progres4.status) || 'pengding']) === null || _statusColor3 === void 0 ? void 0 : _statusColor3.bgcolor
|
||||
},
|
||||
children: (_statusColor4 = statusColor[(record === null || record === void 0 || (_record$audit_progres5 = record.audit_progress) === null || _record$audit_progres5 === void 0 || (_record$audit_progres5 = _record$audit_progres5[0]) === null || _record$audit_progres5 === void 0 ? void 0 : _record$audit_progres5.status) || 'pending']) === null || _statusColor4 === void 0 ? void 0 : _statusColor4.text
|
||||
})]
|
||||
}),
|
||||
dot: (_statusColor5 = statusColor[(record === null || record === void 0 || (_record$audit_progres6 = record.audit_progress) === null || _record$audit_progres6 === void 0 || (_record$audit_progres6 = _record$audit_progres6[0]) === null || _record$audit_progres6 === void 0 ? void 0 : _record$audit_progres6.status) || 'pending']) === null || _statusColor5 === void 0 ? void 0 : _statusColor5.dot
|
||||
}, {
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
||||
children: [record === null || record === void 0 || (_record$audit_progres7 = record.audit_progress) === null || _record$audit_progres7 === void 0 || (_record$audit_progres7 = _record$audit_progres7[1]) === null || _record$audit_progres7 === void 0 ? void 0 : _record$audit_progres7.level_name, " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: Reviewmodules.tagSty,
|
||||
style: {
|
||||
color: (_statusColor6 = statusColor[(record === null || record === void 0 || (_record$audit_progres8 = record.audit_progress) === null || _record$audit_progres8 === void 0 || (_record$audit_progres8 = _record$audit_progres8[1]) === null || _record$audit_progres8 === void 0 ? void 0 : _record$audit_progres8.status) || 'pending']) === null || _statusColor6 === void 0 ? void 0 : _statusColor6.color,
|
||||
border: "1px solid ".concat((_statusColor7 = statusColor[(record === null || record === void 0 || (_record$audit_progres9 = record.audit_progress) === null || _record$audit_progres9 === void 0 || (_record$audit_progres9 = _record$audit_progres9[1]) === null || _record$audit_progres9 === void 0 ? void 0 : _record$audit_progres9.status) || 'pending']) === null || _statusColor7 === void 0 ? void 0 : _statusColor7.color),
|
||||
background: (_statusColor8 = statusColor[(record === null || record === void 0 || (_record$audit_progres10 = record.audit_progress) === null || _record$audit_progres10 === void 0 || (_record$audit_progres10 = _record$audit_progres10[1]) === null || _record$audit_progres10 === void 0 ? void 0 : _record$audit_progres10.status) || 'pengding']) === null || _statusColor8 === void 0 ? void 0 : _statusColor8.bgcolor
|
||||
},
|
||||
children: (_statusColor9 = statusColor[(record === null || record === void 0 || (_record$audit_progres11 = record.audit_progress) === null || _record$audit_progres11 === void 0 || (_record$audit_progres11 = _record$audit_progres11[1]) === null || _record$audit_progres11 === void 0 ? void 0 : _record$audit_progres11.status) || 'pending']) === null || _statusColor9 === void 0 ? void 0 : _statusColor9.text
|
||||
})]
|
||||
}),
|
||||
dot: (_statusColor10 = statusColor[(record === null || record === void 0 || (_record$audit_progres12 = record.audit_progress) === null || _record$audit_progres12 === void 0 || (_record$audit_progres12 = _record$audit_progres12[1]) === null || _record$audit_progres12 === void 0 ? void 0 : _record$audit_progres12.status) || 'pending']) === null || _statusColor10 === void 0 ? void 0 : _statusColor10.dot
|
||||
}, {
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
||||
children: [record === null || record === void 0 || (_record$audit_progres13 = record.audit_progress) === null || _record$audit_progres13 === void 0 || (_record$audit_progres13 = _record$audit_progres13[2]) === null || _record$audit_progres13 === void 0 ? void 0 : _record$audit_progres13.level_name, " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: Reviewmodules.tagSty,
|
||||
style: {
|
||||
color: (_statusColor11 = statusColor[(record === null || record === void 0 || (_record$audit_progres14 = record.audit_progress) === null || _record$audit_progres14 === void 0 || (_record$audit_progres14 = _record$audit_progres14[2]) === null || _record$audit_progres14 === void 0 ? void 0 : _record$audit_progres14.status) || 'pending']) === null || _statusColor11 === void 0 ? void 0 : _statusColor11.color,
|
||||
border: "1px solid ".concat((_statusColor12 = statusColor[(record === null || record === void 0 || (_record$audit_progres15 = record.audit_progress) === null || _record$audit_progres15 === void 0 || (_record$audit_progres15 = _record$audit_progres15[2]) === null || _record$audit_progres15 === void 0 ? void 0 : _record$audit_progres15.status) || 'pending']) === null || _statusColor12 === void 0 ? void 0 : _statusColor12.color),
|
||||
background: (_statusColor13 = statusColor[(record === null || record === void 0 || (_record$audit_progres16 = record.audit_progress) === null || _record$audit_progres16 === void 0 || (_record$audit_progres16 = _record$audit_progres16[2]) === null || _record$audit_progres16 === void 0 ? void 0 : _record$audit_progres16.status) || 'pengding']) === null || _statusColor13 === void 0 ? void 0 : _statusColor13.bgcolor
|
||||
},
|
||||
children: (_statusColor14 = statusColor[(record === null || record === void 0 || (_record$audit_progres17 = record.audit_progress) === null || _record$audit_progres17 === void 0 || (_record$audit_progres17 = _record$audit_progres17[2]) === null || _record$audit_progres17 === void 0 ? void 0 : _record$audit_progres17.status) || 'pending']) === null || _statusColor14 === void 0 ? void 0 : _statusColor14.text
|
||||
})]
|
||||
}),
|
||||
dot: (_statusColor15 = statusColor[(record === null || record === void 0 || (_record$audit_progres18 = record.audit_progress) === null || _record$audit_progres18 === void 0 || (_record$audit_progres18 = _record$audit_progres18[2]) === null || _record$audit_progres18 === void 0 ? void 0 : _record$audit_progres18.status) || 'pending']) === null || _statusColor15 === void 0 ? void 0 : _statusColor15.dot
|
||||
}]
|
||||
});
|
||||
// switch (text) {
|
||||
// case 'pending':
|
||||
// return <span style={{ color: '#3061D0' }}>审核中</span>;
|
||||
// case 'approved':
|
||||
// return <span style={{ color: '#00B187' }}>已通过</span>;
|
||||
// case 'rejected':
|
||||
// return <span style={{ color: '#ADB2B8' }}>已拒绝</span>;
|
||||
// case 'unstart':
|
||||
// return <span style={{ color: '#FA6400' }}>待审核</span>;
|
||||
// }
|
||||
}
|
||||
}, {
|
||||
title: '上传附件',
|
||||
dataIndex: 'attachment',
|
||||
width: '12%',
|
||||
ellipsis: true,
|
||||
render: function render(text, record) {
|
||||
var _record$attachment2;
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#418DFF',
|
||||
cursor: 'pointer'
|
||||
},
|
||||
onClick: function onClick() {
|
||||
var _record$attachment;
|
||||
if (record !== null && record !== void 0 && (_record$attachment = record.attachment) !== null && _record$attachment !== void 0 && _record$attachment.url) {
|
||||
// openNewWindow(record?.attachment?.url)
|
||||
preview(record === null || record === void 0 ? void 0 : record.attachment);
|
||||
}
|
||||
},
|
||||
children: (record === null || record === void 0 || (_record$attachment2 = record.attachment) === null || _record$attachment2 === void 0 ? void 0 : _record$attachment2.title) || '--'
|
||||
});
|
||||
}
|
||||
}, {
|
||||
title: '提交日期',
|
||||
width: '15%',
|
||||
dataIndex: 'submit_at',
|
||||
ellipsis: true,
|
||||
render: function render(text) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#17265F'
|
||||
},
|
||||
children: text ? dayjs_min_default()(text).format('YYYY-MM-DD HH:mm') : '--'
|
||||
});
|
||||
}
|
||||
}, {
|
||||
title: '操作',
|
||||
align: 'right',
|
||||
width: '15%',
|
||||
dataIndex: 'created_at',
|
||||
render: function render(text, record) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
||||
type: "link",
|
||||
style: {
|
||||
color: '#3D60D1',
|
||||
padding: 0
|
||||
},
|
||||
onClick: function onClick() {
|
||||
setDetailRecord(record);
|
||||
setTimeLineVis(true);
|
||||
},
|
||||
children: "\u8BE6\u60C5"
|
||||
}), (record === null || record === void 0 ? void 0 : record.can_reviewed) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
||||
type: "link",
|
||||
style: {
|
||||
color: '#3D60D1',
|
||||
padding: 0,
|
||||
marginLeft: '10px'
|
||||
},
|
||||
onClick: function onClick() {
|
||||
modal/* default */.Z.confirm({
|
||||
title: '同意投稿',
|
||||
width: 550,
|
||||
centered: true,
|
||||
closable: true,
|
||||
icon: null,
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
onOk: function () {
|
||||
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
||||
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
||||
while (1) switch (_context5.prev = _context5.next) {
|
||||
case 0:
|
||||
_context5.next = 2;
|
||||
return approveOrRefuse(record === null || record === void 0 ? void 0 : record.id, 'approved', '');
|
||||
case 2:
|
||||
case "end":
|
||||
return _context5.stop();
|
||||
}
|
||||
}, _callee5);
|
||||
}));
|
||||
function onOk() {
|
||||
return _onOk.apply(this, arguments);
|
||||
}
|
||||
return onOk;
|
||||
}(),
|
||||
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
style: {
|
||||
color: '#000'
|
||||
},
|
||||
children: "\u786E\u5B9A\u540C\u610F\u6295\u7A3F\u5417\uFF1F"
|
||||
})
|
||||
});
|
||||
},
|
||||
children: "\u540C\u610F"
|
||||
}), (record === null || record === void 0 ? void 0 : record.can_reviewed) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
||||
type: "link",
|
||||
style: {
|
||||
color: '#3D60D1',
|
||||
padding: 0,
|
||||
marginLeft: '10px'
|
||||
},
|
||||
onClick: function onClick() {
|
||||
var refuseReason = '';
|
||||
modal/* default */.Z.info({
|
||||
title: '拒绝原因',
|
||||
width: 560,
|
||||
centered: true,
|
||||
closable: true,
|
||||
icon: null,
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
onOk: function () {
|
||||
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
||||
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
||||
while (1) switch (_context6.prev = _context6.next) {
|
||||
case 0:
|
||||
if (refuseReason) {
|
||||
_context6.next = 3;
|
||||
break;
|
||||
}
|
||||
message/* default */.ZP.info('请输入拒绝原因');
|
||||
return _context6.abrupt("return");
|
||||
case 3:
|
||||
_context6.next = 5;
|
||||
return approveOrRefuse(record === null || record === void 0 ? void 0 : record.id, 'rejected', refuseReason);
|
||||
case 5:
|
||||
case "end":
|
||||
return _context6.stop();
|
||||
}
|
||||
}, _callee6);
|
||||
}));
|
||||
function onOk() {
|
||||
return _onOk2.apply(this, arguments);
|
||||
}
|
||||
return onOk;
|
||||
}(),
|
||||
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
style: {
|
||||
color: "#5F6367",
|
||||
marginBottom: '10px'
|
||||
},
|
||||
children: "\u539F\u56E0"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.TextArea, {
|
||||
rows: 4,
|
||||
placeholder: "\u8BF7\u8F93\u5165\u62D2\u7EDD\u539F\u56E0",
|
||||
onChange: function onChange(e) {
|
||||
console.log(e);
|
||||
refuseReason = e.target.value;
|
||||
// setRefuseReason(e.target.value);
|
||||
}
|
||||
})
|
||||
})]
|
||||
})
|
||||
});
|
||||
},
|
||||
children: "\u62D2\u7EDD"
|
||||
})]
|
||||
});
|
||||
}
|
||||
}];
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
|
||||
spinning: loading,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Reviewmodules.wrap,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Reviewmodules.topWrap,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
||||
src: __webpack_require__(/*! ../../img/time.png */ 69871),
|
||||
width: 19
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: Reviewmodules.title,
|
||||
children: "\u6295\u7A3F\u5BA1\u6838"
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
||||
placeholder: "\u8BF7\u8F93\u5165\u6807\u9898\u8FDB\u884C\u641C\u7D22",
|
||||
size: "large",
|
||||
className: Reviewmodules.search,
|
||||
onChange: function onChange(e) {
|
||||
return setKeyword(e.target.value);
|
||||
},
|
||||
onSearch: function onSearch(value) {
|
||||
return setKeyword(value);
|
||||
},
|
||||
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
||||
className: "iconfont icon-sousuo9 font14 ".concat(Reviewmodules.searchIcon),
|
||||
onClick: function onClick() {
|
||||
getData();
|
||||
}
|
||||
})
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
||||
className: Reviewmodules.tableWrap,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
||||
className: "".concat(Reviewmodules.TitleStyle),
|
||||
dataSource: data,
|
||||
columns: columns,
|
||||
bordered: false,
|
||||
size: "large",
|
||||
locale: {
|
||||
emptyText: /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {})
|
||||
},
|
||||
pagination: false
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
||||
className: "mt20",
|
||||
defaultCurrent: 1,
|
||||
current: params.page || 1,
|
||||
defaultPageSize: 10,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
showTotal: function showTotal(total) {
|
||||
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
||||
children: ["\u5171 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
style: {
|
||||
color: '#3061d0'
|
||||
},
|
||||
children: total
|
||||
}), " \u6761\u6570\u636E"]
|
||||
});
|
||||
},
|
||||
total: total,
|
||||
onChange: function onChange(page, pageSize) {
|
||||
params.page = page;
|
||||
params.limit = pageSize;
|
||||
setParams(objectSpread2_default()({}, params));
|
||||
getData();
|
||||
}
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
||||
title: "\u6295\u7A3F\u8BE6\u60C5",
|
||||
open: timeLineVis,
|
||||
width: 755,
|
||||
onOk: function onOk() {
|
||||
setTimeLineVis(false);
|
||||
},
|
||||
onCancel: function onCancel() {
|
||||
setTimeLineVis(false);
|
||||
},
|
||||
className: Reviewmodules.timeLineSty,
|
||||
maskClosable: false,
|
||||
centered: true,
|
||||
footer: null,
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Reviewmodules.detailMcont,
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
className: Reviewmodules.label,
|
||||
children: "\u6807\u9898"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
className: Reviewmodules.info,
|
||||
children: (detailRecord === null || detailRecord === void 0 ? void 0 : detailRecord.title) || '--'
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
className: Reviewmodules.label,
|
||||
children: "\u680F\u76EE"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
className: Reviewmodules.info,
|
||||
children: (detailRecord === null || detailRecord === void 0 ? void 0 : detailRecord.category_name) || '--'
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
className: Reviewmodules.label,
|
||||
children: "\u6295\u7A3F\u65F6\u95F4"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
className: Reviewmodules.info,
|
||||
children: detailRecord !== null && detailRecord !== void 0 && detailRecord.submit_at ? dayjs_min_default()(detailRecord === null || detailRecord === void 0 ? void 0 : detailRecord.submit_at).format('YYYY-MM-DD HH:mm') : '--'
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
className: Reviewmodules.label,
|
||||
children: "\u9644\u4EF6"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
className: Reviewmodules.info,
|
||||
style: {
|
||||
color: '#418DFF',
|
||||
cursor: 'pointer'
|
||||
},
|
||||
onClick: function onClick() {
|
||||
var _detailRecord$attachm;
|
||||
if (detailRecord !== null && detailRecord !== void 0 && (_detailRecord$attachm = detailRecord.attachment) !== null && _detailRecord$attachm !== void 0 && _detailRecord$attachm.url) {
|
||||
// openNewWindow(record?.attachment?.url)
|
||||
preview(detailRecord === null || detailRecord === void 0 ? void 0 : detailRecord.attachment);
|
||||
}
|
||||
},
|
||||
children: (detailRecord === null || detailRecord === void 0 || (_detailRecord$attachm2 = detailRecord.attachment) === null || _detailRecord$attachm2 === void 0 ? void 0 : _detailRecord$attachm2.title) || '--'
|
||||
})]
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
className: Reviewmodules.label,
|
||||
children: "\u5BA1\u6838\u8FDB\u5EA6"
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
||||
className: Reviewmodules.info,
|
||||
style: {
|
||||
padding: '10px'
|
||||
},
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsx)(timeline/* default */.Z, {
|
||||
items: [{
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
||||
children: [detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p = detailRecord.audit_progress) === null || _detailRecord$audit_p === void 0 || (_detailRecord$audit_p = _detailRecord$audit_p[0]) === null || _detailRecord$audit_p === void 0 ? void 0 : _detailRecord$audit_p.level_name, " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: Reviewmodules.tagSty,
|
||||
style: {
|
||||
color: (_statusColor16 = statusColor[(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p2 = detailRecord.audit_progress) === null || _detailRecord$audit_p2 === void 0 || (_detailRecord$audit_p2 = _detailRecord$audit_p2[0]) === null || _detailRecord$audit_p2 === void 0 ? void 0 : _detailRecord$audit_p2.status) || 'pending']) === null || _statusColor16 === void 0 ? void 0 : _statusColor16.color,
|
||||
border: "1px solid ".concat((_statusColor17 = statusColor[(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p3 = detailRecord.audit_progress) === null || _detailRecord$audit_p3 === void 0 || (_detailRecord$audit_p3 = _detailRecord$audit_p3[0]) === null || _detailRecord$audit_p3 === void 0 ? void 0 : _detailRecord$audit_p3.status) || 'pending']) === null || _statusColor17 === void 0 ? void 0 : _statusColor17.color),
|
||||
background: (_statusColor18 = statusColor[(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p4 = detailRecord.audit_progress) === null || _detailRecord$audit_p4 === void 0 || (_detailRecord$audit_p4 = _detailRecord$audit_p4[0]) === null || _detailRecord$audit_p4 === void 0 ? void 0 : _detailRecord$audit_p4.status) || 'pengding']) === null || _statusColor18 === void 0 ? void 0 : _statusColor18.bgcolor
|
||||
},
|
||||
children: (_statusColor19 = statusColor[(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p5 = detailRecord.audit_progress) === null || _detailRecord$audit_p5 === void 0 || (_detailRecord$audit_p5 = _detailRecord$audit_p5[0]) === null || _detailRecord$audit_p5 === void 0 ? void 0 : _detailRecord$audit_p5.status) || 'pending']) === null || _statusColor19 === void 0 ? void 0 : _statusColor19.text
|
||||
})]
|
||||
}), (detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p6 = detailRecord.audit_progress) === null || _detailRecord$audit_p6 === void 0 || (_detailRecord$audit_p6 = _detailRecord$audit_p6[0]) === null || _detailRecord$audit_p6 === void 0 ? void 0 : _detailRecord$audit_p6.status) === 'rejected' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Reviewmodules.resonSty,
|
||||
title: "\u9A73\u56DE\u539F\u56E0\uFF1A".concat(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p7 = detailRecord.audit_progress) === null || _detailRecord$audit_p7 === void 0 || (_detailRecord$audit_p7 = _detailRecord$audit_p7[0]) === null || _detailRecord$audit_p7 === void 0 ? void 0 : _detailRecord$audit_p7.comment),
|
||||
children: ["\u9A73\u56DE\u539F\u56E0\uFF1A", detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p8 = detailRecord.audit_progress) === null || _detailRecord$audit_p8 === void 0 || (_detailRecord$audit_p8 = _detailRecord$audit_p8[0]) === null || _detailRecord$audit_p8 === void 0 ? void 0 : _detailRecord$audit_p8.comment]
|
||||
})]
|
||||
}),
|
||||
dot: (_statusColor20 = statusColor[(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p9 = detailRecord.audit_progress) === null || _detailRecord$audit_p9 === void 0 || (_detailRecord$audit_p9 = _detailRecord$audit_p9[0]) === null || _detailRecord$audit_p9 === void 0 ? void 0 : _detailRecord$audit_p9.status) || 'pending']) === null || _statusColor20 === void 0 ? void 0 : _statusColor20.dot
|
||||
}, {
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
||||
children: [detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p10 = detailRecord.audit_progress) === null || _detailRecord$audit_p10 === void 0 || (_detailRecord$audit_p10 = _detailRecord$audit_p10[1]) === null || _detailRecord$audit_p10 === void 0 ? void 0 : _detailRecord$audit_p10.level_name, " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: Reviewmodules.tagSty,
|
||||
style: {
|
||||
color: (_statusColor21 = statusColor[(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p11 = detailRecord.audit_progress) === null || _detailRecord$audit_p11 === void 0 || (_detailRecord$audit_p11 = _detailRecord$audit_p11[1]) === null || _detailRecord$audit_p11 === void 0 ? void 0 : _detailRecord$audit_p11.status) || 'pending']) === null || _statusColor21 === void 0 ? void 0 : _statusColor21.color,
|
||||
border: "1px solid ".concat((_statusColor22 = statusColor[(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p12 = detailRecord.audit_progress) === null || _detailRecord$audit_p12 === void 0 || (_detailRecord$audit_p12 = _detailRecord$audit_p12[1]) === null || _detailRecord$audit_p12 === void 0 ? void 0 : _detailRecord$audit_p12.status) || 'pending']) === null || _statusColor22 === void 0 ? void 0 : _statusColor22.color),
|
||||
background: (_statusColor23 = statusColor[(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p13 = detailRecord.audit_progress) === null || _detailRecord$audit_p13 === void 0 || (_detailRecord$audit_p13 = _detailRecord$audit_p13[1]) === null || _detailRecord$audit_p13 === void 0 ? void 0 : _detailRecord$audit_p13.status) || 'pengding']) === null || _statusColor23 === void 0 ? void 0 : _statusColor23.bgcolor
|
||||
},
|
||||
children: (_statusColor24 = statusColor[(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p14 = detailRecord.audit_progress) === null || _detailRecord$audit_p14 === void 0 || (_detailRecord$audit_p14 = _detailRecord$audit_p14[1]) === null || _detailRecord$audit_p14 === void 0 ? void 0 : _detailRecord$audit_p14.status) || 'pending']) === null || _statusColor24 === void 0 ? void 0 : _statusColor24.text
|
||||
})]
|
||||
}), (detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p15 = detailRecord.audit_progress) === null || _detailRecord$audit_p15 === void 0 || (_detailRecord$audit_p15 = _detailRecord$audit_p15[1]) === null || _detailRecord$audit_p15 === void 0 ? void 0 : _detailRecord$audit_p15.status) === 'rejected' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Reviewmodules.resonSty,
|
||||
title: "\u9A73\u56DE\u539F\u56E0\uFF1A".concat(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p16 = detailRecord.audit_progress) === null || _detailRecord$audit_p16 === void 0 || (_detailRecord$audit_p16 = _detailRecord$audit_p16[1]) === null || _detailRecord$audit_p16 === void 0 ? void 0 : _detailRecord$audit_p16.comment),
|
||||
children: ["\u9A73\u56DE\u539F\u56E0\uFF1A", detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p17 = detailRecord.audit_progress) === null || _detailRecord$audit_p17 === void 0 || (_detailRecord$audit_p17 = _detailRecord$audit_p17[1]) === null || _detailRecord$audit_p17 === void 0 ? void 0 : _detailRecord$audit_p17.comment]
|
||||
})]
|
||||
}),
|
||||
dot: (_statusColor25 = statusColor[(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p18 = detailRecord.audit_progress) === null || _detailRecord$audit_p18 === void 0 || (_detailRecord$audit_p18 = _detailRecord$audit_p18[1]) === null || _detailRecord$audit_p18 === void 0 ? void 0 : _detailRecord$audit_p18.status) || 'pending']) === null || _statusColor25 === void 0 ? void 0 : _statusColor25.dot
|
||||
}, {
|
||||
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
||||
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
||||
children: [detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p19 = detailRecord.audit_progress) === null || _detailRecord$audit_p19 === void 0 || (_detailRecord$audit_p19 = _detailRecord$audit_p19[2]) === null || _detailRecord$audit_p19 === void 0 ? void 0 : _detailRecord$audit_p19.level_name, " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
||||
className: Reviewmodules.tagSty,
|
||||
style: {
|
||||
color: (_statusColor26 = statusColor[(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p20 = detailRecord.audit_progress) === null || _detailRecord$audit_p20 === void 0 || (_detailRecord$audit_p20 = _detailRecord$audit_p20[2]) === null || _detailRecord$audit_p20 === void 0 ? void 0 : _detailRecord$audit_p20.status) || 'pending']) === null || _statusColor26 === void 0 ? void 0 : _statusColor26.color,
|
||||
border: "1px solid ".concat((_statusColor27 = statusColor[(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p21 = detailRecord.audit_progress) === null || _detailRecord$audit_p21 === void 0 || (_detailRecord$audit_p21 = _detailRecord$audit_p21[2]) === null || _detailRecord$audit_p21 === void 0 ? void 0 : _detailRecord$audit_p21.status) || 'pending']) === null || _statusColor27 === void 0 ? void 0 : _statusColor27.color),
|
||||
background: (_statusColor28 = statusColor[(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p22 = detailRecord.audit_progress) === null || _detailRecord$audit_p22 === void 0 || (_detailRecord$audit_p22 = _detailRecord$audit_p22[2]) === null || _detailRecord$audit_p22 === void 0 ? void 0 : _detailRecord$audit_p22.status) || 'pengding']) === null || _statusColor28 === void 0 ? void 0 : _statusColor28.bgcolor
|
||||
},
|
||||
children: (_statusColor29 = statusColor[(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p23 = detailRecord.audit_progress) === null || _detailRecord$audit_p23 === void 0 || (_detailRecord$audit_p23 = _detailRecord$audit_p23[2]) === null || _detailRecord$audit_p23 === void 0 ? void 0 : _detailRecord$audit_p23.status) || 'pending']) === null || _statusColor29 === void 0 ? void 0 : _statusColor29.text
|
||||
})]
|
||||
}), (detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p24 = detailRecord.audit_progress) === null || _detailRecord$audit_p24 === void 0 || (_detailRecord$audit_p24 = _detailRecord$audit_p24[2]) === null || _detailRecord$audit_p24 === void 0 ? void 0 : _detailRecord$audit_p24.status) === 'rejected' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
||||
className: Reviewmodules.resonSty,
|
||||
title: "\u9A73\u56DE\u539F\u56E0\uFF1A".concat(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p25 = detailRecord.audit_progress) === null || _detailRecord$audit_p25 === void 0 || (_detailRecord$audit_p25 = _detailRecord$audit_p25[2]) === null || _detailRecord$audit_p25 === void 0 ? void 0 : _detailRecord$audit_p25.comment),
|
||||
children: ["\u9A73\u56DE\u539F\u56E0\uFF1A", detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p26 = detailRecord.audit_progress) === null || _detailRecord$audit_p26 === void 0 || (_detailRecord$audit_p26 = _detailRecord$audit_p26[2]) === null || _detailRecord$audit_p26 === void 0 ? void 0 : _detailRecord$audit_p26.comment]
|
||||
})]
|
||||
}),
|
||||
dot: (_statusColor30 = statusColor[(detailRecord === null || detailRecord === void 0 || (_detailRecord$audit_p27 = detailRecord.audit_progress) === null || _detailRecord$audit_p27 === void 0 || (_detailRecord$audit_p27 = _detailRecord$audit_p27[2]) === null || _detailRecord$audit_p27 === void 0 ? void 0 : _detailRecord$audit_p27.status) || 'pending']) === null || _statusColor30 === void 0 ? void 0 : _statusColor30.dot
|
||||
}]
|
||||
})
|
||||
})]
|
||||
})]
|
||||
})
|
||||
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
|
||||
close: true,
|
||||
data: previewData === null || previewData === void 0 ? void 0 : previewData.content,
|
||||
type: previewData === null || previewData === void 0 ? void 0 : previewData.type,
|
||||
hasMask: true,
|
||||
monacoEditor: {
|
||||
value: monacoValueRef.current,
|
||||
language: "txt",
|
||||
onChange: function onChange() {},
|
||||
options: {
|
||||
readOnly: true,
|
||||
fontSize: 14,
|
||||
minimap: {
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
},
|
||||
onImgDimensions: null,
|
||||
onClose: function onClose() {
|
||||
setPreviewData({
|
||||
content: "",
|
||||
type: ""
|
||||
});
|
||||
}
|
||||
})]
|
||||
})
|
||||
});
|
||||
};
|
||||
/* harmony default export */ var Review = (Journal);
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
|
After Width: | Height: | Size: 588 KiB |
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue