瀏覽代碼

modal width

xujing 5 年之前
父節點
當前提交
552cf78bcc
共有 1 個檔案被更改,包括 21 行新增15 行删除
  1. 21
    15
      src/pages/staff/components/BatchAssistConsultant.jsx

+ 21
- 15
src/pages/staff/components/BatchAssistConsultant.jsx 查看文件

20
     super(props);
20
     super(props);
21
     // console.log(props, 'props')
21
     // console.log(props, 'props')
22
     this.state = {
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
     this.props.onCancel()
42
     this.props.onCancel()
43
   }
43
   }
44
 
44
 
45
-  getUserList(params){
45
+  getUserList(params) {
46
     console.log('params: ', params)
46
     console.log('params: ', params)
47
     if (params.buildingId === '' || params.buildingId === null || params.buildingId === undefined) {
47
     if (params.buildingId === '' || params.buildingId === null || params.buildingId === undefined) {
48
       return
48
       return
51
     request({ ...apis.customer.buildingConsultant, params: { ...params } }).then(res => {
51
     request({ ...apis.customer.buildingConsultant, params: { ...params } }).then(res => {
52
       this.setState({ dataSource: res })
52
       this.setState({ dataSource: res })
53
     }).catch(err => {
53
     }).catch(err => {
54
-      
54
+
55
     })
55
     })
56
   }
56
   }
57
 
57
 
63
     });
63
     });
64
   };
64
   };
65
 
65
 
66
-   // 分页
66
+  // 分页
67
   onChange(pageNum) {
67
   onChange(pageNum) {
68
 
68
 
69
     this.getUserList({ pageNumber: pageNum, pageSize: 5, buildingId: this.state.visibleData.buildingId })
69
     this.getUserList({ pageNumber: pageNum, pageSize: 5, buildingId: this.state.visibleData.buildingId })
80
         title: '姓名',
80
         title: '姓名',
81
         dataIndex: 'userName',
81
         dataIndex: 'userName',
82
         key: 'userName',
82
         key: 'userName',
83
+        width: 120,
83
       },
84
       },
84
       {
85
       {
85
         title: '电话',
86
         title: '电话',
86
         dataIndex: 'phone',
87
         dataIndex: 'phone',
87
         key: 'phone',
88
         key: 'phone',
89
+        width: 150,
88
       },
90
       },
89
       {
91
       {
90
         title: '部门',
92
         title: '部门',
91
         dataIndex: 'department',
93
         dataIndex: 'department',
92
         key: 'department',
94
         key: 'department',
95
+        width: 130,
93
       },
96
       },
94
       {
97
       {
95
         title: '岗位',
98
         title: '岗位',
96
         dataIndex: 'position',
99
         dataIndex: 'position',
97
         key: 'position',
100
         key: 'position',
101
+        width: 120,
98
       },
102
       },
99
       {
103
       {
100
         title: '操作',
104
         title: '操作',
101
         dataIndex: 'personId',
105
         dataIndex: 'personId',
102
         key: 'personId',
106
         key: 'personId',
107
+        width: 80,
103
         // eslint-disable-next-line no-nested-ternary
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
     return (
112
     return (
107
       <>
113
       <>
108
         <Modal
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
   }