Kaynağa Gözat

楼层默认1F和设备清单table

zhulizhen1111 4 yıl önce
ebeveyn
işleme
8f83437d89

+ 9 - 5
src/components/floorList.vue

@@ -6,7 +6,7 @@
 <template>
     <div class='floor-box'>
         <div class='floor-list'>
-            <i class='el-icon-caret-top icon-top' v-if='showT' @click='removeTop'></i>
+            <i class='el-icon-caret-top icon-top' v-if='showT' @click='removeTop(num)'></i>
             <i class='el-icon-caret-top icon-top' v-else style='color:#ccc'></i>
             <div class='floor-out'>
                 <div class='floor-center'>
@@ -19,7 +19,7 @@
                     >{{item}}</div>
                 </div>
             </div>
-            <i class='el-icon-caret-bottom icon-bottom' v-if='showB' @click='removeBottom'></i>
+            <i class='el-icon-caret-bottom icon-bottom' v-if='showB' @click='removeBottom(num)'></i>
             <i class='el-icon-caret-bottom icon-bottom' v-else style='color:#ccc'></i>
         </div>
     </div>
@@ -37,13 +37,14 @@ export default {
         }
     },
     mounted() {
+        this.removeBottom(-5)
         this.tabFloor()
     },
     computed: {
         ...mapGetters(['floorsArr'])
     },
     methods: {
-        tabFloor(item, index) {
+        tabFloor(item = '1F', index) {
             this.showT = true
             this.showB = true
             this.$cookie.set('floorNow', item, 3)
@@ -51,7 +52,8 @@ export default {
             console.log(index)
             this.$emit('emitFloor', index + 1)
         },
-        removeTop() {
+        removeTop(num) {
+            this.num = num
             var inner = document.querySelectorAll('.floor-item')
             var innerbox = document.querySelector('.floor-center')
             if (this.num < 0) {
@@ -64,7 +66,9 @@ export default {
                 animate(innerbox, { marginTop: 28 * this.num }, 500, function() {})
             }
         },
-        removeBottom() {
+        removeBottom(num) {
+            console.log(num)
+            this.num = num
             var inner = document.querySelectorAll('.floor-item')
             var innerbox = document.querySelector('.floor-center')
             if (this.num > -(inner.length - 4)) {

+ 5 - 3
src/views/equipment/table/eqListTable.vue

@@ -7,7 +7,7 @@
                 size='small'
                 @change='getList'
                 prefix-icon='el-icon-search'
-                v-model='input'
+                v-model='keyword'
                 style='width:310px;margin-right:12px'
             ></el-input>
             <Select @change='getList' width='120' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
@@ -59,7 +59,8 @@ export default {
             currentPage: 1,
             size: 10,
             floorSelect: [],
-            innerVisible: false //详情弹框
+            innerVisible: false, //详情弹框
+            keyword: ''
         }
     },
     computed: {
@@ -91,7 +92,8 @@ export default {
                 page: this.currentPage,
                 size: this.size,
                 plazaId: this.$store.state.plazaId,
-                major: this.major
+                major: this.major,
+                keyword: this.keyword
             }
             queryEquipmentList({ data, postParams }).then(res => {
                 console.log(res)

+ 2 - 3
src/views/equipment/table/standTable.vue

@@ -7,7 +7,7 @@
                 size='small'
                 @change='getList'
                 prefix-icon='el-icon-search'
-                v-model='input'
+                v-model='keyword'
                 style='width:310px;margin-right:12px'
             ></el-input>
             <Select @change='getList' width='120' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
@@ -25,7 +25,7 @@
             <el-pagination
                 background
                 layout='prev, pager, next'
-                :total='total/pageSize'
+                :total='total'
                 :page-size='size'
                 @prev-click='pageChanged'
                 @next-click='pageChanged'
@@ -47,7 +47,6 @@ export default {
     data() {
         return {
             innerVisible: false,
-            input: '',
             pageSize: 10,
             tableData: [],
             total: 0,

+ 1 - 1
src/views/equipment/table/tjTable.vue

@@ -6,7 +6,7 @@
                 size='small'
                 @change='getList'
                 prefix-icon='el-icon-search'
-                v-model='input'
+                v-model='keyword'
                 style='width:200px;margin-right:12px'
             ></el-input>
         </div>