Kaynağa Gözat

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

在StandardExecution.vue和OrganizationalPortraitSectionLevel.vue中添加对manager和brigade类型的处理逻辑,完善组织画像功能
huoyi 4 hafta önce
ebeveyn
işleme
bb42358cd6

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

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

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

@@ -108,8 +108,11 @@ try {
108 108
     const appendItem = (list) => {
109 109
       list.forEach(attr => {
110 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 117
         if (attr.deptType === 'TEAMS') {
115 118
           type = 'team'
@@ -126,6 +129,7 @@ try {
126 129
         }
127 130
       })
128 131
     }
132
+    
129 133
     departments.value = res.data.reduce((cur, acc) => {
130 134
       acc.children && acc.children.length && cur.push(...acc.children)
131 135
       appendItem(acc.children)