Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
fed50ecb
authored
2024-01-03 15:01:01 +0800
by
赵千
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
退件统计
1 parent
7bd46e67
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
171 additions
and
66 deletions
src/api/tjfx.js
src/views/tjfx/cstj/index.vue
src/views/tjfx/tjltj/index.vue
src/views/workflow/components/sfxx.vue
src/api/tjfx.js
0 → 100644
View file @
fed50ec
/*
* @Description: 信息备案
* @Autor:
* @LastEditTime: 2023-09-11 11:25:22
*/
import
request
from
'@/utils/request'
let
SERVER
=
window
.
config
?
window
.
config
:
JSON
.
parse
(
localStorage
.
getItem
(
'ApiUrl'
))
/**
* @description: cstj
* @author:
* @param params
*/
export
function
cstj
(
params
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/tjfx/xn/cstj?startAt='
+
params
.
startAt
+
'&endAt='
+
params
.
endAt
,
method
:
'post'
})
}
/**
* @description: exportCstj
* @author:
* @param params
*/
export
function
exportCstj
(
params
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/tjfx/xn/exportCstj?startAt='
+
params
.
startAt
+
'&endAt='
+
params
.
endAt
,
method
:
'post'
,
responseType
:
'blob'
})
}
/**
* @description: tjtj
* @author:
* @param data
*/
export
function
tjtj
(
data
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/tjfx/xn/tjtj'
,
method
:
'post'
,
data
})
}
/**
* @description: exportTjtj
* @author:
* @param data
*/
export
function
exportTjtj
(
data
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/tjfx/xn/exportTjtj'
,
method
:
'post'
,
data
,
responseType
:
'blob'
})
}
src/views/tjfx/cstj/index.vue
View file @
fed50ec
...
...
@@ -50,6 +50,7 @@
</
template
>
<
script
>
import
*
as
echarts
from
"echarts"
;
import
{
cstj
,
exportCstj
}
from
"@/api/tjfx.js"
;
import
XLSX
from
"xlsx"
;
export
default
{
components
:
{},
...
...
@@ -69,50 +70,62 @@ export default {
chooseIndex
:
0
,
// 日期快捷选择项索引
dateRange
:
[],
// 自定义列表 - 日期范围
queryForm
:
{},
data1
:
[
12
,
10
,
15
,
12
,
15
,
19
,
15
],
data2
:
[
1
,
2
,
2
,
3
,
2
,
3
,
2
],
data1
:
[],
data2
:
[],
data3
:
[],
selectDate
:
{
startAt
:
'2020-01-03 02:57:57'
,
endAt
:
'2025-01-03 02:57:57'
},
xAxisData
:
[
"赵龙龙"
,
"刘刚"
,
"任启亮"
,
"梁亚博"
,
"李含"
,
"周路"
,
],
};
},
mounted
()
{
this
.
setdata
();
},
methods
:
{
cstj
()
{
cstj
(
this
.
selectDate
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
let
dataSource
=
res
.
result
;
if
(
dataSource
!=
null
)
{
this
.
xAxisData
=
dataSource
.
map
(
item
=>
item
.
assignee
)
this
.
data1
=
dataSource
.
map
(
item
=>
item
.
total
)
this
.
data2
=
dataSource
.
map
(
item
=>
item
.
count
)
this
.
data3
=
dataSource
.
map
(
item
=>
item
.
cumulativeTimeout
)
}
console
.
log
(
this
.
xAxisData
)
console
.
log
(
this
.
data1
)
console
.
log
(
this
.
data2
)
console
.
log
(
this
.
data3
)
// 创建一个 ECharts 实例
this
.
chart
=
echarts
.
init
(
this
.
$refs
.
chart
);
// 在 ECharts 实例中配置图表
this
.
chart
.
setOption
(
this
.
getOption
());
this
.
chooseDateQuick
(
0
);
}
})
},
methods
:
{
setdata
()
{
for
(
let
i
=
0
;
i
<
this
.
data1
.
length
;
i
++
)
{
let
sum
=
(
this
.
data2
[
i
]
/
this
.
data1
[
i
])
*
100
;
this
.
data3
.
push
(
Number
(
sum
).
toFixed
(
0
));
}
this
.
chooseDateQuick
(
7
)
this
.
cstj
()
},
// 导出
derive
()
{
this
.
exdata
=
[[
"受理人员"
,
"收件数"
,
"退件数"
,
"推荐率"
]];
this
.
xAxisData
.
forEach
((
item
,
index
)
=>
{
console
.
log
(
"this.exdata[index+1]"
,
this
.
exdata
[
index
+
1
]);
this
.
exdata
.
push
([]);
this
.
exdata
[
index
+
1
].
push
(
item
);
this
.
exdata
[
index
+
1
].
push
(
this
.
data1
[
index
]);
this
.
exdata
[
index
+
1
].
push
(
this
.
data2
[
index
]);
this
.
exdata
[
index
+
1
].
push
(
this
.
data3
[
index
]);
});
console
.
log
(
"this.exdata"
,
this
.
exdata
);
const
ws
=
XLSX
.
utils
.
aoa_to_sheet
(
this
.
exdata
);
const
wb
=
XLSX
.
utils
.
book_new
();
XLSX
.
utils
.
book_append_sheet
(
wb
,
ws
,
"Sheet1"
);
XLSX
.
writeFile
(
wb
,
"收件与超时统计情况.xlsx"
);
exportCstj
(
this
.
selectDate
).
then
(
res
=>
{
const
link
=
document
.
createElement
(
"a"
);
let
blob
=
new
Blob
([
res
],
{
type
:
"application/vnd.ms-excel"
});
//类型excel
link
.
style
.
display
=
"none"
;
link
.
href
=
URL
.
createObjectURL
(
blob
);
link
.
setAttribute
(
"download"
,
this
.
dateRange
[
0
]
+
'~'
+
this
.
dateRange
[
1
]
+
'超时统计'
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
document
.
body
.
removeChild
(
link
);
})
},
// 查询
chchch
()
{
...
...
@@ -140,15 +153,21 @@ export default {
},
// 如果需要自定义 tooltip样式,需要使用formatter
formatter
:
(
params
)
=>
{
console
.
log
(
"paramsssssssssssssssssss"
,
params
);
if
(
params
.
seriesName
==
'超时时间'
)
{
return
`<div font-size: 14px;line-height: 24px>
${
params
.
seriesName
}
<br>
<span font-size: 16px; font-weight: 600;">
${
params
.
name
}
:
${
Number
(
params
.
value
).
toFixed
(
2
)
+
"%"
Number
(
params
.
value
).
toFixed
(
2
)
+
"小时"
}
<
/span
>
<
/div>`
;
}
return `
<
div
font
-
size
:
14
px
;
line
-
height
:
24
px
>
$
{
params
.
seriesName
}
<
br
>
<
span
font
-
size
:
16
px
;
font
-
weight
:
600
;
"> ${params.name}: ${
Number(params.value).toFixed(2) + "
件
"
} </span>
</div>`;
},
},
...
...
@@ -279,6 +298,9 @@ export default {
this.formatDate(new Date(year - 1, 11, 31))
);
}
this.selectDate.startAt = this.dateRange[0] + "
00
:
00
:
00
"
this.selectDate.endAt = this.dateRange[1] + "
00
:
00
:
00
"
this.cstj()
},
// 日期范围选择器事件
chooseDateRange() {
...
...
src/views/tjfx/tjltj/index.vue
View file @
fed50ec
...
...
@@ -53,6 +53,7 @@
</
template
>
<
script
>
import
*
as
echarts
from
"echarts"
;
import
{
tjtj
,
exportTjtj
}
from
"@/api/tjfx.js"
;
import
XLSX
from
'xlsx'
;
export
default
{
components
:
{},
...
...
@@ -69,62 +70,68 @@ export default {
{
code
:
"7"
,
name
:
"今年"
},
{
code
:
"8"
,
name
:
"去年"
},
],
selectDate
:
{
startAt
:
'2020-01-03 02:57:57'
,
endAt
:
'2025-01-03 02:57:57'
},
chooseIndex
:
0
,
// 日期快捷选择项索引
dateRange
:
[],
// 自定义列表 - 日期范围
queryForm
:
{},
data1
:
[
23
,
45
,
23
,
11
,
15
,
19
,
35
],
data2
:
[
1
,
4
,
1
,
3
,
2
,
3
,
4
],
data1
:
[],
data2
:
[],
data3
:
[],
xAxisData
:
[
"任超"
,
"杨威"
,
"魏娜"
,
"张祎旋"
,
"苗菁"
,
"王文刚"
,
"单帅旗"
,
],
xAxisData
:
[],
};
},
mounted
()
{
this
.
setdata
();
},
methods
:
{
tjtj
()
{
tjtj
(
this
.
selectDate
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
let
dataSource
=
res
.
result
;
if
(
dataSource
!=
null
)
{
this
.
xAxisData
=
dataSource
.
map
(
item
=>
item
.
assignee
)
this
.
data1
=
dataSource
.
map
(
item
=>
item
.
sj
)
this
.
data2
=
dataSource
.
map
(
item
=>
item
.
tj
)
this
.
data3
=
dataSource
.
map
(
item
=>
item
.
tjl
)
}
console
.
log
(
this
.
xAxisData
)
console
.
log
(
this
.
data1
)
console
.
log
(
this
.
data2
)
console
.
log
(
this
.
data3
)
// 创建一个 ECharts 实例
this
.
chart
=
echarts
.
init
(
this
.
$refs
.
chart
);
// 在 ECharts 实例中配置图表
this
.
chart
.
setOption
(
this
.
getOption
());
this
.
chooseDateQuick
(
0
);
}
})
},
methods
:
{
setdata
()
{
for
(
let
i
=
0
;
i
<
this
.
data1
.
length
;
i
++
)
{
let
sum
=
(
this
.
data2
[
i
]
/
this
.
data1
[
i
])
*
100
;
this
.
data3
.
push
(
Number
(
sum
).
toFixed
(
0
));
}
this
.
chooseDateQuick
(
7
)
this
.
tjtj
()
},
// 导出
// 导出
derive
()
{
this
.
exdata
=
[
[
'受理人员'
,
'收件数'
,
'退件数'
,
'推荐率'
]
];
this
.
xAxisData
.
forEach
((
item
,
index
)
=>
{
console
.
log
(
"this.exdata[index+1]"
,
this
.
exdata
[
index
+
1
]);
this
.
exdata
.
push
([])
this
.
exdata
[
index
+
1
].
push
(
item
)
this
.
exdata
[
index
+
1
].
push
(
this
.
data1
[
index
])
this
.
exdata
[
index
+
1
].
push
(
this
.
data2
[
index
])
this
.
exdata
[
index
+
1
].
push
(
this
.
data3
[
index
])
})
console
.
log
(
"this.exdata"
,
this
.
exdata
);
const
ws
=
XLSX
.
utils
.
aoa_to_sheet
(
this
.
exdata
);
const
wb
=
XLSX
.
utils
.
book_new
();
XLSX
.
utils
.
book_append_sheet
(
wb
,
ws
,
'Sheet1'
);
XLSX
.
writeFile
(
wb
,
'收件与退件统计情况.xlsx'
);
exportTjtj
(
this
.
selectDate
).
then
(
res
=>
{
const
link
=
document
.
createElement
(
"a"
);
let
blob
=
new
Blob
([
res
],
{
type
:
"application/vnd.ms-excel"
});
//类型excel
link
.
style
.
display
=
"none"
;
link
.
href
=
URL
.
createObjectURL
(
blob
);
link
.
setAttribute
(
"download"
,
this
.
dateRange
[
0
]
+
'~'
+
this
.
dateRange
[
1
]
+
'收件退件统计'
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
document
.
body
.
removeChild
(
link
);
})
},
// 查询
chchch
()
{
console
.
log
(
"dateRange"
,
this
.
dateRange
);
this
.
setdata
()
},
getOption
()
{
return
{
...
...
@@ -148,6 +155,7 @@ console.log("this.exdata",this.exdata);
},
// 如果需要自定义 tooltip样式,需要使用formatter
formatter
:
(
params
)
=>
{
if
(
params
.
seriesName
==
'退件率'
)
{
return
`<div font-size: 14px;line-height: 24px>
${
params
.
seriesName
}
<br>
...
...
@@ -155,6 +163,14 @@ console.log("this.exdata",this.exdata);
Number
(
params
.
value
).
toFixed
(
2
)
+
"%"
}
<
/span
>
<
/div>`
;
}
return `
<
div
font
-
size
:
14
px
;
line
-
height
:
24
px
>
$
{
params
.
seriesName
}
<
br
>
<
span
font
-
size
:
16
px
;
font
-
weight
:
600
;
"> ${params.name}: ${
Number(params.value).toFixed(2) + "
件
"
} </span>
</div>`;
},
},
...
...
@@ -284,6 +300,9 @@ console.log("this.exdata",this.exdata);
this.formatDate(new Date(year - 1, 11, 31))
);
}
this.selectDate.startAt = this.dateRange[0] + "
00
:
00
:
00
"
this.selectDate.endAt = this.dateRange[1] + "
00
:
00
:
00
"
this.tjtj()
},
// 日期范围选择器事件
chooseDateRange() {
...
...
src/views/workflow/components/sfxx.vue
View file @
fed50ec
...
...
@@ -113,6 +113,10 @@
label
:
"收费人员"
,
},
{
prop
:
"sfkmmc"
,
label
:
"收费科目名称"
,
},
{
prop
:
"sjffr"
,
label
:
"实际付费人"
,
},
...
...
Please
register
or
sign in
to post a comment