diff --git a/src/api/basic/basicasynctask.ts b/src/api/basic/basicasynctask.ts index bad7dc1..aaa7ca7 100644 --- a/src/api/basic/basicasynctask.ts +++ b/src/api/basic/basicasynctask.ts @@ -28,3 +28,16 @@ export const fetchList = (query?: any) => { params: query, }); }; + +/** + * 下载任务文件 + * @param data 如 { id: 任务id } + */ +export const downloadTaskFile = (data?: any) => { + return request({ + url: '/basic/basicAsyncTask/downloadTaskFile', + method: 'post', + data: data, + responseType: 'blob', + }); +}; diff --git a/src/api/professional/professionalfile.ts b/src/api/professional/professionalfile.ts index cbceb39..4b52462 100644 --- a/src/api/professional/professionalfile.ts +++ b/src/api/professional/professionalfile.ts @@ -7,4 +7,12 @@ export const makeExportTeacherInfoBySelfTask = (data?: any) => { method: 'post', data: data, }); -}; \ No newline at end of file +}; + +export const makeExportTeacherInfoByTypeTask = (data?: any) => { + return request({ + url: '/professional/file/makeExportTeacherInfoByTypeTask', + method: 'post', + data: data, + }); +}; diff --git a/src/api/professional/professionaluser/professionaltitlerelation.ts b/src/api/professional/professionaluser/professionaltitlerelation.ts index 31bfae0..b4691b7 100644 --- a/src/api/professional/professionaluser/professionaltitlerelation.ts +++ b/src/api/professional/professionaluser/professionaltitlerelation.ts @@ -138,16 +138,3 @@ export const titleCountInfo = () => { }); }; -/** - * 导出Excel - * @param data 查询参数 - */ -export const exportRelation = (data: any) => { - return request({ - url: '/professional/professionaltitlerelation/exportRelation', - method: 'post', - data: data, - responseType: 'blob', - }); -}; - diff --git a/src/layout/navBars/breadcrumb/asyncTaskDrawer.vue b/src/layout/navBars/breadcrumb/asyncTaskDrawer.vue index 268c33f..c54f8be 100644 --- a/src/layout/navBars/breadcrumb/asyncTaskDrawer.vue +++ b/src/layout/navBars/breadcrumb/asyncTaskDrawer.vue @@ -28,7 +28,12 @@ > - + + + {{row.detailType}} + {{row.detailType}} + + {{ row.status }} @@ -58,7 +63,8 @@ diff --git a/src/views/finance/purchasingrequisition/accept/AcceptBatchForm.vue b/src/views/finance/purchasingrequisition/accept/AcceptBatchForm.vue index eeb0b9f..10f3bf9 100644 --- a/src/views/finance/purchasingrequisition/accept/AcceptBatchForm.vue +++ b/src/views/finance/purchasingrequisition/accept/AcceptBatchForm.vue @@ -1,16 +1,16 @@ - + - + - 填写履约验收评价表 - 上传履约验收评价表 + 填写履约验收评价表 + 上传履约验收评价表 金额≥30万,仅支持上传模版 - + - + - + - {{row.itemName}} - + + {{row.itemName}} + + + - + 合格 @@ -58,7 +61,7 @@ - + - + @@ -82,7 +85,30 @@ + 增加成员 - 至少3人,且为单数 + + 至少3人,且为单数 + + ; + + 从往期带入 + + + + + + @@ -106,14 +132,17 @@ const props = withDefaults( readonly?: boolean purchaseId?: string acceptanceItems?: any[] + batchNum?: number + previousBatchesTeams?: { batch: number; team: any[] }[] }>(), - { readonly: false, canFill: true, purchaseId: '' } + { readonly: false, canFill: true, purchaseId: '', batchNum: 1, previousBatchesTeams: () => [] } ) const emit = defineEmits(['update:modelValue']) const formRef = ref() const templateFileIdsStr = ref('') +const copyFromBatch = ref(null) const form = reactive({ acceptType: '1', @@ -129,8 +158,20 @@ const form = reactive({ ...props.modelValue, }) -watch(() => props.modelValue, (val) => Object.assign(form, val || {}), { deep: true }) +watch(() => props.modelValue, (val) => { + Object.assign(form, val || {}) + // 金额≥30万时,强制为上传方式 + if (!props.canFill && form.acceptType === '1') { + form.acceptType = '2' + } +}, { deep: true }) watch(form, () => emit('update:modelValue', { ...form }), { deep: true }) +// 金额≥30万时,默认选中上传方式 +watch(() => props.canFill, (val) => { + if (!val && form.acceptType === '1') { + form.acceptType = '2' + } +}, { immediate: true }) watch(() => props.acceptanceItems, (items) => { if (items?.length && form.acceptContents.length === 0) { @@ -163,6 +204,19 @@ const removeTeam = (idx: number) => { form.acceptTeam.splice(idx, 1) } +const onCopyFromBatch = (n: number | null) => { + if (!n) return + const item = props.previousBatchesTeams?.find((x) => x.batch === n) + if (item?.team?.length) { + form.acceptTeam = item.team.map((m: any) => ({ + name: m.name || '', + deptCode: m.deptCode || '', + deptName: m.deptName || '', + })) + } + copyFromBatch.value = null +} + const rules: FormRules = { acceptType: [{ required: true, message: '请选择验收方式', trigger: 'change' }], acceptDate: [{ required: true, message: '请选择验收日期', trigger: 'change' }], @@ -174,26 +228,16 @@ defineExpose({ validate, form }) diff --git a/src/views/finance/purchasingrequisition/accept/AcceptCommonForm.vue b/src/views/finance/purchasingrequisition/accept/AcceptCommonForm.vue index 696ac1a..28d15e4 100644 --- a/src/views/finance/purchasingrequisition/accept/AcceptCommonForm.vue +++ b/src/views/finance/purchasingrequisition/accept/AcceptCommonForm.vue @@ -1,17 +1,17 @@ - + - + - + - + 否 @@ -19,12 +19,12 @@ - + - + 否 @@ -32,27 +32,27 @@ - + - + - + - + - + @@ -69,6 +69,8 @@ const props = defineProps<{ modelValue: Record projectName?: string deptName?: string + /** 每次打开弹窗时变化,用于强制重置内部 form */ + resetKey?: number }>() const emit = defineEmits(['update:modelValue']) @@ -91,9 +93,8 @@ const form = reactive({ ...props.modelValue, }) -watch(() => props.modelValue, (val) => { +const syncFormFromModel = (val: Record | undefined) => { Object.assign(form, val || {}) - // 人员选择回显 if (form.purchaserId && form.purchaserName) { purchaserList.value = [{ id: form.purchaserId, name: form.purchaserName, type: 'user' }] } else { @@ -104,7 +105,11 @@ watch(() => props.modelValue, (val) => { } else { assetAdminList.value = [] } -}, { deep: true, immediate: true }) +} + +watch(() => props.modelValue, syncFormFromModel, { deep: true, immediate: true }) +// resetKey 变化时强制用 modelValue 覆盖内部 form +watch(() => props.resetKey, () => syncFormFromModel(props.modelValue)) watch(form, () => emit('update:modelValue', { ...form }), { deep: true }) const onPurchaserChange = (list: any[]) => { @@ -140,26 +145,7 @@ defineExpose({ validate, form }) diff --git a/src/views/finance/purchasingrequisition/accept/PurchasingAcceptModal.vue b/src/views/finance/purchasingrequisition/accept/PurchasingAcceptModal.vue index af263a2..6f7b220 100644 --- a/src/views/finance/purchasingrequisition/accept/PurchasingAcceptModal.vue +++ b/src/views/finance/purchasingrequisition/accept/PurchasingAcceptModal.vue @@ -2,13 +2,13 @@ - + - 分期验收{{ batches.length > 0 ? ` (${batches.length})` : '' }} + {{ commonForm?.isInstallment === '0' ? '验收' : '分期验收' }}{{ commonForm?.isInstallment !== '0' && batches.length > 0 ? ` (${batches.length})` : '' }} - + @@ -125,14 +130,33 @@ const batches = ref([]) const mainTab = ref('common') const activeTab = ref('1') const commonFormRef = ref() -const commonForm = reactive>({}) +const batchFormRefMap = ref>({}) +/** 使用 ref 并在每次打开时替换整个对象,确保子组件能感知引用变化并清空 */ +const commonForm = ref>({}) +/** 每次打开自增,用于强制 AcceptCommonForm 重新挂载,确保公共信息彻底清空 */ +const openToken = ref(0) const batchForms = reactive>({}) +const setBatchFormRef = (batch: number, el: any) => { + if (el) batchFormRefMap.value[batch] = el +} + const activeBatchId = computed(() => { const b = batches.value.find((x: any) => String(x.batch) === activeTab.value) return b?.id || '' }) +const getPreviousBatchesTeams = (batchNum: number) => { + const list: { batch: number; team: any[] }[] = [] + for (let n = 1; n < batchNum; n++) { + const team = batchForms[n]?.acceptTeam + if (Array.isArray(team) && team.length > 0) { + list.push({ batch: n, team }) + } + } + return list +} + const canEditBatch = (batch: number) => { if (batch === 1) return true for (let i = 1; i < batch; i++) { @@ -142,7 +166,8 @@ const canEditBatch = (batch: number) => { } const isBatchCompleted = (b: any) => { - return !!(b.acceptType && b.acceptDate) + const form = batchForms[b.batch] + return !!(form?.acceptType && form?.acceptDate) } const isBatchCompletedByIdx = (batch: number) => { @@ -152,35 +177,43 @@ const isBatchCompletedByIdx = (batch: number) => { const loadData = async () => { if (!purchaseId.value) return + const currentId = String(purchaseId.value) loading.value = true try { const [configRes, canFillRes] = await Promise.all([ - getCommonConfigWithBatches(String(purchaseId.value)), - apiCanFillForm(String(purchaseId.value)), + getCommonConfigWithBatches(currentId), + apiCanFillForm(currentId), ]) + // 防止快速切换:若已打开其他申请单,忽略本次结果 + if (String(purchaseId.value) !== currentId) return + const config = configRes?.data canFillForm.value = !!canFillRes?.data if (config?.common) { - Object.assign(commonForm, { - hasContract: config.common.hasContract || '0', - contractId: config.common.contractId || '', - isInstallment: config.common.isInstallment || '0', - totalPhases: config.common.totalPhases || 1, - supplierName: config.common.supplierName || '', - supplierContact: config.common.supplierContact || '', - purchaserId: config.common.purchaserId || '', - purchaserName: config.common.purchaserName || '', - assetAdminId: config.common.assetAdminId || '', - assetAdminName: config.common.assetAdminName || '', - }) applyInfo.value = config.common + // 仅当存在已保存批次时,才用接口数据回填公共信息;否则保持 open() 中的默认清空值 + if (config?.batches?.length) { + Object.assign(commonForm.value, { + hasContract: config.common.hasContract || '0', + contractId: config.common.contractId || '', + isInstallment: config.common.isInstallment || '0', + totalPhases: config.common.totalPhases || 1, + supplierName: config.common.supplierName || '', + supplierContact: config.common.supplierContact || '', + purchaserId: config.common.purchaserId || '', + purchaserName: config.common.purchaserName || '', + assetAdminId: config.common.assetAdminId || '', + assetAdminName: config.common.assetAdminName || '', + }) + } } const projectType = applyInfo.value?.projectType || rowProjectType.value || 'A' const typeMap: Record = { A: 'A', B: 'B', C: 'C' } const at = typeMap[projectType] || 'A' const itemsRes = await getAcceptanceItems(at) + if (String(purchaseId.value) !== currentId) return acceptanceItems.value = itemsRes?.data || [] if (config?.batches?.length) { @@ -191,6 +224,7 @@ const loadData = async () => { if (!batchForms[b.batch]) batchForms[b.batch] = {} } await loadBatchDetails() + if (String(purchaseId.value) !== currentId) return } else { batches.value = [] } @@ -252,9 +286,13 @@ const loadBatchDetails = async () => { } const saveCommonConfig = async () => { - const valid = await commonFormRef.value?.validate?.().catch(() => false) + const formRef = commonFormRef.value + const valid = await formRef?.validate?.().catch(() => false) if (!valid) return - if (commonForm.isInstallment === '1' && (!commonForm.totalPhases || commonForm.totalPhases < 1)) { + // 直接从子组件 form 读取,确保拿到用户填写的最新值(避免 v-model 同步延迟) + const form = formRef?.form || commonForm.value + const isInstallment = form.isInstallment === '1' || form.isInstallment === 1 + if (isInstallment && (!form.totalPhases || form.totalPhases < 1)) { useMessage().error('请填写分期次数') return } @@ -262,16 +300,16 @@ const saveCommonConfig = async () => { try { await apiSaveCommonConfig({ purchaseId: String(purchaseId.value), - hasContract: commonForm.hasContract, - contractId: commonForm.contractId, - isInstallment: commonForm.isInstallment, - totalPhases: commonForm.isInstallment === '1' ? commonForm.totalPhases : 1, - supplierName: commonForm.supplierName, - supplierContact: commonForm.supplierContact, - purchaserId: commonForm.purchaserId, - purchaserName: commonForm.purchaserName, - assetAdminId: commonForm.assetAdminId, - assetAdminName: commonForm.assetAdminName, + hasContract: form.hasContract ?? '0', + contractId: form.contractId ?? '', + isInstallment: form.isInstallment ?? '0', + totalPhases: isInstallment ? (Number(form.totalPhases) || 1) : 1, + supplierName: String(form.supplierName ?? ''), + supplierContact: String(form.supplierContact ?? ''), + purchaserId: String(form.purchaserId ?? ''), + purchaserName: String(form.purchaserName ?? ''), + assetAdminId: String(form.assetAdminId ?? ''), + assetAdminName: String(form.assetAdminName ?? ''), }) useMessage().success('保存成功') await loadData() @@ -283,11 +321,25 @@ const saveCommonConfig = async () => { } const saveCurrentBatch = async () => { + const curBatch = Number(activeTab.value) + const batchFormRef = batchFormRefMap.value[curBatch] + const valid = await batchFormRef?.validate?.().catch(() => false) + if (!valid) return + const b = batches.value.find((x: any) => String(x.batch) === activeTab.value) if (!b?.id) return - const form = batchForms[Number(activeTab.value)] + const form = batchForms[curBatch] if (!form) return + if (!form.acceptType) { + useMessage().error('请选择验收方式') + return + } + if (!form.acceptDate) { + useMessage().error('请选择验收日期') + return + } + const team = (form.acceptTeam || []).filter((m: any) => m?.name) if (team.length < 3 || team.length % 2 === 0) { useMessage().error('验收小组至少3人且为单数') @@ -320,13 +372,50 @@ const handleClose = () => { emit('refresh') } -const open = (row: any) => { +const DEFAULT_COMMON_FORM = { + hasContract: '0', + contractId: '', + isInstallment: '0', + totalPhases: 1, + supplierName: '', + supplierContact: '', + purchaserId: '', + purchaserName: '', + assetAdminId: '', + assetAdminName: '', +} + +/** 将弹窗内所有内容恢复为初始空值(替换整个对象以确保引用变化) */ +const resetAllToDefault = () => { + openToken.value++ + commonForm.value = { ...DEFAULT_COMMON_FORM } + applyInfo.value = null + mainTab.value = 'common' + activeTab.value = '1' + batchFormRefMap.value = {} + batches.value = [] + acceptanceItems.value = [] + canFillForm.value = true + Object.keys(batchForms).forEach((k) => delete batchForms[Number(k)]) +} + +const open = async (row: any) => { purchaseId.value = row?.id ?? '' rowProjectType.value = row?.projectType || 'A' + + // 1. 先将弹窗内所有内容恢复为初始空值 + resetAllToDefault() + + // 2. 显示弹窗并开启 loading,避免接口返回前展示旧数据 visible.value = true - batches.value = [] - Object.keys(batchForms).forEach((k) => delete batchForms[Number(k)]) - nextTick(() => loadData()) + loading.value = true + + // 3. 等待 Vue 完成渲染,确保子组件已接收并展示空值 + await nextTick() + await nextTick() + + // 4. 再进行接口查询并覆盖 + await loadData() } defineExpose({ open }) @@ -337,6 +426,7 @@ defineExpose({ open }) padding: 0; max-height: 70vh; overflow-y: auto; + overflow-x: hidden; } .main-tab-nav { display: flex; @@ -403,3 +493,10 @@ defineExpose({ open }) min-height: 200px; } + + diff --git a/src/views/professional/common/import-teacher-other-info.vue b/src/views/professional/common/import-teacher-other-info.vue index 4ddce74..550a8b5 100644 --- a/src/views/professional/common/import-teacher-other-info.vue +++ b/src/views/professional/common/import-teacher-other-info.vue @@ -98,7 +98,7 @@ const handleAvatarError = (err: any) => { }; const handleDownloadTemplate = () => { - downBlobFile('/professional/file/exportTeacherInfoTemplate', { type: currentType.value || 'titleRelation' }, '职工信息导入模板.xlsx') + downBlobFile('/professional/file/exportTeacherInfoTemplate', { type: currentType.value || 'titleRelation' }, title.value+'模板.xlsx') } // 暴露方法给父组件 diff --git a/src/views/professional/professionalqualificationrelation/index.vue b/src/views/professional/professionalqualificationrelation/index.vue index d3d2ee2..62ccb7b 100644 --- a/src/views/professional/professionalqualificationrelation/index.vue +++ b/src/views/professional/professionalqualificationrelation/index.vue @@ -229,11 +229,10 @@ import { useDict } from '/@/hooks/dict' import { fetchList, examObj, - delObj, - exportExcel -} from '/@/api/professional/professionaluser/professionalqualificationrelation' + delObj} from '/@/api/professional/professionaluser/professionalqualificationrelation' import { getLevelList } from '/@/api/professional/rsbase/professionalqualificationconfig' import { getWorkTypeList } from '/@/api/professional/rsbase/professionalworktype' +import { makeExportTeacherInfoByTypeTask } from '/@/api/professional/professionalfile'; import { PROFESSIONAL_AUDIT_STATE_OPTIONS } from '/@/config/global' import { defineAsyncComponent } from 'vue' import { Medal } from '@element-plus/icons-vue' @@ -391,27 +390,15 @@ const handleDel = (row: any) => { // 导出 const handleDownLoadWord = async () => { - exportLoading.value = true - try { - const response: any = await exportExcel(search) - - const blob = new Blob([response as BlobPart]) - const fileName = '职业资格信息.xls' - const elink = document.createElement('a') - elink.download = fileName - 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 - } -} + exportLoading.value = true; + let params = Object.assign(search, { type: 'P20003' }); + makeExportTeacherInfoByTypeTask(params).then((res: any) => { + message.success('后台下载进行中,请稍后查看任务列表'); + }); + setTimeout(() => { + exportLoading.value = false; + }, 3000); // 5分钟后自动关闭 +}; // 获取资格等级名称 const getQualificationLevelName = (id: string | number) => { diff --git a/src/views/professional/professionalteacheracademicrelation/form.vue b/src/views/professional/professionalteacheracademicrelation/form.vue index 6c8e080..2df9e6c 100644 --- a/src/views/professional/professionalteacheracademicrelation/form.vue +++ b/src/views/professional/professionalteacheracademicrelation/form.vue @@ -84,10 +84,10 @@ /> - + { { required: true, message: '请输入所学专业', trigger: 'blur' } ], certificateNumber: [ - { required: true, message: '请输入证书编码', trigger: 'blur' }, - { pattern: /^[A-Za-z0-9]+$/, message: '证书编码只能包含英文和数字', trigger: 'blur' } + { required: true, message: '请输入证书编号', trigger: 'blur' }, + { pattern: /^[A-Za-z0-9]+$/, message: '证书编号只能包含英文和数字', trigger: 'blur' } ] } diff --git a/src/views/professional/professionalteacheracademicrelation/index.vue b/src/views/professional/professionalteacheracademicrelation/index.vue index 54e60bc..8735893 100755 --- a/src/views/professional/professionalteacheracademicrelation/index.vue +++ b/src/views/professional/professionalteacheracademicrelation/index.vue @@ -241,14 +241,13 @@ import { useDict } from '/@/hooks/dict' import { fetchList, examObj, - delObj, - exportExcel -} from '/@/api/professional/professionaluser/professionalteacheracademicrelation' + delObj} from '/@/api/professional/professionaluser/professionalteacheracademicrelation' import { getDegreeList } from '/@/api/professional/rsbase/professionalacademicdegreeconfig' import { getQualificationList } from '/@/api/professional/rsbase/academicqualificationsconfig' import { getAllTypeList } from '/@/api/professional/rsbase/professionalacademiceducationtypeconfig' import { PROFESSIONAL_AUDIT_STATE_OPTIONS } from '/@/config/global' import { defineAsyncComponent } from 'vue' +import {makeExportTeacherInfoByTypeTask} from "/@/api/professional/professionalfile"; const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue')) const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue')) const DataForm = defineAsyncComponent(() => import('./form.vue')) @@ -412,26 +411,14 @@ const handleDel = (row: any) => { // 导出 const handleDownLoadWord = async () => { - exportLoading.value = true - try { - const response: any = await exportExcel(search) - - const blob = new Blob([response as BlobPart]) - const fileName = '学历学位信息.xls' - const elink = document.createElement('a') - elink.download = fileName - 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 - } + exportLoading.value = true; + let params = Object.assign(search, { type: 'P20005' }); + makeExportTeacherInfoByTypeTask(params).then((res: any) => { + message.success('后台下载进行中,请稍后查看任务列表'); + }); + setTimeout(() => { + exportLoading.value = false; + }, 3000); // 5分钟后自动关闭 } // 获取学位名称 diff --git a/src/views/professional/professionalteachercertificaterelation/index.vue b/src/views/professional/professionalteachercertificaterelation/index.vue index 5a4253a..94e5898 100755 --- a/src/views/professional/professionalteachercertificaterelation/index.vue +++ b/src/views/professional/professionalteachercertificaterelation/index.vue @@ -212,9 +212,10 @@ import { getTeacherCertificateList } from '/@/api/professional/rsbase/profession import { fetchList, examObj, - delObj, - exportExcel + delObj } from '/@/api/professional/professionaluser/professionalteachercertificaterelation' +import { makeExportTeacherInfoByTypeTask } from '/@/api/professional/professionalfile'; + import { PROFESSIONAL_AUDIT_STATE_OPTIONS } from '/@/config/global' import { defineAsyncComponent } from 'vue' const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue')) @@ -368,27 +369,15 @@ const handleDel = (row: any) => { // 导出 const handleDownLoadWord = async () => { - exportLoading.value = true - try { - const response: any = await exportExcel(search) - - const blob = new Blob([response as BlobPart]) - const fileName = '教师资格证信息.xls' - const elink = document.createElement('a') - elink.download = fileName - 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 - } -} + exportLoading.value = true; + let params = Object.assign(search, { type: 'P20004' }); + makeExportTeacherInfoByTypeTask(params).then((res: any) => { + message.success('后台下载进行中,请稍后查看任务列表'); + }); + setTimeout(() => { + exportLoading.value = false; + }, 3000); // 5分钟后自动关闭 +}; // 获取证书名称 const getCertificateName = (id: string | number) => { diff --git a/src/views/professional/professionalteacherhonor/index.vue b/src/views/professional/professionalteacherhonor/index.vue index bb265d6..819cbe6 100755 --- a/src/views/professional/professionalteacherhonor/index.vue +++ b/src/views/professional/professionalteacherhonor/index.vue @@ -243,6 +243,7 @@ import { } from '/@/api/professional/professionaluser/professionalteacherhonor' import { PROFESSIONAL_AUDIT_STATE_OPTIONS, getStatusConfig } from '/@/config/global' import { defineAsyncComponent } from 'vue' +import {makeExportTeacherInfoByTypeTask} from "/@/api/professional/professionalfile"; const TeacherNameNo = defineAsyncComponent(() => import('/@/components/TeacherNameNo/index.vue')) const AuditState = defineAsyncComponent(() => import('/@/components/AuditState/index.vue')) const ClickableTag = defineAsyncComponent(() => import('/@/components/ClickableTag/index.vue')) @@ -393,29 +394,14 @@ const handleDel = (row: any) => { // 导出 const handleDownLoadWord = async () => { - exportLoading.value = true - try { - const response = await fetchList({ - current: 1, - size: 999999, - ...search - }) - const data = response.data.records || [] - - const tHeader = ['工号', '姓名', '荣誉', '表彰单位', '年份'] - const filterVal = ['teacherNo', 'teacherName', 'honor', 'honorCompany', 'year'] - - // 动态导入导出工具 - const { export_json_to_excel } = await import('/@/excel/Export2Excel.js') - const exportData = data.map((v: any) => filterVal.map((j: string) => v[j])) - export_json_to_excel(tHeader, exportData, '综合表彰.xls') - - message.success('导出成功') - } catch (error) { - message.error('导出失败') - } finally { - exportLoading.value = false - } + exportLoading.value = true; + let params = Object.assign(search, { type: 'P20006' }); + makeExportTeacherInfoByTypeTask(params).then((res: any) => { + message.success('后台下载进行中,请稍后查看任务列表'); + }); + setTimeout(() => { + exportLoading.value = false; + }, 3000); // 5分钟后自动关闭 } // 打开导入弹窗 diff --git a/src/views/professional/professionaltitlerelation/index.vue b/src/views/professional/professionaltitlerelation/index.vue index ba4e06d..e045779 100755 --- a/src/views/professional/professionaltitlerelation/index.vue +++ b/src/views/professional/professionaltitlerelation/index.vue @@ -1,627 +1,560 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 查询 - 重置 - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + + + - - - - - 新增 - 导出信息 - 导入信息 - - - - - - - + + + + + 新增 + 导出信息 + 导入信息 + + + + + + + - - - - - - - - - - - - - - - - - - - {{ getProfessionalTitleName(scope.row.professionalTitleConfigId) }} - - - - - - {{ getMajorStationName(scope.row.majorStation) }} - - + + + - - - 查看 - - - - - + + + + + - - - - - - 修改 - - 通过 - - 部门通过 - - 驳回 - - 部门驳回 - - 删除 - - - - - + + + + + - - - - + + + {{ getProfessionalTitleName(scope.row.professionalTitleConfigId) }} + + - - + + + {{ getMajorStationName(scope.row.majorStation) }} + + - - - - + + + 查看 + + - + + - - + + + + + + 修改 + + 通过 + + 部门通过 + + 驳回 + + 部门驳回 + + 删除 + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/professional/teacherbase/import-teacherInfo.vue b/src/views/professional/teacherbase/import-teacherInfo.vue index d4b0a7a..918f556 100644 --- a/src/views/professional/teacherbase/import-teacherInfo.vue +++ b/src/views/professional/teacherbase/import-teacherInfo.vue @@ -6,15 +6,15 @@ show-icon style="margin-bottom: 20px;"> - 导入前请先下载字典文件,部分字段需严格按照字典值填写 + 可先导出教职工信息,按照导出信息的模板填入职工数据,再执行导入 - - - 下载字典文件 - - + + + + + - + + + + 下载模板 + + + + + 将文件拖到此处,或点击上传 + + 只能上传 .xls 或 .xlsx 格式的 Excel 文件 + + + + + + + + diff --git a/src/views/recruit/recruitplanmajor/index.vue b/src/views/recruit/recruitplanmajor/index.vue index 6bc67aa..d1b80d0 100644 --- a/src/views/recruit/recruitplanmajor/index.vue +++ b/src/views/recruit/recruitplanmajor/index.vue @@ -16,303 +16,279 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - - 查询 - 重置 - - + + + + + + + + + + + + + + + + + + + + + + + + + 查询 + 重置 + + - - - - 新 增 - - + + + 新 增 - - - - - - {{ getPlanName(scope.row.groupId) }} - - - - - - - {{ getDeptName(scope.row.deptCode) }} - - - - - - - {{ getYesNoLabel(scope.row.isOrder) }}|{{ getYesNoLabel(scope.row.isZd) }}|{{ getYesNoLabel(scope.row.isUnion) }} - - - - - - - - - - - {{ getMajorCodeName(scope.row.stuworkMajorCode) }} - - - + + + + + {{ getPlanName(scope.row.groupId) }} + + + + + + + {{ getDeptName(scope.row.deptCode) }} + + + + + + + {{ getYesNoLabel(scope.row.isOrder) }}|{{ getYesNoLabel(scope.row.isZd) }}|{{ getYesNoLabel(scope.row.isUnion) }} + + + + + + + + + + + {{ getMajorCodeName(scope.row.stuworkMajorCode) }} + + + - - - - - 修改 - - - 删除 - - - - + + + + 修改 + + 删除 + + + + - - + + - - - - + + + + + + - +