zhaobao 1 жил өмнө
parent
commit
38d1d9c7aa

+ 2 - 1
src/views/bigScreen/home/components/Map/index.vue

@@ -92,7 +92,7 @@ export default {
       var bounds = [xy(-600, -600), xy(300, 300)]
       this.map = L.map('vmap', {
         crs: L.CRS.Simple, // 一个简单的CRS,可将经度和纬度直接映射到x其中y。可用于平面地图(例如游戏地图)
-        minZoom: 0,
+        minZoom: -0.65,
         maxZoom: 2,
         zoom: 1,
         maxBounds: bounds, // 地图拖动到边界后自动弹回
@@ -100,6 +100,7 @@ export default {
         attributionControl: true,
         zoomControl: true // zoomControl(缩放控制):确定缩放控制是否默认加载在地图上。
       })
+      this.map._onResize()
       this.layerGroup = L.layerGroup().addTo(this.map)
       this.geoLayer = L.geoJson(null, { pmIgnore: false })
       this.geoLayer.addTo(this.map)

+ 31 - 5
src/views/bigScreen/home/components/alertRectifyInfo.vue

@@ -14,7 +14,7 @@
               <td>操作</td>
             </tr>
             <tr v-for="(item,index) in items" :key="index" class="report-item">
-              <td>{{ item.goafSensorAlarmReportTime }}告警整改情况</td>
+              <td>{{ parseTime(item.goafSensorAlarmReportTime,'{y}-{m}-{d}') }}告警整改情况</td>
               <td>{{ item.goafSensorAlarmEndNum }}</td>
               <td>{{ item.goafSensorAlarmFinishNum }}</td>
               <td class="handle">
@@ -25,14 +25,26 @@
           </table>
         </div>
       </vueSeamlessScroll>
+      <div class="pagination-warp" style="text-align: right;">
+        <el-pagination
+          small
+          layout="prev, pager, next"
+          :total="total"
+          :page-size="conditions.limit"
+          background
+          style="background-color:transparent ;"
+          @current-change="changePageNumber"
+        />
+      </div>
     </div>
     <alertRectifyHand ref="alertRectifyHand" @success="handlesuccess" />
   </div>
 </template>
 <script>
-import { getAlertRectifyInfoByList } from '@/api/goaf/alarm'
+import { getAlertRectifyInfoByPage } from '@/api/goaf/alarm'
 import vueSeamlessScroll from 'vue-seamless-scroll'
 import alertRectifyHand from './alertRectifyHand.vue'
+import { parseTime } from '@/utils'
 export default {
   name: 'AlertRectifyInfo',
   components: {
@@ -57,6 +69,10 @@ export default {
         waitTime: 1000
       },
       items: [],
+      conditions: {
+        page: 1,
+        limit: 5
+      },
       total: 0
     }
   },
@@ -64,6 +80,7 @@ export default {
     this.loadData()
   },
   methods: {
+    parseTime,
     dangerStatus(val) {
       const status = ['待提交', '待评审', '待整改', '待验收', '完成']
       return val === -1 ? '撤销' : status[val]
@@ -73,9 +90,10 @@ export default {
       return obj[val] || '--'
     },
     loadData() {
-      getAlertRectifyInfoByList().then((res) => {
+      getAlertRectifyInfoByPage(this.conditions).then((res) => {
         const { data } = res
-        this.items = data
+        this.total = data.totalCount
+        this.items = data.list
       })
     },
     handle(data, type) {
@@ -83,14 +101,22 @@ export default {
     },
     handlesuccess() {
       this.loadData()
+    },
+    changePageNumber(page) {
+      this.conditions.page = page
+      this.loadData()
     }
   }
 }
 </script>
   <style lang="scss" scoped>
   .container{
-
       height: 36vh !important;
+      display: flex;
+      flex-direction: column;
+      justify-content: space-between;
+      padding-bottom: 5px;
+      box-sizing: border-box;
       .table-wrap{
         table{
           tr td{