Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform-ui
Commits
2afb13d2
Commit
2afb13d2
authored
Nov 29, 2019
by
guoyou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分公司业绩分页
parent
5f7489b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
27 deletions
+41
-27
branchCompany.vue
src/views/financial/branchCompany.vue
+39
-25
memberPerformance.vue
src/views/financial/memberPerformance.vue
+1
-1
staffPerformance.vue
src/views/financial/staffPerformance.vue
+1
-1
No files found.
src/views/financial/branchCompany.vue
View file @
2afb13d2
...
...
@@ -7,9 +7,9 @@
</el-form-item>
<el-form-item
label=
"统计方式"
>
<el-radio-group
v-model=
"listQuery.statisticalWay"
@
change=
"changeType"
>
<el-radio-button
label=
1
>
日
</el-radio-button>
<el-radio-button
label=
2
>
周
</el-radio-button>
<el-radio-button
label=
3
>
月
</el-radio-button>
<el-radio-button
label=
"1"
>
日
</el-radio-button>
<el-radio-button
label=
"2"
>
周
</el-radio-button>
<el-radio-button
label=
"3"
>
月
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"所属公司"
>
...
...
@@ -28,7 +28,13 @@
<el-button
type=
"primary"
:loading=
"excelLoading"
@
click=
"downloadExcel"
>
导出报表
</el-button>
</el-form>
<el-table
:data=
"tableData"
border
style=
"width: 100%"
header-align=
"center"
>
<el-table
:data=
"tableData"
border
style=
"width: 100%"
header-align=
"center"
v-loading=
"loadingTab"
>
<el-table-column
prop=
"date"
label=
"时间"
...
...
@@ -83,6 +89,7 @@ export default {
},
data
()
{
return
{
loadingTab
:
false
,
tableData
:
[],
//表格数据
time
:
null
,
//时间
excelLoading
:
false
,
//导出loading
...
...
@@ -136,45 +143,52 @@ export default {
this
.
excelLoading
=
true
var
u
=
navigator
.
userAgent
,
app
=
navigator
.
appVersion
excelExport
(
this
.
listQuery
,
{
responseType
:
'arraybuffer'
}).
then
(
res
=>
{
const
content
=
res
const
blob
=
new
Blob
([
content
],
{
type
:
'application/vnd.ms-excel'
})
const
fileName
=
'报表.xlsx'
if
(
u
.
indexOf
(
'Edge'
)
>
-
1
)
{
window
.
navigator
.
msSaveBlob
(
blob
,
fileName
)
}
else
{
const
elink
=
document
.
createElement
(
'a'
)
elink
.
download
=
fileName
elink
.
style
.
display
=
'none'
elink
.
href
=
URL
.
createObjectURL
(
blob
)
document
.
body
.
appendChild
(
elink
)
elink
.
click
()
URL
.
revokeObjectURL
(
elink
.
href
)
// 释放URL 对象
document
.
body
.
removeChild
(
elink
)
excelExport
(
this
.
listQuery
,
{
responseType
:
'arraybuffer'
}).
then
(
res
=>
{
const
content
=
res
const
blob
=
new
Blob
([
content
],
{
type
:
'application/vnd.ms-excel'
})
const
fileName
=
'分公司报表.xlsx'
if
(
u
.
indexOf
(
'Edge'
)
>
-
1
)
{
window
.
navigator
.
msSaveBlob
(
blob
,
fileName
)
}
else
{
const
elink
=
document
.
createElement
(
'a'
)
elink
.
download
=
fileName
elink
.
style
.
display
=
'none'
elink
.
href
=
URL
.
createObjectURL
(
blob
)
document
.
body
.
appendChild
(
elink
)
elink
.
click
()
URL
.
revokeObjectURL
(
elink
.
href
)
// 释放URL 对象
document
.
body
.
removeChild
(
elink
)
}
this
.
excelLoading
=
false
}
this
.
excelLoading
=
false
})
)
},
//表格数据
getList
()
{
this
.
loadingTab
=
true
company_performance
(
this
.
listQuery
).
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
this
.
tableData
=
data
.
data
.
data
this
.
total
=
data
.
data
.
totalCount
window
.
scrollTo
(
0
,
0
)
}
else
{
this
.
$message
.
error
(
data
.
message
)
}
setTimeout
(()
=>
{
this
.
loadingTab
=
false
},
300
)
})
},
//分页
handleSizeChange
(
val
)
{
this
.
list
q
uery
.
limit
=
val
this
.
list
Q
uery
.
limit
=
val
this
.
getList
()
},
handleCurrentChange
(
val
)
{
this
.
list
q
uery
.
page
=
val
this
.
list
Q
uery
.
page
=
val
this
.
getList
()
}
}
...
...
src/views/financial/memberPerformance.vue
View file @
2afb13d2
...
...
@@ -268,7 +268,7 @@ export default {
const
blob
=
new
Blob
([
content
],
{
type
:
'application/vnd.ms-excel'
})
const
fileName
=
'报表.xlsx'
const
fileName
=
'
总公司
报表.xlsx'
if
(
u
.
indexOf
(
'Edge'
)
>
-
1
)
{
window
.
navigator
.
msSaveBlob
(
blob
,
fileName
)
}
else
{
...
...
src/views/financial/staffPerformance.vue
View file @
2afb13d2
...
...
@@ -264,7 +264,7 @@ export default {
type
:
'application/vnd.ms-excel'
})
const
fileName
=
this
.
timestamp
(
new
Date
())
+
'员工业绩
统计
.xlsx'
this
.
timestamp
(
new
Date
())
+
'员工业绩
报表
.xlsx'
if
(
u
.
indexOf
(
'Edge'
)
>
-
1
)
{
window
.
navigator
.
msSaveBlob
(
blob
,
fileName
)
console
.
log
(
'ie'
)
...
...
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