|
|
|
@ -4,8 +4,7 @@ |
|
|
|
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'100px'"> |
|
|
|
<div> |
|
|
|
<el-form-item label="标题名称" prop="activityName"> |
|
|
|
<el-input v-model.trim="formData.title" size="small" class="item_width_1" clearable |
|
|
|
placeholder="请输入关键字"> |
|
|
|
<el-input v-model.trim="formData.title" size="small" class="item_width_1" clearable placeholder="请输入关键字"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="上架状态" prop="activityName"> |
|
|
|
@ -16,8 +15,8 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="活动时间"> |
|
|
|
<el-date-picker v-model="value1" type="datetimerange" range-separator="至" start-placeholder="开始日期" value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
format="yyyy-MM-dd HH:mm:ss" end-placeholder="结束日期"> |
|
|
|
<el-date-picker v-model="value1" type="datetimerange" range-separator="至" start-placeholder="开始日期" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" end-placeholder="结束日期"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
@ -31,15 +30,18 @@ |
|
|
|
<div class="div_btn"> |
|
|
|
<el-button style="" class="diy-button--add" size="small" @click="handleInitAdd">+ 新增</el-button> |
|
|
|
</div> |
|
|
|
<el-table class="table" :data="tableData" border :height="tableHeight" v-loading="tableLoading" style="width: 100%;margin-top:16px"> |
|
|
|
<el-table class="table" :data="tableData" border :height="tableHeight" v-loading="tableLoading" |
|
|
|
style="width: 100%;margin-top:16px"> |
|
|
|
<el-table-column label="序号" header-align="center" align="center" type="index" width="50"></el-table-column> |
|
|
|
<el-table-column prop="title" header-align="center" align="center" label="标题名称" width="260"></el-table-column> |
|
|
|
<el-table-column prop="coverPic" header-align="center" align="center" label="图片" width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-image :src="scope.row.coverPic" style="width: 40px;height: 40px;" :preview-src-list="srcList" @click="imageClick(scope.row.coverPic)"></el-image> |
|
|
|
<el-image :src="scope.row.coverPic" style="width: 40px;height: 40px;" :preview-src-list="srcList" |
|
|
|
@click="imageClick(scope.row.coverPic)"></el-image> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="releaseTime" header-align="center" align="center" label="发布时间" width="160"></el-table-column> |
|
|
|
<el-table-column prop="releaseTime" header-align="center" align="center" label="发布时间" |
|
|
|
width="160"></el-table-column> |
|
|
|
<el-table-column prop="content" header-align="center" align="center" label="活动内容" width="260"></el-table-column> |
|
|
|
<el-table-column prop="top" header-align="center" align="center" label="是否置顶" width="120"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
@ -54,46 +56,51 @@ |
|
|
|
<span v-if="scope.row.status === 2">已下线</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="agencyName" header-align="center" align="center" label="发布单位" width="240"></el-table-column> |
|
|
|
<el-table-column prop="agencyName" header-align="center" align="center" label="发布单位" |
|
|
|
width="240"></el-table-column> |
|
|
|
<el-table-column label="操作" fixed="right" width="230" header-align="center" align="center" class="operate"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- <el-button type="text" style="color:#1C6AFD;" size="small" @click="handleDetail(scope.row)">查看</el-button>--> |
|
|
|
<!-- <el-button type="text" style="color:#1C6AFD;" size="small" @click="handleEdit(scope.row)">编辑</el-button>--> |
|
|
|
<!-- <el-button v-if="scope.row.status === 0" type="text" style="color:#1C6AFD;" size="small" @click="handleSumm(scope.row,'1')">上架</el-button>--> |
|
|
|
<!-- <el-button v-if="scope.row.status === 1" type="text" style="color:#1C6AFD;" size="small" @click="handleSumm(scope.row,'2')">下架</el-button>--> |
|
|
|
<!-- <el-button v-if="scope.row.status === 2" type="text" style="color:#1C6AFD;" size="small" @click="handleSumm(scope.row,'1')">上架</el-button>--> |
|
|
|
<!-- <el-button type="text" style="color:rgb(28, 106, 253);" size="small" @click="handleDelete(scope.row)">删除</el-button>--> |
|
|
|
<!-- <el-button type="text" style="color:#1C6AFD;" size="small" @click="handleDetail(scope.row)">查看</el-button>--> |
|
|
|
<!-- <el-button type="text" style="color:#1C6AFD;" size="small" @click="handleEdit(scope.row)">编辑</el-button>--> |
|
|
|
<!-- <el-button v-if="scope.row.status === 0" type="text" style="color:#1C6AFD;" size="small" @click="handleSumm(scope.row,'1')">上架</el-button>--> |
|
|
|
<!-- <el-button v-if="scope.row.status === 1" type="text" style="color:#1C6AFD;" size="small" @click="handleSumm(scope.row,'2')">下架</el-button>--> |
|
|
|
<!-- <el-button v-if="scope.row.status === 2" type="text" style="color:#1C6AFD;" size="small" @click="handleSumm(scope.row,'1')">上架</el-button>--> |
|
|
|
<!-- <el-button type="text" style="color:rgb(28, 106, 253);" size="small" @click="handleDelete(scope.row)">删除</el-button>--> |
|
|
|
|
|
|
|
<el-button type="text" style="color:#1C6AFD;" size="small" @click="handleDetail(scope.row)">查看</el-button> |
|
|
|
<el-button v-if="scope.row.status !== 1" type="text" style="color:#1C6AFD;" size="small" @click="handleEdit(scope.row)">编辑</el-button> |
|
|
|
<el-button v-if="scope.row.status === 2 || scope.row.status === 0" type="text" style="color:#1C6AFD;" size="small" @click="handleSumm(scope.row, 1)">上架</el-button> |
|
|
|
<el-button v-if="scope.row.status === 1" type="text" style="color:#1C6AFD;" size="small" @click="handleSumm(scope.row, 2)">下架</el-button> |
|
|
|
<el-button v-if="scope.row.status !== 1" type="text" style="color:#1C6AFD;" size="small" @click="handleDelete(scope.row)">删除</el-button> |
|
|
|
<el-button v-if="scope.row.status !== 1" type="text" style="color:#1C6AFD;" size="small" |
|
|
|
@click="handleEdit(scope.row)">编辑</el-button> |
|
|
|
<el-button v-if="scope.row.status === 2 || scope.row.status === 0" type="text" style="color:#1C6AFD;" |
|
|
|
size="small" @click="handleSumm(scope.row, 1)">上架</el-button> |
|
|
|
<el-button v-if="scope.row.status === 1" type="text" style="color:#1C6AFD;" size="small" |
|
|
|
@click="handleSumm(scope.row, 2)">下架</el-button> |
|
|
|
<el-button v-if="scope.row.status !== 1" type="text" style="color:#1C6AFD;" size="small" |
|
|
|
@click="handleDelete(scope.row)">删除</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<div> |
|
|
|
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageNo" |
|
|
|
:page-sizes="[10, 20, 50]" :page-size="pageSize" layout="sizes, prev, pager, next, total" :total="total"> |
|
|
|
:page-sizes="[10, 20, 50]" :page-size="pageSize" layout="sizes, prev, pager, next, total" :total="total"> |
|
|
|
</el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-dialog :visible.sync="detailShow" v-if="detailShow" formShow :close-on-click-modal="false" |
|
|
|
:close-on-press-escape="false" :title="'活动详情'" width="950px" top="5vh" @closed="detailClosed"> |
|
|
|
:close-on-press-escape="false" :title="'活动详情'" width="950px" top="5vh" @closed="detailClosed"> |
|
|
|
<el-form ref="addFormRef" :model="addForm" :rules="formRules" label-width="140px" class="add-form"> |
|
|
|
<!-- 标题名称 --> |
|
|
|
<el-form-item v-if="!lookDetail" label="标题名称" prop="title"> |
|
|
|
<el-input v-model="addForm.title" placeholder="请输入" style="width: 80%;"/> |
|
|
|
<el-input v-model="addForm.title" placeholder="请输入" style="width: 80%;" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="lookDetail" label="标题名称"> |
|
|
|
<div>{{addForm.title}}</div> |
|
|
|
<div>{{ addForm.title }}</div> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="!lookDetail" label="发布时间" prop="value11"> |
|
|
|
<el-date-picker v-model="addForm.releaseTime" type="datetime" placeholder="选择时间" value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
format="yyyy-MM-dd HH:mm:ss"></el-date-picker> |
|
|
|
<el-date-picker v-model="addForm.releaseTime" type="datetime" placeholder="选择时间" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="lookDetail" label="发布时间"> |
|
|
|
<div>{{addForm.releaseTime}}</div> |
|
|
|
<div>{{ addForm.releaseTime }}</div> |
|
|
|
</el-form-item> |
|
|
|
<!-- 发布状态 --> |
|
|
|
<el-form-item v-if="!lookDetail" label="发布状态"> |
|
|
|
@ -104,15 +111,16 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="lookDetail" label="发布状态"> |
|
|
|
<div v-if="addForm.status=='0'">待发布</div> |
|
|
|
<div v-if="addForm.status=='1'">已上线</div> |
|
|
|
<div v-if="addForm.status=='2'">已下线</div> |
|
|
|
<div v-if="addForm.status == '0'">待发布</div> |
|
|
|
<div v-if="addForm.status == '1'">已上线</div> |
|
|
|
<div v-if="addForm.status == '2'">已下线</div> |
|
|
|
</el-form-item> |
|
|
|
<!-- 上传图片(单张) --> |
|
|
|
<el-form-item v-if="!lookDetail" label="上传图片" prop="image"> |
|
|
|
<el-upload :headers="$getElUploadHeaders()" class="image-uploader" :action="uploadUrl" list-type="picture-card" :file-list="addForm.coverPic" |
|
|
|
:data="{ customerId: customerId }" :before-upload="beforeUploadImage" |
|
|
|
:on-preview="handlePreview" :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :on-success="handleAvatarSuccess"> |
|
|
|
<el-upload :headers="$getElUploadHeaders()" class="image-uploader" :action="uploadUrl" |
|
|
|
list-type="picture-card" :file-list="addForm.coverPic" :data="{ customerId: customerId }" |
|
|
|
:before-upload="beforeUploadImage" :on-preview="handlePreview" :on-remove="handleRemove" :limit="1" |
|
|
|
:on-exceed="handleExceed" :on-success="handleAvatarSuccess"> |
|
|
|
<i class="el-icon-plus"></i> |
|
|
|
</el-upload> |
|
|
|
<!-- 图片预览弹窗 --> |
|
|
|
@ -125,18 +133,19 @@ |
|
|
|
</el-form-item> |
|
|
|
<!-- 详细内容(富文本编辑器) --> |
|
|
|
<el-form-item v-if="!lookDetail" label="详细内容" prop="content"> |
|
|
|
<quill-editor v-model="addForm.content" :options="quillOptions" class="my-quill-editor"/> |
|
|
|
<quill-editor v-model="addForm.content" :options="quillOptions" class="my-quill-editor" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="lookDetail" label="详细内容"> |
|
|
|
<div>{{addForm.content}}</div> |
|
|
|
<div>{{ addForm.content }}</div> |
|
|
|
</el-form-item> |
|
|
|
<!-- 是否置顶 --> |
|
|
|
<el-form-item v-if="!lookDetail" label="是否置顶"> |
|
|
|
<el-switch v-model="addForm.top" active-color="#3493fd" inactive-color="#e2e2e3" :active-value="1" :inactive-value="0" /> |
|
|
|
<el-switch v-model="addForm.top" active-color="#3493fd" inactive-color="#e2e2e3" :active-value="1" |
|
|
|
:inactive-value="0" /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="lookDetail" label="是否置顶"> |
|
|
|
<div v-if="addForm.top=='0'">否</div> |
|
|
|
<div v-if="addForm.top=='1'">是</div> |
|
|
|
<div v-if="addForm.top == '0'">否</div> |
|
|
|
<div v-if="addForm.top == '1'">是</div> |
|
|
|
</el-form-item> |
|
|
|
<!-- 底部按钮 --> |
|
|
|
<el-form-item v-if="!lookDetail" style="text-align: right;margin-top: 10px"> |
|
|
|
@ -162,7 +171,7 @@ export default { |
|
|
|
components: { |
|
|
|
quillEditor // 注册富文本组件 |
|
|
|
}, |
|
|
|
data () { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
srcList: [], |
|
|
|
loading: false, |
|
|
|
@ -174,8 +183,8 @@ export default { |
|
|
|
agencyId: '', |
|
|
|
gridList: [],//所属网格 |
|
|
|
unitList: [], |
|
|
|
typeList:[],//活动类型 |
|
|
|
corganizerList:[],//协办方list |
|
|
|
typeList: [],//活动类型 |
|
|
|
corganizerList: [],//协办方list |
|
|
|
value1: [], |
|
|
|
value11: [], |
|
|
|
formData: { |
|
|
|
@ -187,7 +196,7 @@ export default { |
|
|
|
tableData: [], |
|
|
|
formTitle: '新增活动', |
|
|
|
detailShow: false, |
|
|
|
detail:{}, |
|
|
|
detail: {}, |
|
|
|
// 表单数据 |
|
|
|
addForm: { |
|
|
|
title: "", |
|
|
|
@ -241,13 +250,13 @@ export default { |
|
|
|
previewImage: "" |
|
|
|
} |
|
|
|
}, |
|
|
|
async mounted () { |
|
|
|
async mounted() { |
|
|
|
const { user } = this.$store.state |
|
|
|
this.agencyId = user.agencyId |
|
|
|
this.communityActivityList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
imageClick(val){ |
|
|
|
imageClick(val) { |
|
|
|
this.srcList = [] |
|
|
|
this.srcList.push(val) |
|
|
|
}, |
|
|
|
@ -266,27 +275,27 @@ export default { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
async handleSearch () { |
|
|
|
if(this.value1){ |
|
|
|
if(this.value1.length==2){ |
|
|
|
async handleSearch() { |
|
|
|
if (this.value1) { |
|
|
|
if (this.value1.length == 2) { |
|
|
|
this.formData.startTime = this.value1[0] |
|
|
|
this.formData.endTime = this.value1[1] |
|
|
|
} |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
this.formData.startTime = '' |
|
|
|
this.formData.endTime = '' |
|
|
|
} |
|
|
|
this.communityActivityList() |
|
|
|
}, |
|
|
|
detailClosed () { |
|
|
|
detailClosed() { |
|
|
|
this.detailShow = false |
|
|
|
}, |
|
|
|
async handleDetail (row) { |
|
|
|
async handleDetail(row) { |
|
|
|
this.lookDetail = true |
|
|
|
const url = "/actual/base/partyActivity/"+row.id; |
|
|
|
const url = "/actual/base/partyActivity/" + row.id; |
|
|
|
let params = {}; |
|
|
|
let data = await requestPost(url, params); |
|
|
|
console.log(data,"1111111111111") |
|
|
|
console.log(data, "1111111111111") |
|
|
|
if (data.code === 0) { |
|
|
|
this.addForm = data.data |
|
|
|
} else { |
|
|
|
@ -295,22 +304,22 @@ export default { |
|
|
|
this.detailShow = true |
|
|
|
this.formTitle = '详情' |
|
|
|
}, |
|
|
|
async handleEdit (row) { |
|
|
|
async handleEdit(row) { |
|
|
|
this.resetForm() |
|
|
|
this.lookDetail = false |
|
|
|
|
|
|
|
const url = "/actual/base/partyActivity/"+row.id; |
|
|
|
const url = "/actual/base/partyActivity/" + row.id; |
|
|
|
let params = {}; |
|
|
|
let data = await requestPost(url, params); |
|
|
|
console.log(data,"1111111111111") |
|
|
|
console.log(data, "1111111111111") |
|
|
|
if (data.code === 0) { |
|
|
|
this.addForm.id = data.data.id |
|
|
|
this.addForm.title = data.data.title |
|
|
|
this.addForm.coverPic = [{name: new Date(), url: data.data.coverPic}] |
|
|
|
this.addForm.coverPic = [{ name: new Date(), url: data.data.coverPic }] |
|
|
|
this.addForm.releaseTime = data.data.releaseTime |
|
|
|
this.addForm.content = data.data.content |
|
|
|
this.addForm.top = data.data.top |
|
|
|
if(data.data.status=='0'||data.data.status=='1'||data.data.status=='2'){ |
|
|
|
if (data.data.status == '0' || data.data.status == '1' || data.data.status == '2') { |
|
|
|
this.addForm.status = data.data.status.toString() |
|
|
|
} |
|
|
|
this.addForm.agencyName = data.data.agencyName |
|
|
|
@ -321,13 +330,13 @@ export default { |
|
|
|
this.formTitle = '修改' |
|
|
|
this.detailShow = true |
|
|
|
}, |
|
|
|
async handleSumm(row, val){ |
|
|
|
async handleSumm(row, val) { |
|
|
|
//上架 |
|
|
|
this.$confirm(val=='1'?'确定上架?':'确定下架?', "提示", { |
|
|
|
this.$confirm(val == '1' ? '确定上架?' : '确定下架?', "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
}).then( async () => { |
|
|
|
}).then(async () => { |
|
|
|
const url = "/actual/base/partyActivity/updateStatus" |
|
|
|
const { data, code, msg } = await requestPost(url, { id: row.id, status: val }) |
|
|
|
if (code === 0) { |
|
|
|
@ -343,7 +352,7 @@ export default { |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
resetForm(){ |
|
|
|
resetForm() { |
|
|
|
this.addForm = { |
|
|
|
title: "", |
|
|
|
coverPic: [], // 上传图片的文件列表 |
|
|
|
@ -355,7 +364,7 @@ export default { |
|
|
|
endTime: '', |
|
|
|
} |
|
|
|
}, |
|
|
|
handleInitAdd (e) { |
|
|
|
handleInitAdd(e) { |
|
|
|
this.resetForm() |
|
|
|
this.lookDetail = false |
|
|
|
this.formTitle = '新增' |
|
|
|
@ -373,14 +382,14 @@ export default { |
|
|
|
// 3. 包裹数组括号 |
|
|
|
return `[${arrStr}]`; |
|
|
|
}, |
|
|
|
async handleDelete (row) { |
|
|
|
async handleDelete(row) { |
|
|
|
this.$confirm("确认删除?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
}).then( async () => { |
|
|
|
}).then(async () => { |
|
|
|
const url = "/actual/base/partyActivity/delete" |
|
|
|
const { data, code, msg } = await requestPost(url, this.strToArrStr(row.id),{ |
|
|
|
const { data, code, msg } = await requestPost(url, this.strToArrStr(row.id), { |
|
|
|
'Content-Type': 'application/json' // 关键:改为后端支持的类型 |
|
|
|
}) |
|
|
|
if (code === 0) { |
|
|
|
@ -397,7 +406,7 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
//重置搜索条件 |
|
|
|
resetSearch () { |
|
|
|
resetSearch() { |
|
|
|
this.formData = { |
|
|
|
title: "", |
|
|
|
status: "", |
|
|
|
@ -409,13 +418,13 @@ export default { |
|
|
|
// this.loadTable() |
|
|
|
this.communityActivityList() |
|
|
|
}, |
|
|
|
handleSizeChange (val) { |
|
|
|
handleSizeChange(val) { |
|
|
|
this.pageSize = val |
|
|
|
this.pageNo = 1 |
|
|
|
// this.loadTable() |
|
|
|
this.communityActivityList() |
|
|
|
}, |
|
|
|
handleCurrentChange (val) { |
|
|
|
handleCurrentChange(val) { |
|
|
|
this.pageNo = val |
|
|
|
// this.loadTable() |
|
|
|
this.communityActivityList() |
|
|
|
@ -440,10 +449,10 @@ export default { |
|
|
|
} |
|
|
|
return isJPG && isLt2M; |
|
|
|
}, |
|
|
|
handleAvatarSuccess(res, file, fileList){ |
|
|
|
console.log(res,"++++++++++res") |
|
|
|
console.log(file,"++++++++++file") |
|
|
|
console.log(fileList,"++++++++++fileList") |
|
|
|
handleAvatarSuccess(res, file, fileList) { |
|
|
|
console.log(res, "++++++++++res") |
|
|
|
console.log(file, "++++++++++file") |
|
|
|
console.log(fileList, "++++++++++fileList") |
|
|
|
this.addForm.coverPic.push(res.data); |
|
|
|
}, |
|
|
|
// 图片预览 |
|
|
|
@ -466,43 +475,47 @@ export default { |
|
|
|
}, |
|
|
|
// 确定按钮:提交表单 |
|
|
|
handleSubmit() { |
|
|
|
console.log(this.addForm,"++++++++++++addForm") |
|
|
|
if(this.value11.length==2){ |
|
|
|
this.addForm.startTime = this.value11[0] |
|
|
|
this.addForm.endTime = this.value11[1] |
|
|
|
} |
|
|
|
this.addForm.coverPic = this.addForm.coverPic[0].url; |
|
|
|
console.log(this.addForm, "++++++++++++addForm") |
|
|
|
|
|
|
|
this.$refs.addFormRef.validate(async (valid) => { |
|
|
|
if (valid) { |
|
|
|
// 表单验证通过,这里写提交接口的逻辑 |
|
|
|
// 示例:this.$api.addData(this.addForm).then(res => { ... }) |
|
|
|
if (this.value11.length == 2) { |
|
|
|
this.addForm.startTime = this.value11[0] |
|
|
|
this.addForm.endTime = this.value11[1] |
|
|
|
} |
|
|
|
this.addForm.coverPic = this.addForm.coverPic[0].url; |
|
|
|
|
|
|
|
if(this.addForm.id){ |
|
|
|
if (this.addForm.id) { |
|
|
|
const url = "/actual/base/partyActivity/update"; |
|
|
|
let data = await requestPost(url, this.addForm); |
|
|
|
console.log(data,"1111111111111") |
|
|
|
console.log(data, "1111111111111") |
|
|
|
if (data.code === 0) { |
|
|
|
this.detailShow = false |
|
|
|
this.communityActivityList() |
|
|
|
this.$message.success("操作成功!"); |
|
|
|
// 提交后重置表单 |
|
|
|
this.resetSearch() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
const url = "/actual/base/partyActivity/save"; |
|
|
|
let data = await requestPost(url, this.addForm); |
|
|
|
console.log(data,"1111111111111") |
|
|
|
console.log(data, "1111111111111") |
|
|
|
if (data.code === 0) { |
|
|
|
this.detailShow = false |
|
|
|
this.communityActivityList() |
|
|
|
this.$message.success("操作成功!"); |
|
|
|
// 提交后重置表单 |
|
|
|
this.resetSearch() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 提交后重置表单 |
|
|
|
this.resetSearch() |
|
|
|
|
|
|
|
} else { |
|
|
|
this.$message.error("请完善必填项!"); |
|
|
|
return false; |
|
|
|
@ -511,7 +524,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
tableHeight () { |
|
|
|
tableHeight() { |
|
|
|
return this.$store.state.inIframe ? this.clientHeight - 430 + this.iframeHeight : this.clientHeight - 430 |
|
|
|
}, |
|
|
|
|
|
|
|
@ -525,7 +538,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped > |
|
|
|
<style lang="scss" scoped> |
|
|
|
.g-main { |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
@ -571,17 +584,21 @@ export default { |
|
|
|
margin-top: 10px; |
|
|
|
margin-right: 50px; |
|
|
|
} |
|
|
|
|
|
|
|
.add-form { |
|
|
|
//padding: 20px; |
|
|
|
} |
|
|
|
|
|
|
|
.image-uploader .el-upload--picture-card { |
|
|
|
width: 150px; |
|
|
|
height: 150px; |
|
|
|
} |
|
|
|
|
|
|
|
/* 穿透scoped,针对quill内部容器设置高度 */ |
|
|
|
/* Vue2中深度选择器:/deep/ 或 ::v-deep(兼容不同预处理器) */ |
|
|
|
/deep/ .my-quill-editor .ql-container { |
|
|
|
height: 260px !important; /* !important 覆盖默认样式 */ |
|
|
|
height: 260px !important; |
|
|
|
/* !important 覆盖默认样式 */ |
|
|
|
} |
|
|
|
|
|
|
|
/* 可选:调整编辑区的最小高度,防止内容过少时高度塌陷 */ |
|
|
|
|