diff --git a/ui/dasadmin/src/views/backend/auth/model/index.vue b/ui/dasadmin/src/views/backend/auth/model/index.vue index b80854cf..bb831216 100644 --- a/ui/dasadmin/src/views/backend/auth/model/index.vue +++ b/ui/dasadmin/src/views/backend/auth/model/index.vue @@ -90,7 +90,13 @@ - + - + { } const modelNodeClick = (target: TreeNode) => { curContextMenuTreeData.value = JSON.parse(JSON.stringify(target)) + initSortData() if (ModelTabs.value === 'attribute') { getAttributeList() } else { @@ -498,6 +506,10 @@ const delModel = () => { ElMessage.error(err?.response?.data?.msg ?? '删除失败') }) } + +const attributeTableRef = ref() +const serviceTableRef = ref() + const modelAttributeAndServiceInputPlaceHolder = computed(() => { return '请输入' + (ModelTabs.value === 'attribute' ? '属性' : '方法') + (modelAttributeSearchRadio.value === 'Name' ? '名称' : '编码') }) @@ -528,6 +540,14 @@ const changeTabs = (name: any) => { getServiceList() } } +const initSortData = () => { + sortData.attributeOrderColumn = undefined + sortData.attributeOrderType = undefined + sortData.serviceOrderColumn = undefined + sortData.serviceOrderType = undefined + attributeTableRef.value!.clearSort() + serviceTableRef.value!.clearSort() +} const sortData = reactive<{ attributeOrderColumn: string | undefined attributeOrderType: 'desc' | 'asc' | undefined