Explorar o código

项目立项申请文档分类

Q-ABAB %!s(int64=2) %!d(string=hai) anos
pai
achega
9d91c91356

+ 22 - 0
src/components/MakerSpaceWordPreview.vue

@@ -0,0 +1,22 @@
+<template>
+    <div>
+
+    </div>
+</template>
+  
+  <script>
+export default {
+  data() {
+    return {
+      
+    }
+  },
+  methods:{
+    
+  }
+}
+  </script>
+  
+  <style lang="less" scoped>
+
+  </style>

+ 28 - 3
src/views/projectApply/projectApplication.vue

@@ -313,14 +313,29 @@
       </span>
       </el-dialog>
 <!-- 删除通知结束-->
+      <!-- 文档预览开始 -->
+      <el-dialog
+      title="文档预览"
+      :visible.sync="WordPreview"
+      width="60%"
+      class="addDialog">
+      <div class="addDialogLogo">LOGO</div>
+      <MakerSpaceWordPreview v-if="PreviewTid == '5f7a66d5-c206-11ed-a4cd-509a4c5b67cf' "/>
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="downWord" class="AllDialogBtn">下载文档</el-button>
+        <el-button @click="WordPreview = false" class="AllDialogBtn" >取消</el-button>
+      </span>
+      </el-dialog>
+      <!-- 文档预览结束 -->
   </div>
 </template>
 
 <script>
-import downloadFile from '@/components/tool/downloadFile.js';
 import {MakerSpaceWord} from '@/components/tool/getWord.js'
 import { MakerStudentWord } from '@/components/tool/getWord.js';
+import MakerSpaceWordPreview from '@/components/MakerSpaceWordPreview.vue';
     export default {
+      components:{MakerSpaceWordPreview},
       data() {
         return {
           iid:'',
@@ -330,6 +345,9 @@ import { MakerStudentWord } from '@/components/tool/getWord.js';
           dialogVisible:false,//立项审核
           dialogVisible1:false,//立项撤回提交
           dialogVisible2:false,//删除
+          WordPreview:false,//文档预览
+          PreviewTid:"",//预览分类ID
+          PreviewData:"",//预览数据
           // 分页数据
           table:{
             total:0,
@@ -379,7 +397,11 @@ import { MakerStudentWord } from '@/components/tool/getWord.js';
         }
       },
       methods:{
-             
+        downWord(){
+          if(this.PreviewTid=='5f7a66d5-c206-11ed-a4cd-509a4c5b67cf'){
+            MakerSpaceWord(this.PreviewData[0],this.PreviewData[1]);
+          }
+        },
         init(){   
           this.dialogVisible=false;
           this.dialogVisible1=false;
@@ -427,7 +449,10 @@ import { MakerStudentWord } from '@/components/tool/getWord.js';
               uid:this.$store.state.userInfo.userid,
               pid:pid
             }).then(res=>{
-              MakerSpaceWord(res['data'][0][0],res['data'][1]);
+              this.PreviewData = [res['data'][0][0],res['data'][1]];
+              this.WordPreview = true;
+              this.PreviewTid = tid;
+              // MakerSpaceWord(res['data'][0][0],res['data'][1]);
             }).catch(err=>{
               console.log(err)
             })