|
|
@ -30,20 +30,14 @@ import { |
|
|
|
QuestionCircleFilled, |
|
|
|
} from "@ant-design/icons"; |
|
|
|
// import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks'; |
|
|
|
import { |
|
|
|
ResultPanel, |
|
|
|
FormRangePicker, |
|
|
|
AreaCascader, |
|
|
|
ImgResize, |
|
|
|
ImgZoom, |
|
|
|
} from "@/components"; |
|
|
|
import { dictionary, utils } from "@/config/common"; |
|
|
|
// import ajax from "@/services"; |
|
|
|
import ajaxCom from "@/services"; |
|
|
|
import ajax from "@/services/OperationCenter/OperationMarket"; |
|
|
|
import moment from "moment"; |
|
|
|
import { getToken } from "@/config/cookie"; |
|
|
|
import { Editor, Toolbar } from "@wangeditor/editor-for-react"; |
|
|
|
import "./index.scss"; |
|
|
|
import errorImg from "@/assets/images/layout/error.png"; |
|
|
|
import topImg from "@/assets/images/top.png"; |
|
|
|
// import { useLocation } from "react-router-dom"; |
|
|
|
|
|
|
|
// 资讯管理 |
|
|
@ -52,19 +46,19 @@ function InformationMgm() { |
|
|
|
const [pageType, setPageType] = useState("1"); |
|
|
|
// 默认数据 |
|
|
|
const defaultData = { |
|
|
|
moduleIds: "", // 展示模块 |
|
|
|
areaIds: "", // 区域 |
|
|
|
categoryIds: "", // 分类 |
|
|
|
putStatuses: "", // 展示状态 |
|
|
|
showTimes: "", // 展示时间 |
|
|
|
updateTimes: "", // 最后修改时间 |
|
|
|
advertId: "", // 广告ID |
|
|
|
informationId: "", // 资讯ID |
|
|
|
title: "", // 标题 |
|
|
|
isStick: "", // 是否置顶 |
|
|
|
categoryId: [], // 分类 |
|
|
|
status: [], // 状态 |
|
|
|
areaId: [], // 区域 |
|
|
|
releaseType: [], // 发布渠道 |
|
|
|
updateTimes: "", // 最后修改时间 |
|
|
|
}; |
|
|
|
// 分页数据 |
|
|
|
const [pageInfo, setPageInfo] = useState({ |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 20, |
|
|
|
pageSize: 15, |
|
|
|
}); |
|
|
|
// 表单数据 |
|
|
|
const [formData, setFormData] = useState(defaultData); |
|
|
@ -83,14 +77,28 @@ function InformationMgm() { |
|
|
|
}); |
|
|
|
// 默认详情数据 |
|
|
|
const defRowData = { |
|
|
|
title: "", |
|
|
|
categoryId: "", |
|
|
|
areaIds: [], |
|
|
|
moduleId: "", |
|
|
|
location: "", |
|
|
|
imgUrl: "", |
|
|
|
jumpUrlType: "1", |
|
|
|
jumpUrl: "", |
|
|
|
isReprint: "0", // 是否转载 0= 原创 1=转载 |
|
|
|
coverType: "0", // 封面状态 0=单图模式 1=多图模式 |
|
|
|
coverUrl: [], // 封面地址 |
|
|
|
title: "", // 标题 |
|
|
|
author: "", // 作者 |
|
|
|
areaId: [], // 区域 |
|
|
|
releaseType: [], // 发布渠道 |
|
|
|
shareTitle: "", // 分享标题 |
|
|
|
shareDescribe: "", // 分享描述 |
|
|
|
shareImgUrl: "", // 分享缩略图 |
|
|
|
introduction: "", // 简介 |
|
|
|
isStick: "0", // 是否置顶 |
|
|
|
categoryId: "", // 分类 |
|
|
|
readBasics: "", // 阅读数-基础值 |
|
|
|
userRead: "0", // 实际用户操作值 |
|
|
|
readMultiple: "", // 放大倍数 |
|
|
|
pointBasics: "", // 点赞数-基础值 |
|
|
|
userPoint: "0", // 实际用户操作值 |
|
|
|
pointMultiple: "", // 放大倍数 |
|
|
|
jumpUrl: "", // 原文链接 |
|
|
|
upperTime: "", // 上架时间 |
|
|
|
lowerTime: "", // 下架时间 |
|
|
|
}; |
|
|
|
// 详情数据 |
|
|
|
const [rowData, setRowData] = useState(defRowData); |
|
|
@ -108,8 +116,19 @@ function InformationMgm() { |
|
|
|
const [general, setGeneral] = useState(""); //普通文本内容 |
|
|
|
const [content, setContent] = useState("<p><br></p>"); //富文本内容 |
|
|
|
|
|
|
|
//区域的下拉数据 |
|
|
|
const [areaList, setAreaList] = useState([]); |
|
|
|
// 所有下拉菜单 |
|
|
|
const [allSelect, setAllSelect] = useState({ |
|
|
|
release: [], // 发布渠道 |
|
|
|
status: [], // 资讯状态 |
|
|
|
isStick: [], // 置顶状态 |
|
|
|
category: [], // 分类 |
|
|
|
}); |
|
|
|
|
|
|
|
// 访问接口,获取下拉 |
|
|
|
useEffect(() => { |
|
|
|
getSelectList(); |
|
|
|
getTypeList(); |
|
|
|
}, []); |
|
|
|
|
|
|
@ -131,20 +150,31 @@ function InformationMgm() { |
|
|
|
{ key: "1", label: <span>详情</span> }, |
|
|
|
{ key: "2", label: <span>编辑</span> }, |
|
|
|
{ key: "3", label: <span>上架</span> }, |
|
|
|
{ key: "4", label: <span>封存</span> }, |
|
|
|
{ key: "4", label: <span>下架</span> }, |
|
|
|
{ key: "5", label: <span>封存</span> }, |
|
|
|
]; |
|
|
|
|
|
|
|
// 表头 |
|
|
|
const columns = [ |
|
|
|
{ |
|
|
|
title: "资讯ID", |
|
|
|
dataIndex: "advertId", |
|
|
|
dataIndex: "informationId", |
|
|
|
align: "center", |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "标题", |
|
|
|
dataIndex: "title", |
|
|
|
align: "center", |
|
|
|
render: (val, row, index) => { |
|
|
|
return ( |
|
|
|
<> |
|
|
|
{row?.isStick == 1 ? ( |
|
|
|
<img className="stick-pic" src={topImg} /> |
|
|
|
) : null} |
|
|
|
{val} |
|
|
|
</> |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "分类", |
|
|
@ -153,43 +183,97 @@ function InformationMgm() { |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "区域", |
|
|
|
dataIndex: "areaNames", |
|
|
|
dataIndex: "areaName", |
|
|
|
align: "center", |
|
|
|
render: (val, row, index) => { |
|
|
|
return ( |
|
|
|
<Tooltip placement="top" title={val}> |
|
|
|
{val} |
|
|
|
</Tooltip> |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "发布渠道", |
|
|
|
dataIndex: "areaNames", |
|
|
|
dataIndex: "releaseName", |
|
|
|
align: "center", |
|
|
|
render: (val, row, index) => { |
|
|
|
return ( |
|
|
|
<Tooltip placement="top" title={val}> |
|
|
|
{val} |
|
|
|
</Tooltip> |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "阅读数", |
|
|
|
dataIndex: "location", |
|
|
|
dataIndex: "readNumber", |
|
|
|
align: "center", |
|
|
|
sorter: (a, b) => parseInt(a.location) - parseInt(b.location), |
|
|
|
sorter: (a, b) => parseInt(a.readNumber) - parseInt(b.readNumber), |
|
|
|
render: (val, row, index) => { |
|
|
|
return ( |
|
|
|
<Tooltip |
|
|
|
placement="top" |
|
|
|
title={`基础值(${row?.readBasics || 0})+实际用户操作值(${ |
|
|
|
row?.userRead || 0 |
|
|
|
})*放大倍数(${row?.readMultiple || 0})`} |
|
|
|
> |
|
|
|
{val} |
|
|
|
</Tooltip> |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "点赞数", |
|
|
|
dataIndex: "location", |
|
|
|
dataIndex: "pointNumber", |
|
|
|
align: "center", |
|
|
|
sorter: (a, b) => parseInt(a.location) - parseInt(b.location), |
|
|
|
sorter: (a, b) => parseInt(a.pointNumber) - parseInt(b.pointNumber), |
|
|
|
render: (val, row, index) => { |
|
|
|
return ( |
|
|
|
<Tooltip |
|
|
|
placement="top" |
|
|
|
title={`基础值(${row?.pointBasics || 0})+实际用户操作值(${ |
|
|
|
row?.userPoint || 0 |
|
|
|
})*放大倍数(${row?.pointMultiple || 0})`} |
|
|
|
> |
|
|
|
{val} |
|
|
|
</Tooltip> |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
title: "状态", |
|
|
|
dataIndex: "putStatus", |
|
|
|
dataIndex: "status", |
|
|
|
align: "center", |
|
|
|
render: (val, row, index) => { |
|
|
|
return getStatusText(row?.status); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "定时计划", |
|
|
|
dataIndex: "jumpUrl", |
|
|
|
dataIndex: "upperTime", |
|
|
|
align: "center", |
|
|
|
render: (val, row, index) => { |
|
|
|
return <CalendarOutlined />; |
|
|
|
return ( |
|
|
|
<Tooltip |
|
|
|
placement="top" |
|
|
|
title={ |
|
|
|
<> |
|
|
|
定时上架时间:{row?.upperTime || "-"} |
|
|
|
<br /> |
|
|
|
定时下架时间:{row?.lowerTime || "-"} |
|
|
|
</> |
|
|
|
} |
|
|
|
> |
|
|
|
<CalendarOutlined /> |
|
|
|
</Tooltip> |
|
|
|
); |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "最后操作人", |
|
|
|
dataIndex: "updateUser", |
|
|
|
dataIndex: "updateUserName", |
|
|
|
align: "center", |
|
|
|
}, |
|
|
|
{ |
|
|
@ -229,17 +313,31 @@ function InformationMgm() { |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
|
// 操作 |
|
|
|
const clickDropDown = (param, record) => { |
|
|
|
console.log(param.key); |
|
|
|
setRowData(record); |
|
|
|
if (param.key == "3") { |
|
|
|
// 下架 |
|
|
|
if (param.key == "1") { |
|
|
|
// 详情 |
|
|
|
setPageType("3"); |
|
|
|
} else if (param.key == "2") { |
|
|
|
// 编辑 |
|
|
|
setPageType("2"); |
|
|
|
setGeneral(""); |
|
|
|
setContent(record?.content || "<p><br></p>"); |
|
|
|
} else if (param.key == "3") { |
|
|
|
// 上架 |
|
|
|
} else if (param.key == "4") { |
|
|
|
// 下架 |
|
|
|
} else if (param.key == "5") { |
|
|
|
// 封存 |
|
|
|
} else { |
|
|
|
// 详情 |
|
|
|
setPageType("3"); |
|
|
|
// 预览 |
|
|
|
if (record?.jumpUrl) { |
|
|
|
window.open(record?.jumpUrl); |
|
|
|
} else { |
|
|
|
message.warn("暂时无法预览!"); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
@ -252,7 +350,7 @@ function InformationMgm() { |
|
|
|
total: resultData?.total, |
|
|
|
showTotal: () => `共 ${resultData.total || 0} 条`, |
|
|
|
pageSize: pageInfo.pageSize, |
|
|
|
pageSizeOptions: dictionary?.pageSizeOptions, |
|
|
|
pageSizeOptions: [15, 30, 50, 100], |
|
|
|
onChange: (current, size) => { |
|
|
|
setPageInfo({ |
|
|
|
...pageInfo, |
|
|
@ -270,22 +368,23 @@ function InformationMgm() { |
|
|
|
} |
|
|
|
// 字段过滤 |
|
|
|
const newObj = { |
|
|
|
moduleIds: postData?.moduleIds, |
|
|
|
areaIds: postData?.areaIds, |
|
|
|
categoryIds: postData?.categoryIds, |
|
|
|
putStatuses: postData?.putStatuses, |
|
|
|
updateStartTime: postData?.updateTimes?.length |
|
|
|
isStick: postData?.isStick, |
|
|
|
categoryId: postData?.categoryId, |
|
|
|
status: postData?.status, |
|
|
|
areaId: postData?.areaId, |
|
|
|
releaseType: postData?.releaseType, |
|
|
|
modifyStartTime: postData?.updateTimes?.length |
|
|
|
? postData?.updateTimes[0].format("YYYY-MM-DD HH:mm:ss") |
|
|
|
: "", |
|
|
|
updateEndTime: postData?.updateTimes?.length |
|
|
|
modifyEndTime: postData?.updateTimes?.length |
|
|
|
? postData?.updateTimes[1].format("YYYY-MM-DD HH:mm:ss") |
|
|
|
: "", |
|
|
|
advertId: postData?.advertId, |
|
|
|
informationId: postData?.informationId, |
|
|
|
title: postData?.title, |
|
|
|
}; |
|
|
|
// console.log(postData, newObj); |
|
|
|
setTabLoading(true); |
|
|
|
ajax.getAdvertList({ ...newObj, ...pageInfo }).then( |
|
|
|
ajax.getInformationList({ ...newObj, ...pageInfo }).then( |
|
|
|
(res) => { |
|
|
|
if (parseInt(res?.status) === 20000) { |
|
|
|
setResultData(res?.data || {}); |
|
|
@ -310,6 +409,40 @@ function InformationMgm() { |
|
|
|
setHoldData(formData); |
|
|
|
setIsAjax(!isAjax); |
|
|
|
}; |
|
|
|
// 下拉菜单 |
|
|
|
const getSelectList = () => { |
|
|
|
ajax.getInformationLabel().then( |
|
|
|
(res) => { |
|
|
|
if (parseInt(res?.status) === 20000) { |
|
|
|
setAllSelect(res?.data || {}); |
|
|
|
} else { |
|
|
|
message.error(res?.message); |
|
|
|
} |
|
|
|
}, |
|
|
|
(err) => { |
|
|
|
console.log(err); |
|
|
|
} |
|
|
|
); |
|
|
|
// 获取区域树结构 |
|
|
|
ajaxCom.getAreaTree().then( |
|
|
|
(res) => { |
|
|
|
if (parseInt(res?.status) === 20000) { |
|
|
|
setAreaList(res?.data || []); |
|
|
|
} else { |
|
|
|
message.error(res?.message); |
|
|
|
} |
|
|
|
}, |
|
|
|
(err) => { |
|
|
|
console.log(err); |
|
|
|
} |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
// 获取状态文本 |
|
|
|
const getStatusText = (val) => { |
|
|
|
const obj = allSelect?.status.filter((v, i) => v.value == val); |
|
|
|
return obj?.length ? obj[0].label : "-"; |
|
|
|
}; |
|
|
|
|
|
|
|
// 获取列表数据 |
|
|
|
const getTypeList = () => { |
|
|
@ -509,10 +642,14 @@ function InformationMgm() { |
|
|
|
return current && current < moment().subtract(1, "days"); |
|
|
|
}; |
|
|
|
|
|
|
|
// 上架或保存 |
|
|
|
const handleSaveAds = (flag) => { |
|
|
|
// 保存 |
|
|
|
const handleSaveInfo = () => { |
|
|
|
console.log(rowData); |
|
|
|
ajax.getAdvertList({ ...rowData, flag }).then( |
|
|
|
ajax[rowData?.informationId ? "doInformationEdit" : "doInformationInsert"]({ |
|
|
|
...rowData, |
|
|
|
general, |
|
|
|
content, |
|
|
|
}).then( |
|
|
|
(res) => { |
|
|
|
if (parseInt(res?.status) === 20000) { |
|
|
|
message.success(res?.message); |
|
|
@ -543,9 +680,9 @@ function InformationMgm() { |
|
|
|
<Input |
|
|
|
className="form-con" |
|
|
|
placeholder="请输入准确信息" |
|
|
|
value={formData?.advertId} |
|
|
|
value={formData?.informationId} |
|
|
|
onChange={(e) => |
|
|
|
setFormData({ ...formData, advertId: e.target.value }) |
|
|
|
setFormData({ ...formData, informationId: e.target.value }) |
|
|
|
} |
|
|
|
/> |
|
|
|
</div> |
|
|
@ -564,40 +701,29 @@ function InformationMgm() { |
|
|
|
<div className="form-txt">是否置顶:</div> |
|
|
|
<Select |
|
|
|
className="form-con" |
|
|
|
// allowClear |
|
|
|
options={statusArr} |
|
|
|
placeholder="全部" |
|
|
|
value={formData?.moduleIds || undefined} |
|
|
|
onChange={(e) => setFormData({ ...formData, moduleIds: e })} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div className="form-box"> |
|
|
|
<div className="form-txt">展示位:</div> |
|
|
|
<Select |
|
|
|
className="form-con" |
|
|
|
allowClear |
|
|
|
showSearch |
|
|
|
mode="multiple" |
|
|
|
maxTagCount="responsive" |
|
|
|
optionFilterProp="label" |
|
|
|
options={statusArr} |
|
|
|
options={allSelect?.isStick || []} |
|
|
|
placeholder="全部" |
|
|
|
value={formData?.moduleName || []} |
|
|
|
onChange={(e) => setFormData({ ...formData, moduleName: e })} |
|
|
|
value={formData?.isStick || undefined} |
|
|
|
onChange={(e) => setFormData({ ...formData, isStick: e })} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div className="form-box"> |
|
|
|
<div className="form-txt">分类:</div> |
|
|
|
<TreeSelect |
|
|
|
<Cascader |
|
|
|
className="form-con" |
|
|
|
allowClear |
|
|
|
placeholder="全部" |
|
|
|
treeCheckable={true} |
|
|
|
multiple |
|
|
|
maxTagCount="responsive" |
|
|
|
showCheckedStrategy={TreeSelect.SHOW_CHILD} |
|
|
|
treeData={statusArr || []} |
|
|
|
value={formData?.categoryIds || []} |
|
|
|
onChange={(e) => setFormData({ ...formData, categoryIds: e })} |
|
|
|
fieldNames={{ |
|
|
|
label: "name", |
|
|
|
value: "id", |
|
|
|
children: "children", |
|
|
|
}} |
|
|
|
options={allSelect?.category || []} |
|
|
|
value={formData?.categoryId || []} |
|
|
|
onChange={(e) => setFormData({ ...formData, categoryId: e })} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div className="form-box"> |
|
|
@ -609,24 +735,32 @@ function InformationMgm() { |
|
|
|
mode="multiple" |
|
|
|
maxTagCount="responsive" |
|
|
|
optionFilterProp="label" |
|
|
|
options={statusArr} |
|
|
|
options={allSelect?.status || []} |
|
|
|
placeholder="全部" |
|
|
|
value={formData?.putStatuses || []} |
|
|
|
onChange={(e) => setFormData({ ...formData, putStatuses: e })} |
|
|
|
value={formData?.status || []} |
|
|
|
onChange={(e) => setFormData({ ...formData, status: e })} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div className="form-box"> |
|
|
|
<div className="form-txt">区域:</div> |
|
|
|
<TreeSelect |
|
|
|
{/* <TreeSelect */} |
|
|
|
<Cascader |
|
|
|
className="form-con" |
|
|
|
allowClear |
|
|
|
placeholder="全部" |
|
|
|
treeCheckable={true} |
|
|
|
multiple |
|
|
|
maxTagCount="responsive" |
|
|
|
showCheckedStrategy={TreeSelect.SHOW_CHILD} |
|
|
|
treeData={statusArr || []} |
|
|
|
value={formData?.areaIds || []} |
|
|
|
onChange={(e) => setFormData({ ...formData, areaIds: e })} |
|
|
|
// treeCheckable={true} |
|
|
|
// showCheckedStrategy={TreeSelect.SHOW_CHILD} |
|
|
|
fieldNames={{ |
|
|
|
label: "name", |
|
|
|
value: "id", |
|
|
|
children: "children", |
|
|
|
}} |
|
|
|
options={areaList || []} |
|
|
|
// treeData={areaList || []} |
|
|
|
value={formData?.areaId || []} |
|
|
|
onChange={(e) => setFormData({ ...formData, areaId: e })} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div className="form-box"> |
|
|
@ -638,9 +772,9 @@ function InformationMgm() { |
|
|
|
treeCheckable={true} |
|
|
|
maxTagCount="responsive" |
|
|
|
showCheckedStrategy={TreeSelect.SHOW_CHILD} |
|
|
|
treeData={statusArr || []} |
|
|
|
value={formData?.areaIds || []} |
|
|
|
onChange={(e) => setFormData({ ...formData, areaIds: e })} |
|
|
|
treeData={allSelect?.release || []} |
|
|
|
value={formData?.releaseType || []} |
|
|
|
onChange={(e) => setFormData({ ...formData, releaseType: e })} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div className="form-box"> |
|
|
@ -664,6 +798,8 @@ function InformationMgm() { |
|
|
|
className="green" |
|
|
|
onClick={() => { |
|
|
|
setRowData(defRowData); |
|
|
|
setGeneral(""); |
|
|
|
setContent("<p><br></p>"); |
|
|
|
setPageType("2"); |
|
|
|
}} |
|
|
|
> |
|
|
@ -697,20 +833,30 @@ function InformationMgm() { |
|
|
|
<div className={pageType === "2" ? "wraper" : "wraper hidden"}> |
|
|
|
<div className="row-operate"> |
|
|
|
<div> |
|
|
|
<Radio.Group defaultValue="1" buttonStyle="solid"> |
|
|
|
<Radio.Button value="1">原创</Radio.Button> |
|
|
|
<Radio.Button value="2">转载</Radio.Button> |
|
|
|
<Radio.Group |
|
|
|
value={rowData?.isReprint} |
|
|
|
buttonStyle="solid" |
|
|
|
onChange={(e) => handleForm("isReprint", e.target.value)} |
|
|
|
> |
|
|
|
<Radio.Button value="0">原创</Radio.Button> |
|
|
|
<Radio.Button value="1">转载</Radio.Button> |
|
|
|
</Radio.Group> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<Button |
|
|
|
type="primary" |
|
|
|
className="green" |
|
|
|
onClick={() => handleSaveAds(1)} |
|
|
|
onClick={() => { |
|
|
|
if (rowData?.jumpUrl) { |
|
|
|
window.open(rowData?.jumpUrl); |
|
|
|
} else { |
|
|
|
message.warn("暂时无法预览!"); |
|
|
|
} |
|
|
|
}} |
|
|
|
> |
|
|
|
预览 |
|
|
|
</Button> |
|
|
|
<Button type="primary" onClick={() => handleSaveAds(2)}> |
|
|
|
<Button type="primary" onClick={() => handleSaveInfo()}> |
|
|
|
保存 |
|
|
|
</Button> |
|
|
|
<Button onClick={() => handleBack()}>返回</Button> |
|
|
@ -723,30 +869,32 @@ function InformationMgm() { |
|
|
|
<div className="r-txt">封面图片:</div> |
|
|
|
<div className="r-con"> |
|
|
|
<Radio.Group |
|
|
|
value={rowData?.jumpUrlType + ""} |
|
|
|
onChange={(e) => handleForm("jumpUrlType", e.target.value)} |
|
|
|
value={rowData?.coverType + ""} |
|
|
|
onChange={(e) => handleForm("coverType", e.target.value)} |
|
|
|
> |
|
|
|
<Radio value="1">单图模式</Radio> |
|
|
|
<Radio value="2">三图模式</Radio> |
|
|
|
<Radio value="0">单图模式</Radio> |
|
|
|
<Radio value="1">三图模式</Radio> |
|
|
|
</Radio.Group> |
|
|
|
<div> |
|
|
|
<div |
|
|
|
className={`${!rowData?.imgUrl ? "hidden" : "pic-box"}`} |
|
|
|
className={`${!rowData?.coverUrl ? "hidden" : "pic-box"}`} |
|
|
|
> |
|
|
|
<Image |
|
|
|
width={148} |
|
|
|
height={148} |
|
|
|
preview={false} |
|
|
|
src={rowData?.imgUrl || "error"} |
|
|
|
src={rowData?.coverUrl || "error"} |
|
|
|
fallback={errorImg} |
|
|
|
/> |
|
|
|
<DeleteOutlined |
|
|
|
className="delete-btn" |
|
|
|
onClick={() => handleForm("imgUrl", "")} |
|
|
|
onClick={() => handleForm("coverUrl", "")} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<Upload |
|
|
|
className={`${rowData?.imgUrl ? "hidden" : "upload-box"}`} |
|
|
|
className={`${ |
|
|
|
rowData?.coverUrl ? "hidden" : "upload-box" |
|
|
|
}`} |
|
|
|
{...upArgs} |
|
|
|
> |
|
|
|
<div className="upload-btn"> |
|
|
@ -781,8 +929,8 @@ function InformationMgm() { |
|
|
|
showCount |
|
|
|
placeholder="请输入文章作者" |
|
|
|
maxLength={20} |
|
|
|
value={rowData?.title || ""} |
|
|
|
onChange={(e) => handleForm("title", e.target.value)} |
|
|
|
value={rowData?.author || ""} |
|
|
|
onChange={(e) => handleForm("author", e.target.value)} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -791,13 +939,18 @@ function InformationMgm() { |
|
|
|
<div className="r-con"> |
|
|
|
<Cascader |
|
|
|
className="row-sm" |
|
|
|
allowClear |
|
|
|
placeholder="请选择" |
|
|
|
multiple |
|
|
|
maxTagCount="responsive" |
|
|
|
showCheckedStrategy={Cascader.SHOW_CHILD} |
|
|
|
placeholder="请选择" |
|
|
|
options={statusArr} |
|
|
|
value={rowData?.jumpUrl || []} |
|
|
|
onChange={(e) => handleForm("jumpUrl", e)} |
|
|
|
fieldNames={{ |
|
|
|
label: "name", |
|
|
|
value: "id", |
|
|
|
children: "children", |
|
|
|
}} |
|
|
|
options={areaList || []} |
|
|
|
value={rowData?.areaId || []} |
|
|
|
onChange={(e) => handleForm("areaId", e)} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -810,8 +963,8 @@ function InformationMgm() { |
|
|
|
{ value: "2", label: "微信小程序" }, |
|
|
|
{ value: "3", label: "支付宝小程序" }, |
|
|
|
]} |
|
|
|
// value={rowData?.categoryId || []} |
|
|
|
onChange={(e) => handleForm("categoryId", e)} |
|
|
|
value={rowData?.releaseType || []} |
|
|
|
onChange={(e) => handleForm("releaseType", e)} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -823,8 +976,8 @@ function InformationMgm() { |
|
|
|
showCount |
|
|
|
placeholder="请输入文章分享后的显示标题" |
|
|
|
maxLength={30} |
|
|
|
value={rowData?.title || ""} |
|
|
|
onChange={(e) => handleForm("title", e.target.value)} |
|
|
|
value={rowData?.shareTitle || ""} |
|
|
|
onChange={(e) => handleForm("shareTitle", e.target.value)} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -836,8 +989,10 @@ function InformationMgm() { |
|
|
|
showCount |
|
|
|
placeholder="请输入文章分享后的显示描述" |
|
|
|
maxLength={30} |
|
|
|
value={rowData?.title || ""} |
|
|
|
onChange={(e) => handleForm("title", e.target.value)} |
|
|
|
value={rowData?.shareDescribe || ""} |
|
|
|
onChange={(e) => |
|
|
|
handleForm("shareDescribe", e.target.value) |
|
|
|
} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -846,22 +1001,26 @@ function InformationMgm() { |
|
|
|
<div className="r-con"> |
|
|
|
<div> |
|
|
|
<div |
|
|
|
className={`${!rowData?.imgUrl ? "hidden" : "pic-box"}`} |
|
|
|
className={`${ |
|
|
|
!rowData?.shareImgUrl ? "hidden" : "pic-box" |
|
|
|
}`} |
|
|
|
> |
|
|
|
<Image |
|
|
|
width={148} |
|
|
|
height={148} |
|
|
|
preview={false} |
|
|
|
src={rowData?.imgUrl || "error"} |
|
|
|
src={rowData?.shareImgUrl || "error"} |
|
|
|
fallback={errorImg} |
|
|
|
/> |
|
|
|
<DeleteOutlined |
|
|
|
className="delete-btn" |
|
|
|
onClick={() => handleForm("imgUrl", "")} |
|
|
|
onClick={() => handleForm("shareImgUrl", "")} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<Upload |
|
|
|
className={`${rowData?.imgUrl ? "hidden" : "upload-box"}`} |
|
|
|
className={`${ |
|
|
|
rowData?.shareImgUrl ? "hidden" : "upload-box" |
|
|
|
}`} |
|
|
|
{...upArgs} |
|
|
|
> |
|
|
|
<div className="upload-btn"> |
|
|
@ -885,8 +1044,8 @@ function InformationMgm() { |
|
|
|
placeholder="请输入文章简介" |
|
|
|
maxLength={120} |
|
|
|
autoSize={{ minRows: 3, maxRows: 3 }} |
|
|
|
value={rowData?.title || ""} |
|
|
|
onChange={(e) => handleForm("title", e.target.value)} |
|
|
|
value={rowData?.introduction || ""} |
|
|
|
onChange={(e) => handleForm("introduction", e.target.value)} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -894,11 +1053,11 @@ function InformationMgm() { |
|
|
|
<div className="r-txt">是否置顶:</div> |
|
|
|
<div className="r-con"> |
|
|
|
<Radio.Group |
|
|
|
value={rowData?.jumpUrlType + ""} |
|
|
|
onChange={(e) => handleForm("jumpUrlType", e.target.value)} |
|
|
|
value={rowData?.isStick + ""} |
|
|
|
onChange={(e) => handleForm("isStick", e.target.value)} |
|
|
|
> |
|
|
|
<Radio value="1">是</Radio> |
|
|
|
<Radio value="2">否</Radio> |
|
|
|
<Radio value="0">否</Radio> |
|
|
|
</Radio.Group> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -907,11 +1066,14 @@ function InformationMgm() { |
|
|
|
<div className="r-con"> |
|
|
|
<Cascader |
|
|
|
className="row-sm" |
|
|
|
// multiple |
|
|
|
// maxTagCount="responsive" |
|
|
|
// showCheckedStrategy={Cascader.SHOW_CHILD} |
|
|
|
allowClear |
|
|
|
placeholder="请选择" |
|
|
|
options={statusArr} |
|
|
|
fieldNames={{ |
|
|
|
label: "name", |
|
|
|
value: "id", |
|
|
|
children: "children", |
|
|
|
}} |
|
|
|
options={allSelect?.category || []} |
|
|
|
value={rowData?.categoryId || []} |
|
|
|
onChange={(e) => handleForm("categoryId", e)} |
|
|
|
/> |
|
|
@ -931,16 +1093,18 @@ function InformationMgm() { |
|
|
|
<div className="line-count"> |
|
|
|
<Input |
|
|
|
placeholder="基础值" |
|
|
|
value={rowData?.title || ""} |
|
|
|
onChange={(e) => handleForm("title", e.target.value)} |
|
|
|
value={rowData?.readBasics || ""} |
|
|
|
onChange={(e) => handleForm("readBasics", e.target.value)} |
|
|
|
/> |
|
|
|
<span>+</span> |
|
|
|
<Input disabled value={113} /> |
|
|
|
<Input disabled value={rowData?.userRead} /> |
|
|
|
<span>×</span> |
|
|
|
<Input |
|
|
|
placeholder="放大倍数" |
|
|
|
value={rowData?.title || ""} |
|
|
|
onChange={(e) => handleForm("title", e.target.value)} |
|
|
|
value={rowData?.readMultiple || ""} |
|
|
|
onChange={(e) => |
|
|
|
handleForm("readMultiple", e.target.value) |
|
|
|
} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -959,16 +1123,20 @@ function InformationMgm() { |
|
|
|
<div className="line-count"> |
|
|
|
<Input |
|
|
|
placeholder="基础值" |
|
|
|
value={rowData?.title || ""} |
|
|
|
onChange={(e) => handleForm("title", e.target.value)} |
|
|
|
value={rowData?.pointBasics || ""} |
|
|
|
onChange={(e) => |
|
|
|
handleForm("pointBasics", e.target.value) |
|
|
|
} |
|
|
|
/> |
|
|
|
<span>+</span> |
|
|
|
<Input disabled value={2} /> |
|
|
|
<Input disabled value={rowData?.userPoint} /> |
|
|
|
<span>×</span> |
|
|
|
<Input |
|
|
|
placeholder="放大倍数" |
|
|
|
value={rowData?.title || ""} |
|
|
|
onChange={(e) => handleForm("title", e.target.value)} |
|
|
|
value={rowData?.pointMultiple || ""} |
|
|
|
onChange={(e) => |
|
|
|
handleForm("pointMultiple", e.target.value) |
|
|
|
} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -979,8 +1147,8 @@ function InformationMgm() { |
|
|
|
<Input |
|
|
|
className="row-lg" |
|
|
|
placeholder="请输入转发的原文地址" |
|
|
|
value={rowData?.title || ""} |
|
|
|
onChange={(e) => handleForm("title", e.target.value)} |
|
|
|
value={rowData?.jumpUrl || ""} |
|
|
|
onChange={(e) => handleForm("jumpUrl", e.target.value)} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -990,11 +1158,8 @@ function InformationMgm() { |
|
|
|
<DatePicker |
|
|
|
showTime |
|
|
|
placeholder="非必填,按需计划任务" |
|
|
|
value={parseDate( |
|
|
|
rowData?.createTime, |
|
|
|
"YYYY-MM-DD HH:mm:ss" |
|
|
|
)} |
|
|
|
onChange={(e, str) => handleForm("createTime", str)} |
|
|
|
value={parseDate(rowData?.upperTime, "YYYY-MM-DD HH:mm:ss")} |
|
|
|
onChange={(e, str) => handleForm("upperTime", str)} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div className="r-txt">定时下架时间:</div> |
|
|
@ -1002,11 +1167,8 @@ function InformationMgm() { |
|
|
|
<DatePicker |
|
|
|
showTime |
|
|
|
placeholder="非必填,按需计划任务" |
|
|
|
value={parseDate( |
|
|
|
rowData?.createTime, |
|
|
|
"YYYY-MM-DD HH:mm:ss" |
|
|
|
)} |
|
|
|
onChange={(e, str) => handleForm("createTime", str)} |
|
|
|
value={parseDate(rowData?.lowerTime, "YYYY-MM-DD HH:mm:ss")} |
|
|
|
onChange={(e, str) => handleForm("lowerTime", str)} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -1022,8 +1184,8 @@ function InformationMgm() { |
|
|
|
<div className="r-con r-sm"> |
|
|
|
<Input |
|
|
|
placeholder="上传成功后资源的路径会显示在这里" |
|
|
|
value={rowData?.title || ""} |
|
|
|
onChange={(e) => handleForm("title", e.target.value)} |
|
|
|
value={rowData?.jumpUrl || ""} |
|
|
|
onChange={(e) => handleForm("jumpUrl", e.target.value)} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -1045,22 +1207,32 @@ function InformationMgm() { |
|
|
|
{/* 详情 */} |
|
|
|
<div className={pageType === "3" ? "wraper" : "wraper hidden"}> |
|
|
|
<div className="row-operate"> |
|
|
|
<Button onClick={() => handleBack()}>原创</Button> |
|
|
|
<Button>{rowData?.isReprint == 1 ? "转载" : "原创"}</Button> |
|
|
|
<Button onClick={() => handleBack()}>返回</Button> |
|
|
|
</div> |
|
|
|
<div className="full-group"> |
|
|
|
<div className="full-wrap"> |
|
|
|
<div className="edit-group"> |
|
|
|
<div className="lt-box"> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">资讯ID:</div> |
|
|
|
<div className="r-con">{rowData?.advertId || "-"}</div> |
|
|
|
<div className="r-con">{rowData?.informationId || "-"}</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">状态:</div> |
|
|
|
<div className="r-con">{rowData?.putStatus || "-"}</div> |
|
|
|
<div className="r-con">{getStatusText(rowData?.status)}</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">图片:</div> |
|
|
|
<div className="r-con">{rowData?.imgUrl || "-"}</div> |
|
|
|
<div className="r-txt"></div> |
|
|
|
<div className="r-con"> |
|
|
|
<Image |
|
|
|
width={120} |
|
|
|
height={120} |
|
|
|
preview={false} |
|
|
|
src={rowData?.coverUrl || "error"} |
|
|
|
fallback={errorImg} |
|
|
|
/> |
|
|
|
{rowData?.imgUrl || "-"} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">标题:</div> |
|
|
@ -1068,15 +1240,15 @@ function InformationMgm() { |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">简介:</div> |
|
|
|
<div className="r-con">{rowData?.moduleName || "-"}</div> |
|
|
|
<div className="r-con">{rowData?.introduction || "-"}</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">作者:</div> |
|
|
|
<div className="r-con">{rowData?.id || "-"}</div> |
|
|
|
<div className="r-con">{rowData?.author || "-"}</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">分类:</div> |
|
|
|
<div className="r-con">{rowData?.class || "-"}</div> |
|
|
|
<div className="r-con">{rowData?.categoryName || "-"}</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">区域:</div> |
|
|
@ -1084,53 +1256,71 @@ function InformationMgm() { |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">是否置顶:</div> |
|
|
|
<div className="r-con">{rowData?.id || "-"}</div> |
|
|
|
<div className="r-con"> |
|
|
|
{rowData?.isStick == 1 ? "是" : "否"} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">发布渠道:</div> |
|
|
|
<div className="r-con">{rowData?.id || "-"}</div> |
|
|
|
<div className="r-con">{rowData?.releaseName || "-"}</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">阅读数(3):</div> |
|
|
|
<div className="r-txt"> |
|
|
|
阅读数({rowData?.readNumber || "0"}): |
|
|
|
</div> |
|
|
|
<div className="r-con"> |
|
|
|
基础值(1)+实际用户操作值(2)*放大倍数(1) |
|
|
|
基础值({rowData?.readBasics || "0"})+实际用户操作值( |
|
|
|
{rowData?.userRead || "0"})*放大倍数( |
|
|
|
{rowData?.readMultiple || "0"}) |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">点赞数(1):</div> |
|
|
|
<div className="r-txt"> |
|
|
|
点赞数({rowData?.pointNumber || "0"}): |
|
|
|
</div> |
|
|
|
<div className="r-con"> |
|
|
|
基础值(1)+实际用户操作值(0)*放大倍数(1) |
|
|
|
基础值({rowData?.pointBasics || "0"})+实际用户操作值( |
|
|
|
{rowData?.userPoint || "0"})*放大倍数( |
|
|
|
{rowData?.pointMultiple || "0"}) |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="rt-box"> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">定时上架时间:</div> |
|
|
|
<div className="r-con">{rowData?.jumpUrlType || "-"}</div> |
|
|
|
<div className="r-con">{rowData?.upperTime || "-"}</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">定时下架时间:</div> |
|
|
|
<div className="r-con">{rowData?.createTime || "-"}</div> |
|
|
|
<div className="r-con">{rowData?.lowerTime || "-"}</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">分享标题:</div> |
|
|
|
<div className="r-con">{rowData?.createTime || "-"}</div> |
|
|
|
<div className="r-con">{rowData?.shareTitle || "-"}</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">分享描述:</div> |
|
|
|
<div className="r-con">{rowData?.createTime || "-"}</div> |
|
|
|
<div className="r-con">{rowData?.shareDescribe || "-"}</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">分享缩略图:</div> |
|
|
|
<div className="r-con">{rowData?.createTime || "-"}</div> |
|
|
|
<div className="r-con"> |
|
|
|
<Image |
|
|
|
width={120} |
|
|
|
height={120} |
|
|
|
preview={false} |
|
|
|
src={rowData?.shareImgUrl || "error"} |
|
|
|
fallback={errorImg} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">预览链接:</div> |
|
|
|
<div className="r-con">{rowData?.createTime || "-"}</div> |
|
|
|
<div className="r-con">{rowData?.jumpUrl || "-"}</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">最后操作人:</div> |
|
|
|
<div className="r-con">{rowData?.updateUser || "-"}</div> |
|
|
|
<div className="r-con">{rowData?.updateUserName || "-"}</div> |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">最后修改时间:</div> |
|
|
@ -1138,9 +1328,22 @@ function InformationMgm() { |
|
|
|
</div> |
|
|
|
<div className="row-line"> |
|
|
|
<div className="r-txt">初始创建时间:</div> |
|
|
|
<div className="r-con">{rowData?.updateTime || "-"}</div> |
|
|
|
<div className="r-con">{rowData?.createTime || "-"}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* <div className="extra-group"> |
|
|
|
<div className="row-box"> |
|
|
|
<div className="r-txt">上传资源:</div> |
|
|
|
<div className="r-con r-sm">{rowData?.jumpUrl || "-"}</div> |
|
|
|
</div> |
|
|
|
<div className="row-box"> |
|
|
|
<div className="r-txt">内容:</div> |
|
|
|
<div className="r-con"> |
|
|
|
<div dangerouslySetInnerHTML={{ __html: rowData?.content }} /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> */} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* 设置 */} |
|
|
|