86 lines
2.1 KiB
JavaScript
86 lines
2.1 KiB
JavaScript
/**
|
||
* @Description: 投诉详情API
|
||
* @Author: Zy
|
||
* @Date: 2026-05-15 08:50:47
|
||
* @LastEditor: Zy
|
||
* @LastEditTime: 2026-05-19 16:34:23
|
||
*/
|
||
import request, {
|
||
filterParams,
|
||
get,
|
||
put,
|
||
post
|
||
} from "./request.js";
|
||
|
||
/**
|
||
* 获取投诉信息分页列表
|
||
* @param {Object} data - 请求参数
|
||
* @param {number} data.pageNum - 页码(第几页)
|
||
* @param {number} data.pageSize - 每页条数
|
||
* @param {number} [data.status] - 投诉状态(可选),不传=全部,0=待处理,2=已完成
|
||
* @returns {Promise<{
|
||
* code: number,
|
||
* msg: string,
|
||
* total: number,
|
||
* rows: Array<{
|
||
* id: string,
|
||
* typeId: number,
|
||
* typeName: string,
|
||
* problemDes: string,
|
||
* complaintName: string,
|
||
* phone: string,
|
||
* villageId: number,
|
||
* problemImageUrl: string,
|
||
* status: string,
|
||
* createTime: string|null,
|
||
* handleId: number|null,
|
||
* handleName: string|null,
|
||
* handleContent: string|null
|
||
* }>
|
||
* }>} 返回接口响应结果
|
||
*/
|
||
export const getComplainList = (data) => {
|
||
return get('/manage/complain/list', filterParams(data))
|
||
}
|
||
/**
|
||
* 获取 某一个 投诉详情
|
||
* @param {string} id 投诉id
|
||
*/
|
||
export const getComplaniMain = (id) => {
|
||
return post('/manage/complain/list', data)
|
||
}
|
||
|
||
/**
|
||
* @description: 处理投诉API
|
||
* @param {Object} data
|
||
* @param {string} data.id 处理人员id
|
||
* @param {string} data.handleContent 处理描述
|
||
*/
|
||
export const putComplainProcess = (data) => {
|
||
return put('/manage/complain/process', data)
|
||
}
|
||
|
||
|
||
/**
|
||
* @typedef complainMain 投诉详情内容
|
||
* @property {number} typeId
|
||
* @property {string} typeName
|
||
* @property {string} problemDes
|
||
* @property {string} complaintName
|
||
* @property {string} phone
|
||
* @property {string} villageId
|
||
* @property {string} problemImageUrl
|
||
* @property {string} status
|
||
* @property {string} createTime
|
||
* @property {string} handleName
|
||
* @property {string} handleContent
|
||
*/
|
||
/**
|
||
* @description: 查询 具体 投诉详情
|
||
* @param {string} 投诉 id
|
||
* @return {Promise<DataResult<complainMain>>}
|
||
*/
|
||
export const getComplainMain = (id) => {
|
||
return get('/manage/complain/detail?id=' + id)
|
||
}
|