fix(接口测试): 场景详情-生成报告-向下滑动下页面查看步骤和生成报告中页面步骤-页面会卡顿

--bug=1027937 --user=白奇 【接口测试】场景详情-生成报告-向下滑动下页面查看步骤和生成报告中页面步骤-页面会卡顿 https://www.tapd.cn/55049933/s/1396497
This commit is contained in:
baiqi 2023-07-24 14:09:51 +08:00 committed by fit2-zhao
parent 07947ed4d9
commit 065626102e
2 changed files with 34 additions and 32 deletions

View File

@ -78,21 +78,18 @@
</template> </template>
<script> <script>
import {baseSocket} from '@/api/base-network'; import { baseSocket } from '@/api/base-network';
import MsRequestResult from './components/RequestResult';
import MsRequestResultTail from './components/RequestResultTail';
import MsScenarioResult from './components/ScenarioResult';
import MsMetricChart from './components/MetricChart'; import MsMetricChart from './components/MetricChart';
import MsScenarioResults from './components/ScenarioResults'; import MsScenarioResults from './components/ScenarioResults';
import MsContainer from 'metersphere-frontend/src/components/MsContainer'; import MsContainer from 'metersphere-frontend/src/components/MsContainer';
import MsMainContainer from 'metersphere-frontend/src/components/MsMainContainer'; import MsMainContainer from 'metersphere-frontend/src/components/MsMainContainer';
import MsApiReportExport from './ApiReportExport'; import MsApiReportExport from './ApiReportExport';
import MsApiReportViewHeader from './ApiReportViewHeader'; import MsApiReportViewHeader from './ApiReportViewHeader';
import {RequestFactory} from '../../definition/model/ApiTestModel'; import { RequestFactory } from '../../definition/model/ApiTestModel';
import {getCurrentProjectID} from 'metersphere-frontend/src/utils/token'; import { getCurrentProjectID } from 'metersphere-frontend/src/utils/token';
import {windowPrint} from 'metersphere-frontend/src/utils'; import { windowPrint } from 'metersphere-frontend/src/utils';
import {STEP} from '../scenario/Setting'; import { STEP } from '../scenario/Setting';
import {getScenarioReport, updateReport} from '@/api/scenario-report'; import { getScenarioReport, updateReport } from '@/api/scenario-report';
export default { export default {
name: 'SyncApiReportDetail', name: 'SyncApiReportDetail',
@ -102,10 +99,7 @@ export default {
MsMainContainer, MsMainContainer,
MsContainer, MsContainer,
MsScenarioResults, MsScenarioResults,
MsRequestResultTail,
MsMetricChart, MsMetricChart,
MsScenarioResult,
MsRequestResult,
}, },
data() { data() {
return { return {

View File

@ -8,33 +8,41 @@
<i class="el-icon-remove-outline ms-open-btn" size="mini" @click="closeExpansion" /> <i class="el-icon-remove-outline ms-open-btn" size="mini" @click="closeExpansion" />
</el-tooltip> </el-tooltip>
</div> </div>
<el-tree <div style="height: calc(100vh - 400px)">
:data="treeData" <vue-easy-tree
:expand-on-click-node="false" :data="treeData"
:default-expand-all="defaultExpand" node-key="resourceId"
:filter-node-method="filterNode" :sizeDependencies="['expanded']"
highlight-current height="calc(100vh - 400px)"
class="ms-tree ms-report-tree" :minItemSize="48"
ref="resultsTree"> :buffer="300"
<span slot-scope="{ node, data }" style="width: 99%" @click="nodeClick(node)"> :expand-on-click-node="false"
<ms-scenario-result :default-expand-all="defaultExpand"
:node="data" :filter-node-method="filterNode"
:console="console" highlight-current
v-on:requestResult="requestResult" isDynamic
:isActive="isActive" class="ms-tree ms-report-tree"
:is-share="isShare" ref="resultsTree">
:share-id="shareId" /> <span slot-scope="{ node, data }" style="width: 99%">
</span> <ms-scenario-result
</el-tree> :node="data"
:expanded.sync="node.expanded"
:console="console"
v-on:requestResult="requestResult"
:isActive="isActive"
:is-share="isShare"
:share-id="shareId" />
</span>
</vue-easy-tree>
</div>
</el-card> </el-card>
</template> </template>
<script> <script>
import MsScenarioResult from './ScenarioResult'; import MsScenarioResult from './ScenarioResult';
import InfiniteScrollTree from '@/business/automation/report/components/tree/InfiniteScrollTree.vue';
export default { export default {
name: 'MsScenarioResults', name: 'MsScenarioResults',
components: { MsScenarioResult, InfiniteScrollTree }, components: { MsScenarioResult },
props: { props: {
scenarios: Array, scenarios: Array,
treeData: Array, treeData: Array,