故障字典管理

This commit is contained in:
刘召雪
2020-12-01 09:34:00 +08:00
parent 690442d594
commit 0f55cadcb5
6 changed files with 486 additions and 0 deletions

View File

@ -0,0 +1,47 @@
import request from '@/utils/request'
// 获取电池故障编码列表
export function faultBatteryList(params) {
return request({
url: '/system/fault/battery',
method: 'get',
params
})
}
// 获取BMS故障代码列表
export function faultBmsList(params) {
return request({
url: '/system/fault/bms',
method: 'get',
params
})
}
// 获取BMS硬件故障列表
export function faultHardwareList(params) {
return request({
url: '/system/fault/hardware',
method: 'get',
params
})
}
// 获取PACK系统故障列表
export function faultPackList(params) {
return request({
url: '/system/fault/pack',
method: 'get',
params
})
}
// 获取信号量故障列表
export function faultSignalList(params) {
return request({
url: '/system/fault/signal',
method: 'get',
params
})
}

View File

@ -0,0 +1,87 @@
<template>
<section class="app-container">
<el-row>
<el-col :span="24">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="故障名称">
<el-input v-model="queryParams.faultName" placeholder="请输入故障名称" clearable size="small" style="width: 200px"
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table :data="tableData" style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center">
</el-table-column>
<el-table-column prop="faultCode" align="center" label="故障编码">
</el-table-column>
<el-table-column prop="faultName" align="center" label="故障名称">
</el-table-column>
<el-table-column prop="faultLevel" align="center" label="故障等级">
</el-table-column>
<el-table-column prop="remark" align="center" label="备注">
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
</el-col>
</el-row>
</section>
</template>
<script>
import { faultBatteryList } from "@/api/fault/faultDictionary";
export default {
name: "batteryFaultList",
data () {
return {
// 表格数据
tableData: [],
// 总条数
total: 0,
// 显示搜索条件
showSearch: true,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10
},
}
},
created () {
this.getList()
},
methods: {
// 获取电池故障编码列表
getList () {
faultBatteryList(this.queryParams).then((res) => {
// debugger
this.tableData = res.rows;
this.total = res.total;
});
},
/** 搜索按钮操作 */
handleQuery () {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery () {
this.queryParams = {};
this.resetForm("queryForm");
this.handleQuery();
},
handleSelectionChange () { }
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,87 @@
<template>
<section class="app-container">
<el-row>
<el-col :span="24">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="故障名称">
<el-input v-model="queryParams.faultName" placeholder="请输入故障名称" clearable size="small" style="width: 200px"
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table :data="tableData" style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center">
</el-table-column>
<el-table-column prop="faultCode" align="center" label="故障编码">
</el-table-column>
<el-table-column prop="faultName" align="center" label="故障名称">
</el-table-column>
<el-table-column prop="faultLevel" align="center" label="故障等级">
</el-table-column>
<el-table-column prop="remark" align="center" label="备注">
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
</el-col>
</el-row>
</section>
</template>
<script>
import { faultBmsList } from "@/api/fault/faultDictionary";
export default {
name: "bmsFaultList",
data () {
return {
// 表格数据
tableData: [],
// 总条数
total: 0,
// 显示搜索条件
showSearch: true,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10
},
}
},
created () {
this.getList()
},
methods: {
// 获取电池故障编码列表
getList () {
faultBmsList(this.queryParams).then((res) => {
// debugger
this.tableData = res.rows;
this.total = res.total;
});
},
/** 搜索按钮操作 */
handleQuery () {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery () {
this.queryParams = {};
this.resetForm("queryForm");
this.handleQuery();
},
handleSelectionChange () { }
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,87 @@
<template>
<section class="app-container">
<el-row>
<el-col :span="24">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="故障名称">
<el-input v-model="queryParams.faultName" placeholder="请输入故障名称" clearable size="small" style="width: 200px"
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table :data="tableData" style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center">
</el-table-column>
<el-table-column prop="faultCode" align="center" label="故障编码">
</el-table-column>
<el-table-column prop="faultName" align="center" label="故障名称">
</el-table-column>
<el-table-column prop="faultLevel" align="center" label="故障等级">
</el-table-column>
<el-table-column prop="remark" align="center" label="备注">
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
</el-col>
</el-row>
</section>
</template>
<script>
import { faultHardwareList } from "@/api/fault/faultDictionary";
export default {
name: "hardwareFaultList",
data () {
return {
// 表格数据
tableData: [],
// 总条数
total: 0,
// 显示搜索条件
showSearch: true,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10
},
}
},
created () {
this.getList()
},
methods: {
// 获取电池故障编码列表
getList () {
faultHardwareList(this.queryParams).then((res) => {
// debugger
this.tableData = res.rows;
this.total = res.total;
});
},
/** 搜索按钮操作 */
handleQuery () {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery () {
this.queryParams = {};
this.resetForm("queryForm");
this.handleQuery();
},
handleSelectionChange () { }
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,87 @@
<template>
<section class="app-container">
<el-row>
<el-col :span="24">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="故障名称">
<el-input v-model="queryParams.faultName" placeholder="请输入故障名称" clearable size="small" style="width: 200px"
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table :data="tableData" style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center">
</el-table-column>
<el-table-column prop="faultCode" align="center" label="故障编码">
</el-table-column>
<el-table-column prop="faultName" align="center" label="故障名称">
</el-table-column>
<el-table-column prop="faultLevel" align="center" label="故障等级">
</el-table-column>
<el-table-column prop="remark" align="center" label="备注">
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
</el-col>
</el-row>
</section>
</template>
<script>
import { faultPackList } from "@/api/fault/faultDictionary";
export default {
name: "packFaultList",
data () {
return {
// 表格数据
tableData: [],
// 总条数
total: 0,
// 显示搜索条件
showSearch: true,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10
},
}
},
created () {
this.getList()
},
methods: {
// 获取电池故障编码列表
getList () {
faultPackList(this.queryParams).then((res) => {
// debugger
this.tableData = res.rows;
this.total = res.total;
});
},
/** 搜索按钮操作 */
handleQuery () {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery () {
this.queryParams = {};
this.resetForm("queryForm");
this.handleQuery();
},
handleSelectionChange () { }
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,91 @@
<template>
<section class="app-container">
<el-row>
<el-col :span="24">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="故障名称">
<el-input v-model="queryParams.dicName" placeholder="请输入故障名称" clearable size="small" style="width: 200px"
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table :data="tableData" style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center">
</el-table-column>
<el-table-column prop="dicCode" align="center" label="故障编码">
</el-table-column>
<el-table-column prop="dicName" align="center" label="故障名称">
</el-table-column>
<el-table-column prop="dicType" align="center" label="故障类型">
</el-table-column>
<el-table-column prop="dicValue" align="center" label="故障值">
</el-table-column>
<el-table-column prop="description" align="center" label="描述">
</el-table-column>
<el-table-column prop="remark" align="center" label="备注">
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
</el-col>
</el-row>
</section>
</template>
<script>
import { faultSignalList } from "@/api/fault/faultDictionary";
export default {
name: "signalFaultList",
data () {
return {
// 表格数据
tableData: [],
// 总条数
total: 0,
// 显示搜索条件
showSearch: true,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10
},
}
},
created () {
this.getList()
},
methods: {
// 获取电池故障编码列表
getList () {
faultSignalList(this.queryParams).then((res) => {
// debugger
this.tableData = res.rows;
this.total = res.total;
});
},
/** 搜索按钮操作 */
handleQuery () {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery () {
this.queryParams = {};
this.resetForm("queryForm");
this.handleQuery();
},
handleSelectionChange () { }
}
}
</script>
<style>
</style>