Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-insurance
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 d1a315eb
authored
Dec 07, 2020
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化代码
1 parent
6ba5fc00
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
138 additions
and
86 deletions
src/common/constants.js
src/views/biz/collision/index.vue
src/views/biz/delivery/index.vue
src/views/biz/devices/index.vue
src/views/biz/devices_login/index.vue
src/views/biz/fmrsdevice/index.vue
src/views/biz/lost/index.vue
src/views/biz/merchant/index.vue
src/views/biz/shop/index.vue
src/views/biz/tspdevice/index.vue
src/common/constants.js
View file @
d1a315e
...
@@ -18,8 +18,8 @@ export const devicesList = [{
...
@@ -18,8 +18,8 @@ export const devicesList = [{
label
:
'全部'
,
label
:
'全部'
,
value
:
''
value
:
''
},
{
},
{
label
:
'未知设备'
,
//
label: '未知设备',
value
:
'-1'
//
value: '-1'
},
{
},
{
label
:
'OBD'
,
label
:
'OBD'
,
value
:
'1'
value
:
'1'
...
@@ -30,9 +30,6 @@ export const devicesList = [{
...
@@ -30,9 +30,6 @@ export const devicesList = [{
label
:
'电子狗'
,
label
:
'电子狗'
,
value
:
'3'
value
:
'3'
},
{
},
{
label
:
''
,
value
:
'4'
},
{
label
:
'TBOX(2G)'
,
label
:
'TBOX(2G)'
,
value
:
'5'
value
:
'5'
},
{
},
{
...
@@ -52,9 +49,9 @@ export const devicesList = [{
...
@@ -52,9 +49,9 @@ export const devicesList = [{
value
:
'12134'
value
:
'12134'
}]
}]
/**
/**
* 设备状态
*
嘀加
设备状态
*/
*/
export
const
s
tatusList
=
[{
export
const
djS
tatusList
=
[{
label
:
'绑定'
,
label
:
'绑定'
,
value
:
'1'
value
:
'1'
},
{
},
{
...
@@ -62,6 +59,16 @@ export const statusList = [{
...
@@ -62,6 +59,16 @@ export const statusList = [{
value
:
'2'
value
:
'2'
}]
}]
/**
/**
* TSP设备状态
*/
export
const
statusList
=
[{
label
:
'激活'
,
value
:
'1'
},
{
label
:
'绑定'
,
value
:
'2'
}]
/**
* 业务类型
* 业务类型
*/
*/
export
const
businessList
=
[{
export
const
businessList
=
[{
...
...
src/views/biz/collision/index.vue
View file @
d1a315e
...
@@ -199,15 +199,17 @@ export default {
...
@@ -199,15 +199,17 @@ export default {
{
{
label
:
'设备号'
,
label
:
'设备号'
,
prop
:
'sn'
,
prop
:
'sn'
,
width
:
'1
2
0'
width
:
'1
5
0'
},
},
{
{
label
:
'车架号'
,
label
:
'车架号'
,
prop
:
'stand_no'
prop
:
'stand_no'
,
width
:
'180'
},
},
{
{
label
:
'碰撞时间'
,
label
:
'碰撞时间'
,
prop
:
'collision_time'
prop
:
'collision_time'
,
width
:
'180'
},
},
// {
// {
// label: '碰撞等级',
// label: '碰撞等级',
...
@@ -215,7 +217,7 @@ export default {
...
@@ -215,7 +217,7 @@ export default {
// formatter: cellValue => {
// formatter: cellValue => {
// const type = this.businessList.find(item => item.value === String(cellValue['collision_type']))
// const type = this.businessList.find(item => item.value === String(cellValue['collision_type']))
// if (type) return type.label
// if (type) return type.label
// else return '
--
'
// else return ''
// }
// }
// },
// },
{
{
...
@@ -285,7 +287,7 @@ export default {
...
@@ -285,7 +287,7 @@ export default {
onSearch
()
{
onSearch
()
{
const
searcher
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searcher
))
const
searcher
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searcher
))
if
(
searcher
.
daterange
)
{
if
(
searcher
.
daterange
)
{
searcher
.
collisionTime
=
[
this
.
$moment
(
this
.
searcher
.
daterange
[
0
]).
format
(
'YYYY-MM-DD
'
),
this
.
$moment
(
this
.
searcher
.
daterange
[
1
]).
format
(
'YYYY-MM-DD
'
)]
searcher
.
collisionTime
=
[
this
.
$moment
(
this
.
searcher
.
daterange
[
0
]).
format
(
'YYYY-MM-DD
00:00:00'
),
this
.
$moment
(
this
.
searcher
.
daterange
[
1
]).
format
(
'YYYY-MM-DD 23:59:59
'
)]
delete
searcher
.
daterange
delete
searcher
.
daterange
}
}
this
.
findAll
(
searcher
)
this
.
findAll
(
searcher
)
...
...
src/views/biz/delivery/index.vue
View file @
d1a315e
...
@@ -225,7 +225,7 @@ export default {
...
@@ -225,7 +225,7 @@ export default {
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
const
bizType
=
this
.
businessList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'biz_type'
]))
const
bizType
=
this
.
businessList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'biz_type'
]))
if
(
bizType
)
return
bizType
.
label
if
(
bizType
)
return
bizType
.
label
else
return
'
--
'
else
return
''
}
}
},
},
{
{
...
@@ -235,7 +235,7 @@ export default {
...
@@ -235,7 +235,7 @@ export default {
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
const
type
=
this
.
devicesList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'device_type'
]))
const
type
=
this
.
devicesList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'device_type'
]))
if
(
type
)
return
type
.
label
if
(
type
)
return
type
.
label
else
return
'
--
'
else
return
''
}
}
},
},
{
{
...
...
src/views/biz/devices/index.vue
View file @
d1a315e
...
@@ -160,14 +160,14 @@
...
@@ -160,14 +160,14 @@
<
script
>
<
script
>
import
{
devicesMethods
,
request
}
from
'@/api'
import
{
devicesMethods
,
request
}
from
'@/api'
import
{
pickerOptions
,
devicesList
,
s
tatusList
}
from
'@/common/constants'
import
{
pickerOptions
,
devicesList
,
djS
tatusList
}
from
'@/common/constants'
export
default
{
export
default
{
name
:
'devices'
,
name
:
'devices'
,
data
()
{
data
()
{
return
{
return
{
pickerOptions
:
pickerOptions
,
pickerOptions
:
pickerOptions
,
devicesList
:
devicesList
,
devicesList
:
devicesList
,
statusList
:
s
tatusList
,
statusList
:
djS
tatusList
,
disabled
:
false
,
disabled
:
false
,
searcher
:
{
searcher
:
{
searchKey
:
''
,
searchKey
:
''
,
...
@@ -200,7 +200,7 @@ export default {
...
@@ -200,7 +200,7 @@ export default {
{
{
label
:
'设备sn'
,
label
:
'设备sn'
,
prop
:
'device_sn'
,
prop
:
'device_sn'
,
width
:
'1
1
0'
width
:
'1
5
0'
},
},
{
{
label
:
'卡号'
,
label
:
'卡号'
,
...
@@ -210,19 +210,21 @@ export default {
...
@@ -210,19 +210,21 @@ export default {
{
{
label
:
'设备类型'
,
label
:
'设备类型'
,
prop
:
'device_type'
,
prop
:
'device_type'
,
width
:
'100'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
const
type
=
this
.
devicesList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'device_type'
]))
const
type
=
this
.
devicesList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'device_type'
]))
if
(
type
)
return
type
.
label
if
(
type
)
return
type
.
label
else
return
'
--
'
else
return
''
}
}
},
},
{
{
label
:
'状态'
,
label
:
'状态'
,
prop
:
'device_status'
,
prop
:
'device_status'
,
width
:
'100'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
const
status
=
this
.
statusList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'device_status'
]))
const
status
=
this
.
statusList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'device_status'
]))
if
(
status
)
return
status
.
label
if
(
status
)
return
status
.
label
else
return
'
--
'
else
return
''
}
}
},
},
{
{
...
@@ -230,8 +232,9 @@ export default {
...
@@ -230,8 +232,9 @@ export default {
prop
:
'active_time'
prop
:
'active_time'
},
},
{
{
label
:
'服务期限'
,
label
:
'服务期限(月)'
,
prop
:
'period'
prop
:
'period'
,
width
:
'130'
},
},
{
{
label
:
'服务开始时间'
,
label
:
'服务开始时间'
,
...
@@ -241,7 +244,7 @@ export default {
...
@@ -241,7 +244,7 @@ export default {
var
beginDate
=
cellValue
[
'effect_date'
].
split
(
' '
)[
0
]
var
beginDate
=
cellValue
[
'effect_date'
].
split
(
' '
)[
0
]
return
beginDate
return
beginDate
}
else
{
}
else
{
return
'
--
'
return
''
}
}
}
}
},
},
...
@@ -253,13 +256,13 @@ export default {
...
@@ -253,13 +256,13 @@ export default {
var
beginDate
=
cellValue
[
'end_date'
].
split
(
' '
)[
0
]
var
beginDate
=
cellValue
[
'end_date'
].
split
(
' '
)[
0
]
return
beginDate
return
beginDate
}
else
{
}
else
{
return
'
--
'
return
''
}
}
}
}
//
},
},
//
{
{
//
label: '关联门店',
label
:
'关联门店'
,
//
prop: 'merchant'
prop
:
'merchant'
}
}
]
]
}
}
...
@@ -279,9 +282,9 @@ export default {
...
@@ -279,9 +282,9 @@ export default {
simNo
:
searcher
.
simNo
,
simNo
:
searcher
.
simNo
,
deviceType
:
searcher
.
deviceType
deviceType
:
searcher
.
deviceType
}
}
if
(
searcher
.
daterange
)
params
.
activeTime
=
[
this
.
$moment
(
searcher
.
daterange
[
0
]).
format
(
'YYYY-MM-DD
'
),
this
.
$moment
(
searcher
.
daterange
[
1
]).
format
(
'YYYY-MM-DD
'
)]
if
(
searcher
.
daterange
)
params
.
activeTime
=
[
this
.
$moment
(
searcher
.
daterange
[
0
]).
format
(
'YYYY-MM-DD
00:00:00'
),
this
.
$moment
(
searcher
.
daterange
[
1
]).
format
(
'YYYY-MM-DD 23:59:59
'
)]
if
(
searcher
.
daterangeStart
)
params
.
effectDate
=
[
this
.
$moment
(
searcher
.
daterangeStart
[
0
]).
format
(
'YYYY-MM-DD
'
),
this
.
$moment
(
searcher
.
daterangeStart
[
1
]).
format
(
'YYYY-MM-DD
'
)]
if
(
searcher
.
daterangeStart
)
params
.
effectDate
=
[
this
.
$moment
(
searcher
.
daterangeStart
[
0
]).
format
(
'YYYY-MM-DD
00:00:00'
),
this
.
$moment
(
searcher
.
daterangeStart
[
1
]).
format
(
'YYYY-MM-DD 23:59:59
'
)]
if
(
searcher
.
daterangeEnd
)
params
.
endDate
=
[
this
.
$moment
(
searcher
.
daterangeEnd
[
0
]).
format
(
'YYYY-MM-DD
'
),
this
.
$moment
(
searcher
.
daterangeEnd
[
1
]).
format
(
'YYYY-MM-DD
'
)]
if
(
searcher
.
daterangeEnd
)
params
.
endDate
=
[
this
.
$moment
(
searcher
.
daterangeEnd
[
0
]).
format
(
'YYYY-MM-DD
00:00:00'
),
this
.
$moment
(
searcher
.
daterangeEnd
[
1
]).
format
(
'YYYY-MM-DD 23:59:59
'
)]
this
.
getList
(
params
)
this
.
getList
(
params
)
},
},
getList
(
searcher
)
{
getList
(
searcher
)
{
...
...
src/views/biz/devices_login/index.vue
View file @
d1a315e
<
template
>
<
template
>
<div
class=
"dev-login"
>
<div
class=
"dev-login"
>
<gl-row
:gutter=
"50"
>
<gl-row
:gutter=
"50"
>
<gl-col
:xs=
"12"
:sm=
"12"
:md=
"12"
:lg=
"12"
:xl=
"12"
class=
"col-center"
>
<gl-col
:xs=
"12"
:sm=
"12"
:md=
"12"
:lg=
"12"
:xl=
"12"
class=
"col-center"
>
<gl-card
<gl-card
class=
"box-card"
class=
"box-card"
:body-style=
"
{ padding: '0px' }"
:body-style=
"
{ padding: '0px' }"
style="width: 100%"
style="width: 100%"
>
>
<div
slot=
"header"
class=
"clearfix"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
设备登录ip位置分布
</span>
<span>
设备登录ip位置分布
</span>
</div>
</div>
<div
class=
"amap-wrapper"
>
<div
class=
"amap-wrapper"
>
<div
id=
"map"
style=
"width:100%;height:100%"
></div>
<div
id=
"map"
style=
"width:100%;height:100%"
></div>
</div>
</div>
</gl-card>
</gl-card>
<!--
<el-amap-marker
v-for=
"u in markers"
:position=
"u.position"
></el-amap-marker>
-->
<!--
<el-amap-marker
v-for=
"u in markers"
:position=
"u.position"
></el-amap-marker>
-->
<!--
<el-amap-marker
:position=
"[121.5273285, 31.21515044]"
:icon=
"icon"
></el-amap-marker>
-->
<!--
<el-amap-marker
:position=
"[121.5273285, 31.21515044]"
:icon=
"icon"
></el-amap-marker>
-->
</gl-col>
</gl-col>
<gl-col
:xs=
"12"
:sm=
"12"
:md=
"12"
:lg=
"12"
:xl=
"12"
class=
"col-center"
>
<gl-col
:xs=
"12"
:sm=
"12"
:md=
"12"
:lg=
"12"
:xl=
"12"
class=
"col-center"
>
<gl-card
<gl-card
class=
"box-card"
class=
"box-card"
:body-style=
"
{ padding: '0px' }"
:body-style=
"
{ padding: '0px' }"
style="width: 100%"
style="width: 100%"
>
>
<div
slot=
"header"
class=
"clearfix"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
设备登录时段分布
</span>
<span>
设备登录时段分布
</span>
</div>
</div>
<div
class=
"chart-wrapper"
style=
"background-color:rgb(7,4,31)"
>
<div
class=
"chart-wrapper"
style=
"background-color:rgb(7,4,31)"
>
<!--
<v-chart
<!--
<v-chart
:options=
"charts.range"
:options=
"charts.range"
:auto-resize=
"true"
:auto-resize=
"true"
style=
"width: 100%; height: 300px"
style=
"width: 100%; height: 300px"
/>
-->
/>
-->
<div
id=
"range"
style=
"width: 100%; height: 300px"
>
<div
id=
"range"
style=
"width: 100%; height: 300px"
>
</div>
</div>
</div>
</div>
</gl-card>
</gl-card>
</gl-col>
</gl-col>
</gl-row>
</gl-row>
<gl-row>
<gl-row>
<gl-col
:xs=
"24"
:sm=
"24"
:md=
"24"
:lg=
"24"
:xl=
"24"
class=
"col-center"
>
<gl-col
:xs=
"24"
:sm=
"24"
:md=
"24"
:lg=
"24"
:xl=
"24"
class=
"col-center"
>
<gl-card
<gl-card
class=
"box-card"
class=
"box-card"
:body-style=
"
{ padding: '0px' }"
:body-style=
"
{ padding: '0px' }"
style="width: 100%"
style="width: 100%"
>
>
<div
slot=
"header"
class=
"clearfix"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
设备登录趋势
</span>
<span>
设备登录趋势
</span>
</div>
</div>
<div
class=
"chart-wrapper"
>
<div
class=
"chart-wrapper"
>
<div
id=
"trend"
style=
"width: 100%; height: 300px"
>
<div
id=
"trend"
style=
"width: 100%; height: 300px"
>
</div>
</div>
<!--
<v-chart
<!--
<v-chart
:options=
"charts.trend"
:options=
"charts.trend"
...
@@ -97,15 +139,13 @@
...
@@ -97,15 +139,13 @@
type=
"primary"
type=
"primary"
@
click=
"onSearch"
@
click=
"onSearch"
icon=
"el-icon-search"
icon=
"el-icon-search"
>
查询
</gl-button
>
查询
</gl-button>
>
<gl-button
<gl-button
:size=
"size"
:size=
"size"
type=
"info"
type=
"info"
@
click=
"onReset"
@
click=
"onReset"
icon=
"el-icon-refresh"
icon=
"el-icon-refresh"
>
重置
</gl-button
>
重置
</gl-button>
>
</gl-form-item>
</gl-form-item>
<div
class=
"tips-text"
>
注:搜索项必填
</div>
<div
class=
"tips-text"
>
注:搜索项必填
</div>
</gl-form>
</gl-form>
...
@@ -772,8 +812,8 @@ export default {
...
@@ -772,8 +812,8 @@ export default {
}
}
if
(
flag
)
{
if
(
flag
)
{
const
params
=
{
const
params
=
{
beginTime
:
this
.
$moment
(
searcher
.
daterange
[
0
]).
format
(
'YYYY
MMD
'
),
beginTime
:
this
.
$moment
(
searcher
.
daterange
[
0
]).
format
(
'YYYY
-MM-DD 00:00:00
'
),
endTime
:
this
.
$moment
(
searcher
.
daterange
[
1
]).
format
(
'YYYY
MMD
'
)
endTime
:
this
.
$moment
(
searcher
.
daterange
[
1
]).
format
(
'YYYY
-MM-DD 23:59:59
'
)
}
}
if
(
searcher
.
sn
.
length
>=
20
)
params
.
iccid
=
searcher
.
sn
if
(
searcher
.
sn
.
length
>=
20
)
params
.
iccid
=
searcher
.
sn
else
params
.
sn
=
searcher
.
sn
else
params
.
sn
=
searcher
.
sn
...
@@ -832,7 +872,7 @@ export default {
...
@@ -832,7 +872,7 @@ export default {
dragEnable
:
false
dragEnable
:
false
})
})
var
heatmap
=
new
AMap
.
Heatmap
(
map
,
{
var
heatmap
=
new
AMap
.
Heatmap
(
map
,
{
radius
:
8
,
//给定半径
radius
:
8
,
//
给定半径
opacity
:
[
0
,
0.8
]
opacity
:
[
0
,
0.8
]
})
})
request
.
req
(
devicesMethods
.
HeatMapIp
).
then
(
heatMapData
=>
{
request
.
req
(
devicesMethods
.
HeatMapIp
).
then
(
heatMapData
=>
{
...
@@ -849,7 +889,7 @@ export default {
...
@@ -849,7 +889,7 @@ export default {
})
})
})
})
},
},
onMapBack
(
AMap
,
heatMapData
)
{},
onMapBack
(
AMap
,
heatMapData
)
{
},
onHeatMapDataBack
(
heatMapData
)
{
onHeatMapDataBack
(
heatMapData
)
{
console
.
log
(
heatMapData
)
console
.
log
(
heatMapData
)
},
},
...
@@ -868,12 +908,12 @@ export default {
...
@@ -868,12 +908,12 @@ export default {
this
.
initRange
(
xData
,
yData
)
this
.
initRange
(
xData
,
yData
)
},
},
onTrandDataBack
(
trandData
)
{
onTrandDataBack
(
trandData
)
{
trandData
.
sort
((
a
,
b
)
=>
a
.
day
-
b
.
d
ay
)
trandData
.
sort
((
a
,
b
)
=>
a
.
loginDay
-
b
.
loginD
ay
)
var
xData
=
[],
var
xData
=
[],
yData
=
[]
yData
=
[]
for
(
const
item
of
trandData
)
{
for
(
const
item
of
trandData
)
{
const
{
d
ay
,
sumLogin
}
=
item
const
{
loginD
ay
,
sumLogin
}
=
item
xData
.
push
(
d
ay
)
xData
.
push
(
loginD
ay
)
yData
.
push
(
sumLogin
)
yData
.
push
(
sumLogin
)
}
}
this
.
initTrend
(
xData
,
yData
)
this
.
initTrend
(
xData
,
yData
)
...
@@ -895,7 +935,7 @@ export default {
...
@@ -895,7 +935,7 @@ export default {
axisLine
:
{
axisLine
:
{
lineStyle
:
{
lineStyle
:
{
color
:
'rgba(255, 129, 109,.1)'
,
color
:
'rgba(255, 129, 109,.1)'
,
width
:
1
//这里是为了突出显示加上的
width
:
1
//
这里是为了突出显示加上的
}
}
},
},
axisTick
:
{
axisTick
:
{
...
@@ -939,10 +979,10 @@ export default {
...
@@ -939,10 +979,10 @@ export default {
series
:
[
series
:
[
{
{
type
:
'line'
,
type
:
'line'
,
smooth
:
true
,
//是否平滑
smooth
:
true
,
//
是否平滑
showAllSymbol
:
false
,
showAllSymbol
:
false
,
symbol
:
'none'
,
symbol
:
'none'
,
itemStyle
:
{
itemStyle
:
{
normal
:
{
normal
:
{
color
:
{
color
:
{
type
:
'linear'
,
type
:
'linear'
,
...
@@ -991,7 +1031,7 @@ export default {
...
@@ -991,7 +1031,7 @@ export default {
axisLine
:
{
axisLine
:
{
lineStyle
:
{
lineStyle
:
{
color
:
'rgba(255, 129, 109,.1)'
,
color
:
'rgba(255, 129, 109,.1)'
,
width
:
1
//这里是为了突出显示加上的
width
:
1
//
这里是为了突出显示加上的
}
}
},
},
axisLabel
:
{
axisLabel
:
{
...
@@ -1009,7 +1049,7 @@ export default {
...
@@ -1009,7 +1049,7 @@ export default {
axisLine
:
{
axisLine
:
{
lineStyle
:
{
lineStyle
:
{
color
:
'rgba(255, 129, 109, 0.1)'
,
color
:
'rgba(255, 129, 109, 0.1)'
,
width
:
1
//这里是为了突出显示加上的
width
:
1
//
这里是为了突出显示加上的
}
}
},
},
axisLabel
:
{
axisLabel
:
{
...
...
src/views/biz/fmrsdevice/index.vue
View file @
d1a315e
...
@@ -208,7 +208,7 @@ export default {
...
@@ -208,7 +208,7 @@ export default {
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
const
type
=
this
.
devicesList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'device_type'
]))
const
type
=
this
.
devicesList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'device_type'
]))
if
(
type
)
return
type
.
label
if
(
type
)
return
type
.
label
else
return
'
--
'
else
return
''
}
}
},
},
{
{
...
@@ -217,7 +217,7 @@ export default {
...
@@ -217,7 +217,7 @@ export default {
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
const
status
=
this
.
statusList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'status'
]))
const
status
=
this
.
statusList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'status'
]))
if
(
status
)
return
status
.
label
if
(
status
)
return
status
.
label
else
return
'
--
'
else
return
''
}
}
},
},
{
{
...
@@ -225,7 +225,7 @@ export default {
...
@@ -225,7 +225,7 @@ export default {
prop
:
'active_time'
prop
:
'active_time'
},
},
{
{
label
:
'服务期限'
,
label
:
'服务期限
(月)
'
,
prop
:
'period'
prop
:
'period'
},
},
{
{
...
@@ -236,7 +236,7 @@ export default {
...
@@ -236,7 +236,7 @@ export default {
var
beginDate
=
cellValue
[
'pk_begin_time'
].
split
(
' '
)[
0
]
var
beginDate
=
cellValue
[
'pk_begin_time'
].
split
(
' '
)[
0
]
return
beginDate
return
beginDate
}
else
{
}
else
{
return
'
--
'
return
''
}
}
}
}
},
},
...
@@ -248,7 +248,7 @@ export default {
...
@@ -248,7 +248,7 @@ export default {
var
beginDate
=
cellValue
[
'pk_end_time'
].
split
(
' '
)[
0
]
var
beginDate
=
cellValue
[
'pk_end_time'
].
split
(
' '
)[
0
]
return
beginDate
return
beginDate
}
else
{
}
else
{
return
'
--
'
return
''
}
}
}
}
}
}
...
@@ -268,9 +268,9 @@ export default {
...
@@ -268,9 +268,9 @@ export default {
iccid
:
searcher
.
iccid
,
iccid
:
searcher
.
iccid
,
deviceType
:
searcher
.
deviceType
deviceType
:
searcher
.
deviceType
}
}
if
(
searcher
.
daterange
)
params
.
activeTime
=
[
this
.
$moment
(
searcher
.
daterange
[
0
]).
format
(
'YYYY-MM-DD
'
),
this
.
$moment
(
searcher
.
daterange
[
1
]).
format
(
'YYYY-MM-DD
'
)]
if
(
searcher
.
daterange
)
params
.
activeTime
=
[
this
.
$moment
(
searcher
.
daterange
[
0
]).
format
(
'YYYY-MM-DD
00:00:00'
),
this
.
$moment
(
searcher
.
daterange
[
1
]).
format
(
'YYYY-MM-DD 23:59:59
'
)]
if
(
searcher
.
daterangeStart
)
params
.
pkBeginTime
=
[
this
.
$moment
(
searcher
.
daterangeStart
[
0
]).
format
(
'YYYY-MM-DD
'
),
this
.
$moment
(
searcher
.
daterangeStart
[
1
]).
format
(
'YYYY-MM-DD
'
)]
if
(
searcher
.
daterangeStart
)
params
.
pkBeginTime
=
[
this
.
$moment
(
searcher
.
daterangeStart
[
0
]).
format
(
'YYYY-MM-DD
00:00:00'
),
this
.
$moment
(
searcher
.
daterangeStart
[
1
]).
format
(
'YYYY-MM-DD 23:59:59
'
)]
if
(
searcher
.
daterangeEnd
)
params
.
pkEndTime
=
[
this
.
$moment
(
searcher
.
daterangeEnd
[
0
]).
format
(
'YYYY-MM-DD
'
),
this
.
$moment
(
searcher
.
daterangeEnd
[
1
]).
format
(
'YYYY-MM-DD
'
)]
if
(
searcher
.
daterangeEnd
)
params
.
pkEndTime
=
[
this
.
$moment
(
searcher
.
daterangeEnd
[
0
]).
format
(
'YYYY-MM-DD
00:00:00'
),
this
.
$moment
(
searcher
.
daterangeEnd
[
1
]).
format
(
'YYYY-MM-DD 23:59:59
'
)]
this
.
getList
(
params
)
this
.
getList
(
params
)
},
},
getList
(
searcher
)
{
getList
(
searcher
)
{
...
...
src/views/biz/lost/index.vue
View file @
d1a315e
...
@@ -227,24 +227,24 @@ export default {
...
@@ -227,24 +227,24 @@ export default {
prop
:
'trigger_time'
prop
:
'trigger_time'
},
},
{
{
label
:
'
保留时长(min)
'
,
label
:
'
停留时长
'
,
prop
:
'keepTime'
prop
:
'keepTime'
},
},
{
{
label
:
'到店名称'
,
label
:
'到店名称'
,
prop
:
'merchant_name'
prop
:
'merchant_name'
},
},
{
//
{
label
:
'门店类型'
,
//
label: '门店类型',
prop
:
'merchant_type'
,
//
prop: 'merchant_type',
formatter
:
cellValue
=>
{
//
formatter: cellValue => {
const
type
=
this
.
params
.
oMerchantType
.
find
(
//
const type = this.params.oMerchantType.find(
item
=>
item
.
value
===
String
(
cellValue
[
'merchant_type'
])
//
item => item.value === String(cellValue['merchant_type'])
)
//
)
if
(
type
)
return
type
.
label
//
if (type) return type.label
else
return
'--
'
// else return '
'
}
//
}
},
//
},
{
{
label
:
'推送时间'
,
label
:
'推送时间'
,
prop
:
'created_date'
prop
:
'created_date'
...
...
src/views/biz/merchant/index.vue
View file @
d1a315e
...
@@ -141,7 +141,7 @@ export default {
...
@@ -141,7 +141,7 @@ export default {
width
:
'120'
width
:
'120'
},
},
{
{
label
:
'商户
分类
'
,
label
:
'商户
类型
'
,
prop
:
'merchant_type'
,
prop
:
'merchant_type'
,
width
:
'120'
,
width
:
'120'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
...
src/views/biz/shop/index.vue
View file @
d1a315e
...
@@ -255,7 +255,7 @@ export default {
...
@@ -255,7 +255,7 @@ export default {
onSearch
()
{
onSearch
()
{
const
searcher
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searcher
))
const
searcher
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searcher
))
if
(
searcher
.
daterange
)
{
if
(
searcher
.
daterange
)
{
searcher
.
enterTime
=
[
this
.
$moment
(
this
.
searcher
.
daterange
[
0
]).
format
(
'YYYY-MM-DD
'
),
this
.
$moment
(
this
.
searcher
.
daterange
[
1
]).
format
(
'YYYY-MM-DD
'
)]
searcher
.
enterTime
=
[
this
.
$moment
(
this
.
searcher
.
daterange
[
0
]).
format
(
'YYYY-MM-DD
00:00:00'
),
this
.
$moment
(
this
.
searcher
.
daterange
[
1
]).
format
(
'YYYY-MM-DD 23::59:59
'
)]
delete
searcher
.
daterange
delete
searcher
.
daterange
}
}
this
.
findAll
(
searcher
)
this
.
findAll
(
searcher
)
...
...
src/views/biz/tspdevice/index.vue
View file @
d1a315e
...
@@ -208,7 +208,7 @@ export default {
...
@@ -208,7 +208,7 @@ export default {
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
const
type
=
this
.
devicesList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'device_type'
]))
const
type
=
this
.
devicesList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'device_type'
]))
if
(
type
)
return
type
.
label
if
(
type
)
return
type
.
label
else
return
'
--
'
else
return
''
}
}
},
},
{
{
...
@@ -217,7 +217,7 @@ export default {
...
@@ -217,7 +217,7 @@ export default {
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
const
status
=
this
.
statusList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'status'
]))
const
status
=
this
.
statusList
.
find
(
item
=>
item
.
value
===
String
(
cellValue
[
'status'
]))
if
(
status
)
return
status
.
label
if
(
status
)
return
status
.
label
else
return
'
--
'
else
return
''
}
}
},
},
{
{
...
@@ -225,7 +225,7 @@ export default {
...
@@ -225,7 +225,7 @@ export default {
prop
:
'active_time'
prop
:
'active_time'
},
},
{
{
label
:
'服务期限'
,
label
:
'服务期限
(月)
'
,
prop
:
'period'
prop
:
'period'
},
},
{
{
...
@@ -236,7 +236,7 @@ export default {
...
@@ -236,7 +236,7 @@ export default {
var
beginDate
=
cellValue
[
'pk_begin_time'
].
split
(
' '
)[
0
]
var
beginDate
=
cellValue
[
'pk_begin_time'
].
split
(
' '
)[
0
]
return
beginDate
return
beginDate
}
else
{
}
else
{
return
'
--
'
return
''
}
}
}
}
},
},
...
@@ -248,7 +248,7 @@ export default {
...
@@ -248,7 +248,7 @@ export default {
var
beginDate
=
cellValue
[
'pk_end_time'
].
split
(
' '
)[
0
]
var
beginDate
=
cellValue
[
'pk_end_time'
].
split
(
' '
)[
0
]
return
beginDate
return
beginDate
}
else
{
}
else
{
return
'
--
'
return
''
}
}
}
}
}
}
...
@@ -268,9 +268,9 @@ export default {
...
@@ -268,9 +268,9 @@ export default {
simno
:
searcher
.
simno
,
simno
:
searcher
.
simno
,
deviceType
:
searcher
.
deviceType
deviceType
:
searcher
.
deviceType
}
}
if
(
searcher
.
daterange
)
params
.
activeTime
=
[
this
.
$moment
(
searcher
.
daterange
[
0
]).
format
(
'YYYY-MM-DD
'
),
this
.
$moment
(
searcher
.
daterange
[
1
]).
format
(
'YYYY-MM-DD
'
)]
if
(
searcher
.
daterange
)
params
.
activeTime
=
[
this
.
$moment
(
searcher
.
daterange
[
0
]).
format
(
'YYYY-MM-DD
00:00:00'
),
this
.
$moment
(
searcher
.
daterange
[
1
]).
format
(
'YYYY-MM-DD 23:59:59
'
)]
if
(
searcher
.
daterangeStart
)
params
.
pkBeginTime
=
[
this
.
$moment
(
searcher
.
daterangeStart
[
0
]).
format
(
'YYYY-MM-DD
'
),
this
.
$moment
(
searcher
.
daterangeStart
[
1
]).
format
(
'YYYY-MM-DD
'
)]
if
(
searcher
.
daterangeStart
)
params
.
pkBeginTime
=
[
this
.
$moment
(
searcher
.
daterangeStart
[
0
]).
format
(
'YYYY-MM-DD
00:00:00'
),
this
.
$moment
(
searcher
.
daterangeStart
[
1
]).
format
(
'YYYY-MM-DD 23:59:59
'
)]
if
(
searcher
.
daterangeEnd
)
params
.
pkEndTime
=
[
this
.
$moment
(
searcher
.
daterangeEnd
[
0
]).
format
(
'YYYY-MM-DD
'
),
this
.
$moment
(
searcher
.
daterangeEnd
[
1
]).
format
(
'YYYY-MM-DD
'
)]
if
(
searcher
.
daterangeEnd
)
params
.
pkEndTime
=
[
this
.
$moment
(
searcher
.
daterangeEnd
[
0
]).
format
(
'YYYY-MM-DD
00:00:00'
),
this
.
$moment
(
searcher
.
daterangeEnd
[
1
]).
format
(
'YYYY-MM-DD 23:59:59
'
)]
this
.
getList
(
params
)
this
.
getList
(
params
)
},
},
getList
(
searcher
)
{
getList
(
searcher
)
{
...
...
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