Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CRM
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
华国豪
CRM
Commits
9137a792
Commit
9137a792
authored
Mar 31, 2020
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/huaguohao/crm
parents
d1daf2bd
c45eb387
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
351 additions
and
319 deletions
+351
-319
gaoxiao.vue
src/components/statistics/gaoxiao.vue
+89
-51
roomStatistical.vue
src/components/statistics/roomStatistical.vue
+262
-268
No files found.
src/components/statistics/gaoxiao.vue
View file @
9137a792
...
...
@@ -121,16 +121,19 @@
<span>
数据说明
</span>
</div>
<div
style=
"height: 100%;"
class=
"sjsm"
>
<div
v-for=
"(item, index) in order
s
"
:key=
"index"
>
<div
v-for=
"(item, index) in order
List
"
:key=
"index"
>
<div
class=
"left"
>
<img
v-if=
"i
tem.StudentType === 1
"
src=
"../../assets/img/tongji/zaidu.png"
alt
/>
<img
v-
if=
"item.StudentType === 2"
src=
"../../assets/img/tongji/biye.png"
alt
/>
<img
v-if=
"i
ndex === 0
"
src=
"../../assets/img/tongji/zaidu.png"
alt
/>
<img
v-
else
src=
"../../assets/img/tongji/biye.png"
alt
/>
<span
class=
"font-size-12"
>
{{
item
.
StudentTypeName
}}
</span>
</div>
<div
class=
"right"
>
<p>
累计报名
<span
class=
"hight-font"
>
{{
item
.
StudentCount
}}
</span>
人,报名均价为
<span
class=
"hight-font"
>
<span
v-if=
"orders[index] && orders[index].StudentCount"
>
{{
orders
[
index
].
StudentCount
}}
</span>
<span
v-else
>
0
</span>
</span>
人,报名均价为
<span
class=
"hight-font"
>
{{
item
.
Unit_Price
}}
</span>
元
</p>
<!-- 关联购物金额
<span
class=
"hight-font"
>
{{
item
.
TotalMoney
}}
</span>
万, -->
...
...
@@ -193,7 +196,9 @@ export default {
orders
:
[],
discussID
:
12
,
BbsList
:
[],
topOne
:
{}
topOne
:
{},
colorArr
:[
"#0D2481"
,
"#FFA475"
,
"#99BD7B"
,
"#D2C9F1"
,
"#6EBCE2"
],
orderList
:[],
};
},
watch
:
{},
...
...
@@ -222,52 +227,85 @@ export default {
},
GetSexOrderList
()
{
this
.
loading
=
true
;
let
that
=
this
;
this
.
apipost
(
"/api/Statistic/GetStudentShopList"
,
{},
res
=>
{
// this.SexOrder = res.data.data
console
.
log
(
res
.
data
.
data
)
let
m
=
3
-
res
.
data
.
data
.
length
if
(
res
.
data
.
data
.
length
<
3
){
for
(
let
i
=
0
;
i
<
m
;
i
++
)
{
res
.
data
.
data
.
push
({
TotalMoney
:
0
,
StudentCount
:
0
})
}
}
let
contShop
=
res
.
data
.
data
[
0
].
TotalMoney
+
res
.
data
.
data
[
1
].
TotalMoney
+
res
.
data
.
data
[
2
].
TotalMoney
,
zai
=
res
.
data
.
data
[
0
].
TotalMoney
,
bi
=
res
.
data
.
data
[
1
].
TotalMoney
,
ot
=
res
.
data
.
data
[
2
].
TotalMoney
,
contNum
=
res
.
data
.
data
[
0
].
StudentCount
+
res
.
data
.
data
[
1
].
StudentCount
+
res
.
data
.
data
[
2
].
StudentCount
,
zaiN
=
res
.
data
.
data
[
0
].
StudentCount
,
biN
=
res
.
data
.
data
[
1
].
StudentCount
,
otN
=
res
.
data
.
data
[
2
].
StudentCount
;
let
chartData
=
[],
shopChartData
=
[];
chartData
.
push
(((
zaiN
/
contNum
)
*
100
).
toFixed
(
2
));
chartData
.
push
(((
biN
/
contNum
)
*
100
).
toFixed
(
2
));
chartData
.
push
(((
otN
/
contNum
)
*
100
).
toFixed
(
2
));
shopChartData
.
push
({
num
:
Number
(((
zai
/
contShop
)
*
100
).
toFixed
(
2
)),
color
:
"#0D2481"
,
text
:
"高校在读生"
});
shopChartData
.
push
({
num
:
Number
(((
bi
/
contShop
)
*
100
).
toFixed
(
2
)),
color
:
"#FFA475"
,
text
:
"高校毕业生"
});
shopChartData
.
push
({
num
:
Number
(((
ot
/
contShop
)
*
100
).
toFixed
(
2
)),
color
:
"#999"
,
text
:
"非高校"
});
let
chartData
=
[],
shopChartData
=
[];
let
data
=
res
.
data
.
data
;
if
(
data
.
length
==
0
){
chartData
=
[
0
,
0
,
0
,
0
,
0
];
let
strArr
=
this
.
strArr
;
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
shopChartData
.
push
({
num
:
0
,
color
:
that
.
colorArr
[
i
],
text
:
strArr
[
i
]
});
}
}
else
{
this
.
strArr
=
[];
let
contHouse
=
0
;
let
contNum
=
0
;
data
.
forEach
(
item
=>
{
this
.
strArr
.
push
(
item
.
StudentTypeName
);
contHouse
+=
item
.
StudentCount
;
contNum
+=
item
.
TotalMoney
;
})
data
.
forEach
((
item
,
i
)
=>
{
chartData
.
push
(
parseFloat
(((
item
.
StudentCount
/
contHouse
)
*
100
).
toFixed
(
2
)));
shopChartData
.
push
({
num
:
parseFloat
(((
item
.
TotalMoney
/
contNum
)
*
100
).
toFixed
(
2
)),
color
:
that
.
colorArr
[
i
],
text
:
that
.
strArr
[
i
]
});
})
}
// let m=3-res.data.data.length
// if(res.data.data.length
<
3
){
// for (let i = 0; i
<
m
;
i
++
)
{
// res.data.data.push({
// TotalMoney:0,
// StudentCount:0
// })
// }
// }
// let contShop =
// res.data.data[0].TotalMoney +
// res.data.data[1].TotalMoney +
// res.data.data[2].TotalMoney,
// zai = res.data.data[0].TotalMoney,
// bi = res.data.data[1].TotalMoney,
// ot = res.data.data[2].TotalMoney,
// contNum =
// res.data.data[0].StudentCount +
// res.data.data[1].StudentCount +
// res.data.data[2].StudentCount,
// zaiN = res.data.data[0].StudentCount,
// biN = res.data.data[1].StudentCount,
// otN = res.data.data[2].StudentCount;
// let chartData = [],
// shopChartData = [];
// chartData.push(((zaiN / contNum) * 100).toFixed(2));
// chartData.push(((biN / contNum) * 100).toFixed(2));
// chartData.push(((otN / contNum) * 100).toFixed(2));
// shopChartData.push({
// num: Number(((zai / contShop) * 100).toFixed(2)),
// color: "#0D2481",
// text: "高校在读生"
// });
// shopChartData.push({
// num: Number(((bi / contShop) * 100).toFixed(2)),
// color: "#FFA475",
// text: "高校毕业生"
// });
// shopChartData.push({
// num: Number(((ot / contShop) * 100).toFixed(2)),
// color: "#999",
// text: "非高校"
// });
this
.
chartData
=
chartData
;
this
.
shopChartData
=
shopChartData
;
this
.
orders
=
res
.
data
.
data
;
...
...
@@ -277,10 +315,10 @@ export default {
},
getOrders
()
{
this
.
apipost
(
"/api/Statistic/GetStudentOrderList"
,
{},
res
=>
{
console
.
log
(
res
);
res
.
data
.
data
.
forEach
(
x
=>
{
this
.
orders
[
x
.
NewStudentType
-
1
].
LtName
=
x
.
LtName
;
this
.
orders
[
x
.
NewStudentType
-
1
].
Unit_Price
=
x
.
Unit_Price
;
this
.
orderList
=
res
.
data
.
data
;
// this.orders[x.NewStudentType - 1].LtName = x.LtName;
// this.orders[x.NewStudentType - 1].Unit_Price = x.Unit_Price;
});
this
.
loading
=
false
;
});
...
...
src/components/statistics/roomStatistical.vue
View file @
9137a792
This diff is collapsed.
Click to expand it.
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