|
@@ -240,15 +240,16 @@ export default {
|
|
|
// 计算动态表头
|
|
|
dynamicColumns() {
|
|
|
let columns = [];
|
|
|
- // 判断是否仅选择续约
|
|
|
- const isOnlyRenewal = this.selectedFilters.length === 1 && this.selectedFilters[0] === "续约";
|
|
|
+ // 判断是否同时选择了新签和续约
|
|
|
+ const hasBoth = this.selectedFilters.includes("新签") && this.selectedFilters.includes("续约");
|
|
|
|
|
|
this.selectedFilters.forEach((key) => {
|
|
|
if (this.filterOptions[key]) {
|
|
|
this.filterOptions[key].forEach((field) => {
|
|
|
- // 当且仅当选择续约时,过滤特定字段
|
|
|
- if (key === "续约" && isOnlyRenewal) {
|
|
|
- if (["SignedClientCount", "AverageRevenueCount"].includes(field.key)) return;
|
|
|
+ // 如果是续约分类的特殊字段
|
|
|
+ if (key === "续约" && ["SignedClientCount", "AverageRevenueCount"].includes(field.key)) {
|
|
|
+ // 仅在同时选择新签和续约时显示
|
|
|
+ if (!hasBoth) return;
|
|
|
}
|
|
|
columns.push({ label: field.label, key: field.key, tooltip: field.tooltip });
|
|
|
});
|