WXL (wul)
2026-05-07 ecbcc059d43f64877551756de129c653d31d0032
src/views/knowledge/education/index.vue
@@ -1,6 +1,5 @@
<template>
  <div class="educationmanagement">
    <!-- 左侧栏 -->
    <div class="sidecolumn">
      <div class="sidecolumn-top">
@@ -596,7 +595,7 @@
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        hetype:1,
        hetype: 1,
        isavailable: "",
      },
    };
@@ -784,11 +783,11 @@
        query: { id: row.id },
      });
    },
         Newcategory(){
      this.classifyform= {}, //类别表单
      this.radio = "主分类";
     this.dialogFormVisible = true
     this.zifon = true;
    Newcategory() {
      (this.classifyform = {}), //类别表单
        (this.radio = "主分类");
      this.dialogFormVisible = true;
      this.zifon = true;
      this.zufon = true;
    },
    // 查看宣教
@@ -800,9 +799,8 @@
        .then((response) => {
          console.log(response.data, "数据"); // 输出获取到的文件内容
          this.htmlRichText = response.data;
          // this.htmlRichText = this.addStyleToImages(this.htmlRichText);
          console.log(this.htmlRichText);
          this.htmlRichText = this.addStyleToImages(this.htmlRichText);
          // console.log(this.htmlRichText);
        })
        .catch((error) => {
          this.$modal.msgError("获取富文本失败");
@@ -810,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;
    },
    /** 删除按钮操作 */
@@ -832,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) => {
@@ -865,7 +874,7 @@
    },
    // 查询树
    getDeptTree() {
      getheLibraryAssort({ hetype: 2 }).then((res) => {
      getheLibraryAssort({ hetype: 1 }).then((res) => {
        this.deptOptions = res.rows;
        this.dialogFormVisible = false;
      });