提交 64380986 authored 作者: blu's avatar blu

dingbot

上级 805d44aa
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
module.exports = {
root: true,
env: {
browser: true,
node: true
},
parserOptions: {
parser: 'babel-eslint'
},
extends: [
'@nuxtjs',
'plugin:nuxt/recommended'
],
// add your custom rules here
rules: {
},
"editor.codeActionsOnSave": {
"source.fixAll": true
}
}
# main
> evbox alarm
## Build Setup
``` bash
# install dependencies
$ npm run install
# serve with hot reload at localhost:3000
$ npm run dev
# build for production and launch server
$ npm run build
$ npm run start
# generate static project
$ npm run generate
```
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).
# ASSETS
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).
<template>
<svg class="NuxtLogo" width="245" height="180" viewBox="0 0 452 342" xmlns="http://www.w3.org/2000/svg">
<g fill="none" fill-rule="evenodd">
<path
d="M139 330l-1-2c-2-4-2-8-1-13H29L189 31l67 121 22-16-67-121c-1-2-9-14-22-14-6 0-15 2-22 15L5 303c-1 3-8 16-2 27 4 6 10 12 24 12h136c-14 0-21-6-24-12z"
fill="#00C58E"
/>
<path
d="M447 304L317 70c-2-2-9-15-22-15-6 0-15 3-22 15l-17 28v54l39-67 129 230h-49a23 23 0 0 1-2 14l-1 1c-6 11-21 12-23 12h76c3 0 17-1 24-12 3-5 5-14-2-26z"
fill="#108775"
/>
<path
d="M376 330v-1l1-2c1-4 2-8 1-12l-4-12-102-178-15-27h-1l-15 27-102 178-4 12a24 24 0 0 0 2 15c4 6 10 12 24 12h190c3 0 18-1 25-12zM256 152l93 163H163l93-163z"
fill="#2F495E"
fill-rule="nonzero"
/>
</g>
</svg>
</template>
<style>
.NuxtLogo {
animation: 1s appear;
}
@keyframes appear {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
</style>
# COMPONENTS
**This directory is not required, you can delete it if you don't want to use it.**
The components directory contains your Vue.js Components.
_Nuxt.js doesn't supercharge these components._
<!doctype html>
<html>
<head>
<title>main</title><meta data-n-head="1" charset="utf-8"><meta data-n-head="1" name="viewport" content="width=device-width,initial-scale=1"><meta data-n-head="1" data-hid="description" name="description" content="evbox alarm"><link data-n-head="1" rel="icon" type="image/x-icon" href="/favicon.ico"><link rel="preload" href="/_nuxt/58e9ec714b6ed4b348f4.js" as="script"><link rel="preload" href="/_nuxt/a12f3abc17d496a57cb3.js" as="script"><link rel="preload" href="/_nuxt/44463343bff671188626.js" as="script"><link rel="preload" href="/_nuxt/0aa6835d30e4fb650ad3.js" as="script">
</head>
<body>
<div id="__nuxt"><style>#nuxt-loading{visibility:hidden;opacity:0;position:absolute;left:0;right:0;top:0;bottom:0;display:flex;justify-content:center;align-items:center;flex-direction:column;animation:nuxtLoadingIn 10s ease;-webkit-animation:nuxtLoadingIn 10s ease;animation-fill-mode:forwards;overflow:hidden}@keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}@-webkit-keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}#nuxt-loading>div,#nuxt-loading>div:after{border-radius:50%;width:5rem;height:5rem}#nuxt-loading>div{font-size:10px;position:relative;text-indent:-9999em;border:.5rem solid #f5f5f5;border-left:.5rem solid #fff;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:nuxtLoading 1.1s infinite linear;animation:nuxtLoading 1.1s infinite linear}#nuxt-loading.error>div{border-left:.5rem solid #ff4500;animation-duration:5s}@-webkit-keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}</style><script>window.addEventListener("error",function(){var e=document.getElementById("nuxt-loading");e&&(e.className+=" error")})</script><div id="nuxt-loading" aria-live="polite" role="status"><div>Loading...</div></div></div>
<script type="text/javascript" src="/_nuxt/58e9ec714b6ed4b348f4.js"></script><script type="text/javascript" src="/_nuxt/a12f3abc17d496a57cb3.js"></script><script type="text/javascript" src="/_nuxt/44463343bff671188626.js"></script><script type="text/javascript" src="/_nuxt/0aa6835d30e4fb650ad3.js"></script></body>
</html>
# STATIC
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your static files.
Each file inside this directory is mapped to `/`.
Thus you'd want to delete this README.md before deploying to production.
Example: `/static/robots.txt` is mapped as `/robots.txt`.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).
!function(e){function r(data){for(var r,n,l=data[0],f=data[1],d=data[2],i=0,h=[];i<l.length;i++)n=l[i],Object.prototype.hasOwnProperty.call(o,n)&&o[n]&&h.push(o[n][0]),o[n]=0;for(r in f)Object.prototype.hasOwnProperty.call(f,r)&&(e[r]=f[r]);for(v&&v(data);h.length;)h.shift()();return c.push.apply(c,d||[]),t()}function t(){for(var e,i=0;i<c.length;i++){for(var r=c[i],t=!0,n=1;n<r.length;n++){var f=r[n];0!==o[f]&&(t=!1)}t&&(c.splice(i--,1),e=l(l.s=r[0]))}return e}var n={},o={3:0},c=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var c,script=document.createElement("script");script.charset="utf-8",script.timeout=120,l.nc&&script.setAttribute("nonce",l.nc),script.src=function(e){return l.p+""+{2:"e81a9b55e7d5dae3d0b9"}[e]+".js"}(e);var f=new Error;c=function(r){script.onerror=script.onload=null,clearTimeout(d);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),c=r&&r.target&&r.target.src;f.message="Loading chunk "+e+" failed.\n("+n+": "+c+")",f.name="ChunkLoadError",f.type=n,f.request=c,t[1](f)}o[e]=void 0}};var d=setTimeout((function(){c({type:"timeout",target:script})}),12e4);script.onerror=script.onload=c,document.head.appendChild(script)}return Promise.all(r)},l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(object,e){return Object.prototype.hasOwnProperty.call(object,e)},l.p="/_nuxt/",l.oe=function(e){throw console.error(e),e};var f=window.webpackJsonp=window.webpackJsonp||[],d=f.push.bind(f);f.push=r,f=f.slice();for(var i=0;i<f.length;i++)r(f[i]);var v=d;t()}([]);
\ No newline at end of file
/*!
* vue-router v3.3.2
* (c) 2020 Evan You
* @license MIT
*/
/*!
* BootstrapVue Icons, generated from Bootstrap Icons 1.0.0-alpha4
*
* @link https://icons.getbootstrap.com/
* @license MIT
* https://github.com/twbs/icons/blob/master/LICENSE.md
*/
/*!
* Vue.js v2.6.11
* (c) 2014-2019 Evan You
* Released under the MIT License.
*/
/*!
* vue-client-only v2.0.0
* (c) 2019-present egoist <0x142857@gmail.com>
* Released under the MIT License.
*/
/*!
* vue-no-ssr v1.1.1
* (c) 2018-present egoist <0x142857@gmail.com>
* Released under the MIT License.
*/
/*!
* portal-vue © Thorsten Lünborg, 2019
*
* Version: 2.1.7
*
* LICENCE: MIT
*
* https://github.com/linusborg/portal-vue
*
*/
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.16.1
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{217:function(t,e,n){var content=n(219);"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(54).default)("6759f5ab",content,!0,{sourceMap:!1})},218:function(t,e,n){"use strict";var r=n(217);n.n(r).a},219:function(t,e,n){(e=n(53)(!1)).push([t.i,".center{text-align:center!important;word-wrap:break-word!important}",""]),t.exports=e},220:function(t,e,n){"use strict";n.r(e);n(2),n(1),n(4),n(107),n(88),n(89),n(52);var r=n(18),c=n(65),o=n.n(c),l={mounted:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.getData();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log(e.t0);case 8:case"end":return e.stop()}}),e,null,[[0,5]])})))()},data:function(){var t,e=this;return{getData:(t=Object(r.a)(regeneratorRuntime.mark((function t(n){var r,c,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.a.get("http://evcloudsvc.ilabservice.cloud:8089/ipcstatus?sn=".concat(e.sn));case 2:l=t.sent,e.apiData=null==l||null===(r=l.data)||void 0===r||null===(c=r.data)||void 0===c?void 0:c.detail,console.log(e.apiData);case 5:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)}),apiData:null}},computed:{evboxSn:function(){var t,e;return(null===(t=this.apiData)||void 0===t||null===(e=t.mgrTerminal)||void 0===e?void 0:e.sn)||"不存在"},issues:function(){var t;return null===(t=this.apiData)||void 0===t?void 0:t.issues},issuesProcessed:function(){var t=[];for(var e in this.issues){var n=Object,r=new Date(0);r.setUTCSeconds(this.issues[e].time);var c="".concat(r.getFullYear(),"/").concat(r.getMonth(),"/").concat(r.getDay()," ").concat(r.getHours(),":").concat(r.getMinutes(),":").concat(r.getSeconds()),o=this.issues[e].modId,l=this.issues[e].msg;if(n.time=c,n.mod=o,"AV_OPENINPUT"==e){var v=l.lastIndexOf(": "),d=l.indexOf("rtsp"),f=l.substring(v+2),h=l.substring(d,v);n.title="取流失败",n.body="".concat(f," ").concat(h)}else"AV_MGROFFLINE"==e?n.title="EVB离线":"AV_LOOPRESTART"==e?n.title="频繁重启":"AV_MODOFFLINE"==e?n.title="模块离线":"AV_WRITEPIPE"==e&&(o.includes("evslicer")?n.title="录像失败":o.includes("evpusher")&&(n.title="推流失败"));t.push(n)}return t},sn:function(){return new URLSearchParams(window.location.search).get("sn")},hasIssue:function(){var t,e=null===(t=this.apiData)||void 0===t?void 0:t.issues;return e&&Object.keys(e).length>0},isOffline:function(){var t,e;return null===(t=this.apiData)||void 0===t||null===(e=t.mgrTerminal)||void 0===e?void 0:e.online},classHasProblem:function(){return this.hasIssue||this.isOnline?"alert-danger":"alert-success"}},methods:{connect:function(){console.log("conn")}}},v=(n(218),n(48)),component=Object(v.a)(l,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"grid"},[n("div",{staticClass:"row",class:t.classHasProblem},[n("div",{staticClass:"col-6 center"},[t._v("摄像头序列号: "+t._s(t.sn))]),t._v(" "),n("div",{staticClass:"col-6 center"},[t._v("EVBox序列号: "+t._s(t.evboxSn))])]),t._v(" "),0==t.issuesProcessed.length?n("div",{staticClass:"row col-12 center"},[t._v("\n no issue\n ")]):t._e(),t._v(" "),t._l(t.issuesProcessed,(function(e,r){return n("div",{key:r,staticClass:"row col-12"},[n("b-button",{staticClass:"col-2 center",attrs:{variant:"warning"}},[t._v(t._s(r+1)+" "+t._s(e.title))]),t._v(" "),e.body?n("b-button",{staticClass:"col-8 center",attrs:{variant:"success"}},[t._v(t._s(e.body))]):t._e(),t._v(" "),n("b-button",{staticClass:"col-2 cneter",attrs:{variant:"info"}},[t._v(t._s(e.time))])],1)})),t._v(" "),n("b-link",{attrs:{href:"http://evcloudsvc.ilabservice.cloud:8089/ipcstatus?sn="+t.sn}},[t._v("more details at: http://evcloudsvc.ilabservice.cloud:8089/ipcstatus?sn="+t._s(t.sn))])],2)}),[],!1,null,null,null);e.default=component.exports}}]);
\ No newline at end of file
<!doctype html>
<html>
<head>
<title>main</title><meta data-n-head="1" charset="utf-8"><meta data-n-head="1" name="viewport" content="width=device-width,initial-scale=1"><meta data-n-head="1" data-hid="description" name="description" content="evbox alarm"><link data-n-head="1" rel="icon" type="image/x-icon" href="/favicon.ico"><link rel="preload" href="/_nuxt/58e9ec714b6ed4b348f4.js" as="script"><link rel="preload" href="/_nuxt/a12f3abc17d496a57cb3.js" as="script"><link rel="preload" href="/_nuxt/44463343bff671188626.js" as="script"><link rel="preload" href="/_nuxt/0aa6835d30e4fb650ad3.js" as="script">
</head>
<body>
<div id="__nuxt"><style>#nuxt-loading{visibility:hidden;opacity:0;position:absolute;left:0;right:0;top:0;bottom:0;display:flex;justify-content:center;align-items:center;flex-direction:column;animation:nuxtLoadingIn 10s ease;-webkit-animation:nuxtLoadingIn 10s ease;animation-fill-mode:forwards;overflow:hidden}@keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}@-webkit-keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}#nuxt-loading>div,#nuxt-loading>div:after{border-radius:50%;width:5rem;height:5rem}#nuxt-loading>div{font-size:10px;position:relative;text-indent:-9999em;border:.5rem solid #f5f5f5;border-left:.5rem solid #fff;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:nuxtLoading 1.1s infinite linear;animation:nuxtLoading 1.1s infinite linear}#nuxt-loading.error>div{border-left:.5rem solid #ff4500;animation-duration:5s}@-webkit-keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}</style><script>window.addEventListener("error",function(){var e=document.getElementById("nuxt-loading");e&&(e.className+=" error")})</script><div id="nuxt-loading" aria-live="polite" role="status"><div>Loading...</div></div></div>
<script type="text/javascript" src="/_nuxt/58e9ec714b6ed4b348f4.js"></script><script type="text/javascript" src="/_nuxt/a12f3abc17d496a57cb3.js"></script><script type="text/javascript" src="/_nuxt/44463343bff671188626.js"></script><script type="text/javascript" src="/_nuxt/0aa6835d30e4fb650ad3.js"></script></body>
</html>
importScripts('https://cdn.jsdelivr.net/npm/workbox-cdn@4.3.1/workbox/workbox-sw.js')
// --------------------------------------------------
// Configure
// --------------------------------------------------
// Set workbox config
workbox.setConfig({
"debug": false
})
// Start controlling any existing clients as soon as it activates
workbox.core.clientsClaim()
// Skip over the SW waiting lifecycle stage
workbox.core.skipWaiting()
workbox.precaching.cleanupOutdatedCaches()
// --------------------------------------------------
// Precaches
// --------------------------------------------------
// Precache assets
// --------------------------------------------------
// Runtime Caching
// --------------------------------------------------
// Register route handlers for runtimeCaching
workbox.routing.registerRoute(new RegExp('/_nuxt/'), new workbox.strategies.CacheFirst ({}), 'GET')
workbox.routing.registerRoute(new RegExp('/'), new workbox.strategies.NetworkFirst ({}), 'GET')
# LAYOUTS
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your Application Layouts.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).
<template>
<div>
<nuxt />
</div>
</template>
<style>
html {
font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI',
Roboto, 'Helvetica Neue', Arial, sans-serif;
font-size: 16px;
word-spacing: 1px;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: border-box;
margin: 0;
}
.button--green {
display: inline-block;
border-radius: 4px;
border: 1px solid #3b8070;
color: #3b8070;
text-decoration: none;
padding: 10px 30px;
}
.button--green:hover {
color: #fff;
background-color: #3b8070;
}
.button--grey {
display: inline-block;
border-radius: 4px;
border: 1px solid #35495e;
color: #35495e;
text-decoration: none;
padding: 10px 30px;
margin-left: 15px;
}
.button--grey:hover {
color: #fff;
background-color: #35495e;
}
</style>
# MIDDLEWARE
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your application middleware.
Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).
export default {
mode: 'spa',
/*
** Headers of the page
*/
head: {
title: process.env.npm_package_name || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },
/*
** Global CSS
*/
css: [
],
/*
** Plugins to load before mounting the App
*/
plugins: [
],
/*
** Nuxt.js dev-modules
*/
buildModules: [
// Doc: https://github.com/nuxt-community/eslint-module
//'@nuxtjs/eslint-module'
],
/*
** Nuxt.js modules
*/
modules: [
// Doc: https://bootstrap-vue.js.org
'bootstrap-vue/nuxt',
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
//'@nuxtjs/pwa',
// Doc: https://github.com/nuxt-community/dotenv-module
//'@nuxtjs/dotenv',
//'@nuxtjs/proxy'
],
/*
** Axios module configuration
** See https://axios.nuxtjs.org/options
*/
axios: {
//proxy:true
},
proxy: {
// '/api': {
// target: 'http://evcloudsvc.ilabservice.cloud:8089',
// pathRewrite: {
// '^/api' : '/'
// }
// }
//'/api/': 'http://evcloudsvc.ilabservice.cloud:8089/',
},
/*
** Build configuration
*/
build: {
/*
** You can extend webpack config here
*/
extend (config, ctx) {
}
}
}
{
"name": "main",
"version": "1.0.0",
"description": "evbox alarm",
"author": "burce.lu lzbgt@icloud.com",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore ."
},
"dependencies": {
"nuxt": "^2.0.0",
"bootstrap-vue": "^2.0.0",
"bootstrap": "^4.1.3",
"@nuxtjs/axios": "^5.3.6",
"@nuxtjs/pwa": "^3.0.0-0",
"@nuxtjs/dotenv": "^1.4.0"
},
"devDependencies": {
"@nuxtjs/eslint-config": "^1.0.1",
"@nuxtjs/eslint-module": "^1.0.0",
"babel-eslint": "^10.0.1",
"eslint": "^6.1.0",
"eslint-plugin-nuxt": ">=0.4.2"
}
}
# PAGES
This directory contains your Application Views and Routes.
The framework reads all the `*.vue` files inside this directory and creates the router of your application.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
<template>
<div class='grid'>
<div class='row' :class="classHasProblem">
<div class="col-6 center">摄像头序列号: {{sn}}</div>
<div class="col-6 center">EVBox序列号: {{evboxSn}}</div>
</div>
<div class = 'row col-12 center' v-if='issuesProcessed.length == 0'>
no issue
</div>
<div class="row col-12" v-for="(item, index) in issuesProcessed" v-bind:key="index">
<b-button class="col-2 center" variant="warning">{{index+1}} {{item.title}}</b-button>
<b-button class="col-8 center" variant="success" v-if="item.body">{{item.body}}</b-button>
<b-button class="col-2 cneter" variant="info">{{item.time}}</b-button>
</div>
<b-link :href="`http://evcloudsvc.ilabservice.cloud:8089/ipcstatus?sn=${sn}`">more details at: http://evcloudsvc.ilabservice.cloud:8089/ipcstatus?sn={{sn}}</b-link>
</div>
</template>
<script>
import axios from "axios"
// const apiHost = ''; //'http://192.168.1.104';
export default {
async mounted() {
try {
await this.getData()
} catch (err) {
console.log(err)
}
},
data() {
return {
getData: async e => {
// this.bInScan = true;
// let param = e ? "true" : "false";
const response = await axios.get(`http://evcloudsvc.ilabservice.cloud:8089/ipcstatus?sn=${this.sn}`)
this.apiData = response?.data?.data?.detail
console.log(this.apiData)
},
apiData:null,
};
},
computed: {
evboxSn(){
return this.apiData?.mgrTerminal?.sn||"不存在"
},
issues(){
return this.apiData?.issues
},
issuesProcessed(){
let x = []
for(let e in this.issues){
let obj = Object
let date = new Date(0)
date.setUTCSeconds(this.issues[e]["time"])
let dateStr = `${date.getFullYear()}/${date.getMonth()}/${date.getDay()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`
let mod = this.issues[e]['modId']
let msg = this.issues[e]['msg']
obj["time"] = dateStr
obj["mod"] = mod
if(e == 'AV_OPENINPUT'){
let pos1 = msg.lastIndexOf(': ')
let pos2 = msg.indexOf('rtsp')
let reason = msg.substring(pos1+2)
let rtsp = msg.substring(pos2,pos1)
obj.title = '取流失败'
obj.body = `${reason} ${rtsp}`
}else if(e == 'AV_MGROFFLINE'){
obj.title = 'EVB离线'
}else if(e == 'AV_LOOPRESTART'){
obj.title = '频繁重启'
}else if(e == 'AV_MODOFFLINE'){
obj.title = '模块离线'
}else if(e == 'AV_WRITEPIPE'){
if(mod.includes('evslicer')){
obj.title = '录像失败'
}else if(mod.includes('evpusher')){
obj.title = '推流失败'
}
}
x.push(obj)
}
return x
},
sn(){
let query = new URLSearchParams(window.location.search)
return query.get('sn')
},
hasIssue() {
let issues = this.apiData?.issues
return issues && Object.keys(issues).length > 0
},
isOffline(){
return this.apiData?.mgrTerminal?.online
},
classHasProblem(){
if(this.hasIssue||this.isOnline){
return "alert-danger"
}
return "alert-success"
}
},
methods: {
connect() {
console.log("conn")
}
}
};
</script>
<style>
.center{
text-align: center !important;
word-wrap: break-word !important;
overflow-wrap:break-word !important;
}
</style>
# PLUGINS
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).
# STATIC
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your static files.
Each file inside this directory is mapped to `/`.
Thus you'd want to delete this README.md before deploying to production.
Example: `/static/robots.txt` is mapped as `/robots.txt`.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).
importScripts('https://cdn.jsdelivr.net/npm/workbox-cdn@4.3.1/workbox/workbox-sw.js')
// --------------------------------------------------
// Configure
// --------------------------------------------------
// Set workbox config
workbox.setConfig({
"debug": false
})
// Start controlling any existing clients as soon as it activates
workbox.core.clientsClaim()
// Skip over the SW waiting lifecycle stage
workbox.core.skipWaiting()
workbox.precaching.cleanupOutdatedCaches()
// --------------------------------------------------
// Precaches
// --------------------------------------------------
// Precache assets
// --------------------------------------------------
// Runtime Caching
// --------------------------------------------------
// Register route handlers for runtimeCaching
workbox.routing.registerRoute(new RegExp('/_nuxt/'), new workbox.strategies.CacheFirst ({}), 'GET')
workbox.routing.registerRoute(new RegExp('/'), new workbox.strategies.NetworkFirst ({}), 'GET')
# STORE
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your Vuex Store files.
Vuex Store option is implemented in the Nuxt.js framework.
Creating a file in this directory automatically activates the option in the framework.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论