Showing
1 changed file
with
10 additions
and
0 deletions
... | ... | @@ -10,6 +10,8 @@ |
10 | 10 | import { onMounted } from 'vue'; |
11 | 11 | import { getBoundingClientRect } from '/@/utils/domUtils'; |
12 | 12 | import { TaskRecordType } from '/@/api/task/model'; |
13 | + import { RunTaskModal } from '/@/views/task/center/components/RunTaskModal'; | |
14 | + import { useModal } from '/@/components/Modal'; | |
13 | 15 | |
14 | 16 | const props = defineProps<{ |
15 | 17 | tbDeviceId: string; |
... | ... | @@ -17,6 +19,8 @@ |
17 | 19 | |
18 | 20 | const listElRef = ref<Nullable<ComponentElRef>>(null); |
19 | 21 | |
22 | + const [registerRunTaskModal, { openModal }] = useModal(); | |
23 | + | |
20 | 24 | const [registerForm, { getFieldsValue }] = useForm({ |
21 | 25 | schemas: formSchemas, |
22 | 26 | baseColProps: { span: 8 }, |
... | ... | @@ -87,6 +91,10 @@ |
87 | 91 | (listContainerEl.style.overflowX = 'hidden'); |
88 | 92 | }; |
89 | 93 | |
94 | + const handleRunTask = (record: TaskRecordType) => { | |
95 | + openModal(true, record); | |
96 | + }; | |
97 | + | |
90 | 98 | onMounted(() => { |
91 | 99 | setListHeight(); |
92 | 100 | getDataSource(); |
... | ... | @@ -127,10 +135,12 @@ |
127 | 135 | :reload="reload" |
128 | 136 | :tbDeviceId="tbDeviceId" |
129 | 137 | :deviceTaskCardMode="true" |
138 | + @runTask="handleRunTask" | |
130 | 139 | /> |
131 | 140 | </List.Item> |
132 | 141 | </template> |
133 | 142 | </List> |
143 | + <RunTaskModal :reload="reload" @register="registerRunTaskModal" /> | |
134 | 144 | </section> |
135 | 145 | </PageWrapper> |
136 | 146 | </template> | ... | ... |