xjc před 4 roky
rodič
revize
9b2960f1d8
1 změnil soubory, kde provedl 55 přidání a 8 odebrání
  1. 55 8
      src/views/message/modelForm.vue

+ 55 - 8
src/views/message/modelForm.vue

@@ -412,9 +412,33 @@
                   :close-on-click-modal="false"
                   :visible.sync="dialogVisible"
                 > 
-                    <fuEditor :value="curNote" ref="editor"></fuEditor>
+                  <el-form
+                      size="small"
+                      class="preview"
+                      :inline="false"
+                      label-width="80px"
+                      :model="noteForm"
+                      ref="form1"
+                      :rules="rules"
+                    >
+                    <el-form-item>
+                      <el-input v-model="noteForm.noteDesc" placeholder="请输入批注信息"></el-input>
+                    </el-form-item>
+                    <el-form-item prop="img">
+                      <el-upload
+                          action="/api/admin/uploadfile"
+                          list-type="picture-card"
+                          :on-preview="handlePreview"
+                          :on-remove="handleRemove"
+                          :file-list="noteForm.noteImgs"
+                          >
+                          <i class="el-icon-plus"></i>
+                      </el-upload>
+                    </el-form-item>
+                </el-form>
+                    
                   <span slot="footer" class="dialog-footer">
-                    <el-button size="small" type="normal" @click="dialogVisible=false,noteForm={},curNote='<p></p>'">取消</el-button>
+                    <el-button size="small" type="normal" @click="dialogVisible=false,curNote='<p></p>'">取消</el-button>
                     <el-button size="small" type="primary" @click="saveNote(curItem)">确 定</el-button>
                   </span>
                 </el-dialog>
@@ -427,7 +451,10 @@
                         <h5 align='center' class="tpl_title">{{title}}</h5>
                         <el-form ref="form" :model="form" class="tpl_form over_y">
                             <template v-for="(item,index) in widgetList">
-                            <el-form-item :key="index" :label="item.label+item.cntype">
+                              <el-form-item :key="index" :label="item.label+item.cntype">
+                                <el-tooltip v-if="item.note" class="item" effect="dark" :content="item.note" placement="right-start">
+                                  <i class="el-icon-info" style="position: absolute;top: -28px;right: 0px;"></i>
+                                </el-tooltip>
                                 <el-input :class="item.require?'require':''" v-if="item.type=='input'" v-model="form.label" :placeholder="item.placeholder"></el-input>
                                 <el-input :class="item.require?'require':''" v-if="item.type=='textarea'" type="textarea" v-model="form.label" :placeholder="item.placeholder"></el-input>
                                 <el-radio-group class="cus_select" v-if="item.type=='radio'" :class="item.require?'require':''">
@@ -466,6 +493,19 @@
                         </el-form>
                     </div>
                 </div>
+                <!-- 批注信息展示 -->
+                <el-dialog
+                  class="noteDialog"
+                  :title="dialogTitle1"
+                  :close-on-click-modal="false"
+                  :visible.sync="dialogVisible1"
+                > 
+                    <fuEditor :value="curNote" ref="editor"></fuEditor>
+                    <span slot="footer" class="dialog-footer">
+                      <el-button size="small" type="normal" @click="dialogVisible=false,noteForm={},curNote='<p></p>'">取消</el-button>
+                      <el-button size="small" type="primary" @click="saveNote(curItem)">确 定</el-button>
+                    </span>
+                </el-dialog>
             </div>
         </div>
     </section>
@@ -477,11 +517,14 @@ export default {
   components: { vuedraggable,fuEditor },
   data() {
     return {
+      noteImgList:[],
       curItem:{},
       dialogTitle:"",
-      noteForm:{},
+      dialogTitle1:"",
+      noteForm:{noteDesc:"",noteImgs:[]},
       curNote:"",
       dialogVisible:false,
+      dialogVisible1:false,
       rules: {
         姓名: [{ required: true, message: "请输入标题", trigger: "blur" }],
       },
@@ -578,15 +621,19 @@ export default {
 
     },
     addNote(item){
+      // this.noteForm = {}
       this.curItem = item;
-      this.curNote = item.note?item.note:'';
-      // this.$refs.editor.html(this.curNote)
+      // 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.dialogVisible = true;
     },
     saveNote(item){
-      this.curNote=this.$refs.editor.getEditor()
-      item.note = this.curNote;
+      // this.curNote=this.$refs.editor.getEditor()
+      // item.note = this.curNote;
+      item.noteDesc = this.noteForm.noteDesc
+      item.noteImgs = this.noteForm.noteImgs
       this.dialogVisible = false;
     },
     handlePreview(){