소스 검색

叮当国医-数据与智能专区

cgp 3 일 전
부모
커밋
75dc2c0535
2개의 변경된 파일20개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 0
      src/views/qw/conversationNew/ConversationPanelPure.vue
  2. 19 3
      src/views/qw/conversationNew/EmployeeQueryTab.vue

+ 1 - 0
src/views/qw/conversationNew/ConversationPanelPure.vue

@@ -232,6 +232,7 @@ export default {
           this.configError = false;
           setCachedConfig(this.corpId, cfg);
         } catch (e) {
+          alert("请更换企微主体!!!")
           console.error('[ConversationPanel] 获取配置失败:', e);
           this.configReady = false;
           this.configError = true;

+ 19 - 3
src/views/qw/conversationNew/EmployeeQueryTab.vue

@@ -114,6 +114,21 @@ import Pagination from "@/components/Pagination";
 export default {
   name: "EmployeeQueryTab",
   components: { ConversationPanelPure, Pagination },
+  props: {
+    corp: {
+      type: Object,
+      default: null
+    }
+  },
+  watch: {
+    corp(newVal) {
+      if (newVal && newVal.corpId) {
+        this.queryParams.userId = null;    // 清空已选员工
+        this.queryParams.pageNum = 1;
+        this.getStaffList();
+      }
+    }
+  },
   data() {
     return {
       // 员工下拉选项(全量,用于查询条件)
@@ -193,6 +208,7 @@ export default {
         const params = {
           userId: this.queryParams.userId,
           qwUserName: this.queryParams.qwUserName,
+          corpId: this.corp ? this.corp.corpId : null,
           pageNum: this.queryParams.pageNum,
           pageSize: this.queryParams.pageSize
         };
@@ -232,7 +248,7 @@ export default {
 
     // 打开抽屉,加载客户列表
     openDrawer(row) {
-      this.currentStaff = row;
+      this.currentStaff = { ...row, corpId: this.corp?.corpId };
       this.drawerVisible = true;
       this.selectedCustomerId = null;
       this.selectedCustomerAvatar = "";
@@ -248,8 +264,8 @@ export default {
         const params = {
           pageNum: this.customerPageNum,
           pageSize: this.customerPageSize,
-          qwUserId: this.currentStaff.it,
-          corpId: this.currentStaff.corpId
+          qwUserId: this.currentStaff.id,
+          corpId: this.corp?.corpId
         };
         const res = await listExternalContact(params);
         if (res.rows) {