修改测试集排序

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) => { rows = rows.sort((n, o) => {
return n.index > o.index return n.index > o.index
}) })
console.log(rows);
this.setState({ this.setState({
rows: rows rows: rows
}) })
@ -500,12 +501,13 @@ class InterfaceColContent extends Component {
row: dnd.Row row: dnd.Row
} }
}; };
console.log(rows);
const resolvedColumns = resolve.columnChildren({ columns }); const resolvedColumns = resolve.columnChildren({ columns });
const resolvedRows = resolve.resolve({ const resolvedRows = resolve.resolve({
columns: resolvedColumns, columns: resolvedColumns,
method: resolve.nested method: resolve.nested
})(rows); })(rows);
console.log(resolvedRows);
let colEnv = this.props.currProject.env || []; let colEnv = this.props.currProject.env || [];
return ( return (
<div className="interface-col"> <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) result.req_params = this.handleParamsValue(data.req_params, result.req_params)
resultList[index] = result; resultList[index] = result;
} }
resultList = resultList.sort((a,b)=>{
return a.index - b.index;
});
ctx.body = yapi.commons.resReturn(resultList); ctx.body = yapi.commons.resReturn(resultList);
} catch (e) { } catch (e) {
ctx.body = yapi.commons.resReturn(null, 402, e.message); ctx.body = yapi.commons.resReturn(null, 402, e.message);