Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
cloudSystem
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
49a3067c
authored
Oct 10, 2022
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
首页
parent
af9bb67e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
106 additions
and
42 deletions
src/views/Index/index.vue
src/views/Index/index.vue
View file @
49a3067c
...
@@ -105,45 +105,46 @@
...
@@ -105,45 +105,46 @@
<div
class=
"rate-box boxsiz"
>
<div
class=
"rate-box boxsiz"
>
<div
class=
"rate-tab row bothSide verCenter"
>
<div
class=
"rate-tab row bothSide verCenter"
>
<div
class=
"row"
>
<div
class=
"row"
>
<el-radio-group
v-model=
"tabPosition"
@
change=
"change"
>
<el-radio-group
v-model=
"tabPosition"
@
change=
"change(tabPosition,'frqRates')"
>
<el-radio-button
label=
"1"
>
询价报价率
</el-radio-button>
<el-radio-button
label=
"0"
>
询价报价率
</el-radio-button>
<el-radio-button
label=
"1"
>
报价选中率
</el-radio-button>
<el-radio-button
label=
"2"
>
报价选中率
</el-radio-button>
<el-radio-button
label=
"2"
>
报价选中率
</el-radio-button>
<el-radio-button
label=
"3"
>
报价选中率
</el-radio-button>
</el-radio-group>
</el-radio-group>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<el-radio-group
v-model=
"tabDate"
@
change=
"change"
>
<el-radio-group
v-model=
"tabDate"
@
change=
"change
(tabDate,'frqRatesDate')
"
>
<el-radio-button
label=
"
1
"
>
昨日
</el-radio-button>
<el-radio-button
label=
"
0
"
>
昨日
</el-radio-button>
<el-radio-button
label=
"
2
"
>
本周
</el-radio-button>
<el-radio-button
label=
"
1
"
>
本周
</el-radio-button>
<el-radio-button
label=
"
3
"
>
本月
</el-radio-button>
<el-radio-button
label=
"
2
"
>
本月
</el-radio-button>
<el-radio-button
label=
"
4
"
>
本年
</el-radio-button>
<el-radio-button
label=
"
3
"
>
本年
</el-radio-button>
</el-radio-group>
</el-radio-group>
</div>
</div>
</div>
</div>
<div
class=
"progressbar-box"
>
<div
class=
"progressbar-box"
>
<el-progress
:text-inside=
"true"
:stroke-width=
"26"
:percentage=
"
70
"
status=
"warning"
></el-progress>
<el-progress
:text-inside=
"true"
:stroke-width=
"26"
:percentage=
"
percentage
"
status=
"warning"
></el-progress>
</div>
</div>
</div>
</div>
<div
class=
"offer boxsiz"
>
<div
class=
"offer boxsiz"
>
<div
class=
"offer-tab row verCenter bothSide"
>
<div
class=
"offer-tab row verCenter bothSide"
>
<div
class=
"row"
>
<div
class=
"row"
>
<el-radio-group
v-model=
"offerPosition"
@
change=
"change"
>
<el-radio-group
v-model=
"offerPosition"
@
change=
"change
(offerPosition,'offerPosition')
"
>
<el-radio-button
label=
"1"
>
询价量
</el-radio-button>
<el-radio-button
label=
"1"
>
询价量
</el-radio-button>
<el-radio-button
label=
"2"
>
报价量
</el-radio-button>
<el-radio-button
label=
"2"
>
报价量
</el-radio-button>
<el-radio-button
label=
"3"
>
成单量
</el-radio-button>
<el-radio-button
label=
"3"
>
成单量
</el-radio-button>
</el-radio-group>
</el-radio-group>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<el-radio-group
v-model=
"offerDate"
@
change=
"change"
>
<el-radio-group
v-model=
"offerDate"
@
change=
"change(offerDate,'offerDate')"
>
<el-radio-button
label=
"1"
>
本月
</el-radio-button>
<el-radio-button
label=
"1"
>
近7天
</el-radio-button>
<el-radio-button
label=
"2"
>
本年
</el-radio-button>
<el-radio-button
label=
"2"
>
本月
</el-radio-button>
<el-radio-button
label=
"3"
>
本年
</el-radio-button>
</el-radio-group>
</el-radio-group>
</div>
</div>
</div>
</div>
<div
class=
"offer-content row bothSide verCenter"
>
<div
class=
"offer-content row bothSide verCenter"
>
<div
id=
"echarts_box"
class=
"echarts-box"
></div>
<div
id=
"echarts_box"
class=
"echarts-box"
></div>
<div
class=
"list-box"
>
<div
class=
"list-box"
>
<el-table
:data=
"
tableData
"
>
<el-table
:data=
"
inquiry_rank_list
"
>
<el-table-column
prop=
"numbers"
label=
"排名"
align=
"center"
width=
"50"
>
<el-table-column
prop=
"numbers"
label=
"排名"
align=
"center"
width=
"50"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<template
v-if=
"scope.$index==0"
>
<template
v-if=
"scope.$index==0"
>
...
@@ -156,13 +157,13 @@
...
@@ -156,13 +157,13 @@
<span
class=
"three row rowCenter verCenter"
>
3
</span>
<span
class=
"three row rowCenter verCenter"
>
3
</span>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<span
class=
"num row rowCenter verCenter"
>
{{
scope
.
$index
+
1
}}
</span>
<span
class=
"num row rowCenter verCenter"
>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</
template
>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"goods"
label=
"型号"
width=
"180"
></el-table-column>
<el-table-column
prop=
"goods
_name
"
label=
"型号"
width=
"180"
></el-table-column>
<el-table-column
prop=
"brand"
label=
"品牌"
></el-table-column>
<el-table-column
prop=
"brand
_name
"
label=
"品牌"
></el-table-column>
<el-table-column
prop=
"
nums
"
label=
"询价次数"
></el-table-column>
<el-table-column
prop=
"
inquiry_count
"
label=
"询价次数"
></el-table-column>
</el-table>
</el-table>
</div>
</div>
</div>
</div>
...
@@ -185,20 +186,14 @@ export default {
...
@@ -185,20 +186,14 @@ export default {
return
{
return
{
isDisabled
:
true
,
isDisabled
:
true
,
date
:
''
,
date
:
''
,
tabPosition
:
1
,
tabPosition
:
0
,
tabDate
:
1
,
tabDate
:
0
,
offerPosition
:
1
,
offerPosition
:
1
,
offerDate
:
1
,
offerDate
:
1
,
tableData
:
[
percentage
:
0
,
{
numbers
:
1
,
goods
:
'CFD321324ASC12'
,
brand
:
'Ti'
,
nums
:
10
},
inquiry_rank_list
:
[],
{
numbers
:
2
,
goods
:
'CFD321324ASC12'
,
brand
:
'Ti'
,
nums
:
10
},
xAxis
:
[],
{
numbers
:
3
,
goods
:
'CFD321324ASC12'
,
brand
:
'Ti'
,
nums
:
10
},
series
:
[],
{
numbers
:
4
,
goods
:
'CFD321324ASC12'
,
brand
:
'Ti'
,
nums
:
10
},
{
numbers
:
5
,
goods
:
'CFD321324ASC12'
,
brand
:
'Ti'
,
nums
:
10
},
{
numbers
:
6
,
goods
:
'CFD321324ASC12'
,
brand
:
'Ti'
,
nums
:
10
},
{
numbers
:
7
,
goods
:
'CFD321324ASC12'
,
brand
:
'Ti'
,
nums
:
10
},
{
numbers
:
8
,
goods
:
'CFD321324ASC12'
,
brand
:
'Ti'
,
nums
:
10
}
],
data
:
{
data
:
{
weekly_quote_selected_count
:
100
,
weekly_quote_selected_count
:
100
,
weekly_spu_count
:
100
,
weekly_spu_count
:
100
,
...
@@ -218,15 +213,36 @@ export default {
...
@@ -218,15 +213,36 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
getData
();
this
.
getData
();
this
.
getFrqRates
();
this
.
getFrqStatInfo
();
},
},
methods
:
{
methods
:
{
change
(
e
)
{
change
(
index
,
type
)
{
console
.
log
(
e
)
console
.
log
(
index
,
type
)
if
(
type
==
'frqRates'
)
{
this
.
getFrqRates
(
this
.
tabDate
);
}
if
(
type
==
'frqRatesDate'
)
{
this
.
getFrqRates
(
this
.
tabDate
);
}
if
(
type
==
'offerPosition'
)
{
this
.
getFrqStatInfo
(
this
.
offerDate
);
}
if
(
type
==
'offerDate'
)
{
this
.
getFrqStatInfo
(
this
.
offerDate
);
}
},
},
getData
()
{
getFrqRates
(
type
)
{
this
.
$http
(
'get'
,
"/api/statistics/index"
,
{}).
then
(
res
=>
{
//首页询报价比率信息
this
.
$http
(
'GET'
,
"/api/statistics/getFrqRates"
,
{
type
:
type
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
this
.
data
=
res
.
data
if
(
this
.
tabPosition
==
0
)
{
this
.
percentage
=
parseInt
(
res
.
data
.
inquiry_quote_rate
);
}
else
if
(
this
.
tabPosition
==
1
)
{
this
.
percentage
=
parseInt
(
res
.
data
.
quote_selected_rate
);
}
else
if
(
this
.
tabPosition
==
2
)
{
this
.
percentage
=
parseInt
(
res
.
data
.
quote_ordered_rate
);
}
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
res
.
msg
,
message
:
res
.
msg
,
...
@@ -234,22 +250,58 @@ export default {
...
@@ -234,22 +250,58 @@ export default {
});
});
}
}
})
})
},
getFrqStatInfo
(
type
)
{
//首页询报价数量统计信息
this
.
$http
(
'GET'
,
"/api/statistics/getFrqStatInfo"
,
{
type
:
type
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
inquiry_rank_list
=
res
.
data
.
inquiry_rank_list
;
if
(
this
.
offerPosition
==
1
)
{
let
step_name
=
res
.
data
.
inquiry_num_step_list
.
map
(
obj
=>
{
return
obj
.
step_name
;
});
let
step_count
=
res
.
data
.
inquiry_num_step_list
.
map
(
obj
=>
{
return
obj
.
step_count
;
});
this
.
echartsChange
(
step_name
,
step_count
,
'询价量'
);
}
else
if
(
this
.
offerPosition
==
2
)
{
let
step_name
=
res
.
data
.
quote_num_step_list
.
map
(
obj
=>
{
return
obj
.
step_name
;
});
let
step_count
=
res
.
data
.
quote_num_step_list
.
map
(
obj
=>
{
return
obj
.
step_count
;
});
this
.
echartsChange
(
step_name
,
step_count
,
'报价量'
);
}
else
if
(
this
.
offerPosition
==
3
)
{
let
step_name
=
res
.
data
.
order_num_step_list
.
map
(
obj
=>
{
return
obj
.
step_name
;
});
let
step_count
=
res
.
data
.
order_num_step_list
.
map
(
obj
=>
{
return
obj
.
step_count
;
});
this
.
echartsChange
(
step_name
,
step_count
,
'成单量'
);
}
}
else
{
this
.
$message
({
message
:
res
.
msg
,
type
:
'warning'
});
}
})
},
echartsChange
(
xAxis
,
series
,
text
)
{
var
myChart
=
echarts
.
init
(
document
.
getElementById
(
'echarts_box'
));
var
myChart
=
echarts
.
init
(
document
.
getElementById
(
'echarts_box'
));
var
option
=
{
var
option
=
{
title
:
{
text
:
'近七天数据'
},
tooltip
:
{},
tooltip
:
{},
xAxis
:
{
xAxis
:
{
data
:
[
'10-1'
,
'10-2'
,
'10-3'
,
'10-4'
,
'10-5'
,
'10-6'
]
data
:
xAxis
},
},
yAxis
:
{},
yAxis
:
{},
series
:
[
series
:
[
{
{
name
:
'询价量'
,
name
:
text
,
type
:
'bar'
,
type
:
'bar'
,
data
:
[
5
,
20
,
36
,
10
,
10
,
20
]
data
:
series
}
}
]
]
};
};
...
@@ -258,6 +310,18 @@ export default {
...
@@ -258,6 +310,18 @@ export default {
window
.
onresize
=
function
()
{
window
.
onresize
=
function
()
{
myChart
.
resize
();
myChart
.
resize
();
};
};
},
getData
()
{
this
.
$http
(
'get'
,
"/api/statistics/index"
,
{}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
data
=
res
.
data
}
else
{
this
.
$message
({
message
:
res
.
msg
,
type
:
'warning'
});
}
})
}
}
},
},
components
:
{
components
:
{
...
...
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