56 lines
1.4 KiB
Vue
56 lines
1.4 KiB
Vue
<!-- 开始节点配置 -->
|
|
<template>
|
|
<div class="subprocess">
|
|
<a-form ref="formRef" :model="node" labelAlign="left" :label-col="labelCol" :wrapper-col="wrapperCol">
|
|
<a-form-item label="节点标识">
|
|
<a-input v-model:value="node.id" placeholder="请输入" readonly />
|
|
</a-form-item>
|
|
<a-form-item label="是否异步">
|
|
<a-switch v-model:checked="node.isAsync" />
|
|
</a-form-item>
|
|
<a-form-item label="流程模版">
|
|
<a-select v-model:value="node.wfschemeId" :options="data.list">
|
|
</a-select>
|
|
</a-form-item>
|
|
<a-form-item label="流程版本">
|
|
<a-select v-model:value="node.wfVersionId" :options="data.verisons">
|
|
</a-select>
|
|
</a-form-item>
|
|
</a-form>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { reactive, defineProps, computed, inject, ref, watch, h } from 'vue'
|
|
const labelCol = { span: 7 };
|
|
const wrapperCol = { span: 17 };
|
|
const props = defineProps({
|
|
element: Object
|
|
})
|
|
const node = reactive({
|
|
id: '',
|
|
isAsync: false,
|
|
wfschemeId: '',
|
|
wfVersionId: '',
|
|
})
|
|
watch(
|
|
() => props.element,
|
|
(newVal, oldVal) => {
|
|
node.id = newVal.id
|
|
node.type = newVal.type
|
|
}
|
|
)
|
|
const data = reactive({
|
|
list: [],
|
|
verisons: []
|
|
})
|
|
function getForm() {
|
|
return node
|
|
}
|
|
defineExpose({
|
|
getForm
|
|
})
|
|
</script>
|
|
|
|
<style>
|
|
</style> |