Commit cfa587ef by 胡悦

提交

1 parent d2b11524
......@@ -352,9 +352,10 @@ export default {
params.sendType = this.basicForm.sendType
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
const attachmentList = previewList.map(item => {
// const attachmentList = this.$common.utils.deepClone(this.$refs.welcome.previewList).map(item => {
if (item.attType == 1) {
item.attContent = item.attContent.replace('@昵称', '[@昵称]')
} else if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
return item
})
......
......@@ -225,10 +225,20 @@ export default {
this.$refs.groupForm.validate(v => {
const params = {
type: 2,
attachmentList: this.basicForm.attachmentList,
// attachmentList: this.basicForm.attachmentList,
sendType: this.basicForm.sendType,
massName: this.basicForm.massName
}
const previewList = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
const attachmentList = previewList.map(item => {
if (item.attType == 1) {
item.attContent = item.attContent.replace('@昵称', '[@昵称]')
} else if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
return item
})
params.attachmentList = attachmentList
params.userList = this.basicForm.userList.map(item => {
return {
staffId: item.staffId,
......
......@@ -117,7 +117,11 @@ export default {
this.$apis.customerTransform.customerDetail({ id }).then(res => {
console.log(res)
this.basicInfo = res
this.eventBus.$emit('update', this.basicInfo.attachmentList)
const previewList = res.attachmentList.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
return item
})
this.eventBus.$emit('update', previewList)
})
},
getStatistic() {
......
......@@ -263,11 +263,25 @@ export default {
},
selectActivity(val) {
console.log(val)
let idx
const hasActivity = this.previewList.some((item, index) => {
if (item.attType == 7) {
idx = index
return item
}
})
if (val) {
this.previewList.push({
attContent: val,
attType: ATT_TYPE.ACTIVITY
})
if (hasActivity) {
this.$set(this.previewList, idx, {
attContent: val,
attType: ATT_TYPE.ACTIVITY
})
} else {
this.previewList.push({
attContent: val,
attType: ATT_TYPE.ACTIVITY
})
}
}
},
insertHtmlAtCaret(html) {
......
......@@ -348,11 +348,12 @@ export default {
this.equityStatistical()
this.merchantStatistical()
},
dateChange(val) {
dateChange(val, pointUnit = 1) {
console.log(val)
const params = {
dataStartDateStr: dayjs(val[0]).format('YYYY-MM-DD'),
dataEndDateStr: dayjs(val[1]).format('YYYY-MM-DD')
dataEndDateStr: dayjs(val[1]).format('YYYY-MM-DD'),
pointUnit
}
this.timePeriodStatistics(params)
},
......@@ -386,7 +387,7 @@ export default {
// endTime = new Date(nowYear, 11, 31)
this.$set(this.date, 0, startTime)
this.$set(this.date, 1, endTime)
this.dateChange(this.date)
this.dateChange(this.date, 2)
break
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!