|
@@ -49,60 +49,60 @@ function MakerSpaceWord(data,fund){
|
|
|
let direct = JSON.parse(item['directFund']);
|
|
|
//间接经费
|
|
|
let indirect = JSON.parse(item['indirectFund']);
|
|
|
-
|
|
|
+
|
|
|
direct.forEach(item2=>{
|
|
|
if (item2['directFundData']==1) {
|
|
|
fundData['device'] = direct.filter(item=>item['directFundData']==1)[0]['budget'];
|
|
|
// console.log(fundData['device']);
|
|
|
fundData['deviceRemarks'] = direct.filter(item=>item['directFundData']==1)[0]['reason'];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (item2['directFundData']==2) {
|
|
|
fundData['Material'] = direct.filter(item=>item['directFundData']==2)[0]['budget']
|
|
|
fundData['MaterialRemarks'] = direct.filter(item=>item['directFundData']==2)[0]['reason'];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (item2['directFundData']==3) {
|
|
|
fundData['processing'] = direct.filter(item=>item['directFundData']==3)[0]['budget']
|
|
|
fundData['processingRemarks'] = direct.filter(item=>item['directFundData']==3)[0]['reason'];
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
if (item2['directFundData']==4) {
|
|
|
fundData['Collaboration'] = direct.filter(item=>item['directFundData']==4)[0]['budget']
|
|
|
fundData['CollaborationRemarks'] = direct.filter(item=>item['directFundData']==4)[0]['reason'];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
indirect.forEach(item3=>{
|
|
|
if (item3['indirectFundData']==1) {
|
|
|
fundData['APPRAISAL'] = indirect.filter(item=>item['indirectFundData']==1)[0]['budget']
|
|
|
fundData['APPRAISALRemarks'] = indirect.filter(item=>item['indirectFundData']==1)[0]['reason'];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (item3['indirectFundData']==2) {
|
|
|
fundData['entery'] = indirect.filter(item=>item['indirectFundData']==2)[0]['budget']
|
|
|
fundData['enteryRemarks'] = indirect.filter(item=>item['indirectFundData']==2)[0]['reason'];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (item3['indirectFundData']==3) {
|
|
|
fundData['activities'] = indirect.filter(item=>item['indirectFundData']==3)[0]['budget']
|
|
|
fundData['activitiesRemarks'] = indirect.filter(item=>item['indirectFundData']==3)[0]['reason'];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (item3['indirectFundData']==4) {
|
|
|
fundData['Transaction'] = indirect.filter(item=>item['indirectFundData']==4)[0]['budget']
|
|
|
fundData['TransactionRemarks'] = indirect.filter(item=>item['indirectFundData']==4)[0]['reason'];
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
fundData['total'] = Number(fundData['device'])+Number(fundData['Material'])+Number(fundData['processing'])+Number(fundData['Collaboration'])+Number(fundData['APPRAISAL'])+Number(fundData['entery'])+Number(fundData['activities'])+Number(fundData['Transaction']);
|
|
|
-
|
|
|
+
|
|
|
fundDataArray.push(fundData);
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
//去除标签
|
|
|
for(let i in data['chapters']){
|
|
|
data['chapters'][i]=data['chapters'][i].replace(/<[^>]+>/g,"");
|
|
@@ -138,14 +138,14 @@ function MakerSpaceWord(data,fund){
|
|
|
Transforming:data['chapters']['Transforming'],//学生创客团队孵化、转化创业项目情况
|
|
|
condition:data['chapters']['condition'],//立 项基 础及条 件
|
|
|
fund:fundDataArray,//预算经费
|
|
|
- //total:总经费
|
|
|
+ //total:总经费
|
|
|
//小型仪器设备费:device deviceRemarks
|
|
|
//材料费:Material MaterialRemarks
|
|
|
- //测试化验加工费:processing processingRemarks
|
|
|
- //项目协作费:Collaboration CollaborationRemarks
|
|
|
- //项目成果鉴定费:APPRAISAL APPRAISALRemarks
|
|
|
- //参展参赛费:entery enteryRemarks
|
|
|
- //创客交流活动费:activities activitiesRemarks
|
|
|
+ //成果鉴定与认证费:processing processingRemarks
|
|
|
+ //专家咨询与评审费:Collaboration CollaborationRemarks
|
|
|
+ //论文版面费:APPRAISAL APPRAISALRemarks
|
|
|
+ //测试与外协加工费:entery enteryRemarks
|
|
|
+ //创客交流与调研活动报名费:activities activitiesRemarks
|
|
|
//知识产权事务费:Transaction TransactionRemarks
|
|
|
}
|
|
|
//渲染模板
|
|
@@ -217,14 +217,14 @@ function getMakerSpaceWord(wordData){
|
|
|
Transforming:wordData['Transforming'].replace(/(<img src=")([^"]+)(" style="max-width:100%;")\/>/g, '(图片链接:$2)').replace(/<\/?.+?\/?>/g,"").replace(/ /gi,' '),//学生创客团队孵化、转化创业项目情况
|
|
|
condition:wordData['condition'].replace(/(<img src=")([^"]+)(" style="max-width:100%;")\/>/g, '(图片链接:$2)').replace(/<\/?.+?\/?>/g,"").replace(/ /gi,' '),//立 项基 础及条 件
|
|
|
fund:[wordData['fund']],//预算经费
|
|
|
- //total:总经费
|
|
|
+ //total:总经费
|
|
|
//小型仪器设备费:device deviceRemarks
|
|
|
//材料费:Material MaterialRemarks
|
|
|
- //测试化验加工费:processing processingRemarks
|
|
|
- //项目协作费:Collaboration CollaborationRemarks
|
|
|
- //项目成果鉴定费:APPRAISAL APPRAISALRemarks
|
|
|
- //参展参赛费:entery enteryRemarks
|
|
|
- //创客交流活动费:activities activitiesRemarks
|
|
|
+ //成果鉴定与认证费:processing processingRemarks
|
|
|
+ //专家咨询与评审费:Collaboration CollaborationRemarks
|
|
|
+ //论文版面费:APPRAISAL APPRAISALRemarks
|
|
|
+ //测试与外协加工费:entery enteryRemarks
|
|
|
+ //创客交流与调研活动报名费:activities activitiesRemarks
|
|
|
//知识产权事务费:Transaction TransactionRemarks
|
|
|
}
|
|
|
//渲染模板
|
|
@@ -298,65 +298,65 @@ function MakerStudentWord(data,fund){
|
|
|
let direct = JSON.parse(item['directFund']);
|
|
|
//间接经费
|
|
|
let indirect = JSON.parse(item['indirectFund']);
|
|
|
-
|
|
|
+
|
|
|
direct.forEach(item2=>{
|
|
|
if (item2['directFundData']==1) {
|
|
|
fundData['device'] = direct.filter(item=>item['directFundData']==1)[0]['budget'];
|
|
|
// console.log(fundData['device']);
|
|
|
fundData['deviceRemarks'] = direct.filter(item=>item['directFundData']==1)[0]['reason'];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (item2['directFundData']==2) {
|
|
|
fundData['Material'] = direct.filter(item=>item['directFundData']==2)[0]['budget']
|
|
|
fundData['MaterialRemarks'] = direct.filter(item=>item['directFundData']==2)[0]['reason'];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (item2['directFundData']==3) {
|
|
|
fundData['processing'] = direct.filter(item=>item['directFundData']==3)[0]['budget']
|
|
|
fundData['processingRemarks'] = direct.filter(item=>item['directFundData']==3)[0]['reason'];
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
if (item2['directFundData']==4) {
|
|
|
fundData['Collaboration'] = direct.filter(item=>item['directFundData']==4)[0]['budget']
|
|
|
fundData['CollaborationRemarks'] = direct.filter(item=>item['directFundData']==4)[0]['reason'];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
indirect.forEach(item3=>{
|
|
|
if (item3['indirectFundData']==1) {
|
|
|
fundData['APPRAISAL'] = indirect.filter(item=>item['indirectFundData']==1)[0]['budget']
|
|
|
fundData['APPRAISALRemarks'] = indirect.filter(item=>item['indirectFundData']==1)[0]['reason'];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (item3['indirectFundData']==2) {
|
|
|
fundData['entery'] = indirect.filter(item=>item['indirectFundData']==2)[0]['budget']
|
|
|
fundData['enteryRemarks'] = indirect.filter(item=>item['indirectFundData']==2)[0]['reason'];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (item3['indirectFundData']==3) {
|
|
|
fundData['activities'] = indirect.filter(item=>item['indirectFundData']==3)[0]['budget']
|
|
|
fundData['activitiesRemarks'] = indirect.filter(item=>item['indirectFundData']==3)[0]['reason'];
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (item3['indirectFundData']==4) {
|
|
|
fundData['Transaction'] = indirect.filter(item=>item['indirectFundData']==4)[0]['budget']
|
|
|
fundData['TransactionRemarks'] = indirect.filter(item=>item['indirectFundData']==4)[0]['reason'];
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
fundData['total'] = Number(fundData['device'])+Number(fundData['Material'])+Number(fundData['processing'])+Number(fundData['Collaboration'])+Number(fundData['APPRAISAL'])+Number(fundData['entery'])+Number(fundData['activities'])+Number(fundData['Transaction']);
|
|
|
-
|
|
|
+
|
|
|
fundDataArray.push(fundData);
|
|
|
})
|
|
|
//去除标签
|
|
@@ -387,7 +387,7 @@ function MakerStudentWord(data,fund){
|
|
|
sfour:data['schoolRadio']==4?"√":"□",
|
|
|
|
|
|
stu:data['projectApplyperson']==1?"√":"□", //项目申请人
|
|
|
- leg:data['projectApplyperson']==1?"□":"√",
|
|
|
+ leg:data['projectApplyperson']==1?"□":"√",
|
|
|
|
|
|
appPeason:data['pro_leader'], //申请人姓名
|
|
|
school:data['name'], //所在学院
|
|
@@ -413,19 +413,19 @@ function MakerStudentWord(data,fund){
|
|
|
expectResultsTeacher:data['chapters']['expectResultsTeacher'],
|
|
|
expectConversion:data['chapters']['expectConversion'],
|
|
|
plan:data['chapters']['plan'],
|
|
|
-
|
|
|
+
|
|
|
teacher:data['course_teacher'], //教师组//name:姓名 speciality:专业 title:职称 education:学历 section:所在教研室 work:项目组角色分工
|
|
|
student:data['course_student'], //学生组//name:姓名 class:班级 age:年龄 work:项目组任务分工
|
|
|
-
|
|
|
+
|
|
|
fund:fundDataArray,//预算经费
|
|
|
- //total:总经费
|
|
|
+ //total:总经费
|
|
|
//小型仪器设备费:device deviceRemarks
|
|
|
//材料费:Material MaterialRemarks
|
|
|
- //测试化验加工费:processing processingRemarks
|
|
|
- //项目协作费:Collaboration CollaborationRemarks
|
|
|
- //项目成果鉴定费:APPRAISAL APPRAISALRemarks
|
|
|
- //参展参赛费:entery enteryRemarks
|
|
|
- //创客交流活动费:activities activitiesRemarks
|
|
|
+ //成果鉴定与认证费:processing processingRemarks
|
|
|
+ //专家咨询与评审费:Collaboration CollaborationRemarks
|
|
|
+ //论文版面费:APPRAISAL APPRAISALRemarks
|
|
|
+ //测试与外协加工费:entery enteryRemarks
|
|
|
+ //创客交流与调研活动报名费:activities activitiesRemarks
|
|
|
//知识产权事务费:Transaction TransactionRemarks
|
|
|
}
|
|
|
//渲染模板
|
|
@@ -635,7 +635,7 @@ function ActivityWord(data){
|
|
|
const zip = new PizZip(binary);
|
|
|
// 将模板内容加载到 Docxtemplater 中
|
|
|
const doc = new Docxtemplater().loadZip(zip);
|
|
|
-
|
|
|
+
|
|
|
//处理数据
|
|
|
data['chapters'] = JSON.parse(data['chapters']);
|
|
|
data['begin_at'] = GetTime(data['begin_at'])
|
|
@@ -696,7 +696,7 @@ function makerActivityWord(data,total){
|
|
|
const zip = new PizZip(binary);
|
|
|
// 将模板内容加载到 Docxtemplater 中
|
|
|
const doc = new Docxtemplater().loadZip(zip);
|
|
|
-
|
|
|
+
|
|
|
//模板数据
|
|
|
let wordData = {...data,total}
|
|
|
//处理数据
|
|
@@ -757,4 +757,4 @@ export{
|
|
|
getWord,
|
|
|
makerActivityWord,
|
|
|
getWord2
|
|
|
-}
|
|
|
+}
|