123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436 |
- <template>
- <rx-layout>
- <div slot="center" style>
- <rx-fit>
- <div slot="toolheader" border="false" foldbtn="false">
- <top-nav @callBack="freshData" title="综合统计" :time="timeData"></top-nav>
- </div>
- <div class="echart-style">
- <div style="width:58%;">
- <div>用户访问总量-{{barDataNum}}
- <span>(uv)</span>
- </div>
- <line-echart @setbarDataNum="setbarDataNum" ref="lineEchart"></line-echart>
- </div>
- <div style="width:40%;">
- <div style="width:90%;z-index: 10;">
- 各版块访问量分布
- <span>(pv)</span>
- <pieChange ref="pieChange" @typeChange="typeChange"></pieChange>
- </div>
- <rose-echart v-if="peitype!=2" :roseData="roseData"></rose-echart>
- <pie-echart v-else :pieData="pieData" :pieDataTitleLeft="pieDataTitleLeft" :pieDataTitleRight="pieDataTitleRight"></pie-echart>
- </div>
- </div>
- <div class="card-style">
- <little-card title="知识地图访问量(uv)" :num="dataNum.map" :picture="mapPicture"></little-card>
- <little-card title="知识专辑访问量(uv)" :num="dataNum.album" :picture="albumPicture"></little-card>
- <little-card title="知识仓库访问量(uv)" :num="dataNum.knowledge" :picture="warehousePicture"></little-card>
- <little-card title="搜索服务访问量(uv)" :num="dataNum.search" :picture="searchPicture"></little-card>
- </div>
- <div class="bar-style">
- <div>
- 员工访问总量统计
- </div>
- <div class="staff-style">
- <a-form ref="searchForm" layout="inline" class="staff-form">
- <a-form-item class="form-item-style" style="width:240px;" label="查询选项" name="staff">
- <!-- <a-input class="set-input" v-model="staffForm.staff" placeholder="请选择要查询的员工" /> -->
- <div @click="handleAuditShow(1)" @mouseover="mouseOver(1)" @mouseleave="mouseLeave">
- <div v-if="iconShowOne" style="position:absolute;z-index: 10;right:8px;cursor:pointer;" @click.stop="handleCloseClick(1)">
- <a-icon type="close-circle" theme="filled" style="color: rgba(0,0,0,.25)" />
- </div>
- <a-select
- v-model="staffName"
- :showArrow="false"
- :open="false"
- placeholder="请选择查询的员工"
- ></a-select>
- </div>
- </a-form-item>
- <a-form-item class="form-item-style" style="width:40%;" label="时间范围" name="staffTime">
- <a-range-picker
- v-model="staffTime"
- class="set-range-picker"
- separator="→"
- format="YYYY/MM/DD"
- valueFormat="YYYY-MM-DD"
- >
- </a-range-picker>
- </a-form-item>
- <div class="staff-button">
- <a-button style="margin-right: 8px;" @click="handleResetClick(1)">重置</a-button>
- <a-button type="primary" @click="handleSearchClick(1)">查询</a-button>
- </div>
- </a-form>
- </div>
- <bar-echart-one isOrg="1" :barXData="barXUserData" :barData="barUserDataNew" @downloadClick="downloadClick"></bar-echart-one>
- </div>
- <div class="bar-style">
- <div>
- 组织访问总量统计
- </div>
- <div class="staff-style">
- <a-form ref="searchForm" layout="inline" class="staff-form">
- <a-form-item class="form-item-style" style="width:240px;" label="查询选项" name="staff">
- <!-- <a-input class="set-input" v-model="staffForm.staff" placeholder="请选择要查询的员工" /> -->
- <div style="position:relative;" @click="handleAuditShow(2)" @mouseover="mouseOver(2)" @mouseleave="mouseLeave">
- <div v-if="iconShowTwo" style="position:absolute;z-index: 10;right:8px;cursor:pointer;" @click.stop="handleCloseClick(2)">
- <a-icon type="close-circle" theme="filled" style="color: rgba(0,0,0,.25)" />
- </div>
- <a-select
- v-model="orgName"
- :showArrow="false"
- :open="false"
- placeholder="请选择查询的组织"
- ></a-select>
- </div>
- </a-form-item>
- <a-form-item class="form-item-style" style="width:40%;" label="时间范围" name="staffTime">
- <a-range-picker
- v-model="orgTime"
- class="set-range-picker"
- separator="→"
- format="YYYY/MM/DD"
- valueFormat="YYYY-MM-DD"
- >
- </a-range-picker>
- </a-form-item>
- <div class="staff-button">
- <a-button style="margin-right: 8px;" @click="handleResetClick(2)">重置</a-button>
- <a-button type="primary" @click="handleSearchClick(2)">查询</a-button>
- </div>
- </a-form>
- </div>
- <bar-echart-one isOrg="2" :barXData="barXOrgData" :barData="barOrgDataNew" @downloadClick="downloadClick"></bar-echart-one>
- </div>
- <div class="table-style">
- <div>
- 组织访问量
-
- </div>
- <!--<rx-grid
- ref="table"
- style="background: #fff;min-height: 400px;"
- :columns="columns"
- :url="statistics.organizationVisits"
- :queryParam="queryParam"
- data-field="result.data"
- :heightAuto="true"
- :showPage="false"
- idField="pkId"
- >
- </rx-grid>-->
- <DataShow :type="type" interface="0"></DataShow>
- </div>
- </rx-fit>
- <a-modal
- v-model="showAuditFlag"
- class="chooseAuthor"
- width="800"
- :title="isOrgOrUser == 1 ? '员工选择' : '组织选择'"
- centered
- okText="保存"
- @ok="handleSaveOk"
- >
- <org-people
- ref="orgModalRef"
- :isOnlyOrg="isOrgOrUser == 1 ? true : false"
- :key="new Date().getTime()"
- ></org-people>
- </a-modal>
- </div>
- </rx-layout>
- </template>
- <script>
- import topNav from './components/topNav'
- import pieChange from './components/pieChange'
- import lineEchart from './components/LineEchart';
- import roseEchart from './components/RoseEchart';
- import barEchartOne from './components/BarEchartOne';
- import littleCard from './components/card';
- import mapPicture from '@/assets/img/map.png'
- import albumPicture from '@/assets/img/album.png'
- import warehousePicture from '@/assets/img/warehouse.png'
- import searchPicture from '@/assets/img/search.png'
- import statistics from '@/api/knowledge/statistics'
- import pieEchart from './components/PieEchart';
- import DataShow from './components/DataShow';
- import orgPeople from './components/orgPeople'
- import mixin from "./sMixin/statisticsMixin"
- const personMixin = new mixin('personVisit')
- export default {
- name: 'synthesize',
- components: {
- topNav,
- lineEchart,
- roseEchart,
- littleCard,
- barEchartOne,
- pieEchart,
- pieChange,
- DataShow,
- orgPeople
- },
- mixins:[ personMixin ],
- data() {
- return {
- peitype:0,
- barDataNum:0,
- dataNum:{
- map:0,
- album:0,
- knowledge:0,
- search:0
- },
- type:'month',
- name: 1,
- timeData:'',
- statistics,
- mapPicture,
- albumPicture,
- warehousePicture,
- searchPicture,
- roseData: [],
- queryParam: {
- type:'month'
- },
- columns: [
- {
- title: '公司名称',
- dataIndex: 'company',
- align: 'center',
- },
- {
- title: '总访问量',
- dataIndex: 'total',
- align: 'center',
- sorter: true,
- sortField: 'total'
- },
- {
- title: '知识仓库访问量',
- dataIndex: 'knowledge',
- align: 'center',
- sorter: true,
- sortField: 'knowledge'
- },
- {
- title: '知识专辑访问量',
- dataIndex: 'album',
- align: 'center',
- sorter: true,
- sortField: 'album'
- },
- {
- title: '知识地图访问量',
- dataIndex: 'map',
- align: 'center',
- sorter: true,
- sortField: 'map'
- },
- {
- title: '搜索服务访问量',
- dataIndex: 'search',
- align: 'center',
- sorter: true,
- sortField: 'search'
- },
- ]
- }
- },
- mounted() {
- document.getElementsByClassName('ant-form-item-control-wrapper')[0].style.width = '70%'
- document.getElementsByClassName('ant-form-item-control-wrapper')[2].style.width = '70%'
- this.gettotalUserVisits()
- this.getmoduleUserVisits();
- this.getmoduleUserUniqueVisits();
- this.timeData = statistics.getNowDate()
- this.$refs.pieChange.changeType(1)
- },
- methods: {
- typeChange(data){
- this.peitype=data
- },
- //刷新数据
- freshData(data){
- this.type = data
- this.gettotalUserVisits()
- this.getmoduleUserVisits();
- this.getmoduleUserUniqueVisits();
- this.handleSearchClick(1)
- this.handleSearchClick(2)
- this.queryParam.type=data
- this.$nextTick(()=>{
- this.$refs.table.loadData();
- })
- this.timeData = statistics.getNowDate()
- },
- //用户访问总量
- gettotalUserVisits(){
- this.$nextTick(()=>{
- this.$refs.lineEchart.gettotalUserVisits({module: 'total',type:this.type})
- })
- },
- setbarDataNum(data){
- this.barDataNum=data
- },
- //各板块访问量分布
- getmoduleUserVisits(){
- //this.$refs.pieChange.changeType(1)
- //this.peitype=0
- statistics.moduleUserVisits({type:this.type}).then(res => {
- this.roseData = [
- { value: res.data.knowledge, name: Math.floor(res.data.knowledgePercentage*100)+'% 知识仓库' },
- { value: res.data.map, name: Math.floor(res.data.mapPercentage*100)+'% 知识地图' },
- { value: res.data.album, name: Math.floor(res.data.albumPercentage*100)+'% 知识专辑' },
- { value: res.data.search, name: Math.floor(res.data.searchPercentage*100)+'% 搜索服务' }
- ]
- this.pieData=[
- { value: res.data.knowledge, name: '知识仓库' },
- { value: res.data.map, name: '知识地图' },
- { value: res.data.album, name: '知识专辑' },
- { value: res.data.search, name: '搜索服务' }
- ]
- this.pieDataTitleLeft=['知识仓库','知识地图','知识专辑','搜索服务']
- })
- },
- //各板块访问量分布(UV)
- getmoduleUserUniqueVisits(){
- statistics.moduleUserUniqueVisits({module: 'total',type:this.type}).then(res => {
- this.dataNum = res.data
- })
- }
- }
- }
- </script>
- <style lang="less" scoped>
- @gary: #f8f8f8;
- @white: #fff;
- .rx-fit {
- padding: 20px 40px!important;
- background: @gary;
- overflow-y: auto!important;
- display: block!important;
- .echart-style {
- width: 100%;
- height: 320px;
- display: flex;
- justify-content: space-between;
- margin: 10px 0 20px;
- >div {
- background-color: #fff;
- position: relative;
- display: flex;
- align-items: flex-end;
- >div:first-child {
- position: absolute;
- top: 8%;
- left: 4%;
- font-weight: bold;
- span {
- position: absolute;
- top: 25%;
- font-size: 12px;
- font-weight: 400;
- margin-left: 8px;
- }
- }
- }
- }
- .card-style {
- width: 100%;
- display: flex;
- justify-content: space-between;
- }
- .bar-style {
- height: 400px;
- background:#fff;
- position: relative;
- display: flex;
- align-items: flex-end;
- margin: 10px 0 20px;
- >div:first-child {
- position: absolute;
- top: 8%;
- left: 2.3%;
- font-weight: bold;
- }
- .staff-style {
- height: 60px;
- width: 75%;
- position: absolute;
- top: 4.7%;
- left: 15%;
- z-index: 100;
- display: flex;
- align-items: center;
- justify-content:flex-start;
- .staff-form {
- display: flex;
- flex-wrap: wrap;
- justify-content:flex-start;
- }
- .staff-button {
- display: flex;
- height: 40px;
- align-items:flex-start;
- justify-content: center;
- margin-top: 4px;
- }
- }
- }
- .table-style {
- display: inline-block;
- width: 100%;
- background-color: #fff;
- margin-top: 20px;
- padding: 20px 30px;
- >div:first-child {
- position: relative;
- font-weight: bold;
- margin-bottom: 20px;
- span {
- position: absolute;
- top: 25%;
- font-size: 12px;
- font-weight: 400;
- margin-left: 8px;
- }
- }
- }
- }
- </style>
- <style scoped>
- /deep/ .divdefault {
- position: inherit!important;
- overflow: inherit!important;
- }
- /deep/ .gridContent{
- border: none;
- }
- /deep/.ant-table-thead > tr > th {
- text-align: center;
- height: 54px;
- }
- /deep/ .ant-table-tbody > tr > td {
- height: 54px;
- }
- .chooseAuthor /deep/.ant-modal-body {
- padding: 0px;
- }
- </style>
|