Showing
7 changed files
with
9 additions
and
129 deletions
... | ... | @@ -6,8 +6,6 @@ |
6 | 6 | @select="handleSelect" |
7 | 7 | style="position: relative" |
8 | 8 | ref="organizationIdTreeRef" |
9 | - :style="[{ width: !isFold ? '0rem' : '20rem' }]" | |
10 | - :class="[!isFold ? 'w-1/4 xl:w-1/1' : 'w-1/4 xl:w-1/5']" | |
11 | 9 | /> |
12 | 10 | <BasicTable |
13 | 11 | style="flex: auto" |
... | ... | @@ -15,7 +13,6 @@ |
15 | 13 | :searchInfo="searchInfo" |
16 | 14 | class="w-3/4 xl:w-4/5" |
17 | 15 | :clickToRowSelect="false" |
18 | - :class="[!isFold ? 'w-3/4 xl:w-7/7' : 'w-3/4 xl:w-4/5']" | |
19 | 16 | > |
20 | 17 | <template #toolbar> |
21 | 18 | <Authority value="api:yt:alarm:profile:post"> |
... | ... | @@ -86,7 +83,7 @@ |
86 | 83 | </template> |
87 | 84 | |
88 | 85 | <script lang="ts"> |
89 | - import { defineComponent, reactive, h, nextTick, ref } from 'vue'; | |
86 | + import { defineComponent, reactive, h, nextTick } from 'vue'; | |
90 | 87 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
91 | 88 | import { PageWrapper } from '/@/components/Page'; |
92 | 89 | import { useDrawer } from '/@/components/Drawer'; |
... | ... | @@ -115,8 +112,6 @@ |
115 | 112 | Authority, |
116 | 113 | }, |
117 | 114 | setup() { |
118 | - const isFold = ref(true); | |
119 | - | |
120 | 115 | const searchInfo = reactive<Recordable>({}); |
121 | 116 | const { organizationIdTreeRef, resetFn } = useResetOrganizationTree(searchInfo); |
122 | 117 | // 刷新 |
... | ... | @@ -244,13 +239,6 @@ |
244 | 239 | reload(); |
245 | 240 | } |
246 | 241 | }; |
247 | - const changeWidth = (e) => { | |
248 | - if (e) { | |
249 | - isFold.value = false; | |
250 | - } else { | |
251 | - isFold.value = true; | |
252 | - } | |
253 | - }; | |
254 | 242 | return { |
255 | 243 | searchInfo, |
256 | 244 | hasBatchDelete, |
... | ... | @@ -264,8 +252,6 @@ |
264 | 252 | showAlarmContact, |
265 | 253 | showMessageMode, |
266 | 254 | statusChange, |
267 | - changeWidth, | |
268 | - isFold, | |
269 | 255 | }; |
270 | 256 | }, |
271 | 257 | }); | ... | ... |
... | ... | @@ -2,10 +2,7 @@ |
2 | 2 | <div> |
3 | 3 | <PageWrapper dense contentFullHeight contentClass="flex"> |
4 | 4 | <OrganizationIdTree |
5 | - style="position: relative" | |
6 | 5 | class="w-1/4 xl:w-1/5" |
7 | - :style="[{ width: !isFold ? '0rem' : '20rem' }]" | |
8 | - :class="[!isFold ? 'w-1/4 xl:w-1/1' : 'w-1/4 xl:w-1/5']" | |
9 | 6 | @select="handleSelect" |
10 | 7 | ref="organizationIdTreeRef" |
11 | 8 | /> |
... | ... | @@ -14,7 +11,6 @@ |
14 | 11 | @register="registerTable" |
15 | 12 | :searchInfo="searchInfo" |
16 | 13 | class="w-3/4 xl:w-4/5" |
17 | - :class="[!isFold ? 'w-3/4 xl:w-7/7' : 'w-3/4 xl:w-4/5']" | |
18 | 14 | > |
19 | 15 | <template #toolbar> |
20 | 16 | <Authority value="api:yt:alarmContact:post"> |
... | ... | @@ -81,7 +77,6 @@ |
81 | 77 | Authority, |
82 | 78 | }, |
83 | 79 | setup() { |
84 | - const isFold = ref(true); | |
85 | 80 | const searchInfo = reactive<Recordable>({}); |
86 | 81 | const { organizationIdTreeRef, resetFn } = useResetOrganizationTree(searchInfo); |
87 | 82 | // 表格hooks |
... | ... | @@ -140,13 +135,6 @@ |
140 | 135 | searchInfo.organizationId = organizationId; |
141 | 136 | handleSuccess(); |
142 | 137 | }; |
143 | - const changeWidth = (e) => { | |
144 | - if (e) { | |
145 | - isFold.value = false; | |
146 | - } else { | |
147 | - isFold.value = true; | |
148 | - } | |
149 | - }; | |
150 | 138 | return { |
151 | 139 | searchInfo, |
152 | 140 | hasBatchDelete, |
... | ... | @@ -157,8 +145,6 @@ |
157 | 145 | registerTable, |
158 | 146 | registerDrawer, |
159 | 147 | organizationIdTreeRef, |
160 | - changeWidth, | |
161 | - isFold, | |
162 | 148 | }; |
163 | 149 | }, |
164 | 150 | }); | ... | ... |
... | ... | @@ -6,8 +6,6 @@ |
6 | 6 | @select="handleSelect" |
7 | 7 | ref="organizationIdTreeRef" |
8 | 8 | style="position: relative" |
9 | - :style="[{ width: !isFold ? '0rem' : '20rem' }]" | |
10 | - :class="[!isFold ? 'w-1/4 xl:w-1/1' : 'w-1/4 xl:w-1/5']" | |
11 | 9 | /> |
12 | 10 | <BasicTable |
13 | 11 | style="flex: auto" |
... | ... | @@ -15,7 +13,6 @@ |
15 | 13 | @register="registerTable" |
16 | 14 | :searchInfo="searchInfo" |
17 | 15 | class="w-3/4 xl:w-4/5" |
18 | - :class="[!isFold ? 'w-3/4 xl:w-7/7' : 'w-3/4 xl:w-4/5']" | |
19 | 16 | > |
20 | 17 | <template #toolbar> |
21 | 18 | <Authority value="api:yt:video:post"> |
... | ... | @@ -80,7 +77,7 @@ |
80 | 77 | </template> |
81 | 78 | |
82 | 79 | <script lang="ts"> |
83 | - import { defineComponent, reactive, nextTick, ref } from 'vue'; | |
80 | + import { defineComponent, reactive, nextTick } from 'vue'; | |
84 | 81 | import { BasicTable, useTable, TableAction, TableImg } from '/@/components/Table'; |
85 | 82 | import { PageWrapper } from '/@/components/Page'; |
86 | 83 | import { useDrawer } from '/@/components/Drawer'; |
... | ... | @@ -105,7 +102,6 @@ |
105 | 102 | Authority, |
106 | 103 | }, |
107 | 104 | setup() { |
108 | - const isFold = ref(true); | |
109 | 105 | const searchInfo = reactive<Recordable>({}); |
110 | 106 | const { organizationIdTreeRef, resetFn } = useResetOrganizationTree(searchInfo); |
111 | 107 | const [registerModal, { openModal }] = useModal(); |
... | ... | @@ -174,13 +170,6 @@ |
174 | 170 | record, |
175 | 171 | }); |
176 | 172 | }; |
177 | - const changeWidth = (e) => { | |
178 | - if (e) { | |
179 | - isFold.value = false; | |
180 | - } else { | |
181 | - isFold.value = true; | |
182 | - } | |
183 | - }; | |
184 | 173 | return { |
185 | 174 | searchInfo, |
186 | 175 | hasBatchDelete, |
... | ... | @@ -193,8 +182,6 @@ |
193 | 182 | organizationIdTreeRef, |
194 | 183 | handleViewVideo, |
195 | 184 | registerModal, |
196 | - changeWidth, | |
197 | - isFold, | |
198 | 185 | }; |
199 | 186 | }, |
200 | 187 | }); | ... | ... |
1 | 1 | <template> |
2 | - <div :style="foldIconStyle"> | |
3 | - <Tooltip v-if="isFold"> | |
4 | - <template #title>隐藏组织</template> | |
5 | - <MenuFoldOutlined @click="changeWidth(true)" /> | |
6 | - </Tooltip> | |
7 | - <Tooltip v-else> | |
8 | - <template #title>打开组织</template> | |
9 | - <MenuUnfoldOutlined @click="changeWidth(false)" /> | |
10 | - </Tooltip> | |
11 | - </div> | |
12 | - <div v-show="isFold" class="bg-white m-4 mr-0 overflow-hidden"> | |
2 | + <div style="position: absolute"> </div> | |
3 | + <div class="bg-white m-4 mr-0 overflow-hidden"> | |
13 | 4 | <BasicTree |
14 | 5 | title="组织列表" |
15 | 6 | toolbar |
... | ... | @@ -24,39 +15,13 @@ |
24 | 15 | </div> |
25 | 16 | </template> |
26 | 17 | <script lang="ts" setup name="OrganizationIdTree"> |
27 | - import { onMounted, ref, unref } from 'vue'; | |
18 | + import { onMounted, ref } from 'vue'; | |
28 | 19 | import { BasicTree, TreeItem } from '/@/components/Tree'; |
29 | 20 | import { getOrganizationList } from '/@/api/system/system'; |
30 | - import { MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons-vue'; | |
31 | - import { computed } from '@vue/reactivity'; | |
32 | 21 | const emit = defineEmits(['select']); |
33 | 22 | const treeData = ref<TreeItem[]>([]); |
34 | 23 | const selectedKeys = ref<string[]>(); |
35 | 24 | const treeExpandData = ref([]); |
36 | - | |
37 | - const isFold = ref(false); | |
38 | - | |
39 | - const changeWidth = (e) => { | |
40 | - if (e) { | |
41 | - isFold.value = false; | |
42 | - } else { | |
43 | - isFold.value = true; | |
44 | - } | |
45 | - }; | |
46 | - | |
47 | - const foldIconStyle = computed(() => { | |
48 | - return unref(isFold) | |
49 | - ? { | |
50 | - padding: '22px 0 0 16px', | |
51 | - position: 'absolute', | |
52 | - left: '85px', | |
53 | - lineHeight: '24px', | |
54 | - } | |
55 | - : { | |
56 | - padding: '22px 0 0 16px', | |
57 | - }; | |
58 | - }); | |
59 | - | |
60 | 25 | //获取所有父级id |
61 | 26 | function findForAllId(data = [], arr = []) { |
62 | 27 | for (const item of data) { | ... | ... |
... | ... | @@ -6,8 +6,6 @@ |
6 | 6 | @select="handleSelect" |
7 | 7 | ref="organizationIdTreeRef" |
8 | 8 | style="position: relative" |
9 | - :style="[{ width: !isFold ? '0rem' : '20rem' }]" | |
10 | - :class="[!isFold ? 'w-1/4 xl:w-1/1' : 'w-1/4 xl:w-1/5']" | |
11 | 9 | /> |
12 | 10 | <BasicTable |
13 | 11 | style="flex: auto" |
... | ... | @@ -15,7 +13,6 @@ |
15 | 13 | @register="registerTable" |
16 | 14 | :searchInfo="searchInfo" |
17 | 15 | class="w-3/4 xl:w-4/5" |
18 | - :class="[!isFold ? 'w-3/4 xl:w-7/7' : 'w-3/4 xl:w-4/5']" | |
19 | 16 | > |
20 | 17 | <template #toolbar> |
21 | 18 | <Authority value="api:yt:admin:addConfiguration"> |
... | ... | @@ -73,7 +70,7 @@ |
73 | 70 | </template> |
74 | 71 | |
75 | 72 | <script lang="ts"> |
76 | - import { defineComponent, reactive, nextTick, ref } from 'vue'; | |
73 | + import { defineComponent, reactive, nextTick } from 'vue'; | |
77 | 74 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
78 | 75 | import { PageWrapper } from '/@/components/Page'; |
79 | 76 | import { useDrawer } from '/@/components/Drawer'; |
... | ... | @@ -98,7 +95,6 @@ |
98 | 95 | Authority, |
99 | 96 | }, |
100 | 97 | setup() { |
101 | - const isFold = ref(true); | |
102 | 98 | const { VITE_GLOB_CONFIGURATION } = getAppEnvConfig(); |
103 | 99 | const isDev = isDevMode(); |
104 | 100 | const searchInfo = reactive<Recordable>({}); |
... | ... | @@ -174,13 +170,7 @@ |
174 | 170 | `${VITE_GLOB_CONFIGURATION}/${isDev ? '?dev=1&' : '?'}configurationId=${record!.id}` |
175 | 171 | ); |
176 | 172 | }; |
177 | - const changeWidth = (e) => { | |
178 | - if (e) { | |
179 | - isFold.value = false; | |
180 | - } else { | |
181 | - isFold.value = true; | |
182 | - } | |
183 | - }; | |
173 | + | |
184 | 174 | return { |
185 | 175 | searchInfo, |
186 | 176 | hasBatchDelete, |
... | ... | @@ -193,8 +183,6 @@ |
193 | 183 | registerTable, |
194 | 184 | registerDrawer, |
195 | 185 | organizationIdTreeRef, |
196 | - changeWidth, | |
197 | - isFold, | |
198 | 186 | }; |
199 | 187 | }, |
200 | 188 | }); | ... | ... |
... | ... | @@ -4,16 +4,9 @@ |
4 | 4 | <OrganizationIdTree |
5 | 5 | class="w-1/6 xl:w-1/5" |
6 | 6 | @select="handleSelect" |
7 | - :style="[{ width: !isFold ? '0rem' : '20rem' }]" | |
8 | - :class="[!isFold ? 'w-1/4 xl:w-1/1' : 'w-1/4 xl:w-1/5']" | |
9 | 7 | ref="organizationIdTreeRef" |
10 | 8 | /> |
11 | - <BasicTable | |
12 | - style="flex: auto" | |
13 | - @register="registerTable" | |
14 | - class="w-5/6 xl:w-4/5" | |
15 | - :class="[!isFold ? 'w-423 xl:w-423' : 'w-5/6 xl:w-4/5']" | |
16 | - > | |
9 | + <BasicTable style="flex: auto" @register="registerTable" class="w-5/6 xl:w-4/5"> | |
17 | 10 | <template #toolbar> |
18 | 11 | <Authority value="api:yt:device:post"> |
19 | 12 | <a-button type="primary" @click="handleCreate" v-if="authBtn(role)"> |
... | ... | @@ -210,8 +203,6 @@ |
210 | 203 | Authority, |
211 | 204 | }, |
212 | 205 | setup(_) { |
213 | - const isFold = ref(true); | |
214 | - | |
215 | 206 | const { createMessage } = useMessage(); |
216 | 207 | const go = useGo(); |
217 | 208 | const searchInfo = reactive<Recordable>({}); |
... | ... | @@ -323,13 +314,6 @@ |
323 | 314 | createMessage.success('复制成功~'); |
324 | 315 | } |
325 | 316 | }; |
326 | - const changeWidth = (e) => { | |
327 | - if (e) { | |
328 | - isFold.value = false; | |
329 | - } else { | |
330 | - isFold.value = true; | |
331 | - } | |
332 | - }; | |
333 | 317 | |
334 | 318 | return { |
335 | 319 | registerTable, |
... | ... | @@ -354,8 +338,6 @@ |
354 | 338 | hasBatchDelete, |
355 | 339 | handleDeleteOrBatchDelete, |
356 | 340 | handleReload, |
357 | - changeWidth, | |
358 | - isFold, | |
359 | 341 | }; |
360 | 342 | }, |
361 | 343 | }); | ... | ... |
... | ... | @@ -5,16 +5,12 @@ |
5 | 5 | class="w-1/4 xl:w-1/5" |
6 | 6 | @select="handleSelect" |
7 | 7 | ref="organizationIdTreeRef" |
8 | - style="position: relative" | |
9 | - :style="[{ width: !isFold ? '0rem' : '20rem' }]" | |
10 | - :class="[!isFold ? 'w-1/4 xl:w-1/1' : 'w-1/4 xl:w-1/5']" | |
11 | 8 | /> |
12 | 9 | <BasicTable |
13 | 10 | style="flex: auto" |
14 | 11 | :clickToRowSelect="false" |
15 | 12 | @register="registerTable" |
16 | 13 | class="w-3/4 xl:w-4/5" |
17 | - :class="[!isFold ? 'w-3/4 xl:w-7/7' : 'w-3/4 xl:w-4/5']" | |
18 | 14 | > |
19 | 15 | <template #toolbar> |
20 | 16 | <Authority value="api:yt:user:post"> |
... | ... | @@ -89,7 +85,7 @@ |
89 | 85 | </div> |
90 | 86 | </template> |
91 | 87 | <script lang="ts"> |
92 | - import { defineComponent, reactive, nextTick, ref } from 'vue'; | |
88 | + import { defineComponent, reactive, nextTick } from 'vue'; | |
93 | 89 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
94 | 90 | import { deleteUser, getAccountList } from '/@/api/system/system'; |
95 | 91 | import { PageWrapper } from '/@/components/Page'; |
... | ... | @@ -114,7 +110,6 @@ |
114 | 110 | Authority, |
115 | 111 | }, |
116 | 112 | setup() { |
117 | - const isFold = ref(true); | |
118 | 113 | const go = useGo(); |
119 | 114 | const [registerModal, { openModal }] = useModal(); |
120 | 115 | let searchInfo = reactive<Recordable>({}); |
... | ... | @@ -173,13 +168,6 @@ |
173 | 168 | function handleView(record: Recordable) { |
174 | 169 | go('/system/account_detail/' + record.id); |
175 | 170 | } |
176 | - const changeWidth = (e) => { | |
177 | - if (e) { | |
178 | - isFold.value = false; | |
179 | - } else { | |
180 | - isFold.value = true; | |
181 | - } | |
182 | - }; | |
183 | 171 | |
184 | 172 | return { |
185 | 173 | registerTable, |
... | ... | @@ -192,8 +180,6 @@ |
192 | 180 | organizationIdTreeRef, |
193 | 181 | hasBatchDelete, |
194 | 182 | handleDeleteOrBatchDelete, |
195 | - changeWidth, | |
196 | - isFold, | |
197 | 183 | }; |
198 | 184 | }, |
199 | 185 | }); | ... | ... |