xjc 4 lat temu
rodzic
commit
58614a1492
1 zmienionych plików z 10 dodań i 13 usunięć
  1. 10 13
      src/views/message/modelForm.vue

+ 10 - 13
src/views/message/modelForm.vue

@@ -417,12 +417,11 @@
                       class="preview"
                       class="preview"
                       :inline="false"
                       :inline="false"
                       label-width="80px"
                       label-width="80px"
-                      :model="noteForm"
                       ref="form1"
                       ref="form1"
                       :rules="rules"
                       :rules="rules"
                     >
                     >
                     <el-form-item>
                     <el-form-item>
-                      <el-input v-model="noteForm.noteDesc" placeholder="请输入批注信息"></el-input>
+                      <el-input v-model="noteDesc" placeholder="请输入批注信息"></el-input>
                     </el-form-item>
                     </el-form-item>
                     <el-form-item prop="img">
                     <el-form-item prop="img">
                       <el-upload
                       <el-upload
@@ -430,7 +429,7 @@
                           list-type="picture-card"
                           list-type="picture-card"
                           :on-preview="handlePreview"
                           :on-preview="handlePreview"
                           :on-remove="handleRemove"
                           :on-remove="handleRemove"
-                          :file-list="noteForm.noteImgs"
+                          :file-list="noteImgs"
                           >
                           >
                           <i class="el-icon-plus"></i>
                           <i class="el-icon-plus"></i>
                       </el-upload>
                       </el-upload>
@@ -517,11 +516,13 @@ export default {
   components: { vuedraggable,fuEditor },
   components: { vuedraggable,fuEditor },
   data() {
   data() {
     return {
     return {
+      noteDesc:"",
+      noteImgs:[],
       noteImgList:[],
       noteImgList:[],
       curItem:{},
       curItem:{},
       dialogTitle:"",
       dialogTitle:"",
       dialogTitle1:"",
       dialogTitle1:"",
-      noteForm:{noteDesc:"",noteImgs:[]},
+      // noteForm:{noteDesc:"",noteImgs:[]},
       curNote:"",
       curNote:"",
       dialogVisible:false,
       dialogVisible:false,
       dialogVisible1:false,
       dialogVisible1:false,
@@ -621,19 +622,16 @@ export default {
 
 
     },
     },
     addNote(item){
     addNote(item){
-      // this.noteForm = {}
+      this.noteDesc = item.noteDesc;
+      this.noteImgs = item.noteImgs;
       this.curItem = item;
       this.curItem = item;
-      // this.curNote = item.note?item.note:'';
-      this.$set(this.noteForm,"noteDesc",this.curItem.noteDesc)
-      this.$set(this.noteForm,"noteImgs",this.curItem.noteImgs)
       this.dialogTitle = "为"+'"'+item.label+'"添加批注信息'
       this.dialogTitle = "为"+'"'+item.label+'"添加批注信息'
       this.dialogVisible = true;
       this.dialogVisible = true;
     },
     },
     saveNote(item){
     saveNote(item){
-      // this.curNote=this.$refs.editor.getEditor()
-      // item.note = this.curNote;
-      item.noteDesc = this.noteForm.noteDesc
-      item.noteImgs = this.noteForm.noteImgs
+      console.log(this.noteImgs,33333333333333)
+      item.noteDesc = this.noteDesc
+      item.noteImgs = this.noteImgs
       this.dialogVisible = false;
       this.dialogVisible = false;
     },
     },
     handlePreview(){
     handlePreview(){
@@ -696,7 +694,6 @@ export default {
         name: this.title,
         name: this.title,
         widget: JSON.stringify(widgets),
         widget: JSON.stringify(widgets),
       };
       };
-      console.log(widgets, 22222222222);
       if (id && !copyid) {
       if (id && !copyid) {
         params.id = id;
         params.id = id;
         this.$api.editTemplate(params).then((res) => {
         this.$api.editTemplate(params).then((res) => {