|
@@ -9,7 +9,7 @@ import {
|
|
|
planDeleteMethod,
|
|
planDeleteMethod,
|
|
|
planMethod,
|
|
planMethod,
|
|
|
planUpdateStatusMethod,
|
|
planUpdateStatusMethod,
|
|
|
- tagsSearchMethod,
|
|
|
|
|
|
|
+ allTagsSearchMethod,
|
|
|
} from '@/request/api/follow.api';
|
|
} from '@/request/api/follow.api';
|
|
|
import { usePagination, useRequest } from 'alova/client';
|
|
import { usePagination, useRequest } from 'alova/client';
|
|
|
import { notification } from 'ant-design-vue';
|
|
import { notification } from 'ant-design-vue';
|
|
@@ -22,12 +22,13 @@ import {
|
|
|
type VxeGridProps,
|
|
type VxeGridProps,
|
|
|
VxeUI,
|
|
VxeUI,
|
|
|
} from 'vxe-pc-ui';
|
|
} from 'vxe-pc-ui';
|
|
|
|
|
+import { list2Groups } from '@/tools/data';
|
|
|
|
|
|
|
|
const { data: tags, loading: tagsLoading } = useRequest(planMethod, {
|
|
const { data: tags, loading: tagsLoading } = useRequest(planMethod, {
|
|
|
initialData: { total: 0, data: [] },
|
|
initialData: { total: 0, data: [] },
|
|
|
});
|
|
});
|
|
|
// 获取患者标签
|
|
// 获取患者标签
|
|
|
-const { data: tagData, loading: tagDataLoading } = useRequest(tagsSearchMethod, {
|
|
|
|
|
|
|
+const { data: tagData, loading: tagDataLoading } = useRequest(allTagsSearchMethod, {
|
|
|
initialData: { total: 0, data: [] },
|
|
initialData: { total: 0, data: [] },
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -63,8 +64,15 @@ const searchFormProps = reactive<VxeFormProps<PlanQuery>>({
|
|
|
props: {
|
|
props: {
|
|
|
placeholder: '患者标签',
|
|
placeholder: '患者标签',
|
|
|
loading: tagDataLoading,
|
|
loading: tagDataLoading,
|
|
|
- options: computed(() => tagData.value.data),
|
|
|
|
|
|
|
+ optionGroups: computed(() =>
|
|
|
|
|
+ list2Groups(
|
|
|
|
|
+ tagData.value.data.filter((tag) => !tag.disabled),
|
|
|
|
|
+ 'category',
|
|
|
|
|
+ (key) => ({ 1: '系统标签', 2: '个人标签' })[key]!
|
|
|
|
|
+ )
|
|
|
|
|
+ ),
|
|
|
optionProps: { value: 'id', label: 'name' },
|
|
optionProps: { value: 'id', label: 'name' },
|
|
|
|
|
+ optionGroupProps: { options: 'groups' },
|
|
|
clearable: true,
|
|
clearable: true,
|
|
|
multiple: true,
|
|
multiple: true,
|
|
|
filterable: true,
|
|
filterable: true,
|