|
@@ -1,142 +1,239 @@
|
|
|
<template>
|
|
|
- <div class="layout-pd">
|
|
|
- <el-row>
|
|
|
- <el-col :xs="24">
|
|
|
- <el-card style="height: 86vh" class="mt8 my-fill all-con" shadow="hover">
|
|
|
- <div class="tip-con">
|
|
|
- <el-alert
|
|
|
- v-if="detailsData.list.onlineStatus==='离线'"
|
|
|
- title="加油机长时间离线"
|
|
|
- type="error"
|
|
|
- class="mb15"
|
|
|
- ></el-alert>
|
|
|
- <el-alert
|
|
|
- v-if="detailsData.list.onlineStatus==='在线'"
|
|
|
- title="加油机长时间在线"
|
|
|
- type="success"
|
|
|
- class="mb15"
|
|
|
- ></el-alert>
|
|
|
- </div>
|
|
|
- <div class="ma-con">
|
|
|
- <!-- <div class="top-con" id="top-conId" v-loading="oilListData.loading">
|
|
|
- <el-scrollbar>
|
|
|
- <div class="scrollbar-flex-content" >
|
|
|
- <div class="card" :style="{backgroundColor: item.oilEngineStatus === '在线' ? '#67C23A': '#F56C6C'}" name="card" v-for="(item,index) in oilListData.list" v-bind:key="index" >
|
|
|
- <div class="info-con">
|
|
|
- <span>{{item.oilEngineName}}
|
|
|
- <span >
|
|
|
- {{item.oilEngineStatus}}
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- <span >{{item.oilSpecifications}}</span>
|
|
|
- </div>
|
|
|
- <div class="info-con">
|
|
|
- <span>油品: {{item.oils}}</span>
|
|
|
- <span>自锁状态:
|
|
|
- <span >{{item.selfLockingState}}</span>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div class="info-con">
|
|
|
- <span>ESQS编码: {{item.ECQSCode}}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-scrollbar>
|
|
|
- </div> -->
|
|
|
- <div class="bom-con">
|
|
|
- <div class="bomCon-lef">
|
|
|
- <el-image style="top: 25%;translate: (-50%,-50%);" src="https://cma-fds.org.cn/static/img/dispenser.6960513.png"></el-image>
|
|
|
+ <div class="layout-pd" style="height: 100%;width: 100%;">
|
|
|
+ <el-row style="height: 100%;width: 100%; display: flex;">
|
|
|
+ <!-- 菜单栏 -->
|
|
|
+ <el-menu default-active="2" class="el-menu-vertical-demo" text-color="black" @open="handleOpen"
|
|
|
+ @close="handleClose" v-if="showicon">
|
|
|
+ <el-menu-item index="1">
|
|
|
+ <span>整站</span>
|
|
|
+ </el-menu-item>
|
|
|
+ <el-sub-menu index="2">
|
|
|
+ <template #title>
|
|
|
+ <span>{{ detailsData.list.name }}号机</span>
|
|
|
+ </template>
|
|
|
+ <el-menu-item-group>
|
|
|
+ <el-menu-item index="1-1" v-for="(item, index) in oilListData.list" v-bind:key="index"> {{
|
|
|
+ item.mainBoard_NozzleNo
|
|
|
+ }}</el-menu-item>
|
|
|
+ </el-menu-item-group>
|
|
|
+ </el-sub-menu>
|
|
|
+ <!-- <el-menu-item index="2">
|
|
|
+ <span>Navigator Two</span>
|
|
|
+ </el-menu-item>
|
|
|
+ <el-menu-item index="3" disabled>
|
|
|
+ <span>Navigator Three</span>
|
|
|
+ </el-menu-item>
|
|
|
+ <el-menu-item index="4">
|
|
|
+ <span>Navigator Four</span>
|
|
|
+ </el-menu-item> -->
|
|
|
+ </el-menu>
|
|
|
+
|
|
|
+ <div class="all-con" style="position: relative;">
|
|
|
+ <el-icon style="position: absolute;left: -15px;top: 17px;">
|
|
|
+ <component style="color:#fff;background-color: #3d3dff;height: 2.5em;border-radius:5px 0 0 5px;"
|
|
|
+ :is="showicon ? CaretLeft : CaretRight" @click="onShowHide" />
|
|
|
+ </el-icon>
|
|
|
+ <el-card class="oilInfo-bottom one">
|
|
|
+ <el-row :gutter="10" style="text-align: center;line-height: 2em;height: 2em">
|
|
|
+
|
|
|
+ <el-col :span="1">
|
|
|
+ <div :style="isDisplay == 1 ? 'border-bottom:1px solid blue' : 'border:none'" @click="display(1)">概览</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="2">
|
|
|
+ <div :style="isDisplay == 2 ? 'border-bottom:1px solid blue' : 'border:none'" @click="display(2)">报警</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" class="oilInfo-bottom">
|
|
|
+ <div :style="isDisplay == 3 ? 'border-bottom:1px solid blue' : 'border:none'" @click="display(3)">ECQS编码状态
|
|
|
</div>
|
|
|
- <div class="bomCon-rig">
|
|
|
- <div class="bomConR-lef">
|
|
|
- <el-card v-loading="detailsData.loading" style="margin-bottom: 10px;" :header="detailsData.list.name+'号机油机'">
|
|
|
- <div class="oilInfo-con" >
|
|
|
- <div class="oilInfo-item">出厂编号: {{detailsData.list.serialNumber}}</div>
|
|
|
- <div class="oilInfo-item">机型: {{detailsData.list.model}}</div>
|
|
|
- <div class="oilInfo-item">制造商: {{detailsData.list.manufacturer}}</div>
|
|
|
- <div class="oilInfo-item oilInfo-item-two">
|
|
|
- <span>规格参数: {{detailsData.list.modelSpec}}</span>
|
|
|
- <span>生产日期: {{detailsData.list.createdTime}}</span>
|
|
|
- </div>
|
|
|
- <div class="oilInfo-item oilInfo-item-two">
|
|
|
- <span>测量范围: {{detailsData.list.measureRang}}</span>
|
|
|
- <span>安装日期: {{detailsData.list.installationDate}}</span>
|
|
|
- </div>
|
|
|
- <div class="oilInfo-item oilInfo-item-two">
|
|
|
- <span>准确度等级: {{detailsData.list.accuracyLevel}}</span>
|
|
|
- <span>启用日期: {{detailsData.list.startupDate}}</span>
|
|
|
- </div>
|
|
|
- <div class="oilInfo-item oilInfo-item-two">
|
|
|
- <span>设备状态: {{detailsData.list.deviceStatus}}</span>
|
|
|
- <span>在线状态: {{detailsData.list.onlineStatus}}</span>
|
|
|
- </div>
|
|
|
- <div class="oilInfo-item oilInfo-item-two">
|
|
|
- <span>报警状态: {{detailsData.list.alarmLevel}}</span>
|
|
|
- <span>累计在线时间: {{detailsData.list.onlineDesc}}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- <el-card v-loading="tableData.loading" >
|
|
|
- <div style="margin-bottom: 10px;color: #505050;">
|
|
|
- <span>最新5条报警</span>
|
|
|
- <span style="float: right;"><el-link type="primary" @click="toPage()">更多报警>></el-link></span>
|
|
|
- </div>
|
|
|
- <el-table :data="tableData.list" stripe row-key="id" style="width: 100%">
|
|
|
- <el-table-column prop="createdDate" label="时间" />
|
|
|
- <el-table-column prop="name" label="加油枪" />
|
|
|
- <el-table-column prop="alarmSource" label="报警来源" />
|
|
|
- <el-table-column prop="alarmDescription" label="报警描述" />
|
|
|
- <el-table-column prop="alarmType" label="报警类型" />
|
|
|
- </el-table>
|
|
|
- </el-card>
|
|
|
- </div>
|
|
|
- <div class="bomConR-rig" style="padding-right: 0;" >
|
|
|
- <el-row :gutter="12">
|
|
|
- <el-col :span="12" v-for="(item,index) in oilListData.list" v-bind:key="index" >
|
|
|
- <el-card v-loading="oilListData.loading" style="margin-bottom: 10px;width: 100%;" @click="toParts(item.name,item.mainBoard_NozzleNo,item.onlineStatus,item.fuelName,item.alarming,item.code)">
|
|
|
- <div class="oilInfo-con" style="padding: 0;">
|
|
|
- <div class="oilInfo-item oilInfo-item-two">
|
|
|
- <span>{{item.name}}</span>
|
|
|
- <span style="float: right;">{{item.mainBoard_NozzleNo}}</span>
|
|
|
- </div>
|
|
|
- <div class="oilInfo-item oilInfo-item-two">
|
|
|
- <span>在线状态: {{item.onlineStatus}}</span>
|
|
|
- </div>
|
|
|
- <div class="oilInfo-item oilInfo-item-two">
|
|
|
- <span>油品: {{ item.fuelName }}</span>
|
|
|
- </div>
|
|
|
- <div class="oilInfo-item oilInfo-item-two">
|
|
|
- <span>自锁功能: {{ item.alarming }}</span>
|
|
|
- </div>
|
|
|
- <div class="oilInfo-item oilInfo-item-two">
|
|
|
- <span>ECQS编码: {{item.code}}</span>
|
|
|
- </div>
|
|
|
- <!-- <div class="oilInfo-item oilInfo-item-two" style="float: right;">
|
|
|
- <el-icon :size="20"><circle-plus-filled /></el-icon>
|
|
|
- </div> -->
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" class="oilInfo-bottom">
|
|
|
+ <div :style="isDisplay == 4 ? 'border-bottom:1px solid blue' : 'border:none'" @click="display(4)">维修记录
|
|
|
</div>
|
|
|
+ </el-col>
|
|
|
+ <el-row :span="15" class="oilInfo-bottom to-flex" style="position: absolute;right: 0;">
|
|
|
+ <div style="margin-right: 1em;">
|
|
|
+ 图例:
|
|
|
+ </div>
|
|
|
+ <div style="margin-right: 2em;">
|
|
|
+ <div class="status-point" style="background-color:#5b53f9;right: 18.5em;top: 0.75em;" />
|
|
|
+ 在线
|
|
|
+ </div>
|
|
|
+ <div style="margin-right: 0.75em;">
|
|
|
+ <div class="status-point" style="background-color:#9f9fa3;right: 14.5em;top: 0.75em;" />
|
|
|
+ 离线
|
|
|
+ </div>
|
|
|
+ <div style="margin-right: 0.75em;">
|
|
|
+ <img :src="uurl" style="width: 1em;margin-right: 0.25em;">
|
|
|
+ 校验成功
|
|
|
+ </div>
|
|
|
+ <div style="margin-right: 2em;">
|
|
|
+ <img :src="urrl" style="width: 1em;margin-right: 0.25em;">
|
|
|
+ 校验失败
|
|
|
+ </div>
|
|
|
+ </el-row>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ <div class="tip-con">
|
|
|
+ <el-alert v-if="detailsData.list.onlineStatus === '离线'" title="加油机长时间离线" type="error" class="mb15"></el-alert>
|
|
|
+ <el-alert v-if="detailsData.list.onlineStatus === '在线'" title="加油机长时间在线" type="success"
|
|
|
+ class="mb15"></el-alert>
|
|
|
+ </div>
|
|
|
+ <!-- 油机内容 -->
|
|
|
+ <el-text tag="b" style="color: #000">油机详情</el-text>
|
|
|
+ <el-card class="oilInfo-con oilInfo-bottom">
|
|
|
+ <el-row class='oilInfo-bottom'>
|
|
|
+ <img class="oilInfo-img" :src="url">
|
|
|
+ <div>
|
|
|
+ <el-col :span="24" class="oilInfo-bottom">
|
|
|
+ <div class="status-point oilInfo-con-first"
|
|
|
+ :style="detailsData.list.onlineStatus == '在线' ? 'background-color:#5b53f9' : 'background-color:#9f9fa3'" />
|
|
|
+ <span style="margin:0 0.5em 0 1em">{{ detailsData.list.name }}号机油机</span>
|
|
|
+ <img :src="uurl" style="width: 1em;">
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="oilInfo-bottom">
|
|
|
+ <span class='oilInfo-item'>出厂编号:</span>{{ detailsData.list.serialNumber }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="oilInfo-bottom">
|
|
|
+ <span class='oilInfo-item'>制造商:</span>{{ detailsData.list.manufacturer }}
|
|
|
+ </el-col>
|
|
|
</div>
|
|
|
+ </el-row>
|
|
|
+ <div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="6" class="oilInfo-bottom">
|
|
|
+ <span class='oilInfo-item'>机型:</span>{{ detailsData.list.model }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="oilInfo-bottom">
|
|
|
+ <span class='oilInfo-item'>规格参数:</span>{{ detailsData.list.modelSpec }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="oilInfo-bottom">
|
|
|
+ <span class='oilInfo-item'>测量范围:</span>{{ detailsData.list.measureRang }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="oilInfo-bottom">
|
|
|
+ <span class='oilInfo-item'>准确度等级:</span>{{ detailsData.list.accuracyLevel }}
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="6" class="oilInfo-bottom">
|
|
|
+ <span class='oilInfo-item'>生产日期:</span>{{ detailsData.list.createdTime }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="oilInfo-bottom">
|
|
|
+ <span class='oilInfo-item'>安装日期:</span>{{ detailsData.list.installationDate }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="oilInfo-bottom">
|
|
|
+ <span class='oilInfo-item'>启用日期:</span>{{ detailsData.list.startupDate }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" class="oilInfo-bottom">
|
|
|
+ <span class='oilInfo-item'>累计在线时间:</span>{{ detailsData.list.onlineDesc }}
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
</el-card>
|
|
|
- </el-col>
|
|
|
+ <el-row :gutter="10" class="oilInfo-bottom">
|
|
|
+ <el-col :span="0.5" class="oilInfo-bottom">
|
|
|
+ <el-text tag="b" style="color: #000">油枪列表</el-text>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="0.5" class="oilInfo-bottom">
|
|
|
+ <div class="oilLabel-con" @click="isOnline('所有')"
|
|
|
+ :style="flagData.isFlag == '所有' ? 'background-color:#4d4dff' : 'background-color:#89898b'">所有
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="0.5" class="oilInfo-bottom">
|
|
|
+ <div class="oilLabel-con" @click="isOnline('在线')"
|
|
|
+ :style="flagData.isFlag == '在线' ? 'background-color:#4d4dff' : 'background-color:#89898b'">在线</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="0.5" class="oilInfo-bottom">
|
|
|
+ <div class="oilLabel-con" @click="isOnline('离线')"
|
|
|
+ :style="flagData.isFlag == '离线' ? 'background-color:#4d4dff' : 'background-color:#89898b'">离线</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="0.5" class="oilInfo-bottom">
|
|
|
+ <div class="oilLabel-con" style="background-color: #89898b; width: 6em;">校验通过</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="0.5" class="oilInfo-bottom">
|
|
|
+ <div class="oilLabel-con" style="background-color: #89898b; width: 6em;">校验失败</div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="16" style="margin-top:10px;" :key="flagData.keyData">
|
|
|
+ <el-col :span="8" v-for="(item, index) in listcom" v-bind:key="index">
|
|
|
+ <el-card class="oilInfo-msg oilInfo-bottom"
|
|
|
+ @click="toParts(item.name, item.mainBoard_NozzleNo, item.onlineStatus, item.fuelName, item.alarming, item.code)">
|
|
|
+ <el-row class="oilInfo-bottom">
|
|
|
+ <img :src="url" class="oilInfo-img">
|
|
|
+ <div>
|
|
|
+ <el-col :span="24" class="oilInfo-bottom">
|
|
|
+ <el-text tag="b">逻辑枪号:{{ item.name }}</el-text>
|
|
|
+ <div style="position: absolute;right: 10%;top: 5%;">
|
|
|
+ <div class="status-point"
|
|
|
+ :style="item.onlineStatus == '在线' ? 'background-color:#5b53f9' : 'background-color:#9f9fa3'">
|
|
|
+ </div>
|
|
|
+ <img :src="uurl" style="width: 1em;">
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="oilInfo-bottom">
|
|
|
+ <span class="oilInfo-item-two">物理枪号:</span>{{
|
|
|
+ item.mainBoard_NozzleNo }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="oilInfo-bottom">
|
|
|
+ <span class="oilInfo-item-two">自锁功能:</span>{{ item.alarming }}
|
|
|
+ </el-col>
|
|
|
+ </div>
|
|
|
+ </el-row>
|
|
|
+ <el-row class="oilInfo-bottom">
|
|
|
+ <span class="oilInfo-item-two">油品:</span>{{ item.fuelName }}
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <span class="oilInfo-item-two">ECQS编码:</span>{{ item.code }}
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+
|
|
|
</el-row>
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import {onMounted, reactive, ref, watch} from "vue";
|
|
|
+import {
|
|
|
+ Document,
|
|
|
+ Menu as IconMenu,
|
|
|
+ Location,
|
|
|
+ Setting,
|
|
|
+ CaretRight,
|
|
|
+ CaretLeft,
|
|
|
+} from '@element-plus/icons-vue'
|
|
|
+const handleOpen = (key: string, keyPath: string[]) => {
|
|
|
+ console.log(key, keyPath)
|
|
|
+}
|
|
|
+const handleClose = (key: string, keyPath: string[]) => {
|
|
|
+ console.log(key, keyPath)
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+const url = '/src/assets/logo-com.png'
|
|
|
+const uurl = '/src/assets/map/IconParkSolidCheckOne.png'
|
|
|
+const urrl = '/src/assets/map/IconParkSolidCloseOne.png'
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+// -------------------------
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+import { onMounted, reactive, ref, watch } from "vue";
|
|
|
//import { CirclePlusFilled } from '@element-plus/icons-vue'
|
|
|
import { NozzlecontrolDtl } from "/@/api/admin/reportManagement/moreOilEngineDetails/moreOilEngineDetailsDto";
|
|
|
-import {OilEngineDetailsApi} from "/@/api/admin/reportManagement/oilEngineDetails/oilEngineDetailsApi";
|
|
|
-import { FuelDispenserEntity,AlarmHistoryDto } from "/@/api/admin/reportManagement/oilEngineDetails/oilEngineDetailsDto"
|
|
|
+import { OilEngineDetailsApi } from "/@/api/admin/reportManagement/oilEngineDetails/oilEngineDetailsApi";
|
|
|
+import { FuelDispenserEntity, AlarmHistoryDto } from "/@/api/admin/reportManagement/oilEngineDetails/oilEngineDetailsDto"
|
|
|
import router from "/@/router";
|
|
|
-import {MoreOilEngineDetailsApi} from "/@/api/admin/reportManagement/moreOilEngineDetails/moreOilEngineDetailsApi";
|
|
|
+import { MoreOilEngineDetailsApi } from "/@/api/admin/reportManagement/moreOilEngineDetails/moreOilEngineDetailsApi";
|
|
|
+import { random, range } from 'lodash';
|
|
|
|
|
|
/******************************数据对象***************************************/
|
|
|
|
|
@@ -169,8 +266,17 @@ const oilListData = reactive({
|
|
|
const initID = ref()
|
|
|
const toPage = () => {
|
|
|
const id = router.currentRoute.value.params.id
|
|
|
- router.push({path:`/statement/${id}/more/moreAlert`})
|
|
|
+ router.push({ path: `/statement/${id}/more/moreAlert` })
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 油枪列表相关数据
|
|
|
+ */
|
|
|
+let listcom = JSON.parse(JSON.stringify(oilListData.list))
|
|
|
+let flagData = reactive({
|
|
|
+ keyData: 0,
|
|
|
+ isFlag: '所有'
|
|
|
+})
|
|
|
/******************************数据对象***************************************/
|
|
|
|
|
|
/*******************************方法**************************************/
|
|
@@ -203,7 +309,7 @@ const toPage = () => {
|
|
|
// ele.classList.add("active-card")
|
|
|
// }
|
|
|
|
|
|
-watch(() => initID.value, ()=>{
|
|
|
+watch(() => initID.value, () => {
|
|
|
initTableData()
|
|
|
initDetailsData()
|
|
|
})
|
|
@@ -214,8 +320,8 @@ watch(() => initID.value, ()=>{
|
|
|
/**
|
|
|
* 格式化日期
|
|
|
*/
|
|
|
-const formatDate=(val)=>{
|
|
|
- const date=new Date(val)
|
|
|
+const formatDate = (val) => {
|
|
|
+ const date = new Date(val)
|
|
|
const year: number = date.getFullYear();
|
|
|
const month: string = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
|
const day: string = date.getDate().toString().padStart(2, '0');
|
|
@@ -229,10 +335,12 @@ const formatDate=(val)=>{
|
|
|
*/
|
|
|
const initOilListData = async () => {
|
|
|
oilListData.loading = true
|
|
|
- const fuelId=router.currentRoute.value.params.id
|
|
|
- const { data } = await new MoreOilEngineDetailsApi().getOilListData({Fuelid:fuelId})
|
|
|
+ const fuelId = router.currentRoute.value.params.id
|
|
|
+ const { data } = await new MoreOilEngineDetailsApi().getOilListData({ Fuelid: fuelId })
|
|
|
oilListData.list = data
|
|
|
oilListData.loading = false
|
|
|
+ listcom = data
|
|
|
+ flagData.keyData = Math.random()
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -240,14 +348,14 @@ const initOilListData = async () => {
|
|
|
*/
|
|
|
const initTableData = async () => {
|
|
|
tableData.loading = true
|
|
|
- const fuelId=router.currentRoute.value.params.id
|
|
|
- const filter={fuelId:fuelId}
|
|
|
- const pageInput={currentPage: 1,pageSize: 5}
|
|
|
- const { data } = await new OilEngineDetailsApi().getAlarmHistoryDto({...pageInput,filter:filter})
|
|
|
+ const fuelId = router.currentRoute.value.params.id
|
|
|
+ const filter = { fuelId: fuelId }
|
|
|
+ const pageInput = { currentPage: 1, pageSize: 5 }
|
|
|
+ const { data } = await new OilEngineDetailsApi().getAlarmHistoryDto({ ...pageInput, filter: filter })
|
|
|
tableData.list = data.list
|
|
|
- tableData.list=tableData.list?.map((item)=>{
|
|
|
- if(item.createdDate!==null){
|
|
|
- item.createdDate=formatDate(item.createdDate)
|
|
|
+ tableData.list = tableData.list?.map((item) => {
|
|
|
+ if (item.createdDate !== null) {
|
|
|
+ item.createdDate = formatDate(item.createdDate)
|
|
|
}
|
|
|
return item
|
|
|
})
|
|
@@ -259,32 +367,32 @@ const initTableData = async () => {
|
|
|
*/
|
|
|
const initDetailsData = async () => {
|
|
|
detailsData.loading = true
|
|
|
- const fuelId=router.currentRoute.value.params.id
|
|
|
- const { data } = await new OilEngineDetailsApi().getBasicInfoDto({Fuelid:fuelId})
|
|
|
+ const fuelId = router.currentRoute.value.params.id
|
|
|
+ const { data } = await new OilEngineDetailsApi().getBasicInfoDto({ Fuelid: fuelId })
|
|
|
detailsData.list = data
|
|
|
- if(detailsData.list.createdTime!==null){
|
|
|
- detailsData.list.createdTime=formatDate(detailsData.list.createdTime)
|
|
|
+ if (detailsData.list.createdTime !== null) {
|
|
|
+ detailsData.list.createdTime = formatDate(detailsData.list.createdTime)
|
|
|
}
|
|
|
- if(detailsData.list.installationDate!==null){
|
|
|
- detailsData.list.installationDate=formatDate(detailsData.list.installationDate)
|
|
|
+ if (detailsData.list.installationDate !== null) {
|
|
|
+ detailsData.list.installationDate = formatDate(detailsData.list.installationDate)
|
|
|
}
|
|
|
- if(detailsData.list.startupDate!==null){
|
|
|
- detailsData.list.startupDate=formatDate(detailsData.list.startupDate)
|
|
|
+ if (detailsData.list.startupDate !== null) {
|
|
|
+ detailsData.list.startupDate = formatDate(detailsData.list.startupDate)
|
|
|
}
|
|
|
- if(detailsData.list.onlineStatus!==null){
|
|
|
- if(detailsData.list.onlineStatus==='offline'){
|
|
|
- detailsData.list.onlineStatus='离线'
|
|
|
- }else{
|
|
|
- detailsData.list.onlineStatus='在线'
|
|
|
+ if (detailsData.list.onlineStatus !== null) {
|
|
|
+ if (detailsData.list.onlineStatus === 'offline') {
|
|
|
+ detailsData.list.onlineStatus = '离线'
|
|
|
+ } else {
|
|
|
+ detailsData.list.onlineStatus = '在线'
|
|
|
}
|
|
|
}
|
|
|
- if(detailsData.list.deviceStatus!==null){
|
|
|
- if(detailsData.list.deviceStatus==='enable'){
|
|
|
- detailsData.list.deviceStatus='启用'
|
|
|
- }else if(detailsData.list.deviceStatus==='factory'){
|
|
|
- detailsData.list.deviceStatus='出厂注册'
|
|
|
- }else{
|
|
|
- detailsData.list.deviceStatus='备案'
|
|
|
+ if (detailsData.list.deviceStatus !== null) {
|
|
|
+ if (detailsData.list.deviceStatus === 'enable') {
|
|
|
+ detailsData.list.deviceStatus = '启用'
|
|
|
+ } else if (detailsData.list.deviceStatus === 'factory') {
|
|
|
+ detailsData.list.deviceStatus = '出厂注册'
|
|
|
+ } else {
|
|
|
+ detailsData.list.deviceStatus = '备案'
|
|
|
}
|
|
|
}
|
|
|
detailsData.loading = false
|
|
@@ -301,97 +409,139 @@ onMounted(() => {
|
|
|
})
|
|
|
|
|
|
// 路由跳转 -- 部件信息图
|
|
|
-const toParts = ((name:any,NozzleNo:any,status:any,fuelName:any,alarming:any,code:any)=>{
|
|
|
+const toParts = ((name: any, NozzleNo: any, status: any, fuelName: any, alarming: any, code: any) => {
|
|
|
router.push({
|
|
|
- path:`/statement/partInformation`,
|
|
|
- query:{
|
|
|
- name:name,
|
|
|
- NozzleNo:NozzleNo,
|
|
|
- status:status,
|
|
|
- fuelName:fuelName,
|
|
|
- alarming:alarming,
|
|
|
- code:code
|
|
|
+ path: `/statement/partInformation`,
|
|
|
+ query: {
|
|
|
+ name: name,
|
|
|
+ NozzleNo: NozzleNo,
|
|
|
+ status: status,
|
|
|
+ fuelName: fuelName,
|
|
|
+ alarming: alarming,
|
|
|
+ code: code
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
/**********************************初始化***********************************/
|
|
|
|
|
|
+const isOnline = (statu: string) => {
|
|
|
+ if (statu == '所有') {
|
|
|
+ listcom = JSON.parse(JSON.stringify(oilListData.list))
|
|
|
+ } else {
|
|
|
+ listcom = oilListData.list.filter((data) => {
|
|
|
+ return data.onlineStatus === statu
|
|
|
+ })
|
|
|
+ }
|
|
|
+ flagData.keyData = Math.random()
|
|
|
+ flagData.isFlag = statu
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+const isDisplay = ref(1)
|
|
|
+// 内容区顶部导航 变换
|
|
|
+const display = (num: number) => {
|
|
|
+ isDisplay.value = num
|
|
|
+ if (num == 2) {
|
|
|
+ toPage()
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//
|
|
|
+let showicon = ref(true)
|
|
|
+const onShowHide = () => {
|
|
|
+ showicon.value = !showicon.value
|
|
|
+}
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
- .all-con {
|
|
|
-
|
|
|
- .ma-con {
|
|
|
- height: 100%;
|
|
|
- .top-con {
|
|
|
- height: 18%;
|
|
|
- .scrollbar-flex-content {
|
|
|
- display: flex;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
-
|
|
|
- .card {
|
|
|
- flex-shrink: 0;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- justify-content: space-around;
|
|
|
- padding: 10px;
|
|
|
- width: 240px;
|
|
|
- margin: 14px;
|
|
|
- border-radius: 4px;
|
|
|
- box-shadow: var(--el-box-shadow-light);
|
|
|
- cursor: pointer;
|
|
|
- font-size: 12px;
|
|
|
- font-weight: 600;
|
|
|
-
|
|
|
- .info-con {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //.active-card {
|
|
|
- // background-color: #9fcaf3;
|
|
|
- //}
|
|
|
- }
|
|
|
- .bom-con {
|
|
|
- display: flex;
|
|
|
- //height: 82%;
|
|
|
-
|
|
|
- .bomCon-lef {
|
|
|
- width: 24%;
|
|
|
- }
|
|
|
-
|
|
|
- .bomCon-rig {
|
|
|
- display: flex;
|
|
|
- width: 100%;
|
|
|
-
|
|
|
- .bomConR-lef {
|
|
|
- width: 50%;
|
|
|
-
|
|
|
- .oilInfo-con {
|
|
|
-
|
|
|
- .oilInfo-item {
|
|
|
- margin-bottom: 25px;
|
|
|
- }
|
|
|
- .oilInfo-item-two > span {
|
|
|
- display: inline-block;
|
|
|
- width: 50%;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .bomConR-rig {
|
|
|
- width: 50%;
|
|
|
- }
|
|
|
-
|
|
|
- .bomConR-lef, .bomConR-rig {
|
|
|
- padding: 20px;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+.all-con {
|
|
|
+ flex: 1;
|
|
|
+ margin-left: 20px;
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+.oilInfo-bottom {
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.oilInfo-top {
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.oilInfo-con {
|
|
|
+ width: 100%;
|
|
|
+ height: 25%;
|
|
|
+ border-radius: 10px;
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+.oilInfo-item {
|
|
|
+ color: rgb(173, 171, 171)
|
|
|
+}
|
|
|
+
|
|
|
+.oilInfo-img {
|
|
|
+ margin-right: 20px;
|
|
|
+ width: 75px;
|
|
|
+ height: 75px;
|
|
|
+ background-color: #ccc;
|
|
|
+ border-radius: 8px;
|
|
|
+}
|
|
|
+
|
|
|
+.oilLabel-con {
|
|
|
+ background-color: #89898b;
|
|
|
+ height: 1.5em;
|
|
|
+ width: 3.9em;
|
|
|
+ line-height: 1.5em;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 999rem;
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+
|
|
|
+.oilInfo-msg {
|
|
|
+ height: 200px;
|
|
|
+
|
|
|
+ .oilInfo-item-two {
|
|
|
+ color: rgb(173, 171, 171)
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+// -------- 菜单栏
|
|
|
+.el-menu,
|
|
|
+.el-menu-item-group {
|
|
|
+ background-color: #fff;
|
|
|
+ color: #606266
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep.el-submenu .el-menu-item {
|
|
|
+ width: auto !important;
|
|
|
+}
|
|
|
+
|
|
|
+.el-menu span,
|
|
|
+.el-menu-item {
|
|
|
+ color: #606266
|
|
|
+}
|
|
|
+
|
|
|
+// 小圆点
|
|
|
+.status-point {
|
|
|
+ display: inline-block;
|
|
|
+ width: 6px;
|
|
|
+ height: 6px;
|
|
|
+ border-radius: 50%;
|
|
|
+ position: absolute;
|
|
|
+ right: 10%;
|
|
|
+ top: 30%;
|
|
|
+ margin-right: 30px;
|
|
|
+}
|
|
|
+
|
|
|
+.oilInfo-con-first {
|
|
|
+ left: 7em;
|
|
|
+ top: 0.5em;
|
|
|
+}
|
|
|
+
|
|
|
+.one {
|
|
|
+ --el-card-padding: 10px
|
|
|
+}
|
|
|
</style>
|