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
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
13 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 {
...
@@ -900,9 +900,10 @@ export default {
},
},
/**缩放 */
/**缩放 */
scale
:
utils
.
throttle
(
function
(
e
)
{
scale
(
e
)
{
this
.
scaleValue
=
e
.
scale
this
.
scaleValue
=
e
.
scale
},
200
),
this
.
$emit
(
'scale'
,
e
.
scale
)
}
}
}
}
}
</
script
>
</
script
>
...
...
components/Canvas/zoom-pan.vue
View file @
2d02aa7
...
@@ -76,7 +76,6 @@ export default {
...
@@ -76,7 +76,6 @@ export default {
[
this
.
startX
,
this
.
startY
]
=
[
e
.
touches
[
0
].
pageX
,
e
.
touches
[
0
].
pageY
];
[
this
.
startX
,
this
.
startY
]
=
[
e
.
touches
[
0
].
pageX
,
e
.
touches
[
0
].
pageY
];
this
.
moveX
=
0
this
.
moveX
=
0
this
.
moveY
=
0
this
.
moveY
=
0
this
.
transformOriginStyle
=
`
${
this
.
startX
}
px
${
this
.
startY
}
px`
;
}
}
},
},
handleTouchMove
:
utils
.
throttle
(
function
(
e
)
{
handleTouchMove
:
utils
.
throttle
(
function
(
e
)
{
...
@@ -89,10 +88,12 @@ export default {
...
@@ -89,10 +88,12 @@ export default {
this
.
setScale
(
newScale
,
this
.
getTouchCenter
(
e
.
touches
));
// 更新缩放同时更新中心点
this
.
setScale
(
newScale
,
this
.
getTouchCenter
(
e
.
touches
));
// 更新缩放同时更新中心点
this
.
lastTouchDistance
=
currentDistance
;
this
.
lastTouchDistance
=
currentDistance
;
}
else
if
(
this
.
isDragging
&&
e
.
touches
.
length
===
1
&&
this
.
scale
!==
1
)
{
}
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
newX
=
e
.
touches
[
0
].
pageX
;
const
newY
=
e
.
touches
[
0
].
pageY
;
const
newY
=
e
.
touches
[
0
].
pageY
;
this
.
moveX
=
(
newX
-
this
.
startX
)
/
this
.
scale
;
this
.
moveX
=
(
newX
-
this
.
startX
)
/
this
.
scale
;
this
.
moveY
=
(
newY
-
this
.
startY
)
/
this
.
scale
;
this
.
moveY
=
(
newY
-
this
.
startY
)
/
this
.
scale
;
// 确保计算基于初始未缩放的触摸点,并考虑当前缩放比例
this
.
updatePosition
();
this
.
updatePosition
();
}
}
},
16
),
},
16
),
...
...
pages/equity/detail/components/Guarantee.vue
View file @
2d02aa7
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
-->
-->
<
template
>
<
template
>
<view
class=
"layout"
@
click
.
prevent=
"touch"
>
<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"
>
<template
slot=
"customContent"
>
<view
class=
"title"
>
{{
title
}}
</view>
<view
class=
"title"
>
{{
title
}}
</view>
<view
class=
"container"
>
<view
class=
"container"
>
...
...
pages/equity/detail/components/MediaComponent.vue
View file @
2d02aa7
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
:drawStatus=
"penSwitch"
:drawStatus=
"penSwitch"
:canvasId=
"`c-$
{madiaId}`"
:canvasId=
"`c-$
{madiaId}`"
custom
custom
@scale="$emit('scale',$event)"
>
>
<template
slot=
"customContent"
>
<template
slot=
"customContent"
>
<view
class=
"title"
>
{{
title
}}
</view>
<view
class=
"title"
>
{{
title
}}
</view>
...
...
pages/equity/detail/components/Reception.vue
View file @
2d02aa7
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
canvasId=
"c-1"
canvasId=
"c-1"
:drawStatus=
"penSwitch"
:drawStatus=
"penSwitch"
custom
custom
@
scale=
"$emit('scale',$event)"
>
>
<template
slot=
"customContent"
>
<template
slot=
"customContent"
>
<view
class=
"carType"
>
<view
class=
"carType"
>
...
@@ -159,7 +160,7 @@ export default {
...
@@ -159,7 +160,7 @@ export default {
inputCustomer
()
{
inputCustomer
()
{
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
this
.
customerInfo
)
this
.
$store
.
dispatch
(
'setCustomerInfo'
,
this
.
customerInfo
)
},
},
handleSelect
(
item
,
popkey
)
{
handleSelect
(
item
,
popkey
)
{
this
.
$refs
[
popkey
].
close
()
this
.
$refs
[
popkey
].
close
()
if
(
popkey
==
'employeeBoxVisible'
)
{
if
(
popkey
==
'employeeBoxVisible'
)
{
this
.
customerInfo
.
salesUuid
=
item
.
uuid
this
.
customerInfo
.
salesUuid
=
item
.
uuid
...
@@ -317,7 +318,7 @@ export default {
...
@@ -317,7 +318,7 @@ export default {
* animation slide-bl
* animation slide-bl
* ----------------------------------------
* ----------------------------------------
*/
*/
@-webkit-keyframes
slide-bl
{
@-webkit-keyframes
slide-bl
{
0
%
{
0
%
{
-webkit-transform
:
translateY
(
-100%
)
translateX
(
-100%
);
-webkit-transform
:
translateY
(
-100%
)
translateX
(
-100%
);
transform
:
translateY
(
-100%
)
translateX
(
-100%
);
transform
:
translateY
(
-100%
)
translateX
(
-100%
);
...
@@ -347,7 +348,7 @@ export default {
...
@@ -347,7 +348,7 @@ export default {
}
}
.slide-bl
{
.slide-bl
{
-webkit-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.250
,
0.460
,
0.450
,
0.940
)
both
;
animation
:
slide-bl
0.5s
cubic-bezier
(
0.25
,
0.46
,
0.45
,
0.94
)
both
;
}
}
</
style
>
</
style
>
pages/equity/detail/components/ThreeGuarantees.vue
View file @
2d02aa7
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
:drawStatus=
"penSwitch"
:drawStatus=
"penSwitch"
:canvasId=
"`c-$
{madiaId}`"
:canvasId=
"`c-$
{madiaId}`"
custom
custom
@scale="$emit('scale',$event)"
>
>
<template
slot=
"customContent"
>
<template
slot=
"customContent"
>
<view
class=
"title"
>
{{
title
}}
</view>
<view
class=
"title"
>
{{
title
}}
</view>
...
...
pages/equity/detail/detail.vue
View file @
2d02aa7
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
:title=
"item.detailTitle || ''"
:title=
"item.detailTitle || ''"
:madiaId=
"item.id"
:madiaId=
"item.id"
:carTypeList=
"item.carTypeList || []"
:carTypeList=
"item.carTypeList || []"
@
scale=
"scale"
/>
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -103,7 +104,8 @@ export default {
...
@@ -103,7 +104,8 @@ export default {
drawStatus
:
false
,
drawStatus
:
false
,
startX
:
null
,
startX
:
null
,
startY
:
null
,
startY
:
null
,
screenWidth
:
null
screenWidth
:
null
,
scaleValueObject
:
{}
};
};
},
},
computed
:
{
computed
:
{
...
@@ -174,14 +176,15 @@ export default {
...
@@ -174,14 +176,15 @@ export default {
},
},
touchEnd
(
e
)
{
touchEnd
(
e
)
{
try
{
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
if
(
!
e
||
!
e
.
changedTouches
||
drawStatus
||
toolList
.
length
==
0
||
e
.
changedTouches
.
length
===
0
)
return
let
halfScreenWidth
=
screenWidth
/
2
,
let
halfScreenWidth
=
screenWidth
/
2
,
touch
=
e
.
changedTouches
[
0
],
touch
=
e
.
changedTouches
[
0
],
isDistanceSignificant
=
Math
.
abs
(
touch
.
pageX
-
startX
)
>
screenWidth
/
3
,
isDistanceSignificant
=
Math
.
abs
(
touch
.
pageX
-
startX
)
>
screenWidth
/
3
,
index
=
toolList
.
findIndex
(
item
=>
item
.
id
==
id
)
index
=
toolList
.
findIndex
(
item
=>
item
.
id
==
id
)
if
(
Math
.
abs
(
this
.
startY
-
touch
.
pageY
)
>
100
)
return
if
(
Math
.
abs
(
this
.
startY
-
touch
.
pageY
)
>
100
)
return
if
(
isDistanceSignificant
&&
index
!=
-
1
)
{
if
(
!
scaleValueObject
[
id
])
scaleValueObject
[
id
]
=
1
if
(
isDistanceSignificant
&&
index
!=
-
1
&&
scaleValueObject
[
id
]
==
1
)
{
const
nextId
=
this
.
getNextId
(
index
,
toolList
,
startX
,
halfScreenWidth
)
const
nextId
=
this
.
getNextId
(
index
,
toolList
,
startX
,
halfScreenWidth
)
this
.
$emit
(
'update:id'
,
nextId
)
this
.
$emit
(
'update:id'
,
nextId
)
}
}
...
@@ -195,6 +198,10 @@ export default {
...
@@ -195,6 +198,10 @@ export default {
}
else
{
}
else
{
return
index
===
0
?
toolList
[
toolList
.
length
-
1
].
id
:
toolList
[
index
-
1
].
id
;
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 {
...
@@ -81,6 +81,11 @@ export default {
// 其他情况允许正常返回
// 其他情况允许正常返回
return
false
;
return
false
;
},
},
onLoad
()
{
const
mock_data
=
uni
.
$storage
.
get
(
'mock_data'
)
||
{}
this
.
moduleList
=
mock_data
.
moduleList
||
[]
this
.
toolList
=
mock_data
.
toolList
||
[]
},
onShow
()
{
onShow
()
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
)
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
)
if
(
!
userInfo
.
shopMerchantId
||
!
userInfo
.
shopMerchantName
)
{
if
(
!
userInfo
.
shopMerchantId
||
!
userInfo
.
shopMerchantName
)
{
...
@@ -148,7 +153,7 @@ export default {
...
@@ -148,7 +153,7 @@ export default {
},
},
// 查询素材
// 查询素材
async
getSoure
()
{
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
=>
{
await
moduleList
.
map
(
async
e
=>
{
if
(
e
.
receptionSourceDetailList
)
e
.
receptionSourceDetailList
=
await
uni
.
$api
.
systemApi
.
imgToBase64
(
e
.
receptionSourceDetailList
,
'detailUrl'
)
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
)
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