调整form表单接口
This commit is contained in:
@@ -1,73 +0,0 @@
|
||||
import createAxios from '@/utils/request'
|
||||
|
||||
import { PROCESS_BOOT } from '@/utils/constantRequest'
|
||||
|
||||
const MAPPING_PATH = PROCESS_BOOT + '/workflow/wfForm'
|
||||
|
||||
/**
|
||||
* 查询流程表单数据
|
||||
*/
|
||||
export const listWFForm = (data: any) => {
|
||||
return createAxios({
|
||||
url: MAPPING_PATH + '/list',
|
||||
method: 'POST',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有流程表单
|
||||
*/
|
||||
export const listAllWFForm = () => {
|
||||
return createAxios({
|
||||
url: MAPPING_PATH + '/listAll',
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询表单详细信息
|
||||
*/
|
||||
export const getFormById = (id: string) => {
|
||||
return createAxios({
|
||||
url: MAPPING_PATH + '/getFormById?id=' + id,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增流程表单
|
||||
*/
|
||||
export const addWFForm = (data: any) => {
|
||||
return createAxios({
|
||||
url: MAPPING_PATH + '/add',
|
||||
method: 'POST',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更新流程表单
|
||||
*/
|
||||
export const updateWFForm = (data: any) => {
|
||||
return createAxios({
|
||||
url: MAPPING_PATH + '/update',
|
||||
method: 'POST',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除流程表单
|
||||
*/
|
||||
export const deleteWFForm = (data: any) => {
|
||||
let ids = [data]
|
||||
return createAxios({
|
||||
url: MAPPING_PATH + '/delete',
|
||||
method: 'POST',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
@@ -337,10 +337,10 @@ const listenerFieldFormRef = ref()
|
||||
const bpmnInstances = () => (window as any)?.bpmnInstances
|
||||
|
||||
const resetListenersList = () => {
|
||||
console.log(
|
||||
bpmnInstances().bpmnElement,
|
||||
'window.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElement'
|
||||
)
|
||||
// console.log(
|
||||
// bpmnInstances().bpmnElement,
|
||||
// 'window.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElement'
|
||||
// )
|
||||
bpmnElement.value = bpmnInstances().bpmnElement
|
||||
otherExtensionList.value = []
|
||||
bpmnElementListeners.value =
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
|
||||
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user