diff --git a/src/commonMethods/useCheckList.ts b/src/commonMethods/useCheckList.ts index a5dad11..cf4581b 100644 --- a/src/commonMethods/useCheckList.ts +++ b/src/commonMethods/useCheckList.ts @@ -52,7 +52,7 @@ * @param depended // 被依赖项 * @param dependedValue // 被依赖项条件 */ -export function useCheckNoTips(list: any, columns: any, depend?: string, depended?: string, dependedValue?: number | string) { +export function useCheckNoTips(list: any, columns: any, depend?: string, depended?: string, dependedValue?: number | string | any) { for (let index = 0; index < list.length; index++) { const item = list[index] for (const prop of columns) { @@ -75,6 +75,11 @@ return false } } + if (prop.children) { + if (prop.children.length) { + return useCheckList(list, prop.children, depend, depended, dependedValue) + } + } } } return true diff --git a/src/commonMethods/useCheckList.ts b/src/commonMethods/useCheckList.ts index a5dad11..cf4581b 100644 --- a/src/commonMethods/useCheckList.ts +++ b/src/commonMethods/useCheckList.ts @@ -52,7 +52,7 @@ * @param depended // 被依赖项 * @param dependedValue // 被依赖项条件 */ -export function useCheckNoTips(list: any, columns: any, depend?: string, depended?: string, dependedValue?: number | string) { +export function useCheckNoTips(list: any, columns: any, depend?: string, depended?: string, dependedValue?: number | string | any) { for (let index = 0; index < list.length; index++) { const item = list[index] for (const prop of columns) { @@ -75,6 +75,11 @@ return false } } + if (prop.children) { + if (prop.children.length) { + return useCheckList(list, prop.children, depend, depended, dependedValue) + } + } } } return true diff --git a/src/views/quality/meeting/components/edit.vue b/src/views/quality/meeting/components/edit.vue index e4d57ba..b7c0025 100644 --- a/src/views/quality/meeting/components/edit.vue +++ b/src/views/quality/meeting/components/edit.vue @@ -120,7 +120,25 @@ type: 'warning', }, ).then((res) => { - ruleForm.value.qualityUserDto.userIds = userList.value.map((item: any) => ({ ...item, userId: item.id })) + if ($route.path.includes('create')) { + ruleForm.value.qualityUserDto.userIds = userList.value.map((item: any) => ({ ...item, userId: item.id })) + } + else { + ruleForm.value.qualityUserDto.userIds = userList.value.map((item: any) => { + if (item.userId) { + return { + ...item, + id: item.userId, + } + } + else { + return { + ...item, + userId: item.id, + } + } + }) + } ruleForm.value.qualityUserDto.id = ruleForm.value.id handlerMeeting($route.params.type as string, ruleForm.value)?.then((res) => { isSave.value = true