From a41359111fef6fc3bb5beb40fa4ea9d4944c4312 Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Thu, 19 Jun 2025 13:39:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E5=AD=90=E9=A1=B9=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dictionary.js | 7 +- .../components/DictionaryChild.vue | 93 ++++++------------- 2 files changed, 33 insertions(+), 67 deletions(-) diff --git a/src/api/dictionary.js b/src/api/dictionary.js index f52a4314..ff7abcae 100644 --- a/src/api/dictionary.js +++ b/src/api/dictionary.js @@ -418,10 +418,11 @@ export function addOrUpdateBasicDic(param) { }) } -export function getDictionaryChildList(id) { +export function getDictionaryChildList(data) { return request({ - url: `/Dictionary/getChildList/${id}`, - method: 'get' + url: `/Dictionary/getChildList`, + method: 'post', + data }) } diff --git a/src/views/dictionary/newdictionary/components/DictionaryChild.vue b/src/views/dictionary/newdictionary/components/DictionaryChild.vue index 1100d9f6..2ec36b9d 100644 --- a/src/views/dictionary/newdictionary/components/DictionaryChild.vue +++ b/src/views/dictionary/newdictionary/components/DictionaryChild.vue @@ -7,74 +7,28 @@ 新建 - + - - - - - - + + + + + + @@ -91,7 +45,8 @@ import DictionaryChildAddOrUpdateForm from './DictionaryChildAddOrUpdateForm' const searchDataDefault = () => { return { - parentId: '' + Asc: true, + SortField: 'ShowOrder', } } export default { @@ -121,6 +76,17 @@ export default { this.getList() }, methods: { + // 排序 + handleSortByColumn(column) { + if (column.order === 'ascending') { + this.searchData.Asc = true + } else { + this.searchData.Asc = false + } + this.searchData.SortField = column.prop + this.searchData.PageIndex = 1 + this.getList() + }, handleChild(row) { this.drawerChild = true this.getDictionaryChildList(row.Id) @@ -172,7 +138,8 @@ export default { // 获取匿名化配置信息 getList() { this.loading = true - getDictionaryChildList(this.parent.Id).then(res => { + this.searchData.ParentId = this.parent.Id + getDictionaryChildList(this.searchData).then(res => { this.loading = false this.list = res.Result }).catch(() => { this.loading = false }) @@ -190,6 +157,4 @@ export default { } - +