|
@@ -1,7 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="mainTitle">
|
|
|
- 文章列表
|
|
|
- </div>
|
|
|
+ <div class="mainTitle">文章列表</div>
|
|
|
<br />
|
|
|
<div class="lists">
|
|
|
<!-- @click="() => toDetail(item)" -->
|
|
@@ -9,46 +7,140 @@
|
|
|
<el-table-column prop="title" label="标题" width="450px" />
|
|
|
<el-table-column prop="phone" label="用户名" />
|
|
|
<el-table-column prop="source" label="来源">
|
|
|
- <template #default="scope">
|
|
|
- {{source[scope.row.source - 1]}}
|
|
|
+ <template #default="scope">
|
|
|
+ {{ source[scope.row.source - 1] }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="" label="回复状态" >
|
|
|
- <template #default="scope">
|
|
|
- {{replyFlag[scope.row.replyFlag]}}
|
|
|
+ <el-table-column prop="" label="回复状态">
|
|
|
+ <template #default="scope">
|
|
|
+ {{ replyFlag[scope.row.replyFlag] }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="createTime" label="更新时间" >
|
|
|
- <template #default="scope">
|
|
|
- {{format(scope.row.createTime)}}
|
|
|
+ <el-table-column prop="createTime" label="更新时间">
|
|
|
+ <template #default="scope">
|
|
|
+ {{ format(scope.row.createTime) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="modifyTime" label="推送时间" >
|
|
|
- <template #default="scope">
|
|
|
- {{format(scope.row.modifyTime)}}
|
|
|
+ <el-table-column prop="modifyTime" label="推送时间">
|
|
|
+ <template #default="scope">
|
|
|
+ {{ format(scope.row.modifyTime) }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="" label="报料类型" />
|
|
|
<el-table-column prop="clueInfoCount" label="数量" />
|
|
|
- <el-table-column prop="" label="操作" />
|
|
|
+ <el-table-column prop="" label="操作">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-popconfirm
|
|
|
+ v-if="scope.row.status === 0"
|
|
|
+ confirm-button-text="通过"
|
|
|
+ cancel-button-text="不通过"
|
|
|
+ @confirm="() => confirm(scope)"
|
|
|
+ @cancel="() => cancel(scope)"
|
|
|
+ title="是否通过该报料?"
|
|
|
+ >
|
|
|
+ <template #reference>
|
|
|
+ <el-button link type="primary" size="small">审核</el-button>
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="() => lookBL(scope)"
|
|
|
+ >
|
|
|
+ 查看
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="() => replyBL(scope)"
|
|
|
+ >
|
|
|
+ 回复
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="danger"
|
|
|
+ size="small"
|
|
|
+ @click="() => deleteBL(scope)"
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
+
|
|
|
+ <el-dialog v-model="reportingDetail" title="报料详情" width="30%">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="5">联系方式:</el-col>
|
|
|
+ <el-col :span="19">
|
|
|
+ <div v-text="reportingDetailData.phone"></div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="5">上报地址:</el-col>
|
|
|
+ <el-col :span="19">
|
|
|
+ <div v-text="reportingDetailData.address"></div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="5">报料详情:</el-col>
|
|
|
+ <el-col :span="19">
|
|
|
+ <div v-text="reportingDetailData.content"></div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog v-model="reportingReplyStatus" title="回复" width="30%">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="5">报料内容:</el-col>
|
|
|
+ <el-col :span="19">
|
|
|
+ <div v-text="reportingDetailData.content"></div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <br />
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="5">回复内容:</el-col>
|
|
|
+ <el-col :span="19">
|
|
|
+ <el-input
|
|
|
+ v-model="reportingDetailData.reply"
|
|
|
+ :rows="2"
|
|
|
+ type="textarea"
|
|
|
+ placeholder="请输入回复内容"
|
|
|
+ />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <template #footer>
|
|
|
+ <span class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="replySave"> 确定 </el-button>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import { ref, defineExpose } from 'vue';
|
|
|
// import { useRouter } from 'vue-router';
|
|
|
-import dayjs from "dayjs";
|
|
|
-import { getreporting } from '../../../api/index';
|
|
|
+import dayjs from 'dayjs';
|
|
|
+import { ElMessage } from 'element-plus';
|
|
|
+import {
|
|
|
+ getreporting,
|
|
|
+ delreporting,
|
|
|
+ getreportingDetail,
|
|
|
+ reportingShenhe,
|
|
|
+ reportingReply,
|
|
|
+} from '../../../api/index';
|
|
|
let T = undefined;
|
|
|
let total = -1;
|
|
|
// const router = useRouter();
|
|
|
const listTable = ref([]);
|
|
|
-const source = ['热线电话','微信公众号','app', '小程序'];
|
|
|
+const reportingDetail = ref(false);
|
|
|
+const reportingReplyStatus = ref(false);
|
|
|
+const reportingDetailData = ref({});
|
|
|
+const source = ['热线电话', '微信公众号', 'app', '小程序'];
|
|
|
const replyFlag = ['未回复', '已回复'];
|
|
|
const format = value => {
|
|
|
- return dayjs(value).format('YYYY-MM-DD HH:mm:ss')
|
|
|
-}
|
|
|
+ return dayjs(value).format('YYYY-MM-DD HH:mm:ss');
|
|
|
+};
|
|
|
// const toDetail = item => {
|
|
|
// router.push({
|
|
|
// path: '/analysis_detail',
|
|
@@ -80,6 +172,56 @@ const getlist = search => {
|
|
|
}, 200);
|
|
|
};
|
|
|
|
|
|
+const deleteBL = item => {
|
|
|
+ delreporting({ data: { id: item.row.id } }).then(() => {
|
|
|
+ ElMessage({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功',
|
|
|
+ });
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+const lookBL = item => {
|
|
|
+ getreportingDetail({ data: { id: item.row.id } }).then(res => {
|
|
|
+ reportingDetail.value = true;
|
|
|
+ reportingDetailData.value = res;
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+const replyBL = item => {
|
|
|
+ reportingReplyStatus.value = true;
|
|
|
+ reportingDetailData.value = item.row;
|
|
|
+};
|
|
|
+
|
|
|
+const replySave = () => {
|
|
|
+ reportingReplyStatus.value = false;
|
|
|
+ reportingReply({
|
|
|
+ data: {
|
|
|
+ clueId: reportingDetailData.value.id,
|
|
|
+ content: reportingDetailData.value.reply || '',
|
|
|
+ userName: reportingReplyStatus.value.author || '',
|
|
|
+ },
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+const confirm = item => {
|
|
|
+ reportingShenhe({ data: { id: item.row.id, status: 1 } }).then(() => {
|
|
|
+ ElMessage({
|
|
|
+ type: 'success',
|
|
|
+ message: '审核通过',
|
|
|
+ });
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+const cancel = item => {
|
|
|
+ reportingShenhe({ data: { id: item.row.id, status: 2 } }).then(() => {
|
|
|
+ ElMessage({
|
|
|
+ type: 'success',
|
|
|
+ message: '拒绝通过',
|
|
|
+ });
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
defineExpose({
|
|
|
getlist,
|
|
|
});
|
|
@@ -110,4 +252,8 @@ defineExpose({
|
|
|
.list:not(:last-child) {
|
|
|
border-bottom: 1px dashed #b9c0d3;
|
|
|
}
|
|
|
+
|
|
|
+.el-row {
|
|
|
+ line-height: 1.5em;
|
|
|
+}
|
|
|
</style>
|