Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
oEshield
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d6e86d74
authored
Apr 25, 2022
by
张杰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
b496f611
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
20 deletions
src/api/services/monitor.js
src/pages/monitor/addFence.vue
src/pages/monitor/fence.vue
src/pages/monitor/fence_userlist.vue
src/utils/mapService.js
src/api/services/monitor.js
View file @
d6e86d7
...
@@ -53,6 +53,10 @@ export default {
...
@@ -53,6 +53,10 @@ export default {
return
request
(
params
,
'/usercenter/organization/orgtree'
)
return
request
(
params
,
'/usercenter/organization/orgtree'
)
},
},
getWifiLocationBySn
(
params
=
{})
{
return
request
(
params
,
"track/getWifiLocationBySn"
);
},
// 根据sn 获取围栏信息接口
// 根据sn 获取围栏信息接口
getFenceInfo
(
params
)
{
getFenceInfo
(
params
)
{
...
...
src/pages/monitor/addFence.vue
View file @
d6e86d7
...
@@ -286,7 +286,7 @@ export default {
...
@@ -286,7 +286,7 @@ export default {
rules
:
{
rules
:
{
fenceName
:
[
fenceName
:
[
{
required
:
true
,
message
:
"请输入围栏名称"
,
trigger
:
"blur"
},
{
required
:
true
,
message
:
"请输入围栏名称"
,
trigger
:
"blur"
},
{
min
:
2
,
max
:
200
,
message
:
"至少2字"
,
trigger
:
"blur"
},
{
min
:
2
,
max
:
200
,
message
:
"至少2字"
,
trigger
:
"blur"
},
// {validator: checkFenceName, trigger: 'blur'}
// {validator: checkFenceName, trigger: 'blur'}
],
],
triggerType
:
[
triggerType
:
[
...
@@ -440,11 +440,16 @@ export default {
...
@@ -440,11 +440,16 @@ export default {
return
false
;
return
false
;
}
}
_this
.
submitting
=
true
;
let
oParams
=
_this
.
getParams
();
let
oParams
=
_this
.
getParams
();
if
(
oParams
.
snList
.
length
>
2000
)
{
showToast
({
message
:
"最多关联2000个设备"
,
});
return
false
;
}
_this
.
submitting
=
true
;
console
.
log
(
oParams
);
console
.
log
(
oParams
);
// 编辑围栏
// 编辑围栏
if
(
_this
.
fenceId
)
{
if
(
_this
.
fenceId
)
{
UPDATE_ELECFENCE_INFO
(
oParams
)
UPDATE_ELECFENCE_INFO
(
oParams
)
...
@@ -523,7 +528,7 @@ export default {
...
@@ -523,7 +528,7 @@ export default {
if
(
form
.
shapeType
==
1
)
{
if
(
form
.
shapeType
==
1
)
{
oParams
.
radius
=
form
.
radius
;
oParams
.
radius
=
form
.
radius
;
oParams
.
lnglat
=
`
${
form
.
lng
}
,
${
form
.
lat
}
`
;
oParams
.
lnglat
=
`
${
form
.
lng
}
,
${
form
.
lat
}
`
;
oParams
.
analysisAddress
=
form
.
analysisAddress
oParams
.
analysisAddress
=
form
.
analysisAddress
;
}
}
// 多边形围栏
// 多边形围栏
...
@@ -688,8 +693,8 @@ export default {
...
@@ -688,8 +693,8 @@ export default {
obj
.
lng
=
lnglat
[
0
];
obj
.
lng
=
lnglat
[
0
];
obj
.
lat
=
lnglat
[
1
];
obj
.
lat
=
lnglat
[
1
];
}
}
if
(
obj
.
areaCode
)
{
if
(
obj
.
areaCode
)
{
obj
.
areaCode
=
[
obj
.
areaCode
]
obj
.
areaCode
=
[
obj
.
areaCode
]
;
}
}
_this
.
form
=
obj
;
_this
.
form
=
obj
;
...
...
src/pages/monitor/fence.vue
View file @
d6e86d7
...
@@ -71,6 +71,17 @@
...
@@ -71,6 +71,17 @@
</el-scrollbar>
</el-scrollbar>
</div>
</div>
<!-- <el-alert v-show="showSuccessTips" :title="`保存成功,页面将在${timer}秒后自动关闭`" type="success" :closable="false" show-icon class="show_success_tips"></el-alert> -->
<el-dialog
title=
"提示"
custom-class=
"monitor_dialog"
:visible
.
sync=
"showSuccessTips"
width=
"30%"
append-to-body
:show-close=
"false"
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
>
<div
class=
"monitor_dialog_content"
>
<i
class=
"el-icon-circle-check"
></i>
<span
class=
""
>
{{`保存成功,页面将在${timer}秒后自动关闭`}}
</span>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"closePage"
>
立即关闭
</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
</template>
</v-full-layout>
</v-full-layout>
...
@@ -210,6 +221,8 @@ export default {
...
@@ -210,6 +221,8 @@ export default {
polygonPath
:
[],
polygonPath
:
[],
deviceInfo
:
{},
// 设备信息
deviceInfo
:
{},
// 设备信息
deviceList
:
[],
// 设备列表
deviceList
:
[],
// 设备列表
showSuccessTips
:
false
,
timer
:
5
,
};
};
},
},
created
()
{
created
()
{
...
@@ -290,10 +303,17 @@ export default {
...
@@ -290,10 +303,17 @@ export default {
});
});
return
false
;
return
false
;
}
}
showToast
({
_this
.
showSuccessTips
=
true
;
message
:
"保存成功"
,
let
tipInterval
=
setInterval
(
function
()
{
type
:
"success"
,
if
(
_this
.
timer
==
0
)
{
});
clearInterval
(
tipInterval
);
_this
.
showSuccessTips
=
false
;
_this
.
timer
=
5
;
window
.
close
();
return
false
;
}
_this
.
timer
-=
1
;
},
1000
);
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
_this
.
isSubmitting
=
false
;
_this
.
isSubmitting
=
false
;
...
@@ -469,8 +489,17 @@ export default {
...
@@ -469,8 +489,17 @@ export default {
});
});
return
false
;
return
false
;
}
}
EventBus
.
$emit
(
"uiMap.fence.updateFenceRadius"
,
{
fenceType
:
'circle'
,
radius
:
e
});
EventBus
.
$emit
(
"uiMap.fence.updateFenceRadius"
,
{
fenceType
:
"circle"
,
radius
:
e
,
});
},
},
// 关闭标签页
closePage
(){
window
.
close
()
}
},
},
};
};
</
script
>
</
script
>
...
@@ -524,4 +553,33 @@ export default {
...
@@ -524,4 +553,33 @@ export default {
}
}
}
}
}
}
.show_success_tips
{
position
:
absolute
;
width
:
auto
;
top
:
0
;
left
:
50%
;
transform
:
translateX
(
-50%
);
z-index
:
9999
;
}
.monitor_dialog_content
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
14px
;
i{
font-size
:
24px
;
color
:
#67C23A
;
margin
:
0
10px
;
}
}
</
style
>
<
style
lang=
"scss"
>
.monitor_dialog
{
.el-dialog__header{
padding
:
10px
!important
;
}
.el-dialog__footer
{
padding
:
10px
!important
;
}
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/pages/monitor/fence_userlist.vue
View file @
d6e86d7
...
@@ -186,12 +186,14 @@ export default {
...
@@ -186,12 +186,14 @@ export default {
this
.
$emit
(
"onUserListInit"
,
false
);
this
.
$emit
(
"onUserListInit"
,
false
);
}
}
},
},
// 全选
checkedAll
(
newVal
)
{
checkedAll
(
newVal
)
{
if
(
newVal
)
{
if
(
newVal
)
{
this
.
resultList
.
forEach
((
item
)
=>
{
this
.
resultList
.
forEach
((
item
)
=>
{
item
.
checked
=
true
;
item
.
checked
=
true
;
item
.
sn
=
item
.
sns
;
item
.
sn
=
item
.
sns
;
const
findItem
=
this
.
chosenList
.
find
((
o
)
=>
o
.
vin
===
item
.
vin
);
const
findItem
=
this
.
chosenList
.
find
((
o
)
=>
o
.
sn
===
item
.
sns
);
if
(
!
findItem
)
{
if
(
!
findItem
)
{
this
.
chosenList
.
push
(
item
);
this
.
chosenList
.
push
(
item
);
}
}
...
@@ -200,10 +202,8 @@ export default {
...
@@ -200,10 +202,8 @@ export default {
}
else
{
}
else
{
this
.
resultList
.
forEach
((
item
)
=>
{
this
.
resultList
.
forEach
((
item
)
=>
{
item
.
checked
=
false
;
item
.
checked
=
false
;
const
findItem
=
this
.
chosenList
.
find
((
o
)
=>
o
.
vin
===
item
.
vin
);
//const findItem = this.chosenList.find((o) => o.sn === item.sns);
if
(
findItem
)
{
this
.
chosenList
=
this
.
chosenList
.
filter
((
k
)
=>
k
.
sns
!=
item
.
sns
);
this
.
chosenList
.
splice
(
this
.
chosenList
.
indexOf
(
findItem
),
1
);
}
});
});
}
}
},
},
...
...
src/utils/mapService.js
View file @
d6e86d7
...
@@ -583,7 +583,6 @@ MapService.prototype = {
...
@@ -583,7 +583,6 @@ MapService.prototype = {
_html
+=
`<p><i class="icon_info_plate"></i>车牌号: <span class="des">
${
info
.
licensePlate
||
'--'
}
</span></p>`
;
_html
+=
`<p><i class="icon_info_plate"></i>车牌号: <span class="des">
${
info
.
licensePlate
||
'--'
}
</span></p>`
;
}
}
_html
+=
`<p><i class="icon icon-info_device"></i> 设备号:<span class="des">
${
info
.
sn
}
(
${
info
.
isSource
===
'1'
?
'有线'
:
'无线'
}
)</span>
_html
+=
`<p><i class="icon icon-info_device"></i> 设备号:<span class="des">
${
info
.
sn
}
(
${
info
.
isSource
===
'1'
?
'有线'
:
'无线'
}
)</span>
<span class="battery" data-battery>
<span class="battery" data-battery>
<i class="fill"><i class="fill-percentage" data-battery-percentage></i></i>
<i class="fill"><i class="fill-percentage" data-battery-percentage></i></i>
...
@@ -605,17 +604,17 @@ MapService.prototype = {
...
@@ -605,17 +604,17 @@ MapService.prototype = {
(
info
.
eLocateType
===
'gpsLocation'
?
(
info
.
eLocateType
===
'gpsLocation'
?
`<span class="el-button-group">
`<span class="el-button-group">
<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
<button type="button" class="el-button el-button--mini" data-wifi>wifi</button>
<button type="button" class="el-button el-button--mini" data-wifi
style="display:none"
>wifi</button>
</span>`
:
</span>`
:
`<span class="el-button-group">
`<span class="el-button-group">
<button type="button" class="el-button el-button--mini el-button--primary" data-base>基站</button>
<button type="button" class="el-button el-button--mini el-button--primary" data-base>基站</button>
<button type="button" class="el-button el-button--mini" data-wifi>wifi</button>
<button type="button" class="el-button el-button--mini" data-wifi
style="display:none"
>wifi</button>
</span>`
</span>`
)
:
)
:
`<span class="el-button-group">
`<span class="el-button-group">
<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
<button type="button" class="el-button el-button--mini el-button--primary" data-gps>GPS</button>
<button type="button" class="el-button el-button--mini" data-base>基站</button>
<button type="button" class="el-button el-button--mini" data-base>基站</button>
<button type="button" class="el-button el-button--mini" data-wifi>wifi</button>
<button type="button" class="el-button el-button--mini" data-wifi
style="display:none"
>wifi</button>
</span>`
</span>`
)
:
)
:
info
.
eLocateSingle
?
info
.
eLocateSingle
?
...
...
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