creat:生成code

This commit is contained in:
dzc committed 2025-01-03 16:19:36 +08:00
1 parent 18fa9d18a4
commit 08b193fe7b
10 files changed
+316 -132

No files matched your search

+4 -12
View File
@@ -4,12 +4,8 @@
<el-row>
<el-col :span="12">
<el-form label-position="top">
<form-render
@addLayoutOneItem="addLayoutOneItem"
ref="formRenderRef"
@deleteLayoutOneItem="deleteLayoutOneItem"
:form-list="currentOpenFlowForm"
></form-render>
<form-render @addLayoutOneItem="addLayoutOneItem" ref="formRenderRef"
@deleteLayoutOneItem="deleteLayoutOneItem" :form-list="currentOpenFlowForm"></form-render>
</el-form>
<div class="flex justify-center mt-4">
@@ -18,12 +14,8 @@
</div>
</el-col>
<el-col :span="12">
<flow-node-format
:formData="formValue"
:selectUserNodeId="selectUserNodeId"
:flow-id="currentOpenFlow.flowId"
ref="flowNodeFormatRef"
></flow-node-format>
<flow-node-format :formData="formValue" :selectUserNodeId="selectUserNodeId"
:flow-id="currentOpenFlow.flowId" ref="flowNodeFormatRef"></flow-node-format>
</el-col>
</el-row>
</el-dialog>
+8 -27
View File
@@ -24,13 +24,13 @@ const submit = async () => {
if (!currentData.value || !currentOpenFlowForm.value) return
const formData: Record<string, any> = {}
for (const item of currentOpenFlowForm.value) {
formData[item.id] = item.props.value
if (item.type === 'Layout') {
const subList = item.props.value as FlowFormItem[][]
const processedData = subList.map(array =>
const processedData = subList.map(array =>
array.reduce((acc, subItem) => ({
...acc,
[subItem.id]: subItem.props.value
@@ -62,35 +62,16 @@ const submit = async () => {
<template>
<div>
<el-dialog
v-model="dialogVisible"
title="提交审核"
:width="400"
class="rounded-lg shadow-xl"
>
<el-dialog v-model="dialogVisible" title="提交审核" :width="400" class="rounded-lg shadow-xl">
<div class="p-4 space-y-4">
<el-input
v-model="submitDesc"
type="textarea"
maxlength="100"
:rows="5"
placeholder="请输入审核意见..."
show-word-limit
class="w-full transition-all duration-300 focus:ring-2 focus:ring-primary"
/>
<el-input v-model="submitDesc" type="textarea" maxlength="100" :rows="5" placeholder="请输入审核意见..."
show-word-limit class="w-full transition-all duration-300 focus:ring-2 focus:ring-primary" />
<div class="flex justify-end pt-4 space-x-3">
<el-button
@click="dialogVisible = false"
class="hover:bg-gray-100 dark:hover:bg-gray-700"
>
<el-button @click="dialogVisible = false" class="hover:bg-gray-100 dark:hover:bg-gray-700">
取消
</el-button>
<el-button
type="primary"
@click="submit"
class="bg-primary hover:bg-primary-focus"
>
<el-button type="primary" @click="submit" class="bg-primary hover:bg-primary-focus">
确定
</el-button>
</div>