李妹妹 2 tygodni temu
rodzic
commit
2fb1b15b8d

+ 2 - 2
.env.development

@@ -13,7 +13,7 @@ VUE_APP_LOG_URL =@/assets/logo/myhk.png
 ENV = 'development'
 
 # FS管理系统/开发环境
-VUE_APP_BASE_API = '/dev-api'
+VUE_APP_BASE_API ='/dev-api'
 
 #默认 1、会员 2、企微
 VUE_APP_COURSE_DEFAULT = 1
@@ -27,4 +27,4 @@ VUE_APP_PATIENT_INFO = '客户信息'
 VUE_APP_ADD_PATIENT = '添加信息'
 
 # IM webSocket地址
-VUE_APP_IM_WS_URL = ws://192.168.10.125:8667/qwImSocket
+VUE_APP_IM_WS_URL = ws://qwipad.jnmyunl.com/qwImSocket

+ 2 - 2
src/layout/index.vue

@@ -12,9 +12,9 @@
         <settings />
       </right-panel>
 
-      <div class="qw-im">
+      <div class="qw-im" @click="() => {this.qw.open = !this.qw.open}">
         <el-badge :value="totalUnreadCount" :max="99" :hidden="totalUnreadCount < 1">
-          <img alt="" class="qw-im-img" @click="() => {this.qw.open = !this.qw.open}" src="../assets/image/chat_icon44.png"/>
+          <img alt="" class="qw-im-img" src="../assets/image/chat_icon44.png"/>
           <div class="qw-im-text">IM聊天</div>
         </el-badge>
       </div>

+ 34 - 6
src/views/qw/qwChat/qq.vue

@@ -1,7 +1,7 @@
 <template>
   <div style="width: 100%;height: 100%">
 
- <!-- <el-tabs class="im-tabs" type="card" v-model="appKey" @tab-click="qwUserChange">
+<!-- <el-tabs class="im-tabs" type="card" v-model="appKey" @tab-click="qwUserChange">
                             <el-tab-pane
                               v-for="item in qwUserList"
                               :key="item.id"
@@ -46,12 +46,13 @@
                    @send="handleSend">
                     <template #menu-top>
                       <div class="qiwei">
-                         <div  v-for="item in qwUserList" :key="item.id" @click="qwUserChange(item)" :class="appKey==item.appKey?'q-item active':'q-item'">
+                         <div  v-for="item in qwUserList" :key="item.id" @click="qwUserChange(item)" :class="appId==item.id?'q-item active':'q-item'">
                           <el-badge :value="getUnreadCount(item.appKey)"
                                      :max="99"
                                      :hidden="getUnreadCount(item.appKey) < 1">
                                        <el-avatar shape="square" :src="item.avatar"></el-avatar>
-                                       <div class="name">{{item.qwUserName}}</div>
+                                       <div class="name" :title="item.qwUserName">{{item.qwUserName}}</div>
+                                       <div class="text" :title="item.corpName">{{item.corpName}}</div>
                            </el-badge>
                          </div>
                       </div>
