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
06e1e276
authored
Apr 05, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
邮箱账号,增加详情弹窗
parent
37ffc2bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
2 deletions
+49
-2
src/views/system/mail/account/MailAccountDetail.vue
+26
-0
src/views/system/mail/account/account.data.ts
+6
-2
src/views/system/mail/account/index.vue
+17
-0
No files found.
src/views/system/mail/account/MailAccountDetail.vue
0 → 100644
View file @
06e1e276
<
template
>
<Dialog
title=
"详情"
v-model=
"dialogVisible"
>
<Descriptions
:schema=
"allSchemas.detailSchema"
:data=
"detailData"
/>
</Dialog>
</
template
>
<
script
setup
lang=
"ts"
>
import
*
as
MailAccountApi
from
'@/api/system/mail/account'
import
{
allSchemas
}
from
'./account.data'
const
dialogVisible
=
ref
(
false
)
// 弹窗的是否展示
const
detailLoading
=
ref
(
false
)
// 表单的加载中
const
detailData
=
ref
()
// 详情数据
/** 打开弹窗 */
const
open
=
async
(
id
:
number
)
=>
{
dialogVisible
.
value
=
true
// 设置数据
detailLoading
.
value
=
true
try
{
detailData
.
value
=
await
MailAccountApi
.
getMailAccount
(
id
)
}
finally
{
detailLoading
.
value
=
false
}
}
defineExpose
({
open
})
// 提供 open 方法,用于打开弹窗
</
script
>
src/views/system/mail/account/account.data.ts
View file @
06e1e276
...
...
@@ -61,12 +61,16 @@ const crudSchemas = reactive<CrudSchema[]>([
label
:
'创建时间'
,
field
:
'createTime'
,
isForm
:
false
,
formatter
:
dateFormatter
formatter
:
dateFormatter
,
detail
:
{
dateFormat
:
'YYYY-MM-DD HH:mm:ss'
}
},
{
label
:
'操作'
,
field
:
'action'
,
isForm
:
false
isForm
:
false
,
isDetail
:
false
}
])
export
const
{
allSchemas
}
=
useCrudSchemas
(
crudSchemas
)
src/views/system/mail/account/index.vue
View file @
06e1e276
...
...
@@ -41,6 +41,14 @@
</el-button>
<el-button
link
type=
"primary"
@
click=
"openDetail(row.id)"
v-hasPermi=
"['system:mail-account:query']"
>
详情
</el-button>
<el-button
link
type=
"danger"
v-hasPermi=
"['system:mail-account:delete']"
@
click=
"handleDelete(row.id)"
...
...
@@ -53,11 +61,14 @@
<!-- 表单弹窗:添加/修改 -->
<MailAccountForm
ref=
"formRef"
@
success=
"getList"
/>
<!-- 详情弹窗 -->
<MailAccountDetail
ref=
"detailRef"
/>
</template>
<
script
setup
lang=
"ts"
name=
"MailAccount"
>
import
{
allSchemas
}
from
'./account.data'
import
*
as
MailAccountApi
from
'@/api/system/mail/account'
import
MailAccountForm
from
'./MailAccountForm.vue'
import
MailAccountDetail
from
'./MailAccountDetail.vue'
// tableObject:表格的属性对象,可获得分页大小、条数等属性
// tableMethods:表格的操作对象,可进行获得分页、删除记录等操作
...
...
@@ -75,6 +86,12 @@ const openForm = (type: string, id?: number) => {
formRef
.
value
.
open
(
type
,
id
)
}
/** 详情操作 */
const
detailRef
=
ref
()
const
openDetail
=
(
id
:
number
)
=>
{
detailRef
.
value
.
open
(
id
)
}
/** 删除按钮操作 */
const
handleDelete
=
(
id
:
number
)
=>
{
tableMethods
.
delList
(
id
,
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