| | |
| | | <script> |
| | | import TimeSelectWithShortCuts from '@/sfc/TimeSelectWithShortCuts.vue'; |
| | | import TimeShortCuts from '@/sfc/TimeShortCuts.vue'; |
| | | import ScenarioType from '@/sfc/ScenarioType.vue'; |
| | | import InputSearch from '@/sfc/InputSearch.vue'; |
| | | |
| | | import { ElMessage } from 'element-plus' |
| | | import AreaAndmonitorType from '@/sfc/AreaAndmonitorType.vue' |
| | | |
| | | import { useCommonFunction } from '../../utils/common.js'; |
| | |
| | | |
| | | export default { |
| | | components: { |
| | | TimeSelectWithShortCuts, |
| | | TimeShortCuts, |
| | | ScenarioType, |
| | | InputSearch, |
| | | ButtonClick, |
| | |
| | | // 结束时间 |
| | | endTime: '' |
| | | }, |
| | | // 搜索框传递上来的设备编号 |
| | | tempMnCode :'', |
| | | // 返回的数据 |
| | | tableData: [], |
| | | // 表格数据 |
| | |
| | | |
| | | // 页号改变时触发 |
| | | handleCurrentChange(val) { |
| | | console.log('当前页为:', val); |
| | | // 将当前页号给currentPage |
| | | this.currentPage = val; |
| | | |
| | |
| | | |
| | | // 查询数据 |
| | | handleSubmit() { |
| | | // if (this.isExceedOneMonth(this.form.beginTime, this.form.endTime)) { |
| | | // alert('时间跨度不能超过一个月'); |
| | | // return; |
| | | // } |
| | | |
| | | this.loading = true; |
| | | this.queryButton = true |
| | | let params = {}; |
| | |
| | | if (this.scenarioType.length != 0) { |
| | | params['scenarioType'] = this.scenarioType.join(); |
| | | } |
| | | |
| | | this.$http.get('/dust/history1', { params: params }).then((response) => { |
| | | // 保存返回的 |
| | | this.tableData = response.data.data.rows; |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="history-container"> |
| | | <el-row> |
| | | <el-col ref="h1" class="head-row"> |
| | | <el-card> |
| | |
| | | <div class="demo-form-inline"> |
| | | <el-row> |
| | | <el-col> |
| | | |
| | | <el-form-item> |
| | | <AreaAndmonitorType></AreaAndmonitorType> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <template #label> </template> |
| | | <InputSearch isNeedDefaultSite="1" @submit-value="(n) => (form.name = n)"> |
| | | <InputSearch isNeedDefaultSite="1" @submit-value="(n) => (form.name = n) "> |
| | | </InputSearch> |
| | | </el-form-item> |
| | | <el-form-item> |
| | |
| | | </template> |
| | | <el-input v-model="form.number" clearable placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col> |
| | | <el-form-item> |
| | | <TimeShortCuts time-type="week" @submit-time="giveTime"></TimeShortCuts> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <ScenarioType @submitScenarioType="(val) => (scenarioType = val)"> |
| | | </ScenarioType> |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-form-item> |
| | | <TimeSelectWithShortCuts @submit-time="giveTime"></TimeSelectWithShortCuts> |
| | | </el-form-item> |
| | | |
| | | |
| | | </el-row> |
| | | </div> |
| | | <div class="button-and-export"> |
| | | <el-form-item> |
| | | <!-- <el-button |
| | | type="primary" |
| | | @click="handleSubmit" |
| | | style="margin-left: 10px" |
| | | ><el-icon style="margin-right: 6px;font-size: 1.2em;"><i-ep-Search/></el-icon>查询</el-button |
| | | > |
| | | <el-button type="success" @click="exportDom" round><el-icon style="margin-right: 6px;margin-bottom:2px;font-size: 1.2em;"><i-ep-Download ></i-ep-Download></el-icon>导出数据</el-button> --> |
| | | <ButtonClick style="margin-right: 12px;" content="搜索" type="primary" :loading="queryButton" @do-search="handleSubmit"></ButtonClick> |
| | | <ButtonExportExcel content="导出数据" type="success" :loading="exportButton" @do-export="exportDom"></ButtonExportExcel> |
| | | </el-form-item> |
| | |
| | | <el-empty v-show="isNoData" :image-size="200" /> |
| | | |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | | |
| | | <style lang="scss" scoped> |
| | | // 整体左外边距 |
| | | <style scoped> |
| | | .history-container { |
| | | min-width: 1200px; |
| | | } |
| | | /* // 整体左外边距 */ |
| | | .el-row { |
| | | margin-left: 10px; |
| | | } |
| | |
| | | .font-label { |
| | | margin-top: 3px; |
| | | font-weight: bold; |
| | | font-size: 14px; |
| | | color: #333333; |
| | | } |
| | | |
| | | .demo-form-inline { |
| | |
| | | /* 从行尾位置开始排列 */ |
| | | } |
| | | |
| | | .el-table { |
| | | /* color: #303133 */ |
| | | color: rgb(59, 60, 63) |
| | | } |
| | | .el-pagination { |
| | | margin: 10px 0px; |
| | | margin: 10px 10px; |
| | | } |
| | | </style> |