dedsudiyu месяцев назад: 11
Родитель
Сommit
e88375ebcb

+ 15 - 1
src/components/UEditor/index.vue

@@ -16,6 +16,7 @@
       content:{},
       height:null,
       width:null,
+      noVideoImg:null
     },
     data() {
       return {
@@ -30,7 +31,20 @@
           // 上传文件接口(这个地址是我为了方便各位体验文件上传功能搭建的临时接口,请勿在生产环境使用!!!)
           serverUrl: '//'+this.judgmentNetworkReturnAddress()+'/system/editor/exec',
           // UEditor 资源文件的存放路径,如果你使用的是 vue-cli 生成的项目,通常不需要设置该选项,vue-ueditor-wrap 会自动处理常见的情况,如果需要特殊配置,参考下方的常见问题2
-          UEDITOR_HOME_URL: './UEditor/'
+          UEDITOR_HOME_URL: './UEditor/',
+          toolbars:this.noVideoImg?
+            [[ 'undo', 'redo', '|','bold', 'italic', 'underline', 'fontborder', 'strikethrough', '|',
+              'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
+              'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
+              'forecolor', 'backcolor', '|',
+              'horizontal', 'date', 'time',]]
+            :
+            [[ 'undo', 'redo', '|','bold', 'italic', 'underline', 'fontborder', 'strikethrough', '|',
+              'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
+              'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
+              'forecolor', 'backcolor', '|',
+              'insertimage','insertvideo','|',
+              'horizontal', 'date', 'time',]],
         },
       }
     },

+ 1 - 1
src/views/integratedManagement/messageNotice/notice/addPage.vue

@@ -61,7 +61,7 @@
           </el-radio-group>
         </el-form-item>
         <el-form-item label="消息内容" prop="content" style="width:1000px;">
-          <UEditor ref="UEditor" :content="addForm.content" :min-height="192" />
+          <UEditor ref="UEditor" :content="addForm.content" :min-height="192" :noVideoImg="true"/>
           <!--<editor v-model="addForm.content" :min-height="192"/>-->
         </el-form-item>
       </el-form>

+ 4 - 9
src/views/safetyEducationExam/safeLearning/el_resources/index.vue

@@ -257,7 +257,7 @@
             />
           </el-form-item>
           <el-form-item label="课件内容" prop="content" style="height:500px;overflow-y: scroll" class="scrollbar-box">
-            <UEditor ref="UEditor" :content="richTextForm.content" :height="400" :width="940" />
+            <UEditor ref="UEditor" :content="richTextForm.content" :height="400" :width="940" :noVideoImg="true" />
             <!--<editor v-model="richTextForm.content" :min-height="192"/>-->
           </el-form-item>
         </el-form>
@@ -294,7 +294,7 @@
             />
           </el-form-item>
           <el-form-item label="课件内容" prop="content" style="height:500px;overflow-y: scroll" class="scrollbar-box">
-            <UEditor ref="UEditor" :content="richTextForm.content" :height="400" :width="940" />
+            <UEditor ref="UEditor" :content="richTextForm.content" :height="400" :width="940" :noVideoImg="true"/>
             <!--<editor v-model="richTextForm.content" :min-height="192"/>-->
           </el-form-item>
         </el-form>
@@ -737,10 +737,7 @@ export default {
         this.msgSuccess("新增成功");
         this.coursewareName=response.data.fileName;//课件名称
         this.loading = false;
-        setTimeout(function (){
-          _this.open = false;
-        },2000)
-
+        _this.open = false;
         this.richTextCancel();
         this.allRemove();
         this.getList();
@@ -762,9 +759,7 @@ export default {
         this.openEdit = false;
         this.coursewareName=response.data.fileName;//课件名称
         this.loading = false;
-        setTimeout(function (){
-          _this.open = false;
-        },2000)
+        _this.open = false;
         this.allRemove();
         this.getList();
       });