fase()指标预警,滑窗规则
parent
891152c5fc
commit
d72c65b2a0
|
@ -23,7 +23,7 @@ export function indexDataFormat(data,vin) {
|
|||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* 查询报文
|
||||
* @param vin
|
||||
* @returns {AxiosPromise}
|
||||
*/
|
||||
|
@ -34,6 +34,7 @@ export function selectDataFormatById(vin) {
|
|||
})
|
||||
}
|
||||
|
||||
//删除报文
|
||||
export function deleteDataFormatById(vin) {
|
||||
return request({
|
||||
url: '/rule/forewarn/deleteDataFormatById/' + vin,
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询所属滑窗
|
||||
export function selectDataSpecificationDev(vin) {
|
||||
return request({
|
||||
url: '/rule/forewarn/selectDataSpecificationDev?vin=' + vin,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
// 添加新滑动
|
||||
export function indexDataSpecification(data,vin) {
|
||||
return request({
|
||||
url: '/rule/forewarn/indexDataSpecification?vin=' + vin,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取指定值
|
||||
export function selectDataSpecificationById(id) {
|
||||
return request({
|
||||
url: '/rule/forewarn/selectDataSpecificationById/' + id,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 修改滑窗
|
||||
export function updataDataSpecification(data) {
|
||||
return request({
|
||||
url: '/rule/forewarn/updataDataSpecification',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除滑窗
|
||||
export function deleteDataSpecification(id) {
|
||||
return request({
|
||||
url: '/rule/forewarn/deleteDataSpecification?id=' + id,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取滑行长度
|
||||
export function listLength(data) {
|
||||
return request({
|
||||
url: '/rule/forewarn/listLength',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取滑窗范围
|
||||
export function listRadius(data) {
|
||||
return request({
|
||||
url: '/rule/forewarn/listRadius',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 获取相应的编码
|
||||
export function listDateType(vin) {
|
||||
return request({
|
||||
url: '/rule/forewarn/listDateType?vin=' + vin,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取相应的编码
|
||||
export function selectDateType(data) {
|
||||
return request({
|
||||
url: '/rule/forewarn/selectDateType',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -155,9 +155,14 @@
|
|||
<el-button type="text" @click="breakdown(scope.row.vin)">查看故障报警</el-button>
|
||||
</span>
|
||||
</el-table-column>
|
||||
<el-table-column label="查看车辆检测规则">
|
||||
<span slot-scope="scope">
|
||||
<el-button type="text" @click="windows(scope.row.vin)">查看滑窗规则</el-button>
|
||||
<el-button type="text" @click="readFormat(scope.row.vin)">查看车辆报文</el-button>
|
||||
</span>
|
||||
</el-table-column>
|
||||
<el-table-column label="查看实时坐标">
|
||||
<span slot-scope="scope">
|
||||
<el-button type="text" @click="readFormat(scope.row.vin)">查看车辆报文</el-button>
|
||||
<el-button type="text" @click="realTime(scope.row.vin)">查看实时坐标</el-button>
|
||||
</span>
|
||||
</el-table-column>
|
||||
|
@ -291,6 +296,9 @@ export default {
|
|||
readFormat(vin) {
|
||||
this.$router.push({path: '/client/sever/message',query:{vin:vin}})
|
||||
},
|
||||
windows(vin) {
|
||||
this.$router.push({path: '/client/sever/window',query:{vin:vin}})
|
||||
},
|
||||
/** 查询车辆信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
{{item.label}}
|
||||
</label>
|
||||
<div v-if="isSelected2(index)">
|
||||
<label>Start:<input type="number" v-model="item.start" min="1" disabled/></label>
|
||||
<label>End:<input type="number" v-model="item.end" min="1" disabled/></label>
|
||||
<label>Start:<input type="number" v-model="item.start" min="1"/></label>
|
||||
<label>End:<input type="number" v-model="item.end" min="1"/></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -35,8 +35,8 @@
|
|||
{{item.label}}
|
||||
</label>
|
||||
<div v-if="isSelected3(index)">
|
||||
<label>Start:<input type="number" v-model="item.start" min="1" disabled/></label>
|
||||
<label>End:<input type="number" v-model="item.end" min="1" disabled/></label>
|
||||
<label>Start:<input type="number" v-model="item.start" min="1"/></label>
|
||||
<label>End:<input type="number" v-model="item.end" min="1"/></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -75,46 +75,49 @@ export default {
|
|||
],
|
||||
// 标准信息
|
||||
standard: [
|
||||
{dataCode:"acceleratorPedal",label:"加速踏板行程值",start:58,end:68},
|
||||
{dataCode:"brakePedal",label:"制动踏板行程值",start:58,end:68},
|
||||
{dataCode:"fuelConsumptionRate",label:"燃料消耗率",start:58,end:68},
|
||||
{dataCode:"MotorControllerTemperature",label:"电机控制器温度",start:58,end:68},
|
||||
{dataCode:"motorSpeed",label:"电机转速",start:58,end:68},
|
||||
{dataCode:"motorTorque",label:"电机转矩",start:58,end:68},
|
||||
{dataCode:"motorTemperature",label:"电机温度",start:58,end:68},
|
||||
{dataCode:"motorVoltage",label:"电机电压",start:58,end:68},
|
||||
{dataCode:"motorCurrent",label:"电机电流",start:58,end:68},
|
||||
{dataCode:"remainingPower",label:"动力电池剩余电量SOC",start:58,end:68},
|
||||
{dataCode:"maximumFeedbackPower",label:"当前状态允许的最大反馈功率",start:58,end:68},
|
||||
{dataCode:"maximumDischargePower",label:"当前状态允许最大放电功率",start:58,end:68},
|
||||
{dataCode:"selfTestCounter",label:"BMS自检计数器",start:58,end:68},
|
||||
{dataCode:"batteryChargeOrDischargeCurrent",label:"动力电池充放电电流",start:58,end:68},
|
||||
{dataCode:"totalVoltageV3",label:"动力电池负载端总电压V3",start:58,end:68},
|
||||
{dataCode:"maximumVoltage",label:"单次最大电压",start:58,end:68},
|
||||
{dataCode:"minimumBatteryVoltage",label:"单体电池最低电压",start:58,end:68},
|
||||
{dataCode:"maximumBatteryTemperature",label:"单体电池最高温度",start:58,end:68},
|
||||
{dataCode:"minimumBatteryTemperature",label:"单体电池最低温度",start:58,end:68},
|
||||
{dataCode:"usableBatteryCapacity",label:"动力电池可用容量",start:58,end:68},
|
||||
{dataCode:"checkDigit",label:"校验位",start:58,end:68},
|
||||
{dataCode:"totalVoltage",label:"总电压",start:69,end:75},
|
||||
{dataCode:"totalCurrent",label:"总电流",start:75,end:79},
|
||||
{dataCode:"insulationResistance",label:"绝缘电阻",start:80,end:87},
|
||||
{dataCode:"acceleratorPedal",label:"加速踏板行程值",start:90,end:91},
|
||||
{dataCode:"brakePedal",label:"制动踏板行程值",start:92,end:93},
|
||||
{dataCode:"fuelConsumptionRate",label:"燃料消耗率",start:94,end:98},
|
||||
{dataCode:"MotorControllerTemperature",label:"电机控制器温度",start:99,end:104},
|
||||
{dataCode:"motorSpeed",label:"电机转速",start:104,end:109},
|
||||
{dataCode:"motorTorque",label:"电机转矩",start:110,end:113},
|
||||
{dataCode:"motorTemperature",label:"电机温度",start:114,end:119},
|
||||
{dataCode:"motorVoltage",label:"电机电压",start:120,end:124},
|
||||
{dataCode:"motorCurrent",label:"电机电流",start:125,end:132},
|
||||
{dataCode:"remainingPower",label:"动力电池剩余电量SOC",start:133,end:138},
|
||||
{dataCode:"maximumFeedbackPower",label:"当前状态允许的最大反馈功率",start:139,end:144},
|
||||
{dataCode:"maximumDischargePower",label:"当前状态允许最大放电功率",start:145,end:150},
|
||||
{dataCode:"selfTestCounter",label:"BMS自检计数器",start:151,end:152},
|
||||
{dataCode:"batteryChargeOrDischargeCurrent",label:"动力电池充放电电流",start:153,end:157},
|
||||
{dataCode:"totalVoltageV3",label:"动力电池负载端总电压V3",start:158,end:163},
|
||||
{dataCode:"maximumVoltage",label:"单次最大电压",start:164,end:167},
|
||||
{dataCode:"minimumBatteryVoltage",label:"单体电池最低电压",start:168,end:171},
|
||||
{dataCode:"maximumBatteryTemperature",label:"单体电池最高温度",start:172,end:177},
|
||||
{dataCode:"minimumBatteryTemperature",label:"单体电池最低温度",start:178,end:183},
|
||||
{dataCode:"usableBatteryCapacity",label:"动力电池可用容量",start:184,end:189},
|
||||
],
|
||||
// 故障状态
|
||||
breakdown: [
|
||||
{dataCode:"vehicleStatus",label:"车辆状态",start:1,end:17},
|
||||
{dataCode:"chargeStatus",label:"充电状态",start:1,end:17},
|
||||
{dataCode:"operationalStatus",label:"运行状态",start:1,end:17},
|
||||
{dataCode:"soc",label:"SOC",start:1,end:17},
|
||||
{dataCode:"energyStorageDeviceWorkingStatus",label:"可充电储能装置工作状态",start:1,end:17},
|
||||
{dataCode:"driveMotorStatus",label:"驱动电机状态",start:1,end:17},
|
||||
{dataCode:"positioningIsOrNotEffective",label:"定位是否有效",start:1,end:17},
|
||||
{dataCode:"eas",label:"EAS",start:1,end:17},
|
||||
{dataCode:"eps",label:"EAS",start:1,end:17},
|
||||
{dataCode:"abs",label:"ABS",start:1,end:17},
|
||||
{dataCode:"mcu",label:"mcu",start:1,end:17},
|
||||
{dataCode:"batteryHeatingStatus",label:"动力电池加热状态",start:1,end:17},
|
||||
{dataCode:"batteryCurrentStatus",label:"动力电池当前状态",start:1,end:17},
|
||||
{dataCode:"batteryInsulationStatus",label:"动力电池保温状态",start:1,end:17},
|
||||
{dataCode:"dcdc",label:"DCDC",start:1,end:17},
|
||||
{dataCode:"chg",label:"CHG",start:1,end:17}
|
||||
{dataCode:"vehicleStatus",label:"车辆状态",start:190,end:190},
|
||||
{dataCode:"chargeStatus",label:"充电状态",start:191,end:191},
|
||||
{dataCode:"operationalStatus",label:"运行状态",start:192,end:192},
|
||||
{dataCode:"soc",label:"SOC",start:193,end:193},
|
||||
{dataCode:"energyStorageDeviceWorkingStatus",label:"可充电储能装置工作状态",start:194,end:194},
|
||||
{dataCode:"driveMotorStatus",label:"驱动电机状态",start:195,end:195},
|
||||
{dataCode:"positioningIsOrNotEffective",label:"定位是否有效",start:196,end:196},
|
||||
{dataCode:"eas",label:"EAS",start:197,end:197},
|
||||
{dataCode:"ptc",label:"PTC",start:198,end:198},
|
||||
{dataCode:"eps",label:"EPS",start:198,end:198},
|
||||
{dataCode:"abs",label:"ABS",start:200,end:200},
|
||||
{dataCode:"mcu",label:"mcu",start:201,end:201},
|
||||
{dataCode:"batteryHeatingStatus",label:"动力电池加热状态",start:202,end:202},
|
||||
{dataCode:"batteryCurrentStatus",label:"动力电池当前状态",start:203,end:203},
|
||||
{dataCode:"batteryInsulationStatus",label:"动力电池保温状态",start:204,end:204},
|
||||
{dataCode:"dcdc",label:"DCDC",start:205,end:205},
|
||||
{dataCode:"chg",label:"CHG",start:206,end:206}
|
||||
],
|
||||
//接收
|
||||
selectedOptions: [
|
||||
|
@ -147,9 +150,6 @@ export default {
|
|||
//添加内容
|
||||
dian() {
|
||||
indexDataFormat(this.selectedOptions,this.vin)
|
||||
// this.selectedOptions.forEach(res => {
|
||||
// indexDataFormat(res,this.vin)
|
||||
// })
|
||||
this.getInfo()
|
||||
},
|
||||
getInfo() {
|
||||
|
|
|
@ -0,0 +1,188 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-button @click="index()">新增</el-button>
|
||||
<el-table :data="specification">
|
||||
<el-table-column prop="vin" 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="standardData" 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 label="操作">
|
||||
<span slot-scope="scope">
|
||||
<el-button @click="update(scope.row.id)">修改</el-button>
|
||||
<el-button @click="deleteDate(scope.row.id)">删除</el-button>
|
||||
</span>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :fication="fication" label-width="80px">
|
||||
<el-form-item label="指向编码">
|
||||
<span v-if="form.id != null">
|
||||
<el-select v-model="form.dateTypeId" placeholder="请选择指向" disabled>
|
||||
<el-option v-for="daty in dateType2" :key="daty.dateTypeId" :label="daty.label" :value="daty.dateTypeId"></el-option>
|
||||
</el-select>
|
||||
</span>
|
||||
<span v-else>
|
||||
<el-select v-model="form.dateTypeId" placeholder="请选择指向">
|
||||
<el-option v-for="daty in dateType" :key="daty.dateTypeId" :label="daty.label" :value="daty.dateTypeId"></el-option>
|
||||
</el-select>
|
||||
</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="滑窗范围" prop="radiusId">
|
||||
<el-select v-model="form.radiusId" placeholder="请选择滑窗范围">
|
||||
<el-option v-for="rad in radius" :key="rad.radiusId" :label="rad.radiusName" :value="rad.radiusId"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="滑行长度" prop="lengthId">
|
||||
<el-select v-model="form.lengthId" placeholder="请选择滑动长度">
|
||||
<el-option v-for="item in length" :key="item.lengthId" :label="item.lengthName" :value="item.lengthId"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="标准数据" prop="standardData">
|
||||
<el-input v-model="form.standardData " 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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { selectDataSpecificationDev, listRadius, listLength, listDateType, selectDateType, selectDataSpecificationById, indexDataSpecification, updataDataSpecification,deleteDataSpecification } from "@/api/goods/window";
|
||||
// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等),
|
||||
// 例如:import 《组件名称》 from '《组件路径》,
|
||||
export default {
|
||||
// import引入的组件需要注入到对象中才能使用"
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
// 这里存放数据"
|
||||
return {
|
||||
vin: this.$route.query.vin,
|
||||
// 列表
|
||||
specification: [],
|
||||
// 滑行长度
|
||||
length: [],
|
||||
// 滑窗范围
|
||||
radius: [],
|
||||
//指定选择添加
|
||||
dateType: [],
|
||||
//指定选择修改
|
||||
dateType2: [],
|
||||
title: '',// 弹窗标题
|
||||
open: false,//是否弹窗
|
||||
form: {},
|
||||
fication: {}
|
||||
}
|
||||
},
|
||||
// 计算属性 类似于data概念",
|
||||
computed: {},
|
||||
// 监控data中的数据变化",
|
||||
watch: {},
|
||||
// 方法集合",
|
||||
methods: {
|
||||
reset() {
|
||||
// 表单重置
|
||||
this.form = {
|
||||
vin: null,
|
||||
dataCode: null,
|
||||
label: null,
|
||||
standardData: null,
|
||||
dateTypeId: null,
|
||||
radiusId: null,
|
||||
lengthId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
// 初始化
|
||||
getList() {
|
||||
selectDataSpecificationDev(this.vin).then(res => {
|
||||
this.specification = res.data
|
||||
})
|
||||
listDateType(this.vin).then(res => {
|
||||
this.dateType = res.data
|
||||
})
|
||||
selectDateType().then(res => {
|
||||
this.dateType2 = res.data
|
||||
})
|
||||
listLength().then(res => {
|
||||
this.length = res.data
|
||||
})
|
||||
listRadius().then(res => {
|
||||
this.radius = res.data
|
||||
})
|
||||
},
|
||||
index() {
|
||||
this.reset()
|
||||
this.open = true;
|
||||
this.title = "新增滑窗规则"
|
||||
},
|
||||
update(id) {
|
||||
this.reset();
|
||||
selectDataSpecificationById(id).then(res => {
|
||||
this.form = res.data
|
||||
this.open = true;
|
||||
this.title = "报文修改信息"
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
deleteDate(id) {
|
||||
deleteDataSpecification(id)
|
||||
this.getList()
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updataDataSpecification(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功")
|
||||
this.open = false;
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
indexDataSpecification(this.form,this.vin).then(res => {
|
||||
this.$modal.msgSuccess("新增成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 生命周期 - 创建完成(可以访问当前this实例)",
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
// 生命周期 - 挂载完成(可以访问DOM元素)",
|
||||
mounted() {
|
||||
},
|
||||
beforeCreate() {
|
||||
}, // 生命周期 - 创建之前",
|
||||
beforeMount() {
|
||||
}, // 生命周期 - 挂载之前",
|
||||
beforeUpdate() {
|
||||
}, // 生命周期 - 更新之前",
|
||||
updated() {
|
||||
}, // 生命周期 - 更新之后",
|
||||
beforeDestroy() {
|
||||
}, // 生命周期 - 销毁之前",
|
||||
destroyed() {
|
||||
}, // 生命周期 - 销毁完成",
|
||||
activated() {
|
||||
} // 如果页面有keep-alive缓存功能,这个函数会触发",
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue