ソースを参照

王子文 专项培养
1) 季度汇报页面新增汇报附件上传、下载、查询
2) 季度数据页面新增汇报附件下载、查询

wangggziwen 3 年 前
コミット
3b6dd922c9

+ 97 - 14
ui/src/views/training/spec/seasonalfeedback/index.vue

@@ -128,23 +128,23 @@
             </template>
           </el-table-column>
         </el-table>
-        <!-- 汇报附件 -->
+        <!--汇报展示PPT-->
         <div>
           <h3>汇报展示PPT</h3>
           <el-upload
-              v-if="!isMentor"
-              ref="doc"
-              :headers="doc.headers"
-              class="upload-demo"
-              :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
-              :disabled="doc.isUploading"
-              :on-progress="handleFileDocProgress"
-              :on-success="handleFileDocSuccess"
-              :auto-upload="true"
-              multiple
-              :limit="3">
-              <el-button size="small" type="primary" style="margin-bottom:10px;">点击上传</el-button>
-            </el-upload>
+            v-if="!isMentor"
+            ref="doc"
+            :headers="doc.headers"
+            class="upload-demo"
+            :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
+            :disabled="doc.isUploading"
+            :on-progress="handleFileDocProgress"
+            :on-success="handleFileDocSuccess"
+            :auto-upload="true"
+            multiple
+            :limit="3">
+            <el-button size="small" type="primary" style="margin-bottom:10px;">点击上传</el-button>
+          </el-upload>
           <el-table :data="doc.commonfileList" border style="width:600px;">
             <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
               <template slot-scope="scope">
@@ -179,6 +179,56 @@
             </el-table-column>
           </el-table>
         </div>
+        <!-- 汇报附件 -->
+        <div>
+            <h3>汇报附件</h3>
+            <el-upload
+              ref="doc2"
+              :headers="doc2.headers"
+              class="upload-demo"
+              :action="doc2.url + '?pType=' + doc2.pType + '&pId=' + doc2.pId"
+              :disabled="doc2.isUploading"
+              :on-progress="handleFileDocProgress"
+              :on-success="handleFileDocSuccess"
+              :auto-upload="true"
+              multiple
+              :limit="3">
+              <el-button size="small" type="primary" style="margin-bottom:10px;">点击上传</el-button>
+            </el-upload>
+            <el-table :data="doc2.commonfileList" border style="width:600px;">
+              <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+                <template slot-scope="scope">
+                  <a  class="link-type"  @click="handleDownload(scope.row)">
+                    <span>{{ scope.row.fileName }}</span>
+                  </a>
+                </template>
+              </el-table-column>
+              <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
+                <template slot-scope="scope">
+                  <el-button
+                    v-if="scope.row.fileName.endsWith('pdf')"
+                    size="mini"
+                    type="text"
+                    icon="el-icon-view"
+                    @click="handleSee(scope.row)"
+                  >{{ $t('预览') }}</el-button>
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-download"
+                    @click="handleDownload(scope.row)"
+                  >{{ $t('下载') }}</el-button>
+                  <el-button
+                    v-if="!isMentor"
+                    size="mini"
+                    type="text"
+                    icon="el-icon-delete"
+                    @click="handleDeleteDoc(scope.row)"
+                  >{{ $t('删除') }}</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+        </div>
         <!-- 问卷 -->
         <div v-if="isMentor">
           <div style="display:inline-block;width:40%;">
@@ -518,6 +568,30 @@ export default {
         pType: 'docSeasonal',
         pId: null
       },
+      doc2: {  // 反馈附件
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'doc2Seasonal'
+        },
+        pType: 'doc2Seasonal',
+        pId: null
+      },
       // 培养计划总表数据
       dataList: [],
       // 首选标签页
@@ -1069,6 +1143,9 @@ export default {
       this.doc.queryParams.pId = id
       this.doc.pId = id
       this.getFileList()
+      this.doc2.queryParams.pId = id
+      this.doc2.pId = id
+      this.getFileList2()
       // this.$nextTick(() => {
       //   this.$refs.doc.clearFiles()
       // })
@@ -1078,6 +1155,11 @@ export default {
         this.doc.commonfileList = response;
       });
     },
+    getFileList2() {
+      allFileList(this.doc2.queryParams).then(response => {
+        this.doc2.commonfileList = response;
+      });
+    },
     getFileListFeedback() {
       allFileList(this.docFeedback.queryParams).then(response => {
         this.docFeedback.commonfileList = response;
@@ -1097,6 +1179,7 @@ export default {
       this.doc.isUploading = false;
       this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
       this.getFileList()
+      this.getFileList2()
     },
     handleFileDocSuccessFeedback(response, file, fileList) {
       this.docMentorFeedback.isUploading = false;

+ 70 - 2
ui/src/views/training/spec/successor/seasondata.vue

@@ -70,10 +70,9 @@
             </template>
           </el-table-column>
         </el-table>
-        <!-- 汇报附件 -->
+        <!--汇报展示PPT-->
         <div>
           <h3>汇报展示PPT</h3>
-          
           <el-table :data="doc.commonfileList" border style="width:600px;">
             <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
               <template slot-scope="scope">
@@ -108,6 +107,43 @@
             </el-table-column>
           </el-table>
         </div>
+        <!-- 汇报附件 -->
+        <div>
+            <h3>汇报附件</h3>
+            <el-table :data="doc2.commonfileList" border style="width:600px;">
+              <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+                <template slot-scope="scope">
+                  <a  class="link-type"  @click="handleDownload(scope.row)">
+                    <span>{{ scope.row.fileName }}</span>
+                  </a>
+                </template>
+              </el-table-column>
+              <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
+                <template slot-scope="scope">
+                  <el-button
+                    v-if="scope.row.fileName.endsWith('pdf')"
+                    size="mini"
+                    type="text"
+                    icon="el-icon-view"
+                    @click="handleSee(scope.row)"
+                  >{{ $t('预览') }}</el-button>
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-download"
+                    @click="handleDownload(scope.row)"
+                  >{{ $t('下载') }}</el-button>
+                  <el-button
+                    v-if="!isMentor"
+                    size="mini"
+                    type="text"
+                    icon="el-icon-delete"
+                    @click="handleDeleteDoc(scope.row)"
+                  >{{ $t('删除') }}</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+        </div>
         <!-- 问卷 -->
         <div v-if="isMentor">
           <div style="display:inline-block;width:40%;">
@@ -429,6 +465,30 @@ export default {
         pType: 'docSeasonal',
         pId: null
       },
+      doc2: {  // 反馈附件
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'doc2Seasonal'
+        },
+        pType: 'doc2Seasonal',
+        pId: null
+      },
       // 培养计划总表数据
       dataList: [],
       // 首选标签页
@@ -983,6 +1043,9 @@ export default {
       this.doc.queryParams.pId = id
       this.doc.pId = id
       this.getFileList()
+      this.doc2.queryParams.pId = id
+      this.doc2.pId = id
+      this.getFileList2()
       // this.$nextTick(() => {
       //   this.$refs.doc.clearFiles()
       // })
@@ -992,6 +1055,11 @@ export default {
         this.doc.commonfileList = response;
       });
     },
+    getFileList2() {
+      allFileList(this.doc2.queryParams).then(response => {
+        this.doc2.commonfileList = response;
+      });
+    },
     getFileListFeedback() {
       allFileList(this.docFeedback.queryParams).then(response => {
         this.docFeedback.commonfileList = response;