fix(接口测试): 接口测试报告大数据量列表加载优化

--bug=1027497 --user=白奇 【接口测试】  github#25304在使用平台做测试时chrome经常出现崩溃问题 https://www.tapd.cn/55049933/s/1388672
This commit is contained in:
BAIQI 2023-07-02 12:07:41 +08:00 committed by f2c-ci-robot[bot]
parent 553d4c4844
commit 45cb4bb44a
2 changed files with 12 additions and 4 deletions

View File

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

View File

@ -21,11 +21,13 @@ import chart from 'metersphere-frontend/src/chart';
import filters from 'metersphere-frontend/src/filters';
import icons from 'metersphere-frontend/src/icons';
import plugins from 'metersphere-frontend/src/plugins';
import VueEasyTree from "@ba1q1/vue-easy-tree";
function apiReportUse(id, template) {
Vue.use(ElementUI, {
i18n: (key, value) => i18n.t(key, value),
});
Vue.use(VueEasyTree);
Vue.use(Row);
Vue.use(Col);
Vue.use(Form);