Merge remote-tracking branch 'origin/master'

This commit is contained in:
XaoLi717 2024-11-22 16:47:32 +08:00
commit 816c77e61c
6 changed files with 92 additions and 69 deletions

View File

@ -40,5 +40,13 @@ export const FormProcessMappingApi = {
// 导出BPM 表单工作流对应 Excel
exportFormProcessMapping: async (params) => {
return await request.download({ url: `/bpm/form-process-mapping/export-excel`, params })
}
},
// 通过流程的key得到formCustomViewPath
getFormViewPath: async (key: string) => {
return await request.get({ url: `/bpm/form-process-mapping/get-form-view-path?processKey=` + key })
},
// 通过流程的key得到formCustomCreatePath
getFormCreatePath: async (key: string) => {
return await request.get({ url: `/bpm/form-process-mapping/get-form-create-path?processKey=` + key })
},
}

View File

@ -8,7 +8,7 @@
>
<el-row>
<el-col :span="24">
<el-form-item label="知识标题1" prop="knowTitle">
<el-form-item label="知识标题" prop="knowTitle">
<el-input v-model="formData.knowTitle" placeholder="请输入知识标题" />
</el-form-item>
</el-col>

View File

@ -78,44 +78,44 @@
/>
</el-select>
</el-form-item>
<el-form-item
v-if="formData.formType === 20"
label="表单提交路由"
prop="formCustomCreatePath"
>
<el-input
v-model="formData.formCustomCreatePath"
placeholder="请输入表单提交路由"
style="width: 330px"
/>
<el-tooltip
class="item"
content="自定义表单的提交路径,使用 Vue 的路由地址例如说bpm/oa/leave/create"
effect="light"
placement="top"
>
<i class="el-icon-question" style="padding-left: 5px"></i>
</el-tooltip>
</el-form-item>
<el-form-item
v-if="formData.formType === 20"
label="表单查看地址"
prop="formCustomViewPath"
>
<el-input
v-model="formData.formCustomViewPath"
placeholder="请输入表单查看的组件地址"
style="width: 330px"
/>
<el-tooltip
class="item"
content="自定义表单的查看组件地址,使用 Vue 的组件地址例如说bpm/oa/leave/detail"
effect="light"
placement="top"
>
<i class="el-icon-question" style="padding-left: 5px"></i>
</el-tooltip>
</el-form-item>
<!-- <el-form-item-->
<!-- v-if="formData.formType === 20"-->
<!-- label="表单提交路由"-->
<!-- prop="formCustomCreatePath"-->
<!-- >-->
<!-- <el-input-->
<!-- v-model="formData.formCustomCreatePath"-->
<!-- placeholder="请输入表单提交路由"-->
<!-- style="width: 330px"-->
<!-- />-->
<!-- <el-tooltip-->
<!-- class="item"-->
<!-- content="自定义表单的提交路径,使用 Vue 的路由地址例如说bpm/oa/leave/create"-->
<!-- effect="light"-->
<!-- placement="top"-->
<!-- >-->
<!-- <i class="el-icon-question" style="padding-left: 5px"></i>-->
<!-- </el-tooltip>-->
<!-- </el-form-item>-->
<!-- <el-form-item-->
<!-- v-if="formData.formType === 20"-->
<!-- label="表单查看地址"-->
<!-- prop="formCustomViewPath"-->
<!-- >-->
<!-- <el-input-->
<!-- v-model="formData.formCustomViewPath"-->
<!-- placeholder="请输入表单查看的组件地址"-->
<!-- style="width: 330px"-->
<!-- />-->
<!-- <el-tooltip-->
<!-- class="item"-->
<!-- content="自定义表单的查看组件地址,使用 Vue 的组件地址例如说bpm/oa/leave/detail"-->
<!-- effect="light"-->
<!-- placement="top"-->
<!-- >-->
<!-- <i class="el-icon-question" style="padding-left: 5px"></i>-->
<!-- </el-tooltip>-->
<!-- </el-form-item>-->
</div>
</el-form>
<template #footer>

View File

