Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2d02aa7d
authored
Jun 26, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v1.0.7' of
http://192.168.3.233:8090/glsx/gl_tape
into v1.0.7
2 parents
e24b1ac8
e346c639
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
44 additions
and
27 deletions
components/Canvas/wn-canvas.vue
components/Canvas/zoom-pan.vue
pages/equity/detail/components/Guarantee.vue
pages/equity/detail/components/MediaComponent.vue
pages/equity/detail/components/Reception.vue
pages/equity/detail/components/ThreeGuarantees.vue
pages/equity/detail/detail.vue
pages/equity/index.vue
components/Canvas/wn-canvas.vue
View file @
2d02aa7
...
...
@@ -900,9 +900,10 @@ export default {
},
/**缩放 */
scale
:
utils
.
throttle
(
function
(
e
)
{
scale
(
e
)
{
this
.
scaleValue
=
e
.
scale
},
200
),
this
.
$emit
(
'scale'
,
e
.
scale
)
}
}
}
</
script
>
...
...
components/Canvas/zoom-pan.vue
View file @
2d02aa7
...
...
@@ -76,7 +76,6 @@ export default {
[
this
.
startX
,
this
.
startY
]
=
[
e
.
touches
[
0
].
pageX
,
e
.
touches
[
0
].
pageY
];
this
.
moveX
=
0
this
.
moveY
=
0
this
.
transformOriginStyle
=
`
${
this
.
startX
}
px
${
this
.
startY
}
px`
;
}
},
handleTouchMove
:
utils
.
throttle
(
function
(
e
)
{
...
...
@@ -89,10 +88,12 @@ export default {
this
.
setScale
(
newScale
,
this
.
getTouchCenter
(
e
.
touches
));
// 更新缩放同时更新中心点
this
.
lastTouchDistance
=
currentDistance
;
}
else
if
(
this
.
isDragging
&&
e
.
touches
.
length
===
1
&&
this
.
scale
!==
1
)
{
this
.
transformOriginStyle
=
`
${
this
.
startX
}
px
${
this
.
startY
}
px`
;
const
newX
=
e
.
touches
[
0
].
pageX
;
const
newY
=
e
.
touches
[
0
].
pageY
;
this
.
moveX
=
(
newX
-
this
.
startX
)
/
this
.
scale
;
this
.
moveY
=
(
newY
-
this
.
startY
)
/
this
.
scale
;
// 确保计算基于初始未缩放的触摸点,并考虑当前缩放比例
this
.
updatePosition
();
}
},
16
),
...
...
pages/equity/detail/components/Guarantee.vue
View file @
2d02aa7
...
...
@@ -7,7 +7,7 @@
-->
<
template
>
<view
class=
"layout"
@
click
.
prevent=
"touch"
>
<wnCanvas
:drawStatus=
"penSwitch"
:canvasId=
"`c-$
{madiaId}`" custom>
<wnCanvas
:drawStatus=
"penSwitch"
:canvasId=
"`c-$
{madiaId}`" custom
@scale="$emit('scale',$event)"
>
<template
slot=
"customContent"
>
<view
class=
"title"
>
{{
title
}}
</view>
<view
class=
"container"
>
...
...
pages/equity/detail/components/MediaComponent.vue
View file @
2d02aa7
...
...
@@ -4,6 +4,7 @@
:drawStatus=
"penSwitch"
:canvasId=
"`c-$
{madiaId}`"
custom
@scale="$emit('scale',$event)"
>
<template
slot=
"customContent"
>
<view
class=
"title"
>
{{
title
}}
</view>
...
...
pages/equity/detail/components/Reception.vue
View file @
2d02aa7
...
...
@@ -5,6 +5,7 @@
canvasId=
"c-1"
:drawStatus=
"penSwitch"
custom
@
scale=
"$emit('scale',$event)"
>
<template
slot=
"customContent"
>
<view
class=
"carType"
>
...
...
@@ -147,7 +148,7 @@ export default {
return
this
.
$store
.
state
.
user
.
historyStatus
},
carImg
()
{
let
name
=
{
let
name
=
{
'问界M5'
:
0
,
'问界M7'
:
1
,
'问界M9'
:
2
...
...
@@ -159,7 +160,7 @@ export default {
inputCustomer
()
{
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
this
.
customerInfo
)
},
handleSelect
(
item
,
popkey
)
{
handleSelect
(
item
,
popkey
)
{
this
.
$refs
[
popkey
].
close
()
if
(
popkey
==
'employeeBoxVisible'
)
{
this
.
customerInfo
.
salesUuid
=
item
.
uuid
...
...
@@ -317,37 +318,37 @@ export default {
* animation slide-bl
* ----------------------------------------
*/
@-webkit-keyframes
slide-bl
{
@-webkit-keyframes
slide-bl
{
0
%
{
-webkit-transform
:
translateY
(
-100%
)
translateX
(
-100%
);
transform
:
translateY
(
-100%
)
translateX
(
-100%
);
opacity
:
0.2
;
filter
:
blur
(
0.5px
);
transform
:
translateY
(
-100%
)
translateX
(
-100%
);
opacity
:
0.2
;
filter
:
blur
(
0.5px
);
}
100
%
{
-webkit-transform
:
translateY
(
0
)
translateX
(
0
);
transform
:
translateY
(
0
)
translateX
(
0
);
opacity
:
1
;
filter
:
blur
(
0
);
transform
:
translateY
(
0
)
translateX
(
0
);
opacity
:
1
;
filter
:
blur
(
0
);
}
}
@keyframes
slide-bl
{
0
%
{
-webkit-transform
:
translateY
(
-100%
)
translateX
(
100%
)
scale
(
0.5
);
transform
:
translateY
(
-100%
)
translateX
(
100%
)
scale
(
0.5
);
opacity
:
0.2
;
filter
:
blur
(
0.5px
);
-webkit-transform
:
translateY
(
-100%
)
translateX
(
100%
)
scale
(
0.5
);
transform
:
translateY
(
-100%
)
translateX
(
100%
)
scale
(
0.5
);
opacity
:
0.2
;
filter
:
blur
(
0.5px
);
}
100
%
{
-webkit-transform
:
translateY
(
0
)
translateX
(
0
);
transform
:
translateY
(
0
)
translateX
(
0
);
opacity
:
1
;
filter
:
blur
(
0
);
transform
:
translateY
(
0
)
translateX
(
0
);
opacity
:
1
;
filter
:
blur
(
0
);
}
}
.slide-bl
{
-webkit-animation
:
slide-bl
0.5s
cubic-bezier
(
0.250
,
0.460
,
0.450
,
0.940
)
both
;
animation
:
slide-bl
0.5s
cubic-bezier
(
0.250
,
0.460
,
0.450
,
0.940
)
both
;
-webkit-animation
:
slide-bl
0.5s
cubic-bezier
(
0.25
,
0.46
,
0.45
,
0.94
)
both
;
animation
:
slide-bl
0.5s
cubic-bezier
(
0.25
,
0.46
,
0.45
,
0.94
)
both
;
}
</
style
>
pages/equity/detail/components/ThreeGuarantees.vue
View file @
2d02aa7
...
...
@@ -11,6 +11,7 @@
:drawStatus=
"penSwitch"
:canvasId=
"`c-$
{madiaId}`"
custom
@scale="$emit('scale',$event)"
>
<template
slot=
"customContent"
>
<view
class=
"title"
>
{{
title
}}
</view>
...
...
pages/equity/detail/detail.vue
View file @
2d02aa7
...
...
@@ -38,6 +38,7 @@
:title=
"item.detailTitle || ''"
:madiaId=
"item.id"
:carTypeList=
"item.carTypeList || []"
@
scale=
"scale"
/>
</view>
</
template
>
...
...
@@ -103,7 +104,8 @@ export default {
drawStatus
:
false
,
startX
:
null
,
startY
:
null
,
screenWidth
:
null
screenWidth
:
null
,
scaleValueObject
:
{}
};
},
computed
:
{
...
...
@@ -174,14 +176,15 @@ export default {
},
touchEnd
(
e
)
{
try
{
let
{
toolList
,
drawStatus
,
startX
,
screenWidth
,
id
}
=
this
let
{
toolList
,
drawStatus
,
startX
,
screenWidth
,
id
,
scaleValueObject
}
=
this
if
(
!
e
||
!
e
.
changedTouches
||
drawStatus
||
toolList
.
length
==
0
||
e
.
changedTouches
.
length
===
0
)
return
let
halfScreenWidth
=
screenWidth
/
2
,
touch
=
e
.
changedTouches
[
0
],
isDistanceSignificant
=
Math
.
abs
(
touch
.
pageX
-
startX
)
>
screenWidth
/
3
,
index
=
toolList
.
findIndex
(
item
=>
item
.
id
==
id
)
if
(
Math
.
abs
(
this
.
startY
-
touch
.
pageY
)
>
100
)
return
if
(
isDistanceSignificant
&&
index
!=
-
1
)
{
if
(
Math
.
abs
(
this
.
startY
-
touch
.
pageY
)
>
100
)
return
if
(
!
scaleValueObject
[
id
])
scaleValueObject
[
id
]
=
1
if
(
isDistanceSignificant
&&
index
!=
-
1
&&
scaleValueObject
[
id
]
==
1
)
{
const
nextId
=
this
.
getNextId
(
index
,
toolList
,
startX
,
halfScreenWidth
)
this
.
$emit
(
'update:id'
,
nextId
)
}
...
...
@@ -195,6 +198,10 @@ export default {
}
else
{
return
index
===
0
?
toolList
[
toolList
.
length
-
1
].
id
:
toolList
[
index
-
1
].
id
;
}
},
scale
(
e
){
let
{
id
}
=
this
this
.
scaleValueObject
[
id
]
=
e
}
},
...
...
pages/equity/index.vue
View file @
2d02aa7
...
...
@@ -81,6 +81,11 @@ export default {
// 其他情况允许正常返回
return
false
;
},
onLoad
()
{
const
mock_data
=
uni
.
$storage
.
get
(
'mock_data'
)
||
{}
this
.
moduleList
=
mock_data
.
moduleList
||
[]
this
.
toolList
=
mock_data
.
toolList
||
[]
},
onShow
()
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
)
if
(
!
userInfo
.
shopMerchantId
||
!
userInfo
.
shopMerchantName
)
{
...
...
@@ -148,7 +153,7 @@ export default {
},
// 查询素材
async
getSoure
()
{
le
t
{
moduleList
,
toolList
}
=
await
uni
.
$api
.
systemApi
.
getMockData
(
true
);
cons
t
{
moduleList
,
toolList
}
=
await
uni
.
$api
.
systemApi
.
getMockData
(
true
);
await
moduleList
.
map
(
async
e
=>
{
if
(
e
.
receptionSourceDetailList
)
e
.
receptionSourceDetailList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
receptionSourceDetailList
,
'detailUrl'
)
if
(
e
.
carTypeList
)
e
.
carTypeList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
carTypeList
)
...
...
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