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

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

View File

@@ -1,5 +1,5 @@
<template>
<Dialog :title="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 {

View File

@@ -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">