fix(系统设置): 环境默认数据展示

This commit is contained in:
fit2-zhao 2021-04-15 17:05:00 +08:00 committed by fit2-zhao
parent 6cd7fd617b
commit c8143a0f1f
2 changed files with 14 additions and 12 deletions

View File

@ -119,6 +119,16 @@
this.list();
},
httpConfig: function (o) {
//
if (this.httpConfig && this.httpConfig.socket) {
this.condition.type = "NONE";
this.condition.socket = this.httpConfig.socket;
this.condition.protocol = this.httpConfig.protocol;
this.condition.port = this.httpConfig.port;
this.condition.domain = this.httpConfig.domain;
this.condition.time = new Date().getTime();
this.add();
}
this.condition = {type: "NONE", details: [new KeyValue({name: "", value: "contains"})], protocol: "http", socket: "", domain: "", port: 0};
},
},
@ -222,6 +232,10 @@
obj.details = this.condition.details ? JSON.parse(JSON.stringify(this.condition.details)) : this.condition.details;
}
this.httpConfig.conditions.unshift(obj);
this.httpConfig.socket = null;
this.httpConfig.protocol = null;
this.httpConfig.port = null;
this.httpConfig.domain = null;
},
remove(row) {
const index = this.httpConfig.conditions.findIndex((d) => d.id === row.id);

View File

@ -15,18 +15,6 @@
@refresh="initTableData"/>
<status-edit ref="statusEdit" :plan-id="reviewId"
:select-ids="new Set(Array.from(this.selectRows).map(row => row.id))" @refresh="initTableData"/>
<el-table
v-loading="result.loading"
class="adjust-table"
border
@select-all="handleSelectAll"
@filter-change="filter"
@sort-change="sort"
@select="handleSelectionChange"
row-key="id"
@row-click="showDetail"
:data="tableData">
<el-table
v-loading="result.loading"
class="test-content adjust-table ms-select-all-fixed"