部分样式bug
This commit is contained in:
@ -5,95 +5,51 @@
|
||||
<template #accountId_search>
|
||||
<el-select v-model="queryParams.accountId">
|
||||
<el-option :key="undefined" label="全部" :value="undefined" />
|
||||
<el-option
|
||||
v-for="item in accountOptions"
|
||||
:key="item.id"
|
||||
:label="item.mail"
|
||||
:value="item.id"
|
||||
/>
|
||||
<el-option v-for="item in accountOptions" :key="item.id" :label="item.mail" :value="item.id" />
|
||||
</el-select>
|
||||
</template>
|
||||
<template #toolbar_buttons>
|
||||
<!-- 操作:新增 -->
|
||||
<XButton
|
||||
type="primary"
|
||||
preIcon="ep:zoom-in"
|
||||
:title="t('action.add')"
|
||||
v-hasPermi="['system:mail-template:create']"
|
||||
@click="handleCreate()"
|
||||
/>
|
||||
<XButton type="primary" preIcon="ep:zoom-in" :title="t('action.add')" v-hasPermi="['system:mail-template:create']"
|
||||
@click="handleCreate()" />
|
||||
</template>
|
||||
<template #accountId_default="{ row }">
|
||||
<span>{{ accountOptions.find((account) => account.id === row.accountId)?.mail }}</span>
|
||||
</template>
|
||||
<template #actionbtns_default="{ row }">
|
||||
<!-- 操作:测试短信 -->
|
||||
<XTextButton
|
||||
preIcon="ep:cpu"
|
||||
:title="t('action.test')"
|
||||
v-hasPermi="['system:mail-template:send-mail']"
|
||||
@click="handleSendMail(row)"
|
||||
/>
|
||||
<XTextButton preIcon="ep:cpu" :title="t('action.test')" v-hasPermi="['system:mail-template:send-mail']"
|
||||
@click="handleSendMail(row)" />
|
||||
<!-- 操作:修改 -->
|
||||
<XTextButton
|
||||
preIcon="ep:edit"
|
||||
:title="t('action.edit')"
|
||||
v-hasPermi="['system:mail-template:update']"
|
||||
@click="handleUpdate(row.id)"
|
||||
/>
|
||||
<XTextButton preIcon="ep:edit" :title="t('action.edit')" v-hasPermi="['system:mail-template:update']"
|
||||
@click="handleUpdate(row.id)" />
|
||||
<!-- 操作:详情 -->
|
||||
<XTextButton
|
||||
preIcon="ep:view"
|
||||
:title="t('action.detail')"
|
||||
v-hasPermi="['system:mail-template:query']"
|
||||
@click="handleDetail(row.id)"
|
||||
/>
|
||||
<XTextButton preIcon="ep:view" :title="t('action.detail')" v-hasPermi="['system:mail-template:query']"
|
||||
@click="handleDetail(row.id)" />
|
||||
<!-- 操作:删除 -->
|
||||
<XTextButton
|
||||
preIcon="ep:delete"
|
||||
:title="t('action.del')"
|
||||
v-hasPermi="['system:mail-template:delete']"
|
||||
@click="deleteData(row.id)"
|
||||
/>
|
||||
<XTextButton preIcon="ep:delete" :title="t('action.del')" v-hasPermi="['system:mail-template:delete']"
|
||||
@click="deleteData(row.id)" />
|
||||
</template>
|
||||
</XTable>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 添加/修改/详情的弹窗 -->
|
||||
<XModal id="mailTemplateModel" :loading="modelLoading" v-model="modelVisible" :title="modelTitle">
|
||||
<XModal id="mailTemplateModel" :loading="modelLoading" v-model="modelVisible" :title="modelTitle"
|
||||
:height="['create', 'update'].includes(actionType) ? '99%' : ''">
|
||||
<!-- 表单:添加/修改 -->
|
||||
<Form
|
||||
ref="formRef"
|
||||
v-if="['create', 'update'].includes(actionType)"
|
||||
:schema="allSchemas.formSchema"
|
||||
:rules="rules"
|
||||
>
|
||||
<Form ref="formRef" v-if="['create', 'update'].includes(actionType)" :schema="allSchemas.formSchema" :rules="rules">
|
||||
<template #accountId="form">
|
||||
<el-select v-model="form.accountId">
|
||||
<el-option
|
||||
v-for="item in accountOptions"
|
||||
:key="item.id"
|
||||
:label="item.mail"
|
||||
:value="item.id"
|
||||
/>
|
||||
<el-option v-for="item in accountOptions" :key="item.id" :label="item.mail" :value="item.id" />
|
||||
</el-select>
|
||||
</template>
|
||||
</Form>
|
||||
<!-- 表单:详情 -->
|
||||
<Descriptions
|
||||
v-if="actionType === 'detail'"
|
||||
:schema="allSchemas.detailSchema"
|
||||
:data="detailData"
|
||||
/>
|
||||
<Descriptions v-if="actionType === 'detail'" :schema="allSchemas.detailSchema" :data="detailData" />
|
||||
<template #footer>
|
||||
<!-- 按钮:保存 -->
|
||||
<XButton
|
||||
v-if="['create', 'update'].includes(actionType)"
|
||||
type="primary"
|
||||
:title="t('action.save')"
|
||||
:loading="actionLoading"
|
||||
@click="submitForm()"
|
||||
/>
|
||||
<XButton v-if="['create', 'update'].includes(actionType)" type="primary" :title="t('action.save')"
|
||||
:loading="actionLoading" @click="submitForm()" />
|
||||
<!-- 按钮:关闭 -->
|
||||
<XButton :loading="actionLoading" :title="t('dialog.close')" @click="modelVisible = false" />
|
||||
</template>
|
||||
@ -108,26 +64,14 @@
|
||||
<el-form-item label="收件邮箱" prop="mail">
|
||||
<el-input v-model="sendForm.mail" placeholder="请输入收件邮箱" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-for="param in sendForm.params"
|
||||
:key="param"
|
||||
:label="'参数 {' + param + '}'"
|
||||
:prop="'templateParams.' + param"
|
||||
>
|
||||
<el-input
|
||||
v-model="sendForm.templateParams[param]"
|
||||
:placeholder="'请输入 ' + param + ' 参数'"
|
||||
/>
|
||||
<el-form-item v-for="param in sendForm.params" :key="param" :label="'参数 {' + param + '}'"
|
||||
:prop="'templateParams.' + param">
|
||||
<el-input v-model="sendForm.templateParams[param]" :placeholder="'请输入 ' + param + ' 参数'" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 操作按钮 -->
|
||||
<template #footer>
|
||||
<XButton
|
||||
type="primary"
|
||||
:title="t('action.test')"
|
||||
:loading="actionLoading"
|
||||
@click="sendTest()"
|
||||
/>
|
||||
<XButton type="primary" :title="t('action.test')" :loading="actionLoading" @click="sendTest()" />
|
||||
<XButton :title="t('dialog.close')" @click="sendVisible = false" />
|
||||
</template>
|
||||
</XModal>
|
||||
|
||||
Reference in New Issue
Block a user