Browse Source

modal width

xujing 5 years ago
parent
commit
552cf78bcc
1 changed files with 21 additions and 15 deletions
  1. 21
    15
      src/pages/staff/components/BatchAssistConsultant.jsx

+ 21
- 15
src/pages/staff/components/BatchAssistConsultant.jsx View File

@@ -20,8 +20,8 @@ class ModalAttribution extends React.Component {
20 20
     super(props);
21 21
     // console.log(props, 'props')
22 22
     this.state = {
23
-       dataSource: { records: [] },
24
-       visibleData: { visible: false, buildingId: '' },
23
+      dataSource: { records: [] },
24
+      visibleData: { visible: false, buildingId: '' },
25 25
     }
26 26
   }
27 27
 
@@ -42,7 +42,7 @@ class ModalAttribution extends React.Component {
42 42
     this.props.onCancel()
43 43
   }
44 44
 
45
-  getUserList(params){
45
+  getUserList(params) {
46 46
     console.log('params: ', params)
47 47
     if (params.buildingId === '' || params.buildingId === null || params.buildingId === undefined) {
48 48
       return
@@ -51,7 +51,7 @@ class ModalAttribution extends React.Component {
51 51
     request({ ...apis.customer.buildingConsultant, params: { ...params } }).then(res => {
52 52
       this.setState({ dataSource: res })
53 53
     }).catch(err => {
54
-      
54
+
55 55
     })
56 56
   }
57 57
 
@@ -63,7 +63,7 @@ class ModalAttribution extends React.Component {
63 63
     });
64 64
   };
65 65
 
66
-   // 分页
66
+  // 分页
67 67
   onChange(pageNum) {
68 68
 
69 69
     this.getUserList({ pageNumber: pageNum, pageSize: 5, buildingId: this.state.visibleData.buildingId })
@@ -80,41 +80,47 @@ class ModalAttribution extends React.Component {
80 80
         title: '姓名',
81 81
         dataIndex: 'userName',
82 82
         key: 'userName',
83
+        width: 120,
83 84
       },
84 85
       {
85 86
         title: '电话',
86 87
         dataIndex: 'phone',
87 88
         key: 'phone',
89
+        width: 150,
88 90
       },
89 91
       {
90 92
         title: '部门',
91 93
         dataIndex: 'department',
92 94
         key: 'department',
95
+        width: 130,
93 96
       },
94 97
       {
95 98
         title: '岗位',
96 99
         dataIndex: 'position',
97 100
         key: 'position',
101
+        width: 120,
98 102
       },
99 103
       {
100 104
         title: '操作',
101 105
         dataIndex: 'personId',
102 106
         key: 'personId',
107
+        width: 80,
103 108
         // eslint-disable-next-line no-nested-ternary
104
-        render: (_, record) => <>{record.userId !== this.props.userId ? <Button type="danger" onClick={() => this.submitGm(record)}>确定</Button> : ''}</>, },
109
+        render: (_, record) => <>{record.userId !== this.props.userId ? <Button type="danger" onClick={() => this.submitGm(record)}>确定</Button> : ''}</>,
110
+      },
105 111
     ]
106 112
     return (
107 113
       <>
108 114
         <Modal
109
-            title="分配置业顾问"
110
-            width={500}
111
-            destroyOnClose="true"
112
-            footer={null}
113
-            visible={this.state.visibleData.visible}
114
-            onCancel={(e) => this.handleCancel(e)}
115
-          >
116
-            <Table rowKey="userId" dataSource={this.state.dataSource.records} columns={columns} pagination={{pageSize: 5, total: this.state.dataSource.total, onChange: e => this.onChange(e) }} />
117
-          </Modal>
115
+          title="分配置业顾问"
116
+          width={600}
117
+          destroyOnClose="true"
118
+          footer={null}
119
+          visible={this.state.visibleData.visible}
120
+          onCancel={(e) => this.handleCancel(e)}
121
+        >
122
+          <Table rowKey="userId" dataSource={this.state.dataSource.records} columns={columns} pagination={{ pageSize: 5, total: this.state.dataSource.total, onChange: e => this.onChange(e) }} />
123
+        </Modal>
118 124
       </>
119 125
     );
120 126
   }