diff --git a/src/views/modules/communityParty/activity/index.vue b/src/views/modules/communityParty/activity/index.vue
index b48fde690..41746a8ff 100644
--- a/src/views/modules/communityParty/activity/index.vue
+++ b/src/views/modules/communityParty/activity/index.vue
@@ -79,10 +79,16 @@
-
+
-
+
+
+ {{ scope.row.participants === 0 ? '不限' : scope.row.participants }}
+
+
+
+
{{ getStatusText(scope.row.status) }}
@@ -100,19 +106,14 @@
查看
- 编辑
+ 编辑
- 活动总结
+ 活动总结
-
-
- 删除
+ 删除
@@ -354,7 +355,7 @@
} else {
this.$message.error(msg)
}
- console.log("饿么么么么么",this.typeList)
+ // console.log("饿么么么么么",this.typeList)
},
diaClose () {
@@ -471,26 +472,22 @@
async deleteActivity (row) {
- // const url = "/actual/base/icpartyactivity/delete"//等待删除接口
- // const url = "http://yapi.elinkservice.cn/mock/245/heart/icpartyactivity/delete"
+ const url = "/actual/base/communityActivity/delete"
+ let id = [row.id]
- // let params = {
- // id: row.id
- // }
+ const { data, code, msg } = await requestPost(url, id)
- // const { data, code, msg } = await requestPost(url, params)
-
- // if (code === 0) {
- // this.$message({
- // type: "success",
- // message: "删除成功"
- // });
+ if (code === 0) {
+ this.$message({
+ type: "success",
+ message: "删除成功"
+ });
- // // this.loadTable()
- // this.communityActivityList()
- // } else {
- // this.$message.error(msg)
- // }
+ // this.loadTable()
+ this.communityActivityList()
+ } else {
+ this.$message.error(msg)
+ }
},
//重置搜索条件
diff --git a/src/views/modules/communityParty/activity/initiateActivity.vue b/src/views/modules/communityParty/activity/initiateActivity.vue
index 09af43164..bba3e2f04 100644
--- a/src/views/modules/communityParty/activity/initiateActivity.vue
+++ b/src/views/modules/communityParty/activity/initiateActivity.vue
@@ -178,7 +178,7 @@ export default {
online: 0,//开关
cutOffTime: "",//截止时间
points: 0,//积分
- participants: 1,//活动人数
+ participants: 0,//活动人数
sendMessage: 0,//推送数
sumUp: "",//活动总结
activityImgs: [],//图片列表
@@ -222,8 +222,6 @@ export default {
mounted() {
this.activityType()
this.listServerOrg()
- // this.initForm()
-
},
methods: {
@@ -333,15 +331,27 @@ export default {
}
},
+ // 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;
+ // }
+ // },
+
onChangeFileList(e) {
+ this.fileList = e.length > 0 ? e.map(item => ({
+ fileType: '0',
+ fileUrl: item.response.data.url
+ })) : []; // 当e为空时清空fileList
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;
+ this.formData.coverPic = e[0].response.data.url;
+ } else {
+ this.formData.coverPic = '';
}
},
@@ -391,34 +401,26 @@ export default {
}
},
-
- // async initForm(row) {
- // this.startLoading();
- // this.formData = JSON.parse(JSON.stringify(row));
- // this.initLoading = true;
- // console.log('this.formData,',this.formData);
-
- // let { latitude, longitude } = this.$store.state.user;
- // console.log("lat" + latitude + ",lon" + longitude);
- // if (this.formData.latitude && this.formData.longitude) {
- // latitude = this.formData.latitude;
- // longitude = this.formData.longitude;
- // }
- // if (!latitude || latitude == "" || latitude == "0") {
- // latitude = 39.9088810666821;
- // longitude = 116.39743841556731;
- // }
- // this.endLoading();
- // },
async initForm(type, activityId) {
this.startLoading()
- console.log("啊实打实的", type, activityId)
+ // console.log("啊实打实的", type, activityId)
+
+ this.$nextTick(() => {
+ if (!map) {
+ this.initMap(this.formData.latitude, this.formData.longitude);
+ console.log("map", map)
+ } else {
+ map.setCenter(this.formData.latitude, this.formData.longitude);
+ map.setMarker(this.formData.latitude, this.formData.longitude);
+ console.log("mapmapmap", map)
+ }
+ })
+
this.formType = type
if (type === 'edit') {
if(activityId.activityImgs || activityId.sumUp){
this.records = true
}
- // this.records = false
this.formData = activityId
this.timeRange = [this.formData.startTime, this.formData.endTime]
if (activityId.coverPic) {
@@ -432,37 +434,9 @@ export default {
this.online = true
}
}
- // this.$refs.ref_form.resetFields();
-
-
- // //获取服务事项
- // await this.getDemandOptions()
-
- // let { latitude, longitude } = this.$store.state.user;
- // if (activityId) {
- // this.activityId = activityId
- // this.formData.id = activityId
- // await this.loadFormData()
- // } else {
- // this.formData.latitude = latitude
- // this.formData.longitude = longitude
- // }
- this.$nextTick(() => {
- if (!map) {
- this.initMap(this.formData.latitude, this.formData.longitude);
- console.log("map", map)
- } else {
- map.setCenter(this.formData.latitude, this.formData.longitude);
- map.setMarker(this.formData.latitude, this.formData.longitude);
- console.log("mapmapmap", map)
- }
- })
}else if (type === 'records') {
this.records = true
}
- // this.initMap(this.dataForm.latitude, this.dataForm.longitude);
- this.initMap(this.formData.latitude, this.formData.longitude);
- console.log("mapmapmap", map)
this.endLoading()
},
@@ -729,6 +703,8 @@ export default {
activityImgs: [],//图片列表
longitude: this.$store.state.user.longitude, //经度
latitude: this.$store.state.user.latitude//纬度
+ // longitude: null, //经度
+ // latitude: null//纬度
}
},