perf: 统一导出文件交互、自定义列交互

This commit is contained in:
rd
2025-07-04 16:05:45 +08:00
parent c49e12d988
commit 11bc19907c
9 changed files with 82 additions and 15 deletions

View File

@ -17,17 +17,13 @@
<div class="overview-row flex">
<div v-for="item in CARD_FIELDS" :key="item.prop" class="overview-item flex-1">
<div class="flex items-center mb-8px">
<img :src="item.icon" width="24" height="24" class="mr-8px" />
<p class="s2 color-#211F24">{{ item.label }}</p>
<img :src="item.icon" width="20" height="20" class="mr-8px" />
<p class="label color-#211F24">{{ item.label }}</p>
<a-tooltip v-if="item.tooltip" :content="item.tooltip" position="bottom">
<img :src="icon1" width="14" height="14" class="cursor-pointer ml-4px" />
</a-tooltip>
</div>
<span class="s1 color-#211F24 ml-32px">{{
item.prop === 'total_like_number'
? formatNumberShow(overviewData.total_like_number + overviewData.total_collect_number)
: formatNumberShow(overviewData[item.prop])
}}</span>
<span class="value color-#211F24 ml-32px">{{ formatNumberShow(overviewData[item.prop]) }}</span>
</div>
</div>
</div>
@ -68,6 +64,7 @@ import AccountTable from './components/account-table';
import { getAccountBoardOverview, getAccountBoardList, postAccountBoardExport } from '@/api/all/propertyMarketing';
import { formatNumberShow } from '@/utils/tools';
import { INITIAL_QUERY, CARD_FIELDS } from './constants';
import { downloadByUrl } from '@/utils/tools';
import icon1 from '@/assets/img/icon-question.png';
@ -136,7 +133,7 @@ const handleExport = () => {
}).then((res) => {
const { code, data } = res;
if (code === 200) {
window.open(data.download_url, '_blank');
downloadByUrl(data.download_url);
}
});
};