|
|
@ -51,13 +51,30 @@ |
|
|
</el-card> |
|
|
</el-card> |
|
|
|
|
|
|
|
|
<el-card class="box-card home-content"> |
|
|
<el-card class="box-card home-content"> |
|
|
|
|
|
|
|
|
|
|
|
<div slot="header" class="clearfix"> |
|
|
|
|
|
<span>系统通知</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="notice-list" v-loading="loading"> |
|
|
|
|
|
<div class="notice-item" v-for="(item,index) in noticeList" :key="index"> |
|
|
|
|
|
<div class="notice-title"><el-badge is-dot class="notice-dot"></el-badge>{{item.title}}</div> |
|
|
|
|
|
<div class="notice-date">{{item.createTime}}</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<pagination |
|
|
|
|
|
v-show="noticeTotal>0" |
|
|
|
|
|
:total="noticeTotal" |
|
|
|
|
|
:page.sync="searchForm.pageNum" |
|
|
|
|
|
:limit.sync="searchForm.pageSize" |
|
|
|
|
|
@pagination="getNoticeList" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
</el-card> |
|
|
</el-card> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { home_count} from "@/api/business/home/home"; |
|
|
|
|
|
|
|
|
import { home_count,home_noticeList} from "@/api/business/home/home"; |
|
|
export default { |
|
|
export default { |
|
|
name: "Index", |
|
|
name: "Index", |
|
|
data() { |
|
|
data() { |
|
|
@ -69,10 +86,18 @@ export default { |
|
|
studyFinishCount:'', |
|
|
studyFinishCount:'', |
|
|
studyWeekCount:'', |
|
|
studyWeekCount:'', |
|
|
}, |
|
|
}, |
|
|
|
|
|
loading:false, |
|
|
|
|
|
searchForm: { |
|
|
|
|
|
pageNum: 1, |
|
|
|
|
|
pageSize: 10, |
|
|
|
|
|
}, |
|
|
|
|
|
noticeList:[], |
|
|
|
|
|
noticeTotal:0 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created(){ |
|
|
created(){ |
|
|
this.getCount() |
|
|
this.getCount() |
|
|
|
|
|
this.getNoticeList() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
getCount(){ |
|
|
getCount(){ |
|
|
@ -90,6 +115,17 @@ export default { |
|
|
.finally(() => { |
|
|
.finally(() => { |
|
|
this.$modal.closeLoading() |
|
|
this.$modal.closeLoading() |
|
|
}) |
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
getNoticeList(){ |
|
|
|
|
|
this.loading = true; |
|
|
|
|
|
this.searchForm.startDate = this.daterange && this.daterange.length > 0 ? this.daterange[0] : '' |
|
|
|
|
|
this.searchForm.endDate = this.daterange && this.daterange.length > 1 ? this.daterange[1] : '' |
|
|
|
|
|
home_noticeList(this.searchForm).then(response => { |
|
|
|
|
|
this.noticeList = response.rows; |
|
|
|
|
|
this.noticeTotal = response.total; |
|
|
|
|
|
}).finally(()=>{ |
|
|
|
|
|
this.loading = false; |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -131,6 +167,28 @@ export default { |
|
|
} |
|
|
} |
|
|
.home-content{ |
|
|
.home-content{ |
|
|
min-height: 400px; |
|
|
min-height: 400px; |
|
|
|
|
|
.notice-list{ |
|
|
|
|
|
.notice-item{ |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-direction: row; |
|
|
|
|
|
justify-content: space-between; |
|
|
|
|
|
border-bottom: 1px solid #eee; |
|
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
|
padding-bottom: 5px; |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
.notice-title{ |
|
|
|
|
|
flex-shrink: 0; |
|
|
|
|
|
.notice-dot{ |
|
|
|
|
|
margin-right: 2px; |
|
|
|
|
|
margin-top: 5px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.notice-date{ |
|
|
|
|
|
flex-grow: 1; |
|
|
|
|
|
text-align: right; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
|