<template>
  <div
    class="consultationlist"
    style="user-select: none"
    @click="goworkBench"
  >
    <div class="list">
      <div class="name">
        {{ operatorsItem.name || '' }}
      </div>
      <div class="details">
        <!-- <div class="handle">待处理: <span> 暂无</span></div> -->
        <div class="see">
          <span>查看详情</span>
          <i class="el-icon-arrow-right" />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import { conditionUpdate } from '@/api/workbench';

  export default {
    props: {
      operatorsItem: {
        type: Object,
        default: () => {
          return {};
        },
      },
      workbenchAdminDate: {
        type: String,
        default: '',
      },
    },
    data() {
      return {};
    },
    created() {
      console.log('operatorsItem', this.operatorsItem);
    },
    methods: {
      goworkBench() {
        const p = {
          dateTime: this.workbenchAdminDate,
          operateUserId: this.operatorsItem.id,
          pageNo: 1,
          pageSize: 6,
          returnStatus: 1,
        };
        this.$store.commit('main/clearRawCurrentCalList');
        conditionUpdate(p).then((res) => {
          if (res.code == '000000') {
            this.$store.commit('main/updateSoketQuest', p);
            this.$router.push({ path: '/workbench' });
          } else {
            this.$message({
              message: res.message,
              type: 'warning',
              duration: 1000,
            });
          }
        });
      },
    },
  };
</script>

<style lang="scss">
.consultationlist {
  padding: 25px;
  width: 100%;
  background: #ffffff;
  border-radius: 18px;
  cursor: pointer;
  .list {
    display: flex;
    justify-content: space-between;
    .details {
      width: 120px;
      height: 40px;
      background: rgba(68, 146, 132, 0.24);
      border-radius: 20px;
      opacity: 0.44;
      border: 1px solid #449284;
      display: flex;
      justify-content: space-evenly;
      align-items: center;
      cursor: pointer;
      .handle {
        font-size: 14px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #6a7990;
        line-height: 18px;
        span {
          font-size: 18px;
          font-family: PingFangSC-Medium, PingFang SC;
          font-weight: 500;
          color: #449284;
        }
      }
      .see {
        span {
          font-size: 14px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 400;
          color: #6a7990;
        }
      }
    }
    .name {
      font-size: 24px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #063948;
    }
  }
  .data {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    .totallist {
      font-size: 18px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #063948;
      line-height: 25px;
    }
    .statelist {
      font-size: 14px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #6a7990;
    }
  }
}
</style>
