ソースを参照

Merge commit 'b66ff350adbae9a3447e07aeada0746d30eedd9b'

weichaochao 5 年 前
コミット
1a6893e605

+ 24
- 0
config/routes.js ファイルの表示

@@ -521,6 +521,30 @@ export default [
521 521
               },
522 522
             ],
523 523
           },
524
+          {
525
+            path: '/house',
526
+            name: '在线选房',
527
+            component: '../layouts/BlankLayout',
528
+            routes: [
529
+              {
530
+                path: '/house/list',
531
+                name: '房源管理',
532
+                component: './house/list/index',
533
+              },
534
+              {
535
+                path: '/house/add',
536
+                name: '新增', 
537
+                hideInMenu: true,
538
+                component: './house/add/index',
539
+              },
540
+              {
541
+                path: '/house/edit',
542
+                name: '编辑', 
543
+                hideInMenu: true,
544
+                component: './house/edit/index',
545
+              },
546
+            ],
547
+          },
524 548
           // {
525 549
           //   path: '/miniapp',
526 550
           //   name: '小程序管理',

+ 64
- 0
src/components/HouseSelect/BlockSelect.jsx ファイルの表示

@@ -0,0 +1,64 @@
1
+import React, { useState, useEffect, useRef } from 'react';
2
+import { Select } from 'antd';
3
+import apis from '../../services/apis';
4
+import request from '../../utils/request'
5
+
6
+const { Option } = Select;
7
+
8
+function usePrevious(props) {
9
+  const ref = useRef();
10
+  useEffect(() => {
11
+    ref.current = props;
12
+  });
13
+  return ref.current;
14
+}
15
+
16
+/**
17
+ *
18
+ *
19
+ * @param {*} props
20
+ * @returns
21
+ */
22
+const BuildingSelect = props => {
23
+  const [data, setData] = useState([])
24
+  const [value, setValue] = useState([])
25
+  useEffect(() => {
26
+    getBuildList();
27
+  }, [props.value])
28
+
29
+
30
+  const getBuildList = e => {
31
+    request({ ...apis.building.buildingSelect, params: { pageNum: 1, pageSize: 999 } }).then(data => {
32
+        setData(data.records)
33
+        checkValue(data.records)
34
+        // 默认选中第一个
35
+    })
36
+  }
37
+
38
+
39
+  const checkValue = (data) => {
40
+    if (props.value) {
41
+      const tempData = data.filter(f => f.buildingId == props.value)
42
+      const va = (tempData.length > 0) ? props.value : '项目已下线,请重新选择项目'
43
+      props.onChange(va)
44
+
45
+    }
46
+  }
47
+
48
+  return (
49
+      <Select
50
+      showSearch
51
+      value={props.value}
52
+      style={{ width: '300px' }}
53
+      placeholder="请选择项目"
54
+      onChange={props.onChange}
55
+      filterOption={(input, option) =>
56
+        option.props.children && option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
57
+      }>
58
+          {data.map(building => (
59
+            <Option key={building.buildingId} value={building.buildingId}>{building.buildingName}</Option>
60
+          ))}
61
+      </Select>
62
+  )
63
+}
64
+export default BuildingSelect

+ 3
- 3
src/pages/activity/SignList.jsx ファイルの表示

@@ -167,10 +167,10 @@ const handleSubmit = (e, props) => {
167 167
       </Form>
168 168
       <Button type="primary" className={styles.addBtn} onClick={toActivityList}>返回</Button>
169 169
       <Button name="admin.activityDynamicEnlist.export.get" noRight={null} type="primary" style={{ marginLeft: '85%' }} onClick={exportHelp}>导出</Button>
170
-      <Table dataSource={data.list.data} columns={columns} pagination={false} rowKey="activity"/>
171
-      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
170
+      <Table dataSource={data.list.data} columns={columns} pagination={{ total: data.total, onChange: changePageNum }} rowKey="activity"/>
171
+      {/* <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
172 172
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
173
-      </div>
173
+      </div> */}
174 174
     </>
175 175
   )
176 176
 }

+ 29
- 0
src/pages/house/add/index.jsx ファイルの表示

@@ -0,0 +1,29 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import router from 'umi/router';
5
+import moment from 'moment';
6
+import styles from '../../style/GoodsList.less';
7
+import SelectCity from '../../../components/SelectButton/CitySelect'
8
+import BuildSelect from '../../../components/SelectButton/BuildSelect'
9
+import apis from '../../../services/apis';
10
+import request from '../../../utils/request';
11
+import AuthButton from '@/components/AuthButton';
12
+
13
+const { Option } = Select;
14
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
15
+
16
+const header = props => {
17
+   
18
+
19
+  const { getFieldDecorator } = props.form
20
+  return (
21
+
22
+    <>
23
+      <span>新增业</span>
24
+    </>
25
+  )
26
+}
27
+const WrappedHeader = Form.create({ name: 'header' })(header);
28
+
29
+export default WrappedHeader

+ 15
- 0
src/pages/house/edit/components/base.jsx ファイルの表示

@@ -0,0 +1,15 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import moment from 'moment';
5
+import router from 'umi/router';
6
+import apis from '../../../../services/apis';
7
+
8
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
9
+const { TextArea } = Input;
10
+
11
+const Base = props => {
12
+  return <div><span>销售批次信息</span></div>
13
+}
14
+
15
+export default Base

+ 202
- 0
src/pages/house/edit/components/house.jsx ファイルの表示

