From e4877374699083d2fea69045eaad8e8775048d7d Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Fri, 30 May 2025 18:37:15 +0800 Subject: [PATCH] 开发完成admin 小区投诉功能 --- src/api/complaint/adminComplaintApi.js | 46 ++++++++++++++++++++++++++++++++++++++++++++++ src/api/complaint/adminComplaintDetailApi.js | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/community/viewImage.vue | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/complaint/aComplaintDetailAppraise.vue | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/complaint/aComplaintDetailEvent.vue | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/components/complaint/aComplaintDetailType.vue | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/i18n/index.js | 6 ++++++ src/router/index.js | 10 ++++++++++ src/views/complaint/adminComplaintDetailLang.js | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/views/complaint/adminComplaintDetailList.vue | 187 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/views/complaint/adminComplaintLang.js | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/views/complaint/adminComplaintList.vue | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 12 files changed, 956 insertions(+), 0 deletions(-) create mode 100644 src/api/complaint/adminComplaintApi.js create mode 100644 src/api/complaint/adminComplaintDetailApi.js create mode 100644 src/components/community/viewImage.vue create mode 100644 src/components/complaint/aComplaintDetailAppraise.vue create mode 100644 src/components/complaint/aComplaintDetailEvent.vue create mode 100644 src/components/complaint/aComplaintDetailType.vue create mode 100644 src/views/complaint/adminComplaintDetailLang.js create mode 100644 src/views/complaint/adminComplaintDetailList.vue create mode 100644 src/views/complaint/adminComplaintLang.js create mode 100644 src/views/complaint/adminComplaintList.vue diff --git a/src/api/complaint/adminComplaintApi.js b/src/api/complaint/adminComplaintApi.js new file mode 100644 index 0000000..c82e1a9 --- /dev/null +++ b/src/api/complaint/adminComplaintApi.js @@ -0,0 +1,46 @@ +import request from '@/utils/request' + +// 获取投诉建议列表 +export function listAdminComplaints(params) { + return new Promise((resolve, reject) => { + request({ + url: '/complaint.listAdminComplaints', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve({ + data: res.data, + total: res.total + }) + } else { + reject(new Error(res.msg || 'Failed to get complaint list')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 获取管理员小区列表 +export function listAdminCommunitys(params) { + return new Promise((resolve, reject) => { + request({ + url: '/community.listAdminCommunitys', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve({ + data: res.data + }) + } else { + reject(new Error(res.msg || 'Failed to get community list')) + } + }).catch(error => { + reject(error) + }) + }) +} \ No newline at end of file diff --git a/src/api/complaint/adminComplaintDetailApi.js b/src/api/complaint/adminComplaintDetailApi.js new file mode 100644 index 0000000..bc12344 --- /dev/null +++ b/src/api/complaint/adminComplaintDetailApi.js @@ -0,0 +1,81 @@ +import request from '@/utils/request' + +// 获取投诉详情 +export function getComplaintDetail(params) { + return new Promise((resolve, reject) => { + request({ + url: '/complaint.listAdminComplaints', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code == 0) { + resolve(res) + } else { + reject(new Error(res.msg || '获取投诉详情失败')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 获取投诉事件列表 +export function listComplaintEvents(params) { + return new Promise((resolve, reject) => { + request({ + url: '/complaint.listAdminComplaintEvent', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code == 0) { + resolve(res) + } else { + reject(new Error(res.msg || '获取投诉事件列表失败')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 获取投诉评价列表 +export function listComplaintAppraises(params) { + return new Promise((resolve, reject) => { + request({ + url: '/complaintAppraise.listAdminComplaintAppraise', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code == 0) { + resolve(res) + } else { + reject(new Error(res.msg || '获取投诉评价列表失败')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 获取投诉类型列表 +export function listComplaintTypes(params) { + return new Promise((resolve, reject) => { + request({ + url: '/complaintType.listAdminComplaintType', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code == 0) { + resolve(res) + } else { + reject(new Error(res.msg || '获取投诉类型列表失败')) + } + }).catch(error => { + reject(error) + }) + }) +} \ No newline at end of file diff --git a/src/components/community/viewImage.vue b/src/components/community/viewImage.vue new file mode 100644 index 0000000..555b49c --- /dev/null +++ b/src/components/community/viewImage.vue @@ -0,0 +1,95 @@ + + + + + \ No newline at end of file diff --git a/src/components/complaint/aComplaintDetailAppraise.vue b/src/components/complaint/aComplaintDetailAppraise.vue new file mode 100644 index 0000000..1f8e46d --- /dev/null +++ b/src/components/complaint/aComplaintDetailAppraise.vue @@ -0,0 +1,57 @@ + + + + + \ No newline at end of file diff --git a/src/components/complaint/aComplaintDetailEvent.vue b/src/components/complaint/aComplaintDetailEvent.vue new file mode 100644 index 0000000..f567c86 --- /dev/null +++ b/src/components/complaint/aComplaintDetailEvent.vue @@ -0,0 +1,62 @@ + + + + + \ No newline at end of file diff --git a/src/components/complaint/aComplaintDetailType.vue b/src/components/complaint/aComplaintDetailType.vue new file mode 100644 index 0000000..93f5bce --- /dev/null +++ b/src/components/complaint/aComplaintDetailType.vue @@ -0,0 +1,69 @@ + + + + + \ No newline at end of file diff --git a/src/i18n/index.js b/src/i18n/index.js index 6712287..d33281e 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -72,6 +72,8 @@ import { messages as adminInspectionPlanMessages } from '../views/inspection/adm import { messages as aInspectionPlanDetailMessages } from '../views/inspection/aInspectionPlanDetailLang' import { messages as adminInspectionTaskMessages } from '../views/inspection/adminInspectionTaskLang' import { messages as adminInspectionTaskDetailMessages } from '../views/inspection/adminInspectionTaskDetailLang' +import { messages as adminComplaintMessages } from '../views/complaint/adminComplaintLang' +import { messages as adminComplaintDetailMessages } from '../views/complaint/adminComplaintDetailLang' Vue.use(VueI18n) @@ -148,6 +150,8 @@ const messages = { ...aInspectionPlanDetailMessages.en, ...adminInspectionTaskMessages.en, ...adminInspectionTaskDetailMessages.en, + ...adminComplaintMessages.en, + ...adminComplaintDetailMessages.en, }, zh: { ...loginMessages.zh, @@ -220,6 +224,8 @@ const messages = { ...aInspectionPlanDetailMessages.zh, ...adminInspectionTaskMessages.zh, ...adminInspectionTaskDetailMessages.zh, + ...adminComplaintMessages.zh, + ...adminComplaintDetailMessages.zh, } } diff --git a/src/router/index.js b/src/router/index.js index b89c3f9..5090391 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -346,6 +346,16 @@ const routes = [ name: '/views/inspection/adminInspectionTaskDetail', component: () => import('@/views/inspection/adminInspectionTaskDetailList.vue') }, + { + path:'/pages/complaint/adminComplaint', + name:'/pages/complaint/adminComplaint', + component: () => import('@/views/complaint/adminComplaintList.vue') + }, + { + path:'/views/complaint/adminComplaintDetail', + name:'/views/complaint/adminComplaintDetail', + component: () => import('@/views/complaint/adminComplaintDetailList.vue') + }, // 其他子路由可以在这里添加 ] }, diff --git a/src/views/complaint/adminComplaintDetailLang.js b/src/views/complaint/adminComplaintDetailLang.js new file mode 100644 index 0000000..1e3542f --- /dev/null +++ b/src/views/complaint/adminComplaintDetailLang.js @@ -0,0 +1,104 @@ +export const messages = { + en: { + complaintDetail: { + title: 'Complaint Details', + orderId: 'Order ID', + type: 'Type', + room: 'Room', + contact: 'Contact', + phone: 'Phone', + status: 'Status', + createTime: 'Create Time', + content: 'Content', + workflow: 'Workflow', + evaluation: 'Evaluation', + fetchError: 'Failed to fetch complaint details' + }, + complaintDetailEvent: { + type: 'Type', + operator: 'Operator', + remark: 'Remark', + time: 'Time', + submit: 'Submit', + process: 'Process', + evaluate: 'Evaluate', + reply: 'Reply', + fetchError: 'Failed to fetch event list' + }, + complaintDetailAppraise: { + user: 'User Name', + content: 'Evaluation Content', + score: 'Evaluation Score', + status: 'Evaluation Status', + time: 'Evaluation Time', + replier: 'Replier', + replyContent: 'Reply Content', + pending: 'Pending Reply', + replied: 'Replied', + fetchError: 'Failed to fetch evaluation list' + }, + complaintDetailType: { + name: 'Type Name', + notifyWay: 'Notification Method', + replyType: 'Reply Type', + handler: 'Handler', + createTime: 'Create Time', + sms: 'SMS', + wechat: 'WeChat', + autoReply: 'Auto Reply', + manualReply: 'Manual Reply', + fetchError: 'Failed to fetch type list' + } + }, + zh: { + complaintDetail: { + title: '投诉详情', + orderId: '订单编号', + type: '类型', + room: '房屋', + contact: '联系人', + phone: '联系电话', + status: '状态', + createTime: '创建时间', + content: '投诉内容', + workflow: '工单流转', + evaluation: '工单评价', + fetchError: '获取投诉详情失败' + }, + complaintDetailEvent: { + type: '类型', + operator: '操作人', + remark: '说明', + time: '时间', + submit: '提交', + process: '投诉处理', + evaluate: '评价', + reply: '评价回复', + fetchError: '获取事件列表失败' + }, + complaintDetailAppraise: { + user: '用户名称', + content: '评价内容', + score: '评价得分', + status: '评价状态', + time: '评价时间', + replier: '回复人', + replyContent: '回复内容', + pending: '待回复', + replied: '已回复', + fetchError: '获取评价列表失败' + }, + complaintDetailType: { + name: '类型名称', + notifyWay: '通知方式', + replyType: '评价回复', + handler: '处理人', + createTime: '创建时间', + sms: '短信', + wechat: '微信', + autoReply: '自动回复', + manualReply: '人工回复', + fetchError: '获取类型列表失败' + } + } +} \ No newline at end of file diff --git a/src/views/complaint/adminComplaintDetailList.vue b/src/views/complaint/adminComplaintDetailList.vue new file mode 100644 index 0000000..9dac0d5 --- /dev/null +++ b/src/views/complaint/adminComplaintDetailList.vue @@ -0,0 +1,187 @@ + + + + + \ No newline at end of file diff --git a/src/views/complaint/adminComplaintLang.js b/src/views/complaint/adminComplaintLang.js new file mode 100644 index 0000000..8f51a52 --- /dev/null +++ b/src/views/complaint/adminComplaintLang.js @@ -0,0 +1,68 @@ +export const messages = { + en: { + adminComplaint: { + search: { + title: 'Search Conditions', + roomName: 'Room', + roomNamePlaceholder: 'Building-Unit-Room e.g. 1-1-1', + complaintName: 'Contact', + complaintNamePlaceholder: 'Please enter contact name', + tel: 'Contact Tel', + telPlaceholder: 'Please enter contact tel', + complaintId: 'Complaint ID', + complaintIdPlaceholder: 'Please enter complaint ID', + startTime: 'Start Time', + startTimePlaceholder: 'Please select start time', + endTime: 'End Time', + endTimePlaceholder: 'Please select end time' + }, + list: { + title: 'Complaint Suggestions' + }, + table: { + complaintId: 'Order ID', + type: 'Type', + room: 'Room', + contact: 'Contact', + contactTel: 'Contact Tel', + status: 'Status', + handler: 'Handler', + createTime: 'Create Time' + }, + fetchError: 'Failed to fetch complaint list' + } + }, + zh: { + adminComplaint: { + search: { + title: '查询条件', + roomName: '房屋', + roomNamePlaceholder: '楼栋-单元-房屋 如1-1-1', + complaintName: '联系人', + complaintNamePlaceholder: '请输入联系人', + tel: '联系电话', + telPlaceholder: '请输入联系电话', + complaintId: '工单编号', + complaintIdPlaceholder: '请输入工单编号', + startTime: '开始时间', + startTimePlaceholder: '请选择开始时间', + endTime: '结束时间', + endTimePlaceholder: '请选择结束时间' + }, + list: { + title: '投诉建议' + }, + table: { + complaintId: '订单编号', + type: '类型', + room: '房屋', + contact: '联系人', + contactTel: '联系电话', + status: '状态', + handler: '处理人', + createTime: '创建时间' + }, + fetchError: '获取投诉列表失败' + } + } +} \ No newline at end of file diff --git a/src/views/complaint/adminComplaintList.vue b/src/views/complaint/adminComplaintList.vue new file mode 100644 index 0000000..12f03f4 --- /dev/null +++ b/src/views/complaint/adminComplaintList.vue @@ -0,0 +1,171 @@ + + + + + \ No newline at end of file -- libgit2 0.21.4