duy 2 gadi atpakaļ
vecāks
revīzija
cc8b3a1176
1 mainītis faili ar 3 papildinājumiem un 5 dzēšanām
  1. 3 5
      src/views/tentative/device/employ.vue

+ 3 - 5
src/views/tentative/device/employ.vue

@@ -541,11 +541,9 @@ const nodeMaterialChange = async (val) => {
         primaryKeyId: val
     })
     //处理数据
-    const records = getObjValue(data)
-    nodeMaterialSelectData.value = records
-    if (records.length > 0) {
-        addEditFormModel.value.specificationNumber = records?.sampleNames
-        addEditFormModel.value.materialName = records?.sampleNumbers
+    if (data) {
+        addEditFormModel.value.specificationNumber = data?.sampleNumbers 
+        addEditFormModel.value.materialName = data?.sampleNames  
     } else {
         addEditFormModel.value.specificationNumber = ''
         addEditFormModel.value.materialName = ''