|
@@ -20,7 +20,7 @@ const SelectContact = props => {
|
20
|
20
|
|
21
|
21
|
// 查询列表
|
22
|
22
|
const getList = (params) => {
|
23
|
|
- request({ ...apis.contact.list, params: { ...params } }).then((data) => {
|
|
23
|
+ request({ ...apis.sample.h5Template, params: { ...params } }).then((data) => {
|
24
|
24
|
console.log(data)
|
25
|
25
|
setData(data)
|
26
|
26
|
})
|
|
@@ -36,9 +36,9 @@ const SelectContact = props => {
|
36
|
36
|
}
|
37
|
37
|
|
38
|
38
|
const selectData = val => {
|
39
|
|
- const list = selectedData.filter(x => x.contactId !== val.contactId).concat(val)
|
|
39
|
+ const list = selectedData.filter(x => x.h5TemplateId !== val.h5TemplateId).concat(val)
|
40
|
40
|
setSelectedData(list)
|
41
|
|
- props.onSelected(list)
|
|
41
|
+ props.onChoosed(list)
|
42
|
42
|
setVisible(false)
|
43
|
43
|
}
|
44
|
44
|
|
|
@@ -64,28 +64,27 @@ const SelectContact = props => {
|
64
|
64
|
}
|
65
|
65
|
|
66
|
66
|
const removeSelected = (val) => {
|
67
|
|
- const list = selectedData.filter(x => x.contactId !== val.contactId)
|
|
67
|
+ const list = selectedData.filter(x => x.h5TemplateId !== val.h5TemplateId)
|
68
|
68
|
setSelectedData(list)
|
69
|
|
- props.onSelected(list)
|
|
69
|
+ props.onChoosed(list)
|
70
|
70
|
}
|
71
|
71
|
|
72
|
72
|
const columns = [
|
73
|
73
|
{
|
74
|
74
|
title: '模板编号',
|
75
|
|
- dataIndex: 'contactName',
|
76
|
|
- key: 'drainageId',
|
|
75
|
+ dataIndex: 'h5TemplateId',
|
|
76
|
+ key: 'h5TemplateId',
|
77
|
77
|
align: 'center',
|
78
|
78
|
ellipsis: true,
|
79
|
79
|
width: '20%',
|
80
|
80
|
},
|
81
|
81
|
{
|
82
|
82
|
title: '模板名称',
|
83
|
|
- dataIndex: 'sex',
|
84
|
|
- key: 'drainageId',
|
|
83
|
+ dataIndex: 'name',
|
|
84
|
+ key: 'name',
|
85
|
85
|
align: 'center',
|
86
|
86
|
ellipsis: true,
|
87
|
87
|
width: '60%',
|
88
|
|
- render: text => <span>{text == 1 ? '男' : text == 2 ? '女' : ''}</span>,
|
89
|
88
|
},
|
90
|
89
|
{
|
91
|
90
|
title: '操作',
|
|
@@ -107,7 +106,7 @@ const SelectContact = props => {
|
107
|
106
|
<Col span={2}><div onClick={() => setVisible(true)}><a>{group.groupName}</a></div></Col>
|
108
|
107
|
<Col span={16}><div>
|
109
|
108
|
{selectedData.map(x => {
|
110
|
|
- return <Tag size="large" key={x.contactId} closable onClose={() => removeSelected(x)}>{x.contactName}</Tag>
|
|
109
|
+ return <Tag size="large" key={x.h5TemplateId} closable onClose={() => removeSelected(x)}>{x.name}</Tag>
|
111
|
110
|
})}
|
112
|
111
|
</div></Col>
|
113
|
112
|
</Row>
|
|
@@ -122,7 +121,7 @@ const SelectContact = props => {
|
122
|
121
|
|
123
|
122
|
<Form layout="inline" onSubmit={e => handleSubmit(e, props)} style={{marginBottom:'16px'}}>
|
124
|
123
|
<Form.Item>
|
125
|
|
- {getFieldDecorator('telephone')(
|
|
124
|
+ {getFieldDecorator('h5TemplateId')(
|
126
|
125
|
<Input
|
127
|
126
|
prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
|
128
|
127
|
placeholder="模板编号"
|
|
@@ -130,7 +129,7 @@ const SelectContact = props => {
|
130
|
129
|
)}
|
131
|
130
|
</Form.Item>
|
132
|
131
|
<Form.Item>
|
133
|
|
- {getFieldDecorator('contactName')(
|
|
132
|
+ {getFieldDecorator('name')(
|
134
|
133
|
<Input
|
135
|
134
|
prefix={<Icon type="text" style={{ color: 'rgba(0,0,0,.25)' }} />}
|
136
|
135
|
placeholder="模板名称"
|