Browse Source

设备诊断

develop
wangsixiang 3 weeks ago
parent
commit
7b13f55beb
  1. 146
      ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/abnormal/index.vue

146
ruoyi-ui/src/views/JiHeExpressway/pages/maintenanceOperations/smart/abnormal/index.vue

@ -1,49 +1,88 @@
<template> <template>
<div class='board_record'> <div class="board_record">
<!-- 搜索栏 --> <!-- 搜索栏 -->
<div class="filter"> <div class="filter">
<div> <div>
<ButtonGradient @click="onRefreshForm" class="refresh-btn"> <ButtonGradient @click="onRefreshForm" class="refresh-btn">
<template #prefix> <template #prefix>
<img src="@screen/images/refresh.svg" /> <img src="@screen/images/refresh.svg" />
</template> </template>
刷新 刷新
</ButtonGradient> </ButtonGradient>
</div> </div>
<InputSearch ref="searchComp" style="width: 400px" :formList="searchFormList"
:formConfigOptions="{ dFormData: { eventState: '0' } }" @handleSearch="handleSearch" />
<InputSearch
ref="searchComp"
style="width: 400px"
:formList="searchFormList"
:formConfigOptions="{ dFormData: { eventState: '0' } }"
@handleSearch="handleSearch"
/>
</div> </div>
<!-- 内容 --> <!-- 内容 -->
<div class="body"> <div class="body">
<Table :data="tableData" height="75vh">
<Table :data="tableData" height="75vh" > <el-table-column
<el-table-column label="序号" type="index" :index="indexMethod" width="100" align="center" label="序号"
header-align="center" /> type="index"
<ElTableColumn label="设备名称" show-overflow-tooltip prop="deviceName" header-align="center" /> :index="indexMethod"
width="100"
align="center"
header-align="center"
/>
<ElTableColumn
label="设备名称"
show-overflow-tooltip
prop="deviceName"
header-align="center"
/>
<ElTableColumn label="设备类型" prop="deviceTypeName" /> <ElTableColumn label="设备类型" prop="deviceTypeName" />
<ElTableColumn label="方向" prop="directionName" /> <ElTableColumn label="方向" prop="directionName" />
<ElTableColumn label="安装位置" prop="installationSite" /> <ElTableColumn label="安装位置" prop="installationSite" />
<ElTableColumn label="设备归属类型" prop="facilitiesTypeName" /> <ElTableColumn label="设备归属类型" prop="facilitiesTypeName" />
<ElTableColumn label="桩号" prop="stakeMark" /> <ElTableColumn label="桩号" prop="stakeMark" />
<ElTableColumn label="时间" prop="warningTime" /> <ElTableColumn label="时间" prop="warningTime" />
<ElTableColumn label="状态" width="150" prop="stateName" />
<ElTableColumn label="操作" width="130" align="center" v-hasPermi="['maintain:abnormal:updateStatus']"> <ElTableColumn label="状态" width="150" prop="stateName" />
<template slot-scope="scope">
<ElButton type="text" v-if="scope.row.status==='0'" style="color: #00D1FF;" @click="showDisposal(scope.row)">处理</ElButton> <ElTableColumn
</template> label="操作"
width="130"
align="center"
v-hasPermi="['maintain:abnormal:updateStatus']"
>
<template slot-scope="scope">
<ElButton
type="text"
v-if="scope.row.status === '0'"
style="color: #00d1ff"
@click="showDisposal(scope.row)"
>处理</ElButton
>
<ElButton
type="text"
v-if="scope.row.status === '0'"
style="color: #00d1ff"
@click="diagnosis(scope.row)"
>诊断</ElButton
>
</template>
</ElTableColumn> </ElTableColumn>
</Table> </Table>
</div> </div>
<!-- 分页 --> <!-- 分页 -->
<div class="footer"> <div class="footer">
<Pagination @current-change="initData" @size-change="onSizeChange" width="'100%'" <Pagination
:page-sizes="[10, 20, 30, 40, 50]" :page-size="searchData.pageSize" :current-page.sync="searchData.pageNum" @current-change="initData"
layout="total, sizes, prev, pager, next" :total="total"> @size-change="onSizeChange"
width="'100%'"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="searchData.pageSize"
:current-page.sync="searchData.pageNum"
layout="total, sizes, prev, pager, next"
:total="total"
>
</Pagination> </Pagination>
</div> </div>
</div> </div>
@ -64,6 +103,7 @@ import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig"; import Form from "@screen/components/FormConfig";
import {deviceTypeOptions} from '@screen/utils/enum.js'; import {deviceTypeOptions} from '@screen/utils/enum.js';
import DialogWarning from '@screen/components/HeaderMenu/dialogWarn/DialogWarning.vue' import DialogWarning from '@screen/components/HeaderMenu/dialogWarn/DialogWarning.vue'
import { re } from 'mathjs';
export default { export default {
name: 'boardRecord', name: 'boardRecord',
@ -91,6 +131,7 @@ export default {
pageNum: 1 pageNum: 1
}, },
dialogWarningVisible: false, dialogWarningVisible: false,
deviceTypeCount:"",
} }
}, },
created() { created() {
@ -120,6 +161,39 @@ export default {
indexMethod(index) { indexMethod(index) {
return this.searchData.pageSize*(this.searchData.pageNum-1) + index + 1; return this.searchData.pageSize*(this.searchData.pageNum-1) + index + 1;
}, },
// diagnosis(row){
// const self = this;
// request({
// url:`/business/switch/deviceDiagnostics`,
// method:"post",
// data:{
// ...row,
// }
// }).then((result)=>{
// if (result.code != 200) return Message.error(result?.msg);
// this.deviceTypeCount=result.rows.data
// }).this.$confirm(`:`+deviceTypeCount)
// },
diagnosis(row) {
const self = this;
request({
url: `/business/switch/deviceDiagnostics`,
method: "post",
data: {
...row,
}
}).then((result) => {
if (result.code != 200) {
return Message.error(result?.msg);
}
self.deviceTypeCount = result.msg;
self.$confirm(`诊断结果:` + self.deviceTypeCount,"诊断异常",{
type: "warning"
});
}).catch((error) => {
console.error("请求失败:", error);
});
},
// //
showDisposal(row){ showDisposal(row){
const self = this; const self = this;
@ -141,8 +215,9 @@ export default {
}) })
}).catch(function() {}); }).catch(function() {});
}, },
// //
initData() { initData() {
request({ request({
url: `/deviceOfflineRecord/list`, url: `/deviceOfflineRecord/list`,
@ -184,7 +259,7 @@ export default {
<style lang='scss' scoped> <style lang='scss' scoped>
.board_record { .board_record {
padding: 0 14px 14px; padding: 0 14px 14px;
width:100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -195,7 +270,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
>div { > div {
display: flex; display: flex;
gap: 6px; gap: 6px;
} }
@ -215,12 +290,13 @@ export default {
justify-content: center; justify-content: center;
} }
.board_shower{ .board_shower {
margin: 4px; margin: 4px;
} }
::v-deep .el-carousel__indicators--horizontal{ ::v-deep .el-carousel__indicators--horizontal {
line-height: 0; height: 16px; line-height: 0;
.el-carousel__indicator--horizontal{ height: 16px;
.el-carousel__indicator--horizontal {
padding: 7px 4px; padding: 7px 4px;
} }
} }
@ -228,7 +304,7 @@ export default {
padding: 0 10px !important; padding: 0 10px !important;
} }
} }
.upload-file{ .upload-file {
width: 100%; width: 100%;
margin: 20px 0px; margin: 20px 0px;
background-color: #104c66 !important; background-color: #104c66 !important;

Loading…
Cancel
Save