[update] 拆分已入库文本查询接口改成post请求

This commit is contained in:
lideqin
2024-06-21 11:16:41 +08:00
parent 5b60b97353
commit 91b487f410
@@ -95,6 +95,7 @@ import { JeroListMixin } from '../../../../mixins/JeroListMixin.js'
import { addDocSplit } from '../../../../api/documentToolApi.js'
import { SplitStandardSource } from '../../../../enums/commonEnums'
import JSelectDepart from '../../../../components/jerobiz/JSelectDepart'
import { postAction } from '../../../../api/manage'
export default {
name: 'SplitText',
@@ -165,6 +166,36 @@ export default {
this.queryParam.esMainDraftUnit = ''
}
},
// 查询改成post请求,否则主起草单位传太多有问题
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
postAction(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
})
},
// 抽屉关闭
onClose () {
this.visible = false