Commit d02422d0 authored by 向偲彪's avatar 向偲彪 Committed by qiaozhanwei
Browse files

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
parent 512e7c1f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
            v-model="sqlTypeId"
            :disabled="isDetails"
            @on-change="_handleSqlTypeChanged"
            style="width: 90px;">
            style="width: 120px;">
      <x-option
              v-for="city in sqlTypeList"
              :key="city.id"
+8 −4
Original line number Diff line number Diff line
@@ -124,10 +124,14 @@
      _getList (flag) {
        this.isLoading = !flag
        this.getDatasourcesListP(this.searchParams).then(res => {
          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
            this.searchParams.pageNo = this.searchParams.pageNo -1
          } else {
            this.datasourcesList = []
            this.datasourcesList = res.totalList
            this.total = res.total
            this.isLoading = false
          }
        }).catch(e => {
          this.isLoading = false
        })
+8 −4
Original line number Diff line number Diff line
@@ -100,10 +100,14 @@
      _getList (flag) {
        this.isLoading = !flag
        this.getProcessListP(this.searchParams).then(res => {
          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
            this.searchParams.pageNo = this.searchParams.pageNo -1
          } else {
            this.processListP = []
            this.processListP = res.totalList
            this.total = res.total
            this.isLoading = false
          }
        }).catch(e => {
          this.isLoading = false
        })
+8 −4
Original line number Diff line number Diff line
@@ -105,10 +105,14 @@
      _getProcessInstanceListP (flag) {
        this.isLoading = !flag
        this.getProcessInstance(this.searchParams).then(res => {
          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
            this.searchParams.pageNo = this.searchParams.pageNo -1
          } else {
            this.processInstanceList = []
            this.processInstanceList = res.totalList
            this.total = res.total
            this.isLoading = false
          }
        }).catch(e => {
          this.isLoading = false
        })
+8 −4
Original line number Diff line number Diff line
@@ -110,10 +110,14 @@
      _getList (flag) {
        this.isLoading = !flag
        this.getProjectsList(this.searchParams).then(res => {
          if(this.searchParams.pageNo>1 && res.totalList.length == 0) {
            this.searchParams.pageNo = this.searchParams.pageNo -1
          } else {
            this.projectsList = []
            this.projectsList = res.totalList
            this.total = res.total
            this.isLoading = false
          }
        }).catch(e => {
          this.isLoading = false
        })
Loading