Browse Source

bug默认时间

V1.0
zxc 4 years ago
parent
commit
3339a0c853
  1. 21
      src/views/modules/communityParty/orgActivity/activivityList/addActivity.vue

21
src/views/modules/communityParty/orgActivity/activivityList/addActivity.vue

@ -220,7 +220,7 @@ export default {
actType: '',// value
holdYearId: '',//yyyy
holdMonthId: '',//yyyyMM
holdTime: new Date(),//yyyy-MM-dd HH:mm:ss
holdTime: this.getFormatDate(),//yyyy-MM-dd HH:mm:ss
topic: '',//
address: '',//
latitude: '',//
@ -288,7 +288,20 @@ export default {
},
methods: {
getFormatDate() {
var date = new Date();
var month = date.getMonth() + 1;
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
var currentDate = date.getFullYear() + "-" + month + "-" + strDate
+ " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
return currentDate;
},
handleChangeScope (value) {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
@ -358,7 +371,9 @@ export default {
this.formData.isAutoInform = '0'
}
this.formData.attachmentList = [...this.fileList]
let array = this.formData.holdTime.split('-')
this.formData.holdYearId = array[0]
this.formData.holdMonthId = array[0] + array[1]
if (this.formType === 'add') {
this.formData.icPartyActId = ''

Loading…
Cancel
Save