| | |
| | | <div class="project-container"> |
| | | <div class="header"> |
| | | <el-button type="success" icon="Plus" @click="toProcess('add',{})">新增</el-button> |
| | | <el-button type="warning" >导出</el-button> |
| | | <el-button type="primary" icon="Filter">筛选</el-button> |
| | | <!-- <vue3-json-excel--> |
| | | <!-- :json-data="dataList"--> |
| | | <!-- :fields="fields"--> |
| | | <!-- name="项目信息表.xlsx"--> |
| | | <!-- style="margin-right: 5px;margin-left: 5px"--> |
| | | <!-- >--> |
| | | <!-- <el-button type="warning">导出</el-button>--> |
| | | <!-- </vue3-json-excel>--> |
| | | <el-button type="primary" icon="Filter" @click="showDrawer = true">筛选</el-button> |
| | | </div> |
| | | <div class="middle"> |
| | | <div class="card-box"> |
| | | <div class="box-left" @click="choose('')"> |
| | | <class class="font-left"> |
| | | <div class="font-left"> |
| | | <div>项目</div> |
| | | <div>总数</div> |
| | | </class> |
| | | <class class="font-right">{{search.num.projectTotal}}</class> |
| | | </div> |
| | | <div class="font-right">{{search.num.total}}</div> |
| | | </div> |
| | | <div class="box-right"> |
| | | <div class="inbox" @click="choose(1)" style="box-shadow: rgba(132, 122, 253, 0.2) 0 3px 5px 0;" :class="{btn1: chooseType === 1}"> |
| | | <div class="top" style="background: linear-gradient(90deg, rgb(127, 118, 253), rgb(218, 180, 246));"> |
| | | <span class="top-right-font">风险分析及计划评价</span> |
| | | <span class="top-right-font">基本信息</span> |
| | | </div> |
| | | <div class="bottom"> |
| | | <span class="top-right-font-bottom">{{search.num.riskTotal}}</span> |
| | | <span class="top-right-font-bottom">{{search.num.staging}}</span> |
| | | </div> |
| | | </div> |
| | | <div class="inbox" @click="choose(2)" style="box-shadow: rgba(255, 142, 139, 0.15) 0 3px 5px 0;" :class="{btn2: chooseType === 2}"> |
| | | <div class="top" style="background: linear-gradient(90deg, rgb(255, 140, 138), rgb(239, 186, 141));"> |
| | | <span class="top-right-font">现场勘验</span> |
| | | <span class="top-right-font">专家选用</span> |
| | | </div> |
| | | <div class="bottom"> |
| | | <span class="top-right-font-bottom">{{search.num.investigationTotal}}</span> |
| | | <span class="top-right-font-bottom">{{search.num.expert}}</span> |
| | | </div> |
| | | </div> |
| | | <div class="inbox" @click="choose(3)" style="box-shadow: rgba(222, 106, 169, 0.15) 0 3px 5px 0;" :class="{btn3: chooseType === 3}"> |
| | | <div class="top" style="background: linear-gradient(90deg, rgb(229, 119, 180), rgb(249, 159, 192));"> |
| | | <span class="top-right-font">项目审核</span> |
| | | <span class="top-right-font">项目审批</span> |
| | | </div> |
| | | <div class="bottom"> |
| | | <span class="top-right-font-bottom">{{search.num.reviewTotal}}</span> |
| | | <span class="top-right-font-bottom">{{search.num.approval}}</span> |
| | | </div> |
| | | </div> |
| | | <div class="inbox" @click="choose(4)" style="box-shadow: rgba(109, 177, 254, 0.2) 0 3px 5px 0;" :class="{btn4: chooseType === 4}"> |
| | | <div class="top" style="background: linear-gradient(90deg, rgb(54, 115, 255), rgb(124, 196, 242));"> |
| | | <span class="top-right-font">出具报告</span> |
| | | </div> |
| | | <div class="bottom"> |
| | | <span class="top-right-font-bottom">{{search.num.reportTotal}}</span> |
| | | </div> |
| | | </div> |
| | | <div class="inbox" @click="choose(5)" style="box-shadow: rgba(88, 211, 137, 0.2) 0 3px 5px 0;" :class="{btn5: chooseType === 5}"> |
| | | <div class="top" style="background: linear-gradient(90deg, rgb(0, 195, 151), rgb(114, 232, 200));"> |
| | | <span class="top-right-font">项目归档</span> |
| | | </div> |
| | | <div class="bottom"> |
| | | <span class="top-right-font-bottom">{{search.num.archiveTotal}}</span> |
| | | <span class="top-right-font-bottom">{{search.num.end}}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true" ref="tableRef" :height="tableHeight" style="width: 100%;"> |
| | | <el-table-column label="序号" width="80" align="center" type="index" ></el-table-column> |
| | | <el-table-column label="项目名称" prop="name" align="center" :show-overflow-tooltip="true" width="180" /> |
| | | <el-table-column label="委托单位" prop="client" align="center" :show-overflow-tooltip="true" width="180"/> |
| | | <el-table-column label="所属地市" prop="updateTime" align="center" width="250"> |
| | | <el-table-column label="申请时间" prop="createTime" align="center" :show-overflow-tooltip="true" width="180" /> |
| | | <el-table-column label="项目名称" prop="projectName" align="center" :show-overflow-tooltip="true" width="180" /> |
| | | <el-table-column label="部门" prop="deptName" align="center" /> |
| | | <el-table-column label="专家组组长" prop="deptUserName" align="center" width="150"/> |
| | | <el-table-column label="专家组人数" prop="expertNum" align="center" width="150"/> |
| | | <el-table-column label="当前状态" prop="state" align="center" width="200"> |
| | | <template #default="scope"> |
| | | {{scope.row.province}}/{{scope.row.city}} |
| | | <span>{{scope.row.state === 0 ? '暂存' : scope.row.state === 1 ? '选取专家' : scope.row.state === 2 ? '生成审批单' :scope.row.state === 3 ?'审批通过' : '完结' }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="评价类型" prop="estimateTypeName" align="center" width="150"/> |
| | | <el-table-column label="业务范围" prop="businessName" align="center" :show-overflow-tooltip="true" width="150"/> |
| | | <el-table-column label="项目负责人" prop="" align="center" width="120" :show-overflow-tooltip="true"/> |
| | | <el-table-column label="项目阶段" prop="" align="center" width="200"> |
| | | <template #default="scope"> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="项目实施天数" prop="" align="center" width="150"/> |
| | | <el-table-column label="项目变更" prop="" align="center" width="120"/> |
| | | <el-table-column label="预估金额(万元)" prop="" align="center" width="130"/> |
| | | <el-table-column label="归档金额(万元)" prop="" align="center" width="130"/> |
| | | <el-table-column label="缺失要件" prop="" align="center" width="150"/> |
| | | <el-table-column label="归档确认" prop="" align="center" width="150"/> |
| | | <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" width="180"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="toProcess('view',scope.row)">查看</el-button> |
| | | <el-button link type="primary" @click="toProcess('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="del(scope.row)">删除</el-button> |
| | | <el-button link type="primary" v-if="scope.row.step !== 4" @click="toProcess('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" v-if="scope.row.step !== 4" @click="del(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </div> |
| | | <el-drawer v-model="showDrawer" :direction="direction" :with-header="false" :size="size" > |
| | | <template #default> |
| | | <div class="drawer"> |
| | | <el-form ref="drawerRef" class="register-form" label-position="top"> |
| | | <el-form-item label="时间选择"> |
| | | <el-date-picker |
| | | v-model="searchTime" |
| | | type="daterange" |
| | | @change="changeTime" |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | value-format="YYYY-MM-DD" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="项目名称" > |
| | | <el-input v-model.trim="search.queryParams.projectName" placeholder="请输入项目名称"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="部门名称" > |
| | | <el-input v-model.trim="search.queryParams.deptName" placeholder="请输入部门名称"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </template> |
| | | <template #footer> |
| | | <div style="flex: auto"> |
| | | <el-button type="primary" @click="searchClick">查询</el-button> |
| | | <el-button type="warning" @click="reset">重置</el-button> |
| | | <el-button @click="confirmClick">取消</el-button> |
| | | |
| | | </div> |
| | | </template> |
| | | </el-drawer> |
| | | |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {onMounted, reactive, ref} from "vue"; |
| | | import {delProject, getProjectList, getProjectStatistics} from "@/api/projectManage/project"; |
| | | // import {delProject, getProjectList, getProjectStatistics} from "@/api/projectManage/project"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {delMonitor} from "@/api/sysUsers"; |
| | | // import {getRegionTree} from "@/api/area"; |
| | | // import {getDict} from "@/api/login"; |
| | | // import {getDictList} from "@/api/backManage/evaluate"; |
| | | import Cookies from "js-cookie" |
| | | import {delProject, getProjectList, getProjectNum} from "@/api/projectManage"; |
| | | const router = useRouter(); |
| | | |
| | | const loading = ref(false); |
| | | const direction = ref('rtl'); |
| | | const showDrawer = ref(false); |
| | | const size = ref('400px') |
| | | const props = { |
| | | expandTrigger: 'hover', |
| | | value: 'name', |
| | | label: 'name' |
| | | } |
| | | const search = reactive({ |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 20, |
| | | params:{ |
| | | projectPhase: '', |
| | | } |
| | | projectName: '', |
| | | projectDateStart: '', |
| | | projectDateEnd: '', |
| | | step: null |
| | | |
| | | }, |
| | | num: { |
| | | projectTotal: 0, |
| | | riskTotal: 0, |
| | | investigationTotal: 0, |
| | | reviewTotal: 0, |
| | | reportTotal: 0, |
| | | archiveTotal: 0 |
| | | approval: 0, |
| | | end: 0, |
| | | expert: 0, |
| | | staging: 0, |
| | | total: 0 |
| | | } |
| | | }); |
| | | const searchTime = ref([]); |
| | | const area = ref([]); |
| | | const stateList = ref([ |
| | | { |
| | | id: 1, |
| | | label: '基本信息' |
| | | }, |
| | | { |
| | | id: 2, |
| | | label: '专家选用' |
| | | }, |
| | | { |
| | | id: 3, |
| | | label: '项目审批' |
| | | }, |
| | | { |
| | | id: 4, |
| | | label: '项目归档' |
| | | }, |
| | | ]) |
| | | const tableRef = ref(null); |
| | | const tableHeight = ref(0); |
| | | const dataList = ref([]); |
| | | const total = ref(0); |
| | | |
| | | const isAgency = ref(false); |
| | | onMounted(() => { |
| | | Cookies.remove('projectId') |
| | | Cookies.remove('end') |
| | | Cookies.remove('btn') |
| | | getList(); |
| | | getStatistics(); |
| | | // getArea(); |
| | | // getBusinessList(); |
| | | // getRiskList(); |
| | | tableHeight.value = window.innerHeight - tableRef.value.$el.offsetTop - 170; |
| | | // 监听浏览器高度变化 |
| | | window.onresize = () => { |
| | | tableHeight.value = window.innerHeight - tableRef.value.$el.offsetTop - 170; |
| | | }; |
| | | // const userInfo = JSON.parse(Cookies.get('userInfo')) |
| | | // isAgency.value = userInfo.identity === 1; |
| | | |
| | | }); |
| | | const chooseType = ref(''); |
| | | const choose = (val) => { |
| | | chooseType.value = val; |
| | | search.queryParams.params.projectPhase = val; |
| | | search.queryParams.step = val; |
| | | getList(); |
| | | } |
| | | const getList = async () => { |
| | | loading.value = true; |
| | | console.log(search.queryParams,'search.queryParams') |
| | | const res = await getProjectList(search.queryParams); |
| | | if(res.code == 200){ |
| | | dataList.value = res.data.list; |
| | | total.value = res.data.total |
| | | dataList.value = res.rows |
| | | total.value = res.total |
| | | loading.value = false; |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | const getStatistics = async () => { |
| | | const res = await getProjectStatistics(); |
| | | const res = await getProjectNum(); |
| | | if(res.code == 200){ |
| | | console.log("res",res) |
| | | search.num = res.data |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | const handleSizeChange = (val) => { |
| | | search.queryParams.pageNum = 1; |
| | | search.queryParams.pageSize = val |
| | | getList() |
| | | } |
| | |
| | | search.queryParams.pageNum = val |
| | | getList() |
| | | } |
| | | const toProcess = (type,value) => { |
| | | const toProcess = (type,value,toPath) => { |
| | | value.type = type; |
| | | router.push({ path: '/process', query: {id: value.id, type: type}}); |
| | | router.push({ path: '/process', query: {id: value.id, type: type, toPath: toPath, process: value.step}}); |
| | | } |
| | | |
| | | const del = (val) => { |
| | | ElMessageBox.confirm( |
| | | '确定删除此条数据?', |
| | |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await delProject(val) |
| | | const res = await delProject(val.id) |
| | | if(res.code == 200){ |
| | | ElMessage.success('数据删除成功') |
| | | getList() |
| | | await getList() |
| | | await getStatistics() |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | } |
| | | const confirmClick = () => { |
| | | reset() |
| | | showDrawer.value = false; |
| | | } |
| | | const changeTime=(value)=>{ |
| | | if(!value){ |
| | | search.queryParams.projectDateStart = "" |
| | | search.queryParams.projectDateEnd = "" |
| | | } |
| | | } |
| | | const searchClick = () => { |
| | | if(searchTime.value && searchTime.value.length>0){ |
| | | search.queryParams.projectDateStart = searchTime.value[0] |
| | | search.queryParams.projectDateEnd = searchTime.value[1] |
| | | } |
| | | getList(); |
| | | getStatistics(); |
| | | showDrawer.value = false; |
| | | } |
| | | const reset = () => { |
| | | searchTime.value = []; |
| | | search.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 20, |
| | | projectName: '', |
| | | projectDateStart: '', |
| | | projectDateEnd: '', |
| | | step: null |
| | | } |
| | | chooseType.value = ''; |
| | | getList(); |
| | | getStatistics(); |
| | | |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .inbox{ |
| | | width: 19%; |
| | | width: 23%; |
| | | height: 76px; |
| | | background: #fff; |
| | | border-radius: 5px; |
| | |
| | | float: right; |
| | | margin-top: 20px; |
| | | } |
| | | .process1{ |
| | | border-radius: 5px; |
| | | color: rgb(255, 255, 255); |
| | | padding: 5px 10px; |
| | | background: linear-gradient(90deg, rgb(127, 118, 253), rgb(218, 180, 246)); |
| | | } |
| | | .process2{ |
| | | background: linear-gradient(90deg, rgb(255, 140, 138), rgb(239, 186, 141)); |
| | | } |
| | | .process3 { |
| | | background: linear-gradient(90deg, rgb(229, 119, 180), rgb(249, 159, 192));; |
| | | } |
| | | .process4 { |
| | | background: linear-gradient(90deg, rgb(54, 115, 255), rgb(124, 196, 242));; |
| | | } |
| | | .process5 { |
| | | background: linear-gradient(90deg, rgb(0, 195, 151), rgb(114, 232, 200));; |
| | | } |
| | | .drawer{ |
| | | :deep(.el-form .el-form-item__label) { |
| | | font-size: 15px; |
| | | } |
| | | } |
| | | |
| | | } |
| | | </style> |