|
|
|
@ -25,7 +25,7 @@ |
|
|
|
|
|
|
|
<el-form-item label="封面图片" label-width="140px" prop="coverPic"> |
|
|
|
<template> |
|
|
|
<upload-image :defaultFileList="fileList" :limit="1" @change="onChangeFileList"></upload-image> |
|
|
|
<upload-image :defaultFileList="fileList" :limit="1" @file-removed="handleFileRemoved" @change="onChangeFileList"></upload-image> |
|
|
|
</template> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
@ -90,6 +90,7 @@ export default { |
|
|
|
sendMsg: 0,//是否推送 |
|
|
|
top: 0,//是否置顶 |
|
|
|
status: 0 //状态 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return _form |
|
|
|
@ -121,6 +122,7 @@ export default { |
|
|
|
serviceList: [], |
|
|
|
// gridList: [], |
|
|
|
agencyId: '', |
|
|
|
agencyName:"", |
|
|
|
|
|
|
|
demandOptions: [], |
|
|
|
uploadUrl: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2', |
|
|
|
@ -130,11 +132,19 @@ export default { |
|
|
|
}, |
|
|
|
components: { Tinymce, UploadImage }, |
|
|
|
mounted() { |
|
|
|
this.agencyName=this.$store.state.user.agencyName, |
|
|
|
this.agencyId=this.$store.state.user.agencyId, |
|
|
|
this.advertisingTag() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
handleFileRemoved(file) { |
|
|
|
// 处理从子组件接收到的删除文件的信息 |
|
|
|
console.log('File removed:', file); |
|
|
|
this.formData.coverPic="" |
|
|
|
// 例如,可以在这里更新父组件的文件列表或执行其他操作 |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取广告标签 |
|
|
|
advertisingTag(){ |
|
|
|
@ -251,11 +261,14 @@ export default { |
|
|
|
}, 10000) |
|
|
|
|
|
|
|
this.$refs['ref_form'].validate((valid, messageObj) => { |
|
|
|
this.formData.agencyName= this.agencyName |
|
|
|
this.formData.agencyId= this.agencyId |
|
|
|
console.log("this.formData看看里面村的什么",this.formData) |
|
|
|
if (!valid) { |
|
|
|
app.util.validateRule(messageObj) |
|
|
|
this.btnDisable = false |
|
|
|
} else { |
|
|
|
|
|
|
|
this.addActivity() |
|
|
|
} |
|
|
|
}) |
|
|
|
@ -264,6 +277,7 @@ export default { |
|
|
|
if (this.formType === 'edit') { |
|
|
|
let url = '/actual/base/communityPublicity/update' |
|
|
|
this.formData.sendMsg= this.formData.sendMsg? 1:0 |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, this.formData) |
|
|
|
if (code === 0) { |
|
|
|
this.$message({ |
|
|
|
|