Commit 3ce0764f by 姜鹏凯

短链推广

1 parent 8ba79e2e
......@@ -13,7 +13,7 @@
placeholder="请输入"
:autosize="{ minRows: 5, maxRows: 20 }"
clearable
:autofocus="true"
:autofocus="false"
@input="changeInfo"
/>
</el-form-item>
......@@ -300,9 +300,6 @@
baseData(val) {
if (val.templateInfo) {
this.form.templateInfo = val.templateInfo
console.log(222222)
console.log(val)
console.log(3333333)
this.form.attachments = val.attachments
if (this.form.templateInfo) {
// this.form.templateInfo = this.baseData.templateInfo
......
......@@ -97,6 +97,7 @@
baseData: {
type: 0,
client: {
content: '',
type: 0,
sex: null,
trackState: null,
......@@ -149,6 +150,7 @@
methods: {
getPreviewInfoText(data) {
this.preview.templateInfo = data.templateInfo
this.$forceUpdate()
},
getPreviewInfo(data) {
this.preview.previewData = JSON.parse(JSON.stringify(data.previewData))
......@@ -350,7 +352,6 @@
this.$emit('steps', step)
},
getData(data) {
console.log(data)
this.baseData = data
this.$emit('update', this.baseData)
}
......
......@@ -77,6 +77,7 @@
type: 0,
client: {
type: 0,
content: '',
sex: null,
trackState: null,
addBeginTime: '',
......@@ -97,24 +98,23 @@
if (this.form.attachments) {
let arr = []
this.form.attachments.forEach((dd) => {
if (dd.msgType == 'text') {
this.attachmentsData.templateInfo = dd.content
this.$forceUpdate()
} else {
if (dd.msgType !== 'text') {
arr.push(dd)
}
})
this.attachmentsData.templateInfo = this.form.client.content
let data = setAttachments(arr)
this.attachmentsData.attachments = data
this.$emit('preview', {
templateInfo: this.attachmentsData.templateInfo,
previewData: JSON.parse(JSON.stringify(this.attachmentsData.attachments))
})
this.$emit('previewText', { templateInfo: JSON.parse(JSON.stringify(this.attachmentsData.templateInfo)) })
}
if (!this.form.client) {
this.form.client = {
type: 0,
sex: '',
content: '',
trackState: '',
addBeginTime: '',
addEndTime: '',
......@@ -132,6 +132,7 @@
},
changeInfo(data) {
this.form.client.content = data
this.$forceUpdate()
this.$emit('update', this.form)
this.$emit('previewText', { templateInfo: data })
},
......
......@@ -77,6 +77,7 @@
form: {
type: 0,
group: {
contnet: '',
type: 0,
userIds: '',
sendType: 0,
......@@ -93,22 +94,22 @@
if (this.form.attachments) {
let arr = []
this.form.attachments.forEach((dd) => {
if (dd.msgType == 'text') {
this.attachmentsData.templateInfo = dd.content
} else {
if (dd.msgType !== 'text') {
arr.push(dd)
}
})
this.attachmentsData.templateInfo = this.form.client.content
let data = setAttachments(arr)
this.attachmentsData.attachments = data
this.$emit('preview', {
templateInfo: this.attachmentsData.templateInfo,
previewData: JSON.parse(JSON.stringify(this.attachmentsData.attachments))
})
this.$emit('previewText', { templateInfo: JSON.parse(JSON.stringify(this.attachmentsData.templateInfo)) })
}
if (!this.form.group) {
this.form.group = {
type: 0,
content: '',
userIds: '',
sendType: 0,
taskSendTime: '',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!