Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
6b123254
提交
6b123254
authored
12月 30, 2024
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
style(bi/cmm/lineandbar): 修复移动端显示问题
蝉妈妈图表可以根据网页宽度改变自适应,图表也自适应等
上级
36f67c0c
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
31 行增加
和
27 行删除
+31
-27
index.vue
src/components/LevitatedSphere/index.vue
+11
-11
LineAndBar.vue
src/views/bi/competitor/cmm/LineAndBar.vue
+16
-11
index.vue
src/views/bi/competitor/cmm/index.vue
+1
-1
index.vue
src/views/bi/competitor/index.vue
+3
-3
index.vue
src/views/bi/competitor/sycm_store/index.vue
+0
-1
没有找到文件。
src/components/LevitatedSphere/index.vue
浏览文件 @
6b123254
...
@@ -59,18 +59,10 @@ export default {
...
@@ -59,18 +59,10 @@ export default {
};
};
},
},
created
()
{
created
()
{
this
.
clientWidth
=
document
.
documentElement
.
clientWidth
;
this
.
resize
()
this
.
clientHeight
=
document
.
documentElement
.
clientHeight
;
this
.
left
=
this
.
clientWidth
-
this
.
itemWidth
-
this
.
gapWidth
;
this
.
top
=
this
.
clientHeight
*
this
.
coefficientHeight
;
},
},
mounted
()
{
mounted
()
{
window
.
addEventListener
(
'resize'
,
()
=>
{
window
.
addEventListener
(
'resize'
,
this
.
resize
)
this
.
clientWidth
=
document
.
documentElement
.
clientWidth
;
this
.
clientHeight
=
document
.
documentElement
.
clientHeight
;
this
.
left
=
this
.
clientWidth
-
this
.
itemWidth
-
this
.
gapWidth
;
this
.
top
=
this
.
clientHeight
*
this
.
coefficientHeight
;
})
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
const
sphereBtn
=
this
.
$refs
.
levitatedSphere
;
const
sphereBtn
=
this
.
$refs
.
levitatedSphere
;
let
isDown
=
false
let
isDown
=
false
...
@@ -109,9 +101,17 @@ export default {
...
@@ -109,9 +101,17 @@ export default {
});
});
});
});
},
},
beforeDestroy
()
{
window
.
removeEventListener
(
'resize'
,
this
.
resize
)
},
methods
:
{
methods
:
{
resize
()
{
this
.
clientWidth
=
document
.
documentElement
.
clientWidth
;
this
.
clientHeight
=
document
.
documentElement
.
clientHeight
;
this
.
left
=
this
.
clientWidth
-
this
.
itemWidth
-
this
.
gapWidth
;
this
.
top
=
this
.
clientHeight
*
this
.
coefficientHeight
;
},
handleClick
()
{
handleClick
()
{
console
.
log
(
this
.
downPoint
.
x
,
this
.
upPoint
.
x
,
this
.
downPoint
.
y
,
this
.
upPoint
.
y
)
if
(
this
.
downPoint
.
x
===
this
.
upPoint
.
x
&&
this
.
downPoint
.
y
===
this
.
upPoint
.
y
)
{
if
(
this
.
downPoint
.
x
===
this
.
upPoint
.
x
&&
this
.
downPoint
.
y
===
this
.
upPoint
.
y
)
{
this
.
drawer
=
!
this
.
drawer
this
.
drawer
=
!
this
.
drawer
}
}
...
...
src/views/bi/competitor/cmm/LineAndBar.vue
浏览文件 @
6b123254
...
@@ -32,7 +32,7 @@ const props = defineProps({
...
@@ -32,7 +32,7 @@ const props = defineProps({
const
echartsRef
=
ref
(
null
)
const
echartsRef
=
ref
(
null
)
const
chart
=
shallowRef
(
null
)
const
chart
=
shallowRef
(
null
)
const
myThousand
=
ref
(
false
)
// 是否显示万单位
let
myThousand
=
false
// 是否显示万单位
const
setOptions
=
()
=>
{
const
setOptions
=
()
=>
{
// 计算 y 轴显示
// 计算 y 轴显示
...
@@ -45,13 +45,13 @@ const setOptions = () => {
...
@@ -45,13 +45,13 @@ const setOptions = () => {
},
},
axisLabel
:
{
axisLabel
:
{
formatter
(
value
)
{
formatter
(
value
)
{
return
formatNumberWithUnit
(
value
,
'元'
,
myThousand
.
value
,
true
)
return
formatNumberWithUnit
(
value
,
'元'
,
myThousand
,
true
)
}
}
},
},
axisPointer
:
{
axisPointer
:
{
label
:
{
label
:
{
formatter
:
(
params
)
=>
{
formatter
:
(
params
)
=>
{
return
formatNumberWithUnit
(
params
.
value
,
'元'
,
myThousand
.
value
,
true
)
return
formatNumberWithUnit
(
params
.
value
,
'元'
,
myThousand
,
true
)
}
}
}
}
}
}
...
@@ -64,13 +64,13 @@ const setOptions = () => {
...
@@ -64,13 +64,13 @@ const setOptions = () => {
},
},
axisLabel
:
{
axisLabel
:
{
formatter
(
value
)
{
formatter
(
value
)
{
return
formatNumberWithUnit
(
value
,
'人'
,
myThousand
.
value
,
true
)
return
formatNumberWithUnit
(
value
,
'人'
,
myThousand
,
true
)
}
}
},
},
axisPointer
:
{
axisPointer
:
{
label
:
{
label
:
{
formatter
:
(
params
)
=>
{
formatter
:
(
params
)
=>
{
return
formatNumberWithUnit
(
params
.
value
,
'人'
,
myThousand
.
value
,
true
)
return
formatNumberWithUnit
(
params
.
value
,
'人'
,
myThousand
,
true
)
}
}
}
}
}
}
...
@@ -113,7 +113,7 @@ const setOptions = () => {
...
@@ -113,7 +113,7 @@ const setOptions = () => {
title
:
'切换万单位'
,
title
:
'切换万单位'
,
icon
:
'path://M50,50 L100,50 L100,100 L150,100 L150,150 L100,150 L100,200 L50,200 L50,150 L0,150 L0,100 L50,100 Z'
,
icon
:
'path://M50,50 L100,50 L100,100 L150,100 L150,150 L100,150 L100,200 L50,200 L50,150 L0,150 L0,100 L50,100 Z'
,
onclick
:
()
=>
{
onclick
:
()
=>
{
myThousand
.
value
=
!
myThousand
.
value
myThousand
=
!
myThousand
setOptions
()
setOptions
()
}
}
}
}
...
@@ -134,9 +134,9 @@ const setOptions = () => {
...
@@ -134,9 +134,9 @@ const setOptions = () => {
var
color
=
item
.
color
;
var
color
=
item
.
color
;
// 拼接提示内容
// 拼接提示内容
if
(
item
.
seriesName
.
split
(
'-'
)[
1
]
===
'销售额'
)
{
if
(
item
.
seriesName
.
split
(
'-'
)[
1
]
===
'销售额'
)
{
tooltip
+=
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:'
+
color
+
';"></span>'
+
item
.
seriesName
+
': '
+
formatNumberWithUnit
(
item
.
value
,
'元'
,
myThousand
.
value
)
+
'<br>'
;
tooltip
+=
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:'
+
color
+
';"></span>'
+
item
.
seriesName
+
': '
+
formatNumberWithUnit
(
item
.
value
,
'元'
,
myThousand
)
+
'<br>'
;
}
else
if
(
item
.
seriesName
.
split
(
'-'
)[
1
]
===
'观看人次'
)
{
}
else
if
(
item
.
seriesName
.
split
(
'-'
)[
1
]
===
'观看人次'
)
{
tooltip
+=
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:'
+
color
+
';"></span>'
+
item
.
seriesName
+
': '
+
formatNumberWithUnit
(
item
.
value
,
'人'
,
myThousand
.
value
)
+
'<br>'
;
tooltip
+=
'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:'
+
color
+
';"></span>'
+
item
.
seriesName
+
': '
+
formatNumberWithUnit
(
item
.
value
,
'人'
,
myThousand
)
+
'<br>'
;
}
}
});
});
return
tooltip
;
return
tooltip
;
...
@@ -161,8 +161,8 @@ const setOptions = () => {
...
@@ -161,8 +161,8 @@ const setOptions = () => {
}
}
watchEffect(() => {
watchEffect(() => {
if (!chart.value) return
if (!chart.value
|| props.chartData.series.length === 0
) return
myThousand
.value
= props.chartData.series?.some(o => {
myThousand = props.chartData.series?.some(o => {
return o.data.some(num => num >= 10000)
return o.data.some(num => num >= 10000)
})
})
setOptions()
setOptions()
...
@@ -170,18 +170,23 @@ watchEffect(() => {
...
@@ -170,18 +170,23 @@ watchEffect(() => {
const initChart = () => {
const initChart = () => {
chart.value = echarts.init(echartsRef.value)
chart.value = echarts.init(echartsRef.value)
setOptions()
}
const resize = () => {
chart.value.resize()
}
}
onMounted(() => {
onMounted(() => {
nextTick(() => {
nextTick(() => {
initChart()
initChart()
window.addEventListener('
resize
', resize)
})
})
})
})
onBeforeUnmount(() => {
onBeforeUnmount(() => {
if (!chart.value) {
if (!chart.value) {
return
return
}
}
window.removeEventListener('
resize
', resize)
chart.value.dispose()
chart.value.dispose()
chart.value = null
chart.value = null
})
})
...
...
src/views/bi/competitor/cmm/index.vue
浏览文件 @
6b123254
...
@@ -252,7 +252,7 @@ const reset = async () => {
...
@@ -252,7 +252,7 @@ const reset = async () => {
<
style
scoped
<
style
scoped
lang=
"scss"
>
lang=
"scss"
>
.tabs-container
{
.tabs-container
{
height
:
100%
;
min-
height
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
...
...
src/views/bi/competitor/index.vue
浏览文件 @
6b123254
...
@@ -30,20 +30,20 @@ const activeName = ref(list.value[0].name)
...
@@ -30,20 +30,20 @@ const activeName = ref(list.value[0].name)
<
style
scoped
<
style
scoped
lang=
"scss"
>
lang=
"scss"
>
.app-container
{
.app-container
{
height
:
calc
(
100vh
-
84px
);
min-
height
:
calc
(
100vh
-
84px
);
.tabs
{
.tabs
{
background
:
var
(
--
el-bg-color-overlay
);
background
:
var
(
--
el-bg-color-overlay
);
padding
:
20px
;
padding
:
20px
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
height
:
100%
;
min-
height
:
100%
;
::v-deep
(
.el-tabs__content
)
{
::v-deep
(
.el-tabs__content
)
{
flex
:
1
;
flex
:
1
;
.el-tab-pane
{
.el-tab-pane
{
height
:
100%
;
min-
height
:
100%
;
}
}
}
}
...
...
src/views/bi/competitor/sycm_store/index.vue
浏览文件 @
6b123254
...
@@ -200,7 +200,6 @@ const filterData = () => {
...
@@ -200,7 +200,6 @@ const filterData = () => {
// // 初始化时间
// // 初始化时间
// allChartData.xAxis = generatorDayList(queryParams.date[0], queryParams.date[1])
// allChartData.xAxis = generatorDayList(queryParams.date[0], queryParams.date[1])
const
data
=
await
getList
()
const
data
=
await
getList
()
console
.
log
(
data
)
// 直播间列表
// 直播间列表
brandList
.
value
=
data
.
map
(
list
=>
list
[
0
].
platformStore
)
brandList
.
value
=
data
.
map
(
list
=>
list
[
0
].
platformStore
)
// 初始化筛选条件(默认请求第一个店铺的第一类型数据)
// 初始化筛选条件(默认请求第一个店铺的第一类型数据)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论