main
parent
3a8710dbb8
commit
5d58cb6627
@ -0,0 +1,86 @@
|
||||
export const columns = [
|
||||
{
|
||||
title: "序号",
|
||||
width: "6%",
|
||||
dataIndex: "id",
|
||||
},
|
||||
{
|
||||
title: "内容",
|
||||
width: "12%",
|
||||
dataIndex: "content",
|
||||
},
|
||||
{
|
||||
title: "类型",
|
||||
width: "8%",
|
||||
dataIndex: "type",
|
||||
customRender: function (type) {
|
||||
switch (type) {
|
||||
case 1: return '咨询'
|
||||
case 2: return '建议'
|
||||
case 3: return '投诉'
|
||||
case 4: return '表扬'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "发布人",
|
||||
width: "9%",
|
||||
dataIndex: "releaseName",
|
||||
},
|
||||
{
|
||||
title: "发布时间",
|
||||
width: "12%",
|
||||
dataIndex: "releaseDate",
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
width: "8%",
|
||||
dataIndex: "status",
|
||||
customRender: function (status) {
|
||||
switch (status) {
|
||||
case 3: return '已反馈'
|
||||
case 2: return '反馈中'
|
||||
case 1: return '未反馈'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "评分数",
|
||||
width: "10%",
|
||||
dataIndex: "rate",
|
||||
scopedSlots: { customRender: "rate" },
|
||||
},
|
||||
{
|
||||
title: "最后一次回复/提问时间",
|
||||
width: "14%",
|
||||
dataIndex: "lastFeedBackDate",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "action",
|
||||
key: "action",
|
||||
width: "180",
|
||||
fixed: "right",
|
||||
scopedSlots: { customRender: "action" },
|
||||
},
|
||||
]
|
||||
export const replyColumns = [
|
||||
{
|
||||
title: "创建人",
|
||||
width: "43%",
|
||||
dataIndex: "createUserType",
|
||||
scopedSlots: { customRender: "create" },
|
||||
},
|
||||
{
|
||||
title: "反馈内容",
|
||||
width: "43%",
|
||||
dataIndex: "content",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "action",
|
||||
key: "action",
|
||||
width: "13%",
|
||||
scopedSlots: { customRender: "action" },
|
||||
},
|
||||
]
|
@ -0,0 +1,340 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="cardTitle">
|
||||
<a-space size="large">
|
||||
<span>预约管理</span>
|
||||
<a-radio-group
|
||||
v-model="form.type"
|
||||
button-style="solid"
|
||||
@change="typeChange"
|
||||
>
|
||||
<a-radio-button :value="undefined"> 全部 </a-radio-button>
|
||||
<a-radio-button :value="1"> 待签到 </a-radio-button>
|
||||
<a-radio-button :value="2"> 使用中 </a-radio-button>
|
||||
<a-radio-button :value="3"> 使用结束 </a-radio-button>
|
||||
<a-radio-button :value="4"> 取消预约 </a-radio-button>
|
||||
<a-radio-button :value="4"> 超时作废 </a-radio-button>
|
||||
</a-radio-group>
|
||||
</a-space>
|
||||
</div>
|
||||
<div class="search-box">
|
||||
<a-row>
|
||||
<a-col :span="20">
|
||||
<a-space size="large">
|
||||
<a-input v-model="form.releaseName" style="width: 200px" placeholder="预约编号"></a-input>
|
||||
<a-select v-model="form.status" style="width: 200px" placeholder="预约类型">
|
||||
<a-select-option :value="0">未反馈</a-select-option>
|
||||
<a-select-option :value="1">反馈中</a-select-option>
|
||||
<a-select-option :value="2">已反馈</a-select-option>
|
||||
</a-select>
|
||||
<a-select v-model="form.score" style="width: 200px" placeholder="分类">
|
||||
<a-select-option :value="0">差评</a-select-option>
|
||||
<a-select-option :value="1">中评</a-select-option>
|
||||
<a-select-option :value="2">好评</a-select-option>
|
||||
</a-select>
|
||||
<a-range-picker @change="handlerTime" v-model="selTime" style="width: 240px" value-format="YYYY-MM-DD HH:mm:ss" :placeholder="['创建时间开始','创建时间结束']"></a-range-picker>
|
||||
<a-button type="primary" @click='getData'>查 询</a-button>
|
||||
<a-button @click='reset'>重 置</a-button>
|
||||
</a-space>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<div class="main">
|
||||
<a-table :columns="columns" :data-source="tableData"
|
||||
:pagination="pagination" @change="handlerChange" :scroll="{ x: 1800 }"
|
||||
:row-selection="{
|
||||
selectedRowKeys: selectedRowKeys,
|
||||
onChange: selectionChoosed,
|
||||
}"
|
||||
:row-key="
|
||||
(record, index) => {
|
||||
return record.id;
|
||||
}">
|
||||
<template slot="rate" slot-scope="text,record">
|
||||
<a-rate :default-value="(record.score/2.0)" disabled allow-half></a-rate>
|
||||
</template>
|
||||
<template slot="action" slot-scope="text,record">
|
||||
<span><a @click=detail(record)>详情</a></span>
|
||||
<span><a style="margin-left: 8px" @click=reply(record)>回复</a></span>
|
||||
<span><a style="margin-left: 8px;color:red" @click=del(record)>删除</a></span>
|
||||
</template>
|
||||
</a-table>
|
||||
<div class="action">
|
||||
<a-dropdown :disabled="!hasSelected">
|
||||
<a-menu slot="overlay" @click="handleMenuClick">
|
||||
<a-menu-item key="del"> 批量删除 </a-menu-item>
|
||||
</a-menu>
|
||||
<a-button> 批量操作 <a-icon type="down" /> </a-button>
|
||||
</a-dropdown>
|
||||
<span style="margin-left: 8px">
|
||||
<template v-if="hasSelected">
|
||||
{{ `已选择 ${selectedRowKeys.length} 条` }}
|
||||
</template>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<a-drawer :title="activeTitle" :width="720" :visible="detailShow" :body-style="{ paddingBottom: '60px' }" @close="detailClose">
|
||||
<div class="drawer-content">
|
||||
<span>基本信息</span>
|
||||
<a-divider></a-divider>
|
||||
<a-descriptions style="padding: 16px" :column="1">
|
||||
<a-descriptions-item label="类型">
|
||||
{{adviceInfo.type==1?'咨询':2?'建议':3?'投诉':'表扬'}}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="照片">
|
||||
<img v-for="(item,index) in adviceInfo.imgUrl"
|
||||
:key="index" :src="$ImgUrl(item.url)" style="height: 90px;width: 160px" />
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="反馈内容">
|
||||
<a-table :columns="replyColumns" :data-source="adviceInfo.voUserAdviceDetailList" :pagination="false">
|
||||
<template slot="create" slot-scope="text,row">
|
||||
{{row.createName}}({{row.createUserType==1?'住户':'物业'}}) {{row.createDate}}
|
||||
</template>
|
||||
<template v-if="activeTitle=='回复'" slot="action" slot-scope="text,row">
|
||||
<a @click="singelReply(row)">回复</a>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="评分星级" v-if="activeTitle=='咨询详情'">
|
||||
<a-rate :value="(adviceInfo.score*1)/2.0" disabled allow-half></a-rate>
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
<div v-if="activeTitle=='回复'">
|
||||
<span>回复反馈</span>
|
||||
<a-divider></a-divider>
|
||||
<a-form-model :model="repForm" :rules="rules" style="padding: 16px" layout="inline">
|
||||
<a-form-model-item label="反馈" prop="content">
|
||||
<a-textarea v-model="repForm.content" :autoSize="{ minRows: 8}" placeholder="请输入回复反馈" style="width: 500px">
|
||||
</a-textarea>
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</div>
|
||||
</div>
|
||||
<div class="drawer-footer" style="float: left">
|
||||
<a-button @click="replyConfirm" type="primary" :style="{ marginRight: '8px' }"> 确认 </a-button>
|
||||
<a-button @click="detailClose"> 关闭 </a-button>
|
||||
</div>
|
||||
<a-modal :visible="singelReplyVisible" title="回复" @ok="singleConfirm" @cancel="singelReplyVisible=false">
|
||||
<a-form-model-item label="回复">
|
||||
<a-textarea v-model="singleForm.content" :autoSize="{ minRows: 4}" placeholder="请输入回复内容" style="width: 500px">
|
||||
</a-textarea>
|
||||
</a-form-model-item>
|
||||
</a-modal>
|
||||
</a-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAdviceList,delAdvice,adviceDetail,replyDetail } from "@/api/operation/recommand"
|
||||
import { columns,replyColumns } from "./depend/config";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
type: undefined,
|
||||
releaseName: '',
|
||||
releaseDateStart: '',
|
||||
releaseDateEnd: '',
|
||||
status: undefined,
|
||||
score: undefined,
|
||||
},
|
||||
repForm: {
|
||||
appAdviceId: undefined,
|
||||
content: '',
|
||||
parentId: 0
|
||||
},
|
||||
singleForm: {
|
||||
appAdviceId: undefined,
|
||||
content: '',
|
||||
parentId: 0
|
||||
},
|
||||
selTime: [],
|
||||
rules: {
|
||||
content: [{ required: true, message: "请输入回复", trigger: "blur" }],
|
||||
},
|
||||
activeName: 0,
|
||||
columns: columns,
|
||||
replyColumns: replyColumns,
|
||||
tableData: [],
|
||||
pagination: {
|
||||
current: 1,
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
},
|
||||
selectedRowKeys: [],
|
||||
//详情
|
||||
activeTitle: '',
|
||||
detailShow: false,
|
||||
adviceInfo: {voUserAdviceDetailList: []},
|
||||
//回复窗口
|
||||
singelReplyVisible: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
let obj = Object.assign( this.form, {pageNum: this.pagination.current,size: this.pagination.pageSize})
|
||||
getAdviceList(obj).then(res => {
|
||||
this.pagination.total = res.data.total;
|
||||
this.tableData = res.data.rows
|
||||
})
|
||||
},
|
||||
reset() {
|
||||
this.form = {
|
||||
type: undefined,
|
||||
releaseName: '',
|
||||
releaseDateStart: undefined,
|
||||
releaseDateEnd: undefined,
|
||||
status: undefined,
|
||||
score: undefined,
|
||||
},
|
||||
this.selTime = [];
|
||||
this.getData();
|
||||
},
|
||||
handlerChange(val) {
|
||||
this.pagination.current = val.current;
|
||||
this.pagination.pageSize = val.pageSize;
|
||||
this.getData()
|
||||
},
|
||||
detailClose() {
|
||||
this.adviceInfo = {};
|
||||
this.repForm = {
|
||||
appAdviceId: undefined,
|
||||
content: '',
|
||||
parentId: 0
|
||||
},
|
||||
this.detailShow = false
|
||||
},
|
||||
//切换
|
||||
typeChange(val) {
|
||||
this.getData();
|
||||
},
|
||||
//改变时间
|
||||
handlerTime(val) {
|
||||
this.form.releaseDateStart = val[0];
|
||||
this.form.releaseDateEnd = val[1];
|
||||
},
|
||||
//回复和删除
|
||||
detail(val) {
|
||||
this.activeTitle = '咨询详情'
|
||||
adviceDetail({adviceId: val.id}).then(res => {
|
||||
let data = res.data;
|
||||
this.repForm.appAdviceId = data.id
|
||||
this.adviceInfo = data
|
||||
})
|
||||
this.detailShow = true;
|
||||
},
|
||||
reply(val) {
|
||||
this.activeTitle = '回复'
|
||||
adviceDetail({adviceId: val.id}).then(res => {
|
||||
let data = res.data;
|
||||
this.repForm.appAdviceId = data.id
|
||||
this.adviceInfo = data
|
||||
})
|
||||
this.detailShow = true;
|
||||
},
|
||||
replyConfirm() {
|
||||
replyDetail(this.repForm).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success(res.msg);
|
||||
this.detailClose();
|
||||
this.getData();
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
singleConfirm() {
|
||||
replyDetail(this.singleForm).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success(res.msg);
|
||||
this.singelReplyVisible = false;
|
||||
this.singleForm = {
|
||||
appAdviceId: undefined,
|
||||
content: '',
|
||||
parentId: 0
|
||||
},
|
||||
this.detailClose();
|
||||
this.getData();
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
singelReply(val) {
|
||||
this.singleForm.appAdviceId = this.adviceInfo.id
|
||||
this.singleForm.parentId = val.id
|
||||
this.singelReplyVisible = true
|
||||
},
|
||||
del(val) {
|
||||
if(val.status == 1 || val.status == 2) {
|
||||
this.$confirm({
|
||||
title: "该条信息您还未回复,是否删除?",
|
||||
icon:'delete',
|
||||
onOk:async()=>{
|
||||
let res = await delAdvice({adviceIds: [val.id]})
|
||||
if(res.code === 200){
|
||||
this.$message.success(res.msg);
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
},
|
||||
})
|
||||
} else {
|
||||
this.$confirm({
|
||||
title: "是否确认删除该信息?",
|
||||
icon:'delete',
|
||||
onOk:async()=>{
|
||||
let res = await delAdvice({adviceIds: [val.id]})
|
||||
if(res.code === 200){
|
||||
this.$message.success(res.msg);
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
selectionChoosed(val) {
|
||||
this.selectedRowKeys = val
|
||||
},
|
||||
//批量删除
|
||||
handleMenuClick(data) {
|
||||
if (data.key === "del") {
|
||||
this.$confirm({
|
||||
title: "是否删除选中的信息?",
|
||||
icon:'delete',
|
||||
onOk:async()=>{
|
||||
let res = await delAdvice({adviceIds: this.selectedRowKeys})
|
||||
if(res.code === 200){
|
||||
this.$message.success(res.msg);
|
||||
this.selectedRowKeys = [];
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
hasSelected() {
|
||||
return this.selectedRowKeys.length > 0;
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.drawer-content {
|
||||
padding: 16px;
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue