@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
75 lines (74 loc) • 2.45 kB
JavaScript
import { defineComponent as d, getCurrentInstance as F, ref as n, openBlock as _, createBlock as b, unref as t, withCtx as p, createVNode as r } from "vue";
import { pluginManager as u } from "@javaguns/utils";
import { FlowSelection as y } from "../../flow-selection/index.mjs";
const V = d({ name: "flow-operate-turn" }), k = /* @__PURE__ */ d({
...V,
setup(h, { expose: v }) {
const f = u.getComponent("Form"), s = u.getComponent("FormItem"), w = u.getComponent("Textarea"), { appContext: c } = F(), i = c.app.config.globalProperties.$flowUI, a = n(), g = { style: { width: "100px" } }, e = n({
newApprover: [],
whisper: ""
}), x = n({
newApprover: [{ required: !0, message: "请选择转交人员!", trigger: "blur" }]
}), m = async () => {
try {
return i == "element-plus" || i == "arco-design" ? await a.value.validate() : await a.value.validateFields(), e.value;
} catch {
}
};
return v({
valid: m
}), (C, o) => (_(), b(t(f), {
ref_key: "turnForm",
ref: a,
model: e.value,
rules: x.value,
"label-col": g,
layout: "vertical",
"label-position": "top"
}, {
default: p(() => [
r(t(s), {
label: "转交接收人",
name: "newApprover",
prop: "newApprover"
}, {
default: p(() => [
r(t(y), {
ref: "flowSelection",
type: "user",
title: "请选择人员",
isRadio: !1,
min: 1,
max: 25,
modelValue: e.value.newApprover,
"onUpdate:modelValue": o[0] || (o[0] = (l) => e.value.newApprover = l),
onChange: m
}, null, 8, ["modelValue"])
]),
_: 1
}),
r(t(s), {
label: "捎话",
prop: "whisper"
}, {
default: p(() => [
r(t(w), {
modelValue: e.value.whisper,
"onUpdate:modelValue": o[1] || (o[1] = (l) => e.value.whisper = l),
value: e.value.whisper,
"onUpdate:value": o[2] || (o[2] = (l) => e.value.whisper = l),
type: "textarea",
rows: 3,
placeholder: "捎话内容"
}, null, 8, ["modelValue", "value"])
]),
_: 1
})
]),
_: 1
}, 8, ["model", "rules"]));
}
});
export {
k as default
};