<template>
  <div>
    <div class="todo_top">
      <div class="todo_selection" v-if="todotype==0">
        <div class='todo_selection_check'>任务</div>
        <div style="margin-left:30px">审批</div>
        <div class="todo_top_cnt"></div>
      </div>

      <div class="todo_selection" v-if="todotype==1">
        <div>任务</div>
        <div class='todo_selection_check' style="margin-left:30px">审批</div>
      </div>      
    </div>

    <!-- 日历 -->
    <div style="padding:0 0 60px 0 ">
      <div class="todo_img_wap" v-if="todotype==0">
        <div style="flex:0 0 100%;margin: 0 auto;">
          <img src="../assets/task_date_2.jpg" class="todo_img" v-if="datetype==0"></img>
          <img src="../assets/task_date_1.jpg" class="todo_img" v-if="datetype==1"></img>
        </div>
      </div>

      <!-- 任务页 -->
      <div v-if="todotype==0">
        <!-- 选择我的任务或我安排的任务 -->
        <div class="todo_mid_selection">
          <div class="todo_mid_selection_check">我的任务</div>
          <div>我安排的任务</div>
        </div>

        <!-- 任务列表 -->
        <div style="display:flex;align-items: center;margin-top:10px">
          <div class="todo_title">8月6日(今天)</div>
          <div style="font-size:14px;position:absolute;right:70px;color:#666">只显示待办</div>
          <div style="margin-left:10px;font-size:40px;position:absolute;right:20px;">
            <svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-uni_icon_kaiguan_guan"></use>
            </svg>
          </div>
        </div>
        <div class="todo_list">
          <div class="arrow_box ">
            <div class="task_date_inner">8/6 16:00-18:00</div>
            <div class="task_conner tip_red">待办</div>
            <div class="task_dscrp">
              <div>跟设计公司沟通，定好最新一季宣传画册的设计。</div>
            </div>

            <div class="task_flex">
              <div class="task_tip">安排人:张小强</div>
              <div class="task_tip">临时任务</div>
            </div>
          </div>

          <div class="arrow_box ">
            <div class="task_date_inner">8/6 09:00-12:00</div>
            <div class="task_conner tip_blue">待验收</div>
            <div class="task_dscrp">
              <div>拿川建国有限公司的合同给老板签字然后传真过去给客户。</div>
            </div>

            <div class="task_flex">
              <div class="task_tip">安排人:张小强</div>
              <div class="task_tip">临时任务</div>
            </div>
          </div>
        </div>

        <div class="liubai_dt"></div>

        <div class="todo_title">超期</div>
        <div class="todo_list">
          <div class="arrow_box kindred">
            <div class="task_date_inner">7/25 16:00-18:00</div>
            <div class="task_conner_sec tip_red">超期</div>
            <div class="task_conner tip_red">待办</div>
            <div class="task_dscrp">
              <div>拿川建国有限公司的合同给老板签字然后传真过去给客户。</div>
            </div>

            <div class="task_flex">
              <div class="task_tip">安排人:张小强</div>
              <div class="task_tip">临时任务</div>
            </div>
          </div>

          <div class="arrow_box kindred">
            <div class="task_date_inner">7/25 16:00-18:00</div>
            <div class="task_conner_sec tip_red">超期</div>
            <div class="task_conner tip_red">待办</div>
            <div class="task_dscrp">
              <div>拿川建国有限公司的合同给老板签字然后传真过去给客户。</div>
            </div>

            <div class="task_flex">
              <div class="task_tip">安排人:张小强</div>
              <div class="task_tip">临时任务</div>
            </div>
          </div>
        </div>

        <div class="liubai_dt"></div>

        <div class="todo_title">验收</div>
        <div class="todo_list">
          <div class="arrow_box kindgreen">
            <div class="task_date_inner">7/25 15:32</div>
            <div class="task_conner_sec">有图片</div>
            <div class="task_conner tip_red">待验收</div>
            <div class="task_dscrp">
              <div>木工车间设备定期保养</div>
            </div>

            <div class="task_flex">
              <div class="task_tip">完成人:王大民</div>
              <div class="task_tip">任务验收</div>
            </div>
          </div>

          <div class="arrow_box kindgreen">
            <div class="task_date_inner">7/25 16:00</div>
            <div class="task_conner_sec">有图片</div>
            <div class="task_conner tip_red">待验收</div>
            <div class="task_dscrp">
              <div>按6S标准检查车间清洁是否达标。</div>
            </div>

            <div class="task_flex">
              <div class="task_tip">完成人:王大民</div>
              <div class="task_tip">任务验收</div>
            </div>
          </div>
        </div>
      </div>

      <!-- 公文页 -->
      <div v-if="todotype==1">
        <!-- 选择待我审批或我发起的公文 -->
        <div class="todo_mid_selection">
          <div class="todo_mid_selection_check">待我审批</div>
          <div>我发起的公文</div>
        </div>

        <!-- 公文列表 -->
        <div style="display:flex;align-items: center;margin-top:10px">
          <div class="todo_title">8月6日(今天)</div>
          <!-- <div style="font-size:14px;position:absolute;right:70px;color:#666">只显示待审批</div>
          <div style="margin-left:10px;font-size:40px;position:absolute;right:20px;">
            <svg class="icon" aria-hidden="true">
              <use xlink:href="#icon-uni_icon_kaiguan_guan"></use>
            </svg>
          </div> -->
        </div>
        <div class="todo_list">
          <div class="arrow_box ">
            <div class="task_date_inner">8/6 16:24</div>
            <div class="task_conner tip_red">待审批</div>
            <div class="task_conner_sec tip_red">催办</div>
            <div class="task_dscrp">
              <div>年假申请，2019年9月1日至2019年9月7日共7天，望批准。</div>
            </div>

            <div class="task_flex">
              <div class="task_tip">发起人:黎小娟</div>
              <div class="task_tip">公文审批</div>
            </div>
          </div>

          <div class="arrow_box ">
            <div class="task_date_inner">8/6 09:00-12:00</div>
            <div class="task_conner tip_blue">已审批</div>
            <div class="task_dscrp">
              <div>销售订单审核。SG190725003，美利坚不合群有限公司</div>
            </div>

            <div class="task_flex">
              <div class="task_tip">发起人:张小强</div>
              <div class="task_tip">单据审批</div>
            </div>
          </div>
        </div>

        <div class="liubai_dt"></div>

        <div class="todo_title">待审批</div>
        <div class="todo_list">
          <div class="arrow_box kindred">
            <div class="task_date_inner">7/25 16:11</div>
            <div class="task_conner tip_red">待审批</div>
            <div class="task_dscrp">
              <div>明天（7月26日）请假一天。</div>
            </div>

            <div class="task_flex">
              <div class="task_tip">发起人:张小强</div>
              <div class="task_tip">公文审批</div>
            </div>
          </div>

          <div class="arrow_box kindred">
            <div class="task_date_inner">7/25 09:15</div>
            <div class="task_conner tip_red">待审批</div>
            <div class="task_dscrp">
              <div>明天（7月26日）请假一天。</div>
            </div>

            <div class="task_flex">
              <div class="task_tip">发起人:王小千</div>
              <div class="task_tip">公文审批</div>
            </div>
          </div>
        </div>

      </div>


    </div>


    <!-- 悬浮的新建任务按钮 -->
    <div class="todo_add">
      <svg class="icon" aria-hidden="true">
        <use xlink:href="#icon-shuliangjia1"></use>
      </svg>
    </div>

    <!-- 底部按钮 -->
    <div class="todolist-tab">
      <div class="todolist-tab-btn">
        <div class="todolist-tab-icon">
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-home"></use>
          </svg>
        </div>
        首页
      </div>
      <div class="todolist-tab-btn  todolist-tab-btn-on">
        <div class="todolist-tab-icon">
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-format-list-bulleted"></use>
          </svg>
        </div>
        <div class="todolist-tab-count">9</div>
        待办
      </div>


      <div class="todolist-tab-btn">
        <div class="todolist-tab-icon">
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-google-drive"></use>
          </svg>
        </div>
        功能
      </div>

      <div class="todolist-tab-btn">
        <div class="todolist-tab-icon">
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-email-outline"></use>
          </svg>
        </div>
        <div class="todolist-tab-count">5</div>
        消息
      </div>

      <div class="todolist-tab-btn">
        <div class="todolist-tab-icon">
          <svg class="icon" aria-hidden="true">
            <use xlink:href="#icon-account"></use>
          </svg>
        </div>
        我的
      </div>
    </div>

  </div>

