feat:故障记录展示

master
袁子龙 2024-09-22 22:43:04 +08:00
parent ffb8a83d8d
commit 1c9eae8d54
2 changed files with 23 additions and 15 deletions

View File

@ -1,24 +1,24 @@
import request from '@/utils/request' import request from '@/utils/request'
//查询 //查询
export function listMessage(){ export function listLog(){
return request({ return request({
url:'/breakdown/message/list', url:'/breakdown/log/list',
method:'get', method:'get',
}) })
} }
export function listStatusOne(){ export function listIsReadAlready(){
return request({ return request({
url:'/breakdown/message/listStatusOne', url:'/breakdown/log/listIsReadAlready',
method:'get', method:'get',
}) })
} }
export function listStatusTwo(){ export function listIsReadNoAlready(){
return request({ return request({
url:'/breakdown/message/listStatusTwo', url:'/breakdown/log/listIsReadNoAlready',
method:'get', method:'get',
}) })
} }

View File

@ -53,20 +53,27 @@
<el-tab-pane label="全部" name="first"> <el-tab-pane label="全部" name="first">
<el-button type="primary" @click="handleRefresh"></el-button> <el-button type="primary" @click="handleRefresh"></el-button>
<el-table v-loading="loading" :data="messageList" > <el-table v-loading="loading" :data="messageList" >
<el-table-column label="内容" align="center" prop="content" /> <el-table-column label="故障编号" align="center" prop="sysCarFaultId" />
<el-table-column label="时间" align="center" prop="createTime" /> <el-table-column label="VIN码" align="center" prop="vin" />
<el-table-column label="开始时间" align="center" prop="createTime" />
<el-table-column label="结束时间" align="center" prop="updateTime" />
<el-table-column label="状态" align="center" prop="isRead" />
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="已读" name="second"> <el-tab-pane label="已读" name="second">
<el-table v-loading="loading" :data="messageListOne" > <el-table v-loading="loading" :data="messageListOne" >
<el-table-column label="内容" align="center" prop="content" /> <el-table-column label="故障编号" align="center" prop="sysCarFaultId" />
<el-table-column label="时间" align="center" prop="createTime" /> <el-table-column label="VIN码" align="center" prop="vin"/>
<el-table-column label="开始时间" align="center" prop="createTime" />
<el-table-column label="结束时间" align="center" prop="updateTime" />
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="未读" name="third"> <el-tab-pane label="未读" name="third">
<el-table v-loading="loading" :data="messageListTwo" > <el-table v-loading="loading" :data="messageListTwo" >
<el-table-column label="内容" align="center" prop="content" /> <el-table-column label="故障编号" align="center" prop="sysCarFaultId" />
<el-table-column label="时间" align="center" prop="createTime" /> <el-table-column label="VIN码" align="center" prop="vin"/>
<el-table-column label="开始时间" align="center" prop="createTime" />
<el-table-column label="结束时间" align="center" prop="updateTime" />
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -247,6 +254,7 @@
<script> <script>
import { listBreakdown, getBreakdown, delBreakdown, addBreakdown, updateBreakdown,enableWarningsById,disableWarningsById } from "/src/api/breakdown/breakdown"; import { listBreakdown, getBreakdown, delBreakdown, addBreakdown, updateBreakdown,enableWarningsById,disableWarningsById } from "/src/api/breakdown/breakdown";
import { listMessage,listStatusOne,listStatusTwo } from '@/api/breakdown/message' import { listMessage,listStatusOne,listStatusTwo } from '@/api/breakdown/message'
import {listLog,listIsReadAlready,listIsReadNoAlready} from '@/api/breakdown/Log'
export default { export default {
name: "Breakdown", name: "Breakdown",
@ -438,13 +446,13 @@ export default {
// //
getMessageList() { getMessageList() {
listMessage().then(response => { listLog().then(response => {
this.messageList = response.data.rows; this.messageList = response.data.rows;
}); });
listStatusOne().then(response=>{ listIsReadAlready().then(response=>{
this.messageListOne=response.data.rows this.messageListOne=response.data.rows
}); });
listStatusTwo().then(response=>{ listIsReadNoAlready().then(response=>{
this.messageListTwo=response.data.rows this.messageListTwo=response.data.rows
}); });
}, },