@ -74,27 +74,27 @@
</template>
</el-table-column>
<el-table-column label="流程分类" align="center" prop="categoryName" width="100" />
<el-table-column label="表单信息" align="center" prop="formType" width="200">
<template #default="scope">
<el-button
v-if="scope.row.formType === 10"
type="primary"
link
@click="handleFormDetail(scope.row)"
>
<span>{{ scope.row.formName }}</span>
</el-button>
<el-button
v-else-if="scope.row.formType === 20"
type="primary"
link
@click="handleFormDetail(scope.row)"
>
<span>{{ scope.row.formCustomCreatePath }}</span>
</el-button>
<label v-else>暂无表单</label>
</template>
</el-table-column>
<!-- <el-table-column label="表单信息" align="center" prop="formType" width="200">-->
<!-- <template #default="scope">-->
<!-- <el-button-->
<!-- v-if="scope.row.formType === 10"-->
<!-- type="primary"-->
<!-- link-->
<!-- @click="handleFormDetail(scope.row)"-->
<!-- >-->
<!-- <span>{{ scope.row.formName }}</span>-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- v-else-if="scope.row.formType === 20"-->
<!-- type="primary"-->
<!-- link-->
<!-- @click="handleFormDetail(scope.row)"-->
<!-- >-->
<!-- <span>{{ scope.row.formCustomCreatePath }}</span>-->
<!-- </el-button>-->
<!-- <label v-else>暂无表单</label>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
label="创建时间"
align="center"

View File

@ -108,6 +108,7 @@ import ProcessInstanceBpmnViewer from '../detail/ProcessInstanceBpmnViewer.vue'
import { CategoryApi } from '@/api/bpm/category'
import { useTagsViewStore } from '@/store/modules/tagsView'
import * as UserApi from '@/api/system/user'
import { FormProcessMappingApi} from '@/api/bpm/formprocessmapping'
defineOptions({ name: 'BpmProcessInstanceCreate' })
@ -188,7 +189,8 @@ const handleSelect = async (row, formVariables) => {
startUserSelectTasks.value = []
startUserSelectAssignees.value = {}
startUserSelectAssigneesFormRules.value = {}
//console.log(row.formType,"row.formType")
//row.formCustomCreatePath ="/bpm/knows/knowledge/KnowledgeCreate"
//
if (row.formType == 10) {
//
@ -224,6 +226,16 @@ const handleSelect = async (row, formVariables) => {
path: row.formCustomCreatePath
})
// Tab
} else {
//console.log(row.key,"row.key")
const process_key = row.key
const formCustomCreatePath = await FormProcessMappingApi.getFormCreatePath(process_key)
// console.log(formCustomCreatePath,"formCustomCreatePath")
if (formCustomCreatePath != "") {
await push({
path: formCustomCreatePath
})
}
}
}

View File

@ -157,6 +157,7 @@ import { registerComponent } from '@/utils/routerHelper'
import { isEmpty } from '@/utils/is'
import * as UserApi from '@/api/system/user'
import {TabsPaneContext} from "element-plus";
import { FormProcessMappingApi} from '@/api/bpm/formprocessmapping'
defineOptions({ name: 'BpmProcessInstanceDetail' })
@ -285,10 +286,10 @@ const getProcessInstance = async () => {
return
}
processInstance.value = data
console.log(data,"processInstance_data")
//console.log(data,"processInstance_data")
//
const processDefinition = data.processDefinition
console.log(processDefinition.formType,"processDefinition.formType")
//console.log(processDefinition.formType,"processDefinition.formType")
if (processDefinition.formType === 10) {
setConfAndFields2(
detailForm,
@ -306,7 +307,9 @@ const getProcessInstance = async () => {
//console.log(data.processDefinition.formCustomViewPath,"formCustomViewPath")
if ( data.processDefinition.formCustomViewPath == "") {
const process_key = data.processDefinition.key
console.log(process_key,"process_key")
//console.log(process_key,"process_key")
const formCustomViewPath = await FormProcessMappingApi.getFormViewPath(process_key)
BusinessFormComponent.value = registerComponent(formCustomViewPath)
} else {
BusinessFormComponent.value = registerComponent(data.processDefinition.formCustomViewPath)
}