1
This commit is contained in:
@@ -258,13 +258,13 @@ import { useDict } from '/@/hooks/dict'
|
|||||||
import {
|
import {
|
||||||
fetchList,
|
fetchList,
|
||||||
examObj,
|
examObj,
|
||||||
delObj,
|
delObj
|
||||||
exportRelation
|
|
||||||
} from '/@/api/professional/professionaluser/professionaltitlerelation'
|
} from '/@/api/professional/professionaluser/professionaltitlerelation'
|
||||||
import { getProfessionalTitleList } from '/@/api/professional/rsbase/professionaltitlelevelconfig'
|
import { getProfessionalTitleList } from '/@/api/professional/rsbase/professionaltitlelevelconfig'
|
||||||
import { getMajorStationList } from '/@/api/professional/rsbase/professionalmajorstation'
|
import { getMajorStationList } from '/@/api/professional/rsbase/professionalmajorstation'
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
import { Medal } from '@element-plus/icons-vue'
|
import { Medal } from '@element-plus/icons-vue'
|
||||||
|
import { makeExportTeacherInfoByTypeTask } from '/@/api/professional/professionalfile';
|
||||||
// 子组件
|
// 子组件
|
||||||
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue'))
|
||||||
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
|
const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue'))
|
||||||
@@ -416,26 +416,14 @@ const handleDel = (row: any) => {
|
|||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
const handleDownLoadWord = async () => {
|
const handleDownLoadWord = async () => {
|
||||||
exportLoading.value = true
|
exportLoading.value = true;
|
||||||
try {
|
let params = Object.assign(search, { type: 'P20002' });
|
||||||
const response: any = await exportRelation(search)
|
makeExportTeacherInfoByTypeTask(params).then((res: any) => {
|
||||||
|
message.success('后台下载进行中,请稍后查看任务列表');
|
||||||
const blob = new Blob([response as BlobPart])
|
});
|
||||||
const fileName = '职称信息.xls'
|
setTimeout(() => {
|
||||||
const elink = document.createElement('a')
|
exportLoading.value = false;
|
||||||
elink.download = fileName
|
}, 3000); // 5分钟后自动关闭
|
||||||
elink.style.display = 'none'
|
|
||||||
elink.href = URL.createObjectURL(blob)
|
|
||||||
document.body.appendChild(elink)
|
|
||||||
elink.click()
|
|
||||||
URL.revokeObjectURL(elink.href)
|
|
||||||
document.body.removeChild(elink)
|
|
||||||
message.success('导出成功')
|
|
||||||
} catch (error) {
|
|
||||||
message.error('导出失败')
|
|
||||||
} finally {
|
|
||||||
exportLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取职称名称
|
// 获取职称名称
|
||||||
|
|||||||
Reference in New Issue
Block a user