<template>
  <div class="bgF5">
    <div class="container">
      <div class="desDiv">
        <div class="title">
          {{ detailObj.noticeTitle }}
        </div>
        <div class="deptDiv">
          <span
            >{{ $t("page.views.news.details.time") }}：{{
              detailObj.createTime
            }}</span
          >
        </div>
        <div class="desCon" v-html="detailObj.noticeContent"></div>
      </div>
    </div>
  </div>
</template>
<script lang="ts">
import { Component, Vue, Watch, Prop } from "vue-property-decorator";
@Component
export default class extends Vue {
  @Prop(String) private noticeId!: string;
  private detailObj: IAny = {};
  @Watch("noticeId", { immediate: true })
  async load(noticeId: string) {
    if (!noticeId) return;
    const [err, { sysNotice }] = await this.$post(
      "/interface/notice/getNoticeListById",
      {
        noticeId
      }
    );
    if (err) return;
    this.detailObj = sysNotice;
  }
}
</script>
<style lang="scss" scoped>
.container {
  padding-bottom: 1rem;
}
.desDiv {
  background: #fff;
  padding: 2rem;
  border-radius: 0.3rem;
  box-sizing: border-box;
  box-shadow: 2px 2px 12px #ddd;
  margin: 1rem 0;
  .title {
    height: 3rem;
    line-height: 3rem;
    font-size: 1.8rem;
    font-weight: bolder;
    text-align: center;
  }
  .deptDiv {
    padding: 1rem 0 2rem 0;
    font-size: 1.2rem;
    color: #666;
    text-align: center;
    border-bottom: 0.1rem solid #efefef;
    span {
      margin: 0 1rem;
    }
  }
  .desCon {
    line-height: 2rem;
    font-size: 1.2rem;
    text-indent: 2em;
    padding: 1rem 0;
    word-break: break-all;
  }
}
</style>
