Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pda-ui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pda
pda-ui
Commits
0f643150
Commit
0f643150
authored
Mar 20, 2024
by
张海景
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:报表改成模板,加上模板类型显示
parent
57275431
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
16 deletions
+23
-16
index.vue
src/views/mes/report/index.vue
+23
-16
No files found.
src/views/mes/report/index.vue
View file @
0f643150
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"
报表
名称"
prop=
"name"
>
<el-form-item
label=
"
模版
名称"
prop=
"name"
>
<el-input
v-model=
"queryParams.name"
placeholder=
"请输入
报表
名称"
placeholder=
"请输入
模版
名称"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
...
...
@@ -63,8 +63,15 @@
<el-table
v-loading=
"loading"
:data=
"listData"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"报表名称"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"模板类型"
align=
"center"
prop=
"reportType"
/>
<el-table-column
label=
"模版名称"
align=
"center"
prop=
"name"
/>
<el-table-column
label=
"模版类型"
align=
"center"
prop=
"reportType"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sys_report_type"
:value=
"scope.row.reportType"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
createTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
...
...
@@ -114,11 +121,11 @@
<!--
添加或修改报表管理对话框
-->
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"500px"
append
-
to
-
body
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"80px"
>
<
el
-
form
-
item
label
=
"
报表
名称"
prop
=
"name"
>
<
el
-
input
v
-
model
=
"form.name"
placeholder
=
"请输入
报表
名称"
/>
<
el
-
form
-
item
label
=
"
模版
名称"
prop
=
"name"
>
<
el
-
input
v
-
model
=
"form.name"
placeholder
=
"请输入
模版
名称"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"
报表
类型"
prop
=
"reportType"
>
<
el
-
select
style
=
"width:100%;"
v
-
model
=
"form.reportType"
placeholder
=
"请选择模
板
类型"
>
<
el
-
form
-
item
label
=
"
模版
类型"
prop
=
"reportType"
>
<
el
-
select
style
=
"width:100%;"
v
-
model
=
"form.reportType"
placeholder
=
"请选择模
版
类型"
>
<
el
-
option
v
-
for
=
"dict in dict.type.sys_report_type"
:
key
=
"dict.value"
...
...
@@ -159,7 +166,7 @@ export default {
showSearch
:
true
,
// 总条数
total
:
0
,
//
报表
管理表格数据
//
模版
管理表格数据
listData
:
[],
// 弹出层标题
title
:
""
,
...
...
@@ -179,7 +186,7 @@ export default {
// 表单校验
rules
:
{
name
:
[
{
required
:
true
,
message
:
"
报表
名称不能为空"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"
模版
名称不能为空"
,
trigger
:
"blur"
}
],
}
}
;
...
...
@@ -188,7 +195,7 @@ export default {
this
.
getList
();
}
,
methods
:
{
/** 查询
报表
管理列表 */
/** 查询
模版
管理列表 */
getList
()
{
this
.
loading
=
true
;
listReport
({...
this
.
queryParams
,
isPrintTemplate
:
1
}
).
then
(
response
=>
{
...
...
@@ -233,9 +240,9 @@ export default {
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加
报表
管理"
;
this
.
title
=
"添加
模版
管理"
;
}
,
/**
报表
预览 */
/**
模版
预览 */
handleDesigner
(
name
)
{
window
.
open
(
`${this.website.reportUrl
}
/designer?_u=mysql:`
+
name
)
}
,
...
...
@@ -246,7 +253,7 @@ export default {
getReport
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改
报表
管理"
;
this
.
title
=
"修改
模版
管理"
;
}
);
}
,
/** 提交按钮 */
...
...
@@ -272,7 +279,7 @@ export default {
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除
报表
管理编号为"'
+
ids
+
'"的数据项?'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
'是否确认删除
模版
管理编号为"'
+
ids
+
'"的数据项?'
).
then
(
function
()
{
return
delReport
(
ids
);
}
).
then
(()
=>
{
this
.
getList
();
...
...
@@ -283,7 +290,7 @@ export default {
handleExport
()
{
this
.
download
(
'ureport/export'
,
{
...
this
.
queryParams
}
,
`
报表
模块_${new Date().getTime()
}
.xlsx`
)
}
,
`
模版
模块_${new Date().getTime()
}
.xlsx`
)
}
}
}
;
...
...
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