yuanyiming 1 jaar geleden
bovenliggende
commit
9912014f44

BIN
public/file/2023年二级学院特色创客空间建设项目申报书模板 (2).docx


+ 8 - 8
src/components/tool/getWord.js

@@ -208,14 +208,14 @@ function getMakerSpaceWord(wordData){
                 teacher:wordData['teacher'],   //教师组//name:姓名  speciality:专业  title:职称 education:学历    section:所在教研室    work:项目组角色分工
                 student:wordData['student'],   //学生组//name:姓名    class:班级 age:年龄   work:项目组任务分工
                 brief:wordData['brief'],//项目简介
-                Construction:wordData['Construction'],//建设内容
-                ProjectBasis:wordData['ProjectBasis'],//立项依据
-                development:wordData['development'],//创客空间物理环境、制度建设及软件设施建设情况
-                studio:wordData['studio'],//学生创客工作室建设情况
-                studentTeam:wordData['studentTeam'],//学生创客团队(人才)培养预期成果、数量
-                studentActivities:wordData['studentActivities'],//学生创客活动组织实施情况
-                Transforming:wordData['Transforming'],//学生创客团队孵化、转化创业项目情况
-                condition:wordData['condition'],//立 项基 础及条 件
+                Construction:wordData['Construction'].replace(/<\/?.+?\/?>/g,"").replace(/&nbsp;/gi,' '),//建设内容
+                ProjectBasis:wordData['ProjectBasis'].replace(/<\/?.+?\/?>/g,"").replace(/&nbsp;/gi,' '),//立项依据
+                development:wordData['development'].replace(/<\/?.+?\/?>/g,"").replace(/&nbsp;/gi,' '),//创客空间物理环境、制度建设及软件设施建设情况
+                studio:wordData['studio'].replace(/<\/?.+?\/?>/g,"").replace(/&nbsp;/gi,' '),//学生创客工作室建设情况
+                studentTeam:wordData['studentTeam'].replace(/<\/?.+?\/?>/g,"").replace(/&nbsp;/gi,' '),//学生创客团队(人才)培养预期成果、数量
+                studentActivities:wordData['studentActivities'].replace(/<\/?.+?\/?>/g,"").replace(/&nbsp;/gi,' '),//学生创客活动组织实施情况
+                Transforming:wordData['Transforming'].replace(/<\/?.+?\/?>/g,"").replace(/&nbsp;/gi,' '),//学生创客团队孵化、转化创业项目情况
+                condition:wordData['condition'].replace(/<\/?.+?\/?>/g,"").replace(/&nbsp;/gi,' '),//立 项基 础及条 件
                 fund:[wordData['fund']],//预算经费
                     //total:总经费     
                     //小型仪器设备费:device        deviceRemarks

+ 38 - 10
src/views/projectApply/components/MakerSpaceWordDetail.vue

@@ -7,7 +7,12 @@
       v-if="state != 0 || downloadDig"
     />
     <div>
-      <el-button type="primary" @click="downloadDig = true">下载表格</el-button>
+      <el-button type="primary" @click="downWordDig = true"
+        >下载表格(word)</el-button
+      >
+      <el-button type="primary" @click="downloadDig = true"
+        >下载表格(pdf)</el-button
+      >
       <el-button type="primary" @click="test" v-if="state == 0"
         >立即修改</el-button
       >
@@ -37,6 +42,24 @@
       :visible.sync="downloadDig"
       width="600px"
       class="pageSubmitData"
+    >
+      <div class="deleteContent">确定下载文档?</div>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="getPdf" class="AllDialogBtn"
+          >确认</el-button
+        >
+        <el-button @click="downloadDig = false" class="AllDialogBtn"
+          >取消</el-button
+        >
+      </span>
+    </el-dialog>
+    <!-- 下载文档结束-->
+    <!-- 下载文档开始 -->
+    <el-dialog
+      title="下载文档"
+      :visible.sync="downWordDig"
+      width="600px"
+      class="pageSubmitData"
     >
       <div class="deleteContent">确定下载文档?</div>
       <span slot="footer" class="dialog-footer">
@@ -51,8 +74,8 @@
     <!-- 下载文档结束-->
   </div>
 </template>
-  
-  <script>
+
+<script>
 import MakerSpaceWord from "./MakerSpaceWord.vue";
 import MakerSpaceWordShow from "./MakerSpaceWordShow.vue";
 import { getMakerSpaceWord } from "@/components/tool/getWord";
@@ -62,6 +85,7 @@ export default {
   data() {
     return {
       downloadDig: false,
+      downWordDig:false,
       wordData: {
         applicationDate: "", //申请日期
         projectName: "", //项目名称
@@ -173,15 +197,19 @@ export default {
           console.log(err);
         });
     },
-    getWord() {
-      //下载表格
-      // console.log(this.$refs.myChild.$refs.downPDF)
+    getPdf(){
       downloadPDF(
         this.$refs.myChild.$refs.downPDF,
         "附件3:2023年二级学院特色创客空间建设项目申报书"
       );
       this.downloadDig = false;
     },
+    getWord() {
+      //下载表格
+      // console.log(this.$refs.myChild.$refs.downPDF)
+      getMakerSpaceWord(this.wordData);
+			this.downWordDig = false;
+    },
     changeWord() {
       //修改表格数据
       this.loading = true;
@@ -205,7 +233,7 @@ export default {
           studentActivities: this.wordData["studentActivities"], //学生创客活动组织实施情况
           Transforming: this.wordData["Transforming"], //学生创客团队孵化、转化创业项目情况
           condition: this.wordData["condition"], //立 项基 础及条 件
-        }).replaceAll(/%/g,"%25"), //项目详细
+        }).replaceAll(/%/g, "%25"), //项目详细
         tName: this.wordData["state"], //项目状态
         mon: JSON.stringify(this.wordData["fund"]), //预算经费
         planEnd: this.wordData["plannedEnd_at"], //计划完成时间,
@@ -432,12 +460,12 @@ export default {
   },
 };
 </script>
-  
-  <style lang="less">
+
+<style lang="less">
 #MakerSpaceWordDetail {
   width: 100%;
   display: flex;
   flex-direction: column;
   align-items: center;
 }
-</style>
+</style>