添加首页报表,下载

hn2.0
fanluyan 2 years ago
parent cd0069339a
commit 8589e39db5

@ -15,6 +15,23 @@ export function getTermStatistics(data) {
params: data,
});
}
//获取一周的装置告警
export function getWeekAlarmStatistics(data) {
return request({
url: "/api/getWeekAlarmStatistics",
method: "get",
params: data,
});
}
//获取当天告警分类统计
export function getTodayAlarmStatistics(data) {
return request({
url: "/api/getTodayAlarmStatistics",
method: "get",
params: data,
});
}
//获取所有杆塔下的图片列表,实时监控
export function getTowerAndPhotoList(data) {
@ -747,3 +764,13 @@ export function getTermStatus(data) {
},
});
}
//导出数据
export function getTerminalListExcel() {
return request({
url: "/api/getTerminalListExcel",
method: "post",
responseType: "blob",
});
}

@ -0,0 +1,111 @@
<template>
<el-dialog
title="历史图片"
:visible.sync="isShow"
class="historyPic"
width="1192px"
@close="handleclose"
>
<div v-loading="loadingpic">
<el-carousel
:loop="false"
:autoplay="false"
height="650px"
indicator-position="none"
>
<el-carousel-item v-for="(item, index) in imglist" :key="index">
<el-image
:src="item.path"
fit="contain"
v-if="item.mediaType == 0"
></el-image>
<el-image
:src="item.thumb"
fit="contain"
v-if="item.mediaType == 1"
></el-image>
</el-carousel-item>
</el-carousel>
</div>
</el-dialog>
</template>
<script>
import { getHistoryList } from "@/utils/api/index";
export default {
data() {
return {
isShow: false,
imglist: [],
page: 1, //
pageSize: 10, //
total: 0, //
selectnr: "", //
loadingpic: false,
};
},
mounted() {},
methods: {
//
getdataform(val) {
this.selectnr = val;
this.loadingpic = true;
getHistoryList({
channelId: this.selectnr.channelId,
termId: this.selectnr.termId,
pageindex: this.page,
pagesize: this.pageSize,
}).then((res) => {
this.loadingpic = false;
this.imglist = res.data.list;
this.total = res.data.total;
});
},
//
changebtn(e) {
console.log(e);
if (Math.floor(e / 9) == 1) {
this.page++;
getHistoryList({
channelId: this.selectnr.channelId,
termId: this.selectnr.termId,
pageindex: this.page,
pagesize: this.pageSize,
}).then((res) => {
this.imglist.push(res.data.list);
this.total = res.data.total;
});
}
},
display() {
this.isShow = true;
},
hide() {
this.isShow = false;
this.imglist = [];
},
handleclose() {
this.isShow = false;
this.imglist = [];
},
},
};
</script>
<style lang="less">
.historyPic {
.el-image {
width: 1152px;
height: 648px;
img {
width: 1152px;
height: 648px;
}
}
.el-carousel__arrow {
background: rgba(0, 0, 0, 0.5);
height: 40px;
width: 40px;
color: #169e8c;
font-size: 22px;
}
}
</style>

