瀏覽代碼

修改工作台样式

DESKTOP-4G80JF4\long 3 年之前
父節點
當前提交
ad86f551bf

+ 7 - 3
operationSupport/src/utils/filters.js

@@ -27,8 +27,12 @@ let filtercomplaintType = (val) => {
 };
 // 替换富文本内容
 let filterHtml = (val) => {
-    let reg = new RegExp(`<img class="wscnph" src />`, 'g');
-    let newContent = val.replace(reg, '');
-    return newContent;
+    let content = val.replace(/<.+?>/g, '');
+    content = content.replace(/&nbsp;/gi, '');
+    content = content.replace(/\s/gi, '');
+    // if (content.length >= 20) {
+    //     content = content.substring(0, 20) + '...';
+    // }
+    return content;
 };
 export default { filterTime, filterTimeNumber, filterComplaintStatus, filtercomplaintType, filterHtml };

+ 3 - 0
operationSupport/src/views/ownerManagement/ownerReview/index.vue

@@ -145,6 +145,9 @@ export default {
         this.mixins_query = {
             questParams: ''
         };
+        if (this.$route.query.showDialog && !this.$route.query.closeDialog) {
+            this.mixins_query.auditStatus = 0;
+        }
         this.mixins_search('search');
     }
 };

+ 43 - 30
operationSupport/src/views/propertyManagement/index.vue

@@ -113,19 +113,13 @@
                         </div>
                         <div class="complaint-images complaint-content">
                             <span class="complaint-content-left">图片/视频:</span>
-                            <span v-if="srcList.length">
-                                <span v-for="(item, index) in imgList" :key="index">
-                                    <el-image class="images" :src="item" :preview-src-list="imgList"> </el-image
+                            <span v-for="(item, index) in mediaList" :key="index">
+                                <span v-if="item.type == 1">
+                                    <el-image class="images" :src="item.url" :preview-src-list="imgList"> </el-image
                                 ></span>
-                                <span @click="clickVideo">
-                                    <video
-                                        id="video"
-                                        v-for="(item, index) in videoList"
-                                        :key="index"
-                                        :controls="videoControls"
-                                        class="videos"
-                                    >
-                                        <source :src="item" type="video/mp4" />
+                                <span @click="clickVideo" v-else>
+                                    <video id="video" :controls="videoControls" class="videos">
+                                        <source :src="item.url" type="video/mp4" />
                                         您的浏览器暂不支持播放视频
                                     </video></span
                                 >
@@ -216,10 +210,9 @@ export default {
             complaintName: '',
             // 视频获得焦点
             videoControls: false,
-            // 弹框显示图片
-            srcList: [],
+            // 弹框显示图片/视频
             imgList: [],
-            videoList: [],
+            mediaList: [],
             // 物业回复
             replayForm: {
                 replay: ''
@@ -337,6 +330,9 @@ export default {
         this.getCommunityList();
         this.mixins_dataUrl = '/sc-community-web/feedback/page';
         this.mixins_query = {};
+        if (this.$route.query.showDialog && !this.$route.query.closeDialog) {
+            this.mixins_query.handleStatus = 1;
+        }
         this.mixins_search();
     },
     mounted() {},
@@ -357,7 +353,9 @@ export default {
                 }
             }
         },
-        /**查询按钮*/
+        /**
+         * 查询按钮
+         */
         searchInfo() {
             let detaH = this.$moment(new Date()).format('HH');
             let detaM = this.$moment(new Date()).format('mm');
@@ -372,7 +370,9 @@ export default {
             }
             this.mixins_search();
         },
