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
c45eb387
Commit
c45eb387
authored
Mar 30, 2020
by
黄媛媛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
e5941864
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
51 deletions
+89
-51
gaoxiao.vue
src/components/statistics/gaoxiao.vue
+89
-51
No files found.
src/components/statistics/gaoxiao.vue
View file @
c45eb387
...
@@ -121,16 +121,19 @@
...
@@ -121,16 +121,19 @@
<span>
数据说明
</span>
<span>
数据说明
</span>
</div>
</div>
<div
style=
"height: 100%;"
class=
"sjsm"
>
<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"
>
<div
class=
"left"
>
<img
v-if=
"i
tem.StudentType === 1
"
src=
"../../assets/img/tongji/zaidu.png"
alt
/>
<img
v-if=
"i
ndex === 0
"
src=
"../../assets/img/tongji/zaidu.png"
alt
/>
<img
v-
if=
"item.StudentType === 2"
src=
"../../assets/img/tongji/biye.png"
alt
/>
<img
v-
else
src=
"../../assets/img/tongji/biye.png"
alt
/>
<span
class=
"font-size-12"
>
{{
item
.
StudentTypeName
}}
</span>
<span
class=
"font-size-12"
>
{{
item
.
StudentTypeName
}}
</span>
</div>
</div>
<div
class=
"right"
>
<div
class=
"right"
>
<p>
<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>
元
<span
class=
"hight-font"
>
{{
item
.
Unit_Price
}}
</span>
元
</p>
</p>
<!-- 关联购物金额
<span
class=
"hight-font"
>
{{
item
.
TotalMoney
}}
</span>
万, -->
<!-- 关联购物金额
<span
class=
"hight-font"
>
{{
item
.
TotalMoney
}}
</span>
万, -->
...
@@ -193,7 +196,9 @@ export default {
...
@@ -193,7 +196,9 @@ export default {
orders
:
[],
orders
:
[],
discussID
:
12
,
discussID
:
12
,
BbsList
:
[],
BbsList
:
[],
topOne
:
{}
topOne
:
{},
colorArr
:[
"#0D2481"
,
"#FFA475"
,
"#99BD7B"
,
"#D2C9F1"
,
"#6EBCE2"
],
orderList
:[],
};
};
},
},
watch
:
{},
watch
:
{},
...
@@ -222,52 +227,85 @@ export default {
...
@@ -222,52 +227,85 @@ export default {
},
},
GetSexOrderList
()
{
GetSexOrderList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
let
that
=
this
;
this
.
apipost
(
"/api/Statistic/GetStudentShopList"
,
{},
res
=>
{
this
.
apipost
(
"/api/Statistic/GetStudentShopList"
,
{},
res
=>
{
// this.SexOrder = res.data.data
// this.SexOrder = res.data.data
console
.
log
(
res
.
data
.
data
)
console
.
log
(
res
.
data
.
data
)
let
m
=
3
-
res
.
data
.
data
.
length
if
(
res
.
data
.
data
.
length
<
3
){
let
chartData
=
[],
shopChartData
=
[];
for
(
let
i
=
0
;
i
<
m
;
i
++
)
{
let
data
=
res
.
data
.
data
;
res
.
data
.
data
.
push
({
if
(
data
.
length
==
0
){
TotalMoney
:
0
,
chartData
=
[
0
,
0
,
0
,
0
,
0
];
StudentCount
:
0
let
strArr
=
this
.
strArr
;
})
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
}
}
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
({
shopChartData
.
push
({
num
:
Number
(((
bi
/
contShop
)
*
100
).
toFixed
(
2
))
,
num
:
0
,
color
:
"#FFA475"
,
color
:
that
.
colorArr
[
i
]
,
text
:
"高校毕业生"
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
({
shopChartData
.
push
({
num
:
Number
(((
ot
/
contShop
)
*
100
).
toFixed
(
2
)),
num
:
parseFloat
(((
item
.
TotalMoney
/
contNum
)
*
100
).
toFixed
(
2
)),
color
:
"#999"
,
color
:
that
.
colorArr
[
i
]
,
text
:
"非高校"
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
.
chartData
=
chartData
;
this
.
shopChartData
=
shopChartData
;
this
.
shopChartData
=
shopChartData
;
this
.
orders
=
res
.
data
.
data
;
this
.
orders
=
res
.
data
.
data
;
...
@@ -277,10 +315,10 @@ export default {
...
@@ -277,10 +315,10 @@ export default {
},
},
getOrders
()
{
getOrders
()
{
this
.
apipost
(
"/api/Statistic/GetStudentOrderList"
,
{},
res
=>
{
this
.
apipost
(
"/api/Statistic/GetStudentOrderList"
,
{},
res
=>
{
console
.
log
(
res
);
res
.
data
.
data
.
forEach
(
x
=>
{
res
.
data
.
data
.
forEach
(
x
=>
{
this
.
orders
[
x
.
NewStudentType
-
1
].
LtName
=
x
.
LtName
;
this
.
orderList
=
res
.
data
.
data
;
this
.
orders
[
x
.
NewStudentType
-
1
].
Unit_Price
=
x
.
Unit_Price
;
// this.orders[x.NewStudentType - 1].LtName = x.LtName;
// this.orders[x.NewStudentType - 1].Unit_Price = x.Unit_Price;
});
});
this
.
loading
=
false
;
this
.
loading
=
false
;
});
});
...
...
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