清单更改

xuhongjie
严飞永 1 week ago
parent c30613b00e
commit b7d4572092

@ -646,11 +646,11 @@ export function downloadPdf(fileName) {
//政务统计
//整体项目情况
export function allinformation(data){
export function allinformation(params){
return request({
url:'/gysl/zwStats/allProject',
method:'get',
data
params
})
}

@ -103,7 +103,6 @@ export default {
const medianData = [];
const evaluations = [];
const maxValues = {};
//
const elementMap = {};

@ -4,35 +4,15 @@
<div class="top">
<div class="title">整体项目情况</div>
<div class="importdiv">
<el-date-picker v-model="value3" type="year" placeholder="选择年份">
<el-date-picker v-model="selectedYear" type="year" placeholder="选择年份" format="yyyy"
value-format="yyyy" @change="handleYearChange">
</el-date-picker>
<el-button icon="el-icon-upload2" style="background-color: #2B62F1;
color: #FFFFFF;">报告导出</el-button>
<el-button icon="el-icon-upload2" style="background-color: #2B62F1; color: #FFFFFF;"
@click="handleExport">
报告导出
</el-button>
</div>
</div>
<!-- <table style="margin-top: .3rem;">
<thead>
<tr>
<th>项目总数</th>
<th>建筑面积(万平方米)</th>
<th>已建数量()</th>
<th>在建数量()</th>
<th>拟建数量()</th>
<th style="visibility: hidden;">拟建数量()</th>
</tr>
</thead>
<tbody>
<tr>
<td>
{{ projectData.allProject }}
</td>
<td>{{ projectData.allGrossArea }}</td>
<td>{{ projectData.allBuilding1 }}</td>
<td>{{ projectData.allBuilding2 }}</td>
<td>{{ projectData.allBuilding3 }}</td>
</tr>
</tbody>
</table> -->
<div class="mainarea">
<div class="itemone">
<img src="@/assets/images/icon-xmzs@2x.png" alt="">
@ -73,26 +53,6 @@
</div>
<div>
<div class="title">当年项目情况</div>
<!-- <table>
<thead>
<tr>
<th>新开工项目数</th>
<th>建筑面积(万平方米)</th>
<th>已建数量()</th>
<th>在建数量()</th>
<th style="visibility: hidden;">拟建数量()</th>
<th style="visibility: hidden;">拟建数量()</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ currentYearData.currentYearProject }}</td>
<td>{{ currentYearData.currentYearGrossArea }}</td>
<td>{{ currentYearData.currentYearBuilding1 }}</td>
<td>{{ currentYearData.currentBuilding2 || 0 }}</td>
</tr>
</tbody>
</table> -->
<div class="mainarea">
<div class="itemone">
<img src="@/assets/images/icon-xkgxms@2x.png" alt="">
@ -140,7 +100,7 @@ import { allinformation } from '@/api/ManageApi';
export default {
data() {
return {
value3: '',
selectedYear: new Date().getFullYear().toString(),
projectData: {
allProject: 0, //
allGrossArea: 0, //
@ -162,10 +122,33 @@ export default {
this.fetchProjectData();
},
methods: {
/** 导出按钮操作 */
handleExport() {
this.download(
"/gysl/zwStats/exportBg",
{
years: this.selectedYear
},
`项目整体情况${this.selectedYear}.docx`
);
},
// Handle year change
handleYearChange(year) {
if (year) {
this.selectedYear = year;
this.fetchProjectData();
}
},
async fetchProjectData() {
this.loading = true;
try {
const response = await allinformation();
// API years
const response = await allinformation({
years: this.selectedYear,
_t: Date.now() //
});
this.projectData = {
allProject: response.data.allProject || 0,
allGrossArea: response.data.allGrossArea || 0,
@ -179,8 +162,10 @@ export default {
currentYearBuilding1: response.data.currentYearBuilding1 || 0,
currentBuilding2: response.data.currentBuilding2 || 0
};
}
finally {
} catch (error) {
console.error("获取数据失败:", error);
this.$message.error("数据加载失败");
} finally {
this.loading = false;
}
}

@ -5,20 +5,10 @@
<div class="mapareaone">
<!-- 展开/隐藏控制按钮放在盒子右侧外部 -->
<div class="collapse-control" @click="toggleCollapse">
<img
v-show="!isCollapsed"
src="@/assets/images/icon-sq@2x.png"
alt="隐藏"
class="control-icon"
>
<img
v-show="isCollapsed"
src="@/assets/images/icon-zk@2x.png"
alt="展开"
class="control-icon"
>
<img v-show="!isCollapsed" src="@/assets/images/icon-sq@2x.png" alt="隐藏" class="control-icon">
<img v-show="isCollapsed" src="@/assets/images/icon-zk@2x.png" alt="展开" class="control-icon">
</div>
<!-- 左侧项目列表区域 -->
<div class="leftdiv" v-show="!isCollapsed">
<!-- 项目列表内容 -->
@ -26,38 +16,204 @@
<ProjectList />
</div>
</div>
<!-- 蓝色图标区域 -->
<div class="blueicon"></div>
<div class="rightdiv">
<el-input v-model="searchBox" placeholder="请输入地点名称" class="search-input" @input="handleSearchInput" clearable>
<el-button slot="append" icon="el-icon-search" @click="toSearch"></el-button>
</el-input>
</div>
<!-- 搜索结果列表 -->
<div class="search-results" v-if="searchList && searchList.length > 0">
<div class="search-item" v-for="(item, index) in searchList" :key="index" @click="centerMap(item)">
<div class="item-name">{{ item.name }}</div>
<div class="item-address">{{ item.address }}</div>
</div>
</div>
<!-- 右侧地图区域 -->
<div class="blueicon">
<div class="icondiv" v-if="showLocationIcon">
<img src="@/assets/images/detailsicon/icon-定位@2x.png" alt="定位" :style="iconPosition"
@click.stop="showDialog">
</div>
</div>
</div>
</div>
<!-- 悬浮窗 -->
<div class="app-container" v-show="dialogVisible" v-click-outside="closeDialog">
<div class="close-btn" @click="closeDialog">
<i class="el-icon-close"></i>
</div>
<div class="dialog-content">
<div class="dialog-title">{{ selectedProject.name }}</div>
<div class="dialog-info">
<p><span class="label">状态:</span>
<span class="value" :style="{ color: xzflColors[xzflMap[selectedProject.xzfl]] }">
{{ xzflMap[selectedProject.xzfl] }}
</span>
</p>
<p><span class="label">项目单位:</span> <span class="value">{{ selectedProject.xmfrdwxz }}</span></p>
<p><span class="label">总投资额:</span> <span class="value">{{ selectedProject.ztze }}</span></p>
<p><span class="label">联系人:</span> <span class="value">{{ selectedProject.projectLeader }}</span></p>
<p><span class="label">联系电话:</span><span class="value"> {{ selectedProject.phone }}</span></p>
</div>
</div>
<div class="leftarea"></div>
</div>
</div>
</template>
<script>
import ProjectList from '@/views/components/analysis/projectList.vue'
import { getBasicInformationPage } from "@/api/ManageApi/index";
import { debounce } from 'lodash';
//
const clickOutside = {
bind(el, binding, vnode) {
el.clickOutsideEvent = function (event) {
if (!(el === event.target || el.contains(event.target))) {
vnode.context[binding.expression](event);
}
};
document.body.addEventListener('click', el.clickOutsideEvent);
},
unbind(el) {
document.body.removeEventListener('click', el.clickOutsideEvent);
}
};
export default {
components: {
ProjectList,
},
directives: {
'click-outside': clickOutside
},
data() {
return {
isCollapsed: false, //
}
isCollapsed: false,
searchBox: '',
searchList: [],
dialogVisible: false,
selectedProject: {
name: '',
xzfl: '',
projectLeader: '',
phone: '',
ztze: '',
xmfrdwxz:''
},
showLocationIcon: false,
iconPosition: {
position: 'absolute',
top: '0px',
left: '0px'
},
hasSearched: false,
//
xzflColors: {
'在建': '#6EDABE',
'拟建': '#FFBF6B',
'已建': '#2B62F1'
},
xzflMap: {
1: '已建',
2: '在建',
3: '拟建'
},
};
},
created() {
this.debouncedSearch = debounce(this.toSearch, 300);
},
methods: {
toggleCollapse() {
this.isCollapsed = !this.isCollapsed;
},
handleSearchInput() {
if (this.searchBox.trim() === '') {
this.searchList = [];
this.hasSearched = false;
return;
}
this.debouncedSearch();
},
toSearch() {
if (!this.searchBox.trim()) {
this.searchList = [];
this.hasSearched = true;
return;
}
const params = {
name: this.searchBox,
current: 1,
size: 10
};
getBasicInformationPage(params)
.then(response => {
this.hasSearched = true;
if (response && response.code === 200 && response.data) {
this.searchList = response.data.records;
} else {
this.searchList = [];
}
})
.catch(error => {
console.error('搜索失败:', error);
this.hasSearched = true;
this.searchList = [];
});
},
centerMap(item) {
this.searchBox = item.name;
this.searchList = [];
this.selectedProject = {
name: item.name,
projectLeader: item.projectLeader || '暂无',
phone: item.phone || '暂无',
ztze: item.ztze || '暂无',
xmfrdwxz: item.xmfrdwxz || '暂无',
xzfl: item.xzfl || '暂无'
};
this.showLocationIcon = true;
this.setRandomIconPosition();
},
showDialog() {
if (this.selectedProject.name) {
this.dialogVisible = true;
} else {
this.$message.warning('请选择一个项目');
}
},
closeDialog() {
this.dialogVisible = false;
},
setRandomIconPosition() {
// icondiv9rem(135px)9rem(135px)
// 1.7rem(25.5px)2rem(30px)
//
const maxTop = 105; // 135 - 30
const maxLeft = 110; // 135 - 25
const randomTop = Math.floor(Math.random() * maxTop);
const randomLeft = Math.floor(Math.random() * maxLeft);
this.iconPosition = {
position: 'absolute',
top: `${randomTop}px`,
left: `${randomLeft}px`,
cursor: 'pointer'
};
}
}
}
</script>
<style scoped>
/* 原有样式保持不变 */
.container {
position: relative;
}
@ -76,7 +232,7 @@ export default {
/* 控制按钮样式 */
.collapse-control {
position: absolute;
left:-1.5rem;
left: -1.5rem;
top: 12.5rem;
width: auto;
height: 2rem;
@ -120,5 +276,129 @@ export default {
background-size: 100% 100%;
top: 4.5rem;
right: 7.4rem;
display: flex;
justify-content: center;
align-items: center;
}
.icondiv {
width: 8rem;
height: 8rem;
position: relative;
}
.icondiv img {
width: 1.7rem;
height: 2rem;
transition: all 0.2s ease;
}
.icondiv img:hover {
transform: scale(1.1);
}
.rightdiv {
width: 30%;
position: absolute;
right: 1rem;
top: 1rem;
}
.search-results {
position: absolute;
right: 1rem;
top: 3.5rem;
width: 30%;
background-color: #FFFFFF;
border: 1px solid #E5E5E5;
border-radius: 0.5rem;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
z-index: 15;
max-height: 15rem;
overflow-y: auto;
}
.search-item {
padding: 0.5rem;
cursor: pointer;
transition: background-color 0.3s ease;
}
.search-item:hover {
background-color: #F2F4F7;
}
.item-name {
/* font-weight: bold; */
margin-bottom: 0.3rem;
}
.item-address {
font-size: 0.88rem;
color: #606266;
}
/* 悬浮div样式 */
.app-container {
position: absolute;
top: 19%;
left: 39%;
height: 17rem;
width: 18rem;
background-color: #fff;
border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
z-index: 2000;
padding: 15px;
}
.close-btn {
position: absolute;
top: 5px;
right: 5px;
cursor: pointer;
font-size: 16px;
color: #909399;
}
.close-btn:hover {
color: #409EFF;
}
.dialog-content {
height: 100%;
}
.dialog-title {
font-size: 16px;
/* font-weight: bold; */
font-family: aliregular;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 1px solid #EBEEF5;
/* background-color:#F5F7FA; */
color: #2B62F1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.dialog-info {
font-size: 14px;
color: #606266;
}
.dialog-info p {
margin-bottom: 10px;
}
.label {
color: #9E9E9E;
font-family: aliregular;
width: 3rem;
}
.value{
color: #3D424C;
font-family: aliregular;
}
</style>

@ -31,15 +31,15 @@
<div class="card-row">
<div class="card-item">
<span class="label">所在区域</span>
<span class="value">{{ ssgnqMap[item.ssgnq] }}</span>
<span class="value">{{ ssgnqMap[item.ssgnq] || "未填写" }}</span>
</div>
<div class="card-item">
<span class="label">联系人</span>
<span class="value">{{ item.projectLeader }}</span>
<span class="value">{{ item.projectLeader || "未填写" }}</span>
</div>
<div class="card-item">
<span class="label">联系方式</span>
<span class="value">{{ item.phone }}</span>
<span class="value">{{ item.phone || "未填写" }}</span>
</div>
</div>
</div>
@ -182,7 +182,8 @@ export default {
.project-name {
color: #2B62F1;
cursor: pointer;
font-weight: bold;
/* font-weight: bold; */
font-family: aliregular;
font-size: 0.8rem;
}
@ -206,12 +207,14 @@ export default {
}
.label {
color: #909399;
color: #9E9E9E;
font-family: aliregular;
font-size: 0.8rem;
}
.value {
color: #606266;
color: #3D424C;
font-size: 0.8rem;
font-family:aliregular ;
}
</style>

@ -83,7 +83,7 @@
@click="handleExport">导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" size="medium">
<el-button type="primary" size="medium" @click="handleExporttwo">
单片材料导出
</el-button>
</el-col>
@ -288,6 +288,13 @@ export default {
`基本信息${new Date().getTime()}.xlsx`
);
},
/** 单片材料导出按钮操作 */
handleExporttwo() {
this.download(
"/gysl/basicInformation/import1",
`单片材料${new Date().getTime()}.docx`
);
},
/** 删除按钮操作 */
handleDelete(row) {

@ -29,7 +29,7 @@
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<el-table-column label="序号" align="center">
<template slot-scope="scope">
{{ (scope.$index + 1) + (queryParams.pageNum - 1) * queryParams.pageSize }}
{{ (scope.$index + 1) + (queryParams.current - 1) * queryParams.size }}
</template>
</el-table-column>
<el-table-column label="评价要素" align="center" prop="pjys" />
@ -41,7 +41,7 @@
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.current" :limit.sync="queryParams.size"
@pagination="getList" />
</div>
@ -71,8 +71,8 @@ export default {
return {
//
queryParams: {
pageNum: 1,
pageSize: 10,
current: 1,
size: 10,
pjys: '' // pjys
},
//
@ -130,7 +130,7 @@ export default {
},
//
handleQuery() {
this.queryParams.pageNum = 1;
this.queryParams.current = 1;
this.getList();
},
//

@ -55,7 +55,7 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center">
<template slot-scope="scope">
{{ (scope.$index + 1) + (queryParams.pageNum - 1) * queryParams.pageSize }}
{{ (scope.$index + 1) + (queryParams.current - 1) * queryParams.size }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" prop="name" width="200" />
@ -87,8 +87,8 @@
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" />
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.current"
:limit.sync="queryParams.size" @pagination="getList" />
</div>
</div>
</template>
@ -133,8 +133,8 @@ export default {
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
current: 1,
size: 10,
xzfl: undefined,
name: undefined,
xmfrdwxz: undefined,
@ -201,8 +201,8 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
current: 1,
size: 10,
xzfl: undefined,
name: undefined,
xmfrdwxz: undefined,
@ -216,7 +216,7 @@ export default {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.queryParams.current = 1;
this.getList();
}
}

@ -27,7 +27,7 @@
<el-col :span="3">
<el-form-item label="更新时间" prop="updateTime">
<el-date-picker v-model="queryParams.startTime" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:style="{ width: '13.5rem' }" placeholder="选择日期" clearable @change="handleQuery" />
:style="{ width: '13.5rem' }" placeholder="选择日期" clearable />
</el-form-item>
</el-col>
</el-row>
@ -64,7 +64,7 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" width="60" align="center">
<template slot-scope="scope">
{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}
{{ (queryParams.current - 1) * queryParams.size + scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="上楼目录类别" align="center">
@ -83,7 +83,7 @@
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.current" :limit.sync="queryParams.size"
@pagination="getList" />
</div>
@ -165,8 +165,8 @@ export default {
detailOpen: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
current: 1,
size: 10,
gydl: undefined,
slmllb: undefined,
startTime: undefined
@ -272,7 +272,7 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.queryParams.current = 1;
this.getList();
},
/** 重置按钮操作 */

@ -30,9 +30,8 @@
</el-col>
<el-col :span="3">
<el-form-item label="更新时间" prop="updateTime">
<el-date-picker v-model="queryParams.updateTime" type="date" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" :style="{ width: '13.5rem' }" placeholder="选择日期" clearable
@change="handleQuery" />
<el-date-picker v-model="queryParams.startTime" type="datetime" format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss" :style="{ width: '18rem' }" placeholder="选择日期时间" clearable />
</el-form-item>
</el-col>
</el-row>
@ -71,7 +70,7 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" width="60" align="center">
<template slot-scope="scope">
{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}
{{ (queryParams.current - 1) * queryParams.size + scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="产业类别" align="center" prop="cylb">
@ -96,8 +95,8 @@
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" />
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.current"
:limit.sync="queryParams.size" @pagination="getList" />
</div>
<!-- 添加或修改项目对话框 -->
@ -184,8 +183,8 @@ export default {
detailOpen: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
current: 1,
size: 10,
cyxf: undefined,
cylb: undefined,
slsyx: undefined,
@ -305,13 +304,14 @@ export default {
createTime: undefined,
updateBy: undefined,
updateId: undefined,
updateTime: undefined
updateTime: undefined,
startTime: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.queryParams.current = 1;
this.getList();
},
/** 重置按钮操作 */

Loading…
Cancel
Save