From d96a7562b2515584fac4dcb57fdbdcadc8f36fef Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期六, 03 八月 2024 17:48:23 +0800
Subject: [PATCH] 测试完成
---
src/views/index.vue | 452 +++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 331 insertions(+), 121 deletions(-)
diff --git a/src/views/index.vue b/src/views/index.vue
index d44d565..e86fe40 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -3,53 +3,62 @@
<div class="home" style="margin-top: 40px; margin-left: 20px">
<!-- 澶撮儴涓や釜 -->
<el-row :gutter="20">
- <el-col :span="10">
+ <el-col :span="11">
<!-- 灏辫瘖缁熻鐩掑瓙 -->
<div class="grid-content bg-purple headerBox bgc1">
<div class="title">
- 灏辫瘖缁熻
+ 鎮h�呯粺璁�<span
+ style="
+ font-size: 25px;
+ font-weight: 600;
+ text-shadow: 2px 4px 7px rgb(85 132 255 / 50%);
+ color: black;
+ "
+ >12322 (浜�)</span
+ >
<span>{{ endatd }} ~ {{ statd }}</span>
</div>
<el-row :gutter="20">
- <el-col :span="6">
+ <el-col :span="8">
<div class="home-user-task-stats">
- <p>{{ 12322 }}</p>
- </div>
- <div class="text-color2">
- <p>灏辫瘖鎬绘暟锛堜釜锛�</p>
- </div>
- </el-col>
- <el-col :span="6">
- <div class="home-user-task-stats">
- <p>{{ 1231 }}</p>
+ <p>{{ 11231 }}</p>
<div class="text-color2">
- <p>鍦ㄩ櫌鎬绘暟锛堜汉锛�</p>
+ <p>闂ㄨ瘖鎬绘暟锛堜汉锛�</p>
</div>
</div>
</el-col>
- <el-col :span="6">
+ <el-col :span="7">
<div class="home-user-task-stats">
- <p>{{ ticketStatistics.progressTotal || "0" }}</p>
+ <p>{{ 9207 }}</p>
<div class="text-color2">
- <p>绂婚櫌鎬绘暟锛堜汉锛�</p>
+ <p>浣忛櫌鎬绘暟锛堜汉锛�</p>
</div>
</div>
</el-col>
- <el-col :span="6">
+ <el-col :span="7">
<div class="home-user-task-stats">
- <p>{{ 12 }}</p>
+ <p>{{ 1209 }}</p>
<div class="text-color2">
- <p>鎶曡瘔鎬绘暟</p>
+ <p>浣撴鎬绘暟锛堜汉锛�</p>
</div>
</div>
</el-col>
</el-row>
</div>
</el-col>
- <el-col :span="7">
+ <el-col :span="9">
<div class="grid-content bg-purple headerBox bgc2">
<div class="title">
- 鍖诲姟浜哄憳鏁伴噺
+ 闂ㄨ瘖鏈嶅姟鎬绘暟
+ <span
+ style="
+ font-size: 25px;
+ text-shadow: 2px 4px 7px rgb(255 99 85 / 50%);
+ font-weight: 600;
+ color: red;
+ "
+ >12322 (浜�)</span
+ >
<span>{{ endatd }} ~ {{ statd }}</span>
</div>
<el-row :gutter="20">
@@ -58,14 +67,14 @@
<p style="color: red">{{ 3453 }}</p>
</div>
<div class="text-color2">
- <p>鍖诲笀</p>
+ <p>浣忛櫌鏈嶅姟浜烘暟</p>
</div>
</el-col>
<el-col :span="12">
<div class="home-user-task-stats">
<p style="color: red">{{ 4213 }}</p>
<div class="text-color2">
- <p>鎶ゅ+</p>
+ <p>浣撴鏈嶅姟浜烘暟</p>
</div>
</div>
</el-col>
@@ -75,7 +84,7 @@
</el-row>
<!-- 涓棿鍜屽彸杈� -->
<el-row :gutter="20">
- <el-col :span="17">
+ <el-col :span="20">
<!-- echars鏁版嵁鍙鍖� -->
<div class="grid-content bg-purple" style="min-height: 365px">
<div class="title">
@@ -106,36 +115,33 @@
</div>
</el-col>
<!-- 涓棿鍜屽彸杈� -->
- <el-col :span="6" class="aside">
- <div
- class="grid-content bg-purple"
- style="height: 560px; margin-top: -180px"
- >
+ <el-col :span="4" class="aside">
+ <div class="grid-content bg-purple" style="margin-top: -180px">
<div class="title">
- 鎺ヨ瘖鎺掕
+ 鍋ュ悍瀹f暀
<span>{{ endatd }} ~ {{ statd }}</span>
</div>
- <el-table style="width: 100%" :data="SkuTop">
- <template v-for="(item, index) in SkuTop"></template>
- <el-table-column
- prop="order"
- width="30"
- style="background: url(~@/assets/order/4.png)"
- type="index"
-
- ></el-table-column>
- <el-table-column
- prop="skuName"
- width="124"
- class-name="name"
-
- ></el-table-column>
- <el-table-column
- prop="count"
- class-name="count"
-
- ></el-table-column>
- </el-table>
+ <div style="max-height: 690px; width: 100%; overflow: auto">
+ <el-table style="width: 100%" :data="SkuTop">
+ <template v-for="(item, index) in SkuTop"></template>
+ <el-table-column
+ prop="order"
+ width="30"
+ style="background: url(~@/assets/order/4.png)"
+ type="index"
+ ></el-table-column>
+ <el-table-column
+ prop="skuName"
+ width="88"
+ class-name="name"
+ ></el-table-column>
+ <el-table-column prop="count" class-name="count">
+ <template slot-scope="scope">
+ {{ scope.row.count }}娆�
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
</div>
</el-col>
</el-row>
@@ -144,7 +150,7 @@
<el-col :span="13">
<div class="grid-content bg-purple" style="min-height: 300px">
<div class="title">
- 鍚堜綔鍟嗙偣浣嶆暟Top5
+ 璇婂悗缁熻
<span class="el-icon-s-unfold moreIcon"></span>
</div>
<div class="cooperate">
@@ -152,9 +158,11 @@
<div class="pieChart" id="pieCharts"></div>
<div class="Points">
<p>{{ 122 }}</p>
- <span>鐐逛綅鏁�</span>
- <p>{{ 18 }}</p>
- <span>鍚堜綔鍟�</span>
+ <span>鍏朵腑闅忚骞查浜烘</span>
+ <p>{{ 122 }}</p>
+ <span>闂ㄨ瘖闅忚</span>
+ <p>{{ 122 }}</p>
+ <span>鍑洪櫌闅忚</span>
</div>
</div>
</div>
@@ -162,10 +170,85 @@
<el-col :span="10">
<div class="grid-content bg-purple" style="min-height: 300px">
<div class="title">
- 寮傚父璁惧鐩戞帶
+ 鍚勯」鏈嶅姟缁熻
<span class="el-icon-s-unfold moreIcon2"></span>
</div>
- <div class="empenty"></div>
+ <div class="empenty">
+ <el-row>
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple">璇婄枟棰勭害</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple-light">123娆�</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple">杞瘖鏈嶅姟</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple-light">231娆�</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple">淇℃伅鎺ㄩ��</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple-light">900娆�</div></el-col
+ > </el-row
+ ><el-row>
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple">鏍囪瘑涓庡鑸�</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple-light">23娆�</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple">
+ 鎮h�呬究鍒╀繚闅滄湇鍔�
+ </div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple-light">13娆�</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple">杩滅▼鍖荤枟</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple-light">31娆�</div></el-col
+ > </el-row
+ ><el-row>
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple">鎮h�呭弽棣�</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple-light">150浜�</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple">鎮h�呯鐞�</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple-light">231浜�</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple">鍋ュ悍瀹f暀</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple-light">400</div></el-col
+ >
+ </el-row>
+ <el-row>
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple">鍙嶉鍗犳瘮</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple-light">23%</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple">绠$悊鍗犳瘮</div></el-col
+ >
+ <el-col :span="4"
+ ><div class="grid-contents bg-purple-light">32%</div></el-col
+ >
+ </el-row>
+ </div>
</div>
</el-col>
</el-row>
@@ -235,7 +318,7 @@
this.getnodeCollect();
this.getSkuTop();
this.getOrderAmount();
- })
+ });
},
mounted() {},
methods: {
@@ -291,12 +374,8 @@
// const res = await getnodeCollect();
// this.nodeCollect = res.data;
this.nodeCollect = [
- { name: "娴欏ぇ涓�闄�", value: 12 },
- { name: "娴欏ぇ浜岄櫌", value: 8 },
- { name: "閲戝叞鍖婚櫌", value: 8 },
- { name: "閭甸�稿か鍖婚櫌", value: 6 },
- { name: "鐪佷汉姘戝尰闄�", value: 5 },
- { name: "鏈濇櫀闄㈠尯", value: 4 },
+ { name: "闂ㄨ瘖闅忚", value: 1232 },
+ { name: "鍑洪櫌闅忚", value: 342 },
];
this.myPieChart();
},
@@ -305,16 +384,21 @@
// const res = await getSkuTop(10, this.endatd, this.statd);
// this.SkuTop = res.data;
this.SkuTop = [
- { amount: 0, count: 123, skuId: "0", skuName: "鐜嬪ぇ澶�" },
- { amount: 0, count: 122, skuId: "0", skuName: "鍚村ぇ澶�" },
- { amount: 0, count: 112, skuId: "0", skuName: "鏉庝富浠�" },
- { amount: 0, count: 111, skuId: "0", skuName: "寮犳姢澹�" },
- { amount: 0, count: 102, skuId: "0", skuName: "鏉庢姢澹�" },
- { amount: 0, count: 98, skuId: "0", skuName: "鍒樻姢澹�" },
- { amount: 0, count: 89, skuId: "0", skuName: "椹ぇ澶�" },
- { amount: 0, count: 88, skuId: "0", skuName: "椹ぇ澶�" },
- { amount: 0, count: 87, skuId: "0", skuName: "椹ぇ澶�" },
- { amount: 0, count: 67, skuId: "0", skuName: "椹ぇ澶�" },
+ { amount: 0, count: 123, skuId: "0", skuName: "蹇冭偤绉�" },
+ { amount: 0, count: 122, skuId: "0", skuName: "鑲捐剰绉�" },
+ { amount: 0, count: 112, skuId: "0", skuName: "娉屽翱绉�" },
+ { amount: 0, count: 111, skuId: "0", skuName: "鐢风" },
+ { amount: 0, count: 102, skuId: "0", skuName: "濡囦骇绉�" },
+ { amount: 0, count: 98, skuId: "0", skuName: "澶栫" },
+ { amount: 0, count: 89, skuId: "0", skuName: "鎬ヨ瘖" },
+ { amount: 0, count: 88, skuId: "0", skuName: "鍣ㄦ绉�" },
+ { amount: 0, count: 87, skuId: "0", skuName: "楠ㄧ" },
+ { amount: 0, count: 67, skuId: "0", skuName: "鏀惧皠绉�" },
+ { amount: 0, count: 89, skuId: "0", skuName: "鎬ヨ瘖" },
+ { amount: 0, count: 88, skuId: "0", skuName: "鍣ㄦ绉�" },
+ { amount: 0, count: 87, skuId: "0", skuName: "楠ㄧ" },
+ { amount: 0, count: 67, skuId: "0", skuName: "鏀惧皠绉�" },
+
];
},
// 鑾峰彇宸ュ崟鏁伴噺
@@ -328,7 +412,6 @@
// start: this.atd,
// end: this.td,
// });
-
// this.order = res.data;
},
// 鑾峰彇鎬婚噺鏁伴噺
@@ -349,23 +432,64 @@
// 鎸囧畾鍥捐〃鐨勯厤缃」鍜屾暟鎹�
var option = {
title: {
- text: "灏辫瘖鍒嗗竷",
- left: "center",
+ text: "璇婁腑缁熻",
},
- grid: { top: "18%", left: "19%", right: "0%", bottom: "24%" },
- xAxis: {
- type: "category",
- data: this.cylinderXAxis,
+ tooltip: {
+ trigger: "axis",
},
- yAxis: {
- type: "value",
- name: "鍗曚綅/鍏�",
+ legend: {
+ data: ["闄㈠唴鎺ㄩ��", "瀹f暀瀹屾垚"],
},
+ toolbox: {
+ show: true,
+ feature: {
+ dataView: { show: true, readOnly: false },
+ magicType: { show: true, type: ["line", "bar"] },
+ restore: { show: true },
+ saveAsImage: { show: true },
+ },
+ },
+ calculable: true,
+ xAxis: [
+ {
+ type: "category",
+ // prettier-ignore
+ data: ["涓�鏈�","浜屾湀","涓夋湀","鍥涙湀","浜旀湀","鍏湀","涓冩湀","鍏湀","涔濇湀","鍗佹湀"],
+ },
+ ],
+ yAxis: [
+ {
+ type: "value",
+ },
+ ],
series: [
{
- data: this.cylinderSeries,
- barWidth: "5%",
+ name: "闄㈠唴鎺ㄩ��",
type: "bar",
+ data: [20, 49, 70, 32, 56, 76, 56, 122, 26, 20, 64, 33],
+ markPoint: {
+ data: [
+ { type: "max", name: "Max" },
+ { type: "min", name: "Min" },
+ ],
+ },
+ markLine: {
+ data: [{ type: "average", name: "Avg" }],
+ },
+ },
+ {
+ name: "瀹f暀瀹屾垚",
+ type: "bar",
+ data: [26, 59, 90, 64, 87, 70, 75, 182, 87, 82, 60, 23],
+ markPoint: {
+ data: [
+ { name: "Max", value: 182, xAxis: 7, yAxis: 183 },
+ { name: "Min", value: 2.3, xAxis: 11, yAxis: 3 },
+ ],
+ },
+ markLine: {
+ data: [{ type: "average", name: "Avg" }],
+ },
},
],
};
@@ -378,16 +502,7 @@
// const res = await getregionAmountCollect(1, this.endatd, this.statd);
// this.xAxis = res.data.xAxis;
// this.series = res.data.series;
- this.xAxis = [
- "1鏈�",
- "2鏈�",
- "3鏈�",
- "4鏈�",
- "5鏈�",
- "6鏈�",
- "7鏈�",
- "8鏈�",
- ];
+ this.xAxis = ["1鏈�", "2鏈�", "3鏈�", "4鏈�", "5鏈�", "6鏈�", "7鏈�", "8鏈�"];
this.series = [123, 123, 223, 212, 432, 123, 442, 234];
this.myEcharts2();
},
@@ -396,28 +511,86 @@
var echarts = require("echarts");
var myChart2 = echarts.init(document.getElementById("echars"));
var option2 = {
- color: ["red"],
title: {
- text: "灏辫瘖瓒嬪娍鍥�",
- left: "center",
+ text: "璇婂墠鏁版嵁",
},
- grid: { top: "18%", left: "17%", right: "0%", bottom: "24%" },
- xAxis: {
- type: "category",
- data: this.xAxis,
- boundaryGap: true,
+ tooltip: {
+ trigger: "axis",
},
- yAxis: {
- name: "鍗曚綅/鍏�",
- type: "value",
+ dataset: {
+ source: [
+ ["product", "2018", "2019", "2020", "2021", "2022", "2023"],
+ ["澶嶈瘖", 256, 182, 388, 270, 253, 385],
+ ["浣忛櫌", 351, 451, 355, 353, 373, 468],
+ ["鎵嬫湳", 440, 362, 569, 436, 445, 332],
+ ["杞瘖", 525, 237, 541, 518, 433, 249],
+ ],
},
+ xAxis: { type: "category" },
+ yAxis: { gridIndex: 0 },
+ grid: { top: "55%" },
series: [
{
- data: this.series,
type: "line",
+ smooth: true,
+ seriesLayoutBy: "row",
+ emphasis: { focus: "series" },
+ },
+ {
+ type: "line",
+ smooth: true,
+ seriesLayoutBy: "row",
+ emphasis: { focus: "series" },
+ },
+ {
+ type: "line",
+ smooth: true,
+ seriesLayoutBy: "row",
+ emphasis: { focus: "series" },
+ },
+ {
+ type: "line",
+ smooth: true,
+ seriesLayoutBy: "row",
+ emphasis: { focus: "series" },
+ },
+ {
+ type: "pie",
+ id: "pie",
+ radius: "30%",
+ center: ["50%", "25%"],
+ emphasis: {
+ focus: "self",
+ },
+ label: {
+ formatter: "{b}: {@2018} ({d}%)",
+ },
+ encode: {
+ itemName: "product",
+ value: "2018",
+ tooltip: "2018",
+ },
},
],
};
+ myChart2.on("updateAxisPointer", function (event) {
+ const xAxisInfo = event.axesInfo[0];
+ if (xAxisInfo) {
+ const dimension = xAxisInfo.value + 1;
+ myChart2.setOption({
+ series: {
+ id: "pie",
+ label: {
+ formatter: "{b}: {@[" + dimension + "]} ({d}%)",
+ },
+ encode: {
+ value: dimension,
+ tooltip: dimension,
+ },
+ },
+ });
+ }
+ });
myChart2.setOption(option2);
},
// 楗肩姸鍥�
@@ -428,9 +601,9 @@
// 鎸囧畾鍥捐〃鐨勯厤缃」鍜屾暟鎹�
var optionPie = {
- title: {
- left: "left",
- },
+ // title: {
+ // left: "left",
+ // },
tooltip: {
trigger: "item",
@@ -442,14 +615,36 @@
mark: { show: true },
},
},
+ legend: {
+ top: "5%",
+ left: "center",
+ },
series: [
{
- name: "鍚堜綔鍟嗙偣浣嶆暟Top5",
+ name: "Access From",
type: "pie",
- radius: ["10%", "70%"],
- center: ["50%", "50%"],
- roseType: "radius",
- data: this.nodeCollect,
+ radius: ["40%", "70%"],
+ avoidLabelOverlap: false,
+ itemStyle: {
+ borderRadius: 10,
+ borderColor: "#fff",
+ borderWidth: 2,
+ },
+
+ emphasis: {
+ label: {
+ show: true,
+ fontSize: 40,
+ fontWeight: "bold",
+ },
+ },
+ labelLine: {
+ show: false,
+ },
+ data: [
+ { value: 580, name: "闂ㄨ瘖闅忚" },
+ { value: 484, name: "鍑洪櫌闅忚" },
+ ],
},
],
};
@@ -466,9 +661,10 @@
padding: 0;
margin: 0;
}
+
.boxEchars {
width: 100%;
- height: 280px;
+ height: 480px;
margin-top: 45px;
display: flex;
.echars1 {
@@ -560,7 +756,8 @@
}
.empenty {
width: 100%;
- height: 280px;
+ padding: 20px 0;
+ min-height: 280px;
}
.cooperate {
width: 100%;
@@ -573,8 +770,8 @@
.Points {
width: 154px;
height: 230px;
- padding-top: 47px;
- padding-left: 38px;
+ text-align: center;
+ padding: 20px 0;
background: linear-gradient(135deg, transparent, #f8f8f9 0) 0 0,
linear-gradient(-135deg, transparent 12px, #f8f8f9 0) 100% 0,
linear-gradient(-45deg, transparent, #f8f8f9 0) 100% 100%,
@@ -690,6 +887,10 @@
line-height: 17px;
}
}
+::v-deep.aside .el-table__header-wrapper {
+ overflow: hidden;
+ display: none;
+}
.headerBox {
height: 150px;
padding: 25px;
@@ -711,11 +912,20 @@
}
.bg-purple-light {
background: #e5e9f2;
+ text-align: center;
+ align-items: center;
+ line-height: 36px;
}
.grid-content {
min-height: 36px;
border-radius: 20px;
- padding: 0 20px;
+ padding: 0 10px;
+}
+.grid-contents {
+ min-height: 36px;
+ border-radius: 20px;
+ padding: 0 10px;
+ padding-right: 0;
}
.row-bg {
padding: 10px 0;
--
Gitblit v1.9.3