feat(admin): 工单管理 UI 优化与回复模板、文件管理增强
工单列表与详情 UI/交互优化及新工单提醒;新增回复模板与工单类型管理;文件管理增加管理员筛选并优化详情展示。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+38
-8
@@ -5,14 +5,14 @@ import request from "@/utils/request.js";
|
||||
* @returns {Promise}
|
||||
*/
|
||||
|
||||
export function getTickerList(count, page, status, orderBy, order, userId, keyword) {
|
||||
export function getTickerList(count, page, status, orderBy, order, userId, keyword, type) {
|
||||
const params = { count, page }
|
||||
if (status !== undefined && status !== '') params.status = status
|
||||
if (orderBy) params.orderBy = orderBy
|
||||
if (order) params.order = order
|
||||
if (userId) params.user_id = userId
|
||||
if (keyword) params.keyword = keyword
|
||||
console.log('工单列表请求参数:', params) // 调试日志
|
||||
if (type) params.type = type
|
||||
return request.get('/api/v1/admin/work_order/list', params)
|
||||
}
|
||||
|
||||
@@ -43,12 +43,16 @@ export function getTicketDetail(work_id) {
|
||||
|
||||
// 回复工单
|
||||
export function replyTicket(work_id, content, files) {
|
||||
return request.post('/api/v1/admin/work_order/reply', { work_id, content, files })
|
||||
return request.post('/api/v1/admin/work_order/reply', { work_id, content, files }, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
||||
// 关闭工单
|
||||
export function closeTicket(work_id) {
|
||||
return request.post('/api/v1/admin/work_order/close', { work_id })
|
||||
return request.post('/api/v1/admin/work_order/close', { work_id }, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
||||
export function getFile(file_id) {
|
||||
@@ -106,10 +110,9 @@ export function updateTicketType(data) {
|
||||
}
|
||||
/**删除工单类型 */
|
||||
export function deleteTicketType(data) {
|
||||
return request.delete('/api/v1/admin/work_order/delete_type', data,{
|
||||
headers:{
|
||||
'Content-Type':'multipart/form-data'
|
||||
}
|
||||
return request.delete('/api/v1/admin/work_order/delete_type', {
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
/**获取工单类型列表 */
|
||||
@@ -124,3 +127,30 @@ export function updateTicketReplayInfo(data){
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**获取回复模板列表 */
|
||||
export function getReplyTemplateList(params = {}) {
|
||||
return request.get('/api/v1/admin/work_order/reply_template/list', params)
|
||||
}
|
||||
|
||||
/**创建回复模板 */
|
||||
export function createReplyTemplate(data) {
|
||||
return request.post('/api/v1/admin/work_order/reply_template/create', data, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
||||
/**修改回复模板 */
|
||||
export function updateReplyTemplate(data) {
|
||||
return request.post('/api/v1/admin/work_order/reply_template/update', data, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
||||
/**删除回复模板 */
|
||||
export function deleteReplyTemplate(data) {
|
||||
return request.delete('/api/v1/admin/work_order/reply_template/delete', {
|
||||
data: data,
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user