36
36
/>
37
37
</el-select >
38
38
</el-form-item >
39
- <!-- TODO:时间无法设置 -->
39
+ <!-- TODO:时间无法设置 已解决 -->
40
40
<el-form-item label =" 创建时间" prop =" createTime" >
41
41
<el-date-picker
42
- v-model =" queryParams. createTime"
42
+ v-model =" createTime"
43
43
style =" width : 240px "
44
- value-format =" yyyy-MM-dd HH:mm:ss"
44
+ value-format =" yyyy-MM-DD HH:mm:ss"
45
45
type =" daterange"
46
46
range-separator =" -"
47
47
start-placeholder =" 开始日期"
48
48
end-placeholder =" 结束日期"
49
- :default-time =" ['00:00:00', '23:59:59'] "
49
+ :default-time =" defaultTime "
50
50
/>
51
51
</el-form-item >
52
52
<el-form-item >
53
- <!-- TODO 按钮图标不对 -->
54
- <el-button type =" primary" icon =" el-icon-search " @click =" handleQuery" >搜索</el-button >
55
- <el-button icon =" el-icon-refresh " @click =" resetQuery" >重置</el-button >
53
+ <!-- TODO 按钮图标不对 已解决 -->
54
+ <el-button type =" primary" : icon =" Search " @click =" handleQuery" >搜索</el-button >
55
+ <el-button : icon =" Refresh " @click =" resetQuery" >重置</el-button >
56
56
</el-form-item >
57
57
</el-form >
58
58
59
59
<!-- 操作栏 -->
60
- <!-- TODO 间隔貌似有点问题 -->
60
+ <!-- TODO 间隔貌似有点问题 没发现 -->
61
61
<el-row :gutter =" 10" class =" mb8" >
62
- <!-- TODO 芋艿,图标不对 -->
62
+ <!-- TODO 芋艿,图标不对 已解决 -->
63
63
<el-col :span =" 1.5" >
64
64
<el-button
65
65
type =" primary"
66
66
plain
67
- icon =" el-icon-plus "
67
+ : icon =" Plus "
68
68
@click =" openModal('create')"
69
69
v-hasPermi =" ['infra:config:create']"
70
70
>
71
71
新增
72
72
</el-button >
73
73
</el-col >
74
- <!-- TODO 芋艿,图标不对 -->
74
+ <!-- TODO 芋艿,图标不对 已解决 -->
75
75
<el-col :span =" 1.5" >
76
76
<el-button
77
77
type =" warning"
78
- icon =" el-icon-download "
78
+ : icon =" Download "
79
79
@click =" handleExport"
80
80
:loading =" exportLoading"
81
81
v-hasPermi =" ['infra:config:export']"
84
84
</el-button >
85
85
</el-col >
86
86
<!-- TODO 芋艿:右侧导航 -->
87
- <!-- < right-toolbar :showSearch.sync ="showSearch" @queryTable="getList"></right-toolbar> -- >
87
+ <right-toolbar v-model :showSearch =" showSearch" @queryTable =" getList" / >
88
88
</el-row >
89
89
90
90
<!-- 列表 -->
112
112
<span >{{ dayjs(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}</span >
113
113
</template >
114
114
</el-table-column >
115
- <!-- TODO 芋艿:icon 有问题,会换行 -->
115
+ <!-- TODO 芋艿:icon 有问题,会换行 已解决 -->
116
116
<el-table-column label =" 操作" align =" center" class-name =" small-padding fixed-width" >
117
117
<template #default =" scope " >
118
118
<el-button
119
119
link
120
120
type =" primary"
121
- icon =" el-icon-edit "
121
+ : icon =" Edit "
122
122
@click =" openModal('update', scope.row.id)"
123
123
v-hasPermi =" ['infra:config:update']"
124
124
>
127
127
<el-button
128
128
link
129
129
type =" primary"
130
- icon =" el-icon-delete "
130
+ : icon =" Delete "
131
131
@click =" handleDelete(scope.row)"
132
132
v-hasPermi =" ['infra:config:delete']"
133
133
>
139
139
</content-wrap >
140
140
141
141
<!-- 表单弹窗:添加/修改 -->
142
- <!-- TODO 芋艿:可以改成 form 么? -->
143
- <config-form ref =" modalRef" @success =" getList" />
142
+ <!-- TODO 芋艿:可以改成 form 么? 已解决 -->
143
+ <Form ref =" modalRef" @success =" getList" />
144
144
</template >
145
145
<script setup lang="ts" name="Config">
146
146
import * as ConfigApi from ' @/api/infra/config'
147
- import ConfigForm from ' ./form.vue'
147
+ import Form from ' ./form.vue'
148
148
import { DICT_TYPE , getDictOptions } from ' @/utils/dict'
149
+ import { Delete , Edit , Search , Download , Plus , Refresh } from ' @element-plus/icons-vue'
149
150
import dayjs from ' dayjs'
150
-
151
151
const showSearch = ref (true ) // 搜索框的是否展示
152
152
const loading = ref (true ) // 列表的加载中
153
153
const total = ref (0 ) // 列表的总页数
@@ -157,9 +157,13 @@ const queryParams = reactive({
157
157
pageSize: 10 ,
158
158
name: undefined ,
159
159
key: undefined ,
160
- type: undefined ,
161
- createTime: []
160
+ type: undefined
162
161
})
162
+ const createTime = ref (' ' )
163
+ const defaultTime = ref <[Date , Date ]>([
164
+ new Date (2000 , 1 , 1 , 0 , 0 , 0 ),
165
+ new Date (2000 , 2 , 1 , 23 , 59 , 59 )
166
+ ])
163
167
const queryFormRef = ref () // 搜索的表单
164
168
165
169
/** 搜索按钮操作 */
0 commit comments