Quellcode durchsuchen

企微聊天 侧边栏订单详情、修改创建聊天组件时机、修改新增订单页区域选择代码

Long vor 2 Tagen
Ursprung
Commit
2e64f8d6ea

+ 1 - 1
src/components/LemonUI/components/index.vue

@@ -582,7 +582,7 @@ export default {
       nodes.push(
         <div
           class={cls}
-          style="flex: unset;width: 40%;border: 1px solid #efefef"
+          style="flex: 1 1 0;width: 0;"
           v-show={this._menuIsMessages() && defIsShow && curact.id}
         >
           {useScopedSlot(this.$scopedSlots["message-extend"], null, curact)}

+ 13 - 1
src/layout/index.vue

@@ -57,6 +57,8 @@
                custom-class="im-dialog"
                :fullscreen="qw.isMaximized"
                :visible.sync="qw.open"
+               :modal="false"
+               :style="{visibility: !qw.initLoad ? 'hidden' : 'unset'}"
                :title="qw.title">
 <!--      <template #title>-->
 <!--        <span>{{ qw.title }}</span>-->
@@ -125,7 +127,8 @@ export default {
       qw: {
         open: false,
         title: '',
-        isMaximized: false
+        isMaximized: false,
+        initLoad: false
       }
     }
   },
@@ -136,6 +139,15 @@ export default {
        // if(this.companyUser.userType=="00"){
        //    this.initSocket(this.companyUser.userId);
        // }
+    if (!this.qw.initLoad) {
+      this.qw.open = true
+      this.$nextTick(() => {
+        this.qw.open = false
+        setTimeout(() => {
+          this.qw.initLoad = true
+        },  50)
+      })
+    }
   },
   methods: {
     callPhone(){

+ 4 - 4
src/views/qw/qwChat/qq.vue

@@ -51,7 +51,7 @@
               size="small"
               clearable
               @input="handleSearch"
-              style="flex: 1;"
+              style="flex: 1;height: 32px;"
             />
             <el-popover
               placement="bottom-end"
@@ -72,7 +72,7 @@
               <el-button
                 slot="reference"
                 icon="el-icon-setting"
-                style="padding: 8px;"
+                style="padding: 8px;height: 32px;"
                 size="small"
                 :type="selectedFilters.length > 0 ? 'primary' : 'default'"
               ></el-button>
@@ -355,7 +355,7 @@ export default {
           // 播放声音
           const audio = new Audio(notificationMp3);
           audio.play().catch(err => {
-            console.warn("播放声音失败,可能未与用户交互:", err);
+            console.warn("播放声音失败", err);
           });
 
           // 确定消息所属的企微账号
@@ -471,7 +471,7 @@ export default {
     setQwUserInfo(){
       this.userData.id=this.qwUser.id;
       this.userData.displayName=this.qwUser.qwUserName;
-      this.userData.avatar="https://cos.his.cdwjyyh.com/fs/20241231/22a765a96da247d1b83ea94fef438a41.png";
+      this.userData.avatar=this.qwUser.avatar;
     },
     getConversation(){
       const IMUI = this.$refs.IMUI;

+ 1 - 1
src/views/qw/qwChat/userDetail/userStorerDetails.vue

@@ -2,7 +2,6 @@
   <div class="aacontainer">
     <el-table v-loading="loading" :data="orderList" border>
       <el-table-column label="订单号" align="center" prop="orderCode" width="180px"/>
-      <el-table-column label="所属店铺" align="center" prop="storeName" width="180px"/>
       <el-table-column label="用户昵称" align="center" prop="nickName" show-overflow-tooltip width="100px"/>
       <el-table-column label="收货人" align="center" prop="userName" />
       <el-table-column label="医生姓名" align="center" prop="doctorName" />
@@ -70,6 +69,7 @@
     <el-drawer
       size="75%"
       :title="show.title" :visible.sync="show.open"
+      :modal="false"
     >
       <product-order  ref="order" />
     </el-drawer>

+ 17 - 20
src/views/store/components/addUserAddress.vue

@@ -95,44 +95,41 @@ export default {
   },
   methods: {
     districtChange(val){
-      var item=this.citys.find((item)=>{
-        return item.cityId==val;
-      })
-      console.log(item)
+      const item = this.district.find(i => i.cityId === val)
       this.form.district=item.name;
-
     },
     cityChange(val){
-      this.district=this.citys.filter(item => item.parentId===val )
+      const item = this.city.find(i => i.cityId === val)
+      this.district = item.children
       this.form.district=null;
-      var item=this.citys.find((item)=>{
-        return item.cityId==val;
-      })
-      console.log(item)
       this.form.city=item.name;
       this.form.cityId=val;
-
     },
     provinceChange(val){
-      console.log(val)
-      this.city=this.citys.filter(item => item.parentId===val )
+      const item = this.citys.find(i => i.cityId === val)
+      this.city = item.children
       this.district=[];
       this.form.city=null;
       this.form.district=null;
-      var item=this.citys.find((item)=>{
-        return item.cityId==val;
-      })
-      console.log(item)
       this.form.province=item.name;
     },
     getCityList(){
       getCitys().then(res => {
           this.loading = false;
-          this.citys=res.data;
-          console.log("this.citys",this.citys)
-          this.province=res.data.filter(item => item.level===0 )
+          this.citys = this.convertCityData(res.data)
+          this.province=this.citys.filter(item => item.parentId===0 )
         })
     },
+    convertCityData(array) {
+      return array.map(item => {
+        return {
+          'cityId': item.value,
+          'name': item.label,
+          'parentId':  item.pid,
+          'children': item.children && this.convertCityData(item.children)
+        }
+      });
+    },
     init(userId){
       this.form.userId=userId;
     },