819527061@qq.com
2024-05-11 f73ed7862edc9c3cb78a2610486643a2fa079fde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<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>