| | |
| | | <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> |
| | |
| | | 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"); |
| | |
| | | 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; |
| | | } |
| | | |
| | | /** 提交按钮 */ |
| | |
| | | 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"> |