| | |
| | | "@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", |
| | |
| | | "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", |
| | |
| | | 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"; |
| | |
| | | }, |
| | | 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() { |
| | |
| | | } |
| | | |
| | | 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, { |
| | |
| | | linebreaks: true, |
| | | }); |
| | | |
| | | // const parser = new AngularParser(); |
| | | // doc.setOptions({ parser }); |
| | | |
| | | |
| | | // 设置模板中的占位符数据 |
| | | doc.setData(data); |
| | |
| | | <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" |
| | |
| | | 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 { |
| | | 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 { |