From 17388fa7ecd1f3ebadad470a463573a1cfe4468f Mon Sep 17 00:00:00 2001 From: zmc <zmc_li@foxmail.com> Date: 星期四, 31 八月 2023 11:29:31 +0800 Subject: [PATCH] 扬尘Vue --- src/views/exception/SiteAuditAssistance.vue | 635 --------------------------------------------------------- 1 files changed, 5 insertions(+), 630 deletions(-) diff --git a/src/views/exception/ExceptionTest.vue b/src/views/exception/SiteAuditAssistance.vue similarity index 67% rename from src/views/exception/ExceptionTest.vue rename to src/views/exception/SiteAuditAssistance.vue index a64ed4e..303f548 100644 --- a/src/views/exception/ExceptionTest.vue +++ b/src/views/exception/SiteAuditAssistance.vue @@ -2,7 +2,6 @@ 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' @@ -18,7 +17,7 @@ ExceptionType, InputSearch, TimeSelectWithShortCuts, - DustExceptionText, + DustLineChart, AreaAndmonitorType }, @@ -181,31 +180,17 @@ } }, mounted() { - // 娴嬭瘯缁勫悎寮忓嚱鏁� - // let param = { - // siteName: '閲戝北鍖洪噾灞辨柊鍩嶫SC1-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锛� @@ -1300,10 +1285,9 @@ 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)`; }, // 椤靛ぇ灏忔敼鍙樻椂瑙﹀彂 @@ -1395,615 +1379,6 @@ </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"> -- Gitblit v1.9.3