From e4a7272f74e66d4567a096c580671ded80dc8c45 Mon Sep 17 00:00:00 2001
From: XaoLi717 <144221124+XaoLi717@users.noreply.github.com>
Date: Wed, 27 Nov 2024 10:40:47 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E4=B8=80=E5=AF=B9=E5=A4=9A?=
=?UTF-8?q?=E8=A1=A8=E5=8D=95=E9=80=89=E6=8B=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/home/clgl/index.ts | 3 ++-
src/views/Home/clgl/ClglCreate.vue | 29 ++++++++++++++++++++++++++++-
src/views/Home/clgl/ClglDetail.vue | 4 ++++
src/views/Home/clgl/index.vue | 5 +++--
4 files changed, 37 insertions(+), 4 deletions(-)
diff --git a/src/api/home/clgl/index.ts b/src/api/home/clgl/index.ts
index 8d874d1..08d5cec 100644
--- a/src/api/home/clgl/index.ts
+++ b/src/api/home/clgl/index.ts
@@ -3,6 +3,7 @@ import request from '@/config/axios'
// 车辆管理 VO
export interface ClglVO {
id: number // id
+ title: string // 申请人
carUserId: number // 申请人
carUserName: string // 申请人
dept: number // 部门
@@ -14,7 +15,7 @@ export interface ClglVO {
carAddress: string // 目的地
carInfo: string // 车辆信息
processInstanceId: string
- flowStatus: number
+ status: number
carStartMileage: string // 车辆开始里程
carEndMileage: string // 车辆结束里程
carStatus: number // 用车状态
diff --git a/src/views/Home/clgl/ClglCreate.vue b/src/views/Home/clgl/ClglCreate.vue
index 4e13adb..bdf28b6 100644
--- a/src/views/Home/clgl/ClglCreate.vue
+++ b/src/views/Home/clgl/ClglCreate.vue
@@ -24,6 +24,9 @@
+
+
+
{
}
const formRules = reactive({
carType: [{ required: true, message: '车辆类型不能为空', trigger: 'change' }],
+ title: [{ required: true, message: '标题不能为空', trigger: 'change' }],
carDriver: [{ required: true, message: '驾驶员不能为空', trigger: 'blur' }],
carStart: [{ required: true, message: '开始时间不能为空', trigger: 'blur' }],
carEnd: [{ required: true, message: '结束时间不能为空', trigger: 'blur' }],
@@ -175,7 +181,7 @@ const formRules = reactive({
const formRef = ref() // 表单 Ref
// 指定审批人
-const processDefineKey = 'car-001' // 流程定义 Key
+/* const processDefineKey = 'car-001' 流程定义 Key */
const startUserSelectTasks = ref([]) // 发起人需要选择审批人的用户任务列表
const startUserSelectAssignees = ref({}) // 发起人选择审批人的数据
const startUserSelectAssigneesFormRef = ref() // 发起人选择审批人的表单 Ref
@@ -204,6 +210,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 ClglApi.createClgl(data)
message.success(t('common.createSuccess'))
delView(unref(currentRoute))
@@ -238,6 +255,16 @@ const getUserInfo = 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,
diff --git a/src/views/Home/clgl/ClglDetail.vue b/src/views/Home/clgl/ClglDetail.vue
index c078a2d..e77399a 100644
--- a/src/views/Home/clgl/ClglDetail.vue
+++ b/src/views/Home/clgl/ClglDetail.vue
@@ -24,6 +24,9 @@
+
+
+
-
+
-
+
@@ -178,6 +178,7 @@ const queryParams = reactive({
pageNo: 1,
pageSize: 10,
id: undefined,
+ title: undefined,
carUserId: undefined,
carUserName: undefined,
dept: undefined,