|
|
@ -47,7 +47,7 @@ |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="开始征集 |
|
|
|
" style="display: block" prop="peopleCount" label-width="150px"> |
|
|
|
<el-switch v-model="formData.status" :active-value="0" :inactive-value="1" |
|
|
|
<el-switch v-model="formData.status" :active-value="1" :inactive-value="0" |
|
|
|
@change="handleSwitchChange"></el-switch> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -61,40 +61,40 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
import { requestPost } from '@/js/dai/request' |
|
|
|
import Tinymce from '@c/tinymce2/index.vue' |
|
|
|
import daiMap from "@/utils/dai-map"; |
|
|
|
import util from '@js/util.js'; |
|
|
|
// import UploadImage from './upload-image.vue' |
|
|
|
import UploadImage from '@/views/modules/plugins/rent/upload-image.vue' |
|
|
|
<script> |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
import { requestPost,requestGet } from '@/js/dai/request' |
|
|
|
import Tinymce from '@c/tinymce2/index.vue' |
|
|
|
import daiMap from "@/utils/dai-map"; |
|
|
|
import util from '@js/util.js'; |
|
|
|
// import UploadImage from './upload-image.vue' |
|
|
|
import UploadImage from '@/views/modules/plugins/rent/upload-image.vue' |
|
|
|
|
|
|
|
var map |
|
|
|
var search |
|
|
|
var markers |
|
|
|
var infoWindowList |
|
|
|
var geocoder // 新建一个正逆地址解析类 |
|
|
|
var map |
|
|
|
var search |
|
|
|
var markers |
|
|
|
var infoWindowList |
|
|
|
var geocoder // 新建一个正逆地址解析类 |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
|
|
|
|
return { |
|
|
|
attachmentList: [],//活动照片 |
|
|
|
fileList:[], |
|
|
|
fileList: [], |
|
|
|
SpecialList: [ |
|
|
|
{ value: 0, label: "消息发布" }, |
|
|
|
{ value: 1, label: "志愿风采" }, |
|
|
|
], |
|
|
|
formData: |
|
|
|
{ |
|
|
|
subjectTitle:'', |
|
|
|
subjectContent:"", |
|
|
|
typeCode:"", |
|
|
|
status:"0", |
|
|
|
id:"", |
|
|
|
attachmentList:[] |
|
|
|
subjectTitle: '', |
|
|
|
subjectContent: "", |
|
|
|
typeCode: "", |
|
|
|
status: 1, |
|
|
|
id: "", |
|
|
|
attachmentList: [] |
|
|
|
}, |
|
|
|
uploadUrl: `${window.SITE_CONFIG['apiURL']}/oss/file/uploadqrcodeV2`, |
|
|
|
customerId: localStorage.getItem('customerId'), |
|
|
@ -138,18 +138,18 @@ |
|
|
|
handleImgRemove(file) { |
|
|
|
console.log('handleImgRemove', file); |
|
|
|
if (file.response) { |
|
|
|
let index =this.formData.attachmentList.findIndex(item => item.url == file.response.data.url); |
|
|
|
let index = this.formData.attachmentList.findIndex(item => item.url == file.response.data.url); |
|
|
|
this.formData.attachmentList.splice(index, 1); |
|
|
|
} else if (file.url) { |
|
|
|
let index = this.formData.attachmentList.findIndex(item => item.url == file.url); |
|
|
|
this.formData.attachmentList.splice(index, 1); |
|
|
|
} |
|
|
|
console.log(this.formData.attachmentList,"sdjflskdfjklds"); |
|
|
|
console.log(this.formData.attachmentList, "sdjflskdfjklds"); |
|
|
|
|
|
|
|
}, |
|
|
|
// 上传成功 |
|
|
|
handleImgSuccess(res, file, fileList) { |
|
|
|
console.log(res,file,fileList,"dsfkljsdklfj"); |
|
|
|
console.log(res, file, fileList, "dsfkljsdklfj"); |
|
|
|
|
|
|
|
if (res.code === 0 && res.msg === 'success') { |
|
|
|
// let format = file.name.split('.').pop(); |
|
|
@ -161,8 +161,8 @@ |
|
|
|
// type = 'video'; |
|
|
|
// } |
|
|
|
this.formData.attachmentList.push(res.data.url); |
|
|
|
console.log( this.formData.attachmentList,":sdfkjslk"); |
|
|
|
if(this.formData.attachmentList.length>=3){ |
|
|
|
console.log(this.formData.attachmentList, ":sdfkjslk"); |
|
|
|
if (this.formData.attachmentList.length >= 3) { |
|
|
|
const element = document.querySelector('.el-upload--picture-card'); // 选择第一个匹配的元素 |
|
|
|
if (element) { |
|
|
|
element.style.display = 'none'; |
|
|
@ -197,10 +197,29 @@ |
|
|
|
this.formType = type |
|
|
|
if (type === 'edit') { |
|
|
|
this.formData = activityId |
|
|
|
this.getDetail(activityId) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
getDetail(activityId){ |
|
|
|
|
|
|
|
const url = '/governance/icEventSpecialSubject/getDetail' |
|
|
|
let params = { |
|
|
|
id: activityId.id |
|
|
|
} |
|
|
|
|
|
|
|
requestGet(url, params).then(res=>{ |
|
|
|
console.log(res,"sdkljklsdf"); |
|
|
|
this.formData=res.data |
|
|
|
this.formData.status=Number(this.formData.status) |
|
|
|
console.log(this.formData,"dsfgjsldg"); |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
//加载组织 |
|
|
|
async loadFormData() { |
|
|
@ -245,12 +264,11 @@ |
|
|
|
// this.$message.error('请选择状态'); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
|
|
|
|
console.log(this.formData,"this.formData"); |
|
|
|
console.log(this.formData, "this.formData"); |
|
|
|
this.addSpecial() |
|
|
|
}, |
|
|
|
async addSpecial() { |
|
|
|
if(this.formType=="edit"){ |
|
|
|
if (this.formType == "edit") { |
|
|
|
let url = '/governance/icEventSpecialSubject/update' |
|
|
|
const { data, code, msg } = await requestPost(url, this.formData) |
|
|
|
if (code === 0) { |
|
|
@ -263,7 +281,7 @@ |
|
|
|
} |
|
|
|
console.log("sdlkfjklsdf "); |
|
|
|
this.$emit('showAddClose') |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
let url = '/governance/icEventSpecialSubject/save' |
|
|
|
const { data, code, msg } = await requestPost(url, this.formData) |
|
|
|
if (code === 0) { |
|
|
@ -289,14 +307,14 @@ |
|
|
|
computed: { |
|
|
|
dataRule() { |
|
|
|
return { |
|
|
|
columnId: [ |
|
|
|
{ required: true, message: '请选择所属栏目', trigger: 'blur' } |
|
|
|
subjectTitle: [ |
|
|
|
{ required: true, message: '所属专题不能为空', trigger: 'blur' } |
|
|
|
], |
|
|
|
content: [ |
|
|
|
{ required: true, message: '活动详情不能为空', trigger: 'blur' } |
|
|
|
typeCode: [ |
|
|
|
{ required: true, message: '征集领域不能为空', trigger: 'blur' } |
|
|
|
], |
|
|
|
title: [ |
|
|
|
{ required: true, message: '文章标题不能为空', trigger: 'blur' } |
|
|
|
subjectContent: [ |
|
|
|
{ required: true, message: '征集内容不能为空', trigger: 'blur' } |
|
|
|
], |
|
|
|
fileList: [ |
|
|
|
{ required: true, message: '请选择活动照片', trigger: 'blur' } |
|
|
@ -310,64 +328,68 @@ |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
destroyed () { |
|
|
|
destroyed() { |
|
|
|
map = null |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
@import "@/assets/scss/modules/visual/communityManageForm.scss"; |
|
|
|
</style> |
|
|
|
<style lang="scss" scoped> |
|
|
|
<style lang="scss" scoped> |
|
|
|
@import "@/assets/scss/modules/visual/communityManageForm.scss"; |
|
|
|
</style> |
|
|
|
<style lang="scss" scoped> |
|
|
|
/deep/ .el-upload--picture-card { |
|
|
|
width: 60px; |
|
|
|
height: 60px; |
|
|
|
line-height: 70px; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .el-upload-list--picture-card .el-upload-list__item { |
|
|
|
width: 60px; |
|
|
|
height: 60px; |
|
|
|
} |
|
|
|
/deep/ .el-upload-dragger{ |
|
|
|
|
|
|
|
/deep/ .el-upload-dragger { |
|
|
|
width: 60px; |
|
|
|
height: 60px; |
|
|
|
} |
|
|
|
.item_width_1 { |
|
|
|
|
|
|
|
.item_width_1 { |
|
|
|
width: 634px; |
|
|
|
|
|
|
|
/deep/.tox .tox-dialog { |
|
|
|
z-index: 20000; |
|
|
|
} |
|
|
|
} |
|
|
|
.u-item-width-normal{ |
|
|
|
} |
|
|
|
|
|
|
|
.u-item-width-normal { |
|
|
|
width: 222px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.tinymce_view { |
|
|
|
.tinymce_view { |
|
|
|
::v-deep .tox .tox-dialog { |
|
|
|
z-index: 2000000000; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.div_map { |
|
|
|
.div_map { |
|
|
|
position: relative; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.div_searchmap { |
|
|
|
.div_searchmap { |
|
|
|
z-index: 5000; |
|
|
|
position: absolute; |
|
|
|
top: 5px; |
|
|
|
left: 5px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.tinymce_view { |
|
|
|
.tinymce_view { |
|
|
|
height: 400px; |
|
|
|
overflow: auto; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.text_p { |
|
|
|
.text_p { |
|
|
|
margin: 0; |
|
|
|
padding: 0 10px; |
|
|
|
border: 1px solid #d9d9d9; |
|
|
@ -376,5 +398,5 @@ |
|
|
|
>p { |
|
|
|
margin: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
} |
|
|
|
</style> |