Jelajahi Sumber

Merge remote-tracking branch 'origin/master'

lizhenhao 2 tahun lalu
induk
melakukan
5735ebd92f

+ 11 - 9
src/views/common/UpLoadComponentV2.1.vue

@@ -405,15 +405,17 @@
           this.fileLoading = true
         }
         for await (let item of fileList) {
-          await this.ossService.getFileSizeByUrl(item.url).then((data) => {
-            item.lsUrl = data.data.url
-            item.size = data.data.size
-            this.dataList.push(item)
-            this.dataListNew.push(item)
-            if (this.dataList.length === fileList.length) {
-              this.fileLoading = true
-            }
-          })
+          if (item.url) {
+            await this.ossService.getFileSizeByUrl(item.url).then((data) => {
+              item.lsUrl = data.data.url
+              item.size = data.data.size
+              this.dataList.push(item)
+              this.dataListNew.push(item)
+              if (this.dataList.length === fileList.length) {
+                this.fileLoading = true
+              }
+            })
+          }
         }
         // this.dataList = JSON.parse(JSON.stringify(fileList))
         // this.dataListNew = JSON.parse(JSON.stringify(fileList))

+ 0 - 20
src/views/modules/cw/reportManagement/ReportManagementSignatureForm.vue

@@ -711,10 +711,6 @@
           this.inputForm.projectMasterId1 !== value &&
           this.inputForm.projectMasterId2 !== value &&
           this.commonJS.isNotEmpty(value)) {
-          console.log('项目经理1', this.inputForm.projectMasterId1)
-          console.log('项目经理2', this.inputForm.projectMasterId2)
-          console.log('签字注师2', this.inputForm.signatureAnnotator2)
-          console.log('签字注师1', value)
           this.$message.warning('签字注师1和签字注师2至少有一个与项目经理相同')
           this.$nextTick(() => {
             this.inputForm.signatureAnnotator1 = ''
@@ -740,10 +736,6 @@
           this.inputForm.projectMasterId2 !== this.inputForm.signatureAnnotator1 &&
           this.inputForm.projectMasterId1 !== value && this.commonJS.isNotEmpty(value) &&
           this.inputForm.projectMasterId2 !== value) {
-          console.log('项目经理1', this.inputForm.projectMasterId1)
-          console.log('项目经理2', this.inputForm.projectMasterId2)
-          console.log('签字注师1', this.inputForm.signatureAnnotator1)
-          console.log('签字注师2', value)
           this.$message.warning('签字注师1和签字注师2至少有一个与项目经理相同')
           this.$nextTick(() => {
             this.inputForm.signatureAnnotator2 = ''
@@ -958,7 +950,6 @@
       },
       startFormTrue (callback) {
         this.loading = true
-        console.log('form' + this.inputForm.signatureType)
         let title = `发起流程【会计-报告签章-电子公章】`
         let describe = `[会计-报告签章-电子公章`
         // 读取流程表单
@@ -1017,11 +1008,8 @@
                 })
               }
               this.inputForm.cwFileInfoList = list
-              console.log(1)
               this.reportReviewService.save(this.inputForm).then(() => {
                 let da = {cwFileInfoList: this.inputForm.cwFileInfoList, id: this.inputForm.id}
-                console.log(this.inputForm)
-                console.log(da)
                 this.projectReportService.saveSignFiles(da).then(() => {
                   this.projectReportService.saveData(this.inputForm).then(({data}) => {
                     if (this.inputForm.signatureType === '2') {
@@ -1047,9 +1035,7 @@
       },
       reapplyForm (callback) {
         this.loading = true
-        console.log(this.inputForm)
         this.projectReportService.queryById(this.inputForm.id).then(({data}) => {
-          console.log('info' + data)
           if (data.signatureType === '1') {
             this.projectReportService.findBySignatureId(this.inputForm.sid1).then(({data}) => {
               if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
@@ -1123,7 +1109,6 @@
                       })
                     }
                     this.inputForm.cwFileInfoList = list
-                    console.log(2)
                     this.reportReviewService.save(this.inputForm).then(() => {
                       let da = {cwFileInfoList: this.inputForm.cwFileInfoList, id: this.inputForm.id}
                       this.projectReportService.saveSignFiles(da).then(() => {
@@ -1170,7 +1155,6 @@
                       })
                     }
                     this.inputForm.cwFileInfoList = list
-                    console.log(3)
                     this.reportReviewService.save(this.inputForm).then(() => {
                       let da = {cwFileInfoList: this.inputForm.cwFileInfoList, id: this.inputForm.id}
                       this.projectReportService.saveSignFiles(da).then(() => {
@@ -1219,7 +1203,6 @@
                       })
                     }
                     this.inputForm.cwFileInfoList = list
-                    console.log(4)
                     this.reportReviewService.save(this.inputForm).then(() => {
                       let da = {cwFileInfoList: this.inputForm.cwFileInfoList, id: this.inputForm.id}
                       this.projectReportService.saveSignFiles(da).then(() => {
@@ -1283,7 +1266,6 @@
                   })
                 }
                 this.inputForm.cwFileInfoList = list
-                console.log(5)
                 this.reportReviewService.save(this.inputForm).then(() => {
                   let da = {cwFileInfoList: this.inputForm.cwFileInfoList, id: this.inputForm.id}
                   this.projectReportService.saveSignFiles(da).then(() => {
@@ -1565,7 +1547,6 @@
             this.projectReportService.getAuditNodeByReportId(this.inputForm.sid1).then(({data}) => {
               if (data.success) {
                 this.projectReportService.getSignatureTypeById(this.inputForm.sid1, data.signatureType).then((sign) => {
-                  console.log('获取签章状态为' + sign.data.signatureType)
                   if (sign.data.signatureType === '1') {
                     console.log('签章已完成,展示‘同意’按钮')
                     this.$emit('callBackFunc', 'show')
@@ -1581,7 +1562,6 @@
             this.projectReportService.getAuditNodeByReportId(this.inputForm.sid2).then(({data}) => {
               if (data.success) {
                 this.projectReportService.getSignatureTypeById(this.inputForm.sid2, data.signatureType).then((sign) => {
-                  console.log('获取签章状态为' + sign.data.signatureType)
                   if (sign.data.signatureType === '1') {
                     console.log('签章已完成,展示‘同意’按钮')
                     this.$emit('callBackFunc', 'show')

+ 34 - 20
src/views/modules/program/registered/ProjectList.vue

@@ -62,11 +62,10 @@
     </el-form>
 
     <div class="bg-white top" style="">
-      <vxe-toolbar :refresh="{query: refreshList}" custom>
+      <vxe-toolbar :refresh="{query: refreshList}" export custom>
         <template #buttons>
           <el-button v-if="hasPermission('program:registered:add')" type="primary" size="small" icon="el-icon-plus" @click="start()">新建</el-button>
           <el-button v-if="hasPermission('program:registered:del')" type="danger"   size="small" icon="el-icon-delete" @click="deleteAll()" :disabled="$refs.typeDictTable && $refs.typeDictTable.getCheckboxRecords().length === 0" plain>删除</el-button>
-          <el-button v-if="hasPermission('program:registered:export')"  type="warning" plain @click="exportFile()" size="small">导出</el-button>
         </template>
       </vxe-toolbar>
       <div style="height: calc(100% - 80px)">
@@ -83,6 +82,14 @@
           highlight-hover-row
           :menu-config="{}"
           @sort-change="sortChangeHandle"
+          :export-config="{
+                    remote: true,
+                    filename: `兴光评估项目数据${moment(new Date()).format('YYYY-MM-DD')}`,
+                    sheetName: `兴光评估项目数据${moment(new Date()).format('YYYY-MM-DD')}`,
+                    exportMethod: exportMethod,
+                    types: ['xlsx'],
+                    modes: ['current', 'selected', 'all']
+                  }"
           :sort-config="{remote:true}"
           :data="dataList"
           :tree-config="{}"
@@ -988,24 +995,6 @@
           this.isAdmin = data
         })
       },
-      // 下载文档
-      exportFile () {
-        this.loading = true
-        this.programProjectListInfoService.exportFile({
-          'itemType': '1',
-          'tabType': '1',
-          ...this.searchForm
-        }).then((res) => {
-          // 将二进制流文件写入excel表,以下为重要步骤
-          this.$utils.downloadExcel(res.data, '项目登记列表信息')
-          this.loading = false
-        }).catch(function (err) {
-          this.loading = false
-          if (err.response) {
-            console.log(err.response)
-          }
-        })
-      },
       saveReportNo (id) {
         this.$confirm(`确定生成项目报告号吗?`, '提示', {
           confirmButtonText: '确定',
@@ -1431,6 +1420,31 @@
           }
         }
         return false
+      },
+      // 自定义服务端导出
+      exportMethod ({ options }) {
+        // 传给服务端的参数
+        const params = {
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm,
+          filename: options.filename,
+          sheetName: options.sheetName,
+          isHeader: options.isHeader,
+          original: options.original,
+          mode: options.mode,
+          selectIds: options.mode === 'selected' ? options.data.map(item => item.id) : [],
+          exportFields: options.columns.map(column => column.property)
+        }
+        return this.programProjectListInfoService.exportFile(params).then((res) => {
+          // 将二进制流文件写入excel表,以下为重要步骤
+          this.$utils.downloadExcel(res.data, options.filename)
+        }).catch(function (err) {
+          if (err.response) {
+            console.log(err.response)
+          }
+        })
       }
     }
   }