Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
e-shield-h5
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 73a02610
authored
Jul 27, 2022
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
冒烟测试 bug修改
1 parent
997453c1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
231 additions
and
162 deletions
src/App.vue
src/components/mapContent.vue
src/components/popup.vue
src/main.js
src/views/fence.vue
src/views/freq.vue
src/views/index.vue
src/views/resident.vue
src/App.vue
View file @
73a0261
...
@@ -60,4 +60,10 @@ body {
...
@@ -60,4 +60,10 @@ body {
//
position
:
fixed
;
//
position
:
fixed
;
z-index
:
100
;
z-index
:
100
;
}
}
button
{
border-radius
:
0
;
border
:
none
;
outline
:
none
;
background
:
rgba
(
0
,
0
,
0
,
0
);
}
</
style
>
</
style
>
src/components/mapContent.vue
View file @
73a0261
...
@@ -2,13 +2,21 @@
...
@@ -2,13 +2,21 @@
<div
class=
"map-box"
>
<div
class=
"map-box"
>
<slot
name=
"mapBox"
></slot>
<slot
name=
"mapBox"
></slot>
<div
v-show=
"isUploaded"
>
<div
v-show=
"isUploaded"
>
<a
class=
"map-cmd-icon location"
@
click=
"getLocation"
>
<button
class=
"map-cmd-icon location"
@
click=
"getLocation"
v-preventReClick
>
<span
v-if=
"!isGetLocation"
class=
"icon icon-location"
></span>
<span
v-if=
"!isGetLocation"
class=
"icon icon-location"
></span>
<van-loading
v-else
color=
"#1989fa"
/>
<van-loading
v-else
color=
"#1989fa"
/>
</a>
</button>
<a
class=
"map-cmd-icon refresh-car"
@
click=
"refresh"
>
<button
class=
"map-cmd-icon refresh-car"
@
click=
"refresh"
v-preventReClick
>
<span
class=
"icon icon-refresh-car"
></span>
<span
class=
"icon icon-refresh-car"
></span>
</
a
>
</
button
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -17,11 +25,7 @@
...
@@ -17,11 +25,7 @@
import
{
onMounted
,
ref
}
from
"vue"
;
import
{
onMounted
,
ref
}
from
"vue"
;
export
default
{
export
default
{
name
:
"mapContent"
,
name
:
"mapContent"
,
props
:
{
props
:
{},
noShowNotice
:
{
type
:
Boolean
,
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
let
map
=
null
;
let
map
=
null
;
const
isUploaded
=
ref
(
false
);
const
isUploaded
=
ref
(
false
);
...
...
src/components/popup.vue
View file @
73a0261
...
@@ -8,13 +8,15 @@
...
@@ -8,13 +8,15 @@
>
>
<div
class=
"content-box"
>
<div
class=
"content-box"
>
<div
class=
"btn-class"
>
<div
class=
"btn-class"
>
<
span
class=
"cancel-btn"
@
click=
"cancel"
>
取消
</spa
n>
<
button
class=
"cancel-btn"
@
click=
"cancel"
>
取消
</butto
n>
<
spa
n
<
butto
n
class=
"save-btn"
class=
"save-btn"
:class=
"isDisabled ? 'disabled' : ''"
:class=
"isDisabled ? 'disabled' : ''"
@
click=
"save"
@
click=
"save"
>
{{
isDisabled
?
"关闭"
:
"确定"
}}
</span
v-preventReClick
>
>
{{
isDisabled
?
"关闭"
:
"确定"
}}
</button>
</div>
</div>
<slot></slot>
<slot></slot>
</div>
</div>
...
...
src/main.js
View file @
73a0261
...
@@ -10,6 +10,19 @@ import "@/assets/icons";
...
@@ -10,6 +10,19 @@ import "@/assets/icons";
import
SvgIcon
from
"@/components/svgIcon"
;
import
SvgIcon
from
"@/components/svgIcon"
;
const
app
=
createApp
(
App
);
const
app
=
createApp
(
App
);
// 防止重复快速点击自定义全局指令
app
.
directive
(
"preventReClick"
,
{
mounted
(
el
,
binding
)
{
el
.
addEventListener
(
"click"
,
()
=>
{
if
(
!
el
.
disabled
)
{
el
.
disabled
=
true
;
setTimeout
(()
=>
{
el
.
disabled
=
false
;
},
binding
.
value
||
1000
);
}
});
},
});
app
.
component
(
"svg-icon"
,
SvgIcon
);
app
.
component
(
"svg-icon"
,
SvgIcon
);
vant
(
app
);
vant
(
app
);
app
.
use
(
store
).
use
(
router
).
mount
(
"#app"
);
app
.
use
(
store
).
use
(
router
).
mount
(
"#app"
);
...
...
src/views/fence.vue
View file @
73a0261
<
template
>
<
template
>
<div
class=
"info-content"
>
<div
class=
"info-content"
>
<div
class=
"settingControll"
@
click=
"showSettingDialog = true"
>
<button
class=
"settingControll"
@
click=
"showSettingDialog = true"
v-preventReClick
>
<a
class=
"icon icon-setting-btn"
></a>
<a
class=
"icon icon-setting-btn"
></a>
<span
class=
"setting-text"
>
设置
</span>
<span
class=
"setting-text"
>
设置
</span>
</
div
>
</
button
>
<popup
<popup
:show=
"showSettingDialog"
:show=
"showSettingDialog"
@
btnCancel=
"showSettingDialog = false"
@
btnCancel=
"showSettingDialog = false"
...
@@ -16,13 +20,15 @@
...
@@ -16,13 +20,15 @@
>
>
<div
class=
"setting-content"
>
<div
class=
"setting-content"
>
<div
class=
"type-btn"
>
<div
class=
"type-btn"
>
<
spa
n
<
butto
n
:class=
"selectedTypeItem === index ? 'active' : ''"
:class=
"selectedTypeItem === index ? 'active' : ''"
v-for=
"(item, index) in fenceTypeList"
v-for=
"(item, index) in fenceTypeList"
:key=
"index"
:key=
"index"
@
click=
"changeFenceType(index)"
@
click=
"changeFenceType(index)"
>
{{
item
}}
</span
v-preventReClick
>
>
{{
item
}}
</button>
</div>
</div>
<div
class=
"type-box"
v-if=
"selectedTypeItem === 0"
>
<div
class=
"type-box"
v-if=
"selectedTypeItem === 0"
>
<div>
<div>
...
@@ -39,20 +45,20 @@
...
@@ -39,20 +45,20 @@
<div
class=
"type-box"
v-if=
"selectedTypeItem === 1"
>
<div
class=
"type-box"
v-if=
"selectedTypeItem === 1"
>
<div>
<div>
<span
class=
"label"
>
{{
fenceTypeList
[
selectedTypeItem
]
}}
</span>
<span
class=
"label"
>
{{
fenceTypeList
[
selectedTypeItem
]
}}
</span>
<
a
@
click=
"changeProviceCity(1)"
<
button
@
click=
"changeProviceCity(1)"
v-preventReClick
>
>
<span
<span
class=
"radio"
class=
"radio"
:class=
"proviceCityType === 1 ? 'active' : ''"
:class=
"proviceCityType === 1 ? 'active' : ''"
></span
></span
><span>
跨省
</span>
</a
><span>
跨省
</span>
>
</button
>
<
a
@
click=
"changeProviceCity(2)"
<
button
@
click=
"changeProviceCity(2)"
v-preventReClick
>
>
<span
<span
class=
"radio"
class=
"radio"
:class=
"proviceCityType === 2 ? 'active' : ''"
:class=
"proviceCityType === 2 ? 'active' : ''"
></span
></span
><span>
跨市
</span>
</a
><span>
跨市
</span>
>
</button
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -368,7 +374,7 @@ export default defineComponent({
...
@@ -368,7 +374,7 @@ export default defineComponent({
color
:
#111
;
color
:
#111
;
font-weight
:
var
(
--van-font-weight-bold
);
font-weight
:
var
(
--van-font-weight-bold
);
display
:
flex
;
display
:
flex
;
spa
n
{
butto
n
{
flex
:
1
;
flex
:
1
;
border-radius
:
5px
;
border-radius
:
5px
;
height
:
36px
;
height
:
36px
;
...
@@ -377,7 +383,7 @@ export default defineComponent({
...
@@ -377,7 +383,7 @@ export default defineComponent({
text-align
:
center
;
text-align
:
center
;
line-height
:
36px
;
line-height
:
36px
;
}
}
spa
n
.active
{
butto
n
.active
{
height
:
34px
;
height
:
34px
;
line-height
:
34px
;
line-height
:
34px
;
color
:
var
(
--base-color
);
color
:
var
(
--base-color
);
...
@@ -403,7 +409,7 @@ export default defineComponent({
...
@@ -403,7 +409,7 @@ export default defineComponent({
border-radius
:
4px
;
border-radius
:
4px
;
line-height
:
40px
;
line-height
:
40px
;
}
}
a
{
button
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
margin-left
:
15px
;
margin-left
:
15px
;
...
...
src/views/freq.vue
View file @
73a0261
...
@@ -11,14 +11,15 @@
...
@@ -11,14 +11,15 @@
<div
class=
"content"
v-if=
"openFreq"
>
<div
class=
"content"
v-if=
"openFreq"
>
<span
class=
"title-text"
>
选择模式
</span>
<span
class=
"title-text"
>
选择模式
</span>
<div
class=
"middle"
>
<div
class=
"middle"
>
<
spa
n
<
butto
n
v-for=
"(item, index) in typeList"
v-for=
"(item, index) in typeList"
:key=
"index"
:key=
"index"
@
click=
"changeType(index)"
@
click=
"changeType(index)"
v-preventReClick
>
>
<span
class=
"radio"
:class=
"type === index ? 'active' : ''"
></span>
<span
class=
"radio"
:class=
"type === index ? 'active' : ''"
></span>
<span>
{{
item
}}
</span>
<span>
{{
item
}}
</span>
</
spa
n>
</
butto
n>
</div>
</div>
<!-- 追车模式 -->
<!-- 追车模式 -->
<div
class=
"chas-car-content bottom"
v-if=
"type === 0"
>
<div
class=
"chas-car-content bottom"
v-if=
"type === 0"
>
...
@@ -36,49 +37,67 @@
...
@@ -36,49 +37,67 @@
<!-- 闹钟模式 -->
<!-- 闹钟模式 -->
<div
class=
"clock-content bottom"
v-if=
"type === 1"
>
<div
class=
"clock-content bottom"
v-if=
"type === 1"
>
<div
v-for=
"(item, index) in clockList"
:key=
"index"
class=
"clock-item"
>
<div
v-for=
"(item, index) in clockList"
:key=
"index"
class=
"clock-item"
>
<span
class=
"cont-left"
@
click=
"changeClockCheck(index)"
>
<button
class=
"cont-left"
@
click=
"changeClockCheck(index)"
v-preventReClick
>
<svg-icon
<svg-icon
:icon-class=
"item.checked ? 'checked' : 'check'"
:icon-class=
"item.checked ? 'checked' : 'check'"
class=
"check-class"
class=
"check-class"
></svg-icon>
></svg-icon>
<span
class=
"lable"
>
{{
item
.
name
}}
</span>
<span
class=
"lable"
>
{{
item
.
name
}}
</span>
</span>
</button>
<span
class=
"cont-right"
@
click=
"onShowTimePicker(1, index)"
>
<button
class=
"cont-right"
@
click=
"onShowTimePicker(1, index)"
v-preventReClick
>
<svg-icon
icon-class=
"clock"
class=
"clock-class"
></svg-icon>
<svg-icon
icon-class=
"clock"
class=
"clock-class"
></svg-icon>
<span>
<span>
{{
item
.
time
}}
{{
item
.
time
}}
</span>
</span>
</
spa
n>
</
butto
n>
</div>
</div>
</div>
</div>
<!-- 星期模式 -->
<!-- 星期模式 -->
<div
class=
"week-content bottom"
v-if=
"type === 2"
>
<div
class=
"week-content bottom"
v-if=
"type === 2"
>
<div
class=
"week-top"
>
<div
class=
"week-top"
>
<
spa
n
<
butto
n
v-for=
"(item, index) in weekCheckboxItems"
v-for=
"(item, index) in weekCheckboxItems"
:key=
"index"
:key=
"index"
class=
"week-item"
class=
"week-item"
@
click=
"changeWeekCheck(index)"
@
click=
"changeWeekCheck(index)"
v-preventReClick
>
>
<svg-icon
<svg-icon
:icon-class=
"item.checked ? 'checked' : 'check'"
:icon-class=
"item.checked ? 'checked' : 'check'"
class=
"check-class"
class=
"check-class"
></svg-icon>
></svg-icon>
<span
class=
"lable"
>
{{
item
.
name
}}
</span>
<span
class=
"lable"
>
{{
item
.
name
}}
</span>
</
spa
n>
</
butto
n>
</div>
</div>
<div
class=
"time-cont"
>
<div
class=
"time-cont"
>
<span
class=
"label"
>
上点时间
</span>
<span
class=
"label"
>
上点时间
</span>
<span
class=
"cont-right"
@
click=
"onShowTimePicker(2, weekSelectTime)"
>
<button
class=
"cont-right"
@
click=
"onShowTimePicker(2, weekSelectTime)"
v-preventReClick
>
<svg-icon
icon-class=
"clock"
class=
"clock-class"
></svg-icon>
<svg-icon
icon-class=
"clock"
class=
"clock-class"
></svg-icon>
<span>
<span>
{{
weekSelectTime
}}
{{
weekSelectTime
}}
</span>
</span>
</
spa
n>
</
butto
n>
</div>
</div>
</div>
</div>
<van-button
class=
"save-btn"
type=
"primary"
@
click=
"onSave"
block
<van-button
class=
"save-btn"
type=
"primary"
@
click=
"onSave"
block
v-preventReClick
>
保存
</van-button
>
保存
</van-button
>
>
</div>
</div>
...
@@ -102,7 +121,7 @@
...
@@ -102,7 +121,7 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
defineComponent
,
onMounted
,
ref
}
from
"vue"
;
import
{
defineComponent
,
onMounted
,
ref
,
watch
}
from
"vue"
;
import
{
Toast
}
from
"vant"
;
import
{
Toast
}
from
"vant"
;
import
"vant/es/toast/style"
;
import
"vant/es/toast/style"
;
import
popup
from
"@/components/popup.vue"
;
import
popup
from
"@/components/popup.vue"
;
...
@@ -184,20 +203,25 @@ export default defineComponent({
...
@@ -184,20 +203,25 @@ export default defineComponent({
}
}
});
});
};
};
watch
(
()
=>
type
.
value
,
(
newVal
)
=>
{
switch
(
newVal
)
{
case
0
:
Toast
(
"适用于收车场景,指定设备每隔几分钟更新定位信息。"
);
break
;
case
1
:
Toast
(
"适用于催款环节,增加设备每天的上点频率。防止人车失联。"
);
break
;
case
2
:
Toast
(
"适用于日常场景,可按需设置每周的设备回传次数。"
);
break
;
}
}
);
// 切换模式
// 切换模式
const
changeType
=
(
index
)
=>
{
const
changeType
=
(
index
)
=>
{
type
.
value
=
index
;
type
.
value
=
index
;
switch
(
index
)
{
case
0
:
Toast
(
"适用于收车场景,指定设备每隔几分钟更新定位信息。"
);
break
;
case
1
:
Toast
(
"适用于催款环节,增加设备每天的上点频率。防止人车失联。"
);
break
;
case
2
:
Toast
(
"适用于日常场景,可按需设置每周的设备回传次数。"
);
break
;
}
};
};
// 闹钟模式选择
// 闹钟模式选择
const
changeClockCheck
=
(
index
)
=>
{
const
changeClockCheck
=
(
index
)
=>
{
...
@@ -406,7 +430,7 @@ export default defineComponent({
...
@@ -406,7 +430,7 @@ export default defineComponent({
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
font-size
:
14px
;
font-size
:
14px
;
spa
n
{
butto
n
{
flex
:
1
;
flex
:
1
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
src/views/index.vue
View file @
73a0261
...
@@ -188,8 +188,8 @@ export default defineComponent({
...
@@ -188,8 +188,8 @@ export default defineComponent({
const
ISLOADING
=
computed
(()
=>
store
.
state
.
LOADING
);
const
ISLOADING
=
computed
(()
=>
store
.
state
.
LOADING
);
const
showOverlay
=
ref
(
false
);
const
showOverlay
=
ref
(
false
);
const
isSharePage
=
ref
(
false
);
const
isSharePage
=
ref
(
false
);
let
clickFlag
=
true
;
let
map
=
undefined
;
let
map
=
undefined
;
let
_timeoutId
=
undefined
;
const
refreshCb
=
()
=>
{
const
refreshCb
=
()
=>
{
if
(
map
&&
carItem
.
value
)
{
if
(
map
&&
carItem
.
value
)
{
map
&&
map
.
clearMap
();
map
&&
map
.
clearMap
();
...
@@ -199,6 +199,7 @@ export default defineComponent({
...
@@ -199,6 +199,7 @@ export default defineComponent({
}
}
};
};
watch
(
mapIsUploaded
,
(
newVal
)
=>
{
watch
(
mapIsUploaded
,
(
newVal
)
=>
{
console
.
log
(
"123"
);
localStorage
.
removeItem
(
"token"
);
localStorage
.
removeItem
(
"token"
);
localStorage
.
removeItem
(
"sharePage"
);
localStorage
.
removeItem
(
"sharePage"
);
if
(
route
.
query
.
token
)
{
if
(
route
.
query
.
token
)
{
...
@@ -210,20 +211,13 @@ export default defineComponent({
...
@@ -210,20 +211,13 @@ export default defineComponent({
}
}
routeQuery
.
value
=
route
.
query
;
routeQuery
.
value
=
route
.
query
;
if
(
newVal
&&
routeQuery
.
value
.
sn
)
{
if
(
newVal
&&
routeQuery
.
value
.
sn
)
{
carItem
.
value
=
{
sns
:
routeQuery
.
value
.
sn
,
ownerName
:
routeQuery
.
value
.
ownerName
==
"null"
?
"--"
:
routeQuery
.
value
.
ownerName
,
vin
:
routeQuery
.
value
.
vin
==
"null"
?
"--"
:
routeQuery
.
value
.
vin
,
};
if
(
route
.
query
.
sharePage
&&
JSON
.
parse
(
route
.
query
.
sharePage
))
{
if
(
route
.
query
.
sharePage
&&
JSON
.
parse
(
route
.
query
.
sharePage
))
{
localStorage
.
setItem
(
"sharePage"
,
JSON
.
parse
(
route
.
query
.
sharePage
));
localStorage
.
setItem
(
"sharePage"
,
JSON
.
parse
(
route
.
query
.
sharePage
));
if
(
route
.
query
.
shareId
)
{
if
(
route
.
query
.
shareId
)
{
// 校验分享链接是否有效
// 校验分享链接是否有效
CHECK_SHARE
({
CHECK_SHARE
({
shareId
:
Number
(
JSON
.
parse
(
route
.
query
.
shareId
)),
shareId
:
route
.
query
.
shareId
&&
Number
(
JSON
.
parse
(
route
.
query
.
shareId
)),
}).
then
((
v
)
=>
{
}).
then
((
v
)
=>
{
if
(
v
.
code
==
200
)
{
if
(
v
.
code
==
200
)
{
if
(
if
(
...
@@ -241,15 +235,33 @@ export default defineComponent({
...
@@ -241,15 +235,33 @@ export default defineComponent({
isShareDead
.
value
=
true
;
isShareDead
.
value
=
true
;
Dialog
({
message
:
"该分享已失效"
});
Dialog
({
message
:
"该分享已失效"
});
}
else
{
}
else
{
carItem
.
value
=
{
sns
:
routeQuery
.
value
.
sn
,
ownerName
:
routeQuery
.
value
.
ownerName
==
"null"
?
"--"
:
routeQuery
.
value
.
ownerName
,
vin
:
routeQuery
.
value
.
vin
==
"null"
?
"--"
:
routeQuery
.
value
.
vin
,
};
getCarInfo
(
carItem
.
value
);
getCarInfo
(
carItem
.
value
);
getCarList
();
getCarList
();
// 校验分享时效性
checkIsShareDead
(
Number
(
JSON
.
parse
(
route
.
query
.
shareId
)));
}
}
}
}
});
});
}
}
return
;
return
;
}
else
{
carItem
.
value
=
{
sns
:
routeQuery
.
value
.
sn
,
ownerName
:
routeQuery
.
value
.
ownerName
==
"null"
?
"--"
:
routeQuery
.
value
.
ownerName
,
vin
:
routeQuery
.
value
.
vin
==
"null"
?
"--"
:
routeQuery
.
value
.
vin
,
};
}
}
}
}
getCarList
();
getCarList
();
...
@@ -299,27 +311,6 @@ export default defineComponent({
...
@@ -299,27 +311,6 @@ export default defineComponent({
metaEl
.
setAttribute
(
"name"
,
"viewport"
);
metaEl
.
setAttribute
(
"name"
,
"viewport"
);
metaEl
.
setAttribute
(
"content"
,
content
);
metaEl
.
setAttribute
(
"content"
,
content
);
};
};
const
checkIsShareDead
=
(
id
)
=>
{
if
(
_timeoutId
)
{
clearTimeout
(
_timeoutId
);
}
_timeoutId
=
setTimeout
(()
=>
{
CHECK_SHARE
({
shareId
:
id
}).
then
((
v
)
=>
{
if
(
v
.
code
==
200
)
{
if
(
(
v
.
data
&&
v
.
data
.
setting
&&
v
.
data
.
setting
.
enableStatus
!==
1
)
||
(
v
.
data
&&
v
.
data
.
setting
&&
moment
().
isAfter
(
moment
(
v
.
data
.
setting
.
expirationDate
)))
)
{
isShareDead
.
value
=
true
;
}
else
{
checkIsShareDead
();
}
}
});
},
1000
*
60
*
5
);
};
const
isUploaded
=
(
data
)
=>
{
const
isUploaded
=
(
data
)
=>
{
mapIsUploaded
.
value
=
data
;
mapIsUploaded
.
value
=
data
;
};
};
...
@@ -445,15 +436,15 @@ export default defineComponent({
...
@@ -445,15 +436,15 @@ export default defineComponent({
<
/div
>
<
/div
>
<
div
class
=
"cmd-list"
>
<
div
class
=
"cmd-list"
>
<
div
class
=
"cmd-list-top"
>
<
div
class
=
"cmd-list-top"
>
<
a
data
-
car
-
location
>
车辆追踪
<
/a
>
<
button
data
-
car
-
location
>
车辆追踪
<
/button
>
<
a
data
-
replay
>
轨迹回放
<
/a
>
<
button
data
-
replay
>
轨迹回放
<
/button
>
<
a
data
-
resident
>
常驻地
<
/a
>
<
button
data
-
resident
>
常驻地
<
/button
>
<
a
data
-
monitor
>
实时监控
<
/a
>
<
button
data
-
monitor
>
实时监控
<
/button
>
<
/div
>
<
/div
>
<
div
class
=
"cmd-list-bottom"
>
<
div
class
=
"cmd-list-bottom"
>
<
a
data
-
freq
>
设备调频
<
/a
>
<
button
data
-
freq
>
设备调频
<
/button
>
<
a
data
-
fence
>
电子围栏
<
/a
>
<
button
data
-
fence
>
电子围栏
<
/button
>
<
a
data
-
share
>
分享找车
<
/a
>
<
button
data
-
share
>
分享找车
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div>`
;
<
/div>`
;
...
@@ -569,6 +560,7 @@ export default defineComponent({
...
@@ -569,6 +560,7 @@ export default defineComponent({
let
lat
=
item
[
item
.
locationType
].
elat
;
let
lat
=
item
[
item
.
locationType
].
elat
;
let
address
=
item
[
item
.
locationType
].
transferAddress
;
let
address
=
item
[
item
.
locationType
].
transferAddress
;
check
(()
=>
{
check
(()
=>
{
clickFlag
=
false
;
wx
.
miniProgram
.
navigateTo
({
wx
.
miniProgram
.
navigateTo
({
url
:
`../../mapPackage/pages/tracking?lat=
${
lat
}
&lng=
${
lng
}
&address=
${
address
}
`
,
url
:
`../../mapPackage/pages/tracking?lat=
${
lat
}
&lng=
${
lng
}
&address=
${
address
}
`
,
});
});
...
@@ -579,6 +571,7 @@ export default defineComponent({
...
@@ -579,6 +571,7 @@ export default defineComponent({
carReplayBtn
&&
carReplayBtn
&&
(
carReplayBtn
.
onclick
=
()
=>
{
(
carReplayBtn
.
onclick
=
()
=>
{
check
(()
=>
{
check
(()
=>
{
clickFlag
=
false
;
wx
.
miniProgram
.
navigateTo
({
wx
.
miniProgram
.
navigateTo
({
url
:
`../../mapPackage/pages/findCar?sn=
${
item
.
sn
}
&tabItem=replay&source=
${
item
.
source
}
&locationType=
${
item
.
locationType
}
`
,
url
:
`../../mapPackage/pages/findCar?sn=
${
item
.
sn
}
&tabItem=replay&source=
${
item
.
source
}
&locationType=
${
item
.
locationType
}
`
,
});
});
...
@@ -589,6 +582,7 @@ export default defineComponent({
...
@@ -589,6 +582,7 @@ export default defineComponent({
carResidentBtn
&&
carResidentBtn
&&
(
carResidentBtn
.
onclick
=
()
=>
{
(
carResidentBtn
.
onclick
=
()
=>
{
check
(()
=>
{
check
(()
=>
{
clickFlag
=
false
;
wx
.
miniProgram
.
navigateTo
({
wx
.
miniProgram
.
navigateTo
({
url
:
`../../mapPackage/pages/findCar?sn=
${
item
.
sn
}
&tabItem=resident&source=
${
item
.
source
}
&locationType=
${
item
.
locationType
}
`
,
url
:
`../../mapPackage/pages/findCar?sn=
${
item
.
sn
}
&tabItem=resident&source=
${
item
.
source
}
&locationType=
${
item
.
locationType
}
`
,
});
});
...
@@ -598,6 +592,7 @@ export default defineComponent({
...
@@ -598,6 +592,7 @@ export default defineComponent({
carMonitorBtn
&&
carMonitorBtn
&&
(
carMonitorBtn
.
onclick
=
()
=>
{
(
carMonitorBtn
.
onclick
=
()
=>
{
check
(()
=>
{
check
(()
=>
{
clickFlag
=
false
;
wx
.
miniProgram
.
navigateTo
({
wx
.
miniProgram
.
navigateTo
({
url
:
`../../mapPackage/pages/findCar?sn=
${
item
.
sn
}
&tabItem=monitor&source=
${
item
.
source
}
&locationType=
${
item
.
locationType
}
`
,
url
:
`../../mapPackage/pages/findCar?sn=
${
item
.
sn
}
&tabItem=monitor&source=
${
item
.
source
}
&locationType=
${
item
.
locationType
}
`
,
});
});
...
@@ -610,8 +605,11 @@ export default defineComponent({
...
@@ -610,8 +605,11 @@ export default defineComponent({
// 仅无线设备可调频
// 仅无线设备可调频
return
;
return
;
}
else
{
}
else
{
wx
.
miniProgram
.
navigateTo
({
check
(()
=>
{
url
:
`../../mapPackage/pages/findCar?sn=
${
item
.
sn
}
&tabItem=freq&source=
${
item
.
source
}
&locationType=
${
item
.
locationType
}
`
,
clickFlag
=
false
;
wx
.
miniProgram
.
navigateTo
({
url
:
`../../mapPackage/pages/findCar?sn=
${
item
.
sn
}
&tabItem=freq&source=
${
item
.
source
}
&locationType=
${
item
.
locationType
}
`
,
});
});
});
}
}
};
};
...
@@ -621,8 +619,11 @@ export default defineComponent({
...
@@ -621,8 +619,11 @@ export default defineComponent({
if
(
item
.
source
==
0
||
isSharePage
.
value
)
{
if
(
item
.
source
==
0
||
isSharePage
.
value
)
{
return
;
return
;
}
else
{
}
else
{
wx
.
miniProgram
.
navigateTo
({
check
(()
=>
{
url
:
`../../mapPackage/pages/findCar?sn=
${
item
.
sn
}
&tabItem=fence&source=
${
item
.
source
}
&locationType=
${
item
.
locationType
}
`
,
clickFlag
=
false
;
wx
.
miniProgram
.
navigateTo
({
url
:
`../../mapPackage/pages/findCar?sn=
${
item
.
sn
}
&tabItem=fence&source=
${
item
.
source
}
&locationType=
${
item
.
locationType
}
`
,
});
});
});
}
}
};
};
...
@@ -650,6 +651,10 @@ export default defineComponent({
...
@@ -650,6 +651,10 @@ export default defineComponent({
Toast
(
"该分享已失效"
);
Toast
(
"该分享已失效"
);
return
;
return
;
}
}
if
(
!
clickFlag
)
return
;
setTimeout
(()
=>
{
clickFlag
=
true
;
},
1000
);
cb
();
cb
();
};
};
// 加载更多
// 加载更多
...
@@ -952,7 +957,7 @@ export default defineComponent({
...
@@ -952,7 +957,7 @@ export default defineComponent({
.cmd-list-top
{
.cmd-list-top
{
border-bottom
:
1px
solid
#f5f6f7
;
border-bottom
:
1px
solid
#f5f6f7
;
padding
:
14px
12px
;
padding
:
14px
12px
;
a
{
button
{
font-size
:
12px
;
font-size
:
12px
;
display
:
inline-block
;
display
:
inline-block
;
width
:
25%
;
width
:
25%
;
...
@@ -963,13 +968,13 @@ export default defineComponent({
...
@@ -963,13 +968,13 @@ export default defineComponent({
:last-child
{
:last-child
{
border-right
:
none
;
border-right
:
none
;
}
}
a
.disabled
{
button
.disabled
{
color
:
#6c737a
;
color
:
#6c737a
;
}
}
}
}
.cmd-list-bottom
{
.cmd-list-bottom
{
padding
:
14px
12px
;
padding
:
14px
12px
;
a
{
button
{
font-size
:
12px
;
font-size
:
12px
;
display
:
inline-block
;
display
:
inline-block
;
width
:
25%
;
width
:
25%
;
...
@@ -980,7 +985,7 @@ export default defineComponent({
...
@@ -980,7 +985,7 @@ export default defineComponent({
:last-child
{
:last-child
{
border-right
:
none
;
border-right
:
none
;
}
}
a
.disabled
{
button
.disabled
{
color
:
#6c737a
;
color
:
#6c737a
;
}
}
}
}
...
...
src/views/resident.vue
View file @
73a0261
...
@@ -6,14 +6,16 @@
...
@@ -6,14 +6,16 @@
</div>
-->
</div>
-->
<div
class=
"tab"
>
<div
class=
"tab"
>
<div
class=
"tabbar"
>
<div
class=
"tabbar"
>
<
spa
n
<
butto
n
class=
"time_btn"
class=
"time_btn"
v-for=
"(item, index) in timeBtnList"
v-for=
"(item, index) in timeBtnList"
:key=
"index"
:key=
"index"
:class=
"seledtedItem === index ? 'active' : ''"
:class=
"seledtedItem === index ? 'active' : ''"
@
click=
"selectTime(index)"
@
click=
"selectTime(index)"
>
{{
index
<
2
?
item
:
currentDateText
}}
</span
v-preventReClick
>
>
{{
index
<
2
?
item
:
currentDateText
}}
</button>
</div>
</div>
</div>
</div>
<popup
<popup
...
@@ -57,25 +59,33 @@
...
@@ -57,25 +59,33 @@
:key=
"index"
:key=
"index"
>
>
<span
class=
"icon icon-loc-icon"
></span>
<span
class=
"icon icon-loc-icon"
></span>
<div
class=
"left"
>
<div
class=
"text-content"
>
<p
class=
"title"
>
{{ item.transferAddress }}
</p>
<div
class=
"left"
>
<p
class=
"time"
>
<p
class=
"title"
>
{{ item.transferAddress }}
</p>
停留
<span
class=
"time-text"
>
{{
<p
class=
"time"
>
item.totalDurationString
停留
<span
class=
"time-text"
>
{{
}}
</span
item.totalDurationString
>
}}
</span
</p>
>
</div>
</p>
<div
class=
"right"
>
</div>
<a
<div
class=
"right"
>
class=
"copy-adr"
<button
@
click=
"copyAddress"
class=
"button-class"
:data-clipboard-text=
"item.transferAddress"
@
click=
"copyAddress"
><i
class=
"icon icon-copy"
></i><span>
复制
</span></a
v-preventReClick
>
:data-clipboard-text=
"item.transferAddress"
<a
class=
"navigate"
@
click=
"navigation(item)"
>
><i
class=
"icon icon-navgation"
></i><span>
导航
</span></a
<i
class=
"icon icon-copy"
></i><span>
复制
</span>
>
</button>
<button
class=
"button-class"
@
click=
"navigation(item)"
v-preventReClick
>
<i
class=
"icon icon-navgation"
></i><span>
导航
</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -260,8 +270,7 @@ export default defineComponent({
...
@@ -260,8 +270,7 @@ export default defineComponent({
var
lnglat
=
new
window
.
AMap
.
LngLat
(
item
.
elng
,
item
.
elat
);
var
lnglat
=
new
window
.
AMap
.
LngLat
(
item
.
elng
,
item
.
elat
);
var
marker
=
new
window
.
AMap
.
Marker
({
var
marker
=
new
window
.
AMap
.
Marker
({
position
:
lnglat
,
position
:
lnglat
,
content
:
content
:
'<span class="icon icon-resident"></span>'
,
'<span class="icon icon-resident" style="transform: scale(0.5);"></span>'
,
map
:
currentMap
,
map
:
currentMap
,
offset
:
new
window
.
AMap
.
Pixel
(
-
8.5
,
-
13
),
offset
:
new
window
.
AMap
.
Pixel
(
-
8.5
,
-
13
),
});
});
...
@@ -290,6 +299,7 @@ export default defineComponent({
...
@@ -290,6 +299,7 @@ export default defineComponent({
};
};
// 导航
// 导航
const
navigation
=
(
data
)
=>
{
const
navigation
=
(
data
)
=>
{
console
.
log
(
"123"
);
wx
.
miniProgram
.
navigateTo
({
wx
.
miniProgram
.
navigateTo
({
url
:
`../../mapPackage/pages/tracking?lat=
${
data
.
elat
}
&lng=
${
data
.
elng
}
&address=
${
data
.
transferAddress
}
`
,
url
:
`../../mapPackage/pages/tracking?lat=
${
data
.
elat
}
&lng=
${
data
.
elng
}
&address=
${
data
.
transferAddress
}
`
,
});
});
...
@@ -433,63 +443,62 @@ export default defineComponent({
...
@@ -433,63 +443,62 @@ export default defineComponent({
}
}
.list-content-resident
{
.list-content-resident
{
width
:
calc
(
100%
-
30px
);
width
:
calc
(
100%
-
30px
);
padding
:
5px
15px
0
1
5px
;
padding
-top
:
5px
;
font-size
:
14px
;
font-size
:
14px
;
.list-item
{
.list-item
{
height
:
68px
;
height
:
68px
;
display
:
flex
;
display
:
flex
;
width
:
100%
;
justify-content
:
space-between
;
justify-content
:
space-between
;
.icon-loc-icon
{
.icon-loc-icon
{
margin-top
:
7px
;
margin-top
:
7px
;
flex-shrink
:
0
;
}
}
.left
{
.text-content
{
padding
:
12px
10px
12px
0
;
flex-shrink
:
0
;
border-bottom
:
1px
solid
#f0f2f5
;
.title
{
color
:
#000
;
width
:
224px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
.time
{
color
:
#6c737a
;
font-size
:
12px
;
margin-top
:
5px
;
.time-text
{
color
:
var
(
--base-color
);
}
}
}
.right
{
padding
:
12px
0
;
border-bottom
:
1px
solid
#f0f2f5
;
border-bottom
:
1px
solid
#f0f2f5
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
flex
:
1
;
a
{
width
:
0
;
.left
{
padding
:
12px
10px
12px
0
;
flex
:
1
;
width
:
0
;
display
:
flex
;
display
:
flex
;
flex-flow
:
column
;
flex-flow
:
column
;
align-items
:
center
;
.title
{
}
color
:
#000
;
.navigate
{
overflow
:
hidden
;
i
{
white-space
:
nowrap
;
display
:
inline-block
;
text-overflow
:
ellipsis
;
}
}
span
{
.time
{
color
:
#6c737a
;
color
:
#6c737a
;
font-size
:
20px
;
font-size
:
12px
;
transform
:
scale
(
0.5
);
margin-top
:
5px
;
.time-text
{
color
:
var
(
--base-color
);
}
}
}
}
}
.copy-adr
{
i
{
.right
{
display
:
inline-block
;
display
:
flex
;
align-items
:
center
;
button
{
display
:
flex
;
flex-flow
:
column
;
align-items
:
center
;
}
}
span
{
.button-class
{
color
:
#6c737a
;
i
{
font-size
:
20px
;
display
:
inline-block
;
transform
:
scale
(
0.5
);
}
span
{
color
:
#6c737a
;
font-size
:
20px
;
transform
:
scale
(
0.5
);
}
}
}
}
}
}
}
...
...
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