|
|
@@ -410,6 +410,22 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="龙虾标签" align="center" width="200px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.lobsterTagNames && scope.row.lobsterTagNames.length">
|
|
|
+ <el-tag
|
|
|
+ v-for="name in scope.row.lobsterTagNames"
|
|
|
+ :key="name"
|
|
|
+ type="warning"
|
|
|
+ size="small"
|
|
|
+ style="margin: 2px;"
|
|
|
+ >
|
|
|
+ {{ name }}
|
|
|
+ </el-tag>
|
|
|
+ </div>
|
|
|
+ <span v-else style="color: #c0c4cc;">-</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="流失风险" align="center" prop="attritionLevel">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag v-if="scope.row.attritionLevel == null" type="info">未分析</el-tag>
|
|
|
@@ -1590,6 +1606,18 @@ export default {
|
|
|
this.externalContactList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
+ // 加载龙虾标签
|
|
|
+ if (this.externalContactList && this.externalContactList.length) {
|
|
|
+ const userIds = this.externalContactList.map(u => u.id);
|
|
|
+ tagBindingApi.getLobsterTags(userIds).then(res => {
|
|
|
+ const tagMap = res.data || {};
|
|
|
+ this.externalContactList.forEach(row => {
|
|
|
+ const tagData = tagMap[row.id];
|
|
|
+ const tagList = tagData ? (Array.isArray(tagData) ? tagData : [tagData]) : [];
|
|
|
+ this.$set(row, 'lobsterTagNames', tagList.map(tag => tag.tag_name));
|
|
|
+ });
|
|
|
+ }).catch(() => {});
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
bindMiniCustomerId(row){
|
|
|
@@ -2485,6 +2513,7 @@ export default {
|
|
|
this.$message.error('龙虾标签添加失败');
|
|
|
});
|
|
|
}).catch(() => {});
|
|
|
+ this.getList();
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|