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.
561 lines
26 KiB
561 lines
26 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[29266],{
|
|
|
|
/***/ 29266:
|
|
/*!*****************************************************************************************!*\
|
|
!*** ./src/pages/Magazinejor/component/MonthlyDetailamins/prview/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 */ prview; }
|
|
});
|
|
|
|
// 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__(25789);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/index.js + 12 modules
|
|
var date_picker = __webpack_require__(47119);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
|
|
var spin = __webpack_require__(71418);
|
|
;// CONCATENATED MODULE: ./src/pages/Magazinejor/component/MonthlyDetailamins/prview/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var prviewmodules = ({"flex_box_center":"flex_box_center___dpifa","flex_space_between":"flex_space_between___wKSww","flex_box_vertical_center":"flex_box_vertical_center___HBbKS","flex_box_center_end":"flex_box_center_end___RBpdV","flex_box_column":"flex_box_column___dBgF5","flex-col":"flex-col___dLzc7","flex-row":"flex-row___duCQd","justify-start":"justify-start___Db7rX","justify-center":"justify-center___wIKAB","justify-end":"justify-end___MHrOk","justify-evenly":"justify-evenly___Cw4JT","justify-around":"justify-around___HjtNX","justify-between":"justify-between___Jiz54","align-start":"align-start___Dpmpx","align-center":"align-center___TqLbY","align-end":"align-end___KbyjN","wrap":"wrap___xERCh","back_style":"back_style____aiuT","header":"header___i3DWk","header_form":"header_form___kzjes","guize_select":"guize_select___Ac5Hb","guize_update":"guize_update___Kfm9g","shangchuan_button":"shangchuan_button___oMSQz","shangchuan_img":"shangchuan_img___k5hkk","shangchuan_close":"shangchuan_close___vD0eu","close_button":"close_button___Lf6fY","submit_button":"submit_button___PGv1y","add_button":"add_button___gztNy","root":"root___Ee3Fc","reportContent":"reportContent___c_Suo","addbutton":"addbutton___PN8yO","imagename":"imagename___bKckG","hoverimg":"hoverimg___hG4vD","bottom":"bottom___H3wBr"});
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(55794);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js
|
|
var toConsumableArray = __webpack_require__(37205);
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
// 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/image/index.js + 26 modules
|
|
var es_image = __webpack_require__(11611);
|
|
// 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/upload/index.js
|
|
var upload = __webpack_require__(60028);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
var es_button = __webpack_require__(3113);
|
|
// EXTERNAL MODULE: ./node_modules/_react-beautiful-dnd@13.0.0@react-beautiful-dnd/dist/react-beautiful-dnd.esm.js + 27 modules
|
|
var react_beautiful_dnd_esm = __webpack_require__(43141);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(14160);
|
|
;// CONCATENATED MODULE: ./src/pages/Magazinejor/component/MonthlyDetailamins/prview/img/titleimg.png
|
|
var titleimg_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAgCAYAAABU1PscAAAAAXNSR0IArs4c6QAAAoVJREFUWEfVmM9rU0EQxz+T0GeKImhRpHiS4qGIN8Fje1IkiXjoqX+BBS9exYoRr17Eeq1gezCHSqFWUZMiFAoiPVQq/kAFa5QIiq0xadL3RjY2IdG0TTYqbq7Zz+x8d+fNzI7Q5G/gqXrFLP1BiLgqvSjdInQbXJUMQkaExVDApLeXdPKQFGtND1xQ78tr+v2AONArSrfykxfIqJABFsMhJncdIJ28WM9v5KZs5f9AWvcVlGGFQWDnVuvX/18WGIsIidwNKBQZRhhUbY4XYRllLOKRuDMqHzfbc0MBZ17qtjfvOAecBbY36Xh1mfqwNk+xtADq47XKl29GyIlyxevi8vRVWW1ko6GA8qnDhCpHbTbWPBTuQ5C1oRswwlxnB6ca3cZvAuKP9HDgM4Wy32b74DMU7oHmbOhNGGEpDCcejMlC7ao6Aebk8/DY1nlz8vnbf8H5isfCUmcHR2pvoirAxPzbJWasw8aHwtQfDJuN085cZDd9lW+iKiCa0gRw3vbiS0+gOG9Lt8aF4NLDcRleT8FQDh3llU22KdcBEzq3QEutOWK72mSnSAc9JpTKNxBL6YjCaVuDxVkoPbOl7TiB66lxGRJTYfNZPrVQpOp3DOD7TdC6umvnVCuUKXZdPeyRkyk95sPdVuDatf57KEzb0u1x4TDHJTaj1zRgyNbU6iys/ePwqfoqjEg0rWmUPlsBJnX6H2zpNjlhRqIpfQ4ctDWVT0Lw1ZZujxN4IbG0rqiyw9ZUbhRYs6Xb5r65LUBYcT+EnP+InU+jzhcy51sJ55s5I8D5dtqIcPpBYwQ4/6SshpKrj/pKV+L0WKUiwunBVkWE06PF2ibX2eHur536/zpe/wE1T7TGqaTs3QAAAABJRU5ErkJggg==";
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Magazinejor/component/MonthlyDetailamins/prview/imgaelist.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DragQuestions = function DragQuestions(_ref) {
|
|
var data = _ref.data,
|
|
datalist = _ref.datalist,
|
|
setdatalist = _ref.setdatalist,
|
|
index = _ref.index;
|
|
var _useState = (0,_react_17_0_2_react.useState)([]),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
list = _useState2[0],
|
|
setList = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
selectindex = _useState4[0],
|
|
setselectindex = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
upimg = _useState6[0],
|
|
setupimg = _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)(undefined),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
attachId = _useState8[0],
|
|
setattachId = _useState8[1];
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
imgLoading = _useState10[0],
|
|
setImgLoading = _useState10[1];
|
|
|
|
//过滤函数
|
|
var reorder = function reorder(list, startIndex, endIndex) {
|
|
var result = Array.from(list);
|
|
var _result$splice = result.splice(startIndex, 1),
|
|
_result$splice2 = slicedToArray_default()(_result$splice, 1),
|
|
removed = _result$splice2[0];
|
|
result.splice(endIndex, 0, removed);
|
|
return result;
|
|
};
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
var _data$images;
|
|
console.log('---', 111);
|
|
if ((data === null || data === void 0 || (_data$images = data.images) === null || _data$images === void 0 ? void 0 : _data$images.length) > 0) {
|
|
setList(toConsumableArray_default()(data === null || data === void 0 ? void 0 : data.images) || []);
|
|
}
|
|
}, [data]);
|
|
var handleDragEnd = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(result, list) {
|
|
var items;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
if (result.destination) {
|
|
_context.next = 2;
|
|
break;
|
|
}
|
|
return _context.abrupt("return");
|
|
case 2:
|
|
items = reorder(list, result.source.index, result.destination.index);
|
|
datalist[index].images = items;
|
|
setdatalist(toConsumableArray_default()(datalist));
|
|
setList(items);
|
|
|
|
// if (res.status === 0) {
|
|
// getdata({ id: list?.[result.source.index].question_id });
|
|
// }
|
|
case 6:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function handleDragEnd(_x, _x2) {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var handleChange = function handleChange(info) {
|
|
if (info.file.status === 'uploading') {
|
|
setImgLoading(true);
|
|
return;
|
|
}
|
|
if (info.file.status === 'done') {
|
|
var _info$file, _info$file3, _info$file4, _info$file5, _ref3;
|
|
setImgLoading(false);
|
|
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
|
|
var _info$file2;
|
|
message/* default */.ZP.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
|
|
return;
|
|
}
|
|
var items = {
|
|
is_new: true,
|
|
category: 'image',
|
|
url: info === null || info === void 0 || (_info$file3 = info.file) === null || _info$file3 === void 0 || (_info$file3 = _info$file3.response) === null || _info$file3 === void 0 ? void 0 : _info$file3.diskfile,
|
|
// url_name:,
|
|
article_id: data === null || data === void 0 ? void 0 : data.article_id,
|
|
url_name: info === null || info === void 0 || (_info$file4 = info.file) === null || _info$file4 === void 0 || (_info$file4 = _info$file4.response) === null || _info$file4 === void 0 ? void 0 : _info$file4.disk_filename,
|
|
ylimg: info === null || info === void 0 || (_info$file5 = info.file) === null || _info$file5 === void 0 || (_info$file5 = _info$file5.response) === null || _info$file5 === void 0 ? void 0 : _info$file5.url
|
|
};
|
|
// console.log('0----', [...list, items])
|
|
datalist[index].num = ((_ref3 = [].concat(toConsumableArray_default()(list), [items])) === null || _ref3 === void 0 ? void 0 : _ref3.length) || 0;
|
|
datalist[index].images = [].concat(toConsumableArray_default()(list), [items]);
|
|
setList([].concat(toConsumableArray_default()(list), [items]));
|
|
setdatalist(toConsumableArray_default()(datalist));
|
|
setupimg(false);
|
|
}
|
|
};
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex',
|
|
justifyContent: 'space-between'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: prviewmodules.imagename,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
style: {
|
|
width: 24,
|
|
height: 16,
|
|
marginRight: 20
|
|
},
|
|
src: titleimg_namespaceObject
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: data === null || data === void 0 ? void 0 : data.name
|
|
}), " "]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: prviewmodules.addbutton,
|
|
onClick: function onClick() {
|
|
setupimg(true);
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
onClick: function onClick() {},
|
|
className: "iconfont icon-danceng-shangchuanwenjian"
|
|
}), " \u4E0A\u4F20\u56FE\u7247"]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_beautiful_dnd_esm/* DragDropContext */.Z5, {
|
|
onDragEnd: function onDragEnd(result) {
|
|
return handleDragEnd(result, list);
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_beautiful_dnd_esm/* Droppable */.bK, {
|
|
droppableId: "droppable",
|
|
direction: "horizontal",
|
|
children: function children(provided, snapshot) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
ref: provided.innerRef
|
|
}, provided.droppableProps), {}, {
|
|
style: {
|
|
display: "flex",
|
|
// 设置水平布局
|
|
// padding: "8px",
|
|
overflow: "auto",
|
|
flexWrap: 'wrap',
|
|
gap: 20
|
|
}
|
|
// style={{ width: '100%', height: list?.length * 38 }}
|
|
,
|
|
children: [list.map(function (item, k) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_beautiful_dnd_esm/* Draggable */._l, {
|
|
draggableId: k.toString(),
|
|
index: k,
|
|
children: function children(provided, snapshot) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({
|
|
className: prviewmodules.hoverimg,
|
|
ref: provided.innerRef
|
|
}, provided.draggableProps), provided.dragHandleProps), {}, {
|
|
style: objectSpread2_default()({
|
|
margin: "8px",
|
|
backgroundColor: "#f4f4f4",
|
|
border: "1px solid #ddd",
|
|
borderRadius: "4px",
|
|
width: '20%',
|
|
position: 'relative'
|
|
}, provided.draggableProps.style),
|
|
children: [(item === null || item === void 0 ? void 0 : item.category) !== 'directory' && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: prviewmodules.bottom,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
cursor: 'pointer'
|
|
},
|
|
onClick: function onClick() {
|
|
setselectindex(item);
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-shanchu13"
|
|
}), " \u5220\u9664"]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_image/* default */.Z, {
|
|
src: env/* default */.Z.IMG_SERVER + ((item === null || item === void 0 ? void 0 : item.ylimg) || (item === null || item === void 0 ? void 0 : item.url)),
|
|
style: {
|
|
height: 500,
|
|
objectFit: 'cover',
|
|
width: '100%'
|
|
}
|
|
})]
|
|
}));
|
|
}
|
|
}, k);
|
|
}), provided.placeholder]
|
|
}));
|
|
}
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
title: "\u4E0A\u4F20\u56FE\u7247",
|
|
className: "modalXazy",
|
|
open: upimg,
|
|
onCancel: function onCancel() {
|
|
setupimg(false);
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z, {
|
|
form: myForm,
|
|
className: prviewmodules.header_form,
|
|
labelCol: {
|
|
span: 3
|
|
},
|
|
wrapperCol: {
|
|
span: 21
|
|
},
|
|
onFinish: ( /*#__PURE__*/function () {
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(value) {
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return function (_x3) {
|
|
return _ref4.apply(this, arguments);
|
|
};
|
|
}()),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
name: "cover_image_id"
|
|
// valuePropName="fileList"
|
|
,
|
|
label: "",
|
|
rules: [{
|
|
required: false,
|
|
message: ''
|
|
}],
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, {
|
|
withCredentials: true,
|
|
name: "file",
|
|
showUploadList: false,
|
|
action: "".concat(env/* default */.Z.API_SERVER, "/api/attachments.json"),
|
|
onChange: handleChange,
|
|
accept: "image/*",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
loading: imgLoading,
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-shangchuantupian2"
|
|
}),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
marginLeft: "3px"
|
|
},
|
|
children: "\u4E0A\u4F20\u56FE\u7247"
|
|
})
|
|
})
|
|
})
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
title: "\u5220\u9664\u56FE\u7247",
|
|
className: "modalXazy",
|
|
open: selectindex,
|
|
onOk: function onOk() {
|
|
var items = list.filter(function (item) {
|
|
return (item === null || item === void 0 ? void 0 : item.url) !== (selectindex === null || selectindex === void 0 ? void 0 : selectindex.url);
|
|
});
|
|
datalist[index].num = (items === null || items === void 0 ? void 0 : items.length) || 0;
|
|
datalist[index].images = items;
|
|
setList(toConsumableArray_default()(items));
|
|
setdatalist(toConsumableArray_default()(datalist));
|
|
setselectindex('');
|
|
},
|
|
onCancel: function onCancel() {
|
|
setselectindex('');
|
|
},
|
|
children: "\u5728\u8BE5\u5904\u5220\u9664\u5185\u5BB9\uFF0C\u5E76\u4E0D\u4F1A\u540C\u6B65\u5C06\u8BE5\u6587\u7AE0\u7684\u5185\u5BB9\u8FDB\u884C\u5220\u9664\uFF0C\u4EC5\u5728\u672C\u6708\u520A\u4E2D\u4E0D\u5C55\u793A\uFF0C\u786E\u5B9A\u662F\u5426\u5220\u9664\u8BE5\u5185\u5BB9\uFF0C \u5220\u9664\u540E\u65E0\u6CD5\u6062\u590D\u3002"
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var imgaelist = (DragQuestions);
|
|
;// CONCATENATED MODULE: ./src/pages/Magazinejor/component/MonthlyDetailamins/prview/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// import XazyHeader from '@/components/HeaderNav';
|
|
|
|
|
|
|
|
|
|
|
|
var RangePicker = date_picker["default"].RangePicker;
|
|
var Navigation = function Navigation(_ref) {
|
|
var loading = _ref.loading,
|
|
user = _ref.user,
|
|
dispatch = _ref.dispatch,
|
|
account = _ref.account,
|
|
classroomList = _ref.classroomList,
|
|
setdrowopen = _ref.setdrowopen,
|
|
items = _ref.items,
|
|
drowopen = _ref.drowopen,
|
|
setimglist = _ref.setimglist;
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
|
|
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
|
|
select = _useSearchParams2[0];
|
|
var _useState = (0,_react_17_0_2_react.useState)([]),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
datalist = _useState2[0],
|
|
setdatalist = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
isloading = _useState4[0],
|
|
setisloading = _useState4[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
if (drowopen) {
|
|
getdata();
|
|
}
|
|
}, [drowopen]);
|
|
function getdata() {
|
|
return _getdata.apply(this, arguments);
|
|
}
|
|
function _getdata() {
|
|
_getdata = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
var _items$article_ids;
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
setisloading(true);
|
|
_context2.next = 3;
|
|
return (0,fetch/* default */.ZP)("/api/monthly_magazines/preview.json", {
|
|
method: 'Post',
|
|
body: {
|
|
magazine_id: 1,
|
|
monthly_magazine_id: (items === null || items === void 0 ? void 0 : items.id) || '',
|
|
cover_image_id: items === null || items === void 0 ? void 0 : items.cover_image_id,
|
|
article_ids: items === null || items === void 0 || (_items$article_ids = items.article_ids) === null || _items$article_ids === void 0 ? void 0 : _items$article_ids.map(function (item) {
|
|
return item.id;
|
|
})
|
|
}
|
|
});
|
|
case 3:
|
|
res = _context2.sent;
|
|
setisloading(false);
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
setdatalist(res === null || res === void 0 ? void 0 : res.data);
|
|
}
|
|
case 6:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return _getdata.apply(this, arguments);
|
|
}
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
|
|
spinning: isloading,
|
|
style: {
|
|
height: '100%'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: prviewmodules.root,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: prviewmodules.reportContent,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
justifyContent: 'space-between'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: prviewmodules.back_style,
|
|
style: {
|
|
color: '#fff',
|
|
cursor: 'pointer'
|
|
},
|
|
onClick: function onClick() {
|
|
setdrowopen(false);
|
|
setimglist([]);
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-fanhui2 font12 mr5"
|
|
}), "\u8FD4\u56DE"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
display: 'flex',
|
|
alignItems: 'center'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: 'red',
|
|
marginRight: 20
|
|
},
|
|
children: "\u8C03\u6574\u540E\u7684\u5185\u5BB9\u9700\u70B9\u51FB\u53F3\u4E0A\u89D2\u4FDD\u5B58\u6309\u94AE\u8FDB\u884C\u4FDD\u5B58"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: prviewmodules.addbutton,
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
setimglist(datalist);
|
|
setdrowopen(false);
|
|
// let res = await Fetch(``)
|
|
case 2:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
})),
|
|
children: "\u4FDD\u5B58"
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: prviewmodules.wrap,
|
|
style: {
|
|
marginTop: 10,
|
|
height: '100%'
|
|
},
|
|
children: datalist === null || datalist === void 0 ? void 0 : datalist.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(imgaelist, {
|
|
data: item,
|
|
index: index,
|
|
datalist: datalist,
|
|
setdatalist: setdatalist
|
|
})
|
|
});
|
|
})
|
|
})]
|
|
})
|
|
})
|
|
});
|
|
};
|
|
/* harmony default export */ var prview = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
var loading = _ref3.loading,
|
|
user = _ref3.user,
|
|
engineeringNavigtion = _ref3.engineeringNavigtion,
|
|
dispatch = _ref3.dispatch,
|
|
account = _ref3.account,
|
|
classroomList = _ref3.classroomList;
|
|
return objectSpread2_default()(objectSpread2_default()({
|
|
loading: loading,
|
|
user: user
|
|
}, engineeringNavigtion), {}, {
|
|
dispatch: dispatch,
|
|
account: account,
|
|
classroomList: classroomList
|
|
});
|
|
})(Navigation));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 60028:
|
|
/*!**********************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/upload/index.js ***!
|
|
\**********************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _Dragger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Dragger */ 71409);
|
|
/* harmony import */ var _Upload__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Upload */ 37714);
|
|
"use client";
|
|
|
|
|
|
|
|
const Upload = _Upload__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z;
|
|
Upload.Dragger = _Dragger__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z;
|
|
Upload.LIST_IGNORE = _Upload__WEBPACK_IMPORTED_MODULE_0__/* .LIST_IGNORE */ .E;
|
|
/* harmony default export */ __webpack_exports__.Z = (Upload);
|
|
|
|
/***/ })
|
|
|
|
}]); |