新增邮件发送日志

This commit is contained in:
不做码农 2023-11-20 21:56:23 +08:00
parent 6d44b481fc
commit 580740ff0a
5 changed files with 28 additions and 23 deletions

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1700531242903" class="icon" viewBox="0 0 1027 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4238" xmlns:xlink="http://www.w3.org/1999/xlink" width="200.5859375" height="200"><path d="M984.064 461.824q20.48-12.288 31.232-9.728t10.752 16.896l0 318.464q0 36.864-8.704 58.88t-23.552 32.768-34.816 13.824-43.52 3.072l-45.056 0q-33.792 0-81.408-0.512t-105.984-0.512l-119.808 0-120.832 0-110.592 0-90.112 0-57.344 0q-36.864 0-60.416-9.728t-36.864-25.088-18.432-35.328-5.12-41.472l0-304.128q0-20.48 10.24-26.112t25.6 4.608q4.096 3.072 18.432 12.288t33.28 20.992 40.448 25.088 39.936 24.576 31.744 19.968 17.408 10.752q13.312 8.192 12.288 17.92t-6.144 17.92q-4.096 8.192-12.288 25.6t-17.408 36.352-17.408 35.84-12.288 24.064q-5.12 8.192-3.584 13.824t5.632 8.704 10.24 1.536 11.264-7.68q3.072-3.072 15.872-17.92t28.16-32.256 29.184-32.256 17.92-18.944q5.12-5.12 15.872-11.776t22.016-1.536q6.144 4.096 20.992 13.824t32.768 20.992 35.84 23.04 30.208 18.944q12.288 8.192 26.112 10.24t26.112 1.024 22.528-4.608 15.36-6.656q6.144-3.072 23.552-13.312t37.888-23.04 38.4-24.064 25.088-15.36q11.264-6.144 19.456-3.584t17.408 10.752q4.096 3.072 16.384 18.432t27.136 33.28 27.648 34.304 17.92 22.528q6.144 7.168 12.8 7.68t11.264-3.072 6.144-10.24-3.584-14.848q-2.048-4.096-8.192-19.968t-13.824-35.328-15.872-37.888-12.288-26.624q-8.192-15.36-8.704-24.576t10.752-16.384q3.072-2.048 25.6-16.384t50.176-32.256 53.76-33.792 35.328-22.016zM544.768 637.952q-5.12 1.024-17.408-5.12t-27.648-15.36q-54.272-29.696-108.544-61.44-47.104-26.624-100.864-57.856t-99.84-57.856l0-184.32 2.048 0 0-1.024q0-26.624 10.24-49.664t27.648-40.448 40.448-27.648 49.664-10.24l448.512 0q26.624 0 50.176 10.24t40.96 27.648 27.648 40.448 10.24 49.664l0 1.024 2.048 0 0 184.32q-47.104 26.624-100.864 57.856t-100.864 57.856q-55.296 31.744-108.544 62.464-9.216 5.12-24.064 12.288t-20.992 7.168zM385.024 319.488l320.512 0 0-64.512-320.512 0 0 64.512zM385.024 447.488l320.512 0 0-64.512-320.512 0 0 64.512z" p-id="4239"></path></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1700531099119" class="icon" viewBox="0 0 1044 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4078" xmlns:xlink="http://www.w3.org/1999/xlink" width="203.90625" height="200"><path d="M16.384 157.696q-11.264-8.192-14.336-13.312t-3.072-14.336l0-9.216q0-26.624 13.312-41.984t46.08-15.36l843.776 1.024q33.792 0 47.104 14.336t13.312 39.936l1.024 11.264q0 9.216-2.048 12.8t-16.384 14.848l-418.816 251.904q-10.24 4.096-25.088 11.264t-19.968 8.192q-6.144 0-18.432-5.632t-27.648-14.848zM646.144 572.416q-21.504 0-34.816 9.216t-20.992 23.552-10.24 32.256-2.56 34.304l0 71.68 0 12.288q0 6.144 1.024 11.264l-141.312 0q-72.704 0-136.192-0.512t-111.616-0.512l-70.656 0q-36.864 0-60.416-9.728t-36.864-25.088-18.432-35.328-5.12-41.472l0-378.88q0-21.504 10.24-27.136t25.6 5.632q5.12 3.072 18.432 11.776t31.744 19.968 38.4 24.064 37.888 24.064 30.72 19.456 16.896 10.24q14.336 9.216 16.384 23.04t-3.072 24.064q-4.096 10.24-12.288 26.624t-17.408 33.28-17.92 32.256-11.776 23.552q-5.12 14.336 2.048 19.456t22.528-4.096q3.072-2.048 16.896-15.872t29.184-30.72 29.184-31.744 18.944-17.92q9.216-8.192 24.064-11.776t26.112 2.56q7.168 4.096 19.456 12.288t27.136 17.92 30.208 19.968l27.648 18.432q12.288 8.192 26.112 10.24t26.624 1.024 23.04-4.608 15.36-6.656 19.456-11.776 31.232-18.944 31.744-19.456 22.016-13.312l129.024-79.872q2.048-1.024 12.8-8.192t26.624-17.408 34.816-22.528 35.84-23.04 31.232-19.968 20.48-13.312q19.456-12.288 30.208-9.728t10.752 16.896l0 266.24q-28.672-23.552-55.808-44.032t-49.664-34.816q-22.528-15.36-39.424-10.752t-27.648 19.968-16.384 35.84-5.632 36.864q0 11.264-0.512 18.432t-0.512 12.288q-1.024 5.12-1.024 8.192l-15.36 0-104.448 0zM1028.096 679.936q13.312 10.24 13.824 28.672t-10.752 26.624q-15.36 12.288-35.84 29.184t-42.496 34.304-43.008 34.816-38.4 30.72q-21.504 17.408-30.208 18.432t-8.704-26.624l0-46.08q0-17.408-8.704-28.672t-23.04-11.264l-118.784 0q-14.336 0-28.16-10.24t-13.824-26.624l0-52.224q0-28.672 9.216-34.816t32.768-6.144l20.48 0q9.216 0 20.992 0.512t28.16 0.512l43.008 0q20.48 0 29.184-7.168t8.704-25.6l0-45.056q0-18.432 6.144-23.552t22.528 8.192q16.384 12.288 37.888 29.696t44.544 35.328 45.056 35.84 39.424 31.232z" p-id="4079"></path></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -230,18 +230,22 @@ function handlePreview(row) {
}
function handleSendEmail() {
router.push({
path: '/tool/email/sendemail'
name: 'sendemail'
})
}
// &
function handleSend(row) {
const Ids = row.id != undefined ? [row.id] : ids.value
sendEmail({ idArr: Ids }).then((res) => {
proxy.$modal.loading('发送中...')
sendEmail({ idArr: Ids })
.then(() => {
getList()
proxy.$modal.msgSuccess('发送成功')
})
.finally(() => {
proxy.$modal.closeLoading()
})
}
//

View File

@ -21,9 +21,6 @@
{{ $t('btn.add') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" v-hasPermi="['tool:email:send']" plain icon="upload" @click="handleSend"> 发送邮件 </el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
@ -268,8 +265,5 @@ const handleOpenPre = function (row) {
openPreview.value = true
info.value = { ...row }
}
function handleSend() {
proxy.$tab.openPage('/tool/email/sendEmail')
}
handleQuery()
</script>

View File

@ -16,20 +16,26 @@
<el-form-item label="邮件主题" prop="subject">
<el-input v-model="form.subject"></el-input>
</el-form-item>
<el-row>
<el-form-item label="选择模板" prop="emailTpl">
<el-select v-model="form.emailTpl" placeholder="邮件模板" @change="handleSelectTpl" clearable>
<el-option v-for="dict in emailTplOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select>
</el-form-item>
<!-- <el-form-item label="发送自己" prop="sendMe">
<el-switch v-model="form.sendMe" active-text="是" inactive-text="否"></el-switch>
</el-form-item> -->
<el-form-item label="是否立即送出" prop="isSend">
<el-switch v-model="form.isSend" :active-value="true" :in-active-value="false" active-text="是" inactive-text="否"></el-switch>
</el-form-item>
</el-row>
<el-form-item label="邮件内容" prop="htmlContent">
<editor v-model="form.htmlContent" />
</el-form-item>
<el-form-item label="发送自己" prop="sendMe">
<el-switch v-model="form.sendMe" active-text="是" inactive-text="否"></el-switch>
</el-form-item>
<el-form-item label="是否立即送出" prop="isSend">
<el-switch v-model="form.isSend" active-text="是" inactive-text="否"></el-switch>
</el-form-item>
<el-form-item label="附件">
<UploadFile v-model="form.fileUrl" :limit="5" :fileSize="15" :data="{ fileDir: 'email', uploadType: 1 }" />
</el-form-item>
@ -38,7 +44,7 @@
</el-form-item>
</el-form>
</template>
<script setup name="sendEmail">
<script setup name="sendemail">
import { sendEmail } from '@/api/common'
import { listEmailTpl, getEmailTpl } from '@/api/system/emailtpl.js'
@ -78,8 +84,7 @@ function reset() {
{
value: ''
}
],
isSend: 0
]
}
proxy.resetForm('formRef')
}