@javaguns/flow-ui
Version:
``` <template> <a-spin :spinning="loading"> <FlowDesigner ref="flowDesigner" top="50px"> </FlowDesigner> </a-spin> </template> <script lang="ts" setup> import { ref, provide, onMounted } from 'vue'; import { FlowDesigner, LoadingKey } from '@j
149 lines (148 loc) • 4.75 kB
JavaScript
import { defineComponent as g, toRefs as W, ref as c, getCurrentInstance as C, watch as N, openBlock as I, createBlock as S, unref as e, withCtx as p, createVNode as a, createSlots as u } from "vue";
import "./style/index.css";
import { pluginManager as m } from "@javaguns/utils";
import { getRuTaskList as D } from "../utils/api.mjs";
import "../flow-widget/flow-node-addbutton/index.mjs";
import "../flow-widget/flow-node-delbutton/index.mjs";
import "../flow-widget/flow-node-delconfirm/index.mjs";
import "../flow-widget/flow-node-errorwarn/index.mjs";
import "../flow-widget/flow-node-dragtool/index.mjs";
import "../flow-widget/flow-node-zoom/index.mjs";
import { GunsFlowTaskStatus as k } from "../flow-widget/flow-task-status/index.mjs";
import "../flow-widget/flow-task-image/index.mjs";
import "../flow-widget/flow-task-timeline/index.mjs";
import "../flow-widget/flow-task-user/index.mjs";
import f from "./taskType.vue.mjs";
const B = g({ name: "flow-history" }), O = /* @__PURE__ */ g({
...B,
props: {
datas: {}
},
emits: ["load"],
setup(v, { expose: T, emit: y }) {
const b = m.getComponent("Table"), r = m.getComponent("TableColumn"), s = v, { datas: _ } = W(s), n = c(_.value || []), { appContext: h } = C(), l = h.app.config.globalProperties.$flowUI, x = c(l == "arco-design" ? "columns" : "default"), w = y;
return N(
() => s.datas,
() => {
s.datas && (n.value = s.datas);
}
), T({
setData: async (o) => {
if (o.instanceId) {
const i = await D({
instanceId: o.instanceId
});
i && i.data && (n.value = i.data.data), w("load", n.value);
} else
o.datas && (n.value = o.datas);
},
getData: () => n.value
}), (o, i) => (I(), S(e(b), {
data: n.value,
"data-source": n.value,
pagination: !1,
bordered: ""
}, {
[x.value]: p(() => [
a(e(r), {
prop: "ruNodeName",
"header-align": "center",
label: "节点名称",
align: "center",
key: "ruNodeName",
title: "节点名称",
"data-index": "ruNodeName"
}),
a(e(r), {
prop: "approverWrapper",
"header-align": "center",
label: "处理人",
align: "center",
key: "approverWrapper",
title: "处理人",
"data-index": "approverWrapper"
}),
a(e(r), {
prop: "taskTypeWrapper",
"header-align": "center",
label: "任务类型",
align: "center",
key: "taskTypeWrapper",
title: "任务类型",
"data-index": "taskTypeWrapper"
}, u({
cell: p(({ record: t }) => [
a(f, { task: t }, null, 8, ["task"])
]),
_: 2
}, [
e(l) == "element-plus" || e(l) == "ant-design-vue" ? {
name: "default",
fn: p(({ record: t, row: d }) => [
a(f, {
task: t || d
}, null, 8, ["task"])
]),
key: "0"
} : void 0
]), 1024),
a(e(r), {
prop: "taskStatusWrapper",
"header-align": "center",
label: "任务状态",
align: "center",
key: "taskStatusWrapper",
title: "任务状态",
"data-index": "taskStatusWrapper"
}, u({
cell: p(({ record: t }) => [
a(e(k), { task: t }, null, 8, ["task"])
]),
_: 2
}, [
e(l) == "element-plus" || e(l) == "ant-design-vue" ? {
name: "default",
fn: p(({ record: t, row: d }) => [
a(e(k), {
task: t || d
}, null, 8, ["task"])
]),
key: "0"
} : void 0
]), 1024),
a(e(r), {
prop: "createTime",
"header-align": "center",
label: "开始时间",
align: "center",
key: "createTime",
title: "开始时间",
"data-index": "createTime"
}),
a(e(r), {
prop: "updateTime",
"header-align": "center",
label: "结束时间",
align: "center",
key: "updateTime",
title: "结束时间",
"data-index": "updateTime"
}),
a(e(r), {
prop: "remark",
"header-align": "center",
label: "审批意见",
"show-overflow-tooltip": "",
align: "center",
key: "remark",
title: "审批意见",
"data-index": "remark"
})
]),
_: 2
}, 1032, ["data", "data-source"]));
}
});
export {
O as default
};