|
@@ -1,7 +1,7 @@
|
|
|
<!--
|
|
|
* @Author: your name
|
|
|
* @Date: 2024-05-27 09:25:45
|
|
|
- * @LastEditTime: 2024-07-16 15:02:10
|
|
|
+ * @LastEditTime: 2024-08-05 09:52:56
|
|
|
* @LastEditors: bogon
|
|
|
* @Description: In User Settings Edit
|
|
|
* @FilePath: /performance-test/src/views/performance/assetssDetail.vue
|
|
@@ -9,18 +9,19 @@
|
|
|
<template>
|
|
|
<div class="global-variable" v-loading="loading">
|
|
|
<el-row type="flex" justify="space-between">
|
|
|
- <el-col :span="8"
|
|
|
- ><el-button
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-button
|
|
|
type="text"
|
|
|
style="font-size: 20px"
|
|
|
icon="el-icon-arrow-left"
|
|
|
@click="() => $router.push('/home/performance/assetssMag')"
|
|
|
- >返回</el-button
|
|
|
- ></el-col
|
|
|
- >
|
|
|
- <el-col :span="8"
|
|
|
- ><h2 style="text-align: center">分析历史记录总览</h2></el-col
|
|
|
- >
|
|
|
+ >
|
|
|
+ 返回
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <h2 style="text-align: center">分析历史记录总览</h2>
|
|
|
+ </el-col>
|
|
|
<el-col :span="8">
|
|
|
<div style="text-align: end; font-size: 16px">
|
|
|
分析时间:{{
|
|
@@ -83,17 +84,20 @@
|
|
|
<div v-else>
|
|
|
<el-card class="box-card analysisType" v-if="generalFiles.length > 0">
|
|
|
<div slot="header" class="clearfix">
|
|
|
- <span style="font-weight: 700; font-size: 16px"
|
|
|
- >分析总图{{ fileCheckResult1 }}</span
|
|
|
- >
|
|
|
+ <span style="font-weight: 700; font-size: 16px">
|
|
|
+ 分析总图{{ fileCheckResult1 }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
<el-row class="assetssConent">
|
|
|
<!-- :span="getSpan(index, 'generalFiles')" -->
|
|
|
+ <!-- v-loading="
|
|
|
+ loadings[index + generalFiles.length] &&
|
|
|
+ getFileType(file.fileAddr) === 'html'
|
|
|
+ " -->
|
|
|
<el-col
|
|
|
v-for="(file, index) in generalFiles"
|
|
|
:key="index"
|
|
|
:span="24"
|
|
|
- v-loading="loadings[index] && getFileType(file.fileAddr) === 'html'"
|
|
|
class="col_content"
|
|
|
:style="{
|
|
|
display: getFileType(file.fileAddr) === 'html' ? 'block' : 'none',
|
|
@@ -104,92 +108,38 @@
|
|
|
:src="file.fileAddr"
|
|
|
:ref="'iframe' + index"
|
|
|
frameborder="0"
|
|
|
- @load="iframeLoad(index)"
|
|
|
+ @load="iframeLoad(index + generalFiles.length)"
|
|
|
width="100%"
|
|
|
height="100%"
|
|
|
></iframe>
|
|
|
- <!-- <img
|
|
|
- v-if="getFileType(file.fileAddr) === 'image'"
|
|
|
- alt="加载图片"
|
|
|
- @load="imageLoad(index)"
|
|
|
- @error="imageError(index)"
|
|
|
- v-lazy-load="{
|
|
|
- src: file.fileAddr,
|
|
|
- errorImageSrc: require('../../assets/img/loadingErrorFx.webp'),
|
|
|
- }"
|
|
|
- /> -->
|
|
|
- <!-- <el-skeleton
|
|
|
- v-if="loadings[index] && getFileType(file.fileAddr) === 'image'"
|
|
|
- animated
|
|
|
- style="width: 100%; height: 100%"
|
|
|
- class="gjp"
|
|
|
- >
|
|
|
- <template slot="template">
|
|
|
- <el-skeleton-item
|
|
|
- variant="image"
|
|
|
- style="width: 100%; height: 100%"
|
|
|
- />
|
|
|
- </template>
|
|
|
- </el-skeleton> -->
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-card>
|
|
|
<el-card class="box-card analysisType" v-if="diagramRelations.length > 0">
|
|
|
<div slot="header" class="clearfix">
|
|
|
- <span style="font-weight: 700; font-size: 16px"
|
|
|
- >分析分图 {{ fileCheckResult1 }}</span
|
|
|
- >
|
|
|
+ <span style="font-weight: 700; font-size: 16px">
|
|
|
+ 分析分图 {{ fileCheckResult1 }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
<el-row class="assetssConent">
|
|
|
<el-col
|
|
|
v-for="(file, index) in diagramRelations"
|
|
|
:key="index"
|
|
|
:span="24"
|
|
|
- v-loading="
|
|
|
- loadings[index + generalFiles.length] &&
|
|
|
- getFileType(file.fileAddr) === 'html'
|
|
|
- "
|
|
|
:style="{
|
|
|
display: getFileType(file.fileAddr) === 'html' ? 'block' : 'none',
|
|
|
}"
|
|
|
class="col_content"
|
|
|
>
|
|
|
- <!-- <div>{{ file.fileAddr }}</div> -->
|
|
|
<iframe
|
|
|
v-if="getFileType(file.fileAddr) === 'html'"
|
|
|
:src="file.fileAddr"
|
|
|
- :ref="'iframe' + index + generalFiles.length"
|
|
|
+ :ref="'iframe' + index + diagramRelations.length"
|
|
|
frameborder="0"
|
|
|
width="100%"
|
|
|
height="100%"
|
|
|
- @load="iframeLoad(index + generalFiles.length)"
|
|
|
+ @load="iframeLoad(index + diagramRelations.length)"
|
|
|
></iframe>
|
|
|
- <!-- <img
|
|
|
- v-if="getFileType(file.fileAddr) === 'image'"
|
|
|
- alt="加载图片"
|
|
|
- @load="imageLoad(index + generalFiles.length)"
|
|
|
- @error="imageError(index + generalFiles.length)"
|
|
|
- v-lazy-load="{
|
|
|
- src: file.fileAddr,
|
|
|
- errorImageSrc: require('../../assets/img/loadingErrorFx.webp'),
|
|
|
- }"
|
|
|
- /> -->
|
|
|
- <!-- <el-skeleton
|
|
|
- v-if="
|
|
|
- loadings[index + generalFiles.length] &&
|
|
|
- getFileType(file.fileAddr) === 'image'
|
|
|
- "
|
|
|
- animated
|
|
|
- style="width: 100%; height: 100%"
|
|
|
- class="gjp"
|
|
|
- >
|
|
|
- <template slot="template">
|
|
|
- <el-skeleton-item
|
|
|
- variant="image"
|
|
|
- style="width: 100%; height: 100%"
|
|
|
- />
|
|
|
- </template>
|
|
|
- </el-skeleton> -->
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-card>
|
|
@@ -213,11 +163,10 @@
|
|
|
<script>
|
|
|
import {
|
|
|
analysisDetail,
|
|
|
- analysisEditQuery,
|
|
|
queryAnalysisedType,
|
|
|
queryAnalysisedEngine,
|
|
|
+ queryAnalysisTypeConfig,
|
|
|
} from "@/api/performance";
|
|
|
-import axios from "axios";
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -245,13 +194,12 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
// this.initializeLoading();
|
|
|
+ this.chartsTypeConfig();
|
|
|
},
|
|
|
methods: {
|
|
|
- imageLoad(index) {
|
|
|
- this.$set(this.loadings, index, false);
|
|
|
- },
|
|
|
- imageError(index) {
|
|
|
- this.$set(this.loadings, index, false);
|
|
|
+ async chartsTypeConfig() {
|
|
|
+ const result = await queryAnalysisTypeConfig();
|
|
|
+ console.log(result.data, "result");
|
|
|
},
|
|
|
iframeLoad(index) {
|
|
|
this.$set(this.loadings, index, false);
|
|
@@ -263,16 +211,6 @@ export default {
|
|
|
// 初始化 loadings 数组,全部设置为 true,表示加载状态
|
|
|
this.loadings = new Array(totalFiles).fill(true);
|
|
|
},
|
|
|
- async fileAddrFn(file) {
|
|
|
- try {
|
|
|
- const res = await axios.get(file);
|
|
|
- this.fileCheckResult = true;
|
|
|
- return true;
|
|
|
- } catch (e) {
|
|
|
- console.error(file, e, "失败1111");
|
|
|
- this.fileCheckResult = false;
|
|
|
- }
|
|
|
- },
|
|
|
// 查询
|
|
|
onSubmit() {
|
|
|
this.getDetailInfo();
|
|
@@ -297,16 +235,19 @@ export default {
|
|
|
} else {
|
|
|
this.flage = false;
|
|
|
}
|
|
|
+ this.generalFiles = [];
|
|
|
this.generalFiles =
|
|
|
(response.data &&
|
|
|
response.data.length > 0 &&
|
|
|
response.data[0].generalFiles) ||
|
|
|
[];
|
|
|
+ this.diagramRelations = [];
|
|
|
this.diagramRelations =
|
|
|
(response.data &&
|
|
|
response.data.length > 0 &&
|
|
|
response.data[0].diagramRelations) ||
|
|
|
[];
|
|
|
+ console.log(this.diagramRelations, "this.diagramRelations");
|
|
|
this.commentDescriptionVos =
|
|
|
(response.data &&
|
|
|
response.data.length > 0 &&
|