环保
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="app-container wasteWaterHis">
|
||||
<!-- 搜索工作栏 -->
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
@@ -13,6 +13,7 @@
|
||||
:table-props="tableProps"
|
||||
:table-data="list"
|
||||
:max-height="tableH"
|
||||
:row-class-name="tableRowClassName"
|
||||
/>
|
||||
<pagination
|
||||
:page.sync="queryParams.pageNo"
|
||||
@@ -72,14 +73,15 @@ export default {
|
||||
type: 'select',
|
||||
label: '指标名称',
|
||||
selectOptions: [],
|
||||
param: 'checkId'
|
||||
param: 'checkId',
|
||||
filterable: true
|
||||
},
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '检测时间',
|
||||
dateType: 'datetimerange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
||||
valueFormat: "timestamp",
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间',
|
||||
@@ -94,10 +96,10 @@ export default {
|
||||
color: 'primary'
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:order-manage:create') ? 'separate' : '',
|
||||
type: this.$auth.hasPermi('base:waste-water:export') ? 'separate' : '',
|
||||
},
|
||||
{
|
||||
type: this.$auth.hasPermi('base:order-manage:create') ? 'button' : '',
|
||||
type: this.$auth.hasPermi('base:waste-water:export') ? 'button' : '',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'primary',
|
||||
@@ -110,7 +112,8 @@ export default {
|
||||
pageSize: 20,
|
||||
checkId: null,
|
||||
checkType: 1,
|
||||
// checkTime: [],
|
||||
startTime: null,
|
||||
endTime: null
|
||||
},
|
||||
tableProps,
|
||||
list: [],
|
||||
@@ -122,11 +125,11 @@ export default {
|
||||
window.addEventListener('resize', () => {
|
||||
this.tableH = this.tableHeight(260)
|
||||
})
|
||||
let end = moment().format('YYYY-MM-DD 23:59:59')
|
||||
let start = moment().format('YYYY-MM-DD 00:00:00')
|
||||
let end = moment(moment().format('YYYY-MM-DD 23:59:59')).valueOf()
|
||||
let start = moment(moment().format('YYYY-MM-DD 00:00:00')).valueOf()
|
||||
this.formConfig[1].defaultSelect = [start, end]
|
||||
this.queryParams.checkTime[0] = start
|
||||
this.queryParams.checkTime[1] = end
|
||||
this.queryParams.startTime = start
|
||||
this.queryParams.endTime = end
|
||||
this.getSelectList()
|
||||
this.getList()
|
||||
},
|
||||
@@ -134,12 +137,8 @@ export default {
|
||||
buttonClick(val) {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.queryParams.checkId = val.checkId
|
||||
// this.queryParams.checkTime[0] = val.timeVal ? val.timeVal[0] : null
|
||||
// this.queryParams.checkTime[1] = val.timeVal ? val.timeVal[1] : null
|
||||
// this.queryParams.checkTime[0] = 1701014400000
|
||||
// this.queryParams.checkTime[1] = 1701100800000
|
||||
this.queryParams.startTime = 1701014400000
|
||||
this.queryParams.endTime = 1701100800000
|
||||
this.queryParams.startTime = val.timeVal ? val.timeVal[0] : null
|
||||
this.queryParams.endTime = val.timeVal ? val.timeVal[1] : null
|
||||
if (val.btnName === 'search') {
|
||||
this.getList()
|
||||
} else {
|
||||
@@ -165,7 +164,22 @@ export default {
|
||||
console.log(res)
|
||||
this.formConfig[0].selectOptions = res.data.list || []
|
||||
})
|
||||
},
|
||||
tableRowClassName({row, rowIndex}) {
|
||||
console.log(row)
|
||||
if (row.markRed) {
|
||||
return 'warning-row'
|
||||
}else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.wasteWaterHis {
|
||||
.el-table .warning-row {
|
||||
background: #fee1e1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user