This commit is contained in:
王子琦
2026-01-20 14:05:18 +08:00
parent 438eb0b635
commit ec6ec210d2
15 changed files with 132 additions and 28 deletions

View File

@@ -4,9 +4,21 @@
<el-table :data="items" stripe>
<el-table-column prop="id" label="编号" width="80" />
<el-table-column prop="elderId" label="长者ID" />
<el-table-column prop="type" label="类型" />
<el-table-column label="类型" width="120">
<template slot-scope="scope">
<el-tag :type="typeTag(scope.row.type)">
{{ typeLabel(scope.row.type) }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="content" label="内容" />
<el-table-column prop="status" label="状态" width="120" />
<el-table-column label="状态" width="120">
<template slot-scope="scope">
<el-tag :type="statusTag(scope.row.status)">
{{ statusLabel(scope.row.status) }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<el-button size="mini" @click="openReply(scope.row)">回复</el-button>
@@ -50,6 +62,30 @@ export default {
this.load();
},
methods: {
typeLabel(type) {
if (type === "SUGGESTION") return "建议";
if (type === "COMPLAINT") return "投诉";
if (type === "PRAISE") return "表扬";
return type || "-";
},
typeTag(type) {
if (type === "SUGGESTION") return "info";
if (type === "COMPLAINT") return "danger";
if (type === "PRAISE") return "success";
return "info";
},
statusLabel(status) {
if (status === "NEW") return "新建";
if (status === "PROCESSING") return "处理中";
if (status === "CLOSED") return "已关闭";
return status || "-";
},
statusTag(status) {
if (status === "NEW") return "warning";
if (status === "PROCESSING") return "";
if (status === "CLOSED") return "success";
return "info";
},
async load() {
try {
const res = await feedbackList();