From 1c4f9522d672671180e4253ceb2face650658c9a Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Fri, 23 Feb 2024 16:13:24 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9bug81993?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan/PlanList.vue | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/views/enterpriseStandardLibrary/plan/PlanList.vue b/src/views/enterpriseStandardLibrary/plan/PlanList.vue index a8d65b93..9cdd73b6 100644 --- a/src/views/enterpriseStandardLibrary/plan/PlanList.vue +++ b/src/views/enterpriseStandardLibrary/plan/PlanList.vue @@ -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]