Explorar o código

修改富文本内容

DESKTOP-4G80JF4\long %!s(int64=3) %!d(string=hai) anos
pai
achega
2bbdadd834
Modificáronse 1 ficheiros con 27 adicións e 12 borrados
  1. 27 12
      operationSupport/src/views/propertyManagement/inform.vue

+ 27 - 12
operationSupport/src/views/propertyManagement/inform.vue

@@ -47,7 +47,7 @@
             </div>
             <!-- 添加弹框 -->
             <div class="dialog-info">
-                <el-dialog :visible.sync="centerDialogVisible" width="1086px" :close-on-click-modal="false">
+                <el-dialog :visible.sync="centerDialogVisible" width="1086px" :close-on-press-escape="false" :close-on-click-modal="false">
                     <div class="dialog">
                         <div class="dialog-header">
                             <i class="el-dialog__close el-icon el-icon-close" @click="dialogButton('clear')"></i>
@@ -179,7 +179,7 @@
                                                 :editable="false"
                                             ></el-date-picker>
                                         </el-form-item>
-                                        <el-form-item label="主图片" prop="image" v-if="showUploadImage">
+                                        <el-form-item label="主图片" prop="image" v-if="showUploadImage">
                                             <div class="up-image">
                                                 <up-image
                                                     color="#1890ff"
@@ -664,10 +664,15 @@ export default {
                 this.rowDetail = '';
                 this.showDetail = true;
                 this.centerDialogVisible = true;
-                this.$refs.upImages.clearImageList();
+                if (this.successImageLists.length > 0) {
+                    this.$refs.upImages.clearImageList();
+                }
             } else {
                 this.showUploadImage = false;
-                this.$refs.endit.setContent(this.contents);
+                if (this.contents) {
+                    this.$refs.endit.setContent(this.contents);
+                    this.$refs['ruleForm'].resetFields();
+                }
             }
             console.log('发布活动类型', val);
         },
@@ -682,7 +687,10 @@ export default {
             this.uploadFileUrl = [];
             this.fileList = [];
             this.ruleForm.exigencyText = true;
-            this.$refs.endit.setContent(this.contents);
+            if (this.contents) {
+                this.$refs.endit.setContent(this.contents);
+                this.$refs['ruleForm'].resetFields();
+            }
         },
         /**添加按钮 */
         add() {
@@ -698,10 +706,13 @@ export default {
             this.filePath = '';
             this.uploadFileUrl = [];
             this.fileList = [];
-            this.$refs['ruleForm'].resetFields();
-
-            this.$refs.endit.setContent(this.contents);
-            this.$refs.upImages.clearImageList();
+            if (this.contents) {
+                this.$refs.endit.setContent(this.contents);
+                this.$refs['ruleForm'].resetFields();
+            }
+            if (this.successImageLists.length > 0) {
+                this.$refs.upImages.clearImageList();
+            }
         },
         /**查询按钮*/
         searchInfo() {
@@ -754,7 +765,7 @@ export default {
                             userId: this.ruleForm.issueRoom.checkAll
                                 ? this.selectDataHouseTreeData.userID
                                 : this.selectDataPeopleTreeData.userList,
-                            treeData: [],
+                            treeData: JSON.stringify([]),
                             title: this.ruleForm.title,
                             type: this.ruleForm.informType,
                             urgentFlag: this.ruleForm.exigencyOr == '是' ? 1 : 0,
@@ -782,12 +793,16 @@ export default {
                 this.centerDialogVisible = false;
                 this.clear();
                 this.$refs['ruleForm'].resetFields();
-                this.$refs.upImages.clearImageList();
+                if (this.successImageLists.length > 0) {
+                    this.$refs.upImages.clearImageList();
+                }
             } else {
                 this.centerDialogVisible = false;
                 this.clear();
                 this.$refs['ruleForm'].resetFields();
-                this.$refs.upImages.clearImageList();
+                if (this.successImageLists.length > 0) {
+                    this.$refs.upImages.clearImageList();
+                }
             }
         },
         /** 获取社区列表*/