Browse Source

设备诊断

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

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

@ -1,5 +1,5 @@
<template>
<div class='board_record'>
<div class="board_record">
<!-- 搜索栏 -->
<div class="filter">
<div>
@ -11,17 +11,31 @@
</ButtonGradient>
</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 class="body">
<Table :data="tableData" height="75vh" >
<el-table-column label="序号" type="index" :index="indexMethod" width="100" align="center"
header-align="center" />
<ElTableColumn label="设备名称" show-overflow-tooltip prop="deviceName" header-align="center" />
<Table :data="tableData" height="75vh">
<el-table-column
label="序号"
type="index"
: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="directionName" />
<ElTableColumn label="安装位置" prop="installationSite" />
@ -31,9 +45,27 @@
<ElTableColumn label="状态" width="150" prop="stateName" />
<ElTableColumn label="操作" width="130" align="center" v-hasPermi="['maintain:abnormal:updateStatus']">
<ElTableColumn
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="showDisposal(scope.row)"
>处理</ElButton
>
<ElButton
type="text"
v-if="scope.row.status === '0'"
style="color: #00d1ff"
@click="diagnosis(scope.row)"
>诊断</ElButton
>
</template>
</ElTableColumn>
</Table>
@ -41,9 +73,16 @@
<!-- 分页 -->
<div class="footer">
<Pagination @current-change="initData" @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
@current-change="initData"
@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>
</div>
</div>
@ -64,6 +103,7 @@ import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig";
import {deviceTypeOptions} from '@screen/utils/enum.js';
import DialogWarning from '@screen/components/HeaderMenu/dialogWarn/DialogWarning.vue'
import { re } from 'mathjs';
export default {
name: 'boardRecord',
@ -91,6 +131,7 @@ export default {
pageNum: 1
},
dialogWarningVisible: false,
deviceTypeCount:"",
}
},
created() {
@ -119,6 +160,39 @@ export default {
},
indexMethod(index) {
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){
@ -141,6 +215,7 @@ export default {
})
}).catch(function() {});
},
//
initData() {
@ -184,7 +259,7 @@ export default {
<style lang='scss' scoped>
.board_record {
padding: 0 14px 14px;
width:100%;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
@ -195,7 +270,7 @@ export default {
justify-content: space-between;
align-items: center;
>div {
> div {
display: flex;
gap: 6px;
}
@ -215,12 +290,13 @@ export default {
justify-content: center;
}
.board_shower{
.board_shower {
margin: 4px;
}
::v-deep .el-carousel__indicators--horizontal{
line-height: 0; height: 16px;
.el-carousel__indicator--horizontal{
::v-deep .el-carousel__indicators--horizontal {
line-height: 0;
height: 16px;
.el-carousel__indicator--horizontal {
padding: 7px 4px;
}
}
@ -228,7 +304,7 @@ export default {
padding: 0 10px !important;
}
}
.upload-file{
.upload-file {
width: 100%;
margin: 20px 0px;
background-color: #104c66 !important;

Loading…
Cancel
Save