瀏覽代碼

项目编辑

魏熙美 5 年之前
父節點
當前提交
8f917257b4

+ 1
- 1
config/config.js 查看文件

455
 
455
 
456
   proxy: {
456
   proxy: {
457
     '/api/': {
457
     '/api/': {
458
-      target: 'http://192.168.0.84:8080/',
458
+      target: 'http://localhost:8080/',
459
       changeOrigin: true,
459
       changeOrigin: true,
460
       // pathRewrite: { '^/server': '' },
460
       // pathRewrite: { '^/server': '' },
461
     },
461
     },

+ 74
- 0
src/components/XForm/ImageListUpload.jsx 查看文件

1
+import React from 'react';
2
+import { Upload, Icon, Modal } from 'antd';
3
+import './style.less';
4
+import { uploaderProps } from '../../utils/upload';
5
+
6
+function getBase64(file) {
7
+  return new Promise((resolve, reject) => {
8
+    const reader = new FileReader();
9
+    reader.readAsDataURL(file);
10
+    reader.onload = () => resolve(reader.result);
11
+    reader.onerror = error => reject(error);
12
+  });
13
+}
14
+
15
+class ImageListUpload extends React.Component {
16
+  state = {
17
+    previewVisible: false,
18
+    previewImage: '',
19
+    fileList: [],
20
+  };
21
+
22
+  handleCancel = () => this.setState({ previewVisible: false });
23
+
24
+  handlePreview = async file => {
25
+    if (!file.url && !file.preview) {
26
+      file.preview = await getBase64(file.originFileObj);
27
+    }
28
+
29
+    this.setState({
30
+      previewImage: file.url || file.preview,
31
+      previewVisible: true,
32
+    });
33
+  };
34
+
35
+  handleChange = ({ fileList }) => {
36
+    this.setState({ fileList })
37
+    if (typeof this.props.onChange === 'function') {
38
+      // return item.response.url
39
+      const images = fileList.filter(item => item.status === 'done')
40
+      this.props.onChange(images.map(item => item.response.url))
41
+    }
42
+  };
43
+
44
+  render() {
45
+    const { previewVisible, previewImage, fileList } = this.state;
46
+
47
+    const { value } = this.props
48
+
49
+    const uploadButton = (
50
+      <div>
51
+        <Icon type="plus" />
52
+        <div className="ant-upload-text">Upload</div>
53
+      </div>
54
+    );
55
+    return (
56
+      <div className="clearfix">
57
+        <Upload
58
+          listType="picture-card"
59
+          fileList={fileList || value}
60
+          onPreview={this.handlePreview}
61
+          onChange={this.handleChange}
62
+          { ...uploaderProps }
63
+        >
64
+          {fileList.length >= 8 ? null : uploadButton}
65
+        </Upload>
66
+        <Modal visible={previewVisible} footer={null} onCancel={this.handleCancel}>
67
+          <img alt="example" style={{ width: '100%' }} src={previewImage} />
68
+        </Modal>
69
+      </div>
70
+    );
71
+  }
72
+}
73
+
74
+export default ImageListUpload;

+ 13
- 0
src/components/XForm/style.css 查看文件

1
+:global .avatar-uploader > .ant-upload {
2
+  width: 128px;
3
+  height: 128px;
4
+}
5
+/* you can make up upload button and sample style by using stylesheets */
6
+.ant-upload-select-picture-card i {
7
+  font-size: 32px;
8
+  color: #999;
9
+}
10
+.ant-upload-select-picture-card .ant-upload-text {
11
+  margin-top: 8px;
12
+  color: #666;
13
+}

+ 12
- 0
src/components/XForm/style.less 查看文件

6
     }
6
     }
7
   }
7
   }
8
 }
8
 }
9
+
10
+
11
+/* you can make up upload button and sample style by using stylesheets */
12
+.ant-upload-select-picture-card i {
13
+  font-size: 32px;
14
+  color: #999;
15
+}
16
+
17
+.ant-upload-select-picture-card .ant-upload-text {
18
+  margin-top: 8px;
19
+  color: #666;
20
+}

+ 13
- 0
src/components/XForm/style.wxss 查看文件

