Browse Source

修改自检中巡检项没显示问题

Renxy 1 năm trước cách đây
mục cha
commit
0b1b690eef
1 tập tin đã thay đổi với 3 bổ sung8 xóa
  1. 3 8
      src/pages/EqSelfInspection/components/Detail.js

+ 3 - 8
src/pages/EqSelfInspection/components/Detail.js

@@ -313,8 +313,7 @@ export function DeviceTable(props) {
     {
       title: '巡检项',
       key: 'TemplateItem.Name',
-      dataIndex: 'TemplateItem',
-      render: (TemplateItem) => <div>{TemplateItem.Name}</div>,
+      dataIndex: ['TemplateItem', 'Name'],
     },
     // {
     //   title: '设备位号',
@@ -596,6 +595,7 @@ export function WarningTable(props) {
   const [errVisible, setErrVisible] = useState(false);
   const [currentItem, setCurrentItem] = useState({});
   const isSensor = type == 'sensor';
+  console.log('--------------', items);
 
   const onClickThreshold = (record) => {
     setCurrentItem(record);
@@ -629,13 +629,8 @@ export function WarningTable(props) {
     },
     {
       title: '巡检项',
-      dataIndex: 'TemplateItem.Name',
+      dataIndex: ['TemplateItem', 'Name'],
     },
-    // {
-    //   title: '设备位号',
-    //   width: '16%',
-    //   dataIndex: 'DeviceCode',
-    // },
     {
       title: '设定值范围',
       width: '30%',