Your Name 3 years ago
parent
commit
ece538c134

+ 36
- 19
src/components/XForm/ImageListUpload.jsx View File

15
   };
15
   };
16
 
16
 
17
   getFileList = () => {
17
   getFileList = () => {
18
-    return (this.props.value || []).map((img, inx) => ({ uid: inx, url: getImgURL(img), status: 'done' }))
19
-  }
18
+    return (this.props.value || []).map((img, inx) => ({
19
+      uid: inx,
20
+      url: getImgURL(img),
21
+      status: 'done',
22
+    }));
23
+  };
20
 
24
 
21
   handleCancel = () => this.setState({ previewVisible: false });
25
   handleCancel = () => this.setState({ previewVisible: false });
22
 
26
 
23
   handlePreview = async file => {
27
   handlePreview = async file => {
24
     this.setState({
28
     this.setState({
25
-      previewImage: file.url ,
29
+      previewImage: file.url,
26
       previewVisible: true,
30
       previewVisible: true,
27
     });
31
     });
28
   };
32
   };
29
 
33
 
30
-  handleChange = (e) => {
31
-    if (e.file.status === "uploading") {
34
+  handleChange = e => {
35
+    if (e.file.status === 'uploading') {
32
       this.setState({ loading: true });
36
       this.setState({ loading: true });
33
       return;
37
       return;
34
     }
38
     }
35
-console.log(e,'handleChange')
39
+    console.log(e, 'handleChange');
36
     // const fileList = (this.props.value || []).filter(x => x != e.file.url);
40
     // const fileList = (this.props.value || []).filter(x => x != e.file.url);
37
     // this.props.onChange(fileList);
41
     // this.props.onChange(fileList);
38
 
42
 
39
     // console.log('删除图片触发了', e.file)
43
     // console.log('删除图片触发了', e.file)
40
     if (e.file.status === 'removed') {
44
     if (e.file.status === 'removed') {
41
-      console.log(e,'handleChange22')
42
-      const fileList = (this.props.value || []).filter(x => getImgURL(x) != e.file.url);
43
-      this.props.onChange(fileList);
45
+      console.log(e, 'handleChange22');
46
+
47
+      Modal.confirm({
48
+        title: '确认要删除该图片吗?',
49
+        okText: '确认',
50
+        okType: 'danger',
51
+        cancelText: '取消',
52
+        onOk() {
53
+          const fileList = (this.props.value || []).filter(x => getImgURL(x) != e.file.url);
54
+          this.props.onChange(fileList);
55
+        },
56
+      });
44
     }
57
     }
45
 
58
 
46
-    if (e.file.status === "done") {
59
+    if (e.file.status === 'done') {
47
       this.setState({
60
       this.setState({
48
         loading: false,
61
         loading: false,
49
-      })
62
+      });
50
 
63
 
51
       if (e.file.response && e.file.response.url) {
64
       if (e.file.response && e.file.response.url) {
52
         if (typeof this.props.onChange === 'function') {
65
         if (typeof this.props.onChange === 'function') {
53
-          const fileList = this.getFileList()
54
-          this.props.onChange([...fileList || [], e.file.response.url]);
66
+          const fileList = this.getFileList();
67
+          this.props.onChange([...(fileList || []), e.file.response.url]);
55
         }
68
         }
56
       }
69
       }
57
     }
70
     }
58
   };
71
   };
59
 
72
 
60
-  handleUploadSucess = (url) => {
73
+  handleUploadSucess = url => {
61
     this.setState({ loading: false });
74
     this.setState({ loading: false });
62
     if (typeof this.props.onChange === 'function') {
75
     if (typeof this.props.onChange === 'function') {
63
       const fileList = this.props.value || [];
76
       const fileList = this.props.value || [];
64
       this.props.onChange([...fileList, url]);
77
       this.props.onChange([...fileList, url]);
65
     }
78
     }
66
-  }
79
+  };
67
 
