Commit efc1517c2801e6f870d6fc98352cd65f1bf979ea
Merge branch 'main_dev' into 'main'
fix: 修复大屏、看板、组织左侧组织树搜索无效 See merge request yunteng/thingskit-front!1327
Showing
4 changed files
with
40 additions
and
8 deletions
| ... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 | import { useRole } from '/@/hooks/business/useRole'; |
| 13 | 13 | import configurationSrc from '/@/assets/icons/configuration.svg'; |
| 14 | 14 | import { Platform } from '../center/center.data'; |
| 15 | - import { computed, unref } from 'vue'; | |
| 15 | + import { computed, unref, reactive } from 'vue'; | |
| 16 | 16 | import { createScadaPageLink, ScadaModeEnum } from '../center/help'; |
| 17 | 17 | import { useDrawer } from '/@/components/Drawer'; |
| 18 | 18 | import { usePermission } from '/@/hooks/web/usePermission'; |
| ... | ... | @@ -27,11 +27,14 @@ |
| 27 | 27 | import { ShareModal } from '/@/views/common/ShareModal'; |
| 28 | 28 | import { ViewTypeEnum, ViewTypeNameEnum } from '../../common/ShareModal/config'; |
| 29 | 29 | |
| 30 | + const searchInfo = reactive<Recordable>({}); | |
| 31 | + | |
| 30 | 32 | const [register, { reload }] = useCardList({ |
| 31 | 33 | api: getPage, |
| 32 | 34 | useSearchForm: true, |
| 33 | 35 | title: '组态列表', |
| 34 | 36 | gutter: 4, |
| 37 | + searchInfo: searchInfo, | |
| 35 | 38 | formConfig: { |
| 36 | 39 | schemas: searchFormSchema, |
| 37 | 40 | labelWidth: 80, |
| ... | ... | @@ -121,11 +124,16 @@ |
| 121 | 124 | await reload(); |
| 122 | 125 | } catch (error) {} |
| 123 | 126 | }; |
| 127 | + | |
| 128 | + function handleSelect(organization) { | |
| 129 | + searchInfo.organizationId = organization; | |
| 130 | + reload(); | |
| 131 | + } | |
| 124 | 132 | </script> |
| 125 | 133 | |
| 126 | 134 | <template> |
| 127 | 135 | <section class="flex w-full h-full"> |
| 128 | - <OrganizationIdTree @register="registerOrgTree" /> | |
| 136 | + <OrganizationIdTree @select="handleSelect" @register="registerOrgTree" /> | |
| 129 | 137 | <BasicCardList class="flex-auto p-4 w-3/4 xl:w-4/5 w-full" @register="register"> |
| 130 | 138 | <template #toolbar> |
| 131 | 139 | <div class="flex gap-3 justify-end"> | ... | ... |
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | import { useRole } from '/@/hooks/business/useRole'; |
| 12 | 12 | import configurationSrc from '/@/assets/icons/configuration.svg'; |
| 13 | 13 | import { Platform } from '../center/center.data'; |
| 14 | - import { computed, unref } from 'vue'; | |
| 14 | + import { computed, unref, reactive } from 'vue'; | |
| 15 | 15 | import { createScadaPageLink, ScadaModeEnum } from '../center/help'; |
| 16 | 16 | import { useDrawer } from '/@/components/Drawer'; |
| 17 | 17 | import { usePermission } from '/@/hooks/web/usePermission'; |
| ... | ... | @@ -22,11 +22,14 @@ |
| 22 | 22 | import { OrganizationIdTree, useOrganizationTree } from '../../common/organizationIdTree'; |
| 23 | 23 | import ConfigurationCenterDrawer from './ConfigurationCenterDrawer.vue'; |
| 24 | 24 | |
| 25 | + const searchInfo = reactive<Recordable>({}); | |
| 26 | + | |
| 25 | 27 | const [register, { reload }] = useCardList({ |
| 26 | 28 | api: getPage, |
| 27 | 29 | useSearchForm: true, |
| 28 | 30 | title: '模板列表', |
| 29 | 31 | gutter: 4, |
| 32 | + searchInfo: searchInfo, | |
| 30 | 33 | formConfig: { |
| 31 | 34 | schemas: searchFormSchema, |
| 32 | 35 | labelWidth: 80, |
| ... | ... | @@ -92,11 +95,16 @@ |
| 92 | 95 | await reload(); |
| 93 | 96 | } catch (error) {} |
| 94 | 97 | }; |
| 98 | + | |
| 99 | + function handleSelect(organization) { | |
| 100 | + searchInfo.organizationId = organization; | |
| 101 | + reload(); | |
| 102 | + } | |
| 95 | 103 | </script> |
| 96 | 104 | |
| 97 | 105 | <template> |
| 98 | 106 | <section class="flex w-full h-full"> |
| 99 | - <OrganizationIdTree @register="registerOrgTree" /> | |
| 107 | + <OrganizationIdTree @select="handleSelect" @register="registerOrgTree" /> | |
| 100 | 108 | <BasicCardList class="flex-auto p-4 w-3/4 xl:w-4/5 w-full" @register="register"> |
| 101 | 109 | <template #toolbar> |
| 102 | 110 | <div class="flex gap-3 justify-end"> | ... | ... |
| 1 | 1 | <script setup lang="ts"> |
| 2 | 2 | import { Card, Button, Tooltip } from 'ant-design-vue'; |
| 3 | - import { computed, unref } from 'vue'; | |
| 3 | + import { computed, unref, reactive } from 'vue'; | |
| 4 | 4 | import { OrganizationIdTree, useOrganizationTree } from '../common/organizationIdTree'; |
| 5 | 5 | import { |
| 6 | 6 | bigScreenCancelPublish, |
| ... | ... | @@ -38,11 +38,14 @@ |
| 38 | 38 | }, |
| 39 | 39 | }); |
| 40 | 40 | |
| 41 | + const searchInfo = reactive<Recordable>({}); | |
| 42 | + | |
| 41 | 43 | const [registerCardList, { reload }] = useCardList({ |
| 42 | 44 | api: getPage, |
| 43 | 45 | title: '数据大屏', |
| 44 | 46 | useSearchForm: true, |
| 45 | 47 | gutter: 4, |
| 48 | + searchInfo: searchInfo, | |
| 46 | 49 | formConfig: { |
| 47 | 50 | labelWidth: 80, |
| 48 | 51 | schemas: searchFormSchema, |
| ... | ... | @@ -128,11 +131,16 @@ |
| 128 | 131 | createMessage.success(state === 0 ? '发布成功' : '取消发布成功'); |
| 129 | 132 | reload(); |
| 130 | 133 | }; |
| 134 | + | |
| 135 | + function handleSelect(organization) { | |
| 136 | + searchInfo.organizationId = organization; | |
| 137 | + reload(); | |
| 138 | + } | |
| 131 | 139 | </script> |
| 132 | 140 | |
| 133 | 141 | <template> |
| 134 | 142 | <PageWrapper dense contentFullHeight contentClass="flex"> |
| 135 | - <OrganizationIdTree @register="registerOrgTree" /> | |
| 143 | + <OrganizationIdTree @select="handleSelect" @register="registerOrgTree" /> | |
| 136 | 144 | <BasicCardList |
| 137 | 145 | @register="registerCardList" |
| 138 | 146 | class="flex-auto p-4 w-3/4 xl:w-4/5 w-full configuration-list" | ... | ... |
| 1 | 1 | <script lang="ts" setup> |
| 2 | 2 | import { Card, Statistic, Button, Tooltip } from 'ant-design-vue'; |
| 3 | - import { unref, computed } from 'vue'; | |
| 3 | + import { unref, computed, reactive } from 'vue'; | |
| 4 | 4 | import { MoreOutlined, ShareAltOutlined } from '@ant-design/icons-vue'; |
| 5 | 5 | import { useMessage } from '/@/hooks/web/useMessage'; |
| 6 | 6 | import Dropdown from '/@/components/Dropdown/src/Dropdown.vue'; |
| ... | ... | @@ -33,11 +33,14 @@ |
| 33 | 33 | onSelect: () => reload(), |
| 34 | 34 | }); |
| 35 | 35 | |
| 36 | + const searchInfo = reactive<Recordable>({}); | |
| 37 | + | |
| 36 | 38 | const [registerCardList, { reload }] = useCardList({ |
| 37 | 39 | title: '数据看板', |
| 38 | 40 | api: getDataBoardList, |
| 39 | 41 | baseLayout: { col: 3, row: 3 }, |
| 40 | 42 | useSearchForm: true, |
| 43 | + searchInfo: searchInfo, | |
| 41 | 44 | formConfig: { |
| 42 | 45 | schemas: formSchema, |
| 43 | 46 | labelWidth: 80, |
| ... | ... | @@ -144,11 +147,16 @@ |
| 144 | 147 | router.push(`/visual/board/detail/${boardId}/${boardName}/${platform}/${organizationId}`); |
| 145 | 148 | } else createMessage.warning('没有权限'); |
| 146 | 149 | }; |
| 150 | + | |
| 151 | + function handleSelect(organization) { | |
| 152 | + searchInfo.organizationId = organization; | |
| 153 | + reload(); | |
| 154 | + } | |
| 147 | 155 | </script> |
| 148 | 156 | |
| 149 | 157 | <template> |
| 150 | 158 | <section class="flex"> |
| 151 | - <OrganizationIdTree @register="registerOrgTree" /> | |
| 159 | + <OrganizationIdTree @select="handleSelect" @register="registerOrgTree" /> | |
| 152 | 160 | <BasicCardList class="flex-auto p-4 w-3/4 xl:w-4/5 w-full" @register="registerCardList"> |
| 153 | 161 | <template #toolbar> |
| 154 | 162 | <Authority :value="VisualBoardPermission.CREATE"> | ... | ... |