加班管理新版
This commit is contained in:
parent
caff5b8313
commit
25d5d4ff86
@ -4,6 +4,8 @@ import request from '@/config/axios'
|
||||
export interface JbglVO {
|
||||
id: number // id
|
||||
title: string // 申请标题
|
||||
curfullpath: string // 申请用户名称
|
||||
processDefinitionKey: string // 申请用户名称
|
||||
userName: string // 申请人名字
|
||||
userId: number // 申请人id
|
||||
deptName: string // 申请部门名字
|
||||
|
@ -103,6 +103,7 @@ import * as DefinitionApi from '@/api/bpm/definition'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import {useTagsViewStore} from "@/store/modules/tagsView";
|
||||
import {getUserProfile} from "@/api/system/user/profile";
|
||||
import {FormProcessMappingApi} from "@/api/bpm/formprocessmapping";
|
||||
|
||||
/** 加班管理 表单 */
|
||||
defineOptions({ name: 'JbglCreate' })
|
||||
@ -131,7 +132,7 @@ const formData = ref({
|
||||
// 指定审批人
|
||||
const { delView } = useTagsViewStore()//视图操作
|
||||
const { push, currentRoute } = useRouter()
|
||||
const processDefineKey = 'jbgl-001' // 流程定义 Key
|
||||
/*const processDefineKey = 'jbgl-001'流程定义 Key*/
|
||||
const startUserSelectTasks = ref([]) // 发起人需要选择审批人的用户任务列表
|
||||
const startUserSelectAssignees = ref({}) // 发起人选择审批人的数据
|
||||
const startUserSelectAssigneesFormRef = ref() // 发起人选择审批人的表单 Ref
|
||||
@ -191,6 +192,17 @@ const submitForm = async () => {
|
||||
if(startUserSelectTasks.value?.length > 0){
|
||||
data.startUserSelectAssignees = startUserSelectAssignees.value
|
||||
}
|
||||
|
||||
const curFullPath = currentRoute.value.fullPath
|
||||
|
||||
if( curFullPath ) {
|
||||
data.curfullpath = curFullPath
|
||||
}
|
||||
const processKey = await FormProcessMappingApi.selectProcessKey( curFullPath )
|
||||
if ( processKey) {
|
||||
data.processDefinitionKey = processKey
|
||||
}
|
||||
|
||||
await JbglApi.createJbgl(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
delView(unref(currentRoute))
|
||||
@ -202,6 +214,16 @@ const submitForm = async () => {
|
||||
/** 初始化 */
|
||||
onMounted(async () => {
|
||||
await getUserInfo()
|
||||
|
||||
const curFullPath = currentRoute.value.fullPath
|
||||
|
||||
const processKey = await FormProcessMappingApi.selectProcessKey( curFullPath )
|
||||
|
||||
if ( !processKey ) {
|
||||
message.error('流程对应表单模型未配置,请检查!')
|
||||
return
|
||||
}
|
||||
|
||||
const processDefinitionDetail = await DefinitionApi.getProcessDefinition(
|
||||
undefined,
|
||||
processDefineKey
|
||||
|
Loading…
Reference in New Issue
Block a user