import React from 'react';
import Taro from '@tarojs/taro';
import { View } from '@tarojs/components';
import { Cell, CellGroup, Field, Button } from '@antmjs/vantui';
import Uploader from '@/components/Uploader/index';
import Map from '@/components/map';
import { getDtStr } from '@/utils/date';

export default (props) => {
  const { issue } = props;
  return (
    <>
      <Map location={issue?.location} readOnly />
      <CellGroup>
        <Cell title="ID" value={issue?.issueId} />
        <Cell title="上报时间" value={getDtStr(issue?.createDate)} />
        <Cell title="办结时间" value={issue?.expireDate} />
        <Cell title="交办次数" value={issue?.processNum || 1} />
      </CellGroup>
      <CellGroup style={{marginTop: '20px'}}>
        <Cell title="抽检位置" value={issue?.locName} />
        <Cell title="定 位 点" value={issue?.addr} />
        <Cell title="问题详情" />        
        <Field
          readonly
          type="textarea"
          autosize={{ minHeight: '120px' }}
          value={issue?.content}
        /> 
        <Cell
          renderTitle={
            <Uploader
              disabled
              value={issue?.attachList}
            />
          }
        />
      </CellGroup>
    </>
  )
}
