提交 d02422d0 编写于 作者: B break60 提交者: qiaozhanwei

Requests the previous page when there is no data on the list page(#1768) (#1832)

* fix udfs assignment and task instance page jump #1789

* jest add coverage display

* Fix data echo, style, popup cannot be closed and license

* Fix data echo, style, popup cannot be closed and license

* fix

* Requests the previous page when there is no data on the list page
上级 512e7c1f
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
v-model="sqlTypeId" v-model="sqlTypeId"
:disabled="isDetails" :disabled="isDetails"
@on-change="_handleSqlTypeChanged" @on-change="_handleSqlTypeChanged"
style="width: 90px;"> style="width: 120px;">
<x-option <x-option
v-for="city in sqlTypeList" v-for="city in sqlTypeList"
:key="city.id" :key="city.id"
......
...@@ -124,10 +124,14 @@ ...@@ -124,10 +124,14 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getDatasourcesListP(this.searchParams).then(res => { this.getDatasourcesListP(this.searchParams).then(res => {
this.datasourcesList = [] if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.datasourcesList = res.totalList this.searchParams.pageNo = this.searchParams.pageNo -1
this.total = res.total } else {
this.isLoading = false this.datasourcesList = []
this.datasourcesList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => { }).catch(e => {
this.isLoading = false this.isLoading = false
}) })
......
...@@ -100,10 +100,14 @@ ...@@ -100,10 +100,14 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getProcessListP(this.searchParams).then(res => { this.getProcessListP(this.searchParams).then(res => {
this.processListP = [] if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.processListP = res.totalList this.searchParams.pageNo = this.searchParams.pageNo -1
this.total = res.total } else {
this.isLoading = false this.processListP = []
this.processListP = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => { }).catch(e => {
this.isLoading = false this.isLoading = false
}) })
......
...@@ -105,10 +105,14 @@ ...@@ -105,10 +105,14 @@
_getProcessInstanceListP (flag) { _getProcessInstanceListP (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getProcessInstance(this.searchParams).then(res => { this.getProcessInstance(this.searchParams).then(res => {
this.processInstanceList = [] if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.processInstanceList = res.totalList this.searchParams.pageNo = this.searchParams.pageNo -1
this.total = res.total } else {
this.isLoading = false this.processInstanceList = []
this.processInstanceList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => { }).catch(e => {
this.isLoading = false this.isLoading = false
}) })
......
...@@ -110,10 +110,14 @@ ...@@ -110,10 +110,14 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getProjectsList(this.searchParams).then(res => { this.getProjectsList(this.searchParams).then(res => {
this.projectsList = [] if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.projectsList = res.totalList this.searchParams.pageNo = this.searchParams.pageNo -1
this.total = res.total } else {
this.isLoading = false this.projectsList = []
this.projectsList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => { }).catch(e => {
this.isLoading = false this.isLoading = false
}) })
......
...@@ -91,9 +91,13 @@ ...@@ -91,9 +91,13 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getResourcesListP(this.searchParams).then(res => { this.getResourcesListP(this.searchParams).then(res => {
this.fileResourcesList = res.totalList if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.total = res.total this.searchParams.pageNo = this.searchParams.pageNo -1
this.isLoading = false } else {
this.fileResourcesList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => { }).catch(e => {
this.isLoading = false this.isLoading = false
}) })
......
...@@ -109,10 +109,14 @@ ...@@ -109,10 +109,14 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getUdfFuncListP(this.searchParams).then(res => { this.getUdfFuncListP(this.searchParams).then(res => {
this.udfFuncList = [] if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.udfFuncList = res.totalList this.searchParams.pageNo = this.searchParams.pageNo -1
this.total = res.total } else {
this.isLoading = false this.udfFuncList = []
this.udfFuncList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => { }).catch(e => {
this.isLoading = false this.isLoading = false
}) })
......
...@@ -96,10 +96,14 @@ ...@@ -96,10 +96,14 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getResourcesListP(this.searchParams).then(res => { this.getResourcesListP(this.searchParams).then(res => {
this.udfResourcesList = [] if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.udfResourcesList = res.totalList this.searchParams.pageNo = this.searchParams.pageNo -1
this.total = res.total } else {
this.isLoading = false this.udfResourcesList = []
this.udfResourcesList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => { }).catch(e => {
this.isLoading = false this.isLoading = false
}) })
......
...@@ -118,10 +118,14 @@ ...@@ -118,10 +118,14 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getQueueListP(this.searchParams).then(res => { this.getQueueListP(this.searchParams).then(res => {
this.queueList = [] if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.queueList = res.totalList this.searchParams.pageNo = this.searchParams.pageNo -1
this.total = res.total } else {
this.isLoading = false this.queueList = []
this.queueList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => { }).catch(e => {
this.isLoading = false this.isLoading = false
}) })
......
...@@ -122,10 +122,14 @@ ...@@ -122,10 +122,14 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getTenantListP(this.searchParams).then(res => { this.getTenantListP(this.searchParams).then(res => {
this.tenementList = [] if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.tenementList = res.totalList this.searchParams.pageNo = this.searchParams.pageNo -1
this.total = res.total } else {
this.isLoading = false this.tenementList = []
this.tenementList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => { }).catch(e => {
this.isLoading = false this.isLoading = false
}) })
......
...@@ -120,10 +120,14 @@ ...@@ -120,10 +120,14 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getUsersListP(this.searchParams).then(res => { this.getUsersListP(this.searchParams).then(res => {
this.userList = [] if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.userList = res.totalList this.searchParams.pageNo = this.searchParams.pageNo -1
this.total = res.total } else {
this.isLoading = false this.userList = []
this.userList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => { }).catch(e => {
this.isLoading = false this.isLoading = false
}) })
......
...@@ -122,10 +122,14 @@ ...@@ -122,10 +122,14 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getAlertgroupP(this.searchParams).then(res => { this.getAlertgroupP(this.searchParams).then(res => {
this.alertgroupList = [] if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.alertgroupList = res.totalList this.searchParams.pageNo = this.searchParams.pageNo -1
this.total = res.total } else {
this.isLoading = false this.alertgroupList = []
this.alertgroupList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => { }).catch(e => {
this.isLoading = false this.isLoading = false
}) })
......
...@@ -121,10 +121,14 @@ ...@@ -121,10 +121,14 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getWorkerGroups(this.searchParams).then(res => { this.getWorkerGroups(this.searchParams).then(res => {
this.workerGroupList = [] if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.workerGroupList = res.totalList this.searchParams.pageNo = this.searchParams.pageNo -1
this.total = res.total } else {
this.isLoading = false this.workerGroupList = []
this.workerGroupList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => { }).catch(e => {
this.isLoading = false this.isLoading = false
}) })
......
...@@ -122,10 +122,14 @@ ...@@ -122,10 +122,14 @@
_getList (flag) { _getList (flag) {
this.isLoading = !flag this.isLoading = !flag
this.getTokenListP(this.searchParams).then(res => { this.getTokenListP(this.searchParams).then(res => {
this.tokenList = [] if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
this.tokenList = res.totalList this.searchParams.pageNo = this.searchParams.pageNo -1
this.total = res.total } else {
this.isLoading = false this.tokenList = []
this.tokenList = res.totalList
this.total = res.total
this.isLoading = false
}
}).catch(e => { }).catch(e => {
this.isLoading = false this.isLoading = false
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册