Explorar o código

fix: 设备基本信息-打印标签功能兼容

johnsen hai 9 meses
pai
achega
b56d6b6eba

+ 15 - 8
src/views/component/device/index.vue

@@ -608,12 +608,12 @@ export default {
             type: 'info'
           },
           // todo 待开发
-          // {
-          //   key: 'customPrint',
-          //   label: '打印标签',
-          //   icon: 'ibps-icon-cog',
-          //   type: 'warning'
-          // },
+          {
+            key: 'customPrint',
+            label: '打印标签',
+            icon: 'ibps-icon-cog',
+            type: 'warning'
+          },
           {
             key: 'customExport',
             label: '导出数据',
@@ -712,7 +712,12 @@ export default {
             slotName: 'posSlot',
             sortable: true
           },
-          { prop: 'bianZhiShiJian', label: '建档时间', sortable: true, width: 130 },
+          {
+            prop: 'bianZhiShiJian',
+            label: '建档时间',
+            sortable: true,
+            width: 130
+          },
           { prop: 'sheBeiShiBieH', label: '设备编号', sortable: true },
           { prop: 'yuanSheBeiBian', label: '原设备编号', sortable: true },
           { prop: 'sheBeiMingCheng', label: '设备名称', sortable: true },
@@ -1679,7 +1684,9 @@ export default {
         if (indices.length > 1) {
           return [
             {
-              field: `发现重复的原设备编号:${key} 在第 ${indices.join(', ')} 行`
+              field: `发现重复的原设备编号:${key} 在第 ${indices.join(
+                ', '
+              )} 行`
             }
           ]
         }

+ 6 - 5
src/views/system/jbdScan/goods/deviceTag.vue

@@ -23,10 +23,10 @@
                           item.deviceStatus === '合格'
                             ? 'triangle'
                             : item.deviceStatus === '停用'
-                              ? 'triangleRed'
-                              : item.deviceStatus === '限用'
-                                ? 'triangleYellow'
-                                : 'triangleGray'
+                            ? 'triangleRed'
+                            : item.deviceStatus === '限用'
+                            ? 'triangleYellow'
+                            : 'triangleGray'
                         "
                       >
                         <div class="label" style="border: 0">
@@ -269,7 +269,8 @@ export default {
       if (!id) {
         return ''
       }
-      return personData.find((i) => i.id_ === id).NAME_
+      const people = personData.find((i) => i.id_ === id)
+      return people?.NAME_
     }
   }
 }