Pārlūkot izejas kodu

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents-admin-manager into dev

张延森 5 gadus atpakaļ
vecāks
revīzija
00c9cfdee8

+ 7
- 1
src/pages/activity/ActivityList.jsx Parādīt failu

@@ -346,7 +346,13 @@ const header = props => {
346 346
       <AuthButton name="admin.buildingDynamic.add.post" noRight={null}>
347 347
         <Button type="danger" className={styles.addBtn} onClick={toEditGoods()}>新增</Button>
348 348
       </AuthButton>
349
-      <Table dataSource={data.list} columns={columns} pagination={false} rowKey="activityList" />
349
+      <Table
350
+        onRow={record => {
351
+          return {
352
+            onClick: getActivityDetail(record.dynamicId),
353
+          };
354
+        }}
355
+       dataSource={data.list} columns={columns} pagination={false} rowKey="activityList" />
350 356
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
351 357
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={e => changePageNum(e)} current={data.current}/>
352 358
       </div>

+ 8
- 2
src/pages/activity/drainage/DrainageList.jsx Parādīt failu

@@ -510,7 +510,7 @@ const header = (props) => {
510 510
         <AuthButton name="admin.taDrainage.add.post" noRight={null}>
511 511
           <Button type="danger" className={styles.addBtn} onClick={showModal}>新增</Button>
512 512
         </AuthButton>
513
-          <span style={{ color: '#66B3FF', cursor: 'pointer', marginLeft: 20 }} onClick={openIndexImg}>优质案例</span>
513
+          <span style={{ color: '#66B3FF', cursor: 'pointer', margin: '20px',display:'inline-block' }} onClick={openIndexImg}>优质案例</span>
514 514
         <Modal
515 515
           title={title}
516 516
 
@@ -522,7 +522,13 @@ const header = (props) => {
522 522
         >
523 523
           <Formss formsDate={formsdate} />
524 524
         </Modal>
525
-        <Table columns={columns} dataSource={datas.records} pagination={false} rowKey="drainageList" />
525
+        <Table 
526
+        onRow={record => {
527
+          return {
528
+            onClick: toDrainageDetail(record.drainageId),
529
+          };
530
+        }}
531
+        columns={columns} dataSource={datas.records} pagination={false} rowKey="drainageList" />
526 532
         <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
527 533
           <Pagination showQuickJumper defaultCurrent={1} total={datas.total} onChange={(e) => changePageNum(e)} current={datas.current} />
528 534
         </div>

+ 6
- 1
src/pages/activity/groupActivity/list.jsx Parādīt failu

@@ -314,7 +314,12 @@ const header = props => {
314 314
       <AuthButton name="admin.taShareActivity.post" noRight={null}>
315 315
         <Button type="danger" className={styles.addBtn} onClick={toEditActivity()}>新增</Button>
316 316
       </AuthButton>
317
-      <Table style={{marginTop:'30px'}} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
317
+      <Table onRow={record => {
318
+          return {
319
+            onClick: getActivityDetail(record.groupActivityId),
320
+          };
321
+        }}
322
+        style={{marginTop:'30px'}} dataSource={data.records} columns={columns} pagination={false} rowKey="activityList" />
318 323
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
319 324
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current} />
320 325
       </div>

+ 7
- 1
src/pages/activity/helpActivity/list.jsx Parādīt failu

@@ -308,7 +308,13 @@ const handleSubmit = (e, props) => {
308 308
       <AuthButton name="admin.help.add.post" noRight={null}>
309 309
         <Button name="admin.helpActivity.add.post" noRight={null} type="danger" className={styles.addBtn} onClick={toEditGoods()}>新增</Button>
310 310
       </AuthButton>
311
-      <Table dataSource={data.records} columns={columns} pagination={false} rowKey="activityList"/>
311
+      <Table 
312
+        onRow={record => {
313
+          return {
314
+            onClick: getActivityDetail(record.helpActivityId),
315
+          };
316
+        }}
317
+      dataSource={data.records} columns={columns} pagination={false} rowKey="activityList"/>
312 318
       <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: '30px' }}>
313 319
         <Pagination showQuickJumper defaultCurrent={1} total={data.total} onChange={changePageNum} current={data.current}/>
314 320
       </div>

+ 17
- 6
src/pages/customer/customerlist/index.jsx Parādīt failu

@@ -221,7 +221,7 @@ function body(props) {
221 221
       key: 'picture',
222 222
       align: 'center',
223 223
       width: '15%',
224
-      render: (_, record) => <Avatar shape="square" src={customerType === 'private' ? record.picture : record.avatarurl} size={64} icon="user" />,
224
+      render: (_, record) => <Avatar shape="square" style={{color: 'blue',cursor: 'pointer'}} onClick={() => publicCustomerDetail(record)} src={customerType === 'private' ? record.picture : record.avatarurl} size={64} icon="user" />,
225 225
     },
226 226
     {
227 227
       title: '姓名',
@@ -230,7 +230,7 @@ function body(props) {
230 230
       align: 'center',
231 231
       width: '10%',
232 232
       // eslint-disable-next-line no-nested-ternary
233
-      render: (_, record) => <><span>{customerType === 'private' ? record.name : record.nickname}</span></>,
233
+      render: (_, record) => <><span style={{color: 'blue',cursor: 'pointer'}} onClick={() => publicCustomerDetail(record)} >{customerType === 'private' ? record.name : record.nickname}</span></>,
234 234
     },
235 235
     {
236 236
       title: '电话',
@@ -283,7 +283,7 @@ function body(props) {
283 283
       key: 'picture',
284 284
       align: 'center',
285 285
       width: '15%',
286
-      render: (_, record) => <Avatar shape="square" src={customerType === 'private' ? record.picture : record.avatarurl} size={64} icon="user" />,
286
+      render: (_, record) => <Avatar shape="square" style={{color: 'blue',cursor: 'pointer'}} onClick={() => toCustomerDateil(record)} src={customerType === 'private' ? record.picture : record.avatarurl} size={64} icon="user" />,
287 287
     },
288 288
     {
289 289
       title: '姓名',
@@ -292,7 +292,7 @@ function body(props) {
292 292
       align: 'center',
293 293
       width: '10%',
294 294
       // eslint-disable-next-line no-nested-ternary
295
-      render: (_, record) => <><span>{customerType === 'private' ? record.name : record.nickname}</span></>,
295
+      render: (_, record) => <><span style={{color: 'blue',cursor: 'pointer'}} onClick={() => toCustomerDateil(record)}>{customerType === 'private' ? record.name : record.nickname}</span></>,
296 296
     },
297 297
     {
298 298
       title: '电话',
@@ -449,8 +449,19 @@ function body(props) {
449 449
           </Radio.Group>
450 450
       </div>
451 451
       {customerType === 'private' ? 
452
-        <Table dataSource={dataSource.records} columns={privateColumns} pagination={{ total: dataSource.total, onChange }} rowKey="customerList" /> :
453
-        <Table dataSource={dataSource.records} columns={publicColumns} pagination={{ total: dataSource.total, onChange }} rowKey="customerList" /> 
452
+        <Table onRow={record => {
453
+          return {
454
+            onClick: () => toCustomerDateil(record),
455
+          };
456
+        }}
457
+        dataSource={dataSource.records} columns={privateColumns} pagination={{ total: dataSource.total, onChange }} rowKey="customerList" /> :
458
+        <Table 
459
+        onRow={record => {
460
+          return {
461
+            onClick: () => publicCustomerDetail(record),
462
+          };
463
+        }}
464
+        dataSource={dataSource.records} columns={publicColumns} pagination={{ total: dataSource.total, onChange }} rowKey="customerList" /> 
454 465
       }
455 466
       
456 467
       {/* 调整归属 */}

+ 2
- 4
src/pages/staff/list/RoleList.jsx Parādīt failu

@@ -68,10 +68,8 @@ const [data, setData] = useState({ data: [] })
68 68
 
69 69
 
70 70
 function stop(ids, status) {
71
-  const title = status === 1 ? '停用后角色对应账号也会被自动停用,请谨慎操作' : '是否启用该角色';
72
-
73 71
   Modal.confirm({
74
-    title: title,
72
+    title: "删除后角色对应账号权限也会被自动停用,请谨慎操作",
75 73
     okText: '确认',
76 74
     cancelText: '取消',
77 75
     onOk () {
@@ -120,7 +118,7 @@ const columns = [
120 118
 
121 119
     render: (text, record) => <>
122 120
     <AuthButton name="admin.role.publish" noRight={null}>
123
-      <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={() => stop(record.roleId, record.status)}>{ record.status === 1 ? '停用' : '启用' }
121
+      <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer' }} onClick={() => stop(record.roleId, record.status)}>{ record.status === 1 ? '删除' : '' }
124 122
       <Icon type="stop" className={styles.shoppingCart} style={{ fontSize: 14 }}/>
125 123
       </span>
126 124
       </AuthButton>

+ 5
- 0
src/pages/staff/list/editStaff.jsx Parādīt failu

@@ -72,6 +72,11 @@ const Edit = (props) => {
72 72
       userData.buildingIds = newBuildings
73 73
   }
74 74
 
75
+  if(userData.roleIds && roleData.length > 0){
76
+    const newRoleIds = userData.roleIds.filter(x => roleData.filter(it => it.roleId === x)[0])
77
+      userData.roleIds = newRoleIds
78
+  }
79
+
75 80
   useEffect(() => {
76 81
     getTagList();
77 82
     getRoleList();