zlisen hace 3 años
padre
commit
0f5da5fa54

+ 3
- 3
src/components/XForm/ImageListUpload.jsx Ver fichero

@@ -2,7 +2,7 @@ import React from 'react';
2 2
 import { Upload, Icon, Modal } from 'antd';
3 3
 import './style.less';
4 4
 import { uploaderProps } from '../../utils/upload';
5
-
5
+import { getImgURL } from '@/utils/image';
6 6
 /**
7 7
  * unlimited  属性表示上传图片无限制
8 8
  * 例子: <ImageListUpload unlimited/>
@@ -15,7 +15,7 @@ class ImageListUpload extends React.Component {
15 15
   };
16 16
 
17 17
   getFileList = () => {
18
-    return (this.props.value || []).map((img, inx) => ({ uid: inx, url: img, status: 'done' }))
18
+    return (this.props.value || []).map((img, inx) => ({ uid: inx, url: getImgURL(img), status: 'done' }))
19 19
   }
20 20
 
21 21
   handleCancel = () => this.setState({ previewVisible: false });
@@ -88,7 +88,7 @@ class ImageListUpload extends React.Component {
88 88
           {(this.props.unlimited && uploadButton) || ((fileList || images).length >= 8 ? null : uploadButton)}
89 89
         </Upload>
90 90
         <Modal visible={previewVisible} footer={null} onCancel={this.handleCancel}>
91
-          <img alt="example" style={{ width: '100%' }} src={previewImage} />
91
+          <img alt="example" style={{ width: '100%' }} src={getImgURL(previewImage)} />
92 92
         </Modal>
93 93
       </div>
94 94
     );

+ 7
- 4
src/pages/activity/SignupActivity/detail.jsx Ver fichero

@@ -13,7 +13,7 @@ import poster1 from '@/assets/poster1.png';
13 13
 import poster2 from '@/assets/poster2.png';
14 14
 import xiaochengxu from '@/assets/xiaochengxu.png';
15 15
 import AuthButton from '@/components/AuthButton';
16
-import Prompt from 'umi/prompt';
16
+import { getImgURL } from '@/utils/image';
17 17
 
18 18
 const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
19 19
 const { TextArea } = Input;
@@ -117,17 +117,20 @@ const BasicForm = props => {
117 117
           })(<BuildSelect disabled />)}
118 118
         </Form.Item>
119 119
         <Form.Item label="活动封面图1">
120
-          <img src={detailData.listImgUrl} height="210px" width="375px" />
120
+          <img src={getImgURL(detailData.listImgUrl)} height="210px" width="375px" />
121 121
         </Form.Item>
122 122
         <Form.Item label="活动封面图2">
123
-          <img src={detailData.bannerListImg} height="125px" width="375px" />
123
+          <img src={getImgURL(detailData.bannerListImg)} height="125px" width="375px" />
124 124
         </Form.Item>
125 125
         <Form.Item label="活动详情主图">
126
-          <img src={detailData.imgUrl} height="300px" width="375px" />
126
+          <img src={getImgURL(detailData.imgUrl)} height="300px" width="375px" />
127 127
         </Form.Item>
128 128
         <Form.Item label="活动标题">
129 129
           <span>{detailData.title}</span>
130 130
         </Form.Item>
131
+        <Form.Item label="副标题">
132
+          <span>{detailData.halfTitle}</span>
133
+        </Form.Item>
131 134
         <Form.Item label="活动时间">
132 135
           <span>{`${moment(detailData.startDate).format('YYYY-MM-DD HH:mm')} —— ${moment(detailData.endDate).format('YYYY-MM-DD HH:mm')}`}</span>
133 136
         </Form.Item>

+ 14
- 4
src/pages/activity/SignupActivity/edit/Basic.jsx Ver fichero

@@ -30,7 +30,7 @@ const BasicForm = props => {
30 30
     setIsEnlist(e.target.value);
31 31
   };
32 32
 
33
-  const { dynamicId } = props;
33
+  const { dynamicId,type } = props;
34 34
 
35 35
   // 查询详情
36 36
   const getDynamicData = dynamicId => {
@@ -103,7 +103,7 @@ const BasicForm = props => {
103 103
             message.info('活动人数必须大于已报名人数');
104 104
             return;
105 105
           }
106
-
106
+          values.type = type
107 107
           values.dynamicId = dynamicId;
108 108
           request({ ...apis.activity.update, data: values })
109 109
             .then(data => {
@@ -212,6 +212,16 @@ const BasicForm = props => {
212 212
             ],
213 213
           })(<Input />)}
214 214
         </Form.Item>
215
+        <Form.Item label="活动副标题">
216
+          {getFieldDecorator('halfTitle', {
217
+            rules: [
218
+              {
219
+                required: true,
220
+                message: '请输入活动副标题',
221
+              },
222
+            ],
223
+          })(<Input />)}
224
+        </Form.Item>
215 225
         <Form.Item label="活动时间">
216 226
           {getFieldDecorator('activityTime', {
217 227
             rules: [
@@ -247,7 +257,7 @@ const BasicForm = props => {
247 257
             ],
248 258
           })(<Input type="number" />)}
249 259
         </Form.Item>
250
-        <Form.Item label="用户携带人数" help="每个用户最多可携带参与活动的人数">
260
+        {/* <Form.Item label="用户携带人数" help="每个用户最多可携带参与活动的人数">
251 261
           {getFieldDecorator('maxEnlistByPerson', {
252 262
             rules: [
253 263
               {
@@ -256,7 +266,7 @@ const BasicForm = props => {
256 266
               },
257 267
             ],
258 268
           })(<Input type="number" min={1} />)}
259
-        </Form.Item>
269
+        </Form.Item> */}
260 270
         <Form.Item label="活动详情">{getFieldDecorator('desc')(<Wangedit />)}</Form.Item>
261 271
         <Form.Item label="报名时间">
