odc.xiaohui
2023-05-10 06b7757e3de40b5c380df429a06b859389c80fbc
src/views/cause/Group.vue
@@ -22,16 +22,16 @@
           <el-button style="margin-left: 5px" type="primary" @click="search">搜索</el-button>
         </div>
          <div class="group-right-left-seach-body-box">
            <ul v-infinite-scroll="load" style="overflow:auto;height: 569px" class="group-right-left-seach-body-box-ul">
            <ul  style="overflow:auto;height: 558px" class="group-right-left-seach-body-box-ul">
              <li v-for="messageOne in messageList" class="group-right-left-seach-body-box-li" >
                 <div class="group-right-left-seach-body-box-imgmessage">
                   <img class="group-img" v-if="messageOne.pic != null && messageOne.pic != ''" :src="messageOne.pic"
                        >
                   <img class="group-img" v-if="messageOne.pic == null || messageOne.pic == ''"
                        src="../../icons/7bedbaa41b1744fbfe0c55b507fd9e28.png">
                   <div style="margin-left: 10px">{{ messageOne.userName }} {{ messageOne.ctime }}</div>
                   <div style="margin-left: 10px" >{{ messageOne.userName }} {{ messageOne.ctime }}</div>
                 </div>
                  <div class="group-right-left-seach-body-box-text">{{ messageOne.text }}</div>
                  <div :class="messageOne.remark!==null?'activemess':'group-right-left-seach-body-box-text' " >{{ messageOne.text }}</div>
              </li>
            </ul>
          </div>
@@ -102,6 +102,7 @@
  },
  data() {
    return {
      count: 0,
      sendBtn:true,
      options: [
        {
@@ -139,9 +140,13 @@
  created() {
    this.init();
  },
  methods:
      {
        //群组名称
  methods: {
    load() {
      this.count += 2
    },
    //群组名称
        init() {
          getName().then(
              res => {
@@ -162,11 +167,11 @@
        //     pick(){
        // this.filterNode(this.filterVal,this.data);
        //     },
        handleNodeClick(data) {
       async handleNodeClick(data) {
          if (data.id != null) {
            this.groupName = data.groupName;
            var _this = this;
            getAllMessage(data.id).then((res) => {
           await getAllMessage(data.id).then((res) => {
              for (let item of res) {
                if (item.pic === '' || item.pic === null) {
@@ -176,11 +181,28 @@
                  })
                }
              }
              res.map(item=>{
                item.remark=null
              })
              this.messageList = res
              this.sendBtn=false
            })
            getAllNotice(data.id).then(res => this.groupAnList = res)
            getAllUser(data.id).then(res => this.tableData = res)
            await getAllNotice(data.id).then(res => this.groupAnList = res)
            await getAllUser(data.id).then(res => {
              console.log(this.messageList)
              console.log(res)
              for (let i=0; i<this.messageList.length;i++){
                for (let j = 0; j < res.length; j++) {
                  if (this.messageList[i].userName == res[j].userName){
                    this.messageList[i].remark = res[j].remark
                  }
                }
              }
              this.tableData = res
            })
            console.log(this.messageList)
            this.groupId = data.id;
          }
        },
@@ -229,12 +251,33 @@
          }
        },
        seedMessage() {
          seed(this.field103, this.groupId).then(res => {
          seed(this.field103, this.groupId).then(async res => {
                this.$message({
                  message: '回复成功',
                  type: 'success'
                });
                getAllMessage(this.groupId).then(res => this.messageList = res)
                await getAllMessage(this.groupId).then(res => {
                  res.map(item=>{
                    if (item.pic === '' || item.pic === null){
                    }else {
                      item.pic='/minio/img/'+item.pic
                    }
                  })
                  this.messageList = res
                  // console.log(res)
                })
                // for (let item of this.messageList) {
                //   if (item.pic === '' || item.pic === null) {
                //   } else {
                //     getImgUrl(item.pic).then(res => {
                //       item.pic = res
                //     })
                //   }
                // }
                this.field103 = '';
              }
          )
@@ -254,14 +297,22 @@
  background-color: #fff;
  .group-left{
    width: 300px;
    .inputleft{
      margin-top: 10px;
      margin-left: 5px;
    }
  }
  .group-right{
    margin-left: 10px;
    border-left: 1px solid #ccc;
    padding-left: 10px;
    background-color: #fff;
    //flex-grow: 1;
    .group-right-name{
      margin-bottom: 10px;
      font-size: 16px;
      font-weight: 900;
      margin-top: 10px;
    }
    .group-right-box{
      display: flex;
@@ -280,6 +331,9 @@
                 color: #ccc;
                 .group-img{
                   width: 25px;
                   height: 25px;
                   border-radius: 100px;
                 }
               }
               .group-right-left-seach-body-box-text{
@@ -416,4 +470,8 @@
::v-deep(.el-table thead) {
  color: #000000;
}
.activemess{
  margin-left: 35px;
  color: red;
}
</style>