Переглянути джерело

fix(qualityControlAnalysisReport): 修复部门类型判断和参数处理逻辑

修复质量分析报告组件中部门类型判断条件错误的问题,将isBrigadeType改为isDepartmentType
优化风险隐患组件中的参数处理逻辑,调整scopeType参数映射并删除处理后的参数
huoyi 3 днів тому
батько
коміт
8901b1c9dc

+ 2 - 7
src/pages/qualityControlAnalysisReport/components/qualityControl.vue

@@ -6,7 +6,7 @@
6 6
     </view>
7 7
 
8 8
     <!-- 任务计划安排统计 -->
9
-    <view class="task-planning" v-show="!isTeamType && !isUserType && !isBrigadeType">
9
+    <view class="task-planning" v-show="!isTeamType && !isUserType && !isDepartmentType">
10 10
       <view class="planning-header">
11 11
         <text class="header-text">任务计划安排统计</text>
12 12
       </view>
@@ -560,12 +560,7 @@ export default {
560 560
             name: '问题分布',
561 561
             type: 'pie',
562 562
             radius: '50%',
563
-            data: [
564
-              { value: 35, name: '设备设施问题' },
565
-              { value: 45, name: '人员操作问题' },
566
-              { value: 15, name: '管理问题' },
567
-              { value: 5, name: '其他问题' }
568
-            ],
563
+            data: [],
569 564
             emphasis: {
570 565
               itemStyle: {
571 566
                 shadowBlur: 10,

+ 7 - 4
src/pages/qualityControlAnalysisReport/components/riskHazard.vue

@@ -253,7 +253,7 @@ export default {
253 253
   computed: {
254 254
     // 查获排名表格列配置
255 255
     captureRankColumns() {
256
-      
256
+
257 257
       const deptLabel = this.isStationType ? '大队' : this.isBrigadeType ? '主管' : this.isDepartmentType ? '班组' : this.isTeamsType ? '姓名' : '';
258 258
 
259 259
       return [
@@ -792,19 +792,22 @@ export default {
792 792
       }
793 793
 
794 794
       const { scopedType = "", scopedId } = processedParams ? processedParams : { scopedType: "", scopedId: "" }
795
+
795 796
       let otherParams = {
796
-        ...(scopedType == 'MANAGER'||scopedType=='BRIGADE' ? { brigadeId: scopedId } : {}),
797
-        ...(scopedType == 'DEPARTMENT' ? { departmentId: scopedId } : {}),
797
+        ...(scopedType == 'BRIGADE' ? { brigadeId: scopedId } : {}),
798
+        ...(scopedType == 'MANAGER' ? { departmentId: scopedId } : {}),
798 799
         ...(scopedType == 'TEAMS' ? { teamId: scopedId } : {}),
799 800
         ...(scopedType == 'USER' ? { userId: scopedId } : {})
800 801
       }
801
-      
802
+
802 803
       if (scopedType != 'TEAMS') {
803 804
         delete otherParams.teamId;
804 805
       }
805 806
       if (scopedType != 'USER') {
806 807
         delete otherParams.userId;
807 808
       }
809
+      delete processedParams.scopedType;
810
+      delete processedParams.scopedId;
808 811
 
809 812
       return { ...processedParams, ...otherParams }
810 813
     },