Explorar o código

fix(seizedReported): 修复添加案件时未检查是否科长及用户部门信息同步问题

修复添加案件时未检查是否科长的条件判断,确保只有非科长才能触发位置获取
完善部门用户选项数据,同步用户完整信息并添加部门ID映射
在切换查获人员时同步更新报告团队信息
huoyi hai 1 mes
pai
achega
ce7b72f6ed
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      src/pages/seizedReported/index.vue

+ 6 - 2
src/pages/seizedReported/index.vue

@@ -469,7 +469,7 @@ export default {
469 469
       await this.loadDepartmentUsers();
470 470
     }
471 471
     
472
-    if (this.type == 'add') {
472
+    if (this.type == 'add' && !this.isKezhang) {
473 473
       this.invokerGetLocationsbyTime()
474 474
     }
475 475
 
@@ -859,8 +859,10 @@ export default {
859 859
 
860 860
         if (response && response.code === 200) {
861 861
           this.departmentUserOptions = (response.rows || []).map(user => ({
862
+            ...user,
862 863
             value: user.userId,
863
-            text: user.nickName || user.userName
864
+            text: user.nickName || user.userName,
865
+      
864 866
           }));
865 867
         }
866 868
       } catch (error) {
@@ -1074,6 +1076,8 @@ export default {
1074 1076
       this.formData.inspectUserId = arr[arr.length - 1]?.value || '';
1075 1077
       this.formData.inspectUserName = arr.map(item => item.text).join('/');
1076 1078
       
1079
+      this.formData.reportTeam = this.departmentUserOptions.find(item => item.userId === this.formData.inspectUserId)?.deptId;
1080
+      this.formData.reportTeamText = this.teams.find(item => item.value === this.formData.reportTeam)?.text;
1077 1081
       // 切换查获人员后,重新初始化岗位和选项数据
1078 1082
       if (this.formData.inspectUserId) {
1079 1083
         await this.initPositionAndOptions();