<template>
  <div>
        <div  style="height: 3%">
          <div style="height:1000px;background: rgb(255, 255, 255);box-shadow:#409eff 0px 0px 4px 0px; border-radius: 6px;padding:5px;">
            <div style="padding:5px;width:100%;padding-bottom:20px;float:left;" v-for="(it,index) in list" :key="index" @click="openParticulars(it.id)">
              <span class="icon-dialog" style="float:left;font-size: 18px; color: #409eff;"></span>
              <span style="float:left;padding-left:5px;font-size:14px;font-family:Microsoft YaHei;font-weight:600;color:rgba(85,85,85,1);">{{it.title}}</span>
              <span style="float:left;padding-left:5px;font-size:14px;font-family:Microsoft YaHei;font-weight:400;color:rgba(178,179,184,1);">{{it.createTime}} {{it.drafter}}</span>
            </div>
          </div>
        </div>
    <homeNewsParticulars ref="homeNewsParticulars"  />
  </div>
</template>
<script>
import req from "@/request.js";
import HomeNewsParticulars from "./HomeNewsParticulars.vue";
export default {
  props: {
    classifyId: {
      default: "all"
    }
  },
  components: { HomeNewsParticulars},
  data() {
    return {
      list: []
    };
  },
  created() {
    this.init();
  },

  methods: {
    openParticulars(id) {
      this.$refs.homeNewsParticulars.openDialog(id);
    },
    init() {
      req
        .get(window.context.portal + "/portalNewsNotice/v1/getNews?classifyId="+this.classifyId)
        .then(response => {
          this.list = response.data;
        });
    }
  }
};
</script>
