Commit cadd68cb by 前端

Merge branch 'yangm_v2.8.0' into 'v2.8.0'

Yangm v2.8.0

See merge request !310
2 parents f822db5c 6aa59e47
......@@ -369,7 +369,7 @@ export default {
this.$refs['addForm'].validate(valid => {
if (valid) {
this.addLoading = true
let params = this.addForm
let params = this.$common.utils.deepClone(this.addForm)
params.configDetailRpcRequests = this.tableData
if (this.exportUrl) {
params.url = this.exportUrl
......
......@@ -349,18 +349,7 @@ export default {
staffName: item.staffName
}
})
let previewListArr = this.$common ? this.$common.utils.deepClone(this.$refs.welcome.previewList) : this.$refs.welcome.previewList
let previewList = previewListArr.reduce((prev, cur) => {
if (cur.attContent.length == 1) {
return prev.concat({ attContent: cur.attContent[0], attType: cur.attType })
} else {
let attContentImg = []
cur.attContent.forEach(imgItem => {
attContentImg.push({ attContent: imgItem, attType: cur.attType })
})
return prev.concat(attContentImg)
}
}, [])
let attachmentList = this.$refs.welcome.previewList
const material = previewList.filter(item => item.attType != ATT_TYPE.TEXT)
let materialType = 0
if (material && material.length > 0) {
......@@ -379,22 +368,7 @@ export default {
if (material.length > 1) {
materialType = 2
}
console.log(previewList)
params.materialType = materialType
const attachmentList = previewList.map(item => {
if (item.attType == 1) {
const list = emoji.flat(Infinity)
const cutImg = item.attContent.replaceAll('<img src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/', '')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function(str) {
let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]`
})
item.attContent = replaceImg.substring(0, 600)
} else if (item.attType == 7) {
item.attContent = JSON.stringify(item.attContent)
}
return item
})
params.attachmentList = attachmentList
if (params.sendType == 2) {
params.sendTimeStr = this.basicForm.sendTime + ' ' + this.basicForm.sendDate
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!