Przeglądaj źródła

Merge branch '11/24SAAS' of http://git.dayaedu.com/yonge/dy-admin-manager into 11/24SAAS

lex-xin 3 lat temu
rodzic
commit
766f583b6f

+ 49 - 26
src/components/Editor/index.vue

@@ -3,13 +3,16 @@
   <div class="editor">
     <quill-editor
       class="ql-editor"
-      v-model="forms[keyWord]"
-      :ref="myAlias"
+      v-model="form"
+      ref="myAlias"
       :options="editorOption"
+       @blur="onEditorBlur($event)"
+      @focus="onEditorFocus($event)"
       @change="onEditorChange($event)"
     ></quill-editor>
 
     <el-upload
+    ref='ivuUpload'
       class="ivu-upload"
       :show-file-list="false"
       :headers="headers"
@@ -126,7 +129,7 @@ const toolbarOptions = [
   [{ script: "sub" }, { script: "super" }], // 上标/下标
   [{ indent: "-1" }, { indent: "+1" }], // 缩进
   // [{'direction': 'rtl'}],                         // 文本方向
-  [{ size: ["small", 'middle', "large", "huge"] }], // 字体大小
+  [{ size: ["small", "middle", "large", "huge"] }], // 字体大小
   [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
   [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
   [{ font: [] }], // 字体种类
@@ -169,12 +172,13 @@ let that;
 export default {
   // props: ["form",'key'],
   props: {
+    id:'',
     keyWord: {
       type: String,
       default: "content",
     },
     form: {
-      type: Object,
+      type: String,
     },
     alias: {
       type: String,
@@ -209,20 +213,24 @@ export default {
           toolbar: {
             container: toolbarOptions,
             handlers: {
-              image: function (value) {
+              image: (value) => {
                 if (value) {
                   // 调用iview图片上传
-                  document.querySelector(".ivu-upload .el-upload").click();
+                  let editor = this.editor;
+                  // this.ActiveEditor = this.editor
+                  this.editorIndex = editor.getSelection()?.index || 0;
+                 ;
+                 this.$refs.ivuUpload.$children[0].$refs.input.click()
                 } else {
                   this.quill.format("image", false);
                 }
               },
-              video:(value)=> {
+              video: (value) => {
                 if (value) {
                   this.dialogFormVisible = true;
-                  let editor = this.$refs[this.myAlias].quill;
+                  let editor = this.editor;
+                  // this.ActiveEditor = this.editor
                   // 光标所在位置
-                  console.log(editor, editor.getSelection(), this.myAlias);
                   this.editorIndex = editor.getSelection()?.index || 0;
                 } else {
                   this.quill.format("image", false);
@@ -232,17 +240,29 @@ export default {
           },
         },
       },
+      ActiveEditor: null,
     };
   },
-  created() {
-
-  },
+  created() {},
   mounted() {
+    that = this
     // console.log(this.form);\
   },
   methods: {
+     onEditorBlur({ quill, html, text }) {
+      //失去焦点事件
+      // console.log('失去焦点');
+    },
+    onEditorFocus($event) {
+      console.log($event,this.id)
+      this.ActiveEditor = $event;
+
+      //获得焦点事件
+      // console.log('获得焦点事件');
+    },
     onEditorChange({ quill, html, text }) {
-      this.form[this.keyWord] = html;
+      this.$emit("onEditorChange", html);
+      // this.form = html;
     },
     onVideoComfirm(formName) {
       this.$refs[formName].validate((valid) => {
@@ -258,7 +278,6 @@ export default {
           };
           quill.insertEmbed(this.editorIndex, "video", params);
           // 调整光标到最后
-          console.log(this.editorIndex);
           quill.setSelection(this.editorIndex + 1, { preload: false });
 
           this.dialogFormVisible = false;
@@ -274,11 +293,14 @@ export default {
     },
     handleSuccess(res) {
       // 获取富文本组件实例
-      let quill = this.editor;
+      let quill =  this.ActiveEditor;
+      // 光标所在位置
       // 如果上传成功
+      console.log(quill,this.id)
+      // return;
       if (res.code) {
         // 获取光标所在位置
-        let length = quill.getSelection().index;
+        let length = quill.getSelection().index || 0;
         // 插入图片,res为服务器返回的图片链接地址
         quill.insertEmbed(length, "image", res.data.url);
         // 调整光标到最后
@@ -334,9 +356,9 @@ export default {
       }
       return isImage && isLt2M;
     },
-    handleAvatarSuccess(res, file) {
-      this.form.coverImage = res.data.url;
-    },
+    // handleAvatarSuccess(res, file) {
+    //   this.form.coverImage = res.data.url;
+    // },
     beforeAvatarUpload(file) {
       const imageType = {
         "image/png": true,
@@ -381,14 +403,12 @@ export default {
   },
   computed: {
     editor() {
-      return this.$refs[this.myAlias].quill;
-    },
-    forms() {
-      return this.form;
-    },
-    myAlias() {
-      return this.alias;
+      return this.$refs.myAlias.quill;
     },
+    ActiveEditors(){
+      console.log(this.id)
+      return this.ActiveEditor
+    }
   },
 };
 </script>
@@ -402,5 +422,8 @@ export default {
 /deep/.ql-container .ql-editor {
   max-height: 500px;
 }
+/deep/.ql-snow .ql-editor img {
+  max-width: 95%;
+}
 </style>
 

+ 35 - 4
src/layout/components/AppMain.vue

@@ -62,6 +62,7 @@
               v-model="form.search"
               placeholder="请输入菜单名"
               clearable
+              @clear="getMUal()"
             ></el-input>
           </el-form-item>
           <el-form-item>
@@ -94,7 +95,14 @@
       <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
         <el-tab-pane label="操作流程" name="first">
           <div class="optionWrap">
-            <div  class="ql-editor" v-html="activeRow.opFlow"></div>
+            <el-image
+              ref="previewImg"
+              class="previewImg"
+              :src="activeImg"
+              :preview-src-list="[activeImg]"
+              style="display: none"
+            ></el-image>
+            <div class="ql-editor" v-html="activeRow.opFlow"></div>
           </div>
         </el-tab-pane>
         <el-tab-pane label="功能规则" name="second">
@@ -109,7 +117,7 @@
 
 <script>
 import notKeepAliveList from "@/router/notKeepAliveList";
-import serviceRemind from '@/components/serviceRemind' // 续费弹窗
+import serviceRemind from "@/components/serviceRemind"; // 续费弹窗
 import { permission } from "@/utils/directivePage";
 import { guideList } from "@/constant/guide";
 import {
@@ -133,6 +141,7 @@ export default {
       activeName: "first",
       allIdList: [],
       isShow: false,
+      activeImg: null,
     };
   },
   components: { serviceRemind },
@@ -154,7 +163,6 @@ export default {
     },
   },
   async mounted() {
-
     this.$bus.$on("showguide", (obj) => {
       this.guideList = [];
       obj.forEach((element) => {
@@ -212,23 +220,38 @@ export default {
       console.log(row);
       this.activeRow = row;
       this.innerDrawer = true;
+      this.$nextTick((res) => {
+        Array.from(document.querySelectorAll("img")).forEach((img) => {
+          img.addEventListener("click", this.previewImg, true);
+        });
+      });
     },
     handleClick(val) {
       this.activeName = val.name;
     },
+    previewImg(data) {
+      let imgSrc = data.target.getAttribute("src");
+      this.activeImg = imgSrc;
+      this.$refs.previewImg.clickHandler();
+    },
   },
   watch: {
     innerDrawer(val) {
       if (!val) {
         this.activeName = "first";
       }
-    }
+    },
   },
 };
 </script>
 <style lang="scss" scoped>
+.previewImg {
+
+}
 /deep/.el-drawer__header {
   margin-bottom: 0px;
+  color: #000;
+  font-weight: bold;
 }
 .innerDrawer {
   .submitTitle {
@@ -243,9 +266,11 @@ export default {
     padding: 10px 8px;
     /deep/img {
       width: 100%;
+      cursor: pointer;
     }
     /deep/ p {
       line-height: 28px;
+      font-size: 14px !important;
     }
     /deep/.ql-video {
       width: 100%;
@@ -289,8 +314,11 @@ export default {
     }
   }
 }
+
+/*设置字体的大小*/
 </style>
 <style scoped>
+
 .app-main {
   /*50 = navbar  */
   /* height: calc(100vh - 80px); */
@@ -315,4 +343,7 @@ export default {
     // padding-right: 15px;
   }
 }
+.el-image-viewer__close {
+    display: none!important;
+  }
 </style>

+ 21 - 16
src/views/baseRulesManager/components/otherRules.vue

@@ -14,6 +14,24 @@
 
         <el-row>
           <el-form-item
+            prop="91"
+            :rules="[
+              {
+                required: false,
+                pattern:
+                  /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                message: '请输入正确的人数',
+              },
+            ]"
+          >
+            基本课酬:
+            <el-input v-model="form['91']" placeholder="请输入金额">
+              <template slot="append">元</template>
+            </el-input>
+          </el-form-item>
+        </el-row>
+        <el-row>
+          <el-form-item
             prop="73"
             :rules="[
               {
@@ -25,7 +43,7 @@
             ]"
           >
             全职资源公摊金额:
-            <el-input v-model="form['73']"  placeholder="请输入金额">
+            <el-input v-model="form['73']" placeholder="请输入金额">
               <template slot="append">元</template>
             </el-input>
           </el-form-item>
@@ -99,7 +117,6 @@
             <el-input
               class="marginLR5"
               v-model="form['115']"
-
               placeholder="请输入编号"
               style="width: 180px"
             />
@@ -115,7 +132,6 @@
               format="yyyy-MM-dd HH:mm:ss"
               value-format="yyyy-MM-dd HH:mm:ss"
               placeholder="选择开始日期"
-
             >
             </el-date-picker>
           </el-form-item>
@@ -130,7 +146,6 @@
               format="yyyy-MM-dd HH:mm:ss"
               value-format="yyyy-MM-dd HH:mm:ss"
               placeholder="选择开始日期"
-
             >
             </el-date-picker>
           </el-form-item>
@@ -168,11 +183,7 @@
             ]"
           >
             云教室可提前:
-            <el-input
-              v-model="form['61']"
-              placeholder="请输入分钟数"
-
-            >
+            <el-input v-model="form['61']" placeholder="请输入分钟数">
               <template slot="append">分钟</template>
             </el-input>
             进入教室。
@@ -190,11 +201,7 @@
             ]"
           >
             课程结束后:
-            <el-input
-              v-model="form['60']"
-              placeholder="请输入分钟数"
-
-            >
+            <el-input v-model="form['60']" placeholder="请输入分钟数">
               <template slot="append">分钟</template>
             </el-input>
             网络教室自动关闭。
@@ -202,7 +209,6 @@
         </el-row>
       </el-form>
       <el-button
-
         type="primary"
         @click="save"
         class="saveBtn"
@@ -211,7 +217,6 @@
         >保存</el-button
       >
       <el-button
-
         type="primary"
         @click="save"
         class="saveBtn"

+ 14 - 12
src/views/categroyManager/specialSetup/branchSetting.vue

@@ -341,9 +341,9 @@ export default {
         };
 
         if (this.formActionTitle == "create") {
-          if (this.form.id) {
+          if (obj.id) {
             // 判断有没有Id,如果有则删除
-            delete this.form.id;
+            delete obj.id;
           }
           branchAdd(obj).then((res) => {
             this.messageTips("添加", res);
@@ -410,16 +410,18 @@ export default {
     async onBranchOperation(type, row) {
       // 修改分部信息
       // employeeFindEmployeeByRole
-      try {
-        const res = await queryEmployByOrganId({
-          organId: row.id,
-          rows: 9999,
-          demissionflag: false,
-          lockFlag: false,
-        });
-        this.$set(this, "employeeList", res.data.rows);
-      } catch (e) {
-        console.log(e);
+      if (row) {
+        try {
+          const res = await queryEmployByOrganId({
+            organId: row.id,
+            rows: 9999,
+            demissionflag: false,
+            lockFlag: false,
+          });
+          this.$set(this, "employeeList", res.data.rows);
+        } catch (e) {
+          console.log(e);
+        }
       }
       this.formActionTitle = type;
 

+ 2 - 2
src/views/courseRulersManager/components/serverMinitor.vue

@@ -2,7 +2,7 @@
   <div class="m-container">
     <div class="m-core">
       <el-form :inline="true" :model="form" ref="form">
-        <el-alert
+        <!-- <el-alert
           style="margin: 10px 0"
           title="财务规则"
           :closable="false"
@@ -26,7 +26,7 @@
               <template slot="append">元</template>
             </el-input>
           </el-form-item>
-        </el-row>
+        </el-row> -->
         <el-alert
           style="margin: 10px 0"
           title="课后服务异常提醒设置"

+ 1 - 25
src/views/courseRulersManager/components/studentAttRules.vue

@@ -2,31 +2,7 @@
   <div class="m-container">
     <div class="m-core">
       <el-form :inline="true" :model="form" ref="form">
-        <el-alert
-          style="margin: 10px 0"
-          title="财务规则"
-          :closable="false"
-          type="info"
-        >
-        </el-alert>
-        <el-row>
-          <el-form-item
-            prop="123"
-            :rules="[
-              {
-                required: false,
-                pattern:
-                  /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
-                message: '请输入正确的人数',
-              },
-            ]"
-          >
-            基本课酬:
-            <el-input v-model="form['123']" placeholder="请输入金额">
-              <template slot="append">元</template>
-            </el-input>
-          </el-form-item>
-        </el-row>
+
         <el-alert
           style="margin: 10px 0"
           title="学员请假规则设置"

+ 12 - 5
src/views/operationManual/modals/manualSet.vue

@@ -44,7 +44,7 @@
           },
         ]"
       >
-        <Editor :form="form" alias="Editor1" ref="opFlow" :keyWord="'opFlow'" class="Editor" />
+        <Editor :form="form.opFlow" id='Editor1' alias="Editor1" ref="opFlow" :keyWord="'opFlow'" class="Editor" @onEditorChange='onEditorChange'/>
       </el-form-item>
       <el-form-item
         label="功能规则"
@@ -56,12 +56,14 @@
           },
         ]"
       >
-        <Editor1
+        <Editor
+        id='Editor2'
         class="Editor"
-          :form="form"
+          :form="form.funRule"
           alias="Editor2"
           ref="funRule"
           :keyWord="'funRule'"
+          @onEditorChange='onEditorChange1'
         />
       </el-form-item>
     </el-form>
@@ -73,11 +75,10 @@
 </template>
 <script>
 const Editor = () => import("@/components/Editor");
-const Editor1 = () => import("@/components/Editor");
+
 export default {
   components: {
     Editor,
-    Editor1,
   },
   props: ["silderList", "form"],
   data() {
@@ -96,6 +97,12 @@ export default {
     changeCategor(e) {
       this.$refs.myCascader.dropDownVisible = false;
     },
+    onEditorChange(val){
+      this.$set(this.form,'opFlow',val)
+    },
+    onEditorChange1(val){
+       this.$set(this.form,'funRule',val)
+    }
   },
 };
 </script>

+ 2 - 2
src/views/platformManager/platformCourseDeault/index.vue

@@ -56,14 +56,14 @@
         >
           <serverMinitor :isPlatform='true'  v-if="activeIndex==6"/>
         </el-tab-pane>
-        <el-tab-pane
+        <!-- <el-tab-pane
           label="网管&试听课规则"
           lazy
           name="7"
             v-if="permission('/platformAccompanyBaseConfig')"
         >
           <accompanyBaseConfig :isPlatform='true' v-if="activeIndex==7"/>
-        </el-tab-pane>
+        </el-tab-pane> -->
       </tab-router>
     </div>
   </div>

+ 2 - 1
src/views/studentManager/memberList.vue

@@ -54,6 +54,7 @@
             <el-option label="已过期" value="0"></el-option>
             <el-option label="即将过期" value="1"></el-option>
             <el-option label="待生效" value="2"></el-option>
+            <el-option label="生效中" value="3"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item prop="visitTime">
@@ -464,7 +465,7 @@ export default {
   },
   filters:{
     hasMemberFilter(val){
-    const arr =  ['已过期','即将过期','待生效']
+    const arr =  ['已过期','即将过期','待生效','生效中']
     return arr[val]
     }
   }