262 272
           {getFieldDecorator('signupTime', {

+ 3
- 1
src/pages/activity/SignupActivity/edit/index.jsx Ver fichero

@@ -3,6 +3,8 @@ import { Radio, Card } from 'antd';
3 3
 import Basic from './Basic';
4 4
 import Poster from './Poster';
5 5
 import Share from './Share';
6
+
7
+const type= 'dymic'
6 8
 /**
7 9
  *
8 10
  *
@@ -23,7 +25,7 @@ const Edit = props => {
23 25
         </Radio.Group>
24 26
       </div>
25 27
       <div>
26
-        {tab === 'basic' && <Basic dynamicId={dynamicId} />}
28
+        {tab === 'basic' && <Basic dynamicId={dynamicId} type={type}/>}
27 29
         {tab === 'poster' && <Poster dynamicId={dynamicId} />}
28 30
         {tab === 'share' && <Share dynamicId={dynamicId} />}
29 31
       </div>

+ 3
- 0
src/pages/activity/SignupActivity/index.jsx Ver fichero

@@ -24,6 +24,8 @@ import apis from '@/services/apis';
24 24
 import request from '@/utils/request';
25 25
 import QueryTable from '@/components/QueryTable';
26 26
 
27
+const type= 'dymic'
28
+
27 29
 const SignupActivity = props => {
28 30
   const ref = useRef();
29 31
 
@@ -320,6 +322,7 @@ const SignupActivity = props => {
320 322
       columns={columns}
321 323
       postData={data => {
322 324
         data.time && (data.time = `${moment(data.time).format('YYYY-MM-DDT00:00:00.000')}Z`);
325
+        data.type=type
323 326
         return data;
324 327
       }}
325 328
       actionRender={actionRender}

+ 90
- 23
src/pages/building/Edit/AlbumList/Form.jsx Ver fichero

@@ -1,39 +1,106 @@
1
-import React from 'react'
2
-import { Button, Form, Input, Select } from 'antd'
3
-import ImageListUpload from '@/components/XForm/ImageListUpload'
4
-import ModalForm from '../components/ModalForm'
1
+import React, { useState, useEffect } from 'react';
2
+import { Button, Form, Input, Select,message } from 'antd';
3
+import ImageListUpload from '@/components/XForm/ImageListUpload';
4
+import request, { fetch, apis } from '@/utils/request';
5
+import ModalForm from '../components/ModalForm';
5 6
 
6
-const AMForm = (props) => {
7
-  const { visible, onCancel, form } = props
8
-  const { getFieldDecorator } = form
7
+const AMForm = props => {
8
+    const { visible, onCancel, form, formData, onSuccess,buildingId } = props;
9
+  const { getFieldDecorator, setFieldsValue, resetFields, validateFields } = form;
10
+
11
+  // const { visible, onCancel, form, formData, onSuccess,buildingId } = props;
12
+  // const { getFieldDecorator, setFieldsValue, resetFields, validateFields } = form;
13
+
14
+  const [loading, setLoading] = useState(false);
15
+
16
+  const handleSubmit = e => {
17
+    e.preventDefault();
18
+    validateFields((err, values) => {
19
+      console.log(values,'handleSubmit')
20
+      if (err) {
21
+        console.error(err);
22
+        return;
23
+      }
24
+      // function submitData(data) {
25
+      //   if (buildingId === '' || buildingId === undefined) {
26
+      //     return
27
+      //   }
28
+      //   if (data.img) {
29
+      //       // 如果是 名称 和 图片一起编辑,就穿最新的图片
30
+      //     data.img = data.img.map((item, index) => ({ imgType: 'aparment', url: item, orderNo: index }))
31
+      //   } else {
32
+      //       // 如果是 名称 和 图片一起编辑,就穿最新的图片
33
+      //     data.img = visibleData.apartment.buildingImgList
34
+      //   }
35
+      //   data.buildingId = buildingId;
36
+      //   data.apartmentType = 'photo'
37
+      //   const api = (data.apartmentId !== undefined && data.apartmentId !== '') ? apis.building.buildingApartmentUpdate : apis.building.buildingApartmentAdd;
38
+    
39
+      //   // 网路请求
40
+      //   request({ ...api, data: { ...data } }).then(() => {
41
+      //     // eslint-disable-next-line no-unused-expressions
42
+      //     openNotificationWithIcon('success', '操作成功')
43
+      //     handleCancel()
44
+      //     props.onSuccess()
45
+      //     // this.setState({ visibleData: { visible: false, apartmentId: '', buildingId: '' } }, () => console.log('回调:', this.state.visibleData))
46
+      //   }).catch(err => {
47
+      //     // eslint-disable-next-line no-unused-expressions
48
+      //     openNotificationWithIcon('error', err)
49
+      //   })
50
+      // }
51
+
52
+      setLoading(true);
53
+      values.buildingId=buildingId
54
+      values.apartmentType = 'photo'
55
+      values.img = values.img.map((item, index) => ({ imgType: 'aparment', url: item, orderNo: index }))
56
+
57
+      console.log(values,'values')
58
+      request({ ...apis.building.buildingApartmentAdd,data: { ...values }, })
59
+        .then(res => {
60
+          setLoading(false);
61
+          message.success('操作成功');
62
+          onSuccess(res);
63
+        })
64
+        .catch(err => {
65
+          setLoading(false);
66
+          console.error(err);
67
+        });
68
+    });
69
+  };
70
+
71
+  useEffect(() => {
72
+    resetFields();
73
+    // if (formData?.buildingImgList) {
74
+    //   formData.img = formData.buildingImgList[0].url;
75
+    // }
76
+    setFieldsValue(formData || {});
77
+  }, [formData]);
9 78
 
10 79
   return (
11
-    <ModalForm
12
-      title="相册设置"
13
-      visible={visible}
14
-      onCancel={onCancel}
15
-    >
80
+    <ModalForm title="相册设置" visible={visible} onCancel={onCancel} modalProps={{ destroyOnClose: true }}  onSubmit={handleSubmit}>
16 81
       <Form.Item label="相册名称">
17 82
         {getFieldDecorator('apartmentName', {
18 83
           rules: [
19 84
             { required: true, message: '请填写相册名称' },
20 85
             { max: 10, message: '相册名称不超过10个字符' },
21 86
           ],
22
-        })(<Input placeholder="相册名称不超过10个字符"/>)}
87
+        })(<Input placeholder="相册名称不超过10个字符" />)}
23 88
       </Form.Item>
24 89
       <Form.Item label="相册图片" help="建议图片尺寸750*600,比例5:4,格式:jpg">
25
-      {getFieldDecorator('img', {
90
+        {getFieldDecorator('img', {
26 91
           rules: [{ required: true, message: '请上传相册图片' }],
27
-      })(
28
-        <ImageListUpload />,
29
-      )}
92
+        })(<ImageListUpload />)}
30 93
       </Form.Item>
31
-      <Form.Item label=" " colon={false} style={{marginTop: '2em'}}>
32
-        <Button style={{marginLeft: '4em'}} type="primary" htmlType="submit">保存</Button>
33
-        <Button style={{marginLeft: '2em'}} onClick={props.onCancel}>取消</Button>
94
+      <Form.Item label=" " colon={false} style={{ marginTop: '2em' }}>
95
+        <Button  loading={loading} style={{ marginLeft: '4em' }} type="primary" htmlType="submit">
96
+          保存
97
+        </Button>
98
+        <Button style={{ marginLeft: '2em' }} onClick={props.onCancel}>
99
+          取消
100
+        </Button>
34 101
       </Form.Item>
35 102
     </ModalForm>
36
-  )
37
-}
103
+  );
104
+};
38 105
 
39
-export default Form.create({})(AMForm)
106
+export default Form.create({})(AMForm);

+ 47
- 23
src/pages/building/Edit/AlbumList/List.jsx Ver fichero

@@ -1,30 +1,54 @@
1
-import React from 'react'
2
-import { Button, Collapse, Popconfirm } from 'antd'
1
+import React, { useEffect, useState } from 'react';
2
+import { Button, Collapse, Popconfirm } from 'antd';
3
+import ImageListUpload from '@/components/XForm/ImageListUpload';
3 4
 
4 5
 const { Panel } = Collapse;
5 6
 
6
-const Extra = (props) => (
7
-  <>
8
-    <Button type="link" size="small" onClick={props.onRename}>重命名</Button>
9
-    <Popconfirm
10
-      title="Are you sure delete this task?"
11
-      onConfirm={props.onDelete}
12
-    >
13
-      <Button type="link" size="small" style={{color: 'red'}}>删除</Button>
14
-    </Popconfirm>    
15
-  </>
16
-)
7
+const ImageList = props => {
8
+  const { data } = props;
9
+  const [imageList, setImageList] = useState([]);
17 10
 
18
-export default (props) => {
11
+  function getImgUrl() {
12
+    return (data.buildingImgList || []).map(item => item.url);
13
+  }
14
+
15
+  useEffect(() => {
16
+    setImageList(getImgUrl());
17
+  }, [data]);
18
+
19
+  return <ImageListUpload value={imageList} onChange={e => console.log(e, 'onChange')} unlimited />;
20
+};
21
+
22
+export default props => {
23
+  const { dataList = [] } = props;
24
+
25
+  const Extra = item => (
26
+    <>
27
+      <Button type="link" size="small" onClick={props.onRename}>
28
+        重命名
29
+      </Button>
30
+      {/* <Popconfirm title="Are you sure delete this task?" onConfirm={props.onDelete}> */}
31
+      <Button
32
+        type="link"
33
+        size="small"
34
+        style={{ color: 'red' }}
35
+        onClick={e =>{ e.stopPropagation(),props.onDelete(item)} }
36
+      >
37
+        删除
38
+      </Button>
39
+      {/* </Popconfirm> */}
40
+    </>
41
+  );
19 42
 
20 43
   return (
21
-    <Collapse defaultActiveKey={['1']} expandIconPosition="right" style={{marginTop: '2em'}}>
22
-      <Panel header="This is panel header 1" key="1" extra={<Extra />}>
23
-        <div>123</div>
24
-      </Panel>
25
-      <Panel header="This is panel header 2" key="2" extra={<Extra />}>
26
-        <div>456</div>
27
-      </Panel>
44
+    <Collapse defaultActiveKey={['0']} expandIconPosition="right" style={{ marginTop: '2em' }}>
45
+      {dataList.map((row, index) => {
46
+        return (
47
+          <Panel header={row.apartmentName} key={index} extra={Extra(row)}>
48
+            <ImageList data={row}></ImageList>
49
+          </Panel>
50
+        );
51
+      })}
28 52
     </Collapse>
29
-  )
30
-}
53
+  );
54
+};

+ 107
- 11
src/pages/building/Edit/AlbumList/index.jsx Ver fichero

@@ -1,18 +1,114 @@
1
-import React, { useState } from 'react'
2
-import { Button } from 'antd'
3
-import Form from './Form'
4
-import List from './List'
1
+import React, { useState, useEffect, useRef } from 'react';
2
+import { Button, Modal,message } from 'antd';
3
+import request, { apis } from '@/utils/request';
4
+import Form from './Form';
5
+import List from './List';
5 6
 
6
-export default (props) => {
7
-  const [visible, setVisible] = useState(false)
7
+export default props => {
8
+  const [visible, setVisible] = useState(false);
9
+  const { history } = props;
10
+  const { query } = history.location;
11
+  const { id } = query;
8 12
 
13
+  const [loading, setLoading] = useState(false);
14
+  const [list, setList] = useState([]);
15
+  const albumRef = useRef();
16
+
17
+  const getList = () => {
18
+    // const urlData = { id };
19
+    // const params = { apartmentType: 'apart' };
20
+
21
+    setLoading(true);
22
+
23
+    request({
24
+      ...apis.building.buildingApartment,
25
+      urlData: { id },
26
+      params: { apartmentType: 'photo' },
27
+    })
28
+      .then(res => {
29
+        setList(res);
30
+        setLoading(false);
31
+      })
32
+      .catch(err => {
33
+        console.error(err.message || err);
34
+        setLoading(false);
35
+      });
36
+  };
37
+
38
+  const handleEdit = record => {
39
+    albumRef.current = record;
40
+    setVisible(true);
41
+  };
42
+
43
+  function handleDelete(record) {
44
+    Modal.confirm({
45
+      title: '确认删除当前相册',
46
+      // content: 'Bla bla ...',
47
+      okText: '确认',
48
+      cancelText: '取消',
49
+      onOk: () => {
50
+        request({ ...apis.building.buildingApartmentDelete, urlData: { id: record.apartmentId } })
51
+          .then(() => {
52
+            console.log('删除成功')
53
+            message.success('删除成功');
54
+            getList();
55
+          })
56
+          .catch(err => {
57
+            console.log('删除失败')
58
+          });
59
+      },
60
+    });
61
+  }
62
+
63
+  // const handleDelete = record => {
64
+  //   const urlData = { id: record.apartmentId };
65
+
66
+  //   setLoading(true);
67
+  //   deleteData({ urlData })
68
+  //     .then(() => {
69
+  //       getList();
70
+  //       message.success('删除成功');
71
+  //       setLoading(false);
72
+  //     })
73
+  //     .catch(err => {
74
+  //       console.error(err.message || err);
75
+  //       setLoading(false);
76
+  //     });
77
+  // };
78
+
79
+  const handleSuccess = () => {
80
+    getList();
81
+    setVisible(false);
82
+  };
83
+
84
+  const onRename = () => {
85
+    getList();
86
+    setVisible(false);
87
+  };
88
+
89
+  useEffect(() => {
90
+    getList();
91
+  }, [id]);
9 92
   return (
10 93
     <div>
11 94
       <div>
12
-        <Button type="primary" onClick={() => setVisible(true)}>新增户型</Button>
95
+        <Button type="primary" onClick={() => setVisible(true)}>
96
+          新增相册
97
+        </Button>
13 98
       </div>
14
-      <Form visible={visible} onCancel={() => setVisible(false)} />
15
-      <List />
99
+      <Form
100
+        visible={visible}
101
+        buildingId={id}
102
+        onCancel={() => setVisible(false)}
103
+        onSuccess={() => handleSuccess()}
104
+      />
105
+      <List
106
+        loading={loading}
107
+        dataList={list}
108
+        onEdit={handleEdit}
109
+        onRename={onRename}
110
+        onDelete={handleDelete}
111
+      />
16 112
     </div>
17
-  )
18
-}
113
+  );
114
+};

+ 0
- 1
src/pages/building/Edit/Apartment/Form.jsx Ver fichero

@@ -103,7 +103,6 @@ const AMForm = props => {
103 103
       formData.img = formData.buildingImgList[0].url;
104 104
     }
105 105
     setFieldsValue(formData || {});
106
-    setFieldsValue(formData || {});
107 106
   }, [formData]);
108 107
 
109 108
   return (

+ 8
- 2
src/pages/building/Edit/Basic/index.jsx Ver fichero

@@ -1,5 +1,5 @@
1 1
 import React, { useState } from 'react'
2
-import { Button, Spin, DatePicker, Form, Input, InputNumber, Radio, notification, Select } from 'antd'
2
+import { Button, Spin, DatePicker, Form, Input, InputNumber, Radio, notification, Select,Switch} from 'antd'
3 3
 import FileUpload from '@/components/XForm/FileUpload'
4 4
 import ImageUpload from '@/components/XForm/ImageUpload'
5 5
 import ImageListUpload from '@/components/XForm/ImageListUpload'
@@ -23,7 +23,7 @@ const fullWidth= { width: '100%' }
23 23
 const Item = Form.Item
24 24
 
25 25
 const BuildingBasic = React.forwardRef((props, ref) => {
26
-  const { form, history } = props;
26
+  const { form, history,setMarketingCode } = props;
27 27
   const { getFieldDecorator, getFieldValue, setFieldsValue } = form;
28 28
   const { query } = history.location;
29 29
   const { id } = query;
@@ -49,6 +49,7 @@ const BuildingBasic = React.forwardRef((props, ref) => {
49 49
     initPois(res.mapJson)
50 50
     initArrounds(res)
51 51
     initForm(form, res)
52
+    setMarketingCode(res.marketingCode)
52 53
   })
53 54
   
54 55
   // 视频文件上传前 回调
@@ -139,6 +140,11 @@ const BuildingBasic = React.forwardRef((props, ref) => {
139 140
             rules: [{ required: true, message: '请选择项目类型' }],
140 141
           })(<BuildingType />)}
141 142
         </Form.Item>
143
+        <Form.Item label="是否文旅商办" help="是否将本项目归纳在【首页-文旅商办】中">
144
+          {getFieldDecorator('isCommerce', {
145
+            rules: [{ required: true, message: '请选择项目类型' }],
146
+          })(<Switch />)}
147
+        </Form.Item>
142 148
         <Form.Item label="列表均价" help="项目列表展示价格,示例:约10000元/㎡、约1000万元/套起">
143 149
           {getFieldDecorator('price')(<Input />)}
144 150
         </Form.Item>

+ 70
- 20
src/pages/building/Edit/News/Form.jsx Ver fichero

@@ -1,45 +1,95 @@
1
-import React from 'react'
2
-import { Button, Form, Input, DatePicker } from 'antd'
3
-import ModalForm from '../components/ModalForm'
1
+import React, { useState, useEffect } from 'react';
2
+import { Button, Form, Input, DatePicker, notification } from 'antd';
3
+import ModalForm from '../components/ModalForm';
4
+import request from '@/utils/request';
5
+import apis from '@/services/apis';
6
+import moment from 'moment';
4 7
 
5
-const fullWidth = { width: '100%' }
8
+const fullWidth = { width: '100%' };
6 9
 
7
-const AMForm = (props) => {
8
-  const { visible, onCancel, form } = props
9
-  const { getFieldDecorator } = form
10
+const AMForm = props => {
11
+  const { visibleData, onCancel, form, panoramaList, onSuccess } = props;
12
+  const { visible, data } = visibleData;
13
+  const { getFieldDecorator, setFieldsValue, resetFields, validateFields } = form;
14
+
15
+  useEffect(() => {
16
+    if (data) {
17
+      console.log(data, '-----------------');
18
+      data.trendTime=moment(data.trendTime)
19
+      setFieldsValue(data);
20
+    }
21
+  }, [data]);
22
+
23
+  function submitData(e) {
24
+    e.preventDefault();
25
+    validateFields((err, values) => {
26
+      if (err) {
27
+        console.error(err);
28
+        return;
29
+      }
30
+
31
+      values.buildingId = props.buildingId;
32
+      // 网路请求
33
+      if (data?.trendId) {
34
+        request({ ...apis.building.putTrend, urlData: {id:data?.trendId}, data: { ...values } })
35
+          .then(() => {
36
+            notification.success({ message: '操作成功' });
37
+            onSuccess();
38
+          })
39
+          .catch(err => {
40
+            notification.error({ message: 'err' });
41
+            props.onCancel();
42
+          });
43
+      } else {
44
+        request({ ...apis.building.addTrend, data: { ...values } })
45
+          .then(() => {
46
+            notification.success({ message: '操作成功' });
47
+            onSuccess();
48
+          })
49
+          .catch(err => {
50
+            notification.error({ message: 'err' });
51
+            props.onCancel();
52
+          });
53
+      }
54
+    });
55
+  }
10 56
 
11 57
   return (
12 58
     <ModalForm
13 59
       title="项目动态设置"
14 60
       visible={visible}
15 61
       onCancel={onCancel}
62
+      modalProps={{ destroyOnClose: true }}
63
+      onSubmit={submitData}
16 64
     >
17 65
       <Form.Item label="时间">
18
-      {getFieldDecorator('img', {
66
+        {getFieldDecorator('trendTime', {
19 67
           rules: [{ required: true, message: '请选择时间' }],
20
-      })(
21
-        <DatePicker style={fullWidth} />,
22
-      )}
68
+        })(<DatePicker style={fullWidth} />)}
23 69
       </Form.Item>
24 70
       <Form.Item label="标题">
25
-        {getFieldDecorator('apartmentName', {
71
+        {getFieldDecorator('trendTitle', {
26 72
           rules: [
27 73
             { required: true, message: '请填写标题' },
28 74
             { max: 30, message: '标题不超过30个字符' },
29 75
           ],
30
-        })(<Input placeholder="标题不超过30个字符"/>)}
76
+        })(<Input placeholder="标题不超过30个字符" />)}
31 77
       </Form.Item>
32 78
       <Form.Item label="内容">
33
-        {getFieldDecorator('marketStatus', {
79
+        {getFieldDecorator('trendContent', {
34 80
           rules: [{ required: true, message: '请填写内容' }],
35 81
         })(<Input.TextArea row={4} />)}
36 82
       </Form.Item>
37
-      <Form.Item label=" " colon={false} style={{marginTop: '2em'}}>
38
-        <Button style={{marginLeft: '4em'}} type="primary" htmlType="submit">保存</Button>
39
-        <Button style={{marginLeft: '2em'}} onClick={props.onCancel}>取消</Button>
83
+      <Form.Item label=" " colon={false} style={{ marginTop: '2em' }}>
84
+        <Button style={{ marginLeft: '4em' }} type="primary" htmlType="submit">
85
+          保存
86
+        </Button>
87
+        <Button style={{ marginLeft: '2em' }} onClick={props.onCancel}>
88
+          取消
89
+        </Button>
40 90
       </Form.Item>
41 91
     </ModalForm>
42
-  )
43
-}
92
+  );
93
+};
44 94
 
45
-export default Form.create({})(AMForm)
95
+export default Form.create({})(AMForm);

+ 32
- 21
src/pages/building/Edit/News/List.jsx Ver fichero

@@ -1,24 +1,27 @@
1
-import React from 'react'
2
-import { Button, Table } from 'antd'
1
+import React from 'react';
2
+import { Button, Table,Popconfirm  } from 'antd';
3
+import moment from 'moment'
4
+
5
+export default props => {
6
+  const { data = {}, onChangePageNum,loading } = props;
7
+  const { records=[], total, current,size } = data;
3 8
 
4
-export default (props) => {
5
-  
6 9
   const columns = [
7 10
     {
8 11
       title: '标题',
9
-      dataIndex: 'apartmentName',
10
-      key: 'apartmentName',
12
+      dataIndex: 'trendTitle',
13
+      key: 'trendTitle',
11 14
     },
12 15
     {
13 16
       title: '内容',
14
-      dataIndex: 'marketStatus',
15
-      key: 'marketStatus',
17
+      dataIndex: 'trendContent',
18
+      key: 'trendContent',
16 19
     },
17 20
     {
18 21
       title: '时间',
19
-      dataIndex: 'createDate',
20
-      key: 'createDate',
21
-      render: (_, record) => <span>{moment(record.createDate).format('YYYY-MM-DD')}</span>,
22
+      dataIndex: 'trendTime',
23
+      key: 'trendTime',
24
+      render: (_, record) => <span>{moment(record.trendTime).format('YYYY-MM-DD')}</span>,
22 25
     },
23 26
     {
24 27
       title: '操作',
@@ -26,19 +29,27 @@ export default (props) => {
26 29
       key: 'apartmentId',
27 30
       render: (_, record) => (
28 31
         <>
29
-          <Button type="link" onClick={() => props.onEdit(record)}>编辑</Button>
30
-          <Popconfirm
31
-            title="确定要进行删除操作 ?"
32
-            onConfirm={() => props.onDelete(record)}
33
-          >
34
-            <Button type="link" style={{ color: 'red' }}>删除</Button>
32
+          <Button type="link" onClick={() => props.onEdit(record)}>
33
+            编辑
34
+          </Button>
35
+          <Popconfirm title="确定要进行删除操作 ?" onConfirm={() => props.onDelete(record)}>
36
+            <Button type="link" style={{ color: 'red' }}>
37
+              删除
38
+            </Button>
35 39
           </Popconfirm>
36 40
         </>
37 41
       ),
38 42
     },
39
-  ]
43
+  ];
40 44
 
41 45
   return (
42
-    <Table columns={columns} style={{marginTop: '1em', width: '100%'}} rowKey="apartmentId" />
43
-  )
44
-}
46
+    <Table
47
+      columns={columns}
48
+      dataSource={records}
49
+      loading={loading}
50
+      pagination={{ defaultCurrent: 1, total: total, onChange: onChangePageNum, current: current, pageSize:size }}
51
+      style={{ marginTop: '1em', width: '100%' }}
52
+      rowKey="trendId"
53
+    />
54
+  );
55
+};

+ 75
- 11
src/pages/building/Edit/News/index.jsx Ver fichero

@@ -1,18 +1,82 @@
1
-import React, { useState } from 'react'
2
-import { Button } from 'antd'
3
-import Form from './Form'
4
-import List from './List'
1
+import React, { useEffect, useState } from 'react';
2
+import { Button, notification } from 'antd';
3
+import Form from './Form';
4
+import List from './List';
5 5
 
6
-export default (props) => {
7
-  const [visible, setVisible] = useState(false)
6
+import request from '@/utils/request';
7
+import apis from '@/services/apis';
8
+
9
+export default props => {
10
+  const { history } = props;
11
+  const { query } = history.location;
12
+  const { id } = query;
13
+
14
+  const [data, setData] = useState({});
15
+  const [loading, setLoading] = useState(false);
16
+  const [visible, setVisible] = useState({visible:false});
17
+
18
+  function getList(params) {
19
+    setLoading(true);
20
+    // 网路请求
21
+    request({
22
+      ...apis.building.getTrendList,
23
+
24
+      params: { ...params, buildingId: id },
25
+    })
26
+      .then(res => {
27
+        setLoading(false);
28
+        setData(res);
29
+      })
30
+      .catch(err => {
31
+        setLoading(false);
32
+        notification.error({
33
+          message: err.message,
34
+          description: '',
35
+        });
36
+      });
37
+  }
38
+
39
+  useEffect(() => {
40
+    getList({ pageNum: 1, pageSize: 10 });
41
+  }, []);
42
+
43
+  const onChangePageNum = pageNumber => {
44
+    getList({ pageNum: pageNumber, pageSize: 10 });
45
+  };
46
+
47
+  const onSuccess = () => {
48
+    setVisible({visible:false})
49
+    getList({ pageNum: 1, pageSize: 10 });
50
+  };
51
+
52
+  function onDelete(record) {
53
+    request({ ...apis.building.deleteTrend, urlData: { id: record.trendId } })
54
+      .then(res => {
55
+        notification.success({ message: '删除成功' });
56
+        getList();
57
+      })
58
+      .catch(err => {
59
+        notification.error({
60
+          message: err.message,
61
+        });
62
+      });
63
+  }
64
+
65
+  function onEdit(data) {
66
+    setVisible({visible:true,data:data});
67
+  }
68
+
69
+  
8 70
 
9 71
   return (
10 72
     <div>
11 73
       <div>
12
-        <Button type="primary" onClick={() => setVisible(true)}>新增动态</Button>
74
+        <Button type="primary" onClick={() => setVisible({visible:true})}>
75
+          新增动态
76
+        </Button>
13 77
       </div>
14
-      <Form visible={visible} onCancel={() => setVisible(false)} />
15
-      <List />
78
+      <Form visibleData={visible} buildingId={id} onCancel={() => setVisible({visible:false})} onSuccess={onSuccess} />
79
+      <List data={data} buildingId={id} loading={loading} onChangePageNum={onChangePageNum} onDelete={onDelete} onEdit={onEdit}/>
16 80
     </div>
17
-  )
18
-}
81
+  );
82
+};

+ 63
- 20
src/pages/building/Edit/OnSiteService.jsx Ver fichero

@@ -1,16 +1,57 @@
1
-import React from 'react'
2
-import { Input, Popconfirm, Table } from 'antd'
3
-import Styles from './style.less'
1
+import React, { useState, useEffect } from 'react';
2
+import { Input, Popconfirm, Table, Typography,notification } from 'antd';
3
+import request from '@/utils/request';
4
+import apis from '@/services/apis';
5
+import Styles from './style.less';
6
+import { getImgURL } from '@/utils/image';
4 7
 
5
-export default (props) => {
6
-  const handleCancel = (row) => {}
8
+const { Text } = Typography;
9
+
10
+export default props => {
11
+  const { history,marketingCode } = props;
12
+  const { query } = history.location;
13
+  const { id } = query;
14
+
15
+  const [loading, setLoading] = useState(false);
16
+  const [data, setData] = useState([]);
17
+  
18
+  function getList() {
19
+    setLoading(true);
20
+    // 网路请求
21
+    request({
22
+      ...apis.building.getMarketing,
23
+      params: { buildingId: id },
24
+    })
25
+      .then(res => {
26
+        setLoading(false);
27
+        setData(res.records);
28
+      })
29
+      .catch(err => {
30
+        setLoading(false);
31
+        notification.error({
32
+          message: err.message,
33
+          description: '',
34
+        });
35
+      });
36
+  }
37
+
38
+  useEffect(() => {
39
+    getList();
40
+  }, []);
41
+
42
+  // const getList=()=>{
43
+  //   getMarketing
44
+  // }
45
+  const handleCancel = row => {};
7 46
 
8 47
   const columns = [
9 48
     {
10 49
       title: '头像',
11
-      dataIndex: 'avatar',
12
-      key: 'avatar',
13
-      render: t => <img src={t} alt="" style={{ width: '96px', height: '96px', borderRadius: '4px' }} />,
50
+      dataIndex: 'avatarurl',
51
+      key: 'avatarurl',
52
+      render: t => (
53
+        <img src={getImgURL(t)} alt="" style={{ width: '96px', height: '96px', borderRadius: '4px' }} />
54
+      ),
14 55
     },
15 56
     {
16 57
       title: '昵称',
@@ -26,29 +67,31 @@ export default (props) => {
26 67
       title: '性别',
27 68
       dataIndex: 'sex',
28 69
       key: 'sex',
70
+      render: t => <span>{t==1?'男':t==2?'女':'未知'}</span>
71
+      
29 72
     },
30 73
     {
31 74
       title: '操作',
32 75
       key: 'action',
33 76
       render: (_, row) => (
34
-        <Popconfirm
35
-          title="确认执行取消操作?"
36
-          onConfirm={() => handleCancel(row)}
37
-        >
38
-          <a href="#" style={{color: 'red'}}>取消绑定</a>
77
+        <Popconfirm title="确认执行取消操作?" onConfirm={() => handleCancel(row)}>
78
+          <a href="#" style={{ color: 'red' }}>
79
+            取消绑定
80
+          </a>
39 81
         </Popconfirm>
40
-      )
82
+      ),
41 83
     },
42
-  ]
84
+  ];
43 85
 
44 86
   return (
45 87
     <div className={Styles['on-site-box']}>
46 88
       <div className={Styles['market-code']}>
47 89
         <div className={Styles['code-label']}>驻场编码: </div>
48
-        <div className={Styles['code-input']}><Input value={123} style={{ width: '30%' }} /></div>
90
+        <div className={Styles['code-input']}>
91
+          <Text copyable>{marketingCode}</Text>
92
+        </div>
49 93
       </div>
50
-
51
-      <Table columns={columns} bordered pagination={false} />
94
+      <Table columns={columns} dataSource={data} loading={loading} bordered pagination={false} />
52 95
     </div>
53
-  )
54
-}
96
+  );
97
+};

+ 73
- 37
src/pages/building/Edit/Panorama/Form.jsx Ver fichero

@@ -1,61 +1,97 @@
1
-import React, { useState } from 'react'
2
-import { Button, Form, Input, Select, Radio } from 'antd'
3
-import ImageUpload from '@/components/XForm/ImageUpload'
4
-import ModalForm from '../components/ModalForm'
1
+import React, { useState } from 'react';
2
+import { Button, Form, Input, Select, Radio, notification } from 'antd';
3
+import ImageUpload from '@/components/XForm/ImageUpload';
4
+import ModalForm from '../components/ModalForm';
5
+import request from '@/utils/request';
6
+import apis from '@/services/apis';
5 7
 
6
-const fullWidth = { width: '100%' }
8
+const fullWidth = { width: '100%' };
9
+const { Option } = Select;
7 10
 
8
-const AMForm = (props) => {
9
-  const { visible, onCancel, form } = props
10
-  const { getFieldDecorator } = form
11
+const AMForm = props => {
12
+  const { visible, onCancel, form, panoramaList, onSuccess } = props;
13
+  const { getFieldDecorator, setFieldsValue, resetFields, validateFields } = form;
14
+  const [panoramaType, setPanoramaType] = useState('apartment');
11 15
 
12
-  const [panoramaType, setPanoramaType] = useState('apartment')
16
+  function submitData(e) {
17
+    e.preventDefault();
18
+    validateFields((err, values) => {
19
+      if (err) {
20
+        console.error(err);
21
+        return;
22
+      }
23
+      const data = values;
24
+      data.buildingId = props.buildingId;
25
+      const api = apis.paorama.add;
26
+
27
+      // 网路请求
28
+      request({ ...api, data: { ...data } })
29
+        .then(() => {
30
+          notification.success({ message: '操作成功' });
31
+          onSuccess();
32
+        })
33
+        .catch(err => {
34
+          notification.error({ message: 'err' });
35
+          props.onCancel();
36
+        });
37
+    });
38
+  }
13 39
 
14 40
   return (
15
-    <ModalForm
16
-      title="全景设置"
17
-      visible={visible}
18
-      onCancel={onCancel}
19
-    >
41
+    <ModalForm title="全景设置" visible={visible} onCancel={onCancel} modalProps={{destroyOnClose:true}} onSubmit={submitData}>
20 42
       <Form.Item label="全景类型">
21 43
         {getFieldDecorator('panoramaType', {
22
-          rules: [{ required: true, message: '请选择全景类型' } ],
44
+          initialValue:panoramaType,
45
+          rules: [{ required: true, message: '请选择全景类型' }],
23 46
         })(
24
-          <Radio.Group onChange={(e) => setPanoramaType(e.target.value)} buttonStyle="solid">
47
+          <Radio.Group onChange={e => setPanoramaType(e.target.value)} buttonStyle="solid">
25 48
             <Radio.Button value="apartment">户型</Radio.Button>
26 49
             <Radio.Button value="building">项目</Radio.Button>
27 50
           </Radio.Group>,
28 51
         )}
29 52
       </Form.Item>
30
-      { panoramaType == "apartment" && <Form.Item label="全景内容">
31
-        {getFieldDecorator('apartmentId', {
32
-          rules: [{ required: true, message: '请选择全景内容' }],
33
-        })(
34
-          <Select placeholder="户型" style={fullWidth}>
35
-          </Select>
36
-        )}
37
-      </Form.Item>}
38
-      { panoramaType == "building" && <Form.Item label="全景内容">
39
-        {getFieldDecorator('content', {
40
-          rules: [{ required: true, message: '请输入全景内容' }],
41
-        })(<Input placeholder="请简述全景内容" />)}
42
-      </Form.Item>}
53
+      {panoramaType == 'apartment' && (
54
+        <Form.Item label="全景内容">
55
+          {getFieldDecorator('apartmentId', {
56
+            rules: [{ required: true, message: '请选择全景内容' }],
57
+          })(
58
+            <Select placeholder="户型" style={fullWidth}>
59
+              {panoramaList?.map(item => (
60
+                <Option key={item.apartmentId} value={item.apartmentId}>
61
+                  {item.apartmentName}
62
+                </Option>
63
+              ))}
64
+            </Select>,
65
+          )}
66
+        </Form.Item>
67
+      )}
68
+      {panoramaType == 'building' && (
69
+        <Form.Item label="全景内容">
70
+          {getFieldDecorator('content', {
71
+            rules: [{ required: true, message: '请输入全景内容' }],
72
+          })(<Input placeholder="请简述全景内容" />)}
73
+        </Form.Item>
74
+      )}
43 75
       <Form.Item label="选择封面" help="建议图片尺寸750px*600px,比例5:4,格式:jpg">
44
-      {getFieldDecorator('coverImg', {
76
+        {getFieldDecorator('coverImg', {
45 77
           rules: [{ required: true, message: '请上传封面图片' }],
46
-      })(<ImageUpload />)}
78
+        })(<ImageUpload />)}
47 79
       </Form.Item>
48 80
       <Form.Item label="链接地址">
49 81
         {getFieldDecorator('panoramaLink', {
50 82
           rules: [{ required: true, message: '请输入链接地址' }],
51 83
         })(<Input />)}
52 84
       </Form.Item>
53
-      <Form.Item label=" " colon={false} style={{marginTop: '2em'}}>
54
-        <Button style={{marginLeft: '4em'}} type="primary" htmlType="submit">保存</Button>
55
-        <Button style={{marginLeft: '2em'}} onClick={props.onCancel}>取消</Button>
85
+      <Form.Item label=" " colon={false} style={{ marginTop: '2em' }}>
86
+        <Button style={{ marginLeft: '4em' }} type="primary" htmlType="submit">
87
+          保存
88
+        </Button>
89
+        <Button style={{ marginLeft: '2em' }} onClick={props.onCancel}>
90
+          取消
91
+        </Button>
56 92
       </Form.Item>
57 93
     </ModalForm>
58
-  )
59
-}
94
+  );
95
+};
60 96
 
