修改测试集排序

This commit is contained in:
喻希里 2017-10-18 19:52:57 +08:00
parent b5fa4b66b0
commit ae3de1214f
2 changed files with 6 additions and 1 deletions

View File

@ -125,6 +125,7 @@ class InterfaceColContent extends Component {
rows = rows.sort((n, o) => {
return n.index > o.index
})
console.log(rows);
this.setState({
rows: rows
})
@ -500,12 +501,13 @@ class InterfaceColContent extends Component {
row: dnd.Row
}
};
console.log(rows);
const resolvedColumns = resolve.columnChildren({ columns });
const resolvedRows = resolve.resolve({
columns: resolvedColumns,
method: resolve.nested
})(rows);
console.log(resolvedRows);
let colEnv = this.props.currProject.env || [];
return (
<div className="interface-col">

View File

@ -151,6 +151,9 @@ class interfaceColController extends baseController{
result.req_params = this.handleParamsValue(data.req_params, result.req_params)
resultList[index] = result;
}
resultList = resultList.sort((a,b)=>{
return a.index - b.index;
});
ctx.body = yapi.commons.resReturn(resultList);
} catch (e) {
ctx.body = yapi.commons.resReturn(null, 402, e.message);