feat(property-marketing): 优化账号和计划选择组件,重构投放指南表格展示逻辑
perf: 移除冗余代码,优化空数据展示处理 style: 统一组件样式引用方式,调整表格标题显示
This commit is contained in:
@ -76,7 +76,6 @@
|
||||
import EchartsItem from './components/echarts-item/index';
|
||||
import { PLATFORM_LIST } from '../common_constants';
|
||||
import {
|
||||
getPlacementAccountsList,
|
||||
getPlacementAccountsTrend,
|
||||
getPlacementAccountProjectsTrend,
|
||||
fetchAccountOperators,
|
||||
@ -96,7 +95,6 @@ const getOperators = async () => {
|
||||
}
|
||||
};
|
||||
const query = reactive({
|
||||
names: '',
|
||||
platform: '',
|
||||
operator_id: '',
|
||||
data_time: [],
|
||||
@ -137,7 +135,6 @@ const handleSearch = async () => {
|
||||
getAccountProjectsTrend();
|
||||
}
|
||||
};
|
||||
// 定义图表配置
|
||||
const chartConfigs = ref([
|
||||
{
|
||||
dataKey: 'total_use_amount',
|
||||
@ -224,25 +221,17 @@ const chartConfigs = ref([
|
||||
series_data: [],
|
||||
},
|
||||
]);
|
||||
const handleReset = async () => {};
|
||||
const handleReset = async () => {
|
||||
query.platform = '';
|
||||
query.operator_id = '';
|
||||
query.ids = [];
|
||||
query.placement_account_id = [];
|
||||
handleSearch();
|
||||
};
|
||||
|
||||
const operators = ref([]);
|
||||
const accountList = ref([]);
|
||||
const handleTabClick = (key) => {
|
||||
handleSearch();
|
||||
};
|
||||
|
||||
// 获取账户名称
|
||||
const getAccountList = async () => {
|
||||
const { code, data } = await getPlacementAccountsList(query);
|
||||
if (code === 200) {
|
||||
accountList.value = data;
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
handleSearch();
|
||||
getAccountList();
|
||||
getOperators();
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user