zhouwx
4 天以前 56c9b08d1c1c978ee3933d074b4d020026686915
修改
已修改7个文件
43 ■■■■ 文件已修改
package.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/tableCompanyExample.docx 补丁 | 查看 | 原始文档 | blame | 历史
public/tableDeptExample.docx 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Tinymce/Tinymce.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/exportWord.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityObjectives/objective/components/objectiveDialog.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/build/conpanyFunctionConsult/qualityObjectives/table/index.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -22,9 +22,10 @@
    "@wangeditor/editor": "^5.1.18",
    "@wangeditor/editor-for-vue": "^5.1.12",
    "@wangeditor/plugin-upload-attachment": "^1.1.0",
    "angular-expressions": "^1.5.0",
    "axios": "0.27.2",
    "docx-preview": "^0.3.5",
    "docxtemplater": "^3.63.2",
    "docxtemplater": "^3.65.1",
    "docxtemplater-image-module-free": "^1.1.1",
    "echarts": "5.4.0",
    "element-plus": "2.2.27",
@@ -38,10 +39,11 @@
    "moment": "^2.30.1",
    "nprogress": "0.2.0",
    "pinia": "2.0.22",
    "pizzip": "^3.2.0",
    "pizzip": "^3.1.0",
    "quill": "^2.0.0-dev.3",
    "spark-md5": "^3.0.2",
    "tinymce": "^5.10.2",
    "tinymce-paragraphspacing": "^1.0.1",
    "video.js": "^8.12.0",
    "vue": "3.2.45",
    "vue-cropper": "1.0.3",
public/tableCompanyExample.docx
Binary files differ
public/tableDeptExample.docx
Binary files differ
src/components/Tinymce/Tinymce.vue
@@ -12,6 +12,7 @@
import tinymce from "tinymce/tinymce";
import Editor from "@tinymce/tinymce-vue";
import { upload } from "@/api/backManage/notice";
import 'tinymce-paragraphspacing'
import "tinymce/themes/silver";
import "tinymce/themes/silver/theme";
import "tinymce/icons/default/icons";
@@ -46,11 +47,11 @@
        },
        plugins: {
            type: [String, Array],
            default: "upfile lists image table  wordcount  fullscreen  "
            default: " paragraphspacing upfile lists image  table  wordcount  fullscreen  "
        },
        toolbar: {
            type: [String, Array],
            default: " styleselect fontsizeselect | undo redo |  upfile image  bold italic | fontselect |alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | lists  insertfile  table | removeformat fullscreen  "
            default: " styleselect fontsizeselect paragraphspacing  |  upfile image  bold italic | fontselect   |alignleft aligncenter alignright alignjustify | bullist numlist outdent indent |  undo redo | lists  insertfile  table | removeformat fullscreen  "
        }
    },
    data() {
src/utils/exportWord.js
@@ -23,6 +23,22 @@
            }
            try {
                // 新版创建解析器的正确方式(无需 import AngularParser)
                const parser = (tag, _variable) => {
                    return {
                        get(scope) {
                            if (scope[tag] !== undefined) {
                                return scope[tag] || '';
                            }
                            // 处理特殊变量(如 $first)
                            if (tag.startsWith('$')) {
                                const varName = tag.slice(1);
                                return scope[varName] || '';
                            }
                            return '';
                        }
                    };
                };
                // 加载模板文件内容到 PizZip
                const zip = new PizZip(content);
                const doc = new Docxtemplater(zip, {
@@ -30,6 +46,9 @@
                    linebreaks: true,
                });
                // const parser = new AngularParser();
                // doc.setOptions({ parser });
                // 设置模板中的占位符数据
                doc.setData(data);
src/views/build/conpanyFunctionConsult/qualityObjectives/objective/components/objectiveDialog.vue
@@ -77,7 +77,7 @@
              <el-input  v-model="state.form.companyName" disabled></el-input>
            </el-form-item>
            <el-form-item  label="部门名称:" prop="departId" v-else-if="state.form.type == 2">
<!--              <el-cascader v-model="state.form.departId" :options="state.deptList"  />-->
<!--              <el-cascader v-model="state.form.departId" :disabled="title === '查看'" :options="state.deptList"  />-->
              <el-select
                  :disabled="title === '查看'"
                  v-model="state.form.departId"
src/views/build/conpanyFunctionConsult/qualityObjectives/table/index.vue
@@ -340,12 +340,17 @@
    const year = now.getFullYear()
    const month = (now.getMonth() +1).toString().padStart(2, '0');
    item.nowDate = year + '-' + month
    console.log('item.qualityTargets',item.qualityTargets)
    item.tableData = item.qualityTargets.map((i,index) => {
      return {
        ...i,
        nuum: index+1,
        nuumRowSpan:`${i.qualityTargetMesses.length}cm`,
        messageRowSpan:`${i.qualityTargetMesses.length}cm`,
        qualityTargetMesses: i.qualityTargetMesses.map((q,qindex) => {
          return{
            ...q,
            first: qindex == 0,
            nuum: index+1
          }
        })
      }
    })
    try {