@@ -260,8 +260,21 @@ const submitForm = async () => {
}
};
+//获取设备名称-搜索_设备选择
+const deviceInfo = ref([]);
+const getDeviceName = async () => {
+ try {
+ await getdeviceList();
+ deviceInfo.value = deviceList.value;
+ console.log('设备列表:', deviceInfo.value);
+ } catch (error) {
+ proxy?.$modal.msgError('获取设备列表失败');
+ }
+ // const res = await getdeviceList();
+ // deviceInfo.value = res?.rows;
+};
onMounted(() => {
getList();
- getdeviceList();
+ getDeviceName();
});
diff --git a/src/views/fileList/list.vue b/src/views/fileList/list.vue
index b023261..e167b7b 100644
--- a/src/views/fileList/list.vue
+++ b/src/views/fileList/list.vue
@@ -4,9 +4,9 @@
-
-
-
+
+
+
@@ -91,6 +91,11 @@ import { listDemo, getDemo, delDemo, addDemo, updateDemo } from '@/api/fileList/
import { download } from '@/utils/request';
import { onBeforeRouteLeave } from 'vue-router';
//import { DemoVO, DemoQuery, DemoForm } from '@/api/demo/demo/types';
+import { useDeviceStore } from '@/store/modules/equipmentList';
+import { storeToRefs } from 'pinia';
+const deviceStore = useDeviceStore();
+const { deviceList } = storeToRefs(deviceStore);
+const { getdeviceList } = deviceStore;
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -272,6 +277,23 @@ onBeforeRouteLeave(() => {
dialog.visible = false;
monitorVideoUrl.value = '';
});
+
+//获取设备名称-搜索_设备选择
+const deviceInfo = ref([]);
+const getDeviceName = async () => {
+ try {
+ await getdeviceList();
+ deviceInfo.value = deviceList.value;
+ console.log('设备列表:', deviceInfo.value);
+ } catch (error) {
+ proxy?.$modal.msgError('获取设备列表失败');
+ }
+ // const res = await getdeviceList();
+ // deviceInfo.value = res?.rows;
+};
+onMounted(() => {
+ getDeviceName();
+});