| | |
| | | |
| | | <script setup name="Dept"> |
| | | import { getToken } from "@/utils/auth"; |
| | | import { listCompany, addCompany, updStatus, delCompany, updateCompany, getCompany } from "@/api/system/company/company"; |
| | | import { listManage } from "@/api/system/manage"; |
| | | import { |
| | | listCompany, |
| | | addCompany, |
| | | updStatus, |
| | | delCompany, |
| | | updateCompany, |
| | | getCompany |
| | | } from "@/api/system/company/company"; |
| | | import { listManage ,exportTemplate} from "@/api/system/manage"; |
| | | import { computed } from "vue"; |
| | | import { judgeStatus, companyStatus, scopeList } from '@/utils/mapList/index.ts' |
| | | import useSettingsStore from "@/store/modules/settings"; |
| | | import { download } from '@/utils/request'; // 下载文件 |
| | | import {download as downloadHttp, download} from '@/utils/request'; // 下载文件 |
| | | const thcolor = computed(() => useSettingsStore().theme); |
| | | const { proxy } = getCurrentInstance(); |
| | | const { sys_normal_disable } = proxy.useDict("sys_normal_disable"); |
| | |
| | | // 设置上传的请求头部 |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | // 上传的地址 |
| | | url: import.meta.env.VITE_APP_BASE_API + "/system/user/importData", |
| | | url: import.meta.env.VITE_APP_BASE_API + "/system/manage/importData", |
| | | }); |
| | | |
| | | /**文件上传中处理 */ |
| | | const handleFileUploadProgress = (event, file, fileList) => { |
| | | upload.isUploading = true; |
| | | }; |
| | | /** 文件上传成功处理 */ |
| | | const handleFileSuccess = (response, file, fileList) => { |
| | | upload.open = false; |
| | | upload.isUploading = false; |
| | | proxy.$refs["uploadRef"].handleRemove(file); |
| | | proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { |
| | | dangerouslyUseHTMLString: true, |
| | | }); |
| | | getList(); |
| | | }; |
| | | const { queryParams, form, rules } = toRefs(data); |
| | | const recordRow = ref([]) |
| | | /** 查询企业列表 */ |
| | |
| | | |
| | | /** 下载模板操作 */ |
| | | function importTemplate() { |
| | | proxy.download("system/user/importTemplate", {}, `user_template_${new Date().getTime()}.xlsx`); |
| | | exportTemplate().then(val => { |
| | | downloadHttp('/tool/file/download', { |
| | | fileName: val.msg, |
| | | delete: true |
| | | }, "计划信息模板.xlsx") |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | // 修改企业信息 |
| | | function changeCompanyNews(row, event) { |
| | | if (loading.value) { |