Kaynağa Gözat

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

修复添加案件时未检查是否科长的条件判断,确保只有非科长才能触发位置获取
完善部门用户选项数据,同步用户完整信息并添加部门ID映射
在切换查获人员时同步更新报告团队信息
huoyi 1 ay önce
ebeveyn
işleme
ce7b72f6ed
1 değiştirilmiş dosya ile 6 ekleme ve 2 silme
  1. 6 2
      src/pages/seizedReported/index.vue

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

@@ -469,7 +469,7 @@ export default {
469
       await this.loadDepartmentUsers();
469
       await this.loadDepartmentUsers();
470
     }
470
     }
471
     
471
     
472
-    if (this.type == 'add') {
472
+    if (this.type == 'add' && !this.isKezhang) {
473
       this.invokerGetLocationsbyTime()
473
       this.invokerGetLocationsbyTime()
474
     }
474
     }
475
 
475
 
@@ -859,8 +859,10 @@ export default {
859
 
859
 
860
         if (response && response.code === 200) {
860
         if (response && response.code === 200) {
861
           this.departmentUserOptions = (response.rows || []).map(user => ({
861
           this.departmentUserOptions = (response.rows || []).map(user => ({
862
+            ...user,
862
             value: user.userId,
863
             value: user.userId,
863
-            text: user.nickName || user.userName
864
+            text: user.nickName || user.userName,
865
+      
864
           }));
866
           }));
865
         }
867
         }
866
       } catch (error) {
868
       } catch (error) {
@@ -1074,6 +1076,8 @@ export default {
1074
       this.formData.inspectUserId = arr[arr.length - 1]?.value || '';
1076
       this.formData.inspectUserId = arr[arr.length - 1]?.value || '';
1075
       this.formData.inspectUserName = arr.map(item => item.text).join('/');
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
       if (this.formData.inspectUserId) {
1082
       if (this.formData.inspectUserId) {
1079
         await this.initPositionAndOptions();
1083
         await this.initPositionAndOptions();