1
+:global .avatar-uploader > .ant-upload {
2
+  width: 128px;
3
+  height: 128px;
4
+}
5
+/* you can make up upload button and sample style by using stylesheets */
6
+.ant-upload-select-picture-card i {
7
+  font-size: 32px;
8
+  color: #999;
9
+}
10
+.ant-upload-select-picture-card .ant-upload-text {
11
+  margin-top: 8px;
12
+  color: #666;
13
+}

+ 60
- 13
src/pages/building/list/add/components/base.jsx 查看文件

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Radio, Tag, Tooltip, Tabs, InputNumber } from 'antd';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Radio, Tag, Tooltip, Tabs, InputNumber, notification } from 'antd';
3
 import moment from 'moment';
3
 import moment from 'moment';
4
 import request from '../../../../../utils/request';
4
 import request from '../../../../../utils/request';
5
 import apis from '../../../../../services/apis';
5
 import apis from '../../../../../services/apis';
6
 import Styles from '../style.less';
6
 import Styles from '../style.less';
7
 import { router } from 'umi';
7
 import { router } from 'umi';
8
 import ImageUpload from '../../../../../components/XForm/ImageUpload'
8
 import ImageUpload from '../../../../../components/XForm/ImageUpload'
9
+import ImageListUpload from '../../../../../components/XForm/ImageListUpload'
9
 import Wangedit from '../../../../../components/Wangedit/Wangedit'
10
 import Wangedit from '../../../../../components/Wangedit/Wangedit'
10
 import TagGroup from './tags'
11
 import TagGroup from './tags'
11
 
12
 
23
   },
24
   },
24
 };
25
 };
25
 
26
 
27
+
28
+function openNotificationWithIcon(type, message) {
29
+  notification[type]({
30
+    message,
31
+    description:
32
+      '',
33
+  });
34
+}
35
+
36
+
26
 function AddBuilding(props) {
37
 function AddBuilding(props) {
27
   const { getFieldDecorator } = props.form;
38
   const { getFieldDecorator } = props.form;
28
 
39
 
40
+  if (props.building.buildingId !== undefined) {
41
+    const { buildingId } = props.building
42
+    if (buildingId !== '') {
43
+      // eslint-disable-next-line react-hooks/rules-of-hooks
44
+      useEffect(() => {
45
+        getById(buildingId)
46
+      }, [])
47
+    }
48
+  }
49
+
50
+   // 获取详情信息
51
+   function getById(currentId) {
52
+    const { url, method } = apis.building.buildingGetById
53
+    const tempUrl = url.substring(0, url.lastIndexOf('id')).concat(currentId)
54
+
55
+    request({ url: tempUrl, method }).then(res => {
56
+      res.openingDate = moment(res.openingDate)
57
+      res.receivedDate = moment(res.receivedDate)
58
+      props.form.setFieldsValue(res)
59
+    })
60
+  }
61
+
29
   function handleSubmit(e) {
62
   function handleSubmit(e) {
30
     e.preventDefault();
63
     e.preventDefault();
31
     props.form.validateFieldsAndScroll((err, values) => {
64
     props.form.validateFieldsAndScroll((err, values) => {
32
       if (!err) {
65
       if (!err) {
33
-        console.log('Received values of form: ', values);
66
+        addBuilding(values)
34
       }
67
       }
35
     });
68
     });
36
   }
69
   }
37
 
70
 
71
+  function addBuilding(data) {
72
+    data.openingDate = moment(data.openingDate, 'yyyy-MM-dd HH:mm:ss')
73
+    data.receivedDate = moment(data.receivedDate, 'yyyy-MM-dd HH:mm:ss')
74
+    data.buildingProjectType = []
75
+    // 项目主图
76
+    data.img = data.avatarImage && data.avatarImage.map((item, index) => ({ imgType: 'banner', url: item, orderNo: index + 1 }))
77
+
78
+    request({ ...apis.building.addBuilding, data: { ...data } }).then(() => {
79
+      openNotificationWithIcon('success', '操作成功')
80
+    }).catch(err => {
81
+      openNotificationWithIcon('error', err.message)
82
+    })
83
+  }
84
+
38
   return (
85
   return (
39
         <Form {...formItemLayout} onSubmit={handleSubmit}>
86
         <Form {...formItemLayout} onSubmit={handleSubmit}>
40
-          <Form.Item label="楼盘编号">
87
+          <Form.Item label="楼盘编号" hasFeedback>
41
             {getFieldDecorator('code')(<Input />)}
88
             {getFieldDecorator('code')(<Input />)}
42
           </Form.Item>
89
           </Form.Item>
43
           <Form.Item label="楼盘名称" hasFeedback>
90
           <Form.Item label="楼盘名称" hasFeedback>
47
             {getFieldDecorator('name')(<Input />)}
94
             {getFieldDecorator('name')(<Input />)}
48
           </Form.Item>
95
           </Form.Item>
49
           <Form.Item label="项目类型" hasFeedback>
96
           <Form.Item label="项目类型" hasFeedback>
50
-            {getFieldDecorator('name')(<Input />)}
97
+            {getFieldDecorator('buildingProjectType')(<Input />)}
51
           </Form.Item>
98
           </Form.Item>
52
           <Form.Item label="均价" hasFeedback>
99
           <Form.Item label="均价" hasFeedback>
53
             {getFieldDecorator('price')(<Input />)}
100
             {getFieldDecorator('price')(<Input />)}
54
           </Form.Item>
101
           </Form.Item>
55
           <Form.Item label="开盘时间" hasFeedback>
102
           <Form.Item label="开盘时间" hasFeedback>
56
-            {getFieldDecorator('openingDate')(<DatePicker />)}
103
+            {getFieldDecorator('openingDate')(<DatePicker format="YYYY/MM/DD" />)}
57
           </Form.Item>
104
           </Form.Item>
58
           <Form.Item label="电话" hasFeedback>
105
           <Form.Item label="电话" hasFeedback>
59
             {getFieldDecorator('tel')(<Input />)}
106
             {getFieldDecorator('tel')(<Input />)}
79
             )}
126
             )}
