feat(applicationManagement): 添加记录和规则列表的排序功能- 修改记录列表和规则列表的 API 调用,增加排序参数

This commit is contained in:
陈昱达
2025-08-15 16:11:03 +08:00
parent a99a8c770a
commit 98f05b7550
3 changed files with 28 additions and 5 deletions

View File

@@ -4,7 +4,7 @@ import getUrl from '@/assets/js/utils/get-url'
// 记录page页 // 记录page页
export function getRecordPage(data) { export function getRecordPage(data) {
return request({ return request({
url: getUrl('/risk/check/record/page'), url: getUrl('/riskCheckRecordEx/page'),
method: 'post', method: 'post',
data data
}) })

View File

@@ -79,6 +79,7 @@
<!-- 记录列表表格 --> <!-- 记录列表表格 -->
<r-table <r-table
@sort-change="sortChange"
:columns="tableConfig.columns" :columns="tableConfig.columns"
:data="tableData" :data="tableData"
border border
@@ -194,6 +195,19 @@ export default {
this.getInstitutionList() this.getInstitutionList()
}, },
methods: { methods: {
sortChange(val) {
// 处理排序逻辑
const { prop, order } = val
let orderDTOs = [
{
columnName: prop,
orderType: order === 'ascending' ? 1 : 2
}
]
this.getList(orderDTOs)
},
// 获取归属机构数据 // 获取归属机构数据
// getAllOrgNames() { // getAllOrgNames() {
// getAllOrgNames() // getAllOrgNames()
@@ -217,7 +231,7 @@ export default {
// }) // })
// }, // },
// 获取记录列表数据 // 获取记录列表数据
getList() { getList(orderDTOs) {
this.loading = true this.loading = true
const params = Object.assign({}, this.queryParams) const params = Object.assign({}, this.queryParams)
// 处理时间范围参数 // 处理时间范围参数
@@ -233,6 +247,8 @@ export default {
delete params.submitTime delete params.submitTime
delete params.institution delete params.institution
delete params.approvalNo delete params.approvalNo
params.orderDTOs = orderDTOs ? orderDTOs : []
getRecordPage(params) getRecordPage(params)
.then(response => { .then(response => {
if (response) { if (response) {

View File

@@ -242,7 +242,7 @@ export default {
} }
}, },
// 获取规则列表数据 // 获取规则列表数据
getList() { getList(orderDTOs) {
const queryParams = Object.assign({}, this.queryParams) const queryParams = Object.assign({}, this.queryParams)
this.loading = true this.loading = true
// 如果ruleType是中文转换为编码值 // 如果ruleType是中文转换为编码值
@@ -265,6 +265,7 @@ export default {
queryParams.ruleField = fieldTypeItem.fieldComment queryParams.ruleField = fieldTypeItem.fieldComment
} }
} }
queryParams.orderDTOs = orderDTOs ? orderDTOs : []
getRulePage(queryParams) getRulePage(queryParams)
.then(response => { .then(response => {
// 根据实际API返回结构调整兼容Vue2语法 // 根据实际API返回结构调整兼容Vue2语法
@@ -472,8 +473,14 @@ export default {
sortChange(val) { sortChange(val) {
// 处理排序逻辑 // 处理排序逻辑
const { prop, order } = val const { prop, order } = val
console.log(prop, order) let orderDTOs = [
// this.getList() {
columnName: prop,
orderType: order === 'ascending' ? 1 : 2
}
]
this.getList(orderDTOs)
}, },
getColumnsConfig() { getColumnsConfig() {