1. 统一删除 dialog-footer,包括代码生成的模版

2. 查询参数列表,改下
3. 简化 formatDate
4. 看看是不是有部分新增的 plain 不对
5. modelVisible 改成 dialogVisible?modelTitle 改成 dialogTitle
This commit is contained in:
YunaiV
2023-04-02 23:52:56 +08:00
parent 87a5ddfd2c
commit 0d6ecfb45c
77 changed files with 363 additions and 341 deletions

View File

@ -1,5 +1,5 @@
<template>
<Dialog title="详情" v-model="modelVisible" :scroll="true" :max-height="500">
<Dialog title="详情" v-model="dialogVisible" :scroll="true" :max-height="500">
<el-descriptions border :column="1">
<el-descriptions-item label="编号" min-width="120">
{{ detailData.id }}
@ -45,13 +45,13 @@ import { DICT_TYPE } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime'
import * as NotifyMessageApi from '@/api/system/notify/message'
const modelVisible = ref(false) // 弹窗的是否展示
const dialogVisible = ref(false) // 弹窗的是否展示
const detailLoading = ref(false) // 表单的加载中
const detailData = ref() // 详情数据
/** 打开弹窗 */
const open = async (data: NotifyMessageApi.NotifyMessageVO) => {
modelVisible.value = true
dialogVisible.value = true
// 设置数据
detailLoading.value = true
try {

View File

@ -1,5 +1,5 @@
<template>
<Dialog title="消息详情" v-model="modelVisible" :scroll="true" :max-height="500">
<Dialog title="消息详情" v-model="dialogVisible" :scroll="true" :max-height="500">
<el-descriptions border :column="1">
<el-descriptions-item label="发送人">
{{ detailData.templateNickname }}
@ -27,13 +27,13 @@ import { DICT_TYPE } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime'
import * as NotifyMessageApi from '@/api/system/notify/message'
const modelVisible = ref(false) // 弹窗的是否展示
const dialogVisible = ref(false) // 弹窗的是否展示
const detailLoading = ref(false) // 表单的加载中
const detailData = ref() // 详情数据
/** 打开弹窗 */
const open = async (data: NotifyMessageApi.NotifyMessageVO) => {
modelVisible.value = true
dialogVisible.value = true
// 设置数据
detailLoading.value = true
try {

View File

@ -46,7 +46,7 @@
</ContentWrap>
<!-- 添加/修改的弹窗 -->
<XModal id="templateModel" :loading="modelLoading" v-model="modelVisible" :title="modelTitle">
<XModal id="templateModel" :loading="modelLoading" v-model="dialogVisible" :title="dialogTitle">
<!-- 表单添加/修改 -->
<Form
ref="formRef"
@ -70,7 +70,7 @@
@click="submitForm()"
/>
<!-- 按钮关闭 -->
<XButton :loading="actionLoading" :title="t('dialog.close')" @click="modelVisible = false" />
<XButton :loading="actionLoading" :title="t('dialog.close')" @click="dialogVisible = false" />
</template>
</XModal>
@ -132,8 +132,8 @@ const [registerTable, { reload, deleteData }] = useXTable({
})
// 弹窗相关的变量
const modelVisible = ref(false) // 是否显示弹出层
const modelTitle = ref('edit') // 弹出层标题
const dialogVisible = ref(false) // 是否显示弹出层
const dialogTitle = ref('edit') // 弹出层标题
const modelLoading = ref(false) // 弹出层loading
const actionType = ref('') // 操作按钮的类型
const actionLoading = ref(false) // 按钮 Loading
@ -143,9 +143,9 @@ const detailData = ref() // 详情 Ref
// 设置标题
const setDialogTile = (type: string) => {
modelLoading.value = true
modelTitle.value = t('action.' + type)
dialogTitle.value = t('action.' + type)
actionType.value = type
modelVisible.value = true
dialogVisible.value = true
}
// 新增操作
@ -188,7 +188,7 @@ const submitForm = async () => {
await NotifyTemplateApi.updateNotifyTemplateApi(data)
message.success(t('common.updateSuccess'))
}
modelVisible.value = false
dialogVisible.value = false
} finally {
actionLoading.value = false
// 刷新列表