[audit] P6.1 F11-4 台账状态筛选增「路由挂起」伪选项 + 行状态列 routeHung 红标

This commit is contained in:
chenxing
2026-10-18 08:06:10 +08:00
parent 650665224c
commit 33500e23d6
+14 -4
View File
@@ -10,7 +10,8 @@ import { flowApi, INSTANCE_STATUS, INSTANCE_STATUS_COLOR } from "@/api/module/fl
import { actionColumn } from "@/utils/tableActions";
const tableRef = ref<InstanceType<typeof TablePageAlovaNew> | null>(null);
const dataParams = ref<{ status?: number; keyword?: string }>({ status: undefined, keyword: "" });
// status 下拉含伪选项 'hung'(路由挂起):表内是 string,出站转 hung=true(不再传 status)
const dataParams = ref<{ status?: number | string; keyword?: string }>({ status: undefined, keyword: "" });
const drawerVisible = ref(false);
const drawerInstanceId = ref<string | number>("");
@@ -18,8 +19,11 @@ const columns = [
{ title: "序号", type: "index", width: 70, align: "center" },
{ title: "办件标题", key: "bizTitle", minWidth: 220 },
{ title: "业务", width: 170, render: (h: any, p: any) => h("span", `${p.row.bizType || "-"}/${p.row.bizId || "-"}`) },
{ title: "状态", width: 100, align: "center", render: (h: any, p: any) =>
h(Tag, { color: INSTANCE_STATUS_COLOR[p.row.status] || "gray" }, () => INSTANCE_STATUS[p.row.status] || p.row.status) },
{ title: "状态", width: 120, align: "center", render: (h: any, p: any) => h("span", [
h(Tag, { color: INSTANCE_STATUS_COLOR[p.row.status] || "gray" }, () => INSTANCE_STATUS[p.row.status] || p.row.status),
// F11-4 路由挂起红标:接口回传 routeHung(最新 attempt 路由判断仍无出口)
p.row.routeHung ? h(Tag, { color: "red" }, () => "路由挂起") : null,
]) },
{ title: "提交人", key: "submitterName", width: 100 },
{ title: "提交时间", width: 160, render: (h: any, p: any) => h("span", (p.row.submitTime || "").replace("T", " ")) },
actionColumn(
@@ -54,7 +58,12 @@ function onReroute(row: any) {
// dataApi 返回 Method(alova usePagination 负责发送与解包),不能调 .send()
const tableApi = (p: { pageIndex: number; pageSize: number }) => {
const params: any = { page: p.pageIndex, size: p.pageSize };
if (dataParams.value.status) params.status = dataParams.value.status;
if (dataParams.value.status === "hung") {
// F11-4 路由挂起伪选项:只传 hung,不带 status(后端 hung 过滤已内含审批中)
params.hung = true;
} else if (dataParams.value.status) {
params.status = dataParams.value.status;
}
if (dataParams.value.keyword) params.keyword = dataParams.value.keyword.trim();
return flowApi.adminInstances(params);
};
@@ -73,6 +82,7 @@ function onSearch() {
<Option :value="20" label="已完成" />
<Option :value="30" label="已拒绝" />
<Option :value="40" label="已撤回" />
<Option value="hung" label="路由挂起" />
</Select>
<Input class="fr" v-model="dataParams.keyword" placeholder="标题关键字" search suffix="ios-search"
style="width: 200px" @on-search="onSearch" @on-clear="onSearch" />