沈丘营商办后台前端项目
wjt
2024-08-14 27087cf06cc50699e2b89fff1060486cf0e84379
批量下载图片
4个文件已修改
38 ■■■■ 已修改文件
src/api/system/company/company.ts 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/infomanger/companymanger/components/createQrcode.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/infomanger/companymanger/index.vue 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/system/company/company.ts
@@ -349,4 +349,12 @@
    url: `/enforce/company/log/${data.delId}`,
    method: 'DELETE',
  })
}
}
// // downloadQrcode
// export function downloadQrcode(data) {
//   return request({
//     url: '/system/company/downloadQrcode',
//     method: 'get'
//   })
// }
src/utils/request.ts
@@ -150,6 +150,7 @@
      ...config,
    })
    .then(async (data) => {
      // console.log(data, 'data===')
      const isBlob = blobValidate(data);
      if (isBlob) {
        const blob = new Blob([data]);
src/views/infomanger/companymanger/components/createQrcode.vue
@@ -3,7 +3,6 @@
    <div class="text-center">
      <vueQr ref="query" background="#fff" :text="info.companyCode"></vueQr>
      <div style="font-weight: bold;margin-bottom: 10px;">沈丘惠企执法</div>
      <div>{{ info.companyName }}</div>
      <div style="margin-top: 10px;">
        <el-link @click="downImage" type="primary">下载企业码</el-link>
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">