.eslintrc-auto-import.json
@@ -59,6 +59,7 @@ "watchEffect": true, "watchPostEffect": true, "watchSyncEffect": true, "ElMessage": true "ElMessage": true, "ElMessageBox": true } } auto-imports.d.ts
@@ -6,6 +6,7 @@ declare global { const EffectScope: typeof import('vue')['EffectScope'] const ElMessage: typeof import('element-plus/es')['ElMessage'] const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] const computed: typeof import('vue')['computed'] const createApp: typeof import('vue')['createApp'] const customRef: typeof import('vue')['customRef'] components.d.ts
@@ -13,6 +13,8 @@ ElAside: typeof import('element-plus/es')['ElAside'] ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete'] ElAvatar: typeof import('element-plus/es')['ElAvatar'] ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElButton: typeof import('element-plus/es')['ElButton'] ElCard: typeof import('element-plus/es')['ElCard'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] @@ -42,6 +44,7 @@ ElSelect: typeof import('element-plus/es')['ElSelect'] ElSkeleton: typeof import('element-plus/es')['ElSkeleton'] ElSpace: typeof import('element-plus/es')['ElSpace'] ElStatistic: typeof import('element-plus/es')['ElStatistic'] ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] @@ -57,10 +60,12 @@ IEpArrowDown: typeof import('~icons/ep/arrow-down')['default'] IEpBell: typeof import('~icons/ep/bell')['default'] IEpDataLine: typeof import('~icons/ep/data-line')['default'] IEpDownload: typeof import('~icons/ep/download')['default'] IEpExpand: typeof import('~icons/ep/expand')['default'] IEpFold: typeof import('~icons/ep/fold')['default'] IEpHistogram: typeof import('~icons/ep/histogram')['default'] IEpMonitor: typeof import('~icons/ep/monitor')['default'] IEpSearch: typeof import('~icons/ep/search')['default'] IEpStopwatch: typeof import('~icons/ep/stopwatch')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] src/api/audit/submitApi.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,62 @@ import { $http } from '@/api/index.js'; export default { /** * æäº¤å®¡æ ¸ * @paramï¼ å®¡æ ¸äººï¼å®¡æ ¸äººå¤æ³¨ï¼ä¼ä¸å¤æ³¨ï¼å¼å¸¸è®°å½ç¼å·ï¼ 该æ¡å¼å¸¸çå®¡æ ¸ç¶æ * @returnsï¼ */ submitAudit(reviewer,checkerNotes,enterpriseNotes,id,status){ const params = { // checker:reviewer, checkerContent:checkerNotes, enterpriseContent:enterpriseNotes, exceptionId:id, auditStatus:status } if(reviewer == '' || reviewer == null){ params.checker = 'admin' }else{ params.checker = reviewer } return $http.post('/dust/audit',params) }, /** * è¿åå®¡æ ¸è¡¨æææ°æ® * @paramï¼ * @returnsï¼ */ backAuditAllData(){ return $http.get('dust/auditAllData') }, /** * æ´æ°å®¡æ ¸è®°å½ * @paramï¼ å¼å¸¸ç¼å·Idï¼å®¡æ ¸äººå¤æ³¨ï¼ä¼ä¸å¤æ³¨ï¼è¯¥æ¡å¼å¸¸çå®¡æ ¸ç¶æ * @returnsï¼ */ updateAudit(id,checkerContent,enterpriseContent,auditStatus){ const params = { exceptionId:id, auditStatus:auditStatus, } if(checkerContent){ params.checkerContent = checkerContent } if(enterpriseContent){ params.enterpriseContent = enterpriseContent } return $http.put('/dust/auditUpdate',params) }, getAuditNumByTime(beginTime,endTime){ if(beginTime!='' || endTime!=''){ const params = { beginTime:beginTime, endTime:endTime } return $http.get('/dust/auditnum',{params:params}) } } }; src/api/exportExcel/requetsApi.js
@@ -10,6 +10,11 @@ return $http.get('dust/analysisall',{params:argsObj}); }, /** * æ ¹æ®ç«ç¹ï¼æ¶é´æ®µæ¥è¯¢åå²è¡¨ä¸æææ°æ® * @paramï¼ * @returnsï¼ */ fetchAlSiteData(argsObj){ return $http.get('dust/historyall',{params:argsObj}); src/components/layout/AppAside.vue
@@ -11,6 +11,7 @@ optionClick: [ ' æ°æ®é£é©æ¨¡å', 'æ°æ®é£é©æå', 'ç«ç¹ç»¼åé£é©æå', 'é£è¡å·¡æ£', 'ç«ç¹å®¡æ ¸è¾ å©', 'å岿°æ®ç®¡ç', @@ -23,11 +24,13 @@ methods:{ calMenuHeight() { const h1 = this.$refs.headerRef.$el.offsetHeight; return `calc(100vh - ${h1}px `; return `calc(100vh - ${h1}px - 8px`; }, }, mounted(){ this.menuHeight = this.calMenuHeight(); console.log('meta:',this.$route.matched); } }; </script> @@ -41,24 +44,17 @@ class="el-menu-vertical-demo" default-active="2" text-color="#fff" @open="handleOpen" @close="handleClose" router :collapse="isCollapseAside" > <el-row ref="headerRef" class="header"> <el-space> <el-link href="/hdata" class="logo" > <!-- <img src="@/assets/companylogo.png" alt="" /> --> <h1>å¨çº¿çæµæ°æ®è´¨éè¯ä¼°ä¸é£é©åæ</h1> </el-link> </el-space> <div class="line"> </div> </el-row> <hr/> <el-scrollbar :height="menuHeight"> <el-sub-menu index="1"> @@ -74,7 +70,12 @@ <el-menu-item index="analysis" @click="selected = optionClick[1]"> <el-icon><i-ep-Stopwatch /></el-icon> æ°æ®é£é©æå </el-menu-item><el-menu-item index="riskrank" @click="selected = optionClick[2]"> <el-icon><i-ep-Stopwatch /></el-icon> ç«ç¹ç»¼åé£é©æå </el-menu-item> </el-sub-menu> @@ -83,12 +84,12 @@ <el-icon><i-ep-Histogram /></el-icon> <span class="parent-title">线ä¸å·¡æ£</span> </template> <el-menu-item index="edata" @click="selected = optionClick[2]"> <el-menu-item index="edata" @click="selected = optionClick[3]"> <el-icon><i-ep-Bell /></el-icon> é£è¡å·¡æ£ </el-menu-item> <el-menu-item index="testdata" @click="selected = optionClick[3]"> <el-menu-item index="testData" @click="selected = optionClick[4]"> <el-icon><i-ep-Bell /></el-icon> ç«ç¹å®¡æ ¸è¾ å© </el-menu-item> @@ -106,18 +107,18 @@ <el-icon><i-ep-Histogram /></el-icon> å岿°æ®ç®¡ç </el-menu-item> <!-- <el-menu-item index="management" @click="selected = optionClick[5]"> <el-menu-item index="management" @click="selected = optionClick[5]"> <el-icon><i-ep-Histogram /></el-icon> æ°æ®æ¥å ¥ç®¡ç </el-menu-item> <el-menu-item index="report" @click="selected = optionClick[6]"> <el-icon><i-ep-Histogram /></el-icon> ä¸å¡æ¥è¡¨ </el-menu-item> --> </el-menu-item> </el-sub-menu> <!-- <el-sub-menu index="4"> <el-sub-menu index="4"> <template #title> <el-icon><i-ep-DataLine /></el-icon> <span class="parent-title">é 置管ç</span> @@ -127,7 +128,7 @@ <el-icon><i-ep-Histogram /></el-icon> æ°æ®æ¥å ¥é ç½® </el-menu-item> </el-sub-menu> --> </el-sub-menu> </el-scrollbar> </el-menu> @@ -137,8 +138,6 @@ <style lang="scss" scoped> .el-aside { background-color: #2876aa; height: 100vh; width: auto; } @@ -148,16 +147,17 @@ width: 220px; border-right: none; &.el-menu--collapse { //ä¾§è¾¹æ æå æ¶çæ ·å¼ width: 65px; & h1 { //æå æ¶éèh1æå display: none; } & span { display: none; } & hr { display: none; } } @@ -171,10 +171,11 @@ text-decoration: none; color: black; margin-left: 20px; img { width: 32px; height: 32px; } margin-right: 20px; // img { // width: 32px; // height: 32px; // } } @@ -188,10 +189,5 @@ font-weight: bold; font-size: 18px; } // .line { // width: 180px; // border: 1px solid rgb(255,255,255,0.2); // margin: 0px; // padding: 0px; // } </style> src/components/layout/AppHeader.vue
@@ -1,8 +1,11 @@ <script > import { isCollapse } from './isCollapse' import { selectedName } from './selectName' import BreadCrumb from '@/sfc/BreadCrumb.vue' export default { components:{ BreadCrumb, }, data() { return{ isCollapseHeader: isCollapse , //æå @@ -37,16 +40,11 @@ <i-ep-Expand v-show="isCollapseHeader" /> <i-ep-Fold v-show="!isCollapseHeader"/> </el-icon> {{ selected }} <!-- {{ selected }} --> <!-- é¢å å± --> <!-- <el-breadcrumb separator="/"> <el-breadcrumb-item :to="{ path: '/hdata' }">主页</el-breadcrumb-item> <el-breadcrumb-item><a href="/">promotion management</a></el-breadcrumb-item> --> <!-- <el-breadcrumb-item>promotion list</el-breadcrumb-item> <el-breadcrumb-item>promotion detail</el-breadcrumb-item> --> <!-- </el-breadcrumb> --> <BreadCrumb></BreadCrumb> <!-- 䏿èå --> <el-dropdown> src/main.ts
@@ -14,11 +14,21 @@ const app = createApp(App) function SecretPiniaPlugin() { return { secret: 'the cake is a lie',vue:'333.0' } } const pinia = createPinia() // å°æä»¶æä¾ç» pinia pinia.use(SecretPiniaPlugin) // pinia.use(() => ({'天':'é¨å¤©'})) // axios.defaults.baseURL = 'http://192.168.1.4:8081' axios.defaults.baseURL = 'http://localhost:8081' app.config.globalProperties.$http = axios app.use(createPinia()) app.use(pinia) app.use(router) src/router/index.ts
@@ -7,63 +7,78 @@ { path: '/layout', name: 'home', meta: { title: 'é¦é¡µ' }, component: () => import('@/components/layout/AppLayout.vue'), children: [ // æ°æ®å驿¨¡å { path:"/avgDay", name:'avgDay', meta: { title: 'æ°æ®å驿¨¡å' }, component: () => import('@/views/line_graph/DataRiskModel.vue') }, // æ°æ®é£é©æå { path:"/analysis", name:'analysis', meta: { title: 'æ°æ®é£é©æå' }, component: () => import('@/views/line_graph/DataRiskRank.vue') }, // å岿°æ®ç®¡ç // æ°æ®é£é©æå { path:"/hdata", name:'hdata', component: () => import('@/views/origin_data/HistoryData.vue') path: "/riskrank", name: 'riskrank', meta: { title: 'æ°æ®é£é©æå' }, component: () => import('@/views/line_graph/SiteComprehensiveRskRanking.vue') }, // é£è¡å·¡æ£ { path:"/edata", name:'edata', meta: { title: 'é£è¡å·¡æ£' }, component: () => import('@/views/exception/FlightInspection.vue') }, // ç«ç¹å®¡æ ¸è¾ å© { path:"/testdata", name:'testdata', path: "/testData", name: 'testData', meta: { title: 'ç«ç¹å®¡æ ¸è¾ å©' }, component: () => import('@/views/exception/SiteAuditAssistance.vue') }, // æ°æ®æ¥å ¥é ç½® { path:"/setting", name:'setting', component: () => import('@/views/setting/SetConfiguration.vue') }, { path: "/hdata", name: 'hdata', meta: { title: 'å岿°æ®ç®¡ç' }, component: () => import('@/views/data_management/HistoryData.vue') }, // æ°æ®æ¥å ¥ç®¡ç { path:"/management", name:'management', component: () => import('@/views/origin_data/DataAccessManagement.vue') meta: { title: 'æ°æ®æ¥å ¥ç®¡ç' }, component: () => import('@/views/data_management/DataAccessManagement.vue') }, // ä¸å¡æ¥è¡¨ { path:"/report", name:'report', component: () => import('@/views/origin_data/BusinessReport.vue') meta: { title: 'ä¸å¡æ¥è¡¨' }, component: () => import('@/views/data_management/BusinessReport.vue') }, // æ°æ®æ¥å ¥é ç½® { path: "/setting", name: 'setting', meta: { title: 'æ°æ®æ¥å ¥é ç½®' }, component: () => import('@/views/setting/SetConfiguration.vue') }, ], @@ -77,7 +92,7 @@ }, { path: '/', redirect:'/hdata' redirect: '/edata' }, ] }) src/sfc/BreadCrumb.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,42 @@ <!-- é¢å å± --> <script> import { ArrowRight } from '@element-plus/icons-vue' export default { data(){ return{ list:[] } }, setup(){ return {ArrowRight} }, watch:{ $route(to,from){ this.list = to.matched } }, mounted (){ this.list = this.$route.matched }, methods:{ } } </script> <template> <el-breadcrumb :separator-icon="ArrowRight"> <el-breadcrumb-item v-for="item in list" :key="item.path" :to="{ path: '/' }"> <router-link :to="item.path">{{ item.meta.title }}</router-link> </el-breadcrumb-item> </el-breadcrumb> </template> <style scoped> .el-breadcrumb__inner a { font-weight: 500; color: rgba(0, 0, 0); } .el-breadcrumb__item:last-child .el-breadcrumb__inner a { color: rgb(209, 207, 207); } </style> src/sfc/ButtonClick.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,50 @@ <!-- æç´¢æé® ç¹å»æé®åï¼åç¶ç»ä»¶åçç¹å»äºä»¶ï¼ç±ç¶ç»ä»¶æ¥å®æç¹å»åçå ·ä½æ§è¡ **ç¶ç»ä»¶ <ButtonClick content="æç´¢" type="warning" :loading="loading.queryButton" @do-search="doSearch"></ButtonClick> --> <script> export default { props:{ // æé®æå content:{ type:String, default:'ç¹å»' }, // æé®æ ·å¼ type:{ type:String, default:'success' }, // å è½½ææ loading:{ type:Boolean, default:false }, size:{ type:String, default:'default' } }, emits:['doSearch' ], } </script> <template> <div> <el-button :type="type" :loading="loading" :size="size" @click="$emit('doSearch')"> <el-icon > <i-ep-Search/> </el-icon> {{ content }} </el-button> </div> </template> <style scoped> .el-icon { margin-right: 6px; font-size: 1.2em; } </style> src/sfc/ButtonExportExcel.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,49 @@ <!-- å¯¼åºæExcelç»ä»¶ **ç¶ç»ä»¶ <ButtonExportExcel content="å¯¼åºæ°æ®" type="success" :loading="exportButton" @do-export="exportDom"></ButtonExportExcel> --> <script> export default { props: { // æé®æå content: { type: String, default: 'å¯¼åºæ°æ®' }, // æé®æ ·å¼ type: { type: String, default: 'success' }, // å è½½ææ loading: { type: Boolean, default: false }, size: { type: String, default: 'default' } }, emits: ['doExport'], } </script> <template> <el-button :type="type" :size="size" @click="$emit('doExport')" :loading="loading" round> <el-icon > <i-ep-Download/> </el-icon> {{ content }} </el-button> </template> <style scoped> .el-icon { margin-right: 6px; margin-bottom:2px; font-size: 1.2em; } </style> src/sfc/ExportExcel.vue
ÎļþÒÑɾ³ý src/sfc/FanPurifierChart.vue
ÎļþÒÑɾ³ý src/sfc/FumeFanPurifierChart.vue
ÎļþÒÑɾ³ý src/sfc/TableD.vue
ÎļþÒÑɾ³ý src/sfc/TimeSelectWithShortCuts.vue
@@ -13,20 +13,26 @@ *** --> <script> import dayjs from 'dayjs' import dayjs from 'dayjs'; export default { props: { timeType: { type: String, default: 'month' } }, emits: ['submitTime'], data() { return{ //ä¿åå¼å§åç»ææ¶é´ // é便设置åå§å¼ ï¼mountedæ¶å设æ£ç¡®çï¼ç®çæ¯æ¹åæ¶é´äºè§¦åchange time: ['2023-06-01 12:00:00', '2023-06-20 16:00:00'], shortcuts:[], } shortcuts: [] }; }, mounted() { this.initShortCuts() this.initOneWeekAgoTime() this.initShortCuts(); this.initOneWeekAgoTime(); this.$emit('submitTime', this.time); }, methods: { @@ -35,46 +41,66 @@ { text: 'å䏿¥', value: () => { const end = new Date() const start = new Date() start.setTime(start.getTime() - 3600 * 1000 * 24) return [start, end] }, const end = new Date(); const start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24); return [start, end]; } }, { text: 'å7天', value: () => { const end = new Date() const start = new Date() start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) return [start, end] }, const end = new Date(); const start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); return [start, end]; } }, { text: 'å䏿', value: () => { const end = new Date() const start = new Date() start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) return [start, end] }, }, ] const end = new Date(); const start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); return [start, end]; } } ]; }, initOneWeekAgoTime(){ // ç»æ¶é´éæ©å¨è®¾ç½®é»è®¤æ¶é´ä¸ºä¸å¨å this.time[0] = dayjs().subtract(6, 'week').format('YYYY-MM-DD HH:mm:ss'); switch (this.timeType) { case 'day': this.time[0] = dayjs() .subtract(1, 'day') .format('YYYY-MM-DD HH:mm:ss'); this.time[1] = dayjs().format('YYYY-MM-DD HH:mm:ss'); break; case 'week': this.time[0] = dayjs() .subtract(1, 'week') .format('YYYY-MM-DD HH:mm:ss'); this.time[1] = dayjs().format('YYYY-MM-DD HH:mm:ss'); break; case 'month': this.time[0] = dayjs() .subtract(1, 'month') .format('YYYY-MM-DD HH:mm:ss'); this.time[1] = dayjs().format('YYYY-MM-DD HH:mm:ss'); break; default: this.time[0] = dayjs().subtract(1, 'month').format('YYYY-MM-DD HH:mm:ss'); this.time[1] = dayjs().format('YYYY-MM-DD HH:mm:ss'); } } } }; </script> <template> <div class="block"> <span class="demonstration">èµ·æ¢æ¶é´ï¼</span> <div class="pick-date"> <el-date-picker v-model="time" type="datetimerange" @@ -84,8 +110,9 @@ end-placeholder="ç»ææ¶é´" value-format="YYYY-MM-DD HH:mm:ss" @change="$emit('submitTime', time)" class="pick-date" /> </div> </div> </template> @@ -101,7 +128,7 @@ font-size: 16px; } .pick-date { margin-top: 5px; } /* .pick-date { width: 200px; } */ </style> src/stores/counter.js
ÎļþÃû´Ó src/stores/counter.ts ÐÞ¸Ä @@ -1,11 +1,12 @@ import { ref, computed } from 'vue' import { defineStore } from 'pinia' export const useCounterStore = defineStore('counter', () => { const count = ref(0) const doubleCount = computed(() => count.value * 2) function increment() { count.value++ function increment(num) { count.value = num + count.value + 1 return 1 } return { count, doubleCount, increment } src/test/TestDrawer.vue
ÎļþÒÑɾ³ý src/test/TestNoData.vue
ÎļþÒÑɾ³ý src/test/TestSelect.vue
ÎļþÒÑɾ³ý src/test/TestWa.vue
ÎļþÒÑɾ³ý src/utils/common.js
@@ -6,6 +6,7 @@ * @createTime:2023-08-18 * @returnsï¼è¶ è¿ä¸ä¸ªæè¿åtrue,ä¸è¶ è¿ä¸ä¸ªæåè¿åfalse */ function isExceedOneMonth(dateStr1, dateStr2) { // è¶ è¿ä¸ä¸ªæï¼è¿åTrueï¼å¦åè¿åFalse // å°æ¥æåç¬¦ä¸²è½¬ä¸ºæ¥æå¯¹è±¡ @@ -49,7 +50,7 @@ } /** * descriptionï¼ç¾åå·æ¯è¾å¤§å° * ç¾åå·æ¯è¾å¤§å° * @paramï¼ aæ¯å¦å¤§äºb * @returnsï¼å¤§äºï¼åè¿åtrueãå¦åè¿åfalse */ @@ -73,12 +74,6 @@ // å建xlsx对象 const xls = XLSX.utils.json_to_sheet(itemsFormatted); // xls['A1'].v = '设å¤ç¼å·'; // xls['B1'].v = 'å¼å¸¸ç±»å'; // xls['C1'].v = 'å°åº'; // xls['D1'].v = 'å¼å§æ¶é´'; // xls['E1'].v = 'ç»ææ¶é´'; // ç¼è¾è¡¨å¤´è¡ ä¿®æ¹è¡¨å¤´ excelColumnsName.forEach(item =>{ xls[item[0]].v = item[1] @@ -91,6 +86,29 @@ } return {isExceedOneMonth,cmpp,exportToExcel} /** * descriptionï¼è¿åæ¶é´æ°ç»ï¼é´é15åéã * @paramï¼ å¼å¸¸çå¼å§,å¼å¸¸ç»ææ¶é´ * @createTime:2023-08-17 * @returnsï¼æ¯å¦12:00:00-13:00:00 æä»¥è¿åçæ°ç»å ç´ æ¯ 12:00:00 ,12:15:00,12:30:00,12:45:00ï¼13:00:00 */ function descFiftyTime(begin, end) { let time = []; if (begin == end) { time.push(begin); return time; } time.push(begin); let temp = dayjs(begin).add(15, 'minute').format('YYYY-MM-DD HH:mm:ss'); while (temp != end) { time.push(temp); temp = dayjs(temp).add(15, 'minute').format('YYYY-MM-DD HH:mm:ss'); } // å ä¸å¼å¸¸çç»ææ¶é´ time.push(temp); return time; } return {isExceedOneMonth,cmpp,exportToExcel,descFiftyTime} } src/utils/exception_common_function/index.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,138 @@ import dayjs from 'dayjs' export default { /** * descriptionï¼è¿åæ¶é´æ°ç»ï¼é´é15åéã * @paramï¼ å¼å¸¸çå¼å§,å¼å¸¸ç»ææ¶é´ * @createTime:2023-08-17 * @returnsï¼æ¯å¦12:00:00-13:00:00 æä»¥è¿åçæ°ç»å ç´ æ¯ 12:00:00 ,12:15:00,12:30:00,12:45:00ï¼13:00:00 */ descFiftyTime(begin, end) { let time = []; if (begin == end) { time.push(begin); return time; } time.push(begin); let temp = dayjs(begin).add(15, 'minute').format('YYYY-MM-DD HH:mm:ss'); while (temp != end) { time.push(temp); temp = dayjs(temp).add(15, 'minute').format('YYYY-MM-DD HH:mm:ss'); } // å ä¸å¼å¸¸çç»ææ¶é´ time.push(temp); return time; }, /** * descriptionï¼è¿åå¼å§æ¶é´çå45åéçæ¶é´ç¹ï¼ç»ææ¶é´å45åéçæ¶é´ç¹ * @paramï¼ å¼å¸¸çå¼å§æ¶é´ï¼å¼å¸¸çç»ææ¶é´ã * @returnsï¼æ°ç»ãtime[0],time[1],time[2],time[3]åå«ä»£è¡¨å¼å¸¸åºé´å45åéçæ¶é´ç¹ï¼å15åéçæ¶é´ç¹,å15åéçæ¶é´ç¹ï¼å45åéçæ¶é´ç¹ */ before45AndAfter45(begin, end) { let time = []; // å䏿®µçå¼å§æ¶é´ const before45MinBegin = dayjs(begin) .subtract(45, 'minute') .format('YYYY-MM-DD HH:mm:ss'); // å䏿®µçç»ææ¶é´ const before15MinBegin = dayjs(begin) .subtract(15, 'minute') .format('YYYY-MM-DD HH:mm:ss'); // å䏿®µçå¼å§æ¶é´ const after15MinBegin = dayjs(end) .add(15, 'minute') .format('YYYY-MM-DD HH:mm:ss'); // å¾å40åé const after45MinEnd = dayjs(end) .add(45, 'minute') .format('YYYY-MM-DD HH:mm:ss'); time.push(before45MinBegin); time.push(before15MinBegin); time.push(after15MinBegin); time.push(after45MinEnd); return time; }, /** * descriptionï¼è¿åæç«ç¹å¨è¯¥æ¶æ®µå岿°æ®çget请æ±åæ° * @paramï¼ ç«ç¹åç§°ï¼ å¼å§æ¶é´ï¼ ç»ææ¶é´ * @returnsï¼å¯¹è±¡ */ requestGetParms(name, begin, end) { return { siteName: name, beginTime: begin, endTime: end }; }, /** * descriptionï¼ç¸å·®å¤å°ä¸ª15åé 计ç®ä¸å æ¬å¼å§æ¶é´ï¼ç»ææ¶é´ã * @paramï¼ å¼å¸¸å¼å§æ¶é´ï¼å¼å¸¸ç»ææ¶é´ * @returnsï¼æ´æ° */ diffFiftyMinutesNum(beginNormal, endNormal) { // å°å¼å§æ¶é´åç»ææ¶é´è½¬æ¢ä¸ºdayjs对象 const start = dayjs(beginNormal).subtract(15, 'minute'); const end = dayjs(endNormal); // 计ç®ç»ææ¶é´åå»å¼å§æ¶é´ä¸é´ç¸å·®å¤å°ä¸ªååé const diffInMinutes = end.diff(start, 'minute'); const diffInTenMinutes = Math.floor(diffInMinutes / 15); return diffInTenMinutes; }, /** * descriptionï¼å¤ædata䏿¯å¦æè¯¥æ¥ææ¶é´ï¼åå¨è¿å该æ¶é´å¯¹åºçæµåº¦å¼ï¼å¦åè¿å-1 * @paramï¼ å ä¸åååºé´çå¼å¸¸æ°æ®ï¼æ¶é´å符串 * @returnsï¼ */ findTimeInExceptionData(data, time) { for (let i = 0; i < data.length; i++) { if (data[i] == null) { continue; } if (data[i]['lst'] == time) { return data[i]['dustValue']; } } return -1; }, /** * descriptionï¼æ ¹æ®å¼å§åç»ææ¶é´,è¿å以15åé为é´éçæ¶é´å对åºçå¼ * @paramï¼ ååºé´çå¼å§æ¶é´ï¼ ååºé´çç»ææ¶é´, å ä¸åååºé´çæ»æ¶é´æ®µçå¼å¸¸æ°æ®ç对象æ°ç» * @returnsï¼å¯¹è±¡ãå å«äºæçº¿å¾çxè½´ï¼yè½´çé ç½®æ°æ® */ keepContinuousByEachFiftyMinutes( intervalStarTime, intervalEndTime, headAndTailExceptionData ) { let xAxis = []; let yAxis = []; let obj = {}; let current = intervalStarTime; let tail = dayjs(intervalEndTime) .add(15, 'minute') .format('YYYY-MM-DD HH:mm:ss'); while (current != tail) { let value = this.findTimeInExceptionData( headAndTailExceptionData, current ); if (value != -1) { xAxis.push(current); yAxis.push(value); } else { xAxis.push(current); yAxis.push(null); } current = dayjs(current) .add(15, 'minute') .format('YYYY-MM-DD HH:mm:ss'); } obj['xAxis'] = xAxis; obj['yAxis'] = yAxis; return obj; }, } src/utils/test.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,5 @@ export default { add(a,b){ return a+b } } src/views/data_management/BusinessReport.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,32 @@ <script> import {useCounterStore} from '@/stores/counter'; export default { data(){ return{ } }, setup(){ const store = useCounterStore() return{ store } }, mounted() { }, methods: { } } </script> <template> <div> ä¸å¡æ¥è¡¨ {{ store.count }} </div> </template> <style scoped> </style> src/views/data_management/DataAccessManagement.vue
src/views/data_management/HistoryData.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,328 @@ <script> import TimeSelectWithShortCuts from '@/sfc/TimeSelectWithShortCuts.vue'; import ScenarioType from '@/sfc/ScenarioType.vue'; import InputSearch from '@/sfc/InputSearch.vue'; import AreaAndmonitorType from '@/sfc/AreaAndmonitorType.vue' import { useCommonFunction } from '../../utils/common.js'; import requetsApi from '@/api/exportExcel/requetsApi.js' import ButtonClick from '@/sfc/ButtonClick.vue' import ButtonExportExcel from '@/sfc/ButtonExportExcel.vue' import dayjs from 'dayjs'; export default { components: { TimeSelectWithShortCuts, ScenarioType, InputSearch, ButtonClick, ButtonExportExcel, AreaAndmonitorType }, data() { return { form: { // ç«ç¹åç§° name: '', // 设å¤ç¼å· number: '', // å¼å§æ¶é´ beginTime: '', // ç»ææ¶é´ endTime: '' }, // è¿åçæ°æ® tableData: [], // è¡¨æ ¼æ°æ® displayData: [], // å½å页 currentPage: 1, // æ¯é¡µæ¡æ° pageSize: 20, total: 0, // å è½½ä¸ loading: false, queryButton: false, exportButton:false, // ç©ºç¶æ isNoData: false, // å·²éä¸çåºæ¯ç±»å scenarioType: [], // è¡¨æ ¼é«åº¦ tableHeight: '500' }; }, setup() { const { isExceedOneMonth, exportToExcel } = useCommonFunction() return { isExceedOneMonth, exportToExcel } }, mounted() { this.backMinuteDataAWeekAgo(); this.calTableHeight(); }, methods: { exportDom() { let params = { 'beginTime': this.form.beginTime, 'endTime': this.form.endTime, } if (this.form.name) { params['siteName'] = this.form.name; } if (this.form.number) { params['mnCode'] = this.form.numbe; } if (this.scenarioType.length != 0) { params['scenarioType'] = this.scenarioType; } this.exportButton = true requetsApi.fetchAlSiteData(params).then(res => { const data = res.data.data if (data.length != 0) { const tableColumns = [ 'name', 'address', 'dutyCompany', 'mnCode', 'typeName', 'dustValue', 'noiseValue', 'lst', 'quality', 'groupName', ] const excelColumns = [['A1', 'ç«ç¹åç§°'], ['B1', 'å°å'], ['C1', 'ä¾åºå'], ['D1', '设å¤ç¼å·'], ['E1', 'ç±»å'], ['F1', 'æ¬å°æµåº¦(mg/m³)'], ['G1', 'åªå£°(dB)'], ['H1', 'ééæ¶é´'], ['I1', 'ç级'], ['J1', 'æå¨åºå¿']] this.exportToExcel(data, tableColumns, excelColumns, 'å岿°æ®è¡¨.xlsx') }else{ ElMessage('æ æ°æ®éè¦å¯¼åº') } this.exportButton = false }) }, // åè½ï¼è¡¨æ ¼é«åº¦æ ¹æ®å 容èªéåº calTableHeight() { const h1 = this.$refs.h1.$el.offsetHeight; const h2 = this.$refs.h2.$el.offsetHeight; // å ¶ä¸ä¸ä¸ª40æ¯çåçæ»å¤è¾¹è· this.tableHeight = `calc(100vh - ${h1}px - ${h2}px - 40px - 40px - var(--el-main-padding) * 2`; }, giveTime(val) { //å°ä¸å½æ åæ¶é´è½¬ä¸ºæå®æ ¼å¼(该ç»ä»¶è¿åçæ åæ¶é´çæ ¼å¼ï¼æä»¥å¿ é¡»çå è¿ä¸ªå½æ°) this.form.beginTime = dayjs(val[0]).format('YYYY-MM-DD HH:mm:ss'); this.form.endTime = dayjs(val[1]).format('YYYY-MM-DD HH:mm:ss'); }, // 页大尿¹åæ¶è§¦å handleSizeChange(val) { this.pageSize = val; // æ¹åæ¯é¡µæ¾ç¤ºæ°ç®æ¶è·³å°å½å页 this.handleCurrentChange(1); }, // 页巿¹åæ¶è§¦å handleCurrentChange(val) { console.log('å½å页为ï¼', val); // å°å½å页å·ç»currentPage this.currentPage = val; // 页é¢ååæ¶è°ç¨ æ¥è¯¢æ°æ®å½æ° this.handleSubmit(); }, //åºå·éå¢ indexMethod(index) { return index + 1 + (this.currentPage - 1) * this.pageSize; }, // æ¥è¯¢æ°æ® handleSubmit() { // if (this.isExceedOneMonth(this.form.beginTime, this.form.endTime)) { // alert('æ¶é´è·¨åº¦ä¸è½è¶ è¿ä¸ä¸ªæ'); // return; // } this.loading = true; this.queryButton = true let params = {}; params['page'] = this.currentPage; params['pageSize'] = this.pageSize; if (this.form.name) { params['siteName'] = this.form.name; } if (this.form.number) { params['mnCode'] = this.form.number; } params['beginTime'] = this.form.beginTime; params['endTime'] = this.form.endTime; if (this.scenarioType.length != 0) { params['scenarioType'] = this.scenarioType.join(); } this.$http.get('/dust/history1', { params: params }).then((response) => { // ä¿åè¿åç this.tableData = response.data.data.rows; this.displayData = this.tableData; this.loading = false; this.queryButton = false if (response.data.data.total == 0) { ElMessage('è¯¥æ¶æ®µæ æ°æ®'); this.loading = false; this.queryButton = false this.isNoData = true; return; } this.total = response.data.data.total; // ç§»é¤ç©ºæ°æ®ç¶æ this.isNoData = false; }); }, backMinuteDataAWeekAgo() { // æå¼é¡µé¢å è½½æè¿ä¸å¨çæ°æ® this.loading = true; // ç»è¾å ¥æ¡è®¾ç½®é»è®¤ç鿩项 let params = {}; params['siteName'] = this.form.name; params['beginTime'] = this.form.beginTime; params['endTime'] = this.form.endTime; this.$http.get('/dust/history1', { params: params }).then((response) => { // ä¿åè¿åç this.tableData = response.data.data.rows; this.displayData = this.tableData; if (response.data.data.total == 0) { ElMessage('è¯¥æ¶æ®µæ æ°æ®'); this.isNoData = true; return; } this.total = response.data.data.total; this.loading = false; }); } } }; </script> <template> <el-row> <el-col ref="h1" class="head-row"> <el-card> <el-form :inline="true"> <div class="demo-form-inline"> <el-row> <el-col> <el-form-item> <AreaAndmonitorType></AreaAndmonitorType> </el-form-item> <el-form-item> <template #label> </template> <InputSearch isNeedDefaultSite="1" @submit-value="(n) => (form.name = n)"> </InputSearch> </el-form-item> <el-form-item> <template #label> <span class="font-label">设å¤ç¼å·:</span> </template> <el-input v-model="form.number" clearable placeholder="请è¾å ¥"></el-input> </el-form-item> <el-form-item> <ScenarioType @submitScenarioType="(val) => (scenarioType = val)"> </ScenarioType> </el-form-item> </el-col> <el-form-item> <TimeSelectWithShortCuts @submit-time="giveTime"></TimeSelectWithShortCuts> </el-form-item> </el-row> </div> <div class="button-and-export"> <el-form-item> <!-- <el-button type="primary" @click="handleSubmit" style="margin-left: 10px" ><el-icon style="margin-right: 6px;font-size: 1.2em;"><i-ep-Search/></el-icon>æ¥è¯¢</el-button > <el-button type="success" @click="exportDom" round><el-icon style="margin-right: 6px;margin-bottom:2px;font-size: 1.2em;"><i-ep-Download ></i-ep-Download></el-icon>å¯¼åºæ°æ®</el-button> --> <ButtonClick style="margin-right: 12px;" content="æç´¢" type="primary" :loading="queryButton" @do-search="handleSubmit"></ButtonClick> <ButtonExportExcel content="å¯¼åºæ°æ®" type="success" :loading="exportButton" @do-export="exportDom"></ButtonExportExcel> </el-form-item> </div> </el-form> </el-card> </el-col> </el-row> <el-row> <el-col v-show="!isNoData"> <el-table border size="default" :highlight-current-row="true" :data="displayData" :height="tableHeight" v-loading="loading"> <!--ç»å®ä¸ä¸ªæ¹æ³ï¼å°è¿åå¼èµç»index,å³è¡¨æ ¼æ¯è¡æ°æ®ç䏿 --> <el-table-column type="index" label="åºå·" align="center" fixed :index="indexMethod"></el-table-column> <el-table-column prop="name" label="ç«ç¹åç§°" show-overflow-tooltip></el-table-column> <el-table-column prop="address" label="å°å" align="center" show-overflow-tooltip></el-table-column> <el-table-column prop="dutyCompany" label="ä¾åºå" align="center" show-overflow-tooltip></el-table-column> <el-table-column prop="mnCode" label="设å¤ç¼å·" show-overflow-tooltip></el-table-column> <el-table-column prop="typeName" label="ç±»å" align="center" show-overflow-tooltip></el-table-column> <el-table-column prop="dustValue" label="æ¬å°æµåº¦(mg/m³)" align="center" sortable show-overflow-tooltip></el-table-column> <el-table-column prop="noiseValue" label="åªå£°(dB)" align="center" sortable show-overflow-tooltip></el-table-column> <el-table-column prop="lst" label="ééæ¶é´" sortable align="center" show-overflow-tooltip></el-table-column> <el-table-column prop="quality" label="ç级" align="center" show-overflow-tooltip></el-table-column> <el-table-column prop="groupName" label="æå¨åºå¿" align="center" show-overflow-tooltip> </el-table-column> </el-table> <!--size-change æ¯pageSize æ¹åæ¶ä¼è§¦åçäºä»¶,handleSizeChangeæ¯äºä»¶å¤ç彿° current-change æ¯currentPage æ¹åæ¶ä¼è§¦åçäºä»¶ --> <el-pagination ref="h2" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="total" layout="total,sizes, prev, pager, next, jumper" :current-page="currentPage"></el-pagination> </el-col> <el-empty v-show="isNoData" :image-size="200" /> </el-row> </template> <style lang="scss" scoped> // æ´ä½å·¦å¤è¾¹è· .el-row { margin-left: 10px; } .head-row { margin: 10px 0px; } .el-card { border-radius: 9px; } .font-label { margin-top: 3px; font-weight: bold; } .demo-form-inline { display: flex; } .button-and-export { display: flex; justify-content: flex-end; /* ä»è¡å°¾ä½ç½®å¼å§æå */ } .el-pagination { margin: 10px 0px; } </style> src/views/exception/FlightInspection.vue
@@ -1,15 +1,16 @@ <script> 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 InputSearch from '@/sfc/InputSearch.vue'; import ExceptionType from '@/sfc/ExceptionType.vue'; import TimeSelectWithShortCuts from '@/sfc/TimeSelectWithShortCuts.vue'; import DustExceptionText from './components/DustExceptionText.vue'; import { useFetch } from '../../utils/fetch.js'; import { useCommonFunction } from '../../utils/common.js'; import AreaAndmonitorType from '../../sfc/AreaAndmonitorType.vue' import AreaAndmonitorType from '@/sfc/AreaAndmonitorType.vue' import ButtonClick from '@/sfc/ButtonClick.vue' import index from '@/utils/exception_common_function/index.js' // å¼å¸¸å¾å½¢å¼æ¥ç»ä»¶ const DustLineChart = defineAsyncComponent(() => import('../../sfc/DustLineChart.vue') import('./components/DustLineChart.vue') ); import dayjs from 'dayjs'; @@ -20,6 +21,7 @@ TimeSelectWithShortCuts, DustExceptionText, DustLineChart, ButtonClick, AreaAndmonitorType }, data() { @@ -169,7 +171,6 @@ }, // å½éæ©çæ¶é´åçååæ¶ï¼å¼å¸¸åæé¨åçå¼å¸¸åºéºæ°é忥åå beginTime() { this.getShopNames(); }, @@ -181,31 +182,14 @@ } }, 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.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ï¼ @@ -226,35 +210,12 @@ this.selectedRowIndex = this.displayData.indexOf(this.tableCurrentRowData); }, /** * descriptionï¼è¿åæ¶é´æ°ç»ï¼ä»å¼å§æ¶é´çå15åéå°ç»ææ¶é´ä¸ºæ¢ã * @paramï¼ å¼å¸¸çå¼å§,å¼å¸¸ç»ææ¶é´ * @createTime:2023-08-17 * @returnsï¼æ¯å¦12:00:00-13:00:00 æä»¥è¿åçæ°ç»å ç´ æ¯ 12:00:00 ,12:15:00,12:30:00,12:45:00ï¼13:00:00 */ descTenTime(begin, end) { let time = []; if (begin == end) { time.push(begin); return time; } time.push(begin); let temp = dayjs(begin).add(15, 'minute').format('YYYY-MM-DD HH:mm:ss'); while (temp != end) { time.push(temp); temp = dayjs(temp).add(15, 'minute').format('YYYY-MM-DD HH:mm:ss'); } // å ä¸å¼å¸¸çç»ææ¶é´ time.push(temp); return time; }, /** * descriptionï¼æçµææç½æ¶è®¾ç½®çè¡¨æ ¼æ°æ® */ setOfflineTbleData(){ // æ æ°æ®æ¶çæ¶é´æ°ç» æ¶é´ç¸å·®15åé const abnormalTimeTenMinute = this.descTenTime( const abnormalTimeTenMinute = index.descFiftyTime( this.tableCurrentRowData.beginTime, this.tableCurrentRowData.endTime ); @@ -275,63 +236,9 @@ this.exceptionTotal = abnormalTimeTenMinute.length; }, /** * descriptionï¼è¿åå¼å§æ¶é´çå45åéçæ¶é´ç¹ï¼ç»ææ¶é´å45åéçæ¶é´ç¹ * @paramï¼ å¼å¸¸çå¼å§æ¶é´ï¼å¼å¸¸çç»ææ¶é´ã * @returnsï¼æ°ç»ãtime[0],time[1],time[2],time[3]åå«ä»£è¡¨å¼å¸¸åºé´å45åéçæ¶é´ç¹ï¼å15åéçæ¶é´ç¹,å15åéçæ¶é´ç¹ï¼å45åéçæ¶é´ç¹ */ before45AndAfter45(begin, end) { let time = []; // å䏿®µçå¼å§æ¶é´ const before45MinBegin = dayjs(begin) .subtract(45, 'minute') .format('YYYY-MM-DD HH:mm:ss'); // å䏿®µçç»ææ¶é´ const before15MinBegin = dayjs(begin) .subtract(15, 'minute') .format('YYYY-MM-DD HH:mm:ss'); // å䏿®µçå¼å§æ¶é´ const after15MinBegin = dayjs(end) .add(15, 'minute') .format('YYYY-MM-DD HH:mm:ss'); // å¾å40åé const after45MinEnd = dayjs(end) .add(45, 'minute') .format('YYYY-MM-DD HH:mm:ss'); time.push(before45MinBegin); time.push(before15MinBegin); time.push(after15MinBegin); time.push(after45MinEnd); return time; }, /** * descriptionï¼è¿åæç«ç¹å¨è¯¥æ¶æ®µå岿°æ®çget请æ±åæ° * @paramï¼ ç«ç¹åç§°ï¼ å¼å§æ¶é´ï¼ ç»ææ¶é´ * @returnsï¼å¯¹è±¡ */ requestGetParms(name, begin, end) { return { siteName: name, beginTime: begin, endTime: end }; }, /** * descriptionï¼ç¸å·®å¤å°ä¸ª15åé 计ç®ä¸å æ¬å¼å§æ¶é´ï¼ç»ææ¶é´ã * @paramï¼ å¼å¸¸å¼å§æ¶é´ï¼å¼å¸¸ç»ææ¶é´ * @returnsï¼æ´æ° */ diffFiftyMinutesNum(beginNormal, endNormal) { // å°å¼å§æ¶é´åç»ææ¶é´è½¬æ¢ä¸ºdayjs对象 const start = dayjs(beginNormal).subtract(15, 'minute'); const end = dayjs(endNormal); // 计ç®ç»ææ¶é´åå»å¼å§æ¶é´ä¸é´ç¸å·®å¤å°ä¸ªååé const diffInMinutes = end.diff(start, 'minute'); const diffInTenMinutes = Math.floor(diffInMinutes / 15); return diffInTenMinutes; }, // æ®µçµææç½åºé´æ æ°æ®ï¼éè¦è¡¥å ãå ¶ä»çé½ææ°æ®ï¼ç´æ¥ä¸æ¬¡è¯·æ±å ¨é¨æ¶æ®µå°±å¥½ // æ ¹æ®å¼å¸¸åºé´æé åå端é¦å°¾ ååºé´ ä¸é´åºé´ ååºé´ @@ -362,7 +269,7 @@ let timeAndValue = {}; // 仿·»å äºé¦ä½åºé´çå¼å§åç»ææ¶é´è¿è¡éå ä¿è¯æ¶é´ä»¥10åé为é´é timeAndValue = this.keepContinuousByEachFiftyMinutes( timeAndValue = index.keepContinuousByEachFiftyMinutes( allTime[0], allTime[3], this.dialog.allExceptionTimeData @@ -384,59 +291,7 @@ }); }, /** * descriptionï¼å¤ædata䏿¯å¦æè¯¥æ¥ææ¶é´ï¼åå¨è¿å该æ¶é´å¯¹åºçæµåº¦å¼ï¼å¦åè¿å-1 * @paramï¼ å ä¸åååºé´çå¼å¸¸æ°æ®ï¼æ¶é´å符串 * @returnsï¼ */ findTimeInExceptionData(data, time) { for (let i = 0; i < data.length; i++) { if (data[i] == null) { continue; } if (data[i]['lst'] == time) { return data[i]['dustValue']; } } return -1; }, /** * descriptionï¼æ ¹æ®å¼å§åç»ææ¶é´,è¿å以15åé为é´éçæ¶é´å对åºçå¼ * @paramï¼ ååºé´çå¼å§æ¶é´ï¼ ååºé´çç»ææ¶é´, å ä¸åååºé´çæ»æ¶é´æ®µçå¼å¸¸æ°æ®ç对象æ°ç» * @returnsï¼å¯¹è±¡ãå å«äºæçº¿å¾çxè½´ï¼yè½´çé ç½®æ°æ® */ keepContinuousByEachFiftyMinutes( intervalStarTime, intervalEndTime, headAndTailExceptionData ) { let xAxis = []; let yAxis = []; let obj = {}; let current = intervalStarTime; let tail = dayjs(intervalEndTime) .add(15, 'minute') .format('YYYY-MM-DD HH:mm:ss'); while (current != tail) { let value = this.findTimeInExceptionData( headAndTailExceptionData, current ); if (value != -1) { xAxis.push(current); yAxis.push(value); } else { xAxis.push(current); yAxis.push(null); } current = dayjs(current) .add(15, 'minute') .format('YYYY-MM-DD HH:mm:ss'); } obj['xAxis'] = xAxis; obj['yAxis'] = yAxis; return obj; }, /** * descriptionï¼ç»å¶æçº¿å¾ @@ -891,13 +746,13 @@ // beforeAndAfterTime[1]:å15åéçæ¶é´ç¹ // beforeAndAfterTime[2]:å15åéçæ¶é´ç¹ // beforeAndAfterTime[3]:å45åéçæ¶é´ç¹ let beforeAndAfterTime = this.before45AndAfter45( let beforeAndAfterTime = index.before45AndAfter45( exceptionBeginTime, exceptionEndTime ); // æé å¼å¸¸æ¶é´åååºé´æ°æ®è¯·æ±åæ°(é¤äºæç½ä¸é½ç¨å°ï¼ let paramsAllTime = this.requestGetParms( let paramsAllTime = index.requestGetParms( this.tableCurrentRowData.name, beforeAndAfterTime[0], beforeAndAfterTime[3] @@ -924,7 +779,7 @@ // å¾å°ä¸ä¸è¡çæ°æ® this.tableCurrentRowData = this.displayData[this.selectedRowIndex] let params = this.requestGetParms(this.tableCurrentRowData.name,this.tableCurrentRowData.beginTime,this.tableCurrentRowData.endTime) let params = index.requestGetParms(this.tableCurrentRowData.name,this.tableCurrentRowData.beginTime,this.tableCurrentRowData.endTime) this.loading.preButton = true this.$http .get('/dust/history', { params: params }) @@ -960,7 +815,7 @@ // å¾å°ä¸ä¸è¡çæ°æ® this.tableCurrentRowData = this.displayData[this.selectedRowIndex] let params = this.requestGetParms(this.tableCurrentRowData.name,this.tableCurrentRowData.beginTime,this.tableCurrentRowData.endTime) let params = index.requestGetParms(this.tableCurrentRowData.name,this.tableCurrentRowData.beginTime,this.tableCurrentRowData.endTime) this.loading.afterButton = true this.$http .get('/dust/history', { params: params }) @@ -1360,7 +1215,7 @@ </el-form-item> <el-form-item> <InputSearch :isNeedDefaultSite="0" isNeedDefaultSite="0" @submit-value="(n) => (form.name = n)" @submit-site-Nums="(n) => (siteTotal = n)" > @@ -1380,7 +1235,8 @@ <div class="head-container-search"> <el-form-item> <el-button type="warning" :loading="loading.queryButton" @click="handleSubmit">æ¥è¯¢</el-button> <!-- <el-button type="warning" :loading="loading.queryButton" @click="handleSubmit">æ¥è¯¢</el-button> --> <ButtonClick content="åæ" type="warning" :loading="loading.queryButton" @do-search="handleSubmit"></ButtonClick> </el-form-item> </div> </el-form> @@ -1608,7 +1464,7 @@ <!-- æ 头 --> <div class="card-text1"> <image class="card-header-image"></image> <span class="card-header-text">æ»å¨å¹³åå¼å¼å¸¸</span> <span class="card-header-text">ååè¶å¿å¼å¸¸</span> </div> <div class="card-content-text"> @@ -1745,7 +1601,7 @@ <!-- æ 头 --> <div class="card-text1"> <image class="card-header-image"></image> <span class="card-header-text">æçµææç½</span> <span class="card-header-text">æ°æ®ç¼ºå¤±å¼å¸¸</span> </div> <div class="card-content-text"> @@ -2009,7 +1865,7 @@ ref="table" :data="displayData" :height="tableHeight" highlight-current-row="true" :highlight-current-row="true" size="default" v-loading="loading.tableLoading" border @@ -2333,10 +2189,7 @@ /* æ¥ç详æ å¯¹è¯æ¡æ¨¡åçæ ·å¼ */ :deep(.el-dialog) { // å¯¹è¯æ¡é«åº¦ } .diag-head { // å¯¹è¯æ¡å¤´é¨åºå min-height: 200px; @@ -2361,11 +2214,6 @@ border: 2px solid #7bc0fc; } .chart-jump-button { // âä¸ä¸æ¡âï¼âä¸ä¸æ¡â æé® // border: 1px solid #fdc2db; // min-height: 30px; // width: 200px; // float: right; display: flex; justify-content: right; } src/views/exception/SiteAuditAssistance.vue
@@ -1,25 +1,25 @@ <script> import InputSearch from '../../sfc/InputSearch.vue'; import ExceptionType from '../../sfc/ExceptionType.vue'; import TimeSelectWithShortCuts from '../../sfc/TimeSelectWithShortCuts.vue'; import { useFetch } from '../../utils/fetch.js'; import InputSearch from '@/sfc/InputSearch.vue'; import ExceptionType from '@/sfc/ExceptionType.vue'; import TimeSelectWithShortCuts from '@/sfc/TimeSelectWithShortCuts.vue'; import { useCommonFunction } from '../../utils/common.js'; import AreaAndmonitorType from '../../sfc/AreaAndmonitorType.vue' import AreaAndmonitorType from '@/sfc/AreaAndmonitorType.vue'; // å¼å¸¸å¾å½¢å¼æ¥ç»ä»¶ const DustLineChart = defineAsyncComponent(() => import('../../sfc/DustLineChart.vue') import('./components/DustLineChart.vue') ); import submitApi from '@/api/audit/submitApi.js'; import dayjs from 'dayjs'; import ButtonClick from '@/sfc/ButtonClick.vue'; import index from '@/utils/exception_common_function/index.js'; export default { components: { ExceptionType, InputSearch, TimeSelectWithShortCuts, DustLineChart, AreaAndmonitorType AreaAndmonitorType, ButtonClick }, data() { return { @@ -28,8 +28,7 @@ // ç«ç¹åç§° name: '', // éæ©çå¼å¸¸ç±»å exceptionName: [], exceptionName: [] }, beginTime: '', endTime: '', @@ -37,6 +36,8 @@ tableData: [], // è¡¨æ ¼å±ç¤ºçæ°æ® displayData: [], // è¡¨æ ¼åå¤é multipleSelection: [], // è¡¨æ ¼é«åº¦ tableHeight: 400, // è¡¨æ ¼æ°æ® @@ -51,40 +52,6 @@ // å¯¹è¯æ¡æ¾ç¤º dialogTableVisible: false, // ä¿åå¼å¸¸å¯¹åºçåºéºåç§°å设å¤ç¼å· exception: { // æçµææç½ exception0: [], // æ°æ®è¶ ä½ exception1: [], // è¶ æ exception2: [], // æ°æ®é¿æ¶æ®µæ æ³¢å¨ exception3: [], // é级çªåå¼å¸¸ exception4: [], // 临è¿è¶ æ å¼å¸¸ exception5: [], // åæ¥è¶ æ æ¬¡æ°ä¸´çå¼å¸¸ exception6: [], // æ»å¨å¹³åå¼å¼å¸¸ exception7: [], // è¯¥æ¶æ®µçå¼å¸¸æ°é exception0Num: 0, exception1Num: 0, exception2Num: 0, exception3Num: 0, exception4Num: 0, exception5Num: 0, exception6Num: 0, exception7Num: 0, }, // ç«ç¹æ»æ°é siteTotal: 0, // å¼å¸¸çç«ç¹æ»æ°é // exceptionSiteNum:0, // éä¸è¡¨æ ¼å½åè¡çæ°æ® tableCurrentRowData: null, @@ -92,6 +59,7 @@ selectedRowIndex:-2, // 页é¢ä¸çæé®å è½½ç¶æ loading: { submitAudit: false, // æ¥è¯¢æé® queryButton:false, // è¡¨æ ¼å è½½ä¸ @@ -101,8 +69,7 @@ // ä¸ä¸æ¡æé® afterButton: false, // æçº¿å¾ lineChart: false, lineChart: false }, dialog: { @@ -126,18 +93,22 @@ banTouch:0, // 0代表å页ï¼1代表ä¸å页 originClick:0 } }, auditDialog: { visible: false, // å®¡æ ¸äºº checker: 'admin', checkDate: '', checkerNotes: '', enterpriseNotes: '' }, auditTableData: [], auditNumByTime: 0 }; }, setup() { // provide('search',readonly(form)) const { backData, error, request } = useFetch(); const { isExceedOneMonth } = useCommonFunction(); return { backData, error, request, isExceedOneMonth }; }, @@ -167,29 +138,266 @@ } }, // å½éæ©çæ¶é´åçååæ¶ï¼å¼å¸¸åæé¨åçå¼å¸¸åºéºæ°é忥åå beginTime() { this.getShopNames(); }, endTime() { this.getShopNames(); }, dialogTableVisible() { window.addEventListener('resize', this.updateChart); } }, computed: { unCheckedNUm() { return this.total - this.auditNumByTime; }, // å®¡æ ¸æ¯ä¾ checkedRate() { return (this.auditNumByTime / this.total) * 100; } }, mounted() { this.backExceptionDataAWeekAgo(); this.calTableHeight(); // æ¥è¯¢æ¶é´æ®µçåå¼å¸¸çç«ç¹ï¼æ¥è¯¢è¯¥æ¶é´åºé´çåå¼å¸¸æ°é this.getShopNames(); }, methods: { /** * æ¥ç该段æ¶é´å å·²å®¡æ ¸çæ°é * @paramï¼ * @returnsï¼ */ gethasCheckedNumByTime() { submitApi.getAuditNumByTime(this.beginTime, this.endTime).then((res) => { this.auditNumByTime = res.data.data.length; }); }, /** * å¤éåï¼å·²å®¡æ ¸çè¡ä¸ä¼å å ¥å ¶ä¸ï¼ * @param * @returns */ handleSelectionChange(val) { console.log('éä¸çè¡ä¸ºï¼', val); this.multipleSelection = val.filter((row) => row.auditStatus != 3); }, /** * è§¦åæ¹éå®¡æ ¸ * @paramï¼ * @returnsï¼ */ quickReview() { if (this.multipleSelection.length != 0) { ElMessageBox.confirm('ç¡®å®è¦æ¹éå®¡æ ¸å?', { confirmButtonText: '确认', cancelButtonText: 'åæ¶', type: 'warning', center: true }).then(() => { this.noNoteCheck(this.multipleSelection); setTimeout(() => { this.gethasCheckedNumByTime(); ElMessage.success('æ¹éå®¡æ ¸å®æ'); }, 1500); }); } else { ElMessage('æªéä¸è¡¨æ ¼çè¡'); } }, /** * æ¸ é¤å·²éä¸çè¡¨æ ¼è¡ï¼ * @paramï¼ * @returnsï¼ */ clearSelected() { this.$refs.table.clearSelection(); }, toggleSelection() { this.$refs.table.clearSelection(); }, /** *æäº¤æ¹éå®¡æ ¸ãé»è®¤å®¡æ ¸äººï¼ç©ºå¤æ³¨ * @paramï¼ éè¦å¿«éå®¡æ ¸çè¡ * @returnsï¼ */ noNoteCheck(rows) { rows.forEach((item) => { submitApi.submitAudit('admin', 'æ ', 'æ ', item.id, 3); item.auditStatus = 3; }); }, close() { // if (this.auditDialog.checkerNotes || this.auditDialog.enterpriseNotes) { // ElMessageBox.confirm('è¿å°ä¼ï¼ç¡®å®è¦å ³éå', 'æç¤º', // { // confirmButtonText: 'ç¡®å®', // cancelButtonText: 'åæ¶', // type: 'warning', // center :'true', // icon: markRaw(Delete), // draggable: true, // }).then(() => { // ElMessage({ // type: 'success', // message: 'å·²å ³é', // }) // this.auditDialog.visible = false // }) // }else{ // this.auditDialog.visible = false // } this.auditDialog.visible = false; }, // è¡¨æ ¼è¡çé¢è² tableRowClassName({ row }) { if (row.auditStatus == 0) { return 'black-row'; } else if (row.auditStatus == 1 || row.auditStatus == 2) { return 'deep-gray-row'; } else { return 'complete--gray-row'; } }, /** * åè¯·æ± * @paramï¼å®¡æ ¸äººï¼å®¡æ ¸äººå¤æ³¨ï¼ä¼ä¸å¤æ³¨ï¼å¼å¸¸è®°å½ç¼å· 该æ¡å¼å¸¸çå®¡æ ¸ç¶æ * @returnsï¼ */ sendAudit(user, checker, enterprise, exceptionId, status) { submitApi .submitAudit( user, this.auditDialog.checkerNotes, this.auditDialog.enterpriseNotes, exceptionId, status ) .then((res) => { if (res.data.code == 1) { ElMessage.success('æäº¤æå'); this.tableCurrentRowData.auditStatus = status; this.tableCurrentRowData.checker = user; if (checker) { this.tableCurrentRowData.checkerContent = checker; } if (enterprise) { this.tableCurrentRowData.enterpriseContent = enterprise; } } else { ElMessage.warning('æäº¤å¤±è´¥'); } this.loading.submitAudit = false; this.auditDialog.visible = false; }); }, // æ´æ°å®¡æ ¸å 容 updateAud(exceptionId, checkerContent, enterpriseContent, auditStatus) { submitApi .updateAudit( exceptionId, checkerContent, enterpriseContent, auditStatus ) .then((res) => { if (res.data.code == 1) { ElMessage.success('æäº¤æå'); this.tableCurrentRowData.auditStatus = auditStatus; if (checkerContent) { this.tableCurrentRowData.checkerContent = checkerContent; } if (enterpriseContent) { this.tableCurrentRowData.enterpriseContent = enterpriseContent; } } else { ElMessage.warning('æäº¤å¤±è´¥'); } this.loading.submitAudit = false; this.auditDialog.visible = false; }); }, /** * æäº¤å®¡æ ¸ * @paramï¼ * @returnsï¼ */ submitAudit() { // åæ¶å¡«åäºå®¡æ ¸äººååä¼ä¸ç夿³¨ this.loading.submitAudit = true; if (this.auditDialog.checkerNotes && this.auditDialog.enterpriseNotes) { this.sendAudit( this.auditDialog.checker, this.auditDialog.checkerNotes, this.auditDialog.enterpriseNotes, this.tableCurrentRowData.id, 3 ); } // åªå¡«äºå®¡æ ¸äººå夿³¨ else if ( this.auditDialog.checkerNotes && !this.auditDialog.enterpriseNotes ) { // ç¬¬ä¸æ¬¡å建 if (this.tableCurrentRowData.auditStatus == 0) { this.sendAudit( this.auditDialog.checker, this.auditDialog.checkerNotes, this.auditDialog.enterpriseNotes, this.tableCurrentRowData.id, 1 ); } // åªæ´æ° else { this.updateAud( this.tableCurrentRowData.id, this.auditDialog.checkerNotes, this.auditDialog.enterpriseNotes, 3 ); } } // åªå¡«äºä¼ä¸å¤æ³¨å¤æ³¨ else if ( this.auditDialog.enterpriseNotes && !this.auditDialog.checkerNotes ) { // ç¬¬ä¸æ¬¡å建 if (this.tableCurrentRowData.auditStatus == 0) { this.sendAudit( this.auditDialog.checker, this.auditDialog.checkerNotes, this.auditDialog.enterpriseNotes, this.tableCurrentRowData.id, 2 ); } else { // åªæ´æ° this.updateAud( this.tableCurrentRowData.id, this.auditDialog.checkerNotes, this.auditDialog.enterpriseNotes, 3 ); } } else { ElMessage.warning('请填å宿´æè½æäº¤'); } this.loading.submitAudit = false; // æ¸ é¤ this.auditDialog.checkerNotes = ''; this.auditDialog.enterpriseNotes = ''; }, /** * å¼¹åºå¯¹è¯æ¡å¹¶ä¸ä¿åå½åè¡æ°æ® * @paramï¼ * @createTime:2023-08-17 * @returnsï¼ */ openAuditDiag(row) { this.auditDialog.visible = true; this.tableCurrentRowData = row; console.log(row); }, /** * descriptionï¼ç¹å»å¼å¸¸ç«ç¹ååæ¶ è¿åçæ°æ® @@ -198,48 +406,27 @@ * @returnsï¼ */ getAbnormalDataByClick(val) { this.flag.originClick = 1 this.flag.originClick = 1; this.tableData = val this.total = this.tableData.length this.tableData = val; this.total = this.tableData.length; // é»è®¤æ¾ç¤ºç¬¬ä¸é¡µ this.handleCurrentChange(1); }, // ç¹å»è¡¨æ ¼çè¡æ¶ selectTableRow() { // è·åå½åè¡çç´¢å¼ this.selectedRowIndex = this.displayData.indexOf(this.tableCurrentRowData); this.selectedRowIndex = this.displayData.indexOf( this.tableCurrentRowData ); }, /** * descriptionï¼è¿åæ¶é´æ°ç»ï¼ä»å¼å§æ¶é´çå15åéå°ç»ææ¶é´ä¸ºæ¢ã * @paramï¼ å¼å¸¸çå¼å§,å¼å¸¸ç»ææ¶é´ * @createTime:2023-08-17 * @returnsï¼æ¯å¦12:00:00-13:00:00 æä»¥è¿åçæ°ç»å ç´ æ¯ 12:00:00 ,12:15:00,12:30:00,12:45:00ï¼13:00:00 */ descTenTime(begin, end) { let time = []; if (begin == end) { time.push(begin); return time; } time.push(begin); let temp = dayjs(begin).add(15, 'minute').format('YYYY-MM-DD HH:mm:ss'); while (temp != end) { time.push(temp); temp = dayjs(temp).add(15, 'minute').format('YYYY-MM-DD HH:mm:ss'); } // å ä¸å¼å¸¸çç»ææ¶é´ time.push(temp); return time; }, /** * descriptionï¼æçµææç½æ¶è®¾ç½®çè¡¨æ ¼æ°æ® */ setOfflineTbleData(){ // æ æ°æ®æ¶çæ¶é´æ°ç» æ¶é´ç¸å·®15åé const abnormalTimeTenMinute = this.descTenTime( const abnormalTimeTenMinute = index.descFiftyTime( this.tableCurrentRowData.beginTime, this.tableCurrentRowData.endTime ); @@ -260,63 +447,6 @@ this.exceptionTotal = abnormalTimeTenMinute.length; }, /** * descriptionï¼è¿åå¼å§æ¶é´çå45åéçæ¶é´ç¹ï¼ç»ææ¶é´å45åéçæ¶é´ç¹ * @paramï¼ å¼å¸¸çå¼å§æ¶é´ï¼å¼å¸¸çç»ææ¶é´ã * @returnsï¼æ°ç»ãtime[0],time[1],time[2],time[3]åå«ä»£è¡¨å¼å¸¸åºé´å45åéçæ¶é´ç¹ï¼å15åéçæ¶é´ç¹,å15åéçæ¶é´ç¹ï¼å45åéçæ¶é´ç¹ */ before45AndAfter45(begin, end) { let time = []; // å䏿®µçå¼å§æ¶é´ const before45MinBegin = dayjs(begin) .subtract(45, 'minute') .format('YYYY-MM-DD HH:mm:ss'); // å䏿®µçç»ææ¶é´ const before15MinBegin = dayjs(begin) .subtract(15, 'minute') .format('YYYY-MM-DD HH:mm:ss'); // å䏿®µçå¼å§æ¶é´ const after15MinBegin = dayjs(end) .add(15, 'minute') .format('YYYY-MM-DD HH:mm:ss'); // å¾å40åé const after45MinEnd = dayjs(end) .add(45, 'minute') .format('YYYY-MM-DD HH:mm:ss'); time.push(before45MinBegin); time.push(before15MinBegin); time.push(after15MinBegin); time.push(after45MinEnd); return time; }, /** * descriptionï¼è¿åæç«ç¹å¨è¯¥æ¶æ®µå岿°æ®çget请æ±åæ° * @paramï¼ ç«ç¹åç§°ï¼ å¼å§æ¶é´ï¼ ç»ææ¶é´ * @returnsï¼å¯¹è±¡ */ requestGetParms(name, begin, end) { return { siteName: name, beginTime: begin, endTime: end }; }, /** * descriptionï¼ç¸å·®å¤å°ä¸ª15åé 计ç®ä¸å æ¬å¼å§æ¶é´ï¼ç»ææ¶é´ã * @paramï¼ å¼å¸¸å¼å§æ¶é´ï¼å¼å¸¸ç»ææ¶é´ * @returnsï¼æ´æ° */ diffFiftyMinutesNum(beginNormal, endNormal) { // å°å¼å§æ¶é´åç»ææ¶é´è½¬æ¢ä¸ºdayjs对象 const start = dayjs(beginNormal).subtract(15, 'minute'); const end = dayjs(endNormal); // 计ç®ç»ææ¶é´åå»å¼å§æ¶é´ä¸é´ç¸å·®å¤å°ä¸ªååé const diffInMinutes = end.diff(start, 'minute'); const diffInTenMinutes = Math.floor(diffInMinutes / 15); return diffInTenMinutes; }, // æ®µçµææç½åºé´æ æ°æ®ï¼éè¦è¡¥å ãå ¶ä»çé½ææ°æ®ï¼ç´æ¥ä¸æ¬¡è¯·æ±å ¨é¨æ¶æ®µå°±å¥½ // æ ¹æ®å¼å¸¸åºé´æé åå端é¦å°¾ ååºé´ ä¸é´åºé´ ååºé´ @@ -330,14 +460,14 @@ */ otherExceptionRequest(allTimeArgs,allTime,exceptionBT,exceptionET) { // æçº¿å¾å è½½ä¸ææ this.loading.lineChart = true this.loading.lineChart = true; this.$http .get('/dust/history', { params: allTimeArgs }) .then((result) => { this.dialog.allExceptionTimeData = result.data.data; // æçµææç½æ¶éæ°è®¾ç½®è¡¨æ ¼ if(this.tableCurrentRowData.exceptionType == '0'){ this.setOfflineTbleData() this.setOfflineTbleData(); } // xè½´æ¥ææ¶é´ @@ -347,7 +477,7 @@ let timeAndValue = {}; // 仿·»å äºé¦ä½åºé´çå¼å§åç»ææ¶é´è¿è¡éå ä¿è¯æ¶é´ä»¥10åé为é´é timeAndValue = this.keepContinuousByEachFiftyMinutes( timeAndValue = index.keepContinuousByEachFiftyMinutes( allTime[0], allTime[3], this.dialog.allExceptionTimeData @@ -356,71 +486,20 @@ dustValue = timeAndValue['yAxis']; // æåå¼å¸¸èµ·å§æ¶é´ç¹å¨æ´ä¸ªåºé´å çæ°æ®ç´¢å¼ let startIndex = dateList.findIndex( (item) => item === exceptionBT ); let startIndex = dateList.findIndex((item) => item === exceptionBT); let endIndex = dateList.findIndex((item) => item === exceptionET); // 设置æçº¿å¾é 置项 this.reSetChart(dateList,dustValue,exceptionBT, exceptionET, this.reSetChart( dateList, dustValue, exceptionBT, exceptionET, startIndex, endIndex) this.loading.lineChart = false }); }, /** * descriptionï¼å¤ædata䏿¯å¦æè¯¥æ¥ææ¶é´ï¼åå¨è¿å该æ¶é´å¯¹åºçæµåº¦å¼ï¼å¦åè¿å-1 * @paramï¼ å ä¸åååºé´çå¼å¸¸æ°æ®ï¼æ¶é´å符串 * @returnsï¼ */ findTimeInExceptionData(data, time) { for (let i = 0; i < data.length; i++) { if (data[i] == null) { continue; } if (data[i]['lst'] == time) { return data[i]['dustValue']; } } return -1; }, /** * descriptionï¼æ ¹æ®å¼å§åç»ææ¶é´,è¿å以15åé为é´éçæ¶é´å对åºçå¼ * @paramï¼ ååºé´çå¼å§æ¶é´ï¼ ååºé´çç»ææ¶é´, å ä¸åååºé´çæ»æ¶é´æ®µçå¼å¸¸æ°æ®ç对象æ°ç» * @returnsï¼å¯¹è±¡ãå å«äºæçº¿å¾çxè½´ï¼yè½´çé ç½®æ°æ® */ keepContinuousByEachFiftyMinutes( intervalStarTime, intervalEndTime, headAndTailExceptionData ) { let xAxis = []; let yAxis = []; let obj = {}; let current = intervalStarTime; let tail = dayjs(intervalEndTime) .add(15, 'minute') .format('YYYY-MM-DD HH:mm:ss'); while (current != tail) { let value = this.findTimeInExceptionData( headAndTailExceptionData, current endIndex ); if (value != -1) { xAxis.push(current); yAxis.push(value); } else { xAxis.push(current); yAxis.push(null); } current = dayjs(current) .add(15, 'minute') .format('YYYY-MM-DD HH:mm:ss'); } obj['xAxis'] = xAxis; obj['yAxis'] = yAxis; return obj; this.loading.lineChart = false; }); }, /** @@ -831,8 +910,7 @@ } ] ] }, } } ], // æå®æ¶é´åºé´ç线段åé¢è² @@ -859,15 +937,14 @@ }; break; default: console.log('没æè®¾ç½®è¯¥å¼å¸¸ç±»åï¼');; console.log('没æè®¾ç½®è¯¥å¼å¸¸ç±»åï¼'); } this.flag.banTouch = 0 this.flag.banTouch = 0; }, /** * descriptionï¼åååºå¼å¸¸èµ·å§æ¶é´ï¼æé 请æ±åä¸åçåæ° */ timeAndDataProcessed() { //å¼å¸¸çå¼å§æ¶é´ ç»ææ¶é´ let exceptionBeginTime = this.tableCurrentRowData.beginTime; let exceptionEndTime = this.tableCurrentRowData.endTime; @@ -876,20 +953,25 @@ // beforeAndAfterTime[1]:å15åéçæ¶é´ç¹ // beforeAndAfterTime[2]:å15åéçæ¶é´ç¹ // beforeAndAfterTime[3]:å45åéçæ¶é´ç¹ let beforeAndAfterTime = this.before45AndAfter45( let beforeAndAfterTime = index.before45AndAfter45( exceptionBeginTime, exceptionEndTime ); // æé å¼å¸¸æ¶é´åååºé´æ°æ®è¯·æ±åæ°(é¤äºæç½ä¸é½ç¨å°ï¼ let paramsAllTime = this.requestGetParms( let paramsAllTime = index.requestGetParms( this.tableCurrentRowData.name, beforeAndAfterTime[0], beforeAndAfterTime[3] ); // å°å¼å¸¸æ°æ®è¿è¡é¢å¤çï¼éåå°ç»æä½ä¸ºæçº¿å¾çé 置项 this.otherExceptionRequest(paramsAllTime,beforeAndAfterTime,exceptionBeginTime,exceptionEndTime) this.otherExceptionRequest( paramsAllTime, beforeAndAfterTime, exceptionBeginTime, exceptionEndTime ); }, /** @@ -899,7 +981,7 @@ // // 䏿¯è¡¨æ ¼çæåä¸è¡ if (this.selectedRowIndex < this.displayData.length - 1) { // ç¹å»è¿ç¨ä¸ éä½ä¸ä¸æ¡æé® å¨è®¾ç½®å®å¾å½¢é 置项åè§£é this.flag.banTouch = 1 this.flag.banTouch = 1; //å¾å°ä¸ä¸è¡æ°æ®ç´¢å¼ this.selectedRowIndex = this.selectedRowIndex + 1; @@ -908,25 +990,22 @@ // this.setinfo(this.selectedRowIndex); // å¾å°ä¸ä¸è¡çæ°æ® this.tableCurrentRowData = this.displayData[this.selectedRowIndex] let params = this.requestGetParms(this.tableCurrentRowData.name,this.tableCurrentRowData.beginTime,this.tableCurrentRowData.endTime) this.loading.preButton = true this.$http .get('/dust/history', { params: params }) .then((response) => { this.tableCurrentRowData = this.displayData[this.selectedRowIndex]; let params = index.requestGetParms( this.tableCurrentRowData.name, this.tableCurrentRowData.beginTime, this.tableCurrentRowData.endTime ); this.loading.preButton = true; this.$http.get('/dust/history', { params: params }).then((response) => { // ä¿åè¿åçè¶ æ æ°æ® this.dialog.historyData = response.data.data; this.dialog.exceptionTotal = response.data.data.length; // é»è¾å¤ç this.timeAndDataProcessed() this.loading.preButton = false this.timeAndDataProcessed(); this.loading.preButton = false; }); } //å¾å°ä¸ä¸è¡æ°æ®ç´¢å¼ // this.selectedRowIndex = this.selectedRowIndex + 1; // this.tableCurrentRowData = this.displayData[this.selectedRowIndex] // console.log('å½åè¡æ°æ®ä¸º:',this.tableCurrentRowData); }, /** * descriptionï¼è·åä¸ä¸æ¡å¼å¸¸ä¿¡æ¯ @@ -935,228 +1014,31 @@ // 䏿¯è¡¨æ ¼ç第ä¸è¡ if (this.selectedRowIndex !== 0) { // ç¹å»è¿ç¨ä¸ éä½ä¸ä¸æ¡æé® å¨è®¾ç½®å®å¾å½¢é 置项åè§£é this.flag.banTouch = 1 this.flag.banTouch = 1; //å¾å°ä¸ä¸è¡æ°æ®ç´¢å¼ this.selectedRowIndex = this.selectedRowIndex - 1; //è¯·æ±æ°æ® æ¹åexceedingData // this.setinfo(this.selectedRowIndex); // å¾å°ä¸ä¸è¡çæ°æ® this.tableCurrentRowData = this.displayData[this.selectedRowIndex] this.tableCurrentRowData = this.displayData[this.selectedRowIndex]; let params = this.requestGetParms(this.tableCurrentRowData.name,this.tableCurrentRowData.beginTime,this.tableCurrentRowData.endTime) this.loading.afterButton = true this.$http .get('/dust/history', { params: params }) .then((response) => { let params = index.requestGetParms( this.tableCurrentRowData.name, this.tableCurrentRowData.beginTime, this.tableCurrentRowData.endTime ); this.loading.afterButton = true; this.$http.get('/dust/history', { params: params }).then((response) => { // ä¿åè¿åçè¶ æ æ°æ® this.dialog.historyData = response.data.data; this.dialog.exceptionTotal = response.data.data.length; // é»è¾å¤ç this.timeAndDataProcessed() this.loading.afterButton = false this.timeAndDataProcessed(); this.loading.afterButton = false; }); } }, /** * descriptionï¼ä»åç»ä»¶è·å¾æç«ç¹è¯¥æ¶æ®µçå¼å¸¸æ°æ® * @createTime:2023-08-18 */ backExceptionData(val1, val2) { this.displayData = val1; this.total = val2; }, /** * descriptionï¼å½ç¨æ·æ¹åæ¥è¯¢çæ¶é´åºé´æ¶ï¼ä¼æ ¹æ®è¯¥åºé´æ¥è¯¢åå¼å¸¸çç«ç¹ï¼æ¥è¯¢è¯¥æ¶é´åºé´çåå¼å¸¸æ°é * @createTime:2023-08-18 */ getShopNames() { /* æ¥è¯¢å¼å¸¸çç«ç¹ */ this.$http .get('/dust/sitenamecode', { params: { exceptionType: '0', beginTime: this.beginTime, endTime: this.endTime } }) .then((result) => { this.exception.exception0 = result.data.data; }); this.$http .get('/dust/sitenamecode', { params: { exceptionType: '1', beginTime: this.beginTime, endTime: this.endTime } }) .then((result) => { this.exception.exception1 = result.data.data; }); this.$http .get('/dust/sitenamecode', { params: { exceptionType: '2', beginTime: this.beginTime, endTime: this.endTime } }) .then((result) => { this.exception.exception2 = result.data.data; }); this.$http .get('/dust/sitenamecode', { params: { exceptionType: '3', beginTime: this.beginTime, endTime: this.endTime } }) .then((result) => { this.exception.exception3 = result.data.data; }); this.$http .get('/dust/sitenamecode', { params: { exceptionType: '4', beginTime: this.beginTime, endTime: this.endTime } }) .then((result) => { this.exception.exception4 = result.data.data; }); this.$http .get('/dust/sitenamecode', { params: { exceptionType: '5', beginTime: this.beginTime, endTime: this.endTime } }) .then((result) => { this.exception.exception5 = result.data.data; }); this.$http .get('/dust/sitenamecode', { params: { exceptionType: '6', beginTime: this.beginTime, endTime: this.endTime } }) .then((result) => { this.exception.exception6 = result.data.data; }); /* å¼å¸¸å¼å¸¸æ°é */ this.$http .get('/dust/exceptionnum', { params: { exceptionType: '0', beginTime: this.beginTime, endTime: this.endTime } }) .then((result) => { this.exception.exception0Num = result.data.data; }); this.$http .get('/dust/exceptionnum', { params: { exceptionType: '1', beginTime: this.beginTime, endTime: this.endTime } }) .then((result) => { this.exception.exception1Num = result.data.data; }); this.$http .get('/dust/exceptionnum', { params: { exceptionType: '2', beginTime: this.beginTime, endTime: this.endTime } }) .then((result) => { this.exception.exception2Num = result.data.data; }); this.$http .get('/dust/exceptionnum', { params: { exceptionType: '3', beginTime: this.beginTime, endTime: this.endTime } }) .then((result) => { this.exception.exception3Num = result.data.data; }); this.$http .get('/dust/exceptionnum', { params: { exceptionType: '4', beginTime: this.beginTime, endTime: this.endTime } }) .then((result) => { this.exception.exception4Num = result.data.data; }); this.$http .get('/dust/exceptionnum', { params: { exceptionType: '5', beginTime: this.beginTime, endTime: this.endTime } }) .then((result) => { this.exception.exception5Num = result.data.data; }); this.$http .get('/dust/exceptionnum', { params: { exceptionType: '6', beginTime: this.beginTime, endTime: this.endTime } }) .then((result) => { this.exception.exception6Num = result.data.data; }); }, /** * descriptionï¼è¯·æ±å¼å¸¸çåºéºåå * @paramï¼å¼å¸¸ç±»åï¼å¼å§æ¶é´ï¼ç»ææ¶é´ * @createTime:2023-08-18 * @returnsï¼ å¼å¸¸çæ°æ® */ // getSiteNameByExceptionType(exception, beginT, endT) { // let param = { // exceptionType: exception, // beginTime: beginT, // endTime: endT // }; // this.$http.get('/dust/sitenamecode', { params: param }).then((res) => { // return res.data.data; // }); // return; // }, /** * descriptionï¼æ¾ç¤ºå¯¹è¯æ¡,è¿å该å¼å¸¸æ¶é´æ®µçæææ°æ® @@ -1193,9 +1075,10 @@ this.dialog.historyData = response.data.data; this.dialog.exceptionTotal = response.data.data.length; // é»è¾å¤ç this.timeAndDataProcessed() this.timeAndDataProcessed(); }); }, /** * descriptionï¼æ¡ä»¶æ¥è¯¢å¼å¸¸çæ°æ® * @createTime:2023-08-18 @@ -1205,9 +1088,9 @@ alert('æ¶é´è·¨åº¦ä¸è½è¶ è¿ä¸ä¸ªæ'); return; } this.loading.queryButton = true this.flag.originClick = 0 this.loading.tableLoading = true; this.flag.originClick = 0; let params = {}; params['page'] = this.currentPage; params['pageSize'] = this.pageSize; @@ -1219,24 +1102,27 @@ } params['beginTime'] = this.beginTime; params['endTime'] = this.endTime; this.loading.tableLoading = true; this.loading.queryButton = true; this.$http .get('/dust/exceptiondata', { params: params }) .then((response) => { // ä¿åè¿åç // this.tableData = response.data.data.rows; this.displayData = response.data.data.rows; this.loading.queryButton = false this.loading.tableLoading = false; this.loading.queryButton = false; if (response.data.data.total == 0) { ElMessage('è¯¥æ¶æ®µæ æ°æ®'); this.isNoData = true; return; } this.total = response.data.data.total; this.loading.tableLoading = false; // ç§»é¤ç©ºæ°æ®ç¶æ this.isNoData = false; }); this.gethasCheckedNumByTime(); }, /** @@ -1264,12 +1150,14 @@ if (response.data.data.total == 0) { ElMessage('è¯¥æ¶æ®µæ æ°æ®'); this.loading.tableLoading = false; this.isNoData = true; return; } this.total = response.data.data.total; this.loading.tableLoading = false; this.total = response.data.data.total; }); this.gethasCheckedNumByTime(); }, /** @@ -1287,7 +1175,8 @@ const h2 = this.$refs.h2.$el.offsetHeight; const h4 = this.$refs.h4.$el.offsetHeight; // å ¶ä¸ä¸ä¸ª40æ¯çåçæ»å¤è¾¹è· this.tableHeight = `calc(100vh - ${h1}px - ${h2}px - ${h4}px - 100px - var(--el-main-padding) * 2)`; this.tableHeight = `calc(100vh - ${h1}px - ${h2}px - ${h4}px - 20px - 100px - var(--el-main-padding) * 2)`; // this.tableHeight = `calc(100vh - ${h1}px - ${h4}px - 100px - var(--el-main-padding) * 2)`; }, // 页大尿¹åæ¶è§¦å @@ -1309,7 +1198,6 @@ console.log('å½å页为ï¼', val); // å°å½å页å·ç»currentPage this.currentPage = val; // 页é¢ååæ¶è°ç¨ æ¥è¯¢æ°æ®å½æ° if(this.flag.originClick==0){ @@ -1334,7 +1222,6 @@ </script> <template> <el-row ref="h1"> <el-col> <el-form :inline="true"> @@ -1344,41 +1231,72 @@ </el-form-item> <el-form-item> <InputSearch :isNeedDefaultSite="0" isNeedDefaultSite="0" @submit-value="(n) => (form.name = n)" @submit-site-Nums="(n) => (siteTotal = n)" > </InputSearch> </el-form-item> <el-form-item> <TimeSelectWithShortCuts @submit-time="giveTime"></TimeSelectWithShortCuts> <TimeSelectWithShortCuts @submit-time="giveTime" timeType="month" ></TimeSelectWithShortCuts> </el-form-item> <el-form-item> <ExceptionType @submit-value="(n) => form.exceptionName = n" @submit-value="(n) => (form.exceptionName = n)" ></ExceptionType> </el-form-item> </div> <div class="head-container-search"> <span class="head-describtion-text"> éå±±åº {{ beginTime }} ââ {{ endTime }} æ¬å°çæµå¼å¸¸ä¿¡æ¯æ±æ»</span > <el-form-item> <el-button type="warning" :loading="loading.queryButton" @click="handleSubmit">æ¥è¯¢</el-button> <!-- <el-button type="warning" :loading="loading.queryButton" @click="handleSubmit"><el-icon style="margin-right: 6px;font-size: 1.2em;"><i-ep-Search /></el-icon>æ¥è¯¢</el-button> --> <ButtonClick content="æç´¢" type="warning" :loading="loading.queryButton" @do-search="handleSubmit" ></ButtonClick> </el-form-item> </div> </el-form> </el-col> </el-row> <el-row class="head-describtion-text" ref="h2"> <el-row> <span> éå±±åº {{ beginTime }} ââ {{ endTime }} æ¬å°çæµå¼å¸¸ä¿¡æ¯æ±æ»</span> </el-row> </el-row> <el-row class="anasysis" ref="h2"> <el-col :span="6"> <el-card> <el-statistic title="å ¨é¨å®¡æ ¸æ°" :value="total" /> </el-card> </el-col> <el-col :span="6"> <el-card> <el-statistic title="å¾ å®¡æ ¸æ°" :value="unCheckedNUm"> </el-statistic> </el-card> </el-col> <el-col :span="6"> <el-card> <el-statistic title="å·²å®¡æ ¸æ°" :value="auditNumByTime" /> </el-card> </el-col> <el-col :span="6"> <el-card> <el-statistic title="å®¡æ ¸æ¯ä¾" :value="checkedRate"> <template #suffix> % </template> </el-statistic> </el-card> </el-col> </el-row> <el-row> <el-col v-show="!isNoData"> @@ -1386,11 +1304,14 @@ ref="table" :data="displayData" :height="tableHeight" highlight-current-row="true" :highlight-current-row="true" :row-class-name="tableRowClassName" size="default" v-loading="loading.tableLoading" @selection-change="handleSelectionChange" border > <el-table-column type="selection" width="55" align="center" /> <el-table-column type="index" label="åºå·" @@ -1448,17 +1369,60 @@ align="center" show-overflow-tooltip /> <el-table-column label="æä½" align="center"> <el-table-column label="æä½" align="center" width="200" fixed="right"> <template #default="{ row }"> <el-button type="primary" @click="showDialog(row)"> æ¥ç详æ </el-button> <el-button type="primary" class="table-button" @click="showDialog(row)" >æ¥ç详æ </el-button v-if="row.auditStatus == 3" size="default" type="info" @click="openAuditDiag(row)" >å·²å®¡æ ¸</el-button > <el-button type="success" size="default" plain v-else-if="row.auditStatus == 1 || row.auditStatus == 2" @click="openAuditDiag(row)" >å®¡æ ¸</el-button > <el-button v-else size="default" type="danger" @click="openAuditDiag(row)" >å®¡æ ¸</el-button > <!-- <span v-if="row.auditStatus == 3">å·²å®¡æ ¸</span ><span v-else>å®¡æ ¸</span> --> </template> </el-table-column> </el-table> <!-- <el-row ref="h2"> <el-row> --> <div class="check-button"> <el-button type="primary" size="small" :disabled="multipleSelection.length == 0" @click="quickReview" >æ¹éå®¡æ ¸</el-button > <el-button type="primary" size="small" :disabled="multipleSelection.length == 0" @click="clearSelected" >æ¸ é¤éä¸</el-button > </div> <!-- </el-row> </el-row> --> <el-pagination ref="h4" @@ -1476,6 +1440,65 @@ </el-row> <el-empty v-show="isNoData" :image-size="200" /> <el-dialog v-model="auditDialog.visible" :show-close="false" draggable> <template #header> <!-- <div class="title-text">æ·»å 夿³¨</div> --> <span class="title-text">{{ tableCurrentRowData.name }}</span ><span>ç«ç¹å¼å¸¸æ°æ®å®¡æ ¸</span> </template> <el-form label-position="top"> <el-form-item label="å®¡æ ¸äºº"> <el-input v-model="auditDialog.checker"></el-input> </el-form-item> <el-form-item label="å®¡æ ¸æ åµ"> <el-input v-model="auditDialog.checkerNotes" type="textarea" :autosize="true" placeholder="å®¡æ ¸äººåå¡«å" :disabled="tableCurrentRowData.auditStatus == 1" /> </el-form-item> <el-form-item label="ä¼ä¸åé¦"> <el-input v-model="auditDialog.enterpriseNotes" type="textarea" :autosize="true" placeholder="ä¼ä¸å¡«å" :disabled="tableCurrentRowData.auditStatus == 2" /> </el-form-item> </el-form> <el-card> <template #header>å®¡æ ¸è¯¦æ </template> <el-form> <el-form-item label="å®¡æ ¸äºº">{{ tableCurrentRowData.checker }}</el-form-item> <el-form-item label="å®¡æ ¸æ åµ">{{ tableCurrentRowData.checkerContent }}</el-form-item> <el-form-item label="å®¡æ ¸äººå">{{ tableCurrentRowData.enterpriseContent }}</el-form-item> </el-form> </el-card> <template #footer> <span class="dialog-footer"> <el-button @click="close">åæ¶</el-button> <el-button type="primary" :loading="loading.submitAudit" :disabled="tableCurrentRowData.auditStatus == 3" @click="submitAudit" > æäº¤ </el-button> </span> </template> </el-dialog> <el-dialog v-model="dialogTableVisible" draggable align-center height="300px"> <!-- 头 --> @@ -1495,17 +1518,22 @@ <span v-else-if="tableCurrentRowData.exceptionType == '1'" >æ°æ®è¶ ä½</span > <span v-else-if="tableCurrentRowData.exceptionType == '2'">è¶ æ </span> <span v-else-if="tableCurrentRowData.exceptionType == '2'" >è¶ æ </span > <span v-else-if="tableCurrentRowData.exceptionType == '3'" >æ°æ®é¿æ¶é´æ æ³¢å¨</span > <span v-else-if="tableCurrentRowData.exceptionType == '4'" >é级çªåå¼å¸¸</span > <span v-else-if="tableCurrentRowData.exceptionType == '5'" > <span v-else-if="tableCurrentRowData.exceptionType == '5'" >临è¿è¶ æ å¼å¸¸</span > <span v-else-if="tableCurrentRowData.exceptionType == '6'" > <span v-else-if="tableCurrentRowData.exceptionType == '6'" >åæ¥è¶ æ æ¬¡æ°ä¸´çå¼å¸¸</span > <span v-else-if="tableCurrentRowData.exceptionType == '7'" > <span v-else-if="tableCurrentRowData.exceptionType == '7'" >æ»å¨å¹³åå¼å¼å¸¸</span > </div> @@ -1536,14 +1564,13 @@ </div> </template> <!-- :option="dialog.option" --> <!-- å¾å½¢ --> <DustLineChart :option="dialog.option" :is-open-dialog="dialogTableVisible" v-loading="loading.lineChart" ></DustLineChart> > </DustLineChart> <!-- è¡¨æ ¼ --> <div> @@ -1605,11 +1632,7 @@ >å¼å¸¸æ°æ®ï¼</span > <span class="table-line-num">{{ dialog.exceptionTotal }}æ¡</span> <span v-show=" tableCurrentRowData.exceptionType === '0' " > <span v-show="tableCurrentRowData.exceptionType === '0'"> (é»è¾è®¡ç®)</span > </el-tag> @@ -1619,14 +1642,14 @@ <style lang="scss" scoped> .el-row { margin-left: 10px; margin-left: 20px; } /* æ¡ä»¶æ¥è¯¢æ¨¡åçæ ·å¼ */ .head-container-search { // display: flex; // justify-content: flex-end; float: right; display: flex; justify-content: space-between; // float: right; } .head-describtion-text { @@ -1635,110 +1658,73 @@ font-size: 14px; color: gray; } /* æ¡ä»¶æ¥è¯¢æ¨¡åç»æ */ /* å¼å¸¸åææ¨¡åçæ ·å¼ */ .card-text1 { // é»ä½çå¼å¸¸ååé¨å margin: 10px; /*åæ */ .anasysis { margin-bottom: 20px; } .card-text1 + div { // é»ä½çå¼å¸¸ååä¸é¢ç margin: 12px; } .card-exception-buttom { // å¼å¸¸ç«ç¹ææ¬æé®åºå padding: 11px; } .card-header { margin-left: 5px; font-size: 18px; :deep(.el-statistic__head) { font-weight: bold; } .card-content-unnormal { min-height: 200px; border: 2px solid #FFCF8B; border-radius: 20px; } .card-content-normal { min-height: 200px; border: 2px solid red; border-radius: 20px; } .card-header-image { } .card-header-text { font-size: 16px; font-weight: bold; margin-top: 4px; margin-left: 4px; } .card-content-text { white-space: nowrap; } .card-exceptionname-text1 { // å¼å¸¸ç«ç¹å æ¯ font-size: 14px; white-space: nowrap; } .card-exceptionname-text2 { // å¼å¸¸æ°å æ¯çå¤è¾¹è· // margin-left: 50px; font-size: 14px; white-space: nowrap; } .text-blank { // éå· margin-right: 10px; color: #000000; } .card-row { margin-bottom: 10px; } /* å¼å¸¸åææ¨¡åç»æ */ /* åæç»æ */ /* è¡¨æ ¼æ¨¡åçæ ·å¼ */ :global(.el-table .black-row) { color: black; } :global(.el-table .complete--gray-row) { color: #86909c; } :global(.el-table .deep-gray-row) { color: #7f9fcf; } //å¯¹è¯æ¡æ é¢ .el-form-item__labe { font-weight: bold; } .title-text { font-weight: bold; margin-right: 20px; } .check-button { // justify-content: flex-end; float: right; margin-top: 10px; margin-right: 20px; } /* è¡¨æ ¼æ¨¡åç»æ */ /* æ¥ç详æ å¯¹è¯æ¡æ¨¡åçæ ·å¼ */ :deep(.el-dialog) { // å¯¹è¯æ¡é«åº¦ } .diag-head { // å¯¹è¯æ¡å¤´é¨åºå min-height: 200px; // border: 1px solid #fdc2db; } .diag-head-text1 { // å¯¹è¯æ¡å¤´é¨ç屿§å段å ç² font-weight: bold; } .diag-head-text span:nth-child(2) { // å¯¹è¯æ¡å¤´é¨âå¼å¸¸ç±»åâ屿§ // margin-left: 150px; } .diag-head-text > div { // å¯¹è¯æ¡å¼å¸¸æ¶é´æ®µ margin-top: 15px; } .diag-head-text { margin: 10px; padding: 10px; background: linear-gradient(90deg, #00c9ff 0%, #92fe9d 100%); border: 2px solid #7bc0fc; } .chart-jump-button { // âä¸ä¸æ¡âï¼âä¸ä¸æ¡â æé® // border: 1px solid #fdc2db; min-height: 30px; width: 200px; float: right; @@ -1751,11 +1737,12 @@ margin-bottom: 20px; min-width: 600px; } .mx-1 { position: absolute; left: 10px; bottom: 10px; } /* æ¥ç详æ å¯¹è¯æ¡æ¨¡åç»æ */ </style> src/views/exception/components/DustExceptionText.vue
src/views/exception/components/DustLineChart.vue
src/views/line_graph/DataRiskModel.vue
@@ -1,8 +1,8 @@ <!-- æ¥åå¼ --> <script> import TimeSelectWithShortCuts from '../../sfc/TimeSelectWithShortCuts.vue'; import InputSearch from '../../sfc/InputSearch.vue'; import AreaAndmonitorType from '../../sfc/AreaAndmonitorType.vue'; import TimeSelectWithShortCuts from '@/sfc/TimeSelectWithShortCuts.vue'; import InputSearch from '@/sfc/InputSearch.vue'; import AreaAndmonitorType from '@/sfc/AreaAndmonitorType.vue'; import DustRadarChart from './components/DustRadarChart.vue'; import exceptionApi from '@/api/exceptionApi.js'; @@ -361,7 +361,7 @@ </el-form-item> <el-form-item> <InputSearch :isNeedDefaultSite="1" isNeedDefaultSite="1" @submit-value="(n) => (form.name = n)" ></InputSearch> </el-form-item> @@ -388,7 +388,10 @@ shadow="never" > <DustRadarChart :name="['æ°æ®ææç','å ¸åå¼å¸¸å¤ç°ç','å¼å¸¸ç±»åèé度','æ°æ®è¶ æ ç','æ°æ®å¨çº¿ç']" :yData="[bill.valid,bill.exceptionRecurrence,bill.exceptionTypeAggregation,bill.exceeding,bill.online]" ></DustRadarChart> æéï¼{{ ((bill.online*0.1+bill.valid*0.2+bill.exceeding*0.2+bill.exceptionTypeAggregation*0.2+bill.exceptionRecurrence*0.3)*0.01).toFixed(2) }} </el-card> </el-col> <el-col :xs="24" :sm="24" :md="6" :lg="6" :xl="4"> @@ -420,14 +423,7 @@ {{ bill.exceptionRecurrence*100 }}% </el-form-item> </el-form> <!-- <div class="date-text">æå¤§å¼:{{ bill.max }} mg/m³</div> --> <!-- <div>æå°å¼:{{ bill.min }} mg/m³</div> <div>åå¼:{{ bill.avg }} mg/m³</div> <div>æ°æ®ææç:{{ bill.online }}%</div> <div>æ°æ®å¨çº¿ç:{{ bill.valid }}%</div> <div>æ°æ®è¶ æ ç:{{ bill.exceeding }}%</div> <div>å¼å¸¸ç±»åèé度:{{ bill.exceptionTypeAggregation*100 }}%</div> <div>å ¸åå¼å¸¸å¤ç°ç:{{ bill.exceptionRecurrence*100 }}%</div> --> </el-card> </el-col> src/views/line_graph/DataRiskRank.vue
@@ -1,14 +1,12 @@ <script> import TimeSelectWithShortCuts from '../../sfc/TimeSelectWithShortCuts.vue'; // import InputSearch from '../../sfc/InputSearch.vue'; import AreaAndmonitorType from '../../sfc/AreaAndmonitorType.vue'; import TimeSelectWithShortCuts from '@/sfc/TimeSelectWithShortCuts.vue'; import AreaAndmonitorType from '@/sfc/AreaAndmonitorType.vue'; import {useCommonFunction} from '../../utils/common.js'; import requetsApi from '@/api/exportExcel/requetsApi.js' import dayjs from 'dayjs'; export default { components: { TimeSelectWithShortCuts, // InputSearch AreaAndmonitorType }, data() { @@ -26,10 +24,6 @@ // end: '2023-05-15', //ç»ææ¶é´ form: { // ç«ç¹åç§° name: '', // 设å¤ç¼å· number: '', // å¼å§æ¶é´ beginTime: '', // ç»ææ¶é´ @@ -43,14 +37,6 @@ return {cmpp,exportToExcel} }, // watch:{ // pageSize(){ // this.handleSizeChange() // }, // currentPage(){ // this.handleCurrentChange() // }, // }, mounted() { this.form.name = ''; @@ -174,13 +160,11 @@ <div class="search-container"> <el-container> <el-main> <el-form :inline="true" :model="form" class="demo-form-inline"> <el-form :inline="true" :model="form" > <el-form-item> <AreaAndmonitorType></AreaAndmonitorType> </el-form-item> <!-- <el-form-item> <InputSearch @submit-value="(n) => (form.name = n)"></InputSearch> </el-form-item> --> <el-form-item> <TimeSelectWithShortCuts @submit-time="giveTime" @@ -194,7 +178,6 @@ <el-card> <el-empty v-show="isNoData" :image-size="200" /> <!-- <LineChart :chartData="option"> </LineChart> --> </el-card> <el-table src/views/line_graph/SiteComprehensiveRskRanking.vue
ÎļþÃû´Ó src/views/origin_data/BusinessReport.vue ÐÞ¸Ä @@ -16,7 +16,7 @@ <template> <div> ä¸å¡æ¥è¡¨ ç«ç¹ç»¼åé£é©æå </div> </template> src/views/line_graph/components/LineChart.vue
@@ -53,11 +53,11 @@ }, }, beforeUnmount() { if (this.chart) { this.chart.dispose(); } }, // beforeUnmount() { // if (this.chart) { // this.chart.dispose(); // } // }, methods: { intiChart() { // å建echartså®ä¾ src/views/login/LoginSystem.vue
@@ -20,6 +20,7 @@ placeholder="请è¾å ¥å¯ç " type="password" size="large" show-password ></el-input> </el-form-item> src/views/origin_data/HistoryData.vue
ÎļþÒÑɾ³ý src/views/pass_login/LoginAndGetData.vue
@@ -0,0 +1,25 @@ <script> export default { data() { return{ } }, mounted() { }, methods: { } } </script> <template> <div> 模æç»å½ </div> </template> <style scoped> </style> src/views/setting/SetConfiguration.vue
@@ -1,34 +1,76 @@ <script> // import DustRadarChart from '../../sfc/DustRadarChart.vue'; // import TimeSelectWithShortCuts from '../../sfc/TimeSelectWithShortCuts.vue' import dayjs from 'dayjs'; import {useCounterStore} from '@/stores/counter'; export default { components :{ // DustRadarChart, // TimeSelectWithShortCuts }, data() { return{ } }, setup(){ const store = useCounterStore() const unsubscribe = store.$onAction( ({ name, // action çåå store, // store å®ä¾ args, // è°ç¨è¿ä¸ª action çåæ° after, // å¨è¿ä¸ª action æ§è¡å®æ¯ä¹åï¼æ§è¡è¿ä¸ªå½æ° onError, // å¨è¿ä¸ª action æåºå¼å¸¸çæ¶åï¼æ§è¡è¿ä¸ªå½æ° }) => { // è®°å½å¼å§çæ¶é´åé const startTime = Date.now() // è¿å°å¨ `store` ä¸çæä½æ§è¡ä¹å触å console.log(`Start "${name}" with params [${args.join(', ')}].`) // 妿 action æåå¹¶ä¸å®å ¨è¿è¡åï¼after å°è§¦åã // å®å°çå¾ ä»»ä½è¿åç promise after((result) => { console.log( `Finished "${name}" after ${ Date.now() - startTime }ms.\nResult: ${result}.` ) }) // 妿 action æåºæè¿å Promise.reject ï¼onError å°è§¦å onError((error) => { console.warn( `Failed "${name}" after ${Date.now() - startTime}ms.\nError: ${error}.` ) }) } ) return{ store,unsubscribe } }, computed:{ a(){ return this.store.doubleCount*2 }, }, mounted() { }, methods: { doThing(){ this.store.increment(5) this.store.doubleCount } } } </script> <template> <div> æ°æ®æ¥å ¥é ç½® <el-button type="primary" @click="doThing">ç¹å»{{ store.doubleCount }}</el-button> </div> <div>{{ a }}</div> <div>{{ store.secret }}</div> <div>{{ store.vue }}</div> <div>{{ store.天 }}</div> </template> <style scoped> </style>