:swap:基础数据优化

This commit is contained in:
不做码农 2023-11-21 08:16:10 +08:00
parent 07b165f0c0
commit 6d44b481fc
5 changed files with 25 additions and 10 deletions

View File

@ -135,7 +135,8 @@ function handleQuery() {
/** 新增按钮操作 */
function handleAdd() {
router.replace({ path: '/article/publish' })
// router.replace({ path: '/article/publish' })
router.push({ path: '/article/publish' })
}
/** 删除按钮操作 */

View File

@ -350,7 +350,7 @@ const state = reactive({
orderNum: [{ required: true, message: '菜单顺序不能为空', trigger: 'blur' }],
path: [
{ required: true, message: '路由地址不能为空', trigger: 'blur' },
{ pattern: /^[A-Za-z].+$/, message: '输入格式不正确,字母开头', trigger: 'blur' }
{ pattern: /^[/A-Za-z].+$/, message: '输入格式不正确,字母开头', trigger: 'blur' }
],
visible: [{ required: true, message: '显示状态不能为空', trigger: 'blur' }]
},

View File

@ -31,7 +31,12 @@
<!-- 工具区域 -->
<el-row :gutter="15" class="mb10">
<el-col :span="1.5">
<el-button type="primary" :disabled="multiple" v-hasPermi="['tool:email:send']" plain icon="upload" @click="handleSend"> 发送 </el-button>
<el-button type="primary" v-hasPermi="['tool:email:send']" plain icon="plus" @click="handleSendEmail"> 发送邮件 </el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" :disabled="multiple" v-hasPermi="['tool:email:send']" plain icon="upload" @click="handleSend">
批量发送
</el-button>
</el-col>
<el-col :span="1.5">
@ -64,9 +69,13 @@
<DictTag :options="options.isSendOptions" :value="row.isSend"></DictTag>
</template>
</el-table-column>
<el-table-column label="操作" width="210" align="center">
<el-table-column label="操作" width="200">
<template #default="scope">
<el-button type="primary" size="small" icon="view" text @click="handlePreview(scope.row)"> 预览 </el-button>
<el-button type="danger" size="small" icon="delete" text v-hasPermi="['emaillog:delete']" @click="handleDelete(scope.row)">
删除
</el-button>
<el-button
type="primary"
size="small"
@ -77,9 +86,6 @@
v-if="scope.row.isSend == 0">
发送
</el-button>
<el-button type="danger" size="small" icon="delete" text v-hasPermi="['emaillog:delete']" @click="handleDelete(scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
@ -97,8 +103,10 @@
</template>
<script setup name="emaillog">
import { listEmailLog, sendEmail, delEmailLog, getEmailLog } from '@/api/system/emaillog.js'
import { listEmailLog, sendEmail, delEmailLog } from '@/api/system/emaillog.js'
const { proxy } = getCurrentInstance()
const router = useRouter()
const ids = ref([])
const loading = ref(false)
const showSearch = ref(true)
@ -220,6 +228,12 @@ function handlePreview(row) {
form.value = row
open.value = true
}
function handleSendEmail() {
router.push({
path: '/tool/email/sendemail'
})
}
// &
function handleSend(row) {
const Ids = row.id != undefined ? [row.id] : ids.value

View File

@ -269,7 +269,7 @@ const handleOpenPre = function (row) {
info.value = { ...row }
}
function handleSend() {
proxy.$tab.openPage('/tool/sendEmail')
proxy.$tab.openPage('/tool/email/sendEmail')
}
handleQuery()
</script>

View File

@ -125,7 +125,7 @@ function formSubmit() {
if (res.code == 200) {
proxy.$message.success('发送成功')
reset()
router.push({ path: '/system/log/EmailLog' })
router.push({ name: 'emaillog' })
}
proxy.$modal.closeLoading()
})