chore(frontend): 提交当前前端改动
parent
38eea9b55b
commit
b3eaefc511
|
|
@ -4,7 +4,8 @@ NODE_ENV=development
|
||||||
VITE_DEV=true
|
VITE_DEV=true
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://localhost:48080'
|
# 本地开发改为相对路径,便于通过局域网访问当前 Mac 上的 Vite 代理
|
||||||
|
VITE_BASE_URL=''
|
||||||
|
|
||||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
||||||
VITE_UPLOAD_TYPE=client
|
VITE_UPLOAD_TYPE=client
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ export interface UserVO {
|
||||||
nickname: string
|
nickname: string
|
||||||
deptId: number
|
deptId: number
|
||||||
deptName?: string
|
deptName?: string
|
||||||
|
parentDeptName?: string
|
||||||
postIds: string[]
|
postIds: string[]
|
||||||
email: string
|
email: string
|
||||||
mobile: string
|
mobile: string
|
||||||
|
|
|
||||||
|
|
@ -74,104 +74,6 @@
|
||||||
<el-input v-model="formData.host" placeholder="请输入会议主持人" :disabled="isView" />
|
<el-input v-model="formData.host" placeholder="请输入会议主持人" :disabled="isView" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="议程附件" prop="agendaAttachmentUrl">
|
|
||||||
<div class="agenda-attachment-wrap">
|
|
||||||
<div v-if="!isView" class="agenda-action-row">
|
|
||||||
<el-upload
|
|
||||||
:auto-upload="false"
|
|
||||||
:show-file-list="false"
|
|
||||||
accept=".docx,.pdf,.png,.jpg,.jpeg,.gif,.bmp,.webp"
|
|
||||||
:on-change="handleAgendaAttachmentChange"
|
|
||||||
>
|
|
||||||
<button type="button" class="btn-upload">上传议程附件</button>
|
|
||||||
</el-upload>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn-generate"
|
|
||||||
:disabled="formLoading"
|
|
||||||
@click="handleGenerateAgenda"
|
|
||||||
>
|
|
||||||
自动生成议程
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<span class="upload-hint">支持 DOCX、PDF、图片;固定单附件,可生成后再手工替换</span>
|
|
||||||
<div v-if="formData.agendaAttachmentUrl" class="agenda-file-line">
|
|
||||||
<el-link type="primary" :underline="false" @click="previewAgendaAttachment">
|
|
||||||
{{ formData.agendaAttachmentName }}
|
|
||||||
</el-link>
|
|
||||||
<el-tag size="small">{{
|
|
||||||
(formData.agendaAttachmentType || '').toUpperCase()
|
|
||||||
}}</el-tag>
|
|
||||||
<el-text type="info" size="small">{{
|
|
||||||
formatFileSize(formData.agendaAttachmentSize)
|
|
||||||
}}</el-text>
|
|
||||||
<el-button v-if="!isView" type="danger" link @click="clearAgendaAttachment"
|
|
||||||
>移除</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="会议纪要" prop="minutesAttachmentUrl">
|
|
||||||
<div class="agenda-attachment-wrap">
|
|
||||||
<el-upload
|
|
||||||
v-if="!isView"
|
|
||||||
:auto-upload="false"
|
|
||||||
:show-file-list="false"
|
|
||||||
accept=".doc,.docx,.pdf,.png,.jpg,.jpeg,.gif,.bmp,.webp"
|
|
||||||
:on-change="handleMinutesAttachmentChange"
|
|
||||||
>
|
|
||||||
<button type="button" class="btn-upload">上传会议纪要</button>
|
|
||||||
</el-upload>
|
|
||||||
<span class="upload-hint">支持 Word、PDF、图片;结束会议前必须上传</span>
|
|
||||||
<span v-if="!meetingId && !isView" class="upload-hint">请先保存会议后再上传纪要</span>
|
|
||||||
<div v-if="formData.minutesAttachmentUrl" class="agenda-file-line">
|
|
||||||
<el-link type="primary" :underline="false" @click="previewMinutesAttachment">
|
|
||||||
{{ formData.minutesAttachmentName }}
|
|
||||||
</el-link>
|
|
||||||
<el-tag size="small">{{
|
|
||||||
(formData.minutesAttachmentType || '').toUpperCase()
|
|
||||||
}}</el-tag>
|
|
||||||
<el-text type="info" size="small">{{
|
|
||||||
formatFileSize(formData.minutesAttachmentSize)
|
|
||||||
}}</el-text>
|
|
||||||
<el-button v-if="!isView" type="danger" link @click="clearMinutesAttachment"
|
|
||||||
>移除</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-if="formData.minutesAttachmentUrl && formData.minutesAiStatusName"
|
|
||||||
class="minutes-ai-line"
|
|
||||||
>
|
|
||||||
<el-tag size="small" :type="getMinutesAiTagType(formData.minutesAiStatus)">
|
|
||||||
{{ formData.minutesAiStatusName }}
|
|
||||||
</el-tag>
|
|
||||||
<el-text v-if="formData.minutesAiUpdatedTime" type="info" size="small">
|
|
||||||
最近生成:{{ formData.minutesAiUpdatedTime }}
|
|
||||||
</el-text>
|
|
||||||
<el-text v-if="formData.minutesAiErrorMessage" type="danger" size="small">
|
|
||||||
{{ formData.minutesAiErrorMessage }}
|
|
||||||
</el-text>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<!-- 评审专家 -->
|
|
||||||
<div class="section-header"><span class="section-title">评审专家</span></div>
|
|
||||||
<el-row :gutter="16">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="参会专家" prop="expertIds">
|
|
||||||
<ExpertSelectTable
|
|
||||||
v-model="formData.expertIds"
|
|
||||||
:experts="expertOptions"
|
|
||||||
:disabled="isView"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 评审项目 -->
|
<!-- 评审项目 -->
|
||||||
|
|
@ -206,6 +108,77 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<el-empty v-else-if="isView" description="暂无评审项目" :image-size="60" />
|
<el-empty v-else-if="isView" description="暂无评审项目" :image-size="60" />
|
||||||
|
|
||||||
|
<!-- 评审专家 -->
|
||||||
|
<div class="section-header"><span class="section-title">评审专家</span></div>
|
||||||
|
<ExpertSelectTable
|
||||||
|
v-model="formData.expertIds"
|
||||||
|
:experts="expertOptions"
|
||||||
|
:disabled="isView"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 会议附件 -->
|
||||||
|
<div class="section-header"><span class="section-title">会议附件</span></div>
|
||||||
|
<div class="attachment-cards">
|
||||||
|
<!-- 议程附件卡片 -->
|
||||||
|
<div class="attachment-card">
|
||||||
|
<div class="attachment-card-header">
|
||||||
|
<span class="attachment-card-title">议程附件</span>
|
||||||
|
</div>
|
||||||
|
<div class="attachment-card-body">
|
||||||
|
<div v-if="formData.agendaAttachmentUrl" class="attachment-file-info">
|
||||||
|
<el-link type="primary" :underline="false" @click="previewAgendaAttachment">
|
||||||
|
{{ formData.agendaAttachmentName }}
|
||||||
|
</el-link>
|
||||||
|
<el-tag size="small">{{
|
||||||
|
(formData.agendaAttachmentType || '').toUpperCase()
|
||||||
|
}}</el-tag>
|
||||||
|
<el-text type="info" size="small">{{
|
||||||
|
formatFileSize(formData.agendaAttachmentSize)
|
||||||
|
}}</el-text>
|
||||||
|
<el-button v-if="!isView" type="danger" link @click="clearAgendaAttachment"
|
||||||
|
>移除</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<el-empty v-else description="暂无议程附件" :image-size="40" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 会议纪要卡片 -->
|
||||||
|
<div class="attachment-card">
|
||||||
|
<div class="attachment-card-header">
|
||||||
|
<span class="attachment-card-title">会议纪要</span>
|
||||||
|
</div>
|
||||||
|
<div class="attachment-card-body">
|
||||||
|
<div v-if="formData.minutesAttachmentUrl" class="attachment-file-info">
|
||||||
|
<el-link type="primary" :underline="false" @click="previewMinutesAttachment">
|
||||||
|
{{ formData.minutesAttachmentName }}
|
||||||
|
</el-link>
|
||||||
|
<el-tag size="small">{{
|
||||||
|
(formData.minutesAttachmentType || '').toUpperCase()
|
||||||
|
}}</el-tag>
|
||||||
|
<el-text type="info" size="small">{{
|
||||||
|
formatFileSize(formData.minutesAttachmentSize)
|
||||||
|
}}</el-text>
|
||||||
|
</div>
|
||||||
|
<el-empty v-else description="暂无会议纪要" :image-size="40" />
|
||||||
|
<div
|
||||||
|
v-if="formData.minutesAttachmentUrl && formData.minutesAiStatusName"
|
||||||
|
class="minutes-ai-line"
|
||||||
|
>
|
||||||
|
<el-tag size="small" :type="getMinutesAiTagType(formData.minutesAiStatus)">
|
||||||
|
{{ formData.minutesAiStatusName }}
|
||||||
|
</el-tag>
|
||||||
|
<el-text v-if="formData.minutesAiUpdatedTime" type="info" size="small">
|
||||||
|
最近生成:{{ formData.minutesAiUpdatedTime }}
|
||||||
|
</el-text>
|
||||||
|
<el-text v-if="formData.minutesAiErrorMessage" type="danger" size="small">
|
||||||
|
{{ formData.minutesAiErrorMessage }}
|
||||||
|
</el-text>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<!-- 底部操作区 -->
|
<!-- 底部操作区 -->
|
||||||
|
|
@ -217,10 +190,60 @@
|
||||||
:disabled="formLoading"
|
:disabled="formLoading"
|
||||||
@click="submitForm"
|
@click="submitForm"
|
||||||
>
|
>
|
||||||
{{ formLoading ? '保存中...' : '保存草稿' }}
|
{{ formLoading ? '提交中...' : '提交' }}
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn-default" @click="handleBack">返回</button>
|
<button type="button" class="btn-default" @click="handleBack">返回</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 上传议程附件弹窗 -->
|
||||||
|
<el-dialog
|
||||||
|
v-model="agendaDialogVisible"
|
||||||
|
title="上传议程附件"
|
||||||
|
width="500px"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<div class="agenda-dialog-content">
|
||||||
|
<div class="agenda-dialog-buttons">
|
||||||
|
<div class="btn-wrapper">
|
||||||
|
<el-upload
|
||||||
|
:auto-upload="false"
|
||||||
|
:show-file-list="false"
|
||||||
|
accept=".docx,.pdf,.png,.jpg,.jpeg,.gif,.bmp,.webp"
|
||||||
|
:on-change="handleDialogAgendaUpload"
|
||||||
|
>
|
||||||
|
<button type="button" class="btn-dialog-action">上传议程附件</button>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
<div class="btn-wrapper">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn-dialog-action"
|
||||||
|
:disabled="agendaDialogLoading"
|
||||||
|
@click="handleDialogGenerateAgenda"
|
||||||
|
>
|
||||||
|
AI生成议程
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="upload-hint">支持 DOCX、PDF、图片;固定单附件</span>
|
||||||
|
<div v-if="formData.agendaAttachmentUrl" class="agenda-file-line mt-10">
|
||||||
|
<el-link type="primary" :underline="false" @click="previewAgendaAttachment">
|
||||||
|
{{ formData.agendaAttachmentName }}
|
||||||
|
</el-link>
|
||||||
|
<el-tag size="small">{{
|
||||||
|
(formData.agendaAttachmentType || '').toUpperCase()
|
||||||
|
}}</el-tag>
|
||||||
|
<el-text type="info" size="small">{{
|
||||||
|
formatFileSize(formData.agendaAttachmentSize)
|
||||||
|
}}</el-text>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<el-button type="primary" :disabled="agendaDialogLoading" @click="handleDialogConfirm">
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -238,7 +261,6 @@ import {
|
||||||
getImportTemplate,
|
getImportTemplate,
|
||||||
generateAgendaAttachment,
|
generateAgendaAttachment,
|
||||||
uploadAgendaAttachment,
|
uploadAgendaAttachment,
|
||||||
uploadMinutesAttachment,
|
|
||||||
type ReviewMeetingAgendaGenerateReqVO,
|
type ReviewMeetingAgendaGenerateReqVO,
|
||||||
type ReviewMeetingSaveReqVO,
|
type ReviewMeetingSaveReqVO,
|
||||||
type ReviewProjectItemVO
|
type ReviewProjectItemVO
|
||||||
|
|
@ -270,6 +292,10 @@ const expertOptions = ref<any[]>([])
|
||||||
const isProjectsModified = ref(false)
|
const isProjectsModified = ref(false)
|
||||||
const meetingLocationOptions = ['东5楼326', '南6楼203', '南6楼207']
|
const meetingLocationOptions = ['东5楼326', '南6楼203', '南6楼207']
|
||||||
|
|
||||||
|
// 上传会议附件弹窗
|
||||||
|
const agendaDialogVisible = ref(false)
|
||||||
|
const agendaDialogLoading = ref(false)
|
||||||
|
|
||||||
// 从路由参数判断模式
|
// 从路由参数判断模式
|
||||||
const meetingId = computed(() => {
|
const meetingId = computed(() => {
|
||||||
const id = route.params.id
|
const id = route.params.id
|
||||||
|
|
@ -331,7 +357,6 @@ const rules: FormRules = {
|
||||||
meetingTimeRange: [{ required: true, message: '会议时间不能为空', trigger: 'change' }],
|
meetingTimeRange: [{ required: true, message: '会议时间不能为空', trigger: 'change' }],
|
||||||
location: [{ required: true, message: '会议地点不能为空', trigger: 'blur' }],
|
location: [{ required: true, message: '会议地点不能为空', trigger: 'blur' }],
|
||||||
host: [{ required: true, message: '会议主持人不能为空', trigger: 'blur' }],
|
host: [{ required: true, message: '会议主持人不能为空', trigger: 'blur' }],
|
||||||
agendaAttachmentUrl: [{ required: true, message: '议程附件不能为空', trigger: 'change' }],
|
|
||||||
expertIds: [
|
expertIds: [
|
||||||
{ required: true, type: 'array', min: 1, message: '至少选择一位专家', trigger: 'change' }
|
{ required: true, type: 'array', min: 1, message: '至少选择一位专家', trigger: 'change' }
|
||||||
]
|
]
|
||||||
|
|
@ -502,80 +527,11 @@ const handleDownloadTemplate = async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleAgendaAttachmentChange = async (uploadFile: UploadFile) => {
|
|
||||||
if (!uploadFile.raw) return
|
|
||||||
const ext = uploadFile.raw.name.includes('.')
|
|
||||||
? uploadFile.raw.name.substring(uploadFile.raw.name.lastIndexOf('.') + 1).toLowerCase()
|
|
||||||
: ''
|
|
||||||
const isDocx = ext === 'docx'
|
|
||||||
const isPdf = ext === 'pdf' || uploadFile.raw.type === 'application/pdf'
|
|
||||||
const isImage = uploadFile.raw.type?.startsWith('image/')
|
|
||||||
if (!isDocx && !isPdf && !isImage) {
|
|
||||||
ElMessage.error('议程附件仅支持 DOCX、PDF 或图片')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
formLoading.value = true
|
|
||||||
try {
|
|
||||||
const attachment = await uploadAgendaAttachment(uploadFile.raw)
|
|
||||||
formData.agendaAttachmentName = attachment.name
|
|
||||||
formData.agendaAttachmentUrl = attachment.url
|
|
||||||
formData.agendaAttachmentType = attachment.type
|
|
||||||
formData.agendaAttachmentSize = attachment.size
|
|
||||||
formRef.value?.clearValidate('agendaAttachmentUrl')
|
|
||||||
ElMessage.success('议程附件上传成功')
|
|
||||||
} finally {
|
|
||||||
formLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const clearAgendaAttachment = () => {
|
const clearAgendaAttachment = () => {
|
||||||
formData.agendaAttachmentName = undefined
|
formData.agendaAttachmentName = undefined
|
||||||
formData.agendaAttachmentUrl = undefined
|
formData.agendaAttachmentUrl = undefined
|
||||||
formData.agendaAttachmentType = undefined
|
formData.agendaAttachmentType = undefined
|
||||||
formData.agendaAttachmentSize = undefined
|
formData.agendaAttachmentSize = undefined
|
||||||
formRef.value?.validateField('agendaAttachmentUrl')
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleMinutesAttachmentChange = async (uploadFile: UploadFile) => {
|
|
||||||
if (!uploadFile.raw) return
|
|
||||||
if (!meetingId.value) {
|
|
||||||
ElMessage.warning('请先保存会议后再上传纪要')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const ext = uploadFile.raw.name.includes('.')
|
|
||||||
? uploadFile.raw.name.substring(uploadFile.raw.name.lastIndexOf('.') + 1).toLowerCase()
|
|
||||||
: ''
|
|
||||||
const allowed = ['doc', 'docx', 'pdf', 'png', 'jpg', 'jpeg', 'gif', 'bmp', 'webp']
|
|
||||||
if (!allowed.includes(ext)) {
|
|
||||||
ElMessage.error('会议纪要仅支持 Word、PDF 或图片')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
formLoading.value = true
|
|
||||||
try {
|
|
||||||
const attachment = await uploadMinutesAttachment(meetingId.value, uploadFile.raw)
|
|
||||||
formData.minutesAttachmentName = attachment.name
|
|
||||||
formData.minutesAttachmentUrl = attachment.url
|
|
||||||
formData.minutesAttachmentType = attachment.type
|
|
||||||
formData.minutesAttachmentSize = attachment.size
|
|
||||||
formData.minutesAiStatus = 1
|
|
||||||
formData.minutesAiStatusName = '生成中'
|
|
||||||
formData.minutesAiErrorMessage = undefined
|
|
||||||
formData.minutesAiUpdatedTime = undefined
|
|
||||||
ElMessage.success('会议纪要上传成功,整改通知后台生成中')
|
|
||||||
} finally {
|
|
||||||
formLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const clearMinutesAttachment = () => {
|
|
||||||
formData.minutesAttachmentName = undefined
|
|
||||||
formData.minutesAttachmentUrl = undefined
|
|
||||||
formData.minutesAttachmentType = undefined
|
|
||||||
formData.minutesAttachmentSize = undefined
|
|
||||||
formData.minutesAiStatus = undefined
|
|
||||||
formData.minutesAiStatusName = undefined
|
|
||||||
formData.minutesAiErrorMessage = undefined
|
|
||||||
formData.minutesAiUpdatedTime = undefined
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const previewAgendaAttachment = () => {
|
const previewAgendaAttachment = () => {
|
||||||
|
|
@ -662,24 +618,6 @@ const buildAgendaGenerateData = (): ReviewMeetingAgendaGenerateReqVO | undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleGenerateAgenda = async () => {
|
|
||||||
if (formLoading.value) return
|
|
||||||
const generateData = buildAgendaGenerateData()
|
|
||||||
if (!generateData) return
|
|
||||||
formLoading.value = true
|
|
||||||
try {
|
|
||||||
const attachment = await generateAgendaAttachment(generateData)
|
|
||||||
formData.agendaAttachmentName = attachment.name
|
|
||||||
formData.agendaAttachmentUrl = attachment.url
|
|
||||||
formData.agendaAttachmentType = attachment.type
|
|
||||||
formData.agendaAttachmentSize = attachment.size
|
|
||||||
formRef.value?.clearValidate('agendaAttachmentUrl')
|
|
||||||
ElMessage.success('议程附件已生成')
|
|
||||||
} finally {
|
|
||||||
formLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const submitForm = async () => {
|
const submitForm = async () => {
|
||||||
if (formLoading.value) return
|
if (formLoading.value) return
|
||||||
const valid = await formRef.value?.validate().catch(() => false)
|
const valid = await formRef.value?.validate().catch(() => false)
|
||||||
|
|
@ -688,6 +626,8 @@ const submitForm = async () => {
|
||||||
formData.startTime = formData.meetingTimeRange[0]
|
formData.startTime = formData.meetingTimeRange[0]
|
||||||
formData.endTime = formData.meetingTimeRange[1]
|
formData.endTime = formData.meetingTimeRange[1]
|
||||||
}
|
}
|
||||||
|
// 编辑模式且有议程附件:直接保存
|
||||||
|
if (isEdit.value && formData.agendaAttachmentUrl) {
|
||||||
formLoading.value = true
|
formLoading.value = true
|
||||||
try {
|
try {
|
||||||
const projects = buildScheduledProjects()
|
const projects = buildScheduledProjects()
|
||||||
|
|
@ -696,10 +636,9 @@ const submitForm = async () => {
|
||||||
...formData,
|
...formData,
|
||||||
projects: submitProjects
|
projects: submitProjects
|
||||||
}
|
}
|
||||||
if (isEdit.value && !isProjectsModified.value) {
|
if (!isProjectsModified.value) {
|
||||||
delete submitData.projects
|
delete submitData.projects
|
||||||
}
|
}
|
||||||
if (isEdit.value) {
|
|
||||||
await updateReviewMeeting(submitData)
|
await updateReviewMeeting(submitData)
|
||||||
const shouldSyncProjectTimes = shouldSyncPersistedProjectTimes({
|
const shouldSyncProjectTimes = shouldSyncPersistedProjectTimes({
|
||||||
isEdit: isEdit.value,
|
isEdit: isEdit.value,
|
||||||
|
|
@ -716,15 +655,88 @@ const submitForm = async () => {
|
||||||
}
|
}
|
||||||
originalMeetingStart.value = formData.meetingTimeRange?.[0]
|
originalMeetingStart.value = formData.meetingTimeRange?.[0]
|
||||||
ElMessage.success('更新成功')
|
ElMessage.success('更新成功')
|
||||||
} else {
|
|
||||||
await createReviewMeeting(submitData)
|
|
||||||
originalMeetingStart.value = formData.meetingTimeRange?.[0]
|
|
||||||
ElMessage.success('创建成功,会议已保存为草稿')
|
|
||||||
}
|
|
||||||
router.push({ name: 'ReviewMeeting' })
|
router.push({ name: 'ReviewMeeting' })
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 新建模式或编辑模式下议程附件为空:弹出上传议程附件弹窗
|
||||||
|
agendaDialogVisible.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 弹窗内上传议程附件
|
||||||
|
const handleDialogAgendaUpload = async (uploadFile: UploadFile) => {
|
||||||
|
if (!uploadFile.raw) return
|
||||||
|
const ext = uploadFile.raw.name.includes('.')
|
||||||
|
? uploadFile.raw.name.substring(uploadFile.raw.name.lastIndexOf('.') + 1).toLowerCase()
|
||||||
|
: ''
|
||||||
|
const isDocx = ext === 'docx'
|
||||||
|
const isPdf = ext === 'pdf' || uploadFile.raw.type === 'application/pdf'
|
||||||
|
const isImage = uploadFile.raw.type?.startsWith('image/')
|
||||||
|
if (!isDocx && !isPdf && !isImage) {
|
||||||
|
ElMessage.error('议程附件仅支持 DOCX、PDF 或图片')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
agendaDialogLoading.value = true
|
||||||
|
try {
|
||||||
|
const attachment = await uploadAgendaAttachment(uploadFile.raw)
|
||||||
|
formData.agendaAttachmentName = attachment.name
|
||||||
|
formData.agendaAttachmentUrl = attachment.url
|
||||||
|
formData.agendaAttachmentType = attachment.type
|
||||||
|
formData.agendaAttachmentSize = attachment.size
|
||||||
|
ElMessage.success('议程附件上传成功')
|
||||||
|
} finally {
|
||||||
|
agendaDialogLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 弹窗内自动生成议程
|
||||||
|
const handleDialogGenerateAgenda = async () => {
|
||||||
|
if (agendaDialogLoading.value) return
|
||||||
|
const generateData = buildAgendaGenerateData()
|
||||||
|
if (!generateData) return
|
||||||
|
agendaDialogLoading.value = true
|
||||||
|
try {
|
||||||
|
const attachment = await generateAgendaAttachment(generateData)
|
||||||
|
formData.agendaAttachmentName = attachment.name
|
||||||
|
formData.agendaAttachmentUrl = attachment.url
|
||||||
|
formData.agendaAttachmentType = attachment.type
|
||||||
|
formData.agendaAttachmentSize = attachment.size
|
||||||
|
ElMessage.success('议程附件已生成')
|
||||||
|
} finally {
|
||||||
|
agendaDialogLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 弹窗确定按钮 - 真正保存草稿
|
||||||
|
const handleDialogConfirm = async () => {
|
||||||
|
if (!formData.agendaAttachmentUrl) {
|
||||||
|
ElMessage.warning('请上传或生成议程附件')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
agendaDialogLoading.value = true
|
||||||
|
try {
|
||||||
|
const projects = buildScheduledProjects()
|
||||||
|
const submitProjects = stripProjectTransientFields(projects)
|
||||||
|
const submitData: ReviewMeetingSaveReqVO & { projects?: ReviewProjectItemVO[] } = {
|
||||||
|
...formData,
|
||||||
|
projects: submitProjects
|
||||||
|
}
|
||||||
|
if (isEdit.value) {
|
||||||
|
// 编辑模式:更新会议
|
||||||
|
await updateReviewMeeting(submitData)
|
||||||
|
ElMessage.success('更新成功')
|
||||||
|
} else {
|
||||||
|
// 新建模式:创建会议
|
||||||
|
await createReviewMeeting(submitData)
|
||||||
|
ElMessage.success('保存成功,会议已保存为草稿')
|
||||||
|
}
|
||||||
|
agendaDialogVisible.value = false
|
||||||
|
router.push({ name: 'ReviewMeeting' })
|
||||||
|
} finally {
|
||||||
|
agendaDialogLoading.value = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleBack = () => {
|
const handleBack = () => {
|
||||||
|
|
@ -931,9 +943,62 @@ const handleBack = () => {
|
||||||
.form-footer {
|
.form-footer {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── 上传议程附件弹窗 ── */
|
||||||
|
.agenda-dialog-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
.agenda-dialog-buttons {
|
||||||
|
display: flex;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
.agenda-dialog-buttons .btn-wrapper {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.agenda-dialog-buttons .btn-wrapper :deep(.el-upload) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.agenda-dialog-buttons .btn-wrapper :deep(.el-upload .el-upload__input) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.agenda-dialog-buttons .btn-dialog-action {
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
padding: 0 16px;
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
border-radius: 8px;
|
||||||
|
color: #606266;
|
||||||
|
font-size: 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.agenda-dialog-buttons .btn-dialog-action:hover {
|
||||||
|
background-color: #e6f0ff;
|
||||||
|
border-color: #295abc;
|
||||||
|
color: #295abc;
|
||||||
|
}
|
||||||
|
.agenda-dialog-buttons .btn-dialog-action:disabled {
|
||||||
|
opacity: 0.6;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
.agenda-dialog-buttons .btn-wrapper:last-child .btn-dialog-action {
|
||||||
|
background-color: #e6f7f0;
|
||||||
|
border-color: #67c23a;
|
||||||
|
color: #67c23a;
|
||||||
|
}
|
||||||
|
.agenda-dialog-buttons .btn-wrapper:last-child .btn-dialog-action:hover {
|
||||||
|
background-color: #d1f0e0;
|
||||||
|
border-color: #5daf34;
|
||||||
|
color: #5daf34;
|
||||||
|
}
|
||||||
|
|
||||||
/* ── 项目预览表格 ── */
|
/* ── 项目预览表格 ── */
|
||||||
:deep(.projects-preview-table .el-table__header-wrapper th) {
|
:deep(.projects-preview-table .el-table__header-wrapper th) {
|
||||||
background-color: #eef2fb;
|
background-color: #eef2fb;
|
||||||
|
|
@ -961,4 +1026,43 @@ const handleBack = () => {
|
||||||
:deep(.projects-preview-table .el-table__header-wrapper th .cell) {
|
:deep(.projects-preview-table .el-table__header-wrapper th .cell) {
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── 会议附件卡片 ── */
|
||||||
|
.attachment-cards {
|
||||||
|
display: flex;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
.attachment-card {
|
||||||
|
flex: 1;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #e1e7f0;
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.attachment-card-header {
|
||||||
|
padding: 1px 6px;
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
border-bottom: 1px solid #e1e7f0;
|
||||||
|
}
|
||||||
|
.attachment-card-title {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.attachment-card-body {
|
||||||
|
padding: 2px 6px;
|
||||||
|
}
|
||||||
|
.attachment-file-info {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.minutes-ai-line {
|
||||||
|
margin-top: 2px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,11 @@
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" :reserve-selection="true" width="50" align="center" />
|
<el-table-column type="selection" :reserve-selection="true" width="50" align="center" />
|
||||||
<el-table-column label="姓名" prop="nickname" width="100" />
|
<el-table-column label="姓名" prop="nickname" width="100" />
|
||||||
<el-table-column label="单位" prop="deptName" show-overflow-tooltip />
|
<el-table-column label="单位" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.parentDeptName ? `${row.parentDeptName}${row.deptName}` : row.deptName }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="职务" prop="position" width="160" show-overflow-tooltip />
|
<el-table-column label="职务" prop="position" width="160" show-overflow-tooltip />
|
||||||
<el-table-column label="职称" prop="title" width="120" show-overflow-tooltip />
|
<el-table-column label="职称" prop="title" width="120" show-overflow-tooltip />
|
||||||
<el-table-column label="备注" prop="remark" min-width="180" show-overflow-tooltip />
|
<el-table-column label="备注" prop="remark" min-width="180" show-overflow-tooltip />
|
||||||
|
|
@ -59,7 +63,11 @@
|
||||||
<!-- 查看模式:仅展示已选专家列表 -->
|
<!-- 查看模式:仅展示已选专家列表 -->
|
||||||
<el-table v-if="disabled && selectedExperts.length > 0" :data="selectedExperts" border size="small">
|
<el-table v-if="disabled && selectedExperts.length > 0" :data="selectedExperts" border size="small">
|
||||||
<el-table-column label="姓名" prop="nickname" width="100" />
|
<el-table-column label="姓名" prop="nickname" width="100" />
|
||||||
<el-table-column label="单位" prop="deptName" show-overflow-tooltip />
|
<el-table-column label="单位" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.parentDeptName ? `${row.parentDeptName}${row.deptName}` : row.deptName }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="职务" prop="position" width="160" show-overflow-tooltip />
|
<el-table-column label="职务" prop="position" width="160" show-overflow-tooltip />
|
||||||
<el-table-column label="职称" prop="title" width="120" show-overflow-tooltip />
|
<el-table-column label="职称" prop="title" width="120" show-overflow-tooltip />
|
||||||
<el-table-column label="备注" prop="remark" min-width="180" show-overflow-tooltip />
|
<el-table-column label="备注" prop="remark" min-width="180" show-overflow-tooltip />
|
||||||
|
|
@ -76,6 +84,7 @@ interface Expert {
|
||||||
id: number
|
id: number
|
||||||
nickname: string
|
nickname: string
|
||||||
deptName?: string
|
deptName?: string
|
||||||
|
parentDeptName?: string
|
||||||
title?: string
|
title?: string
|
||||||
position?: string
|
position?: string
|
||||||
remark?: string
|
remark?: string
|
||||||
|
|
@ -143,7 +152,10 @@ const removeExpert = (id: number) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const buildExpertSummary = (expert: Expert) => {
|
const buildExpertSummary = (expert: Expert) => {
|
||||||
return [expert.deptName, expert.position, expert.title, expert.remark].filter(Boolean).join(' / ')
|
const deptDisplay = expert.parentDeptName
|
||||||
|
? `${expert.parentDeptName}${expert.deptName}`
|
||||||
|
: expert.deptName
|
||||||
|
return [deptDisplay, expert.position, expert.title, expert.remark].filter(Boolean).join(' / ')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -222,13 +234,19 @@ const buildExpertSummary = (expert: Expert) => {
|
||||||
background-color: #eef2fb;
|
background-color: #eef2fb;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 14px;
|
font-size: 18px;
|
||||||
border-color: #e1e7f0;
|
border-color: #e1e7f0;
|
||||||
}
|
}
|
||||||
|
:deep(.el-table .el-table__header-wrapper th.el-table__cell) {
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
}
|
||||||
:deep(.el-table .el-table__body td) {
|
:deep(.el-table .el-table__body td) {
|
||||||
font-size: 14px;
|
font-size: 18px;
|
||||||
color: #333;
|
color: #333;
|
||||||
border-color: #e1e7f0;
|
border-color: #e1e7f0;
|
||||||
|
padding-top: 12px;
|
||||||
|
padding-bottom: 12px;
|
||||||
}
|
}
|
||||||
:deep(.el-table .el-table__body tr.active > td) {
|
:deep(.el-table .el-table__body tr.active > td) {
|
||||||
background-color: rgba(41, 90, 188, 0.06);
|
background-color: rgba(41, 90, 188, 0.06);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue