Browse Source

fix: 企业监控分组管理相关

yangfeng 5 months ago
parent
commit
7329c53937

+ 2 - 0
apps/bigmember_pc/src/components/forecast/ForFilter.vue

@@ -248,11 +248,13 @@ export default {
       this.deleteGroupId = data?.groupId
     },
     confirmDeleteGroup() {
+      this.curGroup = ''
       this.$emit('updateGroup', {
         type: 'del',
         groupId: this.deleteGroupId
       })
       this.dialog.delete = false
+      this.$emit('updateList')
     }
   }
 }

+ 18 - 12
apps/bigmember_pc/src/components/forecast/ForeCast.vue

@@ -146,7 +146,7 @@
     <!-- 企业情报 -->
     <div v-if="type == 'entintel'" style="padding: 0 40px">
       <div class="entintel-thead">
-        <span style="width: 810px">企业</span>
+        <span style="width: 800px">企业</span>
         <span style="width: 100px" class="thead-flex">
           <em>更新时间</em>
           <el-tooltip class="item" effect="dark" placement="top">
@@ -160,7 +160,7 @@
             <i class="icon-quesion"></i>
           </el-tooltip>
         </span>
-        <span style="width: 100px">分组</span>
+        <span style="width: 120px">分组</span>
         <span style="width: 100px">操作</span>
       </div>
       <ul
@@ -180,7 +180,7 @@
           :key="index"
         >
           <div
-            style="padding: 0 12px; width: 810px; cursor: pointer"
+            style="padding: 0 12px; width: 800px; cursor: pointer"
             @click="goViewEnt(item.s_entId, item)"
           >
             <div class="list_name ent_li_name visited-hd">
@@ -224,11 +224,11 @@
                 : '--'
             }}
           </div>
-          <div class="list_li_item item-flex-column">
+          <div class="list_li_item item-flex-column" style="width: 120px">
             <span
               v-for="(s, j) in formatGroup(item.s_grousp)"
               :key="'00' + j"
-              style="line-height: 20px"
+              class="item-group-name"
               >{{ s }}</span
             >
           </div>
@@ -1078,13 +1078,10 @@ export default {
         if (res.data === 'success') {
           this.$toast('修改分组成功')
           this.dialog.group = false
-          this.$emit(
-            'onPageChange',
-            num,
-            filter.entVal ? filter.entVal : '',
-            filter.group ? filter.group : '',
-            this.listState.pageSize
-          )
+          this.$emit('onPageChange')
+          this.$emit('updateGroup', {
+            type: 'get'
+          })
         } else {
           this.$toast(res.error_msg)
         }
@@ -1382,6 +1379,14 @@ export default {
       flex-direction: column;
       align-items: center;
     }
+    .item-group-name {
+      display: block;
+      white-space: nowrap;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      width: 100%;
+      line-height: 20px;
+    }
   }
 
   .add-btn {
@@ -1482,6 +1487,7 @@ export default {
           font-size: 14px;
           color: #2cb7ca;
           font-weight: 400;
+          //white-space: nowrap;
 
           .unit_label {
             color: #999999;

+ 13 - 5
apps/bigmember_pc/src/composables/quick-monitor/component/MonitorGroup.vue

@@ -118,13 +118,19 @@ function onItemConfirm(item) {
   if (!item.input) {
     return that.$toast('请输入分组名称')
   }
-  if (list.some((v) => v.name === item.input)) {
+  if (list.some((v) => v.name === item.input) && item.input !== item.name) {
     return that.$toast('分组名称已存在')
   }
-  item.name = item.input
-  item.showEdit = false
-  isDisabled.value = false
-  emits('edit', { groupId: item.id, name: item.name })
+  if (item.input !== item.name) {
+    item.name = item.input
+    item.showEdit = false
+    isDisabled.value = false
+    emits('edit', { groupId: item.id, name: item.name })
+  } else {
+    console.log('分组名称未修改')
+    item.showEdit = false
+    isDisabled.value = false
+  }
 }
 // 单项编辑取消方法
 function onItemCancel(item) {
@@ -205,6 +211,7 @@ defineExpose({
           maxlength="15"
           autofocus
           @keyup.enter.native="onAddConfirm"
+          @click.stop.native
         >
           <template #suffix>
             <span class="el-input__count">
@@ -296,6 +303,7 @@ defineExpose({
             autofocus
             @input="onItemInput($event, item)"
             @keyup.enter.native="onItemConfirm(item)"
+            @click.stop.native
           >
             <template #suffix>
               <span class="el-input__count">

+ 3 - 0
apps/bigmember_pc/src/views/ent-intel/EntIntel.vue

@@ -128,6 +128,9 @@ export default {
           this.$toast('修改分组成功')
         } else if (type === 'del') {
           this.$toast('删除分组成功')
+          setTimeout(() => {
+            this.ajaxGetEntFollowList()
+          }, 500)
         }
         this.ajaxEntGroupList()
       }