File tree Expand file tree Collapse file tree 3 files changed +9
-14
lines changed
views/infra/dataSourceConfig Expand file tree Collapse file tree 3 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,6 @@ export interface ConfigVO {
12
12
createTime : Date
13
13
}
14
14
15
- export interface ConfigExportReqVO {
16
- name ?: string
17
- key ?: string
18
- type ?: number
19
- createTime ?: Date [ ]
20
- }
21
-
22
15
// 查询参数列表
23
16
export const getConfigPage = ( params : PageParam ) => {
24
17
return request . get ( { url : '/infra/config/page' , params } )
@@ -50,6 +43,6 @@ export const deleteConfig = (id: number) => {
50
43
}
51
44
52
45
// 导出参数
53
- export const exportConfigApi = ( params : ConfigExportReqVO ) => {
46
+ export const exportConfigApi = ( params ) => {
54
47
return request . download ( { url : '/infra/config/export' , params } )
55
48
}
Original file line number Diff line number Diff line change 31
31
<script setup lang="ts">
32
32
import * as DataSourceConfigApi from ' @/api/infra/dataSourceConfig'
33
33
import { DataSourceConfigVO } from ' @/api/infra/dataSourceConfig'
34
- import { isNullOrUnDef } from ' @/utils/is'
35
- import { omit } from ' lodash-es'
36
34
37
35
const { t } = useI18n () // 国际化
38
36
const message = useMessage () // 消息弹窗
@@ -63,7 +61,7 @@ const openModal = async (type: string, id?: number) => {
63
61
formType .value = type
64
62
resetForm ()
65
63
// 修改时,设置数据
66
- if (! isNullOrUnDef ( id ) ) {
64
+ if (id ) {
67
65
formLoading .value = true
68
66
try {
69
67
formData .value = await DataSourceConfigApi .getDataSourceConfig (id )
@@ -84,7 +82,7 @@ const submitForm = async () => {
84
82
// 提交请求
85
83
formLoading .value = true
86
84
try {
87
- const data = omit ( unref ( formData ), ' createTime ' )
85
+ const data = formData . value as DataSourceConfigApi . DataSourceConfigVO
88
86
if (formType .value === ' create' ) {
89
87
await DataSourceConfigApi .createDataSourceConfig (data )
90
88
message .success (t (' common.createSuccess' ))
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<content-wrap >
3
3
<!-- 搜索工作栏 -->
4
- <el-form :inline = " true " label-width = " 68px " >
4
+ <el-form class = " -mb-15px " :inline = " true " >
5
5
<el-form-item >
6
6
<el-button
7
7
type =" primary"
12
12
</el-button >
13
13
</el-form-item >
14
14
</el-form >
15
+ </content-wrap >
15
16
16
- <!-- 列表 -->
17
+ <!-- 列表 -->
18
+ <content-wrap >
17
19
<el-table v-loading =" loading" :data =" list" align =" center" >
18
20
<el-table-column label =" 主键编号" align =" center" prop =" id" />
19
21
<el-table-column label =" 数据源名称" align =" center" prop =" name" />
33
35
type =" primary"
34
36
@click =" openModal('update', scope.row.id)"
35
37
v-hasPermi =" ['infra:data-source-config:update']"
38
+ :disabled =" scope.row.id === 0"
36
39
>
37
40
编辑
38
41
</el-button >
41
44
type =" danger"
42
45
@click =" handleDelete(scope.row.id)"
43
46
v-hasPermi =" ['infra:data-source-config:delete']"
47
+ :disabled =" scope.row.id === 0"
44
48
>
45
49
删除
46
50
</el-button >
You can’t perform that action at this time.
0 commit comments