dev
parent
5eb9c4cc27
commit
ebdb0fffab
|
@ -1,23 +0,0 @@
|
||||||
.DS_Store
|
|
||||||
node_modules/
|
|
||||||
dist/
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
**/*.log
|
|
||||||
|
|
||||||
tests/**/coverage/
|
|
||||||
tests/e2e/reports
|
|
||||||
selenium-debug.log
|
|
||||||
|
|
||||||
# Editor directories and files
|
|
||||||
.idea
|
|
||||||
.vscode
|
|
||||||
*.suo
|
|
||||||
*.ntvs*
|
|
||||||
*.njsproj
|
|
||||||
*.sln
|
|
||||||
*.local
|
|
||||||
|
|
||||||
package-lock.json
|
|
||||||
yarn.lock
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AnalysisProjectProfileManager">
|
||||||
|
<option name="PROJECT_PROFILE" />
|
||||||
|
<option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
|
||||||
|
<list size="0" />
|
||||||
|
</component>
|
||||||
|
<component name="SuppressionsComponent">
|
||||||
|
<option name="suppComments" value="[]" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,8 @@
|
||||||
|
# 默认忽略的文件
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# 基于编辑器的 HTTP 客户端请求
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager">
|
||||||
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
|
</component>
|
||||||
|
<component name="SuppressionsComponent">
|
||||||
|
<option name="suppComments" value="[]" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/cloud-ui-master.iml" filepath="$PROJECT_DIR$/.idea/cloud-ui-master.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AnalysisProjectProfileManager">
|
||||||
|
<option name="PROJECT_PROFILE" value="Project Default" />
|
||||||
|
<option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
|
||||||
|
<scopes />
|
||||||
|
<profiles>
|
||||||
|
<profile profile_name="Project Default" version="1.0" is_locked="false" />
|
||||||
|
</profiles>
|
||||||
|
<list size="0" />
|
||||||
|
</component>
|
||||||
|
</project>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,2 @@
|
||||||
|
Spring Boot Version: ${spring-boot.version}
|
||||||
|
Spring Application Name: ${spring.application.name}
|
|
@ -0,0 +1,156 @@
|
||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
|
||||||
|
export function listManager(query) {
|
||||||
|
return request({
|
||||||
|
url: '/car/vehicle/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function getManagerId(id) {
|
||||||
|
return request({
|
||||||
|
url: '/car/vehicle/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addManager(data) {
|
||||||
|
return request({
|
||||||
|
url: '/car/vehicle/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateManager(data) {
|
||||||
|
return request({
|
||||||
|
url: '/car/vehicle/edit',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function testMessage() {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageInfo/test',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function delManager(id) {
|
||||||
|
return request({
|
||||||
|
url: '/car/vehicle/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------报---------
|
||||||
|
export function listMessage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageInfo/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getMessage(id) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageInfo/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addMessage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageInfo',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateMessageDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: '/car/updateMessage',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delMessage(id) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageInfo/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询车辆实时数据
|
||||||
|
export function getDataByRedis(carVin) {
|
||||||
|
return request({
|
||||||
|
url: '/car/redis/getDataByRedis/' + carVin,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//提交报文
|
||||||
|
export function submit(data) {
|
||||||
|
return request({
|
||||||
|
url: '/car/vehicleMessageMiddle/submit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// --------------类型-----------
|
||||||
|
// 查询车辆报文类型列表
|
||||||
|
export function listMessageType(query) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageType/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询车辆报文类型详细
|
||||||
|
export function getMessageType(messageCode) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageType/' + messageCode,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增车辆报文类型
|
||||||
|
export function addMessageType(data) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageType',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改车辆报文类型
|
||||||
|
export function updateMessageType(data) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageType',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除车辆报文类型
|
||||||
|
export function delMessageType(id) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageType/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询车辆基础信息列表
|
||||||
|
export function listCar(query) {
|
||||||
|
return request({
|
||||||
|
url: '/car/car/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询车辆基础信息详细
|
||||||
|
export function getCar(id) {
|
||||||
|
return request({
|
||||||
|
url: '/car/car/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增车辆基础信息
|
||||||
|
export function addCar(data) {
|
||||||
|
return request({
|
||||||
|
url: '/car/car',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改车辆基础信息
|
||||||
|
export function updateCar(data) {
|
||||||
|
return request({
|
||||||
|
url: '/car/car',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除车辆基础信息
|
||||||
|
export function delCar(id) {
|
||||||
|
return request({
|
||||||
|
url: '/car/car/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
export function testMessage() {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageInfo/test',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询车辆报文记录列表
|
||||||
|
export function listMessage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageInfo/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function dobListMessage(query) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageInfo/dobList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询车辆报文记录详细
|
||||||
|
export function getMessage(id) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageInfo/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增车辆报文记录
|
||||||
|
export function addMessage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageInfo',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改车辆报文记录
|
||||||
|
export function updateMessage(data) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageInfo',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除车辆报文记录
|
||||||
|
export function delMessage(id) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageInfo/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询车辆报文类型列表
|
||||||
|
export function listMessageType(query) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageType/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询车辆报文类型详细
|
||||||
|
export function getMessageType(messageCode) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageType/' + messageCode,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增车辆报文类型
|
||||||
|
export function addMessageType(data) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageType',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改车辆报文类型
|
||||||
|
export function updateMessageType(data) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageType',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除车辆报文类型
|
||||||
|
export function delMessageType(id) {
|
||||||
|
return request({
|
||||||
|
url: '/car/messageType/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
|
@ -0,0 +1,74 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||||
|
<!-- 日志存放路径 -->
|
||||||
|
<property name="log.path" value="logs/cloud-file"/>
|
||||||
|
<!-- 日志输出格式 -->
|
||||||
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
|
||||||
|
<!-- 控制台输出 -->
|
||||||
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 系统日志输出 -->
|
||||||
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/info.log</file>
|
||||||
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>60</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>INFO</level>
|
||||||
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/error.log</file>
|
||||||
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>60</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>ERROR</level>
|
||||||
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 系统模块日志级别控制 -->
|
||||||
|
<logger name="com.muyu" level="info"/>
|
||||||
|
<!-- Spring日志级别控制 -->
|
||||||
|
<logger name="org.springframework" level="warn"/>
|
||||||
|
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="console"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
<!--系统操作日志-->
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="file_info"/>
|
||||||
|
<appender-ref ref="file_error"/>
|
||||||
|
</root>
|
||||||
|
</configuration>
|
|
@ -0,0 +1,88 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||||
|
<!-- 日志存放路径 -->
|
||||||
|
<property name="log.path" value="logs/cloud-file"/>
|
||||||
|
<!-- 日志输出格式 -->
|
||||||
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
<property name="log.sky.pattern" value="%d{HH:mm:ss.SSS} %yellow([%tid]) [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
|
||||||
|
<!-- 控制台输出 -->
|
||||||
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 系统日志输出 -->
|
||||||
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/info.log</file>
|
||||||
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>60</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>INFO</level>
|
||||||
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/error.log</file>
|
||||||
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>60</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>ERROR</level>
|
||||||
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 使用gRpc将日志发送到skywalking服务端 -->
|
||||||
|
<appender name="GRPC_LOG" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
|
||||||
|
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||||
|
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
||||||
|
<Pattern>${log.sky.pattern}</Pattern>
|
||||||
|
</layout>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="GRPC_LOG"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
<!-- 系统模块日志级别控制 -->
|
||||||
|
<logger name="com.muyu" level="info"/>
|
||||||
|
<!-- Spring日志级别控制 -->
|
||||||
|
<logger name="org.springframework" level="warn"/>
|
||||||
|
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="console"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
<!--系统操作日志-->
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="file_info"/>
|
||||||
|
<appender-ref ref="file_error"/>
|
||||||
|
</root>
|
||||||
|
</configuration>
|
|
@ -0,0 +1,88 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||||
|
<!-- 日志存放路径 -->
|
||||||
|
<property name="log.path" value="logs/cloud-file"/>
|
||||||
|
<!-- 日志输出格式 -->
|
||||||
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
<property name="log.sky.pattern" value="%d{HH:mm:ss.SSS} %yellow([%tid]) [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||||
|
|
||||||
|
<!-- 控制台输出 -->
|
||||||
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 系统日志输出 -->
|
||||||
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/info.log</file>
|
||||||
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>60</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>INFO</level>
|
||||||
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/error.log</file>
|
||||||
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>60</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>ERROR</level>
|
||||||
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 使用gRpc将日志发送到skywalking服务端 -->
|
||||||
|
<appender name="GRPC_LOG" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
|
||||||
|
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||||
|
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
||||||
|
<Pattern>${log.sky.pattern}</Pattern>
|
||||||
|
</layout>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="GRPC_LOG"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
<!-- 系统模块日志级别控制 -->
|
||||||
|
<logger name="com.muyu" level="info"/>
|
||||||
|
<!-- Spring日志级别控制 -->
|
||||||
|
<logger name="org.springframework" level="warn"/>
|
||||||
|
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="console"/>
|
||||||
|
</root>
|
||||||
|
|
||||||
|
<!--系统操作日志-->
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="file_info"/>
|
||||||
|
<appender-ref ref="file_error"/>
|
||||||
|
</root>
|
||||||
|
</configuration>
|
|
@ -0,0 +1,357 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['car:car:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['car:car:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['car:car:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['car:car:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="carList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="自增主键" align="center" prop="id" />
|
||||||
|
<el-table-column label="车辆VIN码" align="center" prop="carVin" />
|
||||||
|
<el-table-column label="车辆车牌号" align="center" prop="carPlate" />
|
||||||
|
<el-table-column label="车辆品牌" align="center" prop="carBrand" />
|
||||||
|
<el-table-column label="车辆型号" align="center" prop="carModel" />
|
||||||
|
<el-table-column label="车辆车型(如客车,卡车,公交车等)" align="center" prop="carType" />
|
||||||
|
<el-table-column label="最后一次连线时间" align="center" prop="carLastJoinTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.carLastJoinTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="最后一次离线时间" align="center" prop="carLastOfflineTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.carLastOfflineTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中" align="center" prop="state" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['car:car:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['car:car:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-set-up"
|
||||||
|
@click="handleList(scope.row)"
|
||||||
|
v-hasPermi="['car:car:remove']"
|
||||||
|
>查看报文</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-dialog title="车辆报表" :visible.sync="dialogTableVisible">
|
||||||
|
<el-table v-loading="loading" :data="messageList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="车辆报文类型编码" align="center" prop="messageTypeCode" />
|
||||||
|
<el-table-column label="报文字段" align="center" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>
|
||||||
|
{{test.at(scope.$index)}}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 添加或修改车辆基础信息对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="车辆VIN码" prop="carVin">
|
||||||
|
<el-input v-model="form.carVin" placeholder="请输入车辆VIN码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车辆车牌号" prop="carPlate">
|
||||||
|
<el-input v-model="form.carPlate" placeholder="请输入车辆车牌号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车辆品牌" prop="carBrand">
|
||||||
|
<el-input v-model="form.carBrand" placeholder="请输入车辆品牌" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车辆型号" prop="carModel">
|
||||||
|
<el-input v-model="form.carModel" placeholder="请输入车辆型号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车辆车型" prop="carModel">
|
||||||
|
<el-input v-model="form.carType" placeholder="请输入车辆型号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中" prop="state">
|
||||||
|
<el-input v-model="form.state" placeholder="请输入启用状态(1.在线 2.离线 3.已断开 4.待连接 5.维修中" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</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-button @click="gotoMessage">添加报文</el-button>
|
||||||
|
<iframe :src="src" width="100%" height="1000px" frameborder="0"></iframe>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listCar, getCar, delCar, addCar, updateCar } from "/src/api/car/car";
|
||||||
|
import {listMessage, testMessage} from "@/api/car/message/message";
|
||||||
|
import {getMessageType, listMessageType} from "@/api/car/message/messageType";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Car",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
src:'/firm/map',
|
||||||
|
test:[],
|
||||||
|
messageList: [],
|
||||||
|
dialogTableVisible:false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 车辆基础信息表格数据
|
||||||
|
carList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
carVin: null,
|
||||||
|
carPlate: null,
|
||||||
|
carBrand: null,
|
||||||
|
carModel: null,
|
||||||
|
carType: null,
|
||||||
|
carLastJoinTime: null,
|
||||||
|
carLastOfflineTime: null,
|
||||||
|
state: null,
|
||||||
|
},
|
||||||
|
messageParams: {
|
||||||
|
modelCode: null,
|
||||||
|
},
|
||||||
|
messageTypeArrly: [],
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
carVin: [
|
||||||
|
{ required: true, message: "车辆VIN码不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
carPlate: [
|
||||||
|
{ required: true, message: "车辆车牌号不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.messageTest();
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$store.dispatch('app/toggleSideBarHide',true);
|
||||||
|
document.querySelector('.navbar').style.display = 'none';
|
||||||
|
document.querySelector('.tags-view-container').style.display = 'none';
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
gotoMessage(){
|
||||||
|
this.$router.push({ path: '/firm/car/message' });
|
||||||
|
},
|
||||||
|
getMessageTypeList() {
|
||||||
|
getMessageType(this.messageList.messageTypeCode).then(response => {
|
||||||
|
this.messageTypeArrly = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
messageTest(){
|
||||||
|
testMessage().then(res=>{
|
||||||
|
this.test = res.data;
|
||||||
|
console.log(this.test)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleList(row){
|
||||||
|
this.dialogTableVisible = true;
|
||||||
|
this.getMessageList(row)
|
||||||
|
},
|
||||||
|
getMessageList(row) {
|
||||||
|
this.loading = true;
|
||||||
|
this.messageParams.modelCode = row.carModel;
|
||||||
|
listMessage(this.messageParams).then(response => {
|
||||||
|
this.messageList = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
this.getMessageTypeList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询车辆基础信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listCar(this.queryParams).then(response => {
|
||||||
|
this.carList = response.data.rows;
|
||||||
|
this.total = response.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
carVin: null,
|
||||||
|
carPlate: null,
|
||||||
|
carBrand: null,
|
||||||
|
carModel: null,
|
||||||
|
carType: null,
|
||||||
|
carLastJoinTime: null,
|
||||||
|
carLastOfflineTime: null,
|
||||||
|
state: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
remark: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加车辆基础信息";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getCar(id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改车辆基础信息";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateCar(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addCar(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除车辆基础信息编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delCar(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('car/car/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `car_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -0,0 +1,95 @@
|
||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<div id="map" style="width: 100%; height: 500px;"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import { getDataByRedis } from "@/api/car/ListManager";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
map: null,
|
||||||
|
polyline: null,
|
||||||
|
carMarker: null,
|
||||||
|
carVin: this.$route.query.carVin || null ,
|
||||||
|
intervalId: null,
|
||||||
|
data: {}, // 数据存储变量
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// 创建定时器,每隔一定时间间隔调用fetchData方法
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async fetchData() {
|
||||||
|
try {
|
||||||
|
const res = await getDataByRedis(this.carVin);
|
||||||
|
this.data = res.data;
|
||||||
|
|
||||||
|
// 更新车辆位置
|
||||||
|
this.updateCarMarker();
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error fetching vehicle data:", error);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initMap() {
|
||||||
|
this.map = new AMap.Map('map', {
|
||||||
|
center: [116.397428, 39.90923], // 初始化地图中心点
|
||||||
|
zoom: 20, // 地图缩放级别
|
||||||
|
});
|
||||||
|
this.polyline = new AMap.Polyline({
|
||||||
|
map: this.map,
|
||||||
|
path: [], // 初始为空
|
||||||
|
strokeColor: '#3366FF',
|
||||||
|
strokeWeight: 5,
|
||||||
|
});
|
||||||
|
|
||||||
|
// 初始化车辆模型标记
|
||||||
|
this.carMarker = new AMap.Marker({
|
||||||
|
map: this.map,
|
||||||
|
position: [116.397428, 39.90923], // 初始位置
|
||||||
|
icon: 'https://webapi.amap.com/images/car.png',
|
||||||
|
offset: new AMap.Pixel(-26, -13),
|
||||||
|
autoRotation: true,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
updateCarMarker() {
|
||||||
|
if (this.data.longitude && this.data.latitude) {
|
||||||
|
const newPoint = [this.data.longitude, this.data.latitude];
|
||||||
|
|
||||||
|
// 更新车辆模型位置
|
||||||
|
this.carMarker.setPosition(newPoint);
|
||||||
|
|
||||||
|
// 更新路径线条坐标
|
||||||
|
const path = this.polyline.getPath();
|
||||||
|
path.push(new AMap.LngLat(this.data.longitude, this.data.latitude));
|
||||||
|
this.polyline.setPath(path);
|
||||||
|
|
||||||
|
// 调整地图视野
|
||||||
|
this.map.setCenter(newPoint);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$store.dispatch('app/toggleSideBarHide',true);
|
||||||
|
document.querySelector('.navbar').style.display = 'none';
|
||||||
|
document.querySelector('.tags-view-container').style.display = 'none';
|
||||||
|
|
||||||
|
|
||||||
|
const script = document.createElement('script');
|
||||||
|
script.src = 'https://webapi.amap.com/maps?v=1.4.15&key=7df1851ffb059e1e75c31b9bcd892b6b';
|
||||||
|
script.onload = () => {
|
||||||
|
this.initMap();
|
||||||
|
};
|
||||||
|
document.head.appendChild(script);
|
||||||
|
this.initMap();
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
|
@ -0,0 +1,277 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
@click="dialogFormVisible = true"
|
||||||
|
>
|
||||||
|
添加模板
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="gotoCar">返回</el-button>
|
||||||
|
<el-tabs v-model="editableTabsValue" :tab-position="tabPosition" type="card" @tab-click="handleTabClick">
|
||||||
|
<el-tab-pane
|
||||||
|
v-for="(item, index) in editableTabs "
|
||||||
|
:key="item.modelCode"
|
||||||
|
:label="item.modelCode"
|
||||||
|
:name="item.modelCode"
|
||||||
|
>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="报文类别" prop="messageTypeCode">
|
||||||
|
<el-select v-model="form.messageType" clearable placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="车辆报文类型编码" prop="messageTypeCode">
|
||||||
|
<el-select v-model="form.messageTypeCode" clearable placeholder="请选择车辆报文类型编码">
|
||||||
|
<el-option
|
||||||
|
v-for="item in messageTypeList"
|
||||||
|
:key="item.messageCode"
|
||||||
|
:label="item.messageName"
|
||||||
|
:value="item.messageCode">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="开始位下标" prop="messageStartIndex">
|
||||||
|
<el-input v-model="form.messageStartIndex" placeholder="请输入开始位下标" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="结束位下标" prop="messageEndIndex">
|
||||||
|
<el-input v-model="form.messageEndIndex" placeholder="请输入结束位下标" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-tabs @tab-click="handleTypeTabClick" >
|
||||||
|
<el-tab-pane
|
||||||
|
v-for="(item, index) in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:name="item.value"
|
||||||
|
>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="messageList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="车辆报文类型编码" align="center" prop="messageTypeCode" />
|
||||||
|
<el-table-column label="开始位下标" align="center" prop="messageStartIndex" />
|
||||||
|
<el-table-column label="结束位下标" align="center" prop="messageEndIndex" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['message:message:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
<el-dialog title="添加模板" :visible.sync="dialogFormVisible">
|
||||||
|
<el-form :model="modelCodes">
|
||||||
|
<el-form-item label="活动名称">
|
||||||
|
<el-input v-model="modelCodes" autocomplete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="addTab">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listMessage, getMessage, delMessage, addMessage, updateMessage } from "/src/api/car/message/message.js";
|
||||||
|
import {listMessageType} from "@/api/car/message/messageType";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Message",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
value: 'identification',
|
||||||
|
label: '车辆基础'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'information',
|
||||||
|
label: '车辆数据'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'status',
|
||||||
|
label: '设备状态'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
dialogFormVisible: false,
|
||||||
|
tabPosition:'left',
|
||||||
|
editableTabsValue: '',
|
||||||
|
editableTabs: [],
|
||||||
|
tabIndex: '',
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 车辆报文记录表格数据
|
||||||
|
messageList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
modelCode: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
},
|
||||||
|
messageTypeList:[],
|
||||||
|
queryTypeParams: {
|
||||||
|
messageName: null,
|
||||||
|
messageType: null
|
||||||
|
},
|
||||||
|
modelCodes:'',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.getTypeList();
|
||||||
|
this.getListCopy();
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$store.dispatch('app/toggleSideBarHide',true);
|
||||||
|
document.querySelector('.navbar').style.display = 'none';
|
||||||
|
document.querySelector('.tags-view-container').style.display = 'none';
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
gotoCar(){
|
||||||
|
this.$router.push({ path: '/firm/car/car' });
|
||||||
|
},
|
||||||
|
addTab() {
|
||||||
|
let newTabName = ++this.tabIndex + '';
|
||||||
|
this.editableTabs.push({
|
||||||
|
modelCode: this.modelCodes,
|
||||||
|
content: 'New Tab content'
|
||||||
|
});
|
||||||
|
this.editableTabsValue = newTabName;
|
||||||
|
this.dialogFormVisible=false
|
||||||
|
},
|
||||||
|
handleTabClick(tab){
|
||||||
|
this.queryParams.modelCode = tab.name
|
||||||
|
this.form.modelCode = tab.name
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
handleTypeTabClick(tab){
|
||||||
|
console.log(tab.name)
|
||||||
|
this.queryParams.messageType = tab.name
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 查询车辆报文类型列表 */
|
||||||
|
getTypeList() {
|
||||||
|
this.loading = true;
|
||||||
|
listMessageType(this.queryTypeParams).then(response => {
|
||||||
|
this.messageTypeList = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getListCopy() {
|
||||||
|
this.loading = true;
|
||||||
|
listMessage(this.queryParams).then(response => {
|
||||||
|
this.messageList = response.data;
|
||||||
|
const uniqueSysLeixingpick = new Map();
|
||||||
|
response.data.forEach(item => {
|
||||||
|
uniqueSysLeixingpick.set(item.modelCode, item);
|
||||||
|
});
|
||||||
|
// 将 Map 的值(即去重后的对象)转换回数组
|
||||||
|
this.editableTabs = Array.from(uniqueSysLeixingpick.values()) ;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 查询车辆报文记录列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listMessage(this.queryParams).then(response => {
|
||||||
|
this.messageList = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
modelCode: null,
|
||||||
|
messageTypeCode: null,
|
||||||
|
messageStartIndex: null,
|
||||||
|
messageEndIndex: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
addMessage(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除车辆报文记录编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delMessage(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('message/message/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `message_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -0,0 +1,54 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-tabs v-model="activeTab" @tab-click="handleTypeTabClick" >
|
||||||
|
<el-tab-pane
|
||||||
|
v-for="(item, index) in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:name="item.value"
|
||||||
|
>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
<iframe :src="src" width="100%" height="1000px" frameborder="0"></iframe>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listCar, getCar, delCar, addCar, updateCar } from "/src/api/car/car";
|
||||||
|
import {listMessage, testMessage} from "@/api/car/message/message";
|
||||||
|
import {getMessageType, listMessageType} from "@/api/car/message/messageType";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Reveal",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
src:'',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
value: '/firm/car/car',
|
||||||
|
label: '车辆数据'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '/car/log',
|
||||||
|
label: '故障日志'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '/car/breakdown',
|
||||||
|
label: '车辆故障'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
activeTab: '/firm/car/car'
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleTypeTabClick(tab){
|
||||||
|
console.log(tab.name)
|
||||||
|
this.src = tab.name
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in New Issue