fix: allow receiving leaders to edit primary demand tasks
This commit is contained in:
parent
ecda3cd4b0
commit
46723e0ca1
@ -754,6 +754,11 @@ const activePublishingDept = computed(() => {
|
||||
return publishingDepartmentOptions.value.find(dept => dept.deptId === selectedPublishingDeptId.value)
|
||||
})
|
||||
|
||||
const canPublishFromSelectedDept = computed(() => {
|
||||
if (!selectedPublishingDeptId.value) return false
|
||||
return availablePublishingDepartments.value.some(dept => dept.deptId === selectedPublishingDeptId.value)
|
||||
})
|
||||
|
||||
// 任务子类型列表
|
||||
const taskSubTypes = ref<TaskSubType[]>([])
|
||||
|
||||
@ -771,7 +776,8 @@ const primaryDeptConfig = ref({
|
||||
|
||||
// 判断当前用户是否是一级需求部门用户
|
||||
const isPrimaryDeptUser = computed(() => {
|
||||
return activePublishingDept.value?.deptType === 'primary_demand'
|
||||
// 编辑他人发布的一级需求任务时,不应误判为“一级需求部门用户”
|
||||
return canPublishFromSelectedDept.value && activePublishingDept.value?.deptType === 'primary_demand'
|
||||
})
|
||||
|
||||
// 判断是否应该显示任务明细区域
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user