From 0d6ecfb45cf141431566887654dfbe89f3968189 Mon Sep 17 00:00:00 2001 From: YunaiV <zhijiantianya@gmail.com> Date: Sun, 2 Apr 2023 23:52:56 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E7=BB=9F=E4=B8=80=E5=88=A0=E9=99=A4=20dia?= =?UTF-8?q?log-footer=EF=BC=8C=E5=8C=85=E6=8B=AC=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=E7=9A=84=E6=A8=A1=E7=89=88=202.=20=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=8F=82=E6=95=B0=E5=88=97=E8=A1=A8=EF=BC=8C=E6=94=B9?= =?UTF-8?q?=E4=B8=8B=203.=20=E7=AE=80=E5=8C=96=20formatDate=204.=20?= =?UTF-8?q?=E7=9C=8B=E7=9C=8B=E6=98=AF=E4=B8=8D=E6=98=AF=E6=9C=89=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=96=B0=E5=A2=9E=E7=9A=84=20plain=20=E4=B8=8D?= =?UTF-8?q?=E5=AF=B9=205.=20modelVisible=20=E6=94=B9=E6=88=90=20dialogVisi?= =?UTF-8?q?ble=EF=BC=9FmodelTitle=20=E6=94=B9=E6=88=90=20dialogTitle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/dict/dict.data.ts | 2 +- src/views/bpm/form/editor/index.vue | 10 +++++----- src/views/bpm/form/index.vue | 2 +- src/views/bpm/group/UserGroupForm.vue | 14 +++++++------- src/views/bpm/group/index.vue | 1 + src/views/bpm/model/ModelForm.vue | 14 +++++++------- src/views/bpm/model/ModelImportForm.vue | 8 ++++---- .../detail/TaskUpdateAssigneeForm.vue | 10 +++++----- .../bpm/taskAssignRule/TaskAssignRuleForm.vue | 10 +++++----- .../infra/apiAccessLog/ApiAccessLogDetail.vue | 6 +++--- src/views/infra/apiErrorLog/ApiErrorLogDetail.vue | 6 +++--- src/views/infra/codegen/ImportTable.vue | 8 ++++---- src/views/infra/codegen/PreviewCode.vue | 6 +++--- src/views/infra/config/form.vue | 14 +++++++------- src/views/infra/config/index.vue | 7 ++++++- src/views/infra/dataSourceConfig/form.vue | 14 +++++++------- src/views/infra/dataSourceConfig/index.vue | 1 + src/views/infra/file/form.vue | 14 +++++++------- src/views/infra/fileConfig/form.vue | 14 +++++++------- src/views/infra/fileConfig/index.vue | 1 + src/views/infra/job/JobDetail.vue | 6 +++--- src/views/infra/job/JobForm.vue | 14 +++++++------- src/views/infra/job/logger/JobLogDetail.vue | 6 +++--- src/views/mall/product/category/CategoryForm.vue | 14 +++++++------- src/views/mall/product/property/PropertyForm.vue | 14 +++++++------- src/views/mall/product/property/index.vue | 2 +- .../mall/product/property/value/ValueForm.vue | 14 +++++++------- src/views/mall/product/property/value/index.vue | 2 +- src/views/mp/account/AccountForm.vue | 14 +++++++------- src/views/mp/tag/TagForm.vue | 14 +++++++------- src/views/pay/merchant/MerchantForm.vue | 14 +++++++------- src/views/system/area/form.vue | 8 ++++---- src/views/system/area/index.vue | 2 +- src/views/system/dept/DeptForm.vue | 14 +++++++------- src/views/system/dept/index.vue | 8 +------- src/views/system/dict/data.form.vue | 14 +++++++------- src/views/system/dict/data.vue | 2 +- src/views/system/dict/form.vue | 14 +++++++------- src/views/system/dict/index.vue | 8 ++++++-- src/views/system/errorCode/form.vue | 14 +++++++------- src/views/system/errorCode/index.vue | 1 + src/views/system/loginlog/LoginLogDetail.vue | 6 +++--- src/views/system/mail/account/form.vue | 14 +++++++------- src/views/system/mail/account/index.vue | 1 + src/views/system/mail/log/detail.vue | 6 +++--- src/views/system/mail/template/form.vue | 14 +++++++------- src/views/system/mail/template/index.vue | 1 + src/views/system/mail/template/send.vue | 10 +++++----- src/views/system/menu/MenuForm.vue | 14 +++++++------- src/views/system/notice/form.vue | 14 +++++++------- src/views/system/notice/index.vue | 2 +- .../system/notify/message/NotifyMessageDetail.vue | 6 +++--- .../system/notify/my/MyNotifyMessageDetail.vue | 6 +++--- src/views/system/notify/template/index.vue | 14 +++++++------- src/views/system/oauth2/client/ClientForm.vue | 14 +++++++------- src/views/system/oauth2/client/index.vue | 2 +- src/views/system/operatelog/detail.vue | 6 +++--- src/views/system/post/PostForm.vue | 14 +++++++------- src/views/system/post/index.vue | 1 + src/views/system/role/RoleAssignMenuForm.vue | 10 +++++----- src/views/system/role/RoleDataPermissionForm.vue | 10 +++++----- src/views/system/role/RoleForm.vue | 14 +++++++------- .../system/sensitiveWord/SensitiveWordForm.vue | 14 +++++++------- .../sensitiveWord/SensitiveWordTestForm.vue | 14 ++++++-------- src/views/system/sms/channel/SmsChannelForm.vue | 14 +++++++------- src/views/system/sms/channel/index.vue | 1 + src/views/system/sms/log/SmsLogDetail.vue | 6 +++--- src/views/system/sms/template/SmsTemplateForm.vue | 14 +++++++------- .../system/sms/template/SmsTemplateSendForm.vue | 10 +++++----- src/views/system/tenant/form.vue | 14 +++++++------- src/views/system/tenant/index.vue | 7 ++++++- .../system/tenantPackage/TenantPackageForm.vue | 14 +++++++------- src/views/system/tenantPackage/index.vue | 15 +++++++++------ src/views/system/user/UserAssignRoleForm.vue | 10 +++++----- src/views/system/user/UserForm.vue | 14 +++++++------- src/views/system/user/UserImportForm.vue | 8 ++++---- src/views/system/user/index.vue | 9 +++++++-- 77 files changed, 363 insertions(+), 341 deletions(-) diff --git a/src/api/system/dict/dict.data.ts b/src/api/system/dict/dict.data.ts index 6d981326..87e7dce7 100644 --- a/src/api/system/dict/dict.data.ts +++ b/src/api/system/dict/dict.data.ts @@ -44,6 +44,6 @@ export const deleteDictData = (id: number) => { } // 导出字典类型数据 -export const exportDictDataApi = (params) => { +export const exportDictData = (params) => { return request.get({ url: '/system/dict-data/export', params }) } diff --git a/src/views/bpm/form/editor/index.vue b/src/views/bpm/form/editor/index.vue index cb7d023f..3a28697f 100644 --- a/src/views/bpm/form/editor/index.vue +++ b/src/views/bpm/form/editor/index.vue @@ -11,7 +11,7 @@ </ContentWrap> <!-- 表单保存的弹窗 --> - <Dialog title="保存表单" v-model="modelVisible" width="600"> + <Dialog title="保存表单" v-model="dialogVisible" width="600"> <el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px"> <el-form-item label="表单名" prop="name"> <el-input v-model="formData.name" placeholder="请输入表单名" /> @@ -33,7 +33,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -48,7 +48,7 @@ const message = useMessage() // 消息 const { query } = useRoute() // 路由 const designer = ref() // 表单设计器 -const modelVisible = ref(false) // 弹窗是否展示 +const dialogVisible = ref(false) // 弹窗是否展示 const formLoading = ref(false) // 表单的加载中:提交的按钮禁用 const formData = ref({ name: '', @@ -63,7 +63,7 @@ const formRef = ref() // 表单 Ref /** 处理保存按钮 */ const handleSave = () => { - modelVisible.value = true + dialogVisible.value = true } /** 提交表单 */ @@ -85,7 +85,7 @@ const submitForm = async () => { await FormApi.updateForm(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false } finally { formLoading.value = false } diff --git a/src/views/bpm/form/index.vue b/src/views/bpm/form/index.vue index 616e60be..f8d94317 100644 --- a/src/views/bpm/form/index.vue +++ b/src/views/bpm/form/index.vue @@ -20,7 +20,7 @@ <el-form-item> <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> - <el-button type="primary" @click="openForm()" v-hasPermi="['bpm:form:create']"> + <el-button type="primary" plain @click="openForm" v-hasPermi="['bpm:form:create']"> <Icon icon="ep:plus" class="mr-5px" /> 新增 </el-button> </el-form-item> diff --git a/src/views/bpm/group/UserGroupForm.vue b/src/views/bpm/group/UserGroupForm.vue index 9496ad84..e8011d8c 100644 --- a/src/views/bpm/group/UserGroupForm.vue +++ b/src/views/bpm/group/UserGroupForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -37,7 +37,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -50,8 +50,8 @@ import * as UserApi from '@/api/system/user' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -72,8 +72,8 @@ const userList = ref([]) // 用户列表 /** 打开弹窗 */ const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -108,7 +108,7 @@ const submitForm = async () => { await UserGroupApi.updateUserGroup(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/bpm/group/index.vue b/src/views/bpm/group/index.vue index 0b52e9a2..0c731dbe 100644 --- a/src/views/bpm/group/index.vue +++ b/src/views/bpm/group/index.vue @@ -43,6 +43,7 @@ <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> <el-button type="primary" + plain @click="openForm('create')" v-hasPermi="['bpm:user-group:create']" > diff --git a/src/views/bpm/model/ModelForm.vue b/src/views/bpm/model/ModelForm.vue index ac536958..24484ec6 100644 --- a/src/views/bpm/model/ModelForm.vue +++ b/src/views/bpm/model/ModelForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible" width="600"> + <Dialog :title="dialogTitle" v-model="dialogVisible" width="600"> <el-form ref="formRef" :model="formData" @@ -117,7 +117,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -129,8 +129,8 @@ import * as FormApi from '@/api/bpm/form' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -154,8 +154,8 @@ const formList = ref([]) // 流程表单的下拉框的数据 /** 打开弹窗 */ const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -203,7 +203,7 @@ const submitForm = async () => { await ModelApi.updateModel(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/bpm/model/ModelImportForm.vue b/src/views/bpm/model/ModelImportForm.vue index fe542622..76493c95 100644 --- a/src/views/bpm/model/ModelImportForm.vue +++ b/src/views/bpm/model/ModelImportForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="导入流程" v-model="modelVisible" width="400"> + <Dialog title="导入流程" v-model="dialogVisible" width="400"> <div> <el-upload ref="uploadRef" @@ -45,7 +45,7 @@ </div> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -53,7 +53,7 @@ import { getAccessToken, getTenantId } from '@/utils/auth' const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中 const formData = ref({ key: '', @@ -72,7 +72,7 @@ const fileList = ref([]) // 文件列表 /** 打开弹窗 */ const open = async () => { - modelVisible.value = true + dialogVisible.value = true resetForm() } defineExpose({ open }) // 提供 open 方法,用于打开弹窗 diff --git a/src/views/bpm/processInstance/detail/TaskUpdateAssigneeForm.vue b/src/views/bpm/processInstance/detail/TaskUpdateAssigneeForm.vue index 7f9cfd48..0f16deeb 100644 --- a/src/views/bpm/processInstance/detail/TaskUpdateAssigneeForm.vue +++ b/src/views/bpm/processInstance/detail/TaskUpdateAssigneeForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="转派审批人" v-model="modelVisible" width="500"> + <Dialog title="转派审批人" v-model="dialogVisible" width="500"> <el-form ref="formRef" :model="formData" @@ -20,7 +20,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -28,7 +28,7 @@ import * as TaskApi from '@/api/bpm/task' import * as UserApi from '@/api/system/user' -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中 const formData = ref({ id: '', @@ -43,7 +43,7 @@ const userList = ref<any[]>([]) // 用户列表 /** 打开弹窗 */ const open = async (id: string) => { - modelVisible.value = true + dialogVisible.value = true resetForm() formData.value.id = id // 获得用户列表 @@ -62,7 +62,7 @@ const submitForm = async () => { formLoading.value = true try { await TaskApi.updateTaskAssignee(formData.value) - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue b/src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue index a452cab9..2ddebab1 100644 --- a/src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue +++ b/src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="修改任务规则" v-model="modelVisible" width="600"> + <Dialog title="修改任务规则" v-model="dialogVisible" width="600"> <el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px"> <el-form-item label="任务名称" prop="taskDefinitionName"> <el-input v-model="formData.taskDefinitionName" placeholder="请输入流标标识" disabled /> @@ -93,7 +93,7 @@ <!-- 操作按钮 --> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -109,7 +109,7 @@ import * as UserGroupApi from '@/api/bpm/userGroup' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formData = ref({ type: Number(undefined), @@ -171,7 +171,7 @@ const open = async (modelId: string, row: TaskAssignRuleApi.TaskAssignVO) => { formData.value.scripts.push(...row.options) } // 打开弹窗 - modelVisible.value = true + dialogVisible.value = true // 获得角色列表 roleOptions.value = await RoleApi.getSimpleRoleList() @@ -232,7 +232,7 @@ const submitForm = async () => { await TaskAssignRuleApi.updateTaskAssignRule(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue b/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue index d046a521..4746b0c7 100644 --- a/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue +++ b/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="详情" v-model="modelVisible" :scroll="true" :max-height="500" width="800"> + <Dialog title="详情" v-model="dialogVisible" :scroll="true" :max-height="500" width="800"> <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 ApiAccessLog from '@/api/infra/apiAccessLog' -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const detailLoading = ref(false) // 表单地加载中 const detailData = ref() // 详情数据 /** 打开弹窗 */ const open = async (data: ApiAccessLog.ApiAccessLogVO) => { - modelVisible.value = true + dialogVisible.value = true // 设置数据 detailLoading.value = true try { diff --git a/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue b/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue index 5076fe00..4b279924 100644 --- a/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue +++ b/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="详情" v-model="modelVisible" :scroll="true" :max-height="500" width="800"> + <Dialog title="详情" v-model="dialogVisible" :scroll="true" :max-height="500" width="800"> <el-descriptions border :column="1"> <el-descriptions-item label="日志主键" min-width="120"> {{ detailData.id }} @@ -60,13 +60,13 @@ import { DICT_TYPE } from '@/utils/dict' import { formatDate } from '@/utils/formatTime' import * as ApiErrorLog from '@/api/infra/apiErrorLog' -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const detailLoading = ref(false) // 表单的加载中 const detailData = ref() // 详情数据 /** 打开弹窗 */ const open = async (data: ApiErrorLog.ApiErrorLogVO) => { - modelVisible.value = true + dialogVisible.value = true // 设置数据 detailLoading.value = true try { diff --git a/src/views/infra/codegen/ImportTable.vue b/src/views/infra/codegen/ImportTable.vue index b89b2923..0146b6c3 100644 --- a/src/views/infra/codegen/ImportTable.vue +++ b/src/views/infra/codegen/ImportTable.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="导入表" v-model="modelVisible" width="800px"> + <Dialog title="导入表" v-model="dialogVisible" width="800px"> <!-- 搜索栏 --> <el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px"> <el-form-item label="数据源" prop="dataSourceConfigId"> @@ -69,7 +69,7 @@ import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig' import { ElTable } from 'element-plus' const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const dbTableLoading = ref(true) // 数据源的加载中 const dbTableList = ref<CodegenApi.DatabaseTableVO[]>([]) // 表的列表 const queryParams = reactive({ @@ -103,7 +103,7 @@ const open = async () => { // 加载数据源的列表 dataSourceConfigList.value = await DataSourceConfigApi.getDataSourceConfigList() queryParams.dataSourceConfigId = dataSourceConfigList.value[0].id as number - modelVisible.value = true + dialogVisible.value = true // 加载表的列表 await getList() } @@ -111,7 +111,7 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗 /** 关闭弹窗 */ const close = () => { - modelVisible.value = false + dialogVisible.value = false tableList.value = [] } diff --git a/src/views/infra/codegen/PreviewCode.vue b/src/views/infra/codegen/PreviewCode.vue index df521f5a..6a81499d 100644 --- a/src/views/infra/codegen/PreviewCode.vue +++ b/src/views/infra/codegen/PreviewCode.vue @@ -1,7 +1,7 @@ <template> <Dialog title="代码预览" - v-model="modelVisible" + v-model="dialogVisible" align-center width="80%" class="app-infra-codegen-preview-container" @@ -61,7 +61,7 @@ import * as CodegenApi from '@/api/infra/codegen' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const loading = ref(false) // 加载中的状态 const preview = reactive({ fileTree: [], // 文件树 @@ -86,7 +86,7 @@ interface filesType { /** 打开弹窗 */ const open = async (id: number) => { - modelVisible.value = true + dialogVisible.value = true try { loading.value = true // 生成代码 diff --git a/src/views/infra/config/form.vue b/src/views/infra/config/form.vue index 8d96b629..18ecfa3d 100644 --- a/src/views/infra/config/form.vue +++ b/src/views/infra/config/form.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -36,7 +36,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -47,8 +47,8 @@ import * as ConfigApi from '@/api/infra/config' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -71,8 +71,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const openModal = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -105,7 +105,7 @@ const submitForm = async () => { await ConfigApi.updateConfig(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/infra/config/index.vue b/src/views/infra/config/index.vue index 5fcafc07..cbbabc4f 100644 --- a/src/views/infra/config/index.vue +++ b/src/views/infra/config/index.vue @@ -55,7 +55,12 @@ <el-form-item> <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> - <el-button type="primary" @click="openModal('create')" v-hasPermi="['infra:config:create']"> + <el-button + type="primary" + plain + @click="openModal('create')" + v-hasPermi="['infra:config:create']" + > <Icon icon="ep:plus" class="mr-5px" /> 新增 </el-button> <el-button diff --git a/src/views/infra/dataSourceConfig/form.vue b/src/views/infra/dataSourceConfig/form.vue index cd79e24b..33f67c56 100644 --- a/src/views/infra/dataSourceConfig/form.vue +++ b/src/views/infra/dataSourceConfig/form.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -22,7 +22,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -32,8 +32,8 @@ import * as DataSourceConfigApi from '@/api/infra/dataSourceConfig' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref<DataSourceConfigApi.DataSourceConfigVO>({ @@ -53,8 +53,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const openModal = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -87,7 +87,7 @@ const submitForm = async () => { await DataSourceConfigApi.updateDataSourceConfig(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/infra/dataSourceConfig/index.vue b/src/views/infra/dataSourceConfig/index.vue index ab3523e7..3b5eddba 100644 --- a/src/views/infra/dataSourceConfig/index.vue +++ b/src/views/infra/dataSourceConfig/index.vue @@ -5,6 +5,7 @@ <el-form-item> <el-button type="primary" + plain @click="openModal('create')" v-hasPermi="['infra:data-source-config:create']" > diff --git a/src/views/infra/file/form.vue b/src/views/infra/file/form.vue index b0a76e0e..56dbf25f 100644 --- a/src/views/infra/file/form.vue +++ b/src/views/infra/file/form.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-upload ref="uploadRef" :limit="1" @@ -24,7 +24,7 @@ </el-upload> <template #footer> <el-button @click="submitFileForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -36,8 +36,8 @@ import { getAccessToken } from '@/utils/auth' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const url = import.meta.env.VITE_UPLOAD_URL const headers = { Authorization: 'Bearer ' + getAccessToken() } @@ -46,8 +46,8 @@ const uploadRef = ref() /** 打开弹窗 */ const openModal = async () => { - modelVisible.value = true - modelTitle.value = t('action.fileUpload') + dialogVisible.value = true + dialogTitle.value = t('action.fileUpload') } defineExpose({ openModal }) // 提供 openModal 方法,用于打开弹窗 @@ -71,7 +71,7 @@ const submitFileForm = () => { /** 文件上传成功处理 */ const handleFileSuccess = () => { // 清理 - modelVisible.value = false + dialogVisible.value = false formLoading.value = false unref(uploadRef)?.clearFiles() // 提示成功,并刷新 diff --git a/src/views/infra/fileConfig/form.vue b/src/views/infra/fileConfig/form.vue index f08ba4c4..740d29ed 100644 --- a/src/views/infra/fileConfig/form.vue +++ b/src/views/infra/fileConfig/form.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -94,7 +94,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -105,8 +105,8 @@ import * as FileConfigApi from '@/api/infra/fileConfig' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -137,8 +137,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const openModal = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -171,7 +171,7 @@ const submitForm = async () => { await FileConfigApi.updateFileConfig(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/infra/fileConfig/index.vue b/src/views/infra/fileConfig/index.vue index ca0fac15..245b7f5c 100644 --- a/src/views/infra/fileConfig/index.vue +++ b/src/views/infra/fileConfig/index.vue @@ -35,6 +35,7 @@ <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> <el-button type="primary" + plain @click="openModal('create')" v-hasPermi="['infra:file-config:create']" > diff --git a/src/views/infra/job/JobDetail.vue b/src/views/infra/job/JobDetail.vue index 081c50de..18e4235b 100644 --- a/src/views/infra/job/JobDetail.vue +++ b/src/views/infra/job/JobDetail.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="任务详细" v-model="modelVisible" width="700px"> + <Dialog title="任务详细" v-model="dialogVisible" width="700px"> <el-descriptions border :column="1"> <el-descriptions-item label="任务编号" min-width="60"> {{ detailData.id }} @@ -47,14 +47,14 @@ import { DICT_TYPE } from '@/utils/dict' import { formatDate } from '@/utils/formatTime' import * as JobApi from '@/api/infra/job' -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const detailLoading = ref(false) // 表单的加载中 const detailData = ref({}) // 详情数据 const nextTimes = ref([]) // 下一轮执行时间的数组 /** 打开弹窗 */ const open = async (id: number) => { - modelVisible.value = true + dialogVisible.value = true // 查看,设置数据 if (id) { detailLoading.value = true diff --git a/src/views/infra/job/JobForm.vue b/src/views/infra/job/JobForm.vue index 5148d181..9c03bd1c 100644 --- a/src/views/infra/job/JobForm.vue +++ b/src/views/infra/job/JobForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -41,7 +41,7 @@ </el-form> <template #footer> <el-button type="primary" @click="submitForm" :loading="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -50,8 +50,8 @@ import * as JobApi from '@/api/infra/job' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -72,8 +72,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -106,7 +106,7 @@ const submitForm = async () => { await JobApi.updateJob(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/infra/job/logger/JobLogDetail.vue b/src/views/infra/job/logger/JobLogDetail.vue index 7c4bab2b..3b8795d9 100644 --- a/src/views/infra/job/logger/JobLogDetail.vue +++ b/src/views/infra/job/logger/JobLogDetail.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="任务详细" v-model="modelVisible" width="700px"> + <Dialog title="任务详细" v-model="dialogVisible" width="700px"> <el-descriptions border :column="1"> <el-descriptions-item label="日志编号" min-width="60"> {{ detailData.id }} @@ -36,13 +36,13 @@ import { DICT_TYPE } from '@/utils/dict' import { formatDate } from '@/utils/formatTime' import * as JobLogApi from '@/api/infra/jobLog' -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const detailLoading = ref(false) // 表单的加载中 const detailData = ref({}) // 详情数据 /** 打开弹窗 */ const open = async (id: number) => { - modelVisible.value = true + dialogVisible.value = true // 查看,设置数据 if (id) { detailLoading.value = true diff --git a/src/views/mall/product/category/CategoryForm.vue b/src/views/mall/product/category/CategoryForm.vue index b3e68001..db395a66 100644 --- a/src/views/mall/product/category/CategoryForm.vue +++ b/src/views/mall/product/category/CategoryForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -46,7 +46,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -58,8 +58,8 @@ import * as ProductCategoryApi from '@/api/mall/product/category' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -81,8 +81,8 @@ const categoryTree = ref<any[]>([]) // 分类树 /** 打开弹窗 */ const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -117,7 +117,7 @@ const submitForm = async () => { await ProductCategoryApi.updateCategory(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/mall/product/property/PropertyForm.vue b/src/views/mall/product/property/PropertyForm.vue index 393d00ef..c9a21d64 100644 --- a/src/views/mall/product/property/PropertyForm.vue +++ b/src/views/mall/product/property/PropertyForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -17,7 +17,7 @@ <template #footer> <div class="dialog-footer"> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </div> </template> </Dialog> @@ -27,8 +27,8 @@ import * as PropertyApi from '@/api/mall/product/property' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -42,8 +42,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -76,7 +76,7 @@ const submitForm = async () => { await PropertyApi.updateProperty(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/mall/product/property/index.vue b/src/views/mall/product/property/index.vue index ea992923..6c2e6e97 100644 --- a/src/views/mall/product/property/index.vue +++ b/src/views/mall/product/property/index.vue @@ -110,7 +110,7 @@ const queryParams = reactive({ }) const queryFormRef = ref() // 搜索的表单 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/mall/product/property/value/ValueForm.vue b/src/views/mall/product/property/value/ValueForm.vue index e113825a..3f6a5225 100644 --- a/src/views/mall/product/property/value/ValueForm.vue +++ b/src/views/mall/product/property/value/ValueForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -19,7 +19,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -28,8 +28,8 @@ import * as PropertyApi from '@/api/mall/product/property' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -46,8 +46,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const open = async (type: string, propertyId: number, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() formData.value.propertyId = propertyId @@ -81,7 +81,7 @@ const submitForm = async () => { await PropertyApi.updatePropertyValue(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/mall/product/property/value/index.vue b/src/views/mall/product/property/value/index.vue index 85383e63..6f5ae5c8 100644 --- a/src/views/mall/product/property/value/index.vue +++ b/src/views/mall/product/property/value/index.vue @@ -108,7 +108,7 @@ const queryParams = reactive({ const queryFormRef = ref() // 搜索的表单 const propertyOptions = ref([]) // 属性项的列表 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/mp/account/AccountForm.vue b/src/views/mp/account/AccountForm.vue index 406db8fe..a80bb48f 100644 --- a/src/views/mp/account/AccountForm.vue +++ b/src/views/mp/account/AccountForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -64,7 +64,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -73,8 +73,8 @@ import * as AccountApi from '@/api/mp/account' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -98,8 +98,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -132,7 +132,7 @@ const submitForm = async () => { await AccountApi.updateAccount(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/mp/tag/TagForm.vue b/src/views/mp/tag/TagForm.vue index db251cdf..e190af89 100644 --- a/src/views/mp/tag/TagForm.vue +++ b/src/views/mp/tag/TagForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -13,7 +13,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -22,8 +22,8 @@ import * as MpTagApi from '@/api/mp/tag' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -37,8 +37,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const open = async (type: string, accountId: number, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() formData.value.accountId = accountId @@ -72,7 +72,7 @@ const submitForm = async () => { await MpTagApi.updateTag(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/pay/merchant/MerchantForm.vue b/src/views/pay/merchant/MerchantForm.vue index 1e09fb8c..34dea00a 100644 --- a/src/views/pay/merchant/MerchantForm.vue +++ b/src/views/pay/merchant/MerchantForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px"> <el-form-item label="商户全称" prop="name"> <el-input v-model="formData.name" placeholder="请输入商户全称" /> @@ -23,7 +23,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -34,8 +34,8 @@ import { CommonStatusEnum } from '@/utils/constants' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -54,8 +54,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -88,7 +88,7 @@ const submitForm = async () => { await MerchantApi.updateMerchant(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/area/form.vue b/src/views/system/area/form.vue index f0cff434..8e1604e5 100644 --- a/src/views/system/area/form.vue +++ b/src/views/system/area/form.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="IP 查询" v-model="modelVisible"> + <Dialog title="IP 查询" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -16,7 +16,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -24,7 +24,7 @@ import * as AreaApi from '@/api/system/area' const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:提交的按钮禁用 const formData = ref({ ip: '', @@ -37,7 +37,7 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const openModal = async () => { - modelVisible.value = true + dialogVisible.value = true resetForm() } defineExpose({ openModal }) // 提供 openModal 方法,用于打开弹窗 diff --git a/src/views/system/area/index.vue b/src/views/system/area/index.vue index f9d4c57d..d84c769f 100644 --- a/src/views/system/area/index.vue +++ b/src/views/system/area/index.vue @@ -1,7 +1,7 @@ <template> <!-- 操作栏 --> <content-wrap> - <el-button type="primary" @click="openModal()"> + <el-button type="primary" plain @click="openModal()"> <Icon icon="ep:plus" class="mr-5px" /> IP 查询 </el-button> </content-wrap> diff --git a/src/views/system/dept/DeptForm.vue b/src/views/system/dept/DeptForm.vue index f2c3bc02..21985416 100644 --- a/src/views/system/dept/DeptForm.vue +++ b/src/views/system/dept/DeptForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -58,7 +58,7 @@ </el-form> <template #footer> <el-button type="primary" @click="submitForm">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -71,8 +71,8 @@ import { CommonStatusEnum } from '@/utils/constants' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -101,8 +101,8 @@ const userList = ref<UserApi.UserVO[]>([]) // 用户列表 /** 打开弹窗 */ const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -139,7 +139,7 @@ const submitForm = async () => { await DeptApi.updateDeptApi(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 20f19013..7a1db4b4 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -51,13 +51,7 @@ <!-- 列表 --> <ContentWrap> - <el-table - v-loading="loading" - :data="list" - row-key="id" - default-expand-all - v-if="refreshTable" - > + <el-table v-loading="loading" :data="list" row-key="id" default-expand-all v-if="refreshTable"> <el-table-column prop="name" label="部门名称" width="260" /> <el-table-column prop="leader" label="负责人" width="120"> <template #default="scope"> diff --git a/src/views/system/dict/data.form.vue b/src/views/system/dict/data.form.vue index 9271e8a9..4eefc4db 100644 --- a/src/views/system/dict/data.form.vue +++ b/src/views/system/dict/data.form.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -52,7 +52,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -63,8 +63,8 @@ import { CommonStatusEnum } from '@/utils/constants' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -115,8 +115,8 @@ const colorTypeOptions = readonly([ /** 打开弹窗 */ const openModal = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -149,7 +149,7 @@ const submitForm = async () => { await DictDataApi.updateDictData(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/dict/data.vue b/src/views/system/dict/data.vue index 41bcbaa8..fbb651ff 100644 --- a/src/views/system/dict/data.vue +++ b/src/views/system/dict/data.vue @@ -180,7 +180,7 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true - const data = await DictDataApi.exportDictDataApi(queryParams) + const data = await DictDataApi.exportDictData(queryParams) download.excel(data, '字典数据.xls') } catch { } finally { diff --git a/src/views/system/dict/form.vue b/src/views/system/dict/form.vue index 179656de..793186ad 100644 --- a/src/views/system/dict/form.vue +++ b/src/views/system/dict/form.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -34,7 +34,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -46,8 +46,8 @@ import { CommonStatusEnum } from '@/utils/constants' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -65,8 +65,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const openModal = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -99,7 +99,7 @@ const submitForm = async () => { await DictTypeApi.updateDictType(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 4e304bf5..43e3a0bf 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -41,7 +41,6 @@ v-model="queryParams.createTime" value-format="yyyy-MM-dd HH:mm:ss" type="daterange" - range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" @@ -51,7 +50,12 @@ <el-form-item> <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> - <el-button type="primary" @click="openModal('create')" v-hasPermi="['system:dict:create']"> + <el-button + type="primary" + plain + @click="openModal('create')" + v-hasPermi="['system:dict:create']" + > <Icon icon="ep:plus" class="mr-5px" /> 新增 </el-button> <el-button diff --git a/src/views/system/errorCode/form.vue b/src/views/system/errorCode/form.vue index f261ced1..3629168c 100644 --- a/src/views/system/errorCode/form.vue +++ b/src/views/system/errorCode/form.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -22,7 +22,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -32,8 +32,8 @@ import * as ErrorCodeApi from '@/api/system/errorCode' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 // 表单参数 @@ -54,8 +54,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const openModal = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -88,7 +88,7 @@ const submitForm = async () => { await ErrorCodeApi.updateErrorCodeApi(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/errorCode/index.vue b/src/views/system/errorCode/index.vue index e94b00f0..f3105d3a 100644 --- a/src/views/system/errorCode/index.vue +++ b/src/views/system/errorCode/index.vue @@ -61,6 +61,7 @@ <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> <el-button type="primary" + plain @click="openModal('create')" v-hasPermi="['system:error-code:create']" > diff --git a/src/views/system/loginlog/LoginLogDetail.vue b/src/views/system/loginlog/LoginLogDetail.vue index f0890eca..3a8157ce 100644 --- a/src/views/system/loginlog/LoginLogDetail.vue +++ b/src/views/system/loginlog/LoginLogDetail.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="详情" v-model="modelVisible" width="800"> + <Dialog title="详情" v-model="dialogVisible" width="800"> <el-descriptions border :column="1"> <el-descriptions-item label="日志编号" min-width="120"> {{ detailData.id }} @@ -30,13 +30,13 @@ import { DICT_TYPE } from '@/utils/dict' import { formatDate } from '@/utils/formatTime' import * as LoginLogApi from '@/api/system/loginLog' -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const detailLoading = ref(false) // 表单的加载中 const detailData = ref() // 详情数据 /** 打开弹窗 */ const open = async (data: LoginLogApi.LoginLogVO) => { - modelVisible.value = true + dialogVisible.value = true // 设置数据 detailLoading.value = true try { diff --git a/src/views/system/mail/account/form.vue b/src/views/system/mail/account/form.vue index 78d7cf0d..3747d17f 100644 --- a/src/views/system/mail/account/form.vue +++ b/src/views/system/mail/account/form.vue @@ -1,9 +1,9 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <Form ref="formRef" :schema="allSchemas.formSchema" :rules="rules" v-loading="formLoading" /> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -14,16 +14,16 @@ import { rules, allSchemas } from './account.data' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formRef = ref() // 表单 Ref /** 打开弹窗 */ const openModal = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type // 修改时,设置数据 if (id) { @@ -56,7 +56,7 @@ const submitForm = async () => { await MailAccountApi.updateMailAccount(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/mail/account/index.vue b/src/views/system/mail/account/index.vue index 1f80684f..24d06c5f 100644 --- a/src/views/system/mail/account/index.vue +++ b/src/views/system/mail/account/index.vue @@ -6,6 +6,7 @@ <template #actionMore> <el-button type="primary" + plain @click="openModal('create')" v-hasPermi="['system:mail-account:create']" > diff --git a/src/views/system/mail/log/detail.vue b/src/views/system/mail/log/detail.vue index 1795f751..eaf8cf84 100644 --- a/src/views/system/mail/log/detail.vue +++ b/src/views/system/mail/log/detail.vue @@ -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"> <Descriptions :schema="allSchemas.detailSchema" :data="detailData"> <!-- 展示 HTML 内容 --> <template #templateContent="{ row }"> @@ -12,13 +12,13 @@ import * as MailLogApi from '@/api/system/mail/log' import { allSchemas } from './log.data' -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const detailLoading = ref(false) // 表单的加载中 const detailData = ref() // 详情数据 /** 打开弹窗 */ const openModal = async (id: number) => { - modelVisible.value = true + dialogVisible.value = true // 设置数据 detailLoading.value = true try { diff --git a/src/views/system/mail/template/form.vue b/src/views/system/mail/template/form.vue index 92f3c5c1..f1b8f9a2 100644 --- a/src/views/system/mail/template/form.vue +++ b/src/views/system/mail/template/form.vue @@ -1,9 +1,9 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible" :scroll="true" :width="800" :max-height="500"> + <Dialog :title="dialogTitle" v-model="dialogVisible" :scroll="true" :width="800" :max-height="500"> <Form ref="formRef" :schema="allSchemas.formSchema" :rules="rules" v-loading="formLoading" /> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -14,16 +14,16 @@ import { rules, allSchemas } from './template.data' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formRef = ref() // 表单 Ref /** 打开弹窗 */ const openModal = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type // 修改时,设置数据 if (id) { @@ -56,7 +56,7 @@ const submitForm = async () => { await MailTemplateApi.updateMailTemplate(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/mail/template/index.vue b/src/views/system/mail/template/index.vue index b9a5040b..51531c62 100644 --- a/src/views/system/mail/template/index.vue +++ b/src/views/system/mail/template/index.vue @@ -6,6 +6,7 @@ <template #actionMore> <el-button type="primary" + plain @click="openModal('create')" v-hasPermi="['system:mail-account:create']" > diff --git a/src/views/system/mail/template/send.vue b/src/views/system/mail/template/send.vue index b4b411b9..19a1c23d 100644 --- a/src/views/system/mail/template/send.vue +++ b/src/views/system/mail/template/send.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="测试" v-model="modelVisible"> + <Dialog title="测试" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -27,7 +27,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -36,7 +36,7 @@ import * as MailTemplateApi from '@/api/system/mail/template' const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formData = ref({ content: '', @@ -54,7 +54,7 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const openModal = async (id: number) => { - modelVisible.value = true + dialogVisible.value = true resetForm() // 设置数据 formLoading.value = true @@ -92,7 +92,7 @@ const submitForm = async () => { if (logId) { message.success('提交发送成功!发送结果,见发送日志编号:' + logId) } - modelVisible.value = false + dialogVisible.value = false } finally { formLoading.value = false } diff --git a/src/views/system/menu/MenuForm.vue b/src/views/system/menu/MenuForm.vue index 45bcedfb..1c6f2caf 100644 --- a/src/views/system/menu/MenuForm.vue +++ b/src/views/system/menu/MenuForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -108,7 +108,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -122,8 +122,8 @@ const { wsCache } = useCache() const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -152,8 +152,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const open = async (type: string, id?: number, parentId?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() if (parentId) { @@ -205,7 +205,7 @@ const submitForm = async () => { await MenuApi.updateMenu(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/notice/form.vue b/src/views/system/notice/form.vue index 87e75623..92f99dc9 100644 --- a/src/views/system/notice/form.vue +++ b/src/views/system/notice/form.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible" width="800"> + <Dialog :title="dialogTitle" v-model="dialogVisible" width="800"> <el-form ref="formRef" :model="formData" @@ -39,7 +39,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -49,8 +49,8 @@ import * as NoticeApi from '@/api/system/notice' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -71,8 +71,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const openModal = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -105,7 +105,7 @@ const submitForm = async () => { await NoticeApi.updateNotice(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue index 340eeaa4..d76bd520 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -37,6 +37,7 @@ <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> <el-button type="primary" + plain @click="openModal('create')" v-hasPermi="['system:notice:create']" > @@ -127,7 +128,6 @@ const getList = async () => { loading.value = true try { const data = await NoticeApi.getNoticePage(queryParams) - list.value = data.list total.value = data.total } finally { diff --git a/src/views/system/notify/message/NotifyMessageDetail.vue b/src/views/system/notify/message/NotifyMessageDetail.vue index 283575bb..0a29ebb1 100644 --- a/src/views/system/notify/message/NotifyMessageDetail.vue +++ b/src/views/system/notify/message/NotifyMessageDetail.vue @@ -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 { diff --git a/src/views/system/notify/my/MyNotifyMessageDetail.vue b/src/views/system/notify/my/MyNotifyMessageDetail.vue index 45af259d..bcad4711 100644 --- a/src/views/system/notify/my/MyNotifyMessageDetail.vue +++ b/src/views/system/notify/my/MyNotifyMessageDetail.vue @@ -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 { diff --git a/src/views/system/notify/template/index.vue b/src/views/system/notify/template/index.vue index c4113924..de14d5ca 100644 --- a/src/views/system/notify/template/index.vue +++ b/src/views/system/notify/template/index.vue @@ -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 // 刷新列表 diff --git a/src/views/system/oauth2/client/ClientForm.vue b/src/views/system/oauth2/client/ClientForm.vue index 2e2281f5..b5936c37 100644 --- a/src/views/system/oauth2/client/ClientForm.vue +++ b/src/views/system/oauth2/client/ClientForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible" scroll max-height="500px"> + <Dialog :title="dialogTitle" v-model="dialogVisible" scroll max-height="500px"> <el-form ref="formRef" :model="formData" @@ -139,7 +139,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -150,8 +150,8 @@ import * as ClientApi from '@/api/system/oauth2/client' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -191,8 +191,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -225,7 +225,7 @@ const submitForm = async () => { await ClientApi.updateOAuth2Client(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/oauth2/client/index.vue b/src/views/system/oauth2/client/index.vue index fa04e6d3..eab58726 100644 --- a/src/views/system/oauth2/client/index.vue +++ b/src/views/system/oauth2/client/index.vue @@ -135,7 +135,7 @@ const queryParams = reactive({ }) const queryFormRef = ref() // 搜索的表单 -/** 查询参数列表 */ +/** 查询列表 */ const getList = async () => { loading.value = true try { diff --git a/src/views/system/operatelog/detail.vue b/src/views/system/operatelog/detail.vue index b3603e2e..cbf22dea 100644 --- a/src/views/system/operatelog/detail.vue +++ b/src/views/system/operatelog/detail.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="详情" v-model="modelVisible" :scroll="true" :max-height="500" width="800"> + <Dialog title="详情" v-model="dialogVisible" :scroll="true" :max-height="500" width="800"> <el-descriptions border :column="1"> <el-descriptions-item label="日志主键" min-width="120"> {{ detailData.id }} @@ -61,13 +61,13 @@ import { formatDate } from '@/utils/formatTime' import * as OperateLogApi from '@/api/system/operatelog' -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const detailLoading = ref(false) // 表单的加载中 const detailData = ref() // 详情数据 /** 打开弹窗 */ const openModal = async (data: OperateLogApi.OperateLogVO) => { - modelVisible.value = true + dialogVisible.value = true // 设置数据 detailLoading.value = true try { diff --git a/src/views/system/post/PostForm.vue b/src/views/system/post/PostForm.vue index a9dec8b0..70103906 100644 --- a/src/views/system/post/PostForm.vue +++ b/src/views/system/post/PostForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible" width="800"> + <Dialog :title="dialogTitle" v-model="dialogVisible" width="800"> <el-form ref="formRef" :model="formData" @@ -29,7 +29,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -41,8 +41,8 @@ import * as PostApi from '@/api/system/post' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -63,8 +63,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const openModal = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -97,7 +97,7 @@ const submitForm = async () => { await PostApi.updatePost(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue index 03e491d0..4d1d306c 100644 --- a/src/views/system/post/index.vue +++ b/src/views/system/post/index.vue @@ -39,6 +39,7 @@ <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> <el-button type="primary" + plain @click="openModal('create')" v-hasPermi="['system:notice:create']" > diff --git a/src/views/system/role/RoleAssignMenuForm.vue b/src/views/system/role/RoleAssignMenuForm.vue index db33811e..cc8e2708 100644 --- a/src/views/system/role/RoleAssignMenuForm.vue +++ b/src/views/system/role/RoleAssignMenuForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="菜单权限" v-model="modelVisible"> + <Dialog title="菜单权限" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" label-width="80px" v-loading="formLoading"> <el-form-item label="角色名称"> <el-tag>{{ formData.name }}</el-tag> @@ -40,7 +40,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -52,7 +52,7 @@ import * as PermissionApi from '@/api/system/permission' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formData = reactive({ id: 0, @@ -68,7 +68,7 @@ const treeNodeAll = ref(false) // 全选/全不选 /** 打开弹窗 */ const open = async (row: RoleApi.RoleVO) => { - modelVisible.value = true + dialogVisible.value = true resetForm() // 加载 Menu 列表。注意,必须放在前面,不然下面 setChecked 没数据节点 menuOptions.value = handleTree(await MenuApi.getSimpleMenusList()) @@ -107,7 +107,7 @@ const submitForm = async () => { } await PermissionApi.assignRoleMenu(data) message.success(t('common.updateSuccess')) - modelVisible.value = false + dialogVisible.value = false } finally { formLoading.value = false } diff --git a/src/views/system/role/RoleDataPermissionForm.vue b/src/views/system/role/RoleDataPermissionForm.vue index 9a331b6a..6b017278 100644 --- a/src/views/system/role/RoleDataPermissionForm.vue +++ b/src/views/system/role/RoleDataPermissionForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="菜单权限" v-model="modelVisible" width="800"> + <Dialog title="菜单权限" v-model="dialogVisible" width="800"> <el-form ref="formRef" :model="formData" label-width="80px" v-loading="formLoading"> <el-form-item label="角色名称"> <el-tag>{{ formData.name }}</el-tag> @@ -58,7 +58,7 @@ </el-form-item> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -72,7 +72,7 @@ import * as PermissionApi from '@/api/system/permission' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formData = reactive({ id: 0, @@ -90,7 +90,7 @@ const checkStrictly = ref(true) // 是否严格模式,即父子不关联 /** 打开弹窗 */ const open = async (row: RoleApi.RoleVO) => { - modelVisible.value = true + dialogVisible.value = true resetForm() // 加载 Dept 列表。注意,必须放在前面,不然下面 setChecked 没数据节点 deptOptions.value = handleTree(await DeptApi.getSimpleDeptList()) @@ -119,7 +119,7 @@ const submitForm = async () => { } await PermissionApi.assignRoleDataScope(data) message.success(t('common.updateSuccess')) - modelVisible.value = false + dialogVisible.value = false } finally { formLoading.value = false } diff --git a/src/views/system/role/RoleForm.vue b/src/views/system/role/RoleForm.vue index e6444a03..daae020e 100644 --- a/src/views/system/role/RoleForm.vue +++ b/src/views/system/role/RoleForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -32,7 +32,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -43,8 +43,8 @@ import * as RoleApi from '@/api/system/role' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -66,8 +66,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -113,7 +113,7 @@ const submitForm = async () => { await RoleApi.updateRole(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/sensitiveWord/SensitiveWordForm.vue b/src/views/system/sensitiveWord/SensitiveWordForm.vue index c069756b..aebaf6de 100644 --- a/src/views/system/sensitiveWord/SensitiveWordForm.vue +++ b/src/views/system/sensitiveWord/SensitiveWordForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -39,7 +39,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -50,8 +50,8 @@ import { CommonStatusEnum } from '@/utils/constants' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -70,8 +70,8 @@ const tagList = ref([]) // 标签数组 /** 打开弹窗 */ const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -106,7 +106,7 @@ const submitForm = async () => { await SensitiveWordApi.updateSensitiveWord(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/sensitiveWord/SensitiveWordTestForm.vue b/src/views/system/sensitiveWord/SensitiveWordTestForm.vue index 881309c8..80308033 100644 --- a/src/views/system/sensitiveWord/SensitiveWordTestForm.vue +++ b/src/views/system/sensitiveWord/SensitiveWordTestForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="检测敏感词" v-model="modelVisible"> + <Dialog title="检测敏感词" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -24,10 +24,8 @@ </el-form-item> </el-form> <template #footer> - <div class="dialog-footer"> - <el-button @click="submitForm" type="primary" :disabled="formLoading">检 测</el-button> - <el-button @click="modelVisible = false">取 消</el-button> - </div> + <el-button @click="submitForm" type="primary" :disabled="formLoading">检 测</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -35,7 +33,7 @@ import * as SensitiveWordApi from '@/api/system/sensitiveWord' const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formData = ref({ text: '', @@ -50,7 +48,7 @@ const tagList = ref([]) // 标签数组 /** 打开弹窗 */ const open = async () => { - modelVisible.value = true + dialogVisible.value = true resetForm() // 获得 Tag 标签列表 tagList.value = await SensitiveWordApi.getSensitiveWordTagList() @@ -73,7 +71,7 @@ const submitForm = async () => { return } message.warning('包含敏感词:' + data.join(', ')) - modelVisible.value = false + dialogVisible.value = false } finally { formLoading.value = false } diff --git a/src/views/system/sms/channel/SmsChannelForm.vue b/src/views/system/sms/channel/SmsChannelForm.vue index 3145af91..cd491112 100644 --- a/src/views/system/sms/channel/SmsChannelForm.vue +++ b/src/views/system/sms/channel/SmsChannelForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -46,7 +46,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -57,8 +57,8 @@ import { CommonStatusEnum } from '@/utils/constants' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -81,8 +81,8 @@ const formRef = ref() // 表单 Ref /** 打开弹窗 */ const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -116,7 +116,7 @@ const submitForm = async () => { await SmsChannelApi.updateSmsChannel(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/sms/channel/index.vue b/src/views/system/sms/channel/index.vue index 62cd7cc2..2eb48f02 100644 --- a/src/views/system/sms/channel/index.vue +++ b/src/views/system/sms/channel/index.vue @@ -40,6 +40,7 @@ <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> <el-button type="primary" + plain @click="openForm('create')" v-hasPermi="['system:sms-channel:create']" > diff --git a/src/views/system/sms/log/SmsLogDetail.vue b/src/views/system/sms/log/SmsLogDetail.vue index 736d0b8e..8a368b3e 100644 --- a/src/views/system/sms/log/SmsLogDetail.vue +++ b/src/views/system/sms/log/SmsLogDetail.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="详情" v-model="modelVisible" :scroll="true" :max-height="500" width="800"> + <Dialog title="详情" v-model="dialogVisible" :scroll="true" :max-height="500" width="800"> <el-descriptions border :column="1"> <el-descriptions-item label="日志主键" min-width="120"> {{ detailData.id }} @@ -65,14 +65,14 @@ import { formatDate } from '@/utils/formatTime' import * as SmsLogApi from '@/api/system/sms/smsLog' import * as SmsChannelApi from '@/api/system/sms/smsChannel' -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const detailLoading = ref(false) // 表单的加载中 const detailData = ref() // 详情数据 const channelList = ref([]) // 短信渠道列表 /** 打开弹窗 */ const open = async (data: SmsLogApi.SmsLogVO) => { - modelVisible.value = true + dialogVisible.value = true // 设置数据 detailLoading.value = true try { diff --git a/src/views/system/sms/template/SmsTemplateForm.vue b/src/views/system/sms/template/SmsTemplateForm.vue index 03684215..22de060a 100644 --- a/src/views/system/sms/template/SmsTemplateForm.vue +++ b/src/views/system/sms/template/SmsTemplateForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -59,7 +59,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -71,8 +71,8 @@ import { CommonStatusEnum } from '@/utils/constants' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型 const formData = ref<SmsTemplateApi.SmsTemplateVO>({ @@ -99,8 +99,8 @@ const formRef = ref() // 表单 Ref const channelList = ref<SmsChannelApi.SmsChannelVO[]>([]) // 短信渠道列表 const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -134,7 +134,7 @@ const submitForm = async () => { await SmsTemplateApi.updateSmsTemplate(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/sms/template/SmsTemplateSendForm.vue b/src/views/system/sms/template/SmsTemplateSendForm.vue index f2ecbe9f..2da0e3f6 100644 --- a/src/views/system/sms/template/SmsTemplateSendForm.vue +++ b/src/views/system/sms/template/SmsTemplateSendForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="测试" v-model="modelVisible"> + <Dialog title="测试" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -32,7 +32,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -40,7 +40,7 @@ import * as SmsTemplateApi from '@/api/system/sms/smsTemplate' const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 // 发送短信表单相关 @@ -59,7 +59,7 @@ const formRules = reactive({ const formRef = ref() // 表单 Ref const open = async (id: number) => { - modelVisible.value = true + dialogVisible.value = true resetForm() // 设置数据 formLoading.value = true @@ -97,7 +97,7 @@ const submitForm = async () => { if (logId) { message.success('提交发送成功!发送结果,见发送日志编号:' + logId) } - modelVisible.value = false + dialogVisible.value = false } finally { formLoading.value = false } diff --git a/src/views/system/tenant/form.vue b/src/views/system/tenant/form.vue index 4a6eaae4..ec19b487 100644 --- a/src/views/system/tenant/form.vue +++ b/src/views/system/tenant/form.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible" width="50%"> + <Dialog :title="dialogTitle" v-model="dialogVisible" width="50%"> <el-form ref="formRef" :model="formData" @@ -71,7 +71,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -83,8 +83,8 @@ import * as TenantPackageApi from '@/api/system/tenantPackage' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -112,8 +112,8 @@ const packageList = ref([]) // 租户套餐 /** 打开弹窗 */ const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -148,7 +148,7 @@ const submitForm = async () => { await TenantApi.updateTenant(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue index 1991fbea..ff65436b 100644 --- a/src/views/system/tenant/index.vue +++ b/src/views/system/tenant/index.vue @@ -71,7 +71,12 @@ <Icon icon="ep:refresh" class="mr-5px" /> 重置 </el-button> - <el-button type="primary" @click="openForm('create')" v-hasPermi="['system:tenant:create']"> + <el-button + type="primary" + plain + @click="openForm('create')" + v-hasPermi="['system:tenant:create']" + > <Icon icon="ep:plus" class="mr-5px" /> 新增 </el-button> diff --git a/src/views/system/tenantPackage/TenantPackageForm.vue b/src/views/system/tenantPackage/TenantPackageForm.vue index 6ba78e96..becbcaab 100644 --- a/src/views/system/tenantPackage/TenantPackageForm.vue +++ b/src/views/system/tenantPackage/TenantPackageForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -57,7 +57,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -71,8 +71,8 @@ import { ElTree } from 'element-plus' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -95,8 +95,8 @@ const treeNodeAll = ref(false) // 全选/全不选 /** 打开弹窗 */ const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 加载 Menu 列表。注意,必须放在前面,不然下面 setChecked 没数据节点 @@ -141,7 +141,7 @@ const submitForm = async () => { await TenantPackageApi.updateTenantPackage(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/tenantPackage/index.vue b/src/views/system/tenantPackage/index.vue index 7e99815d..b20c432e 100644 --- a/src/views/system/tenantPackage/index.vue +++ b/src/views/system/tenantPackage/index.vue @@ -42,6 +42,7 @@ <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> <el-button type="primary" + plain @click="openForm('create')" v-hasPermi="['system:tenant-package:create']" > @@ -63,11 +64,13 @@ </template> </el-table-column> <el-table-column label="备注" align="center" prop="remark" /> - <el-table-column label="创建时间" align="center" prop="createTime" width="180"> - <template #default="scope"> - <span>{{ formatDate(scope.row.createTime) }}</span> - </template> - </el-table-column> + <el-table-column + label="创建时间" + align="center" + prop="createTime" + width="180" + :formatter="dateFormatter" + /> <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <template #default="scope"> <el-button @@ -103,7 +106,7 @@ </template> <script setup lang="ts" name="TenantPackage"> import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' -import { formatDate } from '@/utils/formatTime' +import { dateFormatter } from '@/utils/formatTime' import * as TenantPackageApi from '@/api/system/tenantPackage' import TenantPackageForm from './TenantPackageForm.vue' const message = useMessage() // 消息弹窗 diff --git a/src/views/system/user/UserAssignRoleForm.vue b/src/views/system/user/UserAssignRoleForm.vue index 2dc04e52..e0259b7d 100644 --- a/src/views/system/user/UserAssignRoleForm.vue +++ b/src/views/system/user/UserAssignRoleForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="分配角色" v-model="modelVisible"> + <Dialog title="分配角色" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" label-width="80px" v-loading="formLoading"> <el-form-item label="用户名称"> <el-input v-model="formData.username" :disabled="true" /> @@ -15,7 +15,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -26,7 +26,7 @@ import * as RoleApi from '@/api/system/role' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formData = ref({ id: undefined, @@ -39,7 +39,7 @@ const roleList = ref([]) // 角色的列表 /** 打开弹窗 */ const open = async (row: UserApi.UserVO) => { - modelVisible.value = true + dialogVisible.value = true resetForm() // 设置数据 formData.value.id = row.id @@ -72,7 +72,7 @@ const submitForm = async () => { roleIds: formData.value.roleIds }) message.success(t('common.updateSuccess')) - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success', true) } finally { diff --git a/src/views/system/user/UserForm.vue b/src/views/system/user/UserForm.vue index ecf67fce..3afcbd1f 100644 --- a/src/views/system/user/UserForm.vue +++ b/src/views/system/user/UserForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog :title="modelTitle" v-model="modelVisible"> + <Dialog :title="dialogTitle" v-model="dialogVisible"> <el-form ref="formRef" :model="formData" @@ -91,7 +91,7 @@ </el-form> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -105,8 +105,8 @@ import * as UserApi from '@/api/system/user' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 -const modelTitle = ref('') // 弹窗的标题 +const dialogVisible = ref(false) // 弹窗的是否展示 +const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 const formData = ref({ @@ -148,8 +148,8 @@ const postList = ref([]) // 岗位列表 /** 打开弹窗 */ const open = async (type: string, id?: number) => { - modelVisible.value = true - modelTitle.value = t('action.' + type) + dialogVisible.value = true + dialogTitle.value = t('action.' + type) formType.value = type resetForm() // 修改时,设置数据 @@ -186,7 +186,7 @@ const submitForm = async () => { await UserApi.updateUser(data) message.success(t('common.updateSuccess')) } - modelVisible.value = false + dialogVisible.value = false // 发送操作成功的事件 emit('success') } finally { diff --git a/src/views/system/user/UserImportForm.vue b/src/views/system/user/UserImportForm.vue index 0e96bf29..f03345e9 100644 --- a/src/views/system/user/UserImportForm.vue +++ b/src/views/system/user/UserImportForm.vue @@ -1,5 +1,5 @@ <template> - <Dialog title="用户导入" v-model="modelVisible" width="400"> + <Dialog title="用户导入" v-model="dialogVisible" width="400"> <el-upload ref="uploadRef" :action="importUrl + '?updateSupport=' + updateSupport" @@ -35,7 +35,7 @@ </el-upload> <template #footer> <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> - <el-button @click="modelVisible = false">取 消</el-button> + <el-button @click="dialogVisible = false">取 消</el-button> </template> </Dialog> </template> @@ -45,7 +45,7 @@ import { getAccessToken, getTenantId } from '@/utils/auth' import download from '@/utils/download' const message = useMessage() // 消息弹窗 -const modelVisible = ref(false) // 弹窗的是否展示 +const dialogVisible = ref(false) // 弹窗的是否展示 const formLoading = ref(false) // 表单的加载中 const uploadRef = ref() const importUrl = @@ -56,7 +56,7 @@ const updateSupport = ref(0) // 是否更新已经存在的用户数据 /** 打开弹窗 */ const open = () => { - modelVisible.value = true + dialogVisible.value = true resetForm() } defineExpose({ open }) // 提供 open 方法,用于打开弹窗 diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index b0f7f964..c95c9fd7 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -70,11 +70,16 @@ > <Icon icon="ep:plus" /> 新增 </el-button> - <el-button type="info" plain @click="handleImport" v-hasPermi="['system:user:import']"> + <el-button + type="warning" + plain + @click="handleImport" + v-hasPermi="['system:user:import']" + > <Icon icon="ep:upload" /> 导入 </el-button> <el-button - type="warning" + type="success" plain @click="handleExport" :loading="exportLoading"