dev
parent
3025b28a1e
commit
70d0ce4253
@ -0,0 +1,90 @@
|
||||
import histogram from "../../../../../components/option/columnarOption"
|
||||
import singleLine from "../../../../../components/option/sgOption"
|
||||
import pieOption from '../../../../../components/option/pieOption'
|
||||
const app = getApp();
|
||||
const dColor=['#FF4852','#FF6E25','#FFBF00']
|
||||
Component({
|
||||
data: {
|
||||
showChart: true,
|
||||
detailData: '',
|
||||
taTransform: singleLine([],[]),
|
||||
keyMediaData: histogram([],[],[],'#20CC62'),
|
||||
weiyiTotal: pieOption(dColor,[]),
|
||||
weiyiTotalData: [],
|
||||
wyDataList: [],
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
app.globalData.requestMessage({
|
||||
action: 'getWeiYiInsightAnalysis', //尾翼洞察详情
|
||||
token: 't%2BrswgjvzGM=',
|
||||
sType: 'BrandWeiYi',
|
||||
sTimeType: wx.getStorageSync('sTimeType') || 34,
|
||||
sBrand: wx.getStorageSync('sBrand') || ''
|
||||
}).then(res => {
|
||||
this.setData({detailData: res});
|
||||
});
|
||||
app.globalData.request({
|
||||
action: 'getWeiYiVolumeTime', //尾翼洞察详情
|
||||
token: 't%2BrswgjvzGM=',
|
||||
sType: 'BrandWeiYi',
|
||||
sTimeType: wx.getStorageSync('sTimeType') || 34,
|
||||
sBrand: wx.getStorageSync('sBrand') || ''
|
||||
}).then(res => {
|
||||
let dx = []; let dValue = [];
|
||||
res.forEach(ele => {
|
||||
dx.push(ele.Time); dValue.push(ele.value)
|
||||
});
|
||||
this.setData({ taTransform: singleLine(dValue,dx) })
|
||||
});
|
||||
app.globalData.request({
|
||||
action: 'getWebsite', //重点媒体
|
||||
token: 't%2BrswgjvzGM=',
|
||||
sType: 'BrandWeiYi',
|
||||
sTimeType: wx.getStorageSync('sTimeType') || 34,
|
||||
sBrand: wx.getStorageSync('sBrand') || ''
|
||||
}).then(res => {
|
||||
let dx = []; let dValue = [];
|
||||
for(let key in res) {
|
||||
dx.push(key);
|
||||
dValue.push(res[key]*1);
|
||||
}
|
||||
this.setData({ keyMediaData: histogram(dx,dValue,[],'#20CC62')})
|
||||
});
|
||||
app.globalData.request({
|
||||
action: 'getAffections', //尾翼整体调性
|
||||
token: 't%2BrswgjvzGM=',
|
||||
sType: 'BrandWeiYi',
|
||||
sTimeType: wx.getStorageSync('sTimeType') || 34,
|
||||
sBrand: wx.getStorageSync('sBrand') || ''
|
||||
}).then(res => {
|
||||
let total = res.正面 * 1 + res.中性 * 1 + res.负面 * 1;
|
||||
let arr = [];
|
||||
for(let key in res) {
|
||||
let obj = {name: key, value: res[key], percent: (res[key]/total*100).toFixed(0)};
|
||||
arr.push(obj)
|
||||
};
|
||||
this.setData({ weiyiTotal: pieOption(dColor,arr), weiyiTotalData: arr})
|
||||
});
|
||||
app.globalData.request({
|
||||
action: 'getList0528', //尾翼信息列表
|
||||
token: 't%2BrswgjvzGM=',
|
||||
sType: 'BrandWeiYi',
|
||||
sTimeType: wx.getStorageSync('sTimeType') || 34,
|
||||
sBrand: wx.getStorageSync('sBrand') || '',
|
||||
iPageIndex: 1,
|
||||
iPageSize: 10
|
||||
}).then(res => {
|
||||
this.setData({wyDataList: res})
|
||||
});
|
||||
},
|
||||
toEventDetail(value) {
|
||||
let id = value.currentTarget.dataset.id;
|
||||
}
|
||||
},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
this.getData()
|
||||
}
|
||||
}
|
||||
})
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"c-echars": "../../../../../components/c-echars/index"
|
||||
},
|
||||
"component": true
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
<view class="ta-content">
|
||||
<view class="ta-item">
|
||||
<view class="ta-chart-title">尾翼洞察详情</view>
|
||||
<view class="ta-chart-item" style="padding: 16rpx 0rpx 0rpx 32rpx;width: 100%;height: auto;">
|
||||
<!-- {{detailData }} -->
|
||||
<rich-text nodes="{{detailData}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ta-item">
|
||||
<view class="ta-chart-title">尾翼传播态势</view>
|
||||
<view class="ta-chart-item" style="width: 110%;">
|
||||
<c-echars showChart="{{showChart}}" canvasId="wytrans-canvas" chartId="wytrans" chartOption="{{taTransform}}" height="100%"></c-echars>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ta-item">
|
||||
<view class="ta-chart-title">重点媒体</view>
|
||||
<view class="ta-chart-item">
|
||||
<c-echars showChart="{{showChart}}" canvasId="wykm-canvas" chartId="wykm" chartOption="{{keyMediaData}}" height="100%"></c-echars>
|
||||
</view>
|
||||
</view><view class="ta-item">
|
||||
<view class="ta-chart-title">尾翼整体调性</view>
|
||||
<view style="display: flex;justify-content: flex-start;">
|
||||
<view class="circle-chart" style="margin-right: 48rpx;">
|
||||
<c-echars showChart="{{showChart}}" canvasId="wytotal-canvas" chartId="wytotal" chartOption="{{weiyiTotal}}" height="100%"></c-echars>
|
||||
</view>
|
||||
<view class="circle-data">
|
||||
<view wx:for="{{weiyiTotalData}}" wx:for-item="item" wx:key="name" style="margin-bottom: 64rpx;display: flex;justify-content: space-between;">
|
||||
<view class="circle-data-item">
|
||||
<view style="width: 10px;height: 10px;background: #0084FF;border-radius: 1px;"></view>
|
||||
<view class="circle-data-title">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="circle-data-item">
|
||||
<view>数量</view>
|
||||
<view class="circle-data-title">{{item.value}}</view>
|
||||
</view>
|
||||
<view class="circle-data-item">
|
||||
<view>占比</view>
|
||||
<view class="circle-data-title">{{item.percent}}%</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ta-item">
|
||||
<view class="ta-chart-title" style="display: flex;justify-content: space-between;">
|
||||
<view>尾翼信息列表</view>
|
||||
<view class="to-more">查看更多 ></view>
|
||||
</view>
|
||||
<view style="width: 105%;margin-top: 16rpx;">
|
||||
<view class="event_content" wx:for="{{wyDataList}}" wx:if="{{index < 10}}" wx:key="_id" data-id='{{item._id}}' bindtap="toEventDetail">
|
||||
<view class="event_text">
|
||||
<view class="text_title">{{item._source.srctitle}}
|
||||
</view>
|
||||
<view class="text_num">{{item._score}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="event_text">
|
||||
<view class="text_pinpai">来源:{{item._source.source}}
|
||||
</view>
|
||||
<view class="text_pinpai">影响力
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
@ -0,0 +1,136 @@
|
||||
.ta-content {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
.ta-item {
|
||||
width: 648rpx;
|
||||
/* height: 90%; */
|
||||
margin: 16rpx 0rpx 32rpx 32rpx;
|
||||
padding: 16rpx 40rpx 16rpx 0rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.ta-chart-title {
|
||||
font-size: 18px;
|
||||
padding-left: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
}
|
||||
.ta-chart-subTitle {
|
||||
font-size: 12px;
|
||||
padding-left: 32rpx;
|
||||
margin-top: 8rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.ta-chart-item {
|
||||
width: 110%;
|
||||
height: 350rpx;
|
||||
}
|
||||
.ta-rank-list {
|
||||
width: 125%;
|
||||
margin: 32rpx;
|
||||
}
|
||||
.ranking{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
.ranking-number{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.rank_num {
|
||||
width: 53rpx;
|
||||
height: 40rpx
|
||||
}
|
||||
/* 热议话题方向 */
|
||||
.tt-area-item {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
width: 656rpx;
|
||||
height: 410rpx;
|
||||
padding: 32rpx 0 0 24rpx;
|
||||
}
|
||||
.tt-area-item-chart{
|
||||
width: 318rpx;
|
||||
height: 410rpx
|
||||
}
|
||||
/* 尾翼整体调性 */
|
||||
.circle-chart {
|
||||
width: 50%;
|
||||
height: 340rpx;
|
||||
margin-left: 24rpx;
|
||||
}
|
||||
.circle-data {
|
||||
width: 50%;
|
||||
height: 340rpx;
|
||||
}
|
||||
.circle-data-item {
|
||||
color: #999999;
|
||||
font-size: 10px;
|
||||
line-height: 10px;
|
||||
width: 33%;
|
||||
}
|
||||
.circle-data-item2 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
color: #333333;
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
font-weight: 600;
|
||||
margin: 12rpx 0rpx 12rpx 0rpx;
|
||||
}
|
||||
.circle-data-title {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
/* 查看更多 */
|
||||
.to-more {
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
line-height: 56rpx;
|
||||
}
|
||||
|
||||
/* 热点事件 */
|
||||
.list_event{
|
||||
margin: 32rpx;
|
||||
background-size: cover;
|
||||
width: 686rpx;
|
||||
/* height: 616rpx; */
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
.event_title{
|
||||
font-size: 36rpx;
|
||||
padding: 32rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.event_content{
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
.event_text{
|
||||
display: flex;
|
||||
justify-content : space-between;
|
||||
padding: 0rpx 32rpx;
|
||||
}
|
||||
.text_title{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 500rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
.text_num{
|
||||
color: #FF343F;
|
||||
font-weight: 600;
|
||||
}
|
||||
.text_pinpai{
|
||||
color: #999999;
|
||||
font-size: 24rpx;
|
||||
}
|
Loading…
Reference in new issue