@@ -0,0 +1,202 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Radio, Tag, Tooltip, Tabs, Table, notification, Modal } from 'antd';
3
+import moment from 'moment';
4
+import request from '../../../../utils/request';
5
+import apis from '../../../../services/apis';
6
+import Styles from './style.less';
7
+import { router } from 'umi';
8
+
9
+/**
10
+ *图片设置
11
+ *
12
+ * @param {*} props
13
+ * @returns
14
+ */
15
+function House(props) {
16
+  // eslint-disable-next-line react-hooks/rules-of-hooks
17
+  const [data, setData] = useState([])
18
+
19
+  useEffect(() => {
20
+    getList()
21
+  }, [])
22
+
23
+  function openNotificationWithIcon(type, message) {
24
+    notification[type]({
25
+      message,
26
+      description:
27
+        '',
28
+    });
29
+  }
30
+
31
+  function getList(params) {
32
+    // 网路请求
33
+    request({ ...apis.house.taHousingResources, params: { ...params,salesBatchId: props.salesBatchId,buildingId: props.buildingId } }).then(res => {
34
+      console.log(res,"resresres")
35
+      setData(res)
36
+    }).catch(err => {
37
+      openNotificationWithIcon('error', err.message)
38
+    })
39
+  }
40
+
41
+    // 重置搜索
42
+    function handleReset () {
43
+      props.form.resetFields();
44
+      getList({ pageNumber: 1, pageSize: 10 })
45
+    }
46
+
47
+      // 分页
48
+  function changePageNum(pageNumber) {
49
+    // eslint-disable-next-line react-hooks/rules-of-hooks
50
+    getList({ pageNumber: pageNumber, pageSize: 10})
51
+  }
52
+
53
+  const rowSelection = {
54
+    onChange: (selectedRowKeys, selectedRows) => {
55
+      console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
56
+    },
57
+  };
58
+
59
+  function showEdi() {
60
+    window.location.href = "/house/add";
61
+  }
62
+
63
+  /**
64
+   * 删除
65
+   *
66
+   * @param {*} record
67
+   */
68
+  function deleteApartment(record) {
69
+    confirm({
70
+      title: '确认删除当前数据?',
71
+      content: '确定后成功删除,点击取消则放弃当前操作',
72
+      okText: '确定',
73
+      cancelText: '取消',
74
+      onOk() {
75
+        // 网路请求
76
+        request({ ...apis.building.buildingApartmentDelete, urlData: { id: record.apartmentId } }).then(res => {
77
+          getList()
78
+          openNotificationWithIcon('success', '操作成功')
79
+        }).catch(err => {
80
+          // openNotificationWithIcon('error', err.message)
81
+        })
82
+      },
83
+      onCancel() {},
84
+    });
85
+  }
86
+
87
+
88
+  const columns = [
89
+    {
90
+      title: '房源编号',
91
+      dataIndex: 'houseId',
92
+      key: 'houseId',
93
+    },
94
+    {
95
+      title: '楼栋',
96
+      dataIndex: 'blockName',
97
+      key: 'blockName',
98
+    },
99
+    {
100
+      title: '单元',
101
+      dataIndex: 'unitName',
102
+      key: 'unitName',
103
+    },
104
+    {
105
+      title: '层',
106
+      dataIndex: 'floorName',
107
+      key: 'floorName',
108
+    },
109
+    {
110
+      title: '房号',
111
+      dataIndex: 'roomName',
112
+      key: 'roomName',
113
+    },
114
+    {
115
+      title: '价格(万元)',
116
+      dataIndex: 'price',
117
+      key: 'price',
118
+    },
119
+    {
120
+      title: '对应户型',
121
+      dataIndex: 'apartmentName',
122
+      key: 'apartmentName',
123
+    },
124
+    {
125
+      title: '预选基础热度',
126
+      dataIndex: 'heat',
127
+      key: 'heat',
128
+    },
129
+    {
130
+      title: '预选实际热度',
131
+      dataIndex: 'realHeat',
132
+      key: 'realHeat',
133
+    },
134
+    {
135
+      title: '发布状态',
136
+      dataIndex: 'status',
137
+      key: 'status',
138
+    },
139
+    {
140
+      title: '最后修改人',
141
+      dataIndex: 'updateName',
142
+      key: 'updateName',
143
+    },
144
+    {
145
+      title: '操作',
146
+      dataIndex: 'apartmentId',
147
+      key: 'apartmentId',
148
+      render: (_, record) => (
149
+        <>
150
+          <Button type="link" style={{ color: 'red' }} onClick={() => showEdi(record)}>编辑</Button>
151
+          <Button type="link" style={{ color: 'red' }} onClick={() => deleteApartment(record)}>删除</Button>
152
+        </>
153
+      ),
154
+    },
155
+  ]
156
+  const { getFieldDecorator } = props.form
157
+  return (
158
+    <>
159
+    <Form layout="inline" onSubmit={e => handleSubmit(e)}>
160
+        <Form.Item>
161
+          {getFieldDecorator('cityId')(
162
+            <Input
163
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
164
+            placeholder="请输入标题"
165
+          />,
166
+          )}
167
+        </Form.Item>
168
+        <Form.Item>
169
+          {getFieldDecorator('buildingId')(
170
+            <Input
171
+            prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
172
+            placeholder="请输入标题"
173
+          />,
174
+          )}
175
+        </Form.Item>
176
+        <Form.Item>
177
+          {getFieldDecorator('title')(
178
+            <Input
179
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
180
+              placeholder="请输入标题"
181
+            />,
182
+          )}
183
+        </Form.Item>
184
+        <Form.Item>
185
+          <Button type="primary" htmlType="submit" >
186
+            搜索
187
+          </Button>
188
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
189
+            重置
190
+            </Button>
191
+        </Form.Item>
192
+      </Form>
193
+      <Button type="primary" onClick={() => showEdi()}>新增房源</Button>
194
+      <Button type="primary" onClick={() => showEdi()} style={{ marginLeft: '18px'}}>批量导入房源</Button>
195
+      <Button type="primary" onClick={() => showEdi()} style={{ marginLeft: '18px'}}>批量修改对应户型</Button>
196
+      <Button type="danger" style={{ marginLeft: '18px'}} onClick={() => router.go(-1)}>返回</Button>
197
+      <Table rowSelection={rowSelection} dataSource={data.records} columns={columns} pagination={{ total: data.total, onChange: e => this.changePageNum(e) }} rowKey="House" />
198
+    </>
199
+  )
200
+}
201
+const WrappedHeader = Form.create({ name: 'House' })(House);
202
+export default WrappedHeader

+ 47
- 0
src/pages/house/edit/components/houseTab.jsx ファイルの表示

