Baozhangchao 3 years ago
parent
commit
6cde3779c9

+ 37
- 37
src/components/GlobalHeader/ShowPassword.jsx View File

39
   return (
39
   return (
40
     <>
40
     <>
41
       <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={(e) => handleSubmit(e)}>
41
       <Form labelCol={{ span: 7 }} wrapperCol={{ span: 12 }} onSubmit={(e) => handleSubmit(e)}>
42
-      <Form.Item label="请输入旧密码">
43
-            {getFieldDecorator('originalPassword', {
44
-              rules: [{ required: true, message: '请输入旧密码' }],
45
-            })(
46
-              <Input
47
-                prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />}
48
-                type="password"
49
-                placeholder="Password"
50
-              />,
51
-            )}
52
-          </Form.Item>
42
+        <Form.Item label="请输入旧密码">
43
+          {getFieldDecorator('originalPassword', {
44
+            rules: [{ required: true, message: '请输入旧密码' }],
45
+          })(
46
+            <Input
47
+              prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />}
48
+              type="password"
49
+              placeholder="Password"
50
+            />,
51
+          )}
52
+        </Form.Item>
53
         <Form.Item label="新密码">
53
         <Form.Item label="新密码">
54
-            {getFieldDecorator('newPassword', {
55
-              rules: [{ required: true, message: '请输入新密码' }],
56
-            })(
57
-              <Input
58
-                prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />}
59
-                type="password"
60
-                placeholder="Password"
61
-              />,
62
-            )}
63
-          </Form.Item>
64
-          <Form.Item label="确认新密码">
65
-            {getFieldDecorator('newPasswordToo', {
66
-              rules: [{ required: true, message: '请确认新密码' }],
67
-            })(
68
-              <Input
69
-                prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />}
70
-                type="password"
71
-                placeholder="Password"
72
-              />,
73
-            )}
74
-          </Form.Item>
75
-          <Form.Item>
76
-            <Button type="primary" htmlType="submit">
77
-                确定
78
-            </Button>
79
-          </Form.Item>
54
+          {getFieldDecorator('newPassword', {
55
+            rules: [{ required: true, message: '请输入新密码' }],
56
+          })(
57
+            <Input
58
+              prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />}
59
+              type="password"
60
+              placeholder="Password"
61
+            />,
62
+          )}
63
+        </Form.Item>
64
+        <Form.Item label="确认新密码">
65
+          {getFieldDecorator('newPasswordToo', {
66
+            rules: [{ required: true, message: '请确认新密码' }],
67
+          })(
68
+            <Input
69
+              prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />}
70
+              type="password"
71
+              placeholder="Password"
72
+            />,
73
+          )}
74
+        </Form.Item>
75
+        <Form.Item>
76
+          <Button type="primary" htmlType="submit">
77
+            确定
78
+          </Button>
79
+        </Form.Item>
80
       </Form>
80
       </Form>
81
     </>
81
     </>
82
   )
82
   )

+ 19
- 6
src/pages/building/Edit/Panorama/index.jsx View File

7
 import List from './List';
7
 import List from './List';
8
 
8
 
9
 export default props => {
9
 export default props => {
10
-  const { history ,isPublish} = props;
10
+
11
+
12
+  const openNotificationWithIcon = (type, message) => {
13
+    notification[type]({
14
+      message,
15
+      description:
16
+        '',
17
+    });
18
+  }
19
+
20
+  const { history, isPublish } = props;
11
   const { query } = history.location;
21
   const { query } = history.location;
12
   const { id } = query;
22
   const { id } = query;
13
   const [loading, setLoading] = useState(false);
23
   const [loading, setLoading] = useState(false);
16
   const [panoramaList, setPanoramaList] = useState([]);
26
   const [panoramaList, setPanoramaList] = useState([]);
17
 
27
 
18
   useEffect(() => {
28
   useEffect(() => {
29
+    getPanoramaList();
30
+
19
     console.log(props);
31
     console.log(props);
20
     getList();
32
     getList();
21
-    getPanoramaList();
22
   }, [id]);
33
   }, [id]);
23
 
34
 
24
   //获取户型列表
35
   //获取户型列表
26
     // 网路请求
37
     // 网路请求
27
     request({ ...apis.paorama.panoramaApartList, params: { buildingId: id } })
38
     request({ ...apis.paorama.panoramaApartList, params: { buildingId: id } })
28
       .then(res => {
39
       .then(res => {
40
+
29
         setPanoramaList(res);
41
         setPanoramaList(res);
30
-      })
31
-      .catch(err => {
32
-        this.openNotificationWithIcon('error', err);
42
+      }).catch(err => {
43
+
44
+        openNotificationWithIcon('error', err);
33
       });
45
       });
34
   }
46
   }
35
 
47
 
