|
@ -13,13 +13,13 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="组织名称" prop="orgName" label-width="150px"> |
|
|
<el-form-item label="组织名称" prop="orgName" label-width="150px"> |
|
|
<el-input v-model.trim="formData.orgName" size="small" clearable placeholder="请输入活动名称" |
|
|
<el-input :disabled="disabled" v-model.trim="formData.orgName" size="small" clearable placeholder="请输入活动名称" |
|
|
class="u-item-width-normal"></el-input> |
|
|
class="u-item-width-normal"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="服务类型" label-width="150px" prop="serviceTypeList"> |
|
|
<el-form-item label="服务类型" label-width="150px" prop="serviceTypeList"> |
|
|
<el-select multiple-limit='4' class="u-item-width-normal" v-model.trim="formData.serviceTypeList" placeholder="请选择" clearable multiple> |
|
|
<el-select :disabled="disabled" multiple-limit='4' class="u-item-width-normal" v-model.trim="formData.serviceTypeList" placeholder="请选择" clearable multiple> |
|
|
<el-option v-for="item in ServicetypeListName" :key="item.value" :label="item.label" :value="item.value" > |
|
|
<el-option v-for="item in ServicetypeListName" :key="item.value" :label="item.label" :value="item.value" > |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
@ -28,7 +28,7 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="组织类型" label-width="150px" prop="orgType"> |
|
|
<el-form-item label="组织类型" label-width="150px" prop="orgType"> |
|
|
<el-cascader v-model="value" :options="OrganizationaltypeList" @change="handleChange" :props="props"></el-cascader> |
|
|
<el-cascader :disabled="disabled" v-model="formData.orgType" :options="OrganizationaltypeList" @change="handleNodeClick" :props="{ expandTrigger: 'hover',emitPath:false }"></el-cascader> |
|
|
<!-- <el-select class="u-item-width-normal" v-model.trim="formData.orgType" placeholder="请选择" |
|
|
<!-- <el-select class="u-item-width-normal" v-model.trim="formData.orgType" placeholder="请选择" |
|
|
clearable> |
|
|
clearable> |
|
|
<el-option v-for="item in OrganizationaltypeList" :key="item.value" :label="item.label" |
|
|
<el-option v-for="item in OrganizationaltypeList" :key="item.value" :label="item.label" |
|
@ -40,7 +40,7 @@ |
|
|
<el-col :span="24"> |
|
|
<el-col :span="24"> |
|
|
<el-form-item label="活动地点" prop="address" label-width="150px" style="display: block"> |
|
|
<el-form-item label="活动地点" prop="address" label-width="150px" style="display: block"> |
|
|
<div style="width: 634px"> |
|
|
<div style="width: 634px"> |
|
|
<el-select v-model.trim="searchValue" filterable style="width: 634px" remote |
|
|
<el-select :disabled="disabled" v-model.trim="searchValue" filterable style="width: 634px" remote |
|
|
:reserve-keyword="true" placeholder="请输入关键词" :remote-method="remoteMethod" |
|
|
:reserve-keyword="true" placeholder="请输入关键词" :remote-method="remoteMethod" |
|
|
:loading="loading"> |
|
|
:loading="loading"> |
|
|
<el-option v-for="(item, index) in searchOptions" |
|
|
<el-option v-for="(item, index) in searchOptions" |
|
@ -71,16 +71,16 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="组织封面图" label-width="150px" prop="orgImage"> |
|
|
<el-form-item label="组织封面图" label-width="150px" prop="fileList" > |
|
|
<template> |
|
|
<template> |
|
|
<upload-image :defaultFileList="fileList" :limit="1" @change="onChangeFileList" |
|
|
<upload-image :defaultFileList="fileList" :limit="1" @change="onChangeFileList" |
|
|
@file-removed="removedImg"></upload-image> |
|
|
@file-removed="removedImg"></upload-image> |
|
|
</template> |
|
|
</template> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-form-item label="组织介绍" prop="introduction" label-width="150px" style="display: block"> |
|
|
<el-form-item label="组织介绍" prop="introduction" label-width="150px" style="display: block"> |
|
|
<div class="item_width_1"> |
|
|
<div class="item_width_1"> |
|
|
<el-input type="textarea" autosize placeholder="请填写组织介绍" |
|
|
<el-input :disabled="disabled" type="textarea" autosize placeholder="请填写组织介绍" |
|
|
v-model.trim="formData.introduction" :autosize="{ minRows:4., maxRows: 10}"> |
|
|
v-model.trim="formData.introduction" :autosize="{ minRows:4., maxRows: 10}"> |
|
|
</el-input> |
|
|
</el-input> |
|
|
</div> |
|
|
</div> |
|
@ -88,14 +88,14 @@ |
|
|
|
|
|
|
|
|
<el-form-item label="志愿品牌" prop="brand" label-width="150px" style="display: block"> |
|
|
<el-form-item label="志愿品牌" prop="brand" label-width="150px" style="display: block"> |
|
|
<div class="item_width_1"> |
|
|
<div class="item_width_1"> |
|
|
<el-input type="textarea" autosize placeholder="请输入内容" v-model.trim="formData.brand" |
|
|
<el-input :disabled="disabled" type="textarea" autosize placeholder="请输入内容" v-model.trim="formData.brand" |
|
|
:autosize="{ minRows:4., maxRows: 10}"> |
|
|
:autosize="{ minRows:4., maxRows: 10}"> |
|
|
</el-input> |
|
|
</el-input> |
|
|
</div> |
|
|
</div> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="品牌展示图" label-width="150px" prop="brandImg"> |
|
|
<el-form-item label="品牌展示图" label-width="150px" prop="brandImg"> |
|
|
<template> |
|
|
<template> |
|
|
<upload-image :defaultFileList="formData.brandImg" :limit="1" @change="onChangeFileList1" |
|
|
<upload-image :defaultFileList="fileList1" :limit="1" @change="onChangeFileList1" |
|
|
@file-removed="removedImg"></upload-image> |
|
|
@file-removed="removedImg"></upload-image> |
|
|
</template> |
|
|
</template> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -130,6 +130,7 @@ |
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
disabled:false, |
|
|
volunteerOrgId:"0", |
|
|
volunteerOrgId:"0", |
|
|
fileList:[], |
|
|
fileList:[], |
|
|
fileList1:[], |
|
|
fileList1:[], |
|
@ -193,6 +194,46 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
handleNodeClick(data) { |
|
|
|
|
|
console.log(data,"datdsvva"); |
|
|
|
|
|
this.formData.orgType=data |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
async initForm(type, unitId) { |
|
|
|
|
|
console.log(type, unitId,"i就理解哦i"); |
|
|
|
|
|
// if(type=="info"){ |
|
|
|
|
|
// this.showdisabled=true |
|
|
|
|
|
// this.getTableDetail(unitId) |
|
|
|
|
|
// } |
|
|
|
|
|
if (type == "edit") { |
|
|
|
|
|
this.disabled=true |
|
|
|
|
|
this.volunteerDetail(unitId) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
//详情 |
|
|
|
|
|
async volunteerDetail (id) { |
|
|
|
|
|
const url = "/voluntary/volunteerOrg/getDetail" |
|
|
|
|
|
|
|
|
|
|
|
let params = { |
|
|
|
|
|
id: id |
|
|
|
|
|
} |
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
|
|
|
|
if (code === 0&&data) { |
|
|
|
|
|
this.formData = data[0]; |
|
|
|
|
|
this.searchValue= this.formData.address |
|
|
|
|
|
this.fileList=[] |
|
|
|
|
|
data[0].orgImage?this.fileList.push({fileUrl:data[0].orgImage}):""; |
|
|
|
|
|
data[0].brandImg?this.fileList1.push({fileUrl:data[0].brandImg}):""; |
|
|
|
|
|
|
|
|
|
|
|
console.log(this.formData,"this.formData"); |
|
|
|
|
|
console.log(this.fileList,"this.fileList"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(msg) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
validateContent() { |
|
|
validateContent() { |
|
|
// 使用正则表达式去除HTML标签后检查内容 |
|
|
// 使用正则表达式去除HTML标签后检查内容 |
|
|
const textContent = this.stripHtml(this.formData.sumUp); |
|
|
const textContent = this.stripHtml(this.formData.sumUp); |
|
@ -205,71 +246,7 @@ |
|
|
div.innerHTML = html; |
|
|
div.innerHTML = html; |
|
|
return div.textContent || div.innerText || ''; |
|
|
return div.textContent || div.innerText || ''; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// // 上传成功 |
|
|
|
|
|
// handleImgSuccess(res, file, fileList) { |
|
|
|
|
|
// if (res.code === 0 && res.msg === 'success') { |
|
|
|
|
|
// let format = file.name.split('.').pop(); |
|
|
|
|
|
// let srcType = file.raw.type; |
|
|
|
|
|
// let type = 'file'; |
|
|
|
|
|
// if (srcType.indexOf('image') != -1) { |
|
|
|
|
|
// type = 'image'; |
|
|
|
|
|
// } else if (srcType.indexOf('video') != -1) { |
|
|
|
|
|
// type = 'video'; |
|
|
|
|
|
// } |
|
|
|
|
|
// // this.formData.activityImgs.push({ |
|
|
|
|
|
// // format, |
|
|
|
|
|
// // name: file.name, |
|
|
|
|
|
// // size: file.size, |
|
|
|
|
|
// // type, |
|
|
|
|
|
// // url: res.data.url |
|
|
|
|
|
// // }); |
|
|
|
|
|
// // console.log('this.formData.activityImgs',res.data.url) |
|
|
|
|
|
// this.formData.activityImgs.push(res.data.url); |
|
|
|
|
|
|
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.$message.error(res.msg); |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
|
|
|
// // 删除图片 |
|
|
|
|
|
// handleImgRemove(file) { |
|
|
|
|
|
// console.log('handleImgRemove', file); |
|
|
|
|
|
// if (file.response) { |
|
|
|
|
|
// let index = this.formData.activityImgs.findIndex(item => item.url == file.response.data.url); |
|
|
|
|
|
// this.formData.activityImgs.splice(index, 1); |
|
|
|
|
|
// } else if (file.url) { |
|
|
|
|
|
// let index = this.formData.activityImgs.findIndex(item => item.url == file.url); |
|
|
|
|
|
// this.formData.activityImgs.splice(index, 1); |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
|
|
|
// 图片预览 |
|
|
|
|
|
// handleImgPreview(file) { |
|
|
|
|
|
// console.log(file); |
|
|
|
|
|
// window.open(file.url || file.response.data.url); |
|
|
|
|
|
// }, |
|
|
|
|
|
// // 文件数量超过限制 |
|
|
|
|
|
// handleImgExceed() { |
|
|
|
|
|
// this.$message({ |
|
|
|
|
|
// type: 'warning', |
|
|
|
|
|
// message: '文件数量最多不超过三个' |
|
|
|
|
|
// }); |
|
|
|
|
|
// }, |
|
|
|
|
|
// 上传前的验证 |
|
|
|
|
|
// beforeImgUpload(file) { |
|
|
|
|
|
// const isLt1M = file.size / 1024 / 1024 < 10; |
|
|
|
|
|
// const srcType = file.type; |
|
|
|
|
|
// const format = file.name.split('.').pop(); |
|
|
|
|
|
// if (!isLt1M) { |
|
|
|
|
|
// this.$message.error('上传文件大小不能超过 10MB!'); |
|
|
|
|
|
// return false; |
|
|
|
|
|
// } |
|
|
|
|
|
// if (srcType.indexOf('image') == -1) { |
|
|
|
|
|
// this.$message.error('仅限图片格式'); |
|
|
|
|
|
// return false; |
|
|
|
|
|
// } |
|
|
|
|
|
// return true; |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
async activityType() { |
|
|
async activityType() { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
if (!map) { |
|
|
if (!map) { |
|
@ -310,18 +287,6 @@ |
|
|
removedImg() { |
|
|
removedImg() { |
|
|
this.formData.coverPic = '' |
|
|
this.formData.coverPic = '' |
|
|
}, |
|
|
}, |
|
|
// onChangeFileList(e) { |
|
|
|
|
|
// console.log(e, 'sssssb'); |
|
|
|
|
|
// this.fileList = e.length > 0 ? e.map(item => ({ |
|
|
|
|
|
// fileType: '0', |
|
|
|
|
|
// fileUrl: item.response.data.url |
|
|
|
|
|
// })) : []; // 当e为空时清空fileList |
|
|
|
|
|
// if (e.length > 0) { |
|
|
|
|
|
// this.formData.qualification = e[0].response.data.url; |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.formData.qualification = ''; |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
|
|
|
onChangeFileList1(e) { |
|
|
onChangeFileList1(e) { |
|
|
console.log(e, 'sssssb'); |
|
|
console.log(e, 'sssssb'); |
|
|
this.fileList1 = e.length > 0 ? e.map(item => ({ |
|
|
this.fileList1 = e.length > 0 ? e.map(item => ({ |
|
@ -349,20 +314,7 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// onChangeImgs(e) { |
|
|
|
|
|
// this.activityImgs = []; |
|
|
|
|
|
// if (e.length > 0) { |
|
|
|
|
|
// e.forEach(item => { |
|
|
|
|
|
// let ob = { |
|
|
|
|
|
// fileType: '0', |
|
|
|
|
|
// fileUrl: item.response.data.url |
|
|
|
|
|
// }; |
|
|
|
|
|
// this.activityImgs.push(ob); |
|
|
|
|
|
// }); |
|
|
|
|
|
// console.log('this.activityImgs',this.activityImgs) |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
handleChange(value) { |
|
|
handleChange(value) { |
|
|
console.log(value); |
|
|
console.log(value); |
|
|
this.volunteerOrgId=value.toString() |
|
|
this.volunteerOrgId=value.toString() |
|
@ -384,44 +336,7 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
// async initForm(type, activityId) { |
|
|
|
|
|
// this.startLoading() |
|
|
|
|
|
// this.formType = type |
|
|
|
|
|
// if (type === 'edit') { |
|
|
|
|
|
// if (activityId.activityImgs || activityId.sumUp) { |
|
|
|
|
|
// this.records = true |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.records = false |
|
|
|
|
|
// } |
|
|
|
|
|
// this.formData = activityId |
|
|
|
|
|
// this.timeRange = [this.formData.startTime, this.formData.endTime] |
|
|
|
|
|
// console.log(activityId,"activityId"); |
|
|
|
|
|
|
|
|
|
|
|
// if (activityId.coverPic) { |
|
|
|
|
|
// let ob = { |
|
|
|
|
|
// fileType: '0', |
|
|
|
|
|
// fileUrl: activityId.coverPic |
|
|
|
|
|
// }; |
|
|
|
|
|
// this.fileList = [ob]; |
|
|
|
|
|
// this.formData.coverPic = ob.fileUrl; |
|
|
|
|
|
// if (this.formData.online == 1) { |
|
|
|
|
|
// this.online = true |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// } else if (type === 'records') { |
|
|
|
|
|
// this.records = true |
|
|
|
|
|
// } else if (type === 'summary') { |
|
|
|
|
|
// this.formData = activityId |
|
|
|
|
|
// this.formData.activityImgs = [] |
|
|
|
|
|
// console.log("this.formData", this.formData) |
|
|
|
|
|
// this.records = true |
|
|
|
|
|
// this.summary = false |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.records = false |
|
|
|
|
|
// } |
|
|
|
|
|
// this.endLoading() |
|
|
|
|
|
|
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
async getDemandOptions() { |
|
|
async getDemandOptions() { |
|
|
this.$http |
|
|
this.$http |
|
@ -492,6 +407,10 @@ |
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
|
this.OrganizationaltypeList = data; |
|
|
this.OrganizationaltypeList = data; |
|
|
|
|
|
console.log(this.OrganizationaltypeList,"sdlkjclsdc"); |
|
|
|
|
|
this.volunteertype1() |
|
|
|
|
|
this.volunteertype2() |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
this.$message.error(msg) |
|
|
this.$message.error(msg) |
|
|
} |
|
|
} |
|
@ -500,11 +419,26 @@ |
|
|
async volunteertype1 () { |
|
|
async volunteertype1 () { |
|
|
const url = "/voluntary/volunteerInfo/getOrgTypeList" |
|
|
const url = "/voluntary/volunteerInfo/getOrgTypeList" |
|
|
let params = { |
|
|
let params = { |
|
|
volunteerOrgId:this.volunteerOrgId |
|
|
volunteerOrgId:"serviceTeam" |
|
|
|
|
|
} |
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
if (code === 0) { |
|
|
|
|
|
this.OrganizationaltypeList[1].children=data; |
|
|
|
|
|
console.log(this.OrganizationaltypeList,"sdlk13243jclsdc"); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(msg) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
// 获取志愿组织类型 |
|
|
|
|
|
async volunteertype2 () { |
|
|
|
|
|
const url = "/voluntary/volunteerInfo/getOrgTypeList" |
|
|
|
|
|
let params = { |
|
|
|
|
|
volunteerOrgId:"serviceOrg" |
|
|
} |
|
|
} |
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
|
this.OrganizationaltypeList.childList=data; |
|
|
this.OrganizationaltypeList[0].children=data; |
|
|
console.log(this.OrganizationaltypeList,"sdlkjclsdc"); |
|
|
console.log(this.OrganizationaltypeList,"sdlkjclsdc"); |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|