main
parent
6524c685a3
commit
ad46e424dc
@ -0,0 +1,55 @@
|
||||
import httpService from "@/request"
|
||||
|
||||
// 查询所有的社区介绍信息
|
||||
export function getCommunityList(params) {
|
||||
return httpService({
|
||||
url: `/user/communityIntroduction/list`,
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 添加社区介绍信息
|
||||
export function AddCommunityIntro(params) {
|
||||
return httpService({
|
||||
url: `/user/communityIntroduction/insert`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 根据社区介绍主键Id查询社区介绍信息
|
||||
export function findCommunityIntro(params) {
|
||||
return httpService({
|
||||
url: `/user/communityIntroduction/findById`,
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 修改社区介绍信息
|
||||
export function updateCommunityIntro(params) {
|
||||
return httpService({
|
||||
url: `/user/communityIntroduction/update`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 删除社区介绍信息
|
||||
export function delCommunityIntro(params) {
|
||||
return httpService({
|
||||
url: `/user/communityIntroduction/delete`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 启用社区介绍信息
|
||||
export function enableCommunityIntro(params) {
|
||||
return httpService({
|
||||
url: `/user/communityIntroduction/enable`,
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
import httpService from "@/request"
|
||||
|
||||
// 查询所有的咨询建议/投诉表扬
|
||||
export function getAdviceList(params) {
|
||||
return httpService({
|
||||
url: `/user/advice/list`,
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 查询今日咨询建议/投诉表扬数量
|
||||
export function getTodayAdvice(params) {
|
||||
return httpService({
|
||||
url: `/user/advice/findTodayAdviceNum`,
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 批量删除咨询建议/投诉表扬
|
||||
export function delAdvice(params) {
|
||||
return httpService({
|
||||
url: `/user/advice/delete`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id查询咨询建议/投诉表扬
|
||||
export function adviceDetail(params) {
|
||||
return httpService({
|
||||
url: `/user/advice/findById`,
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 回复咨询建议/投诉表扬
|
||||
export function replyDetail(params) {
|
||||
return httpService({
|
||||
url: `/user/advice/reply`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
import httpService from "@/request"
|
||||
|
||||
// 查询所有便民电话信息
|
||||
export function getPhoneList(params) {
|
||||
return httpService({
|
||||
url: `/user/conveniencePhone/list`,
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 添加便民电话信息
|
||||
export function addPhone(params) {
|
||||
return httpService({
|
||||
url: `/user/conveniencePhone/insert`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 根据便民电话主键id查询便民电话信息
|
||||
export function findPhone(params) {
|
||||
return httpService({
|
||||
url: `/user/conveniencePhone/findById`,
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 修改便民电话信息
|
||||
export function updatePhone(params) {
|
||||
return httpService({
|
||||
url: `/user/conveniencePhone/update`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 定时检查信息
|
||||
export function reminderInfo(params) {
|
||||
return httpService({
|
||||
url: `/user/conveniencePhone/reminderInfo`,
|
||||
method: 'get',
|
||||
params: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 更新定时检查信息
|
||||
export function updateReminder(params) {
|
||||
return httpService({
|
||||
url: `/user/conveniencePhone/updateReminder`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
// 批量删除便民电话
|
||||
export function delPhone(params) {
|
||||
return httpService({
|
||||
url: `/user/conveniencePhone/delete`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
export const form = {
|
||||
name: '',
|
||||
status: undefined,
|
||||
createName: '',
|
||||
nearModifyDateStart: '',
|
||||
nearModifyDateEnd: '',
|
||||
createDateStart: '',
|
||||
createDateEnd: '',
|
||||
}
|
||||
|
||||
export const addForm = {
|
||||
name: '',
|
||||
content: '',
|
||||
imgUrls: [],
|
||||
}
|
||||
|
||||
export const columns = [
|
||||
{
|
||||
title: "模版名称",
|
||||
width: "9%",
|
||||
dataIndex: "name",
|
||||
},
|
||||
{
|
||||
title: "内容",
|
||||
width: "15%",
|
||||
dataIndex: "content",
|
||||
scopedSlots: { customRender: "content" },
|
||||
},
|
||||
{
|
||||
title: "启用状态",
|
||||
width: "12%",
|
||||
dataIndex: "status",
|
||||
scopedSlots: { customRender: "status" },
|
||||
},
|
||||
{
|
||||
title: "创建人名称",
|
||||
width: "12%",
|
||||
dataIndex: "createName",
|
||||
},
|
||||
{
|
||||
title: "最近修改时间",
|
||||
width: "16%",
|
||||
dataIndex: "nearModifyDate",
|
||||
},
|
||||
{
|
||||
title: "创建时间",
|
||||
width: "16%",
|
||||
dataIndex: "createDate",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "action",
|
||||
key: "action",
|
||||
width: "180",
|
||||
fixed: "right",
|
||||
scopedSlots: { customRender: "action" },
|
||||
},
|
||||
]
|
||||
|
||||
export const rules = {
|
||||
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
|
||||
content: [{ required: true, message: "请输入内容", trigger: "blur" }],
|
||||
}
|
||||
|
||||
export function doStr(str, number) {
|
||||
if(str.length >= number) {
|
||||
return str.substr(0,number-1) + '...'
|
||||
} else {
|
||||
return str
|
||||
}
|
||||
}
|
@ -0,0 +1,307 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="cardTitle">
|
||||
<a-space size="large">
|
||||
<span>社区介绍</span>
|
||||
</a-space>
|
||||
</div>
|
||||
<div class="search-box">
|
||||
<a-row>
|
||||
<a-col :span="20">
|
||||
<a-space size="large">
|
||||
<a-input v-model="form.name" style="width: 200px" placeholder="模版名称"></a-input>
|
||||
<a-select style="width: 200px" v-model="form.status" placeholder="启用状态">
|
||||
<a-select-option :value="1">启用中</a-select-option>
|
||||
<a-select-option :value="2">未启用</a-select-option>
|
||||
</a-select>
|
||||
<a-input v-model="form.createName" style="width: 200px" placeholder="创建人"></a-input>
|
||||
<a-range-picker @change="handlerTime" v-model="selTime" style="width: 300px" value-format="YYYY-MM-DD HH:mm:ss" :placeholder="['最近修改时间开始','最近修改时间结束']"></a-range-picker>
|
||||
<a-range-picker @change="handlerTime2" v-model="selTime2" 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>
|
||||
<a-button style="margin: 10px" class="add-btn" @click="detailShow = true;mode = 1">新增模版</a-button>
|
||||
<div class="main">
|
||||
<a-table :columns="columns" :data-source="tableData"
|
||||
:pagination="pagination" @change="handlerChange" :scroll="{ x: 1700 }"
|
||||
:row-selection="{
|
||||
selectedRowKeys: selectedRowKeys,
|
||||
onChange: selectionChoosed,
|
||||
}"
|
||||
:row-key="
|
||||
(record, index) => {
|
||||
return record.id;
|
||||
}">
|
||||
<span slot="content" slot-scope="text, record">
|
||||
<a-popover>
|
||||
<template slot="content">
|
||||
<div style="width: 600px">{{record.content}}</div>
|
||||
</template>
|
||||
<div>{{doStr(record.content,21)}}</div>
|
||||
</a-popover>
|
||||
</span>
|
||||
<template slot="status" slot-scope="text,record">
|
||||
<a-switch checked-children="启用中"
|
||||
un-checked-children="未启用"
|
||||
:checked="record.status == 1"
|
||||
@change="handleEnable(record)">
|
||||
</a-switch>
|
||||
</template>
|
||||
<template slot="action" slot-scope="text,record">
|
||||
<span><a @click=edit(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="mode==1?'新增模版':'编辑模版'" :width="720" :visible="detailShow" :body-style="{ paddingBottom: '60px' }" @close="detailClose">
|
||||
<div class="drawer-content">
|
||||
<span>基本信息</span>
|
||||
<a-divider></a-divider>
|
||||
<a-row>
|
||||
<a-form-model :model="addForm" :rules="rules">
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="模版名称" prop="name">
|
||||
<a-input style="width: 560px" placeholder="请输入模版名称" v-model="addForm.name"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="内容" prop="content">
|
||||
<a-textarea style="width: 560px" :autosize="{minRows: 8}" placeholder="请输入内容" v-model="addForm.content"></a-textarea>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="图片">
|
||||
<commonUpload :fileList='fileList' @handleChange="handleChange" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-form-model>
|
||||
</a-row>
|
||||
</div>
|
||||
<div class="drawer-footer" style="float: left">
|
||||
<a-button @click="addConfirm" type="primary" :style="{ marginRight: '8px' }">
|
||||
确认
|
||||
</a-button>
|
||||
<a-button @click="detailClose"> 关闭 </a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCommunityList, AddCommunityIntro, enableCommunityIntro,
|
||||
findCommunityIntro, updateCommunityIntro, delCommunityIntro} from "@/api/operation/comIntro"
|
||||
import {form,addForm, rules, columns,doStr } from "./depend/config";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: form,
|
||||
selTime: [],
|
||||
selTime2: [],
|
||||
addForm: addForm,
|
||||
fileList: [],
|
||||
mode: 1, //1新增 2编辑
|
||||
activeId: undefined,
|
||||
rules: rules,
|
||||
columns: columns,
|
||||
doStr: doStr,
|
||||
tableData: [],
|
||||
pagination: {
|
||||
current: 1,
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
},
|
||||
//详情
|
||||
detailShow: false,
|
||||
//批量删除
|
||||
selectedRowKeys: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
let obj = Object.assign(this.form, {pageNum: this.pagination.current,size: this.pagination.pageSize})
|
||||
getCommunityList(obj).then(res => {
|
||||
this.tableData = res.data.rows;
|
||||
this.pagination.total = res.data.total
|
||||
})
|
||||
},
|
||||
reset() {
|
||||
this.form = {
|
||||
name: '',
|
||||
status: undefined,
|
||||
createName: '',
|
||||
nearModifyDateStart: '',
|
||||
nearModifyDateEnd: '',
|
||||
createDateStart: '',
|
||||
createDateEnd: '',
|
||||
},
|
||||
this.selTime = [],
|
||||
this.selTime2 = [],
|
||||
this.getData()
|
||||
},
|
||||
handlerChange() {
|
||||
|
||||
},
|
||||
detailClose() {
|
||||
this.addForm = {
|
||||
name: '',
|
||||
content: '',
|
||||
imgUrls: [],
|
||||
},
|
||||
this.fileList = []
|
||||
this.detailShow = false
|
||||
},
|
||||
//添加/编辑模版
|
||||
addConfirm() {
|
||||
if(this.mode == 1) {
|
||||
AddCommunityIntro(this.addForm).then(res => {
|
||||
if(res.code === 200){
|
||||
this.$message.success(res.msg);
|
||||
this.detailClose()
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
let obj = Object.assign(this.addForm, {id: this.activeId})
|
||||
updateCommunityIntro(obj).then(res => {
|
||||
if(res.code === 200){
|
||||
this.$message.success(res.msg);
|
||||
this.detailClose()
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
//编辑回显
|
||||
edit(val) {
|
||||
this.mode = 2;
|
||||
findCommunityIntro({communityIntroductionId: val.id}).then(res => {
|
||||
let data = res.data;
|
||||
this.addForm.name = data.name;
|
||||
this.addForm.content = data.content;
|
||||
if(data.imgList.length>0){
|
||||
const pic = []
|
||||
this.addForm.imgUrls.push(data.imgList[0].url)
|
||||
for(let item of data.imgList){
|
||||
let obj = {
|
||||
name:item.url.split('_')[0] +'.'+ item.url.split('.')[1],
|
||||
url: this.$ImgUrl(item.url),
|
||||
uid:item.url.split('_')[1],
|
||||
status:'done',
|
||||
thumbUrl: this.$ImgUrl(item.url),
|
||||
}
|
||||
pic.push(obj)
|
||||
}
|
||||
this.fileList = pic
|
||||
}
|
||||
this.activeId = data.id
|
||||
})
|
||||
this.detailShow = true;
|
||||
},
|
||||
//删除
|
||||
del(val) {
|
||||
this.$confirm({
|
||||
title: "是否删除该模版?",
|
||||
icon:'delete',
|
||||
onOk:async()=>{
|
||||
let res = await delCommunityIntro({communityIntroductionIds: [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 delCommunityIntro({communityIntroductionIds: this.selectedRowKeys})
|
||||
if(res.code === 200){
|
||||
this.$message.success(res.msg);
|
||||
this.selectedRowKeys = [];
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
//启用
|
||||
handleEnable(val) {
|
||||
enableCommunityIntro({communityIntroductionId: val.id}).then(res => {
|
||||
if(res.code === 200){
|
||||
this.$message.success(res.msg);
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
//修改时间
|
||||
handlerTime(val) {
|
||||
this.form.nearModifyDateStart = val[0];
|
||||
this.form.nearModifyDateEnd = val[1];
|
||||
},
|
||||
handlerTime2(val) {
|
||||
this.form.createDateStart = val[0];
|
||||
this.form.createDateEnd = val[1];
|
||||
},
|
||||
//图片上传
|
||||
handleChange(data) {
|
||||
this.fileList = data;
|
||||
this.addForm.imgUrls = [];
|
||||
data.forEach(ele => {
|
||||
if(ele.status == 'done') {
|
||||
this.addForm.imgUrls.push(ele.response.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
hasSelected() {
|
||||
return this.selectedRowKeys.length > 0;
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.drawer-content {
|
||||
padding: 16px;
|
||||
}
|
||||
</style>
|
@ -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,354 @@
|
||||
<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-group>
|
||||
</a-space>
|
||||
</div>
|
||||
<div class="search-box">
|
||||
<a-alert v-if="form.type==1" :message="'温馨提示:今日新增 '+todayMessage+' 条咨询'" type="warning" show-icon />
|
||||
<a-alert v-else-if="form.type==2" :message="'温馨提示:今日新增 '+todayMessage+' 条建议'" type="warning" show-icon />
|
||||
<a-alert v-else-if="form.type==3" :message="'温馨提示:今日新增 '+todayMessage+' 条投诉'" type="warning" show-icon />
|
||||
<a-alert v-else-if="form.type==4" :message="'温馨提示:今日新增 '+todayMessage+' 条表扬'" type="warning" show-icon />
|
||||
<a-alert v-else :message="'温馨提示:今日共新增 '+todayMessage+' 条'" type="warning" show-icon />
|
||||
</div>
|
||||
<div class="search-box">
|
||||
<a-row>
|
||||
<a-col :span="20">
|
||||
<a-space size="large">
|
||||
<a-range-picker @change="handlerTime" v-model="selTime" style="width: 240px" value-format="YYYY-MM-DD HH:mm:ss" :placeholder="['开始时间','结束时间']"></a-range-picker>
|
||||
<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-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,getTodayAdvice } 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,
|
||||
//今日信息
|
||||
todayMessage: undefined,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getApi()
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getApi() {
|
||||
getTodayAdvice({type: this.form.type}).then(res => {
|
||||
let data = res.data;
|
||||
this.todayMessage = data
|
||||
})
|
||||
},
|
||||
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() {
|
||||
|
||||
},
|
||||
detailClose() {
|
||||
this.adviceInfo = {};
|
||||
this.repForm = {
|
||||
appAdviceId: undefined,
|
||||
content: '',
|
||||
parentId: 0
|
||||
},
|
||||
this.detailShow = false
|
||||
},
|
||||
//切换
|
||||
typeChange(val) {
|
||||
this.getData();
|
||||
this.getApi()
|
||||
},
|
||||
//改变时间
|
||||
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>
|
@ -0,0 +1,72 @@
|
||||
export const columns = [
|
||||
{
|
||||
title: "名称",
|
||||
width: "12%",
|
||||
dataIndex: "name",
|
||||
},
|
||||
{
|
||||
title: "联系方式",
|
||||
width: "12%",
|
||||
dataIndex: "tel",
|
||||
},
|
||||
{
|
||||
title: "类型",
|
||||
width: "12%",
|
||||
dataIndex: "type",
|
||||
customRender: function (type) {
|
||||
switch (type) {
|
||||
case 1: return '业委会'
|
||||
case 2: return '绿化'
|
||||
case 3: return '快递'
|
||||
case 4: return '搬家'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
width: "12%",
|
||||
dataIndex: "status",
|
||||
customRender: function (status) {
|
||||
switch (status) {
|
||||
case 1: return '正常'
|
||||
case 2: return '有误'
|
||||
case 3: return '空号'
|
||||
case 4: return '搬家'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "下次检查时间",
|
||||
width: "16%",
|
||||
dataIndex: "nextControlDate",
|
||||
},
|
||||
{
|
||||
title: "APP端排序权重",
|
||||
width: "12%",
|
||||
dataIndex: "weight",
|
||||
},
|
||||
{
|
||||
title: "提醒内容",
|
||||
width: "12%",
|
||||
dataIndex: "remindContent",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "action",
|
||||
key: "action",
|
||||
width: "180",
|
||||
fixed: "right",
|
||||
scopedSlots: { customRender: "action" },
|
||||
},
|
||||
]
|
||||
|
||||
export const rules = {
|
||||
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
|
||||
tel: [
|
||||
{ required: true, message: "请输入手机号", trigger: "blur" },
|
||||
{ min: 11, max: 11, message: "手机号只能为11位", trigger: "blur" },
|
||||
],
|
||||
type: [{ required: true, message: "请选择类型", trigger: "change" }],
|
||||
status: [{ required: true, message: "请选择状态", trigger: "change" }],
|
||||
weight: [{ required: true, message: "请输入权重", trigger: "blur" }],
|
||||
}
|
@ -0,0 +1,327 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="cardTitle">
|
||||
<a-space size="large">
|
||||
<span>便民电话</span>
|
||||
</a-space>
|
||||
</div>
|
||||
<div class="search-box">
|
||||
<a-row>
|
||||
<a-col :span="20">
|
||||
<a-space size="large">
|
||||
<a-input v-model="form.name" style="width: 200px" placeholder="联系名称"></a-input>
|
||||
<a-input v-model="form.tel" style="width: 200px" placeholder="联系电话"></a-input>
|
||||
<a-button type="primary" @click='getData'>查 询</a-button>
|
||||
<a-button @click='reset'>重 置</a-button>
|
||||
</a-space>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<a-button style="margin: 10px" class="add-btn" @click="detailShow = true;mode = 1">新增电话</a-button>
|
||||
<a-button style="margin: 10px" @click="check" type="primary" ghost>定时检查</a-button>
|
||||
<div class="main">
|
||||
<a-table :columns="columns" :data-source="tableData"
|
||||
:pagination="pagination" @change="handlerChange" :scroll="{ x: 1700 }"
|
||||
:row-selection="{
|
||||
selectedRowKeys: selectedRowKeys,
|
||||
onChange: selectionChoosed,
|
||||
}"
|
||||
:row-key="
|
||||
(record, index) => {
|
||||
return record.id;
|
||||
}">
|
||||
<template slot="action" slot-scope="text,record">
|
||||
<span><a @click=edit(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="mode==1?'新增电话':'编辑电话'" :width="720" :visible="detailShow" :body-style="{ paddingBottom: '60px' }" @close="detailClose">
|
||||
<div class="drawer-content">
|
||||
<span>基本信息</span>
|
||||
<a-divider></a-divider>
|
||||
<a-row>
|
||||
<a-form-model :model="addForm" :rules="rules">
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="联系名称" prop="name">
|
||||
<a-input style="width: 240px" v-model="addForm.name"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="联系电话" prop="tel">
|
||||
<a-input style="width: 240px" v-model="addForm.tel"></a-input>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="类型" prop="type">
|
||||
<a-select style="width: 240px" v-model="addForm.type">
|
||||
<a-select-option :value="1">业委会</a-select-option>
|
||||
<a-select-option :value="2">绿化</a-select-option>
|
||||
<a-select-option :value="3">快递</a-select-option>
|
||||
<a-select-option :value="4">搬家</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="状态" prop="status">
|
||||
<a-select style="width: 240px" v-model="addForm.status">
|
||||
<a-select-option :value="1">正常</a-select-option>
|
||||
<a-select-option :value="2">有误</a-select-option>
|
||||
<a-select-option :value="3">空号</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="权重" prop="weight">
|
||||
<a-input-number style="width: 120px" v-model="addForm.weight" :min="0"></a-input-number>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-form-model>
|
||||
</a-row>
|
||||
</div>
|
||||
<div class="drawer-footer" style="float: left">
|
||||
<a-button @click="addConfirm" type="primary" :style="{ marginRight: '8px' }">
|
||||
确认
|
||||
</a-button>
|
||||
<a-button @click="detailClose"> 关闭 </a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
<a-drawer title="定时检查" :width="720" :visible="checkShow" :body-style="{ paddingBottom: '60px' }" @close="checkClose">
|
||||
<div class="drawer-content">
|
||||
<span>基本信息</span>
|
||||
<a-divider></a-divider>
|
||||
<a-row>
|
||||
<a-form-model>
|
||||
<a-col :span="20">
|
||||
<a-form-model-item label="提醒间隔">
|
||||
<a-select v-model="checkForm.reminderInterval">
|
||||
<a-select-option :value="1">一个月</a-select-option>
|
||||
<a-select-option :value="2">半年</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="20">
|
||||
<a-form-model-item label="提醒内容">
|
||||
<a-textarea v-model="checkForm.reminderContent"></a-textarea>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-form-model>
|
||||
</a-row>
|
||||
</div>
|
||||
<div class="drawer-footer" style="float: left">
|
||||
<a-button @click="checkConfirm" type="primary" :style="{ marginRight: '8px' }">
|
||||
确认
|
||||
</a-button>
|
||||
<a-button @click="checkClose"> 关闭 </a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getPhoneList,addPhone, findPhone, updatePhone, delPhone,reminderInfo,updateReminder} from "@/api/operation/suggestion"
|
||||
import { rules, columns } from "./depend/config";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
name: '',
|
||||
tel: ''
|
||||
},
|
||||
addForm: {
|
||||
name: '',
|
||||
tel: '',
|
||||
type: undefined,
|
||||
status: undefined,
|
||||
weight: 0,
|
||||
},
|
||||
checkForm: {
|
||||
reminderInterval: undefined,
|
||||
reminderContent: ''
|
||||
},
|
||||
mode: 1, //1新增 2编辑
|
||||
activeId: undefined,
|
||||
activeName: 0,
|
||||
rules: rules,
|
||||
columns: columns,
|
||||
tableData: [],
|
||||
pagination: {
|
||||
current: 1,
|
||||
total: 0,
|
||||
pageSize: 10,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
showSizeChanger: true,
|
||||
showQuickJumper: true,
|
||||
},
|
||||
//详情
|
||||
detailShow: false,
|
||||
//检查
|
||||
checkShow: false,
|
||||
//批量删除
|
||||
selectedRowKeys: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
let obj = Object.assign(this.form, {pageNum: this.pagination.current,size: this.pagination.pageSize})
|
||||
getPhoneList(obj).then(res => {
|
||||
this.tableData = res.data.rows;
|
||||
this.pagination.total = res.data.total
|
||||
})
|
||||
},
|
||||
reset() {
|
||||
this.form = {
|
||||
name: '',
|
||||
tel: ''
|
||||
},
|
||||
this.getData()
|
||||
},
|
||||
handlerChange() {
|
||||
|
||||
},
|
||||
detailClose() {
|
||||
this.addForm = {
|
||||
name: '',
|
||||
tel: '',
|
||||
type: undefined,
|
||||
status: undefined,
|
||||
weight: 0,
|
||||
}
|
||||
this.detailShow = false
|
||||
},
|
||||
checkClose() {
|
||||
this.checkForm = {
|
||||
reminderInterval: undefined,
|
||||
reminderContent: ''
|
||||
}
|
||||
this.checkShow = false
|
||||
},
|
||||
//添加电话
|
||||
addConfirm() {
|
||||
if(this.mode == 1) {
|
||||
addPhone(this.addForm).then(res => {
|
||||
if(res.code === 200){
|
||||
this.$message.success(res.msg);
|
||||
this.detailClose()
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
} else {
|
||||
let obj = Object.assign(this.addForm, {id: this.activeId})
|
||||
updatePhone(obj).then(res => {
|
||||
if(res.code === 200){
|
||||
this.$message.success(res.msg);
|
||||
this.detailClose()
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
edit(val) {
|
||||
this.mode = 2;
|
||||
findPhone({conveniencePhoneId: val.id}).then(res => {
|
||||
let data = res.data;
|
||||
this.addForm = {
|
||||
name: data.name,
|
||||
tel: data.tel,
|
||||
type: data.type,
|
||||
status: data.status,
|
||||
weight: data.weight,
|
||||
},
|
||||
this.activeId = data.id
|
||||
})
|
||||
this.detailShow = true;
|
||||
},
|
||||
//检查
|
||||
check() {
|
||||
reminderInfo().then(res => {
|
||||
let data = res.data;
|
||||
this.checkForm = data;
|
||||
this.checkShow = true;
|
||||
})
|
||||
},
|
||||
checkConfirm() {
|
||||
let obj = Object.assign(this.checkForm, {id: this.activeId})
|
||||
updateReminder(obj).then(res => {
|
||||
if(res.code === 200){
|
||||
this.$message.success(res.msg);
|
||||
this.checkClose()
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
//删除
|
||||
del(val) {
|
||||
this.$confirm({
|
||||
title: "是否删除该电话?",
|
||||
icon:'delete',
|
||||
onOk:async()=>{
|
||||
let res = await delPhone({conveniencePhoneIds: [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 delPhone({conveniencePhoneIds: 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