|
@@ -0,0 +1,247 @@
|
|
|
|
+<template>
|
|
|
|
+ <div>
|
|
|
|
+ <a-form ref="searchForm" layout="inline" style="display:flex;flex-wrap: wrap;">
|
|
|
|
+ <a-form-item
|
|
|
|
+ class="form-item-style"
|
|
|
|
+ label="组织名称"
|
|
|
|
+ name="title">
|
|
|
|
+ <a-input class="set-input" v-model="searchValue" placeholder="请输入"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ <div style="display:flex;justify-content:center;margin-top: 3px;margin-left: 10px;">
|
|
|
|
+ <a-button @click="handleResetClick" style="margin-right:8px">重置</a-button>
|
|
|
|
+ <a-button type="primary" @click="handleSearchClick">查询</a-button>
|
|
|
|
+ </div>
|
|
|
|
+ </a-form>
|
|
|
|
+ <rx-grid
|
|
|
|
+ style="width:50%;height: 20vw;float: left;"
|
|
|
|
+ class="rx-tree-title"
|
|
|
|
+ ref="table"
|
|
|
|
+ :multiSelect="true"
|
|
|
|
+ :showPage="false"
|
|
|
|
+ :columns="columnsNew"
|
|
|
|
+ :defaultPageSize="10"
|
|
|
|
+ :dataSource="tableData"
|
|
|
|
+ @rowExpand="rowExpand"
|
|
|
|
+ :expandIconColumnIndex="0"
|
|
|
|
+ :idField="'groupId'"
|
|
|
|
+ >
|
|
|
|
+ <div slot="name" class="rx-table-row-icon" slot-scope="{text,record}">
|
|
|
|
+
|
|
|
|
+ <div v-if="checkId==record.pkId" style="color:#1890ff;" class="telist rx-tree-title" :title="text">{{text}}-{{ record.pkId }}</div>
|
|
|
|
+ <div v-else @click="checklist(record)" class="telist rx-tree-title" :title="text">{{text}}-{{ record.pkId }}</div>
|
|
|
|
+ </div>
|
|
|
|
+ </rx-grid>
|
|
|
|
+ <div class="rightDetail">
|
|
|
|
+ <div class="rightDetailtop">访问量明细</div>
|
|
|
|
+ <div class="rightDetailBottom" v-if="interface==0">
|
|
|
|
+ 组织路径:{{showData.organization}} </br>
|
|
|
|
+ 总访问量: {{showData.total}} </br>
|
|
|
|
+ 知识仓库访问量:{{showData.knowledge}} </br>
|
|
|
|
+ 知识专辑访问量:{{showData.album}} </br>
|
|
|
|
+ 知识地图访问量:{{showData.map}} </br>
|
|
|
|
+ 搜索服务访问量:{{showData.search}}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="rightDetailBottom" v-if="interface==1">
|
|
|
|
+ 组织路径:{{showData.organization}} </br>
|
|
|
|
+ 知识总量: {{showData.total}} </br>
|
|
|
|
+ 文档知识数量:{{showData.archive}} </br>
|
|
|
|
+ 维基知识数量:{{showData.wiki}}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="rightDetailBottom" v-if="interface==2">
|
|
|
|
+ 组织路径:{{showData.organization}} </br>
|
|
|
|
+ 专辑创建总量: {{showData.album}} </br>
|
|
|
|
+ 专辑访问量pv:{{showData.pv}}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="rightDetailBottom" v-if="interface==3">
|
|
|
|
+ 组织路径:{{showData.organization}} </br>
|
|
|
|
+ 地图创建总量: {{showData.map}} </br>
|
|
|
|
+ 地图访问量pv:{{showData.pv}}
|
|
|
|
+ </div>
|
|
|
|
+ <div class="rightDetailBottom" v-if="interface==4">
|
|
|
|
+ 组织路径:{{showData.organization}} </br>
|
|
|
|
+ <p v-for="(item,index) in showData.item">{{item.name}}: {{item.value}} </p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import OsGroupApi from '@/api/user/org/osGroup'
|
|
|
|
+import statistics from '@/api/knowledge/statistics'
|
|
|
|
+export default {
|
|
|
|
+ name: 'topNav',
|
|
|
|
+ props: {
|
|
|
|
+ type: {
|
|
|
|
+ type: String
|
|
|
|
+ },
|
|
|
|
+ interface: {
|
|
|
|
+ type: String
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ interface:this.interface,
|
|
|
|
+ checkId:null,
|
|
|
|
+ searchValue:'',
|
|
|
|
+ showData:{},
|
|
|
|
+ tableData:[],
|
|
|
|
+ columnsNew: [
|
|
|
|
+ {
|
|
|
|
+ title: '组名',
|
|
|
|
+ width:250,
|
|
|
|
+ dataIndex: 'name',
|
|
|
|
+ ellipsis: true,
|
|
|
|
+ scopedSlots: { customRender: 'name' }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ],
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ this.getTreeData()
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ //点击
|
|
|
|
+ checklist(data){
|
|
|
|
+ this.checkId=data.pkId
|
|
|
|
+ this.getData()
|
|
|
|
+ },
|
|
|
|
+ getData(){
|
|
|
|
+ if(this.checkId==null){
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ let getData={
|
|
|
|
+ type:this.type,
|
|
|
|
+ organizationId:this.checkId
|
|
|
|
+ }
|
|
|
|
+ if(this.interface==0){
|
|
|
|
+ statistics.organizationVisits(getData).then(result => {
|
|
|
|
+ this.showData=result.data
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if(this.interface==1){
|
|
|
|
+ statistics.organizationKnowledges(getData).then(result => {
|
|
|
|
+ this.showData=result.data
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if(this.interface==2){
|
|
|
|
+ statistics.organizationAlbums(getData).then(result => {
|
|
|
|
+ this.showData=result.data
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if(this.interface==3){
|
|
|
|
+ statistics.organizationMaps(getData).then(result => {
|
|
|
|
+ this.showData=result.data
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if(this.interface==4){
|
|
|
|
+ statistics.organizationSearchs(getData).then(result => {
|
|
|
|
+ this.showData=result.data
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //查询
|
|
|
|
+ handleSearchClick(){
|
|
|
|
+ if(this.searchValue==''){
|
|
|
|
+ this.getTreeData()
|
|
|
|
+ }else{
|
|
|
|
+ let getData={
|
|
|
|
+ "sortOrder": "asc",
|
|
|
|
+ "params": {
|
|
|
|
+ "Q_DIM_ID__S_EQ": "1",
|
|
|
|
+ "Q_RANK_LEVEL__S_EQ": null,
|
|
|
|
+ "Q_NAME__S_LK": this.searchValue,
|
|
|
|
+ "Q_GROUP_ID__S_NEQ": ""
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ statistics.searchGroups(getData).then(result => {
|
|
|
|
+ result=this.treeData(result);
|
|
|
|
+ this.tableData = result;
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //重置
|
|
|
|
+ handleResetClick(){
|
|
|
|
+ this.searchValue=''
|
|
|
|
+ this.getTreeData()
|
|
|
|
+ },
|
|
|
|
+ //组织结构
|
|
|
|
+ getTreeData(){
|
|
|
|
+ OsGroupApi.queryGroups(1,"0","yes").then(result => {
|
|
|
|
+ result.data=this.treeData(result.data);
|
|
|
|
+ this.tableData = result.data;
|
|
|
|
+ })
|
|
|
|
+ //清除下拉的数据
|
|
|
|
+ this.$refs.table.expandedRowKeys=[];
|
|
|
|
+ },
|
|
|
|
+ //异步加载组织
|
|
|
|
+ rowExpand(expanded,record){
|
|
|
|
+ var self=this;
|
|
|
|
+ if(expanded&&record.children&&record.children.length==0){
|
|
|
|
+ OsGroupApi.queryGroups(1,record.groupId,"yes").then(result => {
|
|
|
|
+ result.data=this.treeData(result.data);
|
|
|
|
+ self.updateData(self.tableData,result.data,record.groupId);
|
|
|
|
+ this.$refs.table.loadData();
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //判断下级是否有子级
|
|
|
|
+ treeData(data){
|
|
|
|
+ for (var i = 0; i <data.length ; i++) {
|
|
|
|
+ if(data[i].childAmount>0){
|
|
|
|
+ data[i].children=[];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return data;
|
|
|
|
+ },
|
|
|
|
+ //更新数据到tableData中
|
|
|
|
+ updateData(tableData,data,groupId){
|
|
|
|
+ for (var i = 0; i <tableData.length ; i++) {
|
|
|
|
+ if(tableData[i].groupId==groupId){
|
|
|
|
+ tableData[i].children=data;
|
|
|
|
+ break;
|
|
|
|
+ }else {
|
|
|
|
+ if(tableData[i].childAmount>0){
|
|
|
|
+ this.updateData(tableData[i].children,data,groupId);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ "type"(){
|
|
|
|
+ this.getData()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+.rx-tree-title{
|
|
|
|
+ white-space: normal;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+}
|
|
|
|
+.telist{
|
|
|
|
+ cursor: pointer;
|
|
|
|
+}
|
|
|
|
+.rightDetail{
|
|
|
|
+ width: 50%;
|
|
|
|
+ float: right;
|
|
|
|
+ border-left: 1px solid #e8e8e8;
|
|
|
|
+ height: 20vw;
|
|
|
|
+}
|
|
|
|
+.rightDetailtop{
|
|
|
|
+ background: #fafafa;
|
|
|
|
+ border-bottom: 1px solid #e8e8e8;
|
|
|
|
+ width: 100%;
|
|
|
|
+ text-align: center;
|
|
|
|
+ height:54px;
|
|
|
|
+ line-height:54px;
|
|
|
|
+}
|
|
|
|
+.rightDetailBottom{
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 30px;
|
|
|
|
+ background: #fff;
|
|
|
|
+ height: calc(100% - 54px);
|
|
|
|
+}
|
|
|
|
+</style>
|