|
@@ -1,6 +1,6 @@
|
|
|
import React from 'react';
|
|
|
import { SearchOption, InspectCommon, Calendar ,Notify,ConfirmModal,Add} from '@commonComp';
|
|
|
-import { deepClone,normalVal } from '@utils/tools';
|
|
|
+import { deepClone,normalVal,timestampToTime,filterDataArr } from '@utils/tools';
|
|
|
import styles from './index.less';
|
|
|
import date1 from './img/date1.png';
|
|
|
import date2 from './img/date2.png';
|
|
@@ -253,6 +253,18 @@ class Inspect extends React.Component {
|
|
|
return <td style={{width:'20%'}}><span className={(val.value - 0).toString() == 'NaN'?"red":(val.maxValue || val.minValue) ? (val.value > val.maxValue || val.value < val.minValue?"red":''):''}>{val.value}</span> { val.labelSuffix}</td>
|
|
|
}
|
|
|
}
|
|
|
+ toTime(time){
|
|
|
+ let tmpTim = time.split(',').join('')-0
|
|
|
+ if(time && tmpTim.toString() != 'NaN'){
|
|
|
+ let date = new Date('1900-01-01');
|
|
|
+ let dateTim = date.getTime();
|
|
|
+ let times = (tmpTim-2)*24*60*60*1000;
|
|
|
+ let result = timestampToTime(dateTim+times).split(' ')[0]
|
|
|
+ return result;
|
|
|
+ }else{
|
|
|
+ return time;
|
|
|
+ }
|
|
|
+ }
|
|
|
render() {
|
|
|
const { handleChangeValue, list, labelList,delPartItem, handleLabelSub, handleClear, handleConfirm, fillActive,getExcelDataList,handleCloseExcel,handlePush } = this.props;
|
|
|
const {toastText,visible} = this.state;
|
|
@@ -280,7 +292,7 @@ class Inspect extends React.Component {
|
|
|
<td style={{width:'25%'}}>
|
|
|
{normalVal(value.min,value.max)}
|
|
|
</td>
|
|
|
- <td style={{width:'25%'}}>{value.time == ''?('导入时间: '+this.state.dateTime):'化验时间: '+value.time}</td>
|
|
|
+ <td style={{width:'25%'}}>{value.time == ''?('导入时间: '+this.state.dateTime):'化验时间: '+this.toTime(value.time)}</td>
|
|
|
</tr>
|
|
|
})
|
|
|
}
|