Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
816c77e61c
@ -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 })
|
||||
},
|
||||
}
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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"
|
||||
|
@ -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) {
|
||||
// 设置表单
|
||||
@ -220,10 +222,20 @@ const handleSelect = async (row, formVariables) => {
|
||||
}
|
||||
// 情况二:业务表单
|
||||
} else if (row.formCustomCreatePath) {
|
||||
await push({
|
||||
path: row.formCustomCreatePath
|
||||
})
|
||||
// 这里暂时无需加载流程图,因为跳出到另外个 Tab;
|
||||
await push({
|
||||
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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user