Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
812300cc
authored
Mar 20, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Vue3 重构:REVIEW 错误码
parent
7534a083
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
src/views/system/errorCode/form.vue
+0
-2
src/views/system/errorCode/index.vue
+15
-2
No files found.
src/views/system/errorCode/form.vue
View file @
812300cc
...
...
@@ -74,8 +74,6 @@ defineExpose({ openModal }) // 提供 openModal 方法,用于打开弹窗
/** 提交表单 */
const
emit
=
defineEmits
([
'success'
])
// 定义 success 事件,用于操作成功后的回调
/** 提交按钮 */
const
submitForm
=
async
()
=>
{
// 校验表单
if
(
!
formRef
)
return
...
...
src/views/system/errorCode/index.vue
View file @
812300cc
<
template
>
<!-- 搜索工作栏 -->
<content-wrap>
<el-form
:model=
"queryParams"
ref=
"queryFormRef"
class=
"-mb-15px"
:inline=
"true"
>
<el-form
class=
"-mb-15px"
:model=
"queryParams"
ref=
"queryFormRef"
:inline=
"true"
label-width=
"90px"
>
<el-form-item
label=
"错误码类型"
prop=
"type"
>
<el-select
v-model=
"queryParams.type"
placeholder=
"请选择错误码类型"
clearable
>
<el-option
...
...
@@ -9,6 +15,7 @@
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
class=
"!w-240px"
/>
</el-select>
</el-form-item>
...
...
@@ -18,6 +25,7 @@
placeholder=
"请输入应用名"
clearable
@
keyup
.
enter=
"handleQuery"
class=
"!w-240px"
/>
</el-form-item>
<el-form-item
label=
"错误码编码"
prop=
"code"
>
...
...
@@ -34,6 +42,7 @@
placeholder=
"请输入错误码提示"
clearable
@
keyup
.
enter=
"handleQuery"
class=
"!w-240px"
/>
</el-form-item>
<el-form-item
label=
"创建时间"
prop=
"createTime"
>
...
...
@@ -44,6 +53,7 @@
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:default-time=
"[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class=
"!w-240px"
/>
</el-form-item>
<el-form-item>
...
...
@@ -68,6 +78,7 @@
</el-form-item>
</el-form>
</content-wrap>
<!-- 列表 -->
<content-wrap>
<el-table
v-loading=
"loading"
:data=
"list"
>
...
...
@@ -118,6 +129,7 @@
@
pagination=
"getList"
/>
</content-wrap>
<!-- 表单弹窗:添加/修改 -->
<error-code-form
ref=
"modalRef"
@
success=
"getList"
/>
</template>
...
...
@@ -194,6 +206,7 @@ const handleDelete = async (id: number) => {
await
getList
()
}
catch
{}
}
/** 导出按钮操作 */
const
handleExport
=
async
()
=>
{
try
{
...
...
@@ -202,7 +215,7 @@ const handleExport = async () => {
// 发起导出
exportLoading
.
value
=
true
const
data
=
await
ErrorCodeApi
.
excelErrorCodeApi
(
queryParams
)
download
.
excel
(
data
,
'
参数配置
.xls'
)
download
.
excel
(
data
,
'
错误码
.xls'
)
}
catch
{
}
finally
{
exportLoading
.
value
=
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment