|
@@ -2,53 +2,54 @@
|
|
<view class="pageHome">
|
|
<view class="pageHome">
|
|
<yx-navbar :isBack="false" title="企业看板"></yx-navbar>
|
|
<yx-navbar :isBack="false" title="企业看板"></yx-navbar>
|
|
<view class="pageIndex">
|
|
<view class="pageIndex">
|
|
- <view class="tabs">
|
|
|
|
- <view class="tab" :class="tabIndex === 0 ? 'active' : ''" @click="onClickTab(0)">
|
|
|
|
- <text>可视化大屏</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="tab" :class="tabIndex === 1 ? 'active' : ''" @click="onClickTab(1)">
|
|
|
|
- <text>自助报表</text>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="tabs">
|
|
|
|
+ <view class="tab" :class="tabIndex === 0 ? 'active' : ''" @click="onClickTab(0)">
|
|
|
|
+ <text>可视化大屏</text>
|
|
</view>
|
|
</view>
|
|
- <view class="search">
|
|
|
|
- <u-search
|
|
|
|
- :placeholder="placeholder" v-model="params.title" :show-action="false"
|
|
|
|
- bg-color="#f6f6f6" @change="onSearch" shape="square"
|
|
|
|
- ></u-search>
|
|
|
|
- <img class="icon" src="../../static/img/cate.png" alt="" @click="showCategory=true">
|
|
|
|
|
|
+ <view class="tab" :class="tabIndex === 1 ? 'active' : ''" @click="onClickTab(1)">
|
|
|
|
+ <text>自助报表</text>
|
|
</view>
|
|
</view>
|
|
- <scroll-view class="content" scroll-y @scrolltolower="getData(false)">
|
|
|
|
- <view class="main" v-if="dataList.length > 0">
|
|
|
|
- <view class="infoList" v-for="(item, index) in dataList" :key="index" @click="goDetail(item)">
|
|
|
|
- <img v-if="item.backgroundUrl" class="infoImg" :src="item.backgroundUrl" alt="">
|
|
|
|
- <img v-else class="infoImg" src="../../static/img/no-bg-img.jpg" alt="">
|
|
|
|
- <view class="info-box">
|
|
|
|
- <view class="name">{{ item.title }}</view>
|
|
|
|
- <view class="describe">所属分类:{{ item.categoryName }}</view>
|
|
|
|
- <view class="info">
|
|
|
|
- <view class="num"><i class="el-icon-view"></i> 访问量:{{ item.count }}</view>
|
|
|
|
- <view class="dateTime">{{ item.date }}</view>
|
|
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <view class="search">
|
|
|
|
+ <u-search
|
|
|
|
+ :placeholder="placeholder" v-model="params.title" :show-action="false"
|
|
|
|
+ bg-color="#f6f6f6" @change="onSearch" shape="square"
|
|
|
|
+ ></u-search>
|
|
|
|
+ <img class="icon" src="../../static/img/cate.png" alt="" @click="showCategory=true">
|
|
|
|
+ </view>
|
|
|
|
+ <scroll-view class="content" scroll-y @scrolltolower="getData(false)">
|
|
|
|
+ <view class="main" v-if="dataList.length > 0">
|
|
|
|
+ <view class="infoList" v-for="(item, index) in dataList" :key="index" @click="goDetail(item)">
|
|
|
|
+ <img v-if="item.backgroundUrl" class="infoImg" :src="item.backgroundUrl" alt="">
|
|
|
|
+ <img v-else class="infoImg" src="../../static/img/no-bg-img.jpg" alt="">
|
|
|
|
+ <view class="info-box">
|
|
|
|
+ <view class="name">{{ item.title }}</view>
|
|
|
|
+ <view class="describe">所属分类:{{ item.categoryName }}</view>
|
|
|
|
+ <view class="info">
|
|
|
|
+ <view class="num"><i class="el-icon-view"></i> 访问量:{{ item.count }}</view>
|
|
|
|
+ <view class="dateTime">{{ item.date }}</view>
|
|
</view>
|
|
</view>
|
|
- <view class="tags">
|
|
|
|
- <view class="tag" v-if="item.reviewStatus === 0" style="background-color: #ff7f23">审核中</view>
|
|
|
|
- <template v-if="item.reviewStatus === 1">
|
|
|
|
- <view class="tag" v-if="item.status === 1" style="background-color: #ff7f23">已发布</view>
|
|
|
|
- <view class="tag" v-if="item.status === 0" style="color: #0a0a0a; background-color: #ededed">已禁用</view>
|
|
|
|
- </template>
|
|
|
|
- <view class="tag" v-if="item.reviewStatus === 2" style="color: #0a0a0a; background-color: #ededed">
|
|
|
|
- 已驳回
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <view class="tags">
|
|
|
|
+ <view class="tag" v-if="item.reviewStatus === 0" style="background-color: #ff7f23">审核中</view>
|
|
|
|
+ <template v-if="item.reviewStatus === 1">
|
|
|
|
+ <view class="tag" v-if="item.status === 1" style="background-color: #ff7f23">已发布</view>
|
|
|
|
+ <view class="tag" v-if="item.status === 0" style="color: #0a0a0a; background-color: #ededed">已禁用
|
|
</view>
|
|
</view>
|
|
- <view class="tag" v-if="item.publicStatus" style="background-color: #eb5a10">已公开</view>
|
|
|
|
|
|
+ </template>
|
|
|
|
+ <view class="tag" v-if="item.reviewStatus === 2" style="color: #0a0a0a; background-color: #ededed">
|
|
|
|
+ 已驳回
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="tag" v-if="item.publicStatus" style="background-color: #eb5a10">已公开</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <template v-if="!loading&&!dataList.length">
|
|
|
|
- <image v-if="params.title" src="../../static/img/no-search.png" style="width: 100%"
|
|
|
|
- mode="aspectFit"></image>
|
|
|
|
- <image v-else src="../../static/img/no-data.png" style="width: 100%" mode="aspectFit"></image>
|
|
|
|
- </template>
|
|
|
|
- </scroll-view>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <template v-if="!loading&&!dataList.length">
|
|
|
|
+ <image class="none" v-if="params.title" src="../../static/img/no-search.png" style="width: 100%"
|
|
|
|
+ mode="aspectFit"></image>
|
|
|
|
+ <image class="none" v-else src="../../static/img/no-data.png" style="width: 100%" mode="aspectFit"></image>
|
|
|
|
+ </template>
|
|
|
|
+ </scroll-view>
|
|
</view>
|
|
</view>
|
|
<u-picker :show="showCategory" :columns="categoryList" confirmColor="#eb5a10" @cancel="showCategory=false"
|
|
<u-picker :show="showCategory" :columns="categoryList" confirmColor="#eb5a10" @cancel="showCategory=false"
|
|
closeOnClickOverlay @close="showCategory=false" key-name="categoryValue" @change="onCategoryChange"
|
|
closeOnClickOverlay @close="showCategory=false" key-name="categoryValue" @change="onCategoryChange"
|
|
@@ -122,11 +123,7 @@ export default {
|
|
item.date = moment(item.createTime).format('YYYY-MM-DD')
|
|
item.date = moment(item.createTime).format('YYYY-MM-DD')
|
|
})
|
|
})
|
|
if (data.length) this.params.current++
|
|
if (data.length) this.params.current++
|
|
- if (reload) {
|
|
|
|
- this.dataList = data
|
|
|
|
- } else {
|
|
|
|
- this.dataList = this.dataList.concat(data)
|
|
|
|
- }
|
|
|
|
|
|
+ this.dataList = reload ? data : this.dataList.concat(data)
|
|
this.lastCreateTime = this.dataList[this.dataList.length - 1]?.createTime || ''
|
|
this.lastCreateTime = this.dataList[this.dataList.length - 1]?.createTime || ''
|
|
})
|
|
})
|
|
}).finally(() => this.loading = false)
|
|
}).finally(() => this.loading = false)
|
|
@@ -140,11 +137,7 @@ export default {
|
|
item.date = moment(item.createTime).format('YYYY-MM-DD')
|
|
item.date = moment(item.createTime).format('YYYY-MM-DD')
|
|
})
|
|
})
|
|
if (data.length) this.params.current++
|
|
if (data.length) this.params.current++
|
|
- if (reload) {
|
|
|
|
- this.dataList = data
|
|
|
|
- } else {
|
|
|
|
- this.dataList = this.dataList.concat(data)
|
|
|
|
- }
|
|
|
|
|
|
+ this.dataList = reload ? data : this.dataList.concat(data)
|
|
this.lastCreateTime = this.dataList[this.dataList.length - 1]?.createTime || ''
|
|
this.lastCreateTime = this.dataList[this.dataList.length - 1]?.createTime || ''
|
|
})
|
|
})
|
|
}).finally(() => this.loading = false)
|
|
}).finally(() => this.loading = false)
|