@ -1,46 +1,46 @@
<template>
<el-dialog
title="历史图片"
:visible.sync="isShow"
class="historyPic"
width="1192px"
@close="handleclose"
title="历史图片"
:visible.sync="historyPicdialog"
width="1366px"
:close-on-click-modal="false"
class="showDialogHistoryPic"
>
<div v-loading="loadingpic">
<el-carousel
:loop="false"
:autoplay="false"
height="650px"
indicator-position="none"
>
<el-carousel-item v-for="(item, index) in imglist" :key="index">
<el-image
:src="item.path"
fit="contain"
v-if="item.mediaType == 0"
></el-image>
<el-image
:src="item.thumb"
fit="contain"
v-if="item.mediaType == 1"
></el-image>
</el-carousel-item>
</el-carousel>
<div class="title">
{{ picInfoData.lineName }}-{{ picInfoData.towerName }}-{{
picInfoData.alias !== null && picInfoData.alias !== ""
? picInfoData.alias
: picInfoData.channnelname
}} {{ $moment(picInfoData.photoTime).format("YYYY-MM-DD ") }}
</div>
<carouselChart
ref="carouselpic"
:terminalPhoto="terminalPhoto"
v-if="terminalPhoto.length > 0"
v-loading="historyPicLoading"
></carouselChart>
</el-dialog>
</template>
<script>
import carouselChart from "../../components/carouselChart.vue";
import { getHistoryList } from "@/utils/api/index";
export default {
components: {
carouselChart,
},
data() {
return {
isShow: false,
imglist: [],
page: 1, //
pageSize: 10, //
total: 0, //
selectnr: "", //
loadingpic: false,
historyPicLoading: false,
historyPicdialog: false,
//
picInfoData: {}, //
terminalPhoto: [], //
nopicPath: require("@/assets/img/nopic.jpg"),
};
},
mounted() {},
@ -48,15 +48,18 @@ export default {
//
getdataform(val) {
this.selectnr = val;
this.loadingpic = true;
this.historyPicLoading = true;
getHistoryList({
channelId: this.selectnr.channelId,
termId: this.selectnr.termId,
pageindex: this.page,
pagesize: this.pageSize,
}).then((res) => {
this.loadingpic = false;
this.imglist = res.data.list;
console.log(res);
this.historyPicLoading = false;
this.terminalPhoto = res.data.list;
this.total = res.data.total;
});
},
@ -71,41 +74,43 @@ export default {
pageindex: this.page,
pagesize: this.pageSize,
}).then((res) => {
this.imglist.push(res.data.list);
this.terminalPhoto.push(res.data.list);
this.total = res.data.total;
});
}
},
display() {
this.isShow = true;
display(data) {
this.historyPicdialog = true;
this.picInfoData = data;
console.log(data);
},
hide() {
this.isShow = false;
this.imglist = [];
this.historyPicdialog = false;
this.terminalPhoto = [];
},
handleclose() {
this.isShow = false;
this.imglist = [];
this.historyPicdialog = false;
this.terminalPhoto = [];
},
},
};
</script>
<style lang="less">
.historyPic {
.el-image {
width: 1152px;
height: 648px;
img {
width: 1152px;
height: 648px;
.showDialogHistoryPic {
.el-dialog__body {
height: 768px;
.title {
height: 32px;
padding-left: 12px;
line-height: 32px;
color: #fff;
font-size: 14px;
background: linear-gradient(180deg, #4cdbc8 10%, #128071 100%);
text-align: center;
}
.thumb-example {
//height: 100%;
}
}
.el-carousel__arrow {
background: rgba(0, 0, 0, 0.5);
height: 40px;
width: 40px;
color: #169e8c;
font-size: 22px;
}
}
</style>

@ -924,8 +924,8 @@ export default {
},
//
handleHistory() {
this.$refs.historyimg_ref.display();
handleHistory(val) {
this.$refs.historyimg_ref.display(val);
this.$refs.historyimg_ref.getdataform(this.selectRow);
},
//
@ -946,7 +946,7 @@ export default {
handlePicHistory(val) {
console.log(val);
this.selectRow = val;
this.handleHistory();
this.handleHistory(val);
},
handlePicAlarm(val, index) {
console.log(val, index);

@ -3,9 +3,20 @@
<div class="photoBox">
<div class="photoGraphicBtnGroup">
<h4>拍照装置管理</h4>
<el-button type="primary" icon="el-icon-plus" @click="handleAddPhoto()"
>新增</el-button
>
<div>
<el-button
type="primary"
icon="el-icon-plus"
@click="handleAddPhoto()"
>新增</el-button
>
<el-button
type="primary"
icon="el-icon-document"
@click="handleExport()"
>导出</el-button
>
</div>
</div>
<div class="searchBox">
<el-form :inline="true" :model="formdata" class="demo-form-inline">
@ -402,6 +413,7 @@ import {
resetTerminalApi,
setTermGPSJoggle,
getSearchInfo,
getTerminalListExcel,
} from "@/utils/api/index";
import moment from "moment";
import addPhotoDialog from "./components/addPhotoDialog.vue";
@ -582,6 +594,11 @@ export default {
this.$refs.addPhotoDialogref.display();
this.$refs.addPhotoDialogref.getdataform(null);
},
//
handleExport() {
window.location.href = "/api/api/getTerminalListExcel";
},
//handleResive 线
handleRevisePhoto(data) {
this.photoDialogTitle = "修改";

@ -305,16 +305,16 @@ export default {
: 15;
this.rowNum = parseInt(localStorage.getItem("row"))
? parseInt(localStorage.getItem("row"))
: 2;
: 4;
this.colNum = parseInt(localStorage.getItem("col"))
? parseInt(localStorage.getItem("col"))
: 2;
: 4;
this.rowradio = parseInt(localStorage.getItem("row"))
? parseInt(localStorage.getItem("row"))
: 2;
: 4;
this.colradio = parseInt(localStorage.getItem("col"))
? parseInt(localStorage.getItem("col"))
: 2;
: 4;
},
submitForm() {
localStorage.setItem("totalTime", this.selSpeed);
@ -322,10 +322,10 @@ export default {
localStorage.setItem("col", this.colradio);
this.rowNum = parseInt(localStorage.getItem("row"))
? parseInt(localStorage.getItem("row"))
: 2;
: 4;
this.colNum = parseInt(localStorage.getItem("col"))
? parseInt(localStorage.getItem("col"))
: 2;
: 4;
this.pageSize = this.rowradio * this.colradio;
this.setdialog = false;
this.$message.success("设置成功");
@ -406,10 +406,10 @@ export default {
: 15;
this.rowradio = this.rowNum = parseInt(localStorage.getItem("row"))
? parseInt(localStorage.getItem("row"))
: 2;
: 4;
this.colradio = this.colNum = parseInt(localStorage.getItem("col"))
? parseInt(localStorage.getItem("col"))
: 2;
: 4;
this.pageSize = this.rowradio * this.colradio;
this.toggleCountdown();
},

@ -314,7 +314,7 @@ export default {
selectDyId: "", //线
selectLineId: "",
selectTowerId: "",
currentId: "",
currentData: "", //
};
},
watch: {
@ -375,9 +375,10 @@ export default {
this.towertitle = data.name;
this.zzCmdid = data.cmdid;
this.getChannelList(data.id);
// this.getTerminalPhotoList(id, date, data.id);
}
localStorage.setItem("currentId", data.id);
localStorage.setItem("currentData", JSON.stringify(this.selectData));
},
//
getLineTreeStatus() {
@ -409,22 +410,29 @@ export default {
console.log(this.lineTreeData);
this.onlineNum = res.data.onlineNum;
this.totalNum = res.data.totalNum;
this.currentData = JSON.parse(localStorage.getItem("currentData"));
if (this.lineTreeData[0].list[0].list.length > 0) {
this.selectData = this.lineTreeData[0]; //
this.emptyText = "暂无数据";
this.currentNodekey = this.lineTreeData[0].id; //
this.type = 1;
this.newCurrentId = this.lineTreeData[0].id;
this.previewData = this.lineTreeData[0]; //
//localStorage.setItem("currentId", this.currentNodekey);
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey); //
if (Object.keys(this.currentData).length !== 0) {
this.currentNodekey = this.currentData.id;
this.handleNodeClick(this.currentData);
} else {
this.selectData = this.lineTreeData[0]; //
this.emptyText = "暂无数据";
this.currentNodekey = this.lineTreeData[0].id; //
this.type = 1;
this.newCurrentId = this.lineTreeData[0].id;
this.previewData = this.lineTreeData[0]; //
this.channelId = this.currentNodekey;
this.$refs.previewRef.getPicList(
this.currentNodekey,
this.type,
this.page
);
}
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey); //
});
}
})
@ -592,6 +600,7 @@ export default {
if (node) {
this.$nextTick(() => {
// scrollIntoViewdom block: 'center'
console.log(node);
node.scrollIntoView({ block: "center" });
});
}
@ -651,6 +660,7 @@ export default {
this.picTime = res.data.taketime; //
console.log(this.requestId);
this.btnvideoloading = true;
this.getTakePicStatus(this.requestId);
this.statusTimer = window.setInterval(() => {
this.getTakePicStatus(this.requestId);
this.statusNum++;
@ -693,6 +703,8 @@ export default {
});
} else if (res.data == 1) {
this.statusNum = 0;
this.btnpicloading = false;
this.btnvideoloading = false;
clearInterval(this.statusTimer);
this.statusTimer = null;
this.$message({
@ -707,6 +719,8 @@ export default {
}, 8000);
} else if (res.data == 2) {
this.statusNum = 0;
this.btnpicloading = false;
this.btnvideoloading = false;
clearInterval(this.statusTimer);
this.statusTimer = null;
this.$message({
@ -982,6 +996,16 @@ export default {
this.timer = null;
} //vue
},
beforeRouteLeave(to, from, next) {
//
next();
if (this.timer) {
console.log(this.timer);
clearInterval(this.timer);
this.timer = null;
}
},
};
</script>
@ -1028,13 +1052,20 @@ export default {
}
}
.el-tree {
overflow: auto;
overflow-y: auto;
overflow-x: hidden;
.el-tree-node__content {
height: 32px;
font-size: 12px;
}
.custom-tree-node {
color: #333;
overflow: hidden;
span {
display: flex;
display: inline-table;
overflow: hidden;
}
}
}
@ -1046,6 +1077,15 @@ export default {
background: #169e8c;
.custom-tree-node {
color: #fff;
//overflow: hidden;
span {
display: flex;
//overflow: hidden;
.iconfont {
//width: 30px;
display: inline-table;
}
}
}
}

@ -1,216 +0,0 @@
<template>
<div class="parameterArea">
<div class="timeBox"></div>
<div class="monitorItemBox">
<h3>检测项</h3>
<div class="btnBox">
<el-button
type="primary"
v-for="(item, index) in MonitorItem"
:key="index"
icon="el-icon-thumb"
>{{ item.name }}</el-button
>
</div>
</div>
<div class="monitorPointBox">
<h3>监拍点</h3>
<div class="btnBox">
<el-button
type="primary"
v-for="(item, index) in MonitorPoint"
:key="index"
icon="el-icon-thumb"
>{{ item.name }}</el-button
>
</div>
</div>
<div class="actionItem">
<h3>操作项</h3>
<div class="btnBox">
<el-button
type="primary"
v-for="(item, index) in actionItem"
:key="index"
icon="el-icon-thumb"
>{{ item.name }}</el-button
>
</div>
</div>
<div class="configItem">
<h3>配置项</h3>
<div class="btnBox">
<el-button
type="primary"
v-for="(item, index) in configItem"
:key="index"
icon="el-icon-thumb"
>{{ item.name }}</el-button
>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
//
MonitorItem: [
{
name: "图片视频",
},
{
name: "测温",
},
{
name: "微气象",
},
{
name: "倾斜监测",
},
{
name: "风偏监测",
},
{
name: "覆冰检测",
},
{
name: "实时视频",
},
{
name: "弧垂",
},
{
name: "电压检测",
},
],
//
MonitorPoint: [
{
name: "小号侧",
},
{
name: "大号侧",
},
],
//
actionItem: [
{
name: "主动拍照",
},
{
name: "主动录像",
},
{
name: "声光报警",
},
{
name: "图片调阅",
},
{
name: "微信推送",
},
{
name: "历史图片",
},
{
name: "线缆绘制",
},
{
name: "清除绘制",
},
{
name: "主动巡检",
},
{
name: "指令集",
},
{
name: "开启雨刮",
},
{
name: "喊话",
},
{
name: "上一设备",
},
{
name: "下一设备",
},
{
name: "返回",
},
{
name: "历史对比",
},
{
name: "图片标记",
},
{
name: "主动巡航",
},
],
//
configItem: [
{
name: "设置分组",
},
{
name: "隐患类型",
},
{
name: "地图查看",
},
{
name: "监拍点信息",
},
{
name: "告警级别",
},
{
name: "设备信息",
},
{
name: "设置漏告",
},
],
};
},
};
</script>
<style lang="less">
// .parameterArea {
// width: 300px;
// padding: 16px 8px;
// .monitorItemBox,
// .monitorPointBox,
// .actionItem,
// .configItem {
// border: 1px solid @border-color-base;
// padding: 8px 16px 8px 16px;
// margin-bottom: 32px;
// h3 {
// font-size: 16px;
// margin-bottom: 8px;
// background: transparent;
// color: @color-text-regular;
// }
// .btnBox {
// display: flex;
// flex-wrap: wrap;
// justify-content: space-between;
// .el-button {
// width: 84px;
// padding: 6px 0px;
// font-size: 12px;
// margin-bottom: 8px;
// }
// .el-button + .el-button {
// margin-left: 0px;
// }
// }
// }
// }
</style>

@ -107,7 +107,7 @@
</el-form-item>
</el-form>
</div>
<div class="pictureBox" v-loading="loading">
<div class="pictureBox" v-loading="loading" v-infinite-scroll>
<div v-if="picList.length !== 0" style="width: 100%">
<el-card
class="box-card imgList"

@ -1,94 +1,84 @@
<template>
<div class="stritleEchartsPage">
<div class="echart-top">
<el-card class="box-card">
<el-card class="box-card" v-loading="numloading">
<h3>装置数量统计</h3>
<div class="bottomM">
<div class="infoBox">
<p>
<span>装置总数</span>
<span>260</span>
<span>{{ termDataNum.totalNum }}</span>
</p>
<p>
<span>在线数量</span>
<span>4</span>
<span>{{ termDataNum.onlineNum }}</span>
</p>
<p>
<span>离线率</span>
<span>99.85%</span>
<span>{{ (termDataNum.offlinePercent * 100).toFixed(2) }}%</span>
</p>
<p>
<span>在线率</span>
<span>0.15%</span>
<span>{{ (termDataNum.onlinePercent * 100).toFixed(2) }}%</span>
</p>
</div>
</div>
<!-- <div id="echart1" style="width: 100%; height: 100%"></div> -->
</el-card>
<el-card class="box-card">
<h3>装置在线统计</h3>
<div id="echart2" style="width: 100%; height: 100%"></div>
<div id="echart2" class="chartClass" v-loading="pieloading"></div>
</el-card>
</div>
<div class="echart-top">
<el-card class="box-card">
<h3>隐患数量统计</h3>
<el-card class="box-card" v-loading="barloading">
<h3>7天告警数量统计</h3>
<div class="dateBox">
<span class="datemsg">当前日期前七天</span>
<el-date-picker
v-model="value1"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
v-model="dateValue"
align="right"
type="date"
placeholder="选择日期"
:picker-options="singpickerOptions"
@change="changedate"
:picker-options="morepickerOptions"
>
</el-date-picker>
</div>
<div id="echart3" style="width: 100%; height: 100%"></div>
<div id="echart3" class="chartClass"></div>
</el-card>
<el-card class="box-card">
<h3>隐患分类统计</h3>
<el-card class="box-card" v-loading="pie2loading">
<h3>告警类型统计</h3>
<div class="dateBox">
<el-date-picker
v-model="value2"
v-model="dateValue2"
align="right"
type="date"
placeholder="选择日期"
:picker-options="singpickerOptions"
@change="changedate2"
>
</el-date-picker>
</div>
<div id="echart4" style="width: 100%; height: 100%"></div>
<div id="echart4" class="chartClass"></div>
</el-card>
</div>
</div>
</template>
<script>
import { getTermStatistics } from "@/utils/api/index";
import {
getTermStatistics,
getWeekAlarmStatistics,
getTodayAlarmStatistics,
} from "@/utils/api/index";
export default {
name: "",
data() {
return {
termDataNum: "",
value1: "",
value2: "",
morepickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
},
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
],
},
termDataNum: "", //
dateValue: "", //7
dateValue2: "", //
weekData: [], //7
todayAlarm: [], //
singpickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
@ -97,12 +87,17 @@ export default {
myChart2: "",
myChart3: "",
myChart4: "",
numloading: false,
pieloading: false,
barloading: false,
pie2loading: false,
};
},
mounted() {
this.getDateTime(); //
this.getTermData();
this.init();
console.log(this.value1);
this.getWeekAlarmStatistics();
this.getTodayAlarmStatistics();
},
watch: {
"$store.state.collapse"(val) {
@ -117,25 +112,68 @@ export default {
},
},
methods: {
//
changedate() {
console.log(this.value1);
console.log(this.dateValue.getTime());
this.dateValue = this.dateValue.getTime();
this.getWeekAlarmStatistics();
},
//
changedate2() {
console.log(this.dateValue2.getTime());
this.dateValue = this.dateValue2.getTime();
this.getTodayAlarmStatistics();
},
//
getDateTime() {
console.log(new Date());
this.dateValue = new Date().getTime();
this.dateValue2 = new Date().getTime();
console.log(this.dateValue);
//console.log(this.$moment(this.dateValue).format("yy-MM-DD"));
},
//
getTermData() {
this.numloading = true;
this.pieloading = true;
getTermStatistics()
.then((res) => {
console.log(res);
this.termDataNum = res.data;
this.numloading = false;
this.pieloading = false;
this.getEchart2();
})
.catch((err) => {});
},
init() {
this.getEchart2();
this.getEchart3();
this.getEchart4();
//7
getWeekAlarmStatistics() {
this.barloading = true;
getWeekAlarmStatistics({ starttime: this.dateValue })
.then((res) => {
console.log(res);
this.weekData = res.data.list;
this.barloading = false;
this.getEchart3();
})
.catch((err) => {});
},
//
getTodayAlarmStatistics() {
this.pie2loading = true;
getTodayAlarmStatistics({ starttime: this.dateValue2 })
.then((res) => {
console.log(res);
this.todayAlarm = res.data.list;
this.pie2loading = false;
this.getEchart4();
})
.catch((err) => {});
},
//
getEchart2() {
this.$nextTick(() => {
console.log(this.termDataNum);
this.$echarts.init(document.getElementById("echart2")).dispose();
this.myChart2 = this.$echarts.init(document.getElementById("echart2"));
let option = {
@ -147,7 +185,7 @@ export default {
},
legend: {
top: "5%",
left: "center",
left: "left",
},
series: [
{
@ -178,8 +216,8 @@ export default {
show: true,
},
data: [
{ value: 1048, name: "在线" },
{ value: 735, name: "离线" },
{ value: this.termDataNum.onlineNum, name: "在线" },
{ value: this.termDataNum.offlineNum, name: "离线" },
],
},
],
@ -190,7 +228,7 @@ export default {
});
});
},
//7
getEchart3() {
this.$nextTick(() => {
this.$echarts.init(document.getElementById("echart3")).dispose();
@ -199,14 +237,29 @@ export default {
// title: {
// text: "",
// },
color: ["#169e8c"],
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
},
xAxis: {
type: "category",
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
data: this.weekData.map((x) => {
return this.$moment(x.date).format("yy-MM-DD");
}),
axisTick: {
alignWithLabel: true,
},
},
yAxis: { type: "value" },
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
name: "告警数量",
data: this.weekData.map((x) => {
return x.num;
}),
type: "bar",
showBackground: true,
backgroundStyle: { color: "rgba(180, 180, 180, 0.2)" },
@ -219,25 +272,92 @@ export default {
});
});
},
//
getEchart4() {
this.$nextTick(() => {
this.$echarts.init(document.getElementById("echart4")).dispose();
this.myChart4 = this.$echarts.init(document.getElementById("echart4"));
let arr = [];
this.todayAlarm.forEach((element) => {
arr.push({
value: element.num, //numvalue
name: element.enname, //namename
});
});
let option = {
// title: {
// text: "",
// },
xAxis: {
type: "category",
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
// tooltip: {
// trigger: "axis",
// axisPointer: {
// type: "shadow",
// },
// },
// xAxis: {
// type: "category",
// data: this.todayAlarm.map((item) => {
// return item.enname;
// }),
// axisTick: {
// alignWithLabel: true,
// },
// },
// yAxis: { type: "value" },
// series: [
// {
// name: "",
// data: this.todayAlarm.map((item) => {
// return item.num;
// }),
// type: "bar",
// showBackground: true,
// backgroundStyle: { color: "rgba(180, 180, 180, 0.2)" },
// },
// ],
// title: {
// text: "线",
// },
tooltip: {
trigger: "item",
},
legend: {
type: "scroll",
orient: "vertical",
right: 10,
top: 20,
bottom: 20,
},
yAxis: { type: "value" },
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
type: "bar",
showBackground: true,
backgroundStyle: { color: "rgba(180, 180, 180, 0.2)" },
type: "pie",
radius: ["40%", "70%"],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 10,
borderColor: "#fff",
borderWidth: 2,
},
label: {
show: true,
fontSize: 16,
fontWeight: "bold",
formatter: "{b}\n{d}%",
},
emphasis: {
label: {
show: true,
fontSize: 26,
fontWeight: "bold",
formatter: "{b}\n{d}%",
},
},
labelLine: {
show: true,
},
data: arr,
},
],
};
@ -270,6 +390,10 @@ export default {
}
}
.box-card {
.chartClass {
height: calc(100% - 32px);
width: 100%;
}
h3 {
font-size: 18px;
color: #333;
@ -285,10 +409,11 @@ export default {
width: 40%;
height: 88px;
text-align: center;
margin: 28px;
margin: 4%;
display: flex;
flex-direction: column;
justify-content: space-around;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
span {
color: #333;
font-size: 16px;
@ -299,57 +424,22 @@ export default {
}
}
&:first-child {
//background: url("../../assets/img/border-blue.png");
background: linear-gradient(
to bottom,
rgb(22, 158, 140, 0.3) 0%,
rgba(255, 255, 255, 0.1) 30%,
rgba(255, 255, 255, 0.1) 40%,
rgba(255, 255, 255, 0.1) 50%,
rgba(255, 255, 255, 0.1) 60%,
rgba(255, 255, 255, 0.1) 70%,
rgb(22, 158, 140, 0.3) 100%
);
span {
&:last-child {
color: #128071;
}
}
}
&:nth-child(2) {
background: url("../../assets/img/border-green.png");
background: linear-gradient(
to bottom,
rgb(0, 234, 27, 0.3) 0%,
rgba(255, 255, 255, 0.1) 30%,
rgba(255, 255, 255, 0.1) 40%,
rgba(255, 255, 255, 0.1) 50%,
rgba(255, 255, 255, 0.1) 60%,
rgba(255, 255, 255, 0.1) 70%,
rgb(0, 234, 27, 0.3) 100%
);
span {
&:last-child {
color: #409eff;
}
}
}
&:nth-child(3) {
background: url("../../assets/img/border-yellow.png");
background: linear-gradient(
to bottom,
rgb(207, 222, 44, 0.3) 0%,
rgba(255, 255, 255, 0.1) 30%,
rgba(255, 255, 255, 0.1) 40%,
rgba(255, 255, 255, 0.1) 50%,
rgba(255, 255, 255, 0.1) 60%,
rgba(255, 255, 255, 0.1) 70%,
rgb(207, 222, 44, 0.3) 100%
);
}
&:nth-child(4) {
background: url("../../assets/img/border-gray.png");
background: linear-gradient(
to bottom,
rgb(84, 112, 198, 0.3) 0%,
rgba(255, 255, 255, 0.1) 30%,
rgba(255, 255, 255, 0.1) 40%,
rgba(255, 255, 255, 0.1) 50%,
rgba(255, 255, 255, 0.1) 60%,
rgba(255, 255, 255, 0.1) 70%,
rgb(84, 112, 198, 0.3) 100%
);
}
}
}
@ -358,6 +448,10 @@ export default {
position: absolute;
top: 20px;
right: 20px;
.datemsg {
margin-right: 8px;
font-size: 12px;
}
}
}
}

Loading…
Cancel
Save