Преглед изворни кода

增加小班搜索输入框

gcz пре 2 година
родитељ
комит
c2abd897f4
3 измењених фајлова са 32 додато и 7 уклоњено
  1. 8 0
      src/assets/scss/common.scss
  2. 2 2
      src/main.js
  3. 22 5
      src/views/index.vue

+ 8 - 0
src/assets/scss/common.scss

@@ -54,6 +54,14 @@ body {
         overflow: hidden;
     }
 }
+.xiaoban{
+    margin: 20px 0;
+    width: 20vw;
+    margin-left: auto;
+    .title{
+        white-space: nowrap;
+    }
+}
 .nav-wrap {
     position: fixed;
     left: 1vw;

+ 2 - 2
src/main.js

@@ -14,11 +14,11 @@ import dataV from '@jiaminghi/data-view'
 // 引入全局样式文件
 import '@/assets/scss/index.scss'
 
-import { Select, Option, Cascader } from 'element-ui';
+import { Select, Option, Input } from 'element-ui';
 import 'element-ui/lib/theme-chalk/index.css';
 Vue.use(Select);
 Vue.use(Option);
-Vue.use(Cascader);
+Vue.use(Input);
 
 Vue.use(dataV)
 

+ 22 - 5
src/views/index.vue

@@ -46,6 +46,13 @@
         v-model="addrSelectedOptions"
         @change="addrChange">
       </el-cascader> -->
+      <div class="xiaoban u-flex">
+        <div class="title">小班查询:</div>
+        <el-input v-model="xiaobaninput" placeholder="请输入小班号">
+        <i class="el-icon-search el-input__icon" slot="suffix" @click="xiaobansearch">
+        </i>
+        </el-input>
+      </div>
       <section class="scroll-board-wrap blur-wrap">
         <dv-scroll-board class="scroll-board-01" :config="scrollBoardConfig" style="width:100%;height:25vh" />
       </section>
@@ -172,6 +179,7 @@
         page5Char2:{},
         page6numerical:[],
         page6Char1:{},
+        xiaobaninput:'',
       };
     },
     created(){
@@ -191,7 +199,9 @@
       // this.getPage2echarts02();
     },
     mounted(){
-      
+      setInterval(() => {
+        this.getPageData();    
+      }, 111115000);      
     },
     methods: {
       addrChange(value){
@@ -204,18 +214,21 @@
           return
         }
         this.page = index;
-        if(index==1){
+        this.getPageData();
+      },
+      getPageData(){
+        if(this.page==1){
           this.getPage1echarts01();
           this.getPage1echarts02();
-        }else if(index==2){
+        }else if(this.page==2){
           this.getPage2echarts01();
           this.getPage2echarts02();
-        }else if(index==5){
+        }else if(this.page==5){
           this.getPage5numerical();
           this.getPage5echarts01();
           this.getPage5echarts02();
         }
-        else if(index==6){
+        else if(this.page==6){
           this.getPage6numerical();
           this.getPage6echarts01();
           this.getAlarmData();
@@ -329,6 +342,10 @@
         })
       },
 
+      xiaobansearch(){
+        console.log('xiaobansearch');
+      }
+
     },
   }
 </script>