|
@@ -4,21 +4,21 @@
|
|
|
<div class="topBox">
|
|
|
<div>
|
|
|
<div class="numBox">
|
|
|
- <img src="../../../../image/FloatedMenu.png"/>
|
|
|
+ <img src="../../../../image/analysis0.png"/>
|
|
|
<div>{{format_number(totalData.knowledge)}}</div>
|
|
|
<div>知识仓库总量</div>
|
|
|
</div>
|
|
|
</div >
|
|
|
<div>
|
|
|
<div class="numBox">
|
|
|
- <img src="../../../../image/FloatedMenu.png"/>
|
|
|
+ <img src="../../../../image/analysis1.png"/>
|
|
|
<div>{{format_number(totalData.map)}}</div>
|
|
|
<div>知识地图总量</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
<div class="numBox">
|
|
|
- <img src="../../../../image/FloatedMenu.png"/>
|
|
|
+ <img src="../../../../image/analysis2.png"/>
|
|
|
<div>{{format_number(totalData.album)}}</div>
|
|
|
<div>知识专辑总量</div>
|
|
|
</div>
|
|
@@ -31,7 +31,7 @@
|
|
|
</div>
|
|
|
<div>
|
|
|
<div class="barNameBox" v-for="(item, index) in NameArr" :key="index">
|
|
|
- <div :style="{'color':colorbarArr[index]}">■</div>
|
|
|
+ <div :style="{'background':colorbarArr[index]}"></div>
|
|
|
<div>{{ item }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -141,39 +141,91 @@ export default {
|
|
|
color:that.colorbarArr[num],
|
|
|
name: item.legend,
|
|
|
type: 'bar',
|
|
|
+ barGap:'0%',
|
|
|
+ barCategoryGap:'40%',
|
|
|
stack: 'Ad',
|
|
|
emphasis: {
|
|
|
focus: 'series'
|
|
|
},
|
|
|
- data: [item.value]
|
|
|
+ data: [{value:item.value,itemStyle:{ barBorderRadius: [0, 0, 0, 0] }}],
|
|
|
+ percentage:[item.percentage]
|
|
|
}
|
|
|
- if(num==(el.values.length-1)){
|
|
|
+ /*if(num==(el.values.length-1)){
|
|
|
tempData.itemStyle={
|
|
|
normal: {
|
|
|
//这里设置柱形图圆角 [左上角,右上角,右下角,左下角]
|
|
|
barBorderRadius:[6, 6, 0, 0]
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
seriesData.push(tempData)
|
|
|
}else{
|
|
|
- seriesData[num].data.push(item.value)
|
|
|
+ seriesData[num].data.push({value:item.value,itemStyle:{ barBorderRadius: [0, 0, 0, 0] }})
|
|
|
+ seriesData[num].percentage.push(item.percentage)
|
|
|
}
|
|
|
})
|
|
|
});
|
|
|
+ //for (let i=(seriesData[0].data.length-1);i>-1;i--) { // 遍历所有的x轴数据(总数为n),为单根柱条提供data下标(0 ~ n-1)
|
|
|
+ for (let i in seriesData[0].data) {
|
|
|
+ for (let j=(seriesData.length-1);j>-1;j--) {
|
|
|
+ if (seriesData[j].data[i].value != 0) { // 找到第一个不为0的值,为该项添加itemStyle
|
|
|
+ seriesData[j].data[i]['itemStyle'] = { barBorderRadius: [4, 4, 0, 0] };
|
|
|
+ break; //退出该柱条的循环
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(seriesData)
|
|
|
+ let offsetX = window.innerWidth/150
|
|
|
var option0 = {
|
|
|
legend:{
|
|
|
show:false
|
|
|
},
|
|
|
tooltip: {
|
|
|
+ position: function (point, params, dom, rect, size) {
|
|
|
+ console.log(params)
|
|
|
+ let dataIndex = params[0].dataIndex
|
|
|
+ return {left: 56+113*dataIndex, top: point[1]};
|
|
|
+ // return {left: 1300, top: point[1]};
|
|
|
+ },
|
|
|
+ backgroundColor:'rgba(0,0,0,0.5)',
|
|
|
+ borderWidth:'0',
|
|
|
+ textStyle:{
|
|
|
+ 'color':'#FAFAFB',
|
|
|
+ 'lineHeight': 14,
|
|
|
+ 'fontSize':14
|
|
|
+ },
|
|
|
trigger: 'axis',
|
|
|
axisPointer: {
|
|
|
type: 'shadow'
|
|
|
+ },
|
|
|
+ formatter: params => {
|
|
|
+ let dataIndex = params[0].dataIndex
|
|
|
+ let resStr = ''
|
|
|
+ for (let i=0;i<seriesData.length;i++) {
|
|
|
+ if(i==0){
|
|
|
+ resStr=resStr+"<div class='tooltipBox' style='margin-top:0px'><div class='tooltipLeft' style='background:"+that.colorbarArr[i]+"'></div> "+seriesData[i].data[dataIndex].value+" "+seriesData[i].percentage[dataIndex]*100+"%</div>"
|
|
|
+ }else{
|
|
|
+ resStr=resStr+"<div class='tooltipBox'><div class='tooltipLeft' style='background:"+that.colorbarArr[i]+"'></div> "+seriesData[i].data[dataIndex].value+" "+seriesData[i].percentage[dataIndex]*100+"%</div>"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //const { name, value } = params
|
|
|
+ return resStr
|
|
|
}
|
|
|
},
|
|
|
+ /*tooltip: {
|
|
|
+ position: function (point, params, dom, rect, size) {
|
|
|
+ // 固定在顶部
|
|
|
+ return [point[0], '10%'];
|
|
|
+ },
|
|
|
+ trigger: 'item',
|
|
|
+ formatter: params => {
|
|
|
+ const { name, value } = params
|
|
|
+ return `${name} <br/>数量:${value}`
|
|
|
+ }
|
|
|
+ },*/
|
|
|
grid: {
|
|
|
top:'10%',
|
|
|
- left: '3%',
|
|
|
+ left: '2%',
|
|
|
right: '4%',
|
|
|
bottom: '3%',
|
|
|
containLabel: true
|
|
@@ -182,12 +234,40 @@ export default {
|
|
|
{
|
|
|
show: true,
|
|
|
type: 'category',
|
|
|
- data: xAxisData
|
|
|
+ data: xAxisData,
|
|
|
+ offset:offsetX,
|
|
|
+ // 坐标 轴线
|
|
|
+ axisLine: {
|
|
|
+ show: true,
|
|
|
+ lineStyle: {
|
|
|
+ type: 'solid',
|
|
|
+ color: '#F1F1F5',
|
|
|
+ width: 1
|
|
|
+ },
|
|
|
+ },
|
|
|
+ axisTick:{
|
|
|
+ show:false
|
|
|
+ },
|
|
|
+ axisLabel:{
|
|
|
+ color:'#92929D',
|
|
|
+ fontSize:14
|
|
|
+ }
|
|
|
}
|
|
|
],
|
|
|
yAxis: [
|
|
|
{
|
|
|
- type: 'value'
|
|
|
+ type: 'value',
|
|
|
+ splitLine:{
|
|
|
+ lineStyle: {
|
|
|
+ type: 'solid',
|
|
|
+ color: '#F1F1F5',
|
|
|
+ width: 1
|
|
|
+ }
|
|
|
+ },
|
|
|
+ axisLabel:{
|
|
|
+ color:'#92929D',
|
|
|
+ fontSize:14
|
|
|
+ }
|
|
|
}
|
|
|
],
|
|
|
series: seriesData
|
|
@@ -205,7 +285,12 @@ export default {
|
|
|
that.pieTotalNum=pieData.total
|
|
|
var option2 = {
|
|
|
tooltip: {
|
|
|
- trigger: 'item'
|
|
|
+ trigger: 'item',
|
|
|
+ backgroundColor:'rgba(0,0,0,0.5)',
|
|
|
+ borderWidth:'0',
|
|
|
+ textStyle:{
|
|
|
+ 'color':'#FAFAFB'
|
|
|
+ },
|
|
|
},
|
|
|
grid: {
|
|
|
left: '3%',
|
|
@@ -217,7 +302,7 @@ export default {
|
|
|
{
|
|
|
roseType: 'radius',
|
|
|
top:'10%',
|
|
|
- name: 'Access From',
|
|
|
+ name: '知识类型分布',
|
|
|
type: 'pie',
|
|
|
radius: '60%',
|
|
|
data: [
|
|
@@ -275,6 +360,11 @@ export default {
|
|
|
backgroundColor:'#fff',
|
|
|
tooltip: {
|
|
|
trigger: 'item',
|
|
|
+ backgroundColor:'rgba(0,0,0,0.5)',
|
|
|
+ borderWidth:'0',
|
|
|
+ textStyle:{
|
|
|
+ 'color':'#FAFAFB'
|
|
|
+ },
|
|
|
formatter: params => {
|
|
|
const { name, value } = params
|
|
|
return `${name} <br/>数量:${value}`
|
|
@@ -424,21 +514,21 @@ export default {
|
|
|
<style lang="less" scoped>
|
|
|
.contentAlbunMain{
|
|
|
overflow: scroll;
|
|
|
- padding: 1.5625vw 10.93vw;
|
|
|
+ padding: 0vw 10.93vw;
|
|
|
width: 100%;
|
|
|
display: flex;
|
|
|
background: #FAFAFA;
|
|
|
flex-direction: column;
|
|
|
}
|
|
|
.numBox{
|
|
|
- width: 25vw;
|
|
|
+ width: 24.73vw;
|
|
|
+ height: 11.51vw;
|
|
|
background: #fff;
|
|
|
border-radius: 10px;
|
|
|
- height: 221px;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
|
- margin-top:50px;
|
|
|
+ margin-top:3.6465vw;
|
|
|
}
|
|
|
.topBox{
|
|
|
display: flex;
|
|
@@ -449,8 +539,8 @@ export default {
|
|
|
width: 100%;
|
|
|
background: #fff;
|
|
|
border-radius: 10px;
|
|
|
- height: 20vw;
|
|
|
- margin-top: 1.4vw;
|
|
|
+ height: 24.896vw;
|
|
|
+ margin-top: 1.25vw;
|
|
|
}
|
|
|
.bottomBox{
|
|
|
width: 100%;
|
|
@@ -471,39 +561,39 @@ export default {
|
|
|
width: 26vw;
|
|
|
}
|
|
|
.numBox img{
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
- margin-top: -50px;
|
|
|
+ width: 5.15625vw;
|
|
|
+ height: 5.15625vw;
|
|
|
+ margin-top: -2.135vw;
|
|
|
}
|
|
|
.numBox div:nth-child(2){
|
|
|
- font-size: 30px;
|
|
|
- width: 95px;
|
|
|
+ font-size: 1.5625vw;
|
|
|
+ width: 100%;
|
|
|
word-break: break-all;
|
|
|
color: #202124;
|
|
|
- line-height: 30px;
|
|
|
- margin-top: 20px;
|
|
|
+ margin-top: 1.2vw;
|
|
|
text-align: center;
|
|
|
}
|
|
|
.numBox div:last-child{
|
|
|
- font-size: 18px;
|
|
|
- width: 110px;
|
|
|
+ font-size: 0.9375vw;
|
|
|
+ width: 100%;
|
|
|
color: #92929D;
|
|
|
- margin-top: 10px;
|
|
|
+ margin-top: 1.2vw;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
.topTitle{
|
|
|
- width: 111px;
|
|
|
- margin-top: 30px;
|
|
|
- margin-left: 30px;
|
|
|
+ width: 15.625vw;
|
|
|
+ margin-top: 1.5625vw;
|
|
|
+ margin-left: 1.5625vw;
|
|
|
position: absolute;
|
|
|
}
|
|
|
.topTitle div:nth-child(2){
|
|
|
color: #202124;
|
|
|
- font-size: 30px;
|
|
|
+ font-size: 1.5625vw;
|
|
|
word-break: break-all;
|
|
|
}
|
|
|
.topTitle div:first-child{
|
|
|
color: rgb(146, 146, 157);
|
|
|
- font-size: 18px;
|
|
|
+ font-size: 0.9375vw;
|
|
|
}
|
|
|
.topTitle div:nth-child(3){
|
|
|
color: #202124;
|
|
@@ -527,13 +617,31 @@ export default {
|
|
|
flex-direction: row;
|
|
|
align-items: end;
|
|
|
width: auto!important;
|
|
|
- margin-right: 1vw;
|
|
|
+ margin-right: 0.8333vw;
|
|
|
+ font-size: 0.9375;
|
|
|
}
|
|
|
.barNameBox div:nth-child(1){
|
|
|
- font-size: 0.6vw;
|
|
|
- margin-right: 0.6vw;
|
|
|
+ width: 0.72vw;
|
|
|
+ height: 0.72vw;
|
|
|
+ margin-right: 0.52vw;
|
|
|
+ margin-bottom: 0.3vw;
|
|
|
+ border-radius: 2px;
|
|
|
}
|
|
|
.barNameBox div:nth-child(2){
|
|
|
font-size: 1vw;
|
|
|
}
|
|
|
+
|
|
|
+</style>
|
|
|
+<style>
|
|
|
+.tooltipLeft{
|
|
|
+ width: 0.6vw;
|
|
|
+ height: 0.6vw;
|
|
|
+ border-radius: 2px;
|
|
|
+ display: inline-block;
|
|
|
+}
|
|
|
+.tooltipBox{
|
|
|
+ margin-left: 16px;
|
|
|
+ margin-right: 16px;
|
|
|
+ margin-top:8px;
|
|
|
+}
|
|
|
</style>
|