张雄 2 years ago
parent 3a8710dbb8
commit 5d58cb6627

@ -241,6 +241,14 @@ export default [
hide: false,
component: resolve => require(['@/views/Operation/Facility/_facilityInfo'], resolve),
meta: {title: '设施设备管理'},
},
{
path: '/Facility/FacilityPreOrder',
name: "FacilityPreOrder",
title: "预约管理",
hide: false,
component: resolve => require(['@/views/Operation/Facility/_facilityPreOrder'], resolve),
meta: {title: '预约管理'},
}
]
},

@ -17,7 +17,7 @@ export const columns = [
title: "居住房屋",
dataIndex: "build",
scopedSlots: { customRender: "build" },
width: 380
width: 200
},
{
title: "住户身份",
@ -52,6 +52,14 @@ export const columns = [
title: "住户身份证号",
dataIndex: "idCard",
},
{
title: "创建时间",
dataIndex: "createDate",
customRender:function(createDate){
let date = new Date(createDate).toLocaleString();
return date
}
},
{
title: "操作",
dataIndex: "action",

@ -4,7 +4,7 @@ export const form = {
organizerId:undefined,
isShow:false,
activityObject:undefined,
content:undefined,
content:'',
registrationStartTime:undefined,
registrationEndTime:undefined,
activityStartTime:undefined,

@ -77,6 +77,9 @@
style="width: 80%"
:autosize="{minRows: 10}"
></a-textarea>
<div>
已输入 {{form.content.length}} / 1024
</div>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -96,6 +99,7 @@
label="报名结束时间"
>
<a-date-picker
:disabledDate="disabledDate"
v-model="form.registrationEndTime"
value-format="YYYY-MM-DD HH:mm:ss"
/>
@ -112,6 +116,7 @@
<a-col :span="12">
<a-form-model-item prop="activityEndTime" label="活动结束时间">
<a-date-picker
:disabledDate="disabledDate2"
v-model="form.activityEndTime"
value-format="YYYY-MM-DD HH:mm:ss"
/>
@ -185,6 +190,7 @@
</template>
<script>
import moment from "moment";
import { form, rules, options } from "./form.js";
import {
activityInsert,
@ -267,6 +273,22 @@ export default {
}
})
},
//
disabledDate(value) {
let hdStartValue = moment(this.form.activityEndTime);
if (!value || !hdStartValue) {
return false;
}
return hdStartValue < value;
},
//
disabledDate2(value) {
let bmStartValue = moment(this.form.registrationEndTime);
if (!value || !bmStartValue) {
return false;
}
return bmStartValue >= value;
}
},
watch: {
editId: {

@ -3,7 +3,7 @@ export const form = {
title:undefined,
object:undefined,
status:undefined,
content:undefined,
content:'',
coverImgUrls:[],
annexUrls:[],
}

@ -58,6 +58,9 @@
style="width: 80%"
:autosize="{ minRows: 12}"
></a-textarea>
<div>
已输入 {{form.content.length}} / 1024
</div>
</a-form-model-item>
封面图片
<commonUpload

@ -83,6 +83,9 @@
<a-col :span="24">
<a-form-model-item label="内容" prop="content">
<a-textarea style="width: 560px" :autosize="{minRows: 8}" placeholder="可输入不超过1024个字符的内容" v-model="addForm.content"></a-textarea>
<div>
已输入 {{addForm.content.length}} / 1024
</div>
</a-form-model-item>
</a-col>
<a-col :span="24">

@ -156,7 +156,10 @@
</a-col>
<a-col :span="22">
<a-form-model-item label="备注" prop="brand">
<a-textarea :autosize="{minRows:8}" v-model="addForm.remakes" placeholder="请输入备注"></a-textarea>
<a-textarea :autosize="{minRows:8}" v-model="addForm.remakes" placeholder="请输入备注不超过1024字"></a-textarea>
<div>
已输入 {{addForm.remakes.length}} / 1024
</div>
</a-form-model-item>
</a-col>
</a-form-model>

@ -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>

@ -3,7 +3,7 @@ export const form = {
title:undefined,
categoryId:undefined,
status:undefined,
content:undefined,
content:'',
imgUrls:[]
}
export const rules = {

@ -62,10 +62,13 @@
<a-form-model-item prop="content" label="内容">
<a-textarea
v-model="form.content"
placeholder="请输入内容"
placeholder="请输入内容不超过1024字"
style="width: 80%"
:autosize="{minRows: 10}"
></a-textarea>
<div>
已输入 {{form.content.length}} / 1024
</div>
</a-form-model-item>
</a-col>
<a-col :span="24">

Binary file not shown.
Loading…
Cancel
Save