Commit d1a315eb by 胡悦

优化代码

1 parent 6ba5fc00
...@@ -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 statusList = [{ export const djStatusList = [{
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 = [{
......
...@@ -199,15 +199,17 @@ export default { ...@@ -199,15 +199,17 @@ export default {
{ {
label: '设备号', label: '设备号',
prop: 'sn', prop: 'sn',
width: '120' width: '150'
}, },
{ {
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)
......
...@@ -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 ''
} }
}, },
{ {
......
...@@ -160,14 +160,14 @@ ...@@ -160,14 +160,14 @@
<script> <script>
import { devicesMethods, request } from '@/api' import { devicesMethods, request } from '@/api'
import { pickerOptions, devicesList, statusList } from '@/common/constants' import { pickerOptions, devicesList, djStatusList } from '@/common/constants'
export default { export default {
name: 'devices', name: 'devices',
data() { data() {
return { return {
pickerOptions: pickerOptions, pickerOptions: pickerOptions,
devicesList: devicesList, devicesList: devicesList,
statusList: statusList, statusList: djStatusList,
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: '110' width: '150'
}, },
{ {
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) {
......
<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('YYYYMMD'), beginTime: this.$moment(searcher.daterange[0]).format('YYYY-MM-DD 00:00:00'),
endTime: this.$moment(searcher.daterange[1]).format('YYYYMMD') 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.day) trandData.sort((a, b) => a.loginDay - b.loginDay)
var xData = [], var xData = [],
yData = [] yData = []
for (const item of trandData) { for (const item of trandData) {
const { day, sumLogin } = item const { loginDay, sumLogin } = item
xData.push(day) xData.push(loginDay)
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,7 +979,7 @@ export default { ...@@ -939,7 +979,7 @@ export default {
series: [ series: [
{ {
type: 'line', type: 'line',
smooth: true, //是否平滑 smooth: true, // 是否平滑
showAllSymbol: false, showAllSymbol: false,
symbol: 'none', symbol: 'none',
itemStyle: { itemStyle: {
...@@ -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: {
......
...@@ -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) {
......
...@@ -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'
......
...@@ -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 => {
......
...@@ -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)
......
...@@ -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) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!