Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety-progress
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
gassafety-progress
Commits
f36ebc5e
Commit
f36ebc5e
authored
Mar 18, 2022
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车辆信息查询 gengdidi
parent
10c7ab0b
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
2269 additions
and
34 deletions
+2269
-34
TVehicleInfoController.java
...b/controller/operationMonitor/TVehicleInfoController.java
+125
-0
TVehicleLocationInfoController.java
...ller/operationMonitor/TVehicleLocationInfoController.java
+107
-0
TVehicleInfo.java
.../src/main/java/com/zehong/system/domain/TVehicleInfo.java
+234
-0
TVehicleLocationInfo.java
...n/java/com/zehong/system/domain/TVehicleLocationInfo.java
+158
-0
TVehicleInfoMapper.java
...ain/java/com/zehong/system/mapper/TVehicleInfoMapper.java
+61
-0
TVehicleLocationInfoMapper.java
.../com/zehong/system/mapper/TVehicleLocationInfoMapper.java
+61
-0
ITVehicleInfoService.java
.../java/com/zehong/system/service/ITVehicleInfoService.java
+61
-0
ITVehicleLocationInfoService.java
...m/zehong/system/service/ITVehicleLocationInfoService.java
+61
-0
TVehicleInfoServiceImpl.java
...m/zehong/system/service/impl/TVehicleInfoServiceImpl.java
+93
-0
TVehicleLocationInfoServiceImpl.java
.../system/service/impl/TVehicleLocationInfoServiceImpl.java
+93
-0
TVehicleInfoMapper.xml
...m/src/main/resources/mapper/system/TVehicleInfoMapper.xml
+111
-0
TVehicleLocationInfoMapper.xml
...in/resources/mapper/system/TVehicleLocationInfoMapper.xml
+85
-0
package.json
gassafetyprogress-web/package.json
+1
-0
vehicleInfo.js
...afetyprogress-web/src/api/operationMonitor/vehicleInfo.js
+62
-0
vehicleLocationInfo.js
...gress-web/src/api/operationMonitor/vehicleLocationInfo.js
+62
-0
car.png
gassafetyprogress-web/src/assets/image/car.png
+0
-0
l.png
gassafetyprogress-web/src/assets/images/l.png
+0
-0
r.png
gassafetyprogress-web/src/assets/images/r.png
+0
-0
all.scss
gassafetyprogress-web/src/assets/styles/all.scss
+10
-2
gassVehiche.scss
gassafetyprogress-web/src/assets/styles/gassVehiche.scss
+170
-0
main.js
gassafetyprogress-web/src/main.js
+2
-0
config.js
gassafetyprogress-web/src/utils/mapClass/config.js
+1
-0
map.js
gassafetyprogress-web/src/utils/mapClass/map.js
+63
-32
MapCar.vue
...c/views/operationMonitor/gassVehicle/component/MapCar.vue
+25
-0
drawer.vue
...c/views/operationMonitor/gassVehicle/component/drawer.vue
+198
-0
index.vue
...ress-web/src/views/operationMonitor/gassVehicle/index.vue
+425
-0
No files found.
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/operationMonitor/TVehicleInfoController.java
0 → 100644
View file @
f36ebc5e
package
com
.
zehong
.
web
.
controller
.
operationMonitor
;
import
java.util.List
;
import
com.zehong.system.domain.TVehicleLocationInfo
;
import
com.zehong.system.service.ITVehicleLocationInfoService
;
import
io.jsonwebtoken.lang.Collections
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.TVehicleInfo
;
import
com.zehong.system.service.ITVehicleInfoService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 燃气车辆信息Controller
*
* @author zehong
* @date 2022-03-17
*/
@RestController
@RequestMapping
(
"/system/vehicleInfo"
)
public
class
TVehicleInfoController
extends
BaseController
{
@Autowired
private
ITVehicleInfoService
tVehicleInfoService
;
@Autowired
private
ITVehicleLocationInfoService
itVehicleLocationInfoService
;
/**
* 查询燃气车辆信息列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:vehicleInfo:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TVehicleInfo
tVehicleInfo
)
{
startPage
();
List
<
TVehicleInfo
>
list
=
tVehicleInfoService
.
selectTVehicleInfoList
(
tVehicleInfo
);
return
getDataTable
(
list
);
}
/**
* 查询车辆最终位置
* @param vehicleId 车辆信息id
* @return
*/
@GetMapping
(
"/getLastLocation"
)
public
AjaxResult
getLastLocation
(
@RequestParam
(
value
=
"vehicleId"
)
Long
vehicleId
){
//获取车辆信息
TVehicleInfo
tVehicleInfo
=
tVehicleInfoService
.
selectTVehicleInfoById
(
vehicleId
);
//获取最后位置信息
TVehicleLocationInfo
tVehicleLocationInfo
=
new
TVehicleLocationInfo
();
tVehicleLocationInfo
.
setCarNum
(
tVehicleInfo
.
getCarNum
());
tVehicleLocationInfo
.
setLast
(
true
);
List
<
TVehicleLocationInfo
>
tVehicleLocationInfoList
=
itVehicleLocationInfoService
.
selectTVehicleLocationInfoList
(
tVehicleLocationInfo
);
//车辆最后位置
if
(!
Collections
.
isEmpty
(
tVehicleLocationInfoList
)
&&
tVehicleLocationInfoList
.
size
()
>
0
){
tVehicleInfo
.
setLongitude
(
tVehicleLocationInfoList
.
get
(
0
).
getLongitude
());
tVehicleInfo
.
setLatitude
(
tVehicleLocationInfoList
.
get
(
0
).
getLatitude
());
}
return
AjaxResult
.
success
(
tVehicleInfo
);
}
/**
* 导出燃气车辆信息列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:vehicleInfo:export')"
)
@Log
(
title
=
"燃气车辆信息"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TVehicleInfo
tVehicleInfo
)
{
List
<
TVehicleInfo
>
list
=
tVehicleInfoService
.
selectTVehicleInfoList
(
tVehicleInfo
);
ExcelUtil
<
TVehicleInfo
>
util
=
new
ExcelUtil
<
TVehicleInfo
>(
TVehicleInfo
.
class
);
return
util
.
exportExcel
(
list
,
"燃气车辆信息数据"
);
}
/**
* 获取燃气车辆信息详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:vehicleInfo:query')"
)
@GetMapping
(
value
=
"/{vehicleId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"vehicleId"
)
Long
vehicleId
)
{
return
AjaxResult
.
success
(
tVehicleInfoService
.
selectTVehicleInfoById
(
vehicleId
));
}
/**
* 新增燃气车辆信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:vehicleInfo:add')"
)
@Log
(
title
=
"燃气车辆信息"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TVehicleInfo
tVehicleInfo
)
{
return
toAjax
(
tVehicleInfoService
.
insertTVehicleInfo
(
tVehicleInfo
));
}
/**
* 修改燃气车辆信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:vehicleInfo:edit')"
)
@Log
(
title
=
"燃气车辆信息"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TVehicleInfo
tVehicleInfo
)
{
return
toAjax
(
tVehicleInfoService
.
updateTVehicleInfo
(
tVehicleInfo
));
}
/**
* 删除燃气车辆信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:vehicleInfo:remove')"
)
@Log
(
title
=
"燃气车辆信息"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{vehicleIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
vehicleIds
)
{
return
toAjax
(
tVehicleInfoService
.
deleteTVehicleInfoByIds
(
vehicleIds
));
}
}
gassafetyprogress-admin/src/main/java/com/zehong/web/controller/operationMonitor/TVehicleLocationInfoController.java
0 → 100644
View file @
f36ebc5e
package
com
.
zehong
.
web
.
controller
.
operationMonitor
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.core.page.TableDataInfo
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.system.domain.TVehicleLocationInfo
;
import
com.zehong.system.service.ITVehicleLocationInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* 燃气车辆位置信息Controller
*
* @author zehong
* @date 2022-03-17
*/
@RestController
@RequestMapping
(
"/system/vehicleLocationInfo"
)
public
class
TVehicleLocationInfoController
extends
BaseController
{
@Autowired
private
ITVehicleLocationInfoService
tVehicleLocationInfoService
;
/**
* 查询燃气车辆位置信息列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:vehicleLocationInfo:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TVehicleLocationInfo
tVehicleLocationInfo
)
{
startPage
();
List
<
TVehicleLocationInfo
>
list
=
tVehicleLocationInfoService
.
selectTVehicleLocationInfoList
(
tVehicleLocationInfo
);
return
getDataTable
(
list
);
}
/**
* 获取车辆位置信息
* @param tVehicleLocationInfo
* @return
*/
@GetMapping
(
"/getVehicleLocations"
)
public
AjaxResult
getVehicleLocations
(
TVehicleLocationInfo
tVehicleLocationInfo
){
return
AjaxResult
.
success
(
tVehicleLocationInfoService
.
selectTVehicleLocationInfoList
(
tVehicleLocationInfo
));
}
/**
* 导出燃气车辆位置信息列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:vehicleLocationInfo:export')"
)
@Log
(
title
=
"燃气车辆位置信息"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TVehicleLocationInfo
tVehicleLocationInfo
)
{
List
<
TVehicleLocationInfo
>
list
=
tVehicleLocationInfoService
.
selectTVehicleLocationInfoList
(
tVehicleLocationInfo
);
ExcelUtil
<
TVehicleLocationInfo
>
util
=
new
ExcelUtil
<
TVehicleLocationInfo
>(
TVehicleLocationInfo
.
class
);
return
util
.
exportExcel
(
list
,
"燃气车辆位置信息数据"
);
}
/**
* 获取燃气车辆位置信息详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:vehicleLocationInfo:query')"
)
@GetMapping
(
value
=
"/{vehicleLocationId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"vehicleLocationId"
)
Long
vehicleLocationId
)
{
return
AjaxResult
.
success
(
tVehicleLocationInfoService
.
selectTVehicleLocationInfoById
(
vehicleLocationId
));
}
/**
* 新增燃气车辆位置信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:vehicleLocationInfo:add')"
)
@Log
(
title
=
"燃气车辆位置信息"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TVehicleLocationInfo
tVehicleLocationInfo
)
{
return
toAjax
(
tVehicleLocationInfoService
.
insertTVehicleLocationInfo
(
tVehicleLocationInfo
));
}
/**
* 修改燃气车辆位置信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:vehicleLocationInfo:edit')"
)
@Log
(
title
=
"燃气车辆位置信息"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TVehicleLocationInfo
tVehicleLocationInfo
)
{
return
toAjax
(
tVehicleLocationInfoService
.
updateTVehicleLocationInfo
(
tVehicleLocationInfo
));
}
/**
* 删除燃气车辆位置信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:vehicleLocationInfo:remove')"
)
@Log
(
title
=
"燃气车辆位置信息"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{vehicleLocationIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
vehicleLocationIds
)
{
return
toAjax
(
tVehicleLocationInfoService
.
deleteTVehicleLocationInfoByIds
(
vehicleLocationIds
));
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/domain/TVehicleInfo.java
0 → 100644
View file @
f36ebc5e
package
com
.
zehong
.
system
.
domain
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
import
java.math.BigDecimal
;
/**
* 燃气车辆信息对象 t_vehicle_info
*
* @author zehong
* @date 2022-03-17
*/
public
class
TVehicleInfo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 车辆id */
private
Long
vehicleId
;
/** 车牌号 */
@Excel
(
name
=
"车牌号"
)
private
String
carNum
;
/** 品牌型号 */
@Excel
(
name
=
"品牌型号"
)
private
String
brandModel
;
/** 车辆类型: 1.罐车 2.卡车 */
@Excel
(
name
=
"车辆类型: 1.罐车 2.卡车"
)
private
String
vehicleType
;
/** 车辆载重 */
@Excel
(
name
=
"车辆载重"
)
private
String
vehicleLoad
;
/** 车辆大小 */
@Excel
(
name
=
"车辆大小"
)
private
String
vehicleSize
;
/** 车辆限乘 */
@Excel
(
name
=
"车辆限乘"
)
private
String
vehicleLimt
;
/** 车辆检测信息 */
@Excel
(
name
=
"车辆检测信息"
)
private
String
vehicleInspect
;
/** 所属企业 */
@Excel
(
name
=
"所属企业"
)
private
String
beyondEnterpriseId
;
/** 责任人 */
@Excel
(
name
=
"责任人"
)
private
String
personLiable
;
/** 联系电话 */
@Excel
(
name
=
"联系电话"
)
private
String
phone
;
/** 是否删除(0正常,1删除) */
@Excel
(
name
=
"是否删除(0正常,1删除)"
)
private
String
isDel
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remarks
;
/**
* 经度
*/
private
BigDecimal
longitude
;
/**
* 纬度
*/
private
BigDecimal
latitude
;
public
BigDecimal
getLongitude
()
{
return
longitude
;
}
public
void
setLongitude
(
BigDecimal
longitude
)
{
this
.
longitude
=
longitude
;
}
public
BigDecimal
getLatitude
()
{
return
latitude
;
}
public
void
setLatitude
(
BigDecimal
latitude
)
{
this
.
latitude
=
latitude
;
}
public
void
setVehicleId
(
Long
vehicleId
)
{
this
.
vehicleId
=
vehicleId
;
}
public
Long
getVehicleId
()
{
return
vehicleId
;
}
public
void
setCarNum
(
String
carNum
)
{
this
.
carNum
=
carNum
;
}
public
String
getCarNum
()
{
return
carNum
;
}
public
void
setBrandModel
(
String
brandModel
)
{
this
.
brandModel
=
brandModel
;
}
public
String
getBrandModel
()
{
return
brandModel
;
}
public
void
setVehicleType
(
String
vehicleType
)
{
this
.
vehicleType
=
vehicleType
;
}
public
String
getVehicleType
()
{
return
vehicleType
;
}
public
void
setVehicleLoad
(
String
vehicleLoad
)
{
this
.
vehicleLoad
=
vehicleLoad
;
}
public
String
getVehicleLoad
()
{
return
vehicleLoad
;
}
public
void
setVehicleSize
(
String
vehicleSize
)
{
this
.
vehicleSize
=
vehicleSize
;
}
public
String
getVehicleSize
()
{
return
vehicleSize
;
}
public
void
setVehicleLimt
(
String
vehicleLimt
)
{
this
.
vehicleLimt
=
vehicleLimt
;
}
public
String
getVehicleLimt
()
{
return
vehicleLimt
;
}
public
void
setVehicleInspect
(
String
vehicleInspect
)
{
this
.
vehicleInspect
=
vehicleInspect
;
}
public
String
getVehicleInspect
()
{
return
vehicleInspect
;
}
public
void
setBeyondEnterpriseId
(
String
beyondEnterpriseId
)
{
this
.
beyondEnterpriseId
=
beyondEnterpriseId
;
}
public
String
getBeyondEnterpriseId
()
{
return
beyondEnterpriseId
;
}
public
void
setPersonLiable
(
String
personLiable
)
{
this
.
personLiable
=
personLiable
;
}
public
String
getPersonLiable
()
{
return
personLiable
;
}
public
void
setPhone
(
String
phone
)
{
this
.
phone
=
phone
;
}
public
String
getPhone
()
{
return
phone
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
String
getIsDel
()
{
return
isDel
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
public
String
getRemarks
()
{
return
remarks
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"vehicleId"
,
getVehicleId
())
.
append
(
"carNum"
,
getCarNum
())
.
append
(
"brandModel"
,
getBrandModel
())
.
append
(
"vehicleType"
,
getVehicleType
())
.
append
(
"vehicleLoad"
,
getVehicleLoad
())
.
append
(
"vehicleSize"
,
getVehicleSize
())
.
append
(
"vehicleLimt"
,
getVehicleLimt
())
.
append
(
"vehicleInspect"
,
getVehicleInspect
())
.
append
(
"beyondEnterpriseId"
,
getBeyondEnterpriseId
())
.
append
(
"personLiable"
,
getPersonLiable
())
.
append
(
"phone"
,
getPhone
())
.
append
(
"isDel"
,
getIsDel
())
.
append
(
"remarks"
,
getRemarks
())
.
toString
();
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/domain/TVehicleLocationInfo.java
0 → 100644
View file @
f36ebc5e
package
com
.
zehong
.
system
.
domain
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
/**
* 燃气车辆位置信息对象 t_vehicle_location_info
*
* @author zehong
* @date 2022-03-17
*/
public
class
TVehicleLocationInfo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 车辆id */
private
Long
vehicleLocationId
;
/** 车牌号 */
@Excel
(
name
=
"车牌号"
)
private
String
carNum
;
/** 经度 */
@Excel
(
name
=
"经度"
)
private
BigDecimal
longitude
;
/** 纬度 */
@Excel
(
name
=
"纬度"
)
private
BigDecimal
latitude
;
/** 创建时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"创建时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
reportTime
;
/** 是否删除(0正常,1删除) */
@Excel
(
name
=
"是否删除(0正常,1删除)"
)
private
String
isDel
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remarks
;
/**是否获取最后一次位置*/
private
boolean
isLast
;
/**位置查询开始时间*/
private
Date
beginTime
;
/**位置查询结束时间*/
private
Date
endTime
;
public
Date
getBeginTime
()
{
return
beginTime
;
}
public
void
setBeginTime
(
Date
beginTime
)
{
this
.
beginTime
=
beginTime
;
}
public
Date
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
Date
endTime
)
{
this
.
endTime
=
endTime
;
}
public
boolean
isLast
()
{
return
isLast
;
}
public
void
setLast
(
boolean
last
)
{
isLast
=
last
;
}
public
void
setVehicleLocationId
(
Long
vehicleLocationId
)
{
this
.
vehicleLocationId
=
vehicleLocationId
;
}
public
Long
getVehicleLocationId
()
{
return
vehicleLocationId
;
}
public
void
setCarNum
(
String
carNum
)
{
this
.
carNum
=
carNum
;
}
public
String
getCarNum
()
{
return
carNum
;
}
public
void
setLongitude
(
BigDecimal
longitude
)
{
this
.
longitude
=
longitude
;
}
public
BigDecimal
getLongitude
()
{
return
longitude
;
}
public
void
setLatitude
(
BigDecimal
latitude
)
{
this
.
latitude
=
latitude
;
}
public
BigDecimal
getLatitude
()
{
return
latitude
;
}
public
void
setReportTime
(
Date
reportTime
)
{
this
.
reportTime
=
reportTime
;
}
public
Date
getReportTime
()
{
return
reportTime
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
String
getIsDel
()
{
return
isDel
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
public
String
getRemarks
()
{
return
remarks
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"vehicleLocationId"
,
getVehicleLocationId
())
.
append
(
"carNum"
,
getCarNum
())
.
append
(
"longitude"
,
getLongitude
())
.
append
(
"latitude"
,
getLatitude
())
.
append
(
"reportTime"
,
getReportTime
())
.
append
(
"isDel"
,
getIsDel
())
.
append
(
"remarks"
,
getRemarks
())
.
toString
();
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/mapper/TVehicleInfoMapper.java
0 → 100644
View file @
f36ebc5e
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TVehicleInfo
;
/**
* 燃气车辆信息Mapper接口
*
* @author zehong
* @date 2022-03-17
*/
public
interface
TVehicleInfoMapper
{
/**
* 查询燃气车辆信息
*
* @param vehicleId 燃气车辆信息ID
* @return 燃气车辆信息
*/
public
TVehicleInfo
selectTVehicleInfoById
(
Long
vehicleId
);
/**
* 查询燃气车辆信息列表
*
* @param tVehicleInfo 燃气车辆信息
* @return 燃气车辆信息集合
*/
public
List
<
TVehicleInfo
>
selectTVehicleInfoList
(
TVehicleInfo
tVehicleInfo
);
/**
* 新增燃气车辆信息
*
* @param tVehicleInfo 燃气车辆信息
* @return 结果
*/
public
int
insertTVehicleInfo
(
TVehicleInfo
tVehicleInfo
);
/**
* 修改燃气车辆信息
*
* @param tVehicleInfo 燃气车辆信息
* @return 结果
*/
public
int
updateTVehicleInfo
(
TVehicleInfo
tVehicleInfo
);
/**
* 删除燃气车辆信息
*
* @param vehicleId 燃气车辆信息ID
* @return 结果
*/
public
int
deleteTVehicleInfoById
(
Long
vehicleId
);
/**
* 批量删除燃气车辆信息
*
* @param vehicleIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTVehicleInfoByIds
(
Long
[]
vehicleIds
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/mapper/TVehicleLocationInfoMapper.java
0 → 100644
View file @
f36ebc5e
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TVehicleLocationInfo
;
/**
* 燃气车辆位置信息Mapper接口
*
* @author zehong
* @date 2022-03-17
*/
public
interface
TVehicleLocationInfoMapper
{
/**
* 查询燃气车辆位置信息
*
* @param vehicleLocationId 燃气车辆位置信息ID
* @return 燃气车辆位置信息
*/
public
TVehicleLocationInfo
selectTVehicleLocationInfoById
(
Long
vehicleLocationId
);
/**
* 查询燃气车辆位置信息列表
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 燃气车辆位置信息集合
*/
public
List
<
TVehicleLocationInfo
>
selectTVehicleLocationInfoList
(
TVehicleLocationInfo
tVehicleLocationInfo
);
/**
* 新增燃气车辆位置信息
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 结果
*/
public
int
insertTVehicleLocationInfo
(
TVehicleLocationInfo
tVehicleLocationInfo
);
/**
* 修改燃气车辆位置信息
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 结果
*/
public
int
updateTVehicleLocationInfo
(
TVehicleLocationInfo
tVehicleLocationInfo
);
/**
* 删除燃气车辆位置信息
*
* @param vehicleLocationId 燃气车辆位置信息ID
* @return 结果
*/
public
int
deleteTVehicleLocationInfoById
(
Long
vehicleLocationId
);
/**
* 批量删除燃气车辆位置信息
*
* @param vehicleLocationIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTVehicleLocationInfoByIds
(
Long
[]
vehicleLocationIds
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/ITVehicleInfoService.java
0 → 100644
View file @
f36ebc5e
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TVehicleInfo
;
/**
* 燃气车辆信息Service接口
*
* @author zehong
* @date 2022-03-17
*/
public
interface
ITVehicleInfoService
{
/**
* 查询燃气车辆信息
*
* @param vehicleId 燃气车辆信息ID
* @return 燃气车辆信息
*/
public
TVehicleInfo
selectTVehicleInfoById
(
Long
vehicleId
);
/**
* 查询燃气车辆信息列表
*
* @param tVehicleInfo 燃气车辆信息
* @return 燃气车辆信息集合
*/
public
List
<
TVehicleInfo
>
selectTVehicleInfoList
(
TVehicleInfo
tVehicleInfo
);
/**
* 新增燃气车辆信息
*
* @param tVehicleInfo 燃气车辆信息
* @return 结果
*/
public
int
insertTVehicleInfo
(
TVehicleInfo
tVehicleInfo
);
/**
* 修改燃气车辆信息
*
* @param tVehicleInfo 燃气车辆信息
* @return 结果
*/
public
int
updateTVehicleInfo
(
TVehicleInfo
tVehicleInfo
);
/**
* 批量删除燃气车辆信息
*
* @param vehicleIds 需要删除的燃气车辆信息ID
* @return 结果
*/
public
int
deleteTVehicleInfoByIds
(
Long
[]
vehicleIds
);
/**
* 删除燃气车辆信息信息
*
* @param vehicleId 燃气车辆信息ID
* @return 结果
*/
public
int
deleteTVehicleInfoById
(
Long
vehicleId
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/ITVehicleLocationInfoService.java
0 → 100644
View file @
f36ebc5e
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TVehicleLocationInfo
;
/**
* 燃气车辆位置信息Service接口
*
* @author zehong
* @date 2022-03-17
*/
public
interface
ITVehicleLocationInfoService
{
/**
* 查询燃气车辆位置信息
*
* @param vehicleLocationId 燃气车辆位置信息ID
* @return 燃气车辆位置信息
*/
public
TVehicleLocationInfo
selectTVehicleLocationInfoById
(
Long
vehicleLocationId
);
/**
* 查询燃气车辆位置信息列表
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 燃气车辆位置信息集合
*/
public
List
<
TVehicleLocationInfo
>
selectTVehicleLocationInfoList
(
TVehicleLocationInfo
tVehicleLocationInfo
);
/**
* 新增燃气车辆位置信息
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 结果
*/
public
int
insertTVehicleLocationInfo
(
TVehicleLocationInfo
tVehicleLocationInfo
);
/**
* 修改燃气车辆位置信息
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 结果
*/
public
int
updateTVehicleLocationInfo
(
TVehicleLocationInfo
tVehicleLocationInfo
);
/**
* 批量删除燃气车辆位置信息
*
* @param vehicleLocationIds 需要删除的燃气车辆位置信息ID
* @return 结果
*/
public
int
deleteTVehicleLocationInfoByIds
(
Long
[]
vehicleLocationIds
);
/**
* 删除燃气车辆位置信息信息
*
* @param vehicleLocationId 燃气车辆位置信息ID
* @return 结果
*/
public
int
deleteTVehicleLocationInfoById
(
Long
vehicleLocationId
);
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/TVehicleInfoServiceImpl.java
0 → 100644
View file @
f36ebc5e
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TVehicleInfoMapper
;
import
com.zehong.system.domain.TVehicleInfo
;
import
com.zehong.system.service.ITVehicleInfoService
;
/**
* 燃气车辆信息Service业务层处理
*
* @author zehong
* @date 2022-03-17
*/
@Service
public
class
TVehicleInfoServiceImpl
implements
ITVehicleInfoService
{
@Autowired
private
TVehicleInfoMapper
tVehicleInfoMapper
;
/**
* 查询燃气车辆信息
*
* @param vehicleId 燃气车辆信息ID
* @return 燃气车辆信息
*/
@Override
public
TVehicleInfo
selectTVehicleInfoById
(
Long
vehicleId
)
{
return
tVehicleInfoMapper
.
selectTVehicleInfoById
(
vehicleId
);
}
/**
* 查询燃气车辆信息列表
*
* @param tVehicleInfo 燃气车辆信息
* @return 燃气车辆信息
*/
@Override
public
List
<
TVehicleInfo
>
selectTVehicleInfoList
(
TVehicleInfo
tVehicleInfo
)
{
return
tVehicleInfoMapper
.
selectTVehicleInfoList
(
tVehicleInfo
);
}
/**
* 新增燃气车辆信息
*
* @param tVehicleInfo 燃气车辆信息
* @return 结果
*/
@Override
public
int
insertTVehicleInfo
(
TVehicleInfo
tVehicleInfo
)
{
return
tVehicleInfoMapper
.
insertTVehicleInfo
(
tVehicleInfo
);
}
/**
* 修改燃气车辆信息
*
* @param tVehicleInfo 燃气车辆信息
* @return 结果
*/
@Override
public
int
updateTVehicleInfo
(
TVehicleInfo
tVehicleInfo
)
{
return
tVehicleInfoMapper
.
updateTVehicleInfo
(
tVehicleInfo
);
}
/**
* 批量删除燃气车辆信息
*
* @param vehicleIds 需要删除的燃气车辆信息ID
* @return 结果
*/
@Override
public
int
deleteTVehicleInfoByIds
(
Long
[]
vehicleIds
)
{
return
tVehicleInfoMapper
.
deleteTVehicleInfoByIds
(
vehicleIds
);
}
/**
* 删除燃气车辆信息信息
*
* @param vehicleId 燃气车辆信息ID
* @return 结果
*/
@Override
public
int
deleteTVehicleInfoById
(
Long
vehicleId
)
{
return
tVehicleInfoMapper
.
deleteTVehicleInfoById
(
vehicleId
);
}
}
gassafetyprogress-system/src/main/java/com/zehong/system/service/impl/TVehicleLocationInfoServiceImpl.java
0 → 100644
View file @
f36ebc5e
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TVehicleLocationInfoMapper
;
import
com.zehong.system.domain.TVehicleLocationInfo
;
import
com.zehong.system.service.ITVehicleLocationInfoService
;
/**
* 燃气车辆位置信息Service业务层处理
*
* @author zehong
* @date 2022-03-17
*/
@Service
public
class
TVehicleLocationInfoServiceImpl
implements
ITVehicleLocationInfoService
{
@Autowired
private
TVehicleLocationInfoMapper
tVehicleLocationInfoMapper
;
/**
* 查询燃气车辆位置信息
*
* @param vehicleLocationId 燃气车辆位置信息ID
* @return 燃气车辆位置信息
*/
@Override
public
TVehicleLocationInfo
selectTVehicleLocationInfoById
(
Long
vehicleLocationId
)
{
return
tVehicleLocationInfoMapper
.
selectTVehicleLocationInfoById
(
vehicleLocationId
);
}
/**
* 查询燃气车辆位置信息列表
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 燃气车辆位置信息
*/
@Override
public
List
<
TVehicleLocationInfo
>
selectTVehicleLocationInfoList
(
TVehicleLocationInfo
tVehicleLocationInfo
)
{
return
tVehicleLocationInfoMapper
.
selectTVehicleLocationInfoList
(
tVehicleLocationInfo
);
}
/**
* 新增燃气车辆位置信息
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 结果
*/
@Override
public
int
insertTVehicleLocationInfo
(
TVehicleLocationInfo
tVehicleLocationInfo
)
{
return
tVehicleLocationInfoMapper
.
insertTVehicleLocationInfo
(
tVehicleLocationInfo
);
}
/**
* 修改燃气车辆位置信息
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 结果
*/
@Override
public
int
updateTVehicleLocationInfo
(
TVehicleLocationInfo
tVehicleLocationInfo
)
{
return
tVehicleLocationInfoMapper
.
updateTVehicleLocationInfo
(
tVehicleLocationInfo
);
}
/**
* 批量删除燃气车辆位置信息
*
* @param vehicleLocationIds 需要删除的燃气车辆位置信息ID
* @return 结果
*/
@Override
public
int
deleteTVehicleLocationInfoByIds
(
Long
[]
vehicleLocationIds
)
{
return
tVehicleLocationInfoMapper
.
deleteTVehicleLocationInfoByIds
(
vehicleLocationIds
);
}
/**
* 删除燃气车辆位置信息信息
*
* @param vehicleLocationId 燃气车辆位置信息ID
* @return 结果
*/
@Override
public
int
deleteTVehicleLocationInfoById
(
Long
vehicleLocationId
)
{
return
tVehicleLocationInfoMapper
.
deleteTVehicleLocationInfoById
(
vehicleLocationId
);
}
}
gassafetyprogress-system/src/main/resources/mapper/system/TVehicleInfoMapper.xml
0 → 100644
View file @
f36ebc5e
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TVehicleInfoMapper"
>
<resultMap
type=
"TVehicleInfo"
id=
"TVehicleInfoResult"
>
<result
property=
"vehicleId"
column=
"vehicle_id"
/>
<result
property=
"carNum"
column=
"car_num"
/>
<result
property=
"brandModel"
column=
"brand_model"
/>
<result
property=
"vehicleType"
column=
"vehicle_type"
/>
<result
property=
"vehicleLoad"
column=
"vehicle_load"
/>
<result
property=
"vehicleSize"
column=
"vehicle_size"
/>
<result
property=
"vehicleLimt"
column=
"vehicle_limt"
/>
<result
property=
"vehicleInspect"
column=
"vehicle_inspect"
/>
<result
property=
"beyondEnterpriseId"
column=
"beyond_enterprise_id"
/>
<result
property=
"personLiable"
column=
"person_liable"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"remarks"
column=
"remarks"
/>
</resultMap>
<sql
id=
"selectTVehicleInfoVo"
>
select vehicle_id, car_num, brand_model, vehicle_type, vehicle_load, vehicle_size, vehicle_limt, vehicle_inspect, beyond_enterprise_id, person_liable, phone, is_del, remarks from t_vehicle_info
</sql>
<select
id=
"selectTVehicleInfoList"
parameterType=
"TVehicleInfo"
resultMap=
"TVehicleInfoResult"
>
<include
refid=
"selectTVehicleInfoVo"
/>
<where>
<if
test=
"carNum != null and carNum != ''"
>
and car_num like concat('%', #{carNum}, '%')
</if>
<if
test=
"brandModel != null and brandModel != ''"
>
and brand_model = #{brandModel}
</if>
<if
test=
"vehicleType != null and vehicleType != ''"
>
and vehicle_type = #{vehicleType}
</if>
<if
test=
"vehicleLoad != null and vehicleLoad != ''"
>
and vehicle_load = #{vehicleLoad}
</if>
<if
test=
"vehicleSize != null and vehicleSize != ''"
>
and vehicle_size = #{vehicleSize}
</if>
<if
test=
"vehicleLimt != null and vehicleLimt != ''"
>
and vehicle_limt = #{vehicleLimt}
</if>
<if
test=
"vehicleInspect != null and vehicleInspect != ''"
>
and vehicle_inspect = #{vehicleInspect}
</if>
<if
test=
"beyondEnterpriseId != null and beyondEnterpriseId != ''"
>
and beyond_enterprise_id = #{beyondEnterpriseId}
</if>
<if
test=
"personLiable != null and personLiable != ''"
>
and person_liable = #{personLiable}
</if>
<if
test=
"phone != null and phone != ''"
>
and phone = #{phone}
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
</where>
</select>
<select
id=
"selectTVehicleInfoById"
parameterType=
"Long"
resultMap=
"TVehicleInfoResult"
>
<include
refid=
"selectTVehicleInfoVo"
/>
where vehicle_id = #{vehicleId}
</select>
<insert
id=
"insertTVehicleInfo"
parameterType=
"TVehicleInfo"
useGeneratedKeys=
"true"
keyProperty=
"vehicleId"
>
insert into t_vehicle_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"carNum != null"
>
car_num,
</if>
<if
test=
"brandModel != null"
>
brand_model,
</if>
<if
test=
"vehicleType != null"
>
vehicle_type,
</if>
<if
test=
"vehicleLoad != null"
>
vehicle_load,
</if>
<if
test=
"vehicleSize != null"
>
vehicle_size,
</if>
<if
test=
"vehicleLimt != null"
>
vehicle_limt,
</if>
<if
test=
"vehicleInspect != null"
>
vehicle_inspect,
</if>
<if
test=
"beyondEnterpriseId != null"
>
beyond_enterprise_id,
</if>
<if
test=
"personLiable != null"
>
person_liable,
</if>
<if
test=
"phone != null"
>
phone,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"carNum != null"
>
#{carNum},
</if>
<if
test=
"brandModel != null"
>
#{brandModel},
</if>
<if
test=
"vehicleType != null"
>
#{vehicleType},
</if>
<if
test=
"vehicleLoad != null"
>
#{vehicleLoad},
</if>
<if
test=
"vehicleSize != null"
>
#{vehicleSize},
</if>
<if
test=
"vehicleLimt != null"
>
#{vehicleLimt},
</if>
<if
test=
"vehicleInspect != null"
>
#{vehicleInspect},
</if>
<if
test=
"beyondEnterpriseId != null"
>
#{beyondEnterpriseId},
</if>
<if
test=
"personLiable != null"
>
#{personLiable},
</if>
<if
test=
"phone != null"
>
#{phone},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
</trim>
</insert>
<update
id=
"updateTVehicleInfo"
parameterType=
"TVehicleInfo"
>
update t_vehicle_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"carNum != null"
>
car_num = #{carNum},
</if>
<if
test=
"brandModel != null"
>
brand_model = #{brandModel},
</if>
<if
test=
"vehicleType != null"
>
vehicle_type = #{vehicleType},
</if>
<if
test=
"vehicleLoad != null"
>
vehicle_load = #{vehicleLoad},
</if>
<if
test=
"vehicleSize != null"
>
vehicle_size = #{vehicleSize},
</if>
<if
test=
"vehicleLimt != null"
>
vehicle_limt = #{vehicleLimt},
</if>
<if
test=
"vehicleInspect != null"
>
vehicle_inspect = #{vehicleInspect},
</if>
<if
test=
"beyondEnterpriseId != null"
>
beyond_enterprise_id = #{beyondEnterpriseId},
</if>
<if
test=
"personLiable != null"
>
person_liable = #{personLiable},
</if>
<if
test=
"phone != null"
>
phone = #{phone},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks},
</if>
</trim>
where vehicle_id = #{vehicleId}
</update>
<delete
id=
"deleteTVehicleInfoById"
parameterType=
"Long"
>
delete from t_vehicle_info where vehicle_id = #{vehicleId}
</delete>
<delete
id=
"deleteTVehicleInfoByIds"
parameterType=
"String"
>
delete from t_vehicle_info where vehicle_id in
<foreach
item=
"vehicleId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{vehicleId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
gassafetyprogress-system/src/main/resources/mapper/system/TVehicleLocationInfoMapper.xml
0 → 100644
View file @
f36ebc5e
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.zehong.system.mapper.TVehicleLocationInfoMapper"
>
<resultMap
type=
"TVehicleLocationInfo"
id=
"TVehicleLocationInfoResult"
>
<result
property=
"vehicleLocationId"
column=
"vehicle_location_id"
/>
<result
property=
"carNum"
column=
"car_num"
/>
<result
property=
"longitude"
column=
"longitude"
/>
<result
property=
"latitude"
column=
"latitude"
/>
<result
property=
"reportTime"
column=
"report_time"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"remarks"
column=
"remarks"
/>
</resultMap>
<sql
id=
"selectTVehicleLocationInfoVo"
>
select vehicle_location_id, car_num, longitude, latitude, report_time, is_del, remarks from t_vehicle_location_info
</sql>
<select
id=
"selectTVehicleLocationInfoList"
parameterType=
"TVehicleLocationInfo"
resultMap=
"TVehicleLocationInfoResult"
>
<include
refid=
"selectTVehicleLocationInfoVo"
/>
<where>
<if
test=
"carNum != null and carNum != ''"
>
and car_num = #{carNum}
</if>
<if
test=
"longitude != null "
>
and longitude = #{longitude}
</if>
<if
test=
"latitude != null "
>
and latitude = #{latitude}
</if>
<if
test=
"beginTime != null and endTime!= null"
>
and report_time BETWEEN #{ beginTime } AND #{ endTime }
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
<if
test=
"remarks != null and remarks != ''"
>
and remarks = #{remarks}
</if>
</where>
ORDER BY report_time DESC
<if
test=
"isLast"
>
limit 1
</if>
</select>
<select
id=
"selectTVehicleLocationInfoById"
parameterType=
"Long"
resultMap=
"TVehicleLocationInfoResult"
>
<include
refid=
"selectTVehicleLocationInfoVo"
/>
where vehicle_location_id = #{vehicleLocationId}
</select>
<insert
id=
"insertTVehicleLocationInfo"
parameterType=
"TVehicleLocationInfo"
useGeneratedKeys=
"true"
keyProperty=
"vehicleLocationId"
>
insert into t_vehicle_location_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"carNum != null"
>
car_num,
</if>
<if
test=
"longitude != null"
>
longitude,
</if>
<if
test=
"latitude != null"
>
latitude,
</if>
<if
test=
"reportTime != null"
>
report_time,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"carNum != null"
>
#{carNum},
</if>
<if
test=
"longitude != null"
>
#{longitude},
</if>
<if
test=
"latitude != null"
>
#{latitude},
</if>
<if
test=
"reportTime != null"
>
#{reportTime},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"remarks != null"
>
#{remarks},
</if>
</trim>
</insert>
<update
id=
"updateTVehicleLocationInfo"
parameterType=
"TVehicleLocationInfo"
>
update t_vehicle_location_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"carNum != null"
>
car_num = #{carNum},
</if>
<if
test=
"longitude != null"
>
longitude = #{longitude},
</if>
<if
test=
"latitude != null"
>
latitude = #{latitude},
</if>
<if
test=
"reportTime != null"
>
report_time = #{reportTime},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks},
</if>
</trim>
where vehicle_location_id = #{vehicleLocationId}
</update>
<delete
id=
"deleteTVehicleLocationInfoById"
parameterType=
"Long"
>
delete from t_vehicle_location_info where vehicle_location_id = #{vehicleLocationId}
</delete>
<delete
id=
"deleteTVehicleLocationInfoByIds"
parameterType=
"String"
>
delete from t_vehicle_location_info where vehicle_location_id in
<foreach
item=
"vehicleLocationId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{vehicleLocationId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
gassafetyprogress-web/package.json
View file @
f36ebc5e
...
...
@@ -46,6 +46,7 @@
"js-beautify"
:
"1.13.0"
,
"js-cookie"
:
"2.2.1"
,
"jsencrypt"
:
"3.0.0-rc.1"
,
"moment"
:
"^2.29.1"
,
"nprogress"
:
"0.2.0"
,
"quill"
:
"1.3.7"
,
"screenfull"
:
"5.0.2"
,
...
...
gassafetyprogress-web/src/api/operationMonitor/vehicleInfo.js
0 → 100644
View file @
f36ebc5e
import
request
from
'@/utils/request'
// 查询燃气车辆信息列表
export
function
listInfo
(
query
)
{
return
request
({
url
:
'/system/vehicleInfo/list'
,
method
:
'get'
,
params
:
query
})
}
//获取车辆最终位置
export
function
getLastLocation
(
query
){
return
request
({
url
:
'/system/vehicleInfo/getLastLocation'
,
method
:
'get'
,
params
:
query
})
}
// 查询燃气车辆信息详细
export
function
getInfo
(
vehicleId
)
{
return
request
({
url
:
'/system/vehicleInfo/'
+
vehicleId
,
method
:
'get'
})
}
// 新增燃气车辆信息
export
function
addInfo
(
data
)
{
return
request
({
url
:
'/system/vehicleInfo'
,
method
:
'post'
,
data
:
data
})
}
// 修改燃气车辆信息
export
function
updateInfo
(
data
)
{
return
request
({
url
:
'/system/vehicleInfo'
,
method
:
'put'
,
data
:
data
})
}
// 删除燃气车辆信息
export
function
delInfo
(
vehicleId
)
{
return
request
({
url
:
'/system/vehicleInfo/'
+
vehicleId
,
method
:
'delete'
})
}
// 导出燃气车辆信息
export
function
exportInfo
(
query
)
{
return
request
({
url
:
'/system/vehicleInfo/export'
,
method
:
'get'
,
params
:
query
})
}
gassafetyprogress-web/src/api/operationMonitor/vehicleLocationInfo.js
0 → 100644
View file @
f36ebc5e
import
request
from
'@/utils/request'
// 查询燃气车辆位置信息列表
export
function
listInfo
(
query
)
{
return
request
({
url
:
'/system/vehicleLocationInfo/list'
,
method
:
'get'
,
params
:
query
})
}
//获取车辆位置信息
export
function
getVehicleLocations
(
query
){
return
request
({
url
:
'/system/vehicleLocationInfo/getVehicleLocations'
,
method
:
'get'
,
params
:
query
})
}
// 查询燃气车辆位置信息详细
export
function
getInfo
(
vehicleLocationId
)
{
return
request
({
url
:
'/system/vehicleLocationInfo/'
+
vehicleLocationId
,
method
:
'get'
})
}
// 新增燃气车辆位置信息
export
function
addInfo
(
data
)
{
return
request
({
url
:
'/system/vehicleLocationInfo'
,
method
:
'post'
,
data
:
data
})
}
// 修改燃气车辆位置信息
export
function
updateInfo
(
data
)
{
return
request
({
url
:
'/system/vehicleLocationInfo'
,
method
:
'put'
,
data
:
data
})
}
// 删除燃气车辆位置信息
export
function
delInfo
(
vehicleLocationId
)
{
return
request
({
url
:
'/system/vehicleLocationInfo/'
+
vehicleLocationId
,
method
:
'delete'
})
}
// 导出燃气车辆位置信息
export
function
exportInfo
(
query
)
{
return
request
({
url
:
'/system/vehicleLocationInfo/export'
,
method
:
'get'
,
params
:
query
})
}
gassafetyprogress-web/src/assets/image/car.png
0 → 100644
View file @
f36ebc5e
5.71 KB
gassafetyprogress-web/src/assets/images/l.png
0 → 100644
View file @
f36ebc5e
4.46 KB
gassafetyprogress-web/src/assets/images/r.png
0 → 100644
View file @
f36ebc5e
4.45 KB
gassafetyprogress-web/src/assets/styles/all.scss
View file @
f36ebc5e
...
...
@@ -633,3 +633,11 @@
overflow-y
:
hidden
!
important
;
}
}
//去除高德logo
.amap-logo
{
display
:
none
;
opacity
:
0
!
important
;
}
.amap-copyright
{
opacity
:
0
;
}
gassafetyprogress-web/src/assets/styles/gassVehiche.scss
0 → 100644
View file @
f36ebc5e
.gass-vehiche
{
.el-table
{
background-color
:
rgba
(
0
,
0
,
0
,
0
)
!
important
;
.el-table__body
{
width
:
100%
!
important
;
}
&
:
:
before
{
height
:
0px
!
important
;
}
td
{
border-bottom
:
none
!
important
;
}
.el-table__header-wrapper
,
.el-table__fixed-header-wrapper
{
tr
{
background-color
:
#213b52
!
important
;
}
th
{
word-break
:
break-word
;
background-color
:
#213b52
!
important
;
color
:
rgba
(
123
,
248
,
244
,
1
);
height
:
30px
;
font-size
:
13px
;
padding
:
0
;
&
.is-leaf
{
border-bottom
:
none
;
}
}
}
.el-table__body-wrapper
{
.el-table__row
:nth-child
(
2n
+
1
)
{
background-color
:
#213b52
;
&
:hover
td
{
background-color
:
#7bf8f4
30
!
important
;
}
td
{
.cell
{
// color: #525252;
color
:
rgba
(
123
,
248
,
244
,
1
);
}
}
}
.el-table__row
:nth-child
(
2n
)
{
background-color
:
#063157
!
important
;
&
:hover
td
{
background-color
:
#7bf8f4
30
!
important
;
}
td
{
background-color
:
#213b52
!
important
;
.cell
{
color
:
#fff
;
}
}
}
}
.el-table__body-wrapper
{
.el-button
[
class
*=
"el-icon-"
]
+
span
{
// margin-left: 1px;
}
}
}
// 滚动条样式
.drawer
{
::-webkit-scrollbar
{
width
:
10px
;
background
:
#012a53
;
position
:
absolute
;
top
:
0
;
//display:none
}
::-webkit-scrollbar-thumb
{
/*滚动条里面小方块*/
// border-radius: 10px;
// box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background
:
#cccccc
cc
;
border-radius
:
8px
;
}
::-webkit-scrollbar-track
{
/*滚动条里面轨道*/
// box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
// border-radius: 10px;
// background-color: red;
}
::-webkit-scrollbar-button:start
{
// overflow: hidden;
}
::-webkit-scrollbar-button:end
{
// overflow: hidden;
}
}
.el-pagination
{
button
:disabled
{
background-color
:
rgba
(
0
,
0
,
0
,
0
);
}
.el-pager
li
{
background-color
:
rgba
(
0
,
0
,
0
,
0
);
color
:
#fff
;
cursor
:
pointer
;
&
.active
{
color
:
#1890ff
;
}
&
:hover
{
color
:
#7bf8f4
;
}
}
.btn-prev
,
.el-pagination
.btn-next
{
background-color
:
rgba
(
0
,
0
,
0
,
0
);
}
}
.el-pagination
.btn-prev
,
.el-pagination
.btn-next
{
background-color
:
rgba
(
0
,
0
,
0
,
0
);
}
// 禁用状态的左箭头
button
[
disabled
]
{
&
:hover
{
.el-icon-arrow-left
,
.el-icon-arrow-right
{
&
:
:
before
{
color
:
#909399
!
important
;
}
}
}
.el-icon-arrow-left
,
.el-icon-arrow-right
{
&
:
:
before
{
color
:
#909399
;
}
}
}
button
{
&
:hover
{
.el-icon-arrow-left
,
.el-icon-arrow-right
{
&
:
:
before
{
color
:
#7bf8f4
!
important
;
}
}
}
}
// 平常状态下的
.el-icon-arrow-left
,
.el-icon-arrow-right
{
&
:
:
before
{
color
:
#ffffff
;
}
}
.el-pagination__jump
{
color
:
#fff
;
}
.el-input__inner
{
background-color
:
rgba
(
0
,
0
,
0
,
0
);
border-color
:
#1890ff
;
//color: #fff;
}
}
gassafetyprogress-web/src/main.js
View file @
f36ebc5e
...
...
@@ -17,6 +17,8 @@ import "@/assets/styles/index.scss"; // global css
import
"@/assets/styles/zehong.scss"
;
// zehong css
import
"./assets/css/font.css"
;
import
"./assets/styles/all.scss"
;
//燃气车辆信息页面表格
import
"./assets/styles/gassVehiche.scss"
;
import
App
from
"./App"
;
import
store
from
"./store"
;
...
...
gassafetyprogress-web/src/utils/mapClass/config.js
View file @
f36ebc5e
...
...
@@ -31,6 +31,7 @@ export const svgUrl = {
6
:
require
(
"@/assets/image/user1.svg"
),
7
:
require
(
"@/assets/image/zrxk.svg"
),
8
:
require
(
"@/assets/image/zcrq.svg"
),
9
:
require
(
"@/assets/image/car.png"
),
};
export
const
svgAlarm
=
{
2
:
require
(
"@/assets/mapImages/tyxAlarm.svg"
),
...
...
gassafetyprogress-web/src/utils/mapClass/map.js
View file @
f36ebc5e
...
...
@@ -679,11 +679,11 @@ export class EditorMap {
* @return {*}
*/
backTrack
(
vehicleId
,
path
)
{
infowindowClose
();
this
.
infowindowClose
();
AMap
.
plugin
(
"AMap.MoveAnimation"
,
()
=>
{
let
marker
=
this
.
allDevice
[
9
].
filter
(
(
item
)
=>
item
.
getExtData
().
vehicleId
==
vehicleId
)[
0
];
let
marker
=
this
.
allDevice
[
9
].
filter
(
item
=>
item
.
getExtData
().
vehicleId
==
vehicleId
)[
0
];
// 绘制轨迹
marker
.
polyline
=
new
AMap
.
Polyline
({
map
:
this
.
map
,
...
...
@@ -694,28 +694,59 @@ export class EditorMap {
strokeWeight
:
6
,
//线宽
// strokeStyle: "solid" //线样式
});
marker
.
passedPolyline
=
new
AMap
.
Polyline
({
map
:
this
.
map
,
strokeColor
:
"#AF5"
,
//线颜色
strokeWeight
:
6
,
//线宽
});
marker
.
on
(
"moving"
,
()
=>
{
marker
.
on
(
"moving"
,
(
e
)
=>
{
marker
.
passedPolyline
.
setPath
(
e
.
passedPath
);
this
.
map
.
setCenter
(
e
.
target
.
getPosition
(),
true
);
console
.
log
(
marker
.
passedPolyline
)
});
marker
.
moveAlong
(
path
,
{
// 每一段的时长
duration
:
800
,
//可根据实际采集时间间隔设置
// JSAPI2.0 是否延道路自动设置角度在 moveAlong 里设置
autoRotation
:
true
,
});
});
}
clearbackTrack
(
vehicleId
)
{
let
marker
=
this
.
allDevice
[
9
].
filter
(
(
item
)
=>
item
.
getExtData
().
vehicleId
==
vehicleId
)[
0
];
if
(
marker
)
{
this
.
map
.
remove
(
marker
);
this
.
map
.
remove
(
marker
.
polyline
);
this
.
map
.
remove
(
marker
.
passedPolyline
);
infowindowClose
();
// let marker = this.allDevice[9].filter(
// (item) => item.getExtData().vehicleId == vehicleId
// )[0];
this
.
allDevice
[
"9"
]?.
forEach
(
item
=>
{
if
(
item
)
{
if
(
item
.
polyline
){
console
.
log
(
"A"
)
this
.
map
.
remove
(
item
.
polyline
);
}
console
.
log
(
"B"
,
this
.
passedPolyline
)
if
(
this
.
passedPolyline
){
this
.
map
.
remove
(
item
.
passedPolyline
);
}
console
.
log
(
item
)
// this.map.remove(item);
}
})
this
.
infowindowClose
();
}
}
gassafetyprogress-web/src/views/operationMonitor/gassVehicle/component/MapCar.vue
0 → 100644
View file @
f36ebc5e
<
template
>
<div
class=
"devicea-wrapper"
>
</div>
</
template
>
<
script
>
import
moment
from
"moment"
;
export
default
{
data
()
{
return
{
};
},
mounted
()
{
this
.
vueRoot
.
getCar
(
this
.
deviceData
.
carNum
);
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
gassafetyprogress-web/src/views/operationMonitor/gassVehicle/component/drawer.vue
0 → 100644
View file @
f36ebc5e
<
template
>
<div
class=
"drawer"
>
<div
:class=
"maskClass"
@
click=
"closeByMask"
></div>
<div
:class=
"mainClass"
:style=
"mainStyle"
class=
"main"
>
<div
class=
"drawer-head"
>
<span>
{{
title
}}
</span>
<span
class=
"close-btn"
v-show=
"closable"
@
click=
"closeByButton"
>
X
</span>
</div>
<div
class=
"drawer-body"
>
<slot/>
</div>
<div
class=
"switch"
@
click=
"display = !display"
>
<img
v-if=
"display"
src=
"@/assets/images/l.png"
alt=
""
/>
<img
v-else
src=
"@/assets/images/r.png"
alt=
""
/>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:
{
// 是否打开
/* display: {
type: Boolean
},*/
// 标题
title
:
{
type
:
String
,
default
:
'标题'
},
// 是否显示关闭按钮
closable
:
{
type
:
Boolean
,
default
:
true
},
// 是否显示遮罩
mask
:
{
type
:
Boolean
,
default
:
true
},
// 是否点击遮罩关闭
maskClosable
:
{
type
:
Boolean
,
default
:
true
},
// 宽度
width
:
{
type
:
String
,
default
:
'400px'
},
// 是否在父级元素中打开
inner
:
{
type
:
Boolean
,
default
:
false
}
},
data
(){
return
{
//抽屉是否收回
display
:
true
}
},
computed
:
{
maskClass
:
function
()
{
return
{
'mask-show'
:
(
this
.
mask
&&
this
.
display
),
'mask-hide'
:
!
(
this
.
mask
&&
this
.
display
),
'inner'
:
this
.
inner
}
},
mainClass
:
function
()
{
return
{
'main-show'
:
this
.
display
,
'main-hide'
:
!
this
.
display
,
'inner'
:
this
.
inner
}
},
mainStyle
:
function
()
{
return
{
width
:
this
.
width
,
left
:
this
.
display
?
'0'
:
`-
${
+
this
.
width
.
substr
(
0
,
this
.
width
.
length
-
2
)
+
20
}
px`
,
borderLeft
:
this
.
mask
?
'none'
:
'1px solid #eee'
}
}
},
mounted
()
{
this
.
display
=
true
;
if
(
this
.
inner
)
{
let
box
=
this
.
$el
.
parentNode
box
.
style
.
position
=
'relative'
}
},
methods
:
{
closeByMask
()
{
this
.
maskClosable
&&
this
.
$emit
(
'update:display'
,
false
)
},
closeByButton
()
{
//this.$emit('update:display', false)
this
.
display
=
false
;
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.drawer
{
position
:
absolute
;
top
:
20px
;
bottom
:
0
;
z-index
:
99
;
/* 遮罩 */
.mask-show
{
position
:
fixed
;
top
:
0
;
left
:
0
;
width
:
100%
;
z-index
:
10
;
background-color
:
rgba
(
0
,
0
,
0
,.
5
);
opacity
:
1
;
transition
:
opacity
.5s
;
}
.mask-hide
{
opacity
:
0
;
transition
:
opacity
.5s
;
}
/* 滑块 */
.main
{
position
:
fixed
;
z-index
:
10
;
top
:
0
;
height
:
100%
;
background
:
rgb
(
49
114
195
/
24%
);
transition
:
all
0
.5s
;
}
.main-show
{
opacity
:
1
;
}
.main-hide
{
opacity
:
1
;
}
/* 某个元素内部显示 */
.inner
{
position
:
absolute
;
}
/* 其他样式 */
.drawer-head
{
display
:
flex
;
justify-content
:
space-between
;
height
:
45px
;
line-height
:
45px
;
padding
:
0
15px
;
font-size
:
15px
;
font-weight
:
bold
;
background
:
rgb
(
87
114
153
/
44%
);
color
:
white
;
/* border-bottom: 1px solid #eee;*/
.close-btn
{
display
:
inline-block
;
cursor
:
pointer
;
height
:
100%
;
padding-left
:
20px
;
}
}
.drawer-body
{
font-size
:
14px
;
padding
:
15px
;
padding-bottom
:
30px
;
height
:
100%
;
width
:
100%
;
overflow-y
:
scroll
;
overflow-x
:
scroll
;
}
}
.switch
{
position
:
absolute
;
right
:
-35px
;
top
:
250px
;
i
{
background
:
#fff
;
}
overflow
:
hidden
;
cursor
:
pointer
;
opacity
:
1
;
}
</
style
>
gassafetyprogress-web/src/views/operationMonitor/gassVehicle/index.vue
0 → 100644
View file @
f36ebc5e
<
template
>
<div
class=
"gassVehicle gass-vehiche"
>
<drawer
title=
"车辆信息"
:inner=
"true"
:width=
"drawerWidth"
:mask=
"false"
>
<div
class=
"scroll"
>
<el-row
style=
"margin-bottom: 10px"
>
<el-col
:span=
"14"
style=
"margin-right: 30px"
>
<el-input
v-model=
"queryParams.carNum"
placeholder=
"请输入车牌号"
clearable
size=
"small"
/>
</el-col>
<el-col
:span=
"8"
>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"carInfoSearch()"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-col>
</el-row>
<el-table
v-loading=
"loading"
:data=
"infoList"
>
<el-table-column
label=
"车牌号"
align=
"center"
prop=
"carNum"
/>
<!--
<el-table-column
label=
"品牌型号"
align=
"center"
prop=
"brandModel"
/>
-->
<!--
<el-table-column
label=
"车辆类型"
align=
"center"
prop=
"vehicleType"
>
-->
<!--
<template
slot-scope=
"scope"
>
-->
<!--
<span
v-if=
"scope.row.vehicleType == '1'"
>
罐车
</span>
-->
<!--
<span
v-if=
"scope.row.vehicleType == '2'"
>
卡车
</span>
-->
<!--
</
template
>
-->
<!--</el-table-column>-->
<!--<el-table-column label="车辆载重" align="center" prop="vehicleLoad" />-->
<!--<el-table-column label="车辆大小" align="center" prop="vehicleSize" />-->
<!--<el-table-column label="车辆限乘" align="center" prop="vehicleLimt" />-->
<!--<el-table-column label="车辆检测信息" align="center" prop="vehicleInspect" />-->
<el-table-column
label=
"所属企业"
align=
"center"
prop=
"beyondEnterpriseId"
/>
<el-table-column
label=
"责任人"
align=
"center"
prop=
"personLiable"
/>
<el-table-column
label=
"联系电话"
align=
"center"
prop=
"phone"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
width=
"150"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"getVehicleInfo(scope.row)"
v-hasPermi=
"['system:info:edit']"
>
车辆信息
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-map-location"
@
click=
"getVehicleTravel(scope.row)"
v-hasPermi=
"['system:info:remove']"
>
车辆轨迹
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
@
current-change=
"handleCurrentChangvale"
:page-size=
"queryParams.pageSize"
layout=
"prev, pager, next, jumper"
:total=
"total"
:hide-on-single-page=
"total <= queryParams.pageSize"
:key=
"total + '' + queryParams.pageSize"
/>
</div>
</drawer>
<div
id=
"map"
></div>
<!-- 查询车辆信息 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"900px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"80px"
>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"车牌号"
prop=
"carNum"
>
<el-input
v-model=
"form.carNum"
placeholder=
"请输入车牌号"
:disabled=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"品牌型号"
prop=
"brandModel"
>
<el-input
v-model=
"form.brandModel"
placeholder=
"请输入品牌型号"
:disabled=
"true"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"车辆类型"
prop=
"vehicleType"
>
<el-input
value=
"罐车"
v-if=
"form.vehicleType == '1'"
:disabled=
"true"
/>
<el-input
value=
"卡车"
v-if=
"form.vehicleType == '2'"
:disabled=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"车辆载重"
prop=
"vehicleLoad"
>
<el-input
v-model=
"form.vehicleLoad"
placeholder=
"请输入车辆载重"
:disabled=
"true"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"车辆大小"
prop=
"vehicleSize"
>
<el-input
v-model=
"form.vehicleSize"
placeholder=
"请输入车辆大小"
:disabled=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"车辆限乘"
prop=
"vehicleLimt"
>
<el-input
v-model=
"form.vehicleLimt"
placeholder=
"请输入车辆限乘"
:disabled=
"true"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"车辆检测信息"
prop=
"vehicleInspect"
>
<el-input
v-model=
"form.vehicleInspect"
placeholder=
"请输入车辆检测信息"
:disabled=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"所属企业"
prop=
"beyondEnterpriseId"
>
<el-input
v-model=
"form.beyondEnterpriseId"
placeholder=
"请输入所属企业"
:disabled=
"true"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"责任人"
prop=
"personLiable"
>
<el-input
v-model=
"form.personLiable"
placeholder=
"请输入责任人"
:disabled=
"true"
/>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"联系电话"
prop=
"phone"
>
<el-input
v-model=
"form.phone"
placeholder=
"请输入联系电话"
:disabled=
"true"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
<!--值班人员轨迹回放-->
<el-dialog
title=
"值班人员轨迹回放"
:visible
.
sync=
"backOpen"
>
<el-form
:model=
"backForm"
ref=
"backForm"
:rules=
"rules"
>
<el-row>
<el-col>
<el-form-item
label=
"请选择时间段"
prop=
"changeTime"
>
<el-radio-group
v-model=
"backForm.changeTime"
@
change=
"radioChange"
>
<el-radio
:label=
"1"
>
最近2小时
</el-radio>
<el-radio
:label=
"2"
>
最近24小时
</el-radio>
<el-radio
:label=
"3"
>
自定义时间段
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"11"
>
<el-form-item
label=
"选择开始时间:"
prop=
"beginTime"
>
<el-date-picker
:disabled=
"backForm.changeTime != 3"
v-model=
"backForm.beginTime"
type=
"datetime"
placeholder=
"选择开始时间"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"11"
>
<el-form-item
label=
"选择结束时间:"
prop=
"endTime"
>
<el-date-picker
:disabled=
"backForm.changeTime != 3"
v-model=
"backForm.endTime"
type=
"datetime"
placeholder=
"选择结束时间"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"searchLocations()"
>
确 定
</el-button>
<el-button
@
click=
"backOpen = false"
>
取 消
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
{
getLastLocation
,
listInfo
,
getInfo
,
delInfo
,
addInfo
,
updateInfo
,
exportInfo
}
from
"@/api/operationMonitor/vehicleInfo"
;
import
{
getVehicleLocations
}
from
"@/api/operationMonitor/vehicleLocationInfo"
;
import
MapCar
from
"./component/MapCar"
;
import
{
EditorMap
}
from
"@/utils/mapClass/map"
;
import
{
mapGetters
,
mapActions
}
from
"vuex"
;
import
drawer
from
"./component/drawer"
;
import
moment
from
"moment"
;
export
default
{
name
:
"vechicle"
,
components
:
{
drawer
},
data
()
{
return
{
//地图
map
:
null
,
drawerWidth
:
'600px'
,
// 遮罩层
loading
:
true
,
// 总条数
total
:
0
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
carNum
:
null
,
brandModel
:
null
,
vehicleType
:
null
,
vehicleLoad
:
null
,
vehicleSize
:
null
,
vehicleLimt
:
null
,
vehicleInspect
:
null
,
beyondEnterpriseId
:
null
,
personLiable
:
null
,
phone
:
null
,
isDel
:
null
,
remarks
:
null
},
// 燃气车辆信息表格数据
infoList
:
[],
form
:
{},
// 是否显示弹出层
open
:
false
,
// 弹出层标题
title
:
""
,
//轨迹回放
backOpen
:
false
,
backForm
:{
changeTime
:
1
,
beginTime
:
""
,
endTime
:
""
,
carNum
:
""
,
vehicleId
:
""
},
rules
:
{
changeTime
:
[
{
required
:
true
,
message
:
"选择查询时间"
,
trigger
:
[
"blur"
,
"change"
],
},
],
beginTime
:
[
{
required
:
true
,
message
:
"请输入开始时间"
,
trigger
:
"blur"
},
],
endTime
:
[
{
required
:
true
,
message
:
"请输入结束时间"
,
trigger
:
"blur"
},
],
}
};
},
computed
:
{
...
mapGetters
([
"company"
,
"systemSetting"
])
},
created
()
{
this
.
getList
();
},
mounted
(){
const
path
=
eval
(
this
.
systemSetting
.
map_center
);
this
.
map
=
new
EditorMap
(
"map"
,
{
center
:
path
,
mapStyle
:
"amap://styles/f71d3a3d73e14f5b2bf5508bf1411758"
,
zoom
:
14.5
,
},
this
);
},
methods
:
{
/** 查询燃气车辆信息列表 */
getList
(){
this
.
loading
=
true
;
listInfo
(
this
.
queryParams
).
then
(
response
=>
{
this
.
infoList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
});
},
/** 获取车辆信息操作 */
getVehicleInfo
(
row
){
this
.
reset
();
const
vehicleId
=
row
.
vehicleId
||
this
.
ids
getInfo
(
vehicleId
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"查看燃气车辆信息"
;
});
},
/**获取车辆轨迹操作*/
getVehicleTravel
(
row
){
let
param
=
{};
param
.
vehicleId
=
row
.
vehicleId
;
this
.
backForm
.
vehicleId
=
row
.
vehicleId
;
getLastLocation
(
param
).
then
(
res
=>
{
if
(
res
){
res
.
data
.
iconType
=
9
;
this
.
map
.
clearbackTrack
(
param
.
vehicleId
)
if
(
res
.
data
.
longitude
&&
res
.
data
.
latitude
){
this
.
map
.
addDevice
(
res
.
data
,
MapCar
);
this
.
map
.
map
.
panTo
([
res
.
data
.
longitude
,
res
.
data
.
latitude
]);
}
}
});
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
},
// 表单重置
reset
()
{
this
.
form
=
{
vehicleId
:
null
,
carNum
:
null
,
brandModel
:
null
,
vehicleType
:
null
,
vehicleLoad
:
null
,
vehicleSize
:
null
,
vehicleLimt
:
null
,
vehicleInspect
:
null
,
beyondEnterpriseId
:
null
,
personLiable
:
null
,
phone
:
null
,
isDel
:
null
,
remarks
:
null
};
this
.
resetForm
(
"form"
);
},
radioChange
(
e
)
{
if
(
e
==
1
)
{
this
.
backForm
.
beginTime
=
moment
()
.
subtract
(
2
,
"h"
)
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
backForm
.
endTime
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
}
else
if
(
e
==
2
)
{
this
.
backForm
.
beginTime
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
backForm
.
endTime
=
moment
()
.
add
(
1
,
"d"
)
.
format
(
"YYYY-MM-DD HH:mm:ss"
);
}
else
{
this
.
backForm
.
beginTime
=
""
;
this
.
backForm
.
endTime
=
""
;
}
},
getCar
(
carNum
){
this
.
backOpen
=
true
;
this
.
backForm
.
carNum
=
carNum
;
this
.
backForm
.
beginTime
=
moment
().
format
(
"YYYY-MM-DD HH:mm:ss"
);
this
.
backForm
.
endTime
=
moment
().
add
(
2
,
"h"
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
},
handleCurrentChangvale
(
val
){
this
.
queryParams
.
pageNum
=
val
;
this
.
getList
();
},
carInfoSearch
(){
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
},
resetQuery
(){
this
.
queryParams
.
pageNum
=
1
;
this
.
queryParams
.
carNum
=
null
;
this
.
getList
();
},
searchLocations
(){
getVehicleLocations
(
this
.
backForm
).
then
(
res
=>
{
console
.
log
(
res
,
"-------------ffffffffffffff"
)
let
paths
=
[];
res
.
data
.
forEach
(
item
=>
{
console
.
log
(
item
,
"-------------ffffffffffffff"
)
paths
.
push
([
item
.
longitude
,
item
.
latitude
]);
})
this
.
map
.
backTrack
(
this
.
backForm
.
vehicleId
,
paths
);
this
.
backOpen
=
false
;
})
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.gassVehicle
{
positoin
:relative
;
/*background-color: red;*/
height
:calc
(
100vh
-
50px
)
;
padding
:
20px
;
padding-bottom
:
0px
;
}
#map
{
/*position: fixed;*/
/*width:calc(100vw - 250px);*/
/*top:70px;*/
/*bottom:0;*/
height
:
100%
;
width
:
100%
;
}
/*!* 表格最外边框 *!
.el-table --border, .el-table --group{
border: none;
}*/
.el-table
{
background-color
:
#00afff
!
important
;
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment