Commit 3ce0764f by 姜鹏凯

短链推广

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