xuhongjie
严飞永 1 week ago
parent 13c4a93dc2
commit 631fc9dad2

@ -5,4 +5,4 @@ VUE_APP_TITLE = 苏州工业园区工业上楼管理系统
ENV = 'production' ENV = 'production'
# 苏州工业园区工业上楼管理系统/生产环境 # 苏州工业园区工业上楼管理系统/生产环境
VUE_APP_BASE_API = 'http://39.101.188.84:7071' # VUE_APP_BASE_API = 'http://39.101.188.84:7071'

@ -695,6 +695,30 @@ export function allproject(){
method:'get' method:'get'
}) })
} }
//产业数据分析
export function allchanye(){
return request({
url:'/gysl/zwStats/slfx',
method:'get'
})
}
//产业导向目录分析
export function allchanyeml(){
return request({
url:'/gysl/zwStats/mlfx',
method:'get'
})
}
//产业导向细分产业分析
export function allchanyexfcyfx(){
return request({
url:'/gysl/zwStats/xfcyfx',
method:'get'
})
}
//企业详细通知 //企业详细通知
export function getAllMessagestwo(){ export function getAllMessagestwo(){
return request({ return request({
@ -719,7 +743,6 @@ export function getpicturelist(id){
} }
// 细分产业管理 // 细分产业管理
// 新增数据 // 新增数据
export function addXfcygl(data) { export function addXfcygl(data) {
@ -760,13 +783,20 @@ export function getXfcyglPage(query) {
} }
//消息通知数量 //消息通知数量(企业端)
export function getMessageCount() { export function getMessageCount() {
return request({ return request({
url: '/gysl/qyStats/qyNoticeCount', url: '/gysl/qyStats/qyNoticeCount',
method: 'get' method: 'get'
}) })
} }
//消息通知数量(政务端)
export function getMessageCounttwo() {
return request({
url: '/gysl/zwStats/zwNoticeCount',
method: 'get'
})
}
//智能提醒 //智能提醒
//已读提醒 //已读提醒

@ -0,0 +1,34 @@
@font-face {
font-family: "alibold";
src: url('./AlibabaSans-Bold.otf');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "aliregular";
src: url('./AlibabaSans-Regular.otf');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "alimedium";
src: url("./AlibabaSans-Medium.otf");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "DINbold";
src: url("./DIN-Bold.otf");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "DINLight";
src: url("./DIN-Light.otf");
font-weight: normal;
font-style: normal;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 669 KiB

After

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

@ -2,7 +2,7 @@
<div> <div>
<!-- 政务端消息通知数量 --> <!-- 政务端消息通知数量 -->
<!-- 大于0的时候显示的图标 --> <!-- 大于0的时候显示的图标 -->
<el-badge :is-dot="counts > 0" class="item" v-if="checkRole(['common'])"> <el-badge :is-dot="countstwo > 0" class="item" v-if="checkRole(['common'])">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
<i class="el-icon-bell"></i> <i class="el-icon-bell"></i>
</span> </span>
@ -18,12 +18,13 @@
<script> <script>
import { checkRole } from "@/utils/permission"; import { checkRole } from "@/utils/permission";
import { getMessageCount } from '@/api/ManageApi/index' import { getMessageCount,getMessageCounttwo } from '@/api/ManageApi/index'
export default { export default {
data() { data() {
return { return {
counts: 0 counts: 0 ,
countstwo: 0,
} }
}, },
computed: { computed: {
@ -36,6 +37,7 @@ export default {
}, },
mounted() { mounted() {
this.getCounts(); this.getCounts();
this.getCountstwo();
}, },
methods: { methods: {
checkRole, checkRole,
@ -51,6 +53,19 @@ export default {
} catch (error) { } catch (error) {
console.error('获取数据失败:', error); console.error('获取数据失败:', error);
} }
},
//
async getCountstwo() {
try {
const response = await getMessageCounttwo();
if (response && response.code === 200) {
this.countstwo = response.data; // counts
} else {
console.error('获取数据失败:', response);
}
} catch (error) {
console.error('获取数据失败:', error);
}
}, },
handleCommand(command) { handleCommand(command) {
this.$message('点击了: ' + command) this.$message('点击了: ' + command)

@ -7,6 +7,7 @@ import "./assets/styles/element-variables.scss";
import "@/assets/styles/index.scss"; // global css import "@/assets/styles/index.scss"; // global css
import "@/assets/styles/ruoyi.scss"; // ruoyi css import "@/assets/styles/ruoyi.scss"; // ruoyi css
import "@/assets/fonts/text.css";
import "leaflet/dist/leaflet.css"; import "leaflet/dist/leaflet.css";
import "leaflet"; import "leaflet";

@ -181,6 +181,18 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<el-form-item label="经度" prop="tyshxydm">
<el-input v-model="form.tyshxydm" maxlength="50"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="纬度" prop="tyshxydm">
<el-input v-model="form.tyshxydm" maxlength="50"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="项目法人单位简介" prop="unitIntroduction"> <el-form-item label="项目法人单位简介" prop="unitIntroduction">
<el-input v-model="form.unitIntroduction" type="textarea" rows="4" maxlength="1000"></el-input> <el-input v-model="form.unitIntroduction" type="textarea" rows="4" maxlength="1000"></el-input>
</el-form-item> </el-form-item>
@ -351,16 +363,6 @@ export default {
methods: { methods: {
checkPermi, checkPermi,
checkRole, checkRole,
/** 导出 */
// handleExport() {
// this.download(
// "/gysl/basicInformation/exportInfo",
// {
// idList: this.basicInfo.id
// },
// `${new Date().getTime()}.xlsx`
// );
// },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('/gysl/basicInformation/export', { this.download('/gysl/basicInformation/export', {

@ -1,173 +1,239 @@
<template> <template>
<div class="map-container"> <div class="container">
<div class="search_box"> <!-- 搜索框 -->
<!-- <div class="label">搜索位置</div> --> <div class="search-container">
<el-input placeholder="请输入地点名称" v-model="input"> <el-input
<i slot="prefix" class="el-input__icon el-icon-search"></i> v-model="keyword"
placeholder="请输入地点名称"
class="search-input"
@keyup.enter.native="toSearch"
@input="handleInput"
>
<el-button
slot="append"
icon="el-icon-search"
@click="toSearch"
></el-button>
</el-input> </el-input>
<!-- 搜索结果列表 -->
<div class="search-results" v-if="searchBox && 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>
<!-- 内容区域 -->
<div class="main-content">
<!-- 右侧地图 -->
<div class="map-container">
<div id="mars2dContainerSSS" class="mars2d-container"></div>
</div>
</div> </div>
<div ref="gaode_Map" id="gaode_Map" class="map"></div>
</div> </div>
</template> </template>
<script> <script>
import AMapLoader from "@amap/amap-jsapi-loader"; import 'mars2d/mars2d.css';
window._AMapSecurityConfig = { import * as mars2d from 'mars2d';
// import axios from 'axios';
securityJsCode: "e779fe2f89c105226f4cc4a78d0bcafe",
};
export default { export default {
components: {},
props: [],
data() { data() {
const basePathUrl = window.basePathUrl || "";
return { return {
loading: false, configUrl: basePathUrl + "config/config.json",
isDetail: false, mapOptions: {
dataForm: { copyright: false,
kqName: undefined, basemaps: [
kqLocation: undefined, {
kqLongitude: undefined, id: 2021,
kqLatitude: undefined, pid: 10,
kqWorkUnit: undefined, name: "高德电子",
cronkqAccredit: [], icon: "img/basemaps/gaode_vec.png",
kqValidCardRange: undefined, type: "gaode",
layer: "vec",
show: true
}
],
center: { lat: 31.3256, lng: 120.7457 },
zoom: 16,
minZoom: 15,
maxZoom: 20,
zoomControl: true,
}, },
rules: {},
input: "",
map: null, map: null,
auto: null, keyword: "", //
placeSearch: null, searchList: [], //
lnglat: [], searchBox: false, //
markers: [], searchDebounce: null, //
position: {},
}; };
}, },
computed: {},
watch: {},
created() { },
mounted() {
// 使 nextTick DOM
this.$nextTick(() => {
this.initMap();
});
},
methods: { methods: {
// //
initMap() { initMap() {
// this.map = new mars2d.Map('mars2dContainerSSS', this.mapOptions);
let centerLen = [120.585298, 31.322965]; this.map.on('load', this.onload);
AMapLoader.load({
key: "b58f9bc6e9863d1688a2da18446ec14d", // WebKey load
version: "2.0", // JSAPI 1.4.15
plugins: ["AMap.AutoComplete", "AMap.PlaceSearch", "AMap.Geocoder"],
})
.then((AMap) => {
this.map = new AMap.Map("gaode_Map", {
// id
viewMode: "3D", // 3D
zoom: 16, //
center: centerLen, //
resizeEnable: true,
});
this.setMarker(centerLen);
//
this.searchMap();
//
this.map.on("click", this.clickMapHandler);
})
.catch((e) => {
console.error("地图加载失败:", e);
});
}, },
//
searchMap() { //
// onload() {
this.auto = new AMap.AutoComplete({ console.log('地图加载完成');
input: "tipinput", // 使inputid
});
//
this.placeSearch = new AMap.PlaceSearch({
map: this.map,
});
//
this.auto.on("select", this.selectSite);
}, },
//
selectSite(e) { //
if (e.poi.location) { handleInput() {
this.placeSearch.setCity(e.poi.adcode); if (this.searchDebounce) {
this.placeSearch.search(e.poi.name); // clearTimeout(this.searchDebounce);
} else {
this.$message.error("查询地址失败,请重新输入地址");
} }
this.searchDebounce = setTimeout(() => {
this.toSearch();
}, 300); // 300
}, },
//
clickMapHandler(e) { //
this.lnglat = [e.lnglat.getLng(), e.lnglat.getLat()]; toSearch() {
this.setMarker(this.lnglat); if (!this.keyword.trim()) {
// this.$message({
let geocoder = new AMap.Geocoder({}); // message: "",
let that = this; // type: "warning",
geocoder.getAddress(this.lnglat, function (status, result) { });
if (status === "complete" && result.regeocode) { return;
// dataForm }
} else {
that.$message.error("查询地址失败,请重新输入地址"); let params = {
key: "bd665f6310bb41cdaea4494ec86fcbfa",
keywords: this.keyword,
city: "亳州市",
};
axios({
method: "GET",
url: "https://restapi.amap.com/v3/place/text",
params,
}).then((res) => {
console.log(res);
if (res.status == 200) {
if (res.data.pois && res.data.pois.length > 0) {
this.searchList = res.data.pois;
this.searchBox = true;
} else {
this.$message({
message: "未搜索到结果!",
type: "warning",
});
}
} }
}).catch(error => {
console.error('搜索失败:', error);
this.$message.error('搜索失败,请稍后重试');
}); });
}, },
//
setMarker(lnglat) { //
this.removeMarker(); centerMap(item) {
let marker = new AMap.Marker({ const [lng, lat] = item.location.split(',').map(Number);
position: lnglat,
}); //
marker.setMap(this.map); this.keyword = item.name;
this.markers.push(marker);
}, //
// this.map.flyTo([lat, lng], 17);
removeMarker() {
if (this.markers) { //
this.markers.forEach(marker => marker.setMap(null)); this.searchBox = false;
this.markers = []; }
}
},
}, },
mounted() {
this.initMap();
},
beforeDestroy() {
if (this.map) {
this.map.destroy();
}
}
}; };
</script> </script>
<style lang="scss"> <style scoped>
.map-container { .container {
display: flex;
flex-direction: column;
width: 100%; width: 100%;
height: 30rem; background-color: #FFFFFF;
position: relative; box-shadow: 0rem 0.13rem 0.63rem 0rem rgba(177, 177, 177, 0.1);
border-radius: 0.5rem;
overflow: auto;
}
.search-container {
padding: 1rem;
position: absolute;
z-index: 1000;
margin-left: 4rem;
}
.search-input {
width: 100%;
max-width: 600px;
}
.search-results {
position: absolute;
top: 100%;
left: 1rem;
width: 100%;
max-width: 500px;
max-height: 300px;
overflow-y: auto;
background-color: white;
border: 1px solid #ebeef5;
border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
z-index: 1000;
} }
.search_box { .search-item {
padding: 10px 15px;
cursor: pointer;
border-bottom: 1px solid #ebeef5;
}
.search-item:hover {
background-color: #f5f7fa;
}
.item-name {
font-weight: bold;
margin-bottom: 5px;
}
.item-address {
color: #909399;
font-size: 12px;
}
.main-content {
display: flex; display: flex;
justify-content: flex-start; width: 75rem;
align-items: center; padding: 0 1rem 1rem 1rem;
height: 50px;
padding: 0 20px 0 0;
width: 25rem;
.label {
color: #000;
width: 100px;
}
} }
.map { .map-container {
overflow: hidden; width: 100%;
width: 72rem; height: 25rem;
height: 26.13rem;
margin: 0;
position: relative; position: relative;
z-index: 1000;
} }
.amap-sug-result { .mars2d-container {
z-index: 2999 !important; width: 100%;
height: 100%;
border-radius: 0.5rem;
} }
</style> </style>

@ -1,35 +1,34 @@
<template> <template>
<div class="container"> <div>
<!-- 搜索框 -->
<div class="search-container">
<el-input v-model="keyword" placeholder="请输入地点名称" class="search-input" @keyup.enter.native="toSearch"
@input="handleInput">
<el-button slot="append" icon="el-icon-search" @click="toSearch"></el-button>
</el-input>
<!-- 落点地点输入框 -->
<el-input v-model="pointForm.address" readonly>
<template slot="append">
<el-button icon="el-icon-refresh" @click="reverseGeocode" :loading="loadingAddress"></el-button>
</template>
</el-input>
<!-- 搜索结果列表 -->
<div class="search-results" v-if="searchBox && 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>
<!-- 内容区域 --> <!-- 内容区域 -->
<div class="main-content"> <div class="main-content">
<!-- 地图容器 --> <!-- 地图容器 -->
<div class="map-thumbnail"> <div class="map-thumbnail">
<div id="mars2dContainerLuotu" class="mars2d-container"></div> <div id="mars2dContainerLuotu" class="mars2d-container"></div>
</div> </div>
<!-- 悬浮的点位信息 div --> <div style="margin-top: 1rem;">
<div class="floating-panel" v-if="floatingPanelVisible"> <el-button type="primary" @click="confirmPoint"></el-button>
<div class="panel-header">
<span>{{ pointDialogTitle }}</span>
<el-button type="text" @click="hideFloatingPanel" class="close-button">关闭</el-button>
</div>
<div class="panel-body">
<el-form :model="pointForm" label-width="100px">
<el-form-item label="项目名称">
<el-input v-model="pointForm.name" ref="pointNameInput"></el-input>
</el-form-item>
<el-form-item label="纬度">
<el-input v-model="pointForm.lat" readonly></el-input>
</el-form-item>
<el-form-item label="经度">
<el-input v-model="pointForm.lng" readonly></el-input>
</el-form-item>
</el-form>
</div>
<div class="panel-footer">
<el-button @click="hideFloatingPanel"></el-button>
<el-button v-if="!isEditing" type="primary" @click="addPoint"></el-button>
<el-button v-else type="danger" @click="deletePoint"></el-button>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -38,268 +37,348 @@
<script> <script>
import 'mars2d/mars2d.css'; import 'mars2d/mars2d.css';
import * as mars2d from 'mars2d'; import * as mars2d from 'mars2d';
import axios from 'axios';
const attributionHtml = `©2024 高德软件- <span>审图号GS(2021)6375号</span>
- 甲测资字11111093 - <a href="https://map.amap.com/doc/serviceitem.html" target="_blank" trace="tos">服务条款</a> `
export default { export default {
components: {},
dicts: ['tplx'],
data() { data() {
const basePathUrl = window.basePathUrl || ""; const basePathUrl = window.basePathUrl || "";
return { return {
configUrl: basePathUrl + "config/config.json", configUrl: basePathUrl + "config/config.json",
mapOptions: { mapOptions: {
// http://mars2d.cn/apidoc.html#Map copyright: false,
copyright: false, // logo // basemaps: [
// {
// id: 2021,
// pid: 10,
// name: "",
// icon: "img/basemaps/gaode_vec.png",
// type: "gaode",
// layer: "vec",
// show: true
// }
// ],
basemaps: [ basemaps: [
{ {
"id": 2021, name: "高德地图",
"pid": 10, type: "gaode",
"name": "高德电子", layer: "vec",
"icon": "img/basemaps/gaode_vec.png", show: true,
"type": "gaode", // maxZoom: 21,
"layer": "vec", // maxNativeZoom: 18,
"show": true attribution: attributionHtml
},
{
name: "高德卫星",
type: "group",
layers: [
{
type: "gaode",
layer: "img_d"
},
{
type: "gaode",
layer: "img_z"
}
],
attribution: attributionHtml
}, },
{
name: "高德大字体地图",
type: "gaode",
layer: "vec",
bigfont: true,
attribution: attributionHtml
}
], ],
center: { lat: 31.2304, lng: 120.6184 }, // center: { lat: 31.2304, lng: 120.6184 },
zoom: 10, // zoom: 10,
}, CRS: "BAIDU"
//
dialogVisible: false,
dialogTitle: '编辑项目',
form: {
type: '外部', //
}, },
map: null, // map: null,
floatingPanelVisible: false, // floatingPanelVisible: false,
pointDialogTitle: '新增点位', // pointDialogTitle: '确认地点位置',
pointForm: { pointForm: {
name: '', name: '',
lat: '', lat: '',
lng: '', lng: '',
address: ''
}, },
selectedLatLng: null, // selectedPlaceName: '',
existingMarker: null, // selectedMarker: null,
isEditing: false, // keyword: "",
markerIcon: require('@/assets/images/detailsicon/icon-定位@2x.png'), // 使 require searchList: [],
searchBox: false,
searchDebounce: null,
markerIcon: require('@/assets/images/detailsicon/icon-定位@2x.png'),
loadingAddress: false,
gaodeKey: 'bd665f6310bb41cdaea4494ec86fcbfa'
}; };
}, },
methods: { methods: {
onload(map) {
//
},
//
handleEdit() {
this.dialogTitle = '编辑项目';
this.dialogVisible = true;
//
this.form = {
type: '外部', //
};
},
//
handleSubmit() {
this.dialogVisible = false;
// API
},
//
initMap() { initMap() {
if (!this.map) { if (!this.map) {
this.map = new mars2d.Map('mars2dContainerLuotu', this.mapOptions); this.map = new mars2d.Map('mars2dContainerLuotu', this.mapOptions);
this.map.on('click', this.onMapClick); this.map.on('click', this.onMapClick);
} }
}, },
//
onMapClick(event) { onMapClick(event) {
if (this.existingMarker) { if (this.selectedMarker) {
this.$message.warning('地图上已经存在一个点位,请先删除该点位后再添加新的点位。'); this.selectedMarker.setLatLng(event.latlng);
return; this.updatePointForm(event.latlng);
this.reverseGeocode(); //
} }
const { latlng } = event;
this.selectedLatLng = latlng;
this.pointForm.lat = latlng.lat.toString();
this.pointForm.lng = latlng.lng.toString();
this.showFloatingPanel();
}, },
//
updatePointForm(latlng) {
this.pointForm.lat = latlng.lat;
this.pointForm.lng = latlng.lng;
},
showFloatingPanel() { showFloatingPanel() {
this.floatingPanelVisible = true; this.floatingPanelVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.pointNameInput.focus(); this.$refs.pointNameInput.focus();
}); });
}, },
//
hideFloatingPanel() { hideFloatingPanel() {
this.floatingPanelVisible = false; this.floatingPanelVisible = false;
this.selectedLatLng = null;
this.pointForm.name = '';
this.pointForm.latlng = '';
}, },
//
addPoint() { confirmPoint() {
if (this.selectedLatLng) { if (this.pointForm.name) {
if (this.existingMarker) { this.selectedPlaceName = this.pointForm.name;
this.map.graphicLayer.removeGraphic(this.existingMarker); } else if (this.pointForm.address) {
this.selectedPlaceName = this.pointForm.address;
}
this.hideFloatingPanel();
this.$message.success('地点选择成功');
},
// -
reverseGeocode() {
if (!this.pointForm.lat || !this.pointForm.lng) return;
this.loadingAddress = true;
axios({
method: "GET",
url: "https://restapi.amap.com/v3/geocode/regeo",
params: {
key: this.gaodeKey,
location: `${this.pointForm.lng},${this.pointForm.lat}`,
radius: 50,
extensions: 'base'
} }
const marker = new mars2d.graphic.Marker({ }).then(res => {
latlng: this.selectedLatLng, if (res.data && res.data.status === '1' && res.data.regeocode) {
style: { const address = res.data.regeocode.formatted_address ||
image: this.markerIcon, // 使 res.data.regeocode.addressComponent.neighborhood.name ||
width: 32, res.data.regeocode.addressComponent.township;
height: 32, this.pointForm.address = address;
},
}); //
this.map.graphicLayer.addGraphic(marker); if (!this.pointForm.name) {
this.existingMarker = marker; this.pointForm.name = address;
this.isEditing = true; // }
this.hideFloatingPanel(); } else {
this.$message.success('落图成功'); this.$message.warning('未能获取详细地址信息');
}
// }).catch().finally(() => {
marker.on('click', this.onMarkerClick); this.loadingAddress = false;
});
},
handleInput() {
if (this.searchDebounce) {
clearTimeout(this.searchDebounce);
} }
this.searchDebounce = setTimeout(() => {
this.toSearch();
}, 300);
}, },
//
deletePoint() { toSearch() {
if (this.existingMarker) { if (!this.keyword.trim()) {
this.existingMarker.off('click', this.onMarkerClick); // this.$message({
this.map.graphicLayer.removeGraphic(this.existingMarker); });
this.existingMarker = null; return;
this.isEditing = false; //
this.hideFloatingPanel();
this.$message.success('点位已删除');
} }
let params = {
key: this.gaodeKey,
keywords: this.keyword,
city: "亳州市",
};
axios({
method: "GET",
url: "https://restapi.amap.com/v3/place/text",
params,
}).then((res) => {
if (res.status == 200) {
if (res.data.pois && res.data.pois.length > 0) {
this.searchList = res.data.pois;
this.searchBox = true;
} else {
this.$message({
message: "未搜索到结果!",
type: "warning",
});
}
}
}).catch(error => {
console.error('搜索失败:', error);
this.$message.error('搜索失败,请稍后重试');
});
}, },
//
onMarkerClick(event) { centerMap(item) {
this.pointForm.name = this.existingMarker.name || ''; const [lng, lat] = item.location.split(',').map(Number);
this.pointForm.latlng = `${this.existingMarker.latlng.lat}, ${this.existingMarker.latlng.lng}`;
this.keyword = item.name;
this.map.flyTo([lat, lng], 17);
if (this.selectedMarker) {
this.map.graphicLayer.removeGraphic(this.selectedMarker);
}
//
this.selectedMarker = new mars2d.graphic.Marker({
latlng: [lat, lng],
style: {
image: this.markerIcon,
width: 32,
height: 32,
draggable: true
},
attr: {
name: item.name,
address: item.address
}
});
this.map.graphicLayer.addGraphic(this.selectedMarker);
//
this.selectedMarker.on('dragend', (event) => {
const newLatLng = event.target.getLatLng();
this.updatePointForm(newLatLng);
this.reverseGeocode(); //
});
//
this.pointForm = {
name: item.name,
lat: lat,
lng: lng,
address: item.address
};
//
this.showFloatingPanel(); this.showFloatingPanel();
}, this.searchBox = false;
}
}, },
mounted() { mounted() {
this.initMap(); // this.initMap();
}, },
}; };
</script> </script>
<style scoped> <style scoped>
.container { .el-input-group__append .el-button {
display: flex; padding: 12px;
flex-direction: column;
width: 100%;
background-color: #FFFFFF;
box-shadow: 0rem 0.13rem 0.63rem 0rem rgba(177, 177, 177, 0.1);
border-radius: 0.5rem 0.5rem 0.5rem 0.5rem;
gap: 1rem;
overflow: auto;
position: relative;
} }
.containertop { .el-icon-refresh {
height: auto; cursor: pointer;
display: flex; transition: transform 0.3s;
justify-content: space-between;
padding: .5rem;
border-bottom: 1px solid #E5E5E5;
} }
.action-bar { .el-icon-refresh:hover {
margin-bottom: 20px; transform: rotate(180deg);
} }
.carousel-container { .search-container {
padding: 1rem;
position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 1rem; gap: 1rem;
} }
.carousel { .search-input {
width: 21rem;
height: 12rem;
overflow: hidden;
}
.carousel-item {
width: 100%; width: 100%;
height: 100%; max-width: 500px;
position: absolute;
top: 0;
left: 0;
opacity: 0;
transition: opacity 0.5s ease-in-out;
} }
.carousel-item img { .selected-place-input {
width: 100%; width: 100%;
height: 100%; max-width: 500px;
object-fit: cover;
}
.carousel-item.active {
opacity: 1;
} }
.carousel-control { .search-results {
position: absolute; position: absolute;
top: 50%; top: 100%;
transform: translateY(-50%); left: 1rem;
cursor: pointer; width: 100%;
font-size: 1.5rem; max-width: 500px;
color: white; max-height: 300px;
padding: 0.5rem; overflow-y: auto;
z-index: 10; background-color: white;
border: 1px solid #ebeef5;
border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
z-index: 1000;
} }
.carousel-control.left { .search-item {
left: 0; padding: 10px 15px;
cursor: pointer;
border-bottom: 1px solid #ebeef5;
} }
.carousel-control.right { .search-item:hover {
right: 0; background-color: #f5f7fa;
} }
.topleft { .item-name {
width: 8rem; font-weight: bold;
display: flex; margin-bottom: 5px;
gap: 0.4rem;
align-items: center;
} }
.topleft img { .item-address {
width: 0.81rem; color: #909399;
height: 0.81rem; font-size: 12px;
} }
.topleft span { .main-content {
width: auto; display: flex;
height: 0.88rem; flex-direction: column;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi; padding: 0 1rem 1rem 1rem;
font-weight: 500;
font-size: 0.88rem;
color: #3D424C;
line-height: 0.88rem;
text-align: right;
font-style: normal;
text-transform: none;
} }
.map-thumbnail { .map-thumbnail {
width: 60rem; width: 100%;
height: 34rem; height: 500px;
position: relative; position: relative;
} }
.mars2d-container { .mars2d-container {
width: 60rem; width: 100%;
height: 34rem; height: 100%;
} }
/* 悬浮面板样式 */ /* 悬浮面板样式 */
.floating-panel { .floating-panel {
position: fixed; position: absolute;
top: 30%; top: 20px;
right: 25%; right: 20px;
width: 300px; width: 400px;
background-color: #FFFFFF; background-color: #FFFFFF;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
border-radius: 4px; border-radius: 4px;

@ -1,8 +1,16 @@
<template> <template>
<div class="container"> <div class="container">
<div> <div>
<div class="title">整体项目情况</div> <div class="top">
<table> <div class="title">整体项目情况</div>
<div class="importdiv">
<el-date-picker v-model="value3" type="year" placeholder="选择年份">
</el-date-picker>
<el-button icon="el-icon-upload2" style="background-color: #2B62F1;
color: #FFFFFF;">报告导出</el-button>
</div>
</div>
<!-- <table style="margin-top: .3rem;">
<thead> <thead>
<tr> <tr>
<th>项目总数</th> <th>项目总数</th>
@ -15,18 +23,57 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>{{ projectData.allProject }}</td> <td>
{{ projectData.allProject }}
</td>
<td>{{ projectData.allGrossArea }}</td> <td>{{ projectData.allGrossArea }}</td>
<td>{{ projectData.allBuilding1 }}</td> <td>{{ projectData.allBuilding1 }}</td>
<td>{{ projectData.allBuilding2 }}</td> <td>{{ projectData.allBuilding2 }}</td>
<td>{{ projectData.allBuilding3 }}</td> <td>{{ projectData.allBuilding3 }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table> -->
<div class="mainarea">
<div class="itemone">
<img src="@/assets/images/icon-xmzs@2x.png" alt="">
<div class="itemleft">
<div class="lefttitle">项目总数</div>
<div class="number">{{ projectData.allProject }}</div>
</div>
</div>
<div class="itemone">
<img src="@/assets/images/icon-jzmj@2x.png" alt="">
<div class="itemleft">
<div class="lefttitle">建筑面积(万平方米)</div>
<div class="number">{{ projectData.allGrossArea }}</div>
</div>
</div>
<div class="itemone">
<img src="@/assets/images/icon-yjsl@2x.png" alt="">
<div class="itemleft">
<div class="lefttitle">已建数量()</div>
<div class="number">{{ projectData.allBuilding1 }}</div>
</div>
</div>
<div class="itemone">
<img src="@/assets/images/icon-yjsl@2x.png" alt="">
<div class="itemleft">
<div class="lefttitle">在建数量()</div>
<div class="number">{{ projectData.allBuilding2 }}</div>
</div>
</div>
<div class="itemone">
<img src="@/assets/images/icon-yjsl@2x.png" alt="">
<div class="itemleft">
<div class="lefttitle">拟建数量()</div>
<div class="number">{{ projectData.allBuilding3 }}</div>
</div>
</div>
</div>
</div> </div>
<div> <div>
<div class="title">当年项目情况</div> <div class="title">当年项目情况</div>
<table> <!-- <table>
<thead> <thead>
<tr> <tr>
<th>新开工项目数</th> <th>新开工项目数</th>
@ -45,7 +92,44 @@
<td>{{ currentYearData.currentBuilding2 || 0 }}</td> <td>{{ currentYearData.currentBuilding2 || 0 }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table> -->
<div class="mainarea">
<div class="itemone">
<img src="@/assets/images/icon-xkgxms@2x.png" alt="">
<div class="itemleft">
<div class="lefttitle">新开工项目数</div>
<div class="number">{{ currentYearData.currentYearProject }}</div>
</div>
</div>
<div class="itemone">
<img src="@/assets/images/icon-jzmj@2x.png" alt="">
<div class="itemleft">
<div class="lefttitle">建筑面积(万平方米)</div>
<div class="number">{{ currentYearData.currentYearGrossArea }}</div>
</div>
</div>
<div class="itemone">
<img src="@/assets/images/icon-yjsl@2x.png" alt="">
<div class="itemleft">
<div class="lefttitle">已建数量()</div>
<div class="number">{{ currentYearData.currentYearBuilding1 }}</div>
</div>
</div>
<div class="itemone">
<img src="@/assets/images/icon-yjsl@2x.png" alt="">
<div class="itemleft">
<div class="lefttitle">在建数量()</div>
<div class="number">{{ currentYearData.currentBuilding2 }}</div>
</div>
</div>
<div class="itemone">
<img src="@/assets/images/icon-yjsl@2x.png" alt="">
<div class="itemleft">
<div class="lefttitle">拟建数量()</div>
<div class="number">{{ currentYearData.currentBuilding2 }}</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -56,6 +140,7 @@ import { allinformation } from '@/api/ManageApi';
export default { export default {
data() { data() {
return { return {
value3: '',
projectData: { projectData: {
allProject: 0, // allProject: 0, //
allGrossArea: 0, // allGrossArea: 0, //
@ -104,11 +189,16 @@ export default {
</script> </script>
<style scoped> <style scoped>
.importdiv {
display: flex;
gap: .5rem;
}
/* Your existing styles remain unchanged */ /* Your existing styles remain unchanged */
.container { .container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 1.5rem; gap: 2rem;
} }
table { table {
@ -128,7 +218,7 @@ th {
} }
.title { .title {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi; font-family: alibold;
font-weight: 600; font-weight: 600;
font-size: 1.25rem; font-size: 1.25rem;
color: #3D424C; color: #3D424C;
@ -140,8 +230,8 @@ th {
margin-left: .4rem; margin-left: .4rem;
} }
thead tr { .lefttitle {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi; font-family: aliregular;
font-weight: 400; font-weight: 400;
font-size: 0.88rem; font-size: 0.88rem;
color: #7B8599; color: #7B8599;
@ -150,14 +240,46 @@ thead tr {
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
} }
tbody tr {
font-family: DIN, DIN; .number {
font-family: DINbold;
font-weight: 600; font-weight: 600;
font-size: 1.5rem; font-size: 1.25rem;
color: #292C33; color: #3D424C;
line-height: 2.11rem; line-height: 1.69rem;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
margin-left: .4rem;
}
.mainarea {
padding: .5rem;
height: auto;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 1rem;
}
.itemone {
width: 12rem;
height: 3rem;
/* background-color: lightblue; */
display: flex;
gap: .3rem;
}
.itemleft {
display: flex;
flex-direction: column;
margin-left: .5rem;
}
.top {
display: flex;
width: 100%;
justify-content: space-between;
} }
</style> </style>

@ -0,0 +1,126 @@
<template>
<div>
<div class="itemsall">
<span>{{ totalCount }}</span>
<span>项目总数</span>
</div>
<div ref="chart" style="width: 30rem; height: 15rem;"></div>
</div>
</template>
<script>
import * as echarts from 'echarts';
import { allchanyeml } from '@/api/ManageApi/index';
export default {
name: 'RingChart',
data() {
return {
chartData: [
{ value: 54, name: '重点鼓励上楼', itemStyle: { color: '#50DFB3' } },
{ value: 65, name: '有条件上楼', itemStyle: { color: '#507AFC' } },
],
totalCount: 0 //
};
},
mounted() {
this.getData();
},
methods: {
async getData() {
const response = await allchanyeml();
if (response && response.code === 200 && response.data) {
this.chartData = this.processData(response.data);
this.calculateTotal(); //
this.renderChart();
} else {}
},
processData(data) {
const names = ['重点鼓励上楼', '有条件上楼'];
const counts = data.map(item => item.count);
return names.map((name, index) => ({
value: counts[index] || 0,
name: name,
itemStyle: { color: ['#50DFB3', '#507AFC'][index] },
}));
},
calculateTotal() {
// value
this.totalCount = this.chartData.reduce((sum, item) => sum + item.value, 0);
},
renderChart() {
const chartDom = this.$refs.chart;
const myChart = echarts.init(chartDom);
const option = {
tooltip: {
trigger: 'item'
},
legend: {
orient: 'vertical', //
right: '10%', //
top: 'center', //
itemGap: 50, //
formatter: function (name) {
//
const item = this.chartData.find(item => item.name === name);
return `${name} ${item.value}`;
}.bind(this)
},
series: [
{
name: '项目分布',
type: 'pie',
radius: ['40%', '60%'],
center: ['30%', '50%'],
data: this.chartData,
label: {
show: false //
},
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
myChart.setOption(option);
}
}
};
</script>
<style scoped>
.itemsall {
position: absolute;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
top: 5.4rem;
left: 7rem;
}
.itemsall span:nth-child(1) {
font-family: DINbold;
font-weight: 500;
font-size: 2rem;
color: #292C33;
text-align: left;
font-style: normal;
text-transform: none;
}
.itemsall span:nth-child(2) {
font-family: alibold;
font-weight: 400;
font-size: 1rem;
color: #9E9E9E;
text-align: left;
font-style: normal;
text-transform: none;
}
</style>

@ -0,0 +1,126 @@
<template>
<div>
<div class="itemsall">
<span>{{ totalCount }}</span>
<span>项目总数</span>
</div>
<div ref="chart" style="width: 30rem; height: 15rem;"></div>
</div>
</template>
<script>
import * as echarts from 'echarts';
import { allchanye } from '@/api/ManageApi/index';
export default {
name: 'RingChart',
data() {
return {
chartData: [
{ value: 54, name: '细分产业分析', itemStyle: { color: '#36C3FB' } },
{ value: 65, name: '目录分析', itemStyle: { color: '#F6B600' } },
],
totalCount: 0 //
};
},
mounted() {
this.getData();
},
methods: {
async getData() {
const response = await allchanye();
if (response && response.code === 200 && response.data) {
this.chartData = this.processData(response.data);
this.calculateTotal(); //
this.renderChart();
} else {}
},
processData(data) {
const names = ['细分产业分析', '目录分析'];
const counts = data.map(item => item.count);
return names.map((name, index) => ({
value: counts[index] || 0,
name: name,
itemStyle: { color: ['#36C3FB', '#F6B600'][index] },
}));
},
calculateTotal() {
// value
this.totalCount = this.chartData.reduce((sum, item) => sum + item.value, 0);
},
renderChart() {
const chartDom = this.$refs.chart;
const myChart = echarts.init(chartDom);
const option = {
tooltip: {
trigger: 'item'
},
legend: {
orient: 'vertical', //
right: '10%', //
top: 'center', //
itemGap: 50, //
formatter: function (name) {
//
const item = this.chartData.find(item => item.name === name);
return `${name} ${item.value}`;
}.bind(this)
},
series: [
{
name: '项目分布',
type: 'pie',
radius: ['40%', '60%'],
center: ['30%', '50%'],
data: this.chartData,
label: {
show: false //
},
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
};
myChart.setOption(option);
}
}
};
</script>
<style scoped>
.itemsall {
position: absolute;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
top: 5.4rem;
left: 7rem;
}
.itemsall span:nth-child(1) {
font-family: DINbold;
font-weight: 500;
font-size: 2rem;
color: #292C33;
text-align: left;
font-style: normal;
text-transform: none;
}
.itemsall span:nth-child(2) {
font-family: alibold;
font-weight: 400;
font-size: 1rem;
color: #9E9E9E;
text-align: left;
font-style: normal;
text-transform: none;
}
</style>

@ -0,0 +1,101 @@
<template>
<div class="progress-container">
<div class="progress-item" v-for="(item, index) in progressData" :key="index">
<span class="progress-label">{{ item.label }}</span>
<div class="progress-bar-wrapper">
<div class="progress-bar" :style="{ width: item.percentage + '%', background: item.color }">
</div>
</div>
<span class="progress-value">{{item.value}}</span>
</div>
</div>
</template>
<script>
import { allchanyexfcyfx } from '@/api/ManageApi/index';
export default {
name: 'ProgressBarWithLabel',
data() {
return {
progressData: [],
maxValue: 0
};
},
created() {
this.fetchData();
},
methods: {
async fetchData() {
try {
const response = await allchanyexfcyfx();
// response.data
const data = response.data;
//
this.maxValue = Math.max(...data.map(item => item.count));
// progressData
this.progressData = data.map((item, index) => ({
label: item.ssgnq,
value: item.count,
percentage: (item.count / this.maxValue) * 100,
color: item.color || (index % 2 === 0 ? '#5B76F9' : '#5B76F9')
}));
} catch (error) {
console.error('Error fetching data:', error);
}
}
}
};
</script>
<style scoped>
.progress-container {
width: 100%;
max-width: 34rem;
margin: 0 auto;
font-family: Arial, sans-serif;
}
.progress-item {
display: flex;
align-items: center;
margin-top: 1.2rem;
}
.progress-label {
width: 10rem;
text-align: right;
padding-right: 0.7rem;
font-size: 0.875rem;
color: #333;
font-family: alibold;
}
.progress-bar-wrapper {
flex: 1;
height: 0.8rem;
background-color: #f0f0f0;
border-radius: 12px;
position: relative;
overflow: hidden;
}
.progress-bar {
height: 100%;
border-radius: 12px;
transition: width 0.5s ease;
position: relative;
}
.progress-value {
width: 1.5rem;
/* background-color: red; */
text-align: right;
margin-left: .3rem;
color: #333;
font-size: 0.88rem;
font-family: aliregular;
}
</style>

@ -127,6 +127,7 @@ export default {
background-color: #fff; background-color: #fff;
border-radius: .5rem; border-radius: .5rem;
margin: .5rem; margin: .5rem;
height: 22rem;
} }
.tablehead { .tablehead {

@ -1,6 +1,6 @@
<template> <template>
<!-- 功能区 --> <!-- 功能区 -->
<div ref="chart" style="width: 30rem; height: 15rem;"></div> <div ref="chart" style="width: 30rem; height: 10rem;"></div>
</template> </template>
<script> <script>
@ -12,10 +12,10 @@ export default {
data() { data() {
return { return {
chartData: [ chartData: [
{ value: 54, name: '高贸区', itemStyle: { color: '#36C3FB' } }, { value: 54, name: '高端制造与国际区', itemStyle: { color: '#36C3FB' } },
{ value: 65, name: '科创区', itemStyle: { color: '#5B76F9' } }, { value: 65, name: '独墅湖区', itemStyle: { color: '#5B76F9' } },
{ value: 32, name: '度假区', itemStyle: { color: '#F08445' } }, { value: 32, name: '阳澄湖半岛旅游度假区', itemStyle: { color: '#F08445' } },
{ value: 25, name: '商务区', itemStyle: { color: '#F6B600' } }, { value: 25, name: '金鸡湖商务区', itemStyle: { color: '#F6B600' } },
{ value: 15, name: '苏相合作区', itemStyle: { color: '#50DFB3' } } { value: 15, name: '苏相合作区', itemStyle: { color: '#50DFB3' } }
] ]
}; };
@ -38,7 +38,7 @@ export default {
} }
}, },
processData(data) { processData(data) {
const names = ['高贸区', '科创区', '度假区', '商务区', '苏相合作区']; const names = ['高端制造与国际区', '独墅湖区', '阳澄湖半岛旅游度假区', '金鸡湖商务区', '苏相合作区'];
const counts = data.map(item => item.count); const counts = data.map(item => item.count);
const total = counts.reduce((sum, count) => sum + count, 0); const total = counts.reduce((sum, count) => sum + count, 0);
@ -63,9 +63,9 @@ export default {
}, },
legend: { legend: {
orient: 'vertical', // orient: 'vertical', //
right: '10%', // right: '0%', //
top: 'center', // top: 'center', //
itemGap: 40, // itemGap: 15, //
formatter: function (name) { formatter: function (name) {
// //
const item = this.chartData.find(item => item.name === name); const item = this.chartData.find(item => item.name === name);

@ -1,6 +1,6 @@
<template> <template>
<!-- 投资主体 --> <!-- 投资主体 -->
<div ref="chart" style="width: 30rem; height: 15rem;"></div> <div ref="chart" style="width: 30rem; height: 10rem;"></div>
</template> </template>
<script> <script>
@ -48,9 +48,9 @@ export default {
}, },
legend: { legend: {
orient: 'vertical', // orient: 'vertical', //
right: '10%', // right: '20%', //
top: 'center', // top: 'center', //
itemGap: 40, // itemGap: 35, //
formatter: function (name) { formatter: function (name) {
// //
const item = this.chartData.find(item => item.name === name); const item = this.chartData.find(item => item.name === name);

@ -1,301 +1,59 @@
<template> <template>
<div class="container"> <div class="container">
<!-- 内容区域 --> <div class="containertwo">
<div class="main-content"> <!-- 地图 -->
<!-- 地图缩略图 --> <div class="mapareaone">
<div class="map-thumbnail"> <div class="leftdiv">
<div id="mars2dContainerSSS" class="mars2d-container"></div> <!-- 项目列表 -->
<div class="mainarea">
<ProjectList />
</div>
</div>
<div class="blueicon"></div>
</div>
<div class="leftarea">
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import 'mars2d/mars2d.css'; import ProjectList from '@/views/components/analysis/projectList.vue'
import * as mars2d from 'mars2d';
export default { export default {
components: {}, components: {
data() { ProjectList,
const basePathUrl = window.basePathUrl || "";
return {
configUrl: basePathUrl + "config/config.json",
mapOptions: {
copyright: false, // logo
basemaps: [
{
"id": 2021,
"pid": 10,
"name": "高德电子",
"icon": "img/basemaps/gaode_vec.png",
"type": "gaode",
"layer": "vec",
"show": true
},
{
"pid": 10,
"name": "高德卫星",
"icon": "img/basemaps/gaode_img.png",
"type": "group",
"layers": [
{
"name": "底图",
"type": "gaode",
"layer": "img_d"
},
{
"name": "注记",
"type": "gaode",
"layer": "img_z"
}
]
},
],
center: { lat: 31.324918, lng: 120.618391 },
zoom: 10,
zoomControl: true,
},
map: null, //
markerIcon: require('@/assets/images/detailsicon/icon-定位@2x.png'), // icon
};
}, },
methods: { }
//
initMap() {
this.map = new mars2d.Map('mars2dContainerSSS', this.mapOptions);
this.map.on('load', this.onload);
},
//
onload() {
this.addDistrictsLayer();
},
//
addDistrictsLayer() {
const geoJsonLayer = new mars2d.layer.GeoJsonLayer({
name: "苏州市各区",
url: "https://geo.datav.aliyun.com/areas_v3/bound/320500_full.json",
symbol: {
type: "polygon",
styleOptions: {
fill: true,
fillColor: "white",
fillOpacity: 0.7,
outline: true,
outlineWidth: 2,
outlineOpacity: 1,
outlineColor: "white"
}
},
tooltip: "{name}<br/>项目数量:{num}个",
flyTo: true
});
this.map.addLayer(geoJsonLayer);
//
geoJsonLayer.on(mars2d.EventType.load, (event) => {
console.log("数据加载完成", event);
const arrdata = [
{ name: "姑苏区", Y: 31.318468, X: 120.618391, value: 15, id: 0 },
{ name: "吴中区", Y: 31.285618, X: 120.641166, value: 10, id: 1 },
{ name: "相城区", Y: 31.385618, X: 120.581166, value: 8, id: 2 },
{ name: "吴江区", Y: 31.165618, X: 120.641166, value: 12, id: 3 },
{ name: "工业园区", Y: 31.305618, X: 120.741166, value: 7, id: 4 },
{ name: "高新区", Y: 31.325618, X: 120.541166, value: 5, id: 5 },
{ name: "虎丘区", Y: 31.335618, X: 120.561166, value: 3, id: 6 },
{ name: "常熟市", Y: 31.655618, X: 120.751166, value: 6, id: 7 },
{ name: "张家港市", Y: 31.865618, X: 120.551166, value: 4, id: 8 },
{ name: "昆山市", Y: 31.385618, X: 120.961166, value: 9, id: 9 },
{ name: "太仓市", Y: 31.555618, X: 121.121166, value: 2, id: 10 },
];
this.bindYewuData(event.graphics, arrdata);
});
//
geoJsonLayer.on(mars2d.EventType.click, (event) => {
const graphic = event.graphic;
if (graphic) {
this.map.fitBounds(graphic.getBounds());
} else {
console.error("Graphic is undefined in click event");
}
});
geoJsonLayer.on(mars2d.EventType.mouseover, (event) => {
console.log("Mouseover event:", event); //
const graphic = event.graphic;
if (graphic) {
graphic.setStyle({
outlineColor: "#666",
outlineWidth: 3,
fillOpacity: 0.7
});
graphic.bringToFront();
} else {
console.error("Graphic is undefined in mouseover event");
}
});
geoJsonLayer.on(mars2d.EventType.mouseout, (event) => {
console.log("Mouseout event:", event); //
const graphic = event.graphic;
if (graphic) {
graphic.setStyle({
outlineColor: "white",
outlineWidth: 2,
fillOpacity: 0.5
});
} else {
console.error("Graphic is undefined in mouseout event");
}
});
},
//
bindYewuData(graphics, arrdata) {
for (let i = 0; i < graphics.length; i++) {
const graphic = graphics[i];
graphic.attr.num = 0;
for (let j = 0; j < arrdata.length; j++) {
const fname = graphic.attr.name;
if (arrdata[j].name.indexOf(fname) !== -1) {
graphic.attr.num = arrdata[j].value;
break;
}
}
graphic.setStyle({ fillColor: this.getColor(graphic.attr.num) });
}
},
//
getColor(num) {
const arrSpan = [1, 5, 10, 15, 20];
const arrColor = ["#FFEDA0", "#FEB24C", "#FD8D3C", "#FC4E2A", "#E31A1C", "#BD0026", "#800026"];
let length = arrSpan.length;
if (length > arrColor.length) {
length = arrColor.length;
}
for (let k = 0; k < length; k++) {
if (num < arrSpan[k]) {
return arrColor[k];
}
}
return arrColor[length - 1];
},
//
addLegend() {
let strHtml = "<div class='legend-title'>项目数量(个)</div>";
const arrSpan = [1, 5, 10, 15, 20];
const arrColor = ["#FFEDA0", "#FEB24C", "#FD8D3C", "#FC4E2A", "#E31A1C", "#BD0026", "#800026"];
let length = arrSpan.length;
if (length > arrColor.length) {
length = arrColor.length;
}
for (let i = 0; i <= length; i++) {
let label = arrSpan[i];
if (i === 0) {
label = "小于" + arrSpan[i];
} else if (i === length) {
label = "大于" + arrSpan[i - 1];
} else {
label = arrSpan[i - 1] + "-" + arrSpan[i];
}
strHtml +=
"<div class='legend-item'><span class='legend-color' style='background:" +
arrColor[i] +
"'></span><span class='legend-des'>" +
label +
"</span></div>";
}
eventTarget.fire("initHtml", {
html: strHtml
});
}
},
mounted() {
this.initMap();
console.log('Initializing map with options:', this.mapOptions);
this.addLegend(); // mounted addLegend
},
beforeDestroy() {
if (this.map) {
this.map.destroy();
}
}
};
// vue
export const eventTarget = new mars2d.BaseClass()
</script> </script>
<style scoped> <style scoped>
.container { .container {
display: flex; position: relative;
flex-direction: column;
width: 100%;
background-color: #FFFFFF;
box-shadow: 0rem 0.13rem 0.63rem 0rem rgba(177, 177, 177, 0.1);
border-radius: 0.5rem 0.5rem 0.5rem 0.5rem;
gap: 1rem;
overflow: auto;
} }
.main-content { .leftdiv {
display: flex; width: 35%;
gap: 2rem; height: 24rem;
/* background-color: #fff; */
padding: 1rem; padding: 1rem;
position: absolute;
} }
.map-thumbnail { .mapareaone {
height: 26.5rem;
grid-column: span 2;
width: 100%; width: 100%;
height: 25rem;
position: relative; position: relative;
} }
.mars2d-container { .blueicon {
width: 100%; width: 20rem;
height: 100%; height: 20rem;
}
.classify {
width: 2.81rem;
height: 1.38rem;
background-color: rgba(43, 98, 241, 0.8);
border-radius: 0.69rem 0.69rem 0.69rem 0.69rem;
color: white;
position: absolute; position: absolute;
bottom: .5rem; background-image: url(../../../assets/images/行政区划@2x.png);
left: .5rem; background-repeat: no-repeat;
display: flex; background-size: 100% 100%;
justify-content: center; top: 4.5rem;
align-items: center; right: 7.4rem;
font-size: .7rem;
z-index: 999;
}
.legend-title {
font-size: 1rem;
font-weight: bold;
margin-bottom: 0.5rem;
}
.legend-item {
display: flex;
align-items: center;
margin-bottom: 0.3rem;
}
.legend-color {
width: 1rem;
height: 1rem;
margin-right: 0.5rem;
display: inline-block;
}
.legend-des {
font-size: 0.9rem;
} }
</style> </style>

@ -0,0 +1,284 @@
<template>
<div>
<!-- 政务端页面 -->
<!-- 表单查询项 -->
<div class="headerbox">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="200">
<el-row>
<el-col :span="5">
<el-form-item label="项目名称" style="width: 100%;">
<el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<!-- 表格内容区 -->
<div class="tablebox">
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" stripe>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center">
<template slot-scope="scope">
{{ (scope.$index + 1) + (queryParams.current - 1) * queryParams.size }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" prop="name" width="200" />
<el-table-column label="现状分类" align="center" prop="xzfl">
<template slot-scope="scope">
<span>{{ xzflMap[scope.row.xzfl] }}</span>
</template>
</el-table-column>
<el-table-column label="项目法人单位" align="center" prop="xmfrdwxz" width="200" />
<el-table-column label="统一信用代码" align="center" prop="tyshxydm" width="200" />
<el-table-column label="项目建设起止时间" align="center" width="200">
<template slot-scope="scope">
{{ formatMonth(scope.row.begainTime) }} {{ formatMonth(scope.row.endTime) }}
</template>
</el-table-column>
<el-table-column label="总投资额(万元)" align="center" width="130" prop="ztze" />
<el-table-column label="总用地面积(平方米)" align="center" width="180" prop="zydmj" />
<el-table-column label="当前状态" align="center" prop="status">
<template slot-scope="scope">
<span :style="{ color: statusColors[statusMap[scope.row.status]] }">{{
statusMap[scope.row.status] }}</span>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.current"
:limit.sync="queryParams.size" @pagination="getList" />
</div>
</div>
</template>
<script>
import { getBasicInformationPage, deleteBasicInformation } from "@/api/ManageApi/index";
import { getToken } from "@/utils/auth";
import { checkPermi, checkRole } from "@/utils/permission";
export default {
dicts: ["xzfl"],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
postList: [],
//
statusColors: {
'审核通过': '#6EDABE',
'待填报': '#FFBF6B',
'待审核': '#7693D8'
},
//
statusMap: {
1: '待填报',
2: '待审核',
3: '审核通过'
},
xzflMap: {
1: '已建',
2: '在建',
3: '拟建'
},
//
queryParams: {
current: 1,
size: 10,
xzfl: undefined,
name: undefined,
xmfrdwxz: undefined,
startTime: undefined,
endTime: undefined,
status: undefined
},
//
upload: {
open: false, //
isUploading: false, //
updateSupport: 0, //
headers: { Authorization: "Bearer " + getToken() }, //
url: process.env.VUE_APP_BASE_API + "/gysl/basicInformation/import", //
},
};
},
created() {
this.getList();
},
methods: {
checkPermi,
checkRole,
/** 格式化月份显示 */
formatMonth(dateStr) {
if (!dateStr) return '';
// YYYY-MM
if (/^\d{4}-\d{2}$/.test(dateStr)) return dateStr;
// YYYY-MM-DD 7
if (/^\d{4}-\d{2}-\d{2}$/.test(dateStr)) return dateStr.substring(0, 7);
return dateStr;
},
/** 查询项目列表 */
getList() {
this.loading = true;
//
const params = {
...this.queryParams,
begainTime: this.formatMonth(this.queryParams.begainTime),
endTime: this.formatMonth(this.queryParams.endTime)
};
console.log('发送前的查询参数:', JSON.stringify(params, null, 2));
getBasicInformationPage(params).then((response) => {
console.log('API响应:', response);
this.postList = response.data.records;
this.total = response.data.total;
this.loading = false;
}).catch(error => {
console.error('API请求错误:', error);
console.error('错误详情:', error.response);
this.loading = false;
});
},
/** 导入按钮操作 */
handleImport() {
this.upload.open = true;
},
/** 下载模板操作 */
importTemplate() {
this.download(
"/gysl/basicInformation/importTemplate",
{},
`项目导入模板${new Date().getTime()}.xlsx`
);
},
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
response.msg +
"</div>",
"导入结果",
{ dangerouslyUseHTMLString: true }
);
this.getList();
},
submitFileForm() {
this.$refs.upload.submit();
},
/** 导出按钮操作 */
handleExport() {
this.download(
"/gysl/basicInformation/exportInfo",
{
idList: this.ids[0]
},
`基本信息${new Date().getTime()}.xlsx`
);
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除项目id为"' + ids + '"的数据项?')
.then(() => {
return deleteBasicInformation(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => { });
},
/** 详情按钮操作 */
getAdd(row, type) {
this.$store.commit("SET_CRUMBS", this.$route.meta.title + "新增");
const id = row.id || this.ids[0];
this.$router.push({ path: `/manage-add/${id}`, query: { action: type } });
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
current: 1,
size: 10,
xzfl: undefined,
name: undefined,
xmfrdwxz: undefined,
begainTime: undefined,
endTime: undefined,
status: undefined,
};
this.getList();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.current = 1;
this.getList();
},
},
};
</script>
<style scoped>
.headerbox {
background-color: #fff;
border-radius: .5rem;
padding: 1rem;
margin: .5rem;
border: 1px solid #eee;
}
.tablebox {
background-color: #fff;
border-radius: .5rem;
padding: 1rem;
margin: .5rem;
border: 1px solid #eee;
}
.tablehead {
display: flex;
justify-content: space-between;
align-items: center;
}
.headbtn {
display: flex;
}
.tablebtntwo {
margin-top: 1rem;
margin-bottom: 1rem;
}
</style>

@ -1,28 +1,48 @@
<template> <template>
<div> <div class="card-container">
<!-- 表格内容区 --> <!-- 卡片内容区 -->
<div class="tablebox"> <div v-loading="loading" class="card-wrapper">
<!-- 标签行 --> <!-- 每个项目卡片 -->
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" stripe> <div v-for="(item, index) in postList" :key="index" class="project-card">
<el-table-column label="项目名称" align="center" width="150" > <!-- 标题 -->
<template slot-scope="scope"> <div class="card-header">
<span style="color: #2B62F1;cursor: pointer;" @click="getInfo(scope.row, 'detail')">{{ scope.row.name }}</span> <span class="project-name" @click="getInfo(item, 'detail')">{{ item.name }}</span>
</template> </div>
</el-table-column>
<el-table-column label="总投资额(万元)" align="center" prop="ztze" /> <!-- 第一行内容 -->
<el-table-column label="所在区域" align="center" width="100" prop="ssgnq"> <div class="card-row">
<template slot-scope="scope"> <div class="card-item">
<span>{{ ssgnqMap[scope.row.ssgnq] }}</span> <span class="label">状态</span>
</template> <span class="value" :style="{ color: xzflColors[xzflMap[item.xzfl]] }">
</el-table-column> {{ xzflMap[item.xzfl] }}
<el-table-column label="总用地面积(平方米)" align="center" width="100" prop="zydmj" /> </span>
<el-table-column label="状态" align="center" width="100" prop="xzfl"> </div>
<template slot-scope="scope"> <div class="card-item">
<span :style="{ color: xzflColors[xzflMap[scope.row.xzfl]] }">{{ <span class="label">总投资额</span>
xzflMap[scope.row.xzfl] }}</span> <span class="value">{{ item.ztze }} 万元</span>
</template> </div>
</el-table-column> <div class="card-item">
</el-table> <span class="label">总用地面积</span>
<span class="value">{{ item.zydmj }} 平方米</span>
</div>
</div>
<!-- 第二行内容 -->
<div class="card-row">
<div class="card-item">
<span class="label">所在区域</span>
<span class="value">{{ ssgnqMap[item.ssgnq] }}</span>
</div>
<div class="card-item">
<span class="label">联系人</span>
<span class="value">{{ item.projectLeader }}</span>
</div>
<div class="card-item">
<span class="label">联系方式</span>
<span class="value">{{ item.phone }}</span>
</div>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -32,7 +52,7 @@ import { getBasicInformationPage } from "@/api/ManageApi/index";
import { checkPermi, checkRole } from "@/utils/permission"; import { checkPermi, checkRole } from "@/utils/permission";
export default { export default {
name: "TableContent", name: "CardContent",
dicts: ["xzfl"], dicts: ["xzfl"],
data() { data() {
return { return {
@ -127,22 +147,66 @@ export default {
</script> </script>
<style scoped> <style scoped>
.tablebox { .card-container {
height: 16rem; padding: 0.5rem;
overflow: auto; }
.card-wrapper {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: 1rem;
background-color: #fff; background-color: #fff;
border-radius: .5rem; border-radius: 0.5rem;
margin: .5rem; padding: 1rem;
}
.project-card {
border: 1px solid #ebeef5;
border-radius: 0.5rem;
padding: 1rem;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
transition: all 0.3s;
}
.project-card:hover {
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.15);
}
.card-header {
margin-bottom: 1rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid #f0f0f0;
}
.project-name {
color: #2B62F1;
cursor: pointer;
font-weight: bold;
font-size: 1.1rem;
}
.project-name:hover {
text-decoration: underline;
} }
.tablehead { .card-row {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; margin-bottom: 0.5rem;
} }
.tablebtntwo { .card-item {
margin-top: 1rem; flex: 1;
margin-bottom: 1rem; padding: 0 0.5rem;
}
.label {
color: #909399;
font-size: 0.9rem;
}
.value {
color: #606266;
font-size: 0.95rem;
} }
</style> </style>

@ -3,50 +3,52 @@
<!-- 企业端页面 --> <!-- 企业端页面 -->
<!-- 表单查询项 --> <!-- 表单查询项 -->
<div class="headerbox"> <div class="headerbox">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="200"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
<el-row> label-width="200">
<el-col :span="5"> <el-row>
<el-form-item label="项目名称" style="width: 100%;"> <el-col :span="5">
<el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery" /> <el-form-item label="项目名称" style="width: 100%;">
</el-form-item> <el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable
</el-col> @keyup.enter.native="handleQuery" />
<el-col :span="7"> </el-form-item>
<el-form-item label="建设起止时间"> </el-col>
<el-date-picker v-model="queryParams.begainTime" <el-col :span="7">
type="date" placeholder="开始日期" value-format="yyyy-MM-dd" <el-form-item label="建设起止时间">
style="width: 9rem;" :clearable="true"> <el-date-picker v-model="queryParams.startTime" type="month" placeholder="开始月份"
</el-date-picker> value-format="yyyy-MM" style="width: 9rem;" :clearable="true">
~ </el-date-picker>
<el-date-picker v-model="queryParams.endTime" ~
type="date" placeholder="结束日期" <el-date-picker v-model="queryParams.endTime" type="month" placeholder="结束月份"
value-format="yyyy-MM-dd" value-format="yyyy-MM" style="width: 9rem;" :clearable="true">
style="width: 9rem;" :clearable="true"> </el-date-picker>
</el-date-picker> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="5">
<el-col :span="5"> <el-form-item label="现状分类">
<el-form-item label="现状分类"> <el-select v-model="queryParams.xzfl" placeholder="现状分类" clearable>
<el-select v-model="queryParams.xzfl" placeholder="现状分类" clearable> <el-option v-for="dict in dict.type.xzfl" :key="dict.value" :label="dict.label"
<el-option v-for="dict in dict.type.xzfl" :key="dict.value" :label="dict.label" :value="dict.value" /> :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="项目法人单位"> <el-form-item label="项目法人单位">
<el-input v-model="queryParams.xmfrdwxz" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.xmfrdwxz" placeholder="请输入项目名称" clearable
</el-form-item> @keyup.enter.native="handleQuery" />
</el-col> </el-form-item>
</el-row> </el-col>
<el-row> </el-row>
<el-col :span="8"> <el-row>
<el-form-item> <el-col :span="8">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-form-item>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini"
</el-form-item> @click="handleQuery">查询</el-button>
</el-col> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-row> </el-form-item>
</el-form> </el-col>
</div> </el-row>
</el-form>
</div>
<!-- 表格内容区 --> <!-- 表格内容区 -->
<div class="tablebox"> <div class="tablebox">
<!-- 标签行 --> <!-- 标签行 -->
@ -77,7 +79,7 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center"> <el-table-column label="序号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ (scope.$index + 1) + (queryParams.pageNum - 1) * queryParams.pageSize }} {{ (scope.$index + 1) + (queryParams.current - 1) * queryParams.size }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="项目名称" align="center" prop="name" width="200" /> <el-table-column label="项目名称" align="center" prop="name" width="200" />
@ -110,8 +112,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.current"
:limit.sync="queryParams.pageSize" @pagination="getList" /> :limit.sync="queryParams.size" @pagination="getList" />
</div> </div>
</div> </div>
</template> </template>
@ -158,8 +160,8 @@ export default {
}, },
// //
queryParams: { queryParams: {
pageNum: 1, current: 1,
pageSize: 10, size: 10,
xzfl: undefined, xzfl: undefined,
name: undefined, name: undefined,
xmfrdwxz: undefined, xmfrdwxz: undefined,
@ -268,8 +270,8 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams = { this.queryParams = {
pageNum: 1, current: 1,
pageSize: 10, size: 10,
xzfl: '', xzfl: '',
name: '', name: '',
xmfrdwxz: '', xmfrdwxz: '',
@ -281,7 +283,7 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.current = 1;
this.getList(); this.getList();
}, },
}, },

@ -1,52 +1,54 @@
<template> <template>
<div> <div>
<!-- 政务端页面 --> <!-- 政务端页面 -->
<!-- 表单查询项 --> <!-- 表单查询项 -->
<div class="headerbox"> <div class="headerbox">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="200"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
<el-row> label-width="200">
<el-col :span="5"> <el-row>
<el-form-item label="项目名称" style="width: 100%;"> <el-col :span="5">
<el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery" /> <el-form-item label="项目名称" style="width: 100%;">
</el-form-item> <el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable
</el-col> @keyup.enter.native="handleQuery" />
<el-col :span="7"> </el-form-item>
<el-form-item label="建设起止时间"> </el-col>
<el-date-picker v-model="queryParams.begainTime" <el-col :span="7">
type="date" placeholder="开始日期" value-format="yyyy-MM-dd" <el-form-item label="建设起止时间">
style="width: 9rem;" :clearable="true"> <el-date-picker v-model="queryParams.startTime" type="month" placeholder="开始月份"
</el-date-picker> value-format="yyyy-MM" style="width: 9rem;" :clearable="true">
~ </el-date-picker>
<el-date-picker v-model="queryParams.endTime" ~
type="date" placeholder="结束日期" <el-date-picker v-model="queryParams.endTime" type="month" placeholder="结束月份"
value-format="yyyy-MM-dd" value-format="yyyy-MM" style="width: 9rem;" :clearable="true">
style="width: 9rem;" :clearable="true"> </el-date-picker>
</el-date-picker> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="5">
<el-col :span="5"> <el-form-item label="现状分类">
<el-form-item label="现状分类"> <el-select v-model="queryParams.xzfl" placeholder="现状分类" clearable>
<el-select v-model="queryParams.xzfl" placeholder="现状分类" clearable> <el-option v-for="dict in dict.type.xzfl" :key="dict.value" :label="dict.label"
<el-option v-for="dict in dict.type.xzfl" :key="dict.value" :label="dict.label" :value="dict.value" /> :value="dict.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="项目法人单位"> <el-form-item label="项目法人单位">
<el-input v-model="queryParams.xmfrdwxz" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.xmfrdwxz" placeholder="请输入项目名称" clearable
</el-form-item> @keyup.enter.native="handleQuery" />
</el-col> </el-form-item>
</el-row> </el-col>
<el-row> </el-row>
<el-col :span="8"> <el-row>
<el-form-item> <el-col :span="8">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-form-item>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini"
</el-form-item> @click="handleQuery">查询</el-button>
</el-col> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-row> </el-form-item>
</el-form> </el-col>
</div> </el-row>
</el-form>
</div>
<!-- 表格内容区 --> <!-- 表格内容区 -->
<div class="tablebox"> <div class="tablebox">
<!-- 标签行 --> <!-- 标签行 -->
@ -81,16 +83,9 @@
@click="handleExport">导出</el-button> @click="handleExport">导出</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-dropdown @command=""> <el-button type="primary" size="medium">
<el-button type="primary" size="medium"> 单片材料导出
导出材料<i class="el-icon-arrow-down el-icon--right"></i> </el-button>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="single-material">单片材料</el-dropdown-item>
<el-dropdown-item command="report">报告</el-dropdown-item>
<el-dropdown-item command="project-manual">项目手册</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -111,7 +106,7 @@
<el-table-column label="统一信用代码" align="center" prop="tyshxydm" width="200" /> <el-table-column label="统一信用代码" align="center" prop="tyshxydm" width="200" />
<el-table-column label="项目建设起止时间" align="center" width="200"> <el-table-column label="项目建设起止时间" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.begainTime }} {{ scope.row.endTime }} {{ formatMonth(scope.row.begainTime) }} {{ formatMonth(scope.row.endTime) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总投资额(万元)" align="center" width="130" prop="ztze" /> <el-table-column label="总投资额(万元)" align="center" width="130" prop="ztze" />
@ -207,21 +202,36 @@ export default {
methods: { methods: {
checkPermi, checkPermi,
checkRole, checkRole,
/** 格式化月份显示 */
formatMonth(dateStr) {
if (!dateStr) return '';
// YYYY-MM
if (/^\d{4}-\d{2}$/.test(dateStr)) return dateStr;
// YYYY-MM-DD 7
if (/^\d{4}-\d{2}-\d{2}$/.test(dateStr)) return dateStr.substring(0, 7);
return dateStr;
},
/** 查询项目列表 */ /** 查询项目列表 */
getList() { getList() {
this.loading = true; this.loading = true;
//
const params = {
...this.queryParams,
begainTime: this.formatMonth(this.queryParams.begainTime),
endTime: this.formatMonth(this.queryParams.endTime)
};
// console.log('发送前的查询参数:', JSON.stringify(params, null, 2));
console.log('发送前的查询参数:', JSON.stringify(this.queryParams, null, 2));
getBasicInformationPage(this.queryParams).then((response) => { getBasicInformationPage(params).then((response) => {
console.log('API响应:', response); // console.log('API响应:', response);
this.postList = response.data.records; this.postList = response.data.records;
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
}).catch(error => { }).catch(error => {
console.error('API请求错误:', error); console.error('API请求错误:', error);
console.error('错误详情:', error.response); // console.error('错误详情:', error.response);
this.loading = false; this.loading = false;
}); });
}, },
@ -239,18 +249,17 @@ export default {
`项目导入模板${new Date().getTime()}.xlsx` `项目导入模板${new Date().getTime()}.xlsx`
); );
}, },
//
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id); this.ids = selection.map(item => item.id);
this.single = selection.length !== 1; this.single = selection.length !== 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
//
handleFileUploadProgress(event, file, fileList) { handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true; this.upload.isUploading = true;
}, },
//
handleFileSuccess(response, file, fileList) { handleFileSuccess(response, file, fileList) {
this.upload.open = false; this.upload.open = false;
this.upload.isUploading = false; this.upload.isUploading = false;
@ -265,7 +274,6 @@ export default {
this.getList(); this.getList();
}, },
//
submitFileForm() { submitFileForm() {
this.$refs.upload.submit(); this.$refs.upload.submit();
}, },
@ -280,6 +288,7 @@ export default {
`基本信息${new Date().getTime()}.xlsx` `基本信息${new Date().getTime()}.xlsx`
); );
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
@ -294,12 +303,14 @@ export default {
}) })
.catch(() => { }); .catch(() => { });
}, },
/** 详情按钮操作 */ /** 详情按钮操作 */
getAdd(row, type) { getAdd(row, type) {
this.$store.commit("SET_CRUMBS", this.$route.meta.title + "新增"); this.$store.commit("SET_CRUMBS", this.$route.meta.title + "新增");
const id = row.id || this.ids[0]; const id = row.id || this.ids[0];
this.$router.push({ path: `/manage-add/${id}`, query: { action: type } }); this.$router.push({ path: `/manage-add/${id}`, query: { action: type } });
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams = { this.queryParams = {
@ -308,7 +319,7 @@ export default {
xzfl: undefined, xzfl: undefined,
name: undefined, name: undefined,
xmfrdwxz: undefined, xmfrdwxz: undefined,
startTime: undefined, begainTime: undefined,
endTime: undefined, endTime: undefined,
status: undefined, status: undefined,
}; };

@ -1,6 +1,7 @@
<template> <template>
<div class="grid-container"> <div class="grid-container">
<!-- 第一行 -->
<div class="grid-item item-1"> <div class="grid-item item-1">
<!-- 整体项目情况 --> <!-- 整体项目情况 -->
<div class="allarea"> <div class="allarea">
@ -16,48 +17,72 @@
<Message /> <Message />
</div> </div>
</div> </div>
<div class="grid-item item-3"> <!-- 第二行 -->
<!-- 功能区 --> <div class="grid-item item-1 bgcicon">
<div class="itemhead">
<span>功能区</span>
</div>
<div class="relaitem">
<div class="itemsall">
<span>{{ functionnumber.functionnumber}}</span>
<span>项目总数</span>
</div>
<FunctionArea />
</div>
</div>
<div class="grid-item item-4">
<!-- 项目列表 --> <!-- 项目列表 -->
<div class="itemhead"> <!-- <div class="itemhead">
<span>项目列表</span> <span>项目列表</span>
</div> </div>
<div class="mainarea"> <div class="mainarea">
<ProjectList /> <ProjectList />
</div> -->
<MapArea />
</div>
<div style="display: flex;flex-direction: column;gap: 1rem;">
<div class="grid-item item-3">
<!-- 功能区 -->
<div class="itemhead">
<span>功能区</span>
</div>
<div class="relaitem">
<div class="itemsall">
<span>{{ functionnumber.functionnumber }}</span>
<span>项目总数</span>
</div>
<FunctionArea />
</div>
</div>
<div class="grid-item item-5">
<!-- 投资区 -->
<div class="itemhead">
<span>投资主体</span>
</div>
<div class="relaitem">
<div class="itemsall">
<span>{{ allnumber.touzinumber }}</span>
<span>项目总数</span>
</div>
<InvestArea />
</div>
</div> </div>
</div> </div>
<div class="grid-item item-5"> <!-- 第三行 -->
<!-- 投资区 --> <div class="grid-item item-3">
<!-- 产业数据分析 -->
<div class="itemhead"> <div class="itemhead">
<span>投资主体</span> <span>产业数据分析</span>
</div> </div>
<div class="relaitem"> <div class="relaitem">
<div class="itemsall"> <Cyeshuju />
<span>{{ allnumber.touzinumber }}</span>
<span>项目总数</span>
</div>
<InvestArea />
</div> </div>
</div> </div>
<div class="grid-item item-6"> <div class="grid-item item-5">
<!-- 地图模块 --> <!-- 产业导向目录分析 -->
<div class="mapareaone"> <div class="itemhead">
<div style="position: absolute; top: 2rem;left: 5rem; z-index: 999;"> <span>产业导向目录分析</span>
<el-input placeholder="请输入项目名称" />
</div> </div>
<MapArea /> <div class="relaitem">
<Cydxml />
</div>
</div>
<div class="grid-item item-5">
<!-- 产业导向细分产业分析 -->
<div class="itemhead">
<span>产业导向细分产业分析</span>
</div>
<div class="relaitem">
<!-- <Cyeshuju /> -->
<Cydxxfgl />
</div> </div>
</div> </div>
</div> </div>
@ -70,7 +95,10 @@ import InvestArea from '@/views/components/analysis/invest.vue'
import Message from '@/views/components/analysis/message.vue' import Message from '@/views/components/analysis/message.vue'
import ProjectList from '@/views/components/analysis/projectList.vue' import ProjectList from '@/views/components/analysis/projectList.vue'
import MapArea from '@/views/components/analysis/map.vue' import MapArea from '@/views/components/analysis/map.vue'
import { investall,fungong } from '@/api/ManageApi/index' import Cyeshuju from '@/views/components/analysis/chanyeshuju.vue'
import Cydxml from '@/views/components/analysis/chanyedxml.vue'
import Cydxxfgl from '@/views/components/analysis/chanyexfgl.vue'
import { investall, fungong } from '@/api/ManageApi/index'
export default { export default {
components: { components: {
@ -80,6 +108,9 @@ export default {
Message, Message,
ProjectList, ProjectList,
MapArea, MapArea,
Cyeshuju,
Cydxml,
Cydxxfgl
}, },
data() { data() {
return { return {
@ -95,7 +126,6 @@ export default {
async getData() { async getData() {
const response = await investall(); const response = await investall();
if (response && response.data) { if (response && response.data) {
// count
const totalCount = response.data.reduce((sum, item) => sum + item.count, 0); const totalCount = response.data.reduce((sum, item) => sum + item.count, 0);
this.allnumber = { this.allnumber = {
touzinumber: totalCount touzinumber: totalCount
@ -104,15 +134,15 @@ export default {
}, },
async getfuncdata() { async getfuncdata() {
const response2 = await fungong(); const response2 = await fungong();
if(response2 && response2.data){ if (response2 && response2.data) {
const totalCount2 = response2.data.reduce( const totalCount2 = response2.data.reduce(
(sum,item) => sum + item.count,0 (sum, item) => sum + item.count, 0
); );
this.functionnumber = { this.functionnumber = {
functionnumber: totalCount2 functionnumber: totalCount2
} }
} }
} }
}, },
created() { created() {
this.getData(); this.getData();
@ -158,27 +188,25 @@ export default {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
top: 5.5rem; top: 3.7rem;
left: 7.2rem; left: 7.5rem;
} }
.itemsall span:nth-child(1) { .itemsall span:nth-child(1) {
font-family: DIN, DIN; font-family: DINbold;
font-weight: 500; font-weight: 500;
font-size: 1.75rem; font-size: 1.25rem;
color: #292C33; color: #292C33;
line-height: 2.44rem;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
} }
.itemsall span:nth-child(2) { .itemsall span:nth-child(2) {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi; font-family: alibold;
font-weight: 400; font-weight: 400;
font-size: 0.88rem; font-size: 0.68rem;
color: #9E9E9E; color: #9E9E9E;
line-height: 1.25rem;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
@ -186,7 +214,7 @@ export default {
.itemhead span { .itemhead span {
margin-left: 1rem; margin-left: 1rem;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi; font-family: alibold;
font-weight: 600; font-weight: 600;
font-size: 1rem; font-size: 1rem;
color: #3D424C; color: #3D424C;
@ -204,7 +232,7 @@ export default {
/* 第一行:第一个模块占两列 */ /* 第一行:第一个模块占两列 */
.item-1 { .item-1 {
grid-column: span 2; grid-column: span 2;
background-image: url('~@/assets/images/allbg.png'); /* background-image: url('~@/assets/images/allbg.png'); */
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
@ -220,8 +248,18 @@ export default {
grid-column: span 3; grid-column: span 3;
/* 占三列 */ /* 占三列 */
} }
/* .item-3 {
height: ;
} */
.mapareaone { .mapareaone {
position: relative; position: relative;
} }
.bgcicon{
/* background-color: red; */
background-image: url(../../assets/images/map@2x.png);
padding: 0!important;
background-repeat: no-repeat;
background-size: 100% 100%;
}
</style> </style>

@ -37,8 +37,8 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://192.168.0.108:7071/`, target: `http://192.168.0.107:7071/`,
target: `http://39.101.188.84:7071/`, // target: `http://39.101.188.84:7071/`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save