<template> <!-- 项目设计管理 --> <div class="publicContainer"> <!-- 搜索区域 --> <el-form :model="queryParams" ref="queryRef" :inline="true"> <el-form-item label="项目名称:" prop="projectNo"> <el-select v-model="queryParams.projectNo" placeholder="请选择项目" clearable filterable> <el-option v-for="dict in projectList" :key="dict.id" :label="dict.projectName" :value="dict.id" /> </el-select> </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" max-height="650"> <el-table-column label="项目名称" prop="projectName" /> <el-table-column label="审核状态" prop="reviewStatus"> <template #default="scope"> <span :class="[scope.row.reviewStatus == '1' ? 'green' : 'red']"> {{ scope.row.reviewStatus == '1' ? '审核通过' : scope.row.reviewStatus == '2' ? '提交市规划局' : scope.row.reviewStatus == '3' ? '审核拒绝' : '未审核' }} </span> </template> </el-table-column> <el-table-column label="海绵专篇文件" prop="sysFileList"> <template #default="scope"> <span class="filePreview" @click="previewPdf(scope.row.sysFileList)"> {{ scope.row.sysFileList.length > 0 ? scope.row.sysFileList[0].name : '--' }} </span> </template> </el-table-column> <el-table-column label="备注" prop="remark" /> <el-table-column label="发布时间" prop="updateTime" /> <el-table-column label="操作" width="160" class-name="small-padding fixed-width"> <template #default="scope"> <el-button link type="warning" icon="Edit" @click="handleAudit(scope.row)" v-if="scope.row.reviewStatus == '' || scope.row.reviewStatus == '0'" > 审核 </el-button> <el-button link type="primary" icon="Edit" @click="handleSubmit(scope.row)" v-if="scope.row.reviewStatus == '1'"> 提交市规划局 </el-button> <el-button link type="warning" 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="getTableList" /> <!-- 审核弹窗 --> <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="reviewStatus"> <el-select v-model="formData.reviewStatus" filterable clearable placeholder="请选择"> <el-option label="通过" value="1" /> <el-option label="拒绝" value="3" /> </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="dialogShowGH" width="500px" append-to-body> <el-form ref="formRefGH" :model="formDataGH" :rules="rulesFormGH" label-width="100px" class="publicForm"> <el-form-item label="被通知人" prop="noticeUserId"> <el-select v-model="formDataGH.noticeUserId" filterable clearable placeholder="请选择"> <el-option :label="item.nickName" :value="item.userId" v-for="item in userList" :key="item.userId" /> </el-select> </el-form-item> <el-form-item label="通知消息" prop="noticeMsg"> <el-input type="textarea" v-model="formDataGH.noticeMsg" placeholder="请输入" /> </el-form-item> </el-form> <template #footer> <div class="dialog-footer"> <el-button type="info" @click="dialogShowGH = false">取 消</el-button> <el-button type="primary" @click="submitGH">确 定</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 { projectFileReviewPage, projectFileReviewEdit, projectFileReviewGH, getProjectInfoNewList } from '@/api/document/projectTransfer'; import { listUser } from '@/api/system/user'; const { proxy } = getCurrentInstance(); const projectList = ref([]); const dialogShow = ref(false); const tableData = ref([]); const tableLoading = ref(false); const total = ref(0); const dialogShowTJ = ref(false); const dialogShowGH = ref(false); const tableDataTJ = ref([]); const countYear = ref(proxy.moment(new Date()).format('YYYY')); const userList = ref([]); const allData = reactive({ formData: { remark: '', reviewStatus: '1', projectNo: '', }, queryParams: { pageNum: 1, pageSize: 10, fileType: 'hmchzp', //海绵城市专篇 projectNo: '', }, rulesForm: { reviewStatus: [{ required: true, message: '请输入', trigger: 'blur' }], }, formDataGH: { noticeUserId: '', noticeMsg: '', }, rulesFormGH: { noticeUserId: [{ required: true, message: '请输入', trigger: 'change' }], }, }); const { queryParams, formData, rulesForm, formDataGH, rulesFormGH } = toRefs(allData); //搜索 function handleQuery() { queryParams.value.pageNum = 1; getTableList(); } //重置 function resetQuery() { proxy.resetForm('queryRef'); handleQuery(); } /** 查询 */ function getTableList() { tableLoading.value = true; projectFileReviewPage(queryParams.value).then(res => { tableData.value = res.data || []; total.value = res.total; tableLoading.value = false; }); } // 审核 const handleAudit = row => { proxy.resetForm('formRef'); //清空表单 formData.value = { ...row }; dialogShow.value = true; }; // 审核提交 function submitAudit() { proxy.$refs['formRef'].validate(valid => { if (valid) { projectFileReviewEdit(formData.value).then(response => { proxy.$modal.msgSuccess('审核成功'); dialogShow.value = false; getTableList(); }); } }); } // 提交市规划局 function handleSubmit(row) { dialogShowGH.value = true; } function submitGH() { proxy.$refs['formRefGH'].validate(valid => { if (valid) { projectFileReviewGH(formDataGH.value).then(response => { proxy.$modal.msgSuccess('提交市规划局成功'); dialogShowGH.value = false; getTableList(); }); } }); } // 汇总统计 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(item) { if (item.length > 0) { window.open(item[0].url); } } //查询人员列表 function getUserList() { listUser().then(res => { userList.value = res.data || []; userList.value.map(item => { item.userId = String(item.userId); }); }); } onMounted(() => { getProjectList(); // 获取项目列表 getUserList(); handleQuery(); }); </script> <style lang="scss" scoped></style>