Ver Fonte

fix: 5418 全环境修复:文件发放异常,无法确认,且消息催办有bug

johnsen há 5 meses atrás
pai
commit
c6c451b4c3

+ 9 - 1
src/views/component/fileTraining/index.vue

@@ -103,7 +103,8 @@
                                 <el-tooltip
                                     class="itemStyle"
                                     effect="dark"
-                                    placement="right-end"
+                                    popper-class="tooltip-max-width"
+                                    placement="right"
                                     :content="showContent(activity, index)"
                                 >
                                     <div>
@@ -743,6 +744,13 @@ export default {
 }
 </script>
 <style lang="scss">
+.tooltip-max-width {
+  max-width: 800px !important;  /* 固定最大宽度800px */
+  width: max-content;  /* 内容不足时自适应宽度,不占满800px */
+  white-space: pre-wrap;  /* 超长内容自动换行,避免横向溢出 */
+  word-break: break-all;  /* 英文/数字超长时强制换行 */
+  padding: 8px 12px;  /* 可选:调整内边距,优化排版 */
+}
 .ibps-file-preview-dialog {
     width: 80%;
     z-index: 99999;

+ 16 - 14
src/views/platform/message/inner/detail/dialog.vue

@@ -123,9 +123,8 @@ export default {
         },
         // 获取表单数据
         getFormData () {
-            this.$nextTick(() => {
-                this.$refs.innerMessage.getFormData()
-                // this.handleCallback(true)
+            return this.$nextTick().then(() => {
+                return this.$refs.innerMessage.getFormData()
             })
         },
         // getId (arr) {
@@ -191,27 +190,30 @@ export default {
                         // })
                         this.$common.request('add', returnParams).then(() => { console.log('确认接收到发放文件') }).then(() => {
                             this.type = ''
-                            this.getFormData()
+                            this.getFormData().then(() => {
+                                this.closeDialog()
+                            })
                         })
+                    } else {
+                        this.closeDialog()
                     }
                 })
-                this.closeDialog()
             }).catch(() => { })
         },
         handleCallback (res) {
             this.$emit('callback', res)
         },
-        acquire(res){
-            let mid = { key: 'viewDetails', label: '查看详情', type: 'danger', icon: 'ibps-icon-search' }
-            if(res){
-                let indexNum = this.toolbars.findIndex(i=>i.key == mid.key)
-                if(indexNum == -1){
+        acquire (res) {
+            const mid = { key: 'viewDetails', label: '查看详情', type: 'danger', icon: 'ibps-icon-search' }
+            if (res) {
+                const indexNum = this.toolbars.findIndex(i => i.key == mid.key)
+                if (indexNum == -1) {
                     this.toolbars.unshift(mid)
                 }
-            }else{
-                let indexNum = this.toolbars.findIndex(i=>i.key == mid.key)
-                if(indexNum != -1){
-                    this.toolbars.splice(indexNum,1)
+            } else {
+                const indexNum = this.toolbars.findIndex(i => i.key == mid.key)
+                if (indexNum != -1) {
+                    this.toolbars.splice(indexNum, 1)
                 }
             }
         }

+ 11 - 10
src/views/platform/message/inner/detail/index.vue

@@ -192,20 +192,20 @@ export default {
             return this.id
         }
     },
-    watch:{
+    watch: {
         showDialog: {
-            handler(val, oldVal) {
+            handler (val, oldVal) {
                 this.$emit('judgeIndex', val)
-            },
+            }
             // immediate: true
         },
         form: {
-            handler(val, oldVal) {
+            handler (val, oldVal) {
                 this.judgeTF(val)
             },
             immediate: true,
             deep: true
-        },
+        }
     },
     methods: {
         handleClick (tab, event) {
@@ -230,9 +230,9 @@ export default {
         //     this.dialogformrenderVisible = true
         // },
         handleDifferentTab () {
-            let objNum = this.form
+            const objNum = this.form
             const stm = JSON.parse(objNum.skipTypeMsg)
-            const tid = stm.pathInfo ? stm.pathInfo :objNum.taskId
+            const tid = stm.pathInfo ? stm.pathInfo : objNum.taskId
             switch (stm.skipType) {
                 case 1:// 明细
                     this.handleLinkClick(stm.pathInfo)
@@ -260,7 +260,7 @@ export default {
             this.activeName = 'replied'
             this.form = ''
             this.loading = true
-            get({
+            return get({
                 innerMessageId: this.formId,
                 type: this.type || '' // 是否为空值,来决定消息是否要已读:空就已读,非空就未读
             }).then(response => {
@@ -274,6 +274,7 @@ export default {
                 if (!this.type) {
                     this.$emit('callback', true)
                 }
+                return 1
             }).catch(() => {
                 this.loading = false
             })
@@ -286,8 +287,8 @@ export default {
                         if (obj.skipType > 0) {
                             if (obj.skipType === 1) {
                                 this.showDialog = true
-                            } else if (obj.skipType === 2 ) {
-                                let canshu = form.taskId ? form.taskId : JSON.parse(form.skipTypeMsg).pathInfo
+                            } else if (obj.skipType === 2) {
+                                const canshu = form.taskId ? form.taskId : JSON.parse(form.skipTypeMsg).pathInfo
                                 const sql = "select count(id_) as num from ibps_bpm_task_pendding where task_id_='" + canshu + "'"
                                 curdPost('sql', sql).then(res => {
                                     if (res.variables.data[0].num > 0) {