|
@@ -2,22 +2,22 @@
|
|
|
<div class="send-email" style="display: flex;" v-loading="dataLoadng">
|
|
<div class="send-email" style="display: flex;" v-loading="dataLoadng">
|
|
|
<div class="header">
|
|
<div class="header">
|
|
|
<div class="header-btn">
|
|
<div class="header-btn">
|
|
|
- <el-button type="primary">保存</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" @click="saveEmail" v-loading>保存</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="content" style="display: flex;">
|
|
<div class="content" style="display: flex;">
|
|
|
<div class="send-content">
|
|
<div class="send-content">
|
|
|
<div class="send-input">
|
|
<div class="send-input">
|
|
|
<span class="send-label">收件人</span>
|
|
<span class="send-label">收件人</span>
|
|
|
- <el-input v-model="form.recipientls" disabled></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="form.recipient" disabled></el-input>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="send-input">
|
|
<div class="send-input">
|
|
|
<span class="send-label">抄送</span>
|
|
<span class="send-label">抄送</span>
|
|
|
- <el-input v-model="form.recipientCcls" disabled></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="form.recipientCc" disabled></el-input>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="send-input">
|
|
<div class="send-input">
|
|
|
<span class="send-label">密件抄送</span>
|
|
<span class="send-label">密件抄送</span>
|
|
|
- <el-input v-model="form.recipientBccls" disabled></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="form.recipientBcc" disabled></el-input>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="send-input">
|
|
<div class="send-input">
|
|
|
<span class="send-label">主题</span>
|
|
<span class="send-label">主题</span>
|
|
@@ -32,7 +32,7 @@
|
|
|
:content="form.content"
|
|
:content="form.content"
|
|
|
ref="ckeditorRef"
|
|
ref="ckeditorRef"
|
|
|
></ckeditor>
|
|
></ckeditor>
|
|
|
- <div class="ai-button" v-if="aiShow">
|
|
|
|
|
|
|
+ <!-- <div class="ai-button" v-if="aiShow">
|
|
|
<el-button v-for="item in aiButton" @click="aiButtonClick(item)">
|
|
<el-button v-for="item in aiButton" @click="aiButtonClick(item)">
|
|
|
<img :src="getImageUrl(item.value)" />
|
|
<img :src="getImageUrl(item.value)" />
|
|
|
{{ item.label }}
|
|
{{ item.label }}
|
|
@@ -41,7 +41,7 @@
|
|
|
<div class="ai-div">
|
|
<div class="ai-div">
|
|
|
<p>智能写信新体验,试试AI润色让文字焕发活力</p>
|
|
<p>智能写信新体验,试试AI润色让文字焕发活力</p>
|
|
|
<el-button type="primary" @click="aiShow = !aiShow">AI润色</el-button>
|
|
<el-button type="primary" @click="aiShow = !aiShow">AI润色</el-button>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
</div>
|
|
</div>
|
|
|
<div class="file-div" v-loading="fileLoading">
|
|
<div class="file-div" v-loading="fileLoading">
|
|
|
<div class="file-header">
|
|
<div class="file-header">
|
|
@@ -97,7 +97,7 @@
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { ref, reactive, onMounted } from 'vue'
|
|
import { ref, reactive, onMounted } from 'vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
|
- import { getEmailDetail } from '@/api/marketing'
|
|
|
|
|
|
|
+ import { getEmailDetail, editEmail } from '@/api/marketing'
|
|
|
import ckeditor from '@/components/ckeditor/index.vue'
|
|
import ckeditor from '@/components/ckeditor/index.vue'
|
|
|
|
|
|
|
|
const getContent = (val) => {
|
|
const getContent = (val) => {
|
|
@@ -108,7 +108,7 @@
|
|
|
let queryData = router.currentRoute.value.query
|
|
let queryData = router.currentRoute.value.query
|
|
|
const getData = () => {
|
|
const getData = () => {
|
|
|
getEmailDetail({ mailId: queryData.id }).then(res => {
|
|
getEmailDetail({ mailId: queryData.id }).then(res => {
|
|
|
- console.log('res :>> ', res);
|
|
|
|
|
|
|
+ Object.assign(form.value, res.result)
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -284,9 +284,9 @@
|
|
|
const isDelaySend = ref(0)
|
|
const isDelaySend = ref(0)
|
|
|
const form = ref({
|
|
const form = ref({
|
|
|
content: '',
|
|
content: '',
|
|
|
- recipientls: [],
|
|
|
|
|
- recipientCcls: [],
|
|
|
|
|
- recipientBccls: [],
|
|
|
|
|
|
|
+ recipient: '',
|
|
|
|
|
+ recipientCc: '',
|
|
|
|
|
+ recipientBcc: '',
|
|
|
subject: '',
|
|
subject: '',
|
|
|
fileIds: [],
|
|
fileIds: [],
|
|
|
replyMsgId: '',
|
|
replyMsgId: '',
|
|
@@ -298,6 +298,18 @@
|
|
|
oldfileIds: undefined
|
|
oldfileIds: undefined
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ const saveLoading = ref(false)
|
|
|
|
|
+ const saveEmail = () => {
|
|
|
|
|
+ saveLoading.value = true
|
|
|
|
|
+ editEmail({ mailId: form.value.id, content: form.value.content }).then(res => {
|
|
|
|
|
+ ElMessage.success('保存成功')
|
|
|
|
|
+ }).catch((err) => {
|
|
|
|
|
+ ElMessage.error(err.message || '保存失败')
|
|
|
|
|
+ }).finally(() => {
|
|
|
|
|
+ saveLoading.value = false
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 上传附件部分
|
|
// 上传附件部分
|
|
|
// const token = getToken()
|
|
// const token = getToken()
|
|
|
const uploadRef = ref()
|
|
const uploadRef = ref()
|
|
@@ -603,7 +615,7 @@
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
height: 41px;
|
|
height: 41px;
|
|
|
- /* background: #313F54; */
|
|
|
|
|
|
|
+ background: #f8f8f8;
|
|
|
color: #000;
|
|
color: #000;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
padding: 0 10px;
|
|
padding: 0 10px;
|