Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
property-management
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
property-management
Commits
3ff7819d
Commit
3ff7819d
authored
Apr 12, 2022
by
416409548@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ie下修改门禁设备坐标无法修改问题优化
parent
13e6fbbb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
ant-design-vue-jeecg/src/views/pm/access-control-device/modules/PmAccessControlDeviceForm.vue
+14
-9
No files found.
ant-design-vue-jeecg/src/views/pm/access-control-device/modules/PmAccessControlDeviceForm.vue
View file @
3ff7819d
...
...
@@ -94,7 +94,7 @@
<a-col
:span=
"24"
>
<div
style=
"position: relative"
>
<img
src=
"@/assets/floor.png"
alt=
"floor"
width=
"100%"
height=
"100%"
@
click=
"imgClick($event)"
@
load=
"floorImgLoadComplete($event)"
/>
@
click=
"imgClick($event)"
ref=
"imgBg"
@
load=
"floorImgLoadComplete($event)"
/>
<img
:src=
"doorIconPath"
alt=
"door"
:style=
"doorIconStyle"
v-show=
"doorIconPath"
/>
...
...
@@ -321,19 +321,24 @@ export default {
},
imgClick
(
e
)
{
// 获取点击目标的x,y坐标
let
target
=
e
.
target
;
let
fixX
=
target
.
x
;
let
fixY
=
target
.
y
;
// let target = e.target;
var
event
=
e
||
window
.
event
;
var
target
=
event
.
target
||
event
.
srcElement
;
console
.
log
(
target
.
pageX
);
let
fixX
=
this
.
$refs
.
imgBg
.
getBoundingClientRect
().
left
;
let
fixY
=
this
.
$refs
.
imgBg
.
getBoundingClientRect
().
top
;
// let fixX = target.x;
// let fixY = target.y;
console
.
log
(
fixX
,
fixY
);
console
.
log
(
e
.
x
,
e
.
y
);
//
console.log(e.x, e.y);
let
offsetWidth
=
target
.
offsetWidth
;
let
offsetHeight
=
target
.
offsetHeight
;
let
offsetX
=
(
e
.
x
-
fixX
);
let
offsetY
=
(
e
.
y
-
fixY
);
let
offsetX
=
(
e
vent
.
x
-
fixX
);
let
offsetY
=
(
e
vent
.
y
-
fixY
);
this
.
doorIconStyle
.
top
=
offsetY
-
20
+
'px'
;
this
.
doorIconStyle
.
left
=
offsetX
-
20
+
'px'
;
let
x
=
((
e
.
x
-
fixX
)
/
offsetWidth
).
toFixed
(
4
);
let
y
=
((
e
.
y
-
fixY
)
/
offsetHeight
).
toFixed
(
4
);
let
x
=
((
e
vent
.
x
-
fixX
)
/
offsetWidth
).
toFixed
(
4
);
let
y
=
((
e
vent
.
y
-
fixY
)
/
offsetHeight
).
toFixed
(
4
);
this
.
model
.
coordinateTmp
=
x
+
","
+
y
;
this
.
$refs
.
form
.
validateField
(
'coordinateTmp'
);
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment