From dacc95761cf7090c628fc37a5d4f8bb825ccbbb0 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期六, 16 五月 2026 15:41:45 +0800
Subject: [PATCH] 企业新闻和通知公告
---
src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue | 94 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 94 insertions(+), 0 deletions(-)
diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue b/src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue
new file mode 100644
index 0000000..19328af
--- /dev/null
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-list/components/ApproveDetailPanel.vue
@@ -0,0 +1,94 @@
+<!-- 缁熶竴瀹℃壒锛氫笟鍔℃憳瑕� -->
+<template>
+ <el-descriptions :column="2" border>
+ <el-descriptions-item label="涓氬姟鍗曞彿">{{ row.bizId || row.id || "鈥�" }}</el-descriptions-item>
+ <el-descriptions-item label="瀹℃壒鐘舵��">
+ <el-tag :type="approvalStatusTagType(row.approvalStatus)" size="small" effect="plain">
+ {{ approvalStatusLabel(row.approvalStatus) }}
+ </el-tag>
+ </el-descriptions-item>
+ <el-descriptions-item label="瀹℃壒绫诲瀷">
+ <span class="approve-type-cell" :style="approvalTypeStyle(row.approvalType)">
+ {{ approvalTypeLabel(row.approvalType) }}
+ </span>
+ </el-descriptions-item>
+ <el-descriptions-item label="瀹℃壒鏂瑰紡">
+ <span class="approval-method-text">{{ approvalModeLabel(row.approvalMode) }}</span>
+ </el-descriptions-item>
+ <el-descriptions-item label="鐢宠浜虹紪鍙�">{{ row.applicantNo || "鈥�" }}</el-descriptions-item>
+ <el-descriptions-item label="鐢宠浜哄悕绉�">{{ row.applicantName || "鈥�" }}</el-descriptions-item>
+ <el-descriptions-item label="鐢宠鎽樿" :span="2">{{ row.summary || "鈥�" }}</el-descriptions-item>
+ <el-descriptions-item v-if="row.rejectReason" label="椹冲洖鍘熷洜" :span="2">
+ <span class="reject-text">{{ row.rejectReason }}</span>
+ </el-descriptions-item>
+ <el-descriptions-item label="鍒涘缓鏃堕棿" :span="2">{{ row.createTime || "鈥�" }}</el-descriptions-item>
+ </el-descriptions>
+
+ <template v-if="extraFields.length">
+ <el-divider content-position="left">濉姤鍐呭</el-divider>
+ <el-descriptions :column="2" border size="small">
+ <el-descriptions-item v-for="item in extraFields" :key="item.key" :label="item.label">
+ {{ item.display }}
+ </el-descriptions-item>
+ </el-descriptions>
+ </template>
+</template>
+
+<script setup>
+import { computed } from "vue";
+import {
+ approvalTypeLabel,
+ approvalTypeStyle,
+ approvalModeLabel,
+ approvalStatusLabel,
+ approvalStatusTagType,
+ SUBMIT_TEMPLATES,
+} from "../approveListConstants.js";
+
+const props = defineProps({
+ row: { type: Object, default: () => ({}) },
+});
+
+const extraFields = computed(() => {
+ const payload = props.row?.formPayload || {};
+ const tpl = Object.values(SUBMIT_TEMPLATES).find((t) => t.approvalType === props.row?.approvalType);
+ if (!tpl?.fields?.length) {
+ return Object.keys(payload)
+ .filter((k) => k !== "summary" && payload[k] != null && payload[k] !== "")
+ .map((k) => ({ key: k, label: k, display: formatValue(payload[k]) }));
+ }
+ return tpl.fields
+ .map((f) => {
+ const val = payload[f.key];
+ if (val == null || val === "" || (Array.isArray(val) && !val.length)) return null;
+ let display = formatValue(val);
+ if (f.type === "select" && f.options) {
+ display = f.options.find((o) => o.value === val)?.label || display;
+ }
+ return { key: f.key, label: f.label, display };
+ })
+ .filter(Boolean);
+});
+
+function formatValue(val) {
+ if (Array.isArray(val)) return val.join(" 鑷� ");
+ return String(val);
+}
+</script>
+
+<style scoped>
+.approve-type-cell {
+ display: inline-block;
+ padding: 2px 10px;
+ border-radius: 4px;
+ font-size: 13px;
+ line-height: 1.5;
+}
+.approval-method-text {
+ color: var(--el-color-danger);
+ font-weight: 500;
+}
+.reject-text {
+ color: var(--el-color-danger);
+}
+</style>
--
Gitblit v1.9.3