[update] 修改bug81993

This commit is contained in:
lideqin
2024-02-23 16:13:24 +08:00
parent a82a65a806
commit 1c4f9522d6
@@ -206,7 +206,7 @@
import { queryDepartTreeList } from '@/api/api'
import JTable from '@/components/jero/JTable'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import { downFile } from '../../../api/manage'
import { downFile, getAction } from '../../../api/manage'
import { isHasPermission } from '@/utils/hasPermission'
export default {
@@ -436,6 +436,39 @@ export default {
}
})
},
loadData (arg) {
if (!this.url.list) {
this.$message.warning('请设置url.list属性!')
return
}
// 加载数据 若传入参数1则加载第一页的内容
if (arg === 1) {
this.ipagination.current = 1
}
const params = this.getQueryParams()// 查询条件
console.log(params)
this.loading = true
getAction(this.url.list, params).then((res) => {
if (res.success) {
// 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
// 解决火狐浏览器表格横向拉到后面几个字段的时候,切换分页会有空白情况
this.$nextTick(() => {
this.$forceUpdate()
})
})
},
// 计划报批日期改变
planApprovalDateChange (val) {
this.queryParam.planApprovalStartDate = val[0]