|  | @@ -6,6 +6,7 @@ import OssUploadModal from '@/components/OssUpload'
 | 
	
		
			
				|  |  |  import SvgIcon from '@/components/SvgIcon'
 | 
	
		
			
				|  |  |  import { userStore } from '@/store/mobx'
 | 
	
		
			
				|  |  |  import { iFile } from '@/types/file'
 | 
	
		
			
				|  |  | +import { iAuditHistory, iLatestAuditorState, iRectifiedState } from '@/types/safe'
 | 
	
		
			
				|  |  |  import { apiDelFile, apiGetFileList, apiSaveFileInfo } from '@/utils/common/api'
 | 
	
		
			
				|  |  |  import consts from '@/utils/consts'
 | 
	
		
			
				|  |  |  import { dayjsFormat } from '@/utils/util'
 | 
	
	
		
			
				|  | @@ -30,12 +31,24 @@ interface iDetailState {
 | 
	
		
			
				|  |  |    inspectionDetail: string
 | 
	
		
			
				|  |  |    position: string
 | 
	
		
			
				|  |  |    status: number
 | 
	
		
			
				|  |  | +  checkOrder: iModifiedOrder
 | 
	
		
			
				|  |  | +  auditHistory: iAuditHistory
 | 
	
		
			
				|  |  | +  rectifiedInfo: iRectifiedState[]
 | 
	
		
			
				|  |  | +  latestAuditor: iLatestAuditorState
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +interface iModifiedOrder{
 | 
	
		
			
				|  |  | +  name: string
 | 
	
		
			
				|  |  | +  end_time: string | undefined
 | 
	
		
			
				|  |  | +  opinion: string
 | 
	
		
			
				|  |  | +  status: number
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  interface iFileState {
 | 
	
		
			
				|  |  |    fileList: any[]
 | 
	
		
			
				|  |  |    total: number
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  const Detail:React.FC<RouteComponentProps> = (props) => {
 | 
	
		
			
				|  |  | +  const { saveId = "" } = props.location.state as any
 | 
	
		
			
				|  |  |    const [ visible, setVisible ] = useState<boolean>(false)
 | 
	
		
			
				|  |  |    const [ detail, setDetail ] = useState<iDetailState>({
 | 
	
		
			
				|  |  |      auditName: "",
 | 
	
	
		
			
				|  | @@ -49,17 +62,31 @@ const Detail:React.FC<RouteComponentProps> = (props) => {
 | 
	
		
			
				|  |  |      inspection: "",
 | 
	
		
			
				|  |  |      inspectionDetail: "",
 | 
	
		
			
				|  |  |      position: "",
 | 
	
		
			
				|  |  | -    status: 0
 | 
	
		
			
				|  |  | +    status: 0,
 | 
	
		
			
				|  |  | +    checkOrder: {
 | 
	
		
			
				|  |  | +      name: "",
 | 
	
		
			
				|  |  | +      status: 0,
 | 
	
		
			
				|  |  | +      opinion: "",
 | 
	
		
			
				|  |  | +      end_time: ""
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    auditHistory: {
 | 
	
		
			
				|  |  | +      "1": []
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    rectifiedInfo: [],
 | 
	
		
			
				|  |  | +    latestAuditor: {
 | 
	
		
			
				|  |  | +      audit_id: "",
 | 
	
		
			
				|  |  | +      status: 0,
 | 
	
		
			
				|  |  | +      progress: ""
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |    })
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    useEffect(() => {
 | 
	
		
			
				|  |  |      initData()
 | 
	
		
			
				|  |  | -  }, [])
 | 
	
		
			
				|  |  | +  }, [ saveId ])
 | 
	
		
			
				|  |  |    const initData = async() => {
 | 
	
		
			
				|  |  | -    const { saveId = "" } = props.location.state as any
 | 
	
		
			
				|  |  | -    const { code = -1, data = {} } = await apiGetSafeDetail(saveId)
 | 
	
		
			
				|  |  | +    const { code = -1, data = {}, checkOrder = {} } = await apiGetSafeDetail(saveId)
 | 
	
		
			
				|  |  |      if (code === consts.RET_CODE.SUCCESS) {
 | 
	
		
			
				|  |  | -      setDetail({ ...detail, ...data })
 | 
	
		
			
				|  |  | +      setDetail({ ...detail, ...data, checkOrder })
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |    const onCreate = async (fileList: iFile[]) => {
 | 
	
	
		
			
				|  | @@ -117,6 +144,18 @@ const Detail:React.FC<RouteComponentProps> = (props) => {
 | 
	
		
			
				|  |  |              </tbody>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |            </table>
 | 
	
		
			
				|  |  | +          <table className="pi-table pi-bordered">
 | 
	
		
			
				|  |  | +            <thead>
 | 
	
		
			
				|  |  | +              <tr>
 | 
	
		
			
				|  |  | +                <th colSpan={2} className="pi-text-center">整改单</th>
 | 
	
		
			
				|  |  | +              </tr>
 | 
	
		
			
				|  |  | +            </thead>
 | 
	
		
			
				|  |  | +            <tbody>
 | 
	
		
			
				|  |  | +              <tr><th style={{ width: "150px" }}>整改情况</th><td><TextArea value={detail.checkOrder.opinion}></TextArea></td></tr>
 | 
	
		
			
				|  |  | +              <tr><th style={{ width: "150px" }}>整改日期</th><td><DatePicker size="small" locale={locale} allowClear={false} value={dayjs(detail.checkOrder.end_time)} onChange={(value) => setDetail({ ...detail, checkOrder: { ...detail.checkOrder, end_time: value?.format() } })}></DatePicker></td></tr>
 | 
	
		
			
				|  |  | +              <tr><th style={{ width: "150px" }}>整改人</th><td>王五</td></tr>
 | 
	
		
			
				|  |  | +            </tbody>
 | 
	
		
			
				|  |  | +          </table>
 | 
	
		
			
				|  |  |            <table className="pi-table pi-bordered mt-3">
 | 
	
		
			
				|  |  |              <thead>
 | 
	
		
			
				|  |  |                <tr>
 | 
	
	
		
			
				|  | @@ -165,6 +204,85 @@ const Detail:React.FC<RouteComponentProps> = (props) => {
 | 
	
		
			
				|  |  |                </td></tr>
 | 
	
		
			
				|  |  |              </tbody>
 | 
	
		
			
				|  |  |            </table>
 | 
	
		
			
				|  |  | +          <table className="table table-bordered mt-3">
 | 
	
		
			
				|  |  | +                  <thead>
 | 
	
		
			
				|  |  | +                    <tr>
 | 
	
		
			
				|  |  | +                      <th colSpan={2} className="text-center">审批流程</th>
 | 
	
		
			
				|  |  | +                    </tr>
 | 
	
		
			
				|  |  | +                  </thead>
 | 
	
		
			
				|  |  | +                  <tbody>
 | 
	
		
			
				|  |  | +                    <tr>
 | 
	
		
			
				|  |  | +                      <td width="30%">
 | 
	
		
			
				|  |  | +                        <table className="table table-bordered">
 | 
	
		
			
				|  |  | +                              <tbody><tr><td className="text-center">检查人</td><td><i className="fas fa fa-play-circle fa-rotate-90"></i> 布尔 <small className="text-muted">职称</small></td></tr>
 | 
	
		
			
				|  |  | +                              <tr><td rowSpan={2} className="text-center">审批</td><td><i className="fas fa-chevron-circle-down"></i> 张三  <small className="text-muted">职称</small></td></tr>
 | 
	
		
			
				|  |  | +                              <tr><td><i className="fas fa-chevron-circle-down"></i> 李四  <small className="text-muted">职称</small></td></tr>
 | 
	
		
			
				|  |  | +                              <tr><td className="text-center">整改</td><td><i className="fas fa-chevron-circle-down"></i> 由 张三 指派</td></tr>
 | 
	
		
			
				|  |  | +                              <tr><td className="text-center">复查</td><td><i className="fas fa fa-stop-circle"></i> 李四 <small className="text-muted">职称</small></td></tr>
 | 
	
		
			
				|  |  | +                            </tbody></table>
 | 
	
		
			
				|  |  | +                      </td>
 | 
	
		
			
				|  |  | +                      <td width="70%">
 | 
	
		
			
				|  |  | +                        <div className="dropdown text-right">
 | 
	
		
			
				|  |  | +                          <button className="btn btn-outline-primary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
 | 
	
		
			
				|  |  | +                            添加审批流程
 | 
	
		
			
				|  |  | +                          </button>
 | 
	
		
			
				|  |  | +                        </div>
 | 
	
		
			
				|  |  | +                        <div className="card mt-1 mb-3">
 | 
	
		
			
				|  |  | +                          <div className="card-header">
 | 
	
		
			
				|  |  | +                            审批流程
 | 
	
		
			
				|  |  | +                          </div>
 | 
	
		
			
				|  |  | +                          <ul className="list-group list-group-flush">
 | 
	
		
			
				|  |  | +                            <li className="list-group-item d-flex">
 | 
	
		
			
				|  |  | +                              <div>
 | 
	
		
			
				|  |  | +                                <p className="m-0 ">1 张三  <small className="text-muted">监理</small></p>
 | 
	
		
			
				|  |  | +                                <p className="m-0 ml-2 d-inline"><small className="text-muted">XXX单位</small></p>
 | 
	
		
			
				|  |  | +                              </div>
 | 
	
		
			
				|  |  | +                              <a href="" className="text-danger ml-auto">移除</a>
 | 
	
		
			
				|  |  | +                            </li>
 | 
	
		
			
				|  |  | +                            <li className="list-group-item d-flex">
 | 
	
		
			
				|  |  | +                              <div>
 | 
	
		
			
				|  |  | +                                <p className="m-0 ">2 李四  <small className="text-muted">监理</small></p>
 | 
	
		
			
				|  |  | +                                <p className="m-0 ml-2 d-inline"><small className="text-muted">XXX单位</small></p>
 | 
	
		
			
				|  |  | +                              </div>
 | 
	
		
			
				|  |  | +                              <a href="" className="text-danger ml-auto">移除</a>
 | 
	
		
			
				|  |  | +                            </li>
 | 
	
		
			
				|  |  | +                          </ul>
 | 
	
		
			
				|  |  | +                        </div>
 | 
	
		
			
				|  |  | +                        <div className="card mt-1 mb-3">
 | 
	
		
			
				|  |  | +                          <div className="card-header">
 | 
	
		
			
				|  |  | +                            整改流程
 | 
	
		
			
				|  |  | +                          </div>
 | 
	
		
			
				|  |  | +                          <ul className="list-group list-group-flush">
 | 
	
		
			
				|  |  | +                            <li className="list-group-item d-flex">
 | 
	
		
			
				|  |  | +                              <div>
 | 
	
		
			
				|  |  | +                                整改人由最后一位审批人指派
 | 
	
		
			
				|  |  | +                              </div>
 | 
	
		
			
				|  |  | +                            </li>
 | 
	
		
			
				|  |  | +                          </ul>
 | 
	
		
			
				|  |  | +                        </div>
 | 
	
		
			
				|  |  | +                        <div className="dropdown text-right">
 | 
	
		
			
				|  |  | +                          <button className="btn btn-outline-primary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
 | 
	
		
			
				|  |  | +                            添加复查流程
 | 
	
		
			
				|  |  | +                          </button>
 | 
	
		
			
				|  |  | +                        </div>
 | 
	
		
			
				|  |  | +                        <div className="card mt-1">
 | 
	
		
			
				|  |  | +                          <div className="card-header">
 | 
	
		
			
				|  |  | +                            复查流程
 | 
	
		
			
				|  |  | +                          </div>
 | 
	
		
			
				|  |  | +                          <ul className="list-group list-group-flush">
 | 
	
		
			
				|  |  | +                            <li className="list-group-item d-flex">
 | 
	
		
			
				|  |  | +                              <div>
 | 
	
		
			
				|  |  | +                                <p className="m-0 ">1 李四  <small className="text-muted">监理</small></p>
 | 
	
		
			
				|  |  | +                                <p className="m-0 ml-2 d-inline"><small className="text-muted">XXX单位</small></p>
 | 
	
		
			
				|  |  | +                              </div>
 | 
	
		
			
				|  |  | +                              <a href="" className="text-danger ml-auto">移除</a>
 | 
	
		
			
				|  |  | +                            </li>
 | 
	
		
			
				|  |  | +                          </ul>
 | 
	
		
			
				|  |  | +                        </div>
 | 
	
		
			
				|  |  | +                      </td>
 | 
	
		
			
				|  |  | +                    </tr>
 | 
	
		
			
				|  |  | +                  </tbody>
 | 
	
		
			
				|  |  | +                </table>
 | 
	
		
			
				|  |  |          </div>
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |        <OssUploadModal
 |