fase()指标预警,滑窗结果
parent
d72c65b2a0
commit
ddcda5494c
|
@ -42,6 +42,14 @@ export function deleteDataFormatById(vin) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 指标预警
|
||||||
|
export function listWarningInfoById(vin) {
|
||||||
|
return request({
|
||||||
|
url: '/rule/forewarn/listWarningInfoById/' + vin,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,6 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="车牌号" align="center" prop="registrationNumber" />
|
<el-table-column label="车牌号" align="center" prop="registrationNumber" />
|
||||||
<el-table-column label="所有者" align="center" prop="ownerId" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -152,13 +151,14 @@
|
||||||
<el-table-column label="查看服务">
|
<el-table-column label="查看服务">
|
||||||
<span slot-scope="scope">
|
<span slot-scope="scope">
|
||||||
<el-button type="text" @click="fence(scope.row.carId)">查看围栏</el-button>
|
<el-button type="text" @click="fence(scope.row.carId)">查看围栏</el-button>
|
||||||
<el-button type="text" @click="breakdown(scope.row.vin)">查看故障报警</el-button>
|
<el-button type="text" @click="breakdown(scope.row.vin)">故障报警</el-button>
|
||||||
|
<el-button type="text" @click="warning(scope.row.vin)">指标预警</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="查看车辆检测规则">
|
<el-table-column label="查看车辆检测规则">
|
||||||
<span slot-scope="scope">
|
<span slot-scope="scope">
|
||||||
<el-button type="text" @click="windows(scope.row.vin)">查看滑窗规则</el-button>
|
<el-button type="text" @click="windows(scope.row.vin)">滑窗规则</el-button>
|
||||||
<el-button type="text" @click="readFormat(scope.row.vin)">查看车辆报文</el-button>
|
<el-button type="text" @click="readFormat(scope.row.vin)">车辆报文</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="查看实时坐标">
|
<el-table-column label="查看实时坐标">
|
||||||
|
@ -284,19 +284,22 @@ export default {
|
||||||
bulk() {
|
bulk() {
|
||||||
alert("信息已发送,等待处理")
|
alert("信息已发送,等待处理")
|
||||||
},
|
},
|
||||||
fence(carId) {
|
fence(carId) {// 查看围栏
|
||||||
this.$router.push({path: '/client/sever/fence',query:{carId:carId}})
|
this.$router.push({path: '/client/sever/fence',query:{carId:carId}})
|
||||||
},
|
},
|
||||||
breakdown(vin) {
|
breakdown(vin) {// 查看故障报警
|
||||||
this.$router.push({path: '/client/sever/breakdown',query:{vin:vin}})
|
this.$router.push({path: '/client/sever/breakdown',query:{vin:vin}})
|
||||||
},
|
},
|
||||||
realTime(vin) {
|
warning(vin) {// 查看指标预警
|
||||||
|
this.$router.push({path: '/client/sever/forewarning',query:{vin:vin}})
|
||||||
|
},
|
||||||
|
realTime(vin) {// 查看实时坐标
|
||||||
this.$router.push({path: '/client/sever/random',query:{vin:vin}})
|
this.$router.push({path: '/client/sever/random',query:{vin:vin}})
|
||||||
},
|
},
|
||||||
readFormat(vin) {
|
readFormat(vin) {// 查看车辆报文
|
||||||
this.$router.push({path: '/client/sever/message',query:{vin:vin}})
|
this.$router.push({path: '/client/sever/message',query:{vin:vin}})
|
||||||
},
|
},
|
||||||
windows(vin) {
|
windows(vin) {// 查看滑窗规则
|
||||||
this.$router.push({path: '/client/sever/window',query:{vin:vin}})
|
this.$router.push({path: '/client/sever/window',query:{vin:vin}})
|
||||||
},
|
},
|
||||||
/** 查询车辆信息列表 */
|
/** 查询车辆信息列表 */
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-table :data="warningInfo">
|
||||||
|
<el-table-column prop="vin" label="车辆编码"></el-table-column>
|
||||||
|
<el-table-column prop="field" label="预警编码"></el-table-column>
|
||||||
|
<el-table-column prop="abnormalType" label="异常状态"></el-table-column>
|
||||||
|
<el-table-column prop="time" label="预警时间"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listWarningInfoById } from "@/api/goods/forewarn";
|
||||||
|
// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||||
|
// 例如:import 《组件名称》 from '《组件路径》,
|
||||||
|
export default {
|
||||||
|
// import引入的组件需要注入到对象中才能使用"
|
||||||
|
components: {},
|
||||||
|
props: {},
|
||||||
|
data() {
|
||||||
|
// 这里存放数据"
|
||||||
|
return {
|
||||||
|
vin: this.$route.query.vin,
|
||||||
|
warningInfo: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 计算属性 类似于data概念",
|
||||||
|
computed: {},
|
||||||
|
// 监控data中的数据变化",
|
||||||
|
watch: {},
|
||||||
|
// 方法集合",
|
||||||
|
methods: {
|
||||||
|
getInfo() {
|
||||||
|
listWarningInfoById(this.vin).then(res => {
|
||||||
|
this.warningInfo = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 生命周期 - 创建完成(可以访问当前this实例)",
|
||||||
|
created() {
|
||||||
|
this.getInfo()
|
||||||
|
},
|
||||||
|
// 生命周期 - 挂载完成(可以访问DOM元素)",
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
beforeCreate() {
|
||||||
|
}, // 生命周期 - 创建之前",
|
||||||
|
beforeMount() {
|
||||||
|
}, // 生命周期 - 挂载之前",
|
||||||
|
beforeUpdate() {
|
||||||
|
}, // 生命周期 - 更新之前",
|
||||||
|
updated() {
|
||||||
|
}, // 生命周期 - 更新之后",
|
||||||
|
beforeDestroy() {
|
||||||
|
}, // 生命周期 - 销毁之前",
|
||||||
|
destroyed() {
|
||||||
|
}, // 生命周期 - 销毁完成",
|
||||||
|
activated() {
|
||||||
|
} // 如果页面有keep-alive缓存功能,这个函数会触发",
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -66,7 +66,7 @@ export default {
|
||||||
// 基本信息
|
// 基本信息
|
||||||
basic: [
|
basic: [
|
||||||
{dataCode:"vin",label:"车辆标识",start:1,end:17},
|
{dataCode:"vin",label:"车辆标识",start:1,end:17},
|
||||||
{dataCode:"time",label:"时间",start:18,end:27},
|
{dataCode:"time",label:"时间",start:18,end:30},
|
||||||
{dataCode:"longitude",label:"经度",start:31,end:40},
|
{dataCode:"longitude",label:"经度",start:31,end:40},
|
||||||
{dataCode:"latitude",label:"纬度",start:41,end:50},
|
{dataCode:"latitude",label:"纬度",start:41,end:50},
|
||||||
{dataCode:"speed",label:"车速",start:52,end:57},
|
{dataCode:"speed",label:"车速",start:52,end:57},
|
||||||
|
@ -75,7 +75,7 @@ export default {
|
||||||
],
|
],
|
||||||
// 标准信息
|
// 标准信息
|
||||||
standard: [
|
standard: [
|
||||||
{dataCode:"totalVoltage",label:"总电压",start:69,end:75},
|
{dataCode:"totalVoltage",label:"总电压",start:69,end:74},
|
||||||
{dataCode:"totalCurrent",label:"总电流",start:75,end:79},
|
{dataCode:"totalCurrent",label:"总电流",start:75,end:79},
|
||||||
{dataCode:"insulationResistance",label:"绝缘电阻",start:80,end:87},
|
{dataCode:"insulationResistance",label:"绝缘电阻",start:80,end:87},
|
||||||
{dataCode:"acceleratorPedal",label:"加速踏板行程值",start:90,end:91},
|
{dataCode:"acceleratorPedal",label:"加速踏板行程值",start:90,end:91},
|
||||||
|
@ -149,7 +149,14 @@ export default {
|
||||||
},
|
},
|
||||||
//添加内容
|
//添加内容
|
||||||
dian() {
|
dian() {
|
||||||
indexDataFormat(this.selectedOptions,this.vin)
|
indexDataFormat(this.selectedOptions,this.vin).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.data != 0){
|
||||||
|
this.$modal.msgSuccess("新增成功")
|
||||||
|
}else{
|
||||||
|
this.$modal.msgSuccess("新增失败")
|
||||||
|
}
|
||||||
|
})
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
},
|
},
|
||||||
getInfo() {
|
getInfo() {
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
<el-table-column prop="vin" label="车辆标识"></el-table-column>
|
<el-table-column prop="vin" label="车辆标识"></el-table-column>
|
||||||
<el-table-column prop="dataCode" label="数据编码"></el-table-column>
|
<el-table-column prop="dataCode" label="数据编码"></el-table-column>
|
||||||
<el-table-column prop="label" label="标签"></el-table-column>
|
<el-table-column prop="label" label="标签"></el-table-column>
|
||||||
|
<el-table-column prop="floating" label="浮动数据"></el-table-column>
|
||||||
<el-table-column prop="standardData" label="标准数据"></el-table-column>
|
<el-table-column prop="standardData" label="标准数据"></el-table-column>
|
||||||
<el-table-column prop="radiusName" label="滑窗范围"></el-table-column>
|
<el-table-column prop="radiusName" label="滑窗范围"></el-table-column>
|
||||||
<el-table-column prop="lengthName" label="滑动长度"></el-table-column>
|
<el-table-column prop="lengthName" label="滑动长度"></el-table-column>
|
||||||
|
@ -40,6 +41,9 @@
|
||||||
<el-option v-for="item in length" :key="item.lengthId" :label="item.lengthName" :value="item.lengthId"/>
|
<el-option v-for="item in length" :key="item.lengthId" :label="item.lengthName" :value="item.lengthId"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="浮动数据" prop="floating">
|
||||||
|
<el-input v-model="form.floating " placeholder="请输入浮动数据" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="标准数据" prop="standardData">
|
<el-form-item label="标准数据" prop="standardData">
|
||||||
<el-input v-model="form.standardData " placeholder="请输入标准数据" />
|
<el-input v-model="form.standardData " placeholder="请输入标准数据" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -132,8 +136,16 @@ export default {
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteDate(id) {
|
deleteDate(id) {
|
||||||
deleteDataSpecification(id)
|
deleteDataSpecification(id).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.data>0) {
|
||||||
|
this.$message.success("成功")
|
||||||
this.getList()
|
this.getList()
|
||||||
|
} else {
|
||||||
|
this.$message.error("失败")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
|
|
Loading…
Reference in New Issue