diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 2b4704b..e2b3e27 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -1,73 +1,73 @@ // Generated by 'unplugin-auto-import' -export {} +export {}; declare global { - const EffectScope: typeof import('vue')['EffectScope'] - const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate'] - const computed: typeof import('vue')['computed'] - const createApp: typeof import('vue')['createApp'] - const createPinia: typeof import('pinia')['createPinia'] - const customRef: typeof import('vue')['customRef'] - const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] - const defineComponent: typeof import('vue')['defineComponent'] - const defineStore: typeof import('pinia')['defineStore'] - const effectScope: typeof import('vue')['effectScope'] - const getActivePinia: typeof import('pinia')['getActivePinia'] - const getCurrentInstance: typeof import('vue')['getCurrentInstance'] - const getCurrentScope: typeof import('vue')['getCurrentScope'] - const h: typeof import('vue')['h'] - const inject: typeof import('vue')['inject'] - const isProxy: typeof import('vue')['isProxy'] - const isReactive: typeof import('vue')['isReactive'] - const isReadonly: typeof import('vue')['isReadonly'] - const isRef: typeof import('vue')['isRef'] - const mapActions: typeof import('pinia')['mapActions'] - const mapGetters: typeof import('pinia')['mapGetters'] - const mapState: typeof import('pinia')['mapState'] - const mapStores: typeof import('pinia')['mapStores'] - const mapWritableState: typeof import('pinia')['mapWritableState'] - const markRaw: typeof import('vue')['markRaw'] - const nextTick: typeof import('vue')['nextTick'] - const onActivated: typeof import('vue')['onActivated'] - const onBeforeMount: typeof import('vue')['onBeforeMount'] - const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave'] - const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate'] - const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] - const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] - const onDeactivated: typeof import('vue')['onDeactivated'] - const onErrorCaptured: typeof import('vue')['onErrorCaptured'] - const onMounted: typeof import('vue')['onMounted'] - const onRenderTracked: typeof import('vue')['onRenderTracked'] - const onRenderTriggered: typeof import('vue')['onRenderTriggered'] - const onScopeDispose: typeof import('vue')['onScopeDispose'] - const onServerPrefetch: typeof import('vue')['onServerPrefetch'] - const onUnmounted: typeof import('vue')['onUnmounted'] - const onUpdated: typeof import('vue')['onUpdated'] - const provide: typeof import('vue')['provide'] - const reactive: typeof import('vue')['reactive'] - const readonly: typeof import('vue')['readonly'] - const ref: typeof import('vue')['ref'] - const resolveComponent: typeof import('vue')['resolveComponent'] - const resolveDirective: typeof import('vue')['resolveDirective'] - const setActivePinia: typeof import('pinia')['setActivePinia'] - const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix'] - const shallowReactive: typeof import('vue')['shallowReactive'] - const shallowReadonly: typeof import('vue')['shallowReadonly'] - const shallowRef: typeof import('vue')['shallowRef'] - const storeToRefs: typeof import('pinia')['storeToRefs'] - const toRaw: typeof import('vue')['toRaw'] - const toRef: typeof import('vue')['toRef'] - const toRefs: typeof import('vue')['toRefs'] - const triggerRef: typeof import('vue')['triggerRef'] - const unref: typeof import('vue')['unref'] - const useAttrs: typeof import('vue')['useAttrs'] - const useCssModule: typeof import('vue')['useCssModule'] - const useCssVars: typeof import('vue')['useCssVars'] - const useLink: typeof import('vue-router')['useLink'] - const useRoute: typeof import('vue-router')['useRoute'] - const useRouter: typeof import('vue-router')['useRouter'] - const useSlots: typeof import('vue')['useSlots'] - const watch: typeof import('vue')['watch'] - const watchEffect: typeof import('vue')['watchEffect'] - const watchPostEffect: typeof import('vue')['watchPostEffect'] - const watchSyncEffect: typeof import('vue')['watchSyncEffect'] + const EffectScope: typeof import('vue')['EffectScope']; + const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']; + const computed: typeof import('vue')['computed']; + const createApp: typeof import('vue')['createApp']; + const createPinia: typeof import('pinia')['createPinia']; + const customRef: typeof import('vue')['customRef']; + const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']; + const defineComponent: typeof import('vue')['defineComponent']; + const defineStore: typeof import('pinia')['defineStore']; + const effectScope: typeof import('vue')['effectScope']; + const getActivePinia: typeof import('pinia')['getActivePinia']; + const getCurrentInstance: typeof import('vue')['getCurrentInstance']; + const getCurrentScope: typeof import('vue')['getCurrentScope']; + const h: typeof import('vue')['h']; + const inject: typeof import('vue')['inject']; + const isProxy: typeof import('vue')['isProxy']; + const isReactive: typeof import('vue')['isReactive']; + const isReadonly: typeof import('vue')['isReadonly']; + const isRef: typeof import('vue')['isRef']; + const mapActions: typeof import('pinia')['mapActions']; + const mapGetters: typeof import('pinia')['mapGetters']; + const mapState: typeof import('pinia')['mapState']; + const mapStores: typeof import('pinia')['mapStores']; + const mapWritableState: typeof import('pinia')['mapWritableState']; + const markRaw: typeof import('vue')['markRaw']; + const nextTick: typeof import('vue')['nextTick']; + const onActivated: typeof import('vue')['onActivated']; + const onBeforeMount: typeof import('vue')['onBeforeMount']; + const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']; + const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']; + const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']; + const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']; + const onDeactivated: typeof import('vue')['onDeactivated']; + const onErrorCaptured: typeof import('vue')['onErrorCaptured']; + const onMounted: typeof import('vue')['onMounted']; + const onRenderTracked: typeof import('vue')['onRenderTracked']; + const onRenderTriggered: typeof import('vue')['onRenderTriggered']; + const onScopeDispose: typeof import('vue')['onScopeDispose']; + const onServerPrefetch: typeof import('vue')['onServerPrefetch']; + const onUnmounted: typeof import('vue')['onUnmounted']; + const onUpdated: typeof import('vue')['onUpdated']; + const provide: typeof import('vue')['provide']; + const reactive: typeof import('vue')['reactive']; + const readonly: typeof import('vue')['readonly']; + const ref: typeof import('vue')['ref']; + const resolveComponent: typeof import('vue')['resolveComponent']; + const resolveDirective: typeof import('vue')['resolveDirective']; + const setActivePinia: typeof import('pinia')['setActivePinia']; + const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']; + const shallowReactive: typeof import('vue')['shallowReactive']; + const shallowReadonly: typeof import('vue')['shallowReadonly']; + const shallowRef: typeof import('vue')['shallowRef']; + const storeToRefs: typeof import('pinia')['storeToRefs']; + const toRaw: typeof import('vue')['toRaw']; + const toRef: typeof import('vue')['toRef']; + const toRefs: typeof import('vue')['toRefs']; + const triggerRef: typeof import('vue')['triggerRef']; + const unref: typeof import('vue')['unref']; + const useAttrs: typeof import('vue')['useAttrs']; + const useCssModule: typeof import('vue')['useCssModule']; + const useCssVars: typeof import('vue')['useCssVars']; + const useLink: typeof import('vue-router')['useLink']; + const useRoute: typeof import('vue-router')['useRoute']; + const useRouter: typeof import('vue-router')['useRouter']; + const useSlots: typeof import('vue')['useSlots']; + const watch: typeof import('vue')['watch']; + const watchEffect: typeof import('vue')['watchEffect']; + const watchPostEffect: typeof import('vue')['watchPostEffect']; + const watchSyncEffect: typeof import('vue')['watchSyncEffect']; } diff --git a/src/api/admin/user.ts b/src/api/admin/user.ts index 5dbc850..f935c94 100644 --- a/src/api/admin/user.ts +++ b/src/api/admin/user.ts @@ -153,3 +153,13 @@ export function getUserListByRole(obj: string) { method: 'get', }); } + +/** + * 模拟登录(管理员以指定用户身份登录) + */ +export function simulateLogin(userId: string) { + return request({ + url: '/auth/token/simulate/' + userId, + method: 'get', + }); +} diff --git a/src/api/purchase/bidfile.ts b/src/api/purchase/bidfile.ts index c0a043c..a9d58d2 100644 --- a/src/api/purchase/bidfile.ts +++ b/src/api/purchase/bidfile.ts @@ -69,11 +69,7 @@ export function uploadBidFileNewVersion(data: { }); } -export function submitBidFileTask(data: { - runJobId: string; - to?: number; - comment?: string; -}) { +export function submitBidFileTask(data: { runJobId: string; to?: number; comment?: string }) { return request({ url: '/purchase/purchasingbidfile/submit', method: 'post', @@ -121,13 +117,7 @@ export function getFlowPurchaseDetail(purchaseId: string) { }); } -export function tempStoreBidFile(data: { - purchaseId: string; - fileId?: string; - fileName?: string; - fileUrl?: string; - comment?: string; -}) { +export function tempStoreBidFile(data: { purchaseId: string; fileId?: string; fileName?: string; fileUrl?: string; comment?: string }) { return request({ url: '/purchase/purchasingbidfile/tempStore', method: 'post', @@ -141,4 +131,4 @@ export function submitBidFile(purchaseId: string) { method: 'post', params: { purchaseId }, }); -} \ No newline at end of file +} diff --git a/src/flow/components/handle-job/dynamic-iframe.vue b/src/flow/components/handle-job/dynamic-iframe.vue index 5085448..27e679e 100644 --- a/src/flow/components/handle-job/dynamic-iframe.vue +++ b/src/flow/components/handle-job/dynamic-iframe.vue @@ -31,7 +31,7 @@ const init = () => { let flowInstId = props.currJob.flowInstId; let runJobId = props.currJob.id; src.value = props.currElTab.path + `?token=${token}&tenantId=${tenantId}&flowInstId=${flowInstId}&runJobId=${runJobId}`; - console.log(src.value) + console.log(src.value); }; function handleJob(jobBtn) { diff --git a/src/views/admin/system/user/index.vue b/src/views/admin/system/user/index.vue index 7c47b62..7b61b61 100644 --- a/src/views/admin/system/user/index.vue +++ b/src/views/admin/system/user/index.vue @@ -95,9 +95,20 @@ - + + + + 模拟登录 + @@ -142,22 +153,31 @@ url="/admin/user/import" @refreshDataList="getDataList" /> + + diff --git a/src/views/purchase/purchasingrequisition/DocAuditViewDialog.vue b/src/views/purchase/purchasingrequisition/DocAuditViewDialog.vue index 83c27b2..ee999fb 100644 --- a/src/views/purchase/purchasingrequisition/DocAuditViewDialog.vue +++ b/src/views/purchase/purchasingrequisition/DocAuditViewDialog.vue @@ -20,7 +20,9 @@ {{ applyData.purchaseNo || '-' }} {{ applyData.projectName || '-' }} - {{ applyData.budget ? Number(applyData.budget).toLocaleString() + ' 元' : '-' }} + {{ + applyData.budget ? Number(applyData.budget).toLocaleString() + ' 元' : '-' + }} {{ applyData.agentName || '-' }} 运行中 @@ -38,8 +40,8 @@ 招标文件 - - + + {{ scope.row.version || '-' }} @@ -151,7 +153,7 @@ const open = async (id: string, row?: any) => { const docsRes = await getDocList(applyData.value.id); const docs = docsRes?.data || []; if (Array.isArray(docs) && docs.length > 0) { -docList.value = docs.map((d: any) => ({ + docList.value = docs.map((d: any) => ({ id: d.id || d.fileId, fileName: d.fileName || d.fileTitle || '招标文件', fileUrl: d.fileUrl, @@ -265,4 +267,4 @@ defineExpose({ :deep(.el-card__body) { padding: 12px 16px; } - \ No newline at end of file + diff --git a/src/views/purchase/purchasingrequisition/SupplementFilesDialog.vue b/src/views/purchase/purchasingrequisition/SupplementFilesDialog.vue index 01fee83..9b54894 100644 --- a/src/views/purchase/purchasingrequisition/SupplementFilesDialog.vue +++ b/src/views/purchase/purchasingrequisition/SupplementFilesDialog.vue @@ -19,11 +19,7 @@ 采购相关文件补充上传 - + {{ requiredFileTypeName }}必传 当前采购方式无需补充材料 @@ -246,4 +242,4 @@ defineExpose({ font-size: 12px; color: #909399; } - \ No newline at end of file + diff --git a/src/views/purchase/purchasingrequisition/SupplementViewDialog.vue b/src/views/purchase/purchasingrequisition/SupplementViewDialog.vue index 050b7e5..5b2873c 100644 --- a/src/views/purchase/purchasingrequisition/SupplementViewDialog.vue +++ b/src/views/purchase/purchasingrequisition/SupplementViewDialog.vue @@ -20,7 +20,9 @@ {{ applyData.purchaseNo || '-' }} {{ applyData.projectName || '-' }} - {{ applyData.budget ? Number(applyData.budget).toLocaleString() + ' 元' : '-' }} + {{ + applyData.budget ? Number(applyData.budget).toLocaleString() + ' 元' : '-' + }} {{ purchaseTypeLabel || '-' }} 已完成 @@ -313,4 +315,4 @@ defineExpose({ :deep(.el-card__body) { padding: 12px 16px; } - \ No newline at end of file + diff --git a/src/views/purchase/purchasingrequisition/add.vue b/src/views/purchase/purchasingrequisition/add.vue index 93c63bf..5388483 100644 --- a/src/views/purchase/purchasingrequisition/add.vue +++ b/src/views/purchase/purchasingrequisition/add.vue @@ -11,9 +11,9 @@ - - - + + + - + - + 下载《{{ getTemplateName('invite_select') }}》模版 - + - + 下载《{{ getTemplateName('public_select') }}》模版 - + isDeptPurchase.value], + [() => isDeptPurchase.value], () => { if (isDeptPurchase.value) return; }, @@ -1586,37 +1586,16 @@ watch( // 下载模版:统一走后端接口,按原始文件下载(避免前端静态资源被当成 HTML 返回) const downloadTemplate = async (type: string) => { - // 优先从后台模版列表获取模版名称 + // 从后台模版列表获取模版名称(templateName 包含原始文件扩展名) const backendTemplate = templateList.value.find((t: any) => t.templateType === type); - let displayName = ''; - if (backendTemplate?.templateTitle) { - displayName = backendTemplate.templateTitle; - } else { - // 后备:使用本地硬编码的名称 - const templateMap: Record = { - business_negotiation: '商务洽谈表.doc', - market_purchase_minutes: '部门自行采购市场采购纪要.doc', - inquiry: '部门采购询价模版.doc', - direct_select: '服务商城项目需求模板(直选).doc', - public_select: '服务商城项目需求模板(公开比选).doc', - invite_select: '服务商城项目需求模板(邀请比选).doc', - purchase_requirement: '采购需求填报模板.doc', - import_application: '进口产品申请及专家论证意见表.doc', - single_source: '单一来源论专家证附件.docx', - feasibility_report: '项目可行性论证报告模板.doc', - gov_pur_int: '政府采购意向申请表.doc', - }; - displayName = templateMap[type] || ''; - } - - if (!displayName) { - useMessage().error('模版不存在'); + if (!backendTemplate?.templateName) { + useMessage().error('模版不存在或未维护模版文件,请联系管理员'); return; } try { - await other.downBlobFile(`/purchase/purchasingtemplate/download?type=${encodeURIComponent(type)}`, {}, displayName); + await other.downBlobFile(`/purchase/purchasingtemplate/download?type=${encodeURIComponent(type)}`, {}, backendTemplate.templateName); useMessage().success('模版下载成功'); } catch (err) { useMessage().error('模版下载失败,请联系管理员维护模版文件'); diff --git a/src/views/purchase/purchasingrequisition/bidfile-audit.vue b/src/views/purchase/purchasingrequisition/bidfile-audit.vue index 5483171..5a41980 100644 --- a/src/views/purchase/purchasingrequisition/bidfile-audit.vue +++ b/src/views/purchase/purchasingrequisition/bidfile-audit.vue @@ -157,7 +157,7 @@ accept=".doc,.docx" :disabled="isViewMode" > -选择文件 + 选择文件 仅支持 doc、docx 格式,单文件不超过 50MB,上传后自动保存 @@ -183,7 +183,7 @@ :disabled="isViewMode" maxlength="500" show-word-limit -/> + /> @@ -221,7 +221,7 @@ 待设置 - + @@ -232,13 +232,7 @@ - + - - {{ currentRepresentor.realName }} ({{ currentRepresentor.teacherNo }}) - + {{ currentRepresentor.realName }} ({{ currentRepresentor.teacherNo }}) @@ -293,12 +285,7 @@ - + 保存参与人信息 @@ -399,7 +386,7 @@ const isFileAudit = computed(() => currentUserRoleCodes.value.includes('PURCHASE // 是否显示上传区域 const showUploadSection = computed(() => { if (isViewMode.value) return false; - if (isAgent.value ) return true; + if (isAgent.value) return true; if (isAsset.value || isDeptApply.value || isFileAudit.value) return true; return false; }); @@ -492,7 +479,7 @@ const effectivePurchaseId = computed(() => { if (props.currJob?.orderId) { return String(props.currJob.orderId); } - return route.query.id as string || route.query.purchaseId as string || ''; + return (route.query.id as string) || (route.query.purchaseId as string) || ''; }); // 是否可以提交(非查看模式即可提交,不强制要求上传文件) @@ -630,25 +617,25 @@ const handleDownload = (row: any) => { }; // 手动保存上传的招标文件 - const handleSaveBidFile = async () => { - if (!uploadForm.fileId) { - ElMessage.warning('请先上传招标文件'); - return; - } +const handleSaveBidFile = async () => { + if (!uploadForm.fileId) { + ElMessage.warning('请先上传招标文件'); + return; + } - saveLoading.value = true; - try { - const saved = await saveUploadedFile(); - if (saved) { - ElMessage.success('招标文件保存成功,版本已更新'); - } - } finally { - saveLoading.value = false; + saveLoading.value = true; + try { + const saved = await saveUploadedFile(); + if (saved) { + ElMessage.success('招标文件保存成功,版本已更新'); } - }; + } finally { + saveLoading.value = false; + } +}; - // 保存上传的招标文件 - const saveUploadedFile = async () => { +// 保存上传的招标文件 +const saveUploadedFile = async () => { if (!uploadForm.fileId) { ElMessage.warning('请先上传招标文件'); return false; @@ -715,7 +702,7 @@ const handleFlowSave = async () => { const saved = await saveUploadedFile(); if (!saved) return false; } - + // 自动调用暂存接口(可以没有文件) try { const params = { @@ -724,7 +711,7 @@ const handleFlowSave = async () => { fileName: uploadForm.fileName || '', fileUrl: uploadForm.fileUrl || '', comment: uploadForm.comment || '', - flowTarget: flowTarget.value || '' + flowTarget: flowTarget.value || '', }; const res = await tempStoreBidFile(params); @@ -735,8 +722,6 @@ const handleFlowSave = async () => { currElTabIsSave(props.currJob, props.currElTab.id, true, emit); } - - return true; } else { ElMessage.error(res.msg || '暂存失败'); @@ -783,10 +768,7 @@ const handleRandomSelect = async () => { try { randomSelectLoading.value = true; - const res = await randomSelectRepresentor( - effectivePurchaseId.value, - randomCandidates.value.join(',') - ); + const res = await randomSelectRepresentor(effectivePurchaseId.value, randomCandidates.value.join(',')); if (res.code === 0 && res.data) { currentRepresentor.value = res.data; ElMessage.success(`随机抽取成功:${res.data.realName}`); @@ -816,12 +798,7 @@ const handleSaveRepresentor = async () => { let res: any; if (representorSelectMode.value === 'designate') { - res = await saveRepresentor( - Number(effectivePurchaseId.value), - selectedRepresentor.value, - undefined, - representorType.value - ); + res = await saveRepresentor(Number(effectivePurchaseId.value), selectedRepresentor.value, undefined, representorType.value); } else { res = await saveRepresentor( Number(effectivePurchaseId.value), @@ -959,4 +936,4 @@ watch( height: auto; line-height: 1.5; } - \ No newline at end of file + diff --git a/src/views/purchase/purchasingrequisition/implement.vue b/src/views/purchase/purchasingrequisition/implement.vue index 82cc465..0193ae9 100644 --- a/src/views/purchase/purchasingrequisition/implement.vue +++ b/src/views/purchase/purchasingrequisition/implement.vue @@ -78,9 +78,9 @@ 发送招标代理 - - - + + + @@ -287,15 +287,11 @@ const handleSendToAgent = async () => { // 确认弹窗 try { - await ElMessageBox.confirm( - '是否确认发送至招标代理启动招标文件审核流程?', - '确认发送', - { - confirmButtonText: '确认', - cancelButtonText: '取消', - type: 'warning', - } - ); + await ElMessageBox.confirm('是否确认发送至招标代理启动招标文件审核流程?', '确认发送', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning', + }); } catch { // 用户取消 return; diff --git a/src/views/purchase/purchasingrequisition/implementForm.vue b/src/views/purchase/purchasingrequisition/implementForm.vue index 8e24baf..0966e66 100644 --- a/src/views/purchase/purchasingrequisition/implementForm.vue +++ b/src/views/purchase/purchasingrequisition/implementForm.vue @@ -5,7 +5,7 @@ diff --git a/src/views/purchase/purchasingrequisition/index.vue b/src/views/purchase/purchasingrequisition/index.vue index 4bc878a..a3262d2 100644 --- a/src/views/purchase/purchasingrequisition/index.vue +++ b/src/views/purchase/purchasingrequisition/index.vue @@ -55,7 +55,7 @@ 采购申请管理 - + 新增 @@ -283,10 +283,18 @@ 运行中 - 完成 - 作废 - + {{ requiredFileTypeName }} @@ -274,4 +269,4 @@ onMounted(() => { height: 100%; border: none; } - \ No newline at end of file + diff --git a/src/views/stuwork/activityawards/index.vue b/src/views/stuwork/activityawards/index.vue index 5960614..b28eb3a 100644 --- a/src/views/stuwork/activityawards/index.vue +++ b/src/views/stuwork/activityawards/index.vue @@ -12,7 +12,6 @@ 新增 导入 - 导出 - - - 下载模板 - - - - 将文件拖到此处,或点击上传 - - 只能上传 xlsx/xls 文件 - - - - - 取 消 - 确 认 - - - + diff --git a/src/views/stuwork/activityinfosubsignup/index.vue b/src/views/stuwork/activityinfosubsignup/index.vue index 5e246f0..7ddb49d 100644 --- a/src/views/stuwork/activityinfosubsignup/index.vue +++ b/src/views/stuwork/activityinfosubsignup/index.vue @@ -131,7 +131,8 @@