Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
enterprise-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
enterprise-platform
Commits
7c3f3634
Commit
7c3f3634
authored
Sep 20, 2023
by
王晓旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页接口对接
parent
ce6fb0a2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
174 deletions
+89
-174
enterprise-manager-ui/admin/src/views/Home.vue
enterprise-manager-ui/admin/src/views/Home.vue
+79
-112
enterprise-manager-ui/admin/src/views/home/bar.vue
enterprise-manager-ui/admin/src/views/home/bar.vue
+5
-37
enterprise-manager-ui/admin/src/views/home/line.vue
enterprise-manager-ui/admin/src/views/home/line.vue
+2
-3
enterprise-manager-ui/admin/src/views/home/pie.vue
enterprise-manager-ui/admin/src/views/home/pie.vue
+3
-22
No files found.
enterprise-manager-ui/admin/src/views/Home.vue
View file @
7c3f3634
...
...
@@ -7,31 +7,31 @@
<div
class=
"header"
>
<div
class=
"hc-itme"
>
<div
class=
"i-title"
>
企业总量(家)
</div>
<div
class=
"i-num"
>
5
</div>
<div
class=
"i-num"
>
{{
enterpriseNums
}}
</div>
</div>
<div
class=
"hc-itme"
>
<div
class=
"i-title"
>
产品数量(个)
</div>
<div
class=
"i-num"
>
35
</div>
<div
class=
"i-num"
>
{{
productNums
}}
</div>
</div>
<div
class=
"hc-itme"
>
<div
class=
"i-title"
>
员工数量(人)
</div>
<div
class=
"i-num"
>
48
</div>
<div
class=
"i-num"
>
{{
staffNums
}}
</div>
</div>
<div
class=
"hc-itme"
>
<div
class=
"i-title"
>
新闻数量(篇)
</div>
<div
class=
"i-num"
>
89
</div>
<div
class=
"i-num"
>
{{
newsNums
}}
</div>
</div>
<div
class=
"hc-itme"
>
<div
class=
"i-title"
>
反馈数量(次)
</div>
<div
class=
"i-num"
>
65
</div>
<div
class=
"i-num"
>
{{
feedbackNums
}}
</div>
</div>
<div
class=
"hc-itme"
>
<div
class=
"i-title"
>
用户数量(次)
</div>
<div
class=
"i-num"
>
156
</div>
<div
class=
"i-num"
>
{{
customerNums
}}
</div>
</div>
</div>
</div>
...
...
@@ -92,114 +92,81 @@ export default {
data
()
{
return
{
classList
:
"
page page-home
"
,
// barDayValue: [{ nums: 1, age_area: "31-40岁" }],
lineDayValue
:
[
{
datetime
:
"
08:00:00-09:00:00
"
,
count
:
0
},
{
datetime
:
"
09:00:00-10:00:00
"
,
count
:
0
},
{
datetime
:
"
10:00:00-11:00:00
"
,
count
:
0
},
{
datetime
:
"
11:00:00-12:00:00
"
,
count
:
0
},
{
datetime
:
"
12:00:00-13:00:00
"
,
count
:
0
},
{
datetime
:
"
13:00:00-14:00:00
"
,
count
:
0
},
{
datetime
:
"
14:00:00-15:00:00
"
,
count
:
4
},
{
datetime
:
"
15:00:00-16:00:00
"
,
count
:
1
},
{
datetime
:
"
16:00:00-17:00:00
"
,
count
:
0
},
{
datetime
:
"
17:00:00-18:00:00
"
,
count
:
0
},
{
datetime
:
"
18:00:00-19:00:00
"
,
count
:
0
}
],
cpfbDayValue
:
[
{
value
:
5
,
name
:
"
四川思迈尔网络科技有限公司
"
},
{
value
:
10
,
name
:
"
四川恒生信达科技有限公司
"
},
{
value
:
10
,
name
:
"
四川信宏翔科技有限公司
"
},
{
value
:
6
,
name
:
"
武汉力龙信息科技股份有限公司
"
},
{
value
:
32
,
name
:
"
四川力龙恒生科技股份有限公司
"
}
],
mpfbDayValue
:
[
{
value
:
5
,
name
:
"
四川思迈尔网络科技有限公司
"
},
{
value
:
10
,
name
:
"
四川恒生信达科技有限公司
"
},
{
value
:
10
,
name
:
"
四川信宏翔科技有限公司
"
},
{
value
:
6
,
name
:
"
武汉力龙信息科技股份有限公司
"
},
{
value
:
32
,
name
:
"
四川力龙恒生科技股份有限公司
"
}
],
xwfbDayValue
:
[
{
value
:
33
,
name
:
"
集团频道
"
},
{
value
:
56
,
name
:
"
产品频道
"
},
{
value
:
89
,
name
:
"
机器人频道
"
}
]
barDayValue
:
[],
lineDayValue
:
[],
cpfbDayValue
:
[],
mpfbDayValue
:
[],
xwfbDayValue
:
[],
enterpriseNums
:
"
--
"
,
productNums
:
"
--
"
,
staffNums
:
"
--
"
,
newsNums
:
"
--
"
,
feedbackNums
:
"
--
"
,
customerNums
:
"
--
"
};
},
created
()
{}
created
()
{
this
.
getData
();
},
methods
:
{
getData
()
{
this
.
$post
(
"
/company/stat
"
).
then
(
res
=>
{
const
{
data
,
code
}
=
res
;
if
(
code
==
1
)
{
this
.
enterpriseNums
=
data
.
enterpriseNums
;
this
.
productNums
=
data
.
productNums
;
this
.
staffNums
=
data
.
staffNums
;
this
.
newsNums
=
data
.
newsNums
;
this
.
feedbackNums
=
data
.
feedbackNums
;
this
.
customerNums
=
data
.
customerNums
;
this
.
lineDayValue
=
data
.
accessStatList
?
data
.
accessStatList
:
[];
this
.
barDayValue
=
data
.
businessCardDistributionList
?
data
.
businessCardDistributionList
:
[];
if
(
data
.
newsDistributionList
.
length
>
0
)
{
let
arr
=
[];
data
.
newsDistributionList
.
forEach
(
item
=>
{
arr
.
push
({
name
:
item
.
name
,
value
:
item
.
newsNums
});
});
this
.
xwfbDayValue
=
arr
}
else
{
this
.
xwfbDayValue
=
[];
}
if
(
data
.
productDistributionList
.
length
>
0
)
{
let
arr
=
[];
data
.
productDistributionList
.
forEach
(
item
=>
{
arr
.
push
({
name
:
item
.
companyName
,
value
:
item
.
productNums
});
});
this
.
cpfbDayValue
=
arr
}
else
{
this
.
cpfbDayValue
=
[];
}
if
(
data
.
sendCardStaffList
.
length
>
0
)
{
let
arr
=
[];
data
.
sendCardStaffList
.
forEach
(
item
=>
{
arr
.
push
({
name
:
item
.
name
,
value
:
item
.
sumViews
});
});
this
.
mpfbDayValue
=
arr
}
else
{
this
.
mpfbDayValue
=
[];
}
}
});
}
}
};
</
script
>
<
style
scoped
lang=
"less"
>
...
...
enterprise-manager-ui/admin/src/views/home/bar.vue
View file @
7c3f3634
...
...
@@ -9,32 +9,7 @@ export default {
props
:
{
info
:
{
type
:
Array
,
default
:
()
=>
[
{
value
:
200
,
name
:
"
员工1
"
,
},
{
value
:
400
,
name
:
"
员工2
"
,
},
{
value
:
600
,
name
:
"
员工3
"
,
},
{
value
:
500
,
name
:
"
员工4
"
,
},
{
value
:
260
,
name
:
"
员工5
"
,
},
{
value
:
100
,
name
:
"
员工6
"
,
},
],
default
:
()
=>
[],
},
option
:
{
type
:
Object
,
...
...
@@ -46,8 +21,8 @@ export default {
},
},
watch
:
{
day
(
newval
,
oldval
)
{
newval
?
this
.
getData
()
:
""
;
info
(
)
{
this
.
getData
()
},
},
async
mounted
()
{
...
...
@@ -55,15 +30,8 @@ export default {
},
methods
:
{
async
getData
()
{
// let res = await getStatisticAges({
// selected: this.day == 5 ? null : this.day,
// });
// if (res.code != 1) return;
// let label = res.data.map((item) => item.age_area);
// let value = res.data.map((item) => item.nums);
let
label
=
this
.
info
.
map
((
item
)
=>
item
.
name
);
let
value
=
this
.
info
.
map
((
item
)
=>
item
.
value
);
let
label
=
this
.
info
.
map
((
item
)
=>
item
.
companyName
);
let
value
=
this
.
info
.
map
((
item
)
=>
item
.
businessCardNums
);
this
.
_initEcharts
(
label
,
value
);
},
_initEcharts
(
label
,
value
)
{
...
...
enterprise-manager-ui/admin/src/views/home/line.vue
View file @
7c3f3634
...
...
@@ -29,10 +29,9 @@ export default {
const
VALUE
=
[];
const
myChart
=
this
.
$echarts
.
init
(
this
.
$el
);
const
echarts
=
this
.
$echarts
;
console
.
log
(
123123
,
this
.
info
);
this
.
info
.
forEach
((
item
)
=>
{
NAME
.
push
(
item
.
date
time
);
VALUE
.
push
(
item
.
count
);
NAME
.
push
(
item
.
date
Str
);
VALUE
.
push
(
item
.
nums
);
});
let
option
=
{
legend
:
{
...
...
enterprise-manager-ui/admin/src/views/home/pie.vue
View file @
7c3f3634
...
...
@@ -9,16 +9,7 @@ export default {
props
:
{
info
:
{
type
:
Array
,
default
:
()
=>
[
{
value
:
300
,
name
:
"
女士
"
,
},
{
value
:
700
,
name
:
"
男士
"
,
},
],
default
:
()
=>
[],
},
option
:
{
type
:
Object
,
...
...
@@ -30,8 +21,8 @@ export default {
},
},
watch
:
{
day
(
newval
,
oldval
)
{
newval
?
this
.
getData
()
:
""
;
info
(
newval
,
oldval
)
{
this
.
getData
()
},
},
mounted
()
{
...
...
@@ -39,16 +30,6 @@ export default {
},
methods
:
{
async
getData
()
{
// let res = await getStatisticSexual({
// selected: this.day == 5 ? null : this.day,
// });
// if (res.code != 1) return;
// let value = res.data.map(({ idcard_Sex, nums }) => ({
// name: idcard_Sex,
// value: nums,
// }));
// this._initEcharts(value);
console
.
log
(
this
.
info
);
this
.
_initEcharts
(
this
.
info
);
},
_initEcharts
(
value
)
{
...
...
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