80
           </Form.Item>
127
           </Form.Item>
81
           <Form.Item label="项目主图" hasFeedback>
128
           <Form.Item label="项目主图" hasFeedback>
82
-            {getFieldDecorator('tags')(
83
-              <ImageUpload />,
129
+            {getFieldDecorator('avatarImage')(
130
+              <ImageListUpload />,
84
             )}
131
             )}
85
           </Form.Item>
132
           </Form.Item>
86
           <Form.Item label="地址图片" hasFeedback>
133
           <Form.Item label="地址图片" hasFeedback>
87
-            {getFieldDecorator('tags')(
134
+            {getFieldDecorator('mapImg')(
88
               <ImageUpload />,
135
               <ImageUpload />,
89
             )}
136
             )}
90
           </Form.Item>
137
           </Form.Item>
91
           <Form.Item label="海报底图" hasFeedback>
138
           <Form.Item label="海报底图" hasFeedback>
92
-            {getFieldDecorator('tags')(
139
+            {getFieldDecorator('poster')(
93
               <ImageUpload />,
140
               <ImageUpload />,
94
             )}
141
             )}
95
           </Form.Item>
142
           </Form.Item>
123
           <Form.Item label="项目坐标" hasFeedback>
170
           <Form.Item label="项目坐标" hasFeedback>
124
             {getFieldDecorator('coordinate')(<Input disabled />)}
171
             {getFieldDecorator('coordinate')(<Input disabled />)}
125
           </Form.Item>
172
           </Form.Item>
126
-          <Form.Item label="项目地址" hasFeedback>
127
-            {getFieldDecorator('coordinate')(<Input />)}
173
+          <Form.Item label="地图位置" hasFeedback>
174
+            {(<Input />)}
128
           </Form.Item>
175
           </Form.Item>
129
           <Form.Item label="周边交通" hasFeedback>
176
           <Form.Item label="周边交通" hasFeedback>
130
-            {getFieldDecorator('buildingArea')(
177
+            {getFieldDecorator('buildingTransport')(
131
               <TagGroup />,
178
               <TagGroup />,
132
             )}
179
             )}
133
           </Form.Item>
180
           </Form.Item>
184
             {getFieldDecorator('rightsYear')(<InputNumber />)}
231
             {getFieldDecorator('rightsYear')(<InputNumber />)}
185
           </Form.Item>
232
           </Form.Item>
186
           <Form.Item label="预售许可证" hasFeedback>
233
           <Form.Item label="预售许可证" hasFeedback>
