<template>
|
<view class="opinionList-wrap">
|
<view class="opinionList-wrap-inside">
|
<view class="opinionList-block" v-for="item in opinionList" :key="item.id">
|
<view class="fabuData-box">
|
<view class="fabuData">发布时间:{{item.createTime}}</view>
|
<view class="isHuifu">{{item.status == 0 ? '未回复' : (item.status == 1 ? '已回复' : '')}}</view>
|
</view>
|
<view class="content">
|
{{item.content}}
|
</view>
|
<view class="huifu-content-box" v-if="item.replyContent">
|
<view class="huifu-content">
|
{{item.replyContent}}
|
</view>
|
<view class="huifuData">
|
回复时间:{{item.updateTime}}
|
</view>
|
</view>
|
</view>
|
<u-empty v-if="opinionList.length == 0" text="这里空空如也" mode="data"></u-empty>
|
<!-- <view class="opinionList-block">
|
<view class="fabuData-box">
|
<view class="fabuData">发布时间:2021-12-14</view>
|
<view class="isHuifu">已回复</view>
|
</view>
|
<view class="content">
|
意见与建议描述意见与建议描述意见与建议描述意见与建议描述意见与建议描述意见与建议描述意见与建议描述意见与建议描述
|
</view>
|
<view class="huifu-content-box">
|
<view class="huifu-content">
|
回复描述回复描述回复描述回复描述回复描述回复描述回复描述回复描述回复描述回复描述回复描述回复描述回复描述回复描述
|
</view>
|
<view class="huifuData">
|
回复时间:2021-12-14
|
</view>
|
</view>
|
</view> -->
|
|
</view>
|
|
<view class="fabubtn">
|
<u-button type="success" @click="fabuNewOpinion">发布新意见</u-button>
|
</view>
|
<addOpinion v-if="addOpinionVisiable" ref="addOpinion" @refeshOpinionList="getSuggestByPage()"></addOpinion>
|
</view>
|
</template>
|
|
<script>
|
import addOpinion from '../components/addOpinion/addOpinion.vue'
|
export default {
|
components:{
|
addOpinion
|
},
|
data() {
|
return {
|
opinionList:[],
|
addOpinionVisiable:false, //发布意见和建议弹框
|
}
|
},
|
onShow() {
|
this.getSuggestByPage()
|
},
|
methods: {
|
getSuggestByPage() { //获取意见建议列表
|
let params = {
|
order:'desc',
|
pageNumber:1,
|
pageSize:50,
|
sort:'createTime',
|
customerId:this.$store.state.customerId
|
}
|
this.$u.api.getSuggestByPage(params).then(res => {
|
if(res.code == 200) {
|
this.opinionList = res.result.records
|
}
|
})
|
},
|
fabuNewOpinion() {
|
this.addOpinionVisiable = true
|
this.$nextTick(() => {
|
this.$refs.addOpinion.init()
|
})
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
/deep/.uicon-empty-data:before{
|
background: $empty-bj;
|
background-size: 100% 100%;
|
width: 530rpx;
|
height: 470rpx;
|
content: ''!important;
|
}
|
.fabubtn{
|
margin-top: 40rpx;
|
}
|
.opinionList-wrap-inside{
|
/deep/ .u-btn--success{
|
background-color: #1F9F4C;
|
width: 250rpx;
|
height: 76rpx;
|
color: #fff;
|
}
|
}
|
|
.opinionList-wrap{
|
width: 100%;
|
padding: 32rpx;
|
box-sizing: border-box;
|
}
|
.opinionList-block{
|
display: flex;
|
flex-direction: column;
|
padding-bottom: 20rpx;
|
border-bottom: 1px dashed #CCCCCC;
|
margin-top: 60rpx;
|
&::last-child{
|
border-bottom: 0;
|
}
|
.fabuData-box{
|
display: flex;
|
justify-content: space-between;
|
.fabuData{
|
font-size: 28rpx;
|
color: #111111;
|
font-weight: light;
|
line-height: 2;
|
}
|
.isHuifu{
|
font-size: 28rpx;
|
color: #FF0000;
|
font-weight: light;
|
line-height: 2;
|
}
|
}
|
.content{
|
font-size: 28rpx;
|
color: #111111;
|
font-weight: light;
|
text-indent: 2em;
|
line-height: 2;
|
}
|
.huifu-content-box{
|
display: flex;
|
flex-direction: column;
|
background-color: rgba(31,159,76,0.1);
|
padding: 32rpx;
|
margin-top: 20rpx;
|
position: relative;
|
margin-bottom: 20rpx;
|
&::after{
|
content: '';
|
width:0;
|
height:0;
|
border-width:20rpx;
|
border-style:solid;
|
border-color:transparent transparent rgba(31,159,76,0.1) transparent;
|
position: absolute;
|
top: -39rpx;
|
left: 40rpx;
|
}
|
.huifu-content{
|
font-size: 28rpx;
|
color: #111111;
|
font-weight: light;
|
text-indent: 2em;
|
line-height: 2;
|
}
|
.huifuData{
|
font-size: 28rpx;
|
color: #111111;
|
font-weight: light;
|
line-height: 2;
|
}
|
}
|
}
|
</style>
|