zhanghua
2024-01-21 e1aa0ecffbabd618c71e4ad94370fb8dffe6ee1c
src/views/systemSetting/baseSetting/department/updateUser/index.vue
@@ -33,18 +33,24 @@
                      item.leader ? 'leader' : '',
                    ]"></i>
                  </div>
                  <label style="font-size: 12px" :class="[item.leader ? 'leader' : '']">{{ item.username }}</label>
                  <label style="font-size: 12px" :class="[item.leader ? 'leader' : 'theMasses']">{{ item.username }}</label>
                </div>
              </li>
              <li class="li-btn" v-if="updateFlag">
                <i class="el-icon-plus" @click="openUser = true"></i>
              </li>
              <li class="li-btn" v-if="updateFlag">
                <el-tooltip class="item" effect="light" content="清除选中人员" placement="top" :enterable="false">
                  <i class="el-icon-minus" @click="clrarUser"></i>
                </el-tooltip>
              </li>
            </ul>
            <div class="card" v-if="openUser">
              <el-card class="box-card">
                <div slot="header" class="myclear">
                  <span>工作人员</span>
                  <div @click="addUser">确认</div>
                  <div class="department-sub" @click="addUser">确认</div>
                </div>
                <div class="scrollWrap">
                  <el-checkbox-group v-model="checkedUser">
@@ -201,6 +207,11 @@
        }
      });
    },
    // 清除选中用户
    clrarUser(){
      this.checkedList=[]
    },
    addUser() {
      this.checkedList = [];
      this.userList.forEach((item) => {
@@ -214,7 +225,7 @@
          }
        });
      });
      this.checkedList[0].leader = true;
      // this.checkedList[0].leader = true;
      console.log(this.checkedList);
      this.openUser = false;
    },
@@ -316,6 +327,12 @@
  width: 36px;
  height: 36px;
  border-radius: 50%;
  .el-icon-plus{
    cursor: pointer;
  }
  .el-icon-minus{
    cursor: pointer;
  }
}
.card {
@@ -353,6 +370,11 @@
      color: #4b9bb7;
      display: flex;
      justify-content: space-between;
      .department-sub{
        cursor: pointer;
        margin-left: 5px;
        color: #2f54eb;
      }
    }
    .hidebar {
@@ -373,8 +395,10 @@
.leader {
  color: red;
}
.theMasses{
  color: #2f54eb;
}
.el-input {
  width: 280px !important;
}
</style>
</style>