feat: 工作编排

This commit is contained in:
wangdan-fit2cloud 2024-06-12 15:33:14 +08:00
parent 9467e3d32c
commit 7bf01df60b
3 changed files with 28 additions and 3 deletions

View File

@ -142,6 +142,9 @@ h5 {
.mt-20 {
margin-top: calc(var(--app-base-px) * 2 + 4px);
}
.mt-24 {
margin-top: calc(var(--app-base-px) * 3);
}
.mb-4 {
margin-bottom: calc(var(--app-base-px) - 4px);

View File

@ -32,7 +32,7 @@
<el-form-item
:prop="'branch.' + index + '.conditions' + cIndex + '.field'"
:rules="{
type: Array,
type: 'array',
required: true,
message: '请选择变量',
trigger: 'change'
@ -189,7 +189,7 @@ function addBranch() {
function addCondition(index: number) {
const list = cloneDeep(props.nodeModel.properties.node_data.branch)
list[index]['conditions'].push({
field: { node_id: 'xxx', fields: '' },
field: [],
compare: '',
value: ''
})

View File

@ -33,7 +33,7 @@
:footers="footers"
>
<template #defFooters>
<el-button text type="info">
<el-button text type="info" @click="openDialog">
<AppIcon iconName="app-magnify" style="font-size: 16px"></AppIcon>
</el-button>
</template>
@ -48,6 +48,15 @@
</el-form-item>
</el-form>
</el-card>
<!-- 回复内容弹出层 -->
<el-dialog v-model="dialogVisible" title="回复内容" append-to-body>
<MdEditor v-model="cloneContent" :preview="false" :toolbars="[]" :footers="[]"> </MdEditor>
<template #footer>
<div class="dialog-footer mt-24">
<el-button type="primary" @click="submitDialog"> 确认 </el-button>
</div>
</template>
</el-dialog>
</NodeContainer>
</template>
<script setup lang="ts">
@ -79,6 +88,19 @@ const form_data = computed({
set(props.nodeModel.properties, 'node_data', value)
}
})
const dialogVisible = ref(false)
const cloneContent = ref('')
function openDialog() {
cloneContent.value = form_data.value.content
dialogVisible.value = true
}
function submitDialog() {
set(props.nodeModel.properties.node_data, 'content', cloneContent.value)
dialogVisible.value = false
}
// onMounted(() => {
// set(props.nodeModel, 'validate', validate)
// })