@ -1,46 +1,41 @@
<!--
* @ Author : xw
* @ Date : 2021 - 10 - 08 09 : 17 : 42
* @ LastEditTime : 2021 - 10 - 21 1 7: 55 : 54
* @ LastEditTime : 2021 - 10 - 21 1 9: 27 : 18
* @ LastEditors : Please set LastEditors
* @ Description : 行业洞察
* @ FilePath : / d a t a - s h o w / s r c / v i e w s / I n d e x / i n d e x . v u e
-- >
< template >
< div class = "d-container" >
< div class = "In-body" >
< div class = "d1" >
< real -time -event > < / r e a l - t i m e - e v e n t >
< key -communication -positions > < / k e y - c o m m u n i c a t i o n - p o s i t i o n s >
< spread -the -sound > < / s p r e a d - t h e - s o u n d >
< / div >
< div class = "d2" >
< div class = "d2-top" >
< dynamic -number @allData ="handlerAllData" > < / dynamic -number >
< div class = "d-container" >
< div class = "In-body" >
< div class = "d1" >
< real -time -event > < / r e a l - t i m e - e v e n t >
< key -communication -positions > < / k e y - c o m m u n i c a t i o n - p o s i t i o n s >
< spread -the -sound > < / s p r e a d - t h e - s o u n d >
< / div >
< div class = "d2" >
< div class = "d2-top" >
< dynamic -number @allData ="handlerAllData" > < / dynamic -number >
< / div >
< div class = "d2-bottom" >
< barometer > < / barometer >
< tail -insight > < / t a i l - i n s i g h t >
< / div >
< / div >
< div class = "d3" >
< sales -rank > < / s a l e s - r a n k >
< user -portrait > < / u s e r - p o r t r a i t >
< hot -discussion -graph > < / h o t - d i s c u s s i o n - g r a p h >
< / div >
< / div >
< div class = "d2-bottom" >
< barometer > < / barometer >
< tail -insight > < / t a i l - i n s i g h t >
< / div >
< / div >
< div class = "d3" >
< sales -rank > < / s a l e s - r a n k >
< user -portrait > < / u s e r - p o r t r a i t >
< hot -discussion -graph > < / h o t - d i s c u s s i o n - g r a p h >
< / div >
<!-- 对话框 -- >
< v -modal : eleStyle = "{ width: '1200px', height: '720px' }" :visible.sync ="modalObj.visible" :title ="modalObj.title" >
< div slot = "body" : style = "{padding: '16px'}" >
< dv -scroll -board :config ="config" style = "width:1168px;height:640px" / >
< / div >
< / v - m o d a l >
< / div >
<!-- 对话框 -- >
< v -modal
: eleStyle = "{ width: '1200px', height: '720px' }"
: visible . sync = "modalObj.visible"
: title = "modalObj.title"
>
< div slot = "body" : style = "{padding: '16px'}" >
< v -table :columns ="columns" :data ="tbData" :pagination ="false" > < / v - t a b l e >
< / div >
< / v - m o d a l >
< / div >
< / template >
< script >
@ -53,88 +48,92 @@ import barometer from "./barometer";
import tailInsight from "./tailInsight" ;
import hotDiscussionGraph from "./hotDiscussionGraph" ;
import dynamicNumber from "./dynamicNumber" ;
import { getHomeList0528 } from "@/api/home" ;
import { getHomeList0528 } from "@/api/home" ;
export default {
name : "index" ,
components : {
realTimeEvent , / / 实 时 事 件
keyCommunicationPositions , / / 传 播 重 点 阵 地
salesRank , / / 热 销 排 行
userPortrait , / / 用 户 画 像
spreadTheSound , / / 传 播 声 量 T O P 1 0
barometer , / / 晴 雨 表
tailInsight , / / 尾 翼 洞 察
hotDiscussionGraph , / / 热 议 图 谱
dynamicNumber , / / 中 间 大 数 据
} ,
data ( ) {
return {
modalObj : {
title : "全网数据实时动态" ,
visible : false ,
} ,
columns : [
{
title : "标题" ,
key : "name" ,
dataIndex : "name" ,
} ,
{
title : "发布时间" ,
dataIndex : "age" ,
key : "age" ,
} ,
{
title : "作者" ,
dataIndex : "address" ,
key : "address" ,
name : "index" ,
components : {
realTimeEvent , / / 实 时 事 件
keyCommunicationPositions , / / 传 播 重 点 阵 地
salesRank , / / 热 销 排 行
userPortrait , / / 用 户 画 像
spreadTheSound , / / 传 播 声 量 T O P 1 0
barometer , / / 晴 雨 表
tailInsight , / / 尾 翼 洞 察
hotDiscussionGraph , / / 热 议 图 谱
dynamicNumber , / / 中 间 大 数 据
} ,
data ( ) {
return {
modalObj : {
title : "全网数据实时动态" ,
visible : true ,
} ,
config : {
headerBGC : "#0F2A4D" ,
oddRowBGC : "rgba(69, 149, 244, 0);" ,
evenRowBGC : "#0F2A4D;" ,
columnWidth : [ 460 ] ,
rowNum : 10 ,
header : [ "标题" , "发布时间" , "作者" , "来源" ] ,
data : [ ] ,
} ,
} ;
} ,
created ( ) {
this . getTableList ( ) ;
} ,
mounted ( ) {
this . modalObj . visible = false ;
} ,
methods : {
handlerAllData ( ) {
this . modalObj . visible = true ;
} ,
{
title : "来源" ,
dataIndex : "laiyuan" ,
key : "laiyuan" ,
getTableList ( ) {
getHomeList0528 ( this . getCommTime ) . then ( ( res ) => {
let arr = [ ] ;
if ( Array . isArray ( res . data ) ) {
res . data . forEach ( ( ele ) => {
let a = [
ele . _source . title ,
ele . _source . estime ,
ele . _source . user _author ,
ele . _source . source ,
] ;
arr . push ( a ) ;
} ) ;
this . config = {
headerBGC : "#0F2A4D" ,
oddRowBGC : "rgba(69, 149, 244, 0);" ,
evenRowBGC : "#0F2A4D;" ,
columnWidth : [ 460 ] ,
rowNum : 10 ,
header : [ "标题" , "发布时间" , "作者" , "来源" ] ,
data : arr ,
} ;
}
} ) ;
} ,
] ,
tbData : [ ] ,
form : {
RefreshTime : ""
}
} ;
} ,
created ( ) {
} ,
methods : {
handlerAllData ( ) {
this . modalObj . visible = true ;
} ,
getTableList ( ) {
let obj = Object . assign ( { } , this . getCommTime , this . form )
console . log ( obj )
getHomeList0528 ( obj ) . then ( res => {
console . log ( res )
} )
}
}
} ;
< / script >
< style lang = "less" scoped >
. In - body {
padding : 0 px 16 px 16 px 16 px ;
display : flex ;
justify - content : flex - start ;
. d2 {
width : 936 px ;
margin - left : 16 px ;
. d2 - top {
width : 100 % ;
height : 644 px ;
}
. d2 - bottom {
display : flex ;
justify - content : flex - start ;
padding : 0 px 16 px 16 px 16 px ;
display : flex ;
justify - content : flex - start ;
. d2 {
width : 936 px ;
margin - left : 16 px ;
. d2 - top {
width : 100 % ;
height : 644 px ;
}
. d2 - bottom {
display : flex ;
justify - content : flex - start ;
}
}
}
}
< / style >