Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jeecg
jeecg-boot
提交
38e6586c
J
jeecg-boot
项目概览
jeecg
/
jeecg-boot
上一次同步 3 年多
通知
865
Star
24375
Fork
84
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jeecg-boot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
38e6586c
编写于
2月 24, 2020
作者:
JEECG低代码平台
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Jeecg-Boot 2.1.4 版本发布 | 重构较大,较多新功能
上级
d7ca307f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
65 addition
and
39 deletion
+65
-39
ant-design-vue-jeecg/src/views/modules/online/cgreport/OnlCgreportHeadList.vue
...src/views/modules/online/cgreport/OnlCgreportHeadList.vue
+3
-3
ant-design-vue-jeecg/src/views/modules/online/cgreport/auto/OnlCgreportAutoList.vue
...iews/modules/online/cgreport/auto/OnlCgreportAutoList.vue
+61
-35
jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml
...boot-module-system/src/main/resources/application-dev.yml
+1
-1
未找到文件。
ant-design-vue-jeecg/src/views/modules/online/cgreport/OnlCgreportHeadList.vue
浏览文件 @
38e6586c
...
@@ -6,18 +6,18 @@
...
@@ -6,18 +6,18 @@
<a-form
layout=
"inline"
>
<a-form
layout=
"inline"
>
<a-row
:gutter=
"24"
>
<a-row
:gutter=
"24"
>
<a-col
:
span=
"6
"
>
<a-col
:
xl=
"6"
:lg=
"7"
:md=
"8"
:sm=
"24
"
>
<a-form-item
label=
"报表编码"
>
<a-form-item
label=
"报表编码"
>
<a-input
placeholder=
"请输入报表编码"
v-model=
"queryParam.code"
></a-input>
<a-input
placeholder=
"请输入报表编码"
v-model=
"queryParam.code"
></a-input>
</a-form-item>
</a-form-item>
</a-col>
</a-col>
<a-col
:
span=
"6
"
>
<a-col
:
xl=
"6"
:lg=
"7"
:md=
"8"
:sm=
"24
"
>
<a-form-item
label=
"报表名字"
>
<a-form-item
label=
"报表名字"
>
<a-input
placeholder=
"请输入报表名字"
v-model=
"queryParam.name"
></a-input>
<a-input
placeholder=
"请输入报表名字"
v-model=
"queryParam.name"
></a-input>
</a-form-item>
</a-form-item>
</a-col>
</a-col>
<a-col
:
span=
"8
"
>
<a-col
:
xl=
"6"
:lg=
"7"
:md=
"8"
:sm=
"24
"
>
<span
style=
"float: left;overflow: hidden;"
class=
"table-page-search-submitButtons"
>
<span
style=
"float: left;overflow: hidden;"
class=
"table-page-search-submitButtons"
>
<a-button
type=
"primary"
@
click=
"searchQuery"
icon=
"search"
>
查询
</a-button>
<a-button
type=
"primary"
@
click=
"searchQuery"
icon=
"search"
>
查询
</a-button>
<a-button
type=
"primary"
@
click=
"searchReset"
icon=
"reload"
style=
"margin-left: 8px"
>
重置
</a-button>
<a-button
type=
"primary"
@
click=
"searchReset"
icon=
"reload"
style=
"margin-left: 8px"
>
重置
</a-button>
...
...
ant-design-vue-jeecg/src/views/modules/online/cgreport/auto/OnlCgreportAutoList.vue
浏览文件 @
38e6586c
...
@@ -58,18 +58,34 @@
...
@@ -58,18 +58,34 @@
style=
"min-height: 300px"
style=
"min-height: 300px"
>
>
<!-- 支持链接href跳转 -->
<
template
v-for=
"field of fieldHrefSlots"
:slot=
"field.slotName"
slot-scope=
"text, record"
>
<a
@
click=
"handleClickFieldHref(field,record)"
>
{{
text
}}
</a>
</
template
>
</a-table>
</a-table>
<!-- 跳转Href的动态组件方式 -->
<a-modal
v-bind=
"hrefComponent.model"
v-on=
"hrefComponent.on"
>
<component
:is=
"hrefComponent.is"
v-bind=
"hrefComponent.params"
/>
</a-modal>
</a-card>
</a-card>
</template>
</template>
<
script
>
<
script
>
import
{
HrefJump
}
from
'
@/mixins/OnlAutoListMixin
'
import
{
getAction
,
downFile
}
from
'
@/api/manage
'
import
{
getAction
,
downFile
}
from
'
@/api/manage
'
import
{
filterMultiDictText
}
from
'
@/components/dict/JDictSelectUtil
'
import
{
filterMultiDictText
}
from
'
@/components/dict/JDictSelectUtil
'
import
{
filterObj
}
from
'
@/utils/util
'
;
import
{
filterObj
}
from
'
@/utils/util
'
;
export
default
{
export
default
{
name
:
'
OnlCgreportAutoList
'
,
name
:
'
OnlCgreportAutoList
'
,
mixins
:
[
HrefJump
],
components
:
{
components
:
{
},
},
data
()
{
data
()
{
...
@@ -89,8 +105,7 @@
...
@@ -89,8 +105,7 @@
reportCode
:
''
,
reportCode
:
''
,
description
:
'
在线报表功能测试页面
'
,
description
:
'
在线报表功能测试页面
'
,
url
:
{
url
:
{
getColumns
:
'
/online/cgreport/api/getColumns/
'
,
getColumnsAndData
:
'
/online/cgreport/api/getColumnsAndData/
'
,
getData
:
'
/online/cgreport/api/getData/
'
,
getQueryInfo
:
'
/online/cgreport/api/getQueryInfo/
'
,
getQueryInfo
:
'
/online/cgreport/api/getQueryInfo/
'
,
getParamsInfo
:
'
/online/cgreport/api/getParamsInfo/
'
getParamsInfo
:
'
/online/cgreport/api/getParamsInfo/
'
},
},
...
@@ -153,7 +168,7 @@
...
@@ -153,7 +168,7 @@
}
}
this
.
selfParam
=
{}
this
.
selfParam
=
{}
getAction
(
`
${
this
.
url
.
getParamsInfo
}${
this
.
$route
.
params
.
c
ode
}
`
).
then
((
res
)
=>
{
getAction
(
`
${
this
.
url
.
getParamsInfo
}${
this
.
reportC
ode
}
`
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
if
(
res
.
result
&&
res
.
result
.
length
>
0
){
if
(
res
.
result
&&
res
.
result
.
length
>
0
){
for
(
let
i
of
res
.
result
){
for
(
let
i
of
res
.
result
){
...
@@ -167,10 +182,10 @@
...
@@ -167,10 +182,10 @@
})
})
},
},
initQueryInfo
()
{
initQueryInfo
()
{
if
(
!
this
.
$route
.
params
.
c
ode
){
if
(
!
this
.
reportC
ode
){
return
false
return
false
}
}
getAction
(
`
${
this
.
url
.
getQueryInfo
}${
this
.
$route
.
params
.
c
ode
}
`
).
then
((
res
)
=>
{
getAction
(
`
${
this
.
url
.
getQueryInfo
}${
this
.
reportC
ode
}
`
).
then
((
res
)
=>
{
console
.
log
(
"
获取查询条件
"
,
res
);
console
.
log
(
"
获取查询条件
"
,
res
);
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
queryInfo
=
res
.
result
this
.
queryInfo
=
res
.
result
...
@@ -180,7 +195,7 @@
...
@@ -180,7 +195,7 @@
})
})
},
},
loadData
(
arg
)
{
loadData
(
arg
)
{
if
(
!
this
.
$route
.
params
.
c
ode
){
if
(
!
this
.
reportC
ode
){
return
false
return
false
}
}
if
(
arg
==
1
)
{
if
(
arg
==
1
)
{
...
@@ -189,42 +204,43 @@
...
@@ -189,42 +204,43 @@
let
params
=
this
.
getQueryParams
();
//查询条件
let
params
=
this
.
getQueryParams
();
//查询条件
console
.
log
(
params
)
console
.
log
(
params
)
//获取报表ID
console
.
log
(
'
动态报表 reportCode :
'
+
this
.
reportCode
);
console
.
log
(
'
动态报表 reportCode :
'
+
this
.
reportCode
);
this
.
table
.
loading
=
true
this
.
table
.
loading
=
true
Promise
.
all
([
getAction
(
`
${
this
.
url
.
getColumns
}${
this
.
reportCode
}
`
),
getAction
(
`
${
this
.
url
.
getColumnsAndData
}${
this
.
reportCode
}
`
,
params
).
then
(
res
=>
{
getAction
(
`
${
this
.
url
.
getData
}${
this
.
reportCode
}
`
,
params
)
if
(
res
.
success
)
{
]).
then
(
results
=>
{
let
{
data
,
columns
,
cgreportHeadName
,
dictOptions
,
fieldHrefSlots
}
=
res
.
result
let
[{
result
:
{
columns
,
cgreportHeadName
,
dictOptions
}},
{
result
:
data
}]
=
results
let
columnWidth
=
230
let
columnWidth
=
230
this
.
dictOptions
=
dictOptions
this
.
dictOptions
=
dictOptions
for
(
let
a
=
0
;
a
<
columns
.
length
;
a
++
){
for
(
let
a
=
0
;
a
<
columns
.
length
;
a
++
){
if
(
columns
[
a
].
customRender
){
if
(
columns
[
a
].
customRender
){
let
field_name
=
columns
[
a
].
customRender
;
let
field_name
=
columns
[
a
].
customRender
;
columns
[
a
].
customRender
=
(
text
)
=>
{
columns
[
a
].
customRender
=
(
t
=>
t
?
filterMultiDictText
(
this
.
dictOptions
[
field_name
],
t
+
''
)
:
t
)
if
(
!
text
){
return
''
}
else
{
return
filterMultiDictText
(
this
.
dictOptions
[
field_name
],
text
+
""
);
}
}
}
columns
.
width
=
columnWidth
}
}
columns
.
width
=
columnWidth
this
.
table
.
scroll
.
x
=
columns
.
length
*
columnWidth
}
this
.
table
.
columns
=
[...
columns
]
this
.
table
.
scroll
.
x
=
columns
.
length
*
columnWidth
this
.
cgreportHeadName
=
cgreportHeadName
this
.
table
.
columns
=
[...
columns
]
this
.
fieldHrefSlots
=
fieldHrefSlots
this
.
cgreportHeadName
=
cgreportHeadName
if
(
data
)
{
if
(
data
)
{
this
.
table
.
pagination
.
total
=
Number
(
data
.
total
)
this
.
table
.
pagination
.
total
=
Number
(
data
.
total
)
this
.
table
.
dataSource
=
data
.
records
this
.
table
.
dataSource
=
data
.
records
}
else
{
}
else
{
this
.
table
.
pagination
.
total
=
0
this
.
table
.
pagination
.
total
=
0
this
.
table
.
dataSource
=
[]
this
.
table
.
dataSource
=
[]
}
}
else
{
this
.
$message
.
warn
(
'
查询失败:
'
+
res
.
message
)
}
}
}).
catch
((
e
)
=>
{
}).
catch
((
e
)
=>
{
console
.
error
(
e
)
console
.
error
(
e
)
this
.
$message
.
error
(
'
查询失败
'
)
this
.
$message
.
error
(
'
查询失败
'
)
}).
then
(()
=>
{
}).
finally
(()
=>
{
this
.
table
.
loading
=
false
this
.
table
.
loading
=
false
})
})
},
},
...
@@ -246,7 +262,14 @@
...
@@ -246,7 +262,14 @@
},
},
exportExcel
()
{
exportExcel
()
{
let
fileName
=
this
.
cgreportHeadName
let
fileName
=
this
.
cgreportHeadName
downFile
(
`/online/cgreport/api/exportXls/
${
this
.
reportCode
}
`
,
this
.
queryParam
).
then
((
data
)
=>
{
let
selfParam
=
{}
for
(
let
queryName
in
this
.
$route
.
query
)
{
if
(
this
.
$route
.
query
.
hasOwnProperty
(
queryName
))
{
let
value
=
this
.
$route
.
query
[
queryName
]
selfParam
[
'
self_
'
+
queryName
]
=
value
||
''
}
}
downFile
(
`/online/cgreport/api/exportXls/
${
this
.
reportCode
}
`
,
Object
.
assign
(
selfParam
,
this
.
queryParam
)).
then
((
data
)
=>
{
if
(
!
data
)
{
if
(
!
data
)
{
this
.
$message
.
warning
(
"
文件下载失败
"
)
this
.
$message
.
warning
(
"
文件下载失败
"
)
return
return
...
@@ -275,6 +298,9 @@
...
@@ -275,6 +298,9 @@
if
(
Object
.
keys
(
sorter
).
length
>
0
)
{
if
(
Object
.
keys
(
sorter
).
length
>
0
)
{
this
.
sorter
.
column
=
sorter
.
field
this
.
sorter
.
column
=
sorter
.
field
this
.
sorter
.
order
=
'
ascend
'
==
sorter
.
order
?
'
asc
'
:
'
desc
'
this
.
sorter
.
order
=
'
ascend
'
==
sorter
.
order
?
'
asc
'
:
'
desc
'
}
else
{
this
.
sorter
.
column
=
null
this
.
sorter
.
order
=
null
}
}
this
.
table
.
pagination
=
pagination
this
.
table
.
pagination
=
pagination
this
.
loadData
()
this
.
loadData
()
...
...
jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml
浏览文件 @
38e6586c
...
@@ -96,7 +96,7 @@ spring:
...
@@ -96,7 +96,7 @@ spring:
connectionProperties
:
druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
connectionProperties
:
druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource
:
datasource
:
master
:
master
:
url
:
jdbc:mysql://127.0.0.1:3306/jeecg-boot
-
?characterEncoding=UTF-8&useUnicode=true&useSSL=false
url
:
jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
username
:
root
username
:
root
password
:
root
password
:
root
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.jdbc.Driver
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录