Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
e70d0784
Commit
e70d0784
authored
Jan 06, 2021
by
任晓松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
需求统计
parent
a04ad50e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
0 deletions
+59
-0
center-channel/app/base/api/impl/action/opNeed.js
+7
-0
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
+52
-0
No files found.
center-channel/app/base/api/impl/action/opNeed.js
View file @
e70d0784
...
...
@@ -53,9 +53,16 @@ class OpNeed extends APIBase {
// case "receiveFeedback"://关闭方案
// opResult = await this.centerorderSve.reqCenterOrderApi(pobj);
// break;
//企服通统计页面接口----start
case
"getStatisticsByUappId"
:
opResult
=
await
this
.
utilsOpNeedSve
.
getStatisticsByUappId
(
pobj
);
break
;
case
"getStatisticsByProduct"
:
opResult
=
await
this
.
utilsOpNeedSve
.
getStatisticsByProduct
(
pobj
);
break
;
case
"getNeedFunnelStatistics"
:
opResult
=
await
this
.
utilsOpNeedSve
.
getNeedFunnelStatistics
(
pobj
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
center-channel/app/base/service/impl/utilsSve/utilsOpNeedSve.js
View file @
e70d0784
...
...
@@ -353,6 +353,58 @@ class UtilsOpNeedService extends AppServiceBase {
return
system
.
getResultSuccess
(
final
);
}
/**
* 需求统计漏斗图
* @param pobj
* @returns {Promise<void>}
*/
async
getNeedFunnelStatistics
(
pobj
){
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
return
result
;
}
/**
* 需求统计(产品维度)
* @param pobj
* @returns {Promise<void>}
*/
async
getStatisticsByProduct
(
pobj
){
let
url
=
this
.
centerOrderUrl
+
"action/opNeed/springBoard"
;
let
result
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
result
.
status
!=
0
){
return
system
.
getResultFail
(
-
1
);
}
let
data
=
result
.
data
;
let
temp
=
""
;
let
arr
=
[];
let
reArr
=
[];
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
if
((
temp
!=
data
[
i
].
typeCode
&&
temp
!=
""
)){
let
obj
=
{
type_code
:
temp
,
data
:
arr
}
reArr
.
push
(
obj
);
arr
=
[];
}
let
dArr
=
{
status
:
data
[
i
].
status
,
count
:
data
[
i
].
count
}
arr
.
push
(
dArr
);
temp
=
data
[
i
].
typeCode
;
if
(
i
==
data
.
length
-
1
){
let
obj
=
{
type_code
:
temp
,
data
:
arr
}
reArr
.
push
(
obj
);
}
}
return
system
.
getResultSuccess
(
reArr
);
}
urlSplit
(
url
)
{
var
arr
=
url
.
split
(
"?"
)[
1
];
//根据?跟个url
...
...
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