|
|
@@ -173,35 +173,6 @@ const adStateOptions: Array<SelectInfo> = [
|
|
|
}
|
|
|
]
|
|
|
|
|
|
-// 查询字段设置
|
|
|
-const queryInfo = reactive<Array<QueryInfo>>([
|
|
|
- {
|
|
|
- name: 'adsState',
|
|
|
- label: '广告状态',
|
|
|
- type: FilterType.MULTI_SELECT,
|
|
|
- placeholder: '请选择广告状态',
|
|
|
- otherOption: adStateOptions,
|
|
|
- default: [0, 1, 2],
|
|
|
- supplementInfo: '此项全选与全不选均为查找所有'
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'adsType',
|
|
|
- label: '广告类型',
|
|
|
- type: FilterType.INPUT,
|
|
|
- placeholder: '请输入广告类型',
|
|
|
- otherOption: null,
|
|
|
- default: ''
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'openId',
|
|
|
- label: '用户openId',
|
|
|
- type: FilterType.INPUT,
|
|
|
- placeholder: '请输入用户openId',
|
|
|
- otherOption: null,
|
|
|
- default: ''
|
|
|
- }
|
|
|
-])
|
|
|
-
|
|
|
// 工具栏配置
|
|
|
const tableToolsConfig: TableToolsConfig = {
|
|
|
add: false,
|
|
|
@@ -232,25 +203,46 @@ const adTypeOptions: Array<SelectInfo> = [
|
|
|
]
|
|
|
|
|
|
// 查询字段设置
|
|
|
-const filterInfo = reactive<Array<QueryInfo>>([
|
|
|
+const tableFilterInfo = reactive<Array<QueryInfo>>([
|
|
|
+ {
|
|
|
+ name: 'adsState',
|
|
|
+ label: '广告状态',
|
|
|
+ type: FilterType.MULTI_SELECT,
|
|
|
+ placeholder: '请选择广告状态',
|
|
|
+ otherOption: adStateOptions,
|
|
|
+ default: [0, 1, 2],
|
|
|
+ supplementInfo: '此项全选与全不选均为查找所有'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'adsType',
|
|
|
+ label: '广告类型',
|
|
|
+ type: FilterType.SELECT,
|
|
|
+ placeholder: '请选择广告类型',
|
|
|
+ otherOption: adTypeOptions,
|
|
|
+ default: 'Rewarded',
|
|
|
+ clearable: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'openId',
|
|
|
+ label: '用户openId',
|
|
|
+ type: FilterType.INPUT,
|
|
|
+ placeholder: '请输入用户openId',
|
|
|
+ otherOption: null,
|
|
|
+ default: ''
|
|
|
+ }
|
|
|
+])
|
|
|
+
|
|
|
+// 查询字段设置
|
|
|
+const chartFilterInfo = reactive<Array<QueryInfo>>([
|
|
|
{
|
|
|
name: 'adsType',
|
|
|
label: '广告类型',
|
|
|
type: FilterType.SELECT,
|
|
|
placeholder: '请输入广告类型',
|
|
|
otherOption: adTypeOptions,
|
|
|
- default: '',
|
|
|
+ default: 'Rewarded',
|
|
|
clearable: true
|
|
|
}
|
|
|
- // {
|
|
|
- // name: 'createTime',
|
|
|
- // label: '创建时间',
|
|
|
- // type: FilterType.DATE,
|
|
|
- // placeholder: '选择日期',
|
|
|
- // otherOption: {
|
|
|
- // dataRange: true
|
|
|
- // }
|
|
|
- // }
|
|
|
])
|
|
|
|
|
|
const headerCardInfo: HeaderCardProps = {
|
|
|
@@ -276,7 +268,7 @@ interface ChartQuery {
|
|
|
const queryFormData = ref<ChartQuery>({
|
|
|
gid: tempMultipleChoice.gid,
|
|
|
pf: tempMultipleChoice.pf,
|
|
|
- adsType: 'Interstitial ',
|
|
|
+ adsType: 'Rewarded',
|
|
|
createTime: ['', '']
|
|
|
})
|
|
|
|
|
|
@@ -285,17 +277,6 @@ const chartNeedFields: string[] = []
|
|
|
const isPie = ref(true)
|
|
|
const isRadioPf = ref(false)
|
|
|
|
|
|
-// watch(
|
|
|
-// () => tempMultipleChoice,
|
|
|
-// (newVal: { gid: string; pf: Array<string> }) => {
|
|
|
-// queryFormData.value.gid = newVal.gid
|
|
|
-// queryFormData.value.pf = newVal.pf
|
|
|
-// },
|
|
|
-// {
|
|
|
-// deep: true
|
|
|
-// }
|
|
|
-// )
|
|
|
-
|
|
|
/**
|
|
|
* 更新请求配置
|
|
|
* @param pf 新pf
|
|
|
@@ -304,7 +285,7 @@ const isRadioPf = ref(false)
|
|
|
const updateAllReq = (pf: string[], gid: string) => {
|
|
|
queryFormData.value.gid = gid
|
|
|
queryFormData.value.pf = pf
|
|
|
- updateChartData()
|
|
|
+ // updateChartData()
|
|
|
updateReqConfig(requestConfig, { pf, gid })
|
|
|
// updateReqConfig(keepDataTableInfo.requestConfig, { pf, gid })
|
|
|
}
|
|
|
@@ -334,7 +315,7 @@ watchPageChange(() => [tempMultipleChoice.pf, selectInfo.gid], backupSelect, upd
|
|
|
const { updateChartData, chartOptions } = useTableChart(
|
|
|
AllApi.adListChart,
|
|
|
queryFormData,
|
|
|
- filterInfo,
|
|
|
+ chartFilterInfo,
|
|
|
chartNeedFields,
|
|
|
isPie,
|
|
|
chartRef,
|
|
|
@@ -357,7 +338,7 @@ const { updateChartData, chartOptions } = useTableChart(
|
|
|
<div class="filterContainer">
|
|
|
<TableFilterForm
|
|
|
v-model:queryFormData="queryFormData"
|
|
|
- :queryInfo="filterInfo"
|
|
|
+ :queryInfo="chartFilterInfo"
|
|
|
@query="updateChartData"
|
|
|
ref="filterFormRef"
|
|
|
></TableFilterForm>
|
|
|
@@ -389,7 +370,7 @@ const { updateChartData, chartOptions } = useTableChart(
|
|
|
:pagination-config="paginationConfig"
|
|
|
:table-fields-info="tableFieldsInfo"
|
|
|
:request-config="requestConfig"
|
|
|
- :query-info="queryInfo"
|
|
|
+ :query-info="tableFilterInfo"
|
|
|
:open-filter-query="true"
|
|
|
:tools="tableToolsConfig"
|
|
|
></CustomTable>
|