|
@@ -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{
|