ÎļþÃû´Ó src/views/exception/ExceptionTest.vue ÐÞ¸Ä |
| | |
| | | import InputSearch from '../../sfc/InputSearch.vue'; |
| | | import ExceptionType from '../../sfc/ExceptionType.vue'; |
| | | import TimeSelectWithShortCuts from '../../sfc/TimeSelectWithShortCuts.vue'; |
| | | import DustExceptionText from '../../sfc/DustExceptionText.vue'; |
| | | import { useFetch } from '../../utils/fetch.js'; |
| | | import { useCommonFunction } from '../../utils/common.js'; |
| | | import AreaAndmonitorType from '../../sfc/AreaAndmonitorType.vue' |
| | |
| | | ExceptionType, |
| | | InputSearch, |
| | | TimeSelectWithShortCuts, |
| | | DustExceptionText, |
| | | |
| | | DustLineChart, |
| | | AreaAndmonitorType |
| | | }, |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | // æµè¯ç»åå¼å½æ° |
| | | // let param = { |
| | | // siteName: 'éå±±åºéå±±æ°åJSC1-0401åå
1-11-01å°å项ç®09', |
| | | // beginTime: '2023-07-01 00:00:00', |
| | | // endTime: '2023-07-10 00:00:00' |
| | | // }; |
| | | // this.backData = this.request('/dust/history1', param); |
| | | // console.log('å岿°æ®ä¸ºï¼', this.backData.value); |
| | | |
| | | |
| | | this.backExceptionDataAWeekAgo(); |
| | | // this.calTableHeight(); |
| | | this.calTableHeight(); |
| | | // æ¥è¯¢æ¶é´æ®µçåå¼å¸¸çç«ç¹ï¼æ¥è¯¢è¯¥æ¶é´åºé´çåå¼å¸¸æ°é |
| | | this.getShopNames(); |
| | | // this.exception.exception0 = this.getSiteNameByExceptionType('0',this.beginTime,this.endTime) |
| | | // console.log('å¼å¸¸æ°æ®ä¸ºï¼',this.exception.exception0); |
| | | |
| | | }, |
| | | |
| | | methods: { |
| | | |
| | | |
| | | // getExceptionSiteNum(){ |
| | | // this.$http.get('/dust/exceptionsitenum').then(result => { |
| | | // this.exceptionSiteNum = result.data.data.length |
| | | // }) |
| | | // }, |
| | | /** |
| | | * descriptionï¼ç¹å»å¼å¸¸ç«ç¹ååæ¶ è¿åçæ°æ® |
| | | * @paramï¼ |
| | |
| | | calTableHeight() { |
| | | const h1 = this.$refs.h1.$el.offsetHeight; |
| | | const h2 = this.$refs.h2.$el.offsetHeight; |
| | | const h3 = this.$refs.h3.$el.offsetHeight; |
| | | const h4 = this.$refs.h4.$el.offsetHeight; |
| | | // å
¶ä¸ä¸ä¸ª40æ¯çåçæ»å¤è¾¹è· |
| | | this.tableHeight = `calc(100vh - ${h1}px - ${h2}px - ${h3}px - ${h4}px - 40px - var(--el-main-padding) * 2)`; |
| | | this.tableHeight = `calc(100vh - ${h1}px - ${h2}px - ${h4}px - 100px - var(--el-main-padding) * 2)`; |
| | | }, |
| | | |
| | | // 页大尿¹åæ¶è§¦å |
| | |
| | | </el-row> |
| | | </el-row> |
| | | |
| | | <el-row ref="h3"> |
| | | <el-col> |
| | | <el-card> |
| | | <template #header> |
| | | <div class="card-header">å¼å¸¸åæ</div> |
| | | </template> |
| | | |
| | | |
| | | <el-row :gutter="20" class="card-row" > |
| | | <el-col :span="6"> |
| | | <div class="card-content-unnormal"> |
| | | <!-- æ 头 --> |
| | | <div class="card-text1"> |
| | | <image class="card-header-image"></image> |
| | | <span class="card-header-text">é级çªåå¼å¸¸</span> |
| | | </div> |
| | | |
| | | <div class="card-content-text"> |
| | | <el-scrollbar> |
| | | |
| | | <span class="card-exceptionname-text1">å¼å¸¸ç«ç¹å æ¯:</span> |
| | | <span>{{ exception.exception4.length }} /{{ siteTotal }}</span> |
| | | <span> |
| | | ({{ |
| | | ((exception.exception4.length / siteTotal) * 100).toFixed( |
| | | 1 |
| | | ) |
| | | }}%)</span |
| | | > |
| | | |
| | | <div class="card-exceptionname-text2" |
| | | >å¼å¸¸æ°å æ¯:{{ |
| | | ( |
| | | (exception.exception4Num / |
| | | (exception.exception0Num + |
| | | exception.exception1Num + |
| | | exception.exception2Num + |
| | | exception.exception3Num+ |
| | | exception.exception4Num+ |
| | | exception.exception5Num+ |
| | | exception.exception6Num+ |
| | | exception.exception7Num |
| | | )) * |
| | | 100 |
| | | ).toFixed(1) |
| | | }}%</div |
| | | > |
| | | |
| | | </el-scrollbar> |
| | | </div> |
| | | <hr /> |
| | | <!-- å¼å¸¸çåºéºåå --> |
| | | <div class="card-exception-buttom"> |
| | | <el-scrollbar max-height="90px"> |
| | | <DustExceptionText |
| | | :site-name="item.name" |
| | | exception-type="4" |
| | | :begin-time="beginTime" |
| | | :end-time="endTime" |
| | | @submit-exception-data="getAbnormalDataByClick" |
| | | |
| | | v-for="(item, index) in exception.exception4" |
| | | :key="item" |
| | | >{{ item.name }} |
| | | <span |
| | | v-if="index < exception.exception4.length - 1" |
| | | class="text-blank" |
| | | >,</span |
| | | > |
| | | </DustExceptionText> |
| | | </el-scrollbar> |
| | | </div> |
| | | <!-- ç»æ --> |
| | | </div> |
| | | </el-col> |
| | | |
| | | <el-col :span="6"> |
| | | <div class="card-content-unnormal"> |
| | | <!-- æ 头 --> |
| | | <div class="card-text1"> |
| | | <image class="card-header-image"></image> |
| | | <span class="card-header-text">临è¿è¶
æ å¼å¸¸</span> |
| | | </div> |
| | | |
| | | <div class="card-content-text"> |
| | | <el-scrollbar> |
| | | |
| | | <span class="card-exceptionname-text1">å¼å¸¸ç«ç¹å æ¯:</span> |
| | | <span>{{ exception.exception5.length }} /{{ siteTotal }}</span> |
| | | <span> |
| | | ({{ |
| | | ((exception.exception5.length / siteTotal) * 100).toFixed( |
| | | 1 |
| | | ) |
| | | }}%)</span |
| | | > |
| | | |
| | | <div class="card-exceptionname-text2" |
| | | >å¼å¸¸æ°å æ¯:{{ |
| | | ( |
| | | (exception.exception5Num / |
| | | (exception.exception0Num + |
| | | exception.exception1Num + |
| | | exception.exception2Num + |
| | | exception.exception3Num+ |
| | | exception.exception4Num+ |
| | | exception.exception5Num+ |
| | | exception.exception6Num+ |
| | | exception.exception7Num |
| | | )) * |
| | | 100 |
| | | ).toFixed(1) |
| | | }}%</div |
| | | > |
| | | |
| | | </el-scrollbar> |
| | | </div> |
| | | <hr /> |
| | | <!-- å¼å¸¸çåºéºåå --> |
| | | <div class="card-exception-buttom"> |
| | | <el-scrollbar max-height="90px"> |
| | | <DustExceptionText |
| | | :site-name="item.name" |
| | | exception-type="5" |
| | | :begin-time="beginTime" |
| | | :end-time="endTime" |
| | | @submit-exception-data="getAbnormalDataByClick" |
| | | |
| | | v-for="(item, index) in exception.exception5" |
| | | :key="item" |
| | | >{{ item.name }} |
| | | <span |
| | | v-if="index < exception.exception5.length - 1" |
| | | class="text-blank" |
| | | >,</span |
| | | > |
| | | </DustExceptionText> |
| | | </el-scrollbar> |
| | | </div> |
| | | <!-- ç»æ --> |
| | | </div> |
| | | </el-col> |
| | | |
| | | <el-col :span="6"> |
| | | <div class="card-content-unnormal"> |
| | | <!-- æ 头 --> |
| | | <div class="card-text1"> |
| | | <image class="card-header-image"></image> |
| | | <span class="card-header-text">忥è¶
æ æ¬¡æ°ä¸´çå¼å¸¸</span> |
| | | </div> |
| | | |
| | | <div class="card-content-text"> |
| | | <el-scrollbar> |
| | | |
| | | <span class="card-exceptionname-text1">å¼å¸¸ç«ç¹å æ¯:</span> |
| | | <span>{{ exception.exception6.length }} /{{ siteTotal }}</span> |
| | | <span> |
| | | ({{ |
| | | ((exception.exception6.length / siteTotal) * 100).toFixed( |
| | | 1 |
| | | ) |
| | | }}%)</span |
| | | > |
| | | |
| | | <div class="card-exceptionname-text2" |
| | | >å¼å¸¸æ°å æ¯:{{ |
| | | ( |
| | | (exception.exception6Num / |
| | | (exception.exception0Num + |
| | | exception.exception1Num + |
| | | exception.exception2Num + |
| | | exception.exception3Num+ |
| | | exception.exception4Num+ |
| | | exception.exception5Num+ |
| | | exception.exception6Num+ |
| | | exception.exception7Num |
| | | )) * |
| | | 100 |
| | | ).toFixed(1) |
| | | }}%</div |
| | | > |
| | | |
| | | </el-scrollbar> |
| | | </div> |
| | | <hr /> |
| | | <!-- å¼å¸¸çåºéºåå --> |
| | | <div class="card-exception-buttom"> |
| | | <el-scrollbar max-height="90px"> |
| | | <DustExceptionText |
| | | :site-name="item.name" |
| | | exception-type="6" |
| | | :begin-time="beginTime" |
| | | :end-time="endTime" |
| | | @submit-exception-data="getAbnormalDataByClick" |
| | | |
| | | v-for="(item, index) in exception.exception6" |
| | | :key="item" |
| | | >{{ item.name }} |
| | | <span |
| | | v-if="index < exception.exception6.length - 1" |
| | | class="text-blank" |
| | | >,</span |
| | | > |
| | | </DustExceptionText> |
| | | </el-scrollbar> |
| | | </div> |
| | | <!-- ç»æ --> |
| | | </div> |
| | | </el-col> |
| | | |
| | | <el-col :span="6"> |
| | | <div class="card-content-unnormal"> |
| | | <!-- æ 头 --> |
| | | <div class="card-text1"> |
| | | <image class="card-header-image"></image> |
| | | <span class="card-header-text">ååè¶å¿å¼å¸¸</span> |
| | | </div> |
| | | |
| | | <div class="card-content-text"> |
| | | <el-scrollbar> |
| | | |
| | | <span class="card-exceptionname-text1">å¼å¸¸ç«ç¹å æ¯:</span> |
| | | <span>{{ exception.exception7.length }} /{{ siteTotal }}</span> |
| | | <span> |
| | | ({{ |
| | | ((exception.exception7.length / siteTotal) * 100).toFixed( |
| | | 1 |
| | | ) |
| | | }}%)</span |
| | | > |
| | | |
| | | <div class="card-exceptionname-text2" |
| | | >å¼å¸¸æ°å æ¯:{{ |
| | | ( |
| | | (exception.exception7Num / |
| | | (exception.exception0Num + |
| | | exception.exception1Num + |
| | | exception.exception2Num + |
| | | exception.exception3Num+ |
| | | exception.exception4Num+ |
| | | exception.exception5Num+ |
| | | exception.exception6Num+ |
| | | exception.exception7Num |
| | | )) * |
| | | 100 |
| | | ).toFixed(1) |
| | | }}%</div |
| | | > |
| | | |
| | | </el-scrollbar> |
| | | </div> |
| | | <hr /> |
| | | <!-- å¼å¸¸çåºéºåå --> |
| | | <div class="card-exception-buttom"> |
| | | <el-scrollbar max-height="90px"> |
| | | <DustExceptionText |
| | | :site-name="item.name" |
| | | exception-type="7" |
| | | :begin-time="beginTime" |
| | | :end-time="endTime" |
| | | @submit-exception-data="getAbnormalDataByClick" |
| | | |
| | | v-for="(item, index) in exception.exception7" |
| | | :key="item" |
| | | >{{ item.name }} |
| | | <span |
| | | v-if="index < exception.exception7.length - 1" |
| | | class="text-blank" |
| | | >,</span |
| | | > |
| | | </DustExceptionText> |
| | | </el-scrollbar> |
| | | </div> |
| | | <!-- ç»æ --> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | |
| | | <el-row :gutter="20" > |
| | | <el-col :span="6"> |
| | | <div class="card-content-normal"> |
| | | <!-- æ 头 --> |
| | | <div class="card-text1"> |
| | | <image class="card-header-image"></image> |
| | | <span class="card-header-text">æµåº¦è¶
æ </span> |
| | | </div> |
| | | |
| | | <div class="card-content-text"> |
| | | <el-scrollbar> |
| | | |
| | | <span class="card-exceptionname-text1">å¼å¸¸ç«ç¹å æ¯:</span> |
| | | <span>{{ exception.exception2.length }} /{{ siteTotal }}</span> |
| | | <span> |
| | | ({{ |
| | | ((exception.exception2.length / siteTotal) * 100).toFixed( |
| | | 1 |
| | | ) |
| | | }}%)</span |
| | | > |
| | | |
| | | <div class="card-exceptionname-text2" |
| | | >å¼å¸¸æ°å æ¯:{{ |
| | | ( |
| | | (exception.exception2Num / |
| | | (exception.exception0Num + |
| | | exception.exception1Num + |
| | | exception.exception2Num + |
| | | exception.exception3Num+ |
| | | exception.exception4Num+ |
| | | exception.exception5Num+ |
| | | exception.exception6Num+ |
| | | exception.exception7Num |
| | | |
| | | )) * |
| | | 100 |
| | | ).toFixed(1) |
| | | }}%</div |
| | | > |
| | | |
| | | </el-scrollbar> |
| | | </div> |
| | | <hr /> |
| | | <!-- å¼å¸¸çåºéºåå --> |
| | | <div class="card-exception-buttom"> |
| | | <el-scrollbar max-height="90px"> |
| | | <DustExceptionText |
| | | :site-name="item.name" |
| | | exception-type="2" |
| | | :begin-time="beginTime" |
| | | :end-time="endTime" |
| | | @submit-exception-data="getAbnormalDataByClick" |
| | | |
| | | v-for="(item, index) in exception.exception2" |
| | | :key="item" |
| | | >{{ item.name }} |
| | | <span |
| | | v-if="index < exception.exception2.length - 1" |
| | | class="text-blank" |
| | | >,</span |
| | | > |
| | | </DustExceptionText> |
| | | </el-scrollbar> |
| | | </div> |
| | | <!-- ç»æ --> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="6" |
| | | ><div class="card-content-normal"> |
| | | <!-- æ 头 --> |
| | | <div class="card-text1"> |
| | | <image class="card-header-image"></image> |
| | | <span class="card-header-text">æ°æ®ç¼ºå¤±å¼å¸¸</span> |
| | | </div> |
| | | |
| | | <div class="card-content-text"> |
| | | <el-scrollbar> |
| | | <span class="card-exceptionname-text1">å¼å¸¸ç«ç¹å æ¯:</span> |
| | | <span>{{ exception.exception0.length }} /{{ siteTotal }}</span> |
| | | <span> |
| | | ({{ |
| | | ((exception.exception0.length / siteTotal) * 100).toFixed( |
| | | 1 |
| | | ) |
| | | }}%)</span |
| | | > |
| | | <div class="card-exceptionname-text2" |
| | | >å¼å¸¸æ°å æ¯:{{ |
| | | ( |
| | | (exception.exception0Num / |
| | | (exception.exception0Num + |
| | | exception.exception1Num + |
| | | exception.exception2Num + |
| | | exception.exception3Num+ |
| | | exception.exception4Num+ |
| | | exception.exception5Num+ |
| | | exception.exception6Num+ |
| | | exception.exception7Num)) * |
| | | 100 |
| | | ).toFixed(1) |
| | | }}%</div |
| | | > |
| | | </el-scrollbar> |
| | | </div> |
| | | <hr /> |
| | | <!-- å¼å¸¸çåºéºåå --> |
| | | <div class="card-exception-buttom"> |
| | | <el-scrollbar max-height="90px"> |
| | | <DustExceptionText |
| | | :site-name="item.name" |
| | | exception-type="0" |
| | | :begin-time="beginTime" |
| | | :end-time="endTime" |
| | | @submit-exception-data="getAbnormalDataByClick" |
| | | |
| | | v-for="(item, index) in exception.exception0" |
| | | :key="item" |
| | | >{{ item.name }} |
| | | <span |
| | | v-if="index < exception.exception0.length - 1" |
| | | class="text-blank" |
| | | >,</span |
| | | > |
| | | </DustExceptionText> |
| | | </el-scrollbar> |
| | | </div> |
| | | <!-- ç»æ --> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <div class="card-content-normal"> |
| | | <!-- æ 头 --> |
| | | <div class="card-text1"> |
| | | <image class="card-header-image"></image> |
| | | <span class="card-header-text">æ°æ®è¶
ä½</span> |
| | | </div> |
| | | |
| | | <div class="card-content-text"> |
| | | <el-scrollbar> |
| | | <span class="card-exceptionname-text1">å¼å¸¸ç«ç¹å æ¯:</span> |
| | | <span>{{ exception.exception1.length }} /{{ siteTotal }}</span> |
| | | <span> |
| | | ({{ |
| | | ((exception.exception1.length / siteTotal) * 100).toFixed( |
| | | 1 |
| | | ) |
| | | }}%)</span |
| | | > |
| | | <div class="card-exceptionname-text2" |
| | | >å¼å¸¸æ°å æ¯:{{ |
| | | ( |
| | | (exception.exception1Num / |
| | | (exception.exception0Num + |
| | | exception.exception1Num + |
| | | exception.exception2Num + |
| | | exception.exception3Num+ |
| | | exception.exception4Num+ |
| | | exception.exception5Num+ |
| | | exception.exception6Num+ |
| | | exception.exception7Num)) * |
| | | 100 |
| | | ).toFixed(1) |
| | | }}%</div |
| | | > |
| | | </el-scrollbar> |
| | | </div> |
| | | <hr /> |
| | | <!-- å¼å¸¸çåºéºåå --> |
| | | <div class="card-exception-buttom"> |
| | | <el-scrollbar max-height="90px"> |
| | | <DustExceptionText |
| | | :site-name="item.name" |
| | | exception-type="1" |
| | | :begin-time="beginTime" |
| | | :end-time="endTime" |
| | | @submit-exception-data="getAbnormalDataByClick" |
| | | |
| | | v-for="(item, index) in exception.exception1" |
| | | :key="item" |
| | | >{{ item.name }} |
| | | <span |
| | | v-if="index < exception.exception1.length - 1" |
| | | class="text-blank" |
| | | >,</span |
| | | > |
| | | </DustExceptionText> |
| | | </el-scrollbar> |
| | | </div> |
| | | <!-- ç»æ --> |
| | | </div></el-col |
| | | > |
| | | <el-col :span="6" |
| | | ><div class="card-content-normal"> |
| | | <!-- æ 头 --> |
| | | <div class="card-text1"> |
| | | <image class="card-header-image"></image> |
| | | <span class="card-header-text">æ°æ®é¿æ¶æ®µæ æ³¢å¨</span> |
| | | </div> |
| | | |
| | | <div class="card-content-text"> |
| | | <el-scrollbar> |
| | | <span class="card-exceptionname-text1">å¼å¸¸ç«ç¹å æ¯:</span> |
| | | <span>{{ exception.exception3.length }} /{{ siteTotal }}</span> |
| | | <span> |
| | | ({{ |
| | | ((exception.exception3.length / siteTotal) * 100).toFixed( |
| | | 1 |
| | | ) |
| | | }}%)</span |
| | | > |
| | | <div class="card-exceptionname-text2" |
| | | >å¼å¸¸æ°å æ¯:{{(100- |
| | | |
| | | ((exception.exception0Num / |
| | | (exception.exception0Num + |
| | | exception.exception1Num + |
| | | exception.exception2Num + |
| | | exception.exception3Num+ |
| | | exception.exception4Num+ |
| | | exception.exception5Num+ |
| | | exception.exception6Num+ |
| | | exception.exception7Num)) * |
| | | 100 |
| | | ) - |
| | | ((exception.exception1Num / |
| | | (exception.exception0Num + |
| | | exception.exception1Num + |
| | | exception.exception2Num + |
| | | exception.exception3Num+ |
| | | exception.exception4Num+ |
| | | exception.exception5Num+ |
| | | exception.exception6Num+ |
| | | exception.exception7Num)) * |
| | | 100 |
| | | ) - |
| | | ((exception.exception2Num / |
| | | (exception.exception0Num + |
| | | exception.exception1Num + |
| | | exception.exception2Num + |
| | | exception.exception3Num+ |
| | | exception.exception4Num+ |
| | | exception.exception5Num+ |
| | | exception.exception6Num+ |
| | | exception.exception7Num)) * |
| | | 100 |
| | | ) - |
| | | ((exception.exception4Num / |
| | | (exception.exception0Num + |
| | | exception.exception1Num + |
| | | exception.exception2Num + |
| | | exception.exception3Num+ |
| | | exception.exception4Num+ |
| | | exception.exception5Num+ |
| | | exception.exception6Num+ |
| | | exception.exception7Num)) * |
| | | 100 |
| | | )- |
| | | ((exception.exception5Num / |
| | | (exception.exception0Num + |
| | | exception.exception1Num + |
| | | exception.exception2Num + |
| | | exception.exception3Num+ |
| | | exception.exception4Num+ |
| | | exception.exception5Num+ |
| | | exception.exception6Num+ |
| | | exception.exception7Num)) * |
| | | 100 |
| | | )- |
| | | ((exception.exception6Num / |
| | | (exception.exception0Num + |
| | | exception.exception1Num + |
| | | exception.exception2Num + |
| | | exception.exception3Num+ |
| | | exception.exception4Num+ |
| | | exception.exception5Num+ |
| | | exception.exception6Num+ |
| | | exception.exception7Num)) * |
| | | 100 |
| | | )- |
| | | ((exception.exception7Num / |
| | | (exception.exception0Num + |
| | | exception.exception1Num + |
| | | exception.exception2Num + |
| | | exception.exception3Num+ |
| | | exception.exception4Num+ |
| | | exception.exception5Num+ |
| | | exception.exception6Num+ |
| | | exception.exception7Num)) * |
| | | 100 |
| | | ) |
| | | |
| | | |
| | | ).toFixed(1) |
| | | }}%</div |
| | | > |
| | | </el-scrollbar> |
| | | </div> |
| | | <hr /> |
| | | <!-- å¼å¸¸çåºéºåå --> |
| | | <div class="card-exception-buttom"> |
| | | <el-scrollbar max-height="90px"> |
| | | <DustExceptionText |
| | | :site-name="item.name" |
| | | exception-type="3" |
| | | :begin-time="beginTime" |
| | | :end-time="endTime" |
| | | @submit-exception-data="getAbnormalDataByClick" |
| | | |
| | | v-for="(item, index) in exception.exception3" |
| | | :key="item" |
| | | >{{ item.name }} |
| | | <span |
| | | v-if="index < exception.exception3.length - 1" |
| | | class="text-blank" |
| | | >,</span |
| | | > |
| | | </DustExceptionText> |
| | | </el-scrollbar> |
| | | </div> |
| | | <!-- ç»æ --> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | |
| | | |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col v-show="!isNoData"> |