Skip to content

Commit 7779e27

Browse files
committed
fix: 修改了测试集合有多个项目接口时,切换执行环境相互覆盖不生效的问题
1 parent e425cbd commit 7779e27

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

client/containers/Project/Interface/InterfaceCol/InterfaceColContent.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,19 +196,22 @@ class InterfaceColContent extends Component {
196196
return req_header;
197197
};
198198

199-
handleColdata = (rows, currColEnv = '', project_id = null) => {
199+
handleColdata = (rows, currColEnvObj=null) => {
200200
let that = this;
201201
let newRows = produce(rows, draftRows => {
202202
draftRows.map(item => {
203203
item.id = item._id;
204204
item._test_status = item.test_status;
205-
item.case_env =
206-
item.project_id === project_id ? currColEnv || item.case_env : item.case_env;
205+
if(currColEnvObj[item.project_id]!=null){
206+
item.case_env =currColEnvObj[item.project_id];
207+
}else{
208+
item.case_env=undefined;
209+
}
207210
item.req_headers = that.handleReqHeader(item.project_id, item.req_headers, item.case_env);
208211
return item;
209212
});
210213
});
211-
214+
console.log(newRows)
212215
this.setState({ rows: newRows });
213216
};
214217

0 commit comments

Comments
 (0)