import React, { Component } from "react"; import styles from "./index.less"; import { normalVal,timestampToTime } from '@utils/tools'; import slideUp from "@common/images/slide-up.png"; import slideDown from "@common/images/slide-down.png"; class SlideExcel extends Component { constructor(props) { super(props); this.state = { show:false }; this.toTime = this.toTime.bind(this) this.handleSlide = this.handleSlide.bind(this) } 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; } } handleSlide(){ let tmpShow = this.state.show this.setState({ show:!tmpShow }) } render() { const {items,item,idx,dateTime,getInfomation} = this.props; const {show} = this.state; return (
{value.itemName} getInfomation('',value.uniqueName || '','excel')}> | {value.value} {value.unit} | {normalVal(value.min,value.max)} | {value.time == ''?('导入时间: '+dateTime):'化验时间: '+this.toTime(value.time)} |
{value.itemName} getInfomation('',value.uniqueName || '','excel')}> | {value.value} {value.unit} | {normalVal(value.min,value.max)} | {value.time == ''?('导入时间: '+dateTime):'化验时间: '+this.toTime(value.time)} |