|
@@ -4,6 +4,7 @@ import { getNowDate } from './Date';
|
|
|
import { GetTime } from './Date';
|
|
|
import FileSaver, { saveAs } from 'file-saver';
|
|
|
import JSZipUtils from 'jszip-utils'
|
|
|
+// import {getNowDate} from '@/components/tool/Date.js'
|
|
|
|
|
|
// import HTMLModule from 'docx'
|
|
|
function MakerSpaceWord(data,fund){
|
|
@@ -460,49 +461,52 @@ function getWord(val){
|
|
|
let zip=new PizZip(content);
|
|
|
|
|
|
let doc=new Docxtemplater().loadZip(zip);
|
|
|
- // return console.log(val);
|
|
|
- console.log(val);
|
|
|
+ return console.log(val);
|
|
|
+
|
|
|
+ let studentS=JSON.parse(val.course_student)
|
|
|
+ let teacherS=JSON.parse(val.course_teacher)
|
|
|
+ let introduce=JSON.parse(val.chapters)
|
|
|
+ let multiSelectProject=JSON.parse(val.multiSelectProject)
|
|
|
|
|
|
-
|
|
|
|
|
|
//填写数据
|
|
|
doc.setData({
|
|
|
- nowTime:val.applicationDate,
|
|
|
- projectName:val.projectName,
|
|
|
- ing:val.radio=='1'?'√':'□',
|
|
|
- ed:val.radio=='2'?'√':'□',
|
|
|
- mone:val.checkList.includes('1')?'√':'□',
|
|
|
- mtwo:val.checkList.includes('2')?'√':'□',
|
|
|
- mthree:val.checkList.includes('3')?'√':'□',
|
|
|
- mfour:val.checkList.includes('4')?'√':'□',
|
|
|
- sone:val.schoolRadio.includes('1')?'√':'□',
|
|
|
- stwo:val.schoolRadio.includes('2')?'√':'□',
|
|
|
- sthree:val.schoolRadio.includes('3')?'√':'□',
|
|
|
- sfour:val.schoolRadio.includes('4')?'√':'□',
|
|
|
- stu:val.applyParsonRadio.includes('1')?'√':'□',
|
|
|
- leg:val.applyParsonRadio.includes('2')?'√':'□',
|
|
|
- appPeason:val.applyParsonName,
|
|
|
- school:val.college,
|
|
|
- tel:val.tel,
|
|
|
- begin_at:val.beginTime,
|
|
|
- plannedEnd_at:val.endTime,
|
|
|
- allnum:val.studentS.length+val.teacherS.length,
|
|
|
- snum:val.studentS.length,
|
|
|
- tnum:val.teacherS.length,
|
|
|
- student:val.studentS,
|
|
|
- teacher:val.teacherS,
|
|
|
+ nowTime:getNowDate(1),//申请日期
|
|
|
+ projectName:val.title,
|
|
|
+ ing:val.typeName=='ed917c55-f51d-11ed-a3f6-509a4c5b67cf'?'√':'□',
|
|
|
+ ed:val.typeName=='f3068e26-f51d-11ed-a3f6-509a4c5b67cf'?'√':'□',
|
|
|
+ mone:multiSelectProject.includes('1')?'√':'□',
|
|
|
+ mtwo:multiSelectProject.includes('2')?'√':'□',
|
|
|
+ mthree:multiSelectProject.includes('3')?'√':'□',
|
|
|
+ mfour:multiSelectProject.includes('4')?'√':'□',
|
|
|
+ sone:val.schoolRemould.includes('1')?'√':'□',
|
|
|
+ stwo:val.schoolRemould.includes('2')?'√':'□',
|
|
|
+ sthree:val.schoolRemould.includes('3')?'√':'□',
|
|
|
+ sfour:val.schoolRemould.includes('4')?'√':'□',
|
|
|
+ stu:val.projectApplyperson.includes('1')?'√':'□',
|
|
|
+ leg:val.projectApplyperson.includes('2')?'√':'□',
|
|
|
+ appPeason:val.pro_leader,
|
|
|
+ school:val.name,
|
|
|
+ tel:val.phone,
|
|
|
+ begin_at:val.begin_at,
|
|
|
+ plannedEnd_at:val.plannedEnd_at,
|
|
|
+ allnum:studentS.length+teacherS.length,
|
|
|
+ snum:studentS.length,
|
|
|
+ tnum:teacherS.length,
|
|
|
+ student:studentS,
|
|
|
+ teacher:teacherS,
|
|
|
brief:val.brief,
|
|
|
- back:val.introduce.back,
|
|
|
- innovate:val.introduce.innovate,
|
|
|
- path:val.introduce.path,
|
|
|
- scene:val.introduce.scene,
|
|
|
- worth:val.introduce.worth,
|
|
|
- team:val.introduce.team,
|
|
|
- cost:val.introduce.cost,
|
|
|
- expectResults:val.introduce.expectResults,
|
|
|
- expectResultsTeacher:val.introduce.expectResultsTeacher,
|
|
|
- expectConversion:val.introduce.expectConversion,
|
|
|
- plan:val.introduce.plan,
|
|
|
+ back:introduce.back,
|
|
|
+ innovate:introduce.innovate,
|
|
|
+ path:introduce.path,
|
|
|
+ scene:introduce.scene,
|
|
|
+ worth:introduce.worth,
|
|
|
+ team:introduce.team,
|
|
|
+ cost:introduce.cost,
|
|
|
+ expectResults:introduce.expectResults,
|
|
|
+ expectResultsTeacher:introduce.expectResultsTeacher,
|
|
|
+ expectConversion:introduce.expectConversion,
|
|
|
+ plan:introduce.plan,
|
|
|
total:val.total,
|
|
|
facility:val.fund.facility,
|
|
|
materials:val.fund.materials,
|