<template>
    <div id="makerActivityWord">
      <div id="wordTitle">
          <div>深圳技师学院</div>
          <div>创客专项资金项目申请表（创客活动）</div>
      </div>
      <div id="table">
        <div class="han">
          <div class="lie"><div class="label">活动名称</div><div class="value">{{data['title']}}</div></div>
          <div class="lie"><div class="label">预算经费</div><div class="value">{{ data['money'] }}</div></div>
        </div>
        <div class="han">
          <div class="lie"><div class="label">负责人</div><div class="value">{{ data['pro_leader'] }}</div></div>
          <div class="lie"><div class="label">所在部门</div><div class="value">{{ data['className'] }}</div></div>
          <div class="lie"><div class="label">联系电话</div><div class="value">{{data['phone']}}</div></div>
        </div>
        <div class="han">
          <div class="lie"><div class="label">活动时间</div><div class="value">{{ ActivityTime }}</div></div>
          <div class="lie"><div class="label">参与学生人数</div><div class="value">{{data['students']}}</div></div>
        </div>
        <div class="teacher">
          <div class="title">活动指导教师</div>
          <div class="teacherTable">
            <div class="teacherHan">
              <div class="teacherLie">姓名</div>
              <div class="teacherLie">工作单位/部门</div>
              <div class="teacherLie">活动分工</div>
            </div>
            <div class="teacherHan" v-for="(item,index) in JSON.parse(data['course_teacher'])" :key="index">
              <div class="teacherLie">{{ item['Name'] }}</div>
              <div class="teacherLie">{{ item['work'] }}</div>
              <div class="teacherLie">{{ item['takeCharge'] }}</div>
            </div>
          </div>
        </div>
        <div class="chapters">
          <div class="chaptersTitle">
            活动<br/>计划
          </div>
          <div class="chaptersValue">
            {{ JSON.parse(data['chapters'])[0].replace(/<[^>]+>/g,"") }}
          </div>
        </div>
        <div class="chapters">
          <div class="chaptersTitle">
            预期<br/>目标
          </div>
          <div class="chaptersValue">
            {{ JSON.parse(data['chapters'])[1].replace(/<[^>]+>/g,"") }}
          </div>
        </div>
        <div class="chapters">
          <div class="chaptersTitle">
            活动受<br/>众面
          </div>
          <div class="chaptersValue">
            <span>参与学生范围：</span><br/>
            {{ JSON.parse(data['chapters'])[2].replace(/<[^>]+>/g,"") }}
          </div>
        </div>
        <div class="chapters">
          <div class="chaptersTitle">
            经费<br/>支出<br/>计划
          </div>
          <div class="chaptersValue">
            {{ JSON.parse(data['chapters'])[3].replace(/<[^>]+>/g,"") }}
          </div>
        </div>
        <div class="chapters">
          <div class="chaptersTitle">
            所在<br/>部门<br/>意见
          </div>
          <div class="opinion">
            <div class="head">
              <div class="chapter">
                负责人签章：
              </div>
              <div class="date">
                年月日
              </div>
            </div>
          </div>
        </div>
      </div>
      <div>备注：如表格不够可顺延或另附页。</div>
      </div>
      
  </template>
  
  <script>
  import { GetTime } from './tool/Date';
  // import { ActivityWord } from '@/components/tool/getWord';
      export default {
        props:['data'],
        data() {
          return {

          }
        },
        methods:{

        },
        computed:{
          ActivityTime(){
            return GetTime(this.data['begin_at']);
          }
        },
        mounted() {
          console.log(this.data)
        },
      }
  </script>
  
  <style lang="less" scoped>
  #makerActivityWord{
    min-width: 710px;
    font-size: 16px;
    color: black;
    #wordTitle{
      width: 100%;
      height: 70px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      font-size: 25px;
      color: black;
      margin-bottom: 10px;
    }
    #table{
      border: solid 1px black;
      border-bottom: none;
      box-sizing: border-box;
      .han{
        width: 100%;
        height: 40px;
        box-sizing: border-box;
        border-bottom:solid 1px black ;
        box-sizing: border-box;
        display: flex;
        
        &:nth-last-child(1){
          border-bottom:none;
        }
        .lie{
          height: 100%;
          flex: 1;
          display: flex;
          div{
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 16px;
            color: black;
          }
          .label{
            flex: 1;
            box-sizing: border-box;
            border-right: solid 1px black;
          }
          .value{
            flex: 2;
            box-sizing: border-box;
          }
          &:not(:nth-last-of-type(1)){
            // box-sizing: border-box;
            border-right: solid 1px black;
            box-sizing: border-box;
          }
        }
        &:nth-child(2){
          .lie{
            height: 100%;
            .value{
              flex: 1;
              display: flex;
              box-sizing: border-box;
            }
            .label{
              flex: 1;
              box-sizing: border-box;
            }
          }
        }
    }
    .teacher{
      box-sizing: border-box;
      border-bottom: solid 1px black;
      display: flex;
      width: 100%;
      .title{
        width: 70px;
        min-height: 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        writing-mode: vertical-rl;
        border-right: solid 1px black;
        font-size: 16px;
        color: black;
        padding: 10px 0;
      }
      .teacherTable{
        display: flex;
        flex-direction: column;
        flex: 1;
        .teacherHan{
          display: flex;
          max-height: 40px;
          border-bottom: solid 1px black;
          // &:nth-last-child(1){
          //   border-bottom:none;
          // }
          .teacherLie{
            height: 40px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            font-size: 16px;
            color: black;

            &:nth-child(1){
              width: 200px;
              border-right: solid 1px black;
            }
            &:nth-child(2){
              width: 300px;
              border-right: solid 1px black;
            }
            &:nth-child(3){
              flex: 1;
            }
          }
        }
      }

    }
    .chapters{
      width: 100%;
      display: flex;
      min-height: 200px;
      border-bottom: solid 1px black;
      .chaptersTitle{
        min-width: 70px;
        font-size: 16px;
        color: black;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        // writing-mode: vertical-rl;
        border-right: solid 1px black;
      }
      .chaptersValue{
        padding: 5px;
        font-size: 16px;
        color: black;
      }
      .opinion{
        width: 100%;
        position: relative;
        .head{
          position: absolute;
          right: 0;
          bottom: 0;
          width: 280px;
          height: 70px;
          font-size: 16px;
          color: black;
          .chapter{
            width: 100%;
            margin-bottom: 10px;
          }
          .date{
            width: 100%;
            display: flex;
            justify-content: flex-end;
            letter-spacing: 2em;
          }
        }
      }
    }
    }
    
  }
  </style>