80
 
68
   render() {
81
   render() {
69
     const { previewVisible, previewImage } = this.state;
82
     const { previewVisible, previewImage } = this.state;
71
 
84
 
72
     const uploadButton = (
85
     const uploadButton = (
73
       <div>
86
       <div>
74
-        <Icon style={{ fontSize: '2em', color: '#aaa' }} type={this.state.loading ? "loading" : "plus"}  />
87
+        <Icon
88
+          style={{ fontSize: '2em', color: '#aaa' }}
89
+          type={this.state.loading ? 'loading' : 'plus'}
90
+        />
75
       </div>
91
       </div>
76
     );
92
     );
77
     return (
93
     return (
82
           fileList={fileList}
98
           fileList={fileList}
83
           onPreview={this.handlePreview}
99
           onPreview={this.handlePreview}
84
           onChange={this.handleChange}
100
           onChange={this.handleChange}
85
-          { ...uploaderProps }
101
+          {...uploaderProps}
86
           onSuccess={this.handleUploadSucess}
102
           onSuccess={this.handleUploadSucess}
87
         >
103
         >
88
           {/* unlimited 表示上传无限制数量 */}
104
           {/* unlimited 表示上传无限制数量 */}
89
-          {(this.props.unlimited && uploadButton) || ((fileList || images).length >= 8 ? null : uploadButton)}
105
+          {(this.props.unlimited && uploadButton) ||
106
+            ((fileList || images).length >= 8 ? null : uploadButton)}
90
         </Upload>
107
         </Upload>
91
-        <Modal visible={previewVisible} footer={null} onCancel={this.handleCancel}>
108
+        <Modal id={'ImageListUpload-preview'} visible={previewVisible} footer={null} onCancel={this.handleCancel}>
92
           <img alt="example" style={{ width: '100%' }} src={getImgURL(previewImage)} />
109
           <img alt="example" style={{ width: '100%' }} src={getImgURL(previewImage)} />
93
         </Modal>
110
         </Modal>
94
       </div>
111
       </div>

+ 1
- 1
src/pages/activity/groupRoomActivity/detail.jsx View File

31
 
31
 
32
 const getSignList = dynamicId => {
32
 const getSignList = dynamicId => {
33
   router.push({
33
   router.push({
34
-    pathname: '/activity/SignupActivity/registrationRecord',
34
+    pathname: '/activity/groupRoomActivity/registrationRecord',
35
     query: {
35
     query: {
36
       dynamicId,
36
       dynamicId,
37
     },
37
     },

+ 1
- 1
src/pages/activity/lookHouseActivity/detail.jsx View File

31
 
31
 
32
 const getSignList = dynamicId => {
32
 const getSignList = dynamicId => {
33
   router.push({
33
   router.push({
34
-    pathname: '/activity/SignupActivity/registrationRecord',
34
+    pathname: '/activity/lookHouseActivity/registrationRecord',
35
     query: {
35
     query: {
36
       dynamicId,
36
       dynamicId,
37
     },
37
     },

+ 2
- 2
src/pages/building/Edit/Apartment/Form.jsx View File

148
           rules: [{ validator: validMinNum }],
148
           rules: [{ validator: validMinNum }],
149
         })(<InputNumber precision={2} min={0} step={0.01} addonAfter="㎡" />)}
149
         })(<InputNumber precision={2} min={0} step={0.01} addonAfter="㎡" />)}
150
       </Form.Item>
150
       </Form.Item>
151
-      <Form.Item label="使用面积">
151
+      {/* <Form.Item label="使用面积">
152
         {getFieldDecorator('insideArea', {
152
         {getFieldDecorator('insideArea', {
153
           rules: [{ validator: validMinNum }],
153
           rules: [{ validator: validMinNum }],
154
         })(<InputNumber precision={2} min={0} step={0.01} addonAfter="㎡" />)}
154
         })(<InputNumber precision={2} min={0} step={0.01} addonAfter="㎡" />)}
155
-      </Form.Item>
155
+      </Form.Item> */}
156
       <Form.Item label="权重" help="数值越大越靠前">
156
       <Form.Item label="权重" help="数值越大越靠前">
157
         {getFieldDecorator('orderNo', {
157
         {getFieldDecorator('orderNo', {
158
           rules: [{ validator: validMinNum }],
158
           rules: [{ validator: validMinNum }],

+ 1
- 1
src/pages/building/Edit/Basic/form.js View File

72
   //
72
   //
73
   data.videoImage = videoImage ? [{ imgType: 'videoImage', url: data.videoImage, orderNo: 1 }] : []
73
   data.videoImage = videoImage ? [{ imgType: 'videoImage', url: data.videoImage, orderNo: 1 }] : []
74
   // 项目标签
74
   // 项目标签
75
-  data.tag = tag.map((item, _) => ({ tagName: item }))
75
+  data.tag = (tag || []).map((item, _) => ({ tagName: item }))
76
 
76
 
77
   const request = fetch(data.buildingId ? apis.building.updateBuilding : apis.building.addBuilding)
77
   const request = fetch(data.buildingId ? apis.building.updateBuilding : apis.building.addBuilding)
78
   return request({ data })
78
   return request({ data })

+ 25
- 13
src/pages/building/Edit/Basic/index.jsx View File

173
         </Form.Item>
173
         </Form.Item>
174
         <FormGroupItem>
174
         <FormGroupItem>
175
           <Form.Item label="文旅商办" help="是否将本项目归纳在【首页-文旅商办】中"  {...gourpItemLayout.ab.a}>
175
           <Form.Item label="文旅商办" help="是否将本项目归纳在【首页-文旅商办】中"  {...gourpItemLayout.ab.a}>
176
-            {getFieldDecorator('isCommerce')(<Switch />)}
176
+            {getFieldDecorator('isCommerce', { valuePropName: 'checked' })(<Switch />)}
177
           </Form.Item>
177
           </Form.Item>
178
           <Form.Item label="近期开盘" help="本项目是否近期开盘" {...gourpItemLayout.ab.b}>
178
           <Form.Item label="近期开盘" help="本项目是否近期开盘" {...gourpItemLayout.ab.b}>
179
-            {getFieldDecorator('isRecentOpening')(<Switch />)}
179
+            {getFieldDecorator('isRecentOpening', { valuePropName: 'checked' })(<Switch />)}
180
           </Form.Item>
180
           </Form.Item>
181
         </FormGroupItem>
181
         </FormGroupItem>
182
         <Form.Item label="列表均价" help="项目列表展示价格,示例:约10000元/㎡、约1000万元/套起">
182
         <Form.Item label="列表均价" help="项目列表展示价格,示例:约10000元/㎡、约1000万元/套起">
183
-          {getFieldDecorator('price')(<Input />)}
183
+          {getFieldDecorator('price', {
184
+              rules: [{ required: true, message: '请输入列表均价' }],
185
+          })(<Input />)}
184
         </Form.Item>
186
         </Form.Item>
185
         <FormGroupItem>
187
         <FormGroupItem>
186
-          <Form.Item label="开盘时间" {...gourpItemLayout.ab.a} >
188
+          <Form.Item label="开盘日期" {...gourpItemLayout.ab.a} >
187
             {getFieldDecorator('openingDate')(
189
             {getFieldDecorator('openingDate')(
188
-              <OpenTimePicker placeholder="请选择开盘时间" style={fullWidth} />
190
+              <OpenTimePicker placeholder="请选择开盘日期" style={fullWidth} />
189
             )}
191
             )}
190
           </Form.Item>
192
           </Form.Item>
191
           <Form.Item label="电话" {...gourpItemLayout.ab.b } >
193
           <Form.Item label="电话" {...gourpItemLayout.ab.b } >
192
             {getFieldDecorator('tel')(<Input placeholder="手机或者座机号码" />)}
194
             {getFieldDecorator('tel')(<Input placeholder="手机或者座机号码" />)}
193
           </Form.Item>
195
           </Form.Item>
194
         </FormGroupItem>
196
         </FormGroupItem>
195
-        <Form.Item label="项目说明" >
197
+        {/* <Form.Item label="项目说明" >
196
           {getFieldDecorator('dynamic')(<Input placeholder="项目标签补充,不超过30个字" maxLength={30}/>)}
198
           {getFieldDecorator('dynamic')(<Input placeholder="项目标签补充,不超过30个字" maxLength={30}/>)}
197
-        </Form.Item>
199
+        </Form.Item> */}
198
         {/* <Form.Item label="物业类型" >
200
         {/* <Form.Item label="物业类型" >
199
           {getFieldDecorator('propertyType')(<Input />)}
201
           {getFieldDecorator('propertyType')(<Input />)}
200
         </Form.Item> */}
202
         </Form.Item> */}
212
         </Form.Item>
214
         </Form.Item>
213
         <Form.Item label="项目标签" >
215
         <Form.Item label="项目标签" >
214
           {getFieldDecorator('tag')(
216
           {getFieldDecorator('tag')(
215
-            <Select mode="tags" placeholder="输入后选中" style={fullWidth} />
217
+            <Select mode='multiple' placeholder="项目标签" style={fullWidth}>
218
+            <Select.Option value="临地铁">临地铁</Select.Option>
219
+            <Select.Option value="改善盘">改善盘</Select.Option>
220
+            <Select.Option value="刚需盘">刚需盘</Select.Option>
221
+            <Select.Option value="配套成熟">配套成熟</Select.Option>
222
+            <Select.Option value="人车分流">人车分流</Select.Option>
223
+            <Select.Option value="康养社区">康养社区</Select.Option>
224
+            <Select.Option value="旅游地产">旅游地产</Select.Option>
225
+            <Select.Option value="品牌房企">品牌房企</Select.Option>
226
+            <Select.Option value="海外地产">海外地产</Select.Option>
227
+          </Select>,
216
           )}
228
           )}
217
         </Form.Item>
229
         </Form.Item>
218
 
230
 
457
             rules: [{ max: 30, message: '不超过30个字' }]
469
             rules: [{ max: 30, message: '不超过30个字' }]
458
           })(<Input placeholder="不超过30个字" />)}
470
           })(<Input placeholder="不超过30个字" />)}
459
         </Form.Item>
471
         </Form.Item>
460
-        {/* <Form.Item label="预售许可证" >
461
-          {getFieldDecorator('preSalePermit')(
462
-            <ImageUpload />,
463
-          )}
464
-        </Form.Item> */}
472
+        <Form.Item label="预售许可证" >
473
+          {getFieldDecorator('preSalePermit',{
474
+            rules: [{ max: 30, message: '不超过30个字' }]
475
+          })(<Input placeholder="不超过30个字" />)}
476
+        </Form.Item>
465
 
477
 
466
         <Form.Item label=" " colon={false}>
478
         <Form.Item label=" " colon={false}>
467
           <AuthButton name="building.detail.save">
479
           <AuthButton name="building.detail.save">

+ 2
- 2
src/pages/building/Edit/components/BuildingTypeDetail.jsx View File

20
 
20
 
21
 const BuildingTypeDetail = (props) => {
21
 const BuildingTypeDetail = (props) => {
22
   const { title, dataset, form, visible, onClose, onSubmit } = props
22
   const { title, dataset, form, visible, onClose, onSubmit } = props
23
-  const { getFieldDecorator, validateFieldsAndScroll } = form
23
+  const { getFieldDecorator, validateFieldsAndScroll,getFieldValue } = form
24
   const [priceType, setPriceType] = useState()
24
   const [priceType, setPriceType] = useState()
25
 
25
 
26
   const handleSubmit = () => {
26
   const handleSubmit = () => {
78
             {getFieldDecorator('endPrice')(
78
             {getFieldDecorator('endPrice')(
79
               <Input placeholder="最高价" style={{width: 'calc(50% - 60px)', borderLeft: 0, borderRight: 0}} />
79
               <Input placeholder="最高价" style={{width: 'calc(50% - 60px)', borderLeft: 0, borderRight: 0}} />
80
               )}
80
               )}
81
-            {<Input style={{...noBorderInput, width: '80px', textAlign: 'right'}} placeholder={priceUnit[priceType]} disabled />}
81
+            {<Input style={{...noBorderInput, width: '80px', textAlign: 'right'}} placeholder={priceUnit[getFieldValue('priceType')]} disabled  />}
82
           </Input.Group>
82
           </Input.Group>
83
         </Item>
83
         </Item>
84
         <Item label="销售状态" {...formItemLayout}>
84
         <Item label="销售状态" {...formItemLayout}>

+ 4
- 4
src/pages/building/Edit/components/OpenTimePicker.jsx View File

8
  */
8
  */
9
 export default (props) => {
9
 export default (props) => {
10
   const { value, onChange, ...leftProps } = props;
10
   const { value, onChange, ...leftProps } = props;
11
-  const [val, setVal] = useState(value ? moment(value, 'YYYY-MM-DD HH:mm') : undefined);
11
+  const [val, setVal] = useState(value ? moment(value, 'YYYY-MM-DD') : undefined);
12
 
12
 
13
   const handelChange = (e) => {
13
   const handelChange = (e) => {
14
     if (onChange) {
14
     if (onChange) {
15
-      onChange(e ? e.format('YYYY-MM-DD HH:mm') : undefined);
15
+      onChange(e ? e.format('YYYY-MM-DD') : undefined);
16
     }
16
     }
17
   }
17
   }
18
 
18
 
19
   useEffect(() => {
19
   useEffect(() => {
20
-    setVal(value ? moment(value, 'YYYY-MM-DD HH:mm') : undefined);
20
+    setVal(value ? moment(value, 'YYYY-MM-DD') : undefined);
21
   }, [value])
21
   }, [value])
22
 
22
 
23
   return (
23
   return (
24
-    <DatePicker value={val} showTime={{ format: 'HH:mm' }} format="YYYY-MM-DD HH:mm"  {...leftProps} onChange={handelChange} />
24
+    <DatePicker value={val} format="YYYY-MM-DD"  {...leftProps} onChange={handelChange} />
25
   )
25
   )
26
 }
26
 }
27
 
27
 

+ 4
- 4
src/pages/channel/Channel/List/index.jsx View File

1
 import React, { useState, useRef } from 'react';
1
 import React, { useState, useRef } from 'react';
2
-import { Button, message, Table, Card } from 'antd';
2
+import { Button, message, Table, Popconfirm } from 'antd';
3
 import router from 'umi/router';
3
 import router from 'umi/router';
4
 import QueryTable from '@/components/QueryTable';
4
 import QueryTable from '@/components/QueryTable';
5
 import AuthButton from '@/components/AuthButton';
5
 import AuthButton from '@/components/AuthButton';
154
       align: 'center',
154
       align: 'center',
155
       render: (text, record) => (
155
       render: (text, record) => (
156
         <AuthButton name="channel.delete" noRight={null}>
156
         <AuthButton name="channel.delete" noRight={null}>
157
-          <Button type="link" onClick={() => onDelete(record)}>
158
-            删除
159
-          </Button>
157
+          <Popconfirm title="确定要进行删除操作 ?" onConfirm={() => onDelete(record)}>
158
+            <Button type="link">删除</Button>
159
+          </Popconfirm>
160
         </AuthButton>
160
         </AuthButton>
161
       ),
161
       ),
162
     },
162
     },

+ 6
- 6
src/pages/channel/independentList/index.jsx View File

523
                 </Button>
523
                 </Button>
524
               </AuthButton>
524
               </AuthButton>
525
               <AuthButton name="channel.disable" noRight={null}>
525
               <AuthButton name="channel.disable" noRight={null}>
526
-                <Button type="link" onClick={() => onDelete(record)}>
527
-                  删除
528
-                </Button>
526
+                <Popconfirm title="确定要进行删除操作 ?" onConfirm={() => onDelete(record)}>
527
+                  <Button type="link">删除</Button>
528
+                </Popconfirm>
529
               </AuthButton>
529
               </AuthButton>
530
             </>
530
             </>
531
           }
531
           }
583
         </Form.Item>
583
         </Form.Item>
584
         <Form.Item style={{ position: 'absolute', right: '38px' }}>
584
         <Form.Item style={{ position: 'absolute', right: '38px' }}>
585
           {/* <AuthButton name="admin.major.search" noRight={null}> */}
585
           {/* <AuthButton name="admin.major.search" noRight={null}> */}
586
-            <Button type="primary" htmlType="submit">
587
-              搜索
588
-            </Button>
586
+          <Button type="primary" htmlType="submit">
587
+            搜索
588
+          </Button>
589
           {/* </AuthButton> */}
589
           {/* </AuthButton> */}
590
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
590
           <Button style={{ marginLeft: 8 }} onClick={handleReset}>
591
             重置
591
             重置

+ 1
- 1
src/pages/customer/Customer/PublicCustomer/AssistConsultant/AssistConsultant.jsx View File

67
     request({
67
     request({
68
       ...apis.customer.consultantAssist,
68
       ...apis.customer.consultantAssist,
69
       urlData: { id: data.customerId },
69
       urlData: { id: data.customerId },
70
-      data: { userId: record.userId, buildingId: data.buildingName || data.buildingId },
70
+      data: { userId: record.userId, buildingId:  data.buildingName || data.buildingId },
71
     })
71
     })
72
       .then(res => {
72
       .then(res => {
73
         // eslint-disable-next-line no-unused-expressions
73
         // eslint-disable-next-line no-unused-expressions

+ 6
- 4
src/pages/customer/Customer/PublicCustomer/components/AssistConsultant.jsx View File

16
 
16
 
17
   const [tableData, setTableData] = useState({});
17
   const [tableData, setTableData] = useState({});
18
   const [loading, setLoading] = useState(false);
18
   const [loading, setLoading] = useState(false);
19
-
19
+  const [buildingId, setBuildingId] = useState();
20
+  
20
   const openNotificationWithIcon = (type, message) => {
21
   const openNotificationWithIcon = (type, message) => {
21
     notification[type]({
22
     notification[type]({
22
       message,
23
       message,
52
 
53
 
53
   // 分页
54
   // 分页
54
   function onChange(pageNum) {
55
   function onChange(pageNum) {
55
-    getList({ pageNumber: pageNum, pageSize: 5 });
56
+    getList({ pageNumber: pageNum, pageSize: 5,buildingId: buildingId||data.buildingId });
56
   }
57
   }
57
 
58
 
58
   function changBuilding(buildingId) {
59
   function changBuilding(buildingId) {
59
     if (buildingId) {
60
     if (buildingId) {
61
+      setBuildingId(buildingId)
60
       getList({ pageNumber: 1, pageSize: 5, buildingId: buildingId });
62
       getList({ pageNumber: 1, pageSize: 5, buildingId: buildingId });
61
     }
63
     }
62
   }
64
   }
67
     request({
69
     request({
68
       ...apis.customer.consultantAssist,
70
       ...apis.customer.consultantAssist,
69
       urlData: { id: data.customerId },
71
       urlData: { id: data.customerId },
70
-      data: { userId: record.userId, buildingId: data.buildingName || data.buildingId },
72
+      data: { userId: record.userId, buildingId: buildingId || data.buildingId },
71
     })
73
     })
72
       .then(res => {
74
       .then(res => {
73
         // eslint-disable-next-line no-unused-expressions
75
         // eslint-disable-next-line no-unused-expressions
141
               </>
143
               </>
142
             )} */}
144
             )} */}
143
             {data?.buildingId == null && (
145
             {data?.buildingId == null && (
144
-              <BuildSelect onChange={e => changBuilding(e)} value={data?.buildingName} />
146
+              <BuildSelect onChange={e => changBuilding(e)} value={buildingId||data?.buildingId} />
145
             )}
147
             )}
146
             <Table
148
             <Table
147
               dataSource={tableData.records}
149
               dataSource={tableData.records}

+ 5
- 5
src/pages/customer/Customer/PublicCustomer/index.jsx View File

201
             </Button>
201
             </Button>
202
           </AuthButton>,
202
           </AuthButton>,
203
 
203
 
204
-          // <AuthButton name="customer.consultant.dispatch" noRight={null}>
205
-          //   <Button type="link" onClick={() => handShowModel(record, actionList.assistConsultant)}>
206
-          //     分配置业顾问
207
-          //   </Button>
208
-          // </AuthButton>,
204
+          <AuthButton name="customer.consultant.dispatch" noRight={null}>
205
+            <Button type="link" onClick={() => handShowModel(record, actionList.assistConsultant)}>
206
+              分配置业顾问
207
+            </Button>
208
+          </AuthButton>,
209
         ]),
209
         ]),
210
       },
210
       },
211
     ];
211
     ];

+ 3
- 3
src/pages/news/list/List.jsx View File

18
   const [loading, setLoading] = useState(false);
18
   const [loading, setLoading] = useState(false);
19
   const [page, setPage] = useState({ current: 1, pageSize: 10 });
19
   const [page, setPage] = useState({ current: 1, pageSize: 10 });
20
   const onPublish = useCallback(row => {
20
   const onPublish = useCallback(row => {
21
-    const buidingStatus = row.status === 1 ? 2 : 1;
22
-    request({ ...apis.building.updateStatus, data: { id: row.buildingId, status: buidingStatus } })
21
+    const newsStatus = row.newsStatus === 1 ? 0 : 1;
22
+    request({ ...apis.news.put, urlData: { id: row.newsId }, data: { ...row, newsStatus } })
23
       .then(() => {
23
       .then(() => {
24
         notification.success({ message: '操作成功' });
24
         notification.success({ message: '操作成功' });
25
         setLoading(false);
25
         setLoading(false);
43
 
43
 
44
   const onDelete = useCallback(row => {
44
   const onDelete = useCallback(row => {
45
     setLoading(true);
45
     setLoading(true);
46
-    request({ ...apis.building.deleteBuilding, urlData: { id: row.buildingId } })
46
+    request({ ...apis.news.delete, urlData: { id: row.newsId } })
47
       .then(() => {
47
       .then(() => {
48
         notification.success({ message: '操作成功' });
48
         notification.success({ message: '操作成功' });
49
         setLoading(false);
49
         setLoading(false);

+ 1
- 1
src/pages/staff/staff/Edit/index.jsx View File

74
     console.log(val, userId, '----------111------------');
74
     console.log(val, userId, '----------111------------');
75
     // val.institutionIdLis =  val?.institutionIdLis?.split(',')
75
     // val.institutionIdLis =  val?.institutionIdLis?.split(',')
76
     // console.log(val,userId,'----------------------')
76
     // console.log(val,userId,'----------------------')
77
-    if (val.loginName) {
77
+    if (!val.loginName) {
78
       val.loginName = val.phone;
78
       val.loginName = val.phone;
79
     }
79
     }
80
 
80