123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- <template>
- <view class="container clearfix">
- <tui-skeleton
- v-if="!skeletonShow"
- backgroundColor="#fafafa"
- borderRadius="10rpx"
- :isLoading="true"
- :loadingType="5"
- />
- <template v-else>
- <view class="charts-content">
- <!-- 机构活跃统计 -->
- <view class="charts-box charts-box0" id="charts-box0">
- <echart-active
- ref="echart-active"
- :portraitMap="portraitMap"
- v-if="skeletonShow"
- />
- </view>
- <!-- 机构填写咨询记录统计 -->
- <view class="charts-box charts-box1" id="charts-box1">
- <echart-consult
- ref="echart-consult"
- :remark="remark"
- v-if="skeletonShow"
- />
- </view>
- </view>
- </template>
- </view>
- </template>
- <script>
- import { mapState, mapMutations } from 'vuex'
- import { debounce } from '@/common/config/common.js'
- import echartActive from './components/echart-active'
- import echartConsult from './components/echart-consult'
- import chartMixin from './components/mixins/chart.mixin.js'
- const observers = {}
- export default {
- mixins: [chartMixin],
- components: {
- echartActive,
- echartConsult,
- },
- data() {
- return {
- skeletonShow: false,
- remark: [],
- portraitMap: [],
- }
- },
- onLoad(option) {
- this.getLivelyClub()
- },
- onReady() {
-
- },
- methods: {
- async getLivelyClub() {
- try{
- const userInfo = await this.$api.getStorage()
- const { data: data } = await this.SellerService.getLivelyClub({ spId: userInfo.serviceProviderId })
- this.portraitMap = data.portraitMap
- this.remark = data.remark
- setTimeout(() => {
- this.skeletonShow = true
- }, 1000)
- }catch(error){
- //TODO handle the exception
- console.log('error',error)
- }
- },
- },
- onShow() {}
- }
- </script>
- <style lang="scss">
- page {
- background-color: #f5f5f5 !important;
- }
- .container {
- width: 100%;
- height: auto;
- box-sizing: border-box;
- padding: 24rpx;
- }
- .charts-navbar {
- width: 100%;
- height: 90rpx;
- background-color: #ffffff;
- box-sizing: border-box;
- padding: 20rpx 0;
- display: flex;
- position: fixed;
- top: 0;
- left: 0;
- z-index: 9999999;
- .nav-item {
- display: flex;
- flex: 1;
- justify-content: center;
- align-items: center;
- height: 50rpx;
- font-size: $font-size-28;
- color: $text-color;
- position: relative;
- float: left;
- position: relative;
- .line {
- width: 60rpx;
- height: 2px;
- border-radius: 1px;
- background: #ffffff;
- position: absolute;
- bottom: 0;
- left: 50%;
- margin-left: -30rpx;
- }
- &.current {
- color: $color-system;
- .line {
- background: $color-system;
- }
- }
- }
- }
- .charts-content {
- width: 100%;
- height: auto;
- }
- .charts-box {
- width: 100%;
- min-height: 350rpx;
- box-sizing: border-box;
- padding: 34rpx 24rpx;
- background-color: #fff;
- margin-bottom: 32rpx;
- border-radius: 16rpx;
- float: left;
- .echart-content {
- width: 100%;
- .echart-title {
- width: 100%;
- height: 96rpx;
- float: left;
- box-sizing: border-box;
- .e-name {
- float: left;
- line-height: 56rpx;
- font-size: 30rpx;
- color: #333;
- }
- .e-more {
- float: right;
- line-height: 56rpx;
- font-size: 28rpx;
- color: #999999;
- }
- }
- .echart-main {
- width: 100%;
- min-height: 200rpx;
- box-sizing: border-box;
- padding: 32rpx 40rpx;
- position: relative;
- float: left;
- background-color: #f7f7f7;
- .echart-text {
- width: 100%;
- line-height: 40rpx;
- margin-bottom: 20rpx;
- font-size: 28rpx;
- color: #333;
- float: left;
- .label {
- color: #999;
- text-align-last: justify;
- }
- }
- .echart-next {
- width: 100rpx;
- height: 100%;
- position: absolute;
- right: 10rpx;
- top: 50%;
- font-size: 28rpx;
- color: #1890f9;
- }
- }
- .echart-mains {
- width: 100%;
- min-height: 450rpx;
- float: left;
- &.demand{
- min-height: 200rpx;
- }
- .echart-mains-none {
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- .none-image {
- width: 220rpx;
- height: 220rpx;
- margin-bottom: 20rpx;
- }
- .none-text {
- font-size: $font-size-28;
- color: #999999;
- line-height: 44rpx;
- }
- }
- }
- }
- }
- </style>
|