Browse Source

生物安防

xsh 3 years ago
parent
commit
5188112d87
3 changed files with 69 additions and 69 deletions
  1. 14 14
      src/views/Login/Login.vue
  2. 45 45
      src/views/Monit/Monit.vue
  3. 10 10
      src/views/Production/Production.vue

+ 14 - 14
src/views/Login/Login.vue

@@ -21,20 +21,20 @@
           <i class="pwd" slot="prefix"></i>
         </el-input>
         <div style="height: 20px"></div>
-        <el-row :gutter="20">
-          <el-col :span="15">
-            <el-input
-                style="height: 50px"
-                placeholder="请输入验证码"
-                v-model="code"
-                size="large">
-              <i class="pwd" slot="prefix"></i>
-            </el-input>
-          </el-col>
-          <el-col :span="9">
-            <img id="kaptchaImage" :src=" ip + '/admin/my/send'" @click="refset" alt="">
-          </el-col>
-        </el-row>
+<!--        <el-row :gutter="20">-->
+<!--          <el-col :span="15">-->
+<!--            <el-input-->
+<!--                style="height: 50px"-->
+<!--                placeholder="请输入验证码"-->
+<!--                v-model="code"-->
+<!--                size="large">-->
+<!--              <i class="pwd" slot="prefix"></i>-->
+<!--            </el-input>-->
+<!--          </el-col>-->
+<!--          <el-col :span="9">-->
+<!--            <img id="kaptchaImage" :src=" ip + '/admin/my/send'" @click="refset" alt="">-->
+<!--          </el-col>-->
+<!--        </el-row>-->
         <div style="height: 20px"></div>
         <el-button @click="onSubmit" style="width: 100%; height: 50px; background-color: #1ABC9C; color: #fff;" >登录</el-button>
       </div>

+ 45 - 45
src/views/Monit/Monit.vue

@@ -12,61 +12,61 @@
           :props="{value: 'id', label: 'cameraName', children: 'cameraList', expandTrigger: 'hover', disabled: 'runStatus'}"
           :show-all-levels="false"></el-cascader>
       </div>
-      <iframe v-if="isVideo" :src="'static/jinm/index.html?'+'1'+','+ cameraOne +','+ cameraTwo + ',' +'100%' + ',' + '0'" style="width: 100%; height: 100%;" frameborder="0"  allowfullscreen="true"></iframe>
-    </div>
-    <div class="monit-right">
-      <swiper style="height: 100%;  margin-top: auto; margin-bottom: auto;" ref="mySwiper" class="swiper" :options="swiperOption">
-        <swiper-slide v-for="(item, i) in videoList" :key="i">
-          <div class="case">
-            <template v-if="num === 0 && (i === 0 || i === 1 || i === 2)">
-              <iframe  :src="'static/jinm/index.html?'+'1'+','+ item.wsUrl +','+ item.rtspUrl + ',' +'100%' + ',' + '0'" style="width: 100%; height: 100%;" frameborder="0"  allowfullscreen="true"></iframe>
-            </template>
-            <template v-else-if="num === 3 && (i ===3 || i === 4 || i === 5)">
-              <iframe  :src="'static/jinm/index.html?'+'1'+','+ item.wsUrl +','+ item.rtspUrl + ',' +'100%' + ',' + '0'" style="width: 100%; height: 100%;" frameborder="0"  allowfullscreen="true"></iframe>
-            </template>
-          </div>
-        </swiper-slide>
-      </swiper>
+      <iframe v-if="isVideo" :src="'static/jinm/index.html?'+'1'+','+ cameraOne +','+ cameraTwo + ',' +'100%' + ',' + '0'" style="width: 80%; height: 100%; margin: 0 auto;" frameborder="0"  allowfullscreen="true"></iframe>
     </div>
+<!--    <div class="monit-right">-->
+<!--      <swiper style="height: 100%;  margin-top: auto; margin-bottom: auto;" ref="mySwiper" class="swiper" :options="swiperOption">-->
+<!--        <swiper-slide v-for="(item, i) in videoList" :key="i">-->
+<!--          <div class="case">-->
+<!--            <template v-if="num === 0 && (i === 0 || i === 1 || i === 2)">-->
+<!--              <iframe  :src="'static/jinm/index.html?'+'1'+','+ item.wsUrl +','+ item.rtspUrl + ',' +'100%' + ',' + '0'" style="width: 100%; height: 100%;" frameborder="0"  allowfullscreen="true"></iframe>-->
+<!--            </template>-->
+<!--            <template v-else-if="num === 3 && (i ===3 || i === 4 || i === 5)">-->
+<!--              <iframe  :src="'static/jinm/index.html?'+'1'+','+ item.wsUrl +','+ item.rtspUrl + ',' +'100%' + ',' + '0'" style="width: 100%; height: 100%;" frameborder="0"  allowfullscreen="true"></iframe>-->
+<!--            </template>-->
+<!--          </div>-->
+<!--        </swiper-slide>-->
+<!--      </swiper>-->
+<!--    </div>-->
   </div>
 </template>
 
 <script>
