|
@@ -6,6 +6,8 @@ import { GENDER_TYPE } from '../../page/businessPlan/create/const';
|
|
|
import { addSiftPopulationConfigApi, updateSiftPopulationConfigApi } from '../../API/businessPlan/filterUser';
|
|
|
import dayjs from 'dayjs';
|
|
|
import MindTags from '../mindTags';
|
|
|
+import SelectBook from '../SelectBook';
|
|
|
+import SelectChapter from '../SelectChapter';
|
|
|
|
|
|
interface NewFilterUserProps {
|
|
|
configType: BUSINES_SPLAN_API.ConfigTypeProps
|
|
@@ -27,6 +29,8 @@ const NewFilterUser: React.FC<NewFilterUserProps> = ({ bookCityList, configType
|
|
|
/***********************************/
|
|
|
const { message } = App.useApp()
|
|
|
const [form] = Form.useForm();
|
|
|
+ const platformKey = Form.useWatch('platformKey', form)
|
|
|
+ const lastBookNameList = Form.useWatch('lastBookNameList', form)
|
|
|
const [isSave, setIsSave] = useState<boolean>(false)
|
|
|
|
|
|
const addSiftPopulationConfig = useAjax((params) => addSiftPopulationConfigApi(params))
|
|
@@ -35,7 +39,7 @@ const NewFilterUser: React.FC<NewFilterUserProps> = ({ bookCityList, configType
|
|
|
|
|
|
useEffect(() => {
|
|
|
if (value && Object.keys(value).length > 0) {
|
|
|
- const { beginTime, endTime, lastRechargeTimeMin, lastRechargeTimeMax, groupChatNames, groupChatBeginTime, groupChatEndTime, ...params } = value
|
|
|
+ const { beginTime, endTime, lastRechargeTimeMin, lastRechargeTimeMax, groupChatNames, groupChatBeginTime, groupChatEndTime, lastReadTimeMin, lastReadTimeMax, ...params } = value
|
|
|
if (beginTime) {
|
|
|
params.beginTime = dayjs(beginTime)
|
|
|
}
|
|
@@ -45,6 +49,9 @@ const NewFilterUser: React.FC<NewFilterUserProps> = ({ bookCityList, configType
|
|
|
if (lastRechargeTimeMin && lastRechargeTimeMax) {
|
|
|
params.lastRechargeTime = [dayjs(lastRechargeTimeMin), dayjs(lastRechargeTimeMax)]
|
|
|
}
|
|
|
+ if (lastReadTimeMin && lastReadTimeMax) {
|
|
|
+ params.lastReadTime = [dayjs(lastReadTimeMin), dayjs(lastReadTimeMax)]
|
|
|
+ }
|
|
|
if (groupChatBeginTime && groupChatEndTime) {
|
|
|
params.groupChatTime = [dayjs(groupChatBeginTime), dayjs(groupChatEndTime)]
|
|
|
}
|
|
@@ -60,7 +67,7 @@ const NewFilterUser: React.FC<NewFilterUserProps> = ({ bookCityList, configType
|
|
|
console.log(values)
|
|
|
const { configName, ...configContent } = values
|
|
|
if (configContent && Object.keys(configContent).length > 0 && Object.keys(configContent).some(key => configContent[key])) {
|
|
|
- const { beginTime, endTime, lastRechargeTime, groupChatNames, groupChatTime, ...params } = configContent
|
|
|
+ const { beginTime, endTime, lastRechargeTime, lastReadTime, groupChatNames, groupChatTime, ...params } = configContent
|
|
|
const dta = {
|
|
|
...params
|
|
|
}
|
|
@@ -74,6 +81,10 @@ const NewFilterUser: React.FC<NewFilterUserProps> = ({ bookCityList, configType
|
|
|
dta.lastRechargeTimeMin = dayjs(lastRechargeTime[0]).format('YYYY-MM-DD');
|
|
|
dta.lastRechargeTimeMax = dayjs(lastRechargeTime[1]).format('YYYY-MM-DD');
|
|
|
}
|
|
|
+ if (lastReadTime?.length > 1) {
|
|
|
+ dta.lastReadTimeMin = dayjs(lastReadTime[0]).format('YYYY-MM-DD');
|
|
|
+ dta.lastReadTimeMax = dayjs(lastReadTime[1]).format('YYYY-MM-DD');
|
|
|
+ }
|
|
|
if (groupChatNames) {
|
|
|
dta.groupChatNames = groupChatNames.split(/[,,\n\s]+/ig).filter((item: any) => item)
|
|
|
}
|
|
@@ -197,11 +208,11 @@ const NewFilterUser: React.FC<NewFilterUserProps> = ({ bookCityList, configType
|
|
|
<Form.Item label={<strong>群创建时长</strong>} style={{ marginBottom: 0 }}>
|
|
|
<Space>
|
|
|
<Form.Item name="groupChatHourMin" noStyle>
|
|
|
- <InputNumber placeholder="最小值小时" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最小值小时" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
<span>-</span>
|
|
|
<Form.Item name="groupChatHourMax" noStyle>
|
|
|
- <InputNumber placeholder="最大值小时" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最大值小时" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
</Space>
|
|
|
</Form.Item>
|
|
@@ -210,11 +221,11 @@ const NewFilterUser: React.FC<NewFilterUserProps> = ({ bookCityList, configType
|
|
|
<Form.Item label={<strong>群人数</strong>} style={{ marginBottom: 0 }}>
|
|
|
<Space>
|
|
|
<Form.Item name="groupChatUserMin" noStyle>
|
|
|
- <InputNumber placeholder="最小值" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最小值" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
<span>-</span>
|
|
|
<Form.Item name="groupChatUserMax" noStyle>
|
|
|
- <InputNumber placeholder="最大值" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最大值" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
</Space>
|
|
|
</Form.Item>
|
|
@@ -259,6 +270,16 @@ const NewFilterUser: React.FC<NewFilterUserProps> = ({ bookCityList, configType
|
|
|
/>
|
|
|
</Form.Item>
|
|
|
</div>
|
|
|
+ <div className={style.newSpace}>
|
|
|
+ <Form.Item name="lastBookNameList" label={<strong>最近阅读书籍</strong>} style={{ marginBottom: 0 }}>
|
|
|
+ <SelectBook onChange={() => form.setFieldsValue({ lastChapterNameList: undefined })} platformKey={platformKey} />
|
|
|
+ </Form.Item>
|
|
|
+ </div>
|
|
|
+ {lastBookNameList?.length === 1 && <div className={style.newSpace}>
|
|
|
+ <Form.Item label={<strong>最近阅读章节</strong>} name='lastChapterNameList' tooltip="选择单本书才可选择章节">
|
|
|
+ <SelectChapter platformKey={platformKey} bookName={lastBookNameList?.[0]} />
|
|
|
+ </Form.Item>
|
|
|
+ </div>}
|
|
|
<div className={style.newSpace}>
|
|
|
<Form.Item name="platformUserId" label={<strong>书城用户ID</strong>} style={{ marginBottom: 0 }}>
|
|
|
<Input placeholder="书城用户ID" allowClear />
|
|
@@ -298,11 +319,11 @@ const NewFilterUser: React.FC<NewFilterUserProps> = ({ bookCityList, configType
|
|
|
<Form.Item label={<strong>充值次数</strong>} style={{ marginBottom: 0 }}>
|
|
|
<Space>
|
|
|
<Form.Item name="rechargeCountMin" noStyle>
|
|
|
- <InputNumber placeholder="最小充值次数" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最小充值次数" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
<span>-</span>
|
|
|
<Form.Item name="rechargeCountMax" noStyle>
|
|
|
- <InputNumber placeholder="最大充值次数" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最大充值次数" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
</Space>
|
|
|
</Form.Item>
|
|
@@ -311,11 +332,11 @@ const NewFilterUser: React.FC<NewFilterUserProps> = ({ bookCityList, configType
|
|
|
<Form.Item label={<strong>充值金额</strong>} style={{ marginBottom: 0 }}>
|
|
|
<Space>
|
|
|
<Form.Item name="rechargeMoneyMin" noStyle>
|
|
|
- <InputNumber placeholder="最低充值金额" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最低充值金额" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
<span>-</span>
|
|
|
<Form.Item name="rechargeMoneyMax" noStyle>
|
|
|
- <InputNumber placeholder="最大充值金额" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最大充值金额" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
</Space>
|
|
|
</Form.Item>
|
|
@@ -329,11 +350,11 @@ const NewFilterUser: React.FC<NewFilterUserProps> = ({ bookCityList, configType
|
|
|
<Form.Item label={<strong>首充金额</strong>} style={{ marginBottom: 0 }}>
|
|
|
<Space>
|
|
|
<Form.Item name="firstRechargeMoneyMin" noStyle>
|
|
|
- <InputNumber placeholder="最低首充金额" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最低首充金额" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
<span>-</span>
|
|
|
<Form.Item name="firstRechargeMoneyMax" noStyle>
|
|
|
- <InputNumber placeholder="最大首充金额" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最大首充金额" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
</Space>
|
|
|
</Form.Item>
|
|
@@ -342,11 +363,11 @@ const NewFilterUser: React.FC<NewFilterUserProps> = ({ bookCityList, configType
|
|
|
<Form.Item label={<strong>单笔最大充值金额</strong>} style={{ marginBottom: 0 }}>
|
|
|
<Space>
|
|
|
<Form.Item name="rechargeMoneyMaxMin" noStyle>
|
|
|
- <InputNumber placeholder="最低单笔最大充值金额" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最低单笔最大充值金额" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
<span>-</span>
|
|
|
<Form.Item name="rechargeMoneyMaxMax" noStyle>
|
|
|
- <InputNumber placeholder="最大单笔最大充值金额" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最大单笔最大充值金额" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
</Space>
|
|
|
</Form.Item>
|
|
@@ -355,11 +376,11 @@ const NewFilterUser: React.FC<NewFilterUserProps> = ({ bookCityList, configType
|
|
|
<Form.Item label={<strong>关注距今时间</strong>} style={{ marginBottom: 0 }}>
|
|
|
<Space>
|
|
|
<Form.Item name="subHourMin" noStyle>
|
|
|
- <InputNumber placeholder="最小关注时间" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最小关注时间" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
<span>-</span>
|
|
|
<Form.Item name="subHourMax" noStyle>
|
|
|
- <InputNumber placeholder="最大关注时间" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最大关注时间" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
</Space>
|
|
|
</Form.Item>
|
|
@@ -368,11 +389,11 @@ const NewFilterUser: React.FC<NewFilterUserProps> = ({ bookCityList, configType
|
|
|
<Form.Item label={<strong>关注距今天</strong>} style={{ marginBottom: 0 }}>
|
|
|
<Space>
|
|
|
<Form.Item name="subDayMin" noStyle>
|
|
|
- <InputNumber placeholder="最小关注天" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最小关注天" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
<span>-</span>
|
|
|
<Form.Item name="subDayMax" noStyle>
|
|
|
- <InputNumber placeholder="最大关注天" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最大关注天" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
</Space>
|
|
|
</Form.Item>
|
|
@@ -381,11 +402,29 @@ const NewFilterUser: React.FC<NewFilterUserProps> = ({ bookCityList, configType
|
|
|
<Form.Item label={<strong>最近一次充值距今(小时)</strong>} style={{ marginBottom: 0 }}>
|
|
|
<Space>
|
|
|
<Form.Item name="lastRechargeHourMin" noStyle>
|
|
|
- <InputNumber placeholder="最小充值距今" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最小充值距今" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
<span>-</span>
|
|
|
<Form.Item name="lastRechargeHourMax" noStyle>
|
|
|
- <InputNumber placeholder="最大充值距今" style={{ width: 150 }} />
|
|
|
+ <InputNumber placeholder="最大充值距今" style={{ width: 200 }} />
|
|
|
+ </Form.Item>
|
|
|
+ </Space>
|
|
|
+ </Form.Item>
|
|
|
+ </div>
|
|
|
+ <div className={style.newSpace}>
|
|
|
+ <Form.Item name="lastReadTime" label={<strong>最近阅读时间</strong>} style={{ marginBottom: 0 }}>
|
|
|
+ <DatePicker.RangePicker placeholder={["最近阅读时间开始", "最近阅读时间结束"]} />
|
|
|
+ </Form.Item>
|
|
|
+ </div>
|
|
|
+ <div className={style.newSpace}>
|
|
|
+ <Form.Item label={<strong>最近阅读至今(小时)</strong>} style={{ marginBottom: 0 }}>
|
|
|
+ <Space>
|
|
|
+ <Form.Item name="lastReadHourMin" noStyle>
|
|
|
+ <InputNumber placeholder="最近阅读至今小时差区间-最小" style={{ width: 200 }} />
|
|
|
+ </Form.Item>
|
|
|
+ <span>-</span>
|
|
|
+ <Form.Item name="lastReadHourMax" noStyle>
|
|
|
+ <InputNumber placeholder="最近阅读至今小时差区间-最大" style={{ width: 200 }} />
|
|
|
</Form.Item>
|
|
|
</Space>
|
|
|
</Form.Item>
|