|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<div class="dialog-h-content scroll-h">
|
|
|
|
|
|
|
|
<el-form ref="ref_form" :inline="true" :model="formData" :rules="dataRule" :disabled="formType === 'detail'"
|
|
|
|
class="form">
|
|
|
|
<div v-if="summary">
|
|
|
|
<el-form-item label="活动类型" label-width="150px" prop="typeId">
|
|
|
|
<el-select class="item_width_1" v-model.trim="formData.typeId" placeholder="请选择" clearable>
|
|
|
|
<el-option v-for="item in typeList" :key="item.nametypeName" :label="item.typeName"
|
|
|
|
:value="item.id">
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="活动名称" prop="activityName" label-width="150px">
|
|
|
|
<el-input v-model.trim="formData.activityName" size="small" clearable placeholder="请输入活动名称"
|
|
|
|
class="u-item-width-normal"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="活动时间" prop="startTime" label-width="130px">
|
|
|
|
<el-date-picker v-model.trim="timeRange" type="datetimerange" range-separator="至"
|
|
|
|
start-placeholder="开始日期" end-placeholder="结束日期" @change="handleTimeChange">
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="协办方" prop="assistingParty" label-width="150px">
|
|
|
|
<el-select class="u-item-width-normal" v-model.trim="formData.assistingParty" placeholder="请选择"
|
|
|
|
clearable>
|
|
|
|
<!-- <el-option v-for="item in corganizerList" :key="item.id" :label="item.label"
|
|
|
|
:value="item.name" class="u-item-width-normal">
|
|
|
|
</el-option> -->
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="活动封面图" label-width="140px" prop="coverPic">
|
|
|
|
<template>
|
|
|
|
<upload-image :defaultFileList="fileList" :limit="1" @change="onChangeFileList"
|
|
|
|
@file-removed="removedImg"></upload-image>
|
|
|
|
</template>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="活动内容" prop="content" label-width="150px" style="display: block">
|
|
|
|
<div class="item_width_1">
|
|
|
|
<Tinymce class="tinymce_view " v-model.trim="formData.content" :height="250"
|
|
|
|
placeholder="请输入活动内容" />
|
|
|
|
<!-- <Tinymce class="tinymce_view " v-if="formType != 'detail'" v-model.trim="formData.content"
|
|
|
|
:height="250" placeholder="请输入活动内容" /> -->
|
|
|
|
<!-- <el-input type="textarea" autosize placeholder="请输入内容" v-model.trim="formData.content">
|
|
|
|
</el-input> -->
|
|
|
|
</div>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="活动地点" prop="address" label-width="150px" style="display: block">
|
|
|
|
<div style="width: 500px">
|
|
|
|
<el-select v-model.trim="searchValue" filterable style="width: 500px" remote
|
|
|
|
:reserve-keyword="true" placeholder="请输入关键词" :remote-method="remoteMethod"
|
|
|
|
:loading="loading">
|
|
|
|
<el-option v-for="(item, index) in searchOptions" @click.native="handleClickKey(index)"
|
|
|
|
:key="item.value || index" :label="item.label" :value="item.value">
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
<div id="app_activity" class="div_map"></div>
|
|
|
|
</div>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item v-if="formType!=='records'" label="线上报名" style="display: block" prop="peopleCount" label-width="150px">
|
|
|
|
<el-switch v-model="online" @change="handleOnlineRegistration"></el-switch>
|
|
|
|
</el-form-item>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div v-if="records">
|
|
|
|
<div v-if="!online">
|
|
|
|
<el-form-item label="活动人数" label-width="140px">
|
|
|
|
<el-input-number v-model="formData.participants" @change="handleChange" :min="1"
|
|
|
|
label="描述文字"></el-input-number>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="活动总结" prop="sumUp" label-width="150px" style="display: block">
|
|
|
|
<div class="item_width_1">
|
|
|
|
<!-- <el-input type="textarea" autosize placeholder="请输入内容" v-model.trim="formData.sumUp">
|
|
|
|
</el-input> -->
|
|
|
|
<Tinymce class="tinymce_view " v-model.trim="formData.sumUp" :height="250"
|
|
|
|
placeholder="请输入活动总结" @input="validateContent"/>
|
|
|
|
</div>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<!-- <el-form-item label="活动照片" label-width="140px">
|
|
|
|
<template>
|
|
|
|
<upload-image :defaultFileList="activityImgs" :limit="6"
|
|
|
|
@change="onChangeImgs"></upload-image>
|
|
|
|
</template>
|
|
|
|
</el-form-item> -->
|
|
|
|
|
|
|
|
<el-form-item label="活动照片" label-width="140px" prop="activityImgs">
|
|
|
|
<div>
|
|
|
|
<el-upload :headers="$getElUploadHeaders()" class="avatar-uploader" :action="uploadUrl"
|
|
|
|
:data="{ customerId: customerId }" :show-file-list="true"
|
|
|
|
:file-list="formData.activityImgs" :on-preview="handleImgPreview"
|
|
|
|
:on-success="handleImgSuccess" :on-remove="handleImgRemove"
|
|
|
|
:on-exceed="handleImgExceed" :before-upload="beforeImgUpload"
|
|
|
|
list-type="picture-card" :limit="3">
|
|
|
|
<i class="el-icon-plus avatar-uploader-icon"></i> 最多三张图片 </el-upload>
|
|
|
|
</div>
|
|
|
|
<!-- <div>
|
|
|
|
<div v-if="formData.activityImgs && formData.activityImgs.length > 0">
|
|
|
|
<img v-for="(img, index) in formData.activityImgs" :key="index" :src="img" alt="照片"
|
|
|
|
style="width: 150px; margin-right: 10px;">
|
|
|
|
</div>
|
|
|
|
<div v-else>
|
|
|
|
暂无照片
|
|
|
|
</div>
|
|
|
|
</div> -->
|
|
|
|
</el-form-item>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div v-if="online">
|
|
|
|
<el-form-item label="报名截止时间" label-width="140px" prop="cutOffTime">
|
|
|
|
<el-date-picker v-model.trim="formData.cutOffTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
format="yyyy-MM-dd HH:mm:ss" placeholder="选择报名截止时间" style="width:280px">
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="活动积分" label-width="140px" prop="points">
|
|
|
|
<el-input-number v-model="formData.points" @change="handleChange" :min="1" :max="10"
|
|
|
|
label="描述文字"></el-input-number>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="活动人数" label-width="140px">
|
|
|
|
<el-input-number v-model="formData.participants" @change="handleChange" :min="1"
|
|
|
|
label="描述文字"></el-input-number>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="消息推送" label-width="140px">
|
|
|
|
<el-checkbox-group v-model="formData.sendMessage">
|
|
|
|
<el-checkbox label="是否通过公众号推送给社区居民"></el-checkbox>
|
|
|
|
</el-checkbox-group>
|
|
|
|
</el-form-item>
|
|
|
|
</div>
|
|
|
|
</el-form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="div_btn">
|
|
|
|
<el-button size="small" @click="handleCancle">取 消</el-button>
|
|
|
|
<el-button size="small" v-if="formType != 'detail'" type="primary" :disabled="btnDisable"
|
|
|
|
@click="handleComfirm">确 定</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script></script>
|
|
|
|
<style lang="scss" scoped></style>
|