| | |
| | | |
| | | <el-form-item label="模板名称" prop="templateName"> |
| | | |
| | | <el-input v-model="form.templateName" placeholder="如:项目立项审批" maxlength="50" show-word-limit /> |
| | | <el-input |
| | | v-model="form.templateName" |
| | | placeholder="如:项目立项审批" |
| | | maxlength="50" |
| | | show-word-limit |
| | | :disabled="isEditingBuiltin" |
| | | /> |
| | | |
| | | </el-form-item> |
| | | |
| | |
| | | |
| | | <el-form-item label="模板类型" prop="businessType"> |
| | | |
| | | <el-select v-model="form.businessType" placeholder="请选择" style="width: 100%"> |
| | | <el-select |
| | | v-model="form.businessType" |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | :disabled="isEditingBuiltin" |
| | | > |
| | | |
| | | <el-option |
| | | |
| | |
| | | |
| | | <el-form-item label="填报配置"> |
| | | |
| | | <FormConfigEditor v-model="form.formConfigData" /> |
| | | <FormConfigEditor |
| | | v-model="form.formConfigData" |
| | | :exclude-template-id="form.id" |
| | | :disable-import="isEditingBuiltin" |
| | | :locked-field-uids="isEditingBuiltin ? form.lockedFormFieldUids : []" |
| | | /> |
| | | |
| | | <p class="flow-tip">配置提交审批时需填写的表单项,保存后写入 formConfig(JSON)。</p> |
| | | |
| | |
| | | |
| | | <template v-if="detailAttachments.length"> |
| | | |
| | | <el-tag |
| | | |
| | | v-for="(f, i) in detailAttachments" |
| | | |
| | | :key="i" |
| | | |
| | | class="detail-attachment-tag" |
| | | |
| | | type="info" |
| | | |
| | | effect="plain" |
| | | |
| | | > |
| | | |
| | | {{ attachmentDisplayName(f) }} |
| | | |
| | | </el-tag> |
| | | <div class="detail-attachment-list"> |
| | | <div |
| | | v-for="(f, i) in detailAttachments" |
| | | :key="i" |
| | | class="detail-attachment-item" |
| | | @click="openAttachmentFile(f)" |
| | | > |
| | | <el-icon class="attachment-icon"><Document /></el-icon> |
| | | <span class="attachment-name">{{ attachmentDisplayName(f) }}</span> |
| | | <el-icon class="attachment-download"><Download /></el-icon> |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | |
| | | |
| | | <script setup> |
| | | |
| | | import { ArrowRight, Plus, RefreshRight } from "@element-plus/icons-vue"; |
| | | import { ArrowRight, Document, Download, Plus, RefreshRight } from "@element-plus/icons-vue"; |
| | | |
| | | import { ElMessage } from "element-plus"; |
| | | |
| | |
| | | |
| | | formRules, |
| | | |
| | | isEditingBuiltin, |
| | | |
| | | detailDialog, |
| | | |
| | | detailRow, |
| | |
| | | |
| | | } |
| | | |
| | | function openAttachmentFile(file) { |
| | | const url = file?.url || file?.previewURL || file?.downloadURL || file?.previewUrl || ""; |
| | | if (url) { |
| | | window.open(url, "_blank"); |
| | | } else { |
| | | ElMessage.warning("无法打开该附件"); |
| | | } |
| | | } |
| | | |
| | | |
| | | function unwrapArray(payload) { |
| | |
| | | |
| | | } |
| | | |
| | | .detail-attachment-tag { |
| | | .detail-attachment-list { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 8px; |
| | | } |
| | | |
| | | margin: 0 8px 8px 0; |
| | | .detail-attachment-item { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 6px; |
| | | padding: 8px 12px; |
| | | background: var(--el-fill-color-light); |
| | | border-radius: 6px; |
| | | cursor: pointer; |
| | | transition: background 0.2s; |
| | | } |
| | | |
| | | .detail-attachment-item:hover { |
| | | background: var(--el-fill-color); |
| | | } |
| | | |
| | | .attachment-icon { |
| | | font-size: 16px; |
| | | color: var(--el-text-color-regular); |
| | | } |
| | | |
| | | .attachment-name { |
| | | font-size: 14px; |
| | | color: var(--el-text-color-primary); |
| | | } |
| | | |
| | | .attachment-download { |
| | | font-size: 14px; |
| | | color: var(--el-text-color-secondary); |
| | | } |
| | | |
| | | .text-muted { |