diff --git a/src/views/dictionary/template/components/Anonymization.vue b/src/views/dictionary/template/components/Anonymization.vue index 342e5c89..4261525d 100644 --- a/src/views/dictionary/template/components/Anonymization.vue +++ b/src/views/dictionary/template/components/Anonymization.vue @@ -43,6 +43,7 @@ :data="list" stripe height="100" + @sort-change="handleSortByColumn" > @@ -50,6 +51,7 @@ prop="Group" :label="$t('template:anonymization:label:group')" show-overflow-tooltip + sortable="custom" /> @@ -92,6 +98,7 @@ prop="ReplaceValue" :label="$t('template:anonymization:label:valueReplace')" min-width="110" + sortable="custom" /> @@ -139,7 +146,9 @@ const searchDataDefault = () => { IsAdd: false, TagDescriptionCN: '', PageIndex: 1, - PageSize: 500 + PageSize: 500, + Asc: false, + SortField: '' } } export default { @@ -159,6 +168,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() + }, switchChange(event, item) { this.loading = true addOrUpdateSystemAnonymization(item).then(res => { diff --git a/src/views/dictionary/template/components/IncreaseFields.vue b/src/views/dictionary/template/components/IncreaseFields.vue index dcd6275f..9fe05b78 100644 --- a/src/views/dictionary/template/components/IncreaseFields.vue +++ b/src/views/dictionary/template/components/IncreaseFields.vue @@ -43,6 +43,7 @@ :data="list" stripe height="100" + @sort-change="handleSortByColumn" > @@ -50,6 +51,7 @@ prop="Group" :label="$t('template:anonymization:label:group')" show-overflow-tooltip + sortable="custom" /> @@ -92,6 +98,7 @@ prop="ReplaceValue" :label="$t('template:anonymization:label:valueReplace')" min-width="110" + sortable="custom" /> @@ -138,7 +145,9 @@ const searchDataDefault = () => { TagDescriptionCN: '', IsAdd: true, PageIndex: 1, - PageSize: 500 + PageSize: 500, + Asc: false, + SortField: '' } } export default { @@ -158,6 +167,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() + }, switchChange(event, item) { this.loading = true addOrUpdateSystemAnonymization(item).then(res => { diff --git a/src/views/dictionary/template/components/MedicalAudit.vue b/src/views/dictionary/template/components/MedicalAudit.vue index a2a96cda..41fb332f 100644 --- a/src/views/dictionary/template/components/MedicalAudit.vue +++ b/src/views/dictionary/template/components/MedicalAudit.vue @@ -69,6 +69,7 @@ :data="list" stripe height="100" + @sort-change="handleSortByColumn" >