Commit 0783badc by 李伟康

增加无数据样式

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