<template>
<!-- 沒有用啦 垃圾 -->
  <div>
    <div
      class="container"
      style="
        background-color: #b4b4b4;
        border-radius: 15px 15px 0px 0px;
        box-shadow: 3px 0px 5px rgb(112, 112, 112);
      "
    >
      <div class="register" style="color: black; padding-left: 30px">
        <b-row style="height: 50px">
          <b-col cols="8">
            <b-form-group
              label-cols-sm="3"
              label-align-sm="left"
              style="margin-right: -50px; font-size: 16px; font-weight: bold"
              label="計畫名稱:"
              label-for="input-lg"
            >
            <div style="width: 100%; margin-left:-80px;padding-right:10px;padding-top: 11px">
                {{ currentProject.name }}
              </div>
            </b-form-group>
          </b-col>
          <b-col cols="4">
            <b-form-group
              label-cols-sm="3"
              label-align-sm="left"
              style="padding-left: 0px; font-size: 16px; font-weight: bold; margin-left:-60px"
              label="計畫編號:"
              label-for="input-lg"
            >
              <div style="width: 100%; padding-top: 11px">
                {{ currentProject.number }}
              </div>
            </b-form-group>
          </b-col>
        </b-row>
      </div>
    </div>

    <div
      class="container"
      style="
        border-radius: 0px 0px 15px 15px;
        padding-top: 20px;
        margin-bottom: 20px;
        box-shadow: 3px 1px 5px rgb(112, 112, 112);
      "
    >
      <div class="register" style="color: black">
        <!-- 收文編號| 收文日期 -->
        <b-row>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border">
                收文編號：
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="4">
            <b-list-group>
              <b-list-group-item
                class="no-border"
                style="padding-left: 0; padding-right: 0"
              >
                {{ officialDoc.received_number }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border">
                收文日期：
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="4">
            <b-list-group>
              <b-list-group-item
                class="no-border"
                style="padding-left: 0; padding-right: 0"
              >
                {{ officialDoc.received_date }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
        </b-row>

        <!-- 來文字號 | 來文日期 -->
        <b-row>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border">
                來文字號：
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="4">
            <b-list-group>
              <b-list-group-item
                class="no-border"
                style="padding-left: 0; padding-right: 0"
              >
                {{ officialDoc.issue_text_number }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border">
                來文日期：
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="4">
            <b-list-group>
              <b-list-group-item
                class="no-border"
                style="padding-left: 0; padding-right: 0"
              >
                {{ officialDoc.issue_date }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
        </b-row>

        <!-- 來文單位 -->
        <b-row>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border">
                來文單位：
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <!-- 發文單位待確認 -->
          <b-col cols="4">
            <b-list-group>
              <b-list-group-item
                class="no-border"
                style="padding-left: 0; padding-right: 0"
              >
                {{ officialDoc.issuer }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
        </b-row>

        <!-- 主旨 -->
        <b-row>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border"> 主旨： </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="10">
            <b-list-group>
              <b-list-group-item class="no-border" style="padding-left: 0">
                {{ officialDoc.subject }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
        </b-row>

        <!-- 說明 -->
        <b-row>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border"> 說明： </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="10">
            <b-list-group>
              <b-list-group-item class="no-border" style="padding-left: 0">
                {{ officialDoc.instruction }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
        </b-row>

        <!-- 正本 -->
        <b-row>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border"> 正本： </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="10">
            <b-list-group>
              <b-list-group-item
                class="no-border"
                style="padding-left: 0; padding-right: 0"
              >
                {{ this.originalName }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
        </b-row>

        <!-- 副本 -->
        <b-row>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border"> 副本： </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="10">
            <b-list-group>
              <b-list-group-item
                class="no-border"
                style="padding-left: 0; padding-right: 0"
              >
                {{ this.copyName }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
        </b-row>

        <!-- 依據文號 -->
        <b-row>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border">
                依據文號：
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="10">
            <b-list-group>
              <b-list-group-item
                class="no-border"
                style="padding-left: 0; padding-right: 0"
              >
                {{ referenceNumber }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
        </b-row>

        <!-- 承辦人| 限辦日期-->
        <b-row>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border"> 承辦人: </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="4">
            <b-list-group>
              <b-list-group-item
                class="no-border"
                style="padding-left: 0; padding-right: 0"
              >
                {{ officialDoc.undertaker.name }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border">
                辦理期限：
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="4">
            <b-list-group>
              <b-list-group-item
                class="no-border"
                style="padding-left: 0; padding-right: 0"
              >
                {{ officialDoc.limited_date }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
        </b-row>

        <!-- 標別| 公文類型-->
        <b-row>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border"> 標別： </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="4">
            <b-list-group>
              <b-list-group-item
                class="no-border"
                style="padding-left: 0; padding-right: 0"
              >
                {{ officialDoc.standard }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border">
                公文類型：
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="4">
            <b-list-group>
              <b-list-group-item
                class="no-border"
                style="padding-left: 0; padding-right: 0"
              >
                {{ officialDoc.document_classification }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
        </b-row>

        <!-- 速別| 密等-->
        <b-row>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border"> 速別： </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="4">
            <b-list-group>
              <b-list-group-item
                class="no-border"
                style="padding-left: 0; padding-right: 0"
              >
                {{ officialDoc.urgency_level }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border"> 密等： </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="4">
            <b-list-group-item
              class="no-border"
              style="padding-left: 0; padding-right: 0"
            >
              {{ officialDoc.confidentiality_class }}
            </b-list-group-item>
          </b-col>
        </b-row>

        <!-- 解密條件| 保密期限-->
        <b-row>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border">
                解密條件：
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="4">
            <b-list-group>
              <b-list-group-item
                class="no-border"
                style="padding-left: 0; padding-right: 0"
              >
                {{ officialDoc.release_condition }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="2">
            <b-list-group>
              <b-list-group-item class="no-border">
                保密期限：
              </b-list-group-item>
            </b-list-group>
          </b-col>
          <b-col cols="4">
            <b-list-group>
              <b-list-group-item
                class="no-border"
                style="padding-left: 0; padding-right: 0"
              >
                {{ officialDoc.confidentiality_period }}
              </b-list-group-item>
            </b-list-group>
          </b-col>
        </b-row>
      </div>
    </div>
  </div>
</template>

<script>
import { mapGetters, mapState } from 'vuex'

export default {
  // 沒有用到的畫面 垃圾
  computed: {
    ...mapState({
      officialDoc: state => state.officialDocument.officialDoc,
      enums: state => state.enums,
      currentProject: state => state.project.current
    }),
    ...mapGetters('officialDocument', [
      'originalName',
      'copyName',
      'referenceNumber'
    ])
  }
}
</script>

<style lang="scss" scoped>
.main-content .container-fluid,
.main-content .container-sm,
.main-content .container-md,
.main-content .container-lg,
.main-content .container-xl {
  padding-left: 15px !important;
  padding-right: 39px !important;
}
.no-padding [class*="col-"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.no-border {
  border: 0;
  background-color: white;
  word-wrap: break-word;
}
.container {
  margin-top: 0px;
  margin-left: 40px;
  padding-left: 40px;
  padding-right: 40px;
  width: 90%;
  height: 95%;
}
</style>
