Browse Source

refactor: 统一替换角色名,将banzuzhang改为xiaozuzhang,kezhang改为banzuzhang,jingli改为bumenjingli

本次提交统一调整了项目内多处角色权限判断、路由配置以及界面逻辑中的角色名称:
1.  将班组长角色从`banzuzhang`替换为`xiaozuzhang`
2.  将科长角色从`kezhang`替换为`banzuzhang`
3.  将经理角色从`jingli`替换为`bumenjingli`
同时调整了登录成功后的跳转页面,将`myToDoList`改为`home-new`首页页面,并优化了部分样式类名。
huoyi 1 week ago
parent
commit
9186b51da1
31 changed files with 96 additions and 96 deletions
  1. 6 6
      src/pages.json
  2. 4 4
      src/pages/attendance/components/AddAttendancePersonnelModal.vue
  3. 2 2
      src/pages/attendance/components/MaintainAreaOrMemberModal.vue
  4. 5 5
      src/pages/attendance/components/WorkingGroup.vue
  5. 1 1
      src/pages/attendance/index.vue
  6. 3 3
      src/pages/attendanceStatistics/index.vue
  7. 1 1
      src/pages/checklist/index.vue
  8. 4 4
      src/pages/eikonStatistics/components/topInfo.vue
  9. 3 3
      src/pages/eikonStatistics/index.vue
  10. 1 1
      src/pages/groupProfile/index.vue
  11. 3 3
      src/pages/home-new/components/total-detail.vue
  12. 16 16
      src/pages/home-new/index.vue
  13. 2 2
      src/pages/inspectionChecklist/index.vue
  14. 2 2
      src/pages/inspectionStatistics/components/InspectionExecution.vue
  15. 1 1
      src/pages/inspectionStatistics/components/ProblemRectification.vue
  16. 1 1
      src/pages/inspectionStatistics/index.vue
  17. 2 2
      src/pages/login.vue
  18. 1 1
      src/pages/mine/info/edit.vue
  19. 2 2
      src/pages/myToDoList/index.vue
  20. 2 2
      src/pages/qualityControlAnalysisReport/components/dutyOrganization.vue
  21. 5 5
      src/pages/qualityControlAnalysisReport/components/qualityControl.vue
  22. 5 5
      src/pages/qualityControlAnalysisReport/components/riskHazard.vue
  23. 3 3
      src/pages/qualityControlAnalysisReport/index.vue
  24. 6 6
      src/pages/questionStatistics/components/ErrorAnalysis.vue
  25. 1 1
      src/pages/questionStatistics/index.vue
  26. 5 5
      src/pages/seizeStatistics/index.vue
  27. 1 1
      src/pages/seizedReported/index.vue
  28. 1 1
      src/pages/seizedReportedVoice/index.vue
  29. 1 1
      src/pages/teamProfile/index.vue
  30. 4 4
      src/pages/workProfile/index.vue
  31. 2 2
      src/utils/common.js

+ 6 - 6
src/pages.json

@@ -415,12 +415,6 @@
415 415
     "paddingBottom": "0px",
416 416
     "marginBottom": "0px",