61
-export default Form.create({})(AMForm)
97
+export default Form.create({})(AMForm);

+ 31
- 15
src/pages/building/Edit/Panorama/List.jsx Ver fichero

@@ -1,20 +1,30 @@
1
-import React from 'react'
2
-import { Button, Table } from 'antd'
1
+import React from 'react';
2
+import { Button, Table, notification, Popconfirm } from 'antd';
3
+import request from '@/utils/request';
4
+import apis from '@/services/apis';
5
+import { getImgURL } from '@/utils/image';
6
+
7
+export default props => {
8
+  const { data,loading } = props;
3 9
 
4
-export default (props) => {
5
-  
6 10
   const columns = [
7 11
     {
8 12
       title: '封面图',
9 13
       dataIndex: 'coverImg',
10 14
       key: 'coverImg',
11
-      render: (x, record) => <img style={{ width: '150px', height: '120px', borderRadius: '4px' }} src={x} alt="" />,
15
+      render: (x, record) => (
16
+        <img
17
+          style={{ width: '150px', height: '120px', borderRadius: '4px' }}
18
+          src={getImgURL(x)}
19
+          alt=""
20
+        />
21
+      ),
12 22
     },
13 23
     {
14 24
       title: '类型',
15 25
       dataIndex: 'panoramaType',
16 26
       key: 'panoramaType',
17
-      render: (x, record) => <span>{x === "apartment" ? "户型" : "项目"}</span>,
27
+      render: (x, record) => <span>{x === 'apartment' ? '户型' : '项目'}</span>,
18 28
     },
19 29
     {
20 30
       title: '内容',
@@ -31,17 +41,23 @@ export default (props) => {
31 41
       dataIndex: 'apartmentId',
32 42
       key: 'apartmentId',
33 43
       render: (_, record) => (
34
-        <Popconfirm
35
-          title="确定要进行删除操作 ?"
36
-          onConfirm={() => props.onDelete(record)}
37
-        >
38
-          <Button type="link" style={{ color: 'red' }}>删除</Button>
44
+        <Popconfirm title="确定要进行删除操作 ?" onConfirm={() => props.onDelete(record)}>
45
+         
46
+          <Button type="link" style={{ color: 'red' }}>
47
+            删除
48
+          </Button>
39 49
         </Popconfirm>
40 50
       ),
41 51
     },
42
-  ]
52
+  ];
43 53
 
44 54
   return (
45
-    <Table columns={columns} style={{marginTop: '1em', width: '100%'}} rowKey="apartmentId" />
46
-  )
47
-}
55
+    <Table
56
+      columns={columns}
57
+      loading={loading}
58
+      dataSource={data}
59
+      style={{ marginTop: '1em', width: '100%' }}
60
+      rowKey="apartmentId"
61
+    />
62
+  );
63
+};

+ 82
- 11
src/pages/building/Edit/Panorama/index.jsx Ver fichero

@@ -1,18 +1,89 @@
1
-import React, { useState } from 'react'
2
-import { Button } from 'antd'
3
-import Form from './Form'
4
-import List from './List'
1
+import React, { useState, useEffect } from 'react';
2
+import { Button, notification } from 'antd';
3
+import Form from './Form';
4
+import List from './List';
5
+import request from '@/utils/request';
6
+import apis from '@/services/apis';
5 7
 
6
-export default (props) => {
7
-  const [visible, setVisible] = useState(false)
8
+export default props => {
9
+  const { history } = props;
10
+  const { query } = history.location;
11
+  const { id } = query;
12
+  const [loading, setLoading] = useState(false);
13
+  const [visible, setVisible] = useState(false);
14
+  const [data, setData] = useState([]);
15
+  const [panoramaList, setPanoramaList] = useState([]);
8 16
 
17
+  useEffect(() => {
18
+    console.log(props);
19
+    getList();
20
+    getPanoramaList();
21
+  }, [id]);
22
+
23
+  //获取户型列表
24
+  function getPanoramaList(record) {
25
+    // 网路请求
26
+    request({ ...apis.paorama.panoramaApartList, params: { buildingId: id } })
27
+      .then(res => {
28
+        setPanoramaList(res);
29
+      })
30
+      .catch(err => {
31
+        this.openNotificationWithIcon('error', err);
32
+      });
33
+  }
34
+
35
+  function getList(params) {
36
+    setLoading(true);
37
+    // 网路请求
38
+    request({
39
+      ...apis.paorama.list,
40
+      urlData: { id },
41
+      params: { ...params, apartmentType: 'apart' },
42
+    })
43
+      .then(res => {
44
+        setLoading(false);
45
+        setData(res);
46
+      })
47
+      .catch(err => {
48
+        setLoading(false);
49
+        notification.error({
50
+          message: err.message,
51
+          description: '',
52
+        });
53
+      });
54
+  }
55
+
56
+  const onSuccess = () => {
57
+    setVisible(false);
58
+    getList();
59
+  };
60
+  function onDelete(record) {
61
+    request({ ...apis.paorama.delete, urlData: { id: record.panoramaId } })
62
+      .then(res => {
63
+        notification.success({ message: '删除成功' });
64
+        getList();
65
+      })
66
+      .catch(err => {
67
+        notification.error({
68
+          message: err.message,
69
+        });
70
+      });
71
+  }
9 72
   return (
10 73
     <div>
11 74
       <div>
12
-        <Button type="primary" onClick={() => setVisible(true)}>新增全景</Button>
75
+        <Button type="primary" onClick={() => setVisible(true)}>
76
+          新增全景
77
+        </Button>
13 78
       </div>
14
-      <Form visible={visible} onCancel={() => setVisible(false)} />
15
-      <List />
79
+      <Form
80
+        visible={visible}
81
+        buildingId={id}
82
+        panoramaList={panoramaList}
83
+        onCancel={() => setVisible(false)}
84
+        onSuccess={onSuccess}
85
+      />
86
+      <List data={data} loading={loading} onDelete={onDelete} />
16 87
     </div>
17
-  )
18
-}
88
+  );
89
+};

+ 62
- 11
src/pages/building/Edit/SpecialRoom/Form.jsx Ver fichero

@@ -1,23 +1,74 @@
1
-import React from 'react'
2
-import { Button, Form, Input, DatePicker } from 'antd'
1
+import React,{useEffect} from 'react'
2
+import { Button, Form, Input, DatePicker,notification } from 'antd'
3
+import moment from 'moment'
3 4
 import ModalForm from '../components/ModalForm'
4 5
 import InputNumber from '../components/InputNumber'
5 6
 import { validMinNum } from '../utils'
7
+import request from '@/utils/request';
8
+import apis from '@/services/apis';
6 9
 
7 10
 const fullWidth = { width: '100%' }
8 11
 
