调整form表单接口

This commit is contained in:
2024-05-20 19:07:56 +08:00
parent 9f2f0b5030
commit 5c63c5d5cc
4 changed files with 30 additions and 103 deletions

View File

@@ -30,7 +30,7 @@ import TableStore from '@/utils/tableStore'
import { ElMessage } from 'element-plus'
import { onMounted, provide, ref, reactive,nextTick } from 'vue'
import { useRouter } from 'vue-router'
import { deleteWFForm, getFormById } from '@/api/process-boot/workflow/form'
import { deleteForm, getById } from '@/api/bpm-boot/form'
const { push } = useRouter()
@@ -71,24 +71,24 @@ const tableStore = new TableStore({
minWidth: '230',
fixed: 'right',
buttons: [
{
name: 'view',
title: '预览',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: row => {
//首先根据id查询出详细数据然后渲染json
getFormById(row.id).then(res => {
render.visible = true;
render.title = '查看表单详情';
nextTick(async () => {
vfRenderRef.value.setFormJson(res.data.content || {formConfig: {}, widgetList: []});
});
})
}
},
// {
// name: 'view',
// title: '预览',
// type: 'primary',
// icon: 'el-icon-EditPen',
// render: 'basicButton',
// click: row => {
// //首先根据id查询出详细数据然后渲染json
// getById(row.id).then(res => {
// render.visible = true;
// render.title = '查看表单详情';
// nextTick(async () => {
// vfRenderRef.value.setFormJson(res.data.content || {formConfig: {}, widgetList: []});
// });
//
// })
// }
// },
{
name: 'update',
title: '设计表单',
@@ -113,7 +113,7 @@ const tableStore = new TableStore({
title: '确定删除吗?'
},
click: row => {
deleteWFForm(row.id).then(res => {
deleteForm(row.id).then(res => {
ElMessage.success('删除成功')
tableStore.index()
})

View File

@@ -30,11 +30,11 @@
{{ processInstance?.startUser.deptName }}
</el-form-item>
<el-card v-if='runningTasks[index].formId > 0' class='mb-15px !-mt-10px'>
<el-card v-if='runningTasks[index].formId != null' class='mb-15px !-mt-10px'>
<template #header>
<span class='el-icon-picture-outline'>
填写表单【{{ runningTasks[index]?.formName }}
</span>
<span class='el-icon-picture-outline'>
{{ runningTasks[index]?.formName }}
</span>
</template>
<form-create
v-model='approveForms[index].value'
@@ -44,7 +44,7 @@
/>
</el-card>
<el-form-item label='审批建议' prop='reason'>
<el-form-item label='审批建议' prop='reason' style='margin-top: 15px'>
<el-input
v-model='auditForms[index].reason'
placeholder='请输入审批建议'
@@ -397,7 +397,7 @@ const loadRunningTask = (tasks) => {
reason: '',
copyUserIds: []
})
console.log(runningTasks.value)
// 2.4 处理 approve 表单
if (task.formId && task.formConf) {
const approveForm = {}