Explorar el Código

增加deviceId

孙钊宁 hace 2 años
padre
commit
fd9dde27f3
Se han modificado 2 ficheros con 12 adiciones y 1 borrados
  1. 7 0
      src/views/Home/Drawer.vue
  2. 5 1
      src/views/Home/index.vue

+ 7 - 0
src/views/Home/Drawer.vue

@@ -1,4 +1,5 @@
 <template>
+ 
   <el-drawer
     ref="drawerRef"
     v-model="props.visible"
@@ -69,6 +70,11 @@ const props = defineProps({
     type: String,
     default: "",
   },
+  deviceId:{
+    type: String,
+    default: '',
+
+  },
   visible: {
     type: Boolean,
     default: false,
@@ -87,6 +93,7 @@ const getList = async () => {
   let { code, data } = await productInformationList({
     ...page.value,
     testId: props.testId,
+    deviceId:props.deviceId
   });
   loading.value = false;
   if (code != 200) return;

+ 5 - 1
src/views/Home/index.vue

@@ -33,6 +33,7 @@
     @drawClose="DrawerVisible = false"
     v-if="DrawerVisible"
     :testId="id"
+    :deviceId="deviceId"
     :visible="DrawerVisible"
   ></Drawer>
 </template>
@@ -67,8 +68,11 @@ const currentChange = (val) => {
 
 const DrawerVisible = ref(false);
 const id = ref("");
-const cellClick = async ({ testId }) => {
+const deviceId = ref("");
+const cellClick = async ({ testId, deviceId: dId }) => {
+  console.log(dId);
   id.value = testId + "";
+  deviceId.value = dId + "";
   DrawerVisible.value = true;
 };