Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
816c77e61c
@ -40,5 +40,13 @@ export const FormProcessMappingApi = {
|
|||||||
// 导出BPM 表单工作流对应 Excel
|
// 导出BPM 表单工作流对应 Excel
|
||||||
exportFormProcessMapping: async (params) => {
|
exportFormProcessMapping: async (params) => {
|
||||||
return await request.download({ url: `/bpm/form-process-mapping/export-excel`, 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-row>
|
||||||
<el-col :span="24">
|
<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-input v-model="formData.knowTitle" placeholder="请输入知识标题" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -78,44 +78,44 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<!-- <el-form-item-->
|
||||||
v-if="formData.formType === 20"
|
<!-- v-if="formData.formType === 20"-->
|
||||||
label="表单提交路由"
|
<!-- label="表单提交路由"-->
|
||||||
prop="formCustomCreatePath"
|
<!-- prop="formCustomCreatePath"-->
|
||||||
>
|
<!-- >-->
|
||||||
<el-input
|
<!-- <el-input-->
|
||||||
v-model="formData.formCustomCreatePath"
|
<!-- v-model="formData.formCustomCreatePath"-->
|
||||||
placeholder="请输入表单提交路由"
|
<!-- placeholder="请输入表单提交路由"-->
|
||||||
style="width: 330px"
|
<!-- style="width: 330px"-->
|
||||||
/>
|
<!-- />-->
|
||||||
<el-tooltip
|
<!-- <el-tooltip-->
|
||||||
class="item"
|
<!-- class="item"-->
|
||||||
content="自定义表单的提交路径,使用 Vue 的路由地址,例如说:bpm/oa/leave/create"
|
<!-- content="自定义表单的提交路径,使用 Vue 的路由地址,例如说:bpm/oa/leave/create"-->
|
||||||
effect="light"
|
<!-- effect="light"-->
|
||||||
placement="top"
|
<!-- placement="top"-->
|
||||||
>
|
<!-- >-->
|
||||||
<i class="el-icon-question" style="padding-left: 5px"></i>
|
<!-- <i class="el-icon-question" style="padding-left: 5px"></i>-->
|
||||||
</el-tooltip>
|
<!-- </el-tooltip>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item
|
<!-- <el-form-item-->
|
||||||
v-if="formData.formType === 20"
|
<!-- v-if="formData.formType === 20"-->
|
||||||
label="表单查看地址"
|
<!-- label="表单查看地址"-->
|
||||||
prop="formCustomViewPath"
|
<!-- prop="formCustomViewPath"-->
|
||||||
>
|
<!-- >-->
|
||||||
<el-input
|
<!-- <el-input-->
|
||||||
v-model="formData.formCustomViewPath"
|
<!-- v-model="formData.formCustomViewPath"-->
|
||||||
placeholder="请输入表单查看的组件地址"
|
<!-- placeholder="请输入表单查看的组件地址"-->
|
||||||
style="width: 330px"
|
<!-- style="width: 330px"-->
|
||||||
/>
|
<!-- />-->
|
||||||
<el-tooltip
|
<!-- <el-tooltip-->
|
||||||
class="item"
|
<!-- class="item"-->
|
||||||
content="自定义表单的查看组件地址,使用 Vue 的组件地址,例如说:bpm/oa/leave/detail"
|
<!-- content="自定义表单的查看组件地址,使用 Vue 的组件地址,例如说:bpm/oa/leave/detail"-->
|
||||||
effect="light"
|
<!-- effect="light"-->
|
||||||
placement="top"
|
<!-- placement="top"-->
|
||||||
>
|
<!-- >-->
|
||||||
<i class="el-icon-question" style="padding-left: 5px"></i>
|
<!-- <i class="el-icon-question" style="padding-left: 5px"></i>-->
|
||||||
</el-tooltip>
|
<!-- </el-tooltip>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
@ -74,27 +74,27 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="流程分类" align="center" prop="categoryName" width="100" />
|
<el-table-column label="流程分类" align="center" prop="categoryName" width="100" />
|
||||||
<el-table-column label="表单信息" align="center" prop="formType" width="200">
|
<!-- <el-table-column label="表单信息" align="center" prop="formType" width="200">-->
|
||||||
<template #default="scope">
|
<!-- <template #default="scope">-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
v-if="scope.row.formType === 10"
|
<!-- v-if="scope.row.formType === 10"-->
|
||||||
type="primary"
|
<!-- type="primary"-->
|
||||||
link
|
<!-- link-->
|
||||||
@click="handleFormDetail(scope.row)"
|
<!-- @click="handleFormDetail(scope.row)"-->
|
||||||
>
|
<!-- >-->
|
||||||
<span>{{ scope.row.formName }}</span>
|
<!-- <span>{{ scope.row.formName }}</span>-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
v-else-if="scope.row.formType === 20"
|
<!-- v-else-if="scope.row.formType === 20"-->
|
||||||
type="primary"
|
<!-- type="primary"-->
|
||||||
link
|
<!-- link-->
|
||||||
@click="handleFormDetail(scope.row)"
|
<!-- @click="handleFormDetail(scope.row)"-->
|
||||||
>
|
<!-- >-->
|
||||||
<span>{{ scope.row.formCustomCreatePath }}</span>
|
<!-- <span>{{ scope.row.formCustomCreatePath }}</span>-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
<label v-else>暂无表单</label>
|
<!-- <label v-else>暂无表单</label>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="创建时间"
|
label="创建时间"
|
||||||
align="center"
|
align="center"
|
||||||
|
@ -108,6 +108,7 @@ import ProcessInstanceBpmnViewer from '../detail/ProcessInstanceBpmnViewer.vue'
|
|||||||
import { CategoryApi } from '@/api/bpm/category'
|
import { CategoryApi } from '@/api/bpm/category'
|
||||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||||
import * as UserApi from '@/api/system/user'
|
import * as UserApi from '@/api/system/user'
|
||||||
|
import { FormProcessMappingApi} from '@/api/bpm/formprocessmapping'
|
||||||
|
|
||||||
defineOptions({ name: 'BpmProcessInstanceCreate' })
|
defineOptions({ name: 'BpmProcessInstanceCreate' })
|
||||||
|
|
||||||
@ -188,7 +189,8 @@ const handleSelect = async (row, formVariables) => {
|
|||||||
startUserSelectTasks.value = []
|
startUserSelectTasks.value = []
|
||||||
startUserSelectAssignees.value = {}
|
startUserSelectAssignees.value = {}
|
||||||
startUserSelectAssigneesFormRules.value = {}
|
startUserSelectAssigneesFormRules.value = {}
|
||||||
|
//console.log(row.formType,"row.formType")
|
||||||
|
//row.formCustomCreatePath ="/bpm/knows/knowledge/KnowledgeCreate"
|
||||||
// 情况一:流程表单
|
// 情况一:流程表单
|
||||||
if (row.formType == 10) {
|
if (row.formType == 10) {
|
||||||
// 设置表单
|
// 设置表单
|
||||||
@ -220,10 +222,20 @@ const handleSelect = async (row, formVariables) => {
|
|||||||
}
|
}
|
||||||
// 情况二:业务表单
|
// 情况二:业务表单
|
||||||
} else if (row.formCustomCreatePath) {
|
} else if (row.formCustomCreatePath) {
|
||||||
await push({
|
await push({
|
||||||
path: row.formCustomCreatePath
|
path: row.formCustomCreatePath
|
||||||
})
|
})
|
||||||
// 这里暂时无需加载流程图,因为跳出到另外个 Tab;
|
// 这里暂时无需加载流程图,因为跳出到另外个 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 { isEmpty } from '@/utils/is'
|
||||||
import * as UserApi from '@/api/system/user'
|
import * as UserApi from '@/api/system/user'
|
||||||
import {TabsPaneContext} from "element-plus";
|
import {TabsPaneContext} from "element-plus";
|
||||||
|
import { FormProcessMappingApi} from '@/api/bpm/formprocessmapping'
|
||||||
|
|
||||||
defineOptions({ name: 'BpmProcessInstanceDetail' })
|
defineOptions({ name: 'BpmProcessInstanceDetail' })
|
||||||
|
|
||||||
@ -285,10 +286,10 @@ const getProcessInstance = async () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
processInstance.value = data
|
processInstance.value = data
|
||||||
console.log(data,"processInstance_data")
|
//console.log(data,"processInstance_data")
|
||||||
// 设置表单信息
|
// 设置表单信息
|
||||||
const processDefinition = data.processDefinition
|
const processDefinition = data.processDefinition
|
||||||
console.log(processDefinition.formType,"processDefinition.formType")
|
//console.log(processDefinition.formType,"processDefinition.formType")
|
||||||
if (processDefinition.formType === 10) {
|
if (processDefinition.formType === 10) {
|
||||||
setConfAndFields2(
|
setConfAndFields2(
|
||||||
detailForm,
|
detailForm,
|
||||||
@ -306,7 +307,9 @@ const getProcessInstance = async () => {
|
|||||||
//console.log(data.processDefinition.formCustomViewPath,"formCustomViewPath")
|
//console.log(data.processDefinition.formCustomViewPath,"formCustomViewPath")
|
||||||
if ( data.processDefinition.formCustomViewPath == "") {
|
if ( data.processDefinition.formCustomViewPath == "") {
|
||||||
const process_key = data.processDefinition.key
|
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 {
|
} else {
|
||||||
BusinessFormComponent.value = registerComponent(data.processDefinition.formCustomViewPath)
|
BusinessFormComponent.value = registerComponent(data.processDefinition.formCustomViewPath)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user