Explorar el Código

fix修改的内容

huoyi hace 1 semana
padre
commit
0e166e0f0f

+ 2 - 2
src/pages/inspectionChecklist/index.vue

@@ -163,8 +163,8 @@ export default {
163
                 // 根据tab添加不同参数
163
                 // 根据tab添加不同参数
164
                 if (this.currentTab === 'task') {
164
                 if (this.currentTab === 'task') {
165
                     let levelObj = {
165
                     let levelObj = {
166
-                        'banzuzhang': "TEAM_LEVEL",
167
-                        'kezhang': "DEPARTMENT_LEVEL",
166
+                        'xiaozuzhang': "TEAM_LEVEL",
167
+                        'banzuzhang': "DEPARTMENT_LEVEL",
168
                         'zhanzhang': "STATION_LEVEL",
168
                         'zhanzhang': "STATION_LEVEL",
169
                     }
169
                     }
170
                     query.status = this.checkTaskStatusOptions.find(item => item.label === '进行中')?.value;
170
                     query.status = this.checkTaskStatusOptions.find(item => item.label === '进行中')?.value;

+ 2 - 2
src/pages/inspectionStatistics/components/InspectionExecution.vue

@@ -103,11 +103,11 @@ export default {
103
     // 班组长
103
     // 班组长
104
     isBanZuZhang() {
104
     isBanZuZhang() {
105
       let roles = this.$store.state.user.roles;
105
       let roles = this.$store.state.user.roles;
106
-      return roles && roles.includes('banzuzhang')
106
+      return roles && roles.includes('xiaozuzhang')
107
     },
107
     },
108
     isKeZhang(){
108
     isKeZhang(){
109
       let roles = this.$store.state.user.roles;
109
       let roles = this.$store.state.user.roles;
110
-      return roles && roles.includes('kezhang')
110
+      return roles && roles.includes('banzuzhang')
111
     }
111
     }
112
   },
112
   },
113
   mounted() {
113
   mounted() {

+ 1 - 1
src/pages/inspectionStatistics/components/ProblemRectification.vue

@@ -61,7 +61,7 @@ export default {
61
   computed: {
61
   computed: {
62
     isBanZuZhangOrKeZhang() {
62
     isBanZuZhangOrKeZhang() {
63
       let roles = this.$store.state.user.roles;
63
       let roles = this.$store.state.user.roles;
64
-      return roles && (roles.includes('banzuzhang') || roles.includes('kezhang'))
64
+      return roles && (roles.includes('xiaozuzhang') || roles.includes('banzuzhang'))
65
     },
65
     },
66
   },
66
   },
67
   mounted() {
67
   mounted() {

+ 1 - 1
src/pages/inspectionStatistics/index.vue

@@ -55,7 +55,7 @@ export default {
55
 		isBanZuZhang() {
55
 		isBanZuZhang() {
56
 			let roles = this.$store.state.user.roles;
56
 			let roles = this.$store.state.user.roles;
57
 			console.log(roles)
57
 			console.log(roles)
58
-			return roles && roles.includes('banzuzhang')
58
+			return roles && roles.includes('xiaozuzhang')
59
 		},
59
 		},
60
 		tabs() {
60
 		tabs() {
61
 			return [
61
 			return [

+ 1 - 1
src/pages/mine/info/edit.vue

@@ -416,7 +416,7 @@ export default {
416
     isSecurityRole() {
416
     isSecurityRole() {
417
       // 安检员和班组长的角色ID通常是固定的,这里假设安检员角色ID为101,班组长角色ID为102
417
       // 安检员和班组长的角色ID通常是固定的,这里假设安检员角色ID为101,班组长角色ID为102
418
       // 您可以根据实际情况调整这些ID
418
       // 您可以根据实际情况调整这些ID
419
-      const securityRoleIds = ['banzuzhang', 'SecurityCheck'] // 安检员和班组长的角色ID
419
+      const securityRoleIds = ['xiaozuzhang', 'SecurityCheck'] // 安检员和班组长的角色ID
420
 
420
 
421
       // 检查当前用户的角色ID是否包含安检员或班组长的角色ID
421
       // 检查当前用户的角色ID是否包含安检员或班组长的角色ID
422
       console.log((this.user?.roles && this.user?.roles.length > 0) && this.user.roles.some(role => securityRoleIds.includes(role.roleKey)), "this.user.roleIds.some(role => securityRoleIds.includes(role.roleKey))")
422
       console.log((this.user?.roles && this.user?.roles.length > 0) && this.user.roles.some(role => securityRoleIds.includes(role.roleKey)), "this.user.roleIds.some(role => securityRoleIds.includes(role.roleKey))")

+ 2 - 2
src/pages/myToDoList/index.vue

@@ -168,7 +168,7 @@ export default {
168
         // 判断是否显示复选框的条件
168
         // 判断是否显示复选框的条件
169
         canShowCheckbox(item) {
169
         canShowCheckbox(item) {
170
             //    (item.instance && item.instance.businessType === 'DEPARTMENT_CHECK' && 
170
             //    (item.instance && item.instance.businessType === 'DEPARTMENT_CHECK' && 
171
-            //     this.userInfoRoles.includes('jingli'))
171
+            //     this.userInfoRoles.includes('bumenjingli'))
172
             return (item.instance && item.instance.businessType === 'SEIZURE_REPORT') &&
172
             return (item.instance && item.instance.businessType === 'SEIZURE_REPORT') &&
173
                 this.currentTab === 'todo';
173
                 this.currentTab === 'todo';
174
         },
174
         },
@@ -183,7 +183,7 @@ export default {
183
                     seizureTaskIds.push(item.id);
183
                     seizureTaskIds.push(item.id);
184
                 } 
184
                 } 
185
                 // else if (item.instance && item.instance.businessType === 'DEPARTMENT_CHECK' &&
185
                 // else if (item.instance && item.instance.businessType === 'DEPARTMENT_CHECK' &&
186
-                //     this.userInfoRoles.includes('jingli')) {
186
+                //     this.userInfoRoles.includes('bumenjingli')) {
187
                 //     departmentTaskIds.push(item.id);
187
                 //     departmentTaskIds.push(item.id);
188
                 // }
188
                 // }
189
             });
189
             });

+ 2 - 2
src/pages/qualityControlAnalysisReport/components/dutyOrganization.vue

@@ -205,7 +205,7 @@ export default {
205
     isUserType() {
205
     isUserType() {
206
       const roles = this.$store.state?.user?.roles || []
206
       const roles = this.$store.state?.user?.roles || []
207
       // 如果是班组长且选择了个人视图,则视为用户类型
207
       // 如果是班组长且选择了个人视图,则视为用户类型
208
-      if (roles.includes('banzuzhang') && this.queryForm.scopedType === 'USER') {
208
+      if (roles.includes('xiaozuzhang') && this.queryForm.scopedType === 'USER') {
209
         return true
209
         return true
210
       }
210
       }
211
       return roles.includes('SecurityCheck')
211
       return roles.includes('SecurityCheck')
@@ -220,7 +220,7 @@ export default {
220
     // 计算属性:检查是否为TEAMS类型
220
     // 计算属性:检查是否为TEAMS类型
221
     isTeamsType() {
221
     isTeamsType() {
222
       const roles = this.$store.state?.user?.roles || []
222
       const roles = this.$store.state?.user?.roles || []
223
-      return roles.includes('banzuzhang') && this.queryForm.scopedType === 'TEAMS'
223
+      return roles.includes('xiaozuzhang') && this.queryForm.scopedType === 'TEAMS'
224
     }
224
     }
225
   },
225
   },
226
 
226
 

+ 5 - 5
src/pages/qualityControlAnalysisReport/components/qualityControl.vue

@@ -167,30 +167,30 @@ export default {
167
     isTeamType() {
167
     isTeamType() {
168
       const roles = this.$store.state?.user?.roles || []
168
       const roles = this.$store.state?.user?.roles || []
169
       // 如果是班组长且选择了班组视图,则视为班组类型
169
       // 如果是班组长且选择了班组视图,则视为班组类型
170
-      if (roles.includes('banzuzhang') && this.queryForm.scopedType === 'TEAMS') {
170
+      if (roles.includes('xiaozuzhang') && this.queryForm.scopedType === 'TEAMS') {
171
         return true
171
         return true
172
       }
172
       }
173
-      return roles.includes('banzuzhang')
173
+      return roles.includes('xiaozuzhang')
174
     },
174
     },
175
 
175
 
176
     // 计算属性:检查是否为USER类型
176
     // 计算属性:检查是否为USER类型
177
     isUserType() {
177
     isUserType() {
178
       const roles = this.$store.state?.user?.roles || []
178
       const roles = this.$store.state?.user?.roles || []
179
       // 如果是班组长且选择了个人视图,则视为用户类型
179
       // 如果是班组长且选择了个人视图,则视为用户类型
180
-      if (roles.includes('banzuzhang') && this.queryForm.scopedType === 'USER') {
180
+      if (roles.includes('xiaozuzhang') && this.queryForm.scopedType === 'USER') {
181
         return true
181
         return true
182
       }
182
       }
183
       return roles.includes('SecurityCheck')
183
       return roles.includes('SecurityCheck')
184
     },
184
     },
185
     isBrigadeType() {
185
     isBrigadeType() {
186
       const roles = this.$store.state?.user?.roles || []
186
       const roles = this.$store.state?.user?.roles || []
187
-      return roles.includes('jingli') || roles.includes('xingzheng')
187
+      return roles.includes('bumenjingli') || roles.includes('xingzheng')
188
     },
188
     },
189
 
189
 
190
     // 计算属性:检查是否为DEPARTMENT类型
190
     // 计算属性:检查是否为DEPARTMENT类型
191
     isDepartmentType() {
191
     isDepartmentType() {
192
       const roles = this.$store.state?.user?.roles || []
192
       const roles = this.$store.state?.user?.roles || []
193
-      return roles.includes('kezhang')
193
+      return roles.includes('banzuzhang')
194
     }
194
     }
195
   },
195
   },
196
 
196
 

+ 5 - 5
src/pages/qualityControlAnalysisReport/components/riskHazard.vue

@@ -311,7 +311,7 @@ export default {
311
     },
311
     },
312
     isBrigadeType() {
312
     isBrigadeType() {
313
       const roles = this.$store.state?.user?.roles || []
313
       const roles = this.$store.state?.user?.roles || []
314
-      return roles.includes('jingli') || roles.includes('xingzheng')
314
+      return roles.includes('bumenjingli') || roles.includes('xingzheng')
315
     },
315
     },
316
     // 计算属性:检查是否为STATION类型
316
     // 计算属性:检查是否为STATION类型
317
     isStationType() {
317
     isStationType() {
@@ -323,24 +323,24 @@ export default {
323
     // 计算属性:检查是否为DEPARTMENT类型
323
     // 计算属性:检查是否为DEPARTMENT类型
324
     isDepartmentType() {
324
     isDepartmentType() {
325
       const roles = this.$store.state?.user?.roles || []
325
       const roles = this.$store.state?.user?.roles || []
326
-      return roles.includes('kezhang')
326
+      return roles.includes('banzuzhang')
327
     },
327
     },
328
 
328
 
329
     // 计算属性:检查是否为TEAMS类型
329
     // 计算属性:检查是否为TEAMS类型
330
     isTeamsType() {
330
     isTeamsType() {
331
       const roles = this.$store.state?.user?.roles || []
331
       const roles = this.$store.state?.user?.roles || []
332
       // 如果是班组长且选择了班组视图,则视为班组类型
332
       // 如果是班组长且选择了班组视图,则视为班组类型
333
-      if (roles.includes('banzuzhang') && this.queryForm.scopedType === 'TEAMS') {
333
+      if (roles.includes('xiaozuzhang') && this.queryForm.scopedType === 'TEAMS') {
334
         return true
334
         return true
335
       }
335
       }
336
-      return roles.includes('banzuzhang')
336
+      return roles.includes('xiaozuzhang')
337
     },
337
     },
338
 
338
 
339
     // 计算属性:检查是否为USER类型
339
     // 计算属性:检查是否为USER类型
340
     isUserType() {
340
     isUserType() {
341
       const roles = this.$store.state?.user?.roles || []
341
       const roles = this.$store.state?.user?.roles || []
342
       // 如果是班组长且选择了个人视图,则视为用户类型
342
       // 如果是班组长且选择了个人视图,则视为用户类型
343
-      if (roles.includes('banzuzhang') && this.queryForm.scopedType === 'USER') {
343
+      if (roles.includes('xiaozuzhang') && this.queryForm.scopedType === 'USER') {
344
         return true
344
         return true
345
       }
345
       }
346
       return roles.includes('SecurityCheck')
346
       return roles.includes('SecurityCheck')

+ 3 - 3
src/pages/qualityControlAnalysisReport/index.vue

@@ -114,7 +114,7 @@ export default {
114
     // 计算属性:检查是否为班组长
114
     // 计算属性:检查是否为班组长
115
     isTeamLeader() {
115
     isTeamLeader() {
116
       const roles = this.$store.state?.user?.roles || []
116
       const roles = this.$store.state?.user?.roles || []
117
-      return roles.includes('banzuzhang')
117
+      return roles.includes('xiaozuzhang')
118
     }
118
     }
119
   },
119
   },
120
 
120
 
@@ -205,12 +205,12 @@ export default {
205
 
205
 
206
       let stationType = roles.includes('test') || roles.includes('zhijianke')
206
       let stationType = roles.includes('test') || roles.includes('zhijianke')
207
       let finalScopedId, finalScopedType
207
       let finalScopedId, finalScopedType
208
-      if (roles.includes('jingli') || roles.includes('xingzheng')) {
208
+      if (roles.includes('bumenjingli') || roles.includes('xingzheng')) {
209
         finalScopedId = deptId || ''
209
         finalScopedId = deptId || ''
210
         finalScopedType = 'BRIGADE'
210
         finalScopedType = 'BRIGADE'
211
       }
211
       }
212
       // 如果是班组长,默认选择 TEAMS
212
       // 如果是班组长,默认选择 TEAMS
213
-      if (roles.includes('banzuzhang')) {
213
+      if (roles.includes('xiaozuzhang')) {
214
         finalScopedId = deptId || ''
214
         finalScopedId = deptId || ''
215
         finalScopedType = 'TEAMS'
215
         finalScopedType = 'TEAMS'
216
       } else {
216
       } else {

+ 6 - 6
src/pages/questionStatistics/components/ErrorAnalysis.vue

@@ -55,7 +55,7 @@
55
     </template>
55
     </template>
56
 
56
 
57
     <!-- 科长角色:根据数组遍历展示 -->
57
     <!-- 科长角色:根据数组遍历展示 -->
58
-    <template v-else-if="userRole === 'kezhang'">
58
+    <template v-else-if="userRole === 'banzuzhang'">
59
       <div v-for="(category, index) in sectionChiefCharts" :key="index" class="section">
59
       <div v-for="(category, index) in sectionChiefCharts" :key="index" class="section">
60
         <!-- 问题明细 -->
60
         <!-- 问题明细 -->
61
         <div class="chart-section" v-if="category.pieData && category.pieData.length > 0">
61
         <div class="chart-section" v-if="category.pieData && category.pieData.length > 0">
@@ -157,10 +157,10 @@ export default {
157
       // 根据实际的角色名称进行映射
157
       // 根据实际的角色名称进行映射
158
       if (this.userRoles.includes('test') || this.userRoles.includes('stationMaster')) {
158
       if (this.userRoles.includes('test') || this.userRoles.includes('stationMaster')) {
159
         return 'test' // 站长
159
         return 'test' // 站长
160
-      } else if (this.userRoles.includes('kezhang') || this.userRoles.includes('sectionChief')) {
161
-        return 'kezhang' // 科长
162
-      } else if (this.userRoles.includes('banzuzhang') || this.userRoles.includes('teamLeader')) {
163
-        return 'banzuzhang' // 班组长
160
+      } else if (this.userRoles.includes('banzuzhang') || this.userRoles.includes('sectionChief')) {
161
+        return 'banzuzhang' // 科长
162
+      } else if (this.userRoles.includes('xiaozuzhang') || this.userRoles.includes('teamLeader')) {
163
+        return 'xiaozuzhang' // 班组长
164
       }
164
       }
165
 
165
 
166
       // 默认返回站长角色
166
       // 默认返回站长角色
@@ -672,7 +672,7 @@ export default {
672
         } else {
672
         } else {
673
           this.stationMasterCharts = [];
673
           this.stationMasterCharts = [];
674
         }
674
         }
675
-        if (this.userRole === 'kezhang' && this.pieData.length > 0) {
675
+        if (this.userRole === 'banzuzhang' && this.pieData.length > 0) {
676
           // 获取所有分类ID
676
           // 获取所有分类ID
677
           const categoryIds = this.pieData.map(category => category.id);
677
           const categoryIds = this.pieData.map(category => category.id);
678
 
678
 

+ 1 - 1
src/pages/questionStatistics/index.vue

@@ -74,7 +74,7 @@ export default {
74
         isBanZuZhang() {
74
         isBanZuZhang() {
75
             let roles = this.userRoles;
75
             let roles = this.userRoles;
76
             console.log('用户角色:', roles);
76
             console.log('用户角色:', roles);
77
-            return roles && (roles.includes('banzuzhang') || roles.includes('teamLeader'));
77
+            return roles && (roles.includes('xiaozuzhang') || roles.includes('teamLeader'));
78
         }
78
         }
79
     },
79
     },
80
     methods: {
80
     methods: {