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 {
...
@@ -277,88 +277,88 @@ export default {
getPropertyInStock
(){
getPropertyInStock
(){
let
that
=
this
;
let
that
=
this
;
this
.
loading
=
true
;
this
.
loading
=
true
;
that
.
apiJavaPost
(
"/api/property/GetPropertyIndexPropertyInStock"
,
this
.
InStockMsg
,
//
that.apiJavaPost("/api/property/GetPropertyIndexPropertyInStock",this.InStockMsg,
res
=>
{
//
res => {
this
.
loading
=
false
;
//
this.loading=false;
if
(
res
.
data
.
resultCode
===
1
)
{
//
if (res.data.resultCode === 1) {
let
data
=
res
.
data
.
data
;
//
let data=res.data.data;
this
.
InStockData
=
[];
//
this.InStockData=[];
this
.
CategoryNameList
=
[];
//
this.CategoryNameList=[];
this
.
StockMonth
=
[];
//
this.StockMonth=[];
let
Newobj
=
{};
//
let Newobj={};
data
.
forEach
((
item
,
index1
)
=>
{
//
data.forEach((item,index1) => {
this
.
CategoryNameList
.
push
(
item
.
CategoryName
)
//
this.CategoryNameList.push(item.CategoryName)
if
(
index1
>
4
){
//
if(index1>4){
let
name
=
item
.
CategoryName
;
//
let name=item.CategoryName;
Newobj
[
name
]
=
false
;
//
Newobj[name]=false;
}
//
}
this
.
Stocklegend
=
Newobj
;
//
this.Stocklegend=Newobj;
item
.
List
.
forEach
((
list
,
index
)
=>
{
//
item.List.forEach((list,index) => {
if
(
index1
==
0
){
//
if(index1==0){
this
.
StockMonth
.
push
(
list
.
Month
)
//
this.StockMonth.push(list.Month)
}
//
}
});
//
});
});
//
});
data
.
forEach
((
item
,
index1
)
=>
{
//
data.forEach((item,index1)=> {
let
arr
=
[];
//
let arr=[];
let
obj
=
{
//
let obj={
name
:
item
.
CategoryName
,
//
name:item.CategoryName,
data
:
[],
//
data: [],
type
:
'line'
,
//
type: 'line',
smooth
:
true
,
//
smooth: true,
areaStyle
:{
//
areaStyle:{
normal
:
{
//
normal: {
color
:
'#D6F8F8'
//改变区域颜色
//
color: '#D6F8F8' //改变区域颜色
}
//
}
},
//
},
symbolSize
:
10
,
//
symbolSize: 10,
itemStyle
:
{
//
itemStyle : {
normal
:
{
//
normal : {
borderWidth
:
0
,
//
borderWidth:0,
borderColor
:
"transparent"
,
//
borderColor:"transparent",
lineStyle
:{
//
lineStyle:{
color
:
that
.
colorList
[
index1
],
//改变折线颜色
//
color:that.colorList[index1], //改变折线颜色
width
:
5
//
width:5
}
//
}
}
//
}
},
//
},
emphasis
:{
//
emphasis:{
itemStyle
:{
//
itemStyle:{
borderWidth
:
5
,
//
borderWidth:5,
borderColor
:
that
.
colorList
[
index1
],
//
borderColor:that.colorList[index1],
}
//
}
},
//
},
};
//
};
// if(index1==0){
//
// if(index1==0){
// obj.areaStyle={
//
// obj.areaStyle={
// normal: {
//
// normal: {
// color: '#D6F8F8' //改变区域颜色
//
// color: '#D6F8F8' //改变区域颜色
// }
//
// }
// }
//
// }
// }
//
// }
item
.
List
.
forEach
(
list
=>
{
//
item.List.forEach(list=> {
this
.
StockMonth
.
forEach
((
month
,
index3
)
=>
{
//
this.StockMonth.forEach((month,index3)=> {
if
(
list
.
Month
==
month
){
//
if(list.Month==month){
arr
.
push
(
list
.
Number
)
//
arr.push(list.Number)
}
//
}
obj
.
data
=
arr
;
//
obj.data=arr;
});
//
});
});
//
});
this
.
InStockData
.
push
(
obj
)
//
this.InStockData.push(obj)
});
//
});
setTimeout
(()
=>
{
//
setTimeout(()=>{
that
.
LineChart
();
//
that.LineChart();
},
1000
)
//
},1000)
}
else
{
//
} else {
this
.
Error
(
res
.
data
.
message
);
//
this.Error(res.data.message);
}
//
}
},
//
},
null
//
null
);
//
);
},
},
LineChart
(){
LineChart
(){
var
that
=
this
;
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