wangfukang 2 weeks ago
parent
commit
d1c39cf710
  1. 2
      src/api/ie.js
  2. 37
      src/views/app/business/problemFeedback/problemFeedback.vue
  3. 201
      src/views/app/data-statistics/data-statistics.vue

2
src/api/ie.js

@ -5,3 +5,5 @@ const PREFIX = '/app/ie/admin';
export const ieReportPage = (params) => getRequest(`${PREFIX}/reports/page`, params);
export const ieReportHandle = (params) => postRequest(`${PREFIX}/reports/handle`, params);
export const ieReportDelete = (reportId) => postRequest(`${PREFIX}/reports/delete`, { reportId });
export const ieRoomMessagePage = (params) => getRequest(`${PREFIX}/rooms/messages/page`, params);
export const ieAuditLogPage = (params) => getRequest(`${PREFIX}/audit-logs/page`, params);

37
src/views/app/business/problemFeedback/problemFeedback.vue

@ -26,12 +26,20 @@
<Button @click="close">关闭免单</Button>
</FormItem>
<FormItem label="交易时间">
<DatePicker :options="options" clearable v-model="selectDate" type="daterange"
format="yyyy-MM-dd" @on-change="selectDateRange" placeholder="选择起始时间"
style="width: 200px">
</DatePicker>
<Button @click="handleSearch" type="primary" icon="ios-search" style="margin-left: 8px">搜索</Button>
<Button @click="handleReset">重置</Button>
</FormItem>
</Form>
</Row>
<Table :loading="loading" border :columns="columns" :data="data" :size="tableSize" ref="table"
sortable="custom" ></Table>
<Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
<Page :current="searchForm.pageNum" :total="total" :page-size="searchForm.pageSize"
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page>
</Row>
@ -55,6 +63,9 @@
import {
getOrderDetail
} from "@/api/index";
import {
shortcuts
} from "@/libs/shortcuts";
import logisticsAddress from "@/views/sys/order-manage/logisticsAddress";
export default {
name: "logiticsCompany",
@ -74,7 +85,13 @@
regionId:JSON.parse(this.getStore("user")).departmentId,
pageNum: 1,
pageSize: 10,
dealingsWay:'免单奖励'
dealingsWay:'免单奖励',
startDate: "",
endDate: ""
},
selectDate: null,
options: {
shortcuts: shortcuts,
},
columns: [{
type: "index",
@ -212,6 +229,22 @@
}
});
},
handleSearch() {
this.searchForm.pageNum = 1;
this.getJiangLiList();
},
handleReset() {
this.searchForm.pageNum = 1;
this.searchForm.pageSize = 10;
this.searchForm.startDate = "";
this.searchForm.endDate = "";
this.selectDate = null;
this.getJiangLiList();
},
selectDateRange(v) {
this.searchForm.startDate = v && v[0] ? v[0] : "";
this.searchForm.endDate = v && v[1] ? v[1] : "";
},
changePage(v) {
this.searchForm.pageNum = v;
this.getJiangLiList();

201
src/views/app/data-statistics/data-statistics.vue

@ -9,8 +9,9 @@
<TabPane label="外卖单" name="1"></TabPane>
<TabPane label="跑腿单" name="2"></TabPane>
<TabPane :label="renderIeReportTabLabel" name="3"></TabPane>
<TabPane label="i/e违规内容" name="4"></TabPane>
</Tabs>
<Row v-if="tabName !== '3'" @keydown.enter.native="handleSearch">
<Row v-if="tabName !== '3' && tabName !== '4'" @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70">
<FormItem>
<Row>
@ -31,7 +32,7 @@
</FormItem>
</Form>
</Row>
<Row v-else @keydown.enter.native="handleIeReportSearch">
<Row v-else-if="tabName === '3'" @keydown.enter.native="handleIeReportSearch">
<Form inline :label-width="70">
<FormItem label="状态">
<Select v-model="ieReportSearch.status" clearable style="width: 140px">
@ -45,8 +46,15 @@
</FormItem>
</Form>
</Row>
<Row v-else @keydown.enter.native="handleIeAuditLogSearch">
<Form inline :label-width="70">
<FormItem>
<Button type="primary" icon="ios-search" @click="handleIeAuditLogSearch">搜索</Button>
</FormItem>
</Form>
</Row>
</Card>
<Card v-if="tabName !== '3'">
<Card v-if="tabName !== '3' && tabName !== '4'">
<div style="border-left: 5px solid rgb(70, 130, 180);height: 20px;line-height: 20px;font-size: 18px;font-weight: 700;margin-bottom: 20px;padding-left: 7px;">
订单数据
</div>
@ -344,7 +352,7 @@
</Col>
</Row>
</Card>
<Card v-else>
<Card v-else-if="tabName === '3'">
<div style="border-left: 5px solid rgb(70, 130, 180);height: 20px;line-height: 20px;font-size: 18px;font-weight: 700;margin-bottom: 20px;padding-left: 7px;">
i/e投诉举报
</div>
@ -372,6 +380,23 @@
</FormItem>
</Form>
</Modal>
<Modal v-model="ieMessageModalVisible" :title="ieMessageModalTitle" :width="1200" :footer-hide="true">
<Table border :columns="ieMessageColumns" :data="ieMessageList" :loading="ieMessageLoading"></Table>
<Row type="flex" justify="end" style="margin-top: 16px;">
<Page :current="ieMessageSearch.pageNumber" :page-size="ieMessageSearch.pageSize" :total="ieMessageTotal"
show-total show-elevator show-sizer @on-change="changeIeMessagePage" @on-page-size-change="changeIeMessagePageSize" />
</Row>
</Modal>
</Card>
<Card v-else>
<div style="border-left: 5px solid rgb(70, 130, 180);height: 20px;line-height: 20px;font-size: 18px;font-weight: 700;margin-bottom: 20px;padding-left: 7px;">
i/e违规内容
</div>
<Table border :columns="ieAuditLogColumns" :data="ieAuditLogList" :loading="ieAuditLogLoading"></Table>
<Row type="flex" justify="end" style="margin-top: 16px;">
<Page :current="ieAuditLogSearch.pageNumber" :page-size="ieAuditLogSearch.pageSize" :total="ieAuditLogTotal"
show-total show-elevator show-sizer @on-change="changeIeAuditLogPage" @on-page-size-change="changeIeAuditLogPageSize" />
</Row>
</Card>
</div>
</template>
@ -386,7 +411,9 @@
import {
ieReportPage,
ieReportHandle,
ieReportDelete
ieReportDelete,
ieRoomMessagePage,
ieAuditLogPage
} from "@/api/ie";
export default {
name: "order-manage",
@ -398,6 +425,23 @@
ieReportTotal: 0,
ieReportPendingCount: 0,
ieReportModalVisible: false,
ieAuditLogLoading: false,
ieAuditLogList: [],
ieAuditLogTotal: 0,
ieAuditLogSearch: {
pageNumber: 1,
pageSize: 10,
regionId: ""
},
ieMessageModalVisible: false,
ieMessageLoading: false,
ieMessageList: [],
ieMessageTotal: 0,
ieMessageSearch: {
roomId: "",
pageNumber: 1,
pageSize: 10
},
ieReportHandleForm: {
reportId: "",
status: 1,
@ -412,8 +456,9 @@
},
ieReportColumns: [
{ title: "ID", key: "id", width: 80 },
{ title: "举报人", key: "reporterId", minWidth: 100 },
{ title: "被举报人", key: "reportedUserId", minWidth: 100 },
{ title: "房间ID", key: "roomId", minWidth: 110 },
{ title: "举报人", key: "reporterMobile", minWidth: 120 },
{ title: "被举报人", key: "reportedUserMobile", minWidth: 120 },
{ title: "校区", key: "regionName", minWidth: 120 },
{ title: "原因", key: "reasonType", minWidth: 110, render: (h, params) => h("span", this.reasonText(params.row.reasonType)) },
{ title: "说明", key: "reasonText", minWidth: 180 },
@ -422,7 +467,7 @@
{ title: "创建时间", key: "createTime", minWidth: 160 },
{
title: "操作",
width: 180,
width: 260,
fixed: "right",
render: (h, params) => h("div", [
h("Button", {
@ -430,6 +475,11 @@
style: { marginRight: "8px" },
on: { click: () => this.openIeReportHandle(params.row) }
}, "处理"),
h("Button", {
props: { type: "info", size: "small", disabled: !params.row.roomId },
style: { marginRight: "8px" },
on: { click: () => this.openIeRoomMessages(params.row) }
}, "聊天记录"),
h("Button", {
props: { type: "error", size: "small" },
on: { click: () => this.deleteIeReport(params.row) }
@ -437,12 +487,39 @@
])
}
],
ieMessageColumns: [
{ title: "ID", key: "id", width: 80 },
{ title: "发送人", key: "senderMobile", minWidth: 120 },
{ title: "接收人", key: "receiverMobile", minWidth: 120 },
{ title: "类型", key: "messageType", width: 90, render: (h, params) => h("span", this.messageTypeText(params.row.messageType)) },
{ title: "内容", key: "filteredContent", minWidth: 260, render: (h, params) => h("span", this.messageContentText(params.row)) },
{ title: "审核状态", key: "auditStatus", width: 100, render: (h, params) => h("span", this.auditStatusText(params.row.auditStatus)) },
{ title: "是否拦截", key: "isBlocked", width: 100, render: (h, params) => h("Tag", { props: { color: params.row.isBlocked === 1 ? "red" : "green" } }, params.row.isBlocked === 1 ? "已拦截" : "正常") },
{ title: "创建时间", key: "createTime", minWidth: 160 }
],
ieAuditLogColumns: [
{ title: "ID", key: "id", width: 80 },
{ title: "用户", key: "userMobile", minWidth: 120 },
{ title: "校区", key: "regionName", minWidth: 120 },
{ title: "来源", key: "bizType", minWidth: 140, render: (h, params) => h("span", this.auditBizTypeText(params.row.bizType)) },
{ title: "业务ID", key: "bizId", minWidth: 110 },
{ title: "原始内容", key: "rawContent", minWidth: 260 },
{ title: "风险等级", key: "riskLevel", width: 100, render: (h, params) => h("Tag", { props: { color: this.riskLevelColor(params.row.riskLevel) } }, this.riskLevelText(params.row.riskLevel)) },
{ title: "命中信息", key: "hitWords", minWidth: 180 },
{ title: "分类/详情", key: "hitCategories", minWidth: 220 },
{ title: "创建时间", key: "createTime", minWidth: 160 }
],
searchForm: {
startDate: "",
endDate: ""
}
};
},
computed: {
ieMessageModalTitle() {
return this.ieMessageSearch.roomId ? `房间聊天记录 #${this.ieMessageSearch.roomId}` : "房间聊天记录"
}
},
mounted() {
let dayTime = this.getMonth()
this.selectDate = [dayTime, dayTime]
@ -464,6 +541,9 @@
if (name === "3") {
this.ieReportSearch.regionId = this.resolveRegionId()
this.handleIeReportSearch()
} else if (name === "4") {
this.ieAuditLogSearch.regionId = this.resolveRegionId()
this.handleIeAuditLogSearch()
}
},
renderIeReportTabLabel(h) {
@ -480,6 +560,10 @@
this.ieReportSearch.pageNumber = 1
this.getIeReports()
},
handleIeAuditLogSearch() {
this.ieAuditLogSearch.pageNumber = 1
this.getIeAuditLogs()
},
getIeReports() {
this.ieReportLoading = true
this.ieReportSearch.regionId = this.resolveRegionId()
@ -498,6 +582,17 @@
this.ieReportLoading = false
})
},
getIeAuditLogs() {
this.ieAuditLogLoading = true
this.ieAuditLogSearch.regionId = this.resolveRegionId()
ieAuditLogPage(this.ieAuditLogSearch).then(res => {
const data = res.result || res
this.ieAuditLogList = data.records || []
this.ieAuditLogTotal = data.total || 0
}).finally(() => {
this.ieAuditLogLoading = false
})
},
getIeReportPendingCount() {
const params = {
pageNumber: 1,
@ -519,6 +614,15 @@
this.ieReportSearch.pageNumber = 1
this.getIeReports()
},
changeIeAuditLogPage(page) {
this.ieAuditLogSearch.pageNumber = page
this.getIeAuditLogs()
},
changeIeAuditLogPageSize(size) {
this.ieAuditLogSearch.pageSize = size
this.ieAuditLogSearch.pageNumber = 1
this.getIeAuditLogs()
},
openIeReportHandle(row) {
this.ieReportHandleForm = {
reportId: row.id,
@ -528,6 +632,41 @@
}
this.ieReportModalVisible = true
},
openIeRoomMessages(row) {
if (!row.roomId) {
this.$Message.warning("该举报记录没有关联房间")
return
}
this.ieMessageSearch = {
roomId: row.roomId,
pageNumber: 1,
pageSize: this.ieMessageSearch.pageSize
}
this.ieMessageModalVisible = true
this.getIeRoomMessages()
},
getIeRoomMessages() {
if (!this.ieMessageSearch.roomId) {
return
}
this.ieMessageLoading = true
ieRoomMessagePage(this.ieMessageSearch).then(res => {
const data = res.result || res
this.ieMessageList = data.records || []
this.ieMessageTotal = data.total || 0
}).finally(() => {
this.ieMessageLoading = false
})
},
changeIeMessagePage(page) {
this.ieMessageSearch.pageNumber = page
this.getIeRoomMessages()
},
changeIeMessagePageSize(size) {
this.ieMessageSearch.pageSize = size
this.ieMessageSearch.pageNumber = 1
this.getIeRoomMessages()
},
submitIeReportHandle() {
ieReportHandle(this.ieReportHandleForm).then(() => {
this.$Message.success("处理成功")
@ -552,6 +691,52 @@
const map = { harassment: "骚扰不适", abuse: "攻击辱骂", fraud: "疑似欺诈", other: "其他问题" }
return map[type] || "安全反馈"
},
messageTypeText(type) {
const map = { 1: "文字", 2: "图片", 4: "语音", 5: "视频" }
return map[type] || "其他"
},
messageContentText(row) {
return row.filteredContent || row.rawContent || row.mediaCheckUrl || ""
},
auditStatusText(status) {
if (status === 1) return "通过"
if (status === 3) return "拦截"
return "未审核"
},
auditBizTypeText(type) {
const map = {
message: "聊天文字",
presence: "聊天互动",
"message-image": "聊天图片",
"message-video-cover": "聊天视频封面",
"message-video": "聊天视频",
moment: "动态文字",
"moment-image": "动态图片",
"moment-video-poster": "动态视频封面",
"moment-video": "动态视频",
"profile-name": "资料昵称",
"profile-intro": "资料介绍",
"profile-extra": "资料扩展",
"profile-companion-intent": "找搭子",
"profile-avatar": "资料头像",
"profile-persona-image": "人格图片",
"status-text": "状态文案",
"daily-answer": "每日答案"
}
return map[type] || type || "未知"
},
riskLevelText(level) {
if (level === 3) return "高"
if (level === 2) return "中"
if (level === 1) return "低"
return "无"
},
riskLevelColor(level) {
if (level === 3) return "red"
if (level === 2) return "orange"
if (level === 1) return "yellow"
return "green"
},
statusText(status) {
if (status === 1) return "已处理"
if (status === 2) return "已驳回"

Loading…
Cancel
Save