调整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 bpmnInstances = () => (window as any)?.bpmnInstances
|
||||||
|
|
||||||
const resetListenersList = () => {
|
const resetListenersList = () => {
|
||||||
console.log(
|
// console.log(
|
||||||
bpmnInstances().bpmnElement,
|
// bpmnInstances().bpmnElement,
|
||||||
'window.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElement'
|
// 'window.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElement'
|
||||||
)
|
// )
|
||||||
bpmnElement.value = bpmnInstances().bpmnElement
|
bpmnElement.value = bpmnInstances().bpmnElement
|
||||||
otherExtensionList.value = []
|
otherExtensionList.value = []
|
||||||
bpmnElementListeners.value =
|
bpmnElementListeners.value =
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import TableStore from '@/utils/tableStore'
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { onMounted, provide, ref, reactive,nextTick } from 'vue'
|
import { onMounted, provide, ref, reactive,nextTick } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
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()
|
const { push } = useRouter()
|
||||||
@@ -71,24 +71,24 @@ const tableStore = new TableStore({
|
|||||||
minWidth: '230',
|
minWidth: '230',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
// {
|
||||||
name: 'view',
|
// name: 'view',
|
||||||
title: '预览',
|
// title: '预览',
|
||||||
type: 'primary',
|
// type: 'primary',
|
||||||
icon: 'el-icon-EditPen',
|
// icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
// render: 'basicButton',
|
||||||
click: row => {
|
// click: row => {
|
||||||
//首先根据id查询出详细数据,然后渲染json
|
// //首先根据id查询出详细数据,然后渲染json
|
||||||
getFormById(row.id).then(res => {
|
// getById(row.id).then(res => {
|
||||||
render.visible = true;
|
// render.visible = true;
|
||||||
render.title = '查看表单详情';
|
// render.title = '查看表单详情';
|
||||||
nextTick(async () => {
|
// nextTick(async () => {
|
||||||
vfRenderRef.value.setFormJson(res.data.content || {formConfig: {}, widgetList: []});
|
// vfRenderRef.value.setFormJson(res.data.content || {formConfig: {}, widgetList: []});
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
name: 'update',
|
name: 'update',
|
||||||
title: '设计表单',
|
title: '设计表单',
|
||||||
@@ -113,7 +113,7 @@ const tableStore = new TableStore({
|
|||||||
title: '确定删除吗?'
|
title: '确定删除吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
deleteWFForm(row.id).then(res => {
|
deleteForm(row.id).then(res => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -30,10 +30,10 @@
|
|||||||
{{ processInstance?.startUser.deptName }}
|
{{ processInstance?.startUser.deptName }}
|
||||||
</el-form-item>
|
</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>
|
<template #header>
|
||||||
<span class='el-icon-picture-outline'>
|
<span class='el-icon-picture-outline'>
|
||||||
填写表单【{{ runningTasks[index]?.formName }}】
|
{{ runningTasks[index]?.formName }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<form-create
|
<form-create
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-form-item label='审批建议' prop='reason'>
|
<el-form-item label='审批建议' prop='reason' style='margin-top: 15px'>
|
||||||
<el-input
|
<el-input
|
||||||
v-model='auditForms[index].reason'
|
v-model='auditForms[index].reason'
|
||||||
placeholder='请输入审批建议'
|
placeholder='请输入审批建议'
|
||||||
@@ -397,7 +397,7 @@ const loadRunningTask = (tasks) => {
|
|||||||
reason: '',
|
reason: '',
|
||||||
copyUserIds: []
|
copyUserIds: []
|
||||||
})
|
})
|
||||||
|
console.log(runningTasks.value)
|
||||||
// 2.4 处理 approve 表单
|
// 2.4 处理 approve 表单
|
||||||
if (task.formId && task.formConf) {
|
if (task.formId && task.formConf) {
|
||||||
const approveForm = {}
|
const approveForm = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user