-
回复状态
+
+ 回复状态:
{{ feedbackText(currentRow) }}
@@ -276,6 +276,8 @@ export default {
originalRemarkText: '',
currentRow: null,
sourceList: [],
+ sourceStats: {},
+ pendingCountFromApi: 0,
queryForm: {
name: '',
phone: '',
@@ -283,12 +285,7 @@ export default {
source: '',
feedback: ''
},
- feedbackOptions: [
- { id: 0, name: '待回复' },
- { id: 1, name: '沟通中' },
- { id: 2, name: '已关闭' },
- { id: 3, name: '号码错误' }
- ]
+ feedbackOptions: []
}
},
computed: {
@@ -301,13 +298,13 @@ export default {
return (this.page - 1) * this.pageSize + this.tableData.length
},
wechatCount() {
- return this.tableData.filter(item => /微信|云宝/.test(String(item.source || ''))).length
+ return Number(this.sourceStats['公众号'] || 0)
},
webCount() {
- return this.tableData.filter(item => !/微信|云宝/.test(String(item.source || ''))).length
+ return Number(this.sourceStats['官网'] || 0)
},
pendingCount() {
- return this.tableData.filter(item => String(item.feedback) === '0').length
+ return Number(this.pendingCountFromApi || 0)
}
},
created() {
@@ -392,6 +389,20 @@ export default {
.filter(Boolean)
)]
},
+ extractFeedbackList(res) {
+ const data = (res && res.data) || {}
+ const list = data.feedback_list || data.feedbackList || res.feedback_list || res.feedbackList
+ return Array.isArray(list) ? list : []
+ },
+ extractSourceStats(res) {
+ const data = (res && res.data) || {}
+ return data.source_stats || data.sourceStats || res.source_stats || res.sourceStats || {}
+ },
+ extractPendingCount(res) {
+ const data = (res && res.data) || {}
+ const count = Number(data.pending_count || data.pendingCount || res.pending_count || res.pendingCount || 0)
+ return Number.isFinite(count) ? count : 0
+ },
getTableData(to_excel) {
const params = this.buildSearchParams(to_excel)
if (to_excel === '0') this.tableLoading = true
@@ -409,6 +420,10 @@ export default {
this.tableData = rows
this.totalCount = this.extractTotal(res, rows.length)
this.sourceList = this.extractSourceList(res, rows)
+ const feedbackList = this.extractFeedbackList(res)
+ if (feedbackList.length) this.feedbackOptions = feedbackList
+ this.sourceStats = this.extractSourceStats(res)
+ this.pendingCountFromApi = this.extractPendingCount(res)
this.selectedRows = []
return
}
@@ -801,43 +816,60 @@ export default {
.detail-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 0px 72px;
+ gap: 14px 56px;
}
.detail-item {
display: flex;
- flex-direction: column;
- gap: 6px;
+ align-items: baseline;
+ gap: 0;
word-break: break-word;
}
+.detail-item-full {
+ grid-column: 1 / -1;
+}
+
.detail-label {
- display: block;
- margin-bottom: 8px;
- color: #8a94a6;
- font-size: 14px;
- line-height: 1.4;
+ display: inline;
+ flex-shrink: 0;
+ margin-bottom: 0;
+ color: #667085;
+ font-size: 13px;
+ line-height: 1.5;
+ font-weight: 500;
}
.detail-item strong,
.detail-section strong {
- color: #111827;
- font-size: 16px;
- line-height: 1.5;
- font-weight: 700;
+ color: #344054;
+ font-size: 14px;
+ line-height: 1.7;
+ font-weight: 600;
}
.detail-section {
- margin-top: 28px;
+ margin-top: 22px;
+}
+
+.detail-section-inline {
+ display: flex;
+ align-items: center;
+ gap: 0;
+}
+
+.detail-section:not(.detail-section-inline) .detail-label {
+ display: block;
+ margin-bottom: 8px;
}
.detail-content-box {
min-height: 42px;
- padding: 14px 16px;
+ padding: 12px 14px;
border-radius: 8px;
background: #f8fafc;
- color: #1f2937;
- font-size: 15px;
+ color: #475467;
+ font-size: 14px;
line-height: 1.7;
word-break: break-word;
}