Blame view

frontend/manage/src/components/portal/HomeNewsList.vue 1.5 KB
8d73e917   陈威   初始化提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<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>