import React, { Component } from "react"; import { AtModal, AtModalAction, AtModalContent, AtIcon } from "taro-ui"; import { Button, Image, View } from "@tarojs/components"; import Taro from "@tarojs/taro"; import './index.less'; // import { getListPublicReleaseLog } from '../../utils/servers/servers'; import "taro-ui/dist/style/components/icon.scss"; import { getClockState } from "../../utils/tools"; import ImagePicker from "../common/imagePicker"; import { resourceAddress } from "../../utils/config"; class HistoricalClock extends Component { constructor(props) { super(props); this.state = { publicReleaseLog: [] } // this.getListPublicReleaseLog = this.getListPublicReleaseLog.bind(this); } componentDidMount() { // this.getListPublicReleaseLog(); } // getListPublicReleaseLog() { // Taro.showLoading({ // title: '加载中...' // }) // getListPublicReleaseLog({ // id: this.props.id // }).then(v => { // Taro.hideLoading(); // if (v.error.length === 0) { // for (let d of v.data) { // let list = []; // for (let i of (d.photoUrl || '').split(',')) { // if (i) { // list.push({ 'url': resourceAddress + i }) // } // } // d.photoUrl = list; // } // this.setState({ // publicReleaseLog: v.data, // }) // } else { // Taro.showToast({ title: v.error[0].message, icon: 'none' }) // } // }).catch(err => { // Taro.hideLoading(); // Taro.showToast({ title: '系统错误.请稍后重试', icon: 'none' }) // //console.log(err) // }) // } render() { return ( { this.state.publicReleaseLog.map((v, k) => ( {getClockState(v.status, true).title} 操作人:{v.aname} 操作时间:{v.createTimes} {v.remarks ? 备注:{v.remarks} : null} {v.photoUrl.length !== 0 ? 附件: : null} )) } ) } } export default HistoricalClock;