@@ -186,6 +187,7 @@ export default {
     return {
       contactName:'',
       appKey:null,
+      appId:null,
       qwUserId:null,
       qwUserList:[],
       theme: "default",
@@ -266,6 +268,7 @@ export default {
       if (this.qwUserList.length>0){
         this.qwUser = this.qwUserList[0];
         this.appKey = this.qwUser.appKey;
+        this.appId=this.qwUser.id;
         this.companyId = this.qwUser.companyId; // 保存公司ID用于WebSocket连接
         this.setQwUserInfo();
         this.getConversation();
@@ -274,6 +277,8 @@ export default {
 
         // 初始化未读消息数
         this.initUnreadCount();
+        //联系人
+        this.initContact(this.qwUser.id)
       }else {
         this.qwUser={};
       }
@@ -501,6 +506,7 @@ export default {
     // 切换企微账号
     qwUserChange(tab){
       this.appKey = tab.appKey;
+      this.appId = tab.id;
       let index= this.qwUserList.findIndex(item => item.appKey === tab.appKey);
       this.qwUser=this.qwUserList[index];
       // 清除当前账号的未读消息数
@@ -516,7 +522,7 @@ export default {
     initContact(id){
       getContactList(id).then(response => {
         this.qwContactList = response.rows;
-        this.$refs.IMUI.initContacts(this.qwContactList);
+        this.$refs.IMUI.initContacts(response.rows);
         // this.getConversationId(id)
       });
     },
@@ -1065,8 +1071,13 @@ export default {
     align-items:center;
      position: relative;
      background: #409EFF;
-    // overflow: hidden;
+    overflow-y: auto;
+    scrollbar-width: none; /* Firefox */
+    -ms-overflow-style: none; /* IE 和 Edge */
     position:relative;
+    &::-webkit-scrollbar {
+      display: none; /* 隐藏滚动条 */
+    }
     .q-item{
       width: 72px;
       padding: 12px;
@@ -1093,6 +1104,18 @@ border-radius: 0 6px 6px 0;
           text-overflow: ellipsis; /* 超出部分显示省略号 */
         color: #fff;
         text-align: center;
+}
+      .text{
+        margin-top: 2px;
+        font-weight: 500;
+        font-size: 14px;
+        width: 72px;
+            padding: 0 2px;
+         white-space: nowrap; /* 强制文本不换行 */
+          overflow: hidden;    /* 超出部分隐藏 */
+          text-overflow: ellipsis; /* 超出部分显示省略号 */
+        color: #fff;
+        text-align: center;
       }
       &.active{
         background: #F1F4F8;
@@ -1101,7 +1124,9 @@ border-radius: 0 6px 6px 0;
         position: relative; /* 确保z-index生效 */
           z-index: 1; /* 高于相邻元素的默认层级 */
         .name{
-          color: #fff;
+          color: #202124;
+        }
+        .text{
           color: #202124;
         }
         // &:before{
@@ -1239,6 +1264,9 @@ border-radius: 0 6px 6px 0;
 .lemon-editor__tool-item{
   padding: 0px 10px 0 0 !important;
 }
+.lemon-container:empty {
+  display: none;
+}
 .lemon-container div{
   scrollbar-width: none; /* Firefox */
   -ms-overflow-style: none; /* IE 和 Edge */

+ 44 - 25
src/views/qw/qwChat/userDetail/courseManage.vue

@@ -1,7 +1,8 @@
 <template>
-  <div>
     <!-- 顶部标题栏 -->
-    <div>
+      <div style="width: 100%;height: 100%;background: #fff;">
+
+
       <div style="position: relative; display: flex; align-items: center; justify-content: center; height: 48px; background: #fff;">
         <span v-if="userId" style="position: absolute; left: 16px; cursor: pointer;" @click="handleBack">
           <i class="el-icon-arrow-left" style="font-size: 20px; color: #333;"></i>
@@ -9,11 +10,17 @@
         <span style="font-weight: bold; font-size: 18px;color: #202124;">课程管理</span>
       </div>
        <div class="tab-box" v-if="courseList.length>0">
-         <div :class="activeIndex==item.courseId?'tabs active':'tabs'" v-for="(item,index) in courseList.slice(0,5)" :key="index"
+      <!-- <div class="tab-container"> -->
+        <!-- <div :class="activeIndex==item.courseId?'tabs active':'tabs'" v-for="(item,index) in courseList" :key="index"
            @click="tabsClick(item.courseId)">
            {{item.courseName}}
-         </div>
-         <div class="filter-box">
+         </div> -->
+         <el-tabs v-model="activeIndex" @tab-click="tabsClick">
+             <el-tab-pane v-for="(item,index) in courseList" :key="item.id" :label="item.courseName" :name="item.courseName"></el-tab-pane>
+           </el-tabs>
+       <!-- </div> -->
+
+         <!-- <div class="filter-box">
            <el-popover
              placement="bottom"
              trigger="click"
@@ -32,10 +39,7 @@
              </div>
              <div slot="reference" class="filter">筛选<img src="@/assets/image/filter_icon.png" width="16"/></div>
            </el-popover>
-         </div>
-         <div>
-
-         </div>
+         </div> -->
        </div>
 
           <!-- <el-select
@@ -69,7 +73,6 @@
         @keyup.enter.native="handleSearch"
       >
       </el-input>
-    </div>
 
     <!-- 列表 -->
     <div :class="extend ? 'infinite-list-wrapper-extend' : 'infinite-list-wrapper'" style="overflow:auto">
@@ -111,8 +114,8 @@
       <div v-if="!videoQueryParams.hasNextPage && videoList.length > 0" class="no-more">
         <span>没有更多了</span>
       </div>
-    </div>
-  </div>
+      </div>
+      </div>
 </template>
 
 <script>
@@ -159,29 +162,39 @@ export default {
       videoList: [],
       defaultImage: require('@/assets/image/default-image.png'),
       sharingVideoId: null,
-      activeIndex:0,
+      activeIndex:'',
+      courseId:0,
     }
   },
   created() {
     // console.log(this.conversationId,'conversationId')
-    this.getFsCourseListBySidebar()
+    this.getFsCourseListBySidebar();
+
   },
   methods: {
     handleBack() {
       this.$emit('back')
     },
-    tabsClick(id) {
+    tabsClick(tab,event) {
       this.visible=false
-      this.activeIndex = id
-      this.courseChange(id)
+      let index= Number(tab.index)
+      if (isNaN(index) || index < 0 || index >= this.courseList.length) {
+          console.warn('无效的标签索引');
+          return;
+        }
+      this.activeIndex = this.courseList[index].courseName;
+      this.courseId = this.courseList[index].courseId
+      // this.activeIndex = id
+      this.courseChange(this.courseId)
     },
     getFsCourseListBySidebar() {
       this.courseQueryParams.loading = true;
       getFsCourseListBySidebar(this.courseQueryParams).then(response => {
         if (this.courseQueryParams.page === 1) {
           this.courseList = response.data.list;
-          this.activeIndex = response.data.list[0].courseId
-          this.courseChange(this.activeIndex)
+          this.activeIndex = response.data.list[0].courseName;
+           this.courseId = response.data.list[0].courseId;
+          this.courseChange(this.courseId)
         } else {
           this.courseList = [...this.courseList, ...response.data.list];
         }
@@ -310,15 +323,21 @@ export default {
 }
 
 </script>
-
+<style lang="stylus">
+  .el-tabs__header{
+    margin: 0 !important;
+  }
+  .el-tabs__nav-next, .el-tabs__nav-prev{
+    font-size: 16px!important;
+        font-weight: 600!important;
+  }
+</style>
 <style scoped lang="scss">
+
+
   .tab-box {
+    width: 100%;
       background: #FFFFFF;
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-       white-space: nowrap !important;
-      border-top: 1px solid #F1F4F8;
       .tabs {
         // flex:1;
         padding: 0 10px;

+ 1 - 0
src/views/qw/qwChat/userDetail/index.vue

@@ -518,6 +518,7 @@ line-height: 48px;
       align-items: center;
       justify-content: space-between;
       .title{
+        margin: 0 !important;
         font-weight: 500;
         font-size: 16px;
         color: #141F36;

+ 19 - 0
src/views/qw/qwChat/userDetail/userCourseWatchLog.vue

@@ -15,6 +15,11 @@
          {{type(item.logType)}}
         </div>
       </div>
+      <div v-if="courseWatchLogList.length === 0" class="empty-tip">
+        <!-- <i class="el-icon-video-camera"></i> -->
+        <img src="@/assets/image/no_page.png" width="280"/>
+        <p>暂无记录</p>
+      </div>
     </div>
   <!--  <el-table border v-loading="loading" :data="courseWatchLogList">
       <el-table-column label="记录编号" align="center" prop="logId" />
@@ -179,6 +184,20 @@ export default {
         color: #FC4B0E;
       }
     }
+    .empty-tip {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      padding: 40px 0;
+      color: #909399;
+    }
+
+    .empty-tip i {
+      font-size: 48px;
+      margin-bottom: 10px;
+      color: #dcdfe6;
+    }
   }
 }
 </style>

+ 1 - 1
vue.config.js

@@ -47,7 +47,7 @@ module.exports = {
 
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://localhost:8006`,
+        target: `http://192.168.10.125:8006`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''