187
-            {getFieldDecorator('decoration')(
234
+            {getFieldDecorator('preSalePermit')(
188
               <ImageUpload />,
235
               <ImageUpload />,
189
             )}
236
             )}
190
           </Form.Item>
237
           </Form.Item>

+ 1
- 1
src/pages/building/list/add/components/imageSet.jsx 查看文件

138
 
138
 
139
       {/* 编辑页 */}
139
       {/* 编辑页 */}
140
       {/*  onSuccess是子组件传递事件信息  */}
140
       {/*  onSuccess是子组件传递事件信息  */}
141
-      <ModalImage visibleData={visibleData} key={visibleData.apartmentId} onSuccess={getList}/>
141
+      <ModalImage visibleData={visibleData} key={1} onSuccess={getList}/>
142
     </>
142
     </>
143
   )
143
   )
144
 }
144
 }

+ 1
- 1
src/pages/building/list/add/components/modalImage.jsx 查看文件

89
     const { url, method } = apis.building.buildingApartmentGetById
89
     const { url, method } = apis.building.buildingApartmentGetById
90
     const tempUrl = url.substring(0, url.lastIndexOf('id')).concat(apartmentId)
90
     const tempUrl = url.substring(0, url.lastIndexOf('id')).concat(apartmentId)
91
 
91
 
92
-    request({ url: tempUrl, method , params: { ...params } }).then(res => {
92
+    request({ url: tempUrl, method, params: { ...params } }).then(res => {
93
       // res.img = res.buildingImgList.map((item, _) => item.url)
93
       // res.img = res.buildingImgList.map((item, _) => item.url)
94
       res.img = res.buildingImgList[0].url
94
       res.img = res.buildingImgList[0].url
95
       this.props.form.setFieldsValue(res)
95
       this.props.form.setFieldsValue(res)

+ 15
- 1
src/pages/building/list/add/components/tags.jsx 查看文件

34
       inputVisible: false,
34
       inputVisible: false,
35
       inputValue: '',
35
       inputValue: '',
36
     });
36
     });
37
+
38
+    if (typeof this.props.onChange === 'function') {
39
+      const tempTags = tags.join(',')
40
+      this.props.onChange(tempTags);
41
+    }
37
   };
42
   };
38
 
43
 
39
   saveInputRef = input => (this.input = input);
44
   saveInputRef = input => (this.input = input);
40
 
45
 
