<template> <!-- 项目设计管理 --> <div class="publicContainer"> <!-- 搜索区域 --> <el-form :model="queryParams" ref="queryRef" :inline="true"> <el-form-item label="项目名称" prop="projectId"> <el-select v-model="queryParams.projectId" placeholder="请选择项目" style="width: 100%"> <el-option v-for="dict in projectList" :key="dict.id" :label="dict.projectName" :value="dict.id" /> </el-select> </el-form-item> <el-form-item label="日期" prop="ggDate"> <el-date-picker type="month" v-model="queryParams.ggDate" value-format="YYYY-MM" placeholder="请选择日期"> </el-date-picker> </el-form-item> <el-form-item> <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> <el-button type="success" icon="Refresh" @click="resetQuery">重置</el-button> </el-form-item> </el-form> <!-- 表格 --> <el-table v-loading="tableLoading" :data="tableData"> <el-table-column label="项目名称" prop="projectName" /> <el-table-column label="审核状态" prop="ggType" /> <el-table-column label="海绵专篇文件" prop="workOrderType"> <template #default="scope"> <span class="filePreview" @click=" previewPdf( 'https://server1.wh-nf.cn:9000/newfiber-standard-kaifeng/2024/06/19/4-8-2 鼓楼区2023年老旧小区改造项目海绵城市专篇_20240619215154A022.pdf' ) " > 海绵专篇.pdf </span> </template> </el-table-column> <el-table-column label="备注" prop="remark" /> <el-table-column label="发布时间" prop="startTime" /> <el-table-column label="操作" width="160" class-name="small-padding fixed-width"> <template #default="scope"> <el-button link type="primary" icon="Edit" @click="handleAudit(scope.row)">审核</el-button> <el-button link type="primary" icon="Edit" @click="handleSubmit(scope.row)">提交市规划局</el-button> <el-button link type="primary" icon="Edit" @click="handleCount(scope.row)">汇总统计</el-button> </template> </el-table-column> </el-table> <!-- 分页 --> <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getDataList" /> <!-- 审核弹窗 --> <el-dialog title="审核" v-model="dialogShow" width="500px" append-to-body> <el-form ref="formRef" :model="formData" :rules="rulesForm" label-width="120px" class="publicForm"> <el-form-item label="审核意见" prop="ggType"> <el-select v-model="formData.ggType" filterable clearable placeholder="请选择"> <el-option label="通过" value="1" /> <el-option label="拒绝" value="2" /> </el-select> </el-form-item> <el-form-item label="备注" prop="remark"> <el-input type="textarea" v-model="formData.remark" placeholder="请输入" /> </el-form-item> </el-form> <template #footer> <div class="dialog-footer"> <el-button type="info" @click="dialogShow = false">取 消</el-button> <el-button type="primary" @click="submitAudit">确 定</el-button> </div> </template> </el-dialog> <!-- 汇总统计弹窗 --> <el-dialog title="汇总统计" v-model="dialogShowTJ" width="1200px" append-to-body> <el-form :inline="true"> <el-form-item label="日期" prop="countYear"> <el-date-picker type="year" v-model="countYear" value-format="YYYY" placeholder="请选择日期"> </el-date-picker> </el-form-item> <el-form-item> <el-button type="primary" icon="Search" @click="searchCount">搜索</el-button> <el-button type="success" icon="Refresh" @click="exportCount">导出</el-button> </el-form-item> </el-form> <el-table :data="tableDataTJ"> <el-table-column label="日期" prop="projectName" /> <el-table-column label="已竣工(海绵设施已完工" prop="ggType" /> <el-table-column label="施工阶段-已开工" prop="ggType" /> <el-table-column label="项目前期-已完成初步设计概算,尚未完成招投标" prop="ggType" /> <el-table-column label="项目前期-已完成施工招投标,尚未开工" prop="ggType" /> <el-table-column label="项目前期-尚未完成初步设计概算" prop="ggType" /> </el-table> <template #footer> <div class="dialog-footer"> <el-button type="info" @click="dialogShowTJ = false">取 消</el-button> </div> </template> </el-dialog> </div> </template> <script setup> import { getProjectInfoNewList } from '@/api/document/projectTransfer'; const { proxy } = getCurrentInstance(); const projectList = ref([]); const dialogShow = ref(false); const tableData = [{ projectName: '2023年示范区老旧小区改造项目(康太家园)' }]; const tableLoading = ref(false); const total = ref(0); const dialogShowTJ = ref(false); const tableDataTJ = ref([]); const countYear = ref(proxy.moment(new Date()).format('YYYY')); const allData = reactive({ formData: { remark: null, ggType: '1', }, queryParams: { pageNum: 1, pageSize: 10, ggType: '', ggDate: '', }, rulesForm: { ggType: [{ required: true, message: '请输入', trigger: 'blur' }], }, }); const { queryParams, formData, rulesForm } = toRefs(allData); // 审核 const handleAudit = row => { proxy.resetForm('formRef'); //清空表单 dialogShow.value = true; }; // 审核提交 function submitAudit() { proxy.$refs['formRef'].validate(valid => { if (valid) { // orderRemindAdd(formData.value).then(response => { // proxy.$modal.msgSuccess('审核成功'); // dialogShow.value = false; // getDataList(); // }); } }); } // 提交市规划局 function handleSubmit(row) { proxy.$modal .confirm('是否提交市规划局?') .then(function () { // return delRtuSiteMonitor(_ids); }) .then(() => { // getList(); proxy.$modal.msgSuccess('提交成功'); }) .catch(() => {}); } // 汇总统计 function handleCount(row) { dialogShowTJ.value = true; } // 汇总统计搜索 function searchCount() {} // 汇总统计导出 function exportCount() { // let params = { // startTime: dateRange.value ? dateRange.value[0] + ' 00:00:00' : '', // endTime: dateRange.value ? dateRange.value[1] + ' 23:59:59' : '', // itemListString: JSON.stringify(monitorArr), // }; // proxy.download( // 'business/siteHistoryMonitor/monitorPropertyGraphicCompareExport', // { // ...params, // }, // `对比分析_${new Date().getTime()}.xlsx` // ); } // 获取项目列表 const getProjectList = async () => { const res = await getProjectInfoNewList(); if (res?.code !== 200) return; projectList.value = res.data || []; }; // 文件预览 function previewPdf(url) { window.open(url); } onMounted(() => { getProjectList(); // 获取项目列表 }); </script> <style lang="scss" scoped></style>