9 12
 const AMForm = (props) => {
10
-  const { visible, onCancel, form } = props
11
-  const { getFieldDecorator } = form
13
+  const { visibleData, onCancel, form, panoramaList, onSuccess } = props;
14
+  const { visible, data } = visibleData;
15
+  const { getFieldDecorator, setFieldsValue, resetFields, validateFields } = form;
16
+
17
+  useEffect(() => {
18
+    if (data) {
19
+      console.log(data, '-----------------');
20
+      // data.trendTime=moment(data.trendTime)
21
+      data.time=[moment(data.startTime),moment(data.endTime)]
22
+      setFieldsValue(data);
23
+    }
24
+  }, [data]);
25
+
26
+  function submitData(e) {
27
+    e.preventDefault();
28
+    validateFields((err, values) => {
29
+      if (err) {
30
+        console.error(err);
31
+        return;
32
+      }
33
+      console.log(values, '-----------------');
34
+      values.buildingId = props.buildingId;
35
+      values.startTime = values.time[0]
36
+      values.endTime = values.time[1]
37
+      // 网路请求
38
+      if (data?.specialRoomId) {
39
+        request({ ...apis.building.putbuildingSpecialRoom, urlData: {id:data?.specialRoomId}, data: { ...values } })
40
+          .then(() => {
41
+            notification.success({ message: '操作成功' });
42
+            onSuccess();
43
+          })
44
+          .catch(err => {
45
+            notification.error({ message: 'err' });
46
+            props.onCancel();
47
+          });
48
+      } else {
49
+        request({ ...apis.building.addbuildingSpecialRoom, data: { ...values } })
50
+          .then(() => {
51
+            notification.success({ message: '操作成功' });
52
+            onSuccess();
53
+          })
54
+          .catch(err => {
55
+            notification.error({ message: 'err' });
56
+            props.onCancel();
57
+          });
58
+      }
59
+    });
60
+  }
12 61
 
13 62
   return (
14 63
     <ModalForm
15 64
       title="特价房设置"
16 65
       visible={visible}
17 66
       onCancel={onCancel}
67
+      modalProps={{ destroyOnClose: true }}
68
+      onSubmit={submitData}
18 69
     >
19 70
       <Form.Item label="房源">
20
-        {getFieldDecorator('apartmentName', {
71
+        {getFieldDecorator('roomName', {
21 72
           rules: [
22 73
             { required: true, message: '请填写房源' },
23 74
             { max: 30, message: '房源不超过30个字符' },
@@ -25,7 +76,7 @@ const AMForm = (props) => {
25 76
         })(<Input placeholder="比如 3# 15-02"/>)}
26 77
       </Form.Item>
27 78
       <Form.Item label="户型">
28
-        {getFieldDecorator('apartmentName', {
79
+        {getFieldDecorator('unitType', {
29 80
           rules: [
30 81
             { required: true, message: '请填写房源' },
31 82
             { max: 30, message: '房源不超过30个字符' },
@@ -33,7 +84,7 @@ const AMForm = (props) => {
33 84
         })(<Input placeholder="比如 三室一厅"/>)}
34 85
       </Form.Item>
35 86
       <Form.Item label="面积">
36
-        {getFieldDecorator('apartmentName', {
87
+        {getFieldDecorator('area', {
37 88
           rules: [
38 89
             { required: true, message: '请填写面积' },
39 90
             { validator: validMinNum },
@@ -41,7 +92,7 @@ const AMForm = (props) => {
41 92
         })(<InputNumber min={0} precision={0.01} step={1} placeholder="请填写建筑面积" addonAfter="㎡"/>)}
42 93
       </Form.Item>
43 94
       <Form.Item label="时间">
44
-      {getFieldDecorator('img', {
95
+      {getFieldDecorator('time', {
45 96
           rules: [{ required: true, message: '请选择时间' }],
46 97
       })(
47 98
         <DatePicker.RangePicker
@@ -52,21 +103,21 @@ const AMForm = (props) => {
52 103
       )}
53 104
       </Form.Item>
54 105
       <Form.Item label="原始价">
55
-        {getFieldDecorator('apartmentName', {
106
+        {getFieldDecorator('originalPrice', {
56 107
           rules: [
57 108
             { required: true, message: '请填写原始价' },
58 109
           ],
59 110
         })(<InputNumber min={0} precision={0.01} step={1} placeholder="请填写原始总价" addonAfter="元"/>)}
60 111
       </Form.Item>
61 112
       <Form.Item label="现价">
62
-        {getFieldDecorator('apartmentName', {
113
+        {getFieldDecorator('currentPrice', {
63 114
           rules: [
64 115
             { required: true, message: '请填写现价' },
65 116
           ],
66 117
         })(<InputNumber min={0} precision={0.01} step={1} placeholder="请填写现总价"  addonAfter="元"/>)}
67 118
       </Form.Item>
68 119
       <Form.Item label="节省价">
69
-        {getFieldDecorator('apartmentName', {
120
+        {getFieldDecorator('thriftPrice', {
70 121
           rules: [
71 122
             { required: true, message: '请填写节省价' },
72 123
           ],

+ 38
- 14
src/pages/building/Edit/SpecialRoom/List.jsx Ver fichero

@@ -1,36 +1,42 @@
1 1
 import React from 'react'
2
-import { Button, Table } from 'antd'
2
+import { Button, Table,Popconfirm } from 'antd'
3
+import TableList from '@/components/TableList';
4
+import request from '@/utils/request';
5
+import apis from '@/services/apis';
6
+import moment from 'moment';
3 7
 
4 8
 export default (props) => {
9
+  const { data = {}, onChangePageNum,loading } = props;
10
+  const { records=[], total, current,size } = data;
5 11
   
6 12
   const columns = [
7 13
     {
8 14
       title: '房源',
9
-      dataIndex: 'apartmentName',
10
-      key: 'apartmentName',
15
+      dataIndex: 'roomName',
16
+      key: 'roomName',
11 17
     },
12 18
     {
13 19
       title: '户型',
14
-      dataIndex: 'marketStatus',
15
-      key: 'marketStatus',
20
+      dataIndex: 'unitType',
21
+      key: 'unitType',
16 22
     },
17 23
     {
18 24
       title: '面积',
19
-      dataIndex: 'marketStatus',
20
-      key: 'marketStatus',
25
+      dataIndex: 'area',
26
+      key: 'area',
21 27
       render: (t) => <span>{`${t || ' -- '} ㎡`}</span>,
22 28
     },
23 29
     {
24 30
       title: '开始时间',
25
-      dataIndex: 'createDate',
26
-      key: 'createDate',
27
-      render: (_, record) => <span>{moment(record.createDate).format('YYYY-MM-DD')}</span>,
31
+      dataIndex: 'startTime',
32
+      key: 'startTime',
33
+      render: (_, record) => <span>{moment(record.startTime).format('YYYY-MM-DD')}</span>,
28 34
     },
29 35
     {
30 36
       title: '结束时间',
31
-      dataIndex: 'createDate',
32
-      key: 'createDate',
33
-      render: (_, record) => <span>{moment(record.createDate).format('YYYY-MM-DD')}</span>,
37
+      dataIndex: 'endTime',
38
+      key: 'endTime',
39
+      render: (_, record) => <span>{moment(record.endTime).format('YYYY-MM-DD')}</span>,
34 40
     },
35 41
     {
36 42
       title: '操作',
@@ -51,6 +57,24 @@ export default (props) => {
51 57
   ]
52 58
 
53 59
   return (
54
-    <Table columns={columns} style={{marginTop: '1em', width: '100%'}} rowKey="apartmentId" />
60
+    <Table
61
+    columns={columns}
62
+    dataSource={records}
63
+    loading={loading}
64
+    pagination={{ defaultCurrent: 1, total: total, onChange: onChangePageNum, current: current, pageSize:size }}
65
+    style={{ marginTop: '1em', width: '100%' }}
66
+    rowKey="specialRoomId"
67
+  />
68
+    // <Table columns={columns} style={{marginTop: '1em', width: '100%'}} rowKey="specialRoomId" />
69
+    // <TableList
70
+    //     // ref={ref}
71
+    //     rowKey="specialRoomId"
72
+    //     api={apis.building.getTrendList}
73
+    //     // params={{buildingId}}
74
+    //     // searchFields={searchFields}
75
+    //     // actionRender={actionRender}
76
+    //     style={{marginTop: '1em', width: '100%'}}
77
+    //     columns={columns}
78
+    //   />
55 79
   )
56 80
 }

+ 65
- 5
src/pages/building/Edit/SpecialRoom/index.jsx Ver fichero

@@ -1,18 +1,78 @@
1
-import React, { useState } from 'react'
1
+import React, { useState, useEffect } from 'react'
2 2
 import { Button } from 'antd'
3 3
 import Form from './Form'
4 4
 import List from './List'
5
+import request from '@/utils/request';
6
+import apis from '@/services/apis';
5 7
 
6 8
 export default (props) => {
7
-  const [visible, setVisible] = useState(false)
9
+
10
+  const { history } = props;
11
+  const { query } = history.location;
12
+  const { id } = query;
13
+
14
+  const [data, setData] = useState({});
15
+  const [loading, setLoading] = useState(false);
16
+  const [visible, setVisible] = useState({visible:false});
17
+
18
+  function getList(params) {
19
+    setLoading(true);
20
+    // 网路请求
21
+    request({
22
+      ...apis.building.getSpecialRoomList,
23
+
24
+      params: { ...params, buildingId: id },
25
+    })
26
+      .then(res => {
27
+        setLoading(false);
28
+        setData(res);
29
+      })
30
+      .catch(err => {
31
+        setLoading(false);
32
+        notification.error({
33
+          message: err.message,
34
+          description: '',
35
+        });
36
+      });
37
+  }
38
+
39
+  useEffect(() => {
40
+    getList({ pageNum: 1, pageSize: 10 });
41
+  }, []);
42
+
43
+  const onChangePageNum = pageNumber => {
44
+    getList({ pageNum: pageNumber, pageSize: 10 });
45
+  };
46
+
47
+  const onSuccess = () => {
48
+    // setVisible(false);
49
+    // getList();
50
+  };
51
+  function onDelete(record) {
52
+    // request({ ...apis.paorama.delete, urlData: { id: record.panoramaId } })
53
+    //   .then(res => {
54
+    //     notification.success({ message: '删除成功' });
55
+    //     getList();
56
+    //   })
57
+    //   .catch(err => {
58
+    //     notification.error({
59
+    //       message: err.message,
60
+    //     });
61
+    //   });
62
+  }
63
+
64
+  function onEdit(data) {
65
+    setVisible({visible:true,data:data});
66
+  }
67
+
8 68
 
9 69
   return (
10 70
     <div>
11 71
       <div>
12
-        <Button type="primary" onClick={() => setVisible(true)}>新增特价房</Button>
72
+        <Button type="primary" onClick={() => setVisible({visible:true})}>新增特价房</Button>
13 73
       </div>
14
-      <Form visible={visible} onCancel={() => setVisible(false)} />
15
-      <List />
74
+      <Form visibleData={visible} onCancel={() => setVisible({visible:false})} onSuccess={onSuccess}  />
75
+      <List data={data} buildingId={id} loading={loading} onChangePageNum={onChangePageNum} onDelete={onDelete} onEdit={onEdit}/>
16 76
     </div>
17 77
   )
18 78
 }

+ 4
- 4
src/pages/building/Edit/index.jsx Ver fichero

@@ -1,4 +1,4 @@
1
-import React from 'react'
1
+import React, {useState} from 'react'
2 2
 import { Tabs, Card } from 'antd'
3 3
 import Poster from '@/components/Poster'
4 4
 import Share from '@/components/Share'
@@ -18,7 +18,7 @@ export default (props) => {
18 18
   const { history } = props
19 19
   const { query } = history.location
20 20
   const { id } = query
21
-
21
+  const [marketingCode,setMarketingCode] = useState('')
22 22
   const target = { id, type: 'building' }
23 23
 
24 24
   return (
@@ -26,7 +26,7 @@ export default (props) => {
26 26
       <Tabs defaultActiveKey="1">
27 27
         <TabPane tab="基础信息" key="1">
28 28
           <div className={styles['tab-wrapper']} style={{maxWidth: 1000}}>
29
-            <Basic {...props} />
29
+            <Basic {...props}  setMarketingCode={(e)=>setMarketingCode(e)}/>
30 30
           </div>
31 31
         </TabPane>
32 32
         <TabPane tab="户型设置" key="2">
@@ -61,7 +61,7 @@ export default (props) => {
61 61
         </TabPane>
62 62
         <TabPane tab="驻场设置" key="10">
63 63
           <div className={styles['tab-wrapper']} style={{maxWidth: '1200px'}}>
64
-            <OnSiteService {...props} />
64
+            <OnSiteService {...props} marketingCode={marketingCode}/>
65 65
           </div>
66 66
         </TabPane>
67 67
         <TabPane tab="海报图片" key="5">

+ 1
- 0
src/pages/building/Edit/style.less Ver fichero

@@ -27,6 +27,7 @@
27 27
     .code-input {
28 28
       margin-left: 1em;
29 29
       flex: auto;
30
+      line-height: 2em
30 31
     }
31 32
   }
32 33
 }

+ 151
- 95
src/services/apis.js Ver fichero

@@ -1,7 +1,7 @@
1
-const prefix = '/api/admin'
1
+const prefix = '/api/admin';
2 2
 
3 3
 // 高德地图
4
-const amapPrefix = '/gaode_amap'
4
+const amapPrefix = '/gaode_amap';
5 5
 
6 6
 export default {
7 7
   image: {
@@ -19,7 +19,7 @@ export default {
19 19
       url: `${prefix}/qrcode`,
20 20
       method: 'POST',
21 21
       action: 'upload',
22
-    }
22
+    },
23 23
   },
24 24
   user: {
25 25
     updatePassword: {
@@ -46,40 +46,37 @@ export default {
46 46
     },
47 47
   },
48 48
   //品牌开发商
49
-  brand:{
49
+  brand: {
50 50
     //查询
51
-    list:{
52
-      method:'GET',
53
-      url:`${prefix}/brand`,
54
-      action:'admin.brand.get'
51
+    list: {
52
+      method: 'GET',
53
+      url: `${prefix}/brand`,
54
+      action: 'admin.brand.get',
55 55
     },
56 56
     //添加
57
-    addBrand:{
58
-      method:'POST',
59
-      url:`${prefix}/brand`,
60
-      action:'admin.brand.post'
57
+    addBrand: {
58
+      method: 'POST',
59
+      url: `${prefix}/brand`,
60
+      action: 'admin.brand.post',
61 61
     },
62 62
     //shanchu
63
-    deleBrand:{
64
-      method:'DELETE',
65
-      url:`${prefix}/brand/:id`,
66
-      action:'admin.brand.id.delete',
63
+    deleBrand: {
64
+      method: 'DELETE',
65
+      url: `${prefix}/brand/:id`,
66
+      action: 'admin.brand.id.delete',
67 67
     },
68 68
     // 获取详情数据
69
-    getBrand:{
70
-      method:'GET',
71
-      url:`${prefix}/brand/:id`,
72
-      action:'admin.brand.id.get',
69
+    getBrand: {
70
+      method: 'GET',
71
+      url: `${prefix}/brand/:id`,
72
+      action: 'admin.brand.id.get',
73 73
     },
74 74
     //修改
75
-    alterBrand:{
76
-      method:'PUT',
77
-      url:`${prefix}/brand/:id`,
78
-      action:'admin.brand.id.put'
79
-    }
80
-    
81
-    
82
-
75
+    alterBrand: {
76
+      method: 'PUT',
77
+      url: `${prefix}/brand/:id`,
78
+      action: 'admin.brand.id.put',
79
+    },
83 80
   },
84 81
   building: {
85 82
     getList: {
@@ -152,6 +149,55 @@ export default {
152 149
       method: 'GET',
153 150
       action: 'select',
154 151
     },
152
+    // 项目动态
153
+    getTrendList: {
154
+      url: `${prefix}/trend`,
155
+      method: 'GET',
156
+      action: 'admin.trend.get',
157
+    },
158
+    addTrend: {
159
+      url: `${prefix}/trend`,
160
+      method: 'post',
161
+      action: 'admin.trend.post',
162
+    },
163
+    deleteTrend: {
164
+      url: `${prefix}/trend/:id`,
165
+      method: 'delete',
166
+      action: 'admin.trend.id.delete',
167
+    },
168
+    putTrend: {
169
+      url: `${prefix}/trend/:id`,
170
+      method: 'put',
171
+      action: 'admin.trend.id.put',
172
+    },
173
+    //特价房
174
+    getSpecialRoomList: {
175
+      url: `${prefix}/buildingSpecialRoom`,
176
+      method: 'GET',
177
+      action: 'admin.buildingSpecialRoom.get',
178
+    },
179
+    addbuildingSpecialRoom: {
180
+      url: `${prefix}/buildingSpecialRoom`,
181
+      method: 'post',
182
+      action: 'admin.trend.post',
183
+    },
184
+    deletebuildingSpecialRoom: {
185
+      url: `${prefix}/buildingSpecialRoom/:id`,
186
+      method: 'delete',
187
+      action: 'admin.trend.id.delete',
188
+    },
189
+    putbuildingSpecialRoom: {
190
+      url: `${prefix}/buildingSpecialRoom/:id`,
191
+      method: 'put',
192
+      action: 'admin.trend.id.put',
193
+    },
194
+    getMarketing: {
195
+      url: `${prefix}/building/marketing`,
196
+      method: 'GET',
197
+      action: 'admin.building.marketing,get',
198
+    },
199
+ 
200
+    // GET /api/admin/trend/{id}
155 201
   },
156 202
   buildingType: {
157 203
     getList: {
@@ -215,7 +261,7 @@ export default {
215 261
       method: 'PUT',
216 262
       url: `${prefix}/taNews/weight`,
217 263
       action: 'admin.taNews.id.put',
218
-    }
264
+    },
219 265
   },
220 266
   newsType: {
221 267
     list: {
@@ -242,35 +288,34 @@ export default {
242 288
       method: 'GET',
243 289
       url: `${prefix}/taNewsType/:id`,
244 290
       action: 'admin.taNewsType.get',
245
-    }
291
+    },
246 292
   },
247 293
   // 帮我找房
248 294
   searchHouse: {
249 295
     //查询
250
-    list:{
296
+    list: {
251 297
       method: 'GET',
252 298
       url: `${prefix}/searchHouse`,
253 299
       action: 'admin.searchHouse.get',
254 300
     },
255 301
     //根据ID查询
256
-    IdHouse:{
257
-      method:'GET',
258
-      url:`${prefix}/searchHouse/:id`,
259
-      action:'admin.searchHouse.id.get',  
302
+    IdHouse: {
303
+      method: 'GET',
304
+      url: `${prefix}/searchHouse/:id`,
305
+      action: 'admin.searchHouse.id.get',
260 306
     },
261 307
     //修改
262
-    alterHouse:{
263
-      method:'PUT',
264
-      url:`${prefix}/searchHouse/:id`,
265
-      action:'admin.searchHouse.id.put',
308
+    alterHouse: {
309
+      method: 'PUT',
310
+      url: `${prefix}/searchHouse/:id`,
311
+      action: 'admin.searchHouse.id.put',
266 312
     },
267 313
     //回访
268
-    savingHouse:{
269
-      method:'POST',
270
-      url:`${prefix}/searchHouse`,
271
-      action:''
272
-    }
273
-
314
+    savingHouse: {
315
+      method: 'POST',
316
+      url: `${prefix}/searchHouse`,
317
+      action: '',
318
+    },
274 319
   },
275 320
 
276 321
   customer: {
@@ -359,23 +404,27 @@ export default {
359 404
       url: `${prefix}/customer/recommend/public/get/:id`,
360 405
       action: 'admin.customer.recommend.public.get.id.get',
361 406
     },
362
-    customerRecommendRecommenderExport: { // 导出数据(推荐客户)
407
+    customerRecommendRecommenderExport: {
408
+      // 导出数据(推荐客户)
363 409
       method: 'GET',
364 410
       url: `${prefix}/customer/recommend/recommender/export`,
365 411
       action: 'admin.customer.recommend.recommender.export.get',
366 412
     },
367 413
 
368
-    customerRecommendReportExport: { // 导出数据(报备客户)
414
+    customerRecommendReportExport: {
415
+      // 导出数据(报备客户)
369 416
       method: 'GET',
370 417
       url: `${prefix}/customer/recommend/report/export`,
371 418
       action: 'admin.customer.recommend.report.export.get',
372 419
     },
373
-    customerRecommendAgentsExport: { // 导出数据(经纪人)
420
+    customerRecommendAgentsExport: {
421
+      // 导出数据(经纪人)
374 422
       method: 'GET',
375 423
       url: `${prefix}/customer/recommend/agents/export`,
376 424
       action: 'admin.customer.recommend.agents.export.get',
377 425
     },
378
-    customerRecommendExport: { // 导出数据(客户列表)
426
+    customerRecommendExport: {
427
+      // 导出数据(客户列表)
379 428
       method: 'GET',
380 429
       url: `${prefix}/customer/recommend/export`,
381 430
       action: 'admin.customer.recommend.export.get',
@@ -385,7 +434,8 @@ export default {
385 434
       url: `${prefix}/customer/recommend/:id`,
386 435
       action: 'admin.customer.recommend.get',
387 436
     },
388
-    byUserIdSelectCustomer: { // 根据置业顾问查询客户
437
+    byUserIdSelectCustomer: {
438
+      // 根据置业顾问查询客户
389 439
       method: 'GET',
390 440
       url: `${prefix}/customer/list/:id`,
391 441
       action: 'admin.customer.list.get',
@@ -779,32 +829,32 @@ export default {
779 829
     },
780 830
   },
781 831
   //Course课程+
782
-  course:{
832
+  course: {
783 833
     //查询
784
-  Tablecourse:{
785
-    method:'GET',
786
-    url:`${prefix}/curriculum`,
787
-    action: 'admin.curriculum.get',
788
-  },
789
-  //根据ID查询
790
-    searchCourse:{
791
-      method:'GET',
792
-      url:`${prefix}/curriculum/:id`,
834
+    Tablecourse: {
835
+      method: 'GET',
836
+      url: `${prefix}/curriculum`,
837
+      action: 'admin.curriculum.get',
838
+    },
839
+    //根据ID查询
840
+    searchCourse: {
841
+      method: 'GET',
842
+      url: `${prefix}/curriculum/:id`,
793 843
       // action:'admin.curriculum.id.get'
794 844
       action: 'admin.curriculum.id.get',
795 845
     },
796 846
     //新增
797
-    addCourse:{
798
-      method:'POST',
847
+    addCourse: {
848
+      method: 'POST',
799 849
       // POST /api/admin/curriculum
800
-      url:`${prefix}/curriculum`,
801
-      action:'admin.curriculum.post',
850
+      url: `${prefix}/curriculum`,
851
+      action: 'admin.curriculum.post',
802 852
     },
803 853
     //修改
804
-    alterCourse:{
805
-      method:'PUT',
806
-      url:`${prefix}/curriculum/:id`,
807
-      action:'admin.curriculum.id.put'
854
+    alterCourse: {
855
+      method: 'PUT',
856
+      url: `${prefix}/curriculum/:id`,
857
+      action: 'admin.curriculum.id.put',
808 858
     },
809 859
     //deleteCourse
810 860
     deleteCourse: {
@@ -900,7 +950,7 @@ export default {
900 950
         method: 'DELETE',
901 951
         action: 'admin.miniappTheme.delete',
902 952
       },
903
-    }
953
+    },
904 954
   },
905 955
   staff: {
906 956
     taUser: {
@@ -1024,7 +1074,7 @@ export default {
1024 1074
       url: `${prefix}/channel/introduction/personNumListExport`,
1025 1075
       method: 'GET',
1026 1076
       action: 'admin.channel.introductionList.personNumListExport.get',
1027
-    }
1077
+    },
1028 1078
   },
1029 1079
   role: {
1030 1080
     getRoleList: {
@@ -1050,7 +1100,7 @@ export default {
1050 1100
     buttonAndMenuList: {
1051 1101
       url: `${prefix}/taRole/details/:id`,
1052 1102
       method: 'GET',
1053
-      action: 'admin.taRole.details.id.get'
1103
+      action: 'admin.taRole.details.id.get',
1054 1104
     },
1055 1105
     updateAuthMenu: {
1056 1106
       url: `${prefix}/updateAuthMenu`,
@@ -1205,7 +1255,7 @@ export default {
1205 1255
       url: `${prefix}/taShareRecord/verificate`,
1206 1256
       method: 'put',
1207 1257
       action: 'admin.taShareRecord.verificate.put',
1208
-    }
1258
+    },
1209 1259
   },
1210 1260
   h5Activity: {
1211 1261
     list: {
@@ -1217,7 +1267,7 @@ export default {
1217 1267
       url: `${prefix}/taDrainage`,
1218 1268
       method: 'get',
1219 1269
       action: 'admin.taDrainage.get',
1220
-    }
1270
+    },
1221 1271
   },
1222 1272
   third: {
1223 1273
     thirdPartyMiniapp: {
@@ -1275,7 +1325,7 @@ export default {
1275 1325
       method: 'DELETE',
1276 1326
       url: `${prefix}/panorama/:id`,
1277 1327
       action: 'admin.panorama.id.delete',
1278
-    }
1328
+    },
1279 1329
   },
1280 1330
   icon: {
1281 1331
     minippIconList: {
@@ -1284,8 +1334,10 @@ export default {
1284 1334
       action: 'admin.taMiniappIcon.get',
1285 1335
     },
1286 1336
   },
1287
-  amap: { // 高德地图
1288
-    webService: { // Web服务Api ---- 周边搜索
1337
+  amap: {
1338
+    // 高德地图
1339
+    webService: {
1340
+      // Web服务Api ---- 周边搜索
1289 1341
       url: `${amapPrefix}/place/around`,
1290 1342
       method: 'GET',
1291 1343
     },
@@ -1550,7 +1602,7 @@ export default {
1550 1602
       url: `${prefix}/house/batchUpdateRaiseHeat`,
1551 1603
       method: 'PUT',
1552 1604
       action: 'admin.taRaise.put',
1553
-    }
1605
+    },
1554 1606
   },
1555 1607
   taliveActivity: {
1556 1608
     taLiveShare: {
@@ -1634,7 +1686,7 @@ export default {
1634 1686
       url: `${prefix}/taContact/:id`,
1635 1687
       method: 'GET',
1636 1688
       action: 'admin.taH5Demand.get',
1637
-    }
1689
+    },
1638 1690
   },
1639 1691
   taEcontract: {
1640 1692
     taContractBusinessList: {
@@ -1732,7 +1784,6 @@ export default {
1732 1784
       url: `${prefix}/taContractTemplate/:id`,
1733 1785
       action: 'admin.getContractTemplate.get',
1734 1786
     },
1735
-
1736 1787
   },
1737 1788
   manage: {
1738 1789
     list: {
@@ -1869,53 +1920,61 @@ export default {
1869 1920
       url: `${prefix}/stats/consultant/kpi`,
1870 1921
       action: 'admin.contract.list.post',
1871 1922
     },
1872
-    totalPersons: { // 客户总计 //新增用户
1923
+    totalPersons: {
1924
+      // 客户总计 //新增用户
1873 1925
       method: 'GET',
1874 1926
       url: `${prefix}/stats/consultant/customer`,
1875 1927
       action: 'admin.contract.list.get',
1876 1928
     },
1877
-    shareNum: { // 分享次数
1929
+    shareNum: {
1930
+      // 分享次数
1878 1931
       method: 'GET',
1879 1932
       url: `${prefix}/stats/consultant/share/targets`,
1880 1933
       action: 'admin.contract.list.get',
1881 1934
     },
1882
-    visitPerson: { // 分享访问人数
1935
+    visitPerson: {
1936
+      // 分享访问人数
1883 1937
       method: 'GET',
1884 1938
       url: `${prefix}/stats/consultant/share/persons`,
1885 1939
       action: 'admin.contract.list.get',
1886 1940
     },
1887
-    visitNum: { // 分享访问次数
1941
+    visitNum: {
1942
+      // 分享访问次数
1888 1943
       method: 'GET',
1889 1944
       url: `${prefix}/stats/consultant/share/times`,
1890 1945
       action: 'admin.contract.list.get',
1891 1946
     },
1892
-    sharePersons: { // 分享拓客
1947
+    sharePersons: {
1948
+      // 分享拓客
1893 1949
       method: 'GET',
1894 1950
       url: `${prefix}/stats/consultant/share/customer`,
1895 1951
       action: 'admin.contract.list.get',
1896 1952
     },
1897
-    homePagePersons: { // 主页访问人数
1953
+    homePagePersons: {
1954
+      // 主页访问人数
1898 1955
       method: 'GET',
1899 1956
       url: `${prefix}/stats/consultant/homepage/persons`,
1900 1957
       action: 'admin.contract.list.get',
1901 1958
     },
1902
-    homePageNums: { // 主页访问次数
1959
+    homePageNums: {
1960
+      // 主页访问次数
1903 1961
       method: 'GET',
1904 1962
       url: `${prefix}/stats/consultant/homepage/times`,
1905 1963
       action: 'admin.contract.list.get',
1906 1964
     },
1907
-    chatPersons: { // 咨询数
1965
+    chatPersons: {
1966
+      // 咨询数
1908 1967
       method: 'GET',
1909 1968
       url: `${prefix}/stats/consultant/chat/persons`,
1910 1969
       action: 'admin.contract.list.get',
1911 1970
     },
1912
-    favorNum: { // 点赞数
1971
+    favorNum: {
1972
+      // 点赞数
1913 1973
       method: 'GET',
1914 1974
       url: `${prefix}/stats/consultant/favor`,
1915 1975
       action: 'admin.contract.list.get',
1916 1976
     },
1917 1977
 
1918
-
1919 1978
     buildingExport: {
1920 1979
       method: 'GET',
1921 1980
       url: `${prefix}/stats/buildingExport`,
@@ -2081,8 +2140,8 @@ export default {
2081 2140
       url: `${prefix}/orgOrder/refund/exportList`,
2082 2141
       action: 'admin.funds.orgOrder.refund.list.get',
2083 2142
     },
2084
-//     /admin/orgOrder/refund/list
2085
-// 13.导出退款订单接口:/admin/orgOrder/refund/exportList
2143
+    //     /admin/orgOrder/refund/list
2144
+    // 13.导出退款订单接口:/admin/orgOrder/refund/exportList
2086 2145
     // listConsumeOrderByCondition
2087 2146
     // /admin/orgOrder/cz/exportList
2088 2147
     // /admin/orgOrder/cz/list
@@ -2101,13 +2160,10 @@ export default {
2101 2160
   },
2102 2161
   // admin/redPacket/money/{id}
2103 2162
   institution: {
2104
-
2105 2163
     list: {
2106 2164
       method: 'GET',
2107 2165
       url: `${prefix}/institution/list`,
2108 2166
       action: 'admin.institution.list.get',
2109 2167
     },
2110
-   
2111 2168
   },
2112
-
2113
-}
2169
+};