|
@ -12,216 +12,162 @@ |
|
|
> |
|
|
> |
|
|
<a-form :form="form" @submit="handleSubmit" v-if="editVisible && editItem"> |
|
|
<a-form :form="form" @submit="handleSubmit" v-if="editVisible && editItem"> |
|
|
<!-- 标题 --> |
|
|
<!-- 标题 --> |
|
|
<a-form-item |
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="标题"> |
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
|
|
label="标题" |
|
|
|
|
|
> |
|
|
|
|
|
<a-input |
|
|
<a-input |
|
|
placeholder="标题" |
|
|
placeholder="标题" |
|
|
v-decorator="[ |
|
|
v-decorator="[ |
|
|
'title', |
|
|
'title', |
|
|
{ |
|
|
{ |
|
|
initialValue: editItem.title || '', |
|
|
initialValue: editItem.title || '', |
|
|
rules: [ |
|
|
rules: [ |
|
|
{ required: true, message: '标题不能为空' }, |
|
|
{ required: true, message: '标题不能为空' }, |
|
|
{ whitespace: true, message: '标题不能为空' }, |
|
|
{ whitespace: true, message: '标题不能为空' }, |
|
|
{ max: 140, massage: '地点最多140个字符' }, |
|
|
{ max: 140, massage: '地点最多140个字符' }, |
|
|
], |
|
|
], |
|
|
}, |
|
|
}, |
|
|
]" |
|
|
]" |
|
|
/> |
|
|
/> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
<!-- 地点 --> |
|
|
<!-- 地点 --> |
|
|
<a-form-item |
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="地点"> |
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
|
|
label="地点" |
|
|
|
|
|
> |
|
|
|
|
|
<a-input |
|
|
<a-input |
|
|
placeholder="地点" |
|
|
placeholder="地点" |
|
|
v-decorator="[ |
|
|
v-decorator="[ |
|
|
'address', |
|
|
'address', |
|
|
{ |
|
|
{ |
|
|
initialValue: editItem.address || '', |
|
|
initialValue: editItem.address || '', |
|
|
rules: [ |
|
|
rules: [ |
|
|
{ required: true, message: '地点不能为空' }, |
|
|
{ required: true, message: '地点不能为空' }, |
|
|
{ whitespace: true, message: '地点不能为空' }, |
|
|
{ whitespace: true, message: '地点不能为空' }, |
|
|
{ max: 140, massage: '地点最多140个字符' }, |
|
|
{ max: 140, massage: '地点最多140个字符' }, |
|
|
], |
|
|
], |
|
|
}, |
|
|
}, |
|
|
]" |
|
|
]" |
|
|
/> |
|
|
/> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
<!-- 时间 --> |
|
|
<!-- 时间 --> |
|
|
<a-form-item |
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="时间" required> |
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
|
|
label="时间" |
|
|
|
|
|
required |
|
|
|
|
|
> |
|
|
|
|
|
<a-range-picker |
|
|
<a-range-picker |
|
|
:default-value="[editItem.releaseTime ? editItem.releaseTime : '',editItem.closeTime ? editItem.closeTime : '']" |
|
|
:default-value="[editItem.releaseTime ? editItem.releaseTime : '', editItem.closeTime ? editItem.closeTime : '']" |
|
|
@change="onChange" |
|
|
@change="onChange" |
|
|
format="YYYY-MM-DD HH:mm:ss" |
|
|
format="YYYY-MM-DD HH:mm:ss" |
|
|
show-time |
|
|
show-time |
|
|
style="width:100%" |
|
|
style="width: 100%" |
|
|
/> |
|
|
/> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
<!-- 活动类型 --> |
|
|
<!-- 活动类型 --> |
|
|
<a-form-item |
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="活动类型"> |
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
|
|
label="活动类型" |
|
|
|
|
|
> |
|
|
|
|
|
<a-select |
|
|
<a-select |
|
|
@change="changeType" |
|
|
@change="changeType" |
|
|
placeholder="活动类型" |
|
|
placeholder="活动类型" |
|
|
style="width:100%" |
|
|
style="width: 100%" |
|
|
v-decorator="[ |
|
|
v-decorator="[ |
|
|
'activityType', |
|
|
'activityType', |
|
|
{ |
|
|
{ |
|
|
initialValue: editItem.info && editItem.info.activityType, |
|
|
initialValue: editItem.info && editItem.info.activityType, |
|
|
}, |
|
|
}, |
|
|
]" |
|
|
]" |
|
|
> |
|
|
> |
|
|
<a-select-option |
|
|
<a-select-option :key="index" :value="category.id" v-for="(category, index) in types">{{ category.name }}</a-select-option> |
|
|
:key="index" |
|
|
|
|
|
:value="category.id" |
|
|
|
|
|
v-for="(category, index) in types" |
|
|
|
|
|
>{{ category.name }}</a-select-option> |
|
|
|
|
|
</a-select> |
|
|
</a-select> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
<!-- 主讲人 --> |
|
|
<!-- 主讲人 --> |
|
|
<a-form-item |
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="主讲人"> |
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
|
|
label="主讲人" |
|
|
|
|
|
> |
|
|
|
|
|
<a-input |
|
|
<a-input |
|
|
placeholder="主讲人" |
|
|
placeholder="主讲人" |
|
|
v-decorator="[ |
|
|
v-decorator="[ |
|
|
'name', |
|
|
'name', |
|
|
{ |
|
|
{ |
|
|
initialValue: (editItem.info && editItem.info.name) ? editItem.info.name : '', |
|
|
initialValue: editItem.info && editItem.info.name ? editItem.info.name : '', |
|
|
rules: [ |
|
|
rules: [ |
|
|
{ required: true, message: '主讲人不能为空' }, |
|
|
{ required: true, message: '主讲人不能为空' }, |
|
|
{ whitespace: true, message: '主讲人不能为空' }, |
|
|
{ whitespace: true, message: '主讲人不能为空' }, |
|
|
{ max: 140, massage: '主讲人最多140个字符' }, |
|
|
{ max: 140, massage: '主讲人最多140个字符' }, |
|
|
], |
|
|
], |
|
|
}, |
|
|
}, |
|
|
]" |
|
|
]" |
|
|
/> |
|
|
/> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
<!-- 组织单位 --> |
|
|
<!-- 组织单位 --> |
|
|
<a-form-item |
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="组织单位"> |
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
|
|
label="组织单位" |
|
|
|
|
|
> |
|
|
|
|
|
<a-input |
|
|
<a-input |
|
|
placeholder="组织单位" |
|
|
placeholder="组织单位" |
|
|
v-decorator="[ |
|
|
v-decorator="[ |
|
|
'organization', |
|
|
'organization', |
|
|
{ |
|
|
{ |
|
|
initialValue: (editItem.info && editItem.info.organization) ? editItem.info.organization : '', |
|
|
initialValue: editItem.info && editItem.info.organization ? editItem.info.organization : '', |
|
|
}, |
|
|
}, |
|
|
]" |
|
|
]" |
|
|
/> |
|
|
/> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
<!-- 其他事宜 --> |
|
|
<!-- 其他事宜 --> |
|
|
<a-form-item |
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="其他事宜"> |
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
|
|
label="其他事宜" |
|
|
|
|
|
> |
|
|
|
|
|
<a-input |
|
|
<a-input |
|
|
placeholder="其他事宜" |
|
|
placeholder="其他事宜" |
|
|
v-decorator="[ |
|
|
v-decorator="[ |
|
|
'other', |
|
|
'other', |
|
|
{ |
|
|
{ |
|
|
initialValue: (editItem.info && editItem.info.other) ? editItem.info.other : '', |
|
|
initialValue: editItem.info && editItem.info.other ? editItem.info.other : '', |
|
|
}, |
|
|
}, |
|
|
]" |
|
|
]" |
|
|
/> |
|
|
/> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
<!-- 会议主题 --> |
|
|
<!-- 会议主题 --> |
|
|
<a-form-item |
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="会议主题"> |
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
|
|
label="会议主题" |
|
|
|
|
|
> |
|
|
|
|
|
<a-input |
|
|
<a-input |
|
|
placeholder="会议主题" |
|
|
placeholder="会议主题" |
|
|
v-decorator="[ |
|
|
v-decorator="[ |
|
|
'theme', |
|
|
'theme', |
|
|
{ |
|
|
{ |
|
|
initialValue: (editItem.info && editItem.info.theme) ? editItem.info.theme : '', |
|
|
initialValue: editItem.info && editItem.info.theme ? editItem.info.theme : '', |
|
|
}, |
|
|
}, |
|
|
]" |
|
|
]" |
|
|
/> |
|
|
/> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
<!-- 培训对象 --> |
|
|
<!-- 培训对象 --> |
|
|
<a-form-item |
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="培训对象"> |
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
|
|
label="培训对象" |
|
|
|
|
|
> |
|
|
|
|
|
<a-input |
|
|
<a-input |
|
|
placeholder="培训对象" |
|
|
placeholder="培训对象" |
|
|
v-decorator="[ |
|
|
v-decorator="[ |
|
|
'trainees', |
|
|
'trainees', |
|
|
{ |
|
|
{ |
|
|
initialValue: (editItem.info && editItem.info.trainees) ? editItem.info.trainees : '', |
|
|
initialValue: editItem.info && editItem.info.trainees ? editItem.info.trainees : '', |
|
|
}, |
|
|
}, |
|
|
]" |
|
|
]" |
|
|
/> |
|
|
/> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
<!-- 报名方式 --> |
|
|
<!-- 报名方式 --> |
|
|
<a-form-item |
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="报名方式"> |
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
|
|
label="报名方式" |
|
|
|
|
|
> |
|
|
|
|
|
<a-input |
|
|
<a-input |
|
|
placeholder="报名方式" |
|
|
placeholder="报名方式" |
|
|
v-decorator="[ |
|
|
v-decorator="[ |
|
|
'way', |
|
|
'way', |
|
|
{ |
|
|
{ |
|
|
initialValue: (editItem.info && editItem.info.way) ? editItem.info.way : '', |
|
|
initialValue: editItem.info && editItem.info.way ? editItem.info.way : '', |
|
|
}, |
|
|
}, |
|
|
]" |
|
|
]" |
|
|
/> |
|
|
/> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
|
|
|
|
|
|
<!-- 活动结束内容 --> |
|
|
<!-- 活动结束内容 --> |
|
|
<a-form-item |
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="活动结束内容"> |
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
|
|
label="活动结束内容" |
|
|
|
|
|
> |
|
|
|
|
|
<a-textarea |
|
|
<a-textarea |
|
|
placeholder="活动结束内容" |
|
|
placeholder="活动结束内容" |
|
|
v-decorator="[ |
|
|
v-decorator="[ |
|
|
'endContent', |
|
|
'endContent', |
|
|
{ |
|
|
{ |
|
|
initialValue: (editItem.info && editItem.info.endContent) ? editItem.info.endContent : '', |
|
|
initialValue: editItem.info && editItem.info.endContent ? editItem.info.endContent : '', |
|
|
}, |
|
|
}, |
|
|
]" |
|
|
]" |
|
|
/> |
|
|
/> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
|
<a-form-item |
|
|
<a-form-item :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol" label="详情" required> |
|
|
:label-col="formItemLayout.labelCol" |
|
|
|
|
|
:wrapper-col="formItemLayout.wrapperCol" |
|
|
|
|
|
label="详情" |
|
|
|
|
|
required |
|
|
|
|
|
> |
|
|
|
|
|
<quill-editor |
|
|
<quill-editor |
|
|
:max-size="maxSize" |
|
|
:max-size="maxSize" |
|
|
:value="(editItem && editItem.info && editItem.info.content) ? editItem.info.content : content" |
|
|
:value="editItem && editItem.info && editItem.info.content ? editItem.info.content : content" |
|
|
@changeInput="changeInput" |
|
|
@changeInput="changeInput" |
|
|
/> |
|
|
/> |
|
|
</a-form-item> |
|
|
</a-form-item> |
|
@ -255,9 +201,11 @@ export default { |
|
|
tailItemLayout, |
|
|
tailItemLayout, |
|
|
form: this.$form.createForm(this, { name: 'activity-edit' }), |
|
|
form: this.$form.createForm(this, { name: 'activity-edit' }), |
|
|
types: [ |
|
|
types: [ |
|
|
{ id: 0, name: '路演' }, |
|
|
{ id: 0, name: '培训' }, |
|
|
{ id: 1, name: '沙龙' }, |
|
|
{ id: 1, name: '讲座' }, |
|
|
{ id: 2, name: '论坛' }, |
|
|
{ id: 2, name: '交流' }, |
|
|
|
|
|
{ id: 3, name: '路演' }, |
|
|
|
|
|
{ id: 4, name: '论坛' }, |
|
|
], |
|
|
], |
|
|
activityType: null, |
|
|
activityType: null, |
|
|
maxSize: 2048, |
|
|
maxSize: 2048, |
|
|