@@ -60,35 +60,14 @@
name: "see",
data() {
return {
- formData:{
- createdTimeTo:"",
- createdTimeTo:"",
- pointsClass:"",
- optionsStatus: [
- {
- code:1,
- name:"活动积分"
- },
- {
- code:2,
- name:"平台积分"
- },
- {
- code:3,
- name:"操作积分"
- },
- ],
- },
- labelPosition: 'right',
- tableData: [],
- integralnum: 1,
- radio:3,
- textarea: '',
- options: [],
- behaviorName: '',
- description:"",
- pointsDelta:"",
- Positive:'',
+ formData: {
+ name: "",
+ mobile: "",
+ volunteerOrgId: "",
+ startTime: "",
+ endTime: "",
+ Positive: '',
+ },
pageSize: 10,
pageNo: 1,
total: 0,
@@ -110,12 +89,46 @@
},
methods: {
+ //获取成员列表
+ async getlist() {
+ const url = "/voluntary/volunteerInfo/page";
+ let params={
+ id:this.list.id,
+ name:this.formData.name,
+ mobile:this.formData.mobile,
+ // description:this.description,
+ pointsClass:this.formData.pointsClass,
+ pageNo:this.pageNo,
+ pageSize:this.pageSize,
+ // pointsDelta:this.Positive+this.integralnum,
+ // primaryPoints:this.tableData.points
+ volunteerOrgId:this.formData.volunteerOrgId,
+ startTime:this.formData.startTime,
+ endTime:this.formData.endTime
+ }
+ console.log(params,"params");
+
+ const { data, code, msg } = await requestPost(url,params);
+ if (code === 0) {
+ this.tableData=data.list
+ this.total=data.total
+ console.log("列表请求成功!!!!!!!!!!!!!!");
+
+ // console.log("列表请求成功!!!!!!!!!!!!!!");
+ // this.$message({
+ // message: "调整成功",
+ // type: "success",
+ // });
+ // this.$emit('summDetailClose')
+ } else {
+ }
+ },
//控制活动时间
actcontrolTime(){
console.log("dislfj");
- if(this.formData.createdTimeFrom>this.formData.createdTimeTo){
+ if(this.formData.startTime>this.formData.endTime){
this.$message.error('活动结束时间不能在活动开始时间之前');
- this.formData.createdTimeTo=''
+ this.formData.endTime=''
return
}
},
@@ -143,81 +156,22 @@
},
- //获取积分行为
- async getpoint1s() {
- const url = "/voluntary/points/adjustVolunteerPoints/reasonsList";
- let params={
- }
- await requestGet(url,params).then((res)=>{
- if (res.code === 0) {
- console.log("列表请求成功!!!!!!!!!!!!!!");
- this.optionsStatus = res.data
- console.log(this.optionsStatus);
+ // //获取积分行为
+ // async getpoint1s() {
+ // const url = "/voluntary/points/adjustVolunteerPoints/reasonsList";
+ // let params={
+ // }
+ // await requestGet(url,params).then((res)=>{
+ // if (res.code === 0) {
+ // console.log("列表请求成功!!!!!!!!!!!!!!");
+ // this.optionsStatus = res.data
+ // console.log(this.optionsStatus);
- } else {
- }
- })
- },
- //调整积分
- // async getTableData() {
- // const url = "/voluntary/points/adjustVolunteerPoints/commit";
- // let params={
- // volunteerId:this.list.id,
- // reason:this.behaviorName,
- // description:this.description,
- // pointsDelta:this.Positive+this.integralnum,
- // primaryPoints:this.tableData.points
- // // volunteerId:this.list.id,
- // // mobile:this.formData.phone,
- // // name:this.formData.name
- // }
- // console.log(params,"params");
-
- // const { data, code, msg } = await requestPost(url,params);
- // if (code === 0) {
- // console.log("列表请求成功!!!!!!!!!!!!!!");
- // this.$message({
- // message: "调整成功",
- // type: "success",
- // });
- // this.$emit('summDetailClose')
- // } else {
- // }
- // },
-
- async getlist() {
- const url = "/voluntary/points/listPointsChangeRecord";
- let params={
- volunteerId:this.list.id,
- createdTimeFrom:this.formData.createdTimeFrom,
- createdTimeTo:this.formData.createdTimeTo,
- // description:this.description,
- pointsClass:this.formData.pointsClass,
- pageNo:this.pageNo,
- pageSize:this.pageSize,
- // pointsDelta:this.Positive+this.integralnum,
- // primaryPoints:this.tableData.points
- // volunteerId:this.list.id,
- // mobile:this.formData.phone,
- // name:this.formData.name
- }
- console.log(params,"params");
-
- const { data, code, msg } = await requestGet(url,params);
- if (code === 0) {
- this.tableData=data.list
- this.total=data.total
- console.log("列表请求成功!!!!!!!!!!!!!!");
-
- // console.log("列表请求成功!!!!!!!!!!!!!!");
- // this.$message({
- // message: "调整成功",
- // type: "success",
- // });
- // this.$emit('summDetailClose')
- } else {
- }
- },
+ // } else {
+ // }
+ // })
+ // },
+
handleSubmit(){
this.$emit('MemberManagementClose')
},
diff --git a/src/views/modules/volunteer/VoluntaryOrganization/add.vue b/src/views/modules/volunteer/VoluntaryOrganization/add.vue
index ff4edce2d..327822523 100644
--- a/src/views/modules/volunteer/VoluntaryOrganization/add.vue
+++ b/src/views/modules/volunteer/VoluntaryOrganization/add.vue
@@ -1,839 +1,869 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 取 消
- 确 定
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+ }
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/modules/volunteer/VoluntaryOrganization/edit.vue b/src/views/modules/volunteer/VoluntaryOrganization/edit.vue
index 0f50bee63..633a68502 100644
--- a/src/views/modules/volunteer/VoluntaryOrganization/edit.vue
+++ b/src/views/modules/volunteer/VoluntaryOrganization/edit.vue
@@ -20,15 +20,15 @@
-
+
-
-
-
+
+
+
@@ -67,7 +67,7 @@
-
@@ -121,683 +121,723 @@
let loading // 加载动画
export default {
- data() {
-
- return {
-
- activityImgs: [],//活动照片
- fileList:[],
- searchValue:"",
- ServicetypeList:[
- { label: "敬老爱老", value: 1 },
- { label: "助残帮困", value: 2 },
- { label: "扶贫帮困", value: 3 },
- { label: "环保绿化", value: 4 },
- { label: "文化教育", value: 5 },
- { label: "扶贫帮困", value: 6 },
- { label: "其他", value: 7 },
- ],
- Organizationaltype:[
- { label: "社区", value: 1 },
- { label: "企业", value: 2 },
- { label: "学校", value: 3 },
- ],
- formData:
- {
- VolunteerPic:"",//品牌图片
- Volunteerbrand:"",//志愿品牌
- Organizational:"",//组织介绍
- fileList: [],//封面图片
- AdministratorIDCard:"",//身份证信息
- Administratorphone:"",//管理员电话
- AdministratorName:"",//管理员姓名
- Organizationaltype:"",//组织类型
- Servicetype:"",//服务类型
- OrganizationName:"",//组织名称
- agencyName:"",//所属组织
- Servicetype:[],
- id: "",
- typeId: "",
- activityName: "",//活动名称
- status: 0,//状态
- assistingParty: "",//协办方
- startTime: "",//开始时间
- endTime: "",//结束时间
- coverPic: "",//封面图片地址
- content: "",//活动内容
- address: "",//地址
- online: 0,//开关
- cutOffTime: "",//截止时间
- points: 0,//积分
- participants: 0,//活动人数
- sendMessage: 0,//推送数
- sumUp: "",//活动总结
- activityImgs: [],//图片列表
- longitude: this.$store.state.user.longitude, //经度
- latitude: this.$store.state.user.latitude,//纬度
- },
-
- corganizerList: [],
- uploadUrl: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2',
- customerId: localStorage.getItem('customerId'),
-
+ data() {
+
+ return {
+ fileList:[],
+ fileList1:[],
+ searchValue:"",
+ OrganizationaltypeList:[],
+ ServicetypeListName:[],
+ Organizationaltype:[
+ { label: "社区", value: 1 },
+ { label: "企业", value: 2 },
+ { label: "学校", value: 3 },
+ ],
+ formData:
+ {
+ status:"pass",//审核状态
+ numberNum:"",//组织成员数量
+ userId:"",//志愿者id
+ agencyId:"",//组织id
+ orgType:"",
+ brandImg:"",//品牌图片
+ brand:"",//志愿品牌
+ introduction:"",//组织介绍
+ qualification: "",//封面图片
+ idCard:"",//身份证信息
+ mobile:"",//管理员电话
+ operator:"",//管理员姓名
+ Organizationaltype:"",//组织类型
+ // serviceTypeList:"",//服务类型
+ orgName:"",//组织名称
+ agencyName:"",//所属组织
+ serviceTypeList:[],//服务类型
+ address: "",//地址
+ longitude: this.$store.state.user.longitude, //经度
+ latitude: this.$store.state.user.latitude,//纬度
+ },
+ corganizerList: [],
+ uploadUrl: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2',
+ customerId: localStorage.getItem('customerId'),
+
+ }
+
+ },
+
+ components: { Tinymce, UploadImage },
+ mounted() {
+ console.log(this.VolunteerList,"this.VolunteerLis");
+ 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.listServerOrg()
+
+ },
+
+ methods: {
+ validateContent() {
+ // 使用正则表达式去除HTML标签后检查内容
+ const textContent = this.stripHtml(this.formData.sumUp);
+ if (textContent.trim() === '') {
+ this.formData.sumUp = null;
+ }
+ },
+ stripHtml(html) {
+ const div = document.createElement('div');
+ div.innerHTML = html;
+ 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() {
+ const url = "/actual/base/activityType/page"
+ let params = {
+ // agencyId: this.agencyId
+ pageSize: 20,
+ pageNo: 1,
+ typeName: "",
+ enabled: 1
+ }
+ const { data, code, msg } = await requestPost(url, params)
+ if (code === 0) {
+ this.typeList = data.list
+ } else {
+ this.$message.error(msg)
+ }
+ this.$nextTick(() => {
+ if (!map) {
+ this.initMap(this.formData.latitude, this.formData.longitude);
+ console.log("map", map,this.formData.latitude, this.formData.longitude)
+ } else {
+ map.setCenter(this.formData.latitude, this.formData.longitude);
+ map.setMarker(this.formData.latitude, this.formData.longitude);
+ console.log("mapmapmap", map)
+ }
+ })
+ },
+
+ handleOnlineRegistration(value) {
+ //
+ if (value) {
+ this.online = true;
+ this.formData.online = 1;
+ } else {
+ this.online = false;
+ this.formData.cutOffTime = ''
+ this.formData.online = 0;
+ }
+ },
+
+ // onChangeFileList(e) {
+ // if (e.length > 0) {
+ // let item = e[0];
+ // let ob = {
+ // fileType: '0',
+ // fileUrl: item.response.data.url
+ // };
+ // this.fileList = [ob];
+ // this.formData.coverPic = ob.fileUrl;
+ // }
+ // },
+ removedImg() {
+ 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) {
+ 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 = '';
+ }
+ },
+
+ onChangeImgs(e, rowIndex = 0) {
+ console.log('onChangeFileList', e)
+ if (e.length > 0) {
+ this.activityImgs = []
+ e.forEach(item => {
+ let ob = {
+ fileType: '0',
+ fileUrl: item.response.data.url
+ }
+ this.activityImgs.push(ob)
+ })
+ }
+ },
+
+ // 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) {},
+ handleTimeChange(time) {
+ if (time) {
+ const startTimeArray = util.dateFormatter(time[0], 'time').split('-')
+ console.log(startTimeArray);
+ const endTimeArray = util.dateFormatter(time[1], 'time').split('-')
+ console.log(endTimeArray);
+ this.formData.startTime = startTimeArray[0] + '-' + startTimeArray[1] + '-' + startTimeArray[2]
+ this.formData.endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2]
+ // this.startTimeShow = startTimeArray[0] + '年' + startTimeArray[1] + '月' + startTimeArray[2] + '日'
+ // this.endTimeShow = endTimeArray[0] + '年' + endTimeArray[1] + '月' + endTimeArray[2] + '日'
+ } else {
+ this.formData.startTime = ''
+ this.formData.endTime = ''
+ }
+
+ },
+ // 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() {
+ this.$http
+ .post("/actual/base/serviceitem/listAllCategory")
+ .then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg);
+ } else {
+ console.log(res.data);
+ this.demandOptions = this.getFlagData(
+ this.getTreeData(res.data),
+ "usableFlag"
+ );
+ }
+ })
+ .catch(() => {
+ return this.$message.error("网络错误");
+ });
+ },
+ getFlagData(data, flag) {
+ if (!Array.isArray(data)) return [];
+ let arr1 = data.filter((item) => item[flag]);
+ let arr2 = arr1.map((item) => {
+ if (item.childCateList)
+ return { ...item, childCateList: this.getFlagData(item.childCateList, flag) };
+ else return item;
+ });
+ return arr2;
+ },
+ getTreeData(data) {
+ if (!Array.isArray(data)) return [];
+ let arr = data.map((item) => {
+ let _item = {};
+ if (item.childCateList) {
+ if (item.childCateList.length === 0)
+ _item = { ...item, childCateList: undefined };
+ else _item = { ...item, childCateList: this.getTreeData(item.childCateList) };
+ } else {
+ _item = { ...item };
+ }
+ return _item;
+ });
+ return arr;
+ },
+ async loadGrid() {
+ const url = "/gov/org/customergrid/gridoption"
+
+ let params = {
+ agencyId: this.agencyId
+ }
+
+ const { data, code, msg } = await requestPost(url, params)
+
+ if (code === 0) {
+ this.gridList = data
+
+ } else {
+ this.$message.error(msg)
+ }
+
+ },
+ //详情
+ 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)
+ }
},
-
- components: { Tinymce, UploadImage },
- mounted() {
- console.log(this.VolunteerList,"this.VolunteerLis");
- this.formData=this.VolunteerList
- this.activityType()
- this.listServerOrg()
- },
-
- methods: {
- validateContent() {
- // 使用正则表达式去除HTML标签后检查内容
- const textContent = this.stripHtml(this.formData.sumUp);
- if (textContent.trim() === '') {
- this.formData.sumUp = null;
+ // 获取志愿组织类型
+ 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)
}
},
- stripHtml(html) {
- const div = document.createElement('div');
- div.innerHTML = html;
- return div.textContent || div.innerText || '';
+ // 获取志愿组织服务类型
+ 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)
+ }
},
-
- // 上传成功
- 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() {
- const url = "/actual/base/activityType/page"
- let params = {
- // agencyId: this.agencyId
- pageSize: 20,
- pageNo: 1,
- typeName: "",
- enabled: 1
- }
- const { data, code, msg } = await requestPost(url, params)
- if (code === 0) {
- this.typeList = data.list
- } else {
- this.$message.error(msg)
- }
- this.$nextTick(() => {
- if (!map) {
- this.initMap(this.formData.latitude, this.formData.longitude);
- console.log("map", map,this.formData.latitude, this.formData.longitude)
- } else {
- map.setCenter(this.formData.latitude, this.formData.longitude);
- map.setMarker(this.formData.latitude, this.formData.longitude);
- console.log("mapmapmap", map)
- }
- })
- },
-
- handleOnlineRegistration(value) {
- //
- if (value) {
- this.online = true;
- this.formData.online = 1;
- } else {
- this.online = false;
- this.formData.cutOffTime = ''
- this.formData.online = 0;
- }
- },
-
- // onChangeFileList(e) {
- // if (e.length > 0) {
- // let item = e[0];
- // let ob = {
- // fileType: '0',
- // fileUrl: item.response.data.url
- // };
- // this.fileList = [ob];
- // this.formData.coverPic = ob.fileUrl;
- // }
- // },
- removedImg() {
- 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.coverPic = e[0].response.data.url;
- } else {
- this.formData.coverPic = '';
- }
- },
-
- onChangeImgs(e, rowIndex = 0) {
- console.log('onChangeFileList', e)
- if (e.length > 0) {
- this.activityImgs = []
- e.forEach(item => {
- let ob = {
- fileType: '0',
- fileUrl: item.response.data.url
- }
- this.activityImgs.push(ob)
- })
- }
- },
-
- // 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) {},
- handleTimeChange(time) {
- if (time) {
- const startTimeArray = util.dateFormatter(time[0], 'time').split('-')
- console.log(startTimeArray);
- const endTimeArray = util.dateFormatter(time[1], 'time').split('-')
- console.log(endTimeArray);
- this.formData.startTime = startTimeArray[0] + '-' + startTimeArray[1] + '-' + startTimeArray[2]
- this.formData.endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2]
- // this.startTimeShow = startTimeArray[0] + '年' + startTimeArray[1] + '月' + startTimeArray[2] + '日'
- // this.endTimeShow = endTimeArray[0] + '年' + endTimeArray[1] + '月' + endTimeArray[2] + '日'
- } else {
- this.formData.startTime = ''
- this.formData.endTime = ''
- }
-
- },
- 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() {
- this.$http
- .post("/actual/base/serviceitem/listAllCategory")
- .then(({ data: res }) => {
- if (res.code !== 0) {
- return this.$message.error(res.msg);
- } else {
- console.log(res.data);
- this.demandOptions = this.getFlagData(
- this.getTreeData(res.data),
- "usableFlag"
- );
- }
- })
- .catch(() => {
- return this.$message.error("网络错误");
- });
- },
- getFlagData(data, flag) {
- if (!Array.isArray(data)) return [];
- let arr1 = data.filter((item) => item[flag]);
- let arr2 = arr1.map((item) => {
- if (item.childCateList)
- return { ...item, childCateList: this.getFlagData(item.childCateList, flag) };
- else return item;
- });
- return arr2;
- },
- getTreeData(data) {
- if (!Array.isArray(data)) return [];
- let arr = data.map((item) => {
- let _item = {};
- if (item.childCateList) {
- if (item.childCateList.length === 0)
- _item = { ...item, childCateList: undefined };
- else _item = { ...item, childCateList: this.getTreeData(item.childCateList) };
- } else {
- _item = { ...item };
- }
- return _item;
- });
- return arr;
- },
- async loadGrid() {
- const url = "/gov/org/customergrid/gridoption"
-
- let params = {
- agencyId: this.agencyId
- }
-
- const { data, code, msg } = await requestPost(url, params)
-
- if (code === 0) {
- this.gridList = data
-
- } else {
- this.$message.error(msg)
- }
-
- },
-
-
- //加载组织
- async loadFormData() {
- const url = '/actual/base/icpartyactivity/detail'
- // const url = 'http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/detail'
- let params = {
- id: this.activityId
- }
-
- const { data, code, msg } = await requestPost(url, params)
-
- if (code === 0) {
- this.formData = data
- let style_img = "style='width:50px;height:40px;' "
-
- if (this.formData.content) {
- // this.formData.content = this.formData.content.replace(/
{
+ this.handleMoveCenter(e);
+ });*/
+ map.on("click", (e) => {
+ this.handleMoveCenter(e);
+ });
+
+ map.setCenter(latitude, longitude);
+ map.setMarker(latitude, longitude);
+
+ },
+
+
+ async handleMoveCenter(e) {
+ //修改地图中心点
+ // const { lat, lng } = map.getCenter();
+ const { lat, lng } = e.latLng;
+ this.formData.latitude = lat;
+ this.formData.longitude = lng;
+ map.setMarker(lat, lng);
+
+ let { msg, data } = await map.getAddress(lat, lng);
+ if (msg == "success") {
+ this.formData.address = data.address;
+ this.searchValue=data.address
+ console.log(this.formData.address," this.formData.address ");
+
+ this.searchValue = data.address
+ this.searchOptions = []
+ // console.log('data,this.searchValue ', this.searchValue)
+
}
-
- if (!this.formData.AdministratorIDCard) {
- this.$message.error('请输入身份证信息');
- return;
+ },
+
+ async remoteMethod(query) {
+ console.log(query, "sfsvsdv");
+ if (query !== '') {
+ this.loading = true;
+ const { msg, data } = await map.searchNearby(query);
+ this.loading = false;
+ this.resultList = []
+
+ if (msg == "success" && data.resultList && data.resultList.length > 0) {
+
+ if (data.resultList && data.resultList.length > 0) {
+ this.resultList = data.resultList
+ console.log(this.resultList, "this.resultList");
+ this.searchOptions = this.resultList.map(item => {
+ return { value: `${item.id}`, label: `${item.address + item.title}` };
+
+ });
+ console.log(this.searchOptions, "this.searchOptions");
+ }
+ } else {
+ this.searchOptions = [
+ {
+ value: '0',
+ label: '未检索到结果'
+ }
+ ]
+ }
+ } else {
+ this.searchOptions = [];
}
-
- if (!this.formData.Administratorphone) {
- this.$message.error('请输入管理员电话');
- return;
+ },
+
+ handleClickKey(index) {
+ let selPosition = this.resultList[index]
+ let lonlat = selPosition.lonlat.split(" ")
+ map.setCenter(lonlat[1], lonlat[0]);
+ map.setMarker(lonlat[1], lonlat[0]);
+ this.formData.latitude = lonlat[1];
+ this.formData.longitude = lonlat[0];
+ this.searchValue = selPosition.address + selPosition.name
+ },
+
+ resetData() {
+ this.timeRange = []
+ this.fileList = []
+ this.searchValue = ''
+ this.searchOptions = []
+ this.resultList = []
+ this.activityId = ''
+ this.keyWords = ''
+ this.online = false
+ this.formType = ''
+ this.summary = true
+ this.formData = {
+ id: "",
+ typeId: "",
+ activityName: "",//活动名称
+ status: 0,//状态
+ assistingParty: "",//协办方
+ startTime: "",//开始时间
+ endTime: "",//结束时间
+ coverPic: "",//封面图片地址
+ content: "",//活动内容
+ address: "",//地址
+ online: 0,//开关
+ cutOffTime: "",//截止时间
+ points: 0,//积分
+ participants: 0,//活动人数
+ sendMessage: 0,//推送数
+ sumUp: "",//活动总结
+ activityImgs: [],//图片列表
+ longitude: this.$store.state.user.longitude, //经度
+ latitude: this.$store.state.user.latitude//纬度
+ // longitude: null, //经度
+ // latitude: null//纬度
}
-
- if (!this.formData.AdministratorName) {
- this.$message.error('请输入管理员姓名');
- return;
+ map=""
+
+
+ },
+ // 开启加载动画
+ startLoading() {
+ loading = Loading.service({
+ lock: true, // 是否锁定
+ text: '正在加载……', // 加载中需要显示的文字
+ background: 'rgba(0,0,0,.7)' // 背景颜色
+ })
+ },
+ // 结束加载动画
+ endLoading() {
+ // clearTimeout(timer);
+ if (loading) {
+ loading.close()
}
-
- if (!this.formData.Organizationaltype) {
- this.$message.error('请输入组织类型');
- return;
+ }
+ },
+ computed: {
+ dataRule() {
+ return {
+
+ orgName: [
+ { required: true, message: '组织名称不能为空', trigger: 'blur' }
+ ],
+ serviceTypeList: [
+ { required: true, message: '请选择服务类型', trigger: 'blur' }
+ ],
+ Organizationaltype: [
+ { required: true, message: '请选择组织类型', trigger: 'blur' }
+ ],
+ operator: [
+ { required: true, message: '请输入管理员姓名', trigger: 'blur' }
+ ],
+ idCard: [
+ { 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' }
+ ],
+ mobile: [
+ { required: true, message: '管理员电话不能为空不能为空', trigger: 'blur' },
+ { pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }
+ ],
+ fileList: [
+ { required: true, message: '请上传组织封面图', trigger: 'blur' }
+ ],
+ introduction: [
+ { required: true, message: '请填写组织介绍', trigger: 'blur' },
+ { min:50, message: '请输入50字以上的介绍', trigger: 'blur'}
+ ],
+ points: [
+ { required: true, message: '请选择活动积分', trigger: 'blur' }
+ ],
+ sumUp: [
+ { required: true, message: '请输入活动总结', trigger: 'blur' }
+ ],
+ activityImgs: [
+ { required: true, message: '请选择活动照片', trigger: 'blur' }
+ ]
}
-
- if (!this.formData.Servicetype) {
- this.$message.error('请输入服务类型');
- return;
- }
-
- if (!this.formData.OrganizationName) {
- this.$message.error('请输入组织名称');
- return;
- }
- console.log(this.formData,"this.formData");
- // this.addActivity()
- this.$emit('showEditClose')
- },
- async addActivity() {
- if (this.formType === 'edit' || this.formType === 'summary') {
- let url = '/actual/base/communityActivity/update'
- 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)
- }
- } 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() {
- console.log("sdlkfjklsdf ");
- this.$emit('showEditClose')
-
- },
-
- // 地图初始化函数,本例取名为init,开发者可根据实际情况定义
- initMap(latitude, longitude) {
- console.log(latitude, longitude,"564564568");
- map = new daiMap(
- document.getElementById("app_activity"),
- { latitude, longitude },
- {
- zoom: 16.2, // 设置地图缩放级别
- pitch: 43.5, // 设置俯仰角
- rotation: 45, // 设置地图旋转角度
- }
- );
-
- // 监听地图平移结束
- /* map.on("dragend", (e) => {
- this.handleMoveCenter(e);
- });*/
- map.on("click", (e) => {
- this.handleMoveCenter(e);
- });
-
- map.setCenter(latitude, longitude);
- map.setMarker(latitude, longitude);
-
- },
-
-
- async handleMoveCenter(e) {
- //修改地图中心点
- // const { lat, lng } = map.getCenter();
- const { lat, lng } = e.latLng;
- this.formData.latitude = lat;
- this.formData.longitude = lng;
- map.setMarker(lat, lng);
-
- let { msg, data } = await map.getAddress(lat, lng);
- if (msg == "success") {
- this.formData.address = data.address;
- this.searchValue=data.address
- console.log(this.formData.address," this.formData.address ");
-
- this.searchValue = data.address
- this.searchOptions = []
- // console.log('data,this.searchValue ', this.searchValue)
-
- }
- },
-
- async remoteMethod(query) {
- console.log(query, "sfsvsdv");
- if (query !== '') {
- this.loading = true;
- const { msg, data } = await map.searchNearby(query);
- this.loading = false;
- this.resultList = []
-
- if (msg == "success" && data.resultList && data.resultList.length > 0) {
-
- if (data.resultList && data.resultList.length > 0) {
- this.resultList = data.resultList
- console.log(this.resultList, "this.resultList");
- this.searchOptions = this.resultList.map(item => {
- return { value: `${item.id}`, label: `${item.address + item.title}` };
-
- });
- console.log(this.searchOptions, "this.searchOptions");
- }
- } else {
- this.searchOptions = [
- {
- value: '0',
- label: '未检索到结果'
- }
- ]
- }
- } else {
- this.searchOptions = [];
- }
- },
-
- handleClickKey(index) {
- let selPosition = this.resultList[index]
- let lonlat = selPosition.lonlat.split(" ")
- map.setCenter(lonlat[1], lonlat[0]);
- map.setMarker(lonlat[1], lonlat[0]);
- this.formData.latitude = lonlat[1];
- this.formData.longitude = lonlat[0];
- this.searchValue = selPosition.address + selPosition.name
- },
-
- resetData() {
- this.timeRange = []
- this.fileList = []
- this.searchValue = ''
- this.searchOptions = []
- this.resultList = []
- this.activityId = ''
- this.keyWords = ''
- this.online = false
- this.formType = ''
- this.summary = true
- this.formData = {
- id: "",
- typeId: "",
- activityName: "",//活动名称
- status: 0,//状态
- assistingParty: "",//协办方
- startTime: "",//开始时间
- endTime: "",//结束时间
- coverPic: "",//封面图片地址
- content: "",//活动内容
- address: "",//地址
- online: 0,//开关
- cutOffTime: "",//截止时间
- points: 0,//积分
- participants: 0,//活动人数
- sendMessage: 0,//推送数
- sumUp: "",//活动总结
- activityImgs: [],//图片列表
- longitude: this.$store.state.user.longitude, //经度
- latitude: this.$store.state.user.latitude//纬度
- // longitude: null, //经度
- // latitude: null//纬度
- }
- map=""
-
-
- },
- // 开启加载动画
- startLoading() {
- loading = Loading.service({
- lock: true, // 是否锁定
- text: '正在加载……', // 加载中需要显示的文字
- background: 'rgba(0,0,0,.7)' // 背景颜色
- })
- },
- // 结束加载动画
- endLoading() {
- // clearTimeout(timer);
- if (loading) {
- loading.close()
- }
- }
- },
- computed: {
- dataRule() {
- return {
-
- OrganizationName: [
- { required: true, message: '组织名称不能为空', trigger: 'blur' }
- ],
- Servicetype: [
- { required: true, message: '请选择服务类型', trigger: 'blur' }
- ],
- Organizationaltype: [
- { required: true, message: '请选择组织类型', trigger: 'blur' }
- ],
- AdministratorName: [
- { required: true, message: '请输入管理员姓名', trigger: 'blur' }
- ],
- AdministratorIDCard: [
- { 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' }
- ],
- Administratorphone: [
- { required: true, message: '管理员电话不能为空不能为空', trigger: 'blur' },
- { pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur' }
- ],
- fileList: [
- { required: true, message: '请上传组织封面图', trigger: 'blur' }
- ],
- Organizational: [
- { required: true, message: '请填写组织介绍', trigger: 'blur' },
- { min:50, message: '请输入50字以上的介绍', trigger: 'blur'}
- ],
- points: [
- { required: true, message: '请选择活动积分', trigger: 'blur' }
- ],
- sumUp: [
- { required: true, message: '请输入活动总结', trigger: 'blur' }
- ],
- activityImgs: [
- { required: true, message: '请选择活动照片', trigger: 'blur' }
- ]
- }
- },
-
- },
- props: {
+ },
+
+ },
+ props: {
VolunteerList: {
type: Array,
default: []
},
},
- destroyed () {
- map = null
- }
- }
+ destroyed () {
+ map = null
+ }
+}
diff --git a/src/views/modules/volunteer/VoluntaryOrganization/index.vue b/src/views/modules/volunteer/VoluntaryOrganization/index.vue
index 64a033d55..5e53def31 100644
--- a/src/views/modules/volunteer/VoluntaryOrganization/index.vue
+++ b/src/views/modules/volunteer/VoluntaryOrganization/index.vue
@@ -78,7 +78,7 @@
@click="handleshowMember(scope.row)">成员管理
删除
- 审核
@@ -153,6 +153,7 @@ export default {
tableData: [
],
+ importLoading:false,
showInfo:false,
};
@@ -184,8 +185,11 @@ export default {
this.showprocess=false
},
//成员管理
- handleshowMember(){
+ handleshowMember(row){
+ console.log (row,this.fmData,"row");
this.showMember=true
+ this.fmData=row
+
},
//关闭成员管理
MemberManagementClose(){
@@ -210,6 +214,7 @@ export default {
console.log("sdlkfjklsdf1");
this.showAdd=false
+ this.getTableData()
},
//关闭查看
showInfoClose(){
@@ -236,7 +241,10 @@ export default {
},
//模板
async uploadHttpRequest(file) {
+ log("file", file);
this.importLoading = true;
+ console.log(this.importLoading,"this.importLoading");
+
this.importBtnTitle = '正在上传中...';
this.$message({
showClose: true,
@@ -245,20 +253,25 @@ export default {
duration: 3000
});
let than = this;
- document.getElementById('clickA').addEventListener('click', function () {
- than.$router.replace('/main/importRecord-index');
- });
+ console.log(than,"than");
+
+ // document.getElementById('clickA').addEventListener('click', function () {
+ // than.$router.replace('/main/importRecord-index');
+ // });
const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加
formData.append('file', file.file); //添加文件对象
formData.append('code', ''); //添加文件对象
- let url = '/governance/icEvent/importEvent'
- if (this.importType == 2) {
- url = '/governance/icEvent/importAwo'
- }
+ console.log(formData,"formData");
+
+ let url = '/voluntary/volunteerOrg/import'
+ // if (this.importType == 2) {
+ // url = '/governance/icEvent/importAwo'
+ // }
console.log(url)
await this.$http
.post(url, formData)
.then(res => {
+ log("res", res);
if (res.data.code == 0 && res.data.msg == 'success') {
const data = res.data.data;
this.dataList = [
@@ -300,6 +313,7 @@ export default {
}
},
beforeExcelUpload(file) {
+ console.log(file,"file");
const isType = file.type === 'application/vnd.ms-excel';
const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
const fileType = isType || isTypeComputer;
@@ -354,15 +368,17 @@ export default {
this.getTableData()
},
async handleExportModule() {
- let url = "/heart/iccommunityselforganization/import-template-download";
+ let url = "/voluntary/volunteerOrg/downloadImportTemplate";
let params = {};
await this.$http({
- method: "POST",
+ method: "GET",
url,
responseType: "blob",
data: params,
})
.then((res) => {
+ console.log(res,"resskfk");
+
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
diff --git a/src/views/modules/volunteer/VoluntaryOrganization/process.vue b/src/views/modules/volunteer/VoluntaryOrganization/process.vue
index 6bcd313a1..0d0003174 100644
--- a/src/views/modules/volunteer/VoluntaryOrganization/process.vue
+++ b/src/views/modules/volunteer/VoluntaryOrganization/process.vue
@@ -6,7 +6,7 @@
{{ tableData.orgName }}
- {{ tableData.serviceTypeList }}
+ {{ tableData.serviceTypeName }}
{{ tableData.Organizationaltype}}
@@ -37,7 +37,7 @@
{{ tableData.address}}
- {{ tableData.redeemerOrgName}}
+ {{tableData.updatedTime}}
@@ -86,7 +86,7 @@ export default {
console.log(this.VolunteerList,"list");
this.tableData=this.VolunteerList
// this.awardId=this.list.id
- // this.getTableData()
+ this.getTableData()
},
methods: {
//取消审查
@@ -125,15 +125,14 @@ export default {
},
getTableData() {
console.log(this.formData);
- const url = "/voluntary/pointsAward/admin/detail";
+ const url = "/voluntary/volunteerOrg/editDetail";
let params = {
- id:this.awardId
+ id:this.VolunteerList.id
}
- requestGet(url, params).then((res) =>{
+ requestPost(url, params).then((res) =>{
console.log(res,"res");
if(res.code===0){
console.log("列表请求成功!!!!!!!!!!!!!!");
- console.log(res.data, "data");
this.tableData = res.data
console.log(this.tableData, "this.tableData");
}