417 417
     "list": [
418
-      // {
419
-      //   "pagePath": "pages/home-new/index",
420
-      //   "iconPath": "static/images/tabbar/home.png",
421
-      //   "selectedIconPath": "static/images/tabbar/home_.png",
422
-      //   "text": "首页"
423
-      // },
424 418
       {
425 419
         "pagePath": "pages/myToDoList/index",
426 420
         "iconPath": "/static/images/tabbar/message.png",
@@ -434,6 +428,12 @@
434 428
         "text": "AI问答"
435 429
       },
436 430
       {
431
+        "pagePath": "pages/home-new/index",
432
+        "iconPath": "static/images/tabbar/home.png",
433
+        "selectedIconPath": "static/images/tabbar/home_.png",
434
+        "text": "首页"
435
+      },
436
+      {
437 437
         "pagePath": "pages/work/index",
438 438
         "iconPath": "static/images/tabbar/work.png",
439 439
         "selectedIconPath": "static/images/tabbar/work_.png",

+ 4 - 4
src/pages/attendance/components/AddAttendancePersonnelModal.vue

@@ -63,14 +63,14 @@
63 63
         </view>
64 64
         <view class="title-cell" v-if="!searchViewShow">
65 65
           <view class="title-text" style="display: flex; align-items: center;">{{ notkezhang ? '选择通道' : '选择区域' }}
66
-            <view v-if="!userInfo.roles.includes('banzuzhang')">
66
+            <view v-if="!userInfo.roles.includes('xiaozuzhang')">
67 67
               <SelectArea :notkezhang="notkezhang" @selected="selectedArea">
68 68
                 <u-icon name="plus-circle" color="#2A70D1" size="25" />
69 69
               </SelectArea>
70 70
             </view>
71 71
           </view>
72 72
           <view class="">
73
-            <uniDataPicker v-if="userInfo.roles.includes('banzuzhang')" :localdata="channelList"
73
+            <uniDataPicker v-if="userInfo.roles.includes('xiaozuzhang')" :localdata="channelList"
74 74
               :popup-title="notkezhang ? '请选择上岗通道' : '请选择上岗区域'" v-model="channelOrRegional"
75 75
               @change="onLocationChange" />
76 76
 
@@ -209,13 +209,13 @@ export default {
209 209
   watch: {
210 210
     show(newValue) {
211 211
       if (newValue) {
212
-        if (this.userInfo.roles.includes('kezhang')) {
212
+        if (this.userInfo.roles.includes('banzuzhang')) {
213 213
           this.getQueryLastTime()
214 214
         }
215 215
         this.currentTime = formatTime(new Date())
216 216
 
217 217
         if (this.notkezhang) {
218
-          if (this.userInfo.roles.includes('banzuzhang')) {
218
+          if (this.userInfo.roles.includes('xiaozuzhang')) {
219 219
             memberList({
220 220
               attendanceTeamId: this.userInfo.teamsId,
221 221
               attendanceDate: moment().format('YYYY-MM-DD')

+ 2 - 2
src/pages/attendance/components/MaintainAreaOrMemberModal.vue

@@ -152,8 +152,8 @@ export default {
152 152
     },
153 153
     computed: {
154 154
         notkezhang() {
155
-            // console.log(!this.userInfo.roles || !this.userInfo.roles.includes('kezhang'), "!this.userInfo.roles || !this.userInfo.roles.includes('kezhang')")
156
-            return !this.userInfo.roles || !this.userInfo.roles.includes('kezhang')
155
+            // console.log(!this.userInfo.roles || !this.userInfo.roles.includes('banzuzhang'), "!this.userInfo.roles || !this.userInfo.roles.includes('banzuzhang')")
156
+            return !this.userInfo.roles || !this.userInfo.roles.includes('banzuzhang')
157 157
         },
158 158
     },
159 159
     mounted() {

+ 5 - 5
src/pages/attendance/components/WorkingGroup.vue

@@ -49,13 +49,13 @@
49 49
           </view>
50 50
         </view>
51 51
       </view>
52
-      <!-- {{ selectedMember.length === 0 }}{{ !userInfo.roles.includes('kezhang') }}{{ !attendanceInfo.checkInTime }} -->
52
+      <!-- {{ selectedMember.length === 0 }}{{ !userInfo.roles.includes('banzuzhang') }}{{ !attendanceInfo.checkInTime }} -->
53 53
       <!-- :disabled="!attendanceInfo.checkInTime || checkOutStatus" -->
54 54
       <AddAttendancePersonnelModal v-if="index === 0" :disabled="checkOutStatus" :notkezhang="notkezhang"
55 55
         :userInfo="userInfo" @updateRecord="invokerGetPostRecordList" :selectedMember="selectedMember" :attendanceInfo="attendanceInfo">
56 56
         <!-- :class="{ disabled: !attendanceInfo.checkInTime }"   没有选人不可以上通道 -->
57 57
         <view v-if="authority" class="custom-btn" @click="openModal"
58
-          :class="{ disabled: selectedMember.length === 0 && !userInfo.roles.includes('kezhang') || (!attendanceInfo.checkInTime || (attendanceInfo.checkInTime && attendanceInfo.checkOutTime)) }">
58
+          :class="{ disabled: selectedMember.length === 0 && !userInfo.roles.includes('banzuzhang') || (!attendanceInfo.checkInTime || (attendanceInfo.checkInTime && attendanceInfo.checkOutTime)) }">
59 59
           {{ checkOutStatus ? '下通道' : '上通道' }}
60 60
         </view>
61 61
       </AddAttendancePersonnelModal>
@@ -118,12 +118,12 @@ export default {
118 118
   },
119 119
   computed: {
120 120
     notkezhang() {
121
-      return !this.userInfo.roles || !this.userInfo.roles.includes('kezhang')
121
+      return !this.userInfo.roles || !this.userInfo.roles.includes('banzuzhang')
122 122
     },
123 123
     authority() { // 上通道权限
124 124
       return this.userInfo.roles && (
125
-        this.userInfo.roles.includes('kezhang') ||
126
-        this.userInfo.roles.includes('banzuzhang')
125
+        this.userInfo.roles.includes('banzuzhang') ||
126
+        this.userInfo.roles.includes('xiaozuzhang')
127 127
       )
128 128
     }
129 129
   },

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

@@ -59,7 +59,7 @@ export default {
59 59
       }
60 60
     },
61 61
     showMaintain() {
62
-      return this.userInfo.roles.includes('banzuzhang')
62
+      return this.userInfo.roles.includes('xiaozuzhang')
63 63
     }
64 64
   },
65 65
   data() {

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

@@ -2,7 +2,7 @@
2 2
     <home-container :customStyle="{ background: 'none' }">
3 3
         <view class="container">
4 4
             <!-- 顶部tabs -->
5
-            <h-tabs v-if="roles.includes('kezhang')" v-model="currentTab" :tabs="tabList" value-key="type"
5
+            <h-tabs v-if="roles.includes('banzuzhang')" v-model="currentTab" :tabs="tabList" value-key="type"
6 6
                 label-key="title" @change="handleTabChange" />
7 7
 
8 8
             <!-- 通道开放情况 -->
@@ -111,7 +111,7 @@ export default {
111 111
     mounted() {
112 112
         this.fetchData("1");
113 113
 
114
-        if (!this.roles.includes('kezhang')) {
114
+        if (!this.roles.includes('banzuzhang')) {
115 115
             this.currentTab = 'all'
116 116
         }
117 117
     },
@@ -176,7 +176,7 @@ export default {
176 176
             let openRate = 0;
177 177
             let openData = 0;
178 178
             let closeData = 0;
179
-            if (this.roles.includes('kezhang') && this.currentTab == 'my') {
179
+            if (this.roles.includes('banzuzhang') && this.currentTab == 'my') {
180 180
 
181 181
                 openData = this.terminlDetail.reduce((item, cur) => {
182 182
                     return item + cur.onDutyChannelCount;

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

@@ -164,7 +164,7 @@ export default {
164 164
         },
165 165
         notkezhang() {
166 166
             let roles = this.$store.state.user.roles
167
-            return !roles || !roles.includes('kezhang')
167
+            return !roles || !roles.includes('banzuzhang')
168 168
         },
169 169
         roles() {
170 170
             return this.$store.state.user.roles

+ 4 - 4
src/pages/eikonStatistics/components/topInfo.vue

@@ -34,7 +34,7 @@
34 34
                     <!-- 搜索框 -->
35 35
                     <view class="search-section">
36 36
                         <uni-easyinput v-model="searchKeyword"
37
-                            :placeholder="userRoles.includes('banzuzhang') ? '请输入姓名搜索' : '请输入部门名称、姓名搜索'"
37
+                            :placeholder="userRoles.includes('xiaozuzhang') ? '请输入姓名搜索' : '请输入部门名称、姓名搜索'"
38 38
                             :clearable="true" />
39 39
                     </view>
40 40
 
@@ -220,13 +220,13 @@ export default {
220 220
             if (this.userRoles.includes('test')) {
221 221
                 params.deptId = this.userInfo.stationId
222 222
             }
223
-            if (this.userRoles.includes('jingli')) {
223
+            if (this.userRoles.includes('bumenjingli')) {
224 224
                 params.deptId = this.userInfo.brigadeId
225 225
             }
226
-            if (this.userRoles.includes('kezhang')) {
226
+            if (this.userRoles.includes('banzuzhang')) {
227 227
                 params.deptId = this.userInfo.departmentId
228 228
             }
229
-            if (this.userRoles.includes('banzuzhang')) {
229
+            if (this.userRoles.includes('xiaozuzhang')) {
230 230
                 params.deptId = this.userInfo.teamsId
231 231
             }
232 232
             let res = await getDeptUserTree(params)

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

@@ -131,7 +131,7 @@ export default {
131 131
       return this.oldLevel && this.oldLevelId
132 132
     },
133 133
     hasTabs() {
134
-      return this.userRoles.includes('SecurityCheck') || this.userRoles.includes('banzuzhang')
134
+      return this.userRoles.includes('SecurityCheck') || this.userRoles.includes('xiaozuzhang')
135 135
     }
136 136
   },
137 137
   async onLoad() {
@@ -147,9 +147,9 @@ export default {
147 147
     //根据不同的登录角色,赋予初始级别
148 148
     async setInitialLevel() {
149 149
       let isZhanZhang = this.userRoles && this.userRoles.includes('test')
150
-      let isKeZhang = this.userRoles && this.userRoles.includes('kezhang')
150
+      let isKeZhang = this.userRoles && this.userRoles.includes('banzuzhang')
151 151
       let isZhiJian = this.userRoles && this.userRoles.includes('zhijianke')
152
-      let isJingLi = this.userRoles && this.userRoles.includes('jingli')
152
+      let isJingLi = this.userRoles && this.userRoles.includes('bumenjingli')
153 153
       let level = isKeZhang ? 'department' : isJingLi ? 'brigade' : 'station';
154 154
       let levelId = isKeZhang ? this.userInfo.departmentId : isJingLi ? this.userInfo.brigadeId : this.userInfo.stationId;
155 155
       if (isKeZhang || isZhanZhang || isZhiJian || isJingLi) {

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

@@ -342,7 +342,7 @@ export default {
342 342
         },
343 343
         isBanzuzhang() {
344 344
             const roles = this.getUserRoles()
345
-            return roles.includes('banzuzhang')
345
+            return roles.includes('xiaozuzhang')
346 346
         },
347 347
         chooseDept() {
348 348
             

+ 3 - 3
src/pages/home-new/components/total-detail.vue

@@ -9,7 +9,7 @@
9 9
             </div>
10 10
             <div class="item-links">
11 11
                 <div class="item-link"
12
-                    v-if="!role.includes('SecurityCheck') && !(role.includes('banzuzhang') && selectedRole == 'individual')"
12
+                    v-if="!role.includes('SecurityCheck') && !(role.includes('xiaozuzhang') && selectedRole == 'individual')"
13 13
                     @click="handleLinkClick('/pages/capabilityComparison/index')">能力对比</div>
14 14
             </div>
15 15
         </div>
@@ -132,14 +132,14 @@ export default {
132 132
                         type: 'USER'
133 133
                     }
134 134
                 }
135
-                if (roles.includes('banzuzhang')) {
135
+                if (roles.includes('xiaozuzhang')) {
136 136
                     obj = {
137 137
                         id: userInfo.teamsId,
138 138
                         name: userInfo.teamsName,
139 139
                         type: 'DEPT'
140 140
                     }
141 141
                 }
142
-                if (roles.includes('kezhang')) {
142
+                if (roles.includes('banzuzhang')) {
143 143
                     obj = {
144 144
                         id: userInfo.departmentId,
145 145
                         name: userInfo.departmentName,

+ 16 - 16
src/pages/home-new/index.vue

@@ -26,7 +26,7 @@
26 26
             </div>
27 27
 
28 28
             <!-- 角色切换组件(班组长显示) -->
29
-            <SelectTag v-if="role.includes('banzuzhang')" :tags="roleTags" :selected-value="selectedRole"
29
+            <SelectTag v-if="role.includes('xiaozuzhang')" :tags="roleTags" :selected-value="selectedRole"
30 30
                 @change="handleRoleChange" class="role-selector" />
31 31
         </div>
32 32
 
@@ -193,14 +193,14 @@ export default {
193 193
         },
194 194
         // 是否为班组视图:角色是班组长或者selectedRole为team
195 195
         isTeamView() {
196
-            return this.role.includes('banzuzhang') ? this.selectedRole === 'team' : this.role.includes('banzuzhang')
196
+            return this.role.includes('xiaozuzhang') ? this.selectedRole === 'team' : this.role.includes('xiaozuzhang')
197 197
         },
198 198
         // 是否为个人视图:selectedRole为individual或者角色是SecurityCheck
199 199
         isIndividualView() {
200
-            return this.role.includes('banzuzhang') ? this.selectedRole === 'individual' : this.role.includes('SecurityCheck')
200
+            return this.role.includes('xiaozuzhang') ? this.selectedRole === 'individual' : this.role.includes('SecurityCheck')
201 201
         },
202 202
         isBrigade() {
203
-            return this.role.includes('jingli') || this.role.includes('xingzheng')
203
+            return this.role.includes('bumenjingli') || this.role.includes('xingzheng')
204 204
         },
205 205
         // 是否为站长或质检科角色
206 206
         isZhanZhang() {
@@ -294,12 +294,12 @@ export default {
294 294
         attendanceItems() {
295 295
             let res = {};
296 296
 
297
-            if (this.role.includes('kezhang') || this.isZhanZhang || this.isBrigade) {
297
+            if (this.role.includes('banzuzhang') || this.isZhanZhang || this.isBrigade) {
298 298
                 // 班组长选择班组视图
299 299
                 if (this.isZhanZhang) {
300 300
                     res = this.attendanceStats.stationLeaderStats
301 301
                 }
302
-                if (this.role.includes('kezhang')) {
302
+                if (this.role.includes('banzuzhang')) {
303 303
                     res = this.attendanceStats.sectionLeaderStats
304 304
                 }
305 305
                 if (this.isBrigade) {
@@ -343,7 +343,7 @@ export default {
343 343
                 const { securityCheckerData } = this.seizeData;
344 344
                 const { pendingCount } = securityCheckerData || {};
345 345
                 return pendingCount;
346
-            } else if (this.role.includes('kezhang')) {
346
+            } else if (this.role.includes('banzuzhang')) {
347 347
                 const { sectionMasterData } = this.seizeData;
348 348
                 const { pendingCount } = sectionMasterData || {};
349 349
                 // 科长、SecurityCheck角色:显示班组、科级和站级排名
@@ -732,7 +732,7 @@ export default {
732 732
                 const { startDate, endDate } = this.calculateDateRange(this.selectedTimeRange);
733 733
                 params.startDate = startDate;
734 734
                 params.endDate = endDate;
735
-                if (!this.isZhanZhang && !this.role.includes('kezhang')) {
735
+                if (!this.isZhanZhang && !this.role.includes('banzuzhang')) {
736 736
                     params.dataSource = this.selectedRole;
737 737
                 }
738 738
 
@@ -1006,7 +1006,7 @@ export default {
1006 1006
                 return '本人';
1007 1007
             } else if (this.isTeamView) {
1008 1008
                 return '班组';
1009
-            } else if (this.role.includes('kezhang')) {
1009
+            } else if (this.role.includes('banzuzhang')) {
1010 1010
                 return '主管';
1011 1011
             } else if (this.isZhanZhang) {
1012 1012
                 return '全站';
@@ -1035,7 +1035,7 @@ export default {
1035 1035
                     { label: '大队平均', value: ((brigadePassRate || 0) * 100).toFixed(2), isImage: false, color: brigadePassRate < personalPassRate ? '#00AE41' : '#F96060' },
1036 1036
                     { label: '站平均', value: ((stationPassRate || 0) * 100).toFixed(2), isImage: false, color: stationPassRate < teamPassRate ? '#00AE41' : '#F96060' }
1037 1037
                 ];
1038
-            } else if (this.role.includes('kezhang')) {
1038
+            } else if (this.role.includes('banzuzhang')) {
1039 1039
                 // kezhang角色:主管、站平均、前三名班组(isImage: true)
1040 1040
                 return [
1041 1041
                     { label: '主管', value: ((departmentPassRate || 0) * 100).toFixed(2), isImage: false },
@@ -1088,7 +1088,7 @@ export default {
1088 1088
                     { label: '大队平均', value: (brigadeAvgAccuracy || 0), isImage: false, color: brigadeAvgAccuracy < teamAvgAccuracy ? '#00AE41' : '#F96060' },
1089 1089
                     { label: '站平均', value: (siteAvgAccuracy || 0), isImage: false, color: siteAvgAccuracy < teamAvgAccuracy ? '#00AE41' : '#F96060' }
1090 1090
                 ];
1091
-            } else if (this.role.includes('kezhang')) {
1091
+            } else if (this.role.includes('banzuzhang')) {
1092 1092
                 // kezhang角色:主管、站平均、前三名班组(isImage: true)
1093 1093
                 return [
1094 1094
                     { label: '主管', value: (deptAvgAccuracy || 0), isImage: false, },
@@ -1148,7 +1148,7 @@ export default {
1148 1148
                     { label: '大队平均', value: brigadeAverage || 0, isImage: false, color: brigadeAverage < teamAverage ? '#00AE41' : '#F96060' },
1149 1149
                     { label: '站平均', value: (stationAverage && stationAverage.toFixed(2)) || 0, isImage: false, color: stationAverage < teamAverage ? '#00AE41' : '#F96060' }
1150 1150
                 ];
1151
-            } else if (this.role.includes('kezhang')) {
1151
+            } else if (this.role.includes('banzuzhang')) {
1152 1152
                 // kezhang角色:从securityCheckerData解构
1153 1153
                 const { sectionMasterData } = this.seizeData;
1154 1154
                 const { brigadeAverage, departmentAverage, stationAverage } = sectionMasterData || {}
@@ -1221,7 +1221,7 @@ export default {
1221 1221
                     { label: '大队排名', current: brigadeRanking || 0, total: brigadeTotal || 0, percentage: brigadeTotal ? ((brigadeRanking || 0) / brigadeTotal) * 100 : 0 },
1222 1222
                     { label: '站级排名', current: stationRanking || 0, total: stationTotal || 0, percentage: stationTotal ? ((stationRanking || 0) / stationTotal) * 100 : 0, type: 'station' }
1223 1223
                 ];
1224
-            } else if (this.role.includes('kezhang')) {
1224
+            } else if (this.role.includes('banzuzhang')) {
1225 1225
                 return [
1226 1226
                     { label: '大队排名', current: brigadeRanking || 0, total: brigadeTotal || 0, percentage: brigadeTotal ? ((brigadeRanking || 0) / brigadeTotal) * 100 : 0 },
1227 1227
                     { label: '站级排名', current: stationRanking || 0, total: stationTotal || 0, percentage: stationTotal ? ((stationRanking || 0) / stationTotal) * 100 : 0, type: 'station' }
@@ -1255,7 +1255,7 @@ export default {
1255 1255
                     { label: '大队排名', current: deptRanking?.rank || 0, total: deptRanking?.total || 0, percentage: deptRanking?.total ? ((deptRanking.rank || 0) / deptRanking.total) * 100 : 0 },
1256 1256
                     { label: '站级排名', current: siteRanking?.rank || 0, total: siteRanking?.total || 0, percentage: siteRanking?.total ? ((siteRanking.rank || 0) / siteRanking.total) * 100 : 0, type: 'station' }
1257 1257
                 ];
1258
-            } else if (this.role.includes('kezhang')) {
1258
+            } else if (this.role.includes('banzuzhang')) {
1259 1259
                 const { deptInSiteRanking, deptInBrigadeRanking } = this.accuracyStatistics;
1260 1260
                 return [
1261 1261
                     { label: '大队排名', current: deptInBrigadeRanking?.rank || 0, total: deptInBrigadeRanking?.total || 0, percentage: deptInBrigadeRanking?.total ? ((deptInBrigadeRanking.rank || 0) / deptInBrigadeRanking.total) * 100 : 0 },
@@ -1292,7 +1292,7 @@ export default {
1292 1292
                     { label: '大队排名', current: brigadeRanking?.currentRank || 0, total: brigadeRanking?.totalItems || 0, percentage: brigadeRanking?.totalItems ? ((brigadeRanking.currentRank || 0) / brigadeRanking.totalItems) * 100 : 0 },
1293 1293
                     { label: '站级排名', current: stationRanking?.currentRank || 0, total: stationRanking?.totalItems || 0, percentage: stationRanking?.totalItems ? ((stationRanking.currentRank || 0) / stationRanking.totalItems) * 100 : 0, type: 'station' }
1294 1294
                 ];
1295
-            } else if (this.role.includes('kezhang')) {
1295
+            } else if (this.role.includes('banzuzhang')) {
1296 1296
                 const { sectionMasterData } = this.seizeData;
1297 1297
                 const { stationRanking, departmentRanking, brigadeRanking } = sectionMasterData || {};
1298 1298
                 // 科长、SecurityCheck角色:显示班组、科级和站级排名
@@ -1439,7 +1439,7 @@ export default {
1439 1439
                 }
1440 1440
 
1441 1441
                 // 调用接口获取今日上岗科长列表
1442
-                selectUserListByRoleKey(["kezhang"]).then(res => {
1442
+                selectUserListByRoleKey(["banzuzhang"]).then(res => {
1443 1443
                     if (res.code === 200 && res.data && res.data.length > 0) {
1444 1444
                         this.subTitleText = res.data && res.data.map(user => user.nickName).join('、');
1445 1445
                         resolve(res.data);

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

@@ -163,8 +163,8 @@ export default {
163 163
                 // 根据tab添加不同参数
164 164
                 if (this.currentTab === 'task') {
165 165
                     let levelObj = {
166
-                        'banzuzhang': "TEAM_LEVEL",
167
-                        'kezhang': "DEPARTMENT_LEVEL",
166
+                        'xiaozuzhang': "TEAM_LEVEL",
167
+                        'banzuzhang': "DEPARTMENT_LEVEL",
168 168
                         'zhanzhang': "STATION_LEVEL",
169 169
                     }
170 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 104
     isBanZuZhang() {
105 105
       let roles = this.$store.state.user.roles;
106
-      return roles && roles.includes('banzuzhang')
106
+      return roles && roles.includes('xiaozuzhang')
107 107
     },
108 108
     isKeZhang(){
109 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 113
   mounted() {

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

@@ -61,7 +61,7 @@ export default {
61 61
   computed: {
62 62
     isBanZuZhangOrKeZhang() {
63 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 67
   mounted() {

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

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

+ 2 - 2
src/pages/login.vue

@@ -78,7 +78,7 @@ export default {
78 78
   onLoad() {
79 79
     //#ifdef H5
80 80
     if (getToken()) {
81
-      this.$tab.reLaunch('/pages/myToDoList/index')
81
+      this.$tab.reLaunch('/pages/home-new/index')
82 82
     }
83 83
     this.getStorage()
84 84
     //#endif
@@ -164,7 +164,7 @@ export default {
164 164
       this.$store.dispatch('GetInfo').then(res => {
165 165
         // 登录成功后调用showMessageTabRedDot更新消息tab红点状态
166 166
         showMessageTabRedDot()
167
-        this.$tab.reLaunch('/pages/myToDoList/index')
167
+        this.$tab.reLaunch('/pages/home-new/index')
168 168
       })
169 169
     }
170 170
   }

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

@@ -416,7 +416,7 @@ export default {
416 416
     isSecurityRole() {
417 417
       // 安检员和班组长的角色ID通常是固定的,这里假设安检员角色ID为101,班组长角色ID为102
418 418
       // 您可以根据实际情况调整这些ID
419
-      const securityRoleIds = ['banzuzhang', 'SecurityCheck'] // 安检员和班组长的角色ID
419
+      const securityRoleIds = ['xiaozuzhang', 'SecurityCheck'] // 安检员和班组长的角色ID
420 420
 
421 421
       // 检查当前用户的角色ID是否包含安检员或班组长的角色ID
422 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 169
         canShowCheckbox(item) {
170 170
             //    (item.instance && item.instance.businessType === 'DEPARTMENT_CHECK' && 
171
-            //     this.userInfoRoles.includes('jingli'))
171
+            //     this.userInfoRoles.includes('bumenjingli'))
172 172
             return (item.instance && item.instance.businessType === 'SEIZURE_REPORT') &&
173 173
                 this.currentTab === 'todo';
174 174
         },
@@ -183,7 +183,7 @@ export default {
183 183
                     seizureTaskIds.push(item.id);
184 184
                 } 
185 185
                 // else if (item.instance && item.instance.businessType === 'DEPARTMENT_CHECK' &&
186
-                //     this.userInfoRoles.includes('jingli')) {
186
+                //     this.userInfoRoles.includes('bumenjingli')) {
187 187
                 //     departmentTaskIds.push(item.id);
188 188
                 // }
189 189
             });

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

@@ -205,7 +205,7 @@ export default {
205 205
     isUserType() {
206 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 209
         return true
210 210
       }
211 211
       return roles.includes('SecurityCheck')
@@ -220,7 +220,7 @@ export default {
220 220
     // 计算属性:检查是否为TEAMS类型
221 221
     isTeamsType() {
222 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 167
     isTeamType() {
168 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 171
         return true
172 172
       }
173
-      return roles.includes('banzuzhang')
173
+      return roles.includes('xiaozuzhang')
174 174
     },
175 175
 
176 176
     // 计算属性:检查是否为USER类型
177 177
     isUserType() {
178 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 181
         return true
182 182
       }
183 183
       return roles.includes('SecurityCheck')
184 184
     },
185 185
     isBrigadeType() {
186 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 190
     // 计算属性:检查是否为DEPARTMENT类型
191 191
     isDepartmentType() {
192 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 312
     isBrigadeType() {
313 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 316
     // 计算属性:检查是否为STATION类型
317 317
     isStationType() {
@@ -323,24 +323,24 @@ export default {
323 323
     // 计算属性:检查是否为DEPARTMENT类型
324 324
     isDepartmentType() {
325 325
       const roles = this.$store.state?.user?.roles || []
326
-      return roles.includes('kezhang')
326
+      return roles.includes('banzuzhang')
327 327
     },
328 328
 
329 329
     // 计算属性:检查是否为TEAMS类型
330 330
     isTeamsType() {
331 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 334
         return true
335 335
       }
336
-      return roles.includes('banzuzhang')
336
+      return roles.includes('xiaozuzhang')
337 337
     },
338 338
 
339 339
     // 计算属性:检查是否为USER类型
340 340
     isUserType() {
341 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 344
         return true
345 345
       }
346 346
       return roles.includes('SecurityCheck')

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

@@ -114,7 +114,7 @@ export default {
114 114
     // 计算属性:检查是否为班组长
115 115
     isTeamLeader() {
116 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 206
       let stationType = roles.includes('test') || roles.includes('zhijianke')
207 207
       let finalScopedId, finalScopedType
208
-      if (roles.includes('jingli') || roles.includes('xingzheng')) {
208
+      if (roles.includes('bumenjingli') || roles.includes('xingzheng')) {
209 209
         finalScopedId = deptId || ''
210 210
         finalScopedType = 'BRIGADE'
211 211
       }
212 212
       // 如果是班组长,默认选择 TEAMS
213
-      if (roles.includes('banzuzhang')) {
213
+      if (roles.includes('xiaozuzhang')) {
214 214
         finalScopedId = deptId || ''
215 215
         finalScopedType = 'TEAMS'
216 216
       } else {

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

@@ -55,7 +55,7 @@
55 55
     </template>
56 56
 
57 57
     <!-- 科长角色:根据数组遍历展示 -->
58
-    <template v-else-if="userRole === 'kezhang'">
58
+    <template v-else-if="userRole === 'banzuzhang'">
59 59
       <div v-for="(category, index) in sectionChiefCharts" :key="index" class="section">
60 60
         <!-- 问题明细 -->
61 61
         <div class="chart-section" v-if="category.pieData && category.pieData.length > 0">
@@ -157,10 +157,10 @@ export default {
157 157
       // 根据实际的角色名称进行映射
158 158
       if (this.userRoles.includes('test') || this.userRoles.includes('stationMaster')) {
159 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 672
         } else {
673 673
           this.stationMasterCharts = [];
674 674
         }
675
-        if (this.userRole === 'kezhang' && this.pieData.length > 0) {
675
+        if (this.userRole === 'banzuzhang' && this.pieData.length > 0) {
676 676
           // 获取所有分类ID
677 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 74
         isBanZuZhang() {
75 75
             let roles = this.userRoles;
76 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 80
     methods: {

+ 5 - 5
src/pages/seizeStatistics/index.vue

@@ -5,7 +5,7 @@
5 5
       <view class="filter-section">
6 6
         <view class="filter-row">
7 7
           <uni-data-picker
8
-            v-if="curUserRoles.includes('test') || curUserRoles.includes('jingli') || curUserRoles.includes('xingzheng')"
8
+            v-if="curUserRoles.includes('test') || curUserRoles.includes('bumenjingli') || curUserRoles.includes('xingzheng')"
9 9
             class="filter-select" :localdata="departments" :placeholder="'请选择'" @change="handleinspectDeptIdChange"
10 10
             :clear-icon="false" />
11 11
           <text v-if="dateRange.length > 0" class="days-count">共 {{ totalDays }} 天</text>
@@ -233,7 +233,7 @@ export default {
233 233
           { label: '按个人', value: 3 }
234 234
         ];
235 235
       }
236
-      if (this.getType == "MANAGER" || this.curUserRoles.includes('kezhang')) {
236
+      if (this.getType == "MANAGER" || this.curUserRoles.includes('banzuzhang')) {
237 237
         return [
238 238
           { label: '按班组', value: 2 },
239 239
           { label: '按个人', value: 3 }
@@ -315,7 +315,7 @@ export default {
315 315
       if (this.getType == "MANAGER") {
316 316
         dept = { inspectDepartmentId: this.formData.inspectDeptId }
317 317
       }
318
-      if (this.curUserRoles.includes('kezhang')) {
318
+      if (this.curUserRoles.includes('banzuzhang')) {
319 319
         const deptId = this.currentUser.userInfo.deptId;
320 320
         dept = { inspectDepartmentId: deptId }
321 321
       }
@@ -355,7 +355,7 @@ export default {
355 355
     },
356 356
     // 初始化数据
357 357
     async initData() {
358
-      if (this.curUserRoles.includes('kezhang')) {
358
+      if (this.curUserRoles.includes('banzuzhang')) {
359 359
         this.defaultActive = 2
360 360
       }
361 361
       // 使用data()中设置的默认今天日期,不再重置dateRange
@@ -379,7 +379,7 @@ export default {
379 379
         const deptId = this.currentUser.userInfo && this.currentUser.userInfo.deptId;
380 380
         const subDeptTree = await getDeptList({ parentId: deptId });
381 381
         // console.log(subDeptTree, "subDeptTree")
382
-        let firstOption = this.curUserRoles.includes('test') ? [{ value: null, deptType: null, text: '全站' }] : this.curUserRoles.includes('jingli') || this.curUserRoles.includes('xingzheng') ? [{ value: deptId, deptType: 'BRIGADE', text: '本队' }] : [];
382
+        let firstOption = this.curUserRoles.includes('test') ? [{ value: null, deptType: null, text: '全站' }] : this.curUserRoles.includes('bumenjingli') || this.curUserRoles.includes('xingzheng') ? [{ value: deptId, deptType: 'BRIGADE', text: '本队' }] : [];
383 383
         //如果是站长,则获取所有部门的大队,如果是经理或行政,则获取登陆角色部门下的主管
384 384
         let otherOption = this.curUserRoles.includes('test') ? buildBrigadeOptions(deptTree.data || [], true) : buildManagerOptions(subDeptTree.data, true);
385 385
         console.log(otherOption, "this.departments")

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

@@ -309,7 +309,7 @@ export default {
309 309
     },
310 310
     // 判断是否为kezhang角色
311 311
     isKezhang() {
312
-      return this.$store?.state?.user?.roles?.includes('kezhang')
312
+      return this.$store?.state?.user?.roles?.includes('banzuzhang')
313 313
     },
314 314
     // 将item_check_method_options转换为字符串数组供uni-combox使用
315 315
     checkMethodCandidates() {

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

@@ -1502,7 +1502,7 @@ export default {
1502 1502
           formData: payload,
1503 1503
           submitterId: this.currentUser.id,
1504 1504
           submitterName: this.currentUser.name,
1505
-          submitterRole: this.currentUser.roles.includes('banzuzhang') ? 'SEIZURE_REPORT_LEADER' : this.currentUser.roles.includes('SecurityCheck') ? 'SEIZURE_REPORT_STAFF' : '',
1505
+          submitterRole: this.currentUser.roles.includes('xiaozuzhang') ? 'SEIZURE_REPORT_LEADER' : this.currentUser.roles.includes('SecurityCheck') ? 'SEIZURE_REPORT_STAFF' : '',
1506 1506
         }
1507 1507
 
1508 1508
 

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

@@ -345,7 +345,7 @@ export default {
345 345
         //班组长
346 346
         // isManager() {
347 347
         //     const roles = this.getUserRoles()
348
-        //     return roles.includes('banzuzhang')
348
+        //     return roles.includes('xiaozuzhang')
349 349
         // },
350 350
         chooseDept() {
351 351
             if (this.isStationMaster() || this.isBrigade()) {

+ 4 - 4
src/pages/workProfile/index.vue

@@ -4,7 +4,7 @@
4 4
         <view class="workProfileContainer">
5 5
             <!-- 下拉选择 -->
6 6
             <div class="filter-section" v-if="isSpecialUser || isJingLi">
7
-                <uni-data-select :class="{ 'filter-select': true, 'kezhang-style': isKeZhang }" v-model="selectedLevel"
7
+                <uni-data-select :class="{ 'filter-select': true, 'banzuzhang-style': isKeZhang }" v-model="selectedLevel"
8 8
                     :localdata="levelOptions" placeholder="请选择级别" :clear="false" @change="handleLevelChange"
9 9
                     :disabled="isKeZhang" />
10 10
             </div>
@@ -151,10 +151,10 @@ export default {
151 151
             return this.userRoles.includes('test')
152 152
         },
153 153
         isJingLi() {
154
-            return this.userRoles.includes('jingli')
154
+            return this.userRoles.includes('bumenjingli')
155 155
         },
156 156
         isKeZhang() {
157
-            return this.userRoles.includes('kezhang')
157
+            return this.userRoles.includes('banzuzhang')
158 158
         },
159 159
         curUserRoles() {
160 160
             return this.$store.state.user && this.$store.state.user.roles;
@@ -368,7 +368,7 @@ export default {
368 368
         }
369 369
     }
370 370
 
371
-    .kezhang-style {
371
+    .banzuzhang-style {
372 372
         ::v-deep .uni-stat-box {
373 373
             .uniui-bottom {
374 374
                 display: none !important;

+ 2 - 2
src/utils/common.js

@@ -464,7 +464,7 @@ export function checkRolePermission(role, path) {
464 464
       '/pages/voiceSubmissionDraft/index'
465 465
     ],
466 466
     //班组长
467
-    banzuzhang: [
467
+    xiaozuzhang: [
468 468
       '/pages/attendance/index',
469 469
       `/pages/seizedReported/index?params=${encodeURIComponent(JSON.stringify({ type: 'add' }))}`,
470 470
       '/pages/daily-exam/task-list/index',
@@ -477,7 +477,7 @@ export function checkRolePermission(role, path) {
477 477
       '/pages/voiceSubmissionDraft/index'
478 478
     ],
479 479
     //站长
480
-    kezhang: [
480
+    banzuzhang: [
481 481
       '/pages/attendance/index',
482 482
       '/pages/attendanceStatistics/index',
483 483
       '/pages/inspectionChecklist/index',