123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483 |
- <style lang='scss'>
- .only-there .ant-tabs-bar{
- background: white;
- padding: 0 24px;
- }
- .ant-card-head .ant-tabs-bar{
- padding: 0;
- }
- #updateInfo .ant-modal-content,#updateInfo .ant-modal-body {
-
- width: 500px;
- position: relative;
- padding-top:10px;
- .updateBOX{
- height: 600px;
- overflow: auto;
- }
- }
- .Updatecontent{
- padding: 0 20px 40px;
- position: relative;
- .Updateitem{
- margin-bottom: 30px;
- }
- }
- .Updatetitle{
- text-align: center;
- font-size: 22px;
- font-weight: 500;
- color: #1890ff;
- margin-bottom: 20px;
- /* margin-top: 20px; */
- }
- .Updatetime{
- font-size: 16px;
- font-weight: 700;
- color: #000;
- margin-bottom: 15px;
- }
- .updateicon{
- font-size: 26px;
- position: relative;
- top: 4px;;
- }
- .updateSpan{
- margin-left: 10px;
- }
- .textTitle{
- font-weight: 600;
- font-size: 1.17em;
-
- font-family:Helvetica,Arial,"\5b8b\4f53",sans-serif;
- }
- .okBtn{
- position: absolute;
- right: 3%;
- bottom: 3%;
- }
- .updatelist{
- .circular{
- display: inline-block;
- width: 3px;
- height: 3px;
- border-radius: 50%;
- color: #999;
- }
- }
- </style>
- <template>
- <div class="page-header-index-wide analysis">
- <!-- -->
- <div v-if="roleCode == 'operator'">
- <a-row :gutter="24">
- <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
- <chart-card :loading="loading" title="总销售额" total="¥126,560">
- <a-tooltip title="指标说明" slot="action">
- <a-icon type="info-circle-o" />
- </a-tooltip>
- <div>
- <trend flag="up" style="margin-right: 16px;">
- <span slot="term">周同比</span>
- 12%
- </trend>
- <trend flag="down">
- <span slot="term">日同比</span>
- 11%
- </trend>
- </div>
- <template slot="footer">
- 日均销售额
- <span>¥ 234.56</span>
- </template>
- </chart-card>
- </a-col>
- <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
- <chart-card :loading="loading" title="访问量" :total="8846 | NumberFormat">
- <a-tooltip title="指标说明" slot="action">
- <a-icon type="info-circle-o" />
- </a-tooltip>
- <div>
- <mini-area />
- </div>
- <template slot="footer">
- 日访问量
- <span>{{ '1234' | NumberFormat }}</span>
- </template>
- </chart-card>
- </a-col>
- <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
- <chart-card :loading="loading" title="支付笔数" :total="6560 | NumberFormat">
- <a-tooltip title="指标说明" slot="action">
- <a-icon type="info-circle-o" />
- </a-tooltip>
- <div>
- <mini-bar :height="40" />
- </div>
- <template slot="footer">
- 转化率
- <span>60%</span>
- </template>
- </chart-card>
- </a-col>
- <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
- <chart-card :loading="loading" title="运营活动效果" total="78%">
- <a-tooltip title="指标说明" slot="action">
- <a-icon type="info-circle-o" />
- </a-tooltip>
- <div>
- <mini-progress color="rgb(19, 194, 194)" :target="80" :percentage="78" :height="8" />
- </div>
- <template slot="footer">
- <trend flag="down" style="margin-right: 16px;">
- <span slot="term">同周比</span>
- 12%
- </trend>
- <trend flag="up">
- <span slot="term">日环比</span>
- 80%
- </trend>
- </template>
- </chart-card>
- </a-col>
- </a-row>
- <a-card :loading="loading" :bordered="false" :body-style="{ padding: '0' }">
- <div class="salesCard">
- <a-tabs default-active-key="1" size="large" :tab-bar-style="{ marginBottom: '24px', paddingLeft: '16px' }">
- <div class="extra-wrapper" slot="tabBarExtraContent">
- <div class="extra-item">
- <a>今日</a>
- <a>本周</a>
- <a>本月</a>
- <a>本年</a>
- </div>
- <a-range-picker :style="{ width: '256px' }" />
- </div>
- <a-tab-pane loading="true" tab="销售额" key="1">
- <a-row>
- <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
- <bar title="销售额排行" :dataSource="barData" />
- </a-col>
- <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
- <rank-list title="门店销售排行榜" :list="rankList" />
- </a-col>
- </a-row>
- </a-tab-pane>
- <a-tab-pane tab="访问量" key="2">
- <a-row>
- <a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
- <bar title="销售额趋势" :dataSource="barData" />
- </a-col>
- <a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
- <rank-list title="门店销售排行榜" :list="rankList" />
- </a-col>
- </a-row>
- </a-tab-pane>
- </a-tabs>
- </div>
- </a-card>
- <a-row>
- <a-col :span="24">
- <a-card :loading="loading" :bordered="false" title="最近一周访问次数统计" :style="{ marginTop: '24px' }">
- <a-row>
- <a-col :span="6">
- <head-info title="今日访问IP数" :content="loginfo.todayIp"></head-info>
- </a-col>
- <a-col :span="2">
- <a-spin class="circle-cust">
- <a-icon slot="indicator" type="environment" style="font-size: 24px" />
- </a-spin>
- </a-col>
- <a-col :span="6">
- <head-info title="今日访问次数" :content="loginfo.todayVisitCount"></head-info>
- </a-col>
- <a-col :span="2">
- <a-spin class="circle-cust">
- <a-icon slot="indicator" type="team" style="font-size: 24px" />
- </a-spin>
- </a-col>
- <a-col :span="6">
- <head-info title="访问总次数" :content="loginfo.totalVisitCount"></head-info>
- </a-col>
- <a-col :span="2">
- <a-spin class="circle-cust">
- <a-icon slot="indicator" type="rise" style="font-size: 24px" />
- </a-spin>
- </a-col>
- </a-row>
- <line-chart-multid :fields="visitFields" :dataSource="visitInfo"></line-chart-multid>
- </a-card>
- </a-col>
- </a-row>
- </div>
- <managerStatistics v-else-if="userInfoId || roleCode == 'CompanyManager'"/>
- <newHome v-else-if=" roleCode == 'touTiaoOperationManager'" />
- <statistics v-else-if="roleCode == 'kuaishouOperationManager'" />
- <statistics v-else-if="roleCode == 'sale'||roleCode=='saleDirector'" />
- <Workbench v-else-if="roleCode == 'clip'" />
- <Workbench v-else-if="roleCode == 'plane'" />
- <!-- <a-tabs default-active-key="1" v-else-if="roleCode == 'admin'" class="only-there">
- <a-tab-pane key="1" tab="快手">
- <statistics />
- </a-tab-pane>
- <a-tab-pane key="2" tab="头条">
- <newHome />
- </a-tab-pane>
- </a-tabs> -->
- <!-- 更新公告 -->
- <a-modal v-model="visible" title="" @ok="handleOk" :closable='false' :footer="null" id="updateInfo">
- <div class="updateBOX">
- <div class="Updatetitle">
- <a-icon type="notification" theme='twoTone'/> 更新通告
- </div>
- <div class="Updatecontent">
-
- <div class="Updateitem">
- <div class="Updatetime">
- <a-icon type="dashboard" theme='twoTone' class="updateicon" />
- <span class="updateSpan">{{updateTime[0]}}</span>
- </div>
- <div class="updateText">
- <div class="updateBox">
- <h3 class="textTitle">1.新功能上线</h3>
- <ul class="updatelist">
- <li><span class="circular"></span>组织架构;增加汇报上级、部门领导</li>
- <li><span class="circular"></span>自动投放账户配置回显问题;</li>
- <li><span class="circular"></span>批量创建-销售线索优化;</li>
- <li><span class="circular"></span>优化快手素材报表接口查询效率;</li>
- </ul>
- </div>
- <!-- <div class="updateBox">
- <h3 class="textTitle">2.功能优化:</h3>
- <ul>
- <li><span class="circular"></span>修复了相关BUG;</li>
- </ul>
- </div> -->
- </div>
- </div>
-
- </div>
- <a-button type='primary' class="okBtn" @click="handleOk">知道了</a-button>
- </div>
- </a-modal>
- </div>
- </template>
- <script>
- import ChartCard from '@/components/ChartCard'
- import ACol from 'ant-design-vue/es/grid/Col'
- import ATooltip from 'ant-design-vue/es/tooltip/Tooltip'
- import MiniArea from '@/components/chart/MiniArea'
- import MiniBar from '@/components/chart/MiniBar'
- import MiniProgress from '@/components/chart/MiniProgress'
- import RankList from '@/components/chart/RankList'
- import Bar from '@/components/chart/Bar'
- import LineChartMultid from '@/components/chart/LineChartMultid'
- import HeadInfo from '@/components/tools/HeadInfo.vue'
- import { getAction, postAction, downFile, downFilePost } from '@/api/manage';
- import { mapActions, mapGetters } from 'vuex'
- import Trend from '@/components/Trend'
- import managerStatistics from './managerStatistics'
- import {
- getLoginfo,
- getVisitInfo
- } from '@/api/api'
- import newHome from '@/views/modules/Statistics/newHome.vue'
- import Workbench from '@/views/dashboard/Workbench.vue'
- import Statistics from '@/views/modules/Statistics/Statistics.vue'
- const rankList = []
- for (let i = 0; i < 7; i++) {
- rankList.push({
- name: '白鹭岛 ' + (i + 1) + ' 号店',
- total: 1234.56 - i * 100
- })
- }
- const barData = []
- for (let i = 0; i < 12; i += 1) {
- barData.push({
- x: `${i + 1}月`,
- y: Math.floor(Math.random() * 1000) + 200
- })
- }
- export default {
- name: 'Analysis',
- components: {
- ATooltip,
- ACol,
- ChartCard,
- MiniArea,
- MiniBar,
- MiniProgress,
- RankList,
- Bar,
- Trend,
- LineChartMultid,
- HeadInfo,
- newHome,
- Workbench,
- Statistics,
- managerStatistics
- },
- data() {
- return {
- loading: true,
- center: null,
- rankList,
- barData,
- loginfo: {},
- visitFields: ['ip', 'visit'],
- visitInfo: [],
- indicator: <a-icon type="loading" style="font-size: 24px" spin />,
- roleCode: localStorage.getItem('roleCode'),
- visible:false,//更新通知消息提示框
- updateTime:['2021-03-03'],
- versionId:0,//存储版本号 判断通知什么时候显示
- userInfoId:false,
- }
- },
- created() {
- setTimeout(() => {
- this.loading = !this.loading
- }, 1000)
- this.initLogInfo()
- },
- methods: {
- ...mapGetters(['userInfo']),
- getUserId(){
- if (this.userInfo().id == '4aba62011120ac565c7f2b9f8f4aa96b' || this.userInfo().id == 'e9ca23d68d884d4ebb19d07889727dae' || this.userInfo().id == 'db2d59e9b4a3b18629c838fd7f5b58d8') {
- this.userInfoId = true;
- }else{
- this.userInfoId = false;
- }
- },
- // 跳转数据看板
- dataKanBan(){
- const a = document.createElement('a');
- document.body.appendChild(a);
- a.style.display = 'none';
- a.href = 'http://adsp.c-top.com.cn/boss-data-kanban';
- a.target = '_blank'
- a.click();
- document.body.removeChild(a);
- },
- initLogInfo() {
- getLoginfo(null).then(res => {
- if (res.success) {
- Object.keys(res.result).forEach(key => {
- res.result[key] = res.result[key] + ''
- })
- this.loginfo = res.result
- }
- })
- getVisitInfo().then(res => {
- if (res.success) {
- console.log('aaaaaa', res.result)
- this.visitInfo = res.result
- }
- })
- },
- handleOk(e) {
- // console.log(e);
- this.visible = false;
- postAction('/ctop/releaseViewRecord/view', {
- versionId:this.versionId
- }).then(res => {
- console.log(res)
- if(res.success){
- // this.visible=res.showPopup;
- }
-
- })
- },
- },
- mounted() {
- postAction('/ctop/releaseViewRecord/check', {}).then(res => {
- console.log(res)
- if(res.success){
- this.visible=res.showPopup;
- if(res.data){
- this.versionId=res.data.id;
- }
-
- }
-
- })
- this.getUserId();
- },
- }
- </script>
- <style lang="scss" scoped>
- .circle-cust {
- position: relative;
- top: 28px;
- left: -100%;
- }
- .extra-wrapper {
- line-height: 55px;
- padding-right: 24px;
- .extra-item {
- display: inline-block;
- margin-right: 24px;
- a {
- margin-left: 24px;
- }
- }
- }
- /* 首页访问量统计 */
- .head-info {
- position: relative;
- text-align: left;
- padding: 0 32px 0 0;
- min-width: 125px;
- &.center {
- text-align: center;
- padding: 0 32px;
- }
- span {
- color: rgba(0, 0, 0, 0.45);
- display: inline-block;
- font-size: 0.95rem;
- line-height: 42px;
- margin-bottom: 4px;
- }
- p {
- line-height: 42px;
- margin: 0;
- a {
- font-weight: 600;
- font-size: 1rem;
- }
- }
- }
- </style>
- <style lang="less">
- .analysis .ant-tabs-bar {
- margin: 0 0 12px 0;
- /* height: 55px; */
- border-bottom: 1px solid #e8e8e8;
- outline: none;
- -webkit-transition: padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
- transition: padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
- }
- </style>
|