|
@ -35,9 +35,11 @@ import { |
|
|
PlusOutlined, |
|
|
PlusOutlined, |
|
|
DeleteOutlined, |
|
|
DeleteOutlined, |
|
|
} from "@ant-design/icons"; |
|
|
} from "@ant-design/icons"; |
|
|
|
|
|
import { ResultFlowResult } from "@/components"; |
|
|
// import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks'; |
|
|
// import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks'; |
|
|
import ajaxCom from "@/services"; |
|
|
import ajaxCom from "@/services"; |
|
|
import ajax from "@/services/OperationCenter/OperationMarket"; |
|
|
import ajax from "@/services/OperationCenter/OperationMarket"; |
|
|
|
|
|
import { dictionary } from "@/config/common"; |
|
|
import moment from "moment"; |
|
|
import moment from "moment"; |
|
|
import { getToken } from "@/config/cookie"; |
|
|
import { getToken } from "@/config/cookie"; |
|
|
import "./index.scss"; |
|
|
import "./index.scss"; |
|
@ -318,6 +320,7 @@ function AdsMgm() { |
|
|
|
|
|
|
|
|
// 分页 |
|
|
// 分页 |
|
|
const paginationProps = { |
|
|
const paginationProps = { |
|
|
|
|
|
className: "pagination-common", |
|
|
position: ["bottomCenter"], |
|
|
position: ["bottomCenter"], |
|
|
showQuickJumper: true, |
|
|
showQuickJumper: true, |
|
|
showSizeChanger: true, |
|
|
showSizeChanger: true, |
|
@ -325,7 +328,9 @@ function AdsMgm() { |
|
|
total: resultData?.total, |
|
|
total: resultData?.total, |
|
|
showTotal: () => `共 ${resultData.total || 0} 条`, |
|
|
showTotal: () => `共 ${resultData.total || 0} 条`, |
|
|
pageSize: pageInfo.pageSize, |
|
|
pageSize: pageInfo.pageSize, |
|
|
pageSizeOptions: [15, 30, 50, 100], |
|
|
|
|
|
|
|
|
pageSizeOptions: Array.from( |
|
|
|
|
|
new Set([...[15], ...(dictionary?.pageSizeOptions || [])]) |
|
|
|
|
|
), |
|
|
onChange: (current, size) => { |
|
|
onChange: (current, size) => { |
|
|
setPageInfo({ |
|
|
setPageInfo({ |
|
|
...pageInfo, |
|
|
...pageInfo, |
|
@ -733,10 +738,11 @@ function AdsMgm() { |
|
|
return ( |
|
|
return ( |
|
|
<div className="ads-mgm"> |
|
|
<div className="ads-mgm"> |
|
|
{/* 主页 */} |
|
|
{/* 主页 */} |
|
|
<div className={pageType === "1" ? "wraper" : "wraper hidden"}> |
|
|
|
|
|
|
|
|
<div className={pageType === "1" ? "mgm-wraper" : "mgm-wraper hidden"}> |
|
|
<div className="search-group"> |
|
|
<div className="search-group"> |
|
|
|
|
|
<div class="title">查询条件</div> |
|
|
<div className="form-box"> |
|
|
<div className="form-box"> |
|
|
<div className="form-txt">展示模块:</div> |
|
|
|
|
|
|
|
|
<div className="form-txt">展示模块</div> |
|
|
<Select |
|
|
<Select |
|
|
className="form-con" |
|
|
className="form-con" |
|
|
allowClear |
|
|
allowClear |
|
@ -759,7 +765,7 @@ function AdsMgm() { |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
<div className="form-box"> |
|
|
<div className="form-box"> |
|
|
<div className="form-txt">展示位:</div> |
|
|
|
|
|
|
|
|
<div className="form-txt">展示位</div> |
|
|
<Select |
|
|
<Select |
|
|
className="form-con" |
|
|
className="form-con" |
|
|
allowClear |
|
|
allowClear |
|
@ -777,7 +783,7 @@ function AdsMgm() { |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
<div className="form-box"> |
|
|
<div className="form-box"> |
|
|
<div className="form-txt">区域:</div> |
|
|
|
|
|
|
|
|
<div className="form-txt">区域</div> |
|
|
{/* <TreeSelect */} |
|
|
{/* <TreeSelect */} |
|
|
<Cascader |
|
|
<Cascader |
|
|
className="form-con" |
|
|
className="form-con" |
|
@ -799,7 +805,7 @@ function AdsMgm() { |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
<div className="form-box"> |
|
|
<div className="form-box"> |
|
|
<div className="form-txt">分类:</div> |
|
|
|
|
|
|
|
|
<div className="form-txt">分类</div> |
|
|
<Select |
|
|
<Select |
|
|
className="form-con" |
|
|
className="form-con" |
|
|
allowClear |
|
|
allowClear |
|
@ -816,7 +822,7 @@ function AdsMgm() { |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
<div className="form-box"> |
|
|
<div className="form-box"> |
|
|
<div className="form-txt">展示状态:</div> |
|
|
|
|
|
|
|
|
<div className="form-txt">展示状态</div> |
|
|
<Select |
|
|
<Select |
|
|
className="form-con" |
|
|
className="form-con" |
|
|
allowClear |
|
|
allowClear |
|
@ -831,7 +837,7 @@ function AdsMgm() { |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
<div className="form-box"> |
|
|
<div className="form-box"> |
|
|
<div className="form-txt">展示时间:</div> |
|
|
|
|
|
|
|
|
<div className="form-txt">展示时间</div> |
|
|
<DatePicker.RangePicker |
|
|
<DatePicker.RangePicker |
|
|
className="form-long" |
|
|
className="form-long" |
|
|
showTime |
|
|
showTime |
|
@ -840,7 +846,7 @@ function AdsMgm() { |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
<div className="form-box"> |
|
|
<div className="form-box"> |
|
|
<div className="form-txt">最后修改时间:</div> |
|
|
|
|
|
|
|
|
<div className="form-txt">最后修改时间</div> |
|
|
<DatePicker.RangePicker |
|
|
<DatePicker.RangePicker |
|
|
className="form-long" |
|
|
className="form-long" |
|
|
showTime |
|
|
showTime |
|
@ -851,7 +857,7 @@ function AdsMgm() { |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
<div className="form-box"> |
|
|
<div className="form-box"> |
|
|
<div className="form-txt">广告ID:</div> |
|
|
|
|
|
|
|
|
<div className="form-txt">广告ID</div> |
|
|
<Input |
|
|
<Input |
|
|
className="form-con" |
|
|
className="form-con" |
|
|
placeholder="请输入准确信息" |
|
|
placeholder="请输入准确信息" |
|
@ -862,7 +868,7 @@ function AdsMgm() { |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
<div className="form-box"> |
|
|
<div className="form-box"> |
|
|
<div className="form-txt">标题:</div> |
|
|
|
|
|
|
|
|
<div className="form-txt">标题</div> |
|
|
<Input |
|
|
<Input |
|
|
className="form-con" |
|
|
className="form-con" |
|
|
placeholder="请输入广告主题标题关键词" |
|
|
placeholder="请输入广告主题标题关键词" |
|
@ -873,22 +879,16 @@ function AdsMgm() { |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
<div className="form-btn"> |
|
|
<div className="form-btn"> |
|
|
<Button type="primary" onClick={handleSearch} loading={loading}> |
|
|
|
|
|
搜索 |
|
|
|
|
|
|
|
|
<Button className="reset" onClick={() => setFormData(defaultData)}> |
|
|
|
|
|
重置 |
|
|
</Button> |
|
|
</Button> |
|
|
<Button onClick={() => setFormData(defaultData)}>条件重置</Button> |
|
|
|
|
|
<Button |
|
|
<Button |
|
|
|
|
|
className="submit" |
|
|
type="primary" |
|
|
type="primary" |
|
|
className="green" |
|
|
|
|
|
onClick={() => { |
|
|
|
|
|
setRowData(defRowData); |
|
|
|
|
|
setPageType("2"); |
|
|
|
|
|
}} |
|
|
|
|
|
|
|
|
onClick={handleSearch} |
|
|
|
|
|
loading={loading} |
|
|
> |
|
|
> |
|
|
创建广告 |
|
|
|
|
|
</Button> |
|
|
|
|
|
<Button type="primary" onClick={() => setPageType("4")}> |
|
|
|
|
|
设置 |
|
|
|
|
|
|
|
|
搜索 |
|
|
</Button> |
|
|
</Button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -896,19 +896,40 @@ function AdsMgm() { |
|
|
<div className="row-head"> |
|
|
<div className="row-head"> |
|
|
<span className="number-wrapper"> |
|
|
<span className="number-wrapper"> |
|
|
<span className="letter">共查询到</span> |
|
|
<span className="letter">共查询到</span> |
|
|
<span className="total-number"> {resultData.total} </span> |
|
|
|
|
|
|
|
|
<span className="total-number"> {resultData.total || 0} </span> |
|
|
<span className="letter">条结果</span> |
|
|
<span className="letter">条结果</span> |
|
|
</span> |
|
|
</span> |
|
|
|
|
|
<div> |
|
|
|
|
|
<Button |
|
|
|
|
|
type="primary" |
|
|
|
|
|
className="green" |
|
|
|
|
|
onClick={() => { |
|
|
|
|
|
setRowData(defRowData); |
|
|
|
|
|
setPageType("2"); |
|
|
|
|
|
}} |
|
|
|
|
|
> |
|
|
|
|
|
创建广告 |
|
|
|
|
|
</Button> |
|
|
|
|
|
<Button type="primary" onClick={() => setPageType("4")}> |
|
|
|
|
|
设置 |
|
|
|
|
|
</Button> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<Table |
|
|
|
|
|
scroll={{ y: true, scrollToFirstRowOnChange: true }} |
|
|
|
|
|
rowKey={(row) => row.id} |
|
|
|
|
|
columns={columns} |
|
|
|
|
|
dataSource={resultData?.list || []} |
|
|
|
|
|
bordered |
|
|
|
|
|
loading={tabLoading} |
|
|
|
|
|
pagination={paginationProps} |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<ResultFlowResult |
|
|
|
|
|
ajaxLoad={tabLoading} |
|
|
|
|
|
resultData={resultData?.list || []} |
|
|
|
|
|
> |
|
|
|
|
|
<Table |
|
|
|
|
|
// bordered |
|
|
|
|
|
className="yisa-table" |
|
|
|
|
|
rowKey={(row) => row.id} |
|
|
|
|
|
dataSource={resultData?.list || []} |
|
|
|
|
|
columns={columns} |
|
|
|
|
|
pagination={false} |
|
|
|
|
|
loading={tabLoading} |
|
|
|
|
|
/> |
|
|
|
|
|
<Pagination {...paginationProps} className="pagination-common" /> |
|
|
|
|
|
</ResultFlowResult> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
{/* 创建、编辑 */} |
|
|
{/* 创建、编辑 */} |
|
@ -1094,7 +1115,7 @@ function AdsMgm() { |
|
|
<Radio value="1">页面URL</Radio> |
|
|
<Radio value="1">页面URL</Radio> |
|
|
<Radio value="2">应用路径</Radio> |
|
|
<Radio value="2">应用路径</Radio> |
|
|
</Radio.Group> |
|
|
</Radio.Group> |
|
|
<div> |
|
|
|
|
|
|
|
|
<div className="r-con"> |
|
|
{rowData?.jumpUrlType == "2" ? ( |
|
|
{rowData?.jumpUrlType == "2" ? ( |
|
|
<Cascader |
|
|
<Cascader |
|
|
className="row-lg" |
|
|
className="row-lg" |
|
|