This commit is contained in:
@@ -6,6 +6,7 @@ import { ref, onMounted } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { Message } from "view-ui-plus";
|
||||
import { flowApi } from "@/api/module/flow";
|
||||
import Utils from "@/utils";
|
||||
|
||||
const router = useRouter();
|
||||
const DEF_STATUS: Record<number, string> = { 0: "草稿", 1: "已发布", 2: "停用" };
|
||||
@@ -25,18 +26,18 @@ const columns = [
|
||||
} },
|
||||
{ title: "GUID", key: "flowGuid", width: 200 },
|
||||
{ title: "发布时间", width: 160, render: (h: any, p: any) => h("span", (p.row.publishTime || "").replace("T", " ") || "-") },
|
||||
{ title: "操作", width: 330, render: (h: any, p: any) => {
|
||||
{ title: "操作", width: 320, fixed: "right", render: (h: any, p: any) => {
|
||||
const btns: any[] = [];
|
||||
if (p.row.status === 0) {
|
||||
btns.push(h("Button", { size: "small", type: "primary", onClick: () => onEdit(p.row) }, () => "编辑"));
|
||||
btns.push(h("Button", { size: "small", type: "success", onClick: () => onPublish(p.row) }, () => "发布"));
|
||||
btns.push(Utils.operatingTextHandle(h, "编辑", "", () => onEdit(p.row)));
|
||||
btns.push(Utils.operatingTextHandle(h, "发布", "", () => onPublish(p.row)));
|
||||
} else if (p.row.status === 1) {
|
||||
btns.push(h("Button", { size: "small", onClick: () => onNewVersion(p.row) }, () => "升版本"));
|
||||
btns.push(h("Button", { size: "small", type: "warning", onClick: () => onOffline(p.row) }, () => "停用"));
|
||||
btns.push(Utils.operatingTextHandle(h, "升版本", "", () => onNewVersion(p.row)));
|
||||
btns.push(Utils.operatingTextHandle(h, "停用", "text-error", () => onOffline(p.row)));
|
||||
}
|
||||
btns.push(h("Button", { size: "small", onClick: () => onDiagram(p.row) }, () => "图示"));
|
||||
btns.push(h("Button", { size: "small", onClick: () => onVersions(p.row) }, () => "版本历史"));
|
||||
return h("div", { style: "display:flex;gap:4px" }, btns);
|
||||
btns.push(Utils.operatingTextHandle(h, "图示", "", () => onDiagram(p.row)));
|
||||
btns.push(Utils.operatingTextHandle(h, "版本历史", "", () => onVersions(p.row)));
|
||||
return btns;
|
||||
} },
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user