|
@@ -1,7 +1,7 @@
|
|
|
<!--
|
|
|
* @Author: your name
|
|
|
* @Date: 2025-01-09 18:09:41
|
|
|
- * @LastEditTime: 2025-03-14 17:47:44
|
|
|
+ * @LastEditTime: 2025-07-07 10:12:47
|
|
|
* @LastEditors: bogon
|
|
|
* @Description: In User Settings Edit
|
|
|
* @FilePath: /performance-test/src/views/overview/components/pitch_power/index.vue
|
|
@@ -33,9 +33,14 @@
|
|
|
</div>
|
|
|
</el-alert>
|
|
|
<div></div>
|
|
|
- <div class="titleCharts">分析分图 :</div>
|
|
|
+ <div class="titleCharts">
|
|
|
+ 分析分图 :
|
|
|
+ <el-button size="small" type="primary" @click="handleChartsType">{{
|
|
|
+ chartsType === "2D" ? "查看3D图" : "查看2D图"
|
|
|
+ }}</el-button>
|
|
|
+ </div>
|
|
|
<VirtualList
|
|
|
- :list="diagramRelationsDatas"
|
|
|
+ :list="filteredDiagramList"
|
|
|
keyField="fileAddr"
|
|
|
:itemSize="700"
|
|
|
v-slot="{ item, index }"
|
|
@@ -149,6 +154,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ chartsType: "2D",
|
|
|
form: {
|
|
|
value2: "",
|
|
|
},
|
|
@@ -192,7 +198,20 @@ export default {
|
|
|
this.fetchData(); // 调用合并后的函数
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ filteredDiagramList() {
|
|
|
+ return this.diagramRelationsDatas.filter((item) => {
|
|
|
+ const type = this.getFileTypeFromUrl(item.fileAddr);
|
|
|
+ return this.chartsType === "2D"
|
|
|
+ ? type === "pitch_power"
|
|
|
+ : type === "3D";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ handleChartsType() {
|
|
|
+ this.chartsType = this.chartsType === "2D" ? "3D" : "2D";
|
|
|
+ },
|
|
|
getFileTypeFromUrl(url) {
|
|
|
// 判断文件名或路径是否包含关键字
|
|
|
if (url.includes("3D")) {
|
|
@@ -375,5 +394,6 @@ export default {
|
|
|
font-size: 16px;
|
|
|
font-weight: 500;
|
|
|
margin-top: 20px;
|
|
|
+ margin-bottom: 20px;
|
|
|
}
|
|
|
</style>
|