|
|
@ -1,49 +1,88 @@ |
|
|
|
<template> |
|
|
|
<div class='board_record'> |
|
|
|
<div class="board_record"> |
|
|
|
<!-- 搜索栏 --> |
|
|
|
<div class="filter"> |
|
|
|
<div> |
|
|
|
<ButtonGradient @click="onRefreshForm" class="refresh-btn"> |
|
|
|
<template #prefix> |
|
|
|
<img src="@screen/images/refresh.svg" /> |
|
|
|
</template> |
|
|
|
刷新 |
|
|
|
</ButtonGradient> |
|
|
|
<template #prefix> |
|
|
|
<img src="@screen/images/refresh.svg" /> |
|
|
|
</template> |
|
|
|
刷新 |
|
|
|
</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" /> |
|
|
|
<ElTableColumn label="设备归属类型" prop="facilitiesTypeName" /> |
|
|
|
<ElTableColumn label="桩号" prop="stakeMark" /> |
|
|
|
<ElTableColumn label="方向" prop="directionName" /> |
|
|
|
<ElTableColumn label="安装位置" prop="installationSite" /> |
|
|
|
<ElTableColumn label="设备归属类型" prop="facilitiesTypeName" /> |
|
|
|
<ElTableColumn label="桩号" prop="stakeMark" /> |
|
|
|
<ElTableColumn label="时间" prop="warningTime" /> |
|
|
|
|
|
|
|
<ElTableColumn label="状态" width="150" prop="stateName" /> |
|
|
|
|
|
|
|
<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> |
|
|
|
</template> |
|
|
|
<ElTableColumn label="状态" width="150" prop="stateName" /> |
|
|
|
|
|
|
|
<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="diagnosis(scope.row)" |
|
|
|
>诊断</ElButton |
|
|
|
> |
|
|
|
</template> |
|
|
|
</ElTableColumn> |
|
|
|
</Table> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 分页 --> |
|
|
|
<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() { |
|
|
@ -120,6 +161,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){ |
|
|
|
const self = this; |
|
|
@ -141,8 +215,9 @@ export default { |
|
|
|
}) |
|
|
|
}).catch(function() {}); |
|
|
|
}, |
|
|
|
|
|
|
|
// |
|
|
|
|
|
|
|
|
|
|
|
initData() { |
|
|
|
request({ |
|
|
|
url: `/deviceOfflineRecord/list`, |
|
|
@ -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; |
|
|
|