|
@@ -1,12 +1,12 @@
|
|
<template>
|
|
<template>
|
|
<div id="notice">
|
|
<div id="notice">
|
|
<el-row>
|
|
<el-row>
|
|
- <el-col :span="24" class="notice">
|
|
|
|
|
|
+ <el-col :span="24" class="notice" v-if="haveData(notice)">
|
|
<el-col :span="24" class="topTit">
|
|
<el-col :span="24" class="topTit">
|
|
- <el-col :span="20">
|
|
|
|
|
|
+ <el-col :span="18">
|
|
<span :style="`border-color:${borderColor}`">{{ notice.title }}</span>
|
|
<span :style="`border-color:${borderColor}`">{{ notice.title }}</span>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="4">
|
|
|
|
|
|
+ <el-col :span="5" style="text-align:right">
|
|
<el-link :underline="false" :style="`color:${Color}`" @click="$router.push({ path: `/info/list/${notice.column.id}` })">
|
|
<el-link :underline="false" :style="`color:${Color}`" @click="$router.push({ path: `/info/list/${notice.column.id}` })">
|
|
MORE<i class="el-icon-video-play"></i>
|
|
MORE<i class="el-icon-video-play"></i>
|
|
</el-link>
|
|
</el-link>
|
|
@@ -19,7 +19,7 @@
|
|
v-for="(item, index) in notice.infoList"
|
|
v-for="(item, index) in notice.infoList"
|
|
:key="index"
|
|
:key="index"
|
|
:name="`${index}`"
|
|
:name="`${index}`"
|
|
- @click.native="$router.push({ path: `/detail?id=${item.id}` })"
|
|
|
|
|
|
+ @click.native="$router.push({ path: `/info/detail?id=${item.id}` })"
|
|
>
|
|
>
|
|
<el-col :span="4" class="time">
|
|
<el-col :span="4" class="time">
|
|
{{ item.publish_time | getDate }}
|
|
{{ item.publish_time | getDate }}
|
|
@@ -32,17 +32,24 @@
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="24" v-else>
|
|
|
|
+ <no-data></no-data>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import noData from '@publics/src/layout/noData.vue';
|
|
|
|
+import _ from 'lodash';
|
|
export default {
|
|
export default {
|
|
name: 'notice',
|
|
name: 'notice',
|
|
props: {
|
|
props: {
|
|
notice: null,
|
|
notice: null,
|
|
},
|
|
},
|
|
- components: {},
|
|
|
|
|
|
+ components: {
|
|
|
|
+ noData,
|
|
|
|
+ },
|
|
data: () => ({
|
|
data: () => ({
|
|
borderColor: '#850000',
|
|
borderColor: '#850000',
|
|
Color: '#850000',
|
|
Color: '#850000',
|
|
@@ -50,7 +57,23 @@ export default {
|
|
}),
|
|
}),
|
|
created() {},
|
|
created() {},
|
|
computed: {},
|
|
computed: {},
|
|
- methods: {},
|
|
|
|
|
|
+ methods: {
|
|
|
|
+ haveData(data) {
|
|
|
|
+ let res = false;
|
|
|
|
+ if (data !== null) {
|
|
|
|
+ if (_.isArray(data)) {
|
|
|
|
+ return data.length > 0;
|
|
|
|
+ } else {
|
|
|
|
+ let object = _.get(data, 'children', undefined);
|
|
|
|
+ if (object === undefined) {
|
|
|
|
+ return false;
|
|
|
|
+ } else {
|
|
|
|
+ return this.haveData(object);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ },
|
|
filters: {
|
|
filters: {
|
|
getDate(date) {
|
|
getDate(date) {
|
|
if (date) {
|
|
if (date) {
|