Commit f5eafa1d by 张立顺 Committed by chenwq

fix_修复数据看板员工重置不刷新问题

1 parent 82561fc0
...@@ -3,21 +3,34 @@ ...@@ -3,21 +3,34 @@
<div class="data-board-box"> <div class="data-board-box">
<p class="edit-title">数据看板</p> <p class="edit-title">数据看板</p>
<div class="p-20"> <div class="p-20">
<GLCombiForm ref="dataRef" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch"></GLCombiForm> <GLCombiForm ref="dataRef"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"></GLCombiForm>
<div class="data-view"> <div class="data-view">
<template v-for="(item, index) in dataList"> <template v-for="(item, index) in dataList">
<div :key="index" class="item"> <div :key="index"
class="item">
<div class="name"> <div class="name">
{{ item.name }} {{ item.name }}
<el-popover class="tips" placement="top" width="260" trigger="hover" :content="item.tips"> <el-popover class="tips"
<img slot="reference" class="tips-icon" src="@/components/glsx-combi-form/images/icon-tip.png" /> placement="top"
width="260"
trigger="hover"
:content="item.tips">
<img slot="reference"
class="tips-icon"
src="@/components/glsx-combi-form/images/icon-tip.png" />
</el-popover> </el-popover>
</div> </div>
<div class="value">{{ dataBoard[item.key] || 0 }}</div> <div class="value">{{ dataBoard[item.key] || 0 }}</div>
<template v-if="item.half"> <template v-if="item.half">
<div class="half"> <div class="half">
日环比: 日环比:
<div :class="['icon', { up: dataBoard[item.half] > 0 }, { down: dataBoard[item.half] < 0 }]"></div> <div
:class="['icon', { up: dataBoard[item.half] > 0 }, { down: dataBoard[item.half] < 0 }]">
</div>
<span class="num">{{ Math.abs(dataBoard[item.half]).toFixed(2) || 0 }}%</span> <span class="num">{{ Math.abs(dataBoard[item.half]).toFixed(2) || 0 }}%</span>
</div> </div>
</template> </template>
...@@ -37,14 +50,33 @@ ...@@ -37,14 +50,33 @@
@handleRest="handleReset"></GLCombiForm> @handleRest="handleReset"></GLCombiForm>
<div class="flex m-b-10 w-100-percent"> <div class="flex m-b-10 w-100-percent">
<span class="table-title"></span> <span class="table-title"></span>
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport('rank')">导出</el-button> <el-button :size="size"
class="default-blue-btn"
type="default"
@click="handleExport('rank')">导出</el-button>
</div> </div>
<GLTable ref="dataTableRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" :hasNum="false"> <GLTable ref="dataTableRef"
<div slot="shareName" class="flex-align" slot-scope="scope"> :getListApi="getListApi"
:noDataImg="url"
:searchForm="tableSearchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
:hasNum="false">
<div slot="shareName"
class="flex-align"
slot-scope="scope">
<template v-if="scope.scope.shareAvatar"> <template v-if="scope.scope.shareAvatar">
<el-popover placement="top" width="160" trigger="hover" popper-class="table-popover-block"> <el-popover placement="top"
<img class="table-popover-img" :src="scope.scope.shareAvatar" /> width="160"
<img class="img-36 pointer" slot="reference" :src="scope.scope.shareAvatar" /> trigger="hover"
popper-class="table-popover-block">
<img class="table-popover-img"
:src="scope.scope.shareAvatar" />
<img class="img-36 pointer"
slot="reference"
:src="scope.scope.shareAvatar" />
</el-popover> </el-popover>
</template> </template>
<span class="m-l-10">{{ scope.scope.shareName }}</span> <span class="m-l-10">{{ scope.scope.shareName }}</span>
...@@ -58,20 +90,32 @@ ...@@ -58,20 +90,32 @@
<div class="p-20"> <div class="p-20">
<div class="flex m-b-10 w-100-percent"> <div class="flex m-b-10 w-100-percent">
<span class="table-title">数据列表</span> <span class="table-title">数据列表</span>
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport('dailyOrders')">导出</el-button> <el-button :size="size"
class="default-blue-btn"
type="default"
@click="handleExport('dailyOrders')">导出</el-button>
</div> </div>
<el-table v-if="DailyOrderQuantityList.length" :data="DailyOrderQuantityListFormat" style="width: 100%"> <el-table v-if="DailyOrderQuantityList.length"
<el-table-column :formatter="formatterHeader" label=""></el-table-column> :data="DailyOrderQuantityListFormat"
style="width: 100%">
<el-table-column :formatter="formatterHeader"
label=""></el-table-column>
<!-- width="140px" --> <!-- width="140px" -->
<el-table-column v-for="(item, index) in DailyOrderQuantityList" :key="index" :prop="item" :label="item.day"> <el-table-column v-for="(item, index) in DailyOrderQuantityList"
:key="index"
:prop="item"
:label="item.day">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.$index ? item.currentOrderQuantity : item.specificDate }}</span> <span>{{ scope.$index ? item.currentOrderQuantity : item.specificDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :formatter="formatterEnd" fixed="right" label="总计"></el-table-column> <el-table-column :formatter="formatterEnd"
fixed="right"
label="总计"></el-table-column>
</el-table> </el-table>
<div v-else> <div v-else>
<img src="url" alt="" /> <img src="url"
alt="" />
</div> </div>
</div> </div>
</div> </div>
...@@ -97,17 +141,32 @@ ...@@ -97,17 +141,32 @@
单 单
</span> </span>
</span> </span>
<el-button :size="size" class="default-blue-btn" type="default" @click="handleExport('liveData')">导出</el-button> <el-button :size="size"
class="default-blue-btn"
type="default"
@click="handleExport('liveData')">导出</el-button>
</div> </div>
<!-- :searchForm="tableSearchForm" --> <!-- :searchForm="tableSearchForm" -->
<GLTable ref="dataTableRefDetailPage" :getListApi="getLiveDetailPage" :noDataImg="url" :tableParams="liveTableParams" :searchForm="LiveTableSearchForm" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="dataTableRefDetailPage"
<div slot="weChatName" class="flex-align" slot-scope="scope"> :getListApi="getLiveDetailPage"
<img v-if="scope.scope.avatar" class="img-36 pointer img-circle" :src="scope.scope.avatar" /> :noDataImg="url"
:tableParams="liveTableParams"
:searchForm="LiveTableSearchForm"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn">
<div slot="weChatName"
class="flex-align"
slot-scope="scope">
<img v-if="scope.scope.avatar"
class="img-36 pointer img-circle"
:src="scope.scope.avatar" />
<span class="m-l-10">{{ scope.scope.nickname }}</span> <span class="m-l-10">{{ scope.scope.nickname }}</span>
<span v-if="!scope.scope.avatar && !scope.scope.nickname">-</span> <span v-if="!scope.scope.avatar && !scope.scope.nickname">-</span>
</div> </div>
<div slot="orderStatus" slot-scope="scope"> <div slot="orderStatus"
<span :class="['table-circle', 'm-r-8', scope.scope.orderStatus == '已下单' ? 'back-green' : 'back-grey']"></span> slot-scope="scope">
<span
:class="['table-circle', 'm-r-8', scope.scope.orderStatus == '已下单' ? 'back-green' : 'back-grey']"></span>
<span>{{ scope.scope.orderStatus ? scope.scope.orderStatus : '-' }}</span> <span>{{ scope.scope.orderStatus ? scope.scope.orderStatus : '-' }}</span>
</div> </div>
</GLTable> </GLTable>
...@@ -128,7 +187,7 @@ const dataList = [ ...@@ -128,7 +187,7 @@ const dataList = [
{ name: '累计浏览量', key: 'totalBrowseCount', tips: '页面被浏览的总次数(一人多次访问计为多次)' }, { name: '累计浏览量', key: 'totalBrowseCount', tips: '页面被浏览的总次数(一人多次访问计为多次)' },
{ name: '累计访客数', key: 'totalFansCount', tips: '访问页面的总人数(一人多次访问计为一次)' }, { name: '累计访客数', key: 'totalFansCount', tips: '访问页面的总人数(一人多次访问计为一次)' },
{ name: '累计订单数', key: 'totalOrderCount', tips: '累计订单总数(只记录已付款的订单)' } { name: '累计订单数', key: 'totalOrderCount', tips: '累计订单总数(只记录已付款的订单)' }
], ],
optionList = [ optionList = [
{ confId: '1', confName: '转发次数' }, { confId: '1', confName: '转发次数' },
{ confId: '2', confName: '访客总数' }, { confId: '2', confName: '访客总数' },
...@@ -316,10 +375,12 @@ export default { ...@@ -316,10 +375,12 @@ export default {
...result ...result
} }
}) })
.catch(err => {}) .catch(err => { })
}, },
handleReset() { handleReset() {
this.searchRankForm = this.$options.data.call(this).searchRankForm this.searchRankForm = this.$options.data.call(this).searchRankForm
console.log('handleReset')
this.handleSearchRank()
// this.$refs.rankRef.refreshTable() // this.$refs.rankRef.refreshTable()
// this.handleSearch() // this.handleSearch()
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!