Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄媛媛
ElectricitySheep
Commits
79ef8d74
Commit
79ef8d74
authored
Jun 04, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
js修改
parent
849019bd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
47 deletions
+6
-47
choiceAreaAuth.vue
src/components/common/choiceAreaAuth.vue
+5
-46
authorization.vue
src/components/sallCenter/authorization.vue
+1
-1
No files found.
src/components/common/choiceAreaAuth.vue
View file @
79ef8d74
...
@@ -90,15 +90,7 @@
...
@@ -90,15 +90,7 @@
<img
style=
"width: 32px;height: 32px"
:src=
"getIconLink('/Static/icon-close.png')"
>
<img
style=
"width: 32px;height: 32px"
:src=
"getIconLink('/Static/icon-close.png')"
>
</div>
</div>
</div>
</div>
<div
class=
"pic-list"
:style=
"style"
v-if=
"picList && picList.length > 0"
>
<div
:style=
"calcstyle"
flex=
"dir:left main:center cross:center"
>
<template
v-for=
"(item, index) in picList"
>
<div
:style=
"item"
:key=
"index"
>
<img
:src=
"item.pic_url"
style=
"width: 100%;visibility: hidden;display: block;"
>
</div>
<img
:src=
"item.pic_url"
:key=
"index"
style=
"width: 100%;visibility: hidden;display: block;"
>
</
template
>
</div>
<div
:style=
"style"
flex=
"dir:left main:center cross:center"
v-else
>
<img
style=
"width: auto;height: auto;max-width: 100%;max-height: 100%"
:src=
"picUrl"
>
<img
style=
"width: auto;height: auto;max-width: 100%;max-height: 100%"
:src=
"picUrl"
>
</div>
</div>
</div>
</div>
...
@@ -145,7 +137,6 @@
...
@@ -145,7 +137,6 @@
</el-col>
</el-col>
</el-row>
</el-row>
</el-form-item>
</el-form-item>
<el-form-item
label=
"热区属性"
v-if=
"mode == 'auth'"
>
<el-form-item
label=
"热区属性"
v-if=
"mode == 'auth'"
>
<el-radio-group
v-model=
"hotspotList[index].open_type"
>
<el-radio-group
v-model=
"hotspotList[index].open_type"
>
<el-radio
label=
"login"
:disabled=
"radioDisabled('login')"
>
登录按钮
</el-radio>
<el-radio
label=
"login"
:disabled=
"radioDisabled('login')"
>
登录按钮
</el-radio>
...
@@ -162,13 +153,9 @@
...
@@ -162,13 +153,9 @@
</el-form>
</el-form>
</div>
</div>
</el-dialog>
</el-dialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
chooseMenu
from
"../common/chooseMenu.vue"
;
export
default
{
export
default
{
props
:
{
props
:
{
multiple
:
Boolean
,
multiple
:
Boolean
,
...
@@ -185,14 +172,11 @@
...
@@ -185,14 +172,11 @@
type
:
Array
,
type
:
Array
,
default
:
[]
default
:
[]
},
},
isLink
:
Boolean
,
picList
:
Array
,
max
:
Number
,
max
:
Number
,
mode
:
String
mode
:
String
},
},
data
()
{
data
()
{
return
{
return
{
dialogVisible
:
false
,
dialogVisible
:
false
,
is_mousedown
:
false
,
is_mousedown
:
false
,
is_mousemove
:
false
,
is_mousemove
:
false
,
...
@@ -213,10 +197,6 @@
...
@@ -213,10 +197,6 @@
zIndex
:
99
,
zIndex
:
99
,
};
};
},
},
components
:
{
chooseMenu
},
watch
:
{
watch
:
{
dialogVisible
(
oldVal
,
newVal
)
{
dialogVisible
(
oldVal
,
newVal
)
{
this
.
hotspotList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
hotspotArray
))
this
.
hotspotList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
hotspotArray
))
...
@@ -227,11 +207,13 @@
...
@@ -227,11 +207,13 @@
}
}
},
},
computed
:
{
computed
:
{
style
()
{
//获取高度和宽度
return
{
calcstyle
()
{
var
objStyle
=
{
width
:
this
.
width
,
width
:
this
.
width
,
height
:
this
.
height
height
:
this
.
height
};
};
return
objStyle
;
},
},
maxWidth
()
{
maxWidth
()
{
return
parseFloat
(
this
.
width
)
-
this
.
hotspotList
[
this
.
index
].
left
;
return
parseFloat
(
this
.
width
)
-
this
.
hotspotList
[
this
.
index
].
left
;
...
@@ -258,21 +240,8 @@
...
@@ -258,21 +240,8 @@
y
:
y
y
:
y
};
};
}
}
// 缩放比例
// 缩放比例
let
zoom
=
2
;
let
zoom
=
2
;
// 获取图片距离浏览器的x/y(真实的尺寸,不受zoom属性影响)
// let position = getElementPosition(this.$refs.box);
// 获取父容器距离浏览器的x/y(真实的尺寸,不受zoom属性影响)
// let inside = getElementPosition(this.$refs.inside);
// 图片距离缩放容器左边和顶部
// let picX = (position.x - inside.x) / zoom;
// let picY = (position.y - inside.y) / zoom;
// 鼠标点下时距离浏览器的x/y(需要计算zoom属性的影响)
// position.x = e.clientX + (e.offsetX + picX) * (zoom - 1) - position.x;
// position.y = e.clientY + (e.offsetY + picY) * (zoom - 1) - position.y;
// position.x = (e.clientX - inside.x) * zoom - (position.x - inside.x);
// position.y = (e.clientY - inside.y) * zoom - (position.y - inside.y);
let
position
=
{
let
position
=
{
x
:
e
.
offsetX
*
zoom
,
x
:
e
.
offsetX
*
zoom
,
y
:
e
.
offsetY
*
zoom
y
:
e
.
offsetY
*
zoom
...
@@ -359,16 +328,6 @@
...
@@ -359,16 +328,6 @@
}
}
return
false
;
return
false
;
},
},
//获取选择链接
getChoiceLink
()
{
//调用子组件方法
var
obj
=
this
.
$refs
.
chooseMenu
.
getChooseMenu
();
if
(
this
.
index
>
-
1
&&
this
.
hotspotList
.
length
>
0
)
{
this
.
hotspotList
[
this
.
index
].
link
=
obj
}
},
}
}
};
};
...
...
src/components/sallCenter/authorization.vue
View file @
79ef8d74
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<el-form-item
label=
"热区"
>
<el-form-item
label=
"热区"
>
<choiceAreaAuth
ref=
"choiceAreaAuth"
:multiple=
"true"
:max=
"2"
:pic-url=
"getIconLink(addMsg.AuthUrl)"
<choiceAreaAuth
ref=
"choiceAreaAuth"
:multiple=
"true"
:max=
"2"
:pic-url=
"getIconLink(addMsg.AuthUrl)"
mode=
'auth'
:hotspotArray=
"addMsg.AuthDataList"
width=
"650px"
height=
"700px"
mode=
'auth'
:hotspotArray=
"addMsg.AuthDataList"
width=
"650px"
height=
"700px"
@
confirm=
"selectHotspot"
:is-link=
"false"
>
@
confirm=
"selectHotspot"
>
<el-button
size=
"mini"
>
划分热区
</el-button>
<el-button
size=
"mini"
>
划分热区
</el-button>
</choiceAreaAuth>
</choiceAreaAuth>
<div>
注:需要划分两个热区:一个是登录按钮热区,一个是暂不登录按钮热区
</div>
<div>
注:需要划分两个热区:一个是登录按钮热区,一个是暂不登录按钮热区
</div>
...
...
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