Commit 0783badc by 李伟康

增加无数据样式

1 parent 6907279e
...@@ -2,103 +2,112 @@ ...@@ -2,103 +2,112 @@
<div class="data-view"> <div class="data-view">
<div class="title">旅程看板</div> <div class="title">旅程看板</div>
<div class="carousel-box"> <div class="carousel-box">
<el-carousel <template v-if="viewList.length">
ref="carousel" <el-carousel
:autoplay="false" ref="carousel"
:loop="false" :autoplay="false"
indicator-position="none" :loop="false"
height="100%" indicator-position="none"
arrow="never" height="100%"
class="carousel" arrow="never"
@change="viewIndex = $event" class="carousel"
> @change="viewIndex = $event"
<template v-for="(i, index) in viewList"> >
<template> <template v-for="(i, index) in viewList">
<el-carousel-item <template>
:key="index" <el-carousel-item
class="carousel-item" :key="index"
> class="carousel-item"
<template v-for="(c, cindex) in i"> >
<template> <template v-for="(c, cindex) in i">
<div <template>
:key="cindex" <div
class="group" :key="cindex"
> class="group"
<div class="title"> >
<div class="text flex"> <div class="title">
<div class="icon"> <div class="text flex">
<img :src="`https://img01.glsx.com.cn/weapp/resource/saas/scrm/data-view-sop-${cindex}.png`"> <div class="icon">
<img :src="`https://img01.glsx.com.cn/weapp/resource/saas/scrm/data-view-sop-${cindex}.png`">
</div>
{{ c.title }}
</div>
<div class="line-box">
<div
class="line"
:style="[{ width: c.width }]"
></div>
</div> </div>
{{ c.title }}
</div>
<div class="line-box">
<div
class="line"
:style="[{ width: c.width }]"
></div>
</div> </div>
</div> <el-scrollbar class="content">
<el-scrollbar class="content"> <template v-if="c.list.length">
<template v-if="c.list.length"> <template v-for="(item, ind) in c.list">
<template v-for="(item, ind) in c.list"> <template>
<template> <div
<div :key="ind"
:key="ind" class="item"
class="item" >
> <div class="top flex">
<div class="top flex"> <div class="icon">
<div class="icon"> <template v-if="item.wechatAvatarUrl">
<template v-if="item.wechatAvatarUrl"> <img :src="item.wechatAvatarUrl" />
<img :src="item.wechatAvatarUrl" /> </template>
</template> <template v-else>
<template v-else> <img src="@/assets/icon/default-avatar.png" />
<img src="@/assets/icon/default-avatar.png" /> </template>
</template> </div>
<div class="text">
<div class="name">{{ item.wechatNickname}}</div>
{{ item.customerPhone }}
</div>
</div> </div>
<div class="text"> <div class="bottom flex">
<div class="name">{{ item.wechatNickname}}</div> <div class="left text-hide">进入该阶段:第{{ item.day }}天</div>
{{ item.customerPhone }} <div class="right text-hide">跟进人:{{ item.sopFollowUpPersonName }}</div>
</div> </div>
</div> </div>
<div class="bottom flex"> </template>
<div class="left text-hide">进入该阶段:第{{ item.day }}天</div>
<div class="right text-hide">跟进人:{{ item.sopFollowUpPersonName }}</div>
</div>
</div>
</template> </template>
</template> </template>
</template> <template v-else>
<template v-else> <div class="nothing">
<div class="nothing"> <img src="@/assets/icon/nodata.png" />
<img src="@/assets/icon/nodata.png" /> </div>
</div> </template>
</template> </el-scrollbar>
</el-scrollbar> </div>
</div> </template>
</template> </template>
</template> </el-carousel-item>
</el-carousel-item> </template>
</template> </template>
</template> </el-carousel>
</el-carousel> <div
<div class="arrow left"
class="arrow left" @click="$refs.carousel.prev()"
@click="$refs.carousel.prev()" >
> <img :src="viewIndex == 0 ? leftIcon : leftActiveIcon" />
<img :src="viewIndex == 0 ? leftIcon : leftActiveIcon" /> </div>
</div> <div
<div class="arrow right"
class="arrow right" @click="$refs.carousel.next()"
@click="$refs.carousel.next()" >
> <img :src="viewIndex < viewList.length - 1 ? rightActiveIcon : rightIcon" />
<img :src="viewIndex < viewList.length - 1 ? rightActiveIcon : rightIcon" /> </div>
</div> </template>
<template v-else>
<div class="nothing">
<img :src="nothing">
暂无数据
</div>
</template>
</div> </div>
</div> </div>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import nothing from '@/assets/icon/data-view-nothing.png'
export default { export default {
name: '', name: '',
props: { props: {
...@@ -120,7 +129,8 @@ export default { ...@@ -120,7 +129,8 @@ export default {
leftActiveIcon: require('@/assets/icon/left-active.png'), leftActiveIcon: require('@/assets/icon/left-active.png'),
rightIcon: require('@/assets/icon/right.png'), rightIcon: require('@/assets/icon/right.png'),
rightActiveIcon: require('@/assets/icon/right-active.png'), rightActiveIcon: require('@/assets/icon/right-active.png'),
pageNumber: 1 pageNumber: 1,
nothing
} }
}, },
mounted () { mounted () {
...@@ -319,6 +329,20 @@ export default { ...@@ -319,6 +329,20 @@ export default {
transform: translateY(-50%) scale(1); transform: translateY(-50%) scale(1);
} }
} }
.nothing {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
font-size: 16px;
color: #999999;
img {
width: 268px;
height: 88px;
}
}
} }
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!