feat(notice): 审批记录/审批进度 Drawer 收窄至 740,适配 flow-center 嵌入页 v2.4
build / build (push) Successful in 2m53s

- 两处内嵌 Drawer :width 860→740;「流程示意图」Modal 保持 860 不动
- 同批带上:审批页操作列改链接式(查看详情/通过/驳回)+ acting 防连点;
  详情页附件图片图标改 icon-tupian、正文高度模型(page-wrapper 转 flex 纵向)
This commit is contained in:
chenxing
2026-10-10 14:55:22 +08:00
parent f90aefc8e3
commit 6a63a7cb8f
2 changed files with 27 additions and 10 deletions
+7 -7
View File
@@ -14,10 +14,9 @@
<span class="opinion">{{ row._opinion }}</span> <span class="opinion">{{ row._opinion }}</span>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<Button size="small" type="primary" :loading="acting" @click="approve(row)">通过</Button> <span class="operating-link" @click="openEmbed(row)">查看详情</span>
<Button size="small" type="error" style="margin-left: 6px" @click="openReject(row)" <span class="operating-link" @click="approve(row)">通过</span>
>驳回</Button <span class="operating-link text-error" @click="openReject(row)">驳回</span>
>
</template> </template>
</Table> </Table>
</div> </div>
@@ -71,7 +70,7 @@
</Modal> </Modal>
<!-- 审批记录 Drawer(flow-center 嵌入页 iframe 撑满:状态/基本信息/流程示意图/轨迹/审批流水/表单六块) --> <!-- 审批记录 Drawer(flow-center 嵌入页 iframe 撑满:状态/基本信息/流程示意图/轨迹/审批流水/表单六块) -->
<Drawer v-model="embedVisible" title="审批记录" :width="860" :transfer="false" :styles="{ body: { padding: '0' } }"> <Drawer v-model="embedVisible" title="审批记录" :width="740" :transfer="false" :styles="{ body: { padding: '0' } }">
<div class="embed-frame-wrap"> <div class="embed-frame-wrap">
<iframe v-if="embedPageUrl" :src="embedPageUrl" title="办件进度"></iframe> <iframe v-if="embedPageUrl" :src="embedPageUrl" title="办件进度"></iframe>
</div> </div>
@@ -121,7 +120,7 @@ const todoCols = [
{ title: "摘要", key: "_summary", minWidth: 200, ellipsis: true, tooltip: true }, { title: "摘要", key: "_summary", minWidth: 200, ellipsis: true, tooltip: true },
{ title: "当前节点", key: "nodeName", width: 110 }, { title: "当前节点", key: "nodeName", width: 110 },
{ title: "到达时间", key: "arriveTime", width: 170, render: fmtTime }, { title: "到达时间", key: "arriveTime", width: 170, render: fmtTime },
{ title: "操作", slot: "action", width: 150 }, { title: "操作", slot: "action", width: 190, align: "center" },
]; ];
const instCols = [ const instCols = [
@@ -138,7 +137,7 @@ const instCols = [
const embedVisible = ref(false); const embedVisible = ref(false);
const embedPageUrl = ref(""); const embedPageUrl = ref("");
async function openEmbed(row: ApprovalInstance) { async function openEmbed(row: ApprovalInstance | ApprovalTodoTask) {
try { try {
const res = await noticeApi.flowEmbed(Number(row.bizId)).send(); const res = await noticeApi.flowEmbed(Number(row.bizId)).send();
embedPageUrl.value = res?.pageUrl || ""; embedPageUrl.value = res?.pageUrl || "";
@@ -207,6 +206,7 @@ function load() {
} }
async function approve(row: ApprovalTodoTask) { async function approve(row: ApprovalTodoTask) {
if (acting.value) return; // 链接式操作无 :loading 反馈,用 acting 拦截连点重复提交
acting.value = true; acting.value = true;
try { try {
await approvalApi.approve(row.taskId).send(); await approvalApi.approve(row.taskId).send();
+20 -3
View File
@@ -209,7 +209,7 @@ function downAll() {
function displayName(item: { name?: string; filename?: string }) { function displayName(item: { name?: string; filename?: string }) {
return item.name || item.filename || ""; return item.name || item.filename || "";
} }
/* 附件图标(按扩展名,图标名对齐旧版 matchSuffix → icon-word/excel/ppt/pdf1/txt/tupian1/yasuo/weizhi) */ /* 附件图标(按扩展名,图标名对齐旧版 matchSuffix → icon-word/excel/ppt/pdf1/txt/tupian/yasuo/weizhi) */
function getFileIcon(name: string) { function getFileIcon(name: string) {
const suffix = String(name || "").split(".").pop()?.toLowerCase() || ""; const suffix = String(name || "").split(".").pop()?.toLowerCase() || "";
if (["doc", "docx", "wps"].includes(suffix)) return "icon-word"; if (["doc", "docx", "wps"].includes(suffix)) return "icon-word";
@@ -217,7 +217,8 @@ function getFileIcon(name: string) {
if (["ppt", "pptx"].includes(suffix)) return "icon-ppt"; if (["ppt", "pptx"].includes(suffix)) return "icon-ppt";
if (["pdf"].includes(suffix)) return "icon-pdf1"; if (["pdf"].includes(suffix)) return "icon-pdf1";
if (["txt"].includes(suffix)) return "icon-txt"; if (["txt"].includes(suffix)) return "icon-txt";
if (["jpg", "jpeg", "png", "gif", "bmp"].includes(suffix)) return "icon-tupian1"; // 平台 icons.css 的 icon-tupian 是线性「图片」图标;icon-tupian1 是旧彩色图转单色,看不出是图片
if (["jpg", "jpeg", "png", "gif", "bmp"].includes(suffix)) return "icon-tupian";
if (["zip", "rar"].includes(suffix)) return "icon-yasuo"; if (["zip", "rar"].includes(suffix)) return "icon-yasuo";
return "icon-weizhi"; return "icon-weizhi";
} }
@@ -352,7 +353,7 @@ function openPreview(item: { name?: string; filename?: string; fileid?: number;
</Modal> </Modal>
<!-- 办件进度嵌入页(Drawer 内 iframe 撑满,嵌入页内部滚动;token 每次打开现取) --> <!-- 办件进度嵌入页(Drawer 内 iframe 撑满,嵌入页内部滚动;token 每次打开现取) -->
<Drawer v-model="embedVisible" title="审批进度" :width="860" :transfer="false" :styles="{ body: { padding: '0' } }"> <Drawer v-model="embedVisible" title="审批进度" :width="740" :transfer="false" :styles="{ body: { padding: '0' } }">
<div class="embed-frame-wrap"> <div class="embed-frame-wrap">
<iframe v-if="embedPageUrl" :src="embedPageUrl" title="办件进度"></iframe> <iframe v-if="embedPageUrl" :src="embedPageUrl" title="办件进度"></iframe>
</div> </div>
@@ -418,6 +419,19 @@ function openPreview(item: { name?: string; filename?: string; fileid?: number;
</template> </template>
<style scoped> <style scoped>
/* 高度模型(2026-10-10 定稿):卡片撑满视口(与全站其他页一致),但必须能"随长文生长"。
不能直接用通道 .yh-fill:其卡片是 flex:1(basis:0)+ min-height:420px,卡片被钉在容器高,
而 .main-container 带 overflow:hidden(base.layout.css:222)→ 长文被裁掉且滚不到(最小复现已验证)。
故此处 page-wrapper 转 flex 纵向(全局已给 min-height:100%),卡片 flex:1 0 auto(basis:auto)
→ 短文撑满、长文随内容长高、滚动留在 main-wrapper 整页滚。 */
.page-wrapper {
display: flex;
flex-direction: column;
}
.page-wrapper > .main-container {
flex: 1 0 auto;
min-height: 420px;
}
.ops-top { .ops-top {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@@ -586,6 +600,9 @@ function openPreview(item: { name?: string; filename?: string; fileid?: number;
} }
.content { .content {
padding: 16px 0; padding: 16px 0;
/* 正文区最小高度:短通知别让附件/按钮紧贴一行字(旧版用 clientHeight-356 铺满视口,
会把附件顶出首屏;这里只留"呼吸区",剩余空白落在按钮下方的卡片底部) */
min-height: 200px;
line-height: 1.8; line-height: 1.8;
word-break: break-all; word-break: break-all;
color: var(--text); color: var(--text);