[update] 修改bug81029
This commit is contained in:
@@ -65,6 +65,7 @@
|
||||
import JTable from '@/components/jero/JTable'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import { ProcessType, ProcessKey } from '../../../../enums/commonEnums'
|
||||
import { getAction } from '../../../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'DoneList',
|
||||
@@ -155,6 +156,40 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadData (arg) {
|
||||
if (!this.url.list) {
|
||||
this.$message.warning('请设置url.list属性!')
|
||||
return
|
||||
}
|
||||
// 加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
const params = this.getQueryParams()// 查询条件
|
||||
this.loading = true
|
||||
getAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
if ((res.result.records || res.result).length === 0 && this.ipagination.current !== 1) {
|
||||
this.ipagination.current--
|
||||
this.loadData()
|
||||
this.loading = false
|
||||
return
|
||||
}
|
||||
// update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
this.dataSource = res.result.records || res.result
|
||||
if (res.result.total) {
|
||||
this.ipagination.total = res.result.total
|
||||
} else {
|
||||
this.ipagination.total = 0
|
||||
}
|
||||
// update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleTableChange (pagination, filters, sorter) {
|
||||
// 分页、排序、筛选变化时触发
|
||||
if (Object.keys(sorter).length > 0) {
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
<script>
|
||||
import JTable from '@/components/jero/JTable'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import { getAction } from '../../../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'DraftList',
|
||||
@@ -109,6 +110,40 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadData (arg) {
|
||||
if (!this.url.list) {
|
||||
this.$message.warning('请设置url.list属性!')
|
||||
return
|
||||
}
|
||||
// 加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
const params = this.getQueryParams()// 查询条件
|
||||
this.loading = true
|
||||
getAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
if ((res.result.records || res.result).length === 0 && this.ipagination.current !== 1) {
|
||||
this.ipagination.current--
|
||||
this.loadData()
|
||||
this.loading = false
|
||||
return
|
||||
}
|
||||
// update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
this.dataSource = res.result.records || res.result
|
||||
if (res.result.total) {
|
||||
this.ipagination.total = res.result.total
|
||||
} else {
|
||||
this.ipagination.total = 0
|
||||
}
|
||||
// update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 办理
|
||||
handleTransact (record) {
|
||||
let path = ''
|
||||
|
||||
@@ -301,6 +301,10 @@ export default {
|
||||
compulsoryWithdrawal(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
// 判断当前删除的数据是否是最后一页的最后一条数据,如果是的话页码减一
|
||||
if (this.ipagination.current > 1 && ((this.ipagination.current - 1) * this.ipagination.pageSize) + 1 === that.ipagination.total) {
|
||||
this.ipagination.current -= 1
|
||||
}
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
|
||||
@@ -115,6 +115,7 @@ import {
|
||||
NoMatchTrackingNodes,
|
||||
StandardComplianceNodes
|
||||
} from '@/enums/commonEnums'
|
||||
import { getAction } from '../../../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'TodoList',
|
||||
@@ -264,6 +265,40 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadData (arg) {
|
||||
if (!this.url.list) {
|
||||
this.$message.warning('请设置url.list属性!')
|
||||
return
|
||||
}
|
||||
// 加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
const params = this.getQueryParams()// 查询条件
|
||||
this.loading = true
|
||||
getAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
if ((res.result.records || res.result).length === 0 && this.ipagination.current !== 1) {
|
||||
this.ipagination.current--
|
||||
this.loadData()
|
||||
this.loading = false
|
||||
return
|
||||
}
|
||||
// update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
this.dataSource = res.result.records || res.result
|
||||
if (res.result.total) {
|
||||
this.ipagination.total = res.result.total
|
||||
} else {
|
||||
this.ipagination.total = 0
|
||||
}
|
||||
// update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleTableChange (pagination, filters, sorter) {
|
||||
// 分页、排序、筛选变化时触发
|
||||
if (Object.keys(sorter).length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user