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 6600a18b
authored
Oct 19, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v1.25.0版本需求
1 parent
5d48ba6b
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
124 additions
and
30 deletions
src/main.js
src/pages/monitor/addFence.vue
src/pages/monitor/fence.vue
src/pages/monitor/fenceMap.vue
src/pages/monitor/fence_userlist.vue
src/utils/mapService.js
src/main.js
View file @
6600a18
...
@@ -62,6 +62,7 @@ function render({ data = {}, container } = {}) {
...
@@ -62,6 +62,7 @@ function render({ data = {}, container } = {}) {
Vue
.
prototype
.
$parentCommon
=
data
.
common
;
Vue
.
prototype
.
$parentCommon
=
data
.
common
;
Vue
.
prototype
.
$parentRouter
=
data
.
router
;
Vue
.
prototype
.
$parentRouter
=
data
.
router
;
Vue
.
prototype
.
$parentVuex
=
data
.
store
;
Vue
.
prototype
.
$parentVuex
=
data
.
store
;
console
.
log
(
data
.
common
)
instance
=
new
Vue
({
instance
=
new
Vue
({
router
,
router
,
store
,
store
,
...
...
src/pages/monitor/addFence.vue
View file @
6600a18
...
@@ -29,7 +29,8 @@
...
@@ -29,7 +29,8 @@
<el-select
v-model=
"form.triggerType"
placeholder=
"请选择"
size=
"small"
>
<el-select
v-model=
"form.triggerType"
placeholder=
"请选择"
size=
"small"
>
<el-option
label=
"驶入"
:value=
"1"
></el-option>
<el-option
label=
"驶入"
:value=
"1"
></el-option>
<el-option
label=
"驶出"
:value=
"2"
></el-option>
<el-option
label=
"驶出"
:value=
"2"
></el-option>
<el-option
label=
"驶入驶出"
:value=
"3"
></el-option>
<el-option
label=
"驶入驶出"
:value=
"3"
v-if=
"form.source == 1"
></el-option>
<!-- v1.25.0版本需求,驶入驶出监控类型只有有线设备才有 -->
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"围栏类型"
prop=
"bizFenceType"
>
<el-form-item
label=
"围栏类型"
prop=
"bizFenceType"
>
...
@@ -137,7 +138,7 @@
...
@@ -137,7 +138,7 @@
</el-collapse-transition>
</el-collapse-transition>
<!-- 围栏内容 end -->
<!-- 围栏内容 end -->
<user-list
:init=
"userListInit"
v-if=
"userListModalVisible"
@
onUserListInit=
"(res)=>userListInit=res"
:userData=
"tableData"
@
onUpdateUserData=
"updateUserData"
:userListModalVisible=
"userListModalVisible"
:shopId=
"form.specialShopId
"
@
onUserListModalChange=
"userListModalChange"
ref=
"userList"
>
<user-list
v-if=
"userListModalVisible"
@
onUserListInit=
"(res)=>userListInit=res"
:userData=
"tableData"
@
onUpdateUserData=
"updateUserData"
:userListModalVisible=
"userListModalVisible"
:shopId=
"form.specialShopId"
:source=
"form.source
"
@
onUserListModalChange=
"userListModalChange"
ref=
"userList"
>
</user-list>
</user-list>
</div>
</div>
</template>
</template>
...
@@ -281,6 +282,7 @@ export default {
...
@@ -281,6 +282,7 @@ export default {
timeType
:
2
,
timeType
:
2
,
enableStatus
:
1
,
enableStatus
:
1
,
radius
:
1000
,
radius
:
1000
,
source
:
1
},
},
restainFenceName
:
""
,
restainFenceName
:
""
,
rules
:
{
rules
:
{
...
@@ -347,11 +349,13 @@ export default {
...
@@ -347,11 +349,13 @@ export default {
});
});
},
},
});
});
},
},
mounted
()
{
mounted
()
{
//this.listener();
//this.listener();
let
_this
=
this
;
let
_this
=
this
;
let
query
=
this
.
$route
.
query
;
let
query
=
this
.
$route
.
query
;
this
.
$set
(
this
.
form
,
'source'
,
query
.
source
);
if
(
query
.
id
)
{
if
(
query
.
id
)
{
_this
.
fenceId
=
query
.
id
;
_this
.
fenceId
=
query
.
id
;
_this
.
getFenceInfo
(
query
.
id
);
_this
.
getFenceInfo
(
query
.
id
);
...
@@ -518,6 +522,7 @@ export default {
...
@@ -518,6 +522,7 @@ export default {
oParams
.
bizFenceType
=
14
;
oParams
.
bizFenceType
=
14
;
oParams
.
telNumbers
=
form
.
telNumbers
;
oParams
.
telNumbers
=
form
.
telNumbers
;
oParams
.
remark
=
form
.
remark
;
oParams
.
remark
=
form
.
remark
;
oParams
.
source
=
form
.
source
;
// 编辑围栏特有参数
// 编辑围栏特有参数
if
(
_this
.
fenceId
)
{
if
(
_this
.
fenceId
)
{
...
...
src/pages/monitor/fence.vue
View file @
6600a18
...
@@ -47,7 +47,12 @@
...
@@ -47,7 +47,12 @@
>
>
<el-option
label=
"驶出"
:value=
"2"
></el-option>
<el-option
label=
"驶出"
:value=
"2"
></el-option>
<el-option
label=
"驶入"
:value=
"1"
></el-option>
<el-option
label=
"驶入"
:value=
"1"
></el-option>
<el-option
label=
"驶入驶出"
:value=
"3"
></el-option>
<!-- v1.25.0版本需求,无线设备新增围栏只有驶入驶出报警 -->
<el-option
label=
"驶入驶出"
:value=
"3"
v-if=
"form.source == 1"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"指定区间"
prop=
"dateRange"
>
<el-form-item
label=
"指定区间"
prop=
"dateRange"
>
...
@@ -287,6 +292,7 @@ export default {
...
@@ -287,6 +292,7 @@ export default {
shapeType
:
1
,
shapeType
:
1
,
radius
:
1000
,
radius
:
1000
,
enableStatus
:
1
,
enableStatus
:
1
,
source
:
1
,
},
},
rules
:
{
rules
:
{
fenceName
:
[
fenceName
:
[
...
@@ -317,6 +323,9 @@ export default {
...
@@ -317,6 +323,9 @@ export default {
created
()
{
created
()
{
EventBus
.
$on
(
"uiMap.fence.onFenceRadiusChange"
,
this
.
onFenceRadiusChange
);
EventBus
.
$on
(
"uiMap.fence.onFenceRadiusChange"
,
this
.
onFenceRadiusChange
);
EventBus
.
$on
(
"uiMap.fence.polygonChange"
,
this
.
onFencePolyChange
);
EventBus
.
$on
(
"uiMap.fence.polygonChange"
,
this
.
onFencePolyChange
);
let
_query
=
this
.
$route
.
query
;
this
.
$set
(
this
.
form
,
"source"
,
_query
.
source
||
0
);
this
.
initMap
();
this
.
initMap
();
},
},
mounted
()
{
mounted
()
{
...
...
src/pages/monitor/fenceMap.vue
View file @
6600a18
...
@@ -101,7 +101,7 @@ export default {
...
@@ -101,7 +101,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
let
_this
=
this
;
let
_this
=
this
;
let
plugins
=
[
"AMap.LngLat"
,
"AMap.AutoComplete"
];
let
plugins
=
[
"AMap.LngLat"
,
"AMap.AutoComplete"
,
'AMap.MouseTool'
,
'AMap.PolyEditor'
];
_this
.
$mapInit
({
version
:
"1.4.2"
,
plugins
:
plugins
}).
then
((
AMap
)
=>
{
_this
.
$mapInit
({
version
:
"1.4.2"
,
plugins
:
plugins
}).
then
((
AMap
)
=>
{
window
.
AMap
=
AMap
;
window
.
AMap
=
AMap
;
_this
.
mapObj
=
mapService
.
init
(
"mapContainer"
);
_this
.
mapObj
=
mapService
.
init
(
"mapContainer"
);
...
...
src/pages/monitor/fence_userlist.vue
View file @
6600a18
<
template
>
<
template
>
<!-- 关联用户弹框 -->
<!-- 关联用户弹框 -->
<el-dialog
id=
"userListModal"
:visible=
"userListModalVisible"
@
open=
"openDialog"
@
close=
"closeDialog"
append-to-body
width=
"1040px"
top=
"8vh"
>
<el-dialog
id=
"userListModal"
:visible=
"userListModalVisible"
@
open=
"openDialog"
@
close=
"closeDialog"
append-to-body
width=
"1040px"
top=
"8vh"
>
<div
class=
"dialog-header"
slot=
"title"
>
<div
class=
"dialog-header"
slot=
"title"
>
<h2
class=
"header-title"
>
关联设备
</h2>
<h2
class=
"header-title"
>
关联设备
</h2>
</div>
</div>
<!-- 搜索区域 开始 -->
<!-- 搜索区域 开始 -->
<el-form
:model=
"form"
:inline=
"true"
size=
"mini"
class=
"search_form"
>
<el-form
:model=
"form"
:inline=
"true"
size=
"mini"
class=
"search_form"
>
<el-form-item
label=
"用户查询"
class=
"pull-left"
>
<el-form-item
label=
"用户查询"
class=
"pull-left"
>
<el-input
placeholder=
"请输入对应条件值"
v-model=
"form.term"
size=
"small"
class=
"input-with-select"
style=
"width:340px"
maxlength=
"50"
clearable
>
<el-input
<el-select
v-model=
"form.termType"
slot=
"prepend"
style=
"width:120px;"
placeholder=
"请选择"
size=
"small"
>
placeholder=
"请输入对应条件值"
v-model=
"form.term"
size=
"small"
class=
"input-with-select"
style=
"width: 340px"
maxlength=
"50"
clearable
>
<el-select
v-model=
"form.termType"
slot=
"prepend"
style=
"width: 120px"
placeholder=
"请选择"
size=
"small"
>
<el-option
label=
"设备号"
value=
"1"
></el-option>
<el-option
label=
"设备号"
value=
"1"
></el-option>
<el-option
label=
"车架号"
value=
"2"
></el-option>
<el-option
label=
"车架号"
value=
"2"
></el-option>
<el-option
label=
"姓名"
value=
"3"
></el-option>
<el-option
label=
"姓名"
value=
"3"
></el-option>
...
@@ -20,27 +42,54 @@
...
@@ -20,27 +42,54 @@
<el-button
type=
"primary"
size=
"small"
@
click=
"search"
>
查询
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"search"
>
查询
</el-button>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"small"
@
click=
"restParams"
>
重置
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"restParams"
>
重置
</el-button
>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
size=
"small"
@
click=
"showHighSearch"
>
高级搜索
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"showHighSearch"
>
高级搜索
</el-button
>
</el-form-item>
</el-form-item>
<div
v-show=
"highSearchVisible"
>
<div
v-show=
"highSearchVisible"
>
<el-form-item>
<el-form-item>
<div
class=
"pre_select_box"
>
<div
class=
"pre_select_box"
>
<el-select
v-model=
"form.timeType"
class=
"small_select mr5"
placeholder=
"请选择"
>
<el-select
v-model=
"form.timeType"
class=
"small_select mr5"
placeholder=
"请选择"
>
<el-option
label=
"激活时间"
value=
"1"
></el-option>
<el-option
label=
"激活时间"
value=
"1"
></el-option>
</el-select>
</el-select>
<el-date-picker
v-model=
"form.timeDate"
class=
"data_picker"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
<el-date-picker
v-model=
"form.timeDate"
class=
"data_picker"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</el-date-picker>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"车辆归属"
>
<el-form-item
label=
"车辆归属"
>
<el-popover
v-model=
"showGlsxOranization"
placement=
"bottom-start"
width=
"400"
trigger=
"click"
>
<el-popover
v-model=
"showGlsxOranization"
placement=
"bottom-start"
width=
"400"
trigger=
"click"
>
<div>
<div>
<glsx-organization
@
change=
"onChange"
></glsx-organization>
<glsx-organization
@
change=
"onChange"
></glsx-organization>
</div>
</div>
<el-input
v-model=
"form.orgName"
placeholder=
"所属组织"
slot=
"reference"
readonly
:clearable=
"true"
>
<el-input
v-model=
"form.orgName"
placeholder=
"所属组织"
slot=
"reference"
readonly
:clearable=
"true"
>
</el-input>
</el-input>
</el-popover>
</el-popover>
</el-form-item>
</el-form-item>
...
@@ -53,22 +102,30 @@
...
@@ -53,22 +102,30 @@
<p
class=
"right_title"
>
结果列表
</p>
<p
class=
"right_title"
>
结果列表
</p>
<ul
class=
"choose-list"
>
<ul
class=
"choose-list"
>
<li
v-for=
"item in resultList"
:key=
"item.vin"
>
<li
v-for=
"item in resultList"
:key=
"item.vin"
>
<el-checkbox
v-model=
"item.checked"
@
change=
"checkedChange(item)"
class=
"choose-list-checkbox"
>
<el-checkbox
v-model=
"item.checked"
@
change=
"checkedChange(item)"
class=
"choose-list-checkbox"
>
<div
class=
"choose-list-content"
>
<div
class=
"choose-list-content"
>
<p>
{{
item
.
name
}}
/
{{
item
.
vin
}}
</p>
<p>
{{
item
.
name
}}
/
{{
item
.
vin
}}
</p>
<p
class=
"choose-list-group"
>
<p
class=
"choose-list-group"
>
<el-tag
type=
"info"
size=
"small"
>
{{
item
.
sns
}}
</el-tag>
<el-tag
type=
"info"
size=
"small"
>
{{
item
.
sns
}}
</el-tag>
</p>
</p>
</div>
</div>
</el-checkbox>
</el-checkbox>
</li>
</li>
<infinite-loading
v-if=
"needInfinite"
@
infinite=
"infiniteHandler"
ref=
"infiniteLoading"
>
<infinite-loading
v-if=
"needInfinite"
@
infinite=
"infiniteHandler"
ref=
"infiniteLoading"
>
<span
slot=
"no-more"
>
没有更多数据了
</span>
<span
slot=
"no-more"
>
没有更多数据了
</span>
<span
slot=
"no-results"
>
无结果
</span>
<span
slot=
"no-results"
>
无结果
</span>
</infinite-loading>
</infinite-loading>
</ul>
</ul>
<el-checkbox
v-model=
"checkedAll"
>
全选
</el-checkbox>
<el-checkbox
v-model=
"checkedAll"
>
全选
</el-checkbox>
<span
class=
"pull-right"
>
列表记录总数
{{
total
}}
条
</span>
<span
class=
"pull-right"
>
列表记录总数
{{
total
}}
条
</span>
</el-col>
</el-col>
<el-col
:span=
"12"
class=
"choose-list-wrap"
>
<el-col
:span=
"12"
class=
"choose-list-wrap"
>
<p
class=
"right_title"
>
<p
class=
"right_title"
>
...
@@ -87,15 +144,30 @@
...
@@ -87,15 +144,30 @@
</el-checkbox>
</el-checkbox>
</li>
-->
</li>
-->
<vxe-list
height=
"340"
class=
"my-list"
:loading=
"loading1"
:data=
"chosenList"
>
<vxe-list
height=
"340"
class=
"my-list"
:loading=
"loading1"
:data=
"chosenList"
>
<template
#
default=
"
{ items }">
<template
#
default=
"
{ items }">
<div
class=
"my-list-item"
v-for=
"(item, index) in items"
:key=
"index"
>
{{
item
.
label
}}
</div>
<div
<li
v-for=
"(item,index) in items"
:key=
"index"
>
class=
"my-list-item"
<el-checkbox
v-model=
"item.checked"
@
change=
"checkedChange(item)"
class=
"choose-list-checkbox"
>
v-for=
"(item, index) in items"
:key=
"index"
>
{{
item
.
label
}}
</div>
<li
v-for=
"(item, index) in items"
:key=
"index"
>
<el-checkbox
v-model=
"item.checked"
@
change=
"checkedChange(item)"
class=
"choose-list-checkbox"
>
<div
class=
"choose-list-content"
>
<div
class=
"choose-list-content"
>
<p>
{{
item
.
name
}}
/
{{
item
.
vin
}}
</p>
<p>
{{
item
.
name
}}
/
{{
item
.
vin
}}
</p>
<p
class=
"choose-list-group"
>
<p
class=
"choose-list-group"
>
<el-tag
type=
"info"
size=
"small"
>
{{
item
.
sns
}}
</el-tag>
<el-tag
type=
"info"
size=
"small"
>
{{
item
.
sns
}}
</el-tag>
</p>
</p>
</div>
</div>
</el-checkbox>
</el-checkbox>
...
@@ -104,20 +176,21 @@
...
@@ -104,20 +176,21 @@
</vxe-list>
</vxe-list>
</ul>
</ul>
<el-checkbox
v-model=
"checkedCancel"
>
取消
</el-checkbox>
<el-checkbox
v-model=
"checkedCancel"
>
取消
</el-checkbox>
<span
class=
"pull-right"
>
列表记录总数 {{
chosenList.length
}} 条
</span>
<span
class=
"pull-right"
>
列表记录总数 {{
chosenList.length
}} 条
</span>
</el-col>
</el-col>
</el-row>
</el-row>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"sure"
size=
"small"
>
确认
</el-button>
<el-button
type=
"primary"
@
click=
"sure"
size=
"small"
>
确认
</el-button>
<el-button
@
click=
"$emit('onUserListModalChange', false)"
size=
"small"
>
取消
</el-button>
<el-button
@
click=
"$emit('onUserListModalChange', false)"
size=
"small"
>
取消
</el-button
>
</div>
</div>
<!-- 批量导入弹框 -->
<!-- 批量导入弹框 -->
<!-- <user-list-import @exportDate="exportDate" v-if="userImportModalVisible" :userImportModalVisible="userImportModalVisible" @onUserImportModalChange="userImportModalChange" @onRefreshList="getData"></user-list-import> -->
<!-- <user-list-import @exportDate="exportDate" v-if="userImportModalVisible" :userImportModalVisible="userImportModalVisible" @onUserImportModalChange="userImportModalChange" @onRefreshList="getData"></user-list-import> -->
<!-- 批量导入弹框 /-->
<!-- 批量导入弹框 /-->
</el-dialog>
</el-dialog>
<!-- 关联用户弹框 /-->
<!-- 关联用户弹框 /-->
</template>
</template>
<
script
>
<
script
>
import
vVechicleSelect
from
"components/VechicleSelect.vue"
;
import
vVechicleSelect
from
"components/VechicleSelect.vue"
;
...
@@ -128,7 +201,7 @@ import { GET_ELECFENCE_LINKSNS } from "@/api/services/fence";
...
@@ -128,7 +201,7 @@ import { GET_ELECFENCE_LINKSNS } from "@/api/services/fence";
import
{
deepClone
,
showToast
}
from
"@/utils/utils"
;
import
{
deepClone
,
showToast
}
from
"@/utils/utils"
;
export
default
{
export
default
{
name
:
"UserList"
,
name
:
"UserList"
,
props
:
[
"userListModalVisible"
,
"userData"
,
"init"
,
"shopId"
],
props
:
[
"userListModalVisible"
,
"userData"
,
"init"
,
"shopId"
,
"source"
],
components
:
{
components
:
{
vVechicleSelect
,
vVechicleSelect
,
InfiniteLoading
,
InfiniteLoading
,
...
@@ -321,6 +394,7 @@ export default {
...
@@ -321,6 +394,7 @@ export default {
oParams
.
startTime
=
o
.
timeDate
[
0
];
oParams
.
startTime
=
o
.
timeDate
[
0
];
oParams
.
endTime
=
o
.
timeDate
[
1
];
oParams
.
endTime
=
o
.
timeDate
[
1
];
}
}
oParams
.
deviceSource
=
this
.
source
||
0
;
return
oParams
;
return
oParams
;
},
},
infiniteHandler
(
$state
)
{
infiniteHandler
(
$state
)
{
...
...
src/utils/mapService.js
View file @
6600a18
...
@@ -501,12 +501,17 @@ MapService.prototype = {
...
@@ -501,12 +501,17 @@ MapService.prototype = {
// 跳转到电子围栏页面 无线设备不能跳转电子围栏 isSource:1有线,其他无线
// 跳转到电子围栏页面 无线设备不能跳转电子围栏 isSource:1有线,其他无线
let
fenceBtn
=
infoDiv
.
querySelector
(
'[data-fence]'
);
let
fenceBtn
=
infoDiv
.
querySelector
(
'[data-fence]'
);
// 判断是否分配了电子围栏按钮权限
let
fencePermission
=
vue
.
$parentCommon
.
hasPermission
(
'ADD_WIRELESS_DEVICE_FENCE'
,
true
);
console
.
log
(
vue
.
$parentCommon
.
hasPermission
);
if
(
fenceBtn
)
{
if
(
fenceBtn
)
{
if
(
info
.
isSource
!=
1
)
{
if
(
!
fencePermission
)
{
fenceBtn
.
classList
.
add
(
'fence_btn_grey'
);
fenceBtn
.
classList
.
add
(
'fence_btn_grey'
);
}
}
// v1.25.0版本需求,无线设备和有线设备都支持围栏
queryCode
=
`sn=
${
info
.
sn
}
&name=
${
encodeURI
(
info
.
name
)}
&standno=
${
info
.
standNo
}
&source=
${
isSource
}
`
;
fenceBtn
.
onclick
=
function
()
{
fenceBtn
.
onclick
=
function
()
{
if
(
info
.
isSource
==
1
)
{
if
(
fencePermission
)
{
mapService
.
openPage
(
`#/monitor/fence?
${
queryCode
}
`
)
mapService
.
openPage
(
`#/monitor/fence?
${
queryCode
}
`
)
}
}
}
}
...
...
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