|
|
@@ -1319,6 +1319,7 @@ type HotContentDemandExportResponse = {
|
|
|
};
|
|
|
|
|
|
type IsAsDemandFilter = "all" | "yes" | "no";
|
|
|
+type MatchedDemandFilter = "all" | "yes" | "no";
|
|
|
type ItemTypeFilter = "all" | "word" | "point";
|
|
|
|
|
|
function HotContentDemandExportPanel({ active }: { active: boolean }) {
|
|
|
@@ -1327,11 +1328,17 @@ function HotContentDemandExportPanel({ active }: { active: boolean }) {
|
|
|
return [today, today];
|
|
|
});
|
|
|
const [isAsDemandFilter, setIsAsDemandFilter] = useState<IsAsDemandFilter>("all");
|
|
|
+ const [matchedDemandFilter, setMatchedDemandFilter] = useState<MatchedDemandFilter>("all");
|
|
|
const [itemTypeFilter, setItemTypeFilter] = useState<ItemTypeFilter>("all");
|
|
|
const [appliedIsAsDemand, setAppliedIsAsDemand] = useState<IsAsDemandFilter>("all");
|
|
|
+ const [appliedMatchedDemand, setAppliedMatchedDemand] = useState<MatchedDemandFilter>("all");
|
|
|
const [appliedItemType, setAppliedItemType] = useState<ItemTypeFilter>("all");
|
|
|
const [minWxindexInput, setMinWxindexInput] = useState<number | null>(null);
|
|
|
const [appliedMinWxindex, setAppliedMinWxindex] = useState<number | null>(null);
|
|
|
+ const [minEventSenseInput, setMinEventSenseInput] = useState<number | null>(null);
|
|
|
+ const [appliedMinEventSense, setAppliedMinEventSense] = useState<number | null>(null);
|
|
|
+ const [minSeniorFitInput, setMinSeniorFitInput] = useState<number | null>(null);
|
|
|
+ const [appliedMinSeniorFit, setAppliedMinSeniorFit] = useState<number | null>(null);
|
|
|
const [currentPage, setCurrentPage] = useState(1);
|
|
|
const [pageSize, setPageSize] = useState(20);
|
|
|
const [refreshTick, setRefreshTick] = useState(0);
|
|
|
@@ -1363,14 +1370,25 @@ function HotContentDemandExportPanel({ active }: { active: boolean }) {
|
|
|
} else if (appliedIsAsDemand === "no") {
|
|
|
url.searchParams.set("is_as_demand", "0");
|
|
|
}
|
|
|
+ if (appliedMatchedDemand === "yes") {
|
|
|
+ url.searchParams.set("has_matched_demand", "1");
|
|
|
+ } else if (appliedMatchedDemand === "no") {
|
|
|
+ url.searchParams.set("has_matched_demand", "0");
|
|
|
+ }
|
|
|
if (appliedItemType === "word") {
|
|
|
url.searchParams.set("item_type", "词");
|
|
|
- } else if (appliedItemType === "point") {
|
|
|
+ } else if (appliedItemType === "point") {
|
|
|
url.searchParams.set("item_type", "点");
|
|
|
}
|
|
|
if (appliedMinWxindex !== null) {
|
|
|
url.searchParams.set("min_wxindex_latest_score", String(appliedMinWxindex));
|
|
|
}
|
|
|
+ if (appliedMinEventSense !== null) {
|
|
|
+ url.searchParams.set("min_event_sense_score", String(appliedMinEventSense));
|
|
|
+ }
|
|
|
+ if (appliedMinSeniorFit !== null) {
|
|
|
+ url.searchParams.set("min_senior_fit_score", String(appliedMinSeniorFit));
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const buildRequestUrl = (page: number, size: number = pageSize) => {
|
|
|
@@ -1399,8 +1417,11 @@ function HotContentDemandExportPanel({ active }: { active: boolean }) {
|
|
|
startDate,
|
|
|
endDate,
|
|
|
appliedIsAsDemand,
|
|
|
+ appliedMatchedDemand,
|
|
|
appliedItemType,
|
|
|
appliedMinWxindex,
|
|
|
+ appliedMinEventSense,
|
|
|
+ appliedMinSeniorFit,
|
|
|
currentPage,
|
|
|
pageSize,
|
|
|
refreshTick,
|
|
|
@@ -1443,8 +1464,11 @@ function HotContentDemandExportPanel({ active }: { active: boolean }) {
|
|
|
return;
|
|
|
}
|
|
|
setAppliedIsAsDemand(isAsDemandFilter);
|
|
|
+ setAppliedMatchedDemand(matchedDemandFilter);
|
|
|
setAppliedItemType(itemTypeFilter);
|
|
|
setAppliedMinWxindex(minWxindexInput);
|
|
|
+ setAppliedMinEventSense(minEventSenseInput);
|
|
|
+ setAppliedMinSeniorFit(minSeniorFitInput);
|
|
|
setCurrentPage(1);
|
|
|
setRefreshTick((value) => value + 1);
|
|
|
};
|
|
|
@@ -1468,11 +1492,17 @@ function HotContentDemandExportPanel({ active }: { active: boolean }) {
|
|
|
const today = dayjs();
|
|
|
setDateRange([today, today]);
|
|
|
setIsAsDemandFilter("all");
|
|
|
+ setMatchedDemandFilter("all");
|
|
|
setItemTypeFilter("all");
|
|
|
setAppliedIsAsDemand("all");
|
|
|
+ setAppliedMatchedDemand("all");
|
|
|
setAppliedItemType("all");
|
|
|
setMinWxindexInput(null);
|
|
|
setAppliedMinWxindex(null);
|
|
|
+ setMinEventSenseInput(null);
|
|
|
+ setAppliedMinEventSense(null);
|
|
|
+ setMinSeniorFitInput(null);
|
|
|
+ setAppliedMinSeniorFit(null);
|
|
|
setCurrentPage(1);
|
|
|
setRefreshTick((value) => value + 1);
|
|
|
};
|
|
|
@@ -1630,6 +1660,18 @@ function HotContentDemandExportPanel({ active }: { active: boolean }) {
|
|
|
]}
|
|
|
/>
|
|
|
</Form.Item>
|
|
|
+ <Form.Item label="是否匹配需求">
|
|
|
+ <Select<MatchedDemandFilter>
|
|
|
+ className="hot-content-filter-select"
|
|
|
+ value={matchedDemandFilter}
|
|
|
+ onChange={setMatchedDemandFilter}
|
|
|
+ options={[
|
|
|
+ { label: "全部", value: "all" },
|
|
|
+ { label: "是", value: "yes" },
|
|
|
+ { label: "否", value: "no" },
|
|
|
+ ]}
|
|
|
+ />
|
|
|
+ </Form.Item>
|
|
|
<Form.Item label="微信指数热度 ≥">
|
|
|
<InputNumber
|
|
|
className="hot-content-wxindex-input"
|
|
|
@@ -1640,6 +1682,28 @@ function HotContentDemandExportPanel({ active }: { active: boolean }) {
|
|
|
onChange={(v) => setMinWxindexInput(v ?? null)}
|
|
|
/>
|
|
|
</Form.Item>
|
|
|
+ <Form.Item label="事件性得分 ≥">
|
|
|
+ <InputNumber
|
|
|
+ className="hot-content-wxindex-input"
|
|
|
+ min={0}
|
|
|
+ max={10}
|
|
|
+ step={0.1}
|
|
|
+ placeholder="不限制"
|
|
|
+ value={minEventSenseInput}
|
|
|
+ onChange={(v) => setMinEventSenseInput(v ?? null)}
|
|
|
+ />
|
|
|
+ </Form.Item>
|
|
|
+ <Form.Item label="老年性得分 ≥">
|
|
|
+ <InputNumber
|
|
|
+ className="hot-content-wxindex-input"
|
|
|
+ min={0}
|
|
|
+ max={10}
|
|
|
+ step={0.1}
|
|
|
+ placeholder="不限制"
|
|
|
+ value={minSeniorFitInput}
|
|
|
+ onChange={(v) => setMinSeniorFitInput(v ?? null)}
|
|
|
+ />
|
|
|
+ </Form.Item>
|
|
|
<Form.Item label=" ">
|
|
|
<Button
|
|
|
type="primary"
|