Skip to content

Commit 0d6ecfb

Browse files
committed
1. 统一删除 dialog-footer,包括代码生成的模版
2. 查询参数列表,改下 3. 简化 formatDate 4. 看看是不是有部分新增的 plain 不对 5. modelVisible 改成 dialogVisible?modelTitle 改成 dialogTitle
1 parent 87a5ddf commit 0d6ecfb

File tree

77 files changed

+363
-341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+363
-341
lines changed

src/api/system/dict/dict.data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ export const deleteDictData = (id: number) => {
4444
}
4545

4646
// 导出字典类型数据
47-
export const exportDictDataApi = (params) => {
47+
export const exportDictData = (params) => {
4848
return request.get({ url: '/system/dict-data/export', params })
4949
}

src/views/bpm/form/editor/index.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</ContentWrap>
1212

1313
<!-- 表单保存的弹窗 -->
14-
<Dialog title="保存表单" v-model="modelVisible" width="600">
14+
<Dialog title="保存表单" v-model="dialogVisible" width="600">
1515
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px">
1616
<el-form-item label="表单名" prop="name">
1717
<el-input v-model="formData.name" placeholder="请输入表单名" />
@@ -33,7 +33,7 @@
3333
</el-form>
3434
<template #footer>
3535
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
36-
<el-button @click="modelVisible = false">取 消</el-button>
36+
<el-button @click="dialogVisible = false">取 消</el-button>
3737
</template>
3838
</Dialog>
3939
</template>
@@ -48,7 +48,7 @@ const message = useMessage() // 消息
4848
const { query } = useRoute() // 路由
4949
5050
const designer = ref() // 表单设计器
51-
const modelVisible = ref(false) // 弹窗是否展示
51+
const dialogVisible = ref(false) // 弹窗是否展示
5252
const formLoading = ref(false) // 表单的加载中:提交的按钮禁用
5353
const formData = ref({
5454
name: '',
@@ -63,7 +63,7 @@ const formRef = ref() // 表单 Ref
6363
6464
/** 处理保存按钮 */
6565
const handleSave = () => {
66-
modelVisible.value = true
66+
dialogVisible.value = true
6767
}
6868
6969
/** 提交表单 */
@@ -85,7 +85,7 @@ const submitForm = async () => {
8585
await FormApi.updateForm(data)
8686
message.success(t('common.updateSuccess'))
8787
}
88-
modelVisible.value = false
88+
dialogVisible.value = false
8989
} finally {
9090
formLoading.value = false
9191
}

src/views/bpm/form/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<el-form-item>
2121
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
2222
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
23-
<el-button type="primary" @click="openForm()" v-hasPermi="['bpm:form:create']">
23+
<el-button type="primary" plain @click="openForm" v-hasPermi="['bpm:form:create']">
2424
<Icon icon="ep:plus" class="mr-5px" /> 新增
2525
</el-button>
2626
</el-form-item>

src/views/bpm/group/UserGroupForm.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<Dialog :title="modelTitle" v-model="modelVisible">
2+
<Dialog :title="dialogTitle" v-model="dialogVisible">
33
<el-form
44
ref="formRef"
55
:model="formData"
@@ -37,7 +37,7 @@
3737
</el-form>
3838
<template #footer>
3939
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
40-
<el-button @click="modelVisible = false">取 消</el-button>
40+
<el-button @click="dialogVisible = false">取 消</el-button>
4141
</template>
4242
</Dialog>
4343
</template>
@@ -50,8 +50,8 @@ import * as UserApi from '@/api/system/user'
5050
const { t } = useI18n() // 国际化
5151
const message = useMessage() // 消息弹窗
5252
53-
const modelVisible = ref(false) // 弹窗的是否展示
54-
const modelTitle = ref('') // 弹窗的标题
53+
const dialogVisible = ref(false) // 弹窗的是否展示
54+
const dialogTitle = ref('') // 弹窗的标题
5555
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
5656
const formType = ref('') // 表单的类型:create - 新增;update - 修改
5757
const formData = ref({
@@ -72,8 +72,8 @@ const userList = ref([]) // 用户列表
7272
7373
/** 打开弹窗 */
7474
const open = async (type: string, id?: number) => {
75-
modelVisible.value = true
76-
modelTitle.value = t('action.' + type)
75+
dialogVisible.value = true
76+
dialogTitle.value = t('action.' + type)
7777
formType.value = type
7878
resetForm()
7979
// 修改时,设置数据
@@ -108,7 +108,7 @@ const submitForm = async () => {
108108
await UserGroupApi.updateUserGroup(data)
109109
message.success(t('common.updateSuccess'))
110110
}
111-
modelVisible.value = false
111+
dialogVisible.value = false
112112
// 发送操作成功的事件
113113
emit('success')
114114
} finally {

src/views/bpm/group/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
4444
<el-button
4545
type="primary"
46+
plain
4647
@click="openForm('create')"
4748
v-hasPermi="['bpm:user-group:create']"
4849
>

src/views/bpm/model/ModelForm.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<Dialog :title="modelTitle" v-model="modelVisible" width="600">
2+
<Dialog :title="dialogTitle" v-model="dialogVisible" width="600">
33
<el-form
44
ref="formRef"
55
:model="formData"
@@ -117,7 +117,7 @@
117117
</el-form>
118118
<template #footer>
119119
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
120-
<el-button @click="modelVisible = false">取 消</el-button>
120+
<el-button @click="dialogVisible = false">取 消</el-button>
121121
</template>
122122
</Dialog>
123123
</template>
@@ -129,8 +129,8 @@ import * as FormApi from '@/api/bpm/form'
129129
const { t } = useI18n() // 国际化
130130
const message = useMessage() // 消息弹窗
131131
132-
const modelVisible = ref(false) // 弹窗的是否展示
133-
const modelTitle = ref('') // 弹窗的标题
132+
const dialogVisible = ref(false) // 弹窗的是否展示
133+
const dialogTitle = ref('') // 弹窗的标题
134134
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
135135
const formType = ref('') // 表单的类型:create - 新增;update - 修改
136136
const formData = ref({
@@ -154,8 +154,8 @@ const formList = ref([]) // 流程表单的下拉框的数据
154154
155155
/** 打开弹窗 */
156156
const open = async (type: string, id?: number) => {
157-
modelVisible.value = true
158-
modelTitle.value = t('action.' + type)
157+
dialogVisible.value = true
158+
dialogTitle.value = t('action.' + type)
159159
formType.value = type
160160
resetForm()
161161
// 修改时,设置数据
@@ -203,7 +203,7 @@ const submitForm = async () => {
203203
await ModelApi.updateModel(data)
204204
message.success(t('common.updateSuccess'))
205205
}
206-
modelVisible.value = false
206+
dialogVisible.value = false
207207
// 发送操作成功的事件
208208
emit('success')
209209
} finally {

src/views/bpm/model/ModelImportForm.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<Dialog title="导入流程" v-model="modelVisible" width="400">
2+
<Dialog title="导入流程" v-model="dialogVisible" width="400">
33
<div>
44
<el-upload
55
ref="uploadRef"
@@ -45,15 +45,15 @@
4545
</div>
4646
<template #footer>
4747
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
48-
<el-button @click="modelVisible = false">取 消</el-button>
48+
<el-button @click="dialogVisible = false">取 消</el-button>
4949
</template>
5050
</Dialog>
5151
</template>
5252
<script setup lang="ts">
5353
import { getAccessToken, getTenantId } from '@/utils/auth'
5454
const message = useMessage() // 消息弹窗
5555
56-
const modelVisible = ref(false) // 弹窗的是否展示
56+
const dialogVisible = ref(false) // 弹窗的是否展示
5757
const formLoading = ref(false) // 表单的加载中
5858
const formData = ref({
5959
key: '',
@@ -72,7 +72,7 @@ const fileList = ref([]) // 文件列表
7272
7373
/** 打开弹窗 */
7474
const open = async () => {
75-
modelVisible.value = true
75+
dialogVisible.value = true
7676
resetForm()
7777
}
7878
defineExpose({ open }) // 提供 open 方法,用于打开弹窗

src/views/bpm/processInstance/detail/TaskUpdateAssigneeForm.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<Dialog title="转派审批人" v-model="modelVisible" width="500">
2+
<Dialog title="转派审批人" v-model="dialogVisible" width="500">
33
<el-form
44
ref="formRef"
55
:model="formData"
@@ -20,15 +20,15 @@
2020
</el-form>
2121
<template #footer>
2222
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
23-
<el-button @click="modelVisible = false">取 消</el-button>
23+
<el-button @click="dialogVisible = false">取 消</el-button>
2424
</template>
2525
</Dialog>
2626
</template>
2727
<script setup lang="ts">
2828
import * as TaskApi from '@/api/bpm/task'
2929
import * as UserApi from '@/api/system/user'
3030
31-
const modelVisible = ref(false) // 弹窗的是否展示
31+
const dialogVisible = ref(false) // 弹窗的是否展示
3232
const formLoading = ref(false) // 表单的加载中
3333
const formData = ref({
3434
id: '',
@@ -43,7 +43,7 @@ const userList = ref<any[]>([]) // 用户列表
4343
4444
/** 打开弹窗 */
4545
const open = async (id: string) => {
46-
modelVisible.value = true
46+
dialogVisible.value = true
4747
resetForm()
4848
formData.value.id = id
4949
// 获得用户列表
@@ -62,7 +62,7 @@ const submitForm = async () => {
6262
formLoading.value = true
6363
try {
6464
await TaskApi.updateTaskAssignee(formData.value)
65-
modelVisible.value = false
65+
dialogVisible.value = false
6666
// 发送操作成功的事件
6767
emit('success')
6868
} finally {

src/views/bpm/taskAssignRule/TaskAssignRuleForm.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<Dialog title="修改任务规则" v-model="modelVisible" width="600">
2+
<Dialog title="修改任务规则" v-model="dialogVisible" width="600">
33
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px">
44
<el-form-item label="任务名称" prop="taskDefinitionName">
55
<el-input v-model="formData.taskDefinitionName" placeholder="请输入流标标识" disabled />
@@ -93,7 +93,7 @@
9393
<!-- 操作按钮 -->
9494
<template #footer>
9595
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
96-
<el-button @click="modelVisible = false">取 消</el-button>
96+
<el-button @click="dialogVisible = false">取 消</el-button>
9797
</template>
9898
</Dialog>
9999
</template>
@@ -109,7 +109,7 @@ import * as UserGroupApi from '@/api/bpm/userGroup'
109109
const { t } = useI18n() // 国际化
110110
const message = useMessage() // 消息弹窗
111111
112-
const modelVisible = ref(false) // 弹窗的是否展示
112+
const dialogVisible = ref(false) // 弹窗的是否展示
113113
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
114114
const formData = ref({
115115
type: Number(undefined),
@@ -171,7 +171,7 @@ const open = async (modelId: string, row: TaskAssignRuleApi.TaskAssignVO) => {
171171
formData.value.scripts.push(...row.options)
172172
}
173173
// 打开弹窗
174-
modelVisible.value = true
174+
dialogVisible.value = true
175175
176176
// 获得角色列表
177177
roleOptions.value = await RoleApi.getSimpleRoleList()
@@ -232,7 +232,7 @@ const submitForm = async () => {
232232
await TaskAssignRuleApi.updateTaskAssignRule(data)
233233
message.success(t('common.updateSuccess'))
234234
}
235-
modelVisible.value = false
235+
dialogVisible.value = false
236236
// 发送操作成功的事件
237237
emit('success')
238238
} finally {

src/views/infra/apiAccessLog/ApiAccessLogDetail.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<Dialog title="详情" v-model="modelVisible" :scroll="true" :max-height="500" width="800">
2+
<Dialog title="详情" v-model="dialogVisible" :scroll="true" :max-height="500" width="800">
33
<el-descriptions border :column="1">
44
<el-descriptions-item label="日志主键" min-width="120">
55
{{ detailData.id }}
@@ -45,13 +45,13 @@ import { DICT_TYPE } from '@/utils/dict'
4545
import { formatDate } from '@/utils/formatTime'
4646
import * as ApiAccessLog from '@/api/infra/apiAccessLog'
4747
48-
const modelVisible = ref(false) // 弹窗的是否展示
48+
const dialogVisible = ref(false) // 弹窗的是否展示
4949
const detailLoading = ref(false) // 表单地加载中
5050
const detailData = ref() // 详情数据
5151
5252
/** 打开弹窗 */
5353
const open = async (data: ApiAccessLog.ApiAccessLogVO) => {
54-
modelVisible.value = true
54+
dialogVisible.value = true
5555
// 设置数据
5656
detailLoading.value = true
5757
try {

0 commit comments

Comments
 (0)