48
+
36
   function getList(params) {
49
   function getList(params) {
37
     setLoading(true);
50
     setLoading(true);
38
     // 网路请求
51
     // 网路请求
73
   return (
86
   return (
74
     <div>
87
     <div>
75
       <div>
88
       <div>
76
-       {!isPublish&& <AuthButton name="building.panorama.add">
89
+        {!isPublish && <AuthButton name="building.panorama.add">
77
           <Button type="primary" onClick={() => setVisible(true)}>
90
           <Button type="primary" onClick={() => setVisible(true)}>
78
             新增全景
91
             新增全景
79
           </Button>
92
           </Button>

+ 16
- 16
src/pages/building/Edit/index.jsx View File

1
-import React, {useState} from 'react'
1
+import React, { useState } from 'react'
2
 import { Tabs, Card } from 'antd'
2
 import { Tabs, Card } from 'antd'
3
 import Poster from '@/components/Poster'
3
 import Poster from '@/components/Poster'
4
 import Share from '@/components/Share'
4
 import Share from '@/components/Share'
18
   const { history } = props
18
   const { history } = props
19
   const { query } = history.location
19
   const { query } = history.location
20
   const { id } = query
20
   const { id } = query
21
-  const [institutionId,setInstitutionId] = useState()
22
-  const [marketingCode,setMarketingCode] = useState('')
23
-  const [isPublish,setIsPublish] = useState(false)
21
+  const [institutionId, setInstitutionId] = useState()
22
+  const [marketingCode, setMarketingCode] = useState('')
23
+  const [isPublish, setIsPublish] = useState(false)
24
   const target = { id, type: 'building' }
24
   const target = { id, type: 'building' }
25
 
25
 
26
   return (
26
   return (
27
     <Card>
27
     <Card>
28
       <Tabs defaultActiveKey="1">
28
       <Tabs defaultActiveKey="1">
29
         <TabPane tab="基础信息" key="1">
29
         <TabPane tab="基础信息" key="1">
30
-          <div className={styles['tab-wrapper']} style={{maxWidth: 1000}}>
31
-            <Basic {...props}  setMarketingCode={(e)=>setMarketingCode(e)} institutionIdChange={(e)=>setInstitutionId(e)} isPublish={isPublish} setIsPublish={(e)=>setIsPublish(e)}/>
30
+          <div className={styles['tab-wrapper']} style={{ maxWidth: 1000 }}>
31
+            <Basic {...props} setMarketingCode={(e) => setMarketingCode(e)} institutionIdChange={(e) => setInstitutionId(e)} isPublish={isPublish} setIsPublish={(e) => setIsPublish(e)} />
32
           </div>
32
           </div>
33
         </TabPane>
33
         </TabPane>
34
         <TabPane tab="户型设置" key="2">
34
         <TabPane tab="户型设置" key="2">
35
           <div className={styles['tab-wrapper']}>
35
           <div className={styles['tab-wrapper']}>
36
-            <Apartment {...props} isPublish={isPublish}/>
36
+            <Apartment {...props} isPublish={isPublish} />
37
           </div>
37
           </div>
38
         </TabPane>
38
         </TabPane>
39
         <TabPane tab="项目相册" key="3">
39
         <TabPane tab="项目相册" key="3">
40
           <div className={styles['tab-wrapper']}>
40
           <div className={styles['tab-wrapper']}>
41
-            <AlbumList {...props} isPublish={isPublish}/>
41
+            <AlbumList {...props} isPublish={isPublish} />
42
           </div>
42
           </div>
43
         </TabPane>
43
         </TabPane>
44
         <TabPane tab="全景照片" key="4">
44
         <TabPane tab="全景照片" key="4">
48
         </TabPane>
48
         </TabPane>
49
         <TabPane tab="项目动态" key="8">
49
         <TabPane tab="项目动态" key="8">
50
           <div className={styles['tab-wrapper']}>
50
           <div className={styles['tab-wrapper']}>
51
-            <News {...props} isPublish={isPublish}/>
51
+            <News {...props} isPublish={isPublish} />
52
           </div>
52
           </div>
53
         </TabPane>
53
         </TabPane>
54
         <TabPane tab="特价房源" key="9">
54
         <TabPane tab="特价房源" key="9">
55
           <div className={styles['tab-wrapper']}>
55
           <div className={styles['tab-wrapper']}>
56
-            <SpecialRoom {...props} isPublish={isPublish}/>
56
+            <SpecialRoom {...props} isPublish={isPublish} />
57
           </div>
57
           </div>
58
         </TabPane>
58
         </TabPane>
59
         <TabPane tab="渠道设置" key="7">
59
         <TabPane tab="渠道设置" key="7">
60
-          <div className={styles['tab-wrapper']} style={{maxWidth: '800px'}}>
61
-            <Channel {...props} institutionId={institutionId} isPublish={isPublish}/>
60
+          <div className={styles['tab-wrapper']} style={{ maxWidth: '800px' }}>
61
+            <Channel {...props} institutionId={institutionId} isPublish={isPublish} />
62
           </div>
62
           </div>
63
         </TabPane>
63
         </TabPane>
64
         <TabPane tab="驻场设置" key="10">
64
         <TabPane tab="驻场设置" key="10">
65
-          <div className={styles['tab-wrapper']} style={{maxWidth: '1200px'}}>
66
-            <OnSiteService {...props} marketingCode={marketingCode} isPublish={isPublish}/>
65
+          <div className={styles['tab-wrapper']} style={{ maxWidth: '1200px' }}>
66
+            <OnSiteService {...props} marketingCode={marketingCode} isPublish={isPublish} />
67
           </div>
67
           </div>
68
         </TabPane>
68
         </TabPane>
69
         <TabPane tab="海报图片" key="5">
69
         <TabPane tab="海报图片" key="5">
70
-          <Poster target={target} rights="building.poster.save" {...props} submitBtn={!isPublish}  />
70
+          <Poster target={target} rights="building.poster.save" {...props} submitBtn={!isPublish} />
71
         </TabPane>
71
         </TabPane>
72
         <TabPane tab="分享设置" key="6">
72
         <TabPane tab="分享设置" key="6">
73
-          <div className={styles['tab-wrapper']} style={{maxWidth: '800px'}}>
73
+          <div className={styles['tab-wrapper']} style={{ maxWidth: '800px' }}>
74
             <Share target={target} rights="building.share.save" {...props} submitBtn={!isPublish} />
74
             <Share target={target} rights="building.share.save" {...props} submitBtn={!isPublish} />
75
           </div>
75
           </div>
76
         </TabPane>
76
         </TabPane>