Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix result set sort bug #305

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ export default {
if (rst.dirFileTrees) {
// The order of the result set in the background is sorted by string according to the name of the result set. When displaying, there will be a problem that the result set cannot be matched, so add sorting(后台的结果集顺序是根据结果集名称按字符串排序的,展示时会出现结果集对应不上的问题,所以加上排序)
let scriptResultList = rst.dirFileTrees.children.sort(
(a, b) => parseInt(a.name, 10) - parseInt(b.name, 10)
(a, b) => parseInt(a.name.split('_')[1].split('.')[0], 10) - parseInt(b.name.split('_')[1].split('.')[0], 10)
)
if (scriptResultList.length) {
const currentResultPath = rst.dirFileTrees.children[0].path
Expand Down
4 changes: 3 additions & 1 deletion linkis-web/src/components/consoleComponent/result.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ export default {
};
if (this.script.resultList && this.script.resultSet !== undefined) {
res = this.script.resultList[this.script.resultSet].result
res.allPath = this.script.resultList.map(result => result.path);
if(res) {
res.allPath = this.script.resultList.map(result => result.path);
}
}
if(!res && this.script.result){
res = this.script.result
Expand Down
Loading