@@ -0,0 +1,47 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Radio, Tag, Tooltip, Tabs, notification } from 'antd';
3
+import moment from 'moment';
4
+import request from '../../../../utils/request';
5
+import apis from '../../../../services/apis';
6
+import { router } from 'umi';
7
+
8
+import House from './house'
9
+
10
+const { Option } = Select
11
+const { TabPane } = Tabs;
12
+
13
+const formItemLayout = {
14
+  labelCol: {
15
+    xs: { span: 24 },
16
+    sm: { span: 2 },
17
+  },
18
+  wrapperCol: {
19
+    xs: { span: 24 },
20
+    sm: { span: 16 },
21
+  },
22
+};
23
+
24
+function openNotificationWithIcon(type, message) {
25
+  notification[type]({
26
+    message,
27
+    description:
28
+      '',
29
+  });
30
+}
31
+
32
+function EditHouse(props) {
33
+
34
+  const [tab, setTab] = useState('house')
35
+
36
+  return (
37
+    <>
38
+      <div style={{ marginTop: '20px' }}>
39
+        { (tab === 'house' && <House salesBatchId="1" buildingId="1" />)} 
40
+      </div>
41
+    </>
42
+  )
43
+}
44
+
45
+const WrappedEditHouseForm = Form.create({ name: 'editHouse' })(EditHouse);
46
+
47
+export default WrappedEditHouseForm

+ 164
- 0
src/pages/house/edit/components/poster.jsx ファイルの表示

@@ -0,0 +1,164 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import moment from 'moment';
5
+import router from 'umi/router';
6
+import BuildSelect from '../../../../components/SelectButton/BuildSelect'
7
+import XForm, { FieldTypes } from '../../../../components/XForm';
8
+import Wangedit from '../../../../components/Wangedit/Wangedit'
9
+import request from '../../../../utils/request'
10
+import yinhao from '../../../../assets/yinhao.png'
11
+import xiaochengxu from '../../../../assets/xiaochengxu.png'
12
+import ImageUploader from '../../../../components/XForm/ImageUpload';
13
+import poster1 from '../../../../assets/poster1.png';
14
+import poster2 from '../../../../assets/poster2.png';
15
+import Styles from './style.less';
16
+import apis from '../../../../services/apis';
17
+
18
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
19
+const { TextArea } = Input;
20
+
21
+const Poster = props => {
22
+  const [inputValue, changeInput] = useState('')
23
+  const [textAreaValue, changeTextArea] = useState('')
24
+  const [imgValue, changeImg] = useState('')
25
+  const [posterId, setPosterId] = useState('')
26
+
27
+  const [building, setBuilding] = useState({ buildingImg: [{ url: '' }] })
28
+  const { buildingId } = props.building
29
+   // ============这边改造下就可以饿============================
30
+  if (buildingId) {
31
+    // eslint-disable-next-line react-hooks/rules-of-hooks
32
+    useEffect(() => {
33
+      request({
34
+        ...apis.activity.poster,
35
+        params: { targetId: buildingId, targetType: 'building' },
36
+      }).then(data => {
37
+        console.log(data, '2222')
38
+        if (data.length > 0) {
39
+          setPosterId(data[0].posterId)
40
+          changeImg(data[0].posterImg)
41
+          changeTextArea(data[0].posterDescription)
42
+          changeInput(data[0].posterTitle)
43
+        }
44
+      }).catch(err => {
45
+        message.info(err.msg || err.message)
46
+      })
47
+
48
+      getById(buildingId)
49
+      getMiniappName()
50
+    }, [])
51
+  }
52
+
53
+  // 获取详情信息
54
+  function getById(currentId) {
55
+
56
+    request({ ...apis.building.buildingGetById, urlData: { id: currentId } }).then(res => {
57
+      setBuilding(res)
58
+      console.log('getById: ', res)
59
+    })
60
+  }
61
+  // 获取小程序名称
62
+  const [miniappName, setMiniappName] = useState('')
63
+  function getMiniappName() {
64
+
65
+    request({ ...apis.building.getMiniappName }).then(res => {
66
+    
67
+      setMiniappName(res)
68
+     
69
+    })
70
+  }
71
+
72
+  const submitPoster = () => {
73
+    if (buildingId) {
74
+      if (!imgValue) {
75
+        message.error('请选择海报图片')
76
+        return
77
+      }
78
+
79
+      if (posterId) {
80
+        request({
81
+          ...apis.activity.updatePoster,
82
+          urlData: { id: posterId },
83
+          data: { targetId: buildingId, targetType: 'building', posterImg: imgValue, posterTitle: inputValue, posterDescription: textAreaValue },
84
+        }).then(() => {
85
+          message.info('保存成功')
86
+        }).catch(err => {
87
+          message.info(err.msg || err.message)
88
+        })
89
+      } else {
90
+        request({
91
+          ...apis.activity.addPoster,
92
+          data: { targetId: buildingId, targetType: 'building', posterImg: imgValue, posterTitle: inputValue, posterDescription: textAreaValue },
93
+        }).then(data => {
94
+          setPosterId(data.posterId)
95
+          message.info('保存成功')
96
+        }).catch(err => {
97
+          message.info(err.msg || err.message)
98
+        })
99
+      }
100
+    } else {
101
+      message.warn('请先保存基本信息数据')
102
+    }
103
+  }
104
+
105
+  return <div>
106
+    <div style={{ display: 'flex' }}>
107
+      <div style={{ width: '420px', height: '900px', display: 'inline-block', marginTop: '30px' }}>
108
+        <div style={{ width: '375px', height: '700px', backgroundColor: '#fff', boxShadow: '0px 0px 16px 6px rgba(0,0,0,0.15)', position: 'relative', margin: '0 auto' }}>
109
+          <img style={{ width: '100%', height: '300px' }} src={imgValue ? imgValue : poster1} alt="" />
110
+
111
+          <p className={Styles.tagLabel}>
112
+            {
113
+              building.buildingTag && building.buildingTag.map(item => <span>{item.tagName}</span>)
114
+            }
115
+          </p>
116
+          <p style={{
117
+            margin: '10px 20px', fontSize: '20px', color: '#222', fontWeight: '600',
118
+            display: '-webkit-box', lineClamp: '3', height: '36px', lineHeight: '36px',
119
+            WebkitLineClamp: '1',
120
+            WebkitBoxOrient: 'vertical',
121
+            overflow: 'hidden',
122
+            textOverflow: 'ellipsis',
123
+          }}>{inputValue || (building.buildingName || '海报标题')}</p>
124
+          <p style={{ color: '#999', padding: ' 0 20px' }}><span style={{ color: '#fd0d0c', fontSize: '24px', marginLeft: '6px' }}>{building.price} </span><span style={{ color: '#fd0d0c', fontSize: '20px' }}></span></p>
125
+          <img src={yinhao} style={{ width: '30px', marginLeft: '22px' }} alt="" />
126
+          <p style={{
127
+            margin: '16px 20px 28px 20px', fontSize: '17px', color: '#999',
128
+            display: '-webkit-box', lineClamp: '3', height: '72px',
129
+            WebkitLineClamp: '3',
130
+            WebkitBoxOrient: 'vertical',
131
+            overflow: 'hidden',
132
+            textOverflow: 'ellipsis',
133
+          }}>{textAreaValue || '海报描述'}</p>
134
+          <div style={{ backgroundColor: '#f1f1f1', padding: '22px 30px', boxShadow: '0px 6px 12px -4px #dcdcdc',position:'relative' }}>
135
+            <p style={{margin:'0',fontSize:'18px',color:'#888'}}>长按识别小程序码</p>
136
+            <p style={{margin:'0',fontSize:'18px',color:'#888'}}>进入<span style={{margin:'0 5px',fontSize:'18px',color:'#333',fontWeight:'600'}}>{miniappName||'置业V顾问'}</span>报名活动</p>
137
+            <img style={{ width: '80px',position: 'absolute',right:'30px',top:'10px' }} src={xiaochengxu} alt="" />
138
+          </div>
139
+        </div>
140
+        <p style={{ textAlign: 'center', fontSize: '19px', color: '#666', marginTop: '30px' }}>海报模板</p>
141
+      </div>
142
+      <div >
143
+        <div style={{ display: 'flex', width: '100%', margin: '30px 0' }}>
144
+          <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}><span style={{ color: 'red' }}>*</span> 楼盘海报图</p>
145
+          <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
146
+        </div>
147
+        <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginBottom: '30px'}}>建议图片尺寸:750*600px,比例5:4,格式:jpg,用于楼盘海报</p>
148
+        <div style={{ display: 'flex', alignItems: 'center', width: '100%', marginBottom: '60px' }}>
149
+          <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报标题</p>
150
+          <Input style={{ width: '20vw' }} value={inputValue} placeholder="请输入海报标题" onChange={e => changeInput(e.target.value)} />
151
+        </div>
152
+        <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
153
+          <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>海报描述</p>
154
+          <TextArea rows={5} maxLength={1024} value={textAreaValue} onChange={e => changeTextArea(e.target.value)} />
155
+        </div>
156
+
157
+      </div>
158
+    </div>
159
+    <Button type="primary" onClick={submitPoster} style={{ margin: '40px 40px 40px 30vw' }}> 确定</Button>
160
+    <Button onClick={() => router.go(-1)}>取消</Button>
161
+  </div>
162
+}
163
+
164
+export default Poster

+ 15
- 0
src/pages/house/edit/components/preselectionImg.jsx ファイルの表示

@@ -0,0 +1,15 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import moment from 'moment';
5
+import router from 'umi/router';
6
+import apis from '../../../../services/apis';
7
+
8
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
9
+const { TextArea } = Input;
10
+
11
+const PreselectionImg = props => {
12
+  return <div><span>预选热度图</span></div>
13
+}
14
+
15
+export default PreselectionImg

+ 15
- 0
src/pages/house/edit/components/preselectionRecord.jsx ファイルの表示

@@ -0,0 +1,15 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import moment from 'moment';
5
+import router from 'umi/router';
6
+import apis from '../../../../services/apis';
7
+
8
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
9
+const { TextArea } = Input;
10
+
11
+const PreselectionRecord = props => {
12
+  return <div><span>预选记录</span></div>
13
+}
14
+
15
+export default PreselectionRecord

+ 96
- 0
src/pages/house/edit/components/share.jsx ファイルの表示

@@ -0,0 +1,96 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import moment from 'moment';
5
+import router from 'umi/router';
6
+import BuildSelect from '../../../../components/SelectButton/BuildSelect'
7
+import XForm, { FieldTypes } from '../../../../components/XForm';
8
+import Wangedit from '../../../../components/Wangedit/Wangedit'
9
+import request from '../../../../utils/request'
10
+import yinhao from '../../../../assets/yinhao.png'
11
+import ImageUploader from '../../../../components/XForm/ImageUpload';
12
+import logo from '../../../../assets/logo.png';
13
+import touxiang from '../../../../assets/touxiang.jpg';
14
+import poster1 from '../../../../assets/poster1.png';
15
+import poster2 from '../../../../assets/poster2.png';
16
+import apis from '../../../../services/apis';
17
+
18
+const Share = props => {
19
+  const [inputValue, changeInput] = useState('')
20
+  const [imgValue, changeImg] = useState('')
21
+  const [shareContentId, setShareContentId] = useState('')
22
+// ============这边改造下就可以饿============================
23
+  const { buildingId } = props.building
24
+  if (buildingId) {
25
+    // eslint-disable-next-line react-hooks/rules-of-hooks
26
+    useEffect(() => {
27
+      request({
28
+        ...apis.activity.shareContent,
29
+        params: { targetId: buildingId, targetType: 'building' },
30
+      }).then(data => {
31
+        if (data.length > 0) {
32
+          setShareContentId(data[0].shareContentId)
33
+          changeImg(data[0].shareContentImg)
34
+          changeInput(data[0].shareContentTitle)
35
+        }
36
+      }).catch(err => {
37
+        message.info(err.msg || err.message)
38
+      })
39
+    }, [])
40
+  }
41
+
42
+  const submitShare = () => {
43
+    if (buildingId) {
44
+      if (shareContentId) {
45
+        request({
46
+          ...apis.activity.updateShareContent,
47
+          urlData: { id: shareContentId },
48
+          data: { targetId: buildingId, shareContentType: 'building', shareContentImg: imgValue,shareContentTitle: inputValue },
49
+        }).then(data => {
50
+          message.info('保存成功')
51
+        }).catch(err => {
52
+          message.info(err.msg || err.message)
53
+        })
54
+       } else {
55
+        request({
56
+          ...apis.activity.addShareContent,
57
+          data: { targetId: buildingId, shareContentType: 'building', shareContentImg: imgValue,shareContentTitle: inputValue },
58
+        }).then(data => {
59
+          setShareContentId(data.shareContentId)
60
+          message.info('保存成功')
61
+        }).catch(err => {
62
+          message.info(err.msg || err.message)
63
+        })
64
+       }
65
+     } else {
66
+      message.warn('请先保存基本信息数据')
67
+     }
68
+  }
69
+
70
+  return <div style={{ padding: '20px' }}>
71
+    <div style={{ display: 'flex', margin: '10px 0 40px 0', width: '100%' }}>
72
+      <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享模板</p>
73
+      <div>
74
+        <p style={{ display: 'flex', alignItems: 'center', fontSize: '14px', color: '#999', margin: '0', lineHeight: '0' }}>
75
+          <img src={logo} style={{ width: '22px', marginRight: '10px' }} />
76
+          知与行互动
77
+        </p>
78
+        <p style={{ fontSize: '16px', color: '#222', fontWeight: '600', margin: '0' }}>{inputValue ? inputValue : '置业V客厅 精准获客平台'}</p>
79
+        <img style={{ width: '200px', height: '160px' }} src={imgValue ? imgValue : poster2} alt="" />
80
+      </div>
81
+    </div>
82
+    <div style={{ display: 'flex', alignItems: 'center', width: '100%' }}>
83
+      <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>分享标题</p>
84
+      <Input placeholder="请输入分享标题" value={inputValue} onChange={e => changeInput(e.target.value)} />
85
+    </div>
86
+    <div style={{ display: 'flex', width: '100%', marginTop: '40px' }}>
87
+      <p style={{ minWidth: '200px', color: '#222', textAlign: 'right', margin: '0 30px 0 0' }}>楼盘分享图</p>
88
+      <ImageUploader value={imgValue} onChange={e => changeImg(e)} />
89
+    </div>
90
+    <p style={{ fontSize: '0.5vw', color: '#A9A9A9', marginLeft: '230px', marginTop: '20px' }}>建议图片尺寸:750*600px,比例5:4,格式:jpg,用于楼盘分享好友</p>
91
+    <Button type="primary" htmlType="submit" onClick={submitShare} style={{ margin: '40px 40px 40px 220px' }}> 确定</Button>
92
+    <Button onClick={() => router.go(-1)}>取消</Button>
93
+  </div>
94
+}
95
+
96
+export default Share

+ 15
- 0
src/pages/house/edit/components/shareRecord.jsx ファイルの表示

@@ -0,0 +1,15 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import moment from 'moment';
5
+import router from 'umi/router';
6
+import apis from '../../../../services/apis';
7
+
8
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
9
+const { TextArea } = Input;
10
+
11
+const ShareRecord = props => {
12
+  return <div><span>分享记录</span></div>
13
+}
14
+
15
+export default ShareRecord

+ 97
- 0
src/pages/house/edit/components/style.less ファイルの表示

@@ -0,0 +1,97 @@
1
+.SubmitButton {
2
+  background: #3a91d5;
3
+  border-radius: 7px;
4
+  border: 0px;
5
+}
6
+.SelectFrom {
7
+  width: 180px;
8
+  background: #ffffff;
9
+  border-radius: 7px;
10
+  border: 1px solid #dbdbdb;
11
+}
12
+.addButton {
13
+  border-radius: 4px;
14
+  border: 0px;
15
+  margin: 10px 0px;
16
+}
17
+.cardText {
18
+  font-size: 0.106rem;
19
+  color: #333;
20
+  display: flex;
21
+  align-items: center;
22
+  position: relative;
23
+  margin-bottom: 0.08rem; 
24
+}
25
+
26
+.recommderTag{
27
+  position: absolute;
28
+  color: #fff;
29
+  line-height: 0.28rem;
30
+  width: 0.54rem;
31
+  background-color: rgba(0,0,0,0.4);
32
+  text-align: center;
33
+  border-radius: 12px 0 12px 0;
34
+  font-size: 0.09rem;
35
+}
36
+.cardItem{
37
+  font-size: 0.106rem;
38
+  font-weight: 400;
39
+  color: #666;
40
+  display: flex;
41
+  align-items: center;  
42
+  margin-bottom: 0.08rem;
43
+  .title{
44
+    display: inline-block;
45
+    width: 0.58rem;
46
+  
47
+    min-width: 0.58rem;
48
+    justify-content: space-between;
49
+    text-align: justify;
50
+    text-align-last:justify
51
+  }
52
+  
53
+}
54
+.cardText{
55
+  font-size: 0.106rem;
56
+  font-weight: 400;
57
+  color: #666;
58
+  display: flex;
59
+  align-items: center;  
60
+  margin-bottom: 0.08rem;
61
+  .title{
62
+    display: inline-block;
63
+    width: 0.58rem;
64
+  
65
+    min-width: 0.58rem;
66
+    justify-content: space-between;
67
+    text-align: justify;
68
+    text-align-last:justify
69
+  }
70
+  
71
+}
72
+.ediText {
73
+  font-size: 0.106rem;
74
+  color: #ff925c;
75
+  position: absolute;
76
+  right: 0;
77
+
78
+}
79
+
80
+
81
+.address { 
82
+  width: 400px;
83
+  height: 24px; 
84
+  text-overflow: ellipsis; 
85
+  white-space: nowrap;
86
+  overflow: hidden;
87
+}
88
+.cover{
89
+  width: 100%;
90
+
91
+  padding-bottom: 56.25%;
92
+  background-size: 100% 100% !important;
93
+ 
94
+  border-radius: 12px 12px 0 0;
95
+  
96
+    // height: '14vw';
97
+}

+ 15
- 0
src/pages/house/edit/components/visitRecord.jsx ファイルの表示

@@ -0,0 +1,15 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, Tabs, Radio, DatePicker, message, Upload } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import moment from 'moment';
5
+import router from 'umi/router';
6
+import apis from '../../../../services/apis';
7
+
8
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
9
+const { TextArea } = Input;
10
+
11
+const VisitRecord = props => {
12
+  return <div><span>访问记录</span></div>
13
+}
14
+
15
+export default VisitRecord

+ 76
- 0
src/pages/house/edit/index.jsx ファイルの表示

@@ -0,0 +1,76 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Icon, Input, Button, DatePicker, Select, Card, Row, Col, Pagination, Alert, Radio, Tag, Tooltip, Tabs, notification } from 'antd';
3
+import moment from 'moment';
4
+import request from '../../../utils/request';
5
+import apis from '../../../services/apis';
6
+import { router } from 'umi';
7
+
8
+import Base from './components/base'
9
+import HouseTab from './components/houseTab'
10
+import Poster from './components/poster'
11
+import Share from './components/share'
12
+import PreselectionImg from './components/preselectionImg'
13
+import PreselectionRecord from './components/preselectionRecord'
14
+import ShareRecord from './components/shareRecord'
15
+import VisitRecord from './components/visitRecord'
16
+
17
+
18
+const { Option } = Select
19
+const { TabPane } = Tabs;
20
+
21
+const formItemLayout = {
22
+  labelCol: {
23
+    xs: { span: 24 },
24
+    sm: { span: 2 },
25
+  },
26
+  wrapperCol: {
27
+    xs: { span: 24 },
28
+    sm: { span: 16 },
29
+  },
30
+};
31
+
32
+function openNotificationWithIcon(type, message) {
33
+  notification[type]({
34
+    message,
35
+    description:
36
+      '',
37
+  });
38
+}
39
+
40
+function EditHouse(props) {
41
+
42
+  const [tab, setTab] = useState('house')
43
+  
44
+  function tabsCallback(e) {
45
+    setTab(e.target.value)
46
+  }
47
+
48
+  return (
49
+    <>
50
+      <Radio.Group value={ tab } buttonStyle="solid" onChange={e => tabsCallback(e)}>
51
+        <Radio.Button value="base">销售批次信息</Radio.Button>
52
+        <Radio.Button value="house">房源信息</Radio.Button>
53
+        <Radio.Button value="poster">海报设置</Radio.Button>
54
+        <Radio.Button value="share">分享设置</Radio.Button>
55
+        <Radio.Button value="preselectionImg">预选热度图</Radio.Button>
56
+        <Radio.Button value="preselectionRecord">预选记录</Radio.Button>
57
+        <Radio.Button value="shareRecord">分享记录</Radio.Button>
58
+        <Radio.Button value="visitRecord">访问记录</Radio.Button>
59
+      </Radio.Group>
60
+      <div style={{ marginTop: '20px' }}>
61
+        { (tab === 'base' && <Base />)} 
62
+        { (tab === 'house' && <HouseTab salesBatchId="1" buildingId="1"/>)}
63
+        { (tab === 'poster' && <Poster />)}
64
+        { (tab === 'share' && <Share />)}
65
+        { (tab === 'preselectionImg' && <PreselectionImg />)}
66
+        { (tab === 'preselectionRecord' && <PreselectionRecord />)}
67
+        { (tab === 'shareRecord' && <ShareRecord />)}
68
+        { (tab === 'visitRecord' && <VisitRecord />)}
69
+      </div>
70
+    </>
71
+  )
72
+}
73
+
74
+const WrappedEditHouseForm = Form.create({ name: 'editHouse' })(EditHouse);
75
+
76
+export default WrappedEditHouseForm

+ 348
- 0
src/pages/house/list/index.jsx ファイルの表示

@@ -0,0 +1,348 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Form, Input, Button, Icon, Select, message, Table, Divider, Tag, Pagination, Modal, DatePicker } from 'antd';
3
+import { FormattedMessage } from 'umi-plugin-react/locale';
4
+import router from 'umi/router';
5
+import moment from 'moment';
6
+import styles from '../../style/GoodsList.less';
7
+import SelectCity from '../../../components/SelectButton/CitySelect'
8
+import BuildSelect from '../../../components/SelectButton/BuildSelect'
9
+import apis from '../../../services/apis';
10
+import request from '../../../utils/request';
11
+import AuthButton from '@/components/AuthButton';
12
+
13
+const { Option } = Select;
14
+const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
15
+
16
+const header = props => {
17
+  // eslint-disable-next-line react-hooks/rules-of-hooks
18
+  const [data, setData] = useState({ list: [], total: 0 })
19
+  //   const [page, changePage] = useState({})
20
+  const [time, setTime] = useState('')
21
+
22
+  //==========看这里-- 新功能都用house为中间单词,我已经创建好了,你只要修改list的指向链接就行,看完删除=========
23
+  // 查询列表
24
+  const getList = params => {
25
+    request({ ...apis.house.list, params: { ...params } }).then(data => {
26
+      console.log(data)
27
+      setData(data)
28
+    })
29
+  }
30
+
31
+  // eslint-disable-next-line react-hooks/rules-of-hooks
32
+  useEffect(() => {
33
+    getList({ pageNum: 1, pageSize: 10 });
34
+  }, [])
35
+
36
+  // 跳转到编辑商品
37
+  const toAddHouse = id => () => {
38
+    if(id) {
39
+      router.push({
40
+        pathname: '/house/edit',
41
+      });
42
+      return
43
+    }
44
+    router.push({
45
+      pathname: '/house/add',
46
+    });
47
+  }
48
+
49
+  const newQrcode = row => {
50
+    const x = new XMLHttpRequest();
51
+    const resourceUrl = row.qrCode
52
+    x.open('GET', resourceUrl, true);
53
+    x.responseType = 'blob';
54
+    x.onload = function (e) {
55
+      const url = window.URL.createObjectURL(x.response)
56
+      const a = document.createElement('a');
57
+      a.href = url;
58
+      a.style.display = 'none'
59
+      a.download = '活动二维码.png';
60
+      a.click();
61
+    }
62
+    x.send();
63
+  }
64
+
65
+  const getActivityDetail = (dynamicId) => () => {
66
+    router.push({
67
+      pathname: '/activity/detailActivity',
68
+      query: {
69
+        dynamicId,
70
+      },
71
+    });
72
+  }
73
+
74
+  const getJoinPeople = (dynamicId) => () => {
75
+    router.push({
76
+      pathname: '/activity/SignList',
77
+      query: {
78
+        dynamicId,
79
+      },
80
+    });
81
+  }
82
+  /**
83
+   *
84
+   *
85
+   * @param {*} props
86
+   * @returns
87
+   */
88
+  const columns = [
89
+    {
90
+      title: '活动标题',
91
+      dataIndex: 'title',
92
+      key: 'title',
93
+      align: 'center',
94
+      // width: '15%',
95
+      render:  (x, row) => <><div style={{overflow: 'hidden',textOverflow: 'ellipsis',whiteSpace: 'nowrap', width: '201px',title:'content'}}>
96
+                              <span style={{color: 'blue',cursor: 'pointer'}} onClick={toAddHouse(1)}>{row.title}</span></div></>,
97
+      // width: '300px',
98
+      // ellipsis:'true'overflow: hidden; /*溢出隐藏*/
99
+// text-overflow: ellipsis; /*以省略号...显示*/
100
+// white-space: nowrap;
101
+    },
102
+    {
103
+      title: '活动时间',
104
+      dataIndex: 'startDate',
105
+      key: 'startDate',
106
+      align: 'center',
107
+      // width: '15%',
108
+      // width: '20%',
109
+      render: (x, row) => <><span>{`${moment(row.startDate).format('YYYY-MM-DD')} —— ${moment(row.endDate).format('YYYY-MM-DD')}`}</span></>,
110
+    },
111
+    {
112
+      title: '已参加人数',
113
+      dataIndex: 'count',
114
+      key: 'count',
115
+      align: 'center',
116
+      render:  (x, row) => <><div style={{overflow: 'hidden',textOverflow: 'ellipsis',whiteSpace: 'nowrap', width: '201px',title:'content'}}>
117
+                              <span style={{color: 'blue',cursor: 'pointer'}} onClick={getJoinPeople(row.dynamicId)}>{row.count}</span></div></>,
118
+      // width: '10%',
119
+      // width: '6%',
120
+    },
121
+    // {
122
+    //   title: '阅读量',
123
+    //   dataIndex: 'pvNum',
124
+    //   key: 'pvNum',
125
+    //   align: 'center',
126
+    //   // width: '10%',
127
+    // },
128
+    // {
129
+    //   title: '转发量',
130
+    //   dataIndex: 'shareNum',
131
+    //   key: 'shareNum',
132
+    //   align: 'center',
133
+    //   // width: '10%',
134
+    // },
135
+    // {
136
+    //   title: '收藏数',
137
+    //   dataIndex: 'saveNum',
138
+    //   key: 'saveNum',
139
+    //   align: 'center',
140
+    //   // width: '10%',
141
+    // },
142
+    {
143
+      title: '报名状态',
144
+      dataIndex: 'activityStatus',
145
+      key: 'activityStatus',
146
+      align: 'center',
147
+      // width: '10%',
148
+      render: activityStatus => <><span>{activityStatus == 0 ? '进行中' : activityStatus == 1 ? '未开始' : '已结束'}</span></>,
149
+    },
150
+    {
151
+      title: '权重',
152
+      dataIndex: 'heavy',
153
+      key: 'heavy',
154
+      align: 'center',
155
+    },
156
+  ];
157
+  const getSignList = dynamicId => {
158
+    router.push({
159
+      pathname: '/activity/SignList',
160
+      query: {
161
+        dynamicId,
162
+      },
163
+    });
164
+  }
165
+
166
+  const finishDynamic = row => {
167
+    Modal.confirm({
168
+      title: '活动会被强制结束,小程序端无法再发起或参与此活动,如果不想让客户看到活动,请再点击取消发布按钮',
169
+      okText: '确定',
170
+      cancelText: '取消',
171
+      onOk () {
172
+        request({ ...apis.activity.finish, data: { dynamicId: row.dynamicId, top: '' } }).then(data => {
173
+          console.log(data)
174
+          message.info('操作成功!')
175
+          getList({ pageNum: 1, pageSize: 10, ...props.form.getFieldsValue() })
176
+        }).catch(err => {
177
+          console.log(err)
178
+          message.info(err.msg || err.message)
179
+        })
180
+      },
181
+    });
182
+  }
183
+
184
+  //   置顶
185
+  const topDynamic = row => () => {
186
+    const weight = Math.abs(row.weight - 1)
187
+    request({ ...apis.activity.weight, params: { dynamicId: row.dynamicId, weight } }).then(data => {
188
+      console.log(data)
189
+      message.info('操作成功!')
190
+      getList({ pageNum: 1, pageSize: 10, ...props.form.getFieldsValue() })
191
+    }).catch(err => {
192
+      console.log(err)
193
+      message.info(err.msg || err.message)
194
+    })
195
+  }
196
+
197
+  //   推首页
198
+  const homeDynamic = row => () => {
199
+    const home = Math.abs(row.home - 1)
200
+    request({ ...apis.activity.home, params: { dynamicId: row.dynamicId, home } }).then(data => {
201
+      console.log(data)
202
+      message.info('操作成功!')
203
+      getList({ pageNum: 1, pageSize: 10, ...props.form.getFieldsValue() })
204
+    }).catch(err => {
205
+      console.log(err)
206
+      message.info(err.msg || err.message)
207
+    })
208
+  }
209
+
210
+  const sendOrPublicDynamic = row => {
211
+    if (row.status === 1) {
212
+      cancelDynamic(row)
213
+    } else {
214
+      sendDynamic(row)
215
+    }
216
+  }
217
+
218
+  // 取消活动
219
+  const cancelDynamic = row => {
220
+    Modal.confirm({
221
+      title: '活动会在小程序端隐藏,后台可以继续编辑重新发布',
222
+      okText: '确认',
223
+      cancelText: '取消',
224
+      onOk() {
225
+        request({ ...apis.activity.cancel, urlData: { id: row.dynamicId } }).then(data => {
226
+          message.info('操作成功!')
227
+          getList({ pageNum: 1, pageSize: 10, ...props.form.getFieldsValue()  })
228
+        }).catch(err => {
229
+          console.log(err)
230
+          message.info(err.msg || err.message)
231
+        })
232
+      }
233
+    });
234
+  }
235
+
236
+  // 发布活动
237
+  const sendDynamic = row => {
238
+    Modal.confirm({
239
+      title: '确定发布吗?',
240
+      okText: '确认',
241
+      cancelText: '取消',
242
+      onOk() {
243
+        request({ ...apis.activity.send, urlData: { id: row.dynamicId } }).then(data => {
244
+          message.info('操作成功!')
245
+          getList({ pageNum: 1, pageSize: 10, ...props.form.getFieldsValue() });
246
+        }).catch(err => {
247
+          console.log(err)
248
+          message.info(err.msg || err.message)
249
+        })
250
+      }
251
+    });
252
+  }
253
+
254
+  const changePageNum = pageNumber => {
255
+    getList({ pageNum: pageNumber, pageSize: 10, ...props.form.getFieldsValue() })
256
+  }
257
+
258
+  // 提交事件
259
+  const handleSubmit = e => {
260
+    e.preventDefault();
261
+    props.form.validateFields((err, values) => {
262
+      if (!err) {
263
+        console.log('提交数据: ', values)
264
+        if (time) {
265
+          values.time = `${moment(time).format('YYYY-MM-DDT00:00:00.000')}Z`
266
+        } else {
267
+          values.time = null
268
+        }
269
+        
270
+        getList({ pageNum: 1, pageSize: 10, ...values })
271
+      }
272
+    });
273
+  }
274
+
275
+  // 重置搜索
276
+  function handleReset () {
277
+    props.form.resetFields();
278
+    setTime('')
279
+    getList({ pageNum: 1, pageSize: 10 })
280
+  }
281
+
282
+  // 时间回调
283
+  function timeOnChange(date, dateString) {
284
+    console.log(date, dateString)
285
+    setTime(date)
286
+  }
287
+
288
+
289
+  const { getFieldDecorator } = props.form
290
+  return (
291
+
292
+    <>
293
+      {/* style={{ display: 'none' }} */}
294
+      <div id="qrcode"></div>
295
+      <Form layout="inline" onSubmit={e => handleSubmit(e)}>
296
+        <Form.Item>
297
+          {getFieldDecorator('cityId')(
298
+            <SelectCity />,
299
+          )}
300
+        </Form.Item>
301
+        <Form.Item>
302
+          {getFieldDecorator('buildingId')(
303
+            <BuildSelect />,
304
+          )}
305
+        </Form.Item>
306
+        <Form.Item>
307
+          {getFieldDecorator('title')(
308
+            <Input
309
+              prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
310
+              placeholder="请输入标题"
311
+            />,
312
+          )}
313
+        </Form.Item>
314
+        <Form.Item>
315
+          {getFieldDecorator('time')(
316
+            <DatePicker onChange={timeOnChange}/>,
317
+          )}
318
+        </Form.Item>
319
+        <Form.Item>
320
+          <AuthButton name="admin.buildingDynamic.search" noRight={null}>
321
+            <Button type="primary" htmlType="submit" className={styles.searchBtn}>
322
+              搜索
323
+            </Button>
324
+          </AuthButton>
325
+          <Button style={{ marginLeft: 8 }} onClick={handleReset}>
326
+            重置
327
+            </Button>
328
+        </Form.Item>
329
+      </Form>
330
+      <AuthButton name="admin.buildingDynamic.add.post" noRight={null}>
331
+        <Button type="danger" className={styles.addBtn} onClick={toAddHouse()}>新增</Button>
332
+      </AuthButton>
333
+      <Table
334
+        // onRow={record => {
335
+        //   return {
336
+        //     onClick: getActivityDetail(record.dynamicId),
337
+        //   };
338
+        // }}
339
+       dataSource={data.list} columns={columns} pagination={false} rowKey="activityList" />
340
+      <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
341
+        <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current}/>
342
+      </div>
343
+    </>
344
+  )
345
+}
346
+const WrappedHeader = Form.create({ name: 'header' })(header);
347
+
348
+export default WrappedHeader

+ 0
- 0
src/pages/roomManager/roomInfo/roomInfo.jsx ファイルの表示


+ 0
- 0
src/pages/roomManager/saleBatch/shareRecord.jsx ファイルの表示


+ 0
- 0
src/pages/roomManager/saleBatch/visitRecord.jsx ファイルの表示


+ 13
- 1
src/services/apis.js ファイルの表示

@@ -1082,5 +1082,17 @@ export default {
1082 1082
      url: `${amapPrefix}/place/around`,
1083 1083
      method: 'GET',
1084 1084
    },
1085
- }
1085
+ },
1086
+ house: {
1087
+  list: {
1088
+    method: 'GET',
1089
+    url: `${prefix}/iBuildingDynamicList`,
1090
+    action: 'admin.iBuildingDynamicList.get',
1091
+  },
1092
+  taHousingResources: {
1093
+    method: 'GET',
1094
+    url: `${prefix}/taHousingResources`,
1095
+    action: 'admin.taHousingResources.id.get',
1096
+  }
1097
+ },
1086 1098
 }