Commit b94f9aa7 authored by xulili's avatar xulili

大屏

parent 35d58fdb
...@@ -1726,6 +1726,16 @@ ...@@ -1726,6 +1726,16 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true "dev": true
}, },
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"cacache": { "cacache": {
"version": "13.0.1", "version": "13.0.1",
"resolved": "https://registry.npmjs.org/cacache/-/cacache-13.0.1.tgz", "resolved": "https://registry.npmjs.org/cacache/-/cacache-13.0.1.tgz",
...@@ -1752,6 +1762,53 @@ ...@@ -1752,6 +1762,53 @@
"unique-filename": "^1.1.1" "unique-filename": "^1.1.1"
} }
}, },
"chalk": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"source-map": { "source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
...@@ -1768,6 +1825,16 @@ ...@@ -1768,6 +1825,16 @@
"minipass": "^3.1.1" "minipass": "^3.1.1"
} }
}, },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"terser-webpack-plugin": { "terser-webpack-plugin": {
"version": "2.3.8", "version": "2.3.8",
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.8.tgz", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.8.tgz",
...@@ -1784,6 +1851,18 @@ ...@@ -1784,6 +1851,18 @@
"terser": "^4.6.12", "terser": "^4.6.12",
"webpack-sources": "^1.4.3" "webpack-sources": "^1.4.3"
} }
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.2.0",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.2.0.tgz",
"integrity": "sha512-TitGhqSQ61RJljMmhIGvfWzJ2zk9m1Qug049Ugml6QP3t0e95o0XJjk29roNEiPKJQBEi8Ord5hFuSuELzSp8Q==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
} }
} }
}, },
...@@ -11857,87 +11936,6 @@ ...@@ -11857,87 +11936,6 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.1.2",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.1.2.tgz",
"integrity": "sha512-8QTxh+Fd+HB6fiL52iEVLKqE9N1JSlMXLR92Ijm6g8PZrwIxckgpqjPDWRP5TWxdiPaHR+alUWsnu1ShQOwt+Q==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": { "vue-router": {
"version": "3.5.1", "version": "3.5.1",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.1.tgz", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.1.tgz",
......
...@@ -5,125 +5,120 @@ ...@@ -5,125 +5,120 @@
<triangle> <triangle>
<slot> <slot>
<div class="common-title"> <div class="common-title">
<img class="icon-title" src="/images/screen/boardsDemand.png" alt=""> <img
<span class="title">{{dialogData.title}}</span> class="icon-title"
<img class="bg" src="/images/screen/title02_bg.png" alt=""> src="/images/screen/boardsDemand.png"
<img src="/images/screen/icon-close.png" alt="" class="close" @click="closeDialog"> alt=""
/>
<span class="title">{{ dialogData.title }}</span>
<img class="bg" src="/images/screen/title02_bg.png" alt="" />
<img
src="/images/screen/icon-close.png"
alt=""
class="close"
@click="closeDialog"
/>
</div> </div>
<dialog-bar-demand class="dialog-echarts-box" v-if="dialogData.type===1"/> <dialog-bar-demand
<dialog-line-interaction class="dialog-echarts-box" v-if="dialogData.type===2"/> class="dialog-echarts-box"
ref="echarts"
v-if="dialogData.type === 1"
:data="dialogData.data"
/>
<dialog-line-interaction
ref="echarts"
class="dialog-echarts-box"
v-if="dialogData.type === 2"
:data="dialogData.data"
/>
<div class="list-of-body"> <div class="list-of-body">
<ul class="body-title" v-if="dialogData.type===1"> <ul class="body-title" v-if="dialogData.type === 1">
<li class="f2">序号</li> <li class="f2">序号</li>
<li class="f5">机构名称</li> <li class="f5">机构名称</li>
<li class="f3">互动频次</li> <li class="f3">互动频次</li>
</ul> </ul>
<ul class="body-title" v-if="dialogData.type===2"> <ul class="body-title" v-if="dialogData.type === 2">
<li class="f2">序号</li> <li class="f2">序号</li>
<li class="f5">统计时间</li> <li class="f5">统计时间</li>
<li class="f3">点播总量</li> <li class="f3">点播总量</li>
</ul> </ul>
<div class="body-content"> <div class="body-content">
<div v-if="dialogData.type===1"> <div v-if="dialogData.type === 1">
<ul class="body-item" v-for="(item,index) in demandList" :key="index"> <ul
<li class="f2">{{index+1}}</li> class="body-item"
<li class="f5">{{item.name}}</li> v-for="(item, index) in dialogData.list"
<li class="f3">{{item.num}}</li> :key="index"
>
<li class="f2">{{ index + 1 }}</li>
<li class="f5">{{ item.organName }}</li>
<li class="f3">{{ item.frequencyCnt }}</li>
</ul> </ul>
</div> </div>
<div v-if="dialogData.type===2"> <div v-if="dialogData.type === 2">
<ul class="body-item" v-for="(item,index) in actionList" :key="index"> <ul
<li class="f2">{{index+1}}</li> class="body-item"
<li class="f5">{{item.dateTime}}</li> v-for="(item, index) in dialogData.list"
<li class="f3">{{item.num}}</li> :key="index"
>
<li class="f2">{{ index + 1 }}</li>
<li class="f5">{{ item.playDate }}</li>
<li class="f3">{{ item.playNumber }}</li>
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
</slot> </slot>
</triangle> </triangle>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import triangle from './slot/triangle' import triangle from "./slot/triangle";
import dialogBarDemand from './echarts/bar' import dialogBarDemand from "./echarts/bar";
import dialogLineInteraction from './echarts/line' import dialogLineInteraction from "./echarts/line";
export default { export default {
components:{ components: {
triangle, triangle,
dialogBarDemand, dialogBarDemand,
dialogLineInteraction dialogLineInteraction,
}, },
props: { props: {
isShow: { isShow: {
type: Boolean type: Boolean,
}, },
dialogData: { dialogData: {
type: Object, type: Object,
} default: () => {
},
data() {
return { return {
demandList:[ data: {},
{ name:'北京市政府',num:'90'}, list: [],
{ name:'天津市政府',num:'85'}, type: 1,
{ name:'呼和浩特市政府',num:'83'}, };
{ name:'石家庄市政府',num:'75'}, },
{ name:'合肥市政府',num:'73'},
{ name:'哈尔滨市政府',num:'63'},
{ name:'廊坊市政府',num:'56'},
{ name:'临沂市政府',num:'52'},
{ name:'忻州市政府',num:'40'},
{ name:'黑龙江市政府',num:'30'},
],
actionList:[
{ dateTime:'2021/01/01',num:'18'},
{ dateTime:'2021/01/02',num:'19'},
{ dateTime:'2021/01/03',num:'22'},
{ dateTime:'2021/01/04',num:'23'},
{ dateTime:'2021/01/05',num:'25'},
{ dateTime:'2021/01/06',num:'26'},
{ dateTime:'2021/01/07',num:'28'},
{ dateTime:'2021/01/08',num:'30'},
{ dateTime:'2021/01/09',num:'36'},
{ dateTime:'2021/01/10',num:'38'},
{ dateTime:'2021/01/11',num:'40'},
{ dateTime:'2021/01/12',num:'42'},
{ dateTime:'2021/01/13',num:'44'},
{ dateTime:'2021/01/14',num:'45'},
{ dateTime:'2021/01/15',num:'46'},
{ dateTime:'2021/01/16',num:'47'},
{ dateTime:'2021/01/17',num:'49'},
{ dateTime:'2021/01/18',num:'52'},
{ dateTime:'2021/01/19',num:'56'},
{ dateTime:'2021/01/20',num:'59'},
{ dateTime:'2021/01/21',num:'63'},
{ dateTime:'2021/01/22',num:'66'},
{ dateTime:'2021/01/23',num:'68'},
{ dateTime:'2021/01/24',num:'69'},
{ dateTime:'2021/01/25',num:'73'},
{ dateTime:'2021/01/26',num:'75'},
{ dateTime:'2021/01/27',num:'78'},
{ dateTime:'2021/01/28',num:'80'},
{ dateTime:'2021/01/29',num:'83'},
{ dateTime:'2021/01/30',num:'85'},
{ dateTime:'2021/01/31',num:'90'},
]
}
}, },
mounted() {
}, },
data() {
return {};
},
mounted() {},
methods: { methods: {
closeDialog() { closeDialog() {
this.$emit('update:isShow', false) this.$emit("update:isShow", false);
},
},
watch: {
isShow() {
if (this.isShow) {
let _this = this;
setTimeout(() => {
_this.$refs.echarts.init();
});
} }
} }
} },
};
</script> </script>
<style lang="scss"> <style lang="scss">
...@@ -141,13 +136,14 @@ export default { ...@@ -141,13 +136,14 @@ export default {
top: 20%; top: 20%;
transform: translate(-50%, 0.1rem); transform: translate(-50%, 0.1rem);
font-size: 0.32rem; font-size: 0.32rem;
color: #62BAFF; color: #62baff;
width: 50vw; width: 50vw;
height: 50vh; height: 50vh;
padding: .24rem; padding: 0.24rem;
margin: 0; margin: 0;
background: rgba(0,19,45,0.9); background: rgba(0, 19, 45, 0.9);
box-shadow: -0.01rem 0 .1rem #62baff33, .01rem 0 .1rem #62baff33, 0 -.01rem .1rem #62baff33, 0 .01rem .1rem #62baff33; box-shadow: -0.01rem 0 0.1rem #62baff33, 0.01rem 0 0.1rem #62baff33,
0 -0.01rem 0.1rem #62baff33, 0 0.01rem 0.1rem #62baff33;
.close { .close {
position: absolute; position: absolute;
right: 0.12rem; right: 0.12rem;
...@@ -159,24 +155,23 @@ export default { ...@@ -159,24 +155,23 @@ export default {
.dialog-body { .dialog-body {
width: 100%; width: 100%;
.triangle { .triangle {
padding-bottom: .32rem; padding-bottom: 0.32rem;
} }
.list-of-body { .list-of-body {
height: calc(34vh - 1rem); height: calc(34vh - 1rem);
padding-top: 0; padding-top: 0;
overflow:hidden; overflow: hidden;
.body-content { .body-content {
height: 100%; height: 100%;
} }
} }
} }
.dialog-echarts-box{ .dialog-echarts-box {
height: 16vh; height: 16vh;
width: 100%; width: 100%;
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -3,9 +3,13 @@ ...@@ -3,9 +3,13 @@
<triangle> <triangle>
<slot> <slot>
<div class="list-of-area-title common-title"> <div class="list-of-area-title common-title">
<img class="icon-title" src="/images/screen/boardsDemand.png" alt=""> <img
<span class="title">{{title}}</span> class="icon-title"
<img class="bg" src="/images/screen/title00_bg.png" alt=""> src="/images/screen/boardsDemand.png"
alt=""
/>
<span class="title">{{ title }}</span>
<img class="bg" src="/images/screen/title00_bg.png" alt="" />
</div> </div>
<div class="list-of-body"> <div class="list-of-body">
<ul class="body-title"> <ul class="body-title">
...@@ -15,81 +19,93 @@ ...@@ -15,81 +19,93 @@
</ul> </ul>
<div class="body-content" id="areaContent"> <div class="body-content" id="areaContent">
<div id="area1"> <div id="area1">
<ul class="body-item" v-for="(item,index) in list" :key="index"> <ul class="body-item" v-for="(item, index) in list" :key="index">
<li class="f5">{{item.city}}</li> <li class="f5">{{ item.areaName }}</li>
<li class="f3">{{item.play}}</li> <li class="f3">{{ item.playNumber }}</li>
<li class="f2">{{item.num}}</li> <li class="f2">{{ item.boardCnt }}</li>
</ul> </ul>
</div> </div>
<div id="area2"></div> <div id="area2"></div>
<div id="area3">></div> <div id="area3"></div>
<div id="area4"></div>
</div> </div>
</div> </div>
</slot> </slot>
</triangle> </triangle>
</div> </div>
</template> </template>
<script> <script>
import triangle from '../components/slot/triangle' import triangle from "../components/slot/triangle";
export default { export default {
name: 'areas', name: "areas",
data() { data() {
return { return {
title:'地区展板播放统计', title: "地区展板播放统计",
timer:null, timer: null,
speed:50, speed: 50,
box:null, box: null,
area1:null, area1: null,
list:[ list: [],
{ city:'山西省',play:'10000', num:'24'}, };
{ city:'湖南省',play:'8878', num:'22'},
{ city:'海南省',play:'5934', num:'21'},
{ city:'贵州省',play:'5899', num:'18'},
{ city:'云南省',play:'5523', num:'16'},
{ city:'甘肃省',play:'4678', num:'12'},
{ city:'四川省',play:'4224', num:'6'},
{ city:'湖南省',play:'3023', num:'4'},
{ city:'江西省',play:'2412', num:'2'},
{ city:'黑龙江省',play:'2258', num:'2'},
{ city:'湖北省',play:'2198', num:'2'},
{ city:'安徽省',play:'2158', num:'2'},
{ city:'新疆维吾尔自治区',play:'2258', num:'2'},
{ city:'广西壮族自治区',play:'1588', num:'2'},
{ city:'西藏自治区',play:'1258', num:'2'},
]
}
}, },
components:{triangle}, components: { triangle },
mounted() { mounted() {
setTimeout(()=>{ this.getList();
this.initScroll()
},1000)
}, },
methods: { methods: {
initScroll() { initScroll() {
let _this = this let _this = this;
this.box = document.getElementById("areaContent"); this.box = document.getElementById("areaContent");
this.con1 = document.getElementById("area1"); this.con1 = document.getElementById("area1");
let con2 = document.getElementById("area2"); let con2 = document.getElementById("area2");
let con3 = document.getElementById("area3"); let con3 = document.getElementById("area3");
let con4 = document.getElementById("area4");
con2.innerHTML = this.con1.innerHTML; con2.innerHTML = this.con1.innerHTML;
con3.innerHTML = this.con1.innerHTML; con3.innerHTML = this.con1.innerHTML;
con4.innerHTML = this.con1.innerHTML;
this.timer = setInterval(_this.scrollUp, _this.speed); this.timer = setInterval(_this.scrollUp, _this.speed);
}, },
scrollUp() { scrollUp() {
if (this.box.scrollTop >= this.con1.scrollHeight) { if (this.box.scrollTop >= this.con1.scrollHeight) {
this.box.scrollTop = 0; this.box.scrollTop = 0;
} else{ } else {
this.box.scrollTop++; this.box.scrollTop++;
} }
}, },
getList() {
let _this = this;
let requestparams = {};
requestparams._index = 1;
requestparams._size = 10;
this.$https(
{
method: "post",
url: "tBoardStatistic/getBoardDistrictPageList",
},
requestparams
)
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.list = res.data.data.records;
this.$nextTick(()=>{
_this.initScroll();
})
} else {
this.list = [];
} }
} else {
this.list = [];
} }
})
.catch((err) => {
this.$message.error(err.message);
});
},
},
};
</script> </script>
<style lang=scss> <style lang=scss>
</style> </style>
<template> <template>
<div class="dashbord-list"> <div class="dashbord-list">
<ul> <ul>
<li v-for="(item, index) in list"> <li v-for="(item, index) in list" :key="index">
<img :src="'/images/screen/'+ item.urlName+ '.png'" alt=""> <img :src="'/images/screen/' + item.urlName + '.png'" alt="" />
<div class="title"> <div class="title">
<div class="title-name">{{item.label}}</div> <div class="title-name">{{ item.label }}</div>
<span> <span>
<a class="num">{{item.num}}</a> <a class="num">{{ item.num }}</a>
<a class="unit">{{item.unit}}</a> <a class="unit">{{ item.unit }}</a>
</span> </span>
</div> </div>
</li> </li>
...@@ -16,66 +16,108 @@ ...@@ -16,66 +16,108 @@
</template> </template>
<script> <script>
export default { export default {
name: 'nums', name: "nums",
data() { data() {
return { return {
list:[ data: [
{label:'总播放量',num: 1000, unit: '次',urlName:'play'}, {
{label:'单位组织',num: 688, unit: '家',urlName:'org'}, label: "总播放量",
{label:'展板总量',num: 20, unit: '个',urlName:'boardsTotal'}, num: 0,
{label:'互动总量',num: 899, unit: '次',urlName:'interaction'}, unit: "次",
] urlName: "play",
} feild: "playCnt",
},
{
label: "单位组织",
num: 0,
unit: "家",
urlName: "org",
feild: "orgCnt",
},
{
label: "展板总量",
num: 0,
unit: "个",
urlName: "boardsTotal",
feild: "boardCnt",
},
{
label: "互动总量",
num: 0,
unit: "次",
urlName: "interaction",
feild: "interactionCnt",
},
],
list: []
};
}, },
mounted() { mounted() {
this.initData() this.getList();
}, },
methods: { methods: {
initData(){ getList() {
const _this = this this.$https({
setInterval(()=>{ method: "post",
let num = Math.floor(Math.random()*4) url: "tBoardStatistic/getBoardSurvey",
num = num > 2 ? 3:0 authType: this.backToken,
_this.$set(_this.list[num],'num', ++_this.list[num]['num'] ) })
},3000) .then((res) => {
} if (res.status == 200) {
if (res.data.resultCode == 200) {
let resData = res.data.data;
this.list = [...this.data].map((v) => {
v["num"] = resData[v["feild"]];
return v;
});
} else {
this.list = [...this.data];
} }
} else {
this.list = [...this.data];
} }
})
.catch((err) => {
this.$message.error(err.message);
});
},
},
};
</script> </script>
<style lang=scss> <style lang=scss>
.dashbord-list{ .dashbord-list {
width: 100%; width: 100%;
position: absolute; position: absolute;
top: -0.3rem; top: -0.3rem;
ul{ ul {
display: flex; display: flex;
font-size: 0; font-size: 0;
justify-content: space-around; justify-content: space-around;
li{ li {
position: relative; position: relative;
} }
img{ img {
width: 1.76rem; width: 1.76rem;
} }
.title{ .title {
position: absolute; position: absolute;
right: 0.2rem; right: 0.2rem;
bottom: 0; bottom: 0;
color: rgba(78,255,253,1); color: rgba(78, 255, 253, 1);
p{ p {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.title-name{ .title-name {
font-size: 0.18rem; font-size: 0.18rem;
margin-bottom: 0.13rem; margin-bottom: 0.13rem;
} }
.num{ .num {
font-size: 0.28rem; font-size: 0.28rem;
} }
.unit{ .unit {
font-size: 0.16rem; font-size: 0.16rem;
margin-left: 0.05rem; margin-left: 0.05rem;
} }
......
<template> <template>
<div class="demand "> <div class="demand">
<triangle> <triangle>
<slot> <slot>
<div class="common-title"> <div class="common-title">
<img class="icon-title" src="/images/screen/boardsDemand.png" alt=""> <img
<span class="title">{{title}}</span> class="icon-title"
<img class="bg" src="/images/screen/title02_bg.png" alt=""> src="/images/screen/boardsDemand.png"
alt=""
/>
<span class="title">{{ title }}</span>
<img class="bg" src="/images/screen/title02_bg.png" alt="" />
</div> </div>
<div id="barDemand" @click="echartsClick"></div> <div id="barDemand" @click="echartsClick"></div>
</slot> </slot>
...@@ -14,32 +18,37 @@ ...@@ -14,32 +18,37 @@
</template> </template>
<script> <script>
import triangle from '../components/slot/triangle' import triangle from "../components/slot/triangle";
export default { export default {
name: 'demand', name: "demand",
data() { data() {
return { return {
title:'互动频次' title: "互动频次",
} };
},
components: { triangle },
props: {
data: {
type: Object,
default: () => {
return {};
},
},
}, },
components:{triangle},
mounted() { mounted() {
setTimeout(()=>{
this.init()
},100)
}, },
methods: { methods: {
init(){ init() {
let option = { let option = {
tooltip: { tooltip: {
trigger: 'axis' trigger: "axis",
}, },
grid: { grid: {
top:20, top: 20,
left: '0%', left: "0%",
right: '2%', right: "2%",
bottom: '15%', bottom: "15%",
containLabel: true containLabel: true,
}, },
// dataZoom: [{ // dataZoom: [{
// type: "slider", // type: "slider",
...@@ -58,104 +67,111 @@ ...@@ -58,104 +67,111 @@
// } // }
// ], // ],
xAxis: { xAxis: {
type: 'category', type: "category",
boundaryGap: true,//坐标轴两边留白 boundaryGap: true, //坐标轴两边留白
data: [ data: this.data.xAxisData,
'北京市政府', '天津市政府', '呼和浩特市政府', '石家庄市政府', '合肥市政府', '哈尔滨市政府', '廊坊市政府', '临沂市政府','忻州市政府', '黑龙江市政府', axisLabel: {
], //坐标轴刻度标签的相关设置。
axisLabel: { //坐标轴刻度标签的相关设置。 interval: 0,
interval:0,
textStyle: { textStyle: {
color: '#FFFFFF', color: "#FFFFFF",
fontStyle: 'normal', fontStyle: "normal",
fontFamily: '微软雅黑', fontFamily: "微软雅黑",
fontSize: 14, fontSize: 14,
}, },
formatter: function (value, index) { formatter: function (value, index) {
if(value.length > 4){ if (value.length > 4) {
return value.slice(0,4)+ '...' return value.slice(0, 4) + "...";
}else { } else {
return value return value;
}
} }
}, },
axisTick:{//坐标轴刻度相关设置。 },
axisTick: {
//坐标轴刻度相关设置。
show: false, show: false,
}, },
axisLine:{//坐标轴轴线相关设置 axisLine: {
lineStyle:{ //坐标轴轴线相关设置
color:'rgba(98,186,255,0.6)', lineStyle: {
type:'solid' color: "rgba(98,186,255,0.6)",
} type: "solid",
}, },
splitLine: { //坐标轴在 grid 区域中的分隔线。 },
splitLine: {
//坐标轴在 grid 区域中的分隔线。
show: false, show: false,
} },
}, },
yAxis: [ yAxis: [
{ {
type: 'value', type: "value",
name:'单位/次', name: "单位/次",
splitNumber: 5, splitNumber: 5,
max:100, max: 100,
axisLabel: { axisLabel: {
textStyle: { textStyle: {
color: '#FFFFFFFF', color: "#FFFFFFFF",
fontStyle: 'normal', fontStyle: "normal",
fontFamily: '微软雅黑', fontFamily: "微软雅黑",
fontSize: 12, fontSize: 12,
}, },
interval:'auto' interval: "auto",
}, },
axisLine:{ axisLine: {
show: false show: false,
}, },
axisTick:{ axisTick: {
show: false show: false,
}, },
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
color: 'rgba(98,186,255,0.6)', color: "rgba(98,186,255,0.6)",
type:'dashed' type: "dashed",
} },
} },
},
}
], ],
series: [ series: [
{ {
type: 'bar', type: "bar",
barWidth: 16, // 柱子宽度 barWidth: 16, // 柱子宽度
itemStyle:{ itemStyle: {
barBorderRadius: 120, // 圆角(左上、右上、右下、左下) barBorderRadius: 120, // 圆角(左上、右上、右下、左下)
}, },
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ color: new this.$echarts.graphic.LinearGradient(
'rgba(78,255,253,1)', 'rgba(255,74,83,1)' 0,
].map((color, offset) => ({ 0,
0,
1,
["rgba(78,255,253,1)", "rgba(255,74,83,1)"].map(
(color, offset) => ({
color, color,
offset offset,
}))), // 渐变 })
data: [ 25, 30,40, 52, 56,63, 73, 75, 83, 85,90].reverse() )
} ), // 渐变
] data: this.data.yAxisData,
},
],
}; };
let echartsDiv = this.$echarts.init(document.getElementById('barDemand')) let echartsDiv = this.$echarts.init(document.getElementById("barDemand"));
echartsDiv.setOption(option) echartsDiv.setOption(option);
}, },
// 点击事件 // 点击事件
echartsClick(){ echartsClick() {
this.$emit('itemClick',{type:1,title:this.title}) this.$emit("itemClick", { type: 1, title: this.title });
} },
} },
} };
</script> </script>
<style lang=scss> <style lang=scss>
#barDemand{ #barDemand {
width: 100%; width: 100%;
height: calc(100% - 0.6rem); height: calc(100% - 0.6rem);
margin-top: 0.6rem; margin-top: 0.6rem;
} }
</style> </style>
...@@ -10,10 +10,13 @@ ...@@ -10,10 +10,13 @@
title:'互动频次' title:'互动频次'
} }
}, },
props:{
data:{
type:Object,
default:()=>{return {}}
}
},
mounted() { mounted() {
setTimeout(()=>{
this.init()
},100)
}, },
methods: { methods: {
init(){ init(){
...@@ -31,9 +34,7 @@ ...@@ -31,9 +34,7 @@
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap: true,//坐标轴两边留白 boundaryGap: true,//坐标轴两边留白
data: [ data: this.data.xAxisData,
'北京市政府', '天津市政府', '呼和浩特市政府', '石家庄市政府', '合肥市政府', '哈尔滨市政府', '廊坊市政府', '临沂市政府','忻州市政府', '黑龙江市政府',
],
axisLabel: { //坐标轴刻度标签的相关设置。 axisLabel: { //坐标轴刻度标签的相关设置。
interval:0, interval:0,
textStyle: { textStyle: {
...@@ -108,7 +109,7 @@ ...@@ -108,7 +109,7 @@
color, color,
offset offset
}))), // 渐变 }))), // 渐变
data: [ 25, 30,40, 52, 56,63, 73, 75, 83, 85,90].reverse() data: this.data.yAxisData
} }
] ]
}; };
......
...@@ -3,36 +3,41 @@ ...@@ -3,36 +3,41 @@
</template> </template>
<script> <script>
export default { export default {
name: 'interaction', name: "interaction",
data() { data() {
return { return {
title:'展板点播趋势图' title: "展板点播趋势图",
} };
},
props: {
data: {
type: Object,
default: () => {
return {};
},
},
}, },
mounted() { mounted() {
setTimeout(()=>{
this.init()
},100)
}, },
methods: { methods: {
init(){ init() {
let option = { let option = {
tooltip: { tooltip: {
trigger: 'axis' trigger: "axis",
}, },
grid: { grid: {
top:20, top: 20,
left: '2%', left: "2%",
right: 20, right: 20,
bottom: '15%', bottom: "15%",
containLabel: true containLabel: true,
}, },
dataZoom: [{ dataZoom: [
{
type: "slider", type: "slider",
show: true, show: true,
bottom: '0', bottom: "0",
start: 0, start: 0,
end: 100, end: 100,
height: 18, height: 18,
...@@ -41,105 +46,108 @@ export default { ...@@ -41,105 +46,108 @@ export default {
}, },
textStyle: { textStyle: {
color: "#fff", color: "#fff",
fontSize: "10px" fontSize: "10px",
}, },
}], },
],
xAxis: { xAxis: {
type: 'category', type: "category",
boundaryGap: false,//坐标轴两边留白 boundaryGap: false, //坐标轴两边留白
data: [ data: this.data.xAxisData,
'2021/01/01', '2021/01/02', '2021/01/03', '2021/01/04', '2021/01/05', '2021/01/06', '2021/01/07', '2021/01/08','2021/01/09', '2021/01/10', axisLabel: {
'2021/01/11', '2021/01/12', '2021/01/13', '2021/01/14', '2021/01/15', '2021/01/16', '2021/01/17', '2021/01/18','2021/01/19', '2021/01/20', //坐标轴刻度标签的相关设置。
'2021/01/21', '2021/01/22', '2021/01/23', '2021/01/24', '2021/01/25', '2021/01/26', '2021/01/27', '2021/01/28','2021/01/29', '2021/01/30','2021/01/31'],
axisLabel: { //坐标轴刻度标签的相关设置。
textStyle: { textStyle: {
color: '#FFFFFF', color: "#FFFFFF",
fontStyle: 'normal', fontStyle: "normal",
fontFamily: '微软雅黑', fontFamily: "微软雅黑",
fontSize: 14, fontSize: 14,
}, },
}, },
axisTick:{//坐标轴刻度相关设置。 axisTick: {
//坐标轴刻度相关设置。
show: false, show: false,
}, },
axisLine:{//坐标轴轴线相关设置 axisLine: {
lineStyle:{ //坐标轴轴线相关设置
color:'rgba(98,186,255,0.6)', lineStyle: {
type:'solid' color: "rgba(98,186,255,0.6)",
} type: "solid",
},
}, },
splitLine: { //坐标轴在 grid 区域中的分隔线。 splitLine: {
//坐标轴在 grid 区域中的分隔线。
show: false, show: false,
} },
}, },
yAxis: [ yAxis: [
{ {
type: 'value', type: "value",
splitNumber: 5, splitNumber: 5,
max:100, max: 100,
axisLabel: { axisLabel: {
textStyle: { textStyle: {
color: '#FFFFFFFF', color: "#FFFFFFFF",
fontStyle: 'normal', fontStyle: "normal",
fontFamily: '微软雅黑', fontFamily: "微软雅黑",
fontSize: 12, fontSize: 12,
}, },
interval:'auto' interval: "auto",
}, },
axisLine:{ axisLine: {
show: false show: false,
}, },
axisTick:{ axisTick: {
show: false show: false,
}, },
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
color: 'rgba(98,186,255,0.6)', color: "rgba(98,186,255,0.6)",
type:'dashed' type: "dashed",
} },
} },
},
}
], ],
series: [ series: [
{ {
type: 'line', type: "line",
smooth:true, smooth: true,
itemStyle: { itemStyle: {
normal: { normal: {
color:'rgba(255,74,83,1)', color: "rgba(255,74,83,1)",
lineStyle: { lineStyle: {
color: "rgba(78,255,253,1)", color: "rgba(78,255,253,1)",
width:1 width: 1,
}, },
areaStyle: { areaStyle: {
color: new this.$echarts.graphic.LinearGradient(0, 1, 0, 0, [{ color: new this.$echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0, offset: 0,
color: 'rgba(255,74,83,0.4)' color: "rgba(255,74,83,0.4)",
}, { },
{
offset: 1, offset: 1,
color: 'rgba(78,255,253,0.4)' color: "rgba(78,255,253,0.4)",
}]), },
} ]),
} },
}, },
data: [ 18, 19, 22, 23, 25, 26, 28, 30, 36, 38, },
40, 42, 45, 44, 46, 47, 49, 52, 56, 59, data: this.data.yAxisData
63, 66, 68, 69, 73, 75, 78, 80, 83, 85,90 },
] ],
}
]
}; };
let echartsDiv = this.$echarts.init(document.getElementById('dialogTends')) let echartsDiv = this.$echarts.init(
echartsDiv.setOption(option) document.getElementById("dialogTends")
);
echartsDiv.setOption(option);
}, },
} },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
#dialogTends{ #dialogTends {
width: 100%; width: 100%;
height: 16vh; height: 16vh;
margin-top: 0.6rem; margin-top: 0.6rem;
......
...@@ -3,9 +3,13 @@ ...@@ -3,9 +3,13 @@
<triangle> <triangle>
<slot> <slot>
<div class="common-title"> <div class="common-title">
<img class="icon-title" src="/images/screen/boardsDemand.png" alt=""> <img
<span class="title">{{title}}</span> class="icon-title"
<img class="bg" src="/images/screen/title02_bg.png" alt=""> src="/images/screen/boardsDemand.png"
alt=""
/>
<span class="title">{{ title }}</span>
<img class="bg" src="/images/screen/title02_bg.png" alt="" />
</div> </div>
<div id="tends" @click="echartsClick"></div> <div id="tends" @click="echartsClick"></div>
</slot> </slot>
...@@ -14,33 +18,42 @@ ...@@ -14,33 +18,42 @@
</template> </template>
<script> <script>
import triangle from '../components/slot/triangle' import triangle from "../components/slot/triangle";
export default { export default {
name: 'interaction', name: "interaction",
data() { data() {
return { return {
title:'展板点播趋势图' title: "展板点播趋势图",
} };
},
components: { triangle },
props: {
data: {
type: Object,
default: () => {
return {};
},
},
}, },
components:{triangle},
mounted() { mounted() {
setTimeout(()=>{ // setTimeout(() => {
this.init()
},100) // this.init();
// }, 100);
}, },
methods: { methods: {
init(){ init() {
let option = { let option = {
tooltip: { tooltip: {
trigger: 'axis' trigger: "axis",
}, },
grid: { grid: {
top:20, top: 20,
left: '2%', left: "2%",
right: 20, right: 20,
bottom: '15%', bottom: "15%",
containLabel: true containLabel: true,
}, },
// dataZoom: [{ // dataZoom: [{
// type: "slider", // type: "slider",
...@@ -59,105 +72,105 @@ export default { ...@@ -59,105 +72,105 @@ export default {
// } // }
// ], // ],
xAxis: { xAxis: {
type: 'category', type: "category",
boundaryGap: false,//坐标轴两边留白 boundaryGap: false, //坐标轴两边留白
data: [ data: this.data.xAxisData,
'2021/01/01', '2021/01/02', '2021/01/03', '2021/01/04', '2021/01/05', '2021/01/06', '2021/01/07', '2021/01/08','2021/01/09', '2021/01/10', axisLabel: {
'2021/01/11', '2021/01/12', '2021/01/13', '2021/01/14', '2021/01/15', '2021/01/16', '2021/01/17', '2021/01/18','2021/01/19', '2021/01/20', //坐标轴刻度标签的相关设置。
'2021/01/21', '2021/01/22', '2021/01/23', '2021/01/24', '2021/01/25', '2021/01/26', '2021/01/27', '2021/01/28','2021/01/29', '2021/01/30','2021/01/31'],
axisLabel: { //坐标轴刻度标签的相关设置。
textStyle: { textStyle: {
color: '#FFFFFF', color: "#FFFFFF",
fontStyle: 'normal', fontStyle: "normal",
fontFamily: '微软雅黑', fontFamily: "微软雅黑",
fontSize: 14, fontSize: 14,
}, },
}, },
axisTick:{//坐标轴刻度相关设置。 axisTick: {
//坐标轴刻度相关设置。
show: false, show: false,
}, },
axisLine:{//坐标轴轴线相关设置 axisLine: {
lineStyle:{ //坐标轴轴线相关设置
color:'rgba(98,186,255,0.6)', lineStyle: {
type:'solid' color: "rgba(98,186,255,0.6)",
} type: "solid",
},
}, },
splitLine: { //坐标轴在 grid 区域中的分隔线。 splitLine: {
//坐标轴在 grid 区域中的分隔线。
show: false, show: false,
} },
}, },
yAxis: [ yAxis: [
{ {
type: 'value', type: "value",
splitNumber: 5, splitNumber: 5,
max:100, max: 100,
axisLabel: { axisLabel: {
textStyle: { textStyle: {
color: '#FFFFFFFF', color: "#FFFFFFFF",
fontStyle: 'normal', fontStyle: "normal",
fontFamily: '微软雅黑', fontFamily: "微软雅黑",
fontSize: 12, fontSize: 12,
}, },
interval:'auto' interval: "auto",
}, },
axisLine:{ axisLine: {
show: false show: false,
}, },
axisTick:{ axisTick: {
show: false show: false,
}, },
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
color: 'rgba(98,186,255,0.6)', color: "rgba(98,186,255,0.6)",
type:'dashed' type: "dashed",
} },
} },
},
}
], ],
series: [ series: [
{ {
type: 'line', type: "line",
smooth:true, smooth: true,
itemStyle: { itemStyle: {
normal: { normal: {
color:'rgba(255,74,83,1)', color: "rgba(255,74,83,1)",
lineStyle: { lineStyle: {
color: "rgba(78,255,253,1)", color: "rgba(78,255,253,1)",
width:1 width: 1,
}, },
areaStyle: { areaStyle: {
color: new this.$echarts.graphic.LinearGradient(0, 1, 0, 0, [{ color: new this.$echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0, offset: 0,
color: 'rgba(255,74,83,0.4)' color: "rgba(255,74,83,0.4)",
}, { },
{
offset: 1, offset: 1,
color: 'rgba(78,255,253,0.4)' color: "rgba(78,255,253,0.4)",
}]), },
} ]),
} },
}, },
data: [ 18, 19, 22, 23, 25, 26, 28, 30, 36, 38, },
40, 42, 45, 44, 46, 47, 49, 52, 56, 59, data: this.data.yAxisData
63, 66, 68, 69, 73, 75, 78, 80, 83, 85,90 },
] ],
}
]
}; };
let echartsDiv = this.$echarts.init(document.getElementById('tends')) let echartsDiv = this.$echarts.init(document.getElementById("tends"));
echartsDiv.setOption(option) echartsDiv.setOption(option);
}, },
// 点击事件 // 点击事件
echartsClick(){ echartsClick() {
this.$emit('itemClick',{type:2,title:this.title}) this.$emit("itemClick", { type: 2, title: this.title });
} },
} },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
#tends{ #tends {
width: 100%; width: 100%;
height: calc(100% - 0.6rem); height: calc(100% - 0.6rem);
margin-top: 0.6rem; margin-top: 0.6rem;
......
<template> <template>
<div id="mapDiv"> <div id="mapDiv"></div>
</div>
</template> </template>
<script> <script>
import 'echarts/map/js/china' import "echarts/map/js/china";
var dataList = [{ export default {
name: '安徽',value: 5498 name: "maps",
}, {
name: '澳门',value: 0
}, {
name: '北京',value: 0
}, {
name: '福建',value: 4111
}, {
name: '甘肃',value: 59
}, {
name: '广东',value: 1928
}, {
name: '广西',value: 4
}, {
name: '贵州',value: 52
}, {
name: '海南',value: 1284
}, {
name: '河北',value: 3151
}, {
name: '河南',value: 3814
}, {
name: '黑龙江',value: 316
}, {
name: '湖北',value: 1724
}, {
name: '湖南',value: 33378
}, {
name: '吉林',value: 520
}, {
name: '江苏',value: 113
}, {
name: '江西',value: 961
}, {
name: '辽宁',value: 139
}, {
name: '内蒙古',value: 0
}, {
name: '宁夏',value: 60
}, {
name: '青海',value: 0
}, {
name: '山东',value: 106
}, {
name: '山西',value: 0
}, {
name: '陕西',value: 114
}, {
name: '上海',value: 1321
}, {
name: '四川',value: 7867
}, {
name: '台湾',value: 0
}, {
name: '天津',value: 1157
}, {
name: '西藏',value: 14
}, {
name: '香港',value: 0
}, {
name: '新疆',value: 115
}, {
name: '云南',value: 3811
}, {
name: '浙江',value: 0
}, {
name: '重庆',value: 886
}
];
export default {
name: 'maps',
data() { data() {
return { return {
dataList: [],
} };
}, },
mounted() { mounted() {
setTimeout(()=>{ this.getList();
this.init()
},100)
}, },
methods: { methods: {
init(){ getList() {
this.$https({
method: "post",
url: "tBoardStatistic/getBoardProvincePlayTotalList",
authType: this.backToken,
})
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.dataList = res.data.data;
} else {
this.dataList = [];
}
} else {
this.dataList = [];
}
this.init();
})
.catch((err) => {
this.$message.error(err.message);
this.init();
});
},
init() {
let option = { let option = {
tooltip: { tooltip: {
triggerOn: "click", triggerOn: "click",
formatter: function(e, t, n) { formatter: function (e, t, n) {
return .5 == e.value ? e.name + ":播放量" : e.seriesName + "<br />" + e.name + ":" + e.value return 0.5 == e.value
} ? e.name + ":播放量"
: e.seriesName + "<br />" + e.name + ":" + e.value;
}, },
visualMap: [{ },
visualMap: [
{
dimension: 0, dimension: 0,
left: '8%', left: "8%",
bottom:20, bottom: 20,
itemWidth: 16, itemWidth: 16,
orient:'horizontal', orient: "horizontal",
text: ['播放量', '由低到高'], text: ["播放量", "由低到高"],
backgroundColor:'rgba(0,19,45,0.4)', backgroundColor: "rgba(0,19,45,0.4)",
padding:16, padding: 16,
textStyle: { textStyle: {
color: 'gba(255,255,255,1)' color: "gba(255,255,255,1)",
}, },
inRange: { inRange: {
color: ['rgba(161,255,255,1)', 'rgba(91,214,255,1)', 'rgba(38,157,255,1)', 'rgba(0,72,149,1)'] color: [
} "rgba(161,255,255,1)",
}], "rgba(91,214,255,1)",
"rgba(38,157,255,1)",
"rgba(0,72,149,1)",
],
},
},
],
geo: { geo: {
map: "china", map: "china",
roam: !1, roam: !1,
scaleLimit: { scaleLimit: {
min: 1, min: 1,
max: 2 max: 2,
}, },
roam: true, //是否开启平游或缩放 roam: true, //是否开启平游或缩放
scaleLimit: { //滚轮缩放的极限控制 scaleLimit: {
//滚轮缩放的极限控制
min: 1, min: 1,
max: 2 max: 2,
}, },
zoom: 1.2, zoom: 1.2,
...@@ -133,19 +92,19 @@ ...@@ -133,19 +92,19 @@
normal: { normal: {
show: !0, show: !0,
fontSize: "12", fontSize: "12",
color: "#fff" color: "#fff",
} },
}, },
itemStyle: { itemStyle: {
normal: { normal: {
borderColor: "rgba(0, 0, 0, 0.2)" borderColor: "rgba(0, 0, 0, 0.2)",
}, },
emphasis: { emphasis: {
areaColor: "#f2d5ad", areaColor: "#f2d5ad",
shadowOffsetX: 0, shadowOffsetX: 0,
shadowOffsetY: 0, shadowOffsetY: 0,
borderWidth: 0 borderWidth: 0,
} },
}, },
regions: [ regions: [
{ {
...@@ -154,31 +113,33 @@ ...@@ -154,31 +113,33 @@
// 隐藏地图 // 隐藏地图
normal: { normal: {
opacity: 0, // 为 0 时不绘制该图形 opacity: 0, // 为 0 时不绘制该图形
} },
}, },
label: { label: {
show: false // 隐藏文字 show: false, // 隐藏文字
} },
} },
] ],
}, },
series: [{ series: [
{
name: "播放量", name: "播放量",
type: "map", type: "map",
geoIndex: 0, geoIndex: 0,
data: dataList data:this.dataList,
}] },
],
}; };
let echartsDiv = this.$echarts.init(document.getElementById('mapDiv')) let echartsDiv = this.$echarts.init(document.getElementById("mapDiv"));
echartsDiv.setOption(option) echartsDiv.setOption(option);
} },
} },
} };
</script> </script>
<style lang=scss> <style lang=scss>
#mapDiv{ #mapDiv {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
</style> </style>
...@@ -3,9 +3,13 @@ ...@@ -3,9 +3,13 @@
<triangle> <triangle>
<slot> <slot>
<div class="list-of-top10-title common-title"> <div class="list-of-top10-title common-title">
<img class="icon-title" src="/images/screen/boardsDemand.png" alt=""> <img
<span class="title">{{title}}</span> class="icon-title"
<img class="bg" src="/images/screen/title01_bg.png" alt=""> src="/images/screen/boardsDemand.png"
alt=""
/>
<span class="title">{{ title }}</span>
<img class="bg" src="/images/screen/title01_bg.png" alt="" />
</div> </div>
<div class="list-of-body"> <div class="list-of-body">
<ul class="body-title"> <ul class="body-title">
...@@ -15,12 +19,12 @@ ...@@ -15,12 +19,12 @@
</ul> </ul>
<div class="body-content" id="bodyContent"> <div class="body-content" id="bodyContent">
<div id="con1"> <div id="con1">
<ul class="body-item" v-for="(item,index) in list"> <ul class="body-item" v-for="(item, index) in list" :key="index">
<li class="f1">{{index%10 + 1}}</li> <li class="f1">{{ (index % 10) + 1 }}</li>
<li class="f7"> <li class="f7">
<div class="title" :title="item.name">{{item.name}}</div> <div class="title" :title="item.boardName">{{ item.boardName }}</div>
</li> </li>
<li class="f2">{{item.num}}</li> <li class="f2">{{ item.playNumber }}</li>
</ul> </ul>
</div> </div>
<div id="con2"></div> <div id="con2"></div>
...@@ -32,52 +36,32 @@ ...@@ -32,52 +36,32 @@
</template> </template>
<script> <script>
import triangle from '../components/slot/triangle' import triangle from "../components/slot/triangle";
export default { import { getCurDate } from './util.time.js'
name: 'top10', export default {
name: "top10",
data() { data() {
return { return {
title:'全国2021年3月展板点播TOP10', title: "全国2021年3月展板点播TOP10",
timer:null, timer: null,
speed:50, speed: 50,
box:null, box: null,
con1:null, con1: null,
list:[ list: [],
{ name:'中国沦为半殖民地半封建社会', num:'11902' }, };
{ name:'抗日战争取得伟大胜利', num:'59876' },
{ name:'筹建新中国', num:'68902' },
{ name:'中华人民共和国成立', num:'368902' },
{ name:'伟大成就', num:'78902' },
{ name:'完善和落实中国特色社会主义事业总体布局', num:'58902' },
{ name:'中国特色社会主义进入新时代', num:'88902'},
{ name:'开创中国特色社会主义新局面', num:'78902'},
{ name:'社会主义文化强国建设迈出坚实步伐', num:'108902'},
{ name:'坚决打赢脱贫攻坚战', num:'188902'},
// { name:'蒋介石背叛革命 建立独裁统治', num:'20300' },
// { name:'开辟农村包围城市武装夺取政权道路', num:'50780' },
// { name:'坚持党的基本路线不动摇', num:'68902' },
// { name:'港澳回归', num:'68902' },
// { name:'让人民群众共享改革发展成果', num:'48902'},
// { name:'“一带一路”倡议推进对外开放向纵深拓展', num:'8902'},
// { name:'生态保护与修复力度持续加大', num:'7902'},
// { name:'大力践行外交为民', num:'9902'},
]
}
}, },
components:{triangle}, components: { triangle },
mounted() { mounted() {
this.list.sort((a,b)=>{ this.title = this.getTitle();
return b.num - a.num this.getList()
})
this.list = [...this.list,...this.list]
setTimeout(()=>{
this.initScroll()
},1000)
}, },
methods: { methods: {
getTitle() {
let curTime = getCurDate();
return `全国${curTime.year}${curTime.month}月展板点播TOP10`;
},
initScroll() { initScroll() {
let _this = this let _this = this;
this.box = document.getElementById("bodyContent"); this.box = document.getElementById("bodyContent");
this.con1 = document.getElementById("con1"); this.con1 = document.getElementById("con1");
let con2 = document.getElementById("con2"); let con2 = document.getElementById("con2");
...@@ -87,21 +71,51 @@ ...@@ -87,21 +71,51 @@
scrollUp() { scrollUp() {
if (this.box.scrollTop >= this.con1.scrollHeight) { if (this.box.scrollTop >= this.con1.scrollHeight) {
this.box.scrollTop = 0; this.box.scrollTop = 0;
} else{ } else {
this.box.scrollTop++; this.box.scrollTop++;
} }
}, },
Ups() { Ups() {
let _this = this let _this = this;
this.timer = setInterval(_this.scrollUp, _this.speed); this.timer = setInterval(_this.scrollUp, _this.speed);
}, },
Stops() { Stops() {
clearInterval(this.timer); clearInterval(this.timer);
},
getList() {
let _this = this
let requestparams = {};
requestparams._index = 1;
requestparams._size = 10;
this.$https(
{
method: "post",
url: "tBoardStatistic/getBoardRankPageList",
authType: this.backToken,
},
requestparams
)
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.list = res.data.data.records;
this.$nextTick(()=>{
_this.initScroll();
})
} else {
this.list = [];
} }
} else {
this.list = [];
} }
})
.catch((err) => {
this.$message.error(err.message);
});
} }
},
};
</script> </script>
<style lang=scss> <style lang=scss>
</style> </style>
export function getCurDate() {
let date = new Date()
let year = date.getFullYear();
let month = date.getMonth() + 1;
let dates = date.getDate()
return {
year: year,
month: month > 9 ? month : `0${month}`,
date: dates > 9 ? dates : `0${dates}`
};
}
\ No newline at end of file
import Vue from 'vue' import Vue from 'vue'
import VueRouter from 'vue-router' import VueRouter from 'vue-router'
Vue.use(VueRouter) Vue.use(VueRouter)
const routes= [ const routes = [
{ {
path: '/', path: '/',
redirect: '/commit', redirect: '/commit',
...@@ -41,38 +41,38 @@ const routes= [ ...@@ -41,38 +41,38 @@ const routes= [
{ {
path: '/commit', path: '/commit',
name: 'commit', name: 'commit',
component:() => import('@/views/user/commit.vue') component: () => import('@/views/user/commit.vue')
}, },
{ {
path: '/learn', path: '/learn',
name: 'learn', name: 'learn',
component: () => import('@/views/user/learn.vue') component: () => import('@/views/user/learn.vue')
}, },
{ {
path: '/admin', path: '/admin',
name: 'admin', name: 'admin',
component: () => import('@/views/user/admin.vue') component: () => import('@/views/user/admin.vue')
}, },
{ {
path: '/editPsd', path: '/editPsd',
name: 'editPsd', name: 'editPsd',
component: () => import('@/views/user/editPsd.vue') component: () => import('@/views/user/editPsd.vue')
}, },
{ {
path: '/learnContent', path: '/learnContent',
name: 'learnContent', name: 'learnContent',
component: () => import('@/views/user/components/learnContent.vue') component: () => import('@/views/user/components/learnContent.vue')
}, },
{ {
path: '/learnDetail', path: '/learnDetail',
name: 'learnDetail', name: 'learnDetail',
component: () => import('@/views/user/components/learnDetail.vue') component: () => import('@/views/user/components/learnDetail.vue')
}, },
{ {
path: '/adminInfo', path: '/adminInfo',
name: 'adminInfo', name: 'adminInfo',
component: () => import('@/views/user/components/adminInfo.vue') component: () => import('@/views/user/components/adminInfo.vue')
}, },
] ]
const router = new VueRouter({ const router = new VueRouter({
...@@ -81,12 +81,17 @@ const router = new VueRouter({ ...@@ -81,12 +81,17 @@ const router = new VueRouter({
}) })
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
let user = localStorage.getItem("token"); let user = localStorage.getItem("token");
if (!user && to.path !=='/login' && to.path !=='/success') { // 通过vuex state获取当前的token是否存在 if (to.path !== '/screen') {
if (!user && to.path !== '/login' && to.path !== '/success') { // 通过vuex state获取当前的token是否存在
next({ next({
path: '/login', path: '/login',
}) })
}else { } else {
next();
}
} else {
next(); next();
} }
}) })
export default router export default router
<template> <template>
<div class="screen-container"> <div class="screen-container">
<div class="page-title"> <div class="page-title">
<p> - 播放数据统计 - </p> <p>- 播放数据统计 -</p>
</div> </div>
<div class="user-info"> <div class="user-info">
<img src="/images/screen/user.png" alt="" class="icon-user"> <img src="/images/screen/user.png" alt="" class="icon-user" />
<span class="user-name">中国国家博物馆</span> <span class="user-name">中国国家博物馆</span>
<img src="/images/screen/close.png" alt="" class="signup"> <img src="/images/screen/close.png" alt="" class="signup" />
<img src="/images/screen/manager.png" @click="goManager" alt="" class="manager"> <img
src="/images/screen/manager.png"
@click="goManager"
alt=""
class="manager"
/>
</div> </div>
<div class="middel-part"> <div class="middel-part">
<!--地区展板播放统计--> <!--地区展板播放统计-->
...@@ -21,51 +26,152 @@ ...@@ -21,51 +26,152 @@
<top10 class="table-list"></top10> <top10 class="table-list"></top10>
</div> </div>
<div class="echartspanel"> <div class="echartspanel">
<demand class="echarts-box left" @itemClick="itemClick"></demand> <demand
<interaction class="echarts-box right" @itemClick="itemClick"></interaction> ref="interactEcharts"
class="echarts-box left"
:data="interactEcharts"
@itemClick="itemClick"
>
</demand>
<interaction
ref="trendEcharts"
class="echarts-box right"
:data="trendEcharts"
@itemClick="itemClick"
></interaction>
</div> </div>
<!-- 弹框 --> <!-- 弹框 -->
<m-dialog :is-show.sync="showDialog" :dialog-data="dialogData"/> <m-dialog
ref="mdialog"
:is-show.sync="showDialog"
:dialog-data="dialogData"
/>
</div> </div>
</template> </template>
<script> <script>
import { import {
demand, demand,
interaction, interaction,
areas, areas,
top10, top10,
mapDiv, mapDiv,
borderNums, borderNums,
MDialog MDialog,
} from '../components' } from "../components";
export default { import { getCurDate } from "../components/util.time.js";
data(){ export default {
return{ data() {
showDialog:false, return {
dialogData:{} // 1 是互动频次弹框 2 是趋势图弹框 showDialog: false,
} dialogData: {}, // 1 是互动频次弹框 2 是趋势图弹框
trendList: [],
trendEcharts: {},
interactList: [],
interactEcharts: {},
};
}, },
components:{demand, interaction , areas, top10, mapDiv, borderNums,MDialog}, components: {
mounted(){ demand,
interaction,
areas,
top10,
mapDiv,
borderNums,
MDialog,
},
mounted() {
let clientWidth = document.body.clientWidth; let clientWidth = document.body.clientWidth;
clientWidth = clientWidth>1920? 1920: clientWidth clientWidth = clientWidth > 1920 ? 1920 : clientWidth;
let fontSize = clientWidth/1920 * 100 let fontSize = (clientWidth / 1920) * 100;
document.getElementsByTagName("html")[0].style.fontSize = fontSize + 'px' document.getElementsByTagName("html")[0].style.fontSize = fontSize + "px";
this.getList();
}, },
methods:{ methods: {
// 接收柱状图传来的数据 // 接收柱状图传来的数据
itemClick(params){ itemClick(params) {
this.showDialog = true let type = "";
this.dialogData = params // 互动
if (params.type == "1") {
type = "interact";
this.dialogData = {
data: this.interactEcharts,
list: this.interactList,
};
} else if (params.type == "2") {
type = "trend";
// 趋势
this.dialogData = {
data: this.trendEcharts,
list: this.trendList,
};
}
this.dialogData = Object.assign(this.dialogData, params);
this.showDialog = true;
}, },
goManager(){ goManager() {
location.href="http://121.4.56.121:84" location.href = "http://121.4.56.121:84";
} },
} getList() {
} let curTime = getCurDate();
let frequencyDate = curTime.year + curTime.month;
this.getPageList("interact", frequencyDate);
this.getPageList("trend", frequencyDate);
},
getPageList(type, frequencyDate) {
let httpUrl = "";
let _this = this;
if (type === "interact") {
httpUrl =
"tBoardStatistic/getInteractionFrequencyPageList?frequencyDate=";
}
if (type === "trend") {
httpUrl = "tBoardStatistic/getBoardTrendPageList?playDate=";
}
_this
.$https({
method: "post",
url: `${httpUrl}${frequencyDate}`,
})
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
_this.setDataWithSus(type, res.data.data);
} else {
_this.setDataWithErr(type);
}
} else {
_this.setDataWithErr(type);
}
})
.catch((err) => {
_this.$message.error(err.message);
_this.setDataWithErr(type);
});
},
setDataWithSus(type, data) {
this[`${type}Echarts`] = {};
this[`${type}List`] = data.page.records;
this[`${type}Echarts`].yAxisData = data.cntList;
if (type == "interact") {
this[`${type}Echarts`].xAxisData = data.organList;
}
if (type == "trend") {
this[`${type}Echarts`].xAxisData = data.dateList;
}
let _this = this;
setTimeout(() => {
_this.$refs[`${type}Echarts`].init();
}, 1000);
},
setDataWithErr(type) {
this[`${type}Echarts`] = {};
this[`${type}List`] = [];
},
},
};
</script> </script>
<style lang="scss"> <style lang="scss">
.screen-container{ .screen-container {
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 8px; width: 8px;
height: 10px; height: 10px;
...@@ -80,153 +186,154 @@ ...@@ -80,153 +186,154 @@
background-size: 100% 100%; background-size: 100% 100%;
padding: 0 0.32rem; padding: 0 0.32rem;
box-sizing: border-box; box-sizing: border-box;
.page-title{ .page-title {
width: 100%; width: 100%;
height: 0.67rem; height: 0.67rem;
background: url("/images/screen/top_bg.png") no-repeat; background: url("/images/screen/top_bg.png") no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
p{ p {
font-size: 0.32rem; font-size: 0.32rem;
color: #62BAFF; color: #62baff;
position: absolute; position: absolute;
left: 50%; left: 50%;
transform: translate(-50%, 0.1rem); transform: translate(-50%, 0.1rem);
margin: 0; margin: 0;
} }
} }
.user-info{ .user-info {
position: absolute; position: absolute;
right: 0.56rem; right: 0.56rem;
top: 0.31rem; top: 0.31rem;
display: flex; display: flex;
align-items: center; align-items: center;
.icon-user,.signup{ .icon-user,
.signup {
width: 0.28rem; width: 0.28rem;
height: 0.28rem; height: 0.28rem;
} }
.user-name{ .user-name {
font-size: 0.18rem; font-size: 0.18rem;
color: #4FFFFD; color: #4ffffd;
margin-left: 0.12rem; margin-left: 0.12rem;
} }
.signup{ .signup {
margin-left: 0.4rem; margin-left: 0.4rem;
} }
.manager { .manager {
cursor: pointer; cursor: pointer;
width: .32rem; width: 0.32rem;
height: .32rem; height: 0.32rem;
margin-left: .2rem; margin-left: 0.2rem;
} }
} }
.echartspanel{ .echartspanel {
height: 34vh; height: 34vh;
width: 100%; width: 100%;
bottom: 0rem; bottom: 0rem;
padding: 0.24rem 0; padding: 0.24rem 0;
box-sizing: border-box; box-sizing: border-box;
.echarts-box{ .echarts-box {
height: 100%; height: 100%;
width: 50%; width: 50%;
display: inline-block; display: inline-block;
box-sizing: border-box; box-sizing: border-box;
&.left{ &.left {
padding-right: 0.12rem; padding-right: 0.12rem;
float: left; float: left;
} }
&.right{ &.right {
padding-left: 0.12rem; padding-left: 0.12rem;
float: right; float: right;
} }
} }
} }
.middel-part{ .middel-part {
display: flex; display: flex;
margin-top: 4.16vh; margin-top: 4.16vh;
height: 56.48vh; height: 56.48vh;
justify-content: space-between; justify-content: space-between;
.table-list{ .table-list {
width: 25vw; width: 25vw;
height: 100%; height: 100%;
} }
} }
.table-list{ .table-list {
.list-of-body{ .list-of-body {
padding-top: 0.7rem; padding-top: 0.7rem;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
ul{ ul {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
font-size: 0.16rem; font-size: 0.16rem;
padding-left: 0.24rem; padding-left: 0.24rem;
box-sizing: border-box; box-sizing: border-box;
li{ li {
line-height: 0.4rem; line-height: 0.4rem;
&.f1{ &.f1 {
width: 10%; width: 10%;
} }
&.f2{ &.f2 {
width: 20%; width: 20%;
} }
&.f3{ &.f3 {
width: 30%; width: 30%;
} }
&.f5{ &.f5 {
width: 50%; width: 50%;
} }
&.f6{ &.f6 {
width: 60%; width: 60%;
} }
&.f7{ &.f7 {
width: 70%; width: 70%;
} }
div.title{ div.title {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
} }
} }
.body-title{ .body-title {
color: #62BAFF; color: #62baff;
margin-bottom: 0.07rem; margin-bottom: 0.07rem;
} }
.body-content{ .body-content {
height: calc(100% - 0.8rem); height: calc(100% - 0.8rem);
overflow-y: auto; overflow-y: auto;
.body-item{ .body-item {
height: 0.4rem; height: 0.4rem;
background-color: #62baff33; background-color: #62baff33;
margin-bottom: 0.04rem; margin-bottom: 0.04rem;
color: #4EFFFD ; color: #4efffd;
} }
} }
} }
} }
.common-title{ .common-title {
.icon-title{ .icon-title {
position: absolute; position: absolute;
top: 0.10rem; top: 0.1rem;
left: 0.1rem; left: 0.1rem;
width: 0.4rem; width: 0.4rem;
} }
.title{ .title {
position: absolute; position: absolute;
top: 0.20rem; top: 0.2rem;
left: 0.52rem; left: 0.52rem;
font-size: 0.2rem; font-size: 0.2rem;
line-height: 0.2rem; line-height: 0.2rem;
color:#4EFFFD ; color: #4efffd;
} }
.bg{ .bg {
position: absolute; position: absolute;
width: calc(100% - 0.48rem); width: calc(100% - 0.48rem);
left: 0.24rem; left: 0.24rem;
top: 0.24rem; top: 0.24rem;
} }
} }
.map-container{ .map-container {
flex: 1; flex: 1;
height: 100%; height: 100%;
position: relative; position: relative;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment