mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-09 05:00:30 +08:00
修改测试集排序
This commit is contained in:
parent
b5fa4b66b0
commit
ae3de1214f
@ -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">
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user