-import { swiper, swiperSlide } from 'vue-awesome-swiper'
-import 'swiper/css/swiper.css'
+// import { swiper, swiperSlide } from 'vue-awesome-swiper'
+// import 'swiper/css/swiper.css'
 import {getVideoAll, getVideo, saveVideo, lastVideo, romVideo} from "@/utils/api";
 import axios from "axios";
-const c_swiper = document.getElementsByClassName("swiper")
+// const c_swiper = document.getElementsByClassName("swiper")
 
 export default {
   name: "Monit",
   components: {
-    swiper,
-    swiperSlide,
+    // swiper,
+    // swiperSlide,
   },
   data() {
-    let self = this;
+    // let self = this;
     return {
-      swiperOption: {
-        direction: 'vertical',
-        slidesPerView: 3,
-        slidesPerColumn: 1,
-        slidesPerGroup: 3,
-        // spaceBetween: 30,
-        autoplay: {
-          delay: 10000,
-          disableOnInteraction: false
-        },
-        on: {
-          slideChange() {
-            // console.log(c_swiper[0].swiper)
-            // this.num = c_swiper[0].swiper.activeIndex
-            self.returnNum(c_swiper[0].swiper.activeIndex)
-            // console.log(this.num);
-            // return this.num
-          }
-        }
-      },
+      // swiperOption: {
+      //   direction: 'vertical',
+      //   slidesPerView: 3,
+      //   slidesPerColumn: 1,
+      //   slidesPerGroup: 3,
+      //   // spaceBetween: 30,
+      //   autoplay: {
+      //     delay: 10000,
+      //     disableOnInteraction: false
+      //   },
+      //   on: {
+      //     slideChange() {
+      //       // console.log(c_swiper[0].swiper)
+      //       // this.num = c_swiper[0].swiper.activeIndex
+      //       self.returnNum(c_swiper[0].swiper.activeIndex)
+      //       // console.log(this.num);
+      //       // return this.num
+      //     }
+      //   }
+      // },
       videoId: '',
       isShow: false,
       isVideo: false,
@@ -151,10 +151,10 @@ export default {
   mounted() {
     this.init()
     this.initCrmea();
-    var that = this;
-    this.timer = setInterval(() => {
-     that.initCrmea();
-    }, 60000)
+    // var that = this;
+    // this.timer = setInterval(() => {
+    //  that.initCrmea();
+    // }, 60000)
   },
   beforeDestroy() {
     clearInterval(this.timer);

+ 10 - 10
src/views/Production/Production.vue

@@ -684,17 +684,17 @@ export default {
         type: 2,
       }).then((res) => {
         if (res.code === 10000) {
-          this.monthSales = res.data.nowMoney.toLocaleString();
-          this.monthAmount = res.data.nowQuantity.toLocaleString();
-          this.weekSales = res.data.money;
-          this.weekSalesChange = res.data.moneyPercent;
-          this.weekSalesVolume = res.data.quantity;
-          this.weekSalesVolumeChange = res.data.quantityPercent;
+          this.monthSales = res.data.nowMoney ? res.data.nowMoney.toLocaleString() : 0;
+          this.monthAmount = res.data.nowQuantity ? res.data.nowQuantity.toLocaleString() : 0;
+          this.weekSales =  res.data.money ? res.data.money : 0;
+          this.weekSalesChange = res.data.moneyPercent ? res.data.moneyPercent : 0;
+          this.weekSalesVolume = res.data.quantity ? res.data.quantity : 0;
+          this.weekSalesVolumeChange = res.data.quantityPercent ? res.data.quantityPercent : 0;
           this.salesChartData = {
-            moneyList: res.data.moneyList,
-            moneyList1: res.data.moneyList1,
-            quantityList: res.data.quantityList,
-            timeList: res.data.timeList,
+            moneyList: res.data.moneyList ? res.data.moneyList : [],
+            moneyList1: res.data.moneyList1 ? res.data.moneyList1 : [],
+            quantityList: res.data.quantityList ? res.data.quantityList : [],
+            timeList: res.data.timeList ? res.data.timeList : [],
           };
           this.weekLoading = false;
         }