邮件模板预览修改
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2025-01-17 13:30:50 +08:00
parent 4cef62ccba
commit 5393ca571c
2 changed files with 33 additions and 8 deletions

View File

@ -246,9 +246,9 @@
:autosize="{ minRows: 8, maxRows: 8 }" :autosize="{ minRows: 8, maxRows: 8 }"
/> />
<el-button <el-button
:disabled="!form.EmailHtmlContentCN" :disabled="!form.EmailHtmlContentCN && form.EmailHtmlContent"
type="text" type="text"
@click="PreviewHTML(form.EmailHtmlContentCN)" @click="PreviewHTML(form.EmailHtmlContentCN, form.EmailHtmlContent)"
style="position: absolute; left: -50px; top: 30px" style="position: absolute; left: -50px; top: 30px"
> >
{{ $t('common:button:preview') }} {{ $t('common:button:preview') }}
@ -265,9 +265,9 @@
:autosize="{ minRows: 8, maxRows: 8 }" :autosize="{ minRows: 8, maxRows: 8 }"
/> />
<el-button <el-button
:disabled="!form.EmailHtmlContent" :disabled="!form.EmailHtmlContentCN && form.EmailHtmlContent"
type="text" type="text"
@click="PreviewHTML(form.EmailHtmlContent)" @click="PreviewHTML(form.EmailHtmlContentCN, form.EmailHtmlContent)"
style="position: absolute; left: -50px; top: 30px" style="position: absolute; left: -50px; top: 30px"
> >
{{ $t('common:button:preview') }} {{ $t('common:button:preview') }}
@ -519,8 +519,8 @@ export default {
}) })
}, },
// //
PreviewHTML(html) { PreviewHTML(html, htmlEn) {
this.$emit('PreviewHTML', html) this.$emit('PreviewHTML', html, htmlEn)
}, },
}, },
} }

View File

@ -370,6 +370,13 @@
<el-button type="text" @click="handleDelete(scope.row)" <el-button type="text" @click="handleDelete(scope.row)"
>删除</el-button >删除</el-button
> >
<el-button
type="text"
@click="
preview(scope.row.EmailHtmlContentCN, scope.row.EmailHtmlContent)
"
>{{ $t('common:button:preview') }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -427,7 +434,23 @@
fullscreen fullscreen
custom-class="base-dialog-wrapper" custom-class="base-dialog-wrapper"
> >
<div v-html="previewHTML"></div> <div
style="
display: flex;
align-items: flex-start;
justify-content: space-around;
flex-wrap: wrap;
"
>
<div>
<h3>邮件内容模版CN</h3>
<div v-html="previewHTML"></div>
</div>
<div>
<h3>邮件内容模版EN</h3>
<!-- <div v-html="previewHTMLEN"></div> -->
</div>
</div>
</el-dialog> </el-dialog>
</box-content> </box-content>
</template> </template>
@ -487,6 +510,7 @@ export default {
attachmentVisible: false, attachmentVisible: false,
previewVisible: false, previewVisible: false,
previewHTML: null, previewHTML: null,
previewHTMLEN: null,
} }
}, },
computed: { computed: {
@ -574,8 +598,9 @@ export default {
closeDialog() { closeDialog() {
this.editVisible = false this.editVisible = false
}, },
preview(html) { preview(html, htmlEN) {
this.previewHTML = html this.previewHTML = html
this.previewHTMLEN = htmlEN
this.previewVisible = true this.previewVisible = true
}, },
// //