Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
HotelProject
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
zhengke
HotelProject
Commits
1d34d1de
Commit
1d34d1de
authored
Feb 12, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d1c0e07c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
78 deletions
+78
-78
Home.vue
src/components/Home.vue
+78
-78
No files found.
src/components/Home.vue
View file @
1d34d1de
...
...
@@ -277,88 +277,88 @@ export default {
getPropertyInStock
(){
let
that
=
this
;
this
.
loading
=
true
;
that
.
apiJavaPost
(
"/api/property/GetPropertyIndexPropertyInStock"
,
this
.
InStockMsg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
===
1
)
{
let
data
=
res
.
data
.
data
;
this
.
InStockData
=
[];
this
.
CategoryNameList
=
[];
this
.
StockMonth
=
[];
let
Newobj
=
{};
data
.
forEach
((
item
,
index1
)
=>
{
this
.
CategoryNameList
.
push
(
item
.
CategoryName
)
if
(
index1
>
4
){
let
name
=
item
.
CategoryName
;
//
that.apiJavaPost("/api/property/GetPropertyIndexPropertyInStock",this.InStockMsg,
//
res => {
//
this.loading=false;
//
if (res.data.resultCode === 1) {
//
let data=res.data.data;
//
this.InStockData=[];
//
this.CategoryNameList=[];
//
this.StockMonth=[];
//
let Newobj={};
//
data.forEach((item,index1) => {
//
this.CategoryNameList.push(item.CategoryName)
//
if(index1>4){
//
let name=item.CategoryName;
Newobj
[
name
]
=
false
;
}
this
.
Stocklegend
=
Newobj
;
item
.
List
.
forEach
((
list
,
index
)
=>
{
if
(
index1
==
0
){
this
.
StockMonth
.
push
(
list
.
Month
)
}
//
Newobj[name]=false;
//
}
//
this.Stocklegend=Newobj;
//
item.List.forEach((list,index) => {
//
if(index1==0){
//
this.StockMonth.push(list.Month)
//
}
});
});
data
.
forEach
((
item
,
index1
)
=>
{
let
arr
=
[];
let
obj
=
{
name
:
item
.
CategoryName
,
data
:
[],
type
:
'line'
,
smooth
:
true
,
areaStyle
:{
normal
:
{
color
:
'#D6F8F8'
//改变区域颜色
}
},
symbolSize
:
10
,
itemStyle
:
{
normal
:
{
borderWidth
:
0
,
borderColor
:
"transparent"
,
lineStyle
:{
color
:
that
.
colorList
[
index1
],
//改变折线颜色
width
:
5
}
}
},
emphasis
:{
itemStyle
:{
borderWidth
:
5
,
borderColor
:
that
.
colorList
[
index1
],
}
},
};
// if(index1==0){
// obj.areaStyle={
// normal: {
// color: '#D6F8F8' //改变区域颜色
// }
// }
// }
item
.
List
.
forEach
(
list
=>
{
this
.
StockMonth
.
forEach
((
month
,
index3
)
=>
{
if
(
list
.
Month
==
month
){
arr
.
push
(
list
.
Number
)
}
obj
.
data
=
arr
;
//
});
//
});
//
data.forEach((item,index1)=> {
//
let arr=[];
//
let obj={
//
name:item.CategoryName,
//
data: [],
//
type: 'line',
//
smooth: true,
//
areaStyle:{
//
normal: {
//
color: '#D6F8F8' //改变区域颜色
//
}
//
},
//
symbolSize: 10,
//
itemStyle : {
//
normal : {
//
borderWidth:0,
//
borderColor:"transparent",
//
lineStyle:{
//
color:that.colorList[index1], //改变折线颜色
//
width:5
//
}
//
}
//
},
//
emphasis:{
//
itemStyle:{
//
borderWidth:5,
//
borderColor:that.colorList[index1],
//
}
//
},
//
};
//
// if(index1==0){
//
// obj.areaStyle={
//
// normal: {
//
// color: '#D6F8F8' //改变区域颜色
//
// }
//
// }
//
// }
//
item.List.forEach(list=> {
//
this.StockMonth.forEach((month,index3)=> {
//
if(list.Month==month){
//
arr.push(list.Number)
//
}
//
obj.data=arr;
});
//
});
});
this
.
InStockData
.
push
(
obj
)
});
setTimeout
(()
=>
{
that
.
LineChart
();
},
1000
)
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
null
);
//
});
//
this.InStockData.push(obj)
//
});
//
setTimeout(()=>{
//
that.LineChart();
//
},1000)
//
} else {
//
this.Error(res.data.message);
//
}
//
},
//
null
//
);
},
LineChart
(){
var
that
=
this
;
...
...
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