Ver código fonte

feat(数据大屏): 添加对经理和班组的组织画像支持

在StandardExecution.vue和OrganizationalPortraitSectionLevel.vue中添加对manager和brigade类型的处理逻辑,完善组织画像功能
huoyi 4 semanas atrás
pai
commit
bb42358cd6

+ 4 - 1
src/views/dataBigScreen/dashboard/components/pageItems/StandardExecution.vue

@@ -262,8 +262,11 @@ useTimeOut(() => {
262
     })
262
     })
263
   }
263
   }
264
   const portraitParams = {}
264
   const portraitParams = {}
265
-  if (props.type === 'department') {
265
+ 
266
+   if (props.type === 'manager') {
266
     portraitParams.checkedDepartmentId = params.value.deptId
267
     portraitParams.checkedDepartmentId = params.value.deptId
268
+  } else if (props.type === 'brigade') {
269
+    portraitParams.checkedBrigadeId = params.value.deptId
267
   } else if (props.type === 'team') {
270
   } else if (props.type === 'team') {
268
     portraitParams.checkedTeamId = params.value.deptId
271
     portraitParams.checkedTeamId = params.value.deptId
269
   } else if (props.type === 'personal') {
272
   } else if (props.type === 'personal') {

+ 6 - 2
src/views/dataBigScreen/dashboard/components/pageView/OrganizationalPortraitSectionLevel.vue

@@ -108,8 +108,11 @@ try {
108
     const appendItem = (list) => {
108
     const appendItem = (list) => {
109
       list.forEach(attr => {
109
       list.forEach(attr => {
110
         let type = 'department'
110
         let type = 'department'
111
-        if (attr.deptType === 'DEPARTMENT') {
112
-          type = 'department'
111
+         if (attr.deptType === 'BRIGADE') {
112
+          type = 'brigade'
113
+        }
114
+        if (attr.deptType === 'MANAGER') {
115
+          type = 'manager'
113
         }
116
         }
114
         if (attr.deptType === 'TEAMS') {
117
         if (attr.deptType === 'TEAMS') {
115
           type = 'team'
118
           type = 'team'
@@ -126,6 +129,7 @@ try {
126
         }
129
         }
127
       })
130
       })
128
     }
131
     }
132
+    
129
     departments.value = res.data.reduce((cur, acc) => {
133
     departments.value = res.data.reduce((cur, acc) => {
130
       acc.children && acc.children.length && cur.push(...acc.children)
134
       acc.children && acc.children.length && cur.push(...acc.children)
131
       appendItem(acc.children)
135
       appendItem(acc.children)