<template> <!-- 污水处理厂进水BOD --> <div class="publicContainer"> <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch"> <el-form-item label="统计年份" prop="date"> <el-date-picker type="year" v-model="queryParams.date" value-format="YYYY" placeholder="请选择统计年份" style="width: 100%" ></el-date-picker> </el-form-item> <el-form-item> <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> <el-button icon="Refresh" @click="resetQuery">重置</el-button> </el-form-item> </el-form> <!-- 表格 --> <el-table :data="dataList" v-loading="loading" stripe :max-height="580"> <el-table-column type="index" width="55" label="序号" /> <el-table-column label="年份" prop="yaer" /> <el-table-column label="年度目标(mg/L)" prop="w" /> <el-table-column label="进水BOD实际平均浓度(mg/L)" prop="p" /> <el-table-column label="达标情况" prop="a" /> <el-table-column label="操作" width="240"> <template #default="scope"> <el-button link icon="View" type="primary" @click="handleDetail(scope.row, 'view')">查看</el-button> </template> </el-table-column> </el-table> <!-- 详情弹窗 --> <el-dialog :title="title" v-model="open" width="800px" append-to-body :close-on-click-modal="false"> <el-table :data="dataListWSC" stripe :max-height="580"> <el-table-column type="index" width="55" label="序号" /> <el-table-column label="日期" prop="yaer" /> <el-table-column label="进水BOD平均浓度(mg/L)"> <el-table-column prop="monthPlan1" label="西区污水处理厂" /> <el-table-column prop="monthPlan2" label="东区污水处理厂" /> <el-table-column prop="monthPlan3" label="马家河污水处理厂" /> </el-table-column> </el-table> <template #footer> <div class="dialog-footer"> <el-button @click="cancel">取 消</el-button> </div> </template> </el-dialog> </div> </template> <script setup name="WaterSupplyWaterPlants"> const { proxy } = getCurrentInstance(); const showSearch = ref(true); const loading = ref(true); const title = ref(''); const open = ref(false); const dataList = ref([{ yaer: '2022' }, { yaer: '2023' }, { yaer: '2024' }]); const dataListWSC = ref([]); const AllData = reactive({ id: '', queryParams: { pageNum: 1, pageSize: 10, date: null, }, }); const { queryParams } = toRefs(AllData); //搜索 function handleQuery() { getList(); } //重置 function resetQuery() { proxy.resetForm('queryRef'); handleQuery(); } /** 查询列表 */ const getList = async () => { // loading.value = true; loading.value = false; }; //查看详情操作 function handleDetail(row) { open.value = true; title.value = row.yaer + '污水厂进水BOD详情'; } // 取消事件 function cancel() { open.value = false; } onMounted(() => { getList(); }); </script> <style scoped lang="scss"></style>