基本信息前三个模块

main
严飞永 2 weeks ago
parent 99dd539df8
commit d3b6025375

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -17,17 +17,24 @@ export function updateBasicInformation(data) {
data
});
}
// 项目详情 规划信息
// 新增规划信息
export function addProgrammeInformation(data) {
// 基本信息的导出功能
export function exportBasicInformation(params) {
return request({
url: '/gysl/planInformation/add',
url: `/gysl/basicInformation/export`,
method: 'post',
data
data: params,
responseType: 'blob'
});
}
// 分页查询所有数据
export function getBasicInformationPage(params) {
return request({
url:'/gysl/basicInformation/page',
method: 'get',
params
})
}
// 项目详情 规划信息
// 修改规划信息
export function updateProgrammeInformation(data) {
return request({
@ -37,26 +44,16 @@ export function updateProgrammeInformation(data) {
});
}
// 分页查询所有规划信息
export function getProgrammeInformationPage(params) {
//根据主键来查询单条数据
export function getProgrammeInformationById(quey) {
return request({
url: '/gysl/planInformation/page',
url: '/gysl/planInformation/selectAll',
method: 'get',
params
params: quey
});
}
// 基本信息的导出功能
export function exportBasicInformation(params) {
return request({
url: `/gysl/basicInformation/export`,
method: 'post',
data: params,
responseType: 'blob'
});
}
// 项目评价清单
// 分页查询项目评价清单
export function getProjectEvaluationList(params) {
@ -324,3 +321,95 @@ export function getqyrzById(id) {
method: 'get'
});
}
//建筑信息表
//新增数据
export function addjzxx(data) {
return request({
url: '/gysl/buildingInformation/add',
method: 'post',
data
})
}
//删除数据
export function deletejzxx(idList) {
console.log('Deleting buildings with IDs:', idList); // 调试信息
return request({
url: '/gysl/buildingInformation/delete', // 使用正确的URL
method: 'delete',
params: { idList: idList.join(',') } // 将数组转换为逗号分隔的字符串
});
}
//修改数据
export function updatejzxx(data) {
return request({
url: '/gysl/buildingInformation/edit',
method: 'post',
data
})
}
//导入项目建筑信息
export function importjzxx(data) {
return request({
url: '/gysl/buildingInformation/importProjectBuilding',
method: 'post',
data
})
}
//分页查询所有数据
export function getjzxxinformationByxmId(params) {
return request({
url: '/gysl/buildingInformation/page',
method: 'get',
params
})
}
//通过主键查询单条数据
export function getjzxxById(id) {
return request({
url: `/gysl/buildingInformation/${id}`,
method: 'get'
})
}
//项目图例
//新增数据
export function addxmtl(data) {
return request({
url:'/gysl/projectLegend/add',
method:'post',
data
})
}
//删除数据
export function deletexmtl(idList) {
return request({
url:'/gysl/projectLegend/delete',
method:'delete',
params:{idList}
})
}
//修改数据
export function updatexmtll(data) {
return request({
url:'/gysl/projectLegend/edit',
method:'post',
data
})
}
//分页查询所有数据
export function getxmtlPageByxmid(params) {
return request({
url:'/gysl/projectLegend/page',
method:'get',
params
})
}
//通过主键查询单条数据
export function getxmtlById(id) {
return request({
url:`/gysl/projectLegend/${id}`,
method:'get',
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

@ -0,0 +1,221 @@
<template>
<div class="upload-file">
<el-upload
multiple
:action="uploadFileUrl"
:before-upload="handleBeforeUpload"
:file-list="fileList"
:limit="limit"
:on-error="handleUploadError"
:on-exceed="handleExceed"
:on-success="handleUploadSuccess"
:show-file-list="false"
:headers="headers"
class="upload-file-uploader"
ref="fileUpload"
>
<!-- 上传按钮 -->
<el-button size="mini" type="primary">选取文件</el-button>
<!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip">
请上传
<template v-if="fileSize"> <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
<template v-if="fileType"> <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
的文件
</div>
</el-upload>
<!-- 文件列表 -->
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
<li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
<el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
</el-link>
<div class="ele-upload-list__item-content-action">
<el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
</div>
</li>
</transition-group>
</div>
</template>
<script>
import { getToken } from "@/utils/auth";
export default {
name: "FileUpload",
props: {
//
value: [String, Object, Array],
//
limit: {
type: Number,
default: 5,
},
// (MB)
fileSize: {
type: Number,
default: 50,
},
// , ['png', 'jpg', 'jpeg']
fileType: {
type: Array,
default: () => ["doc", "word" , "ppt", "docx", "pdf"],
},
//
isShowTip: {
type: Boolean,
default: true
}
},
data() {
return {
number: 0,
uploadList: [],
baseUrl: process.env.VUE_APP_BASE_API,
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", //
headers: {
Authorization: "Bearer " + getToken(),
},
fileList: [],
};
},
watch: {
value: {
handler(val) {
if (val) {
let temp = 1;
//
const list = Array.isArray(val) ? val : this.value.split(',');
//
this.fileList = list.map(item => {
if (typeof item === "string") {
item = { name: item, url: item };
}
item.uid = item.uid || new Date().getTime() + temp++;
return item;
});
} else {
this.fileList = [];
return [];
}
},
deep: true,
immediate: true
}
},
computed: {
//
showTip() {
return this.isShowTip && (this.fileType || this.fileSize);
},
},
methods: {
//
handleBeforeUpload(file) {
//
if (this.fileType) {
const fileName = file.name.split('.');
const fileExt = fileName[fileName.length - 1];
const isTypeOk = this.fileType.indexOf(fileExt) >= 0;
if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确,请上传${this.fileType.join("/")}格式文件!`);
return false;
}
}
//
if (file.name.includes(',')) {
this.$modal.msgError('文件名不正确,不能包含英文逗号!');
return false;
}
//
if (this.fileSize) {
const isLt = file.size / 1024 / 1024 < this.fileSize;
if (!isLt) {
this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`);
return false;
}
}
this.$modal.loading("正在上传文件,请稍候...");
this.number++;
return true;
},
//
handleExceed() {
this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
},
//
handleUploadError(err) {
this.$modal.msgError("上传文件失败,请重试");
this.$modal.closeLoading();
},
//
handleUploadSuccess(res, file) {
if (res.code === 200) {
this.uploadList.push({ name: res.fileName, url: res.fileName });
this.uploadedSuccessfully();
} else {
this.number--;
this.$modal.closeLoading();
this.$modal.msgError(res.msg);
this.$refs.fileUpload.handleRemove(file);
this.uploadedSuccessfully();
}
},
//
handleDelete(index) {
this.fileList.splice(index, 1);
this.$emit("input", this.listToString(this.fileList));
},
//
uploadedSuccessfully() {
if (this.number > 0 && this.uploadList.length === this.number) {
this.fileList = this.fileList.concat(this.uploadList);
this.uploadList = [];
this.number = 0;
this.$emit("input", this.listToString(this.fileList));
this.$modal.closeLoading();
}
},
//
getFileName(name) {
// url
if (name.lastIndexOf("/") > -1) {
return name.slice(name.lastIndexOf("/") + 1);
} else {
return name;
}
},
//
listToString(list, separator) {
let strs = "";
separator = separator || ",";
for (let i in list) {
strs += list[i].url + separator;
}
return strs != '' ? strs.substr(0, strs.length - 1) : '';
}
}
};
</script>
<style scoped lang="scss">
.upload-file-uploader {
margin-bottom: 5px;
}
.upload-file-list .el-upload-list__item {
border: 1px solid #e4e7ed;
line-height: 2;
margin-bottom: 10px;
position: relative;
}
.upload-file-list .ele-upload-list__item-content {
display: flex;
justify-content: space-between;
align-items: center;
color: inherit;
}
.ele-upload-list__item-content-action .el-link {
margin-right: 10px;
}
</style>

@ -1,8 +1,8 @@
<template>
<div class="navbar">
<div class="navbarleft">
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
@toggleClick="toggleSideBar" />
<!-- <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
@toggleClick="toggleSideBar" /> -->
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" />
</div>
</div>
@ -12,7 +12,7 @@
import { mapGetters } from 'vuex'
import Breadcrumb from '@/components/Breadcrumb'
import TopNav from '@/components/TopNav'
import Hamburger from '@/components/Hamburger'
// import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch'
@ -23,7 +23,7 @@ export default {
components: {
Breadcrumb,
TopNav,
Hamburger,
// Hamburger,
Screenfull,
SizeSelect,
Search,

@ -49,7 +49,14 @@
</el-col>
<el-col :span="12">
<el-form-item label="建设地点" prop="jsdd">
<el-input v-model="form.jsdd" maxlength="50"></el-input>
<el-row :gutter="10">
<el-col :span="20">
<el-input v-model="form.jsdd" maxlength="50"></el-input>
</el-col>
<el-col :span="3">
<span @click="showMap" style="color: #2B62F1;cursor: pointer;">落图</span>
</el-col>
</el-row>
</el-form-item>
</el-col>
</el-row>
@ -159,8 +166,8 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="建设进度" prop="constructionProgress">
<el-input v-model="form.constructionProgress" maxlength="50"></el-input>
<el-form-item label="建设进度" prop="jsjd">
<el-input v-model="form.jsjd" maxlength="50"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -179,17 +186,22 @@
<el-button type="primary" @click="saveForm"> </el-button>
</span>
</el-dialog>
<!-- 地图弹窗 -->
<el-dialog :title="mapDialogTitle" :visible.sync="mapDialogVisible" width="1000px" height="1000px" style="height: 1000;" append-to-body>
<luotu v-if="mapDialogVisible" />
</el-dialog>
</div>
</template>
<script>
import { getBasicInformationById, updateBasicInformation,exportBasicInformation } from '@/api/ManageApi/index';
import { getBasicInformationById, updateBasicInformation, exportBasicInformation } from '@/api/ManageApi/index';
import ImageUpload from '@/components/ImageUpload2/index.vue';
import luotu from '@//views/components/ProjectDetails/luotu.vue'
export default {
components: {
ImageUpload
ImageUpload, luotu
},
dicts: [
'ssgnq', 'xmfrdwxz', 'xzfl', 'jsms'
@ -210,6 +222,8 @@ export default {
dialogImageUrl: '',
dialogVisibletwo: false,
dialogVisible: false,
mapDialogVisible: false,
mapDialogTitle: '地图',
title: '编辑基本信息',
form: {
name: '',
@ -220,6 +234,7 @@ export default {
ztze: 0,
ssgnq: 0,
begainTime: '',
endtime: '',
xzfl: 0,
jsdd: '',
prioritize: '',
@ -231,7 +246,8 @@ export default {
acceptanceTime: '',
unitIntroduction: '',
introduction: '',
fj: ''
fj: '',
jsjd: ''
},
rules: {
name: [
@ -315,7 +331,10 @@ export default {
.then(response => {
const data = response.data;
this.descriptions = this.formatDescriptions(data);
this.form = { ...data };
this.form = {
...data,
begainTime: [new Date(data.begainTime), new Date(data.endTime)],
};
})
.catch(error => {
console.error('数据获取失败:', error);
@ -331,7 +350,7 @@ export default {
{ label: '设计单位', value: data.sjdw },
{ label: '总投资额(万元)', value: data.ztze },
{ label: '所属功能区', value: this.ssgnqMap[data.ssgnq] || '未知' },
{ label: '建设起止时间', value: data.begainTime },
{ label: '建设起止时间', value: `${data.begainTime}${data.endTime}` },
{ label: '现状分类', value: this.xzflMap[data.xzfl] || '未知' },
{ label: '建设地点', value: data.jsdd },
{ label: '重点发展产业', value: data.prioritize },
@ -341,7 +360,7 @@ export default {
{ label: '联系方式', value: data.phone },
{ label: '施工许可证发放时间', value: data.issuingTime },
{ label: '竣工验收时间', value: data.acceptanceTime },
{ label: '建设进度', value: data.acceptanceTime },
{ label: '建设进度', value: data.jsjd },
{ label: '项目法人单位简介', value: data.unitIntroduction },
{ label: '项目简介', value: data.introduction }
];
@ -351,7 +370,8 @@ export default {
//
const queryParams = {
acceptanceTime: this.form.acceptanceTime,
begainTime: this.formatDateRange(this.form.begainTime),
begainTime: this.form.begainTime[0],
endTime: this.form.begainTime[1],
createBy: '',
createId: 0,
createTime: '',
@ -371,18 +391,17 @@ export default {
sjdw: this.form.sjdw,
ssgnq: parseInt(this.form.ssgnq),
unitIntroduction: this.form.unitIntroduction,
jsjd: this.form.jsjd,
updateBy: '',
updateId: 0,
updateTime: '',
xmfrdwxz: this.form.xmfrdwxz,
xzfl: parseInt(this.form.xzfl),
ztze: parseFloat(this.form.ztze)
ztze: parseFloat(this.form.ztze),
};
console.log('queryParams:', queryParams); //
//
exportBasicInformation(queryParams)
.then(response => {
console.log('response:', response); //
const url = window.URL.createObjectURL(new Blob([response]));
const link = document.createElement('a');
link.href = url;
@ -422,6 +441,7 @@ export default {
},
//
prepareFormData() {
const [startDate, endDate] = this.formatDateRange(this.form.begainTime);
return {
id: this.id,
name: this.form.name,
@ -430,8 +450,9 @@ export default {
sgdw: this.form.sgdw,
sjdw: this.form.sjdw,
ztze: parseFloat(this.form.ztze),
ssgnq: '',
begainTime: this.formatDateRange(this.form.begainTime),
ssgnq: parseInt(this.form.ssgnq),
begainTime: startDate,
endTime: endDate,
xzfl: parseInt(this.form.xzfl),
jsdd: this.form.jsdd,
prioritize: this.form.prioritize,
@ -442,6 +463,7 @@ export default {
issuingTime: this.form.issuingTime,
acceptanceTime: this.form.acceptanceTime,
unitIntroduction: this.form.unitIntroduction,
jsjd: this.form.jsjd,
introduction: this.form.introduction,
fj: this.form.fj,
createBy: '',
@ -449,15 +471,15 @@ export default {
createTime: '',
updateBy: '',
updateId: 0,
updateTime: ''
updateTime: '',
};
},
//
formatDateRange(dateRange) {
if (!dateRange || dateRange.length !== 2) return '';
if (!dateRange || dateRange.length !== 2) return ['', ''];
const startDate = dateRange[0].toISOString().split('T')[0];
const endDate = dateRange[1].toISOString().split('T')[0];
return `${startDate}${endDate}`;
return [startDate, endDate];
},
//
handleAttachmentSuccess(response, file) {
@ -474,6 +496,10 @@ export default {
//
removeAttachment() {
this.form.fj = '';
},
//
showMap() {
this.mapDialogVisible = true;
}
}
};
@ -532,20 +558,20 @@ export default {
.picturediv {
width: 18.31rem;
height: 25rem;
position: relative;
position: relative;
overflow: hidden;
}
.picturediv img {
width: 100%;
height: auto;
object-fit: cover;
position: absolute;
width: 100%;
height: auto;
object-fit: cover;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
margin: auto;
}
.descriptionsdiv {

@ -14,15 +14,15 @@
新增
</el-button>
<el-button type="primary" size="medium" plain
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;">
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;"
@click="handleEdit(selectedBuilding)">
<img src="../../../assets/images/detailsicon/icon-bj@2x.png" alt="编辑"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
编辑
</el-button>
<el-button type="primary" size="medium" plain
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;">
<img src="../../../assets/images/detailsicon/icon-dc@2x.png" alt="导入"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
<i class="el-icon-download" style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"></i>
导入
</el-button>
<el-button type="primary" size="medium" plain
@ -33,192 +33,166 @@
</el-button>
</div>
</div>
<!-- 栋数 -->
<!-- 栋数楼栋名称 -->
<div class="tagdiv">
<el-tag :key="tag" v-for="tag in dynamicTags" closable :disable-transitions="false"
@close="handleClose(tag)" @click="handleTagClick(tag)" :class="{ 'active-tag': activeTag === tag }">
<img src="../../../assets/images/detailsicon/icon-楼栋@2x.png" alt="">
{{ tag }}
</el-tag>
<div class="tagitem" v-for="building in buildings" :key="building.id" @click="selectBuilding(building.id)":class="getTagItemClass(building)">
<img src="@/assets/images/detailsicon/icon-楼栋@2x.png" alt="">
<span>{{ building.name }}</span>
<img src="@/assets/images/detailsicon/icon-gb@2x.png" alt="" @click.stop="handleDelete(building.id)">
</div>
</div>
<!-- 内容区 -->
<div class="content">
<div class="content" v-if="selectedBuilding">
<div class="descriptionsdiv">
<el-descriptions class="margin-top" :column="4" border>
<el-descriptions-item>
<template slot="label">
是否为重要楼栋
</template>
<template slot="label">是否为重要楼栋</template>
{{ getTextForBoolean(selectedBuilding.sfwzyld) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
层数
</template>
6
<template slot="label">层数</template>
{{ selectedBuilding.floor }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
总建筑高度
</template>
41.2
<template slot="label">总建筑高度</template>
{{ selectedBuilding.totalBuildingHeight }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
首层高度平方米
</template>
kooriookami
<template slot="label">首层高度平方米</template>
{{ selectedBuilding.scgd }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
二至四层层高()
</template>
3.2
<template slot="label">2至4层层高</template>
{{ selectedBuilding.twoAndFourCg }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
4层以上层高
</template>
苏州市
<template slot="label">4层以上层高()</template>
{{ selectedBuilding.fourYscg }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
首层地面荷载(/平方米)
</template>
kooriookami
<template slot="label">首层地面荷载(/)</template>
{{ selectedBuilding.scdmhz }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
二至三层楼面荷载(/平方米)
</template>
18100000000
<template slot="label">二至三层楼面荷载(/平方米)</template>
{{ selectedBuilding.twoAndThreeLmhz }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
标准层面积(千平方米)
</template>
苏州市
<template slot="label">标准层面积(千平方米)</template>
{{ selectedBuilding.bzcmj }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
柱距
</template>
kooriookami
<template slot="label">柱距</template>
{{ selectedBuilding.zj }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
是否有吊装口
</template>
18100000000
<template slot="label">是否有吊装口</template>
{{ getTextForBoolean(selectedBuilding.sfydzk )}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
是否有汽车盘道
</template>
苏州市
<template slot="label">是否有汽车盘道</template>
{{ getTextForBoolean(selectedBuilding.sfyqcpd) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
四层及以上楼面荷载(/平方米)
</template>
kooriookami
<template slot="label">四层及以上楼面荷载(/平方米)</template>
{{ selectedBuilding.fourYslmhz }}
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<!-- 新增楼栋弹窗 -->
<el-dialog title="新增楼栋" :visible.sync="dialogVisible" width="65%">
<el-form :model="buildingForm" label-width="230px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="楼栋名称:">
<el-input v-model="buildingForm.buildingNumber"></el-input>
<el-input v-model="buildingForm.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否为重要楼栋:">
<el-select v-model="buildingForm.isImportant" placeholder="请选择" style="width: 22.5rem;">
<el-option label="是" value="true"></el-option>
<el-option label="否" value="false"></el-option>
<el-select v-model="buildingForm.sfwzyld" placeholder="请选择" style="width: 22.5rem;">
<el-option v-for="dict in dict.type.isno" :key="dict.value" :label="dict.label"
:value="parseInt(dict.value)"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="首层高度(米 ">
<el-input v-model="buildingForm.floors"></el-input>
<el-form-item label="首层高度(米">
<el-input v-model="buildingForm.scgd"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="层数:">
<el-input v-model="buildingForm.totalHeight"></el-input>
<el-form-item label="层数">
<el-input v-model="buildingForm.floor"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="4层以上层高">
<el-input v-model="buildingForm.firstFloorHeight"></el-input>
<el-input v-model="buildingForm.fourYscg"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="柱距:">
<el-input v-model="buildingForm.secondToFourthFloorHeight"></el-input>
<el-input v-model="buildingForm.zj"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="2至4层层高">
<el-input v-model="buildingForm.fourthFloorAboveHeight"></el-input>
<el-input v-model="buildingForm.twoAndFourCg"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="*总建筑高度(米):">
<el-input v-model="buildingForm.secondToThirdFloorLoad"></el-input>
<el-form-item label="总建筑高度(米):">
<el-input v-model="buildingForm.totalBuildingHeight"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="是否有汽车盘道">
<el-select v-model="buildingForm.hasCarRamp" placeholder="请选择" style="width: 22.5rem;">
<el-option label="是" value="true"></el-option>
<el-option label="否" value="false"></el-option>
</el-select>
<el-form-item label="首层地面荷载(吨/平方米):">
<el-input v-model="buildingForm.scdmhz"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="二至三层楼面荷载(吨/平方米):">
<el-input v-model="buildingForm.twoAndThreeLmhz"></el-input>
</el-form-item>
</el-col>
<el-form-item label="是否有吊装口">
<el-select v-model="buildingForm.hasLiftingPort" placeholder="请选择" style="width: 22.5rem;">
<el-option label="是" value="true"></el-option>
<el-option label="否" value="false"></el-option>
</el-select>
</el-form-item>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="四层及以上楼面荷载(吨/平方米):">
<el-input v-model="buildingForm.standardFloorArea"></el-input>
<el-form-item label="标准层面积(千平方米):">
<el-input v-model="buildingForm.bzcmj"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="标准层面积(千平方米):">
<el-input v-model="buildingForm.standardFloorArea"></el-input>
<el-form-item label="是否有汽车盘道:">
<el-select v-model="buildingForm.sfyqcpd" placeholder="请选择" style="width: 22.5rem;">
<el-option v-for="dict in dict.type.isno" :key="dict.value" :label="dict.label"
:value="parseInt(dict.value)"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="二至三层楼面荷载(吨/平方米):">
<el-input v-model="buildingForm.fourthFloorAboveLoad"></el-input>
<el-form-item label="是否有吊装口:">
<el-select v-model="buildingForm.sfydzk" placeholder="请选择" style="width: 22.5rem;">
<el-option v-for="dict in dict.type.isno" :key="dict.value" :label="dict.label"
:value="parseInt(dict.value)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="首层地面荷载(吨/平方米):">
<el-input v-model="buildingForm.fourthFloorAboveLoad"></el-input>
<el-form-item label="四层及以上楼面荷载(吨/平方米):">
<el-input v-model="buildingForm.fourYslmhz"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -232,101 +206,178 @@
</template>
<script>
import { getjzxxinformationByxmId, getjzxxById, addjzxx, updatejzxx, deletejzxx } from '@/api/ManageApi/index';
export default {
dicts: ['isno'],
props: {
size: {
type: String,
default: ''
},
xmId: {
type: [Number, String],
required: true
}
},
data() {
return {
dynamicTags: ['1栋', '2栋', '3栋'],
inputVisible: false,
inputValue: '',
currentBuildingNumber: 3,
activeTag: '1栋',
dialogVisible: false,
buildings: [],
selectedBuilding: null,
buildingForm: {
buildingNumber: '',
isImportant: '',
floors: '',
totalHeight: '',
firstFloorHeight: '',
secondToFourthFloorHeight: '',
fourthFloorAboveHeight: '',
firstFloorLoad: '',
secondToThirdFloorLoad: '',
standardFloorArea: '',
columnSpacing: '',
hasLiftingPort: '',
hasCarRamp: '',
fourthFloorAboveLoad: ''
bzcmj: 0,
createBy: '',
createId: 0,
createTime: '',
floor: 0,
fourYscg: 0,
fourYslmhz: 0,
id: 0,
name: '',
scdmhz: 0,
scgd: 0,
sfwzyld: 2,
sfydzk: 2,
sfyqcpd: 2,
totalBuildingHeight: 0,
twoAndFourCg: 0,
twoAndThreeLmhz: 0,
updateBy: '',
updateId: 0,
updateTime: '',
xmId: 0,
zj: 0
}
};
},
created() {
this.fetchBuildings();
},
methods: {
handleClose(tag) {
this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
if (this.activeTag === tag) {
this.activeTag = null;
}
//12
getTextForBoolean(value) {
return value === 1 ? '是' : '否';
},
handleInputConfirm() {
let inputValue = this.inputValue;
if (inputValue) {
this.dynamicTags.push(inputValue);
}
this.inputVisible = false;
this.inputValue = '';
},
handleTagClick(tag) {
this.activeTag = tag;
//
getTagItemClass(building){
return{
'important-building': building.sfwzyld === 1,
};
},
//
addBuildingTag() {
this.dialogVisible = true;
this.resetBuildingForm();
},
resetBuildingForm() {
this.buildingForm = {
buildingNumber: '',
isImportant: '',
floors: '',
totalHeight: '',
firstFloorHeight: '',
secondToFourthFloorHeight: '',
fourthFloorAboveHeight: '',
firstFloorLoad: '',
secondToThirdFloorLoad: '',
standardFloorArea: '',
columnSpacing: '',
hasLiftingPort: '',
hasCarRamp: '',
fourthFloorAboveLoad: ''
bzcmj: 0,
createBy: '',
createId: 0,
createTime: '',
floor: 0,
fourYscg: 0,
fourYslmhz: 0,
id: 0,
name: '',
scdmhz: 0,
scgd: 0,
sfwzyld: 2,
sfydzk: 2,
sfyqcpd: 2,
totalBuildingHeight: 0,
twoAndFourCg: 0,
twoAndThreeLmhz: 0,
updateBy: '',
updateId: 0,
updateTime: '',
xmId: this.xmId,
zj: 0
};
},
fetchBuildings() {
console.log('Fetching data for xmId:', this.xmId);
getjzxxinformationByxmId({ xmId: this.xmId })
.then(response => {
console.log('API response:', response);
if (response.code === 200 && response.data) {
this.buildings = Object.values(response.data); //
console.log('Buildings data after assignment:', this.buildings);
} else {
console.error('数据格式不正确:', response);
}
})
.catch(error => {
console.error('数据获取失败:', error);
});
},
selectBuilding(id) {
console.log('Selected building ID:', id);
getjzxxById(id)
.then(response => {
console.log('Building details response:', response);
if (response.code === 200 && response.data) {
this.selectedBuilding = response.data; // selectedBuilding
console.log('Selected building data:', this.selectedBuilding);
} else {
console.error('数据格式不正确:', response);
}
})
.catch(error => {
console.error('数据获取失败:', error);
});
},
handleAddBuilding() {
//
// if (!this.buildingForm) {
// this.$message.error('');
// return;
// }
// dynamicTags
this.dynamicTags.push(this.buildingForm.buildingNumber + '栋');
//
this.dialogVisible = false;
//
this.resetBuildingForm();
const api = this.buildingForm.id ? updatejzxx : addjzxx; // ID
const form = {
...this.buildingForm
};
api(form)
.then(response => {
if (response.code === 200) {
this.$message.success(form.id ? '更新成功' : '新增成功');
this.dialogVisible = false;
this.fetchBuildings(); //
} else {
this.$message.error(form.id ? '更新失败' : '新增失败');
}
})
.catch(error => {
console.error(form.id ? '更新失败:' : '新增失败:', error);
this.$message.error(form.id ? '更新失败' : '新增失败');
});
},
handleDelete(id) {
console.log('Deleting building with ID:', id); //
//
this.$message.success('新增楼栋成功');
this.$confirm('你确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deletejzxx([id]) // ID
.then(response => {
if (response.code === 200) {
this.$message.success('删除成功');
this.fetchBuildings(); //
} else {
this.$message.error('删除失败');
}
})
.catch(error => {
console.error('删除失败:', error);
this.$message.error('删除失败');
});
}).catch(() => {
this.$message.info('已取消删除');
});
},
handleEdit(building) {
this.dialogVisible = true;
this.buildingForm = { ...building }; //
}
}
}
};
</script>
<style scoped>
.container {
display: flex;
@ -376,24 +427,14 @@ export default {
text-transform: none;
}
.picturediv {
width: 18.31rem;
height: 25.31rem;
background-color: lightblue;
}
.descriptionsdiv {
width: 100%;
margin-left: 1rem;
height: auto;
}
.two-row-item {
height: 20rem;
}
.tagdiv {
padding: 1rem 2rem 0 2rem;
padding: 1rem 2rem 1rem 2rem;
display: flex;
}
@ -402,37 +443,28 @@ export default {
height: 1.5rem;
}
.el-tag {
border-radius: 1rem;
.tagdiv span {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400;
font-size: 0.88rem;
color: #808080;
line-height: 0.88rem;
text-align: right;
font-style: normal;
text-transform: none;
}
.tagitem {
width: 6.25rem;
height: 2rem;
background: #FAFAFA;
border-radius: 2.13rem 2.13rem 2.13rem 2.13rem;
display: flex;
align-items: center;
justify-content: space-around;
background-color: #FAFAFA;
color: #808080;
border: none;
}
.el-tag+.el-tag {
margin-left: 10px;
border-radius: 1rem;
}
.input-new-tag {
width: 90px;
margin-left: 10px;
vertical-align: bottom;
border-radius: 1rem;
}
.el-tag {
align-items: center;
cursor: pointer;
}
.active-tag {
background-color: rgba(43, 98, 241, 0.1);
color: #2B62F1 !important;
.important-building {
background-color: rgba(43,98,241,0.1);
}
</style>

@ -27,7 +27,7 @@
<el-form-item>
<el-col :span="11">
<el-date-picker type="date" placeholder="选择日期" v-model="form.date1"
style="width: 100%;"></el-date-picker>
style="width: 21.75rem;"></el-date-picker>
</el-col>
</el-form-item>
</el-form>
@ -267,4 +267,11 @@ export default {
font-style: normal;
text-transform: none;
}
.el-textarea__inner {
height: 10rem !important;
/* 固定高度 */
resize: none;
/* 禁止调整大小 */
}
</style>

@ -23,18 +23,35 @@
</template>
</el-table-column>
<el-table-column prop="monthlyInvestment" label="当月完成投资" width="210" align="center">
<template slot-scope="scope">
<el-input v-if="scope.row.isEditing" v-model.number="scope.row.monthlyInvestment" style="width: 100%;"></el-input>
<span v-else>{{ scope.row.monthlyInvestment }}</span>
</template>
</el-table-column>
<el-table-column prop="cumulativeInvestment" label="累计完成投资" width="220" align="center">
<template slot-scope="scope">
<el-input v-if="scope.row.isEditing" v-model.number="scope.row.cumulativeInvestment" style="width: 100%;"></el-input>
<span v-else>{{ scope.row.cumulativeInvestment }}</span>
</template>
</el-table-column>
<el-table-column prop="cumulativeArea" label='截止目前累计建成面积(平方米)' width="260" align="center">
<template slot-scope="scope">
<el-input v-if="scope.row.isEditing" v-model.number="scope.row.cumulativeArea" style="width: 100%;"></el-input>
<span v-else>{{ scope.row.cumulativeArea }}</span>
</template>
</el-table-column>
<el-table-column prop="loanAmount" label='贷款额度(万元)' width="200" align="center">
</el-table-column>
<el-table-column prop="progressDetails" label='项目进展详情' width="180" align="center">
<template slot-scope="scope">
<el-input v-if="scope.row.isEditing" v-model="scope.row.progressDetails" style="width: 100%;"></el-input>
<span v-else>{{ scope.row.progressDetails }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)"></el-button>
<el-button v-if="scope.row.isEditing" size="mini" type="text" icon="el-icon-check" @click="handleSave(scope.row)"></el-button>
<el-button v-else size="mini" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)"></el-button>
<el-button size="mini" type="text" icon="el-icon-delete" style="color: #F25353;" @click="handleDelete(scope.row)"></el-button>
</template>
</el-table-column>
@ -63,6 +80,7 @@ export default {
cumulativeArea: 1000,
loanAmount: 500,
progressDetails: '项目进展详情1',
isEditing: false,
},
{
month: '2016-06',
@ -72,6 +90,7 @@ export default {
cumulativeArea: 1500,
loanAmount: 600,
progressDetails: '项目进展详情2',
isEditing: false,
},
{
month: '2016-07',
@ -81,6 +100,7 @@ export default {
cumulativeArea: 2000,
loanAmount: 700,
progressDetails: '项目进展详情3',
isEditing: false,
},
{
month: '2016-08',
@ -90,6 +110,7 @@ export default {
cumulativeArea: 2500,
loanAmount: 800,
progressDetails: '项目进展详情4',
isEditing: false,
}
],
currentPage: 1,
@ -107,8 +128,16 @@ export default {
}
},
handleEdit(row) {
console.log('编辑:', row);
//
row.isEditing = true;
},
handleSave(row) {
row.isEditing = false;
// API
console.log('保存:', row);
this.$message({
type: 'success',
message: '保存成功!'
});
},
handleDelete(row) {
this.$confirm('你确定要删除此条记录吗?', '提示', {

@ -21,7 +21,7 @@
</el-button>
<el-button type="primary" size="medium" plain
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="handleExport">
<img src="../../../assets/images/detailsicon/icon-dc@2x.png" alt="编辑"
<img src="../../../assets/images/detailsicon/icon-dc@2x.png" alt="导出"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
导出
</el-button>
@ -31,134 +31,101 @@
<div class="content">
<div class="descriptionsdiv">
<el-descriptions class="margin-top" :column="4" border>
<el-descriptions-item>
<template slot="label">
总用地面积(平方米)
</template>
<el-descriptions-item label="总用地面积(平方米)">
<el-input v-if="isEditing" v-model.number="form.zydmj" style="width: 100%;"></el-input>
<span v-else>{{ form.zydmj }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
容积率
</template>
<el-descriptions-item label="容积率">
<el-input v-if="isEditing" v-model.number="form.rjl" style="width: 100%;"></el-input>
<span v-else>{{ form.rjl }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
总建筑面积平方米
</template>
<el-descriptions-item label="总建筑面积(平方米)">
<el-input v-if="isEditing" v-model.number="form.zjzmj" style="width: 100%;"></el-input>
<span v-else>{{ form.zjzmj }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
标准层建筑面积平方米
</template>
<el-descriptions-item label="标准层建筑面积(平方米)">
<el-input v-if="isEditing" v-model.number="form.bzcjzmj" style="width: 100%;"></el-input>
<span v-else>{{ form.bzcjzmj }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
计容积率建筑面积(平方米)
</template>
<el-descriptions-item label="计容积率建筑面积(平方米)">
<el-input v-if="isEditing" v-model.number="form.jrjljzmj" style="width: 100%;"></el-input>
<span v-else>{{ form.jrjljzmj }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
建筑密度(%)
</template>
<el-descriptions-item label="建筑密度(%)">
<el-input v-if="isEditing" v-model.number="form.jzmd" style="width: 100%;"></el-input>
<span v-else>{{ form.jzmd }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
绿地率(%)
</template>
<el-descriptions-item label="绿地率(%)">
<el-input v-if="isEditing" v-model.number="form.ldl" style="width: 100%;"></el-input>
<span v-else>{{ form.ldl }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
建筑栋数
</template>
<el-descriptions-item label="建筑栋数(栋)">
<el-input v-if="isEditing" v-model.number="form.jzds" style="width: 100%;"></el-input>
<span v-else>{{ form.jzds }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
地上建筑面积(平方米)
</template>
<el-descriptions-item label="地上建筑面积(平方米)">
<el-input v-if="isEditing" v-model.number="form.dsjzmj" style="width: 100%;"></el-input>
<span v-else>{{ form.dsjzmj }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
地下建筑面积(平方米)
</template>
<el-descriptions-item label="地下建筑面积(平方米)">
<el-input v-if="isEditing" v-model.number="form.dxjzmj" style="width: 100%;"></el-input>
<span v-else>{{ form.dxjzmj }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
最高建筑层数
</template>
<el-descriptions-item label="最高建筑层数(层)">
<el-input v-if="isEditing" v-model.number="form.zgjzcs" style="width: 100%;"></el-input>
<span v-else>{{ form.zgjzcs }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
最高建筑高度()
</template>
<el-descriptions-item label="最高建筑高度(米)">
<el-input v-if="isEditing" v-model.number="form.zgjzgd" style="width: 100%;"></el-input>
<span v-else>{{ form.zgjzgd }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
机动车停车位()
</template>
<el-descriptions-item label="机动车停车位(辆)">
<el-input v-if="isEditing" v-model.number="form.jdctcw" style="width: 100%;"></el-input>
<span v-else>{{ form.jdctcw }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
非机动车停车位()
</template>
<el-descriptions-item label="非机动车停车位(辆)">
<el-input v-if="isEditing" v-model.number="form.fjdctcw" style="width: 100%;"></el-input>
<span v-else>{{ form.fjdctcw }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
防火等级
</template>
<el-input v-if="isEditing" v-model="form.fhjd" style="width: 100%;"></el-input>
<span v-else>{{ form.fhjd }}</span>
<el-descriptions-item label="防火等级">
<el-input v-if="isEditing" v-model="form.fhdj" style="width: 100%;"></el-input>
<span v-else>{{ form.fhdj }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
规划文件
</template>
<el-input v-if="isEditing" v-model="form.ghwj" style="width: 100%;"></el-input>
<el-descriptions-item label="规划文件">
<div v-if="isEditing">
<span v-if="form.ghwj">{{ form.ghwj }}</span>
<el-tooltip class="item" effect="dark" content="支持pdf或word文件大小不得超过50MB" placement="top-start">
<el-button type="text" icon="el-icon-upload" @click="showFileDialog"></el-button>
</el-tooltip>
</div>
<span v-else>{{ form.ghwj }}</span>
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<!-- 弹窗 -->
<el-dialog title="上传规划文件" :visible.sync="dialogVisible" width="30%">
<FileUpload @file-uploaded="handleFileUploaded" v-model="form.ghwj" />
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { getProgrammeInformationById, updateProgrammeInformation } from '@/api/ManageApi/index';
import FileUpload from '@/components/FileUpload2'
export default {
components: { FileUpload },
props: {
size: {
type: String,
default: ''
},
id: {
xmId: {
type: [Number, String],
required: true
}
@ -166,48 +133,50 @@ export default {
data() {
return {
isEditing: false,
dialogVisible: false,
form: {
id: 0,
xmId: 0,
zydmj: 0,
rjl: 0,
zjzmj: 0,
bzcjzmj: 0,
createBy: '',
createId: 0,
createTime: '',
jrjljzmj: 0,
jzmd: 0,
ldl: 0,
jzds: 0,
dsjzmj: 0,
dxjzmj: 0,
zgjzcs: 0,
zgjzgd: 0,
jdctcw: 0,
fjdctcw: 0,
fhdj: null,
ghwj: '',
id: 0,
jdctcw: 0,
jrjljzmj: 0,
jzds: 0,
jzmd: 0,
ldl: 0,
rjl: 0,
createBy: '',
createId: 0,
createTime: null,
updateBy: '',
updateId: 0,
updateTime: '',
xmId: 0,
zgjzcs: 0,
zgjzgd: 0,
zjzmj: 0,
zydmj: 0
updateTime: null,
},
rules: {
zydmj: [{ required: true, message: '总用地面积不能为空', trigger: 'blur' }],
// rjl: [{ required: true, message: '', trigger: 'blur' }],
// zjzmj: [{ required: true, message: '', trigger: 'blur' }],
// bzcjzmj: [{ required: true, message: '', trigger: 'blur' }],
// jrjljzmj: [{ required: true, message: '', trigger: 'blur' }],
// jzmd: [{ required: true, message: '', trigger: 'blur' }],
// ldl: [{ required: true, message: '绿', trigger: 'blur' }],
// jzds: [{ required: true, message: '', trigger: 'blur' }],
// dsjzmj: [{ required: true, message: '', trigger: 'blur' }],
// dxjzmj: [{ required: true, message: '', trigger: 'blur' }],
// zgjzcs: [{ required: true, message: '', trigger: 'blur' }],
// zgjzgd: [{ required: true, message: '', trigger: 'blur' }],
// jdctcw: [{ required: true, message: '', trigger: 'blur' }],
// fjdctcw: [{ required: true, message: '', trigger: 'blur' }],
// fhjd: [{ required: true, message: '', trigger: 'blur' }],
// ghwj: [{ required: true, message: '', trigger: 'blur' }]
rjl: [{ required: true, message: '容积率不能为空', trigger: 'blur' }],
zjzmj: [{ required: true, message: '总建筑面积不能为空', trigger: 'blur' }],
bzcjzmj: [{ required: true, message: '标准层建筑面积不能为空', trigger: 'blur' }],
jrjljzmj: [{ required: true, message: '计容积率建筑面积不能为空', trigger: 'blur' }],
jzmd: [{ required: true, message: '建筑密度不能为空', trigger: 'blur' }],
ldl: [{ required: true, message: '绿地率不能为空', trigger: 'blur' }],
jzds: [{ required: true, message: '建筑栋数不能为空', trigger: 'blur' }],
dsjzmj: [{ required: true, message: '地上建筑面积不能为空', trigger: 'blur' }],
dxjzmj: [{ required: true, message: '地下建筑面积不能为空', trigger: 'blur' }],
zgjzcs: [{ required: true, message: '最高建筑层数不能为空', trigger: 'blur' }],
zgjzgd: [{ required: true, message: '最高建筑高度不能为空', trigger: 'blur' }],
jdctcw: [{ required: true, message: '机动车停车位不能为空', trigger: 'blur' }],
fjdctcw: [{ required: true, message: '非机动车停车位不能为空', trigger: 'blur' }],
fhdj: [{ required: true, message: '防火等级不能为空', trigger: 'blur' }],
ghwj: [{ required: true, message: '规划文件不能为空', trigger: 'blur' }]
}
};
},
@ -217,10 +186,16 @@ export default {
methods: {
//
fetchData() {
getProgrammeInformationById(this.id)
console.log('Fetching data for xmId:', this.xmId);
getProgrammeInformationById({ xmId: this.xmId })
.then(response => {
const data = response.data;
this.form = { ...data };
console.log('API response:', response);
if (response.code === 200 && response.data) {
this.form = { ...response.data };
console.log('Form data after assignment:', this.form);
} else {
console.error('数据格式不正确:', response);
}
})
.catch(error => {
console.error('数据获取失败:', error);
@ -249,12 +224,6 @@ export default {
this.fetchData(); //
}, 500); // 500
})
.catch(error => {
console.error('数据保存失败:', error);
this.$message.error('数据保存失败,请重试!');
});
} else {
this.$message.warning('请填写完整信息!');
}
},
//
@ -282,6 +251,14 @@ export default {
updateId: 0,
updateTime: ''
};
},
//
showFileDialog() {
this.dialogVisible = true;
},
//
handleFileUploaded(fileName) {
this.form.ghwj = fileName;
}
}
};
@ -336,19 +313,9 @@ export default {
text-transform: none;
}
.picturediv {
width: 18.31rem;
height: 25.31rem;
background-color: lightblue;
}
.descriptionsdiv {
width: 100%;
margin-left: 1rem;
height: auto;
}
.two-row-item {
height: 20rem;
}
</style>

@ -6,11 +6,8 @@
<img src="../../../assets/images/detailsicon/1.png" alt="">
<span>项目画像</span>
</div>
<div class="topright">
<el-button type="primary" size="medium" plain
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;">
<img src="../../../assets/images/detailsicon/icon-bj@2x.png" alt="编辑"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
<div class="topright" style="visibility: hidden;">
<el-button type="primary" size="medium" plain>
编辑
</el-button>
</div>

@ -74,10 +74,7 @@
</el-select>
</el-form-item>
<el-form-item label="图片上传">
<el-upload action="https://jsonplaceholder.typicode.com/posts/" :on-success="handleUploadSuccess"
:on-remove="handleUploadRemove" :file-list="fileList" list-type="picture-card">
<i class="el-icon-plus"></i>
</el-upload>
<ImageUpload />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -89,18 +86,18 @@
</template>
<script>
import ImageUpload from '@/components/ImageUpload';
import 'mars2d/mars2d.css';
import * as mars2d from 'mars2d';
export default {
components: {},
components: {ImageUpload},
dicts: ['tplx'],
data() {
const basePathUrl = window.basePathUrl || "";
return {
configUrl: basePathUrl + "config/config.json",
mapOptions: {
// http://mars2d.cn/apidoc.html#Map
copyright: false, // logo
basemaps: [
{
@ -180,19 +177,13 @@ export default {
handleSubmit() {
this.dialogVisible = false;
// API
},
//
handleUploadSuccess(response, file) {
this.fileList.push(file);
this.form.images.push(file.url);
},
//
handleUploadRemove(file) {
const index = this.fileList.indexOf(file);
if (index !== -1) {
this.fileList.splice(index, 1);
this.form.images.splice(index, 1);
}
addxmt(this.form).then((res) => {
if (res.code === 200) {
this.$message.success('数据提交成功!');
}else {
this.$message.error('数据提交失败!');
}
})
},
//
initMap() {

@ -0,0 +1,93 @@
<template>
<div>
<el-form :model="form" label-width="120px">
<el-form-item label="ID">
<el-input v-model="form.id"></el-input>
</el-form-item>
<el-form-item label="文件类型" prop="lx">
<el-select v-model="form.imgType" placeholder="请选择文件类型">
<el-option v-for="dict in dict.type.tplx" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="图片url">
<el-input v-model="form.img"></el-input>
</el-form-item>
<el-form-item label="经度">
<el-input v-model="form.latitude"></el-input>
</el-form-item>
<el-form-item label="纬度">
<el-input v-model="form.longitude"></el-input>
</el-form-item>
<el-form-item label="项目ID">
<el-input v-model="form.xmId"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSubmit"></el-button>
<el-button @click="resetForm"></el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { addxmtl } from '@/api/ManageApi/index';
import ImageUpload from '@/components/ImageUpload';
export default {
components: { ImageUpload },
dicts: ['tplx'],
data() {
return {
form: {
createBy: '',
createTime: '',
id: 0,
img: '',
imgType: 0,
latitude: '',
longitude: '',
remark: '',
updateBy: '',
updateTime: '',
xmId: 0,
},
};
},
methods: {
handleFileUploaded(fileUrl) {
this.form.img = fileUrl;
},
handleSubmit() {
addxmtl(this.form)
.then((response) => {
if (response.code === 200) {
this.$message.success('新增成功');
this.resetForm();
} else {
this.$message.error('新增失败');
}
})
.catch((error) => {
console.error('新增失败:', error);
this.$message.error('新增失败');
});
},
resetForm() {
this.form = {
createBy: '',
createTime: '',
id: 0,
img: '',
imgType: 0,
latitude: '',
longitude: '',
remark: '',
updateBy: '',
updateTime: '',
xmId: 0,
};
},
},
};
</script>

@ -0,0 +1,341 @@
<template>
<div class="container">
<!-- 内容区域 -->
<div class="main-content">
<!-- 地图容器 -->
<div class="map-thumbnail">
<div id="mars2dContainerLuotu" class="mars2d-container"></div>
</div>
<!-- 悬浮的点位信息 div -->
<div class="floating-panel" v-if="floatingPanelVisible">
<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.latlng" ></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>
</template>
<script>
import 'mars2d/mars2d.css';
import * as mars2d from 'mars2d';
export default {
components: {},
dicts: ['tplx'],
data() {
const basePathUrl = window.basePathUrl || "";
return {
configUrl: basePathUrl + "config/config.json",
mapOptions: {
// http://mars2d.cn/apidoc.html#Map
copyright: false, // logo
basemaps: [
{
"id": 2021,
"pid": 10,
"name": "高德电子",
"icon": "img/basemaps/gaode_vec.png",
"type": "gaode",
"layer": "vec",
"show": true
},
],
center: { lat: 31.2304, lng: 120.6184 }, //
zoom: 10, //
},
//
dialogVisible: false,
dialogTitle: '编辑项目',
form: {
type: '外部', //
},
map: null, //
floatingPanelVisible: false, //
pointDialogTitle: '新增点位', //
pointForm: {
name: '',
latlng: '',
},
selectedLatLng: null, //
existingMarker: null, //
isEditing: false, //
markerIcon: require('@/assets/images/detailsicon/icon-定位@2x.png'), // 使 require
};
},
methods: {
onload(map) {
//
},
//
handleEdit() {
this.dialogTitle = '编辑项目';
this.dialogVisible = true;
//
this.form = {
type: '外部', //
};
},
//
handleSubmit() {
this.dialogVisible = false;
// API
},
//
initMap() {
if (!this.map) {
this.map = new mars2d.Map('mars2dContainerLuotu', this.mapOptions);
this.map.on('click', this.onMapClick);
}
},
//
onMapClick(event) {
if (this.existingMarker) {
this.$message.warning('地图上已经存在一个点位,请先删除该点位后再添加新的点位。');
return;
}
const { latlng } = event;
this.selectedLatLng = latlng;
this.pointForm.latlng = `${latlng.lat}, ${latlng.lng}`;
this.showFloatingPanel();
},
//
showFloatingPanel() {
this.floatingPanelVisible = true;
this.$nextTick(() => {
this.$refs.pointNameInput.focus();
});
},
//
hideFloatingPanel() {
this.floatingPanelVisible = false;
this.selectedLatLng = null;
this.pointForm.name = '';
this.pointForm.latlng = '';
},
//
addPoint() {
if (this.selectedLatLng) {
if (this.existingMarker) {
this.map.graphicLayer.removeGraphic(this.existingMarker);
}
const marker = new mars2d.graphic.Marker({
latlng: this.selectedLatLng,
style: {
image: this.markerIcon, // 使
width: 32,
height: 32,
},
});
this.map.graphicLayer.addGraphic(marker);
this.existingMarker = marker;
this.isEditing = true; //
this.hideFloatingPanel();
this.$message.success('落图成功');
//
marker.on('click', this.onMarkerClick);
}
},
//
deletePoint() {
if (this.existingMarker) {
this.existingMarker.off('click', this.onMarkerClick); //
this.map.graphicLayer.removeGraphic(this.existingMarker);
this.existingMarker = null;
this.isEditing = false; //
this.hideFloatingPanel();
this.$message.success('点位已删除');
}
},
//
onMarkerClick(event) {
this.pointForm.name = this.existingMarker.name || '';
this.pointForm.latlng = `${this.existingMarker.latlng.lat}, ${this.existingMarker.latlng.lng}`;
this.showFloatingPanel();
},
},
mounted() {
this.initMap(); //
},
};
</script>
<style scoped>
.container {
display: flex;
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 {
height: auto;
display: flex;
justify-content: space-between;
padding: .5rem;
border-bottom: 1px solid #E5E5E5;
}
.action-bar {
margin-bottom: 20px;
}
.carousel-container {
display: flex;
flex-direction: column;
gap: 1rem;
}
.carousel {
width: 21rem;
height: 12rem;
overflow: hidden;
}
.carousel-item {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
opacity: 0;
transition: opacity 0.5s ease-in-out;
}
.carousel-item img {
width: 100%;
height: 100%;
object-fit: cover;
}
.carousel-item.active {
opacity: 1;
}
.carousel-control {
position: absolute;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
font-size: 1.5rem;
color: white;
padding: 0.5rem;
z-index: 10;
}
.carousel-control.left {
left: 0;
}
.carousel-control.right {
right: 0;
}
.topleft {
width: 8rem;
display: flex;
gap: 0.4rem;
align-items: center;
}
.topleft img {
width: 0.81rem;
height: 0.81rem;
}
.topleft span {
width: auto;
height: 0.88rem;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 500;
font-size: 0.88rem;
color: #3D424C;
line-height: 0.88rem;
text-align: right;
font-style: normal;
text-transform: none;
}
.map-thumbnail {
width: 60rem;
height: 34rem;
position: relative;
}
.mars2d-container {
width: 60rem;
height: 34rem;
}
/* 悬浮面板样式 */
.floating-panel {
position: fixed;
top: 30%;
right: 25%;
width: 300px;
background-color: #FFFFFF;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
border-radius: 4px;
z-index: 1000;
display: flex;
flex-direction: column;
overflow: hidden;
}
.panel-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 15px;
background-color: #F5F7FA;
border-bottom: 1px solid #E4E7ED;
}
.panel-header span {
font-size: 16px;
font-weight: 500;
}
.close-button {
font-size: 14px;
color: #909399;
}
.panel-body {
padding: 20px;
}
.panel-footer {
display: flex;
justify-content: flex-end;
padding: 10px 15px;
background-color: #F5F7FA;
border-top: 1px solid #E4E7ED;
}
.panel-footer .el-button {
margin-left: 10px;
}
</style>

@ -1,311 +0,0 @@
<template>
<div class="container">
<!-- 顶部操作栏 -->
<div class="containertop">
<div class="topleft">
<img src="../../../assets/images/detailsicon/1.png" alt="">
<span>落图实例演示</span>
</div>
<div class="topright">
<el-button type="primary" size="medium" plain
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="handleEdit">
<img src="../../../assets/images/detailsicon/icon-xz@2x.png" alt="编辑"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
编辑
</el-button>
</div>
</div>
<!-- 内容区域 -->
<div class="main-content">
<!-- 编辑/新增对话框 -->
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="500px">
<el-form :model="form" label-width="120px">
<el-form-item label="类型">
<el-select v-model="form.type" placeholder="请选择类型">
<el-option v-for="dict in dict.type.tplx" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="showMap"></el-button>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="handleSubmit"></el-button>
</span>
</el-dialog>
<!-- 地图弹窗 -->
<el-dialog :title="mapDialogTitle" :visible.sync="mapDialogVisible" width="80%" :fullscreen="true">
<div class="map-thumbnail">
<div id="mars2dContainerLuotu" class="mars2d-container"></div>
<div class="classify">
位置
</div>
</div>
</el-dialog>
<!-- 新增点位弹窗 -->
<el-dialog :title="pointDialogTitle" :visible.sync="pointDialogVisible" width="300px">
<el-form :model="pointForm" label-width="100px">
<el-form-item label="点位名称">
<el-input v-model="pointForm.name"></el-input>
</el-form-item>
<el-form-item label="经纬度">
<el-input v-model="pointForm.latlng" disabled></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="pointDialogVisible = false">取消</el-button>
<el-button type="primary" @click="addPoint"></el-button>
</span>
</el-dialog>
</div>
</div>
</template>
<script>
import 'mars2d/mars2d.css';
import * as mars2d from 'mars2d';
export default {
components: {},
dicts: ['tplx'],
data() {
const basePathUrl = window.basePathUrl || "";
return {
configUrl: basePathUrl + "config/config.json",
mapOptions: {
// http://mars2d.cn/apidoc.html#Map
copyright: false, // logo
basemaps: [
{
"pid": 10,
"name": "腾讯电子",
"icon": "/img/basemaps/tencent_vec.png",
"type": "tencent",
"layer": "vec",
"show": true,
},
],
center: { lat: 31.2304, lng: 120.6184 }, //
zoom: 10, //
},
//
dialogVisible: false,
dialogTitle: '编辑项目',
form: {
type: '外部', //
},
map: null, //
mapDialogVisible: false, //
mapDialogTitle: '地图', //
pointDialogVisible: false, //
pointDialogTitle: '新增点位', //
pointForm: {
name: '',
latlng: '',
},
selectedLatLng: null, //
};
},
methods: {
onload(map) {
//
},
//
handleEdit() {
this.dialogTitle = '编辑项目';
this.dialogVisible = true;
//
this.form = {
type: '外部', //
};
},
//
handleSubmit() {
this.dialogVisible = false;
// API
},
//
showMap() {
this.mapDialogVisible = true;
this.$nextTick(() => {
this.initMap();
});
},
//
initMap() {
if (!this.map) {
this.map = new mars2d.Map('mars2dContainerLuotu', this.mapOptions);
this.map.on('click', this.onMapClick);
}
},
//
onMapClick(event) {
const { latlng } = event;
this.selectedLatLng = latlng;
this.pointForm.latlng = `${latlng.lat}, ${latlng.lng}`;
this.pointDialogVisible = true;
},
//
addPoint() {
if (this.selectedLatLng) {
const marker = new mars2d.graphic.Marker({
latlng: this.selectedLatLng,
style: {
image: 'img/marker/mark-blu.png',
width: 32,
height: 32,
},
});
this.map.graphicLayer.addGraphic(marker);
this.pointDialogVisible = false;
this.selectedLatLng = null;
this.pointForm.name = '';
this.pointForm.latlng = '';
}
},
},
mounted() {
//
},
};
</script>
<style scoped>
.container {
display: flex;
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;
}
.containertop {
height: auto;
display: flex;
justify-content: space-between;
padding: .5rem;
border-bottom: 1px solid #E5E5E5;
}
.action-bar {
margin-bottom: 20px;
}
.main-content {
display: flex;
gap: 2rem;
padding: 1rem;
}
.carousel-container {
display: flex;
flex-direction: column;
gap: 1rem;
}
.carousel {
width: 21rem;
height: 12rem;
position: relative;
overflow: hidden;
}
.carousel-item {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
opacity: 0;
transition: opacity 0.5s ease-in-out;
}
.carousel-item img {
width: 100%;
height: 100%;
object-fit: cover;
}
.carousel-item.active {
opacity: 1;
}
.carousel-control {
position: absolute;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
font-size: 1.5rem;
color: white;
padding: 0.5rem;
z-index: 10;
}
.carousel-control.left {
left: 0;
}
.carousel-control.right {
right: 0;
}
.topleft {
width: 8rem;
display: flex;
gap: 0.4rem;
align-items: center;
}
.topleft img {
width: 0.81rem;
height: 0.81rem;
}
.topleft span {
width: auto;
height: 0.88rem;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 500;
font-size: 0.88rem;
color: #3D424C;
line-height: 0.88rem;
text-align: right;
font-style: normal;
text-transform: none;
}
.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;
bottom: .5rem;
left: .5rem;
display: flex;
justify-content: center;
align-items: center;
font-size: .7rem;
z-index: 999;
}
.map-thumbnail {
width: 76rem;
height: 25rem;
position: relative;
}
.mars2d-container {
width: 76rem;
height: 25rem;
}
</style>

@ -0,0 +1,13 @@
<template>
<div>
<div>123</div>
</div>
</template>
<script>
</script>
<style scoped>
</style>

@ -2,16 +2,15 @@
<div class="bigone">
<!-- 标题 -->
<div class="containerheadone" id="listtop">
<Title :id="9" ></Title>
<Title :id="projectId"></Title>
<el-button type="primary" size="medium" plain
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;"
@click="goBack">
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="goBack">
返回
</el-button>
</div>
<div class="containerbody">
<!-- 目录 -->
<div class="containerhead" >
<div class="containerhead">
<el-menu :default-active="activeSection" mode="horizontal" @select="scrollToSection"
class="custom-menu">
<el-menu-item v-for="(item, index) in sections" :key="index" :index="item.id"
@ -22,15 +21,15 @@
</div>
<!-- 基本信息 -->
<div id="basic">
<Basic :id="9"></Basic>
<Basic :id="projectId"></Basic>
</div>
<!-- 规划信息 -->
<!-- <div id="programme">
<Programme :id="projectId"></Programme>
</div> -->
<div id="programme">
<Programme :xmId="projectId"></Programme>
</div>
<!-- 建筑信息 -->
<div id="buildings">
<Buildings></Buildings>
<Buildings :xmId="projectId"></Buildings>
</div>
<!-- 要素模型信息 -->
<div id="models">
@ -41,16 +40,20 @@
<Months></Months>
</div>
<!-- 企业入驻信息 -->
<div id="companyenter">
<!-- <div id="companyenter">
<Companyenter></Companyenter>
</div>
</div> -->
<!-- 项目画像 -->
<div id="projectpicture">
<Projectpicture></Projectpicture>
</div>
<!-- 项目图例 -->
<div id="projectpicturetwo">
<Projectpicturetwo></Projectpicturetwo>
<Projectpicturetwo :id="projectId"></Projectpicturetwo>
</div>
<!-- 项目图例 -->
<div id="projectpicturetwo">
<Projectpicturetwo22 :id="projectId"></Projectpicturetwo22>
</div>
<!-- 项目巡礼 -->
<div id="projectgift">
@ -68,13 +71,12 @@
<div class="bottombox" id="others">
<Others></Others>
</div>
<!-- 落图实例 -->
<div>
<luotu/>
<el-button type="primary">审核通过</el-button>
</div>
</div>
<!-- 返回顶部按钮 -->
<el-button icon="el-icon-caret-top" circle id="back-to-top" @click="scrollToTop" plain></el-button>
<el-button icon="el-icon-caret-top" circle id="back-to-top" @click="scrollToTop" plain></el-button>
</div>
</template>
@ -82,30 +84,30 @@
import Title from '../components/ProjectDetails/Title.vue';
import Basic from '../components/ProjectDetails/Basic.vue';
import Buildings from '../components/ProjectDetails/Buildings.vue';
import Companyenter from '../components/ProjectDetails/companyenter.vue';
import Projectpicturetwo22 from '../components/ProjectDetails/Projectpicturetwo22.vue';
// import Companyenter from '../components/ProjectDetails/companyenter.vue';
import Liver from '../components/ProjectDetails/Liver.vue';
import Memo from '../components/ProjectDetails/Memo.vue';
import Models from '../components/ProjectDetails/Models.vue';
import Months from '../components/ProjectDetails/Months.vue';
// import Programme from '../components/ProjectDetails/Programme.vue';
import Programme from '../components/ProjectDetails/Programme.vue';
import Projectgift from '../components/ProjectDetails/Projectgift.vue';
import Projectpicture from '../components/ProjectDetails/Projectpicture.vue';
import Projectpicturetwo from '../components/ProjectDetails/Projectpicturetwo.vue';
import Others from '../components/ProjectDetails/Others.vue';
import luotu from '@/views/components/ProjectDetails/luotugongnengshifan.vue'
export default {
components: {
luotu,
Title,
Basic,
Buildings,
Companyenter,
Projectpicturetwo22,
// Companyenter,
Liver,
Memo,
Models,
Months,
// Programme,
Programme,
Projectgift,
Projectpicture,
Projectpicturetwo,
@ -131,6 +133,11 @@ export default {
projectId: null
};
},
created() {
// projectId
this.projectId = this.$route.params.id;
this.loadData();
},
methods: {
loadData() {
// projectId
@ -242,5 +249,4 @@ export default {
z-index: 99;
font-size: 18px;
}
</style>

@ -13,23 +13,21 @@
<el-col :span="9">
<el-form-item label="项目建设起止时间" prop="">
<el-date-picker type="daterange" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :style="{ width: '100%' }"
start-placeholder="开始日期" end-placeholder="结束日期" range-separator="至" clearable></el-date-picker>
start-placeholder="开始日期" end-placeholder="结束日期" range-separator="至" clearable
v-model="queryParams.dateRange"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="现状分类" prop="status">
<el-select v-model="queryParams.status" placeholder="现状分类" clearable>
<el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label"
:value="dict.value" />
<el-form-item label="现状分类">
<el-select v-model="queryParams.postCode" placeholder="现状分类" clearable>
<el-option v-for="dict in dict.type.xzfl" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="活动区域">
<el-select v-model="form.region" placeholder="请选择活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
<el-form-item label="项目法人单位">
<el-input v-model="queryParams.xmfrdwxz" placeholder="请输入项目法人单位" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
</el-col>
</el-row>
@ -76,21 +74,27 @@
</div>
<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" prop="postId" />
<el-table-column label="项目名称" align="center" prop="postName" />
<el-table-column label="现状分类" align="center" prop="postCode" />
<el-table-column label="项目法人单位" align="center" prop="postSort" />
<el-table-column label="项目建设起止时间" align="center" prop="postSort" />
<el-table-column label="总投资额(万元)" align="center" width="130" prop="postSort" />
<el-table-column label="总用地面积(平方米)" align="center" prop="postSort" />
<el-table-column label="当前状态" align="center" prop="status" />
<el-table-column label="序号" align="center" prop="id" />
<el-table-column label="项目名称" align="center" prop="name" width="200" />
<el-table-column label="现状分类" align="center" prop="xzfl" />
<el-table-column label="项目法人单位" align="center" prop="xmfrdwxz" width="200" />
<el-table-column label="项目建设起止时间" align="center" width="200">
<template slot-scope="scope">
{{ scope.row.begainTime }} {{ scope.row.endTime }}
</template>
</el-table-column>
<el-table-column label="总投资额(万元)" align="center" width="130" prop="ztze" />
<el-table-column label="总用地面积(平方米)" align="center" prop="totalLandArea" />
<el-table-column label="当前状态" align="center" prop="status">
<template slot-scope="scope">
<span :style="{ color: statusColors[scope.row.status] }">{{ scope.row.status }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-view" @click="getInfo(scope.row)"
<el-button size="mini" type="text" @click="getInfo(scope.row)"
v-hasPermi="['system:post:detail']">详情</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['system:post:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
<el-button size="mini" type="text" @click="handleDelete(scope.row)" style="color: #F25353;"
v-hasPermi="['system:post:remove']">删除</el-button>
</template>
</el-table-column>
@ -98,63 +102,19 @@
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
</div>
<!-- 添加或修改项目对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="项目名称" prop="postName">
<el-input v-model="form.postName" placeholder="请输入项目名称" />
</el-form-item>
<el-form-item label="项目编码" prop="postCode">
<el-input v-model="form.postCode" placeholder="请输入编码名称" />
</el-form-item>
<el-form-item label="项目顺序" prop="postSort">
<el-input-number v-model="form.postSort" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="项目状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label
}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 批量导入对话框 -->
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls"
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listPost, getPost, delPost, addPost, updatePost } from "@/api/system/post";
import { getBasicInformationPage } from '@/api/ManageApi/index';
export default {
name: "Post",
dicts: ['sys_normal_disable'],
dicts: ['xzfl'],
data() {
return {
//
loading: true,
loading: false,
//
ids: [],
//
@ -167,6 +127,12 @@ export default {
total: 0,
//
postList: [],
//
statusColors: {
'审核通过': '#6EDABE',
'待填报': '#FFBF6B',
'待审核': '#7693D8'
},
//
title: "",
//
@ -177,21 +143,15 @@ export default {
pageSize: 10,
postCode: undefined,
postName: undefined,
xmfrdwxz: undefined,
dateRange: [],
status: undefined
},
//
form: {},
//
rules: {
postName: [
{ required: true, message: "项目名称不能为空", trigger: "blur" }
],
postCode: [
{ required: true, message: "项目编码不能为空", trigger: "blur" }
],
postSort: [
{ required: true, message: "项目顺序不能为空", trigger: "blur" }
]
},
//
upload: {
@ -235,9 +195,30 @@ export default {
/** 查询项目列表 */
getList() {
this.loading = true;
listPost(this.queryParams).then(response => {
this.postList = response.rows;
this.total = response.total;
const params = {
...this.queryParams,
current: this.queryParams.pageNum,
size: this.queryParams.pageSize,
startTime: this.queryParams.dateRange ? this.queryParams.dateRange[0] : undefined,
endTime: this.queryParams.dateRange ? this.queryParams.dateRange[1] : undefined,
name: this.queryParams.postName,
xmfrdwxz: this.queryParams.xmfrdwxz,
xzfl: this.queryParams.postCode
};
getBasicInformationPage(params).then(response => {
const defaultStatusColors = {
'审核通过': '#6EDABE',
'待填报': '#FFBF6B',
'待审核': '#7693D8'
};
const defaultTotalLandAreas = [5000, 6000, 7000]; //
this.postList = response.data.records.map((item, index) => ({
...item,
status: item.status || Object.keys(defaultStatusColors)[index % Object.keys(defaultStatusColors).length],
totalLandArea: item.totalLandArea || defaultTotalLandAreas[index % defaultTotalLandAreas.length]
}));
this.total = response.data.total;
this.loading = false;
}).catch(error => {
console.error('获取项目列表失败', error);
@ -252,10 +233,10 @@ export default {
//
reset() {
this.form = {
postId: undefined,
id: undefined,
postCode: undefined,
postName: undefined,
postSort: 0,
postSort: undefined,
status: "0",
remark: undefined
};
@ -273,7 +254,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.postId);
this.ids = selection.map(item => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@ -286,56 +267,50 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const postId = row.postId || this.ids[0];
getPost(postId).then(response => {
this.form = response.data;
const id = row.id || this.ids[0];
const foundItem = this.postList.find(item => item.id === id);
if (foundItem) {
this.form = { ...foundItem };
this.open = true;
this.title = "修改项目";
}).catch(error => {
console.error('获取项目详情失败', error);
});
} else {
console.error('项目未找到');
}
},
/** 详情按钮操作 */
getInfo(row) {
this.$store.commit("SET_CRUMBS", this.$route.meta.title + "详情");
const postIds = row.postId || this.ids[0];
this.$router.push({ path: `/manage-info/${postIds}` });
const id = row.id || this.ids[0];
this.$router.push({ path: `/manage-info/${id}` });
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.postId !== undefined) {
updatePost(this.form).then(response => {
if (this.form.id !== undefined) {
const index = this.postList.findIndex(item => item.id === this.form.id);
if (index !== -1) {
this.postList.splice(index, 1, { ...this.form });
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}).catch(error => {
console.error('修改项目失败', error);
});
} else {
console.error('项目未找到');
}
} else {
addPost(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}).catch(error => {
console.error('新增项目失败', error);
});
this.form.id = this.postList.length + 1;
this.postList.push({ ...this.form });
this.$modal.msgSuccess("新增成功");
}
this.open = false;
this.getList();
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const postIds = row.postId || this.ids.join(',');
this.$modal.confirm('是否确认删除项目编号为"' + postIds + '"的数据项?删除这条信息之后有可能找不回来了,请思考一下哟!').then(() => {
delPost(postIds).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(error => {
console.error('删除项目失败', error);
});
}).catch(() => { });
const ids = row.id || this.ids.join(',');
this.postList = this.postList.filter(item => !ids.split(',').includes(String(item.id)));
this.$modal.msgSuccess("删除成功");
this.getList();
},
/** 导出按钮操作 */
handleExport() {

@ -16,8 +16,20 @@
<Message />
</div>
</div>
<div class="grid-item item-1">
<!-- 整体项目情况 -->
<div class="allarea">
</div>
</div>
<div class="grid-item item-2">
<!-- 消息通知 -->
<div class="itemhead">
<span>我的待办</span>
</div>
<div class="mainarea">
</div>
</div>
</div>
</template>

@ -36,7 +36,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://192.168.0.121:7071`,
target: `http://192.168.0.111:7071`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save