Commit 47843ddf by xinla

--no commit message

1 parent 9c3c3306
......@@ -410,6 +410,10 @@
.el-pagination.is-background .el-pager li:disabled {
background-color: transparent;
}
// 分页大小选择框
.el-pagination .el-select .el-input {
width: 115px;
}
// to fixed https://github.com/ElemeFE/element/issues/2461
// .el-dialog {
// transform: none;
......
......@@ -35,7 +35,10 @@
</el-col>
<el-col style="flex-basis: 370px">
<div class="g-card">
<PreviewInPhone name="客群" :list="[form.wematerial]" :templateInfo="form.content"></PreviewInPhone>
<PreviewInPhone
name="客群"
:list="form.wematerial && [form.wematerial]"
:templateInfo="form.content"></PreviewInPhone>
</div>
</el-col>
</el-row>
......
<template>
<div>
<el-dialog :title="title" v-model:visible="Pvisible" width="800px" append-to-body :close-on-click-modal="false">
<el-dialog :title="title" v-model="Pvisible" width="800px" append-to-body :close-on-click-modal="false">
<el-row v-if="list.length || !isInit" type="flex" justify="space-between" style="max-height: 500px">
<el-col style="margin-top: 0px">
<div>
......
......@@ -50,6 +50,9 @@ export default {
mounted() {
this.clipboard = new this.ClipboardJS('.copy-btn')
},
unmounted() {
this.clipboard.destroy()
},
methods: {},
}
</script>
......
......@@ -104,7 +104,7 @@ export default {
this.$emit('preview', {
previewData: JSON.parse(JSON.stringify(this.attachmentsData.attachments)),
})
this.$emit('previewText', { templateInfo: JSON.parse(JSON.stringify(this.attachmentsData.templateInfo)) })
this.$emit('previewText', { templateInfo: this.attachmentsData.templateInfo })
}
if (!this.form.client) {
this.form.client = {
......
......@@ -5,152 +5,148 @@
:isDetail="isDetail"
ref="selectCustomer"
:dataObj="form.group"
@update="getUpdateCustomer"
></SelectGroupVue>
@update="getUpdateCustomer"></SelectGroupVue>
<IdentityAttachmentVue
:isDetail="isDetail"
ref="selectAttachment"
@phoneData="getPhoneData"
@success="getAttentment"
@changeInfo="changeInfo"
:baseData="attachmentsData"
></IdentityAttachmentVue>
:baseData="attachmentsData"></IdentityAttachmentVue>
<SelectSendTypeVue
:isDetail="isDetail"
ref="selectSendType"
:data="form.group"
@update="getSendType"
></SelectSendTypeVue>
@update="getSendType"></SelectSendTypeVue>
<SelectEndDateVue
:isDetail="isDetail"
ref="selectEndDate"
:data="form.group"
@update="getEndDate"
></SelectEndDateVue>
@update="getEndDate"></SelectEndDateVue>
</el-form>
</div>
</template>
<script>
import { dateFormat, setAttachments } from '@/utils/index'
import IdentityAttachmentVue from './IdentityAttachment.vue'
import SelectGroupVue from './SelectGroup.vue'
import SelectEndDateVue from './SelectEndDate.vue'
import SelectSendTypeVue from './SelectSendType.vue'
export default {
name: 'step3-type-2',
components: {
SelectGroupVue,
IdentityAttachmentVue,
SelectSendTypeVue,
SelectEndDateVue
import { dateFormat, setAttachments } from '@/utils/index'
import IdentityAttachmentVue from './IdentityAttachment.vue'
import SelectGroupVue from './SelectGroup.vue'
import SelectEndDateVue from './SelectEndDate.vue'
import SelectSendTypeVue from './SelectSendType.vue'
export default {
name: 'step3-type-2',
components: {
SelectGroupVue,
IdentityAttachmentVue,
SelectSendTypeVue,
SelectEndDateVue,
},
props: {
data: {
type: Object,
default: {},
},
props: {
data: {
type: Object,
default: {}
},
isDetail: {
type: Boolean,
default: false
}
isDetail: {
type: Boolean,
default: false,
},
watch: {
data: {
handler(val, old) {
if (val) {
this.form = val
this.setData()
}
},
deep: true,
immediate: true
}
},
watch: {
data: {
handler(val, old) {
if (val) {
this.form = val
this.setData()
}
},
deep: true,
immediate: true,
},
data() {
return {
attachmentsData: {
templateInfo: '',
attachments: []
},
data() {
return {
attachmentsData: {
templateInfo: '',
attachments: [],
},
previewData: [],
form: {
type: 0,
group: {
content: '',
type: 0,
userIds: '',
sendType: 0,
taskSendTime: '',
taskEndTime: '',
},
previewData: [],
form: {
attachmentsList: [],
senderList: [],
},
}
},
methods: {
setData() {
if (!this.form.group) {
this.form.group = {
type: 0,
group: {
content: '',
type: 0,
userIds: '',
sendType: 0,
taskSendTime: '',
taskEndTime: ''
},
attachmentsList: [],
senderList: []
content: '',
userIds: '',
sendType: 0,
taskSendTime: '',
taskEndTime: '',
}
}
},
methods: {
setData() {
if (!this.form.group) {
this.form.group = {
type: 0,
content: '',
userIds: '',
sendType: 0,
taskSendTime: '',
taskEndTime: ''
if (!this.form.attachments) {
this.form.attachments = []
}
if (this.form.attachments) {
let arr = []
this.form.attachments.forEach((dd) => {
if (dd.msgType !== 'text') {
arr.push(dd)
}
}
if (!this.form.attachments) {
this.form.attachments = []
}
if (this.form.attachments) {
let arr = []
this.form.attachments.forEach((dd) => {
if (dd.msgType !== 'text') {
arr.push(dd)
}
})
this.attachmentsData.templateInfo = this.form.group.content
let data = setAttachments(arr)
this.attachmentsData.attachments = data
this.$emit('preview', {
previewData: JSON.parse(JSON.stringify(this.attachmentsData.attachments))
})
this.$emit('previewText', { templateInfo: JSON.parse(JSON.stringify(this.attachmentsData.templateInfo)) })
}
},
changeInfo(data) {
this.form.group.content = data
this.$emit('update', this.form)
this.$emit('previewText', { templateInfo: data })
},
getPhoneData(data) {
this.previewData = data
})
this.attachmentsData.templateInfo = this.form.group.content
let data = setAttachments(arr)
this.attachmentsData.attachments = data
this.$emit('preview', {
templateInfo: this.attachmentsData.templateInfo,
previewData: JSON.parse(JSON.stringify(data))
previewData: JSON.parse(JSON.stringify(this.attachmentsData.attachments)),
})
},
getAttentment(data) {
this.form.attachments = data
this.$emit('update', this.form)
},
getSendType(data) {
this.form.group.sendType = data.sendType
this.form.group.taskSendTime = dateFormat(data.taskSendTime)
this.$emit('update', this.form)
},
getEndDate(data) {
this.form.group.taskEndTime = dateFormat(data.taskEndTime)
this.$emit('update', this.form)
},
getUpdateCustomer(data) {
this.form.group = data
this.$emit('update', this.form)
this.$emit('previewText', { templateInfo: this.attachmentsData.templateInfo })
}
}
}
},
changeInfo(data) {
this.form.group.content = data
this.$emit('update', this.form)
this.$emit('previewText', { templateInfo: data })
},
getPhoneData(data) {
this.previewData = data
this.$emit('preview', {
templateInfo: this.attachmentsData.templateInfo,
previewData: JSON.parse(JSON.stringify(data)),
})
},
getAttentment(data) {
this.form.attachments = data
this.$emit('update', this.form)
},
getSendType(data) {
this.form.group.sendType = data.sendType
this.form.group.taskSendTime = dateFormat(data.taskSendTime)
this.$emit('update', this.form)
},
getEndDate(data) {
this.form.group.taskEndTime = dateFormat(data.taskEndTime)
this.$emit('update', this.form)
},
getUpdateCustomer(data) {
this.form.group = data
this.$emit('update', this.form)
},
},
}
</script>
<style scoped></style>
<template>
<div>
<el-dialog title="查看详情" :close-on-click-modal="false" :show-close="false" v-model:visible="Pvisible">
<el-dialog title="查看详情" :close-on-click-modal="false" :show-close="false" v-model="Pvisible">
<el-tabs v-model="activeTab" @tab-click="(v) => opened.includes(v.name) || opened.push(v.name)">
<el-tab-pane v-for="(item, index) of list" :key="index" :label="item.label" :name="item.type">
<chatListClassTab
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!