-        /** 弹框按钮*/
+        /**
+         *  弹框按钮
+         */
         dialogButton(type) {
             console.log('点击保存', this.rowData);
             if (type === 'submit') {
@@ -381,14 +381,24 @@ export default {
                         let query = {
                             buildingId: this.rowData.buildingId,
                             communityId: this.rowData.communityId,
-                            content: this.replayForm.replay,
+                            content: '',
                             handleStatus: this.mixins_query.complaintStatus,
                             houseId: this.rowData.houseId,
                             id: this.rowData.id
                         };
 
                         this.$http.post('/sc-community-web/feedback/update', query).then((res) => {
+                            // this.message(res.status, '回复');
+                            // console.log('点击提交', res, this.mixins_query.complaintStatus, this.replayForm.replay);
+                        });
+                        let querys = {
+                            fid: this.rowData.id,
+                            replyContent: this.replayForm.replay
+                        };
+                        this.$http.post('/sc-community-web/feedback/speed/add', querys).then((res) => {
                             this.message(res.status, '回复');
+                            this.$refs['replayForm'].resetFields();
+
                             console.log('点击提交', res, this.mixins_query.complaintStatus, this.replayForm.replay);
                         });
                     } else {
@@ -422,17 +432,17 @@ export default {
                     this.rowData = res.data;
                     this.centerDialogVisible = true;
                     this.complaintName = row.userName;
-                    if (res.data.imageUrl) {
-                        let file = res.data.imageUrl;
-                        let files = file.split(',');
-                        this.srcList = files;
-                        this.imgList = files.filter((item) => {
-                            return item.substr(-3) == 'png' || item.substr(-3) == 'jpg' || item.substr(-4) == 'jpeg';
-                        });
-                        this.videoList = files.filter((item) => {
-                            return item.substr(-3) == 'mp4';
-                        });
-                    }
+                    this.mediaList = JSON.parse(res.data.imageUrl);
+                    let arr = this.mediaList.filter((item) => {
+                        console.log('item', item);
+                        return item.url.substr(-3) == 'png' || item.url.substr(-3) == 'jpg' || item.url.substr(-4) == 'jpeg';
+                    });
+                    arr.map((item) => {
+                        if (item.url) {
+                            this.imgList.push(item.url);
+                        }
+                    });
+                    console.log(' this.imgList', this.imgList);
                 } else {
                     this.rowData = row;
                     this.$message('获取详情失败!请稍后重试');
@@ -449,7 +459,7 @@ export default {
             });
             console.log('查看处理详情', row);
         },
-        // 提示消息
+        /**提示消息 */
         message(status, text) {
             if (status === 0) {
                 this.$message({
@@ -471,4 +481,7 @@ export default {
 </script>
 <style lang="scss" scoped>
 @import './style.scss';
+/deep/ .el-dialog {
+    margin-top: 5vh !important;
+}
 </style>

+ 5 - 0
operationSupport/src/views/propertyManagement/style.scss

@@ -320,6 +320,11 @@ $fontSizeSmall: 14px;
 
 // 通知公公告样式
 .inform {
+    /deep/ .cell.el-tooltip p {
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
     // 添加弹框样式
     .dialog-info {
         /deep/ .el-dialog__header {

+ 6 - 5
operationSupport/src/views/workbench/index.vue

@@ -110,7 +110,7 @@
             <div class="center-left center-right">
                 <div class="center-left-text">待处理事项</div>
                 <ul>
-                    <li @click="goPath('/ownerManagement/ownerReview/index')">
+                    <li @click="goPath('/ownerManagement/ownerReview/index', true)">
                         <div>
                             <div class="header-left">
                                 <div class="header-left-top">
@@ -124,7 +124,7 @@
                             </div>
                         </div>
                     </li>
-                    <li @click="goPath('/propertyManagement/index')">
+                    <li @click="goPath('/propertyManagement/index', true)">
                         <div>
                             <div class="header-left">
                                 <div class="header-left-top">
@@ -138,7 +138,7 @@
                             </div>
                         </div>
                     </li>
-                    <li @click="goPath('/workOrdersManagement')">
+                    <li @click="goPath('/workOrdersManagement', true)">
                         <div>
                             <div class="header-left">
                                 <div class="header-left-top">
@@ -168,7 +168,8 @@
                     <li v-for="(item, index) in informData" :key="index" @click="goPathBack('/propertyManagement/inform', true, item.id)">
                         <div class="footer-content">
                             <div>[{{ item.title }}]</div>
-                            <div v-html="item.content"></div>
+                            <div>{{ item.content | filterHtml }}</div>
+                            <!-- <div v-html="item.content"></div> -->
                         </div>
                         <div>{{ item.pubDate }}</div>
                     </li>
@@ -218,7 +219,7 @@ export default {
     methods: {
         // 打开新页  跳转的路径
         goPath(path, showDialog, id) {
-            this.$router.push(path);
+            this.$router.push({ path, query: { showDialog: showDialog, id: id } });
             // let routeData = this.$router.resolve({
             //     path: path,
             //     query: {

+ 40 - 24
operationSupport/src/views/workbench/style.scss

@@ -208,34 +208,50 @@
     /deep/ .footer-content {
         display: flex;
         font-size: 12px;
-        /deep/ div,
-        p,
-        h1,
-        h2,
-        h3,
-        h4,
-        h5,
-        h6,
-        span {
-            font-size: 12px !important;
-            font-size: 12pt !important;
-            line-height: 12px;
-            vertical-align: middle;
+        width: 80%;
+        margin-right: 30px;
+        height: 17px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        :first-child {
+            width: auto;
         }
         :last-child {
-            margin-left: 5px;
-            width: 467px;
-            height: 17px;
+            margin-left: 10px;
             overflow: hidden;
             text-overflow: ellipsis;
+            white-space: nowrap;
         }
-        /deep/ img {
-            height: 15px;
-            max-width: 14px !important;
-        }
-        .wscnph {
-            width: 14px !important;
-            vertical-align: middle;
-        }
+        // /deep/ div,
+        // p,
+        // h1,
+        // h2,
+        // h3,
+        // h4,
+        // h5,
+        // h6,
+        // span {
+        //     font-size: 12px !important;
+        //     font-size: 12pt !important;
+        //     line-height: 12px;
+        //     vertical-align: middle;
+        // }
+        // :last-child {
+        //     margin-left: 5px;
+        //     height: 17px;
+        //     width: 346px;
+        //     overflow: hidden;
+        //     text-overflow: ellipsis;
+        //     white-space: nowrap;
+        // }
+        // /deep/ img {
+        //     height: 15px;
+        //     max-width: 14px !important;
+        // }
+        // .wscnph {
+        //     width: 14px !important;
+        //     vertical-align: middle;
+        // }
     }
 }