diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue
index efbc66655d..f30bf7315c 100644
--- a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue
+++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue
@@ -446,7 +446,9 @@ export default {
}
this.$nextTick(function () {
- this.$refs.scenarioTable.doLayout();
+ if (this.$refs.scenarioTable) {
+ this.$refs.scenarioTable.doLayout();
+ }
this.checkTableRowIsSelect();
})
});
@@ -726,8 +728,8 @@ export default {
// let ids = [row.id];
let param = {};
this.buildBatchParam(param);
- if(param.ids && param.ids.length <=0){
- param.ids =[row.id];
+ if (param.ids && param.ids.length <= 0) {
+ param.ids = [row.id];
}
this.$post('/api/automation/removeToGcByBatch/', param, () => {
// this.$post('/api/automation/removeToGc/', ids, () => {
diff --git a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
index f71771bd1a..7b4c2e1894 100644
--- a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
+++ b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue
@@ -313,7 +313,7 @@ export default {
this.condition.status = "Trash";
this.condition.moduleIds = [];
}
- if(!this.selectAll){
+ if (!this.selectAll) {
this.selectAll = false;
this.unSelection = [];
this.selectDataCounts = 0;
@@ -342,7 +342,7 @@ export default {
this.total = response.data.itemCount;
this.tableData = response.data.listObject;
- if(!this.selectAll){
+ if (!this.selectAll) {
this.unSelection = response.data.listObject.map(s => s.id);
}
@@ -352,8 +352,10 @@ export default {
}
})
- this.$nextTick(function(){
- this.$refs.caseTable.doLayout();
+ this.$nextTick(function () {
+ if (this.$refs.caseTable) {
+ this.$refs.caseTable.doLayout();
+ }
this.checkTableRowIsSelect();
})
});
@@ -361,20 +363,20 @@ export default {
getLabel(this, API_CASE_LIST);
},
- checkTableRowIsSelect(){
+ checkTableRowIsSelect() {
//如果默认全选的话,则选中应该选中的行
- if(this.selectAll){
+ if (this.selectAll) {
let unSelectIds = this.unSelection;
- this.tableData.forEach(row=>{
- if(unSelectIds.indexOf(row.id)<0){
- this.$refs.caseTable.toggleRowSelection(row,true);
+ this.tableData.forEach(row => {
+ if (unSelectIds.indexOf(row.id) < 0) {
+ this.$refs.caseTable.toggleRowSelection(row, true);
//默认全选,需要把选中对行添加到selectRows中。不然会影响到勾选函数统计
if (!this.selectRows.has(row)) {
this.$set(row, "showMore", true);
this.selectRows.add(row);
}
- }else{
+ } else {
//不勾选的行,也要判断是否被加入了selectRow中。加入了的话就去除。
if (this.selectRows.has(row)) {
this.$set(row, "showMore", false);
diff --git a/frontend/src/business/components/api/definition/components/list/ApiList.vue b/frontend/src/business/components/api/definition/components/list/ApiList.vue
index 3a03be7ba8..71c3e4b7b2 100644
--- a/frontend/src/business/components/api/definition/components/list/ApiList.vue
+++ b/frontend/src/business/components/api/definition/components/list/ApiList.vue
@@ -116,7 +116,8 @@
min-width="120px"
:key="index">
-