|
@ -20,15 +20,15 @@ |
|
|
<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 multiple-limit='4' class="u-item-width-normal" v-model.trim="formData.serviceTypeList" placeholder="请选择" clearable multiple> |
|
|
<el-option v-for="item in ServicetypeList" :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> |
|
|
</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="Organizationaltype" > |
|
|
<el-form-item label="组织类型" label-width="150px" prop="orgType" > |
|
|
<el-select class="u-item-width-normal" v-model.trim="formData.Organizationaltype" placeholder="请选择" clearable > |
|
|
<el-select class="u-item-width-normal" v-model.trim="formData.orgType" placeholder="请选择" clearable > |
|
|
<el-option v-for="item in Organizationaltype" :key="item.value" :label="item.label" :value="item.value"> |
|
|
<el-option v-for="item in OrganizationaltypeList" :key="item.value" :label="item.label" :value="item.value"> |
|
|
</el-option> |
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -67,7 +67,7 @@ |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="组织封面图" label-width="150px" prop="fileList"> |
|
|
<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-list="formData.fileList" |
|
|
@file-removed="removedImg"></upload-image> |
|
|
@file-removed="removedImg"></upload-image> |
|
|
</template> |
|
|
</template> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
@ -124,19 +124,11 @@ |
|
|
data() { |
|
|
data() { |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
|
|
|
|
|
|
activityImgs: [],//活动照片 |
|
|
|
|
|
fileList:[], |
|
|
fileList:[], |
|
|
|
|
|
fileList1:[], |
|
|
searchValue:"", |
|
|
searchValue:"", |
|
|
ServicetypeList:[ |
|
|
OrganizationaltypeList:[], |
|
|
{ label: "敬老爱老", value: 1 }, |
|
|
ServicetypeListName:[], |
|
|
{ label: "助残帮困", value: 2 }, |
|
|
|
|
|
{ label: "扶贫帮困", value: 3 }, |
|
|
|
|
|
{ label: "环保绿化", value: 4 }, |
|
|
|
|
|
{ label: "文化教育", value: 5 }, |
|
|
|
|
|
{ label: "扶贫帮困", value: 6 }, |
|
|
|
|
|
{ label: "其他", value: 7 }, |
|
|
|
|
|
], |
|
|
|
|
|
Organizationaltype:[ |
|
|
Organizationaltype:[ |
|
|
{ label: "社区", value: 1 }, |
|
|
{ label: "社区", value: 1 }, |
|
|
{ label: "企业", value: 2 }, |
|
|
{ label: "企业", value: 2 }, |
|
@ -144,39 +136,27 @@ |
|
|
], |
|
|
], |
|
|
formData: |
|
|
formData: |
|
|
{ |
|
|
{ |
|
|
VolunteerPic:"",//品牌图片 |
|
|
status:"pass",//审核状态 |
|
|
Volunteerbrand:"",//志愿品牌 |
|
|
numberNum:"",//组织成员数量 |
|
|
Organizational:"",//组织介绍 |
|
|
userId:"",//志愿者id |
|
|
fileList: [],//封面图片 |
|
|
agencyId:"",//组织id |
|
|
AdministratorIDCard:"",//身份证信息 |
|
|
orgType:"", |
|
|
Administratorphone:"",//管理员电话 |
|
|
brandImg:"",//品牌图片 |
|
|
AdministratorName:"",//管理员姓名 |
|
|
brand:"",//志愿品牌 |
|
|
|
|
|
introduction:"",//组织介绍 |
|
|
|
|
|
qualification: "",//封面图片 |
|
|
|
|
|
idCard:"",//身份证信息 |
|
|
|
|
|
mobile:"",//管理员电话 |
|
|
|
|
|
operator:"",//管理员姓名 |
|
|
Organizationaltype:"",//组织类型 |
|
|
Organizationaltype:"",//组织类型 |
|
|
Servicetype:"",//服务类型 |
|
|
// serviceTypeList:"",//服务类型 |
|
|
OrganizationName:"",//组织名称 |
|
|
orgName:"",//组织名称 |
|
|
agencyName:"",//所属组织 |
|
|
agencyName:"",//所属组织 |
|
|
Servicetype:[], |
|
|
serviceTypeList:[],//服务类型 |
|
|
id: "", |
|
|
|
|
|
typeId: "", |
|
|
|
|
|
activityName: "",//活动名称 |
|
|
|
|
|
status: 0,//状态 |
|
|
|
|
|
assistingParty: "",//协办方 |
|
|
|
|
|
startTime: "",//开始时间 |
|
|
|
|
|
endTime: "",//结束时间 |
|
|
|
|
|
coverPic: "",//封面图片地址 |
|
|
|
|
|
content: "",//活动内容 |
|
|
|
|
|
address: "",//地址 |
|
|
address: "",//地址 |
|
|
online: 0,//开关 |
|
|
|
|
|
cutOffTime: "",//截止时间 |
|
|
|
|
|
points: 0,//积分 |
|
|
|
|
|
participants: 0,//活动人数 |
|
|
|
|
|
sendMessage: 0,//推送数 |
|
|
|
|
|
sumUp: "",//活动总结 |
|
|
|
|
|
activityImgs: [],//图片列表 |
|
|
|
|
|
longitude: this.$store.state.user.longitude, //经度 |
|
|
longitude: this.$store.state.user.longitude, //经度 |
|
|
latitude: this.$store.state.user.latitude,//纬度 |
|
|
latitude: this.$store.state.user.latitude,//纬度 |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
corganizerList: [], |
|
|
corganizerList: [], |
|
|
uploadUrl: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2', |
|
|
uploadUrl: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2', |
|
|
customerId: localStorage.getItem('customerId'), |
|
|
customerId: localStorage.getItem('customerId'), |
|
@ -188,9 +168,21 @@ |
|
|
components: { Tinymce, UploadImage }, |
|
|
components: { Tinymce, UploadImage }, |
|
|
mounted() { |
|
|
mounted() { |
|
|
console.log(this.VolunteerList,"this.VolunteerLis"); |
|
|
console.log(this.VolunteerList,"this.VolunteerLis"); |
|
|
this.formData=this.VolunteerList |
|
|
let { latitude, longitude } = this.$store.state.user; |
|
|
|
|
|
if (!latitude || latitude == "" || latitude == "0") { |
|
|
|
|
|
latitude = 39.9088810666821; |
|
|
|
|
|
longitude = 116.39743841556731; |
|
|
|
|
|
} |
|
|
|
|
|
this.formData.latitude = latitude; |
|
|
|
|
|
this.formData.longitude = longitude; |
|
|
|
|
|
this.volunteerDetail() |
|
|
|
|
|
this.volunteerservicetype() |
|
|
|
|
|
this.volunteertype() |
|
|
|
|
|
this.formData.agencyId=this.$store.state.user.agencyId |
|
|
|
|
|
this.formData.agencyName=this.$store.state.user.agencyName |
|
|
this.activityType() |
|
|
this.activityType() |
|
|
this.listServerOrg() |
|
|
this.listServerOrg() |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
@ -207,69 +199,69 @@ |
|
|
return div.textContent || div.innerText || ''; |
|
|
return div.textContent || div.innerText || ''; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 上传成功 |
|
|
// // 上传成功 |
|
|
handleImgSuccess(res, file, fileList) { |
|
|
// handleImgSuccess(res, file, fileList) { |
|
|
if (res.code === 0 && res.msg === 'success') { |
|
|
// if (res.code === 0 && res.msg === 'success') { |
|
|
let format = file.name.split('.').pop(); |
|
|
// let format = file.name.split('.').pop(); |
|
|
let srcType = file.raw.type; |
|
|
// let srcType = file.raw.type; |
|
|
let type = 'file'; |
|
|
// let type = 'file'; |
|
|
if (srcType.indexOf('image') != -1) { |
|
|
// if (srcType.indexOf('image') != -1) { |
|
|
type = 'image'; |
|
|
// type = 'image'; |
|
|
} else if (srcType.indexOf('video') != -1) { |
|
|
// } else if (srcType.indexOf('video') != -1) { |
|
|
type = 'video'; |
|
|
// type = 'video'; |
|
|
} |
|
|
// } |
|
|
// this.formData.activityImgs.push({ |
|
|
// // this.formData.activityImgs.push({ |
|
|
// format, |
|
|
// // format, |
|
|
// name: file.name, |
|
|
// // name: file.name, |
|
|
// size: file.size, |
|
|
// // size: file.size, |
|
|
// type, |
|
|
// // type, |
|
|
// url: res.data.url |
|
|
// // url: res.data.url |
|
|
// }); |
|
|
// // }); |
|
|
// console.log('this.formData.activityImgs',res.data.url) |
|
|
// // console.log('this.formData.activityImgs',res.data.url) |
|
|
this.formData.activityImgs.push(res.data.url); |
|
|
// this.formData.activityImgs.push(res.data.url); |
|
|
|
|
|
|
|
|
} else { |
|
|
// } else { |
|
|
this.$message.error(res.msg); |
|
|
// this.$message.error(res.msg); |
|
|
} |
|
|
// } |
|
|
}, |
|
|
// }, |
|
|
// 删除图片 |
|
|
// // 删除图片 |
|
|
handleImgRemove(file) { |
|
|
// handleImgRemove(file) { |
|
|
console.log('handleImgRemove', file); |
|
|
// console.log('handleImgRemove', file); |
|
|
if (file.response) { |
|
|
// if (file.response) { |
|
|
let index = this.formData.activityImgs.findIndex(item => item.url == file.response.data.url); |
|
|
// let index = this.formData.activityImgs.findIndex(item => item.url == file.response.data.url); |
|
|
this.formData.activityImgs.splice(index, 1); |
|
|
// this.formData.activityImgs.splice(index, 1); |
|
|
} else if (file.url) { |
|
|
// } else if (file.url) { |
|
|
let index = this.formData.activityImgs.findIndex(item => item.url == file.url); |
|
|
// let index = this.formData.activityImgs.findIndex(item => item.url == file.url); |
|
|
this.formData.activityImgs.splice(index, 1); |
|
|
// this.formData.activityImgs.splice(index, 1); |
|
|
} |
|
|
// } |
|
|
}, |
|
|
// }, |
|
|
// 图片预览 |
|
|
// 图片预览 |
|
|
handleImgPreview(file) { |
|
|
// handleImgPreview(file) { |
|
|
console.log(file); |
|
|
// console.log(file); |
|
|
window.open(file.url || file.response.data.url); |
|
|
// window.open(file.url || file.response.data.url); |
|
|
}, |
|
|
// }, |
|
|
// 文件数量超过限制 |
|
|
// // 文件数量超过限制 |
|
|
handleImgExceed() { |
|
|
// handleImgExceed() { |
|
|
this.$message({ |
|
|
// this.$message({ |
|
|
type: 'warning', |
|
|
// type: 'warning', |
|
|
message: '文件数量最多不超过三个' |
|
|
// message: '文件数量最多不超过三个' |
|
|
}); |
|
|
// }); |
|
|
}, |
|
|
// }, |
|
|
// 上传前的验证 |
|
|
// 上传前的验证 |
|
|
beforeImgUpload(file) { |
|
|
// beforeImgUpload(file) { |
|
|
const isLt1M = file.size / 1024 / 1024 < 10; |
|
|
// const isLt1M = file.size / 1024 / 1024 < 10; |
|
|
const srcType = file.type; |
|
|
// const srcType = file.type; |
|
|
const format = file.name.split('.').pop(); |
|
|
// const format = file.name.split('.').pop(); |
|
|
if (!isLt1M) { |
|
|
// if (!isLt1M) { |
|
|
this.$message.error('上传文件大小不能超过 10MB!'); |
|
|
// this.$message.error('上传文件大小不能超过 10MB!'); |
|
|
return false; |
|
|
// return false; |
|
|
} |
|
|
// } |
|
|
if (srcType.indexOf('image') == -1) { |
|
|
// if (srcType.indexOf('image') == -1) { |
|
|
this.$message.error('仅限图片格式'); |
|
|
// this.$message.error('仅限图片格式'); |
|
|
return false; |
|
|
// return false; |
|
|
} |
|
|
// } |
|
|
return true; |
|
|
// return true; |
|
|
}, |
|
|
// }, |
|
|
|
|
|
|
|
|
async activityType() { |
|
|
async activityType() { |
|
|
const url = "/actual/base/activityType/page" |
|
|
const url = "/actual/base/activityType/page" |
|
@ -331,9 +323,21 @@ |
|
|
fileUrl: item.response.data.url |
|
|
fileUrl: item.response.data.url |
|
|
})) : []; // 当e为空时清空fileList |
|
|
})) : []; // 当e为空时清空fileList |
|
|
if (e.length > 0) { |
|
|
if (e.length > 0) { |
|
|
this.formData.coverPic = e[0].response.data.url; |
|
|
this.formData.qualification = e[0].response.data.url; |
|
|
} else { |
|
|
} else { |
|
|
this.formData.coverPic = ''; |
|
|
this.formData.qualification = ''; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
onChangeFileList1(e) { |
|
|
|
|
|
console.log(e, 'sssssb'); |
|
|
|
|
|
this.fileList1 = e.length > 0 ? e.map(item => ({ |
|
|
|
|
|
fileType: '0', |
|
|
|
|
|
fileUrl: item.response.data.url |
|
|
|
|
|
})) : []; // 当e为空时清空fileList |
|
|
|
|
|
if (e.length > 0) { |
|
|
|
|
|
this.formData.brandImg = e[0].response.data.url; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.formData.brandImg = ''; |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -382,44 +386,44 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
async initForm(type, activityId) { |
|
|
// async initForm(type, activityId) { |
|
|
this.startLoading() |
|
|
// this.startLoading() |
|
|
this.formType = type |
|
|
// this.formType = type |
|
|
if (type === 'edit') { |
|
|
// if (type === 'edit') { |
|
|
if (activityId.activityImgs || activityId.sumUp) { |
|
|
// if (activityId.activityImgs || activityId.sumUp) { |
|
|
this.records = true |
|
|
// this.records = true |
|
|
} else { |
|
|
// } else { |
|
|
this.records = false |
|
|
// this.records = false |
|
|
} |
|
|
// } |
|
|
this.formData = activityId |
|
|
// this.formData = activityId |
|
|
this.timeRange = [this.formData.startTime, this.formData.endTime] |
|
|
// this.timeRange = [this.formData.startTime, this.formData.endTime] |
|
|
console.log(activityId,"activityId"); |
|
|
// console.log(activityId,"activityId"); |
|
|
|
|
|
|
|
|
if (activityId.coverPic) { |
|
|
// if (activityId.coverPic) { |
|
|
let ob = { |
|
|
// let ob = { |
|
|
fileType: '0', |
|
|
// fileType: '0', |
|
|
fileUrl: activityId.coverPic |
|
|
// fileUrl: activityId.coverPic |
|
|
}; |
|
|
// }; |
|
|
this.fileList = [ob]; |
|
|
// this.fileList = [ob]; |
|
|
this.formData.coverPic = ob.fileUrl; |
|
|
// this.formData.coverPic = ob.fileUrl; |
|
|
if (this.formData.online == 1) { |
|
|
// if (this.formData.online == 1) { |
|
|
this.online = true |
|
|
// this.online = true |
|
|
} |
|
|
// } |
|
|
} |
|
|
// } |
|
|
} else if (type === 'records') { |
|
|
// } else if (type === 'records') { |
|
|
this.records = true |
|
|
// this.records = true |
|
|
} else if (type === 'summary') { |
|
|
// } else if (type === 'summary') { |
|
|
this.formData = activityId |
|
|
// this.formData = activityId |
|
|
this.formData.activityImgs = [] |
|
|
// this.formData.activityImgs = [] |
|
|
console.log("this.formData", this.formData) |
|
|
// console.log("this.formData", this.formData) |
|
|
this.records = true |
|
|
// this.records = true |
|
|
this.summary = false |
|
|
// this.summary = false |
|
|
} else { |
|
|
// } else { |
|
|
this.records = false |
|
|
// this.records = false |
|
|
} |
|
|
// } |
|
|
this.endLoading() |
|
|
// this.endLoading() |
|
|
|
|
|
|
|
|
}, |
|
|
// }, |
|
|
|
|
|
|
|
|
async getDemandOptions() { |
|
|
async getDemandOptions() { |
|
|
this.$http |
|
|
this.$http |
|
@ -481,8 +485,58 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
//详情 |
|
|
|
|
|
async volunteerDetail () { |
|
|
|
|
|
const url = "/voluntary/volunteerOrg/getDetail" |
|
|
|
|
|
|
|
|
|
|
|
let params = { |
|
|
|
|
|
id: this.VolunteerList.id |
|
|
|
|
|
} |
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
|
|
this.formData = data[0]; |
|
|
|
|
|
this.searchValue= this.formData.address |
|
|
|
|
|
this.formData.fileList=[{url:data[0].qualification}] |
|
|
|
|
|
console.log(this.formData,"this.formData"); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(msg) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
// 获取志愿组织类型 |
|
|
|
|
|
async volunteertype () { |
|
|
|
|
|
const url = "/sys/dict/data/dictlist" |
|
|
|
|
|
|
|
|
|
|
|
let params = { |
|
|
|
|
|
dictType: 'volunteer_org_type' |
|
|
|
|
|
} |
|
|
|
|
|
console.log("vol123234"); |
|
|
|
|
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
|
|
this.OrganizationaltypeList = data; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(msg) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
// 获取志愿组织服务类型 |
|
|
|
|
|
async volunteerservicetype () { |
|
|
|
|
|
const url = "/sys/dict/data/dictlist" |
|
|
|
|
|
|
|
|
|
|
|
let params = { |
|
|
|
|
|
dictType: 'volunteer_org_service_type' |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
|
|
this.ServicetypeListName = data; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(msg) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
//加载组织 |
|
|
//加载组织 |
|
|
async loadFormData() { |
|
|
async loadFormData() { |
|
|
const url = '/actual/base/icpartyactivity/detail' |
|
|
const url = '/actual/base/icpartyactivity/detail' |
|
@ -508,6 +562,8 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async handleComfirm() { |
|
|
async handleComfirm() { |
|
|
|
|
|
console.log(this.formData," this.formData"); |
|
|
|
|
|
|
|
|
if (!this.formData.agencyName) { |
|
|
if (!this.formData.agencyName) { |
|
|
this.$message.error('请选择所属组织'); |
|
|
this.$message.error('请选择所属组织'); |
|
|
return; |
|
|
return; |
|
@ -515,7 +571,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.formData.Organizational) { |
|
|
if (!this.formData.introduction) { |
|
|
this.$message.error('请输入组织介绍'); |
|
|
this.$message.error('请输入组织介绍'); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@ -525,17 +581,17 @@ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!this.formData.AdministratorIDCard) { |
|
|
if (!this.formData.idCard) { |
|
|
this.$message.error('请输入身份证信息'); |
|
|
this.$message.error('请输入身份证信息'); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!this.formData.Administratorphone) { |
|
|
if (!this.formData.mobile) { |
|
|
this.$message.error('请输入管理员电话'); |
|
|
this.$message.error('请输入管理员电话'); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!this.formData.AdministratorName) { |
|
|
if (!this.formData.operator) { |
|
|
this.$message.error('请输入管理员姓名'); |
|
|
this.$message.error('请输入管理员姓名'); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@ -545,58 +601,42 @@ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!this.formData.Servicetype) { |
|
|
if (!this.formData.serviceTypeList) { |
|
|
this.$message.error('请输入服务类型'); |
|
|
this.$message.error('请输入服务类型'); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!this.formData.OrganizationName) { |
|
|
if (!this.formData.orgName) { |
|
|
this.$message.error('请输入组织名称'); |
|
|
this.$message.error('请输入组织名称'); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
console.log(this.formData,"this.formData"); |
|
|
console.log(this.formData,"this.formData"); |
|
|
// this.addActivity() |
|
|
this.addActivity() |
|
|
this.$emit('showEditClose') |
|
|
|
|
|
}, |
|
|
}, |
|
|
async addActivity() { |
|
|
async addActivity() { |
|
|
if (this.formType === 'edit' || this.formType === 'summary') { |
|
|
let url = '/voluntary/volunteerOrg/saveOrUpdate' |
|
|
let url = '/actual/base/communityActivity/update' |
|
|
|
|
|
const { data, code, msg } = await requestPost(url, this.formData) |
|
|
const { data, code, msg } = await requestPost(url, this.formData) |
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
type: 'success', |
|
|
type: 'success', |
|
|
message: '操作成功' |
|
|
message: '操作成功' |
|
|
}) |
|
|
}) |
|
|
this.resetData() |
|
|
// this.resetData() |
|
|
this.$emit('dialogOk') |
|
|
this.$emit('showAddClose') |
|
|
this.btnDisable = false |
|
|
this.btnDisable = false |
|
|
} else { |
|
|
} else { |
|
|
this.btnDisable = false |
|
|
this.btnDisable = false |
|
|
this.$message.error(msg) |
|
|
this.$message.error(msg) |
|
|
} |
|
|
} |
|
|
} else { |
|
|
|
|
|
let url = '/actual/base/communityActivity/save' |
|
|
|
|
|
const { data, code, msg } = await requestPost(url, this.formData) |
|
|
|
|
|
if (code === 0) { |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
message: '操作成功' |
|
|
|
|
|
}) |
|
|
|
|
|
this.resetData() |
|
|
|
|
|
this.$emit('dialogOk') |
|
|
|
|
|
this.btnDisable = false |
|
|
|
|
|
} else { |
|
|
|
|
|
this.btnDisable = false |
|
|
|
|
|
this.$message.error(msg) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
handleCancle() { |
|
|
handleCancle() { |
|
|
console.log("sdlkfjklsdf "); |
|
|
console.log("sdlkfjklsdf "); |
|
|
this.$emit('showEditClose') |
|
|
this.$emit('showAddClose') |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -748,30 +788,30 @@ |
|
|
dataRule() { |
|
|
dataRule() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
|
|
|
OrganizationName: [ |
|
|
orgName: [ |
|
|
{ required: true, message: '组织名称不能为空', trigger: 'blur' } |
|
|
{ required: true, message: '组织名称不能为空', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
Servicetype: [ |
|
|
serviceTypeList: [ |
|
|
{ required: true, message: '请选择服务类型', trigger: 'blur' } |
|
|
{ required: true, message: '请选择服务类型', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
Organizationaltype: [ |
|
|
Organizationaltype: [ |
|
|
{ required: true, message: '请选择组织类型', trigger: 'blur' } |
|
|
{ required: true, message: '请选择组织类型', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
AdministratorName: [ |
|
|
operator: [ |
|
|
{ required: true, message: '请输入管理员姓名', trigger: 'blur' } |
|
|
{ required: true, message: '请输入管理员姓名', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
AdministratorIDCard: [ |
|
|
idCard: [ |
|
|
{ required: true, message: '身份证号不能为空不能为空', trigger: 'blur' }, |
|
|
{ required: true, message: '身份证号不能为空不能为空', trigger: 'blur' }, |
|
|
{ pattern: /^(?:[1-9]\d{5}(18|19|20)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)|[1-9]\d{5}\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3})$/, message: '请输入正确的身份证号', trigger: 'blur' } |
|
|
{ pattern: /^(?:[1-9]\d{5}(18|19|20)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)|[1-9]\d{5}\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3})$/, message: '请输入正确的身份证号', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
Administratorphone: [ |
|
|
mobile: [ |
|
|
{ required: true, message: '管理员电话不能为空不能为空', trigger: 'blur' }, |
|
|
{ required: true, message: '管理员电话不能为空不能为空', trigger: 'blur' }, |
|
|
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' } |
|
|
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
fileList: [ |
|
|
fileList: [ |
|
|
{ required: true, message: '请上传组织封面图', trigger: 'blur' } |
|
|
{ required: true, message: '请上传组织封面图', trigger: 'blur' } |
|
|
], |
|
|
], |
|
|
Organizational: [ |
|
|
introduction: [ |
|
|
{ required: true, message: '请填写组织介绍', trigger: 'blur' }, |
|
|
{ required: true, message: '请填写组织介绍', trigger: 'blur' }, |
|
|
{ min:50, message: '请输入50字以上的介绍', trigger: 'blur'} |
|
|
{ min:50, message: '请输入50字以上的介绍', trigger: 'blur'} |
|
|
], |
|
|
], |
|
|