</template>

<script>
  import TaskList from "./components/tasklist";
  export default {
    name: 'todolist',
    components: {
      TaskList
    },
    data() {
      return {
        datetype: 0, //0-完整日历 1-只显示本周的日历
        todotype:0,//0-任务 1-公文
      }
    }

  }

</script>

<style>
  body {
    margin: 0;
    padding: 0;
    background-color: #fff;
    font-family: "微软雅黑";
  }

  .todo_img_wap {
    display: flex;
    /* margin-top: 20px; */
  }

  .todo_img {
    width: 100%;
  }

  .todo_top_cnt {
    position: absolute;
    left: 63%;
    height: 2px;
    width: 2px;
    font-weight: bold;
    color: #fff;
    border-radius: 50%;
    padding: 3px;
    text-align: center;
    background-color: #fc4f4f
  }

  .todo_add {
    position: fixed;
    right: 20px;
    bottom: 60px;
    background-color: #ccc;
    height: 60px;
    width: 60px;
    border-radius: 100%;
    opacity: 0.5;
    line-height: 60px;
    text-align: center;
    font-size: 30px;
    z-index: 9990;
  }

  .todo_list {
    padding: 10px 10px 0 10px;
  }


  .todo_top {

    width: 100%;
    border-bottom: 1px solid #f5f5f5;
  }


  .liubai_dt {
    width: 100%;
    height: 10px;
    background-color: #f6f6f6;
    margin: 10px 0;
  }

  .todo_title {
    font-size: 15px;
    font-weight: bold;
    padding: 0 0 0 15px;
  }

  .todo_selection {
    display: flex;
    width: 90px;
    margin: 10px auto 5px auto;
    font-size: 15px;
    font-weight: bold;
  }

  .todo_mid_selection {
    display: flex;
    color: #888;
    margin:10px 0;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.102);
  }

  .todo_mid_selection div {
    margin: 0 0 0 30px;
    padding: 0 0 5px 0;
    font-size: 14px;
  }

  .todo_selection div {
    padding-bottom: 3px;
  }

  .todo_selection_check {
    color: #fd7526;
    border-bottom: 2px solid #fd7526;
  }

  .todo_mid_selection_check {
    color: #46a4da;
    border-bottom: 2px solid #46a4da;
  }

  /* 任务列表相关css */
  .task_dscrp {
    line-height: 22px;
    margin: 0 0 5px 0;
    font-size: 15px;
  }

  .task_date_inner {
    color: #888;
    font-size: 12px;
    margin-bottom: 5px;
  }

  .task_conner {
    position: absolute;
    right: 0px;
    top: 0px;
    color: #888;
    font-size: 12px;
    padding: 4px 10px;
    background-color: #ececec;
    line-height: 12px;
    width: 36px;
    text-align: center;
  }

  .task_conner_sec {
    position: absolute;
    right: 60px;
    top: 0px;
    color: #888;
    font-size: 12px;
    padding: 4px 10px;
    background-color: #ececec;
    line-height: 12px;
    width: 36px;
    text-align: center
  }

  .task_date_left {
    position: absolute;
    top: 35px;
    left: -50px;
    font-size: 10px;
    width: 45px;
    text-align: center;
  }

  .task_time_left {
    position: absolute;
    top: 50px;
    left: -50px;
    font-size: 12px;
    font-weight: bold;
    width: 45px;
    text-align: center;
  }

  .left_icon {
    position: absolute;
    top: 10px;
    left: -40px;
    /* background-color: #41838e; */
    /* font-size: 12px; */
    font-weight: bold;
    color: #fff;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    line-height: 25px;
    text-align: center;
    background: #46a4da;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #afdcf8;
    ;
  }

  .task_flex {
    display: flex;
    line-height: 20px;
  }

  .arrow_box {
    position: relative;
    padding: 5px 5px 5px 10px;
    /* border-radius: 5px; */
    border-left: 3px solid #46a4da;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.1);
    background: #fff;
    margin-bottom: 10px;
    /* border-bottom: 1px solid #f5f5f5;
    border-top: 1px solid #f5f5f5;
    border-right: 1px solid #f5f5f5; */
  }

  /* .arrow_box:after {
    right: 100%;
    top: 22px;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border-right-color: #46a4da;
    border-width: 8px;
    margin-top: -8px;
  } */

  .task_time {
    color: #888;
    margin-right: 10px;
    font-size: 14px;
  }

  .task_bottom div {
    margin-right: 10px
  }

  .task_tip {
    color: #888;
    font-size: 12px;
    margin-right: 10px;
    border-radius: 5px;
    padding: 5px;
    background-color: #f7f7f7;
    line-height: 12px;
  }

  .task_tip_inner {
    color: #888;
    font-size: 8px;
    /* margin-right: 10px; */
    border-radius: 5px;
    padding: 5px;
    background-color: #f7f7f7;
    line-height: 10px;
  }

  .tip_red {
    color: #fa5a5a;
    background-color: #ffc3c3
  }

  .tip_blue {
    color: #46a4da;
    background-color: #afdcf8
  }

  .kindgreen {
    border-left: 3px solid #8dc026;

  }

  .kindgreen::after {
    border-right-color: #8dc026;
  }

  .kindred {
    border-left: 3px solid #ff6f61;
  }

  .kindred::after {
    border-right-color: #ff6f61;
  }

  .kindorange {
    border-left: 3px solid #f2c866
  }

  .kindorange::after {
    border-right-color: #f2c866;
  }

  .icongreen {
    background: #8dc026;
    box-shadow: 0 0 0 3px #d1f3a1;
  }

  .iconred {
    background: #ff6f61;
    box-shadow: 0 0 0 3px #fdd1cd;
  }

  .iconorange {
    background: #f2c866;
    box-shadow: 0 0 0 3px #f7e7c2;
  }


  /* 底部栏 */
  .todolist-tab {
    color: #666;
    display: flex;
    position: fixed;
    bottom: 0;
    background-color: #ffffff;
    width: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 5px 0 2px 0;
    box-shadow: 0 -1px 3px #f1f1f1
  }

  .todolist-tab-btn {
    font-size: 13px;
    width: 25%;
    text-align: center
  }

  .todolist-tab-btn-on {
    color: #46a4da
  }

  .todolist-tab-icon {
    font-size: 23px;
  }

  .todolist-tab-count {
    position: absolute;
    margin-left: 14%;
    bottom: 30px;
    font-size: 12px;
    line-height: 12px;
    width: 12px;
    font-weight: bold;
    color: #fff;
    border-radius: 50%;
    padding: 3px;
    text-align: center;
    background-color: #fc4f4f
  }

</style>
