功能:允许一级需求部门和需求部门成员查看任务大厅(可接任务)所有任务卡片
This commit is contained in:
parent
b88db53737
commit
db860ee73b
Binary file not shown.
@ -3233,7 +3233,7 @@ const loadConfigs = async () => {
|
||||
let allAvailableTasks: any[] = []
|
||||
|
||||
// 加载任务大厅列表(可接单的任务)
|
||||
// 任务大厅只对接单部门开放,只显示子任务
|
||||
// 任务大厅对所有用户开放(包括需求部门和一级需求部门)
|
||||
const loadTasks = async (forceReload = false) => {
|
||||
loading.value = true
|
||||
try {
|
||||
@ -3242,13 +3242,14 @@ const loadTasks = async (forceReload = false) => {
|
||||
const currentDeptType = effectiveDeptType.value // 使用切换后的部门类型
|
||||
const isAdmin = userInfo.isAdmin === 1 || userInfo.isAdmin === true
|
||||
|
||||
// 需求部门用户不应看到任务大厅的任务
|
||||
if (currentDeptType === 'demand' && !isAdmin) {
|
||||
taskList.value = []
|
||||
total.value = 0
|
||||
allAvailableTasks = []
|
||||
return
|
||||
}
|
||||
// 所有用户都可以查看任务大厅(包括需求部门和一级需求部门)
|
||||
// 注释掉原来的限制逻辑
|
||||
// if (currentDeptType === 'demand' && !isAdmin) {
|
||||
// taskList.value = []
|
||||
// total.value = 0
|
||||
// allAvailableTasks = []
|
||||
// return
|
||||
// }
|
||||
|
||||
// 如果不是强制刷新且已有缓存数据,直接使用缓存进行分页
|
||||
if (!forceReload && allAvailableTasks.length > 0) {
|
||||
@ -5879,6 +5880,11 @@ const handleConfigUpdate = async (event: CustomEvent) => {
|
||||
const getTaskStatusText = (status: string, task?: any) => {
|
||||
// 如果有task对象,检查approvalStatus来区分不同状态
|
||||
if (task) {
|
||||
// 调试日志
|
||||
if (status === 'draft' && task.approvalStatus && task.approvalStatus !== 'draft') {
|
||||
console.log('[状态调试] 任务ID:', task.id, '标题:', task.title, 'status:', status, 'approvalStatus:', task.approvalStatus)
|
||||
}
|
||||
|
||||
// 1. 检查是否被驳回(无论status是draft还是rejected)
|
||||
if (task.approvalStatus === 'rejected_by_demand' || task.approvalStatus === 'rejected_by_receiving') {
|
||||
return '已驳回'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user