|
@@ -3,13 +3,18 @@
|
|
|
<!-- 搜索栏 -->
|
|
<!-- 搜索栏 -->
|
|
|
<el-form :model="documentQueryParams" :inline="true" class="search-form">
|
|
<el-form :model="documentQueryParams" :inline="true" class="search-form">
|
|
|
<el-form-item :label="t('document.document.documentList.fileName')">
|
|
<el-form-item :label="t('document.document.documentList.fileName')">
|
|
|
- <el-input v-model="documentQueryParams.name"
|
|
|
|
|
- :placeholder="t('document.document.documentList.fileNamePlaceholder')" clearable style="width: 240px"
|
|
|
|
|
- @keyup.enter="handleDocumentQuery" />
|
|
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="documentQueryParams.name"
|
|
|
|
|
+ :placeholder="t('document.document.documentList.fileNamePlaceholder')"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ style="width: 240px"
|
|
|
|
|
+ @keyup.enter="handleDocumentQuery"
|
|
|
|
|
+ />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
- <el-button type="primary" icon="Search" @click="handleDocumentQuery">{{ t('document.document.button.search')
|
|
|
|
|
- }}</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" icon="Search" @click="handleDocumentQuery">
|
|
|
|
|
+ {{ t('document.document.button.search') }}
|
|
|
|
|
+ </el-button>
|
|
|
<el-button icon="Refresh" @click="handleDocumentReset">{{ t('document.document.button.reset') }}</el-button>
|
|
<el-button icon="Refresh" @click="handleDocumentReset">{{ t('document.document.button.reset') }}</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
@@ -21,18 +26,38 @@
|
|
|
{{ scope.row.id }}
|
|
{{ scope.row.id }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" :label="t('document.document.documentList.name')" min-width="150"
|
|
|
|
|
- show-overflow-tooltip />
|
|
|
|
|
- <el-table-column prop="specification" :label="t('document.document.documentList.specification')" min-width="120"
|
|
|
|
|
- show-overflow-tooltip>
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="name"
|
|
|
|
|
+ :label="t('document.document.documentList.name')"
|
|
|
|
|
+ min-width="150"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ >
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <dict-tag v-if="scope.row.specification" :options="getSpecificationDict(scope.row.specificationType)"
|
|
|
|
|
- :value="scope.row.specification" />
|
|
|
|
|
|
|
+ {{ formatDocumentName(scope.row.name) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="specification"
|
|
|
|
|
+ :label="t('document.document.documentList.specification')"
|
|
|
|
|
+ min-width="120"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <dict-tag
|
|
|
|
|
+ v-if="scope.row.specification"
|
|
|
|
|
+ :options="getSpecificationDict(scope.row.specificationType)"
|
|
|
|
|
+ :value="scope.row.specification"
|
|
|
|
|
+ />
|
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="planType" :label="t('document.document.documentList.planDocumentType')" min-width="120"
|
|
|
|
|
- align="center" show-overflow-tooltip>
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="planType"
|
|
|
|
|
+ :label="t('document.document.documentList.planDocumentType')"
|
|
|
|
|
+ min-width="120"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ >
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<dict-tag v-if="scope.row.planType" :options="plan_document_type" :value="scope.row.planType" />
|
|
<dict-tag v-if="scope.row.planType" :options="plan_document_type" :value="scope.row.planType" />
|
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
@@ -43,19 +68,37 @@
|
|
|
<DocumentStatusTag :status="scope.row.status" />
|
|
<DocumentStatusTag :status="scope.row.status" />
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="planSubmitterName" :label="t('document.document.documentList.planSubmitter')" width="120"
|
|
|
|
|
- align="center" />
|
|
|
|
|
- <el-table-column prop="submitterName" :label="t('document.document.documentList.submitter')" width="120"
|
|
|
|
|
- align="center" />
|
|
|
|
|
- <el-table-column prop="submitDeadline" :label="t('document.document.documentList.submitDeadline')" width="110"
|
|
|
|
|
- align="center">
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="planSubmitterName"
|
|
|
|
|
+ :label="t('document.document.documentList.planSubmitter')"
|
|
|
|
|
+ width="120"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ />
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="submitterName"
|
|
|
|
|
+ :label="t('document.document.documentList.submitter')"
|
|
|
|
|
+ width="120"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ />
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="submitDeadline"
|
|
|
|
|
+ :label="t('document.document.documentList.submitDeadline')"
|
|
|
|
|
+ width="110"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ >
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<span v-if="scope.row.submitDeadline">{{ parseTime(scope.row.submitDeadline, '{y}-{m}-{d}') }}</span>
|
|
<span v-if="scope.row.submitDeadline">{{ parseTime(scope.row.submitDeadline, '{y}-{m}-{d}') }}</span>
|
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="submitTime" :label="t('document.document.documentList.submitTime')" width="160"
|
|
|
|
|
- align="center">
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="submitTime"
|
|
|
|
|
+ :label="t('document.document.documentList.submitTime')"
|
|
|
|
|
+ width="160"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ >
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<span v-if="scope.row.submitTime">{{ parseTime(scope.row.submitTime) }}</span>
|
|
<span v-if="scope.row.submitTime">{{ parseTime(scope.row.submitTime) }}</span>
|
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
@@ -70,17 +113,29 @@
|
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="note" :label="t('document.document.documentList.note')" min-width="150"
|
|
|
|
|
- show-overflow-tooltip />
|
|
|
|
|
- <el-table-column prop="createTime" :label="t('document.document.documentList.createTime')" width="160"
|
|
|
|
|
- align="center">
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="note"
|
|
|
|
|
+ :label="t('document.document.documentList.note')"
|
|
|
|
|
+ min-width="150"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
|
|
+ />
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="createTime"
|
|
|
|
|
+ :label="t('document.document.documentList.createTime')"
|
|
|
|
|
+ width="160"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ >
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<span v-if="scope.row.createTime">{{ parseTime(scope.row.createTime) }}</span>
|
|
<span v-if="scope.row.createTime">{{ parseTime(scope.row.createTime) }}</span>
|
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="updateTime" :label="t('document.document.documentList.updateTime')" width="160"
|
|
|
|
|
- align="center">
|
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="updateTime"
|
|
|
|
|
+ :label="t('document.document.documentList.updateTime')"
|
|
|
|
|
+ width="160"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ >
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<span v-if="scope.row.updateTime">{{ parseTime(scope.row.updateTime) }}</span>
|
|
<span v-if="scope.row.updateTime">{{ parseTime(scope.row.updateTime) }}</span>
|
|
|
<span v-else>-</span>
|
|
<span v-else>-</span>
|
|
@@ -91,55 +146,92 @@
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<template v-if="scope.row.folderId === 0">
|
|
<template v-if="scope.row.folderId === 0">
|
|
|
<!-- 临时文件夹只显示删除按钮 -->
|
|
<!-- 临时文件夹只显示删除按钮 -->
|
|
|
- <el-button v-hasPermi="['document:document:specify']" type="primary" icon="Position"
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-hasPermi="['document:document:specify']"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ icon="Position"
|
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
|
- @click="handleSpecify(scope.row)">
|
|
|
|
|
|
|
+ @click="handleSpecify(scope.row)"
|
|
|
|
|
+ >
|
|
|
{{ t('document.document.button.specify') }}
|
|
{{ t('document.document.button.specify') }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button v-hasPermi="['document:document:removeTemp']" type="danger" icon="Delete"
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-hasPermi="['document:document:removeTemp']"
|
|
|
|
|
+ type="danger"
|
|
|
|
|
+ icon="Delete"
|
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
|
- @click="handleDeleteTemp(scope.row)">
|
|
|
|
|
|
|
+ @click="handleDeleteTemp(scope.row)"
|
|
|
|
|
+ >
|
|
|
{{ t('document.document.menu.delete') }}
|
|
{{ t('document.document.menu.delete') }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
- <el-button v-if="scope.row.actualDocument && scope.row.status === 1"
|
|
|
|
|
- v-hasPermi="['document:document:audit']" type="primary" :icon="Select"
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="scope.row.actualDocument && scope.row.status === 1"
|
|
|
|
|
+ v-hasPermi="['document:document:audit']"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :icon="Select"
|
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
|
- @click="handleAuditClick(scope.row)">
|
|
|
|
|
|
|
+ @click="handleAuditClick(scope.row)"
|
|
|
|
|
+ >
|
|
|
{{ t('document.document.button.audit') }}
|
|
{{ t('document.document.button.audit') }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
v-if="(scope.row.status === 0 || scope.row.status === 2) && scope.row.planSubmitter === userStore.userId"
|
|
v-if="(scope.row.status === 0 || scope.row.status === 2) && scope.row.planSubmitter === userStore.userId"
|
|
|
- v-hasPermi="['document:document:submit']" type="success" :icon="Upload"
|
|
|
|
|
|
|
+ v-hasPermi="['document:document:submit']"
|
|
|
|
|
+ type="success"
|
|
|
|
|
+ :icon="Upload"
|
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
|
- @click="handleSubmit(scope.row)">
|
|
|
|
|
|
|
+ @click="handleSubmit(scope.row)"
|
|
|
|
|
+ >
|
|
|
{{ t('document.document.button.submit') }}
|
|
{{ t('document.document.button.submit') }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button v-if="(scope.row.status === 0 || scope.row.status === 2)"
|
|
|
|
|
- v-hasPermi="['document:document:confirmSubmit']" type="danger" icon="Delete"
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="scope.row.status === 0 || scope.row.status === 2"
|
|
|
|
|
+ v-hasPermi="['document:document:confirmSubmit']"
|
|
|
|
|
+ type="danger"
|
|
|
|
|
+ icon="Delete"
|
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
|
- @click="handleConfirmSubmit(scope.row)">
|
|
|
|
|
|
|
+ @click="handleConfirmSubmit(scope.row)"
|
|
|
|
|
+ >
|
|
|
{{ t('document.document.button.confirmSubmit') }}
|
|
{{ t('document.document.button.confirmSubmit') }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button v-hasPermi="['document:document:mark']" type="warning" icon="Flag"
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="!scope.row.specification"
|
|
|
|
|
+ v-hasPermi="['document:document:mark']"
|
|
|
|
|
+ type="warning"
|
|
|
|
|
+ icon="Flag"
|
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
|
- @click="handleMark(scope.row)">
|
|
|
|
|
|
|
+ @click="handleMark(scope.row)"
|
|
|
|
|
+ >
|
|
|
{{ t('document.document.button.mark') }}
|
|
{{ t('document.document.button.mark') }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button v-if="scope.row.actualDocument" type="info" icon="Download"
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="scope.row.actualDocument"
|
|
|
|
|
+ type="info"
|
|
|
|
|
+ icon="Download"
|
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
|
- @click="handleDownload(scope.row)">
|
|
|
|
|
|
|
+ @click="handleDownload(scope.row)"
|
|
|
|
|
+ >
|
|
|
{{ t('document.document.button.download') }}
|
|
{{ t('document.document.button.download') }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button v-hasPermi="['document:document:logAudit']" type="primary" icon="DocumentCopy"
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-hasPermi="['document:document:logAudit']"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ icon="DocumentCopy"
|
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
|
- @click="handleViewAuditLog(scope.row)">
|
|
|
|
|
|
|
+ @click="handleViewAuditLog(scope.row)"
|
|
|
|
|
+ >
|
|
|
{{ t('document.document.button.viewAuditLog') }}
|
|
{{ t('document.document.button.viewAuditLog') }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button v-if="scope.row.status === 3" v-hasPermi="['document:document:filing']" type="success"
|
|
|
|
|
- icon="UploadFilled" style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
|
|
|
- @click="handleArchive(scope.row)">
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="scope.row.status === 3"
|
|
|
|
|
+ v-hasPermi="['document:document:filing']"
|
|
|
|
|
+ type="success"
|
|
|
|
|
+ icon="UploadFilled"
|
|
|
|
|
+ style="padding: 0 5px; font-size: 10px; height: 24px; --el-button-icon-span-gap: 2px"
|
|
|
|
|
+ @click="handleArchive(scope.row)"
|
|
|
|
|
+ >
|
|
|
{{ t('document.document.button.archive') }}
|
|
{{ t('document.document.button.archive') }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
@@ -148,186 +240,66 @@
|
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
|
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
|
- <pagination v-show="documentTotal > 0" v-model:page="documentQueryParams.pageNum"
|
|
|
|
|
- v-model:limit="documentQueryParams.pageSize" :total="documentTotal" @pagination="getDocumentList" />
|
|
|
|
|
|
|
+ <pagination
|
|
|
|
|
+ v-show="documentTotal > 0"
|
|
|
|
|
+ v-model:page="documentQueryParams.pageNum"
|
|
|
|
|
+ v-model:limit="documentQueryParams.pageSize"
|
|
|
|
|
+ :total="documentTotal"
|
|
|
|
|
+ @pagination="getDocumentList"
|
|
|
|
|
+ />
|
|
|
|
|
|
|
|
<!-- 标识文档对话框 -->
|
|
<!-- 标识文档对话框 -->
|
|
|
- <el-dialog v-model="markDialog.visible" :title="markDialog.title" width="500px" append-to-body>
|
|
|
|
|
- <el-form ref="markFormRef" :model="markForm" :rules="markRules" label-width="120px">
|
|
|
|
|
- <el-form-item :label="t('document.document.markForm.specification')" prop="type">
|
|
|
|
|
- <el-select v-model="markForm.type" :placeholder="t('document.document.markForm.specificationPlaceholder')"
|
|
|
|
|
- clearable style="width: 100%">
|
|
|
|
|
- <el-option v-for="dict in getSpecificationDict(currentDocument?.specificationType)" :key="dict.value"
|
|
|
|
|
- :label="parseI18nName(dict.label)" :value="dict.value" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-form>
|
|
|
|
|
- <template #footer>
|
|
|
|
|
- <div class="dialog-footer">
|
|
|
|
|
- <el-button :loading="markButtonLoading" type="primary" @click="submitMarkForm">{{
|
|
|
|
|
- t('document.document.button.submit') }}</el-button>
|
|
|
|
|
- <el-button @click="cancelMark">{{ t('document.document.button.cancel') }}</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
|
|
+ <MarkDialog
|
|
|
|
|
+ v-model="markDialog.visible"
|
|
|
|
|
+ :document="currentDocument"
|
|
|
|
|
+ :specification-dict="getSpecificationDict(currentDocument?.specificationType)"
|
|
|
|
|
+ @success="handleDialogSuccess"
|
|
|
|
|
+ />
|
|
|
|
|
|
|
|
<!-- 递交文档对话框 -->
|
|
<!-- 递交文档对话框 -->
|
|
|
- <el-dialog v-model="submitDialog.visible" :title="submitDialog.title" width="500px" append-to-body>
|
|
|
|
|
- <el-form ref="submitFormRef" :model="submitForm" :rules="submitRules" label-width="120px">
|
|
|
|
|
- <el-form-item :label="t('document.document.submitForm.file')" prop="actualDocument">
|
|
|
|
|
- <fileUpload v-model="submitForm.actualDocument" :limit="1" :file-type="['pdf']" :is-show-tip="false" />
|
|
|
|
|
- <div style="color: #909399; font-size: 12px; margin-top: 5px;">仅支持上传 PDF 格式文件,大小不超过 5MB</div>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item :label="t('document.document.submitForm.effectiveDate')" prop="effectiveDate">
|
|
|
|
|
- <el-date-picker v-model="submitForm.effectiveDate" type="date" value-format="YYYY-MM-DD"
|
|
|
|
|
- :placeholder="t('document.document.submitForm.effectiveDatePlaceholder')" style="width: 100%" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-form>
|
|
|
|
|
- <template #footer>
|
|
|
|
|
- <div class="dialog-footer">
|
|
|
|
|
- <el-button :loading="submitButtonLoading" type="primary" @click="submitSubmitForm">{{
|
|
|
|
|
- t('document.document.button.submit') }}</el-button>
|
|
|
|
|
- <el-button @click="cancelSubmit">{{ t('document.document.button.cancel') }}</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 文档审核记录对话框 -->
|
|
|
|
|
- <AuditLogDialog v-model:visible="auditLogDialog.visible" :document-id="auditLogDialog.documentId"
|
|
|
|
|
- :api-function="listDocumentAuditLog" i18n-prefix="document.document" />
|
|
|
|
|
|
|
+ <SubmitDialog v-model="submitDialog.visible" :document="currentDocument" @success="handleDialogSuccess" />
|
|
|
|
|
|
|
|
<!-- 审核文档对话框 -->
|
|
<!-- 审核文档对话框 -->
|
|
|
- <el-dialog v-model="auditDialog.visible" :title="t('document.document.dialog.auditDocument')" width="500px"
|
|
|
|
|
- @close="handleAuditDialogClose">
|
|
|
|
|
- <el-form ref="auditFormRef" :model="auditForm" :rules="auditRules" label-width="100px">
|
|
|
|
|
- <el-form-item label="审核结果" prop="result">
|
|
|
|
|
- <el-radio-group v-model="auditForm.result">
|
|
|
|
|
- <el-radio :label="3">通过</el-radio>
|
|
|
|
|
- <el-radio :label="2">驳回</el-radio>
|
|
|
|
|
- </el-radio-group>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item v-if="auditForm.result === 2" label="驳回理由" prop="rejectReason">
|
|
|
|
|
- <el-input v-model="auditForm.rejectReason" type="textarea" :rows="4" placeholder="请输入驳回理由" maxlength="500"
|
|
|
|
|
- show-word-limit />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-form>
|
|
|
|
|
- <template #footer>
|
|
|
|
|
- <el-button @click="auditDialog.visible = false">取消</el-button>
|
|
|
|
|
- <el-button type="primary" :loading="auditDialog.loading" @click="handleAuditConfirm">确定</el-button>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
|
|
+ <AuditDialog v-model="auditDialog.visible" :document="currentDocument" @success="handleDialogSuccess" />
|
|
|
|
|
|
|
|
<!-- 指定文档对话框 -->
|
|
<!-- 指定文档对话框 -->
|
|
|
- <el-dialog v-model="specifyDialog.visible" :title="t('document.document.dialog.specifyDocument')" width="900px"
|
|
|
|
|
- append-to-body>
|
|
|
|
|
- <el-form ref="specifyFormRef" :model="specifyForm" :rules="specifyRules" label-width="120px">
|
|
|
|
|
- <el-form-item :label="t('document.document.specifyForm.type')" prop="type">
|
|
|
|
|
- <el-radio-group v-model="specifyForm.type">
|
|
|
|
|
- <el-radio label="missing">{{ t('document.document.specifyForm.specifyMissing') }}</el-radio>
|
|
|
|
|
- <el-radio label="folder">{{ t('document.document.specifyForm.specifyFolder') }}</el-radio>
|
|
|
|
|
- </el-radio-group>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-form>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 指定递交缺失时显示文档列表 -->
|
|
|
|
|
- <div v-if="specifyForm.type === 'missing'" style="margin-top: 20px;">
|
|
|
|
|
- <!-- 搜索栏 -->
|
|
|
|
|
- <el-form :inline="true" style="margin-bottom: 10px;">
|
|
|
|
|
- <el-form-item>
|
|
|
|
|
- <el-input v-model="specifySearchName" :placeholder="t('document.document.specifyForm.searchPlaceholder')"
|
|
|
|
|
- clearable style="width: 240px" @keyup.enter="handleSpecifySearch" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item>
|
|
|
|
|
- <el-button type="primary" icon="Search" @click="handleSpecifySearch">{{ t('document.document.button.search')
|
|
|
|
|
- }}</el-button>
|
|
|
|
|
- <el-button icon="Refresh" @click="handleSpecifyReset">{{ t('document.document.button.reset') }}</el-button>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-form>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 文档列表 -->
|
|
|
|
|
- <el-table v-loading="specifyDocumentLoading" :data="specifyDocumentList" border style="width: 100%">
|
|
|
|
|
- <el-table-column prop="name" :label="t('document.document.specifyForm.documentName')" min-width="150"
|
|
|
|
|
- show-overflow-tooltip />
|
|
|
|
|
- <el-table-column prop="folder" :label="t('document.document.specifyForm.folder')" width="120"
|
|
|
|
|
- show-overflow-tooltip />
|
|
|
|
|
- <el-table-column prop="status" :label="t('document.document.specifyForm.status')" width="100" align="center">
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
- <DocumentStatusTag :status="scope.row.status" />
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="deadline" :label="t('document.document.specifyForm.deadline')" width="160"
|
|
|
|
|
- align="center">
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
- <span v-if="scope.row.deadline">{{ parseTime(scope.row.deadline) }}</span>
|
|
|
|
|
- <span v-else>-</span>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="planSubmitter" :label="t('document.document.specifyForm.planSubmitter')" width="120"
|
|
|
|
|
- align="center" />
|
|
|
|
|
- <el-table-column prop="createBy" :label="t('document.document.specifyForm.createBy')" width="120"
|
|
|
|
|
- align="center" />
|
|
|
|
|
- <el-table-column prop="createTime" :label="t('document.document.specifyForm.createTime')" width="160"
|
|
|
|
|
- align="center">
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
- <span v-if="scope.row.createTime">{{ parseTime(scope.row.createTime) }}</span>
|
|
|
|
|
- <span v-else>-</span>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column :label="t('document.document.specifyForm.action')" width="100" align="center" fixed="right">
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
- <el-button v-if="selectedDocumentId !== scope.row.id" type="primary" size="small"
|
|
|
|
|
- @click="handleSelectDocument(scope.row.id)">
|
|
|
|
|
- {{ t('document.document.specifyForm.select') }}
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-tag v-else type="success">{{ t('document.document.specifyForm.selected') }}</el-tag>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- </el-table>
|
|
|
|
|
|
|
+ <SpecifyDialog
|
|
|
|
|
+ v-model="specifyDialog.visible"
|
|
|
|
|
+ :document="currentDocument"
|
|
|
|
|
+ :tree-data="treeData"
|
|
|
|
|
+ :project-id="projectId"
|
|
|
|
|
+ @success="handleSpecifySuccess"
|
|
|
|
|
+ />
|
|
|
|
|
|
|
|
- <!-- 分页 -->
|
|
|
|
|
- <pagination v-show="specifyDocumentTotal > 0" v-model:page="specifyQueryParams.pageNum"
|
|
|
|
|
- v-model:limit="specifyQueryParams.pageSize" :total="specifyDocumentTotal"
|
|
|
|
|
- @pagination="getSpecifyDocumentList" />
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 指定文件夹时显示文件夹树 -->
|
|
|
|
|
- <div v-else-if="specifyForm.type === 'folder'" style="margin-top: 20px;">
|
|
|
|
|
- <div style="margin-bottom: 10px; color: #606266; font-size: 14px;">
|
|
|
|
|
- 请选择要指定的文件夹:
|
|
|
|
|
- </div>
|
|
|
|
|
- <FolderSelector ref="folderSelectorRef" :tree-data="treeData" @change="handleFolderChange" />
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <template #footer>
|
|
|
|
|
- <div class="dialog-footer">
|
|
|
|
|
- <el-button :loading="specifyButtonLoading" type="primary" @click="submitSpecifyForm">{{
|
|
|
|
|
- t('document.document.button.submit') }}</el-button>
|
|
|
|
|
- <el-button @click="cancelSpecify">{{ t('document.document.button.cancel') }}</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
|
|
+ <!-- 文档审核记录对话框 -->
|
|
|
|
|
+ <AuditLogDialog
|
|
|
|
|
+ v-model:visible="auditLogDialog.visible"
|
|
|
|
|
+ :document-id="auditLogDialog.documentId"
|
|
|
|
|
+ :api-function="listDocumentAuditLog"
|
|
|
|
|
+ i18n-prefix="document.document"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
<el-empty v-else :description="t('document.document.empty.description')"> </el-empty>
|
|
<el-empty v-else :description="t('document.document.empty.description')"> </el-empty>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { ref, reactive, nextTick, getCurrentInstance, computed, watch, toRefs } from 'vue';
|
|
|
|
|
|
|
+import { ref, reactive, getCurrentInstance, watch, toRefs } from 'vue';
|
|
|
import { useI18n } from 'vue-i18n';
|
|
import { useI18n } from 'vue-i18n';
|
|
|
-import { listDocument, markDocument, submitDocument, confirmSubmit, filingDocument, downloadDocumentFile, removeTempDocument, listDocumentOnSpecify, specifyDocument } from '@/api/document/document';
|
|
|
|
|
-import { DocumentQuery, DocumentVO, DocumentMarkForm, DocumentSubmitForm, DocumentSpecifyVO, DocumentSpecifyForm } from '@/api/document/document/types';
|
|
|
|
|
|
|
+import { listDocument, confirmSubmit, filingDocument, downloadDocumentFile, removeTempDocument } from '@/api/document/document';
|
|
|
|
|
+import { DocumentQuery, DocumentVO } from '@/api/document/document/types';
|
|
|
import { FolderListVO } from '@/api/document/folder/types';
|
|
import { FolderListVO } from '@/api/document/folder/types';
|
|
|
import { Select, Upload } from '@element-plus/icons-vue';
|
|
import { Select, Upload } from '@element-plus/icons-vue';
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
|
|
-import type { FormInstance } from 'element-plus';
|
|
|
|
|
import type { ComponentInternalInstance } from 'vue';
|
|
import type { ComponentInternalInstance } from 'vue';
|
|
|
import { useUserStore } from '@/store/modules/user';
|
|
import { useUserStore } from '@/store/modules/user';
|
|
|
-import { parseTime } from '@/utils/ruoyi';
|
|
|
|
|
-import { parseI18nName } from '@/utils/i18n';
|
|
|
|
|
-import fileUpload from '@/components/FileUpload/index.vue';
|
|
|
|
|
|
|
+import { parseTime, formatDocumentName } from '@/utils/ruoyi';
|
|
|
import AuditLogDialog from '@/components/AuditLogDialog/index.vue';
|
|
import AuditLogDialog from '@/components/AuditLogDialog/index.vue';
|
|
|
-import { listDocumentAuditLog, auditDocument } from '@/api/document/document';
|
|
|
|
|
|
|
+import { listDocumentAuditLog } from '@/api/document/document';
|
|
|
import DocumentStatusTag from '@/components/DocumentStatusTag/index.vue';
|
|
import DocumentStatusTag from '@/components/DocumentStatusTag/index.vue';
|
|
|
-import FolderSelector from '@/components/FolderSelector/index.vue';
|
|
|
|
|
|
|
+import MarkDialog from './components/MarkDialog.vue';
|
|
|
|
|
+import SubmitDialog from './components/SubmitDialog.vue';
|
|
|
|
|
+import AuditDialog from './components/AuditDialog.vue';
|
|
|
|
|
+import SpecifyDialog from './components/SpecifyDialog.vue';
|
|
|
|
|
|
|
|
interface Props {
|
|
interface Props {
|
|
|
selectedFolder: FolderListVO | null;
|
|
selectedFolder: FolderListVO | null;
|
|
@@ -361,151 +333,35 @@ const documentQueryParams = reactive<DocumentQuery>({
|
|
|
folderId: undefined
|
|
folderId: undefined
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+// 当前操作的文档
|
|
|
|
|
+const currentDocument = ref<DocumentVO | null>(null);
|
|
|
|
|
+
|
|
|
// 标识文档对话框
|
|
// 标识文档对话框
|
|
|
const markDialog = reactive({
|
|
const markDialog = reactive({
|
|
|
- visible: false,
|
|
|
|
|
- title: ''
|
|
|
|
|
|
|
+ visible: false
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-// 标识表单ref
|
|
|
|
|
-const markFormRef = ref<FormInstance>();
|
|
|
|
|
-const markButtonLoading = ref(false);
|
|
|
|
|
-
|
|
|
|
|
-// 标识表单数据
|
|
|
|
|
-const markForm = ref<DocumentMarkForm>({
|
|
|
|
|
- id: 0,
|
|
|
|
|
- type: ''
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-// 标识表单验证规则
|
|
|
|
|
-const markRules = {
|
|
|
|
|
- type: [{ required: true, message: t('document.document.markRule.typeRequired'), trigger: 'change' }]
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
// 递交文档对话框
|
|
// 递交文档对话框
|
|
|
const submitDialog = reactive({
|
|
const submitDialog = reactive({
|
|
|
- visible: false,
|
|
|
|
|
- title: ''
|
|
|
|
|
|
|
+ visible: false
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-// 递交表单ref
|
|
|
|
|
-const submitFormRef = ref<FormInstance>();
|
|
|
|
|
-const submitButtonLoading = ref(false);
|
|
|
|
|
-
|
|
|
|
|
-// 递交表单数据
|
|
|
|
|
-interface SubmitForm {
|
|
|
|
|
- actualDocument: string;
|
|
|
|
|
- effectiveDate?: string;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-const submitForm = ref<SubmitForm>({
|
|
|
|
|
- actualDocument: '',
|
|
|
|
|
- effectiveDate: undefined
|
|
|
|
|
|
|
+// 审核对话框
|
|
|
|
|
+const auditDialog = reactive({
|
|
|
|
|
+ visible: false
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-// 递交表单验证规则
|
|
|
|
|
-const submitRules = reactive({
|
|
|
|
|
- actualDocument: [
|
|
|
|
|
- {
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: t('document.document.submitRule.fileRequired'),
|
|
|
|
|
- trigger: 'blur'
|
|
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+// 指定文档对话框
|
|
|
|
|
+const specifyDialog = reactive({
|
|
|
|
|
+ visible: false
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-// 当前操作的文档
|
|
|
|
|
-const currentDocument = ref<DocumentVO | null>(null);
|
|
|
|
|
-
|
|
|
|
|
// 审核记录对话框
|
|
// 审核记录对话框
|
|
|
const auditLogDialog = reactive({
|
|
const auditLogDialog = reactive({
|
|
|
visible: false,
|
|
visible: false,
|
|
|
documentId: ''
|
|
documentId: ''
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-// 审核对话框状态
|
|
|
|
|
-const auditDialog = reactive({
|
|
|
|
|
- visible: false,
|
|
|
|
|
- document: null as DocumentVO | null,
|
|
|
|
|
- loading: false
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-// 审核表单数据
|
|
|
|
|
-const auditForm = ref({
|
|
|
|
|
- documentId: 0,
|
|
|
|
|
- result: 3, // 默认通过
|
|
|
|
|
- rejectReason: ''
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-// 审核表单引用
|
|
|
|
|
-const auditFormRef = ref<ElFormInstance>();
|
|
|
|
|
-
|
|
|
|
|
-// 审核表单验证规则
|
|
|
|
|
-const auditRules = reactive({
|
|
|
|
|
- result: [
|
|
|
|
|
- {
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: '请选择审核结果',
|
|
|
|
|
- trigger: 'change'
|
|
|
|
|
- }
|
|
|
|
|
- ],
|
|
|
|
|
- rejectReason: [
|
|
|
|
|
- {
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: '请输入驳回理由',
|
|
|
|
|
- trigger: 'blur'
|
|
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-// 指定文档对话框
|
|
|
|
|
-const specifyDialog = reactive({
|
|
|
|
|
- visible: false,
|
|
|
|
|
- title: ''
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-// 指定表单ref
|
|
|
|
|
-const specifyFormRef = ref<FormInstance>();
|
|
|
|
|
-const specifyButtonLoading = ref(false);
|
|
|
|
|
-
|
|
|
|
|
-// 指定表单数据
|
|
|
|
|
-const specifyForm = ref({
|
|
|
|
|
- type: 'missing',
|
|
|
|
|
- folderId: undefined as number | undefined
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-// 指定表单验证规则
|
|
|
|
|
-const specifyRules = reactive({
|
|
|
|
|
- type: [
|
|
|
|
|
- {
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: t('document.document.specifyRule.typeRequired'),
|
|
|
|
|
- trigger: 'change'
|
|
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-// 指定文档列表数据
|
|
|
|
|
-const specifyDocumentList = ref<DocumentSpecifyVO[]>([]);
|
|
|
|
|
-const specifyDocumentLoading = ref(false);
|
|
|
|
|
-const specifyDocumentTotal = ref(0);
|
|
|
|
|
-const specifySearchName = ref('');
|
|
|
|
|
-const specifyQueryParams = reactive({
|
|
|
|
|
- pageNum: 1,
|
|
|
|
|
- pageSize: 10,
|
|
|
|
|
- projectId: props.projectId,
|
|
|
|
|
- name: ''
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-// 选中的文档ID
|
|
|
|
|
-const selectedDocumentId = ref<string | number | null>(null);
|
|
|
|
|
-
|
|
|
|
|
-// 文件夹选择器引用
|
|
|
|
|
-const folderSelectorRef = ref();
|
|
|
|
|
-
|
|
|
|
|
-// 选中的文件夹ID
|
|
|
|
|
-const selectedFolderId = ref<number | string | undefined>(undefined);
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 根据 specificationType 获取对应的字典
|
|
* 根据 specificationType 获取对应的字典
|
|
|
* @param specificationType 规格类型 (0: 中心文件, 1: 项目文件)
|
|
* @param specificationType 规格类型 (0: 中心文件, 1: 项目文件)
|
|
@@ -516,7 +372,6 @@ const getSpecificationDict = (specificationType: number | undefined) => {
|
|
|
} else if (specificationType === 1) {
|
|
} else if (specificationType === 1) {
|
|
|
return project_file_specification?.value || [];
|
|
return project_file_specification?.value || [];
|
|
|
}
|
|
}
|
|
|
- // 默认返回空数组
|
|
|
|
|
return [];
|
|
return [];
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -560,57 +415,8 @@ const handleViewAuditLog = (row: DocumentVO) => {
|
|
|
|
|
|
|
|
// 审核按钮点击事件
|
|
// 审核按钮点击事件
|
|
|
const handleAuditClick = (row: DocumentVO) => {
|
|
const handleAuditClick = (row: DocumentVO) => {
|
|
|
- auditDialog.document = row;
|
|
|
|
|
- auditForm.value = {
|
|
|
|
|
- documentId: row.id as number,
|
|
|
|
|
- result: 3, // 默认通过
|
|
|
|
|
- rejectReason: ''
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ currentDocument.value = row;
|
|
|
auditDialog.visible = true;
|
|
auditDialog.visible = true;
|
|
|
- nextTick(() => {
|
|
|
|
|
- auditFormRef.value?.clearValidate();
|
|
|
|
|
- });
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 审核对话框关闭事件
|
|
|
|
|
-const handleAuditDialogClose = () => {
|
|
|
|
|
- auditFormRef.value?.resetFields();
|
|
|
|
|
- auditForm.value = {
|
|
|
|
|
- documentId: 0,
|
|
|
|
|
- result: 3,
|
|
|
|
|
- rejectReason: ''
|
|
|
|
|
- };
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 处理审核确认
|
|
|
|
|
-const handleAuditConfirm = async () => {
|
|
|
|
|
- // 如果选择驳回,需要验证驳回理由
|
|
|
|
|
- if (auditForm.value.result === 2) {
|
|
|
|
|
- try {
|
|
|
|
|
- await auditFormRef.value?.validate();
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- auditDialog.loading = true;
|
|
|
|
|
- try {
|
|
|
|
|
- const submitData = {
|
|
|
|
|
- documentId: auditForm.value.documentId,
|
|
|
|
|
- result: auditForm.value.result,
|
|
|
|
|
- rejectReason: auditForm.value.result === 2 ? auditForm.value.rejectReason : undefined
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- await auditDocument(submitData);
|
|
|
|
|
- ElMessage.success(t('document.document.message.auditSuccess'));
|
|
|
|
|
- auditDialog.visible = false;
|
|
|
|
|
- await getDocumentList();
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- console.error('审核失败:', error);
|
|
|
|
|
- ElMessage.error(t('document.document.message.auditFailed'));
|
|
|
|
|
- } finally {
|
|
|
|
|
- auditDialog.loading = false;
|
|
|
|
|
- }
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 下载文档
|
|
// 下载文档
|
|
@@ -626,49 +432,7 @@ const handleDownload = async (row: DocumentVO) => {
|
|
|
// 递交文档
|
|
// 递交文档
|
|
|
const handleSubmit = (row: DocumentVO) => {
|
|
const handleSubmit = (row: DocumentVO) => {
|
|
|
currentDocument.value = row;
|
|
currentDocument.value = row;
|
|
|
- submitForm.value = {
|
|
|
|
|
- actualDocument: '',
|
|
|
|
|
- effectiveDate: undefined
|
|
|
|
|
- };
|
|
|
|
|
submitDialog.visible = true;
|
|
submitDialog.visible = true;
|
|
|
- submitDialog.title = t('document.document.dialog.submitDocument');
|
|
|
|
|
- nextTick(() => {
|
|
|
|
|
- submitFormRef.value?.clearValidate();
|
|
|
|
|
- });
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 取消递交
|
|
|
|
|
-const cancelSubmit = () => {
|
|
|
|
|
- submitDialog.visible = false;
|
|
|
|
|
- submitForm.value = {
|
|
|
|
|
- actualDocument: '',
|
|
|
|
|
- effectiveDate: undefined
|
|
|
|
|
- };
|
|
|
|
|
- currentDocument.value = null;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 提交递交表单
|
|
|
|
|
-const submitSubmitForm = () => {
|
|
|
|
|
- submitFormRef.value?.validate(async (valid: boolean) => {
|
|
|
|
|
- if (valid && currentDocument.value) {
|
|
|
|
|
- submitButtonLoading.value = true;
|
|
|
|
|
- try {
|
|
|
|
|
- const submitData: DocumentSubmitForm = {
|
|
|
|
|
- documentId: currentDocument.value.id,
|
|
|
|
|
- ossId: submitForm.value.actualDocument,
|
|
|
|
|
- effectiveDate: submitForm.value.effectiveDate
|
|
|
|
|
- };
|
|
|
|
|
- await submitDocument(submitData);
|
|
|
|
|
- proxy?.$modal.msgSuccess(t('document.document.message.submitSuccess'));
|
|
|
|
|
- submitDialog.visible = false;
|
|
|
|
|
- await getDocumentList();
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- console.error(t('document.document.message.submitFailed'), error);
|
|
|
|
|
- } finally {
|
|
|
|
|
- submitButtonLoading.value = false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 确认递交文档
|
|
// 确认递交文档
|
|
@@ -713,7 +477,6 @@ const handleDeleteTemp = async (row: DocumentVO) => {
|
|
|
await removeTempDocument(row.id);
|
|
await removeTempDocument(row.id);
|
|
|
ElMessage.success('删除成功');
|
|
ElMessage.success('删除成功');
|
|
|
await getDocumentList();
|
|
await getDocumentList();
|
|
|
- // 触发父组件刷新树(更新临时文件夹气泡数量)
|
|
|
|
|
emit('refreshTree');
|
|
emit('refreshTree');
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
if (error !== 'cancel') {
|
|
if (error !== 'cancel') {
|
|
@@ -726,180 +489,24 @@ const handleDeleteTemp = async (row: DocumentVO) => {
|
|
|
// 指定文档
|
|
// 指定文档
|
|
|
const handleSpecify = (row: DocumentVO) => {
|
|
const handleSpecify = (row: DocumentVO) => {
|
|
|
currentDocument.value = row;
|
|
currentDocument.value = row;
|
|
|
- specifyForm.value = {
|
|
|
|
|
- type: 'missing',
|
|
|
|
|
- folderId: undefined
|
|
|
|
|
- };
|
|
|
|
|
- selectedDocumentId.value = null;
|
|
|
|
|
- selectedFolderId.value = undefined;
|
|
|
|
|
- specifySearchName.value = '';
|
|
|
|
|
- specifyQueryParams.pageNum = 1;
|
|
|
|
|
- specifyQueryParams.name = '';
|
|
|
|
|
- specifyQueryParams.projectId = props.projectId;
|
|
|
|
|
specifyDialog.visible = true;
|
|
specifyDialog.visible = true;
|
|
|
- nextTick(() => {
|
|
|
|
|
- specifyFormRef.value?.clearValidate();
|
|
|
|
|
- // 如果选择的是指定递交缺失,则加载列表
|
|
|
|
|
- if (specifyForm.value.type === 'missing') {
|
|
|
|
|
- getSpecifyDocumentList();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 获取可指定的文档列表
|
|
|
|
|
-const getSpecifyDocumentList = async () => {
|
|
|
|
|
- if (!props.projectId) return;
|
|
|
|
|
-
|
|
|
|
|
- specifyDocumentLoading.value = true;
|
|
|
|
|
- try {
|
|
|
|
|
- const res = await listDocumentOnSpecify(specifyQueryParams);
|
|
|
|
|
- specifyDocumentList.value = res.rows || [];
|
|
|
|
|
- specifyDocumentTotal.value = res.total || 0;
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- console.error('获取可指定文档列表失败:', error);
|
|
|
|
|
- ElMessage.error('获取可指定文档列表失败');
|
|
|
|
|
- } finally {
|
|
|
|
|
- specifyDocumentLoading.value = false;
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 搜索指定文档
|
|
|
|
|
-const handleSpecifySearch = () => {
|
|
|
|
|
- specifyQueryParams.name = specifySearchName.value;
|
|
|
|
|
- specifyQueryParams.pageNum = 1;
|
|
|
|
|
- getSpecifyDocumentList();
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 重置搜索
|
|
|
|
|
-const handleSpecifyReset = () => {
|
|
|
|
|
- specifySearchName.value = '';
|
|
|
|
|
- specifyQueryParams.name = '';
|
|
|
|
|
- specifyQueryParams.pageNum = 1;
|
|
|
|
|
- getSpecifyDocumentList();
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 选择文档
|
|
|
|
|
-const handleSelectDocument = (id: string | number) => {
|
|
|
|
|
- selectedDocumentId.value = id;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 监听指定类型变化
|
|
|
|
|
-watch(() => specifyForm.value.type, (newType) => {
|
|
|
|
|
- selectedDocumentId.value = null;
|
|
|
|
|
- selectedFolderId.value = undefined;
|
|
|
|
|
- if (newType === 'missing' && specifyDialog.visible) {
|
|
|
|
|
- getSpecifyDocumentList();
|
|
|
|
|
- } else if (newType === 'folder' && folderSelectorRef.value) {
|
|
|
|
|
- folderSelectorRef.value.clearSelection();
|
|
|
|
|
- }
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-// 取消指定
|
|
|
|
|
-const cancelSpecify = () => {
|
|
|
|
|
- specifyDialog.visible = false;
|
|
|
|
|
- specifyForm.value = {
|
|
|
|
|
- type: 'missing',
|
|
|
|
|
- folderId: undefined
|
|
|
|
|
- };
|
|
|
|
|
- selectedDocumentId.value = null;
|
|
|
|
|
- selectedFolderId.value = undefined;
|
|
|
|
|
- specifyDocumentList.value = [];
|
|
|
|
|
- currentDocument.value = null;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 文件夹选择变化处理
|
|
|
|
|
-const handleFolderChange = (folderId: number | string | undefined) => {
|
|
|
|
|
- selectedFolderId.value = folderId;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 提交指定表单
|
|
|
|
|
-const submitSpecifyForm = () => {
|
|
|
|
|
- specifyFormRef.value?.validate(async (valid: boolean) => {
|
|
|
|
|
- if (valid && currentDocument.value) {
|
|
|
|
|
- // 如果是指定递交缺失,需要选择一个文档
|
|
|
|
|
- if (specifyForm.value.type === 'missing' && !selectedDocumentId.value) {
|
|
|
|
|
- ElMessage.warning('请选择一个文档');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 如果是指定文件夹,需要选择一个文件夹
|
|
|
|
|
- if (specifyForm.value.type === 'folder' && !selectedFolderId.value) {
|
|
|
|
|
- ElMessage.warning('请选择一个文件夹');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- specifyButtonLoading.value = true;
|
|
|
|
|
- try {
|
|
|
|
|
- // 构建请求数据
|
|
|
|
|
- const specifyData: DocumentSpecifyForm = {
|
|
|
|
|
- documentId: currentDocument.value.id
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- if (specifyForm.value.type === 'missing') {
|
|
|
|
|
- // 指定递交缺失
|
|
|
|
|
- specifyData.missingDocumentId = selectedDocumentId.value as number | string;
|
|
|
|
|
- } else if (specifyForm.value.type === 'folder') {
|
|
|
|
|
- // 指定文件夹
|
|
|
|
|
- specifyData.folderId = selectedFolderId.value;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- await specifyDocument(specifyData);
|
|
|
|
|
- ElMessage.success('指定成功');
|
|
|
|
|
- specifyDialog.visible = false;
|
|
|
|
|
- await getDocumentList();
|
|
|
|
|
- // 触发父组件刷新树(更新临时文件夹气泡数量)
|
|
|
|
|
- emit('refreshTree');
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- console.error('指定失败:', error);
|
|
|
|
|
- ElMessage.error('指定失败');
|
|
|
|
|
- } finally {
|
|
|
|
|
- specifyButtonLoading.value = false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 标识文档
|
|
// 标识文档
|
|
|
const handleMark = (row: DocumentVO) => {
|
|
const handleMark = (row: DocumentVO) => {
|
|
|
currentDocument.value = row;
|
|
currentDocument.value = row;
|
|
|
- markForm.value = {
|
|
|
|
|
- id: row.id,
|
|
|
|
|
- type: ''
|
|
|
|
|
- };
|
|
|
|
|
markDialog.visible = true;
|
|
markDialog.visible = true;
|
|
|
- markDialog.title = t('document.document.dialog.markDocument');
|
|
|
|
|
- nextTick(() => {
|
|
|
|
|
- markFormRef.value?.clearValidate();
|
|
|
|
|
- });
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-// 取消标识
|
|
|
|
|
-const cancelMark = () => {
|
|
|
|
|
- markDialog.visible = false;
|
|
|
|
|
- markForm.value = {
|
|
|
|
|
- id: 0,
|
|
|
|
|
- type: ''
|
|
|
|
|
- };
|
|
|
|
|
- currentDocument.value = null;
|
|
|
|
|
|
|
+// 对话框成功回调
|
|
|
|
|
+const handleDialogSuccess = async () => {
|
|
|
|
|
+ await getDocumentList();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-// 提交标识表单
|
|
|
|
|
-const submitMarkForm = () => {
|
|
|
|
|
- markFormRef.value?.validate(async (valid: boolean) => {
|
|
|
|
|
- if (valid) {
|
|
|
|
|
- markButtonLoading.value = true;
|
|
|
|
|
- try {
|
|
|
|
|
- await markDocument(markForm.value);
|
|
|
|
|
- proxy?.$modal.msgSuccess(t('document.document.message.markSuccess'));
|
|
|
|
|
- markDialog.visible = false;
|
|
|
|
|
- await getDocumentList();
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- console.error(t('document.document.message.markFailed'), error);
|
|
|
|
|
- } finally {
|
|
|
|
|
- markButtonLoading.value = false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+// 指定成功回调
|
|
|
|
|
+const handleSpecifySuccess = async () => {
|
|
|
|
|
+ await getDocumentList();
|
|
|
|
|
+ emit('refreshTree');
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 文件类型判断函数
|
|
// 文件类型判断函数
|