Procházet zdrojové kódy

投诉建议新增用户评价UI

long před 3 roky
rodič
revize
bdbbe485f7

+ 19 - 6
operationSupport/src/utils/filters.js

@@ -8,23 +8,36 @@ let filterTimeNumber = (val) => {
 };
 // 处理投诉建议状态
 let filterComplaintStatus = (val) => {
-    return val == '1' ? '未处理' : val == '2' ? '已处理' : '处理中';
+    return val == '1' ? '未处理' : val == '2' ? '已处理' : val == '3' ? '处理中' : val == '4' ? '待评价' : '已评价';
 };
 // 投诉类型
 let filtercomplaintType = (val) => {
     switch (val) {
-        case '1':
+        case 1:
             return '扰民投诉';
-        case '2':
+        case 2:
             return '物业服务';
-        case '3':
+        case 3:
             return '公共卫生';
-        case '4':
+        case 4:
             return '安全建议';
         default:
             '其他';
     }
 };
+// 住户类型
+let filterHouseType = (val) => {
+    switch (val) {
+        case 1:
+            return '业主';
+        case 2:
+            return '亲属';
+        case 3:
+            return '租客';
+        default:
+            '其他';
+    }
+};
 // 替换富文本内容
 let filterHtml = (val) => {
     let content = val.replace(/<.+?>/g, '');
@@ -47,4 +60,4 @@ let filterHtmlImage = (val) => {
     // }
     return 'content';
 };
-export default { filterTime, filterTimeNumber, filterComplaintStatus, filtercomplaintType, filterHtml, filterHtmlImage };
+export default { filterTime, filterTimeNumber, filterComplaintStatus, filtercomplaintType, filterHouseType, filterHtml, filterHtmlImage };

+ 42 - 12
operationSupport/src/views/propertyManagement/index.vue

@@ -124,11 +124,11 @@
                             <span v-else> 暂无图片 </span>
                         </div>
                     </div>
+                    <div class="complaint-title">
+                        <div class="complaint-title-left"></div>
+                        <span class="complaint-title-right">处理记录</span>
+                    </div>
                     <div class="record">
-                        <div class="complaint-title">
-                            <div class="complaint-title-left"></div>
-                            <span class="complaint-title-right">处理记录</span>
-                        </div>
                         <div class="recored-detali" v-if="rowData">
                             <!-- v-for="(item, index) in 3" :key="index" -->
                             <div v-for="(item, index) of recordData" :key="index">
@@ -139,9 +139,10 @@
                                     </div>
                                 </div>
                                 <div class="recored-detali-rows">
-                                    <div class="record-left" v-if="rowData.complaintStatus != '1'"></div>
+                                    <!-- rowData.handleStatus != 1 &&  ((index == 0 && recordData.length != 1) || (index == 1 && recordData.length > 2)) -->
+                                    <div class="record-left" v-show="recordData.length > 1 && index != recordData.length - 1"></div>
                                     <span class="font-size-small"
-                                        >{{ item.replyUserName }}: {{ item.replyContent ? item.replyContent : '--' }}</span
+                                        >{{ item.replyUserName }}:&nbsp;&nbsp;&nbsp;{{ item.replyContent ? item.replyContent : '--' }}</span
                                     >
                                 </div>
                             </div>
@@ -158,7 +159,7 @@
                                 :placeholder="rowData.handleStatus | filterComplaintStatus"
                                 v-model="mixins_query.complaintStatus"
                                 clearable
-                                :disabled="rowData.handleStatus == 2"
+                                :disabled="rowData.handleStatus == 2 || rowData.handleStatus == 4 || rowData.handleStatus == 5"
                             >
                                 <el-option v-for="(item, index) in complaintStatus" :key="index" :label="item.label" :value="item.status">{{
                                     item.label
@@ -166,8 +167,13 @@
                             </el-select>
                         </div>
                     </div>
-                    <div></div>
-                    <el-form :model="replayForm" ref="replayForm" label-width="80px" class="demo-ruleForm" v-if="rowData.handleStatus != 2">
+                    <el-form
+                        :model="replayForm"
+                        ref="replayForm"
+                        label-width="80px"
+                        class="demo-ruleForm"
+                        v-if="rowData.handleStatus == 1 || rowData.handleStatus == 3"
+                    >
                         <el-form-item
                             label="物业回复"
                             prop="replay"
@@ -190,6 +196,24 @@
                             </span>
                         </el-form-item>
                     </el-form>
+                    <!--用户 评价 -->
+                    <div v-if="rowData.handleStatus == 5" class="grate">
+                        <div class="complaint-title">
+                            <div class="complaint-title-left"></div>
+                            <span class="complaint-title-right grate-rate-title">用户评价</span>
+                        </div>
+                        <div class="grate-rate">
+                            <i
+                                class="el-icon-star-on"
+                                style="color: #ffca3b; font-size: 26px; margin-right: 10px"
+                                v-for="(item, index) in rowData.evaluation"
+                                :key="index"
+                            ></i>
+                            <div class="grate-text">
+                                {{ rowData.evaluationContent }}
+                            </div>
+                        </div>
+                    </div>
                 </div>
             </el-dialog>
         </div>
@@ -252,12 +276,20 @@ export default {
                 {
                     status: 3,
                     label: '处理中'
+                },
+                {
+                    status: 4,
+                    label: '待评价'
+                },
+                {
+                    status: 5,
+                    label: '已评价'
                 }
             ],
             // 投诉状态
             complaintStatus: [
                 {
-                    status: 2,
+                    status: 4,
                     label: '已处理'
                 },
                 {
@@ -334,8 +366,6 @@ export default {
         };
     },
     created() {
-        this.mixins_query.handleStatus = '';
-
         this.getCommunityList();
         this.mixins_dataUrl = '/sc-community-web/feedback/page';
         if (this.$route.query.showDialog && !this.$route.query.closeDialog) {

+ 11 - 4
operationSupport/src/views/propertyManagement/neighbor.vue

@@ -73,7 +73,7 @@
                         <p class="complaint-content">
                             <span>
                                 <span class="complaint-content-left">住户类型:</span>
-                                <!-- <span class="complaint-content-right">{{ rowData.status | filtercomplaintType }}</span> -->
+                                <span class="complaint-content-right">{{ rowData.householdType | filterHouseType }}</span>
                             </span>
                             <span>
                                 <span class="complaint-content-left">发布时间</span>
@@ -117,12 +117,19 @@
                                     </div>
                                     <el-button class="last-row-btn" type="primary" plain @click="deletes(item.id)">删除</el-button>
                                 </div>
-                                <div class="recored-detali-rows">
+                                <div
+                                    :class="{
+                                        'recored-detali-rows': true,
+                                        borders: detailData.commentList.length > 1 && index != detailData.commentList.length - 1
+                                    }"
+                                >
                                     <span class="font-size-small">{{ item.content }}</span>
                                 </div>
                             </div>
                         </div>
-                        <div v-if="!detailData.commentList" style="padding: 10px; text-align: center">暂无数据</div>
+                        <div v-if="detailData.commentList && detailData.commentList.length == 0" style="padding: 10px; text-align: center">
+                            暂无评论
+                        </div>
                     </div>
                 </div>
             </el-dialog>
@@ -316,7 +323,6 @@ export default {
         clickEdit(type, row) {
             this.mediaList = [];
             if (type == 'endit') {
-                this.rowData = row;
                 this.$http.get('/sc-community-web/neighbourhood/find/' + row.id).then((res) => {
                     if (res.status === 0) {
                         if (res.data.file) {
@@ -330,6 +336,7 @@ export default {
                                 return item !== 'mp4';
                             });
                         }
+                        this.rowData = res.data;
                         this.centerDialogVisible = true;
                         this.enditShow = true;
                         this.detailData = res.data;

+ 25 - 4
operationSupport/src/views/propertyManagement/style.scss

@@ -62,8 +62,27 @@ $fontSizeSmall: 14px;
         margin-right: 10px;
     }
     .complaint-title-right {
-        color: #000;
-        font-size: $fontSizeSmall;
+        font-family: PingFangSC-Medium, PingFang SC;
+        color: #424656;
+        font-weight: 500;
+    }
+    .grate-rate {
+        background: #f4f7f9;
+        border-radius: 2px;
+        padding: 10px;
+        color: #424656;
+        font-size: 12px;
+    }
+    .grate-rate-title {
+        margin-bottom: 20px;
+    }
+    .grate-text {
+        margin-top: 8px;
+        margin-left: 3px;
+        color: #424656;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        font-size: 12px;
     }
     .complaint-content {
         display: flex;
@@ -108,7 +127,7 @@ $fontSizeSmall: 14px;
     // 记录部分
     .record {
         padding: 10px;
-        margin-top: 30px;
+        margin-top: 20px;
         margin-bottom: 20px;
         background: #f4f7f9;
         max-height: 36vh;
@@ -642,8 +661,10 @@ s {
                 line-height: 32px;
                 position: relative;
             }
-            .recored-detali-rows {
+            .borders {
                 border-left: 1px solid #0eaeff;
+            }
+            .recored-detali-rows {
                 display: block;
                 padding-left: 17px;
                 .font-size-small {