zhanghua
2022-11-16 cc9ddf2ecaf3ad935374f49c842227f7eb15779d
src/views/systemSetting/platform/cockpitManage/index.vue
@@ -136,6 +136,7 @@
import detailUser from "./detailUser";
import { deleteTeam, exportTeamInfo, importTeamInfo, searchTeamInfo } from "@/api/system/portal/teamConstruction";
import {SUCCESS_CODE} from "@/utils";
import {downloadFile} from "@/utils/helper";
export default {
    components: { updateUser, detailUser },
@@ -235,20 +236,8 @@
        exportTable() {
          exportTeamInfo({ current: this.currentPage, size: this.pageSize, departName: this.searchDepartment, status: this.searchStatus })
              .then(res => {
                const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' });
                const fileName = res.contentDisposition.split('=')[1];
                if (window.navigator && window.navigator.msSaveBlob) {
                  navigator.msSaveBlob(blob, fileName);
                } else {
                  const link = document.createElement('a');
                  link.style.display = 'none';
                  link.href = URL.createObjectURL(blob);
                  link.setAttribute('download', decodeURI(fileName));
                  document.body.appendChild(link);
                  link.click();
                  URL.revokeObjectURL(link.href);
                  document.body.removeChild(link);
                }
                downloadFile(res);
                this.$message({ type: 'success', message: '操作成功' });
              })
              .catch(err => {
                this.$message({ type: 'error', message: err });
@@ -257,7 +246,7 @@
        // 导入
        importTable(file) {
          importTeamInfo({ 'multipartFile': file.file })
          importTeamInfo(file.file)
              .then(() => {
                  this.$message({ type: 'success', message: '操作成功' });
                  this.getDepartmentList();