疯狂的狮子li
2021-08-18 c91d33e4ab58bdee9d4328adc2248495cc656c25
ruoyi-ui/src/views/system/post/index.vue
@@ -156,7 +156,8 @@
</template>
<script>
import { listPost, getPost, delPost, addPost, updatePost, exportPost } from "@/api/system/post";
import { listPost, getPost, delPost, addPost, updatePost } from "@/api/system/post";
import { downLoadExcel } from "@/utils/download";
export default {
  name: "Post",
@@ -309,22 +310,11 @@
        }).then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        })
        }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      const queryParams = this.queryParams;
      this.$confirm('是否确认导出所有岗位数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          this.exportLoading = true;
          return exportPost(queryParams);
        }).then(response => {
          this.download(response.msg);
          this.exportLoading = false;
        })
      downLoadExcel('/system/post/export', this.queryParams);
    }
  }
};