troy-flow-engine
Version:
<!-- * @Descripttion: * @version: * @Author: wangmin * @Date: 2025-04-27 15:03:16 * @LastEditors: wangmin * @LastEditTime: 2025-05-14 16:43:12 -->
137 lines (136 loc) • 4.71 kB
JavaScript
import { ref as g, reactive as C, watch as f, resolveComponent as r, createElementBlock as _, openBlock as p, createVNode as l, withCtx as n, renderSlot as u, Fragment as w, renderList as B, createBlock as K } from "vue";
const $ = {
__name: "index",
props: {
value: {
type: Object,
default: () => ({})
},
formList: {
type: Array,
default: () => []
}
},
emits: ["change"],
setup(i, { emit: b }) {
const V = b, d = g("basic"), t = C({
displayName: "",
preInterceptors: "",
postInterceptors: "",
formKey: ""
}), v = i;
f(
() => v.value,
(a) => {
Object.assign(t, { ...a });
},
{ deep: !0, immediate: !0 }
), f(
t,
(a) => {
V("change", { ...a });
},
{ deep: !0 }
);
const y = (a, o) => {
d.value = a.name;
};
return (a, o) => {
const s = r("el-input"), m = r("el-form-item"), k = r("el-option"), I = r("el-select"), c = r("el-tab-pane"), N = r("el-tabs"), U = r("el-form");
return p(), _("div", null, [
l(U, {
model: t,
"label-width": "100px"
}, {
default: n(() => [
l(N, {
modelValue: d.value,
"onUpdate:modelValue": o[4] || (o[4] = (e) => d.value = e),
onTabClick: y,
type: "border-card"
}, {
default: n(() => [
l(c, {
label: "基础配置",
name: "basic"
}, {
default: n(() => [
l(m, { label: "节点名称" }, {
default: n(() => [
l(s, {
modelValue: t.displayName,
"onUpdate:modelValue": o[0] || (o[0] = (e) => t.displayName = e),
placeholder: "请输入节点名称"
}, null, 8, ["modelValue"])
]),
_: 1
}),
u(a.$slots, "form-item-task-form-key", {}, () => [
l(m, { label: "流程表单" }, {
default: n(() => [
l(I, {
modelValue: t.formKey,
"onUpdate:modelValue": o[1] || (o[1] = (e) => t.formKey = e),
placeholder: "请选择流程表单"
}, {
default: n(() => [
(p(!0), _(w, null, B(i.formList, (e) => (p(), K(k, {
key: e.id,
label: e.name,
value: e.id
}, null, 8, ["label", "value"]))), 128))
]),
_: 1
}, 8, ["modelValue"])
]),
_: 1
})
])
]),
_: 3
}),
l(c, {
label: "监听器",
name: "listener"
}, {
default: n(() => [
u(a.$slots, "form-item-task-pre-interceptors", {}, () => [
l(m, { label: "前置拦截器" }, {
default: n(() => [
l(s, {
modelValue: t.preInterceptors,
"onUpdate:modelValue": o[2] || (o[2] = (e) => t.preInterceptors = e),
placeholder: "请输入前置拦截器"
}, null, 8, ["modelValue"])
]),
_: 1
})
]),
u(a.$slots, "form-item-task-post-interceptors", {}, () => [
l(m, { label: "后置拦截器" }, {
default: n(() => [
l(s, {
modelValue: t.postInterceptors,
"onUpdate:modelValue": o[3] || (o[3] = (e) => t.postInterceptors = e),
placeholder: "请输入后置拦截器"
}, null, 8, ["modelValue"])
]),
_: 1
})
])
]),
_: 3
})
]),
_: 3
}, 8, ["modelValue"])
]),
_: 3
}, 8, ["model"])
]);
};
}
};
export {
$ as default
};