41
   render() {
46
   render() {
42
     const { tags, inputVisible, inputValue } = this.state;
47
     const { tags, inputVisible, inputValue } = this.state;
48
+
49
+    const { value } = this.props
50
+    let data = []
51
+    if (value !== undefined && value !== null) {
52
+      data = value.split(',')
53
+    } else {
54
+      data = tags
55
+    }
56
+
43
     return (
57
     return (
44
       <div>
58
       <div>
45
-        {tags.map((tag, index) => {
59
+        {data.map((tag, index) => {
46
           const isLongTag = tag.length > 20;
60
           const isLongTag = tag.length > 20;
47
           const tagElem = (
61
           const tagElem = (
48
             <Tag key={tag} closable onClose={() => this.handleClose(tag)}>
62
             <Tag key={tag} closable onClose={() => this.handleClose(tag)}>

+ 10
- 21
src/pages/building/list/add/index.jsx 查看文件

29
 };
29
 };
30
 
30
 
31
 function AddBuilding(props) {
31
 function AddBuilding(props) {
32
-  // eslint-disable-next-line react-hooks/rules-of-hooks
33
-  const [dataSource, setDataSource] = useState({ records: [] })
34
-
35
-  const [buildingAreaTags, setBuildingAreaTags] = useState({ tags: ['Unremovable', 'Tag 2', 'Tag 3'], inputVisible: false, inputValue: '' })
36
-
37
-
38
-  const { getFieldDecorator } = props.form;
39
-
40
-  function handleSubmit(e) {
41
-    e.preventDefault();
42
-    props.form.validateFieldsAndScroll((err, values) => {
43
-      if (!err) {
44
-        console.log('Received values of form: ', values);
45
-      }
46
-    });
47
-  }
48
-
49
   function tabsCallback(key) {
32
   function tabsCallback(key) {
50
     console.log(key);
33
     console.log(key);
51
   }
34
   }
52
 
35
 
36
+  console.log(props.location)
37
+
53
   return (
38
   return (
54
     <Tabs defaultActiveKey="1" onChange={tabsCallback}>
39
     <Tabs defaultActiveKey="1" onChange={tabsCallback}>
55
       <TabPane tab="基本信息" key="1">
40
       <TabPane tab="基本信息" key="1">
56
-        <Base />
57
-      </TabPane>
58
-      <TabPane tab="图片" key="2">
59
-        <ImageSet building={{ buildingId: '159fd19bb973b6972c10fbebf07ddeb1' }} />
41
+        <Base building={{ buildingId: props.location.query && props.location.query.id }} />
60
       </TabPane>
42
       </TabPane>
43
+      {
44
+        props.location.query.id &&
45
+        <TabPane tab="图片" key="2">
46
+          {/* '159fd19bb973b6972c10fbebf07ddeb1' */}
47
+          <ImageSet building={{ buildingId: props.location.query && props.location.query.id }} />
48
+        </TabPane>
49
+      }
61
     </Tabs>
50
     </Tabs>
62
   )
51
   )
63
 }
52
 }

+ 87
- 8
src/pages/building/list/index.jsx 查看文件

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
-import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert } from 'antd';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, notification, Modal } from 'antd';
3
 import moment from 'moment';
3
 import moment from 'moment';
4
 import request from '../../../utils/request';
4
 import request from '../../../utils/request';
5
 import apis from '../../../services/apis';
5
 import apis from '../../../services/apis';
13
 
13
 
14
 const tempDate = [{ code: 's101' }]
14
 const tempDate = [{ code: 's101' }]
15
 
15
 
16
+function openNotificationWithIcon(type, message) {
17
+  notification[type]({
18
+    message,
19
+    description:
20
+      '',
21
+  });
22
+}
23
+
16
 /**
24
 /**
17
  *卡片
25
  *卡片
18
  *
26
  *
21
 function CartBody(props) {
29
 function CartBody(props) {
22
   const { data } = props
30
   const { data } = props
23
 
31
 
32
+
33
+  function toEdi(record) {
34
+    router.push({
35
+      pathname: '/building/list/add',
36
+      query: {
37
+        id: record.buildingId,
38
+      },
39
+    })
40
+  }
41
+
42
+  /**
43
+   *发布 取消 发布
44
+   *
45
+   * @param {*} record
46
+   */
47
+  function pulicAndUnPulic(record) {
48
+    const modal = Modal.confirm();
49
+    const buidingStatus = record.status === 1 ? 2 : 1
50
+    const title = record.status === 1 ? '确认取消发布此数据?' : '确认发布此数据?'
51
+
52
+    modal.update({
53
+      content: title,
54
+      okText: '确认',
55
+      cancelText: '关闭',
56
+      onOk: () => {
57
+        request({ ...apis.building.updateStatus, data: { id: record.buildingId, status: buidingStatus } }).then(() => {
58
+          openNotificationWithIcon('success', '操作成功')
59
+          props.onSuccess()
60
+        }).catch(err => {
61
+          openNotificationWithIcon('error', err.message)
62
+        })
63
+
64
+        modal.destroy();
65
+      },
66
+      onCancel: () => {
67
+        modal.destroy();
68
+      },
69
+    });
70
+  }
71
+
72
+  /**
73
+   *删除楼盘
74
+   *
75
+   * @param {*} record
76
+   */
77
+  function deleteBuilding(record) {
78
+    const { url, method } = apis.building.deleteBuilding
79
+    const tempUrl = url.substring(0, url.lastIndexOf('id')).concat(record.buildingId)
80
+
81
+    const modal = Modal.confirm();
82
+    modal.update({
83
+      content: '确定删除此楼盘?',
84
+      okText: '确认',
85
+      cancelText: '关闭',
86
+      onOk: () => {
87
+        request({ url: tempUrl, method }).then(() => {
88
+          openNotificationWithIcon('success', '操作成功')
89
+          props.onSuccess()
90
+        }).catch(err => {
91
+          openNotificationWithIcon('error', err.message)
92
+        })
93
+
94
+        modal.destroy();
95
+      },
96
+      onCancel: () => {
97
+        modal.destroy();
98
+      },
99
+    });
100
+  }
101
+
24
   return (
102
   return (
25
           <Card
103
           <Card
26
             hoverable
104
             hoverable
31
             <p className={Styles.cardText}>
109
             <p className={Styles.cardText}>
32
               <span className={Styles.title}>楼盘编号</span>
110
               <span className={Styles.title}>楼盘编号</span>
33
               <span >:{ data.code }</span>
111
               <span >:{ data.code }</span>
34
-              <span className={Styles.ediText}>
112
+              <span className={Styles.ediText} onClick={() => toEdi(data)}>
35
                 编辑
113
                 编辑
36
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
114
                 <Icon type="form" style={{ color: '#C0C4CC', marginLeft: '10px' }} />
37
               </span>
115
               </span>
52
             </p>
130
             </p>
53
             <p className={Styles.cardItem}>
131
             <p className={Styles.cardItem}>
54
               <span className={Styles.title}>发布状态</span>
132
               <span className={Styles.title}>发布状态</span>
55
-              <span >:{ data.status === '1' ? '已发布' : '未发布' }</span>
133
+              <span >:{ data.status === 1 ? '已发布' : '未发布' }</span>
56
             </p>
134
             </p>
57
             <p className={Styles.cardItem}>
135
             <p className={Styles.cardItem}>
58
               <span className={Styles.title}>录入时间</span>
136
               <span className={Styles.title}>录入时间</span>
59
               <span >:{ data.createDate }</span>
137
               <span >:{ data.createDate }</span>
60
             </p>
138
             </p>
61
             <p style={{ margin: '15px 0', position: 'relative', fontSize: '18px' }}>
139
             <p style={{ margin: '15px 0', position: 'relative', fontSize: '18px' }}>
62
-              <span style={{ color: '#1990FF' }}>
63
-                取消发布
140
+              <span style={{ color: '#1990FF' }} onClick={() => pulicAndUnPulic(data)}>
141
+                {/* 已发布的时候,需要显示取消发布的字样 */}
142
+                { data.status === 1 ? '取消发布' : '发布' }
64
                 <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
143
                 <Icon type="close-circle" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
65
               </span>
144
               </span>
66
               <span style={{
145
               <span style={{
67
                 color: '#FF4A4A', position: 'absolute', right: '0',
146
                 color: '#FF4A4A', position: 'absolute', right: '0',
68
-              }} >
147
+              }} onClick={() => deleteBuilding(data)}>
69
                 删除
148
                 删除
70
                 <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
149
                 <Icon type="rest" style={{ color: '#C0C4CC', marginLeft: '8px' }} />
71
               </span>
150
               </span>
213
       {/* 卡片内容,显示楼盘项目  */}
292
       {/* 卡片内容,显示楼盘项目  */}
214
       <Row style={{ padding: ' 0 10px' }}>
293
       <Row style={{ padding: ' 0 10px' }}>
215
         {
294
         {
216
-          dataSource.records.map((item, index) => (
295
+          dataSource.records.map((item, _) => (
217
               <Col span={8}>
296
               <Col span={8}>
218
-                <CartBody data={item} key={item.buildingId}/>
297
+                <CartBody data={item} key={item.buildingId} onSuccess={getList}/>
219
               </Col>
298
               </Col>
220
             ))
299
             ))
221
         }
300
         }

+ 16
- 0
src/services/apis.js 查看文件

22
       method: 'GET',
22
       method: 'GET',
23
       url: `${prefix}/buildinglist`,
23
       url: `${prefix}/buildinglist`,
24
     },
24
     },
25
+    updateStatus: {
26
+      method: 'PUT',
27
+      url: `${prefix}/building/update/status`,
28
+    },
29
+    addBuilding: {
30
+      method: 'POST',
31
+      url: `${prefix}/building/add`,
32
+    },
33
+    buildingGetById: {
34
+      method: 'GET',
35
+      url: `${prefix}/buildingSelectId/id`,
36
+    },
37
+    deleteBuilding: {
38
+      method: 'DELETE',
39
+      url: `${prefix}/building/delete/id`,
40
+    },
25
     buildingApartment: {
41
     buildingApartment: {
26
       method: 'GET',
42
       method: 'GET',
27
       url: `${prefix}/buildingApartment/buildingId/id`,
43
       url: `${prefix}/buildingApartment/buildingId/id`,