Commit 468a9e9f761b8bb142cab6added1d62a86f1748b
1 parent
386d3d5d
pref:优化报表配置 点击执行设备弹窗 Modal弹窗下方区域紧贴样式问题
Showing
1 changed file
with
41 additions
and
32 deletions
1 | <template> | 1 | <template> |
2 | <div> | 2 | <div> |
3 | - <BasicModal v-bind="$attrs" width="55rem" :height="heightNum" @register="register" title="执行设备及属性" | ||
4 | - @cancel="handleCancel" :showOkBtn="false"> | 3 | + <BasicModal |
4 | + style="min-height: auto" | ||
5 | + v-bind="$attrs" | ||
6 | + width="55rem" | ||
7 | + @register="register" | ||
8 | + title="执行设备及属性" | ||
9 | + @cancel="handleCancel" | ||
10 | + :showOkBtn="false" | ||
11 | + > | ||
5 | <div> | 12 | <div> |
6 | <BasicTable @register="registerTable" :dataSource="tableData" /> | 13 | <BasicTable @register="registerTable" :dataSource="tableData" /> |
7 | </div> | 14 | </div> |
@@ -9,37 +16,39 @@ | @@ -9,37 +16,39 @@ | ||
9 | </div> | 16 | </div> |
10 | </template> | 17 | </template> |
11 | <script setup lang="ts"> | 18 | <script setup lang="ts"> |
12 | -import { ref, nextTick } from 'vue'; | ||
13 | -import { BasicModal, useModalInner } from '/@/components/Modal'; | ||
14 | -import { BasicTable, useTable } from '/@/components/Table'; | ||
15 | -import { viewDeviceColumn } from './config.data'; | ||
16 | -import { reportEditDetailPage } from '/@/api/report/reportManager'; | 19 | + import { ref, nextTick } from 'vue'; |
20 | + import { BasicModal, useModalInner } from '/@/components/Modal'; | ||
21 | + import { BasicTable, useTable } from '/@/components/Table'; | ||
22 | + import { viewDeviceColumn } from './config.data'; | ||
23 | + import { reportEditDetailPage } from '/@/api/report/reportManager'; | ||
17 | 24 | ||
18 | -const heightNum = ref(800); | ||
19 | -const tableData: any = ref([]); | ||
20 | -const [registerTable] = useTable({ | ||
21 | - columns: viewDeviceColumn, | ||
22 | - showIndexColumn: false, | ||
23 | - clickToRowSelect: false, | ||
24 | - showTableSetting: false, | ||
25 | - bordered: true, | ||
26 | -}); | ||
27 | -const [register] = useModalInner((data) => { | ||
28 | - const getTableData = async () => { | ||
29 | - const res: any = await reportEditDetailPage(data.record.id) | ||
30 | - const resMap = res.data.executeAttributes.map(d => { | ||
31 | - return { | ||
32 | - device: d.name, | ||
33 | - attribute: d.attributes.join(',') | ||
34 | - } | ||
35 | - }) | ||
36 | - tableData.value = resMap | ||
37 | - }; | ||
38 | - nextTick(() => { | ||
39 | - getTableData(); | 25 | + const tableData: any = ref([]); |
26 | + const [registerTable] = useTable({ | ||
27 | + columns: viewDeviceColumn, | ||
28 | + showIndexColumn: false, | ||
29 | + clickToRowSelect: false, | ||
30 | + showTableSetting: false, | ||
31 | + bordered: true, | ||
40 | }); | 32 | }); |
41 | -}); | ||
42 | -const handleCancel = () => { }; | 33 | + const [register] = useModalInner((data) => { |
34 | + const getTableData = async () => { | ||
35 | + const res: any = await reportEditDetailPage(data.record.id); | ||
36 | + const resMap = res.data.executeAttributes.map((d) => { | ||
37 | + return { | ||
38 | + device: d.name, | ||
39 | + attribute: d.attributes.join(','), | ||
40 | + }; | ||
41 | + }); | ||
42 | + tableData.value = resMap; | ||
43 | + }; | ||
44 | + nextTick(() => { | ||
45 | + getTableData(); | ||
46 | + }); | ||
47 | + }); | ||
48 | + const handleCancel = () => {}; | ||
43 | </script> | 49 | </script> |
44 | -<style> | 50 | +<style lang="less" scoped> |
51 | + :deep(.ant-table-body) { | ||
52 | + height: 470px !important; | ||
53 | + } | ||
45 | </style> | 54 | </style> |