Authored by 王涛

Merge branch 'master-v32-lushangqing' into 'master'

电子税务局大屏页面搭建



See merge request !43
Showing 75 changed files with 1848 additions and 900 deletions
... ... @@ -19,6 +19,8 @@
@import "../css/digitalboard.css";
@import "../css/declareReport.css";
/*zj大屏*/
@import "../css/zjbigscreen.css";
... ...
... ... @@ -22,7 +22,7 @@
width: 100%;
height: 100%;
padding: 0 0.2%;
background: url(bg_backgroud.png);
background: url('/vue3/src/assets/images/digitalDp/bg_backgroud.png');
background-size: 100% 100%;
color: #fff;
box-sizing: border-box;
... ... @@ -74,20 +74,47 @@
margin-top: 0.5%;
margin-left: 0.2%;
margin-right: 0.2%;
display:flex;
}
.middle-left{
width:80%;
display: flex;
flex-flow: column;
justify-content: space-around;
}
.width-86{
width:86%;
margin-bottom: 10px;
}
.middle-right{
flex: 1;
position: relative;
left: -5%;
display: flex;
flex-flow: column;
justify-content: space-around;
}
.deduction-bottom{
height:40%;
position: relative;
}
.screen-middle #middle-top {
width: 100%;
height: 32%;
/*height: 32%;*/
position: relative;
}
.screen-middle #middle-center {
width: 100%;
height: 32%;
/*height: 32%;*/
position: relative;
}
.middle-left-declare-rate{
height: 36%;
}
.screen-middle #middle-bottom {
width: 100%;
height: 36%;
height: 100%;
position: relative;
}
... ... @@ -103,18 +130,42 @@
}
.screen-right #right-top {
height: 26%;
height: 32%;
position: relative;
}
.screen-right #right-center {
height: 37%;
height: 35%;
position: relative;
}
.screen-right #right-bottom {
height: 37%;
height: 33%;
position: relative;
}
.screen-right #right-top .monitoring-bar{
height: 100%;
position: relative;
text-align: left;
}
.cpu-dropdown{
text-align: right;
}
.cpu-dropdown .el-dropdown .el-dropdown-selfdefine{
color:#ffffff;
cursor: pointer;
margin-right: 15px;
}
.el-dropdown__popper .el-dropdown-menu{
background-color: rgba(0,0,0,0.5);
border:none;
}
.el-dropdown-menu__item{
color:#ffffff;
}
.el-dropdown__popper.el-popper[role="tooltip"]{
border:none;
background-color: rgba(0,0,0,0);
}
.screen-bottom {
width: 100%;
height: 34%;
... ... @@ -140,3 +191,12 @@
width: 25%;
position: relative;
}
.icon-arrow{
background-image: url("/vue3/src/assets/images/digitalDp/icon-arrow.png");
width:12px;
height:12px;
background-size: 100%;
display: inline-block;
background-repeat: no-repeat;
background-position: center;
}
\ No newline at end of file
... ...
.declare-container,.declare-lineChart{
background: url("/vue3/src/assets/images/zjdp/img-bg.png");
background-position: center;
/* background: url("/vue3/src/assets/images/zjdp/img-bg.png");
background-position: center;*/
}
.declare-container{
... ...
.declare-report .grid-content{
display: flex;
align-items: center;
justify-content: center;
padding: 5px 0;
}
.declare-report .declare-report-num{
background-image: url("/vue3/src/assets/images/digitalDp/text-bg.png");
background-repeat: no-repeat;
background-position: center;
background-size: contain;
margin-top: 20px;
}
.declare-report .grid-content img{
padding-right:10%;
border-right:1px solid #ffffff;
border-radius: 1px;
}
.declare-report .grid-content .title-ysb{
padding-left:10%;
}
.declare-report-top,.declare-report-bottom{
margin-top: 14%;
text-align: center;
}
.declare-report .rate-title{
position: absolute;
width: 100%;
top: 7px;
}
.declare-report .grid-content.rate-container{
background-image: url("/vue3/src/assets/images/digitalDp/icon-rate.png");
background-repeat: no-repeat;
height: 156px;
background-position: center top;
}
.declare-report .rate-container .rate-num{
margin-top:10px;
}
\ No newline at end of file
... ...
... ... @@ -2,37 +2,41 @@
text-align: center;
}
.deduction-box-title {
position: absolute;
/*position: absolute;
left: 2%;
top: 1%;
top: 1%;*/
}
.deduction-title-size {
position: absolute;
/* position: absolute;
left: 9%;
top: 22%;
top: 22%;*/
}
.deduction-num-container{
position: relative;
margin-top: 12%;
}
.deduction-box-text-left {
position: absolute;
left: 17%;
top: 47%;
top: 20%;
width:100%;
}
.deduction-box-text-right {
position: absolute;
left: 53%;
top: 47%;
top: 20%;
width:100%;
}
.deduction-text-number {
color: #01E6E6;
}
.deduction-box-img-left {
position: absolute;
/* position: absolute;
left: 10%;
top: 5%;
top: 5%;*/
}
.deduction-box-img-right {
position: absolute;
/* position: absolute;
left: 50%;
top: 5%;
top: 5%;*/
}
\ No newline at end of file
... ...
... ... @@ -8,7 +8,9 @@
position: absolute;
color: #FEFEFE;
top: 1%;
left: 6%;
left: 2%;
letter-spacing: 1px;
font-weight: bold;
}
@font-face{
... ...
... ... @@ -27,7 +27,7 @@
flex: 1;
}
.tabItem{
padding:5px 30px;
padding:0px 53px;
border-bottom: 3px solid #1ac045;
background-color: #0c1532;
border-radius: 3px;
... ... @@ -36,7 +36,7 @@
cursor: pointer;
font-family: "PingFang SC";
box-sizing: border-box;
height: 43px;
height: 40px;
align-items: center;
display: flex;
}
... ...
... ... @@ -64,7 +64,7 @@
}
.listItem-icon{
position: absolute;
top:53%;
top:52%;
}
.listItem:nth-child(1) .listItem-num,.listItem:nth-child(1) .listItem-icon{
right: -20px;
... ... @@ -94,7 +94,7 @@
.listItem:nth-child(3) .listItem-icon-name{
left: 14%;
}
.listItem:nth-child(3) .listItem-icon-name{
.listItem:nth-child(4) .listItem-icon-name{
left: -28%;
}
.healthList{
... ...
... ... @@ -3,6 +3,7 @@ body{font-size: 15px;}
background-image: url("/vue3/src/assets/images/zjdp/img-bg.png");
background-position: center;
background-size: cover;
font-family: "PingFang SC";
}
.screen-bg{
background-image: url("/vue3/src/assets/images/zjdp/img-bg2.png");
... ... @@ -55,9 +56,15 @@ body{font-size: 15px;}
.declare-chart{
display: flex;
height: 560px;
height: 550px;
}
.declare-lineChart{
height:100%;
}
.monitoring-bar{
height:50%;
}
.screen-nav{
margin-bottom: 30px;
padding-right: 20px;
... ... @@ -69,8 +76,11 @@ body{font-size: 15px;}
.performance-lineChart{
margin-top:30px;
}
.screen-res{
width:45%;
}
.screen-performance{
flex:1;
width:55%;
}
.performance-container .container-title{
margin-left:40px;
... ...
... ... @@ -104,12 +104,6 @@ const routes = [{
path: '/zjdaping',
name: 'zjdaping',
component: () => myImport('views/zjdaping/index')
},
{
path:'/zjdapingchart',
name:'zjdapingchart',
component: () => myImport('views/zjdaping/components/barChart/index')
}
];
... ...
<div class="com-container">
<div class="com-chart" id="availability_ref"></div>
<div class="com-container available-chart" id="availability_ref" style="text-align: left" >
<img :style="comtitleImgStyle" src="/vue3/src/assets/images/digitalDp/title-availability.png" alt="">
<LineChart :optionData="optionData" v-if="optionData"></LineChart>
<!--<div class="com-chart" ></div>
<div class="topfive-box-title">
<img :style="comtitleImgStyle" src="./src/assets/img/box_title_bykk_zj_1.png" class="available-title-img"> <!-- bor1_6 -->
<img :style="comtitleImgStyle" src="./src/assets/img/box_title_bykk_zj_1.png" class="available-title-img"> &lt;!&ndash; bor1_6 &ndash;&gt;
<span :style="comtitleTextStyle" class="available-title-size">业务可用性</span>
</div>
</div>-->
</div>
\ No newline at end of file
... ...
export default {
name: 'Availability',
name: 'availability',
template: '',
components: {},
data () {
components: {
'LineChart': Vue.defineAsyncComponent(
() => myImport('views/zjdaping/components/lineChart/index')
)
},
data(){
return {
chartInstance: null,
allData: {
polyline: {
title: "业务可用性",
unit: "%",
data: {
name: "占比",
data: ["67","70","80","71","90","92","72","70","56","45","89","100"]
}
},
xAxis: {
time: ["01:00", "02:00", "03:00", "04:00", "05:00", "06:00", "07:00", "08:00", "09:00", "10:00", "11:00", "12:00"]
}
},
titleFontSize: 20,
startValue: 0, // 区域缩放的起点值
endValue: 6, // 区域缩放的终点值
timerId: null // 定时器的标识
domainName:sessionStorage.getItem('domainName'),
apiUrl:'/api-web/sxview/getBusinessAvailability',
resourceStatisticsData:'',
optionData:'',
ySeriesCommon:[],
titleFontSize: 30,
}
},
mounted () {
this.initChart()
this.getData()
window.addEventListener('resize', this.screenAdapter)
this.screenAdapter()
},
unmounted () {
window.removeEventListener('resize', this.screenAdapter)
clearInterval(this.timerId)
},
computed: {
comtitleTextStyle () {
return {
... ... @@ -42,159 +25,290 @@ export default {
},
comtitleImgStyle () {
return {
// height: this.titleFontSize + 'px',
width: this.titleFontSize * 8 + 'px'
height: this.titleFontSize * 2.1 + 'px'
}
}
},
methods: {
initChart () {
this.chartInstance = echarts.init(document.getElementById('availability_ref'))
const initOption = {
grid: {
top: '25%',
left: '3%',
right: '6%',
bottom: '3%',
containLabel: true
},
legend: {
right: '2%',
top: '5%'
setup(props, {attrs, slots, emit}) {
const {proxy} = Vue.getCurrentInstance();
// 挂载完
Vue.onMounted(() => {
proxy.screenAdapter();
proxy.getData();
})
const getData=()=> {
$.get(proxy.domainName + proxy.apiUrl, function (res) {
const data = res;
if (data && data.data) {
let resData = data.data;
}
// proxy.optionInit();
})
proxy.optionInit();
}
const optionInit=()=>{
let data3=[350, 350, 350, 350, 350, 350, 350];
let data4=[220, 182, 191, 234, 290, 330, 310];
let data2=[100, 100, 100, 100, 100, 100, 100];
let data1=[12.3, 7.56, 66.6, 5.44, 66.6, 5.44,6.52];
let min1=proxy.calMin([data1,data2]);
let max1=proxy.calMax([data1,data2]);
let min2=proxy.calMin([data3,data4]);
let max2=proxy.calMax([data3,data4]);
//业务双y轴数据
proxy.ySeriesCommon=[
{
name:'可用性',
type: 'line',
smooth:true,
// stack: 'Total',
show:false,
data:data3,
yAxisIndex:1,
showSymbol:false,
itemStyle : {
normal : {
color:"#97d5f4",//tooltip里的小圆点颜色
lineStyle:{
color:'#97d5f4',
width:1
}
}
},
areaStyle: {
// color:'rgba(151,213,244,0.4)',
normal:{
color:new echarts.graphic.LinearGradient(0, 0, 0, .6, [{ //关键在这里, 设置面积渐变
offset: 0,
color: '#97d5f4' //这里是我设置的渐变的颜色从线条颜色变为透明
}, {
offset: 1,
color: 'rgba(151,213,244,0.1)'
}])
}
},
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLabel: {
textStyle: {
color: '#E6E8EB'
{
name:'成功率',
type: 'line',
smooth:true,
// stack: 'Total',
show:false,
data:data1,
yAxisIndex:0,
showSymbol:false,
itemStyle : {
normal : {
color:"#efe0a7",//tooltip里的小圆点颜色
lineStyle:{
color:'#efe0a7',
width:1
}
}
}
},
areaStyle: {
color:'rgba(239,224,167,0)'
},
},
yAxis: {
type: 'value',
splitLine: {
show: false
{
name:'响应率',
type: 'line',
smooth:true,
// stack: 'Total',
show:false,
data:data2,
yAxisIndex:0,
showSymbol:false,
itemStyle : {
normal : {
color:"#e5abd1",//tooltip里的小圆点颜色
lineStyle:{
color:'#e5abd1',
width:1
}
}
},
axisLabel: {
textStyle: {
color: '#E6E8EB'
areaStyle: {
color:'rgba(229,171,209,0)'
},
},
{
name:'交易量',
type: 'line',
smooth:true,
// stack: 'Total',
show:false,
data:data4,
yAxisIndex:1,
showSymbol:false,
itemStyle : {
normal : {
color:"#97aaff",//tooltip里的小圆点颜色
lineStyle:{
color:'#97aaff',
width:1,
}
}
}
},
areaStyle: {
color:'rgba(151,170,255,0)'
},
}
}
this.chartInstance.setOption(initOption)
},
getData () {
// await this.$http.get()
// const { data: ret } = await this.$http.get('responsemonitor')
// this.allData = ret
// console.log(ret)
this.updateChart()
this.startInterval()
},
updateChart () {
// 半透明的颜色值
const colorArr1 = [
'rgba(11, 168, 44, 0.5)',
'rgba(44, 110, 255, 0.5)',
'rgba(22, 242, 217, 0.5)',
'rgba(254, 33, 30, 0.5)',
'rgba(250, 105, 0, 0.5)'
]
// 全透明的颜色值
const colorArr2 = [
'rgba(11, 168, 44, 0)',
'rgba(44, 110, 255, 0)',
'rgba(22, 242, 217, 0)',
'rgba(254, 33, 30, 0)',
'rgba(250, 105, 0, 0)'
]
const timeArr = this.allData.xAxis.today
const seriesData = this.allData.polyline.data.data
const seriesName = this.allData.polyline.data.name
// 图例的数据
const legendArr = this.allData.polyline.data.data.map(item => {
return item.name
// let xAxisDataLength=proxy.ySeriesCommon[0].length;
let xAxisData=[];
for(let i=0;i<=24;i++){
if(i%4==0){
xAxisData.push(i+':00')
}
}
let legendData=[];
$.each(proxy.ySeriesCommon,function (i,v){
legendData.push(v.name)
})
console.log(legendArr)
const title = this.allData.polyline.title
const unit = this.allData.polyline.unit
const dataOption = {
// title: {
// text: '{Sunny| 业务可用性 }',
// show: true
// },
xAxis: {
data: timeArr
proxy.legendData=legendData;
proxy.optionData = {
title: {
text: ''
},
tooltip: {
trigger: 'axis',
backgroundColor:'rgba(50,50,50,0.7)',
borderColor:"#333",
textStyle:{
color:"#fff",
align:'left'
}
},
legend: {
data: legendArr
data: proxy.legendData,
itemHeight:0,//图例圆圈大小设置
y:'0px',
textStyle: {
color: '#ffffff',
fontsize:"12px"
}
},
dataZoom: {
show: false,
startValue: this.startValue,
endValue: this.endValue
grid: {
top:'15%',
left: '3%',
right: '4%',
// bottom: '3%',
containLabel: true,
},
series: [
xAxis: {
type: 'category',
boundaryGap: false,
data: xAxisData,
axisLine:{
show:false,//是否显示坐标线
},
axisTick: {
show: false //是否显示坐标刻度
},
axisLabel:{
color:'#ffffff',
},
},
yAxis:[
{
name: seriesName,
type: 'line',
data: seriesData,
smooth: true,
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: colorArr1[2]
}, // %0的颜色值
{
offset: 1,
color: colorArr2[2]
} // 100%的颜色值
])
type: 'value',
axisLabel: {
formatter: '{value} %'//以百分比显示
},
splitLine:{
lineStyle: {
color:'#0a1b31'
}
},
min:0,
max:100,
splitNumber:5,
interval:(100-0)/5
}, {
name: '单位:万',
type: 'value',
axisLabel: {
show: true,
interval: 'right',//居中显示
},
splitLine:{
lineStyle: {
color:'#0a1b31'
}
},
min:min2,
max:max2,
splitNumber:5,
interval:(max2-min2)/5
},
],
series: proxy.ySeriesCommon,
itemStyle:{
showSymbol:false
}
};
}
//计算最大值
const calMax=(arr)=>{
let max=0;
arr.forEach((el)=>{
el.forEach((el1)=>{
if(!(el1 === undefined || el1 === '')){
if(max<el1){
max=el1;
}
}
]
}
this.chartInstance.setOption(dataOption)
},
screenAdapter () {
this.titleFontSize = document.getElementById('availability_ref').offsetWidth / 100 * 3.6
const adapterOption = {
legend: {
itemWidth: this.titleFontSize,
itemHeight: this.titleFontSize,
itemGap: this.titleFontSize,
textStyle: {
fontSize: this.titleFontSize / 2
})
})
let maxint=Math.ceil(max/9.5);
let maxval=maxint * 10;//让显示的刻度是整数
return maxval;
}
//计算最小值
const calMin=(arr)=>{
let min=0;
arr.forEach((el)=>{
el.forEach((el1)=>{
if(!(el1 === undefined || el1 === '')){
if(min>el1){
min=el1;
}
}
}
}
this.chartInstance.setOption(adapterOption)
this.chartInstance.resize()
},
startInterval () {
if (this.timerId) {
clearInterval(this.timerId)
}
let index = 12
/*this.timerId = setInterval(() => {
this.startValue++
this.endValue++
// this.allData.polyline.data
// console.log((this.allData.polyline.data)[0].data.length)
if ((this.allData.polyline.data).length > 0) {
index = (this.allData.polyline.data)[0].data.length
}
if (this.endValue > index - 1) {
this.startValue = 0
this.endValue = 6
}
console.log(this.startValue)
console.log(this.endValue)
this.updateChart()
}, 5000)*/
})
})
let minint=Math.floor(min/10);
let minval=minint * 10;//让显示的刻度是整数
return minval;
}
const screenAdapter=()=>{
proxy.titleFontSize = document.getElementById('availability_ref').offsetWidth / 100 * 3.6
}
return{
calMax,
calMin,
optionInit,
getData,
screenAdapter
}
}
}
}
\ No newline at end of file
... ...
<div class="com-container">
<div class="com-chart" id="bandwidthcpu_ref"></div>
<div class="com-container"id="bandwidthcpu_ref">
<LineChart :optionData="optionData" v-if="optionData"></LineChart>
</div>
\ No newline at end of file
... ...
export default {
name: 'BandwidthCpu',
template: '',
components: {},
components: {
'LineChart': Vue.defineAsyncComponent(
() => myImport('views/zjdaping/components/lineChart/index')
)
},
data () {
return {
chartInstance: null,
optionData:'',
allData: {
polyline: {
title: "带宽占用监控",
... ... @@ -27,7 +31,6 @@ export default {
}
},
mounted () {
this.initChart()
this.getData()
window.addEventListener('resize', this.screenAdapter)
this.screenAdapter()
... ... @@ -37,46 +40,7 @@ export default {
clearInterval(this.timerId)
},
methods: {
initChart () {
this.chartInstance = echarts.init(document.getElementById('bandwidthcpu_ref'))
const initOption = {
grid: {
top: '15%',
left: '5%',
right: '4%',
bottom: '20%',
containLabel: true
},
legend: {
right: '10%',
top: '5%',
textStyle: {
color: 'wihte'
}
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLabel: {
textStyle: {
color: '#E6E8EB'
}
}
},
yAxis: {
type: 'value',
splitLine: {
show: false
},
axisLabel: {
textStyle: {
color: '#E6E8EB'
}
}
}
}
this.chartInstance.setOption(initOption)
},
async getData () {
// await this.$http.get()
// const { data: ret } = await this.$http.get('bandwidthcpu')
... ... @@ -88,17 +52,19 @@ export default {
updateChart () {
// 半透明的颜色值
const colorArr1 = [
'rgba(11, 168, 44, 0.5)',
'rgba(35, 255, 255, 0.5)',
'rgba(44, 110, 255, 0.5)',
'rgba(22, 242, 217, 0.5)',
'rgba(11, 168, 44, 0.5)',
'rgba(254, 33, 30, 0.5)',
'rgba(250, 105, 0, 0.5)'
]
// 全透明的颜色值
// 全透明的颜色值
const colorArr2 = [
'rgba(11, 168, 44, 0)',
'rgba(35, 255, 255, 0)',
'rgba(44, 110, 255, 0)',
'rgba(22, 242, 217, 0)',
'rgba(11, 168, 44, 0)',
'rgba(254, 33, 30, 0)',
'rgba(250, 105, 0, 0)'
]
... ... @@ -109,6 +75,16 @@ export default {
type: 'line',
data: item.data,
smooth: true,
showSymbol:false,
itemStyle : {
normal : {
color:colorArr1[index],//tooltip里的小圆点颜色
lineStyle:{
color:colorArr1[index],
width:2,
}
}
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
... ... @@ -129,29 +105,86 @@ export default {
})
const title = this.allData.polyline.title
const unit = this.allData.polyline.unit
const dataOption = {
const seriesData=seriesArr;
let xAxisData=timeArr;
this.optionData = {
title: {
text: title,
left: 'center',
bottom: '8%'
},
xAxis: {
data: timeArr
bottom: '8%',
textStyle: {
fontSize: this.titleFontSize*0.5,
color:'#ffffff'
}
},
yAxis: {
name: unit
tooltip: {
trigger: 'axis',
backgroundColor:'rgba(50,50,50,0.7)',
borderColor:"#333",
textStyle:{
color:"#fff",
align:'left'
}
},
legend: {
data: legendArr
data: legendArr,
itemHeight:0,//图例圆圈大小设置
right: '5%',
top: '5%',
textStyle: {
color: '#ffffff',
fontsize:"12px"
}
},
dataZoom: {
show: false,
startValue: this.startValue,
endValue: this.endValue
grid: {
top: '15%',
left: '3%',
right: '4%',
bottom: '20%',
containLabel: true
},
series: seriesArr
}
this.chartInstance.setOption(dataOption)
xAxis: {
type: 'category',
boundaryGap: false,
data: xAxisData,
axisLine:{
show:false,//是否显示坐标线
},
axisTick: {
show: false //是否显示坐标刻度
},
axisLabel:{
color:'#ffffff',
},
},
yAxis: {
type: 'value',
name:unit,
nameTextStyle:{
color:'#ffffff',
padding:[0,0,0,-20]
},
axisLabel: {
color:'#ffffff',
// formatter: '{value} %'//以百分比显示
},
axisLine:{
show:true,//是否显示坐标线
},
splitLine:{
lineStyle: {
color:'#0a1b31'
}
}
},
series: seriesData
};
},
screenAdapter () {
this.titleFontSize = document.getElementById('bandwidthcpu_ref').offsetWidth / 100 * 3.6
... ... @@ -182,8 +215,7 @@ export default {
}
}
}
this.chartInstance.setOption(adapterOption)
this.chartInstance.resize()
},
startInterval () {
if (this.timerId) {
... ...
<div class="com-container">
<div class="com-chart" id="volume_ref"></div>
<div class="busniess-box-title">
<img :style="comtitleImgStyle" src="./src/assets/img/box_title_bykk_zj_1.png" class="busniess-title-img"> <!-- bor1_6 -->
<span :style="comtitleTextStyle" class="busniess-title-size">本月业务量</span>
<img :style="comtitleImgStyle" src="./src/assets/images/digitalDp/title-volume.png" class="busniess-title-img"> <!-- bor1_6 -->
<!-- <span :style="comtitleTextStyle" class="busniess-title-size">本月业务量</span>-->
</div>
<div class="busniess-circle-text" :style="comcircletextStyle">
<div class="busniess-circle-left">今日<br/>业务量</div>
... ...
... ... @@ -4,6 +4,8 @@ export default {
components: {},
data () {
return {
domainName:sessionStorage.getItem('domainName'),
apiUrl:'/api-web/bigScreen/findPortfolio',//今日业务量
chartInstance: null,
allData: [{
name: "今日业务量",
... ... @@ -20,23 +22,24 @@ export default {
{ name: "网络发票",value: "712204", color: "#A35CFF"}
]
}],
colorData:['#0D45FE','#00FFB9','#A35CFF'],
titleFontSize: 30
}
},
computed: {
comtitleTextStyle () {
return {
fontSize: this.titleFontSize / 1.3 + 'px'
fontSize: this.titleFontSize / 1 + 'px'
}
},
comtitleImgStyle () {
return {
height: this.titleFontSize * 1.5 + 'px'
height: this.titleFontSize * 2.1 + 'px'
}
},
comcircletextStyle () {
return {
fontSize: this.titleFontSize / 1.8 + 'px'
fontSize: this.titleFontSize / 1.3 + 'px'
}
}
},
... ... @@ -58,7 +61,7 @@ export default {
top: '20%',
left: 'center',
textStyle: {
color: 'wihte'
color: '#ffffff'
}
}
}
... ... @@ -67,8 +70,21 @@ export default {
async getData () {
// await this.$http.get()
// const { data: ret } = await this.$http.get('volume')
// this.allData = ret
// console.log(ret)
const { data: ret } = await $.get(this.domainName +this.apiUrl)
//本月业务量
// const { data: ret1 } = await $.get(this.domainName +this.apiUrl1)
let retData=[];
retData.push({
name:'今日业务量',
data:ret
})
retData.push({
name:'本月业务量',
data:ret
})
this.allData = retData
console.log('111',this.allData)
this.updateChart()
},
updateChart () {
... ... @@ -82,28 +98,32 @@ export default {
console.log(inner)
dataArr.push({
name: inner.name,
value: inner.value,
itemStyle: {
color: inner.color
}
value: inner.num,
/*itemStyle: {
color: this.colorData[index]
}*/
})
})
return {
type: 'pie',
radius: ['28%', '42%'],
center: centerArr[index],
color:this.colorData,
itemStyle: {
borderRadius: 5,
borderRadius: 2,
borderWidth: 2
},
label: {
position: 'outer',
alignTo: 'labelLine',
formatter: '{c}'
formatter: '{c}',
color:'#ffffff'
},
data: dataArr
}
})
console.log("8**",seriesArr)
const dataOption = {
series: seriesArr
}
... ... @@ -132,10 +152,10 @@ export default {
// },
legend: {
itemWidth: this.titleFontSize * 1.5,
itemHeight: this.titleFontSize / 6,
itemHeight: this.titleFontSize / 4,
itemGap: this.titleFontSize * 2.5,
textStyle: {
fontSize: this.titleFontSize / 2
fontSize: this.titleFontSize / 1.3
}
}
}
... ...
<div class="com-container">
<div class="com-chart" id="declarecpu_ref"></div>
<div class="com-container" id="declarecpu_ref">
<LineChart :optionData="optionData" v-if="optionData"></LineChart>
<!-- <div class="com-chart" id="declarecpu_ref"></div>-->
</div>
\ No newline at end of file
... ...
export default {
name: 'ResponseMonitor',
template: '',
components: {},
components: {
'LineChart': Vue.defineAsyncComponent(
() => myImport('views/zjdaping/components/lineChart/index')
)
},
data () {
return {
chartInstance: null,
legendData:'',
optionData:'',
allData: {
polyline: {
title: "申报库CPU监控",
... ... @@ -22,94 +27,88 @@ export default {
}
},
startValue: 0, // 区域缩放的起点值
endValue: 6, // 区域缩放的终点值
timerId: null // 定时器的标识
endValue: 9, // 区域缩放的终点值
timerId: null, // 定时器的标识
titleFontSize: 30,
curve: 'KPIDA0ACBBP',
rateTitle: 'KPIDA0ACBBK',
numerTitle: 'KPIDA0ACBBG'
}
},
mounted () {
this.initChart()
this.getData()
this.getData(this)
window.addEventListener('resize', this.screenAdapter)
this.screenAdapter()
},
unmounted () {
window.removeEventListener('resize', this.screenAdapter)
// window.removeEventListener('resize', this.screenAdapter)
clearInterval(this.timerId)
},
methods: {
initChart () {
// this.chartInstance = this.$echarts.init(this.$refs.declarecpu_ref, 'chalk')
this.chartInstance = echarts.init(document.getElementById('declarecpu_ref'))
const initOption = {
grid: {
top: '15%',
left: '3%',
right: '4%',
bottom: '20%',
containLabel: true
},
legend: {
right: '10%',
top: '5%',
textStyle: {
color: 'wihte'
}
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLabel: {
textStyle: {
color: '#E6E8EB'
}
}
},
yAxis: {
type: 'value',
splitLine: {
show: false
},
axisLabel: {
textStyle: {
color: '#E6E8EB'
}
}
getData (that) {
const { proxy } = Vue.getCurrentInstance();
/* var params = {
curve: that.curve,
rateTitle: that.rateTitle,
numerTitle: that.numerTitle
};
proxy.$http.get("/api-web/bigScreen/declarePolyline", params, function (res) {
if(res.success){
console.log('9**',res.obj)
that.allData = res.obj;
that.updateChart()
}
}
this.chartInstance.setOption(initOption)
},
async getData () {
// await this.$http.get()
// const { data: ret } = await this.$http.get('declarecpu')
// this.allData = ret
// console.log(ret)
this.updateChart()
this.startInterval()
});*/
that.updateChart()
},
updateChart () {
// 半透明的颜色值
const colorArr1 = [
'rgba(11, 168, 44, 0.5)',
'rgba(35, 255, 255, 0.5)',
'rgba(44, 110, 255, 0.5)',
'rgba(22, 242, 217, 0.5)',
'rgba(11, 168, 44, 0.5)',
'rgba(254, 33, 30, 0.5)',
'rgba(250, 105, 0, 0.5)'
]
// 全透明的颜色值
// 全透明的颜色值
const colorArr2 = [
'rgba(11, 168, 44, 0)',
'rgba(35, 255, 255, 0)',
'rgba(44, 110, 255, 0)',
'rgba(22, 242, 217, 0)',
'rgba(11, 168, 44, 0)',
'rgba(254, 33, 30, 0)',
'rgba(250, 105, 0, 0)'
]
const timeArr = this.allData.xAxis.today
const seriesArr = this.allData.polyline.data.map((item, index) => {
return {
const seriesArr = this.allData.polyline.data;
this.declareNumer = this.allData.polyline.declareNumer
let seriesData=[];
$.each(seriesArr,function (index,item){
seriesData .push({
name: item.name,
type: 'line',
data: item.data,
smooth: true,
showSymbol:false,
itemStyle : {
normal : {
color:colorArr1[index],//tooltip里的小圆点颜色
lineStyle:{
color:colorArr1[index],
width:2,
}
}
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
... ... @@ -122,84 +121,130 @@ export default {
} // 100%的颜色值
])
}
}
})
})
// 图例的数据
const legendArr = this.allData.polyline.data.map(item => {
return item.name
})
const title = this.allData.polyline.title
const unit = this.allData.polyline.unit
const dataOption = {
//x轴数据
// let xAxisDataLength=seriesData.length;
// let xAxisData=[];
// for(let i=1;i<=xAxisDataLength;i++){
// xAxisData.push(i)
// }
let xAxisData=timeArr;
this.optionData = {
title: {
text: title,
text: '申报库CPU监控',
left: 'center',
bottom: '8%'
},
xAxis: {
data: timeArr
bottom: '8%',
textStyle: {
fontSize: this.titleFontSize*0.5,
color:'#ffffff'
}
},
yAxis: {
name: unit
tooltip: {
trigger: 'axis',
backgroundColor:'rgba(50,50,50,0.7)',
borderColor:"#333",
textStyle:{
color:"#fff",
align:'left'
}
},
legend: {
data: legendArr
},
dataZoom: {
show: false,
startValue: this.startValue,
endValue: this.endValue
},
series: seriesArr
}
this.chartInstance.setOption(dataOption)
},
screenAdapter () {
this.titleFontSize = document.getElementById('declarecpu_ref').offsetWidth / 100 * 3.6
const adapterOption = {
title: {
data: legendArr,
itemHeight:0,//图例圆圈大小设置
right: '5%',
top: '5%',
textStyle: {
fontSize: this.titleFontSize,
color: 'white'
color: '#ffffff',
fontsize:"12px"
}
},
grid: {
top: '15%',
left: '3%',
right: '4%',
bottom: '20%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: xAxisData,
axisLine:{
show:false,//是否显示坐标线
},
axisTick: {
show: false //是否显示坐标刻度
},
axisLabel:{
color:'#ffffff',
},
},
yAxis: {
top: this.titleFontSize,
nameTextStyle: {
padding: [0, 0, -(this.titleFontSize / 2), -(this.titleFontSize)], // 修改位置
fontSize: this.titleFontSize / 2,
color: 'white'
type: 'value',
name:'cpu%',
nameTextStyle:{
color:'#ffffff',
padding:[0,0,0,-20]
},
axisLabel: {
color:'#ffffff',
// formatter: '{value} %'//以百分比显示
},
axisLine:{
show:true,//是否显示坐标线
},
splitLine:{
lineStyle: {
color:'#0a1b31'
}
}
},
series: seriesData
};
},
screenAdapter () {
this.titleFontSize = document.getElementById('declarecpu_ref').offsetWidth / 100 * 3.6
console.log(this.titleFontSize)
const adapterOption = {
legend: {
itemWidth: this.titleFontSize,
itemHeight: this.titleFontSize,
itemGap: this.titleFontSize,
textStyle: {
fontSize: this.titleFontSize / 1.5
fontSize: this.titleFontSize / 2
}
}
}
this.chartInstance.setOption(adapterOption)
this.chartInstance.resize()
},
startInterval () {
if (this.timerId) {
clearInterval(this.timerId)
}
let index = 12
let index = 10
/*this.timerId = setInterval(() => {
this.startValue++
this.endValue++
if ((this.allData.polyline.data).length > 0) {
index = (this.allData.polyline.data)[0].data.length
if (this.allData.polyline.data.data.length > 0) {
index = this.allData.polyline.data.data.length
}
if (this.endValue > index - 1) {
this.startValue = 0
this.endValue = 6
this.endValue = 9
}
console.log(this.startValue)
console.log(this.endValue)
this.updateChart()
}, 5000)*/
}
... ...
<div class="com-container">
<div class="com-chart" id="declarepolyline_ref"></div>
<div class="declarepolyline-title" :style="comtitlesizeStyle">
<el-row>
<el-col :span="24">
<div class="grid-content bg-purple-dark">
<img src="./src/assets/img/icon-ysb.png" :style="comimgsizeStyle">
<span>本月应申报</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="grid-content bg-purple-dark" :style="comtitletextStyle">
{{declareNumer}}
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="grid-content bg-purple-dark">
<img src="./src/assets/img/icon-sbl.png" :style="comimgsizeStyle">
<span>本月申报率</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="grid-content bg-purple-dark" :style="comtitletextStyle">
<span>{{declareRateLeft}}</span><span :style="comboxtextStyle">{{declareRateRight}}</span>
</div>
</el-col>
</el-row>
</div>
<LineChart :optionData="optionData" v-if="optionData"></LineChart>
</div>
\ No newline at end of file
... ...
export default {
name: 'declarePolyline',
template: '',
components: {},
components: {
'LineChart': Vue.defineAsyncComponent(
() => myImport('views/zjdaping/components/lineChart/index')
)
},
data () {
return {
chartInstance: null,
chartId:'declarepolyline_ref',
yAxisCommon:'',
ySeriesCommon:'',
legendData:'',
optionData:'',
// allData: {
// polyline: {
// data: {
... ... @@ -58,53 +67,17 @@ export default {
}
},
mounted () {
this.initChart()
this.getData(this)
window.addEventListener('resize', this.screenAdapter)
this.screenAdapter()
// window.addEventListener('resize', this.screenAdapter)
// this.screenAdapter()
},
unmounted () {
window.removeEventListener('resize', this.screenAdapter)
// window.removeEventListener('resize', this.screenAdapter)
clearInterval(this.timerId)
},
methods: {
initChart () {
this.chartInstance = echarts.init(document.getElementById('declarepolyline_ref'))
const initOption = {
grid: {
top: '10%',
left: '1%',
right: '30%',
bottom: '1%',
containLabel: true
},
legend: {
right: '2%',
top: '5%'
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLabel: {
textStyle: {
color: '#E6E8EB'
}
}
},
yAxis: {
type: 'value',
splitLine: {
show: false
},
axisLabel: {
textStyle: {
color: '#E6E8EB'
}
}
}
}
this.chartInstance.setOption(initOption)
},
getData (that) {
const { proxy } = Vue.getCurrentInstance();
var params = {
... ... @@ -114,10 +87,10 @@ export default {
};
proxy.$http.get("/api-web/bigScreen/declarePolyline", params, function (res) {
if(res.success){
console.log(res.obj)
console.log('9**',res.obj)
that.allData = res.obj;
that.updateChart()
that.startInterval()
// that.startInterval()
}
});
... ... @@ -128,6 +101,7 @@ export default {
'rgba(11, 168, 44, 0.5)',
'rgba(44, 110, 255, 0.5)',
'rgba(22, 242, 217, 0.5)',
'rgba(35, 255, 255, 0.5)',
'rgba(254, 33, 30, 0.5)',
'rgba(250, 105, 0, 0.5)'
]
... ... @@ -136,6 +110,7 @@ export default {
'rgba(11, 168, 44, 0)',
'rgba(44, 110, 255, 0)',
'rgba(22, 242, 217, 0)',
'rgba(35, 255, 255, 0)',
'rgba(254, 33, 30, 0)',
'rgba(250, 105, 0, 0)'
]
... ... @@ -152,40 +127,96 @@ export default {
const legendArr = this.allData.polyline.data.data.map(item => {
return item.name
})
const dataOption = {
xAxis: {
data: timeArr
//x轴数据
let xAxisDataLength=seriesData.length;
let xAxisData=[];
for(let i=1;i<=xAxisDataLength;i++){
xAxisData.push(i)
}
this.optionData = {
title: {
text: ''
},
tooltip: {
trigger: 'axis',
backgroundColor:'rgba(50,50,50,0.7)',
borderColor:"#333",
textStyle:{
color:"#fff",
align:'left'
}
},
legend: {
data: legendArr
data: legendArr,
itemHeight:0,//图例圆圈大小设置
y:'7px',
textStyle: {
color: '#ffffff',
fontsize:"12px"
}
},
dataZoom: {
show: false,
startValue: this.startValue,
endValue: this.endValue
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true,
},
xAxis: {
type: 'category',
boundaryGap: false,
data: xAxisData,
axisLine:{
show:false,//是否显示坐标线
},
axisTick: {
show: false //是否显示坐标刻度
},
axisLabel:{
color:'#ffffff',
},
},
series: [
{
name: seriesName,
type: 'line',
data: seriesData,
smooth: true,
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: colorArr1[1]
}, // %0的颜色值
{
offset: 1,
color: colorArr2[1]
} // 100%的颜色值
])
yAxis: {
axisLabel: {
color:'#ffffff',
formatter: '{value} %'//以百分比显示
},
splitLine:{
lineStyle: {
color:'#0a1b31'
}
},
},
series: {
name: seriesName,
type: 'line',
data: seriesData,
smooth: true,
showSymbol:false,
color:'#01E6E6',
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: colorArr1[3]
}, // %0的颜色值
{
offset: 1,
color: colorArr2[3]
} // 100%的颜色值
])
}
]
}
this.chartInstance.setOption(dataOption)
},
itemStyle:{
showSymbol:false
}
};
},
screenAdapter () {
this.titleFontSize = document.getElementById('declarepolyline_ref').offsetWidth / 100 * 3.6
... ...
<div class="declare-report">
<div class="declare-report-top" :style="comtitlesizeStyle">
<el-row>
<el-col :span="24">
<div class="grid-content bg-purple-dark">
<img src="./src/assets/images/digitalDp/icon-ysb.png" :style="comimgsizeStyle">
<span class="title-ysb">本月应申报</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="grid-content bg-purple-dark declare-report-num" :style="comtitletextStyle">
{{declareNumer}}
</div>
</el-col>
</el-row>
</div>
<div class="declare-report-bottom">
<el-row>
<el-col :span="24">
<div class="grid-content bg-purple-dark rate-title">
<!-- <img src="./src/assets/img/icon-sbl.png" :style="comimgsizeStyle">-->
<span>本月申报率</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="grid-content bg-purple-dark rate-container" :style="comtitletextStyle">
<div class="rate-num">
<span>{{declareRateLeft}}</span><span :style="comboxtextStyle">{{declareRateRight}}</span>
</div>
</div>
</el-col>
</el-row>
</div>
</div>
\ No newline at end of file
... ...
export default {
name: 'declarePolyline',
template: '',
components: {},
data () {
return {
allData:{},
titleFontSize: 30,
declareRate: '0%',
declareRateLeft: 0,
declareRateRight: '%',
declareNumer: 0,
curve: 'KPIDA0ACBBP',
rateTitle: 'KPIDA0ACBBK',
numerTitle: 'KPIDA0ACBBG'
}
},
computed: {
comtitletextStyle () {
return {
color: '#23ffff',
fontSize: this.titleFontSize / 1.2 + 'px'
}
},
comtitlesizeStyle () {
return {
fontSize: this.titleFontSize / 2 + 'px'
}
},
comimgsizeStyle () {
return {
width: this.titleFontSize / 1.5 + 'px'
}
},
comboxtextStyle () {
return {
fontSize: this.titleFontSize / 3 + 'px'
}
}
},
mounted () {
this.getData(this)
},
methods: {
getData (that) {
const { proxy } = Vue.getCurrentInstance();
var params = {
curve: that.curve,
rateTitle: that.rateTitle,
numerTitle: that.numerTitle
};
proxy.$http.get("/api-web/bigScreen/declarePolyline", params, function (res) {
if(res.success){
console.log('111',res.obj)
that.allData = res.obj;
const declareRate = that.allData.polyline.declareRate
if(declareRate.indexOf('.') > 0){
that.declareRateLeft = declareRate.split('.')[0] + '.'
that.declareRateRight = declareRate.split('.')[1]
}
that.declareNumer = that.allData.polyline.declareNumer
}
});
}
}
}
... ...
... ... @@ -4,65 +4,39 @@
<el-col :span="24">
<div class="grid-content bg-purple-dark com-box-title">
<span>
<img :style="comtitlesizeStyle" class="deduction-box-title" src="./src/assets/img/box_title_bykk_zj_1.png"> <!-- bor1_6 -->
<span :style="comtitleTextStyle" class="deduction-title-size">本月扣款情况</span>
<img :style="comtitlesizeStyle" class="deduction-box-title" src="./src/assets/images/digitalDp/box_title_bykk_zj_1.png"> <!-- bor1_6 -->
<!-- <span :style="comtitleTextStyle" class="deduction-title-size">本月扣款情况</span>-->
</span>
</div>
</el-col>
</el-row>
<el-col :span="24">
<div class="grid-content bg-purple-dark com-box-title">
<span>
<img class="deduction-box-img-left" :style="comboximgleftStyle" src="./src/assets/img/box_bykk_zj.png"> <!-- bor1_6 -->
<div class="deduction-box-text-left" :style="comnumberTextStyle">
<div>
<span class="deduction-text-number">{{deductionAmount}}</span>
<span :style="comnumberUnitStyle">亿元</span>
</div>
<div>本月扣款金额</div>
<el-row>
<el-col :span="24">
<div class="grid-content bg-purple-dark com-box-title">
<div class="deduction-num-container">
<img class="deduction-box-img-left" :style="comboximgleftStyle" src="./src/assets/img/box_bykk_zj.png"> <!-- bor1_6 -->
<div class="deduction-box-text-left" :style="comnumberTextStyle">
<div>
<span class="deduction-text-number">{{deductionAmount}}</span>
<span :style="comnumberUnitStyle">亿元</span>
</div>
<div>本月扣款金额</div>
</div>
</div>
</span>
<span>
<img class="deduction-box-img-right" :style="comboximgrightStyle" src="./src/assets/img/box_bykk_zj.png">
<div class="deduction-box-text-right" :style="comnumberTextStyle">
<div>
<span class="deduction-text-number">&nbsp;&nbsp;&nbsp;{{deductionNumber}}</span>
<span :style="comnumberUnitStyle">万笔</span>
</div>
<div>本月扣款笔数</div>
<div class="deduction-num-container">
<img class="deduction-box-img-right" :style="comboximgrightStyle" src="./src/assets/img/box_bykk_zj.png">
<div class="deduction-box-text-right" :style="comnumberTextStyle">
<div>
<span class="deduction-text-number">&nbsp;&nbsp;&nbsp;{{deductionNumber}}</span>
<span :style="comnumberUnitStyle">万笔</span>
</div>
<div>本月扣款笔数</div>
</div>
</div>
</span>
</div>
</el-col>
<!-- <el-row>-->
<!-- <el-col :span="12">-->
<!-- <div class="grid-content bg-purple com-box">-->
<!-- <span >-->
<!-- <img :style="comboximgleftStyle" src="./src/assets/img/box_bykk_zj.png"> &lt;!&ndash; bor1_6 &ndash;&gt;-->
<!-- <div class="deduction-box-text-left" :style="comnumberTextStyle">-->
<!-- <div>-->
<!-- <span class="deduction-text-number">{{deductionAmount}}</span>-->
<!-- <span :style="comnumberUnitStyle">亿元</span>-->
<!-- </div>-->
<!-- <div>本月扣款金额</div>-->
<!-- </div>-->
<!-- </span>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <div class="grid-content bg-purple-light">-->
<!-- <span >-->
<!-- <img :style="comboximgrightStyle" src="./src/assets/img/box_bykk_zj.png">-->
<!-- <div class="deduction-box-text-right" :style="comnumberTextStyle">-->
<!-- <div>-->
<!-- <span class="deduction-text-number">&nbsp;&nbsp;&nbsp;{{deductionNumber}}</span>-->
<!-- <span :style="comnumberUnitStyle">万笔</span>-->
<!-- </div>-->
<!-- <div>本月扣款笔数</div>-->
<!-- </div>-->
<!-- </span>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
</div>
</el-col>
</el-row>
</div>
</div>
\ No newline at end of file
... ...
... ... @@ -6,7 +6,7 @@ export default {
return {
chartInstance: null,
allData: null,
titleFontSize: 20,
titleFontSize: 30,
// 扣款金额
deductionAmount: '0.00',
// 扣款笔数
... ... @@ -19,41 +19,41 @@ export default {
computed: {
comboximgleftStyle () {
return {
height: this.titleFontSize * 3.5 + 'px',
marginTop: this.titleFontSize * 2.5 + 'px',
marginLeft: this.titleFontSize + 'px'
height: this.titleFontSize * 12.5 + 'px',
// marginTop: this.titleFontSize * 3.5 + 'px',
// marginLeft: this.titleFontSize + 'px'
}
},
comboximgrightStyle () {
return {
height: this.titleFontSize * 3.5 + 'px',
marginTop: this.titleFontSize * 2.5 + 'px'
height: this.titleFontSize * 12.5 + 'px',
// marginTop: this.titleFontSize * 3.5 + 'px'
}
},
comcontextStyle () {
return {
fontSize: this.titleFontSize + 'px'
fontSize: this.titleFontSize *3.5 + 'px'
}
},
comtitlesizeStyle () {
return {
height: this.titleFontSize * 1.5 + 'px',
height: this.titleFontSize * 8.5 + 'px',
// width: this.titleFontSize * 6 + 'px'
}
},
comtitleTextStyle () {
return {
fontSize: this.titleFontSize / 1.3 + 'px'
fontSize: this.titleFontSize *3.3 + 'px'
}
},
comnumberTextStyle () {
return {
fontSize: this.titleFontSize / 1.2 + 'px'
fontSize: this.titleFontSize *3.2 + 'px'
}
},
comnumberUnitStyle () {
return {
fontSize: this.titleFontSize / 2 + 'px'
fontSize: this.titleFontSize * 2 + 'px'
}
}
},
... ...
<div class="com-container">
<div class="com-chart" id="digitalboard_down_ref">
<div style="margin-top: 2%" :style="comcontextStyle">
<el-row>
<div style="margin-bottom: 2%" :style="comcontextStyle">
<el-row class="width-86">
<el-col :span="12">
<div class="grid-content bg-purple">
<span>
<div class="grid-content bg-purple" style="text-align:left;">
<span >
<!--title_box_1.png-->
<img :style="comTitleimgStyle" src="./src/assets/img/title_box_middle.png">
<span class="span-box-title" :style="comTitleSizeStyle">{{leftTitle}}</span>
... ... @@ -18,77 +18,77 @@
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<!-- <el-col :span="3">
<div class="grid-content bg-purple com-box">
<span >
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 2.5%;color: #FEFEFE;" v-if="mustBitFalg > 0">{{mustBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 2.5%;color: #97969B;" v-if="mustBitFalg == 0">{{mustBit}}</span>
</span>
</div>
</el-col>
</el-col>-->
<el-col :span="3">
<div class="grid-content bg-purple-light com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 15%;color: #FEFEFE;" v-if="millionBitFalg > 0">{{millionBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 15%;color: #97969B;" v-if="millionBitFalg == 0">{{millionBit}}</span>
<span :style="comcommaStyle" style=" left: 24%;" v-if="isOneCommaShow">,</span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 3%;color: #FEFEFE;" v-if="millionBitFalg > 0">{{millionBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 3%;color: #97969B;" v-if="millionBitFalg == 0">{{millionBit}}</span>
<span :style="comcommaStyle" style=" left: 11.5%;" v-if="isOneCommaShow">,</span>
</span>
</div>
</el-col>
<el-col :span="3">
<div class="grid-content bg-purple com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 27.5%;color: #FEFEFE;" v-if="hundredThousandBitFalg > 0">{{hundredThousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 27.5%;color: #97969B;" v-if="hundredThousandBitFalg == 0">{{hundredThousandBit}}</span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 15.5%;color: #FEFEFE;" v-if="hundredThousandBitFalg > 0">{{hundredThousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 15.5%;color: #97969B;" v-if="hundredThousandBitFalg == 0">{{hundredThousandBit}}</span>
</span>
</div>
</el-col>
<el-col :span="3">
<div class="grid-content bg-purple-light com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 40%;color: #FEFEFE;" v-if="tenThousandBitFalg > 0">{{tenThousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 40%;color: #97969B;" v-if="tenThousandBitFalg == 0">{{tenThousandBit}}</span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 28%;color: #FEFEFE;" v-if="tenThousandBitFalg > 0">{{tenThousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 28%;color: #97969B;" v-if="tenThousandBitFalg == 0">{{tenThousandBit}}</span>
</span>
</div>
</el-col>
<el-col :span="3">
<div class="grid-content bg-purple com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 52.5%;color: #FEFEFE;" v-if="thousandBitFalg > 0">{{thousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 52.5%;color: #97969B;" v-if="thousandBitFalg == 0">{{thousandBit}}</span>
<span :style="comcommaStyle" style="left: 61.5%;" v-if="isTwoCommaShow">,</span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 40.5%;color: #FEFEFE;" v-if="thousandBitFalg > 0">{{thousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 40.5%;color: #97969B;" v-if="thousandBitFalg == 0">{{thousandBit}}</span>
<span :style="comcommaStyle" style="left: 49%;" v-if="isTwoCommaShow">,</span>
</span>
</div>
</el-col>
<el-col :span="3">
<div class="grid-content bg-purple-light com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 65%;color: #FEFEFE;" v-if="hundredBitFalg > 0">{{hundredBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 65%;color: #97969B;" v-if="hundredBitFalg == 0">{{hundredBit}}</span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 53%;color: #FEFEFE;" v-if="hundredBitFalg > 0">{{hundredBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 53%;color: #97969B;" v-if="hundredBitFalg == 0">{{hundredBit}}</span>
</span>
</div>
</el-col>
<el-col :span="3">
<div class="grid-content bg-purple com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 77.5%;color: #FEFEFE;" v-if="tenBitFalg > 0">{{tenBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 77.5%;color: #97969B;" v-if="tenBitFalg == 0">{{tenBit}}</span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 66.5%;color: #FEFEFE;" v-if="tenBitFalg > 0">{{tenBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 66.5%;color: #97969B;" v-if="tenBitFalg == 0">{{tenBit}}</span>
</span>
</div>
</el-col>
<el-col :span="3">
<div class="grid-content bg-purple-light com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 90%;color: #FEFEFE;" v-if="bitBitFalg > 0">{{bitBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 90%;color: #97969B;" v-if="bitBitFalg == 0">{{bitBit}}</span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 78%;color: #FEFEFE;" v-if="bitBitFalg > 0">{{bitBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 78%;color: #97969B;" v-if="bitBitFalg == 0">{{bitBit}}</span>
</span>
</div>
</el-col>
... ...
... ... @@ -67,7 +67,7 @@ export default {
fontSize: this.titleFontSize * 3.5 + 'px',
top: '9%',
position: 'absolute',
fontFamily: 'yjsz'
fontFamily: 'DSDIG'
}
},
comcommaStyle () {
... ... @@ -76,7 +76,7 @@ export default {
color: '#FEFEFE',
fontSize: this.titleFontSize * 3 + 'px',
top: '28%',
fontFamily: 'yjsz'
fontFamily: 'DSDIG'
}
}
... ... @@ -161,7 +161,7 @@ export default {
}
// 右边数
if(map.rightNumber){
that.undeclaredAmountNumber = map.rightNumber
that.undeclaredAmountNumber = that.numberFilter(map.rightNumber,-1)
}
that.initChart()
that.updateChart()
... ... @@ -182,6 +182,30 @@ export default {
this.declaredAmountNumber += 10
this.initChart()
}, 2000)
},
numberFilter(val,places = 2) {
//value为传进来的数据 比如 12345.6789
//places 为需要保留的小数位数 -1为清空小数 0为保留全部位数的小数 传入多少即为多少 不传默认保留两位小数 传进来多少就截取多少
//数据校验
if (parseFloat(val).toString() == 'NaN') return '0.00'
// 将数值截取
let num = val.toString().split('.')
let zs = num[0]
let xs = num[1]
// 整数部分处理,增加,
const intPartFormat = zs.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
console.log("444",intPartFormat)
if (xs != null) {
if(places == 0){
return intPartFormat + '.' + xs
}else if(places == -1){
return intPartFormat
}else{
return intPartFormat +'.' + xs.substr(0,places)
}
} else {
return intPartFormat
}
}
}
... ...
<div class="com-container">
<div class="com-chart" id="digitalboard_top_ref">
<div style="margin-top: 2%" :style="comcontextStyle">
<el-row>
<div style="margin-bottom: 3%" :style="comcontextStyle">
<el-row class="width-86">
<el-col :span="12">
<div class="grid-content bg-purple">
<div class="grid-content bg-purple" style="text-align:left;">
<span>
<!--title_box_1.png-->
<img :style="comTitleimgStyle" src="./src/assets/img/title_box_middle.png">
... ... @@ -18,77 +18,77 @@
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<!-- <el-col :span="3">
<div class="grid-content bg-purple com-box">
<span >
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 2.5%;color: #FEFEFE;" v-if="mustBitFalg > 0">{{mustBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 2.5%;color: #97969B;" v-if="mustBitFalg == 0">{{mustBit}}</span>
</span>
</div>
</el-col>
</el-col>-->
<el-col :span="3">
<div class="grid-content bg-purple-light com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 15%;color: #FEFEFE;" v-if="millionBitFalg > 0">{{millionBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 15%;color: #97969B;" v-if="millionBitFalg == 0">{{millionBit}}</span>
<span :style="comcommaStyle" style=" left: 24%;" v-if="isOneCommaShow">,</span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 3%;color: #FEFEFE;" v-if="millionBitFalg > 0">{{millionBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 3%;color: #97969B;" v-if="millionBitFalg == 0">{{millionBit}}</span>
<span :style="comcommaStyle" style=" left: 11.5%;" v-if="isOneCommaShow">,</span>
</span>
</div>
</el-col>
<el-col :span="3">
<div class="grid-content bg-purple com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 27.5%;color: #FEFEFE;" v-if="hundredThousandBitFalg > 0">{{hundredThousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 27.5%;color: #97969B;" v-if="hundredThousandBitFalg == 0">{{hundredThousandBit}}</span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 15.5%;color: #FEFEFE;" v-if="hundredThousandBitFalg > 0">{{hundredThousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 15.5%;color: #97969B;" v-if="hundredThousandBitFalg == 0">{{hundredThousandBit}}</span>
</span>
</div>
</el-col>
<el-col :span="3">
<div class="grid-content bg-purple-light com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 40%;color: #FEFEFE;" v-if="tenThousandBitFalg > 0">{{tenThousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 40%;color: #97969B;" v-if="tenThousandBitFalg == 0">{{tenThousandBit}}</span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 28%;color: #FEFEFE;" v-if="tenThousandBitFalg > 0">{{tenThousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 28%;color: #97969B;" v-if="tenThousandBitFalg == 0">{{tenThousandBit}}</span>
</span>
</div>
</el-col>
<el-col :span="3">
<div class="grid-content bg-purple com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 52.5%;color: #FEFEFE;" v-if="thousandBitFalg > 0">{{thousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 52.5%;color: #97969B;" v-if="thousandBitFalg == 0">{{thousandBit}}</span>
<span :style="comcommaStyle" style="left: 61.5%;" v-if="isTwoCommaShow">,</span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 40.5%;color: #FEFEFE;" v-if="thousandBitFalg > 0">{{thousandBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 40.5%;color: #97969B;" v-if="thousandBitFalg == 0">{{thousandBit}}</span>
<span :style="comcommaStyle" style="left: 49%;" v-if="isTwoCommaShow">,</span>
</span>
</div>
</el-col>
<el-col :span="3">
<div class="grid-content bg-purple-light com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 65%;color: #FEFEFE;" v-if="hundredBitFalg > 0">{{hundredBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 65%;color: #97969B;" v-if="hundredBitFalg == 0">{{hundredBit}}</span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 53%;color: #FEFEFE;" v-if="hundredBitFalg > 0">{{hundredBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 53%;color: #97969B;" v-if="hundredBitFalg == 0">{{hundredBit}}</span>
</span>
</div>
</el-col>
<el-col :span="3">
<div class="grid-content bg-purple com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 77.5%;color: #FEFEFE;" v-if="tenBitFalg > 0">{{tenBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 77.5%;color: #97969B;" v-if="tenBitFalg == 0">{{tenBit}}</span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 66.5%;color: #FEFEFE;" v-if="tenBitFalg > 0">{{tenBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 66.5%;color: #97969B;" v-if="tenBitFalg == 0">{{tenBit}}</span>
</span>
</div>
</el-col>
<el-col :span="3">
<div class="grid-content bg-purple-light com-box">
<span>
<img :style="comboximgStyle" src="./src/assets/img/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 90%;color: #FEFEFE;" v-if="bitBitFalg > 0">{{bitBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 90%;color: #97969B;" v-if="bitBitFalg == 0">{{bitBit}}</span>
<img :style="comboximgStyle" src="./src/assets/images/digitalDp/bit_box_2.png">
<span class="com-box-value" :style="combitnumberStyle" style="left: 78%;color: #FEFEFE;" v-if="bitBitFalg > 0">{{bitBit}}</span>
<span class="com-box-value" :style="combitnumberStyle" style="left: 78%;color: #97969B;" v-if="bitBitFalg == 0">{{bitBit}}</span>
</span>
</div>
</el-col>
... ...
... ... @@ -67,7 +67,7 @@ export default {
fontSize: this.titleFontSize * 3.5 + 'px',
top: '9%',
position: 'absolute',
fontFamily: 'yjsz'
fontFamily: 'DSDIG'
}
},
comcommaStyle () {
... ... @@ -76,7 +76,7 @@ export default {
color: '#FEFEFE',
fontSize: this.titleFontSize * 3 + 'px',
top: '28%',
fontFamily: 'yjsz'
fontFamily: 'DSDIG'
}
}
... ... @@ -163,7 +163,7 @@ export default {
// 右边数
console.log(map.rightNumber)
if(map.rightNumber){
that.undeclaredAmountNumber = map.rightNumber
that.undeclaredAmountNumber = that.numberFilter(map.rightNumber,-1)
}
that.initChart()
that.updateChart()
... ... @@ -184,6 +184,30 @@ export default {
this.declaredAmountNumber += 10
this.initChart()
}, 2000)
},
numberFilter(val,places = 2) {
//value为传进来的数据 比如 12345.6789
//places 为需要保留的小数位数 -1为清空小数 0为保留全部位数的小数 传入多少即为多少 不传默认保留两位小数 传进来多少就截取多少
//数据校验
if (parseFloat(val).toString() == 'NaN') return '0.00'
// 将数值截取
let num = val.toString().split('.')
let zs = num[0]
let xs = num[1]
// 整数部分处理,增加,
const intPartFormat = zs.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
console.log("444",intPartFormat)
if (xs != null) {
if(places == 0){
return intPartFormat + '.' + xs
}else if(places == -1){
return intPartFormat
}else{
return intPartFormat +'.' + xs.substr(0,places)
}
} else {
return intPartFormat
}
}
}
... ...
<div class="com-container">
<div class="com-chart" id="documentcpu_ref"></div>
<div class="com-container" id="documentcpu_ref">
<LineChart :optionData="optionData" v-if="optionData"></LineChart>
</div>
\ No newline at end of file
... ...
export default {
name: 'DocumentCpu',
template: '',
components: {},
components: {
'LineChart': Vue.defineAsyncComponent(
() => myImport('views/zjdaping/components/lineChart/index')
)
},
data () {
return {
chartInstance: null,
optionData:'',
allData: {
polyline: {
title: "文书库CPU监控",
... ... @@ -27,7 +31,6 @@ export default {
}
},
mounted () {
this.initChart()
this.getData()
window.addEventListener('resize', this.screenAdapter)
this.screenAdapter()
... ... @@ -37,46 +40,7 @@ export default {
clearInterval(this.timerId)
},
methods: {
initChart () {
this.chartInstance = echarts.init(document.getElementById('documentcpu_ref'))
const initOption = {
grid: {
top: '15%',
left: '3%',
right: '4%',
bottom: '20%',
containLabel: true
},
legend: {
right: '10%',
top: '5%',
textStyle: {
color: 'wihte'
}
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLabel: {
textStyle: {
color: '#E6E8EB'
}
}
},
yAxis: {
type: 'value',
splitLine: {
show: false
},
axisLabel: {
textStyle: {
color: '#E6E8EB'
}
}
}
}
this.chartInstance.setOption(initOption)
},
async getData () {
// await this.$http.get()
// const { data: ret } = await this.$http.get('documentcpu')
... ... @@ -88,17 +52,19 @@ export default {
updateChart () {
// 半透明的颜色值
const colorArr1 = [
'rgba(11, 168, 44, 0.5)',
'rgba(35, 255, 255, 0.5)',
'rgba(44, 110, 255, 0.5)',
'rgba(22, 242, 217, 0.5)',
'rgba(11, 168, 44, 0.5)',
'rgba(254, 33, 30, 0.5)',
'rgba(250, 105, 0, 0.5)'
]
// 全透明的颜色值
// 全透明的颜色值
const colorArr2 = [
'rgba(11, 168, 44, 0)',
'rgba(35, 255, 255, 0)',
'rgba(44, 110, 255, 0)',
'rgba(22, 242, 217, 0)',
'rgba(11, 168, 44, 0)',
'rgba(254, 33, 30, 0)',
'rgba(250, 105, 0, 0)'
]
... ... @@ -109,6 +75,16 @@ export default {
type: 'line',
data: item.data,
smooth: true,
showSymbol:false,
itemStyle : {
normal : {
color:colorArr1[index],//tooltip里的小圆点颜色
lineStyle:{
color:colorArr1[index],
width:2,
}
}
},
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
... ... @@ -129,29 +105,90 @@ export default {
})
const title = this.allData.polyline.title
const unit = this.allData.polyline.unit
const dataOption = {
const seriesData=seriesArr;
let xAxisData=timeArr;
this.optionData = {
title: {
text: title,
left: 'center',
bottom: '8%'
},
xAxis: {
data: timeArr
bottom: '8%',
textStyle: {
fontSize: this.titleFontSize*0.5,
color:'#ffffff'
}
},
yAxis: {
name: unit
tooltip: {
trigger: 'axis',
backgroundColor:'rgba(50,50,50,0.7)',
borderColor:"#333",
textStyle:{
color:"#fff",
align:'left'
}
},
legend: {
data: legendArr
data: legendArr,
itemHeight:0,//图例圆圈大小设置
right: '5%',
top: '5%',
textStyle: {
color: '#ffffff',
fontsize:"12px"
}
},
dataZoom: {
show: false,
startValue: this.startValue,
endValue: this.endValue
grid: {
top: '15%',
left: '3%',
right: '4%',
bottom: '20%',
containLabel: true
},
series: seriesArr
}
this.chartInstance.setOption(dataOption)
xAxis: {
type: 'category',
boundaryGap: false,
data: xAxisData,
axisLine:{
show:false,//是否显示坐标线
},
axisTick: {
show: false //是否显示坐标刻度
},
axisLabel:{
color:'#ffffff',
},
},
yAxis: {
type: 'value',
name:unit,
nameTextStyle:{
color:'#ffffff',
padding:[0,0,0,-20]
},
axisLabel: {
color:'#ffffff',
// formatter: '{value} %'//以百分比显示
},
axisLine:{
show:true,//是否显示坐标线
},
splitLine:{
lineStyle: {
color:'#0a1b31'
}
}
},
series: seriesData
};
},
screenAdapter () {
this.titleFontSize = document.getElementById('documentcpu_ref').offsetWidth / 100 * 3.6
... ... @@ -179,8 +216,7 @@ export default {
}
}
}
this.chartInstance.setOption(adapterOption)
this.chartInstance.resize()
},
startInterval () {
if (this.timerId) {
... ...
<div class="monitoring-bar" id="mon-bar">
<img :style="comtitleImgStyle" src="/vue3/src/assets/images/digitalDp/title-monitoring.png" alt="">
<BarChart :optionData="optionData" v-if="optionData"></BarChart>
</div>
... ...
export default {
name: 'monitoring',
template: '',
components: {
'BarChart': Vue.defineAsyncComponent(
() => myImport('views/zjdaping/components/barChart/index')
)
},
data(){
return {
domainName:sessionStorage.getItem('domainName'),
apiUrl:'/api-web/bigScreen/thirtyDayMonitor?kipId=KPI63C5B2E5',
declareLineData:'',
ySeriesCommon:[],
legendData:[],
ySeriesCommonData:[],
titleFontSize: 30,
optionData:''
}
},
computed: {
comtitleImgStyle () {
return {
height: this.titleFontSize * 2.1 + 'px'
}
}
},
setup(props, {attrs, slots, emit}) {
const {proxy} = Vue.getCurrentInstance();
// 挂载完
Vue.onMounted(() => {
proxy.screenAdapter();
$.get(proxy.domainName +proxy.apiUrl,function (res) {
const data = res;
if (data && data.data) {
let monitoringBarData=data.data;
let legendData=[];
$.each(monitoringBarData,function (i,v){
proxy.ySeriesCommonData.unshift(v.value)
legendData.push(i+1)
})
proxy.legendData=legendData
}
// proxy.ySeriesCommon=
proxy.optionInti()
})
})
const optionInti=()=>{
proxy.optionData = {
title: {
text: '',
},
grid: {
top:'4%',
left: '3%',
right: '4%',
// bottom:'0',
// bottom: '8%',
containLabel: true,
},
xAxis: {
type: 'category',
data: props.legendData,
axisLine:{
show:true,//是否显示坐标线
lineStyle: {
color:'#0a1b31'//坐标线颜色
}
},
axisTick: {
show: false //是否显示坐标刻度
},
axisLabel:{
color:'#ffffff',
fontSize: 12
},
},
yAxis: {
type: 'value',
splitLine:{
show:false,
},
axisLine:{
show:true,//是否显示坐标线
lineStyle: {
color:'#0a1b31'//坐标线颜色
}
},
axisLabel:{
color:'#ffffff',
fontSize:12,
formatter:function (value,index){
if(value>=10000 &&value<10000000){
value=value/10000 +"万";
}else if(value>=10000000){
value=value/10000000+"千万";
}
return value;
}
}
},
series: [
{
data: proxy.ySeriesCommonData,
type: 'bar',
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.1)'
},
barWidth:8,
itemStyle:{
normal:{
barBorderRadius: [3,3,0,0],
color:new echarts.graphic.LinearGradient(
0,0,0,1,
[
{offset:0,color:'#3ac9fb'},
{offset:1,color:'#2a81f3'}
]
)
// color:"#ff0000"
}
}
}
]
};
}
const screenAdapter=()=>{
proxy.titleFontSize = document.getElementById('mon-bar').offsetWidth / 100 * 3.6
}
return{
optionInti,
screenAdapter
}
}
}
\ No newline at end of file
... ...
<div class="com-container">
<div class="com-chart" id="responsemonitor_ref"></div>
<div class="com-container" id="responsemonitor_ref">
<div class="cpu-dropdown">
<el-dropdown @command="handleCommand" >
<span class="el-dropdown-link">
请选择
<i class="icon-arrow"></i>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item command="max">最大值</el-dropdown-item>
<el-dropdown-item command="ave">平均值</el-dropdown-item>
<el-dropdown-item command="min">最小值</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
<!-- <div class="com-chart" id="responsemonitor_ref"></div>-->
<LineChart :optionData="optionData" v-if="optionData"></LineChart>
</div>
\ No newline at end of file
... ...
export default {
name: 'ResponseMonitor',
template: '',
components: {},
components: {
'LineChart': Vue.defineAsyncComponent(
() => myImport('views/zjdaping/components/lineChart/index')
)
},
data () {
return {
chartInstance: null,
optionData:'',
titleFontSize:'30',
allData: {
polyline: {
title: "系统响应请求数监控",
... ... @@ -35,7 +40,7 @@ export default {
},
methods: {
initChart () {
this.chartInstance = echarts.init(document.getElementById('responsemonitor_ref'))
/* this.chartInstance = echarts.init(document.getElementById('responsemonitor_ref'))
const initOption = {
grid: {
top: '15%',
... ... @@ -69,7 +74,7 @@ export default {
}
}
}
this.chartInstance.setOption(initOption)
this.chartInstance.setOption(initOption)*/
},
async getData () {
// await this.$http.get()
... ... @@ -85,6 +90,7 @@ export default {
'rgba(11, 168, 44, 0.5)',
'rgba(44, 110, 255, 0.5)',
'rgba(22, 242, 217, 0.5)',
'rgba(35, 255, 255, 0.5)',
'rgba(254, 33, 30, 0.5)',
'rgba(250, 105, 0, 0.5)'
]
... ... @@ -93,6 +99,7 @@ export default {
'rgba(11, 168, 44, 0)',
'rgba(44, 110, 255, 0)',
'rgba(22, 242, 217, 0)',
'rgba(35, 255, 255, 0)',
'rgba(254, 33, 30, 0)',
'rgba(250, 105, 0, 0)'
]
... ... @@ -101,52 +108,102 @@ export default {
const seriesName = this.allData.polyline.data.name
console.log(seriesName)
// 图例的数据
const legendArr = this.allData.polyline.data.data.map(item => {
return item.name
})
// const legendArr = this.allData.polyline.data.map(item => {
// return item.name
// })
const legendArr=[];
legendArr.push(seriesName);
const title = this.allData.polyline.title
// const unit = this.allData.polyline.unit
const dataOption = {
this.optionData = {
title: {
text: title,
left: '10%',
textStyle: {
color: '#F1F2F5'
fontSize: this.titleFontSize*0.5,
color:'#ffffff'
}
},
xAxis: {
data: timeArr
tooltip: {
trigger: 'axis',
backgroundColor:'rgba(50,50,50,0.7)',
borderColor:"#333",
textStyle:{
color:"#fff",
align:'left'
}
},
legend: {
data: legendArr
data: legendArr,
itemHeight:0,//图例圆圈大小设置
top:'10%',
right:'20%',
textStyle: {
color: '#ffffff',
fontsize:"12px"
}
},
dataZoom: {
show: false,
startValue: this.startValue,
endValue: this.endValue
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true,
},
series: [
{
name: seriesName,
type: 'line',
data: seriesData,
smooth: true,
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: colorArr1[2]
}, // %0的颜色值
{
offset: 1,
color: colorArr2[2]
} // 100%的颜色值
])
xAxis: {
type: 'category',
boundaryGap: false,
data: timeArr,
axisLine:{
show:false,//是否显示坐标线
},
axisTick: {
show: false //是否显示坐标刻度
},
axisLabel:{
color:'#ffffff',
},
},
yAxis: {
axisLabel: {
color:'#ffffff',
},
splitLine:{
lineStyle: {
color:'#0a1b31'
}
},
},
series: {
name: seriesName,
type: 'line',
data: seriesData,
smooth: true,
showSymbol:false,
color:colorArr1[1],
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: colorArr1[1]
}, // %0的颜色值
{
offset: 1,
color: colorArr2[1]
} // 100%的颜色值
])
}
]
}
this.chartInstance.setOption(dataOption)
},
itemStyle:{
showSymbol:false
}
};
},
screenAdapter () {
this.titleFontSize = document.getElementById('responsemonitor_ref').offsetWidth / 100 * 3.6
... ... @@ -165,8 +222,7 @@ export default {
}
}
}
this.chartInstance.setOption(adapterOption)
this.chartInstance.resize()
},
startInterval () {
if (this.timerId) {
... ...
<div class="com-container">
<div class="com-chart" id="topfive_ref"></div>
<div class="topfive-box-title">
<img :style="comtitleImgStyle" src="./src/assets/img/box_title_bykk_zj_1.png" class="topfive-title-img"> <!-- bor1_6 -->
<span :style="comtitleTextStyle" class="topfive-title-size">涉税文书TOP5业务量</span>
<img :style="comtitleImgStyle" src="./src/assets/images/digitalDp/title-topfive.png" class="topfive-title-img"> <!-- bor1_6 -->
<!-- <span :style="comtitleTextStyle" class="topfive-title-size">涉税文书TOP5业务量</span>-->
</div>
</div>
\ No newline at end of file
... ...
... ... @@ -70,14 +70,22 @@ export default {
show: false
}
},
yAxis: {
type: 'category',
axisLabel: {
textStyle: {
color: '#E2E1E6'
}
}
},
yAxis:
{
type: 'category',
axisLabel: {
textStyle: {
color: '#E2E1E6'
}
},
axisLine:{
show:false,//是否显示坐标线
},
axisTick: {
show: false //是否显示坐标刻度
},
},
series: [
{
type: 'bar',
... ... @@ -88,10 +96,18 @@ export default {
label: {
show: true,
position: 'right',
testStyle: {
color: 'white'
}
textStyle: {
color: 'rgba(0,0,0,0)'
},
height:26,
width: 26,
offset:[-10,0],
backgroundColor: {
image: '/vue3/src/assets/images/digitalDp/pro-bg.png'
},
},
itemStyle: {
// 颜色渐变 指明渐变方向,指明不同百分比之下颜色的值 LinearGradient(x1, y1, x2, y2, [])
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
... ... @@ -139,9 +155,24 @@ export default {
return item.value
})
const dataOption = {
yAxis: {
yAxis: [{
data: sellerNames
},
{
data:sellerValues,
axisLine:{
show:false,//是否显示坐标线
},
axisTick: {
show: false //是否显示坐标刻度
},
axisLabel: {
textStyle: {
color: '#ffffff'
}
},
}
],
series: [
{
data: sellerValues
... ...
<div class="screen-container" id="bgscreen_ref">
<header class="screen-header" :style="screenheaderStyle">
<div>
<img style="width: 100%" src="/vue3/src/assets/img/header_border_dark.png" alt="">
<img style="width: 100%" src="/vue3/src/assets/images/digitalDp/header_border_dark.png" alt="">
</div>
<span class="title" :style="titleStyle">浙江省电子税务局系统监控大屏</span>
<div class="title-left">
... ... @@ -17,29 +17,49 @@
</div>
<!-- 本月业务量 折线图-->
<div id="left-bottom">
<TrendPolyline></TrendPolyline>
<!-- <TrendPolyline></TrendPolyline>-->
<DeclareLine :colorData="colorData"></DeclareLine>
</div>
</section>
<section class="screen-middle">
<div id="middle-top">
<!-- 今日已申报数 图板 -->
<DigitalBoardTop></DigitalBoardTop>
</div>
<div id="middle-center">
<!-- 本月已申报数 图板 -->
<DigitalBoardDown></DigitalBoardDown>
<div class="middle-left">
<div class="middle-left-declare">
<div id="middle-top">
<!-- 今日已申报数 图板 -->
<DigitalBoardTop></DigitalBoardTop>
</div>
<div id="middle-center">
<!-- 本月已申报数 图板 -->
<DigitalBoardDown></DigitalBoardDown>
</div>
</div>
<div class="middle-left-declare-rate">
<div id="middle-bottom">
<!-- 本月申报率折线图 -->
<DeclarePolyline></DeclarePolyline>
</div>
</div>
</div>
<div id="middle-bottom">
<!-- 本月申报率折线图 -->
<DeclarePolyline></DeclarePolyline>
<div class="middle-right">
<div class="declare-top">
<!--本月应申报-->
<DeclareReport></DeclareReport>
</div>
<div class="deduction-bottom">
<!-- 本月扣款情况 图板 -->
<Deduction></Deduction>
</div>
</div>
</section>
<section class="screen-right">
<div id="right-top">
<!-- 本月扣款情况 图板 -->
<Deduction></Deduction>
<!--访问监控 柱状图-->
<Monitoring></Monitoring>
</div>
<div id="right-center">
<!-- 业务可用性 折线 -->
... ...
... ... @@ -20,8 +20,17 @@ export default {
'DocumentCpu': Vue.defineAsyncComponent(
() => myImport('views/dp/components/documentCpu/index')
),
'TrendPolyline': Vue.defineAsyncComponent(
() => myImport('views/dp/components/trendPolyline/index')
// 'TrendPolyline': Vue.defineAsyncComponent(
// () => myImport('views/dp/components/trendPolyline/index')
// ),
'DeclareLine': Vue.defineAsyncComponent(
() => myImport('views/zjdaping/components/declareLine/index')
),
'Monitoring': Vue.defineAsyncComponent(
() => myImport('views/dp/components/monitoring/index')
),
'DeclareReport': Vue.defineAsyncComponent(
() => myImport('views/dp/components/declareReport/index')
),
'BusinessVolume': Vue.defineAsyncComponent(
() => myImport('views/dp/components/businessVolume/index')
... ... @@ -42,7 +51,8 @@ export default {
data () {
return {
titleFontSize: 30,
dateTime: '00-00-00 00:00:00'
dateTime: '00-00-00 00:00:00',
colorData:['#0D45FE','#00FFB9','#A35CFF']
}
},
computed: {
... ...
<div id="bar-echart" style="width:100%;height:290px;"></div>
<div id="bar-echart" style="width:100%;height:100%;"></div>
... ...
export default {
name: 'barChart',
template: '',
props:['yAxisData','seriesData','legendData','chartId'],
props:['optionData'],
components: {
},
data(){
... ... @@ -17,8 +17,8 @@ export default {
Vue.onMounted(() => {
const chartDom=proxy.$el
const myChart = echarts.init(chartDom);
let option;
option = {
let option=props.optionData;
/*option = {
title: {
text: '近30天访问量',
x:'center',
... ... @@ -71,9 +71,15 @@ export default {
}
},
series: props.seriesData
};
};*/
window.addEventListener('resize', function () {
myChart.resize();
});
option && myChart.setOption(option);
})
return{
... ...
... ... @@ -18,7 +18,7 @@ export default {
declaredToday:0,//今日已申报数
reportableMonth:0, //本月未申报数
declaredMonth:0,//本月已申报数
declarationRate:0.94,//申报率
declarationRate:0.00,//申报率
// volumeNumDoc:0,//涉税文书业务量
// volumeNumNet:0,//网上申报业务量
// volumeNum:0, //业务量数
... ...
<div class="declare-lineChart">
<LineChart :yAxisData="yAxisCommon" :seriesData="ySeriesCommon" :legendData="legendData" :chartId="chartId" v-if="ySeriesCommon.length"></LineChart>
<LineChart :optionData="optionData" v-if="optionData"></LineChart>
</div>
... ...
export default {
name: 'performance',
template: '',
props:['colorData'],
components: {
'LineChart': Vue.defineAsyncComponent(
() => myImport('views/zjdaping/components/lineChart/index')
... ... @@ -14,6 +15,8 @@ export default {
yAxisCommon:[],
ySeriesCommon:[],
legendData:[],
optionData:'',
colorData:["#97d5f4",'#efe0a7','#e5abd1'],
chartId:'line-echart-declare'
}
},
... ... @@ -22,8 +25,15 @@ export default {
},
setup(props, {attrs, slots, emit}) {
const {proxy} = Vue.getCurrentInstance();
// 挂载完
Vue.onMounted(() => {
if(props.colorData){
const {colorData}=Vue.toRefs(props)
proxy.colorData=colorData.value
}
$.get(proxy.domainName +proxy.apiUrl,function (res) {
const data = res;
let ySeriesCommon=[];
... ... @@ -41,9 +51,13 @@ export default {
showSymbol:false,
itemStyle : {
normal : {
color:i==0?"#97d5f4":i==1?'#efe0a7':'#e5abd1',//tooltip里的小圆点颜色
/* color:i==0?"#97d5f4":i==1?'#efe0a7':'#e5abd1',//tooltip里的小圆点颜色
lineStyle:{
color:i==0?"#97d5f4":i==1?'#efe0a7':'#e5abd1'
}*/
color:i==0?proxy.colorData[0]:i==1?proxy.colorData[1]:proxy.colorData[2],//tooltip里的小圆点颜色
lineStyle:{
color:i==0?proxy.colorData[0]:i==1?proxy.colorData[1]:proxy.colorData[2]
}
}
},
... ... @@ -53,79 +67,85 @@ export default {
})
proxy.ySeriesCommon=ySeriesCommon;
proxy.legendData=legendData;
proxy.optionInit();
}
})
//一般y序列
proxy.yAxisCommon={
type: 'value',
splitLine:{
lineStyle: {
color:'#0a1b31'
}
},
axisLabel:{
color:'#ffffff',
},
}
//一般y轴数据
/* proxy.ySeriesCommon=[
{
name: '网络投票',
type: 'line',
smooth:true,
stack: 'Total',
data: [120, 132, 101, 134, 90, 230, 210],
yAxisIndex:0,
showSymbol:false,
itemStyle : {
normal : {
color:"#97d5f4",//tooltip里的小圆点颜色
lineStyle:{
color:'#97d5f4'
}
}
},
},
{
name: '涉税文书',
type: 'line',
smooth:true,
stack: 'Total',
data: [220, 182, 191, 234, 290, 330, 310],
showSymbol:false,
yAxisIndex:0,
itemStyle : {
color:"#ffffff",
normal : {
color:'#efe0a7',
lineStyle:{
color:'#efe0a7'
}
}
},
},
{
name: '网上申报',
type: 'line',
smooth:true,
stack: 'Total',
data: [150, 232, 201, 154, 190, 330, 410],
yAxisIndex:0,
showSymbol:false,
itemStyle : {
normal : {
color:'#e5abd1',
lineStyle:{
color:'#e5abd1'
}
}
},
},
]*/
})
const optionInit=()=>{
console.log("3232",proxy.ySeriesCommon)
let xAxisDataLength=proxy.ySeriesCommon[0].length;
let xAxisData=[];
for(let i=1;i<=xAxisDataLength;i++){
xAxisData.push(i)
}
proxy.optionData = {
title: {
text: ''
},
tooltip: {
trigger: 'axis',
backgroundColor:'rgba(50,50,50,0.7)',
borderColor:"#333",
textStyle:{
color:"#fff",
align:'left'
}
},
legend: {
data: proxy.legendData,
itemHeight:0,//图例圆圈大小设置
y:'7px',
textStyle: {
color: '#ffffff',
fontsize:"12px"
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true,
},
xAxis: {
type: 'category',
boundaryGap: false,
data: xAxisData,
axisLine:{
show:false,//是否显示坐标线
},
axisTick: {
show: false //是否显示坐标刻度
},
axisLabel:{
color:'#ffffff',
},
},
yAxis:{
type: 'value',
splitLine:{
lineStyle: {
color:'#0a1b31'
}
},
axisLabel:{
color:'#ffffff',
},
},
series: proxy.ySeriesCommon,
itemStyle:{
showSymbol:false
}
};
}
return{
optionInit
}
}
}
\ No newline at end of file
... ...
<div :id="chartId" style="width:100%;height:225px;"></div>
<div :id="chartId" style="width:100%;height:100%;"></div>
... ...
export default {
name: 'lineChart',
template: '',
props:['yAxisData','seriesData','legendData','chartId'],
// props:['yAxisData','seriesData','legendData','chartId'],
props:['optionData'],
components: {
},
data(){
... ... @@ -21,20 +22,22 @@ export default {
/*$.get(proxy.domainName,function(res){
})*/
proxy.yAxisData=props.yAxisData;
/* proxy.yAxisData=props.yAxisData;
proxy.seriesData=props.seriesData;
proxy.chartId=props.chartId;
// const chartDom = document.getElementById('line-echart-declare');
console.log("**!/",proxy.seriesData)
let xAxisDataLength=proxy.seriesData[0].data.length;
let xAxisData=[];
for(let i=1;i<=xAxisDataLength;i++){
xAxisData.push(i)
}
}*/
const chartDom=proxy.$el
const myChart = echarts.init(chartDom);
let option;
let option=props.optionData;
console.log("testLIne0",chartDom,option)
option = {
/* option = {
title: {
text: ''
},
... ... @@ -64,11 +67,11 @@ export default {
bottom: '3%',
containLabel: true,
},
/*toolbox: {
/!*toolbox: {
feature: {
saveAsImage: {}
}
},*/
},*!/
xAxis: {
type: 'category',
boundaryGap: false,
... ... @@ -90,7 +93,7 @@ export default {
itemStyle:{
showSymbol:false
}
};
};*/
option && myChart.setOption(option);
... ...
<div class="monitoring-bar">
<BarChart :yAxisData="yAxisCommon" :seriesData="ySeriesCommon" :legendData="legendData" :chartId="chartId" v-if="ySeriesCommon.length"></BarChart>
<BarChart :optionData="optionData" v-if="optionData"></BarChart>
</div>
... ...
export default {
name: 'performance',
name: 'monitoringMonth',
template: '',
components: {
'BarChart': Vue.defineAsyncComponent(
... ... @@ -15,6 +15,7 @@ export default {
ySeriesCommon:[],
legendData:[],
ySeriesCommonData:[],
optionData:''
}
},
... ... @@ -37,7 +38,65 @@ export default {
})
proxy.legendData=legendData
}
proxy.ySeriesCommon=[
// proxy.ySeriesCommon=
proxy.optionInti()
})
})
const optionInti=()=>{
proxy.optionData = {
title: {
text: '近30天访问量',
x:'center',
y:'7px',
textStyle:{
color:"#ffffff",
fontSize:14
}
},
xAxis: {
type: 'category',
data: props.legendData,
axisLine:{
show:true,//是否显示坐标线
lineStyle: {
color:'#0a1b31'//坐标线颜色
}
},
axisTick: {
show: false //是否显示坐标刻度
},
axisLabel:{
color:'#ffffff',
fontSize: 12
},
},
yAxis: {
type: 'value',
splitLine:{
show:false,
},
axisLine:{
show:true,//是否显示坐标线
lineStyle: {
color:'#0a1b31'//坐标线颜色
}
},
axisLabel:{
color:'#ffffff',
fontSize:12,
formatter:function (value,index){
if(value>=10000 &&value<10000000){
value=value/10000 +"万";
}else if(value>=10000000){
value=value/10000000+"千万";
}
return value;
}
}
},
series: [
{
data: proxy.ySeriesCommonData,
type: 'bar',
... ... @@ -61,11 +120,11 @@ export default {
}
}
]
})
})
};
}
return{
optionInti
}
}
}
\ No newline at end of file
... ...
... ... @@ -2,7 +2,7 @@
<div class="rightArrow">
<img src="/vue3/src/assets/images/zjdp/icon-left.png" @click="arrowClick('left')" alt="">
</div>
<el-carousel height="50px" :autoplay="false" indicator-position="none" arrow="never" ref="cardShow">
<el-carousel height="50px" :autoplay="true" indicator-position="none" arrow="never" ref="cardShow">
<el-carousel-item v-for="item in listItem" :key="item" >
<div class="tabContaier">
<div @click="clickTabs(itemData.busId)" v-if="listArray" v-for="(itemData,index) in dataShow" :class="['tabItem', {'active':checkId==itemData.busId,'borderColorGood':itemData.healthStatus==2,'borderColorMi':itemData.healthStatus==1}]">{{itemData.busTypeName}}</div>
... ...
... ... @@ -3,5 +3,5 @@
<div class="container-title network-title">
<img src="/vue3/src/assets/images/zjdp/title-network.png" alt="">
</div>
<div id="network-echart" v-if="mapData" style="height:560px"></div>
<div id="network-echart" v-if="mapData" style="height:550px"></div>
</div>
... ...
... ... @@ -4,6 +4,6 @@
</div>
<div class="performance-lineChart">
<LineChart :yAxisData="yAxisDataPerformance" :seriesData="seriesDataPerformance" v-if="seriesDataPerformance"></LineChart>
<LineChart :optionData="optionData" v-if="optionData"></LineChart>
</div>
</div>
\ No newline at end of file
... ...
... ... @@ -9,10 +9,10 @@ export default {
data(){
return {
domainName:sessionStorage.getItem('domainName'),
apiUrl:'/api-web/bigScreen/getMachineRoomInfoList',
apiUrl:'/api-web/sxview/getBusinessAvailability',
resourceStatisticsData:'',
yAxisDataPerformance:[],
seriesDataPerformance:[]
optionData:'',
ySeriesCommon:[]
}
},
setup(props, {attrs, slots, emit}) {
... ... @@ -21,6 +21,24 @@ export default {
// 挂载完
Vue.onMounted(() => {
proxy.getData();
})
const getData=()=>{
$.get(proxy.domainName +proxy.apiUrl,function (res) {
const data = res;
if (data && data.data) {
let resData=data.data;
}
// proxy.optionInit();
})
proxy.optionInit();
}
const optionInit=()=>{
let data3=[350, 350, 350, 350, 350, 350, 350];
let data4=[220, 182, 191, 234, 290, 330, 310];
let data2=[100, 100, 100, 100, 100, 100, 100];
... ... @@ -30,43 +48,8 @@ export default {
let max1=proxy.calMax([data1,data2]);
let min2=proxy.calMin([data3,data4]);
let max2=proxy.calMax([data3,data4]);
//业务性能指标y序列
proxy.yAxisDataPerformance=[
{
type: 'value',
axisLabel: {
formatter: '{value} %'//以百分比显示
},
splitLine:{
lineStyle: {
color:'#0a1b31'
}
},
min:0,
max:100,
splitNumber:10,
interval:(100-0)/10
}, {
name: '单位:万',
type: 'value',
axisLabel: {
show: true,
interval: 'right',//居中显示
},
splitLine:{
lineStyle: {
color:'#0a1b31'
}
},
min:min2,
max:max2,
splitNumber:10,
interval:(max2-min2)/10
},
]
//业务双y轴数据
proxy.seriesDataPerformance=[
proxy.ySeriesCommon=[
{
name:'可用性',
type: 'line',
... ... @@ -166,7 +149,105 @@ export default {
},
}
]
})
// let xAxisDataLength=proxy.ySeriesCommon[0].length;
let xAxisData=[];
for(let i=0;i<=24;i++){
if(i%4==0){
xAxisData.push(i+':00')
}
}
let legendData=[];
$.each(proxy.ySeriesCommon,function (i,v){
legendData.push(v.name)
})
proxy.legendData=legendData;
proxy.optionData = {
title: {
text: ''
},
tooltip: {
trigger: 'axis',
backgroundColor:'rgba(50,50,50,0.7)',
borderColor:"#333",
textStyle:{
color:"#fff",
align:'left'
}
},
legend: {
data: proxy.legendData,
itemHeight:0,//图例圆圈大小设置
y:'7px',
textStyle: {
color: '#ffffff',
fontsize:"12px"
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true,
},
xAxis: {
type: 'category',
boundaryGap: false,
data: xAxisData,
axisLine:{
show:false,//是否显示坐标线
},
axisTick: {
show: false //是否显示坐标刻度
},
axisLabel:{
color:'#ffffff',
},
},
yAxis:[
{
type: 'value',
axisLabel: {
formatter: '{value} %'//以百分比显示
},
splitLine:{
lineStyle: {
color:'#0a1b31'
}
},
min:0,
max:100,
splitNumber:10,
interval:(100-0)/10
}, {
name: '单位:万',
type: 'value',
axisLabel: {
show: true,
interval: 'right',//居中显示
},
splitLine:{
lineStyle: {
color:'#0a1b31'
}
},
min:min2,
max:max2,
splitNumber:10,
interval:(max2-min2)/10
},
],
series: proxy.ySeriesCommon,
itemStyle:{
showSymbol:false
}
};
}
//计算最大值
const calMax=(arr)=>{
let max=0;
... ... @@ -203,7 +284,9 @@ export default {
return{
calMax,
calMin
calMin,
getData,
optionInit
}
}
}
\ No newline at end of file
... ...
... ... @@ -2,9 +2,9 @@
<div class="container-title">
<img src="/vue3/src/assets/images/zjdp/title-statistics.png" alt="">
</div>
<el-carousel direction="vertical" :autoplay="false" indicator-position="none" interval="4000">
<el-carousel-item v-for="item in 2" :key="item">
<!-- <h3 class="medium">{{ item }}</h3>-->
<el-carousel direction="vertical" :autoplay="true" indicator-position="none" interval="3000">
<!-- <el-carousel-item v-for="item in 2" :key="item">-->
<el-carousel-item >
<div class="medium ">
<ul class="statisticsItem">
<li class="listItem" v-for="itemData in resourceStatisticsData ">
... ...
... ... @@ -42,7 +42,7 @@
</div>
<div class="right-chart flex-chart">
<!--折线图-->
<DeclareLine></DeclareLine>
<DeclareLine :colorData="colorData" v-if="colorData"></DeclareLine>
<!--柱状图-->
<MonitoringMonth></MonitoringMonth>
</div>
... ...
... ... @@ -40,7 +40,7 @@ export default {
return {
titleFontSize: 30,
dateTime: '00-00-00 00:00:00',
colorData:["#97d5f4",'#efe0a7','#e5abd1']
}
},
setup(props, {attrs, slots, emit}) {
... ... @@ -58,7 +58,7 @@ export default {
Vue.onMounted(() => {
// 获取当前系统时间
let myDate = new Date();
proxy.dateTime = myDate.getFullYear() + '-' + proxy.timeFormat(myDate.getMonth() + 1 + '') + '-' + proxy.timeFormat(myDate.getDate() + '') // + ' ' + proxy.timeFormat(myDate.getHours() + '') + ':' + proxy.timeFormat(myDate.getMinutes() + '') + ':' + proxy.timeFormat(myDate.getSeconds() + '');
proxy.dateTime = myDate.getFullYear() + '-' + proxy.timeFormat(myDate.getMonth() + 1 + '') + '-' + proxy.timeFormat(myDate.getDate() + '') + ' ' + proxy.timeFormat(myDate.getHours() + '') + ':' + proxy.timeFormat(myDate.getMinutes() + '') + ':' + proxy.timeFormat(myDate.getSeconds() + '');
})
... ...