9
0

2 Revīzijas 95b7621d03 ... db34ee4a00

Autors SHA1 Ziņojums Datums
  jubs db34ee4a00 Merge branch 'dev_v2' of http://106.15.120.127:3000/GoldenTech/koyo_crm into dev_v2 2 mēneši atpakaļ
  jubs 7afbb6f0eb 解决0705 bug 2 mēneši atpakaļ

+ 6 - 0
ruoyi-ui-vue2/README.md

@@ -194,4 +194,10 @@ computed: {
       }
 ```
 
+### AppMain 注意事项
+```bash
+   全局 ”chatRoomImage“ class类不可额外定义,已经服务于聊天室图片预览,对于这个类的dom元素添加click监听事件,阻止了click事件传递;
+  messagePreview 方法不能删除
+```
+
 

+ 0 - 2
ruoyi-ui-vue2/src/components/FloatingComponent/index.vue

@@ -402,7 +402,6 @@ export default {
       }
     },
     handleDelete(item){
-      console.log('handleDelete', item);
       messageChatUserDelete({
         messageChatId:item.id
       }).then(res=>{
@@ -415,7 +414,6 @@ export default {
 
     async toActive(item) {
       this.activeChatRoom = item;
-      console.log('toActive', item);
       this.activeChatRoom.hasUnReadMessage = false;
       let res = await readChatMessage(item);
       this.totalQty = res.data;

+ 42 - 35
ruoyi-ui-vue2/src/layout/components/AppMain.vue

@@ -2,75 +2,76 @@
   <section class="app-main">
     <transition name="fade-transform" mode="out-in">
       <keep-alive :include="cachedViews">
-        <router-view v-if="!$route.meta.link" :key="key" />
+        <router-view v-if="!$route.meta.link" :key="key"/>
       </keep-alive>
     </transition>
-    <iframe-toggle />
-    <floating-component />
+    <iframe-toggle/>
+    <floating-component/>
     <DialogPage ref="auditStatusDialog" title="审批履历" maxWidth="500px" @close="auditHistory = []">
       <template>
         <div v-loading="loading" class="container">
           <div v-if="auditHistory && auditHistory.length > 0" v-for="item, index in auditHistory" style="font-size: 0;">
             <div class="left">
-              <div class="step"><img :src="item.status == AuditStatus.AUDITING ? audit : finished" width="25px" /></div>
+              <div class="step"><img :src="item.status == AuditStatus.AUDITING ? audit : finished" width="25px"/></div>
               <div class="line" v-if="index !== (auditHistory.length - 1)"
-                :style="{ height: item.auditUser ? '180px' : '30px' }"></div>
+                   :style="{ height: item.auditUser ? '180px' : '30px' }"></div>
             </div>
             <div class="right">
               <div class="head">
                 <span class="date" v-if="item.auditTime">{{
-                  item.auditTime.split(' ')[0].replaceAll('-', '/')
-                }}<br /><span class="time">{{
-                    item.auditTime.split(' ')[1]
-                  }}</span></span>
+                    item.auditTime.split(' ')[0].replaceAll('-', '/')
+                  }}<br/><span class="time">{{
+                      item.auditTime.split(' ')[1]
+                    }}</span></span>
                 <span
                   :class="{ status: true, success: item.status == AuditStatus.PASS, fail: item.status == AuditStatus.REJECT, auditing: item.status == AuditStatus.AUDITING, }">
                   {{ item.desc }}
                   <img v-if="item.status == AuditStatus.AUDITING" :src="alert" width="25px"
-                    style="display: inline-block;vertical-align: bottom;cursor: pointer;"
-                    @click="handleAlert(item.taskId)" />
+                       style="display: inline-block;vertical-align: bottom;cursor: pointer;"
+                       @click="handleAlert(item.taskId)"/>
                 </span>
 
               </div>
               <div class="audit-info" v-if="item.auditUser">
                 <span class="name">{{ item.nickName }}</span>
                 <img :src="pin" width="25px" class="attachment"
-                  v-if="item.attachmentList && item.attachmentList.length > 0"
-                  @click="$refs.auditAttachmentDialog.open(null, { attachmentList: item.attachmentList })" />
+                     v-if="item.attachmentList && item.attachmentList.length > 0"
+                     @click="$refs.auditAttachmentDialog.open(null, { attachmentList: item.attachmentList })"/>
                 <div class="remark">{{ item.remark }}</div>
               </div>
             </div>
           </div>
           <Col v-if="auditHistory && auditHistory.length === 0" class="NoDataEmpty">
-          <Row>
-            <Col style="text-align: center">
-            <el-image :src="require('@/assets/images/index/NoUnReadMsg.svg')" />
-            </Col>
-            <Col style="text-align: center">
-            <span class="noDataEmptyText">{{ $t('common.noDataEmptyText') }}</span>
-            </Col>
-          </Row>
+            <Row>
+              <Col style="text-align: center">
+                <el-image :src="require('@/assets/images/index/NoUnReadMsg.svg')"/>
+              </Col>
+              <Col style="text-align: center">
+                <span class="noDataEmptyText">{{ $t('common.noDataEmptyText') }}</span>
+              </Col>
+            </Row>
           </Col>
         </div>
       </template>
     </DialogPage>
     <DialogPage ref="auditAttachmentDialog" title="附件" maxWidth="550px" disabled label-position="top">
-      <FileUploadItem label="附件" prop="attachmentList" :module="module" :func="func" :category="category" />
+      <FileUploadItem label="附件" prop="attachmentList" :module="module" :func="func" :category="category"/>
     </DialogPage>
 
     <DialogPage ref="dialog" :title="title()" maxWidth="800px" :disabled="disabled" label-position="top" :header="true">
       <FileUploadItem :button-style="{ marginLeft: '5px' }" :label="label" class="normalClass" :prop="prop"
-        :module="module" :func="func" :category="category" :disabled="disabled" />
+                      :module="module" :func="func" :category="category" :disabled="disabled"/>
     </DialogPage>
     <DialogPage ref="dialogWatch" :title="title()" maxWidth="550px" :disabled="disabled" label-position="top"
-      :header="true">
+                :header="true">
       <FileUploadItem :button-style="{ marginLeft: '5px' }" :label="label" class="watchClass" :prop="prop"
-        :module="module" :func="func" :category="category" :disabled="disabled" />
+                      :module="module" :func="func" :category="category" :disabled="disabled"/>
     </DialogPage>
     <!--聊天室 图片预览-->
-    <DialogPage @close.stop="e=> handleCloseStop(e)"  ref="previewDialog" :modalAppendToBody="true" :appendToBody="true" :close-on-click-modal="true"
-      :title="'图片预览'" maxWidth="550px" :disabled="disabled" label-position="top">
-      <el-image :src="imageSrc" />
+    <DialogPage class="chatRoomImage" ref="previewDialog" :modalAppendToBody="true" :appendToBody="true"
+                :close-on-click-modal="true"
+                :title="'图片预览'" maxWidth="550px" :disabled="disabled" label-position="top">
+      <el-image :src="imageSrc"/>
     </DialogPage>
 
 
@@ -80,7 +81,7 @@
 <script>
 import iframeToggle from "./IframeToggle/index";
 import FloatingComponent from "../../components/FloatingComponent/index";
-import { getAuditHistory, alertAudit } from "@/api/audit/flow.js";
+import {getAuditHistory, alertAudit} from "@/api/audit/flow.js";
 import finished from "@/assets/audit/finished-green.png";
 import audit from "@/assets/audit/audit.png";
 import alert from "@/assets/audit/alert.png";
@@ -89,7 +90,7 @@ import DialogPage from "../../components/element/Dialog.vue";
 
 export default {
   name: "AppMain",
-  components: { DialogPage, FloatingComponent, iframeToggle },
+  components: {DialogPage, FloatingComponent, iframeToggle},
   provide: function () {
     return {
       main: this,
@@ -120,6 +121,12 @@ export default {
       return this.$route.path;
     },
   },
+  mounted() {
+    const dialog = document.getElementsByClassName("chatRoomImage")[0]
+    dialog.addEventListener('click', (e) => {
+      e.stopPropagation();
+    })
+  },
   methods: {
     showAuditHistory(businessId, auditFlows, module, func, category) {
       this.module = module;
@@ -127,7 +134,7 @@ export default {
       this.category = category;
       this.loading = true;
       this.$refs.auditStatusDialog.open();
-      getAuditHistory({ businessId, auditFlows, module, func, category })
+      getAuditHistory({businessId, auditFlows, module, func, category})
         .then((res) => {
           if (res.code === 200) {
             this.auditHistory = res.rows;
@@ -160,7 +167,7 @@ export default {
             this.$set(row, this.prop, form[this.prop]);
             this.showIcon = true;
           },
-          { [this.prop]: row[this.prop] }
+          {[this.prop]: row[this.prop]}
         );
       } else {
         this.$refs.dialog.open(
@@ -168,7 +175,7 @@ export default {
             this.$set(row, this.prop, form[this.prop]);
             this.showIcon = true;
           },
-          { [this.prop]: row[this.prop] }
+          {[this.prop]: row[this.prop]}
         );
       }
     },
@@ -191,7 +198,7 @@ export default {
   background: #f1f5f9;
 }
 
-.fixed-header+.app-main {
+.fixed-header + .app-main {
   padding-top: 50px;
 }
 
@@ -202,7 +209,7 @@ export default {
     min-height: calc(100vh - 94px);
   }
 
-  .fixed-header+.app-main {
+  .fixed-header + .app-main {
     padding-top: 84px;
   }
 }