Auto Submit

dev_local_v9_test5
autosubmit 5 months ago
parent 71d520cdd1
commit 9608c6972e

@ -546,10 +546,10 @@ var AddOrEdit = function AddOrEdit(_ref) {
_useState4 = slicedToArray_default()(_useState3, 2),
imgLoading = _useState4[0],
setImgLoading = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)('fj'),
var _useState5 = (0,_react_17_0_2_react.useState)(false),
_useState6 = slicedToArray_default()(_useState5, 2),
sctype = _useState6[0],
setsctype = _useState6[1];
isLink = _useState6[0],
setIsLink = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)([]),
_useState8 = slicedToArray_default()(_useState7, 2),
news_event_tags = _useState8[0],
@ -580,12 +580,14 @@ var AddOrEdit = function AddOrEdit(_ref) {
political_point_ids: currentItem === null || currentItem === void 0 ? void 0 : currentItem.political_point_ids,
embodiment_ids: currentItem === null || currentItem === void 0 ? void 0 : currentItem.embodiment_ids,
material_type_id: currentItem === null || currentItem === void 0 ? void 0 : currentItem.material_type_id,
is_link: currentItem === null || currentItem === void 0 ? void 0 : currentItem.is_link,
link: currentItem === null || currentItem === void 0 ? void 0 : currentItem.link,
tags: '',
attachment_id: (currentItem === null || currentItem === void 0 ? void 0 : currentItem.attachment) && (0,MultiUpload/* coverToFileList */.z)([currentItem === null || currentItem === void 0 ? void 0 : currentItem.attachment]) || ''
});
setnews_event_tags(currentItem === null || currentItem === void 0 ? void 0 : currentItem.tags);
} else {
form.setFieldValue('attachment_type', 'fj');
form.setFieldValue('is_link', false);
}
case 4:
case "end":
@ -642,7 +644,7 @@ var AddOrEdit = function AddOrEdit(_ref) {
_context3.next = 2;
return form.validateFields();
case 2:
if (!(((_values$attachment_id = values.attachment_id) === null || _values$attachment_id === void 0 ? void 0 : _values$attachment_id.length) == 0)) {
if (!(!values.is_link && ((_values$attachment_id = values.attachment_id) === null || _values$attachment_id === void 0 ? void 0 : _values$attachment_id.length) == 0)) {
_context3.next = 4;
break;
}
@ -889,7 +891,7 @@ var AddOrEdit = function AddOrEdit(_ref) {
});
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
name: "attachment_type",
name: "is_link",
label: "\u7D20\u6750\u5F62\u5F0F",
rules: [{
required: true,
@ -897,29 +899,19 @@ var AddOrEdit = function AddOrEdit(_ref) {
}],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
onChange: function onChange(e) {
setsctype(e.target.value);
setIsLink(e.target.value);
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: "fj",
value: false,
children: "\u9644\u4EF6"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
value: "wl",
value: true,
children: "\u5916\u94FE"
})]
})
}), sctype == 'fj' && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
name: "attachment_id",
label: "\u9644\u4EF6",
rules: [{
required: true,
message: '请上传附件'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(MultiUpload/* default */.Z, {
Single: true
})
}), sctype == 'wl' && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
}), isLink ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u5916\u94FE",
name: "wl",
name: "link",
rules: [{
required: true,
message: "\u8BF7\u8F93\u5165\u5916\u94FE"
@ -929,6 +921,16 @@ var AddOrEdit = function AddOrEdit(_ref) {
maxLength: 200,
placeholder: "\u8BF7\u8F93\u5165\u5916\u94FE"
})
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
name: "attachment_id",
label: "\u9644\u4EF6",
rules: [{
required: true,
message: '请上传附件'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(MultiUpload/* default */.Z, {
Single: true
})
})]
})
});

@ -26,7 +26,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="/react/build/umi.1aee7e6f.js"></script>
<script src="/react/build/umi.932fb35c.js"></script>
<script src="/react/build/js/public.js"></script>
</body>
</html>

@ -149,6 +149,7 @@ var AddOrEdit = __webpack_require__(79857);
var MaterialsAdmin = function MaterialsAdmin(_ref) {
var _ref6, _ref7, _ref8;
var dataKey = _ref.dataKey,
@ -670,7 +671,11 @@ var MaterialsAdmin = function MaterialsAdmin(_ref) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: MaterialsAdminmodules.ziyuan_item,
onClick: function onClick() {
_umi_production_exports.history.push("/caselibrary/detail/".concat(item === null || item === void 0 ? void 0 : item.id, "?activeTab=materials_admin"));
if (item !== null && item !== void 0 && item.is_link) {
(0,util/* openNewWindows */.Uq)(item === null || item === void 0 ? void 0 : item.link);
} else {
_umi_production_exports.history.push("/caselibrary/detail/".concat(item === null || item === void 0 ? void 0 : item.id, "?activeTab=materials_admin"));
}
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(MaterialsAdminmodules.sc_status, " ").concat(MaterialsAdminmodules[(_statusType$item$stat = statusType[item === null || item === void 0 ? void 0 : item.status]) === null || _statusType$item$stat === void 0 ? void 0 : _statusType$item$stat["class"]]),
@ -805,6 +810,7 @@ var MaterialsAdmin = function MaterialsAdmin(_ref) {
var MaterialsCollect = function MaterialsCollect(_ref) {
var _ref4, _ref5, _ref6;
var data = _ref.data;
@ -1142,7 +1148,11 @@ var MaterialsCollect = function MaterialsCollect(_ref) {
height: 255
},
onClick: function onClick() {
_umi_production_exports.history.push("/caselibrary/detail/".concat(item === null || item === void 0 ? void 0 : item.id, "?activeTab=materials_collect"));
if (item !== null && item !== void 0 && item.is_link) {
(0,util/* openNewWindows */.Uq)(item === null || item === void 0 ? void 0 : item.link);
} else {
_umi_production_exports.history.push("/caselibrary/detail/".concat(item === null || item === void 0 ? void 0 : item.id, "?activeTab=materials_collect"));
}
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: item === null || item === void 0 ? void 0 : item.name,

@ -67,6 +67,8 @@ var notice_and_case = __webpack_require__(45675);
var utils_image = __webpack_require__(62935);
// EXTERNAL MODULE: ./src/utils/authority.ts
var authority = __webpack_require__(40189);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(30406);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/CaseLibrary/Index/index.tsx
@ -89,6 +91,7 @@ var jsx_runtime = __webpack_require__(37712);
var Page = function Page(_ref) {
var _ref5, _ref6, _ref7, _ref8;
var dispatch = _ref.dispatch,
@ -571,7 +574,11 @@ var Page = function Page(_ref) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Indexmodules.ziyuan_item,
onClick: function onClick() {
_umi_production_exports.history.push("/caselibrary/detail/".concat(item === null || item === void 0 ? void 0 : item.id));
if (item !== null && item !== void 0 && item.is_link) {
(0,util/* openNewWindows */.Uq)(item === null || item === void 0 ? void 0 : item.link);
} else {
_umi_production_exports.history.push("/caselibrary/detail/".concat(item === null || item === void 0 ? void 0 : item.id));
}
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: item === null || item === void 0 ? void 0 : item.name,

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save