|
@@ -49,11 +49,23 @@ const toEditCarouse = (contentId) => () => {
|
49
|
49
|
render: (x, row) => <img src={row.image} className={row.showPosition === 'index' ? styles.imgIndex : row.showPosition === 'mall' ? styles.imgPerfect : ''} />,
|
50
|
50
|
},
|
51
|
51
|
{
|
52
|
|
- title: '类型',
|
|
52
|
+ title: '发布城市',
|
|
53
|
+ dataIndex: 'cityName',
|
|
54
|
+ key: 'cityName',
|
|
55
|
+ align: 'center',
|
|
56
|
+ },
|
|
57
|
+ {
|
|
58
|
+ title: '关联项目',
|
|
59
|
+ dataIndex: 'buildingName',
|
|
60
|
+ key: 'buildingName',
|
|
61
|
+ align: 'center',
|
|
62
|
+ },
|
|
63
|
+ {
|
|
64
|
+ title: '关联内容类型',
|
53
|
65
|
dataIndex: 'contentType',
|
54
|
66
|
key: 'contentType',
|
55
|
67
|
align: 'center',
|
56
|
|
- render: (contentType) => <span>{ contentType === 'project' ? '项目' : contentType === 'activity' ? '活动' : contentType === 'news' ? '资讯' : contentType === 'other' ? '其他' : contentType === 'help' ? '助力' : contentType === 'group' ? '拼团' : '' }</span>
|
|
68
|
+ render: (contentType) => <span>{ contentType === 'project' ? '项目' : contentType === 'activity' ? '活动' : contentType === 'news' ? '资讯' : contentType === 'other' ? '其他' : contentType === 'help' ? '助力' : contentType === 'group' ? '拼团' : contentType === 'h5' ? 'H5活动' : '' }</span>
|
57
|
69
|
},
|
58
|
70
|
{
|
59
|
71
|
title: '发布位置',
|
|
@@ -74,7 +86,7 @@ const toEditCarouse = (contentId) => () => {
|
74
|
86
|
dataIndex: 'status',
|
75
|
87
|
key: 'status',
|
76
|
88
|
align: 'center',
|
77
|
|
- render: (status)=> <><span>{status == 1 ? '启用' : '停用'}</span></>
|
|
89
|
+ render: (status)=> <><span>{status == 1 ? '已上架' : '已下架'}</span></>
|
78
|
90
|
},
|
79
|
91
|
{
|
80
|
92
|
title: '操作',
|
|
@@ -84,8 +96,9 @@ const toEditCarouse = (contentId) => () => {
|
84
|
96
|
render: (x,row) => (
|
85
|
97
|
<>
|
86
|
98
|
<AuthButton name="admin.extendContent.id.put" noRight={null}>
|
87
|
|
- <span style={{ color: '#1990FF', marginRight: '20px',cursor: 'pointer' }} onClick={changeStatus(row)}>{ row.status === 1 ? '禁用' : '启用' }<Icon type="vertical-align-top" className={styles.edit} /></span>
|
88
|
|
- <span style={{ color: '#FF925C',cursor: 'pointer' }} onClick={toEditCarouse(row.contentId)}>编辑<Icon type="form" className={styles.edit} /></span>
|
|
99
|
+ <span style={{ color: '#1990FF', marginRight: '20px', cursor: 'pointer'}} onClick={changeStatus(row)}>{ row.status === 1 ? '下架' : '上架' }<Icon type="vertical-align-top" className={styles.edit} /></span>
|
|
100
|
+ <span style={{ color: '#FF925C', marginRight: '20px', cursor: 'pointer' }} onClick={toEditCarouse(row.contentId)}>编辑<Icon type="form" className={styles.edit} /></span>
|
|
101
|
+ <span style={{ color: '#1990FF', cursor: 'pointer' }} onClick={deleteCarouse(row.contentId)}>删除<Icon type="vertical-align-top" className={styles.edit} /></span>
|
89
|
102
|
</AuthButton>
|
90
|
103
|
</>
|
91
|
104
|
)
|
|
@@ -110,6 +123,24 @@ const toEditCarouse = (contentId) => () => {
|
110
|
123
|
});
|
111
|
124
|
}
|
112
|
125
|
|
|
126
|
+//删除
|
|
127
|
+const deleteCarouse = (contentId) => () =>{
|
|
128
|
+ Modal.confirm({
|
|
129
|
+ title: '确认删除此数据?',
|
|
130
|
+ okText: '确定',
|
|
131
|
+ cancelText: '取消',
|
|
132
|
+ onOk() {
|
|
133
|
+ request({ ...apis.carsuseFigure.deleteExtendContent,urlData:{id: contentId}}).then((data) => {
|
|
134
|
+ message.info('操作成功!')
|
|
135
|
+ getList({ pageNum: 1, pageSize: 10, showType: 'banner' })
|
|
136
|
+ }).catch((err) => {
|
|
137
|
+ console.log(err)
|
|
138
|
+ message.info(err.msg || err.message)
|
|
139
|
+ })
|
|
140
|
+ },
|
|
141
|
+ });
|
|
142
|
+}
|
|
143
|
+
|
113
|
144
|
// 停用启用
|
114
|
145
|
const changeStatus = (row) => () => {
|
115
|
146
|
console.log(row)
|
|
@@ -174,6 +205,11 @@ const handleSubmit = (e, props) => {
|
174
|
205
|
|
175
|
206
|
<>
|
176
|
207
|
<Form layout="inline" onSubmit={e => handleSubmit(e, props)}>
|
|
208
|
+ <Form.Item>
|
|
209
|
+ {getFieldDecorator('cityId')(
|
|
210
|
+ <SelectCity />,
|
|
211
|
+ )}
|
|
212
|
+ </Form.Item>
|
177
|
213
|
<Form.Item>
|
178
|
214
|
{getFieldDecorator('buildingId')(
|
179
|
215
|
<BuildSelect />,
|
|
@@ -185,6 +221,10 @@ const handleSubmit = (e, props) => {
|
185
|
221
|
<Option value="activity">活动</Option>
|
186
|
222
|
<Option value="project">项目</Option>
|
187
|
223
|
<Option value="news">资讯</Option>
|
|
224
|
+ <Option value="help">助力</Option>
|
|
225
|
+ <Option value="group">拼团</Option>
|
|
226
|
+ <Option value="h5">H5</Option>
|
|
227
|
+ <Option value="">无</Option>
|
188
|
228
|
{/* <Option value="other">其他</Option> */}
|
189
|
229
|
</Select>,
|
190
|
230
|
)}
|
|
@@ -200,8 +240,8 @@ const handleSubmit = (e, props) => {
|
200
|
240
|
<Form.Item>
|
201
|
241
|
{getFieldDecorator('status')(
|
202
|
242
|
<Select style={{ width: '180px' }} placeholder="状态">
|
203
|
|
- <Option value="1">启用</Option>
|
204
|
|
- <Option value="0">停用</Option>
|
|
243
|
+ <Option value="1">已上架</Option>
|
|
244
|
+ <Option value="0">已下架</Option>
|
205
|
245
|
</Select>,
|
206
|
246
|
)}
|
207
|
247
|
</Form.Item>
|