WXL (wul)
2026-05-08 f9902f7a3b79d22bde9f199263ac36de26816470
src/views/knowledge/education/index.vue
@@ -1,11 +1,10 @@
<template>
  <div class="educationmanagement">
    <!-- 左侧栏 -->
    <div class="sidecolumn">
      <div class="sidecolumn-top">
        <div class="top-wj">宣教类型</div>
        <div class="top-tj" @click="dialogFormVisible = true">+添加类别</div>
        <div class="top-tj" @click="Newcategory">+添加类别</div>
      </div>
      <div class="center-ss">
        <el-input
@@ -596,6 +595,7 @@
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        hetype: 1,
        isavailable: "",
      },
    };
@@ -783,6 +783,13 @@
        query: { id: row.id },
      });
    },
    Newcategory() {
      (this.classifyform = {}), //类别表单
        (this.radio = "主分类");
      this.dialogFormVisible = true;
      this.zifon = true;
      this.zufon = true;
    },
    // 查看宣教
    Vieweducation(row) {
      this.htmlRichText = null;
@@ -793,6 +800,7 @@
          console.log(response.data, "数据"); // 输出获取到的文件内容
          this.htmlRichText = response.data;
          this.htmlRichText = this.addStyleToImages(this.htmlRichText);
          // console.log(this.htmlRichText);
        })
        .catch((error) => {
          this.$modal.msgError("获取富文本失败");
@@ -800,10 +808,21 @@
        });
    },
    addStyleToImages(html) {
      return html.replace(
      if (!html) return html;
      // 1. 先修复路径
      let processedHtml = html.replace(
        /\/aifollowup\/aifollowup\//g,
        "/aifollowup/"
      );
      // 2. 再修复样式
      processedHtml = processedHtml.replace(
        /<img([^>]*)style=(['"])(?:(?!\2).)*\2([^>]*)>/g,
        '<img$1style="width:100%;height:auto;"$3>'
      );
      return processedHtml;
    },
    /** 删除按钮操作 */
@@ -822,8 +841,8 @@
    },
    // 打开统计图表
    statistics() {
      this.Collarrname=[];
      this.Collarrvalue=[];
      this.Collarrname = [];
      this.Collarrvalue = [];
      //取数据
      let obj = { assortid: 13, isavailable: "", pageNum: 1, pageSize: 20 };
      getlibrarylist(obj).then((response) => {
@@ -855,7 +874,7 @@
    },
    // 查询树
    getDeptTree() {
      getheLibraryAssort({}).then((res) => {
      getheLibraryAssort({ hetype: 1 }).then((res) => {
        this.deptOptions = res.rows;
        this.dialogFormVisible = false;
      });
@@ -930,8 +949,12 @@
      this.dialogFormVisible = true;
      if (!b.pid) {
        this.radio = "主分类";
        this.title = "修改主分类";
        this.zufon = false;
      } else {
        this.radio = "子分类";
        this.title = "修改子分类";
        this.zifon = false;
      }
      this.classifyform = b;
      this.dialogFormVisible = true;