广州矛调粤政易端
xusd
7 days ago d27794814b69d18aeb8ee96a46cae91d5613570c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/*
 * @Company: hugeInfo
 * @Author: ldh
 * @Date: 2022-08-13 14:27:55
 * @LastEditTime: 2023-05-19 11:23:24
 * @LastEditors: lwh
 * @Version: 1.0.0
 * @Description: 房间详情页 - 房间信息
 */
import React from 'react';
import { RightArrow2Outlined, LocationOutlined } from 'dd-icons';
import { useHistory } from 'react-router-dom';
import { location_icon } from '../../assets/icon';
import { avatar1, avatar2 } from '../../assets/img';
import Descriptions from '../Descriptions';
import ImgShow from '../ImgShow';
const RoomMsg = ({ onlyCheck, data, onChangeLoginStatus }) => {
  const history = useHistory();
  return (
    <>
      <div onClick={() => onChangeLoginStatus(data.inputStatus)} className="roomDetail-roomMsg-top">
        <div>登记状态:{data.inputStatusName || '-'}</div>
        {!onlyCheck && (
          <div className="roomDetail-roomMsg-top-icon">
            <RightArrow2Outlined />
          </div>
        )}
      </div>
      <div className="roomDetail-roomMsg-main">
        <div className="roomDetail-roomMsg-card">
          <Descriptions
            data={[
              { label: '房号', value: data.housenumber },
              { label: '房间现状', value: data.houseStateDesc },
              { label: '房间用途', value: data.houseUseName },
              { label: '产权性质', value: data.houseNatureDesc },
              { label: '房间类别', value: data.houseTypeDesc },
              { label: '房间结构', value: data.houseStructureDesc },
            ]}
            title="基本信息"
            topRightActionVisible={!onlyCheck}
            onTopRightAction={() => history.push(`/hztGrid/room/FormRoom?id=${data.id}&tabPage=${'1'}`)}
          />
          <div className="roomDetail-msgCard roomDetail-msgCard-blue">
            {!data.metaAddr ? (
              <>
                <div className="roomDetail-msgCard-avatar">
                  <img src={location_icon} alt="" />
                </div>
                <div className="roomDetail-msgCard-desc">尚未关联公安标准地址</div>
              </>
            ) : (
              <>
                <div className="roomDetail-msgCard-avatar roomDetail-msgCard-avatar-blue">
                  <LocationOutlined />
                </div>
                <div className="roomDetail-msgCard-text">公安标准地址:{data.metaAddr}</div>
              </>
            )}
          </div>
        </div>
        {data.houseState == '2' && (
          <div className="roomDetail-roomMsg-card">
            <Descriptions
              data={[
                { label: '出租用途', value: data.leasePurposeDesc },
                { label: '隐患类型', value: data.hiddenDangerTypeDesc },
              ]}
              title="出租信息"
            />
            <div className="roomDetail-msgCard roomDetail-msgCard-blue">
              <div className="roomDetail-msgCard-avatar">
                <img src={avatar1} alt="" />
              </div>
              <div className="roomDetail-msgCard-content">
                <div className="roomDetail-msgCard-content-title ellipsis-text-1">
                  <span>{data.landName || '-'}</span>
                  <span>{data.landPhone || '-'}</span>
                  <span className="public-tag2 public-tag2-blue">房东</span>
                </div>
                <div className="roomDetail-msgCard-content-desc">
                  <span>{data.landCardtypeDesc || '-'}</span>
                  <span className="public-rightBorder">{data.landIdcard || '-'}</span>
                </div>
              </div>
            </div>
            <div className="roomDetail-msgCard roomDetail-msgCard-blue">
              <div className="roomDetail-msgCard-avatar">
                <img src={avatar2} alt="" />
              </div>
              <div className="roomDetail-msgCard-content">
                <div className="roomDetail-msgCard-content-title ellipsis-text-1">
                  <span>{data.manageName || '-'}</span>
                  <span>{data.managePhone || '-'}</span>
                  <span className="public-tag2 public-tag2-blue">代管人</span>
                </div>
                <div className="roomDetail-msgCard-content-desc ellipsis-text-1">
                  <span>{data.manageCardtypeDesc || '-'}</span>
                  <span className="public-rightBorder">{data.manageIdcard || '-'}</span>
                </div>
              </div>
            </div>
          </div>
        )}
        <div className="roomDetail-roomMsg-card">
          <div className="roomDetail-roomMsg-card-title">房间附件</div>
          <div className="roomDetail-roomMsg-card-file">
            {data.fileList?.map((x, t) => (
              <div className="roomDetail-roomMsg-card-file-item" key={t}>
                <ImgShow img={x.showUrl} allImg={data.fileList} title={x.name} />
              </div>
            ))}
            {(data.fileList || []).length === 0 && (
              <div className="roomDetail-roomMsg-card-file-item">
                <ImgShow />
              </div>
            )}
          </div>
        </div>
        <div className="roomDetail-roomMsg-card">
          <Descriptions
            data={[
              { label: '蟑迹鼠迹', value: data.mouseStatus == 0 ? '无' : data.mouseStatus == 1 ? '有' : '-' },
              { label: '卫生状况', value: data.cleanStatus == 0 ? '良好' : data.cleanStatus == 1 ? '差' : '-' },
              { label: '是否关注状况', value: data.focusType == '0' ? '正常' : data.focusType == '1' ? '关注' : '-' },
              { label: '房间简称', value: data.shortName },
            ]}
            title="其他信息"
          />
        </div>
      </div>
    </>
  );
};
 
export default RoomMsg;