Commit 104ecfa8 authored by xulili's avatar xulili

统计

parent e8d06349
......@@ -43,11 +43,12 @@ export default {
background-color:@party-white;
.icon-loc{
display: inline-block;
width: 11px;
width: 15px;
height: 16px;
background-color: @party-pink;
margin-right: 10px;
vertical-align: middle;
background: url("~@/assets/login/loc.png") no-repeat;
background-size: cover;
}
.breadcrumb__item{
span{
......
......@@ -156,7 +156,7 @@ export default {
100%;
}
.page-title {
margin-top: 140px;
margin-top: 20px;
p {
text-align: center;
font-weight: bold;
......
......@@ -88,8 +88,7 @@ const httpServer = (opts,data,file,timeout)=>{
if(opts.authType && opts.authType!=""){
// Authorization
if(opts.authType==="back"){
//authToken=localStorage.getItem('backToken');
authToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsInVzZXJfaWQiOiIxIiwiaXNzIjoiSUFUQSIsImV4cCI6MTYxNzAzMzM3NSwiaWF0IjoxNjE3MDE4OTc1fQ.NN7nF9aOGJIVZm-8x0uVz00S--YbETfkC1Ifu9R4PbnNPvObhDYlY_u2oxiq2dEkjkJ4sQWy5o2X-fTNaIvnIQ"
authToken=localStorage.getItem('backToken');
}else if(opts.authType==="front"){
authToken = localStorage.getItem("token") || MyLocalStorage.Cache.get('token');
}
......
......@@ -65,12 +65,13 @@ export default {
return {
dialogVisible: false,
organList: [],
id:'',
id: "",
form: {
userName: "",
orgId: "",
permanent: true,
date: "",
roleList: [],
},
rules: {
userName: [
......@@ -97,28 +98,25 @@ export default {
},
// 根据id获取获取详情内容
getDetailById(){
let _this = this
getDetailById() {
let _this = this;
this.$https(
{
method: "get",
url: "tUser/getById",
authType: this.backToken,
},
{id:_this.id}
{ id: _this.id }
)
.then((res) => {
if(res.status == 200 ){
if (res.data.resultCode == 200 ) {
let resData = res.data.data
for(let key in _this.form){
this.form[key] = resData[key]
if (res.status == 200) {
if (res.data.resultCode == 200) {
let resData = res.data.data;
for (let key in _this.form) {
this.form[key] = resData[key];
}
if(!this.form.permanent){
this.form.date = [
resData.effectiveDate,
resData.exiredDate
]
if (!this.form.permanent) {
this.form.date = [resData.effectiveDate, resData.exiredDate];
}
} else {
_this.$message.error(res.data.message);
......@@ -147,6 +145,7 @@ export default {
orgId: "",
permanent: true,
date: "",
roleList: [],
};
},
// 提交
......@@ -166,8 +165,9 @@ export default {
user.permanent = this.form.permanent;
user.userName = this.form.userName;
user.orgId = this.form.orgId;
user.id = this.id
user.type = 5
user.id = this.id;
user.roleList = this.form.roleList;
user.type = 5;
this.$https(
{
method: "put",
......@@ -205,5 +205,4 @@ export default {
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
......@@ -67,10 +67,11 @@ export default {
form: {
id: "",
userName: "",
areaId: ["110000","110100","110101"],
areaId: ["110000", "110100", "110101"],
permanent: true,
date: "",
type: 4, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号
roleList: [],
type: 4 //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4..机顶盒运维账号
},
cascaderProps: {
label: "name",
......@@ -121,7 +122,7 @@ export default {
if (res.data.resultCode == 200) {
let resData = res.data.data;
for (let key in _this.form) {
if(key != 'areaId'){
if (key != "areaId") {
this.form[key] = resData[key];
}
}
......@@ -156,8 +157,9 @@ export default {
userName: "",
areaId: [],
permanent: true,
roleList: [],
date: "",
type: 4, //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号
type: 4 //1.用户账号 2.平台单位单位管理员账号 3.机顶盒账号 4.运维账号
};
},
// 提交
......@@ -178,6 +180,7 @@ export default {
user.areaId = [...this.form.areaId].pop();
user.permanent = this.form.permanent;
user.type = this.form.type;
user.roleList = this.form.roleList;
user.id = this.form.id;
this.$https(
{
......@@ -204,7 +207,8 @@ export default {
}
})
.catch((err) => {
console.log(res);
this.$message.error(err.message);
console.log(err);
});
} else {
console.log("error submit!!");
......
......@@ -120,6 +120,7 @@ export default {
phone: "",
weChat: "",
email: "",
roleList:[],
type: 2, //1.用户账号 2.平台单位管理员账号 3.机顶盒账号 4.运维账号
},
rules: {
......@@ -200,7 +201,7 @@ export default {
permanent: true,
date: "",
roleList: [],
type:1
type: 2
}
},
// 提交
......
......@@ -2,43 +2,79 @@
<div class="demand">
<div class="common-title">
<div class="icon-and-title">
<img class="icon-title" src="@/assets/overview/s-interation.png" alt="">
<span class="title">{{title}}</span>
<img
class="icon-title"
src="@/assets/overview/s-interation.png"
alt=""
/>
<span class="title">{{ title }}</span>
</div>
<img class="bg" src="@/assets/overview/bg_title02.png" alt="">
<img class="bg" src="@/assets/overview/bg_title02.png" alt="" />
</div>
<div id="barDemand" @click="echartsClick"></div>
<div id="barDemand"></div>
</div>
</template>
<script>
export default {
name: 'demand',
import { getCurDate } from "@/utils/util.time.js";
export default {
name: "demand",
data() {
return {
title:'互动频次'
}
title: "互动频次",
xAxisData: [],
yAxisData: [],
};
},
components:{},
components: {},
mounted() {
setTimeout(()=>{
this.init()
},100)
this.getList();
},
methods: {
init(){
getList() {
let curTime = getCurDate();
let frequencyDate = curTime.year + curTime.month;
this.$https({
method: "post",
url: "tBoardStatistic/getInteractionFrequencyPageList?frequencyDate=" + frequencyDate,
authType: this.backToken,
})
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.xAxisData = res.data.data.organList;
this.yAxisData = res.data.data.cntList;
} else {
this.xAxisData = [];
this.yAxisData = [];
}
} else {
this.xAxisData = [];
this.yAxisData = [];
}
this.init();
})
.catch((err) => {
this.$message.error(err.message);
this.xAxisData = [];
this.yAxisData = [];
this.init();
});
},
init() {
let option = {
tooltip: {
trigger: 'axis'
trigger: "axis",
},
grid: {
top:30,
left: '2%',
top: 30,
left: "2%",
right: 40,
bottom: 30,
containLabel: true
containLabel: true,
},
dataZoom: [{
dataZoom: [
{
type: "slider",
show: true,
bottom: 0,
......@@ -50,108 +86,113 @@
},
textStyle: {
color: "#fff",
fontSize: "10px"
fontSize: "10px",
},
},
}
],
xAxis: {
type: 'category',
boundaryGap: true,//坐标轴两边留白
data: [
'北京市政府', '天津市政府', '呼和浩特市政府', '石家庄市政府', '合肥市政府', '哈尔滨市政府', '廊坊市政府', '临沂市政府','忻州市政府', '黑龙江市政府',
],
axisLabel: { //坐标轴刻度标签的相关设置。
interval:0,
type: "category",
boundaryGap: true, //坐标轴两边留白
data: this.xAxisData,
axisLabel: {
//坐标轴刻度标签的相关设置。
interval: 0,
textStyle: {
color: '#333333',
fontStyle: 'normal',
fontFamily: '微软雅黑',
color: "#333333",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 14,
},
formatter: function (value, index) {
if(value.length > 4){
return value.slice(0,4)+ '...'
}else {
return value
}
if (value.length > 4) {
return value.slice(0, 4) + "...";
} else {
return value;
}
},
axisTick:{//坐标轴刻度相关设置。
},
axisTick: {
//坐标轴刻度相关设置。
show: false,
},
axisLine:{//坐标轴轴线相关设置
lineStyle:{
color:'#eeeeee',
type:'solid'
}
axisLine: {
//坐标轴轴线相关设置
lineStyle: {
color: "#eeeeee",
type: "solid",
},
splitLine: { //坐标轴在 grid 区域中的分隔线。
},
splitLine: {
//坐标轴在 grid 区域中的分隔线。
show: false,
}
},
},
yAxis: [
{
type: 'value',
name:'单位/次',
type: "value",
name: "单位/次",
splitNumber: 5,
max:100,
max: 100,
axisLabel: {
textStyle: {
color: '#333333',
fontStyle: 'normal',
fontFamily: '微软雅黑',
color: "#333333",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 12,
},
interval:'auto'
interval: "auto",
},
axisLine:{
show: false
axisLine: {
show: false,
},
axisTick:{
show: false
axisTick: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color:'#eeeeee',
type:'dashed'
}
}
}
color: "#eeeeee",
type: "dashed",
},
},
},
],
series: [
{
type: 'bar',
type: "bar",
barWidth: 16, // 柱子宽度
itemStyle:{
itemStyle: {
barBorderRadius: 120, // 圆角(左上、右上、右下、左下)
},
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
'#AC9374', '#9B1E23'
].map((color, offset) => ({
color: new this.$echarts.graphic.LinearGradient(
0,
0,
0,
1,
["#AC9374", "#9B1E23"].map((color, offset) => ({
color,
offset
}))), // 渐变
data: [ 25, 30,40, 52, 56,63, 73, 75, 83, 85,90].reverse()
}
]
offset,
}))
), // 渐变
data: this.yAxisData,
},
],
};
let echartsDiv = this.$echarts.init(document.getElementById('barDemand'))
echartsDiv.setOption(option)
let echartsDiv = this.$echarts.init(document.getElementById("barDemand"));
echartsDiv.setOption(option);
},
// 点击事件
echartsClick(){
this.$emit('itemClick',{type:1,title:this.title})
}
}
}
// echartsClick() {
// this.$emit("itemClick", { type: 1, title: this.title });
// },
},
};
</script>
<style lang="less">
#barDemand{
#barDemand {
width: 100%;
height: calc(100% - 45px);
}
}
</style>
<template>
<div class="ul-wrapper height100">
<div class="ul-wrapper height100">
<div class="panel-table">
<ul class="title-wrapper">
<li v-for="(item,index) in tList" :key="index">
{{item}}
<li v-for="(item, index) in tList" :key="index">
{{ item }}
</li>
</ul>
<ul class="panel-table-content">
<li v-for="(item,index) in data.slice(0,5)" :key="index">
<span v-for="(s,key) in item" :key='key'>
<img :src="getImg(s)" alt="" v-if="s<4">
<p v-else>{{s}}</p>
<li v-for="(item, index) in data.slice(0, 5)" :key="index">
<span>
<img :src="getImg(index + 1)" alt="" v-if="index < 3" />
<p v-else>{{ index + 1 }}</p>
</span>
<span>{{ item.organName }}</span>
<span>{{ item.frequencyCnt }}</span>
</li>
</ul>
</div>
<div class="panel-table">
<ul class="title-wrapper">
<li v-for="(item,index) in tList" :key="index">
{{item}}
<li v-for="(item, index) in tList" :key="index">
{{ item }}
</li>
</ul>
<ul class="panel-table-content">
<li v-for="(item,index) in data.slice(5,10)" :key="index">
<span v-for="(s,key) in item" :key='key'>
{{s}}
<li v-for="(item, index) in data.slice(5, 10)" :key="index">
<span>
{{ 6 + index }}
</span>
<span>{{ item.organName }}</span>
<span>{{ item.frequencyCnt }}</span>
</li>
</ul>
</div>
</div>
</div>
</template>
<script>
export default {
data(){
return{
}
data() {
return {};
},
props:{
tList:{
type:Array,
default:[]
props: {
tList: {
type: Array,
default: [],
},
data:{
type:Array,
default:()=>{return []}
}
data: {
type: Array,
default: () => {
return [];
},
methods:{
getImg(s){
return require('@/assets/overview/rank0'+ s + '.png')
}
}
}
},
},
methods: {
getImg(s) {
return require("@/assets/overview/rank0" + s + ".png");
},
},
};
</script>
<style lang="less" scoped>
.ul-wrapper{
.ul-wrapper {
display: flex;
padding: 15px 20px 40px;
.panel-table{
.panel-table {
width: 50%;
&:first-child{
&:first-child {
padding-right: 10px;
}
&:last-child{
&:last-child {
padding-left: 10px;
}
.title-wrapper{
.title-wrapper {
display: flex;
height: 48px;
line-height: 48px;
li{
li {
text-align: center;
width: 40%;
&:first-child{width: 20%;}
&:first-child {
width: 20%;
}
}
}
.panel-table-content{
.panel-table-content {
height: calc(100% - 56px);
li{
li {
width: 100%;
height: 20%;
line-height: 1;
max-height: 48px;
background-color:@party-bg-gray;
background-color: @party-bg-gray;
margin-bottom: 4px;
border-radius: 2px;
display: flex;
align-items: center;
span{
span {
text-align: center;
width: 40%;
display: inline-block;
&:first-child{width: 20%;}
&:first-child {
width: 20%;
}
}
img{
img {
width: 18px;
vertical-align: middle;
}
}
}
}
}
</style>
\ No newline at end of file
<template>
<div id="dialogBarDemand" style="width:100%;height:100%"></div>
<div id="dialogBarDemand" style="width: 100%; height: 100%"></div>
</template>
<script>
export default {
name: 'demand',
export default {
name: "demand",
data() {
return {
title:'互动频次'
title: "互动频次",
};
},
props: {
data:{
type: Object,
default:()=>{
return {}
}
},
},
mounted() {
setTimeout(()=>{
this.init()
},100)
},
methods: {
init(){
init() {
let option = {
tooltip: {
trigger: 'axis'
trigger: "axis",
},
grid: {
top: 40,
left: '2%',
left: "2%",
right: 40,
bottom: 30,
containLabel: true
containLabel: true,
},
// dataZoom: [{
// type: "slider",
......@@ -45,100 +51,107 @@
// }
// ],
xAxis: {
type: 'category',
boundaryGap: true,//坐标轴两边留白
data: [
'北京市政府', '天津市政府', '呼和浩特市政府', '石家庄市政府', '合肥市政府', '哈尔滨市政府', '廊坊市政府', '临沂市政府','忻州市政府', '黑龙江市政府',
],
axisLabel: { //坐标轴刻度标签的相关设置。
interval:0,
type: "category",
boundaryGap: true, //坐标轴两边留白
data: this.data.xAxisData,
axisLabel: {
//坐标轴刻度标签的相关设置。
interval: 0,
textStyle: {
color: '#333333',
fontStyle: 'normal',
fontFamily: '微软雅黑',
color: "#333333",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 14,
},
formatter: function (value, index) {
if(value.length > 4){
return value.slice(0,4)+ '...'
}else {
return value
}
if (value.length > 4) {
return value.slice(0, 4) + "...";
} else {
return value;
}
},
axisTick:{//坐标轴刻度相关设置。
},
axisTick: {
//坐标轴刻度相关设置。
show: false,
},
axisLine:{//坐标轴轴线相关设置
lineStyle:{
color:'#eeeeee',
type:'solid'
}
axisLine: {
//坐标轴轴线相关设置
lineStyle: {
color: "#eeeeee",
type: "solid",
},
splitLine: { //坐标轴在 grid 区域中的分隔线。
},
splitLine: {
//坐标轴在 grid 区域中的分隔线。
show: false,
}
},
},
yAxis: [
{
type: 'value',
name:'单位/次',
type: "value",
name: "单位/次",
splitNumber: 5,
max:100,
max: 100,
axisLabel: {
textStyle: {
color: '#333333',
fontStyle: 'normal',
fontFamily: '微软雅黑',
color: "#333333",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 12,
},
interval:'auto'
interval: "auto",
},
axisLine:{
show: false
axisLine: {
show: false,
},
axisTick:{
show: false
axisTick: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color:'#eeeeee',
type:'dashed'
}
}
}
color: "#eeeeee",
type: "dashed",
},
},
},
],
series: [
{
type: 'bar',
type: "bar",
barWidth: 16, // 柱子宽度
itemStyle:{
itemStyle: {
barBorderRadius: 120, // 圆角(左上、右上、右下、左下)
},
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
'#AC9374', '#9B1E23'
].map((color, offset) => ({
color: new this.$echarts.graphic.LinearGradient(
0,
0,
0,
1,
["#AC9374", "#9B1E23"].map((color, offset) => ({
color,
offset
}))), // 渐变
data: [ 25, 30,40, 52, 56,63, 73, 75, 83, 85,90].reverse()
}
]
offset,
}))
), // 渐变
data: this.data.yAxisData,
},
],
};
let echartsDiv = this.$echarts.init(document.querySelector('#dialogBarDemand'))
echartsDiv.setOption(option,true)
let echartsDiv = this.$echarts.init(
document.querySelector("#dialogBarDemand")
);
echartsDiv.setOption(option, true);
},
}
}
},
};
</script>
<style
<style lang="less">>
#dialogBarDemand{
<style lang="less">
> #dialogBarDemand {
width: 100%;
height: 100%;
}
}
</style>
import demand from './demand'
import interaction from './interaction'
import interact from './interact'
import areas from './areas'
import top10 from './top10'
import mapDiv from './maps'
......@@ -10,7 +10,7 @@ import trendLine from './echarts/line'
import rankTable from './detail-table/rankTable'
export {
demand,
interaction,
interact,
areas,
top10,
mapDiv,
......
<template>
<div class="interaction">
<div class="common-title">
<div class="icon-and-title">
<img class="icon-title" src="@/assets/overview/board.png" alt="" />
<span class="title">{{ title }}</span>
</div>
<img class="bg" src="@/assets/overview/bg_title02.png" alt="" />
</div>
<div id="tends"></div>
</div>
</template>
<script>
import { getCurDate } from "@/utils/util.time.js";
export default {
name: "interaction",
data() {
return {
title: "展板点播趋势图",
xAxisData: [],
yAxisData: [],
};
},
components: {},
mounted() {
this.getList()
},
methods: {
getList() {
let curTime = getCurDate();
let playDate = curTime.year + curTime.month;
let _this = this
this.$https({
method: "post",
url: "tBoardStatistic/getBoardTrendPageList?playDate=" + playDate,
authType: this.backToken,
})
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
this.xAxisData = res.data.data.dateList;
this.yAxisData = res.data.data.cntList;
} else {
this.xAxisData = [];
this.yAxisData = [];
}
} else {
this.xAxisData = [];
this.yAxisData = [];
}
this.init();
})
.catch((err) => {
this.$message.error(err.message);
this.xAxisData = [];
this.yAxisData = [];
this.init();
});
},
init() {
let option = {
tooltip: {
trigger: "axis",
},
grid: {
top: 20,
left: "2%",
right: 40,
bottom: 30,
containLabel: true,
},
dataZoom: [
{
type: "slider",
show: true,
bottom: 0,
start: 0,
end: 100,
height: 18,
handleStyle: {
color: "#d3dee5",
},
textStyle: {
color: "#fff",
fontSize: "10px",
},
},
],
xAxis: {
type: "category",
boundaryGap: false, //坐标轴两边留白
data: this.xAxisData,
axisLabel: {
//坐标轴刻度标签的相关设置。
textStyle: {
color: "#333333",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 14,
},
},
axisTick: {
//坐标轴刻度相关设置。
show: false,
},
axisLine: {
//坐标轴轴线相关设置
lineStyle: {
color: "#eeeeee",
type: "solid",
},
},
splitLine: {
//坐标轴在 grid 区域中的分隔线。
show: false,
},
},
yAxis: [
{
type: "value",
splitNumber: 5,
max: 100,
axisLabel: {
textStyle: {
color: "#333333",
fontStyle: "normal",
fontFamily: "微软雅黑",
fontSize: 12,
},
interval: "auto",
},
axisLine: {
show: false,
},
axisTick: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color: "#eeeeee",
type: "dashed",
},
},
},
],
series: [
{
type: "line",
smooth: true,
itemStyle: {
normal: {
color: "#AC9374",
lineStyle: {
color: "#9B1E23",
width: 1,
},
areaStyle: {
color: new this.$echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0,
color: "rgba(172,141,116,0.4)",
},
{
offset: 1,
color: "rgba(155,30,35,0.4)",
},
]),
},
},
},
data: this.yAxisData,
},
],
};
let echartsDiv = this.$echarts.init(document.getElementById("tends"));
echartsDiv.setOption(option);
},
// // 点击事件
// echartsClick() {
// this.$emit("itemClick", { type: 2, title: this.title });
// },
},
};
</script>
<style lang="less">
#tends {
width: 100%;
height: calc(100% - 45px);
}
</style>
<template>
<div class="interaction">
<div class="common-title">
<div class="icon-and-title">
<img class="icon-title" src="@/assets/overview/board.png" alt="">
<span class="title">{{title}}</span>
</div>
<img class="bg" src="@/assets/overview/bg_title02.png" alt="">
</div>
<div id="tends" @click="echartsClick"></div>
</div>
</template>
<script>
export default {
name: 'interaction',
data() {
return {
title:'展板点播趋势图'
}
},
components:{},
mounted() {
setTimeout(()=>{
this.init()
},100)
},
methods: {
init(){
let option = {
tooltip: {
trigger: 'axis'
},
grid: {
top:20,
left: '2%',
right: 40,
bottom: 30,
containLabel: true
},
dataZoom: [{
type: "slider",
show: true,
bottom: 0,
start: 0,
end: 100,
height: 18,
handleStyle: {
color: "#d3dee5",
},
textStyle: {
color: "#fff",
fontSize: "10px"
},
}
],
xAxis: {
type: 'category',
boundaryGap: false,//坐标轴两边留白
data: [
'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',
'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: {
color: '#333333',
fontStyle: 'normal',
fontFamily: '微软雅黑',
fontSize: 14,
},
},
axisTick:{//坐标轴刻度相关设置。
show: false,
},
axisLine:{//坐标轴轴线相关设置
lineStyle:{
color:'#eeeeee',
type:'solid'
}
},
splitLine: { //坐标轴在 grid 区域中的分隔线。
show: false,
}
},
yAxis: [
{
type: 'value',
splitNumber: 5,
max:100,
axisLabel: {
textStyle: {
color: '#333333',
fontStyle: 'normal',
fontFamily: '微软雅黑',
fontSize: 12,
},
interval:'auto'
},
axisLine:{
show: false
},
axisTick:{
show: false
},
splitLine: {
show: true,
lineStyle: {
color:'#eeeeee',
type:'dashed'
}
}
}
],
series: [
{
type: 'line',
smooth:true,
itemStyle: {
normal: {
color:'#AC9374',
lineStyle: {
color: "#9B1E23",
width:1
},
areaStyle: {
color: new this.$echarts.graphic.LinearGradient(0, 1, 0, 0, [{
offset: 0,
color: 'rgba(172,141,116,0.4)'
}, {
offset: 1,
color: 'rgba(155,30,35,0.4)'
}]),
}
}
},
data: [ 18, 19, 22, 23, 25, 26, 28, 30, 36, 38,
40, 42, 45, 44, 46, 47, 49, 52, 56, 59,
63, 66, 68, 69, 73, 75, 78, 80, 83, 85,90
]
}
]
};
let echartsDiv = this.$echarts.init(document.getElementById('tends'))
echartsDiv.setOption(option)
},
// 点击事件
echartsClick(){
this.$emit('itemClick',{type:2,title:this.title})
}
}
}
</script>
<style lang="less">
#tends{
width: 100%;
height: calc(100% - 45px);
}
</style>
......@@ -32,6 +32,7 @@
</template>
<script>
import { getCurDate } from '@/utils/util.time.js'
export default {
name: "top10",
data() {
......@@ -54,16 +55,8 @@ export default {
},
methods: {
getTitle(){
let curTime = this.getCurrentTime()
return `全国${curTime.yyyy}${curTime.MM}月展板点播TOP10`
},
getCurrentTime() {
let year = new Date().getFullYear();
let month = new Date().getMonth() + 1;
return {
yyyy: year,
MM: month > 9 ? month : `0${month}`,
};
let curTime = getCurDate()
return `全国${curTime.year}${curTime.month}月展板点播TOP10`
},
initScroll() {
let _this = this;
......
/* 互动频次 */
<template>
<div class="interaction-wrapper height100 overview-detail">
<div class="interaction-wrapper height100 overview-detail">
<div class="ecahrts-panel-box">
<div class="panel-box-header">
<span class="title">互动频次</span>
<div class="tip">
<span class="tip-title">页面说明:</span>
<span> 可查看当前系统各项数据统计情况。互动频次及点播趋势图展示部分数据,可进入互动统计及趋势分析详情页查看全部数据。</span>
<span>
可查看当前系统各项数据统计情况。互动频次及点播趋势图展示部分数据,可进入互动统计及趋势分析详情页查看全部数据。</span
>
</div>
</div>
<div class="panel-box-content">
<bar/>
<bar :data="echartsData" ref="echarts" />
</div>
</div>
<div class="rank-panel-box">
......@@ -18,42 +20,70 @@
<span class="title">互动频次排行</span>
</div>
<div class="panel-box-content">
<rank-table
:tList="tList"
:data="data"
/>
<rank-table :tList="tList" :data="data" />
</div>
</div>
</div>
</div>
</template>
<script>
import {bar,rankTable} from './components'
import { getCurDate } from "@/utils/util.time.js";
import { bar, rankTable } from "./components";
export default {
data(){
data() {
return {
tList:['排名','统计时间','点播总量'],
data:[
{index:1,time:'2021年1月',num:'268'},
{index:2,time:'2021年1月',num:'268'},
{index:3,time:'2021年1月',num:'268'},
{index:4,time:'2021年1月',num:'268'},
{index:5,time:'2021年1月',num:'268'},
{index:6,time:'2021年1月',num:'268'},
{index:7,time:'2021年1月',num:'268'},
{index:8,time:'2021年1月',num:'268'},
{index:9,time:'2021年1月',num:'268'},
{index:10,time:'2021年1月',num:'268'}
]
tList: ["排名", "机构名称", "互动频次"],
echartsData: {},
data: [],
};
},
components: { bar, rankTable },
mounted() {
this.getList();
},
methods: {
getList() {
let curTime = getCurDate();
let frequencyDate = curTime.year + curTime.month;
let _this = this
_this.$https({
method: "post",
url:
"tBoardStatistic/getInteractionFrequencyPageList?frequencyDate=" +
frequencyDate,
authType: this.backToken,
})
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
_this.echartsData = {};
_this.echartsData.xAxisData = res.data.data.organList;
_this.echartsData.yAxisData = res.data.data.cntList;
_this.data = res.data.data.page.records;
} else {
_this.echartsData = {};
_this.data = [];
}
} else {
_this.echartsData = {};
_this.data = [];
}
setTimeout(() => {
_this.init();
},100);
})
.catch((err) => {
_this.$message.error(err.message);
_this.echartsData = {};
_this.data = [];
});
},
components:{bar,rankTable},
methods:{
init() {
this.$refs.echarts.init();
}
}
},
};
</script>
<style>
</style>
\ No newline at end of file
......@@ -16,7 +16,7 @@
<demand class="echarts-panel"></demand>
</div>
<div class="echarts-box right">
<interaction class="echarts-panel"></interaction>
<interact class="echarts-panel"></interact>
</div>
</div>
</div>
......@@ -24,7 +24,7 @@
<script>
import {
demand,
interaction,
interact,
areas,
top10,
mapDiv,
......
/* 点播趋势图 */
<template>
<div class="trend-wrapper height100 overview-detail">
<div class="trend-wrapper height100 overview-detail">
<div class="ecahrts-panel-box">
<div class="panel-box-header">
<span class="title">趋势图</span>
<el-date-picker
v-model="value1"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
<el-select v-model="playDate">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<div class="tip">
<span class="tip-title">页面说明:</span>
<span>默认展示当月点播总量趋势图及详情表格,可按照时间段进行检索,图表可以联动变化。</span>
<span
>默认展示当月点播总量趋势图及详情表格,可按照时间段进行检索,图表可以联动变化。</span
>
</div>
</div>
<div class="panel-box-content">
<trend-line/>
<trend-line />
</div>
</div>
<div class="rank-panel-box">
......@@ -25,42 +29,72 @@
<span class="title">点播趋势排行</span>
</div>
<div class="panel-box-content">
<rank-table
:tList="tList"
:data="data"
/>
<rank-table :tList="tList" :data="data" />
</div>
</div>
</div>
</div>
</template>
<script>
import {trendLine, rankTable} from './components'
import { trendLine, rankTable } from "./components";
export default {
data(){
data() {
return {
value1:'',
tList:['排名','统计时间','点播总量'],
data:[
{index:1,time:'2021年1月',num:'268'},
{index:2,time:'2021年1月',num:'268'},
{index:3,time:'2021年1月',num:'268'},
{index:4,time:'2021年1月',num:'268'},
{index:5,time:'2021年1月',num:'268'},
{index:6,time:'2021年1月',num:'268'},
{index:7,time:'2021年1月',num:'268'},
{index:8,time:'2021年1月',num:'268'},
{index:9,time:'2021年1月',num:'268'},
{index:10,time:'2021年1月',num:'268'}
]
}
value1: "",
tList: ["排名", "统计时间", "点播总量"],
playDate:'',
data: [],
options: [
{ label: "年", value: "1" },
{ label: "月", value: "2" },
{ label: "日", value: "3" },
],
};
},
components:{trendLine, rankTable},
methods:{
components: { trendLine, rankTable },
methods: {
getList() {
let curTime = getCurDate();
let frequencyDate = curTime.year + curTime.month;
let _this = this;
_this
.$https({
method: "post",
url:
"tBoardStatistic/getInteractionFrequencyPageList?frequencyDate=" +
frequencyDate,
authType: this.backToken,
})
.then((res) => {
if (res.status == 200) {
if (res.data.resultCode == 200) {
_this.echartsData = {};
_this.echartsData.xAxisData = res.data.data.organList;
_this.echartsData.yAxisData = res.data.data.cntList;
_this.data = res.data.data.page.records;
} else {
_this.echartsData = {};
_this.data = [];
}
} else {
_this.echartsData = {};
_this.data = [];
}
}
setTimeout(() => {
_this.init();
}, 100);
})
.catch((err) => {
_this.$message.error(err.message);
_this.echartsData = {};
_this.data = [];
});
},
init() {
this.$refs.echarts.init();
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
......@@ -60,7 +60,7 @@ export default {
feildList:[
{prop:'userName',label:'运维账号'},
{prop:'area',label:'运维区域'},
{prop:'operationType',label:'操作内容'},
{prop:'operationIp',label:'操作Ip'},
{prop:'createTime',label:'操作时间'}
],
list: [],
......
......@@ -77,7 +77,7 @@ export default {
{prop:'operator',label:'操作者'},
{prop:'operationType',label:'操作类型'},
{prop:'operationObject',label:'操作对象'},
{prop:'operationContent',label:'操作内容'},
{prop:'operationIp',label:'操作Ip'},
],
list: [],
page:{
......
......@@ -77,7 +77,7 @@ export default {
{prop:'operator',label:'操作者'},
{prop:'operationType',label:'操作类型'},
{prop:'operationObject',label:'操作对象'},
{prop:'operationContent',label:'操作内容'},
{prop:'operationIp',label:'操作Ip'},
],
list: [],
page:{
......
import html2canvas from 'html2canvas'
const htmlCanvas = function (callback) {
html2canvas(document.querySelector('#bodyCanvas'), {
backgroundColor: null,
useCORS: true,
allowTaint: true,
taintTest: false,
width: document.querySelector('#bodyCanvas').clientWidth,
height: document.querySelector('#bodyCanvas').clientHeight,
scale: true
// windowWidth: 200,
// windowHeight: 126
// x: 250
}).then((canvas) => {
if (!canvas) {
callback(null)
return
}
// canvas.width = 200
// callback(canvas.toDataURL('image/png'))
callback(canvas.toDataURL('image/jpeg', 0.5))
})
}
export default htmlCanvas
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}`
};
}
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