From 27087cf06cc50699e2b89fff1060486cf0e84379 Mon Sep 17 00:00:00 2001
From: wjt <1797368093@qq.com>
Date: 星期三, 14 八月 2024 17:11:39 +0800
Subject: [PATCH] 批量下载图片

---
 src/views/infomanger/companymanger/index.vue |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/views/infomanger/companymanger/index.vue b/src/views/infomanger/companymanger/index.vue
index 824726b..f36a99b 100644
--- a/src/views/infomanger/companymanger/index.vue
+++ b/src/views/infomanger/companymanger/index.vue
@@ -39,7 +39,10 @@
         <el-button type="primary" plain icon="Plus" @click="handleAdd()" v-hasPermi="['system:dept:add']">鏂板</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button type="primary" plain icon="Download" @click="exportExcel" v-hasPermi="['system:dept:add']">瀵煎叆</el-button>
+        <el-button type="primary" plain icon="Upload" @click="exportExcel" v-hasPermi="['system:dept:add']">瀵煎叆</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button type="primary" plain icon="Download" @click="downLoadCode">涓嬭浇浼佷笟鐮�</el-button>
       </el-col>
       <!-- <el-col :span="1.5">
         <el-button type="primary" plain icon="Plus" @click="exportRecordComOpen" v-hasPermi="['system:dept:add']">瀵煎叆璁板綍</el-button>
@@ -139,11 +142,12 @@
 import exportRecord from './components/exportRecord'
 import createQrcode from './components/createQrcode'
 import judgeCom from './components/judge'
-import { listCompany,addCompany, updStatus, delCompany, updateCompany } from "@/api/system/company/company";
+import { listCompany,addCompany, updStatus, delCompany, updateCompany, getCompany } from "@/api/system/company/company";
 import exportExcelCom from './components/export'
 import { computed } from "vue";
 import { judgeStatus, companyStatus, scopeList } from '@/utils/mapList/index.ts'
 import useSettingsStore from "@/store/modules/settings";
+import { download } from '@/utils/request'; // 涓嬭浇鏂囦欢
 const thcolor = computed(() => useSettingsStore().theme);
 const { proxy } = getCurrentInstance();
 const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
@@ -270,18 +274,26 @@
   queryRef.value.resetFields();
   handleQuery();
 }
+function getDetails(id) {
+  getCompany(id).then((response) => {
+    form.value = response.data;
+    open.value = true;
+    // title.value = "鏌ョ湅浼佷笟";
+  });
+}
 /** 鏂板鎸夐挳鎿嶄綔 */
 function handleAdd(row) {
   if(row) {
-    form.value = row
+    // form.value = row
     title.value = "缂栬緫浼佷笟";
+    getDetails(row.companyId)
   } else {
     form.value = {
       companyStatus: 0
     }
     title.value = "娣诲姞浼佷笟";
+    open.value = true;
   }
-  open.value = true;
 }
 
 /** 鎻愪氦鎸夐挳 */
@@ -345,7 +357,13 @@
 function createQrcodeHandler(row) {
   createQrcodeRef.value.openDialog(row)
 }
+function downLoadCode() {
+  download('/system/company/downloadQrcode', queryParams.value, "浼佷笟鍥剧墖.zip")
+}
 getList();
+function selectableFun(e) {
+  console.log(e)
+}
 </script>
 
 <style scoped lang="scss">

--
Gitblit v1.9.1