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.
430 lines
22 KiB
430 lines
22 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[2339],{
|
|
|
|
/***/ 14661:
|
|
/*!************************************************************!*\
|
|
!*** ./src/components/ui-customization/reset.less?modules ***!
|
|
\************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ __webpack_exports__.Z = ({"flex_box_center":"flex_box_center___vG4eV","flex_space_between":"flex_space_between___qVVxe","flex_box_vertical_center":"flex_box_vertical_center___P8Z8s","flex_box_center_end":"flex_box_center_end___VMme3","flex_box_column":"flex_box_column___VMHwm","dropdownmenus":"dropdownmenus___oVzoj","popupClassNames":"popupClassNames___OcZq7","selectdown":"selectdown___mmcA8"});
|
|
|
|
/***/ }),
|
|
|
|
/***/ 87526:
|
|
/*!*****************************************!*\
|
|
!*** ./src/components/NoData/index.tsx ***!
|
|
\*****************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 93314);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd */ 3113);
|
|
var __defProp = Object.defineProperty;
|
|
var __defProps = Object.defineProperties;
|
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
|
|
|
|
|
const noData = ({
|
|
img,
|
|
buttonProps = {},
|
|
styles = {},
|
|
customText,
|
|
ButtonText,
|
|
ButtonClick,
|
|
Buttonclass,
|
|
ButtonTwo,
|
|
imgStyles,
|
|
loading = false
|
|
}) => {
|
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
"section",
|
|
{
|
|
className: "tc animated fadeIn",
|
|
style: __spreadValues(__spreadValues({}, { color: "#999", margin: "100px auto", visibility: loading ? "hidden" : "visible" }), styles)
|
|
},
|
|
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("img", { src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_1__, style: __spreadProps(__spreadValues({}, imgStyles), { pointerEvents: "none", userSelect: "none" }) }),
|
|
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("p", { className: "mt20 font14" }, customText || "\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),
|
|
ButtonText && /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP, __spreadValues({ className: Buttonclass, onClick: ButtonClick }, buttonProps), ButtonText),
|
|
ButtonTwo && ButtonTwo
|
|
);
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = (noData);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 90018:
|
|
/*!*********************************************************!*\
|
|
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
|
|
\*********************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ PreviewAll; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
var es_button = __webpack_require__(3113);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
|
|
var ArrowDownOutlined = __webpack_require__(74516);
|
|
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 4 modules
|
|
var monaco_editor = __webpack_require__(32150);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
var tooltip = __webpack_require__(6848);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(13462);
|
|
// EXTERNAL MODULE: ./src/service/exercise.ts
|
|
var exercise = __webpack_require__(41044);
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
var NoData = __webpack_require__(87526);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(21873);
|
|
// EXTERNAL MODULE: ./src/service/attachment.ts
|
|
var attachment = __webpack_require__(4675);
|
|
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var PreviewAll = (({ editOffice = "view", data, theme, type, filename, monacoEditor, className, style, close, onClose, hasMask, disabledDownload, onImgDimensions, showNodata, recordInfo }) => {
|
|
const [src, setSrc] = (0,_react_17_0_2_react.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt");
|
|
const [token, setToken] = (0,_react_17_0_2_react.useState)("");
|
|
const [officeData, setOfficeData] = (0,_react_17_0_2_react.useState)();
|
|
const officePath = window.ENV === "build" ? "/react/build" : "";
|
|
const apiServer = location.host.startsWith("localhost") ? env/* default */.Z.PROXY_SERVER : env/* default */.Z.API_SERVER;
|
|
const unit = 1024 * 1024;
|
|
const maxSize = 10 * unit;
|
|
const closeRef = (0,_react_17_0_2_react.useRef)();
|
|
if ((data == null ? void 0 : data.startsWith("/api")) && type !== "txt") {
|
|
data = env/* default */.Z.API_SERVER + data;
|
|
}
|
|
const getFileExtension = (url) => {
|
|
const filename2 = url.substring(url.lastIndexOf("/") + 1);
|
|
const extension = filename2.split(".").pop();
|
|
return extension;
|
|
};
|
|
if (filename)
|
|
monacoEditor.filename = filename;
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
var _a, _b;
|
|
const cookies = (_b = (_a = document.cookie) == null ? void 0 : _a.replace(/\s/g, "")) == null ? void 0 : _b.split(";");
|
|
cookies == null ? void 0 : cookies.map((item) => {
|
|
let i = item.split("=");
|
|
if (i[0] === "_educoder_session") {
|
|
setToken(i[1]);
|
|
}
|
|
});
|
|
}, []);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
if (type === "office") {
|
|
if (data.indexOf("bigfilescdn.") > -1 || data.indexOf("bigfiles1") > -1) {
|
|
setOfficeData({
|
|
url: data,
|
|
fileType: getFileExtension(data),
|
|
model: data.indexOf("model=edit") ? "edit" : "view"
|
|
});
|
|
} else {
|
|
getData();
|
|
}
|
|
}
|
|
}, [type, data]);
|
|
const getData = () => __async(void 0, null, function* () {
|
|
console.log("data:", data);
|
|
let _url = data;
|
|
if (!data.startsWith("http")) {
|
|
_url = location.origin + _url;
|
|
}
|
|
let _id = new URL(_url).pathname.split("/").pop();
|
|
const res = yield (0,exercise/* setEcsAttachment */.gJ)({ attachment_id: _id });
|
|
res.url = apiServer + res.url;
|
|
setOfficeData(res);
|
|
});
|
|
const handleClick = () => {
|
|
if (data.startsWith("http") || data.startsWith("blob:")) {
|
|
handleDown();
|
|
return;
|
|
}
|
|
(0,util/* downloadFile */.Sv)(filename || "educoder", data, filename);
|
|
};
|
|
const handleDown = () => {
|
|
if (recordInfo) {
|
|
(0,attachment/* add_file_quantity */.fc)({
|
|
id: recordInfo == null ? void 0 : recordInfo.id,
|
|
watch_type: 1,
|
|
course_id: recordInfo == null ? void 0 : recordInfo.course_id
|
|
});
|
|
}
|
|
(0,util/* downLoadLink */.Nd)(filename || "educoder", decodeURIComponent(data));
|
|
};
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: __spreadValues({}, style || {}), className: `${hasMask && PreviewAllmodules.bgBlack} ${!!type ? PreviewAllmodules.wrp : "hide"}` }, close && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: PreviewAllmodules.close, ref: closeRef }, !!onImgDimensions && /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8", getPopupContainer: () => closeRef.current }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { onClick: () => {
|
|
onClose();
|
|
onImgDimensions();
|
|
} }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "icon-yulanpizhu" }))), !disabledDownload && /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6", getPopupContainer: () => closeRef.current }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { onClick: handleDown }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "icon-quxiaozhiding" }))), /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: "\u5173\u95ED", getPopupContainer: () => closeRef.current }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "", onClick: onClose }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "icon-guanbi1" })))), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: `${PreviewAllmodules[className]} ${className} ${PreviewAllmodules.monaco} ${type === "txt" ? "show" : "hide"}` }, type === "txt" && /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
monaco_editor/* default */.ZP,
|
|
__spreadValues({}, monacoEditor)
|
|
))), type === "audio" && /* @__PURE__ */ _react_17_0_2_react.createElement("audio", { src: `${(data == null ? void 0 : data.indexOf("http://")) > -1 || (data == null ? void 0 : data.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,"}${data}`, autoPlay: true }), type === "video" && /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, (data == null ? void 0 : data.indexOf("http")) > -1 ? /* @__PURE__ */ _react_17_0_2_react.createElement("video", { controls: true, src: `${data}`, autoPlay: true }) : /* @__PURE__ */ _react_17_0_2_react.createElement("video", { controls: true, src: `data:video/mp4;base64,${data}`, autoPlay: true })), type === "office" && officeData && /* @__PURE__ */ _react_17_0_2_react.createElement("iframe", { src: `${officePath}/office.html?key=${officeData.key}&url=${btoa(officeData.url)}&callbackUrl=${apiServer + officeData.callbackUrl}&fileType=${officeData.fileType}&title=${officeData.title}&model=${editOffice}&officeServer=${env/* default */.Z.ONLYOFFICE}&disabledDownload=${!!disabledDownload}` }), type === "html" && /* @__PURE__ */ _react_17_0_2_react.createElement("iframe", { src: data + "&disposition=inline" }), type === "pdf" && /* @__PURE__ */ _react_17_0_2_react.createElement("iframe", { src: `${officePath}/js/pdfview/index.html?url=${data}&disabledDownload=${!!disabledDownload}` }), type === "image" && /* @__PURE__ */ _react_17_0_2_react.createElement("img", { src: `${(data == null ? void 0 : data.indexOf("http://")) > -1 || (data == null ? void 0 : data.indexOf("https://")) > -1 ? "" : "data:image/png;base64,"}${data}` }), (type === "other" || type === "download") && /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, showNodata ? /* @__PURE__ */ _react_17_0_2_react.createElement(NoData/* default */.Z, { customText: "\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B", ButtonTwo: /* @__PURE__ */ _react_17_0_2_react.createElement(es_button/* default */.ZP, { icon: /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-xiazai4 font14" }), type: "primary", size: "middle", onClick: handleClick }, "\u4E0B\u8F7D") }) : /* @__PURE__ */ _react_17_0_2_react.createElement(es_button/* default */.ZP, { type: "primary", size: "middle", onClick: handleClick }, /* @__PURE__ */ _react_17_0_2_react.createElement(ArrowDownOutlined/* default */.Z, null), "\u70B9\u51FB\u4E0B\u8F7D")));
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 50909:
|
|
/*!*************************************************************************!*\
|
|
!*** ./src/pages/virtualSpaces/Lists/Plan/Detail/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 */ Plan_Detail; }
|
|
});
|
|
|
|
// 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/modal/index.js + 16 modules
|
|
var modal = __webpack_require__(43418);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
var message = __webpack_require__(8591);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(51165);
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Plan/Detail/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Detailmodules = ({"flex_box_center":"flex_box_center___aKDSL","flex_space_between":"flex_space_between___FlcW1","flex_box_vertical_center":"flex_box_vertical_center___ScUge","flex_box_center_end":"flex_box_center_end___Vu6QN","flex_box_column":"flex_box_column___CpbgB","wrap":"wrap___r3so2","btns":"btns___SkCgc","content":"content___qGyOY"});
|
|
// EXTERNAL MODULE: ./src/components/ui-customization/index.tsx + 34 modules
|
|
var ui_customization = __webpack_require__(26324);
|
|
// EXTERNAL MODULE: ./src/components/ui-customization/reset.less?modules
|
|
var resetmodules = __webpack_require__(14661);
|
|
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
|
|
var PreviewAll = __webpack_require__(90018);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(21873);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(13462);
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
var authority = __webpack_require__(88141);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
|
|
var _umi_production_exports = __webpack_require__(67866);
|
|
;// CONCATENATED MODULE: ./src/pages/virtualSpaces/Lists/Plan/Detail/index.tsx
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Detail = ({
|
|
globalSetting,
|
|
dispatch,
|
|
virtualSpaces
|
|
}) => {
|
|
const [item, setItem] = (0,_react_17_0_2_react.useState)({});
|
|
const [data, setData] = (0,_react_17_0_2_react.useState)({ content: "", type: "" });
|
|
const query = (0,_umi_production_exports.useParams)();
|
|
const { id, virtual_spacesId } = query;
|
|
const monacoValueRef = (0,_react_17_0_2_react.useRef)();
|
|
const { virtualSpacesDetails } = virtualSpaces;
|
|
const verify = (user_id) => {
|
|
const bool = (0,authority/* isSuperAdmins */.Ny)() || (virtualSpacesDetails == null ? void 0 : virtualSpacesDetails.is_creator) || (virtualSpacesDetails == null ? void 0 : virtualSpacesDetails.is_member) && (virtualSpacesDetails == null ? void 0 : virtualSpacesDetails.user_id) === user_id;
|
|
return bool;
|
|
};
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
if (id) {
|
|
getItem();
|
|
}
|
|
}, [id]);
|
|
const getItem = () => __async(void 0, null, function* () {
|
|
const result = yield (0,fetch/* default */.ZP)(`/api/attachments/${id}/detail.json`, {
|
|
method: "get"
|
|
});
|
|
if ((result == null ? void 0 : result.status) !== -1) {
|
|
setItem(__spreadValues({}, result));
|
|
if (result.file_type === "txt") {
|
|
const res = yield (0,fetch/* default */.ZP)(result.url, {
|
|
method: "get",
|
|
headers: {
|
|
"Content-Type": "application/xml"
|
|
}
|
|
});
|
|
monacoValueRef.current = res;
|
|
}
|
|
setData({
|
|
type: result.file_type,
|
|
content: env/* default */.Z.API_SERVER + result.url
|
|
});
|
|
}
|
|
});
|
|
const handleDelete = () => {
|
|
modal["default"].confirm({
|
|
title: "\u63D0\u793A",
|
|
okText: "\u786E\u5B9A\u5220\u9664",
|
|
okButtonProps: {
|
|
danger: true
|
|
},
|
|
icon: false,
|
|
className: resetmodules/* default */.Z.CustomTipsModalCss,
|
|
cancelText: "\u53D6\u6D88",
|
|
content: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u786E\u8BA4\u5220\u9664\u300A", item.title, "\u300B\u5417\uFF1F"), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "mt10" }, "\u5220\u9664\u540E\uFF0C\u5C06\u65E0\u6CD5\u6062\u590D\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C")),
|
|
onOk: () => __async(void 0, null, function* () {
|
|
const res = yield (0,fetch/* default */.ZP)(`/api/attachments/${id}.json`, {
|
|
method: "delete"
|
|
});
|
|
if ((res == null ? void 0 : res.status) === 0) {
|
|
_umi_production_exports.history.push(`/${util/* vtrsKey */.AS}/${query.virtual_spacesId}/plan?leftMenuId=${window.localStorage.getItem("vtrsModuleId")}`);
|
|
message/* default */.ZP.success("\u5220\u9664\u6210\u529F");
|
|
}
|
|
})
|
|
});
|
|
};
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Detailmodules.wrap }, /* @__PURE__ */ _react_17_0_2_react.createElement(ui_customization/* HeadBack */.qE, { title: item.title, onClick: () => _umi_production_exports.history.push(`/${util/* vtrsKey */.AS}/${query.virtual_spacesId}/plan?leftMenuId=${window.localStorage.getItem("vtrsModuleId")}`) }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Detailmodules.btns }, (0,authority/* isLogin */.bg)() && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { onClick: () => {
|
|
var _a;
|
|
(0,util/* downLoadLink */.Nd)("", `${env/* default */.Z.API_SERVER}${(_a = item.url) == null ? void 0 : _a.replace("disposition=inline", "")}`);
|
|
} }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "primary-hover" }, /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-xiazai4 font14 mr5" }), "\u4E0B\u8F7D")), verify(item == null ? void 0 : item.user_id) && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { onClick: () => handleDelete() }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "delete-hover" }, " ", /* @__PURE__ */ _react_17_0_2_react.createElement("i", { className: "iconfont icon-piliangshanchubeifen font14 mr5" }), "\u5220\u9664")))), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Detailmodules.content }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
PreviewAll/* default */.Z,
|
|
{
|
|
data: data == null ? void 0 : data.content,
|
|
type: data == null ? void 0 : data.type,
|
|
disabledDownload: !(0,authority/* isLogin */.bg)(),
|
|
style: { position: "absolute", zIndex: 1, alignItems: "flex-start" },
|
|
monacoEditor: {
|
|
value: monacoValueRef.current,
|
|
language: "txt",
|
|
onChange: () => {
|
|
},
|
|
options: {
|
|
readOnly: true,
|
|
fontSize: 14,
|
|
minimap: {
|
|
enabled: false
|
|
}
|
|
}
|
|
},
|
|
onClose: () => setData({ content: "", type: "" })
|
|
}
|
|
)));
|
|
};
|
|
/* harmony default export */ var Plan_Detail = ((0,_umi_production_exports.connect)(
|
|
({
|
|
virtualSpaces,
|
|
globalSetting
|
|
}) => ({
|
|
globalSetting,
|
|
virtualSpaces
|
|
})
|
|
)(Detail));
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |