Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨炀
/
dangan_dataV
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
5a091cb6
authored
2025-07-29 18:02:18 +0800
by
zrj
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
daping zonggongsi
1 parent
43ee9327
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
154 additions
and
56 deletions
src/assets/image/rmb.png
src/viewsPc/home.vue
src/viewsPc/vip/centerPage.vue
src/viewsPc/vip/components/information.vue
src/viewsPc/vip/leftPage.vue
src/viewsPc/vip/rightPage.vue
src/viewsPc/vip/scrollingData.vue
src/assets/image/rmb.png
0 → 100644
View file @
5a091cb
10.6 KB
src/viewsPc/home.vue
View file @
5a091cb
<
template
>
<div
class=
"main"
>
<el-row
class=
"w100"
>
<el-col
v-if=
"obj.IFBASE"
:span=
"
type=='否'?8:12
"
>
<el-col
v-if=
"obj.IFBASE"
:span=
"
8
"
>
<left-page
:obj=
"obj"
:type=
"type"
:url=
"result"
/>
</el-col>
<el-col
v-if=
"
type=='否'
"
:span=
"8"
>
<center-page
:obj=
"obj"
:type=
"type=='否'"
:url=
"result"
/>
<el-col
v-if=
"
obj.IFBASE
"
:span=
"8"
>
<center-page
:obj=
"obj"
:
isLeader=
"isLeader"
:
type=
"type=='否'"
:url=
"result"
/>
</el-col>
<el-col
v-if=
"obj.IFBASE"
:span=
"
type=='否'?8:12
"
>
<el-col
v-if=
"obj.IFBASE"
:span=
"
8
"
>
<right-page
:obj=
"obj"
:type=
"type"
:url=
"result"
/>
</el-col>
</el-row>
...
...
@@ -28,15 +28,22 @@ const url = ref()
const
obj
=
ref
({})
const
result
=
ref
()
const
router
=
useRouter
()
// url.value = 'http://192.168.1.152:8899/login/sid=a3afc265-1e60-4376-bcfb-6ca124db8704#/'
url
.
value
=
window
.
location
.
href
let
isLeader
=
ref
(
false
)
url
.
value
=
'http://192.168.1.152:8899/login/sid=3e6ac454-6d9a-4f37-a593-d06c65703792#/'
// url.value = window.location.href
result
.
value
=
url
.
value
?.
split
(
'='
)[
1
]?.
split
(
'#'
)[
0
];
function
validateEmail
(
email
)
{
const
re
=
/^
(([^
<>()[
\]\\
.,;:
\s
@"
]
+
(\.[^
<>()[
\]\\
.,;:
\s
@"
]
+
)
*
)
|
(
".+"
))
@
((\[[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\])
|
(([
a-zA-Z
\-
0-9
]
+
\.)
+
[
a-zA-Z
]{2,}))
$/
;
return
re
.
test
(
String
(
email
).
toLowerCase
());
}
onMounted
(()
=>
{
console
.
log
(
url
.
value
)
console
.
log
(
result
.
value
)
if
(
result
.
value
)
{
handelGetYS000
()
isLeader
.
value
=
validateEmail
(
result
.
value
)
}
else
{
// result.value = 'a3afc265-1e60-4376-bcfb-6ca124db8704'
// handelGetYS000()
...
...
src/viewsPc/vip/centerPage.vue
View file @
5a091cb
...
...
@@ -28,9 +28,9 @@
</div>
<div
ref=
"bing1"
style=
"width: 100%;height:13.3vh;"
>
</div>
<div
class=
"bingBottom heiti"
>
<div
style=
"text-align: center"
>
{{
`${dayjs().format('YYYY')
}
年`
}}
营业收入
<
br
>
(
万元
)
<
/div
>
<
/div
>
<!--
<div
class=
"bingBottom heiti"
>
--
>
<!--
<div
style=
"text-align: center"
>
{{
`${dayjs().format('YYYY')
}
年`
}}
营业收入
<
br
>
(
万元
)
<
/div>--
>
<!--
<
/div>--
>
<
/div
>
<
div
ref
=
"zhuRef1"
class
=
"zhu"
style
=
"width:70%;height: 17.3vh"
/>
<
/div
>
...
...
@@ -46,11 +46,11 @@
<
/div
>
<
div
ref
=
"bing2"
style
=
"width: 100%;height:13.3vh;"
>
<
/div
>
<
div
class
=
"bingBottom"
>
<
div
style
=
"text-align: center;"
>
{{
`${dayjs().format('YYYY')
}
年${dayjs().format('MM')
}
月`
}}
前
<
br
>
累计应收余额
<
br
>
(
万元
)
<
/div
>
<
/div
>
<!--
<
div
class
=
"bingBottom"
>--
>
<!--
<
div
style
=
"text-align: center;"
>
{{
`${dayjs().format('YYYY')
}
年${dayjs().format('MM')
}
月`
}}
前
<
br
>--
>
<!--
累计应收余额
<
br
>
(
万元
)
-->
<!--
<
/div>--
>
<!--
<
/div>--
>
<
/div
>
<
div
ref
=
"zhuRef2"
class
=
"zhu"
style
=
"width:70%;height: 17.3vh"
/>
<
/div
>
...
...
@@ -64,12 +64,13 @@
<
span
><
img
alt
=
""
class
=
"titleImg"
src
=
"@/assets/image/title_bg.png"
><
/span
>
现金余额
<
/div
>
<
div
ref
=
"bing3"
style
=
"width: 100%;height:13.3vh;"
>
<
/div
>
<
div
class
=
"bingBottom"
>
<
div
style
=
"text-align: center"
>
{{
`${dayjs().format('YYYY')
}
年${dayjs().format('MM')
}
月`
}}
前
<
br
>
累计现金余额
<
br
>
(
万元
)
<
/div
>
<
/div
>
<
div
class
=
"bingImg"
style
=
"width: 100%;height:13.3vh;"
>
{{
bing_number3
}}
<
/div
>
<!--
<
div
ref
=
"bing3"
style
=
"width: 100%;height:13.3vh;"
>-->
<!--
<
/div>--
>
<!--
<
div
class
=
"bingBottom"
>-->
<!--
<
div
style
=
"text-align: center"
>
{{
`${dayjs().format('YYYY')
}
年${dayjs().format('MM')
}
月`
}}
前
<
br
>
累计现金余额
<
br
>
(
万元
)
-->
<!--
<
/div>--
>
<!--
<
/div>--
>
<
/div
>
<
div
ref
=
"zhuRef3"
class
=
"zhu"
style
=
"width:70%;height: 17.3vh"
/>
<
/div
>
...
...
@@ -97,7 +98,7 @@ import {autoToolTip} from "@/plugins/auto-toolTip";
import
ScrollingData
from
'./scrollingData.vue'
import
*
as
echarts
from
"echarts"
;
import
*
as
api
from
"@/apiPc/common"
import
{
onMounted
,
ref
,
computed
,
onUnmounted
,
getCurrentInstance
}
from
'vue'
import
{
onMounted
,
ref
,
computed
,
onUnmounted
,
getCurrentInstance
,
nextTick
}
from
'vue'
import
{
dayjs
}
from
'element-plus'
import
{
getYS000
,
getYS001
,
getYS002
,
getYS003
,
getYS004
,
getYS005
}
from
'@/api/server.js'
import
Information
from
"/@/viewsPc/vip/components/information.vue"
;
...
...
@@ -109,6 +110,10 @@ const props = defineProps({
type
:
Boolean
,
default
:
false
}
,
isLeader
:
{
type
:
Boolean
,
default
:
false
}
,
url
:
{
type
:
String
,
default
:
undefined
...
...
@@ -123,6 +128,7 @@ const props = defineProps({
const
url
=
computed
(()
=>
props
.
url
)
const
obj
=
computed
(()
=>
props
.
obj
)
const
isLeader
=
computed
(()
=>
props
.
isLeader
)
const
zhuRef1
=
ref
(
null
)
const
zhuRef2
=
ref
(
null
)
const
zhuRef3
=
ref
(
null
)
...
...
@@ -143,6 +149,7 @@ const resYear3 = ref()
const
activeName1
=
ref
()
const
activeName2
=
ref
()
const
activeName3
=
ref
()
const
bing_number3
=
ref
()
let
chart1
...
...
@@ -165,7 +172,6 @@ onMounted(async () => {
}
window
.
addEventListener
(
'resize'
,
handleResize
);
}
// handelBing1()
// handelZhu1()
// handelGetYS001()
...
...
@@ -219,8 +225,9 @@ async function handelGetYS003() {
//
}
obj1
.
list
=
obj1
.
list
.
filter
(
v
=>
v
.
XJCOST
!=
0
)
bing_number3
.
value
=
toDieThousands
((
res
.
data
.
yeargroup
[
0
].
TOTAL
/
10000
).
toFixed
()
||
0
)
handelBing3
(
obj1
,
obj2
)
//
handelBing3(obj1, obj2)
handelZhu3
(
obj1
,
obj2
)
...
...
@@ -345,6 +352,10 @@ async function handelGetYS004() {
async
function
handelGetYS005
()
{
const
res
=
await
getYS005
(
url
.
value
,
obj
.
value
)
form
.
value
=
res
.
data
console
.
log
(
isLeader
)
if
(
isLeader
.
value
)
{
proxy
.
$refs
[
'InformationRef'
].
open
(
form
.
value
.
leaderinfo
,
form
.
value
.
APPLYDATE
)
}
}
...
...
@@ -367,6 +378,17 @@ function handleResize() {
chart44
?.
resize
()
}
function
toDieThousands
(
num
)
{
let
newNum
=
num
if
(
num
)
{
//转为数字类型
const
numNum
=
Number
(
newNum
.
toString
())
//正则修改千分位
newNum
=
numNum
.
toFixed
(
0
).
toString
().
replace
(
/
\B(?=(\d
{3
}
)
+
(?!\d))
/g
,
","
)
}
return
newNum
}
const
handelBing1
=
(
arr1
,
arr2
)
=>
{
// arr1 2025
// arr2 2024
...
...
@@ -429,7 +451,7 @@ const handelBing1 = (arr1, arr2) => {
label
:
{
show
:
true
,
// 显示标签
position
:
'center'
,
// 位置居中
formatter
:
(
arr1
.
TOTAL
/
10000
).
toFixed
(
),
// 文字内容
formatter
:
toDieThousands
((
arr1
.
TOTAL
/
10000
).
toFixed
()
),
// 文字内容
color
:
"#ffff"
,
rich
:
{
total
:
{
...
...
@@ -598,7 +620,7 @@ const handelBing2 = (row1, row2) => {
label
:
{
show
:
true
,
// 显示标签
position
:
'center'
,
// 位置居中
formatter
:
(
row1
.
TOTAL
/
10000
).
toFixed
()
||
0
,
// 文字内容
formatter
:
toDieThousands
((
row1
.
TOTAL
/
10000
).
toFixed
()
||
0
)
,
// 文字内容
color
:
"#ffff"
,
rich
:
{
total
:
{
...
...
@@ -834,7 +856,6 @@ const handelZhu1 = (row1, row2) => {
yAxis
:
[
{
type
:
'value'
,
name
:
'单位(万)'
,
axisLine
:
{
show
:
true
,
lineStyle
:
{
...
...
@@ -843,6 +864,10 @@ const handelZhu1 = (row1, row2) => {
type
:
'solid'
}
,
}
,
axisLabel
:
{
show
:
false
// formatter: '
{
value
}
w
'
// 在数值后添加单位
}
,
splitLine
:
{
show
:
true
,
// 默认false,需显式开启
lineStyle
:
{
...
...
@@ -952,7 +977,6 @@ const handelZhu2 = (row1, row2) => {
yAxis
:
[
{
type
:
'value'
,
name
:
'单位(万)'
,
axisLine
:
{
show
:
true
,
lineStyle
:
{
...
...
@@ -961,6 +985,10 @@ const handelZhu2 = (row1, row2) => {
type
:
'solid'
}
}
,
axisLabel
:
{
show
:
false
// formatter: '
{
value
}
w
'
// 在数值后添加单位
}
,
splitLine
:
{
show
:
true
,
// 默认false,需显式开启
lineStyle
:
{
...
...
@@ -1025,7 +1053,6 @@ const handelZhu2 = (row1, row2) => {
// autoHover(chart22, option, 0, 2000)
}
const
handelZhu3
=
(
row1
,
row2
)
=>
{
console
.
log
(
11111
,
row1
,
row2
)
let
name1
=
row1
.
YEAR
+
'年'
let
name2
=
row2
.
YEAR
+
'年'
console
.
log
(
'年'
,
row1
.
YEAR
)
...
...
@@ -1091,7 +1118,6 @@ const handelZhu3 = (row1, row2) => {
yAxis
:
[
{
type
:
'value'
,
name
:
'单位(万)'
,
axisLine
:
{
show
:
true
,
lineStyle
:
{
...
...
@@ -1100,6 +1126,10 @@ const handelZhu3 = (row1, row2) => {
type
:
'solid'
}
}
,
axisLabel
:
{
show
:
false
// formatter: '
{
value
}
w
'
// 在数值后添加单位
}
,
splitLine
:
{
show
:
true
,
// 默认false,需显式开启
lineStyle
:
{
...
...
@@ -1248,6 +1278,10 @@ const handelZhu4 = (listX, dataList, arr1, arr2) => {
type
:
'solid'
}
}
,
axisLabel
:
{
show
:
false
// formatter: '
{
value
}
w
'
// 在数值后添加单位
}
,
splitLine
:
{
show
:
true
,
// 默认false,需显式开启
lineStyle
:
{
...
...
@@ -1419,7 +1453,7 @@ const clear = () => {
}
function
handelView
()
{
proxy
.
$refs
[
'InformationRef'
].
open
(
form
.
value
.
leaderinfo
)
proxy
.
$refs
[
'InformationRef'
].
open
(
form
.
value
.
leaderinfo
,
form
.
value
.
APPLYDATE
)
}
onUnmounted
(()
=>
{
...
...
@@ -1632,6 +1666,13 @@ onUnmounted(() => {
color
:
#
FFFFFF
;
}
}
.
bingImg
{
background
:
url
(
"@/assets/image/rmb.png"
)
no
-
repeat
center
;
color
:
#
fff
;
font
-
size
:
12
px
;
padding
:
49
px
;
}
}
}
}
...
...
src/viewsPc/vip/components/information.vue
View file @
5a091cb
...
...
@@ -7,6 +7,7 @@
width=
"33%"
>
<div
class=
"son"
>
<div
style=
"color: #fff;font-size: 15px"
>
填写日期:
{{
myDate
}}
</div>
<p
v-for=
"val in list"
:key=
"val"
class=
"row"
>
<span></span>
{{
val
}}
</p>
...
...
@@ -19,14 +20,15 @@
import
{
ref
}
from
'vue'
const
list
=
ref
([])
const
myDate
=
ref
()
const
showGroup
=
ref
(
false
)
function
open
(
row
)
{
function
open
(
row
,
date
)
{
debugger
showGroup
.
value
=
true
list
.
value
=
row
myDate
.
value
=
date
console
.
log
(
list
.
value
)
}
...
...
@@ -73,4 +75,12 @@ defineExpose({
border-radius
:
calc
(
3
*
100vw
/
1920
);
}
}
.el-overlay
{
/* 自定义样式 */
background-color
:
rgba
(
0
,
0
,
0
,
0.7
);
/* 例如,更改背景颜色 */
}
.el-dialog__title
{
color
:
#fff
;
}
</
style
>
...
...
src/viewsPc/vip/leftPage.vue
View file @
5a091cb
This diff is collapsed.
Click to expand it.
src/viewsPc/vip/rightPage.vue
View file @
5a091cb
<
template
>
<div
class=
"pd20"
>
<div
class=
"chartCard"
>
<div
class=
"title"
>
开票
计划与执行
</div>
<div
class=
"title"
>
开票
情况
</div>
<div
class=
"po_right"
style=
"justify-content: end"
>
<div
class=
"itemBox"
>
<el-select
...
...
@@ -21,17 +21,18 @@
</div>
<div
class=
"chartCard mt30"
>
<div
class=
"title"
>
回款
</div>
<div
class=
"title"
>
回款
情况
</div>
<div
class=
"po_right"
style=
"justify-content: end;"
>
<div
class=
"itemBox
month"
style=
"margin-right: 5px;width: 30
%;"
>
<div
class=
"itemBox
"
style=
"margin-right: 5px;width: 45
%;"
>
<el-select
v-model=
"type8"
class=
"select"
placeholder=
"全部基地"
collapse-tags
multiple
size=
"small"
@
change=
"handelType8"
>
<el-option
label=
"本月"
value=
"1"
/>
<el-option
label=
"累计"
value=
"2"
/>
<el-option
v-for=
"(item,index) in monthList"
:label=
"item"
:value=
"index"
/>
</el-select>
</div>
<div
class=
"itemBox"
>
...
...
@@ -53,7 +54,7 @@
</div>
<div
class=
"chartCard mt30"
>
<div
class=
"title"
>
应收账
款账
期
</div>
<div
class=
"title"
>
应收账期
</div>
<div
ref=
"overdueRef"
style=
"width: 100%; height: 24vh;"
></div>
</div>
</div>
...
...
@@ -86,6 +87,7 @@ const overdueRef = ref(null)
const
kindList
=
ref
([
'文书'
,
'婚姻'
,
'图书'
,
'档案'
,
'司法'
,
'环保'
,
'音频'
,
'视频'
,
'会计'
,
'其他'
])
const
dataA
=
ref
([
80
,
60
,
55
,
62
,
50
,
55
,
60
,
62
,
48
,
53
])
const
radioA
=
ref
(
'month'
)
const
monthList
=
ref
([
"1月"
,
"2月"
,
"3月"
,
"4月"
,
"5月"
,
"6月"
,
"7月"
,
"8月"
,
"9月"
,
"10月"
,
"11月"
,
"12月"
])
const
itemStyleList
=
ref
([
{
...
...
@@ -182,7 +184,7 @@ const itemStyleList = ref([
const
list9
=
ref
([])
const
list8Y
=
ref
([])
const
type8
=
ref
(
'2'
)
const
type8
=
ref
(
[]
)
const
month8
=
ref
([])
const
year8
=
ref
([])
const
list8
=
ref
([
...
...
@@ -366,51 +368,76 @@ function handelSelect7() {
async
function
handelGetYS008
()
{
const
res
=
await
getYS008
(
url
.
value
,
obj
.
value
)
let
nowMonth
=
new
Date
().
getMonth
()
for
(
let
i
=
0
;
i
<=
nowMonth
;
i
++
)
{
type8
.
value
.
push
(
i
)
}
list8
.
value
=
res
.
data
.
list
||
[]
list8Y
.
value
=
[]
month8
.
value
=
[]
year8
.
value
=
[]
list8
.
value
.
sort
((
a
,
b
)
=>
a
.
HKQKMONTH
-
b
.
HKQKMONTH
);
for
(
let
i
=
0
;
i
<
list8
.
value
.
length
;
i
++
)
{
let
monthValue
=
[]
list8
.
value
[
i
].
itemStyle
=
itemStyleList
.
value
[
i
%
itemStyleList
.
value
.
length
]
list8Y
.
value
.
push
(
list8
.
value
[
i
].
BASEJC
)
month8
.
value
.
push
({
value
:
list8
.
value
[
i
].
HKQKTOTAL
/
10000
,
itemStyle
:
list8
.
value
[
i
].
itemStyle
,
})
for
(
let
j
=
1
;
j
<
13
;
j
++
)
{
monthValue
.
push
(
list8
.
value
[
i
][
"HKQKMONTH"
+
j
]
/
10000
)
}
year8
.
value
.
push
({
value
:
list8
.
value
[
i
].
HKQKMONTH
/
10000
,
value
:
monthValue
,
itemStyle
:
list8
.
value
[
i
].
itemStyle
,
})
}
let
arr
=
type8
.
value
==
'2'
?
month8
.
value
:
year
8
.
value
let
arr
=
month
8
.
value
setB
(
list8Y
.
value
,
arr
)
}
function
handelSelect8
()
{
console
.
log
(
list8
.
value
)
month8
.
value
=
[]
year8
.
value
=
[]
let
arr
=
list8Y
.
value
.
map
(
val
=>
list8
.
value
.
find
(
item
=>
item
.
BASEJC
===
val
));
list8Y
.
value
=
[]
arr
.
sort
((
a
,
b
)
=>
a
.
HKQK
MONTH
-
b
.
HKQKMONTH
);
arr
.
sort
((
a
,
b
)
=>
a
.
HKQK
TOTAL
-
b
.
HKQKTOTAL
);
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
let
monthValue
=
[]
list8Y
.
value
.
push
(
arr
[
i
].
BASEJC
)
month8
.
value
.
push
({
value
:
arr
[
i
].
HKQKTOTAL
/
10000
,
itemStyle
:
arr
[
i
].
itemStyle
,
})
for
(
let
j
=
1
;
j
<
13
;
j
++
)
{
monthValue
.
push
(
arr
[
i
][
"HKQKMONTH"
+
j
]
/
10000
)
}
year8
.
value
.
push
({
value
:
arr
[
i
].
HKQKMONTH
/
10000
,
value
:
monthValue
,
itemStyle
:
arr
[
i
].
itemStyle
,
})
}
let
arrc
=
type8
.
value
==
'2'
?
month8
.
value
:
year
8
.
value
let
arrc
=
month
8
.
value
setB
(
list8Y
.
value
,
arrc
)
}
function
handelType8
()
{
let
arrc
=
type8
.
value
==
'2'
?
month8
.
value
:
year8
.
value
// let arrc = type8.value == '2' ? month8.value : year8.value
let
myData
=
[];
for
(
let
i
=
0
;
i
<
year8
.
value
.
length
;
i
++
)
{
let
sum
=
0
for
(
let
j
=
0
;
j
<
type8
.
value
.
length
;
j
++
)
{
sum
+=
year8
.
value
[
i
].
value
[
type8
.
value
[
j
]]
}
myData
.
push
({
value
:
sum
,
itemStyle
:
year8
.
value
[
i
].
itemStyle
})
}
let
arrc
=
type8
.
value
.
length
>
0
?
myData
:
month8
.
value
setB
(
list8Y
.
value
,
arrc
)
}
...
...
@@ -472,7 +499,7 @@ const setA = (arrY, arr1, arr2, arr3, markLineName, BC) => {
xAxis
:
{
type
:
'value'
,
axisLabel
:
{
formatter
:
'{value}
w
'
// 在数值后添加单位
formatter
:
'{value}'
// 在数值后添加单位
},
axisLine
:
{
show
:
true
,
...
...
@@ -655,7 +682,7 @@ const setB = (arrY, arr1, arr2) => {
xAxis
:
{
type
:
'value'
,
axisLabel
:
{
formatter
:
'{value}
w
'
// 在数值后添加单位
formatter
:
'{value}'
// 在数值后添加单位
},
axisLine
:
{
show
:
true
,
...
...
@@ -932,8 +959,8 @@ const setC = (arry, arr1, arr2, arr3) => {
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
1
,
y2
:
1
,
// 垂直渐变
colorStops
:
[
{
offset
:
0
,
color
:
'rgba(1
47, 119, 28
, 1)'
},
// 顶部颜色
{
offset
:
1
,
color
:
'rgba(244, 171, 9, 1)'
}
// 底部颜色
{
offset
:
0
,
color
:
'rgba(1
09, 217, 255
, 1)'
},
// 顶部颜色
//
{offset: 1, color: 'rgba(244, 171, 9, 1)'} // 底部颜色
],
},
},
...
...
@@ -954,8 +981,8 @@ const setC = (arry, arr1, arr2, arr3) => {
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
1
,
y2
:
1
,
// 垂直渐变
colorStops
:
[
{
offset
:
0
,
color
:
'rgba(
82, 72, 228
, 1)'
},
// 顶部颜色
{
offset
:
1
,
color
:
'rgba(148, 140, 252, 1)'
}
// 底部颜色
{
offset
:
0
,
color
:
'rgba(
24, 124, 236
, 1)'
},
// 顶部颜色
//
{offset: 1, color: 'rgba(148, 140, 252, 1)'} // 底部颜色
],
},
},
...
...
@@ -977,8 +1004,8 @@ const setC = (arry, arr1, arr2, arr3) => {
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
1
,
y2
:
1
,
// 垂直渐变
colorStops
:
[
{
offset
:
0
,
color
:
'rgba(2
54, 151, 198
, 1)'
},
// 顶部颜色
{
offset
:
1
,
color
:
'rgba(176, 72, 119, 1)'
}
// 底部颜色
{
offset
:
0
,
color
:
'rgba(2
01, 19, 34
, 1)'
},
// 顶部颜色
//
{offset: 1, color: 'rgba(176, 72, 119, 1)'} // 底部颜色
],
},
},
...
...
src/viewsPc/vip/scrollingData.vue
View file @
5a091cb
...
...
@@ -34,11 +34,15 @@ const list = computed(() => props.data || [])
const
offset
=
ref
(
0
);
const
scrollInterval
=
ref
(
null
);
const
scrollInterval2
=
ref
(
null
);
const
isPaused
=
ref
(
false
);
const
containerHeight
=
ref
(
0
);
const
contentHeight
=
ref
(
0
);
const
itemHeight
=
ref
(
0
);
function
delay
(
ms
)
{
return
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
ms
));
}
// 初始化滚动
const
initScroll
=
()
=>
{
// 清除之前的定时器
...
...
@@ -46,8 +50,8 @@ const initScroll = () => {
clearInterval
(
scrollInterval
.
value
);
}
// 重置位置到第一条数据
offset
.
value
=
0
;
offset
.
value
=
-
props
.
speed
-
0.1
;
scrollInterval2
.
value
=
setInterval
(()
=>
{
// 设置定时器
scrollInterval
.
value
=
setInterval
(()
=>
{
if
(
!
isPaused
.
value
)
{
...
...
@@ -57,7 +61,13 @@ const initScroll = () => {
offset
.
value
+=
contentHeight
.
value
/
2
;
}
}
if
(
offset
.
value
>=
(
-
props
.
speed
))
{
console
.
log
(
"1111111111111111111111111"
)
clearInterval
(
scrollInterval
.
value
);
}
},
20
);
},
10000
)
};
// 暂停滚动
...
...
@@ -96,6 +106,9 @@ onUnmounted(() => {
if
(
scrollInterval
.
value
)
{
clearInterval
(
scrollInterval
.
value
);
}
if
(
scrollInterval2
.
value
)
{
clearInterval
(
scrollInterval2
.
value
);
}
});
</
script
>
...
...
Write
Preview
Styling with
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