flat: 暂存

This commit is contained in:
Apcallover
2024-05-05 17:29:22 +08:00
parent 248a28d822
commit 484e36631e
9 changed files with 270 additions and 14 deletions

View File

@@ -110,6 +110,16 @@
</template>
<!--/自定义按钮-->
<template slot="menuRight">
<el-button
type="primary"
size="small"
:disabled="downloadButton"
@click="handleExport"
>导出
</el-button
>
</template>
</avue-crud>
<!--批量导入-->
@@ -154,7 +164,7 @@ import addGroups from "./Dialog/addGroups";
import transferGroups from "./Dialog/transferGroups";
import Resume from "@/components/resume/index";
import {check18IdCardNo, isvalidatemobile, isExcel} from "@/util/validate";
import {getTemplate} from "@/api/resource/template";
import {getTemplate, getTemplateRecommendExportList} from "@/api/resource/template";
import ied from "@/views/util/import-error-dialog";
import {excelAccept} from "@/common/accept";
import TextTooltip from '@/components/text-tooltip'
@@ -172,6 +182,7 @@ export default {
name: "tenant_talents",
data() {
return {
downloadButton: false,
activeNames: "1",
isIndeterminate: false,
checkAll: false,
@@ -553,6 +564,24 @@ export default {
this.getDept()
},
methods: {
handleExport() {
this.downloadButton = true
// 0 潜在 1 已认定
getTemplateRecommendExportList({
groupType: 1,
...this.query
}).then((response) => {
const blob = window.URL.createObjectURL(new Blob([response.data], {type: response.headers['content-type']}));
let fileName = decodeURI(response.headers['content-disposition'].split(';')[1].split('filename=')[1])
let a = document.createElement('a')
let event = new MouseEvent('click')
a.download = fileName || Date.now() + '.xlsx'
a.href = blob
a.dispatchEvent(event)
this.downloadButton = false
})
},
deptChange({value, column}) {
this.deptId = value
console.log(value)