Kaynağa Gözat

钢材报表一键下载全部图片

shxiaoc 10 ay önce
ebeveyn
işleme
cc07d81ec9

+ 29 - 1
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -813,8 +813,17 @@
             </div>
           </el-image>
         </div>
+        <template #footer>
+          <!-- 全部下载按钮 -->
+          <vxe-button
+            size="max"
+            status="primary"
+            content="下载全部抵达图片"
+            @click="downloadAll">
+          </vxe-button>
+        </template>
       </vxe-modal>
-      <vxe-modal width="80%" height="80%" v-model="isShow4" show-zoom>
+      <vxe-modal width="80%" height="80%" v-model="isShow4" show-footer show-zoom>
         <div class="demo-image__preview" v-for="(item, i) in srcList2" :key="i">
           <el-image
             :src="item.src"
@@ -827,6 +836,15 @@
             </div>
           </el-image>
         </div>
+        <template #footer>
+          <!-- 全部下载按钮 -->
+          <vxe-button
+            size="max"
+            status="primary"
+            content="下载全部签收图片"
+            @click="downloadAll1">
+          </vxe-button>
+        </template>
       </vxe-modal>
     </div>
     <div class="dialog">
@@ -3707,6 +3725,16 @@ export default {
       downloadFile(src, `${this.downloadCapacityNo}${title}照片`, 'jpg')
       // this.dialogVisible = true
     },
+    downloadAll(){
+        this.srcList.forEach((e, index) => {
+          downloadFile(e.src, `${this.downloadCapacityNo}抵达照片`+index, 'jpg')
+        })
+    },
+    downloadAll1(){
+        this.srcList2.forEach((e, index) => {
+          downloadFile(e.src, `${this.downloadCapacityNo}签收照片`+index, 'jpg')
+        })
+    },
     openRemarkPic() {
       //获取图片到本地
       this.axios.post('/api/v1/uc/getPicture', this.steelMap).then(res => {

+ 11 - 1
src/views/statisticalReport/components/tableItem.vue

@@ -10,12 +10,12 @@
     <el-table
       :show-summary="isShowSum"
       :data="tableData"
-      :height="height"
       style="width: 100%; margin-top: 216px;"
       :span-method="objectSpanMethod"
       :border="true"
       :header-cell-style="headerCellStyle"
       header-row-class-name="announce_left"
+      :height="tableMaxHeight"
     >
       <el-table-column
         v-if="isShowBox"
@@ -288,6 +288,11 @@
 import ColumnItem from './columnItem'
 export default {
   name: 'TableItem',
+  computed:{
+    tableMaxHeight() {
+        return window.innerHeight - 150 + 'px';
+    }
+  },
   components: {
     ColumnItem
   },
@@ -801,6 +806,11 @@ export default {
       font-weight: 700;
     }
   }
+  ::-webkit-scrollbar {
+	    //width: 20px; /* 对于垂直滚动条的宽度 */
+	    height: 22px; /* 对于水平滚动条的高度 */
+	    background-color: transparent;
+	}
 }
 
 /deep/ .announce_left{