Baozhangchao 3 년 전
부모
커밋
6cde3779c9
3개의 변경된 파일72개의 추가작업 그리고 59개의 파일을 삭제
  1. 37
    37
      src/components/GlobalHeader/ShowPassword.jsx
  2. 19
    6
      src/pages/building/Edit/Panorama/index.jsx
  3. 16
    16
      src/pages/building/Edit/index.jsx

+ 37
- 37
src/components/GlobalHeader/ShowPassword.jsx 파일 보기

@@ -39,44 +39,44 @@ function passwodForm(props) {
39 39
   return (
40 40
     <>
41 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 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 80
       </Form>
81 81
     </>
82 82
   )

+ 19
- 6
src/pages/building/Edit/Panorama/index.jsx 파일 보기

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

+ 16
- 16
src/pages/building/Edit/index.jsx 파일 보기

@@ -1,4 +1,4 @@
1
-import React, {useState} 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,27 +18,27 @@ export default (props) => {
18 18
   const { history } = props
19 19
   const { query } = history.location
20 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 24
   const target = { id, type: 'building' }
25 25
 
26 26
   return (
27 27
     <Card>
28 28
       <Tabs defaultActiveKey="1">
29 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 32
           </div>
33 33
         </TabPane>
34 34
         <TabPane tab="户型设置" key="2">
35 35
           <div className={styles['tab-wrapper']}>
36
-            <Apartment {...props} isPublish={isPublish}/>
36
+            <Apartment {...props} isPublish={isPublish} />
37 37
           </div>
38 38
         </TabPane>
39 39
         <TabPane tab="项目相册" key="3">
40 40
           <div className={styles['tab-wrapper']}>
41
-            <AlbumList {...props} isPublish={isPublish}/>
41
+            <AlbumList {...props} isPublish={isPublish} />
42 42
           </div>
43 43
         </TabPane>
44 44
         <TabPane tab="全景照片" key="4">
@@ -48,29 +48,29 @@ export default (props) => {
48 48
         </TabPane>
49 49
         <TabPane tab="项目动态" key="8">
50 50
           <div className={styles['tab-wrapper']}>
51
-            <News {...props} isPublish={isPublish}/>
51
+            <News {...props} isPublish={isPublish} />
52 52
           </div>
53 53
         </TabPane>
54 54
         <TabPane tab="特价房源" key="9">
55 55
           <div className={styles['tab-wrapper']}>
56
-            <SpecialRoom {...props} isPublish={isPublish}/>
56
+            <SpecialRoom {...props} isPublish={isPublish} />
57 57
           </div>
58 58
         </TabPane>
59 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 62
           </div>
63 63
         </TabPane>
64 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 67
           </div>
68 68
         </TabPane>
69 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 71
         </TabPane>
72 72
         <TabPane tab="分享设置" key="6">
73
-          <div className={styles['tab-wrapper']} style={{maxWidth: '800px'}}>
73
+          <div className={styles['tab-wrapper']} style={{ maxWidth: '800px' }}>
74 74
             <Share target={target} rights="building.share.save" {...props} submitBtn={!isPublish} />
75 75
           </div>
76 76
         </TabPane>