Browse Source

Merge branch 'V4.3.3_XiaoWang' into dev

feature
是小王呀\24601 1 year ago
parent
commit
778c8c5093
  1. 16
      src/views/modules/communityParty/activity/eventDetails.vue
  2. 13
      src/views/modules/communityParty/activity/index.vue
  3. 85
      src/views/modules/communityParty/activity/initiateActivity.vue
  4. 23
      src/views/modules/communityParty/comPromotion/add.vue
  5. 4
      src/views/modules/communityParty/comPromotion/event.vue
  6. 11
      src/views/modules/communityParty/comPromotion/index.vue

16
src/views/modules/communityParty/activity/eventDetails.vue

@ -68,22 +68,23 @@
<span>{{ formData.points || "--" }}</span>
</div>
</div>
<div class="m-info-prop">
<!-- 总结 -->
<div class="m-info-prop" v-if="formData.status!==0&&formData.status!==1&&formData.status!==3">
<span class="u-info-title-2" style="display: inline-block;white-space: nowrap;">活动总结</span>
<span style="margin-right: 10px;">&nbsp;</span>
<!-- <span>{{ formData.sumUp || "--" }}</span> -->
<p class="text_p" v-html="formData.sumUp"></p>
</div>
<div class="m-info-prop" style="display: flex; flex-wrap: wrap; align-items: flex-start;">
<!-- 活动图片 -->
<div v-if="formData.status!==0&&formData.status!==1&&formData.status!==3" class="m-info-prop" style="display: flex; flex-wrap: wrap; align-items: flex-start;">
<span class="u-info-title-2" style="display: inline-block;white-space: nowrap;">活动图片</span>
<div v-for="(image, index) in formData.activityImgs" :key="index">
<img style="width: 200px; height: 160px; margin-right: 30px;margin-bottom: 10px;"
:src="image" alt="Image" />
</div>
</div>
<div style="margin-top: 20px;">
<!-- 报名名单 -->
<div v-if="formData.status!==0&&formData.online == 1" style="margin-top: 20px;">
<div style="font-size: 15px; color: black; margin-left: -30px;margin-bottom: 10px;">
报名名单
</div>
@ -112,8 +113,8 @@
</el-table>
</div>
<div style="margin-top: 20px;">
<!-- 活动实况 -->
<div style="margin-top: 20px;" v-if="formData.status!==0&&formData.online==1">
<div style="font-size: 15px; color: black; margin-left: -30px; margin-bottom: 10px;">
活动实况
</div>
@ -229,7 +230,6 @@ export default {
},
async initForm(row) {
this.startLoading();
this.formData = JSON.parse(JSON.stringify(row));
console.log(this.formData,"this.formData");

13
src/views/modules/communityParty/activity/index.vue

@ -105,7 +105,7 @@
<el-button type="text" style="color:#1C6AFD;" size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button type="text" v-if="scope.row.status == 0" style="color:#1C6AFD;"
<el-button type="text" v-if="scope.row.status == 0||scope.row.status == 1" style="color:#1C6AFD;"
size="small" @click="handleEdit(scope.row)">编辑</el-button>
<!-- <el-button type="text" v-if="scope.row.status == 2 && scope.row.activityImgs === '' && scope.row.sumUp === ''" style="color:#1C6AFD;"
@ -114,7 +114,7 @@
<el-button type="text" v-if="scope.row.status == 2 && scope.row.activityImgs == null && scope.row.sumUp == ''" style="color:#1C6AFD;"
size="small" @click="handleSumm(scope.row)">活动总结</el-button>
<el-button v-if="scope.row.status == 2 || scope.row.status == 3" type="text"
<el-button type="text"
style="color:rgb(28, 106, 253);" size="small"
@click="handleDelete(scope.row)">删除</el-button>
@ -311,17 +311,16 @@
let currentTime1 = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
if (item.startTime > currentTime1) {
if( item.status === 0 ){
console.log(item.startTime > currentTime1,item.startTime,currentTime1);
return
}else{
// item.status = 0
// this.formData = item;
// this.updatetow()
}
} else if (item.startTime < currentTime1 && item.endTime > currentTime1) {
if( item.status === 1 ){
console.log(item.startTime > currentTime1,item.startTime,currentTime1);
return
}else{
// item.status = 1
return item.status = 1
// this.formData = item;
// this.updatetow()
}

85
src/views/modules/communityParty/activity/initiateActivity.vue

@ -20,9 +20,12 @@
</el-form-item>
<el-form-item label="活动时间" prop="startTime" label-width="130px">
<el-date-picker v-model.trim="timeRange" size="small" style="width: 260px;" type="daterange"
<!-- <el-date-picker v-model.trim="timeRange" size="small" style="width: 260px;" type="daterange"
value-format="yyyy-MM-dd HH:mm:ss" @change="handleTimeChange" range-separator="至"
start-placeholder="开始时间" end-placeholder="结束时间">
</el-date-picker> -->
<el-date-picker v-model.trim="timeRange" type="datetimerange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" @change="handleTimeChange">
</el-date-picker>
</el-form-item>
@ -42,8 +45,8 @@
<el-form-item label="活动封面图" label-width="140px" prop="coverPic">
<template>
<upload-image :defaultFileList="fileList" :limit="1"
@change="onChangeFileList" @file-removed="removedImg"></upload-image>
<upload-image :defaultFileList="fileList" :limit="1" @change="onChangeFileList"
@file-removed="removedImg"></upload-image>
</template>
</el-form-item>
@ -64,20 +67,24 @@
:reserve-keyword="true" placeholder="请输入关键词" :remote-method="remoteMethod"
:loading="loading">
<el-option v-for="(item, index) in searchOptions" @click.native="handleClickKey(index)"
:key="item.value||index" :label="item.label" :value="item.value">
:key="item.value || index" :label="item.label" :value="item.value">
</el-option>
</el-select>
<div id="app_activity" class="div_map"></div>
</div>
</el-form-item>
<el-form-item label="线上报名" style="display: block" prop="peopleCount" label-width="150px">
<el-form-item v-if="formType!=='records'" label="线上报名" style="display: block" prop="peopleCount" label-width="150px">
<el-switch v-model="online" @change="handleOnlineRegistration"></el-switch>
</el-form-item>
</div>
<div v-if="records">
<div v-if="!online">
<el-form-item label="活动人数" label-width="140px">
<el-input-number v-model="formData.participants" @change="handleChange" :min="1" :max="10"
label="描述文字"></el-input-number>
</el-form-item>
<el-form-item label="活动总结" prop="sumUp" label-width="150px" style="display: block">
<div class="item_width_1">
<!-- <el-input type="textarea" autosize placeholder="请输入内容" v-model.trim="formData.sumUp">
@ -198,9 +205,9 @@ export default {
}
return {
fileList: [],//
activityImgs:[],//
activityImgs: [],//
formType: 'add', // addedit,records
records:false,
records: false,
searchOptions: [],
searchValue: '',
resultList: [],
@ -208,7 +215,7 @@ export default {
loading: false,
timeRange: [],
online: false,
summary:true,
summary: true,
btnDisable: false,
@ -254,7 +261,7 @@ export default {
// });
// console.log('this.formData.activityImgs',res.data.url)
this.formData.activityImgs.push(res.data.url);
} else {
this.$message.error(res.msg);
}
@ -353,11 +360,11 @@ export default {
// this.formData.coverPic = ob.fileUrl;
// }
// },
removedImg(){
removedImg() {
this.formData.coverPic = ''
},
onChangeFileList(e) {
console.log(e,'sssssb');
console.log(e, 'sssssb');
this.fileList = e.length > 0 ? e.map(item => ({
fileType: '0',
fileUrl: item.response.data.url
@ -402,9 +409,11 @@ export default {
},
handleTimeChange(time) {
if (time) {
const startTimeArray = util.dateFormatter(time[0], 'date').split('-')
const endTimeArray = util.dateFormatter(time[1], 'date').split('-')
console.log(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] + ' 00:00:00'
this.formData.endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2] + ' 23:59:59'
// this.startTimeShow = startTimeArray[0] + '' + startTimeArray[1] + '' + startTimeArray[2] + ''
@ -429,10 +438,10 @@ export default {
}
})
this.formType = type
if (type === 'edit' ) {
if(activityId.activityImgs || activityId.sumUp){
if (type === 'edit') {
if (activityId.activityImgs || activityId.sumUp) {
this.records = true
}else{
} else {
this.records = false
}
this.formData = activityId
@ -444,19 +453,19 @@ export default {
};
this.fileList = [ob];
this.formData.coverPic = ob.fileUrl;
if(this.formData.online == 1){
if (this.formData.online == 1) {
this.online = true
}
}
}else if (type === 'records') {
} else if (type === 'records') {
this.records = true
}else if(type === 'summary'){
} else if (type === 'summary') {
this.formData = activityId
this.formData.activityImgs = []
console.log("this.formData",this.formData)
console.log("this.formData", this.formData)
this.records = true
this.summary = false
}else{
} else {
this.records = false
}
this.endLoading()
@ -555,16 +564,16 @@ export default {
}, 10000)
// console.log("data/actual/base/communityActivity/save",this.formData)
this.$refs['ref_form'].validate((valid, messageObj) => {
this.formData.sendMessage = this.formData.sendMessage ? 1 : 0;
console.log(this.formData,"2234323424")
this.formData.sendMessage = this.formData.sendMessage ? 1 : 0;
console.log(this.formData, "2234323424")
const dateObj = this.formData.startTime.split(' ');
const formattedDate = dateObj[0]; // '2424-10-22'
if(this.formData.cutOffTime != '' && formattedDate <= this.formData.cutOffTime){
if (this.formData.cutOffTime != '' && formattedDate <= this.formData.cutOffTime) {
this.$message.error('报名截止时间要小于活动开始时间')
}else if (!valid) {
} else if (!valid) {
app.util.validateRule(messageObj)
this.btnDisable = false
} else{
} else {
this.addActivity()
}
})
@ -585,7 +594,7 @@ export default {
this.btnDisable = false
this.$message.error(msg)
}
}else{
} else {
let url = '/actual/base/communityActivity/save'
const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) {
@ -601,7 +610,7 @@ export default {
this.$message.error(msg)
}
}
},
@ -652,13 +661,13 @@ export default {
this.formData.address = data.address
this.searchValue = data.address
this.searchOptions = []
console.log('data,this.searchValue ',this.searchValue )
console.log('data,this.searchValue ', this.searchValue)
}
},
async remoteMethod(query) {
console.log(query,"sfsvsdv");
console.log(query, "sfsvsdv");
if (query !== '') {
this.loading = true;
const { msg, data } = await map.searchNearby(query);
@ -669,12 +678,12 @@ export default {
if (data.resultList && data.resultList.length > 0) {
this.resultList = data.resultList
console.log(this.resultList,"this.resultList");
console.log(this.resultList, "this.resultList");
this.searchOptions = this.resultList.map(item => {
return { value: `${item.id}`, label: `${item.address + item.name}` };
});
console.log(this.searchOptions,"this.searchOptions");
console.log(this.searchOptions, "this.searchOptions");
}
} else {
this.searchOptions = [
@ -708,8 +717,8 @@ export default {
this.activityId = ''
this.keyWords = ''
this.online = false
this.formType=''
this.summary=true
this.formType = ''
this.summary = true
this.formData = {
id: "",
typeId: "",
@ -757,13 +766,13 @@ export default {
activityName: [
{ required: true, message: '活动名称不能为空', trigger: 'blur' }
],
typeId:[
typeId: [
{ required: true, message: '请选择活动类型', trigger: 'blur' }
],
startTime:[
startTime: [
{ required: true, message: '请选择活动时间', trigger: 'blur' }
],
coverPic:[
coverPic: [
{ required: true, message: '请选择活动封面图', trigger: 'blur' }
],
content: [

23
src/views/modules/communityParty/comPromotion/add.vue

@ -10,7 +10,7 @@
</el-form-item>
<el-form-item label="发布时间" label-width="140px" prop="releaseTime">
<el-date-picker v-model.trim="formData.releaseTime" type="date" value-format="yyyy-MM-dd HH:mm:ss"
<el-date-picker v-model.trim="formData.releaseTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss" placeholder="选择发布时间" style="width:280px">
</el-date-picker>
</el-form-item>
@ -160,26 +160,13 @@ export default {
advertisingTag(){
},
async initForm(typeid,row) {
console.log(row,typeid,'row');
this.startLoading();
this.formData = JSON.parse(JSON.stringify(row));
if(row!=null){
this.formData = JSON.parse(JSON.stringify(row));
}
this.formType=typeid
console.log(this.formData);
// console.log(this.formData,'this.formData');
// // 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 advertisingTag () {

4
src/views/modules/communityParty/comPromotion/event.vue

@ -21,7 +21,7 @@
<div class="m-info-prop" style="flex: 0 0 50%;">
<span class="u-info-title-2">发布时间: </span>
<span style="margin-right: 10px;">&nbsp;</span>
<span>{{ formData.releaseTime || "--" }}<span>{{ formData.endTime || "--" }}</span></span>
<span>{{ formData.releaseTime || "--" }}</span>
</div>
<div class="m-info-prop" style="flex: 0 0 50%;">
<span class="u-info-title-2">状态: </span>
@ -41,7 +41,7 @@
<div class="m-info-prop">
<span class="u-info-title-2">是否置顶: </span>
<span style="margin-right: 10px;">&nbsp;</span>
<el-switch :value="formData.top === 1 ? true : false" :disabled="true"></el-switch>
<el-switch :value="formData.top === 0 ? true : false" :disabled="true"></el-switch>
</div>
<div class="m-info-prop">

11
src/views/modules/communityParty/comPromotion/index.vue

@ -202,14 +202,6 @@
}
this.tableLoading = false
},
handleAdd () {
this.formTitle = '新增'
this.formShow = true
this.$nextTick(() => {
// this.$refs.ref_form.initForm('add', null)
})
},
diaClose () {
// this.$refs.ref_form.resetData()
@ -234,10 +226,9 @@
handleAdd () {
this.formTitle = '新增'
this.formShow = true
this.$nextTick(() => {
// this.$refs.ref_form.initForm('add', null)
this.$refs.ref_form.initForm('add',null)
})
},
handleEdit (row) {

Loading…
Cancel
Save