<template>
  <div class="page_addStaff">
    <div class="editStaffTitle">
      <i class="iconfont icon-zuojiantou jiantou"></i>
      <span class="titleName">新增员工</span>
      <p>保存</p>
    </div>
    <div class="editStaffTip">必填</div>
    <div class="staffBox">
      <van-field v-model="text" label="姓名" clearable placeholder="请填写姓名" />
      <van-field v-model="tel" type="tel" label="手机号" placeholder="请填写手机号" clearable />
      <van-cell class="newCell">
        <!-- 使用 title 插槽来自定义标题 -->
        <template slot="title">
          <span class="custom-title">角色</span>
          <div style="width:76%;margin-left:3.3rem">
            <van-checkbox-group v-model="result">
              <van-checkbox style="width: 30%;" name="a" shape="square">医生</van-checkbox>
              <van-checkbox style="width: 30%;" name="b" shape="square">护士</van-checkbox>
              <van-checkbox style="width: 30%;" name="c" shape="square">运营</van-checkbox>
              <van-checkbox style="width: 30%;" name="d" shape="square">库存</van-checkbox>
              <van-checkbox style="width: 30%;" name="e" shape="square">院长</van-checkbox>
              <van-checkbox style="width: 40%;" name="f" shape="square">子管理员</van-checkbox>
            </van-checkbox-group>
          </div>
        </template>
      </van-cell>
    </div>
    <div class="editStaffTip">选填</div>
    <div class="staffBox">
      <van-field v-model="text" label="职位" placeholder="请填写" />
    </div>
    <div class="addnewStaff">
      <van-icon class="addIcon" name="add" />
      <p>继续新增员工</p>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      result: [],
      value1: ""
    };
  }
};
</script>

<style lang="scss" scoped>
.page_addStaff {
  height: 100%;
  overflow: hidden;
  background: #fafafa;
  .editStaffTitle {
    height: 3.125rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 1.125rem;
    background: #fff;
  }
  .jiantou {
    font-size: 1.5rem;
    font-weight: 600;
    margin-right: 1.25rem;
  }
  .titleName {
    font-size: 1.125rem;
    font-weight: 600;
  }
  .editStaffTip {
    height: 1.875rem;
    line-height: 1.875rem;
    font-size: 0.75rem;
    padding-left: 0.875rem;
    color: #989898;
  }
  .staffBox {
    .van-cell {
      font-size: 1rem;
    }
    .newCell {
      padding-right: 0;
    }
  }
  .van-cell__title {
    display: flex;
  }
  .van-checkbox-group {
    display: flex;
    flex-wrap: wrap;
  }
  .van-checkbox {
    margin-bottom: 0.625rem;
  }
  .addnewStaff {
    height: 2.8125rem;
    line-height: 2.8125rem;
    background: #fff;
    width: 100%;
    margin-top: 0.875rem;
    display: flex;
    align-items: center;
    padding-left: 1rem;
    .addIcon {
      color: #338afb;
      font-size: 1.5rem;
      margin-right: 0.625rem;
    }
  }
}
</style>
<style lang="scss">
.page_editStaff {
  .van-cell__value {
    display: flex;
    align-items: center;
  }
}
</style>
