Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ac36651c
authored
Sep 04, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
样式bug修复
1 parent
fb9facad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
packagesList/packageOutput/components/echart/echart.js
packagesList/packageOutput/components/outputEchart/outputEchart.wxml
packagesList/packageOutput/components/echart/echart.js
View file @
ac36651
...
...
@@ -75,26 +75,28 @@ Component({
upgradeAveragePriceList
.
push
(
tabIndex
==
0
?
element
.
upgradeAveragePrice
:
element
.
avgPrice
)
upgradeRateList
.
push
(
element
.
upgradeRate
||
0
)
})
// 使用 Math.max 方法找到数组中的最大值
const
max
=
Math
.
max
(...
orderMoneyTotalList
)
// console.log(orderMoneyTotalList, 'orderMoneyTotalList')
const
colors
=
[
'#3582EE'
,
'#35C376'
,
'#FF9D0A'
]
var
option
=
{
color
:
colors
,
grid
:
{
left
:
'2
5%'
,
left
:
max
>
100000
?
'25%'
:
'1
5%'
,
right
:
'15%'
},
tooltip
:
{
trigger
:
'axis'
,
formatter
:
function
(
params
)
{
console
.
log
(
params
,
'formatter'
);
formatter
:
function
(
params
)
{
console
.
log
(
params
,
'formatter'
)
// debugger
// + '\n'
var
html
=
params
[
0
].
name
html
+=
'\n'
for
(
var
i
=
0
;
i
<
params
.
length
;
i
++
)
{
let
unit
=
i
+
1
==
params
.
length
?
''
:
'\n'
let
unit
=
i
+
1
==
params
.
length
?
''
:
'\n'
let
template
=
params
[
i
].
marker
+
params
[
i
].
seriesName
+
':'
+
' '
+
params
[
i
].
value
if
(
option
.
series
[
params
[
i
].
seriesIndex
].
valueType
==
'percent
'
)
{
if
(
option
.
series
[
params
[
i
].
seriesIndex
].
name
==
'转化率
'
)
{
template
=
template
+
'%'
+
unit
}
else
{
template
=
template
+
unit
...
...
@@ -102,7 +104,7 @@ Component({
html
+=
template
}
// html += params[0].name
console
.
log
(
html
,
'html'
);
console
.
log
(
html
,
'html'
)
return
html
}
},
...
...
packagesList/packageOutput/components/outputEchart/outputEchart.wxml
View file @
ac36651
...
...
@@ -29,11 +29,11 @@
<view class="td">
<view class="label">较去年</view>
<view class="flex">
<view
:
class="{{ revenueData[item.name].revenueToClassYear }}">{{revenueData[item.name].comparedWithLastYear }}</view>
<view class="{{ revenueData[item.name].revenueToClassYear }}">{{revenueData[item.name].comparedWithLastYear }}</view>
<image
wx:if="{{ revenueData[item.name].revenueToClassYear }}"
class="icon-up-down"
src="../../images/icon-
'
{{ revenueData[item.name].revenueToClassYear }}.png"
src="../../images/icon-{{ revenueData[item.name].revenueToClassYear }}.png"
/>
</view>
</view>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment