需求修改

xuhongjie
严飞永 3 months ago
parent aed1adb622
commit e912954367

@ -1,10 +1,10 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 苏州工业园区工业上楼项目系统 VUE_APP_TITLE = 苏州工业园区工业上楼管理系统
# 开发环境配置 # 开发环境配置
ENV = 'development' ENV = 'development'
# 苏州工业园区工业上楼项目系统/开发环境 # 苏州工业园区工业上楼管理系统/开发环境
VUE_APP_BASE_API = '' VUE_APP_BASE_API = ''
# 路由懒加载 # 路由懒加载

@ -1,8 +1,8 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 苏州工业园区工业上楼项目系统 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'

@ -1,5 +1,5 @@
# 页面标题 # 页面标题
VUE_APP_TITLE = 苏州工业园区工业上楼项目系统 VUE_APP_TITLE = 苏州工业园区工业上楼管理系统
BABEL_ENV = production BABEL_ENV = production
@ -8,5 +8,5 @@ NODE_ENV = production
# 测试环境配置 # 测试环境配置
ENV = 'staging' ENV = 'staging'
# 苏州工业园区工业上楼项目系统/测试环境 # 苏州工业园区工业上楼管理系统/测试环境
VUE_APP_BASE_API = '/stage-api' VUE_APP_BASE_API = '/stage-api'

@ -1,7 +1,7 @@
{ {
"name": "ruoyi", "name": "ruoyi",
"version": "3.8.9", "version": "3.8.9",
"description": "苏州工业园区工业上楼项目系统", "description": "苏州工业园区工业上楼管理系统",
"author": "若依", "author": "若依",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {

@ -177,12 +177,12 @@ export function editElemention(data) {
}); });
} }
// 删除指标 // 删除指标或要素
export function deleteElemention(idList) { export function deleteElemention(idList) {
return request({ return request({
url: `/gysl/mx/delete`, url: `/gysl/mx/delete`,
method: 'delete', method: 'delete',
params: { idList } params: { idList: idList.join(',') }
}); });
} }
@ -242,7 +242,9 @@ export function deleteXmzsk(idList) {
return request({ return request({
url: '/gysl/xmzsk/delete', url: '/gysl/xmzsk/delete',
method: 'delete', method: 'delete',
params: { idList } params: {
idList: idList.join(',') // 将数组转换为逗号分隔的字符串
}
}); });
} }
@ -714,4 +716,15 @@ export function getXfcyglPage(params) {
method: 'get', method: 'get',
params params
}); });
} }
//消息通知数量
export function getMessageCount() {
return request({
url: '/gysl/qyStats/qyNoticeCount',
method: 'get'
})
}
//月度进展信息

@ -0,0 +1,86 @@
<template>
<div>
<!-- 政务端消息通知数量 -->
<!-- 大于0的时候显示的图标 -->
<el-badge :is-dot="counts > 0" class="item" v-if="checkRole(['common'])">
<el-dropdown trigger="click" @command="handleCommand">
<span class="el-dropdown-link">
<i class="el-icon-bell"></i>
</span>
</el-dropdown>
</el-badge>
<!-- 企业端消息通知数量 -->
<el-badge :is-dot="counts > 0" class="item" v-if="showCompanySection">
<el-dropdown trigger="click" @command="handleCommand">
<span class="el-dropdown-link">
<i class="el-icon-bell"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>
消息数量: {{ counts }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-badge>
</div>
</template>
<script>
import { checkRole } from "@/utils/permission";
import { getMessageCount } from '@/api/ManageApi/index'
export default {
data() {
return {
counts: 0
}
},
computed: {
showCompanySection() {
const isCompany = this.checkRole(['company']);
const isCommon = this.checkRole(['common']);
//
return isCompany && !isCommon;
}
},
mounted() {
this.getCounts();
},
methods: {
checkRole,
//
async getCounts() {
try {
const response = await getMessageCount();
if (response && response.code === 200) {
this.counts = response.data; // counts
} else {
console.error('获取数据失败:', response);
}
} catch (error) {
console.error('获取数据失败:', error);
}
},
handleCommand(command) {
this.$message('点击了: ' + command)
}
}
}
</script>
<style scoped>
.item {
margin-right: 10px;
margin-top: .5rem;
.el-dropdown-link {
cursor: pointer;
color: black;
}
.el-dropdown-link i {
font-size: 2rem;
/* 增大图标的大小 */
}
}
</style>

@ -3,29 +3,23 @@
<div class="navbarleft"> <div class="navbarleft">
<div class="logoimg"> <div class="logoimg">
<img src="../../assets/images/bluelogo@2x.png" alt=""> <img src="../../assets/images/bluelogo@2x.png" alt="">
<span>苏州工业园区工业上楼项目系统</span> <span>苏州工业园区工业上楼管理系统</span>
</div> </div>
</div> </div>
<div class="right-menu"> <div class="right-menu">
<el-badge :value="unreadMessages" :hidden="unreadMessages === 0" class="item"> <bearicon />
<el-dropdown trigger="click" @command="handleCommand">
<span class="el-dropdown-link">
<i class="el-icon-bell"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(message, index) in messages" :key="index" :command="message">
{{ message }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-badge>
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click"> <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper"> <div class="avatar-wrapper">
<img :src="avatar" class="user-avatar"> <div v-if="checkRole(['common'])">
<i class="el-icon-caret-bottom"/> <span>{{ username }}</span>
</div>
<div v-if="showCompanySection">
<span>{{ username }}</span>
</div>
<i class="el-icon-caret-bottom" />
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="logout"> <el-dropdown-item @click.native="logout">
<span>退出登录</span> <span>退出登录</span>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
@ -44,74 +38,101 @@ import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch' import Search from '@/components/HeaderSearch'
import RuoYiGit from '@/components/RuoYi/Git' import RuoYiGit from '@/components/RuoYi/Git'
import RuoYiDoc from '@/components/RuoYi/Doc' import RuoYiDoc from '@/components/RuoYi/Doc'
import bearicon from '@/components/bearicon'
import { checkPermi, checkRole } from "@/utils/permission";
import { getMessageCount } from '@/api/ManageApi/index'
export default { export default {
components: { components: {
Breadcrumb, Breadcrumb,
TopNav, TopNav,
Hamburger, Hamburger,
Screenfull, Screenfull,
SizeSelect, SizeSelect,
Search, Search,
RuoYiGit, RuoYiGit,
RuoYiDoc RuoYiDoc,
}, bearicon
data() {
return {
messages: [
'消息1',
'消息2',
'消息3',
'消息4'
]
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'device'
]),
setting: {
get() {
return this.$store.state.settings.showSettings
},
set(val) {
this.$store.dispatch('settings/changeSetting', {
key: 'showSettings',
value: val
})
}
}, },
topNav: { data() {
get() { return {
return this.$store.state.settings.topNav messages: [],
} }
}, },
unreadMessages() { computed: {
return this.messages.length ...mapGetters([
} 'sidebar',
}, 'avatar',
methods: { 'device',
toggleSideBar() { 'name' // Make sure this getter exists in your Vuex store
this.$store.dispatch('app/toggleSideBar') ]),
username() {
// Return the username from Vuex store or localStorage
return this.name || localStorage.getItem('username') || '账号名称';
},
showCompanySection() {
const isCompany = this.checkRole(['company']);
const isCommon = this.checkRole(['common']);
//
return isCompany && !isCommon;
},
setting: {
get() {
return this.$store.state.settings.showSettings
},
set(val) {
this.$store.dispatch('settings/changeSetting', {
key: 'showSettings',
value: val
})
}
},
topNav: {
get() {
return this.$store.state.settings.topNav
}
},
unreadMessages() {
return this.messages.length
}
}, },
async logout() { mounted() {
this.$confirm('确定注销并退出系统吗?', '提示', { this.getCounts();
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
// location.href = '/index';
this.$router.replace('/login')
})
}).catch(() => { });
}, },
handleCommand(command) { methods: {
this.$message('点击了: ' + command) checkPermi,
checkRole,
//
async getCounts() {
try {
const response = await getMessageCount();
if (response && response.code === 200) {
this.counts = response.data; // counts
} else {
console.error('获取数据失败:', response);
}
} catch (error) {
console.error('获取数据失败:', error);
}
},
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
this.$router.replace('/login')
})
}).catch(() => { });
},
handleCommand(command) {
this.$message('点击了: ' + command)
}
} }
}
} }
</script> </script>
@ -122,17 +143,20 @@ export default {
height: 50px; height: 50px;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
.logoimg{
.logoimg {
display: flex; display: flex;
align-items: center; align-items: center;
gap: .8rem; gap: .8rem;
} }
.logoimg img{
.logoimg img {
width: 3.69rem; width: 3.69rem;
height: 2rem; height: 2rem;
margin-left:1.2rem ; margin-left: 1.2rem;
} }
.logoimg span{
.logoimg span {
width: auto; width: auto;
height: 2.06rem; height: 2.06rem;
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi; font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
@ -145,7 +169,8 @@ export default {
text-transform: none; text-transform: none;
} }
.navbarleft{
.navbarleft {
display: flex; display: flex;
align-items: center; align-items: center;
} }
@ -209,7 +234,7 @@ export default {
margin-right: 30px; margin-right: 30px;
.avatar-wrapper { .avatar-wrapper {
margin-top: 5px; margin-top: 2px;
position: relative; position: relative;
.user-avatar { .user-avatar {
@ -223,7 +248,7 @@ export default {
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
right: -20px; right: -20px;
top: 15px; top: 17px;
font-size: 12px; font-size: 12px;
} }
} }
@ -232,12 +257,15 @@ export default {
.item { .item {
margin-right: 10px; margin-right: 10px;
margin-top: .5rem; margin-top: .5rem;
.el-dropdown-link { .el-dropdown-link {
cursor: pointer; cursor: pointer;
color: black; color: black;
} }
.el-dropdown-link i { .el-dropdown-link i {
font-size: 2rem; /* 增大图标的大小 */ font-size: 2rem;
/* 增大图标的大小 */
} }
} }
} }

@ -44,7 +44,11 @@
{{ fileTypeMap[scope.row.lx] || scope.row.lx }} {{ fileTypeMap[scope.row.lx] || scope.row.lx }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="附件" align="center" prop="fj" /> <el-table-column label="附件" align="center" prop="fj">
<template slot-scope="scope">
{{ getFileName(scope.row.fj) }}
</template>
</el-table-column>
<el-table-column label="上传用户" align="center" prop="scyh" /> <el-table-column label="上传用户" align="center" prop="scyh" />
<el-table-column label="上传时间" align="center" prop="scsj" /> <el-table-column label="上传时间" align="center" prop="scsj" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -223,6 +227,14 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
//
getFileName(filePath) {
if (filePath) {
return filePath.split('/').pop();
}
return '';
},
querySearchAsync(queryString, cb) { querySearchAsync(queryString, cb) {
let results = []; let results = [];
// getXmzskPage API // getXmzskPage API

@ -145,10 +145,12 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="建设起止时间" prop="begainTime"> <el-form-item label="建设起止时间">
<el-date-picker v-model="form.begainTime" type="daterange" range-separator="" <el-date-picker v-model="form.begainTime" type="date" placeholder="开始日期"
start-placeholder="开始日期" end-placeholder="结束日期" style="width: 11rem;"></el-date-picker>
style="width: 22.5rem;"></el-date-picker> ~
<el-date-picker v-model="form.endTime" type="date" placeholder="结束日期"
style="width: 10.5rem;"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -172,6 +174,13 @@
</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-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>
@ -256,13 +265,84 @@ export default {
jsjd: '', jsjd: '',
}, },
rules: { rules: {
name: [
{ required: true, message: '项目名称不能为空', trigger: 'blur' },
{ max: 50, message: '项目名称长度不能超过50个字', trigger: 'blur' }
],
xmfrdwxz: [
{ required: true, message: '项目法人单位不能为空', trigger: 'blur' },
{ max: 50, message: '项目法人单位长度不能超过50个字', trigger: 'blur' }
],
nature: [
{ required: true, message: '项目法人单位性质不能为空', trigger: 'change' }
],
sgdw: [
{ max: 50, message: '施工单位长度不能超过50个字', trigger: 'blur' }
],
sjdw: [
{ max: 50, message: '设计单位长度不能超过50个字', trigger: 'blur' }
],
ztze: [
{ required: true, message: '总投资额不能为空', trigger: 'blur' },
{ type: 'number', message: '总投资额必须是数字', trigger: 'blur' },
{ max: 50, message: '总投资额长度不能超过50个字', trigger: 'blur' }
],
ssgnq: [
{ required: true, message: '所属功能区不能为空', trigger: 'change' }
],
begainTime: [
{ required: true, message: '建设起始时间不能为空', trigger: 'change' }
],
endTime: [
{ required: true, message: '建设结束时间不能为空', trigger: 'change' }
],
xzfl: [
{ required: true, message: '现状分类不能为空', trigger: 'change' }
],
jsdd: [
{ max: 50, message: '建设地点长度不能超过50个字', trigger: 'blur' }
],
prioritize: [
{ max: 50, message: '重点发展产业长度不能超过50个字', trigger: 'blur' }
],
jsms: [
{ required: true, message: '建设模式不能为空', trigger: 'change' }
],
label: [
{ max: 50, message: '项目标签长度不能超过50个字', trigger: 'blur' }
],
projectLeader: [
{ required: true, message: '项目负责人不能为空', trigger: 'blur' },
{ max: 50, message: '项目负责人长度不能超过50个字', trigger: 'blur' }
],
phone: [
{ required: true, message: '联系方式不能为空', trigger: 'blur' },
{ pattern: /^[\d-]+$/, message: '联系方式只能包含数字和连字符', trigger: 'blur' },
{ max: 50, message: '联系方式长度不能超过50个字', trigger: 'blur' }
],
issuingTime: [
{ max: 50, message: '施工许可证发放时间长度不能超过50个字', trigger: 'blur' }
],
acceptanceTime: [
{ max: 50, message: '竣工验收时间长度不能超过50个字', trigger: 'blur' }
],
jsjd: [
{ max: 50, message: '建设进度长度不能超过50个字', trigger: 'blur' }
],
unitIntroduction: [
{ max: 1000, message: '项目法人单位简介长度不能超过1000个字', trigger: 'blur' }
],
introduction: [
{ max: 1000, message: '项目简介长度不能超过1000个字', trigger: 'blur' }
]
}, },
// select // select
ssgnqMap: { ssgnqMap: {
1: '高端制造与国际贸易区', 1: '高端制造与国际贸易区',
2: '阳澄湖半岛旅游度假区', 2: '独墅湖科教创新区',
3: '金鸡湖商务区', 3: '阳澄湖半岛旅游度假区',
4: '苏相合作区' 4: '金鸡湖商务区',
5: '苏相合作区'
}, },
xmfrdwxzMap: { xmfrdwxzMap: {
1: '国企', 1: '国企',
@ -276,7 +356,7 @@ export default {
}, },
xzflMap: { xzflMap: {
1: '已建', 1: '已建',
2: '建', 2: '建',
3: '拟建', 3: '拟建',
} }
}; };
@ -287,7 +367,8 @@ export default {
this.descriptions = this.formatDescriptions(newVal); this.descriptions = this.formatDescriptions(newVal);
this.form = { this.form = {
...newVal, ...newVal,
begainTime: [new Date(newVal.begainTime), new Date(newVal.endTime)], begainTime: newVal.begainTime ? new Date(newVal.begainTime) : '',
endTime: newVal.endTime ? new Date(newVal.endTime) : '',
}; };
}, },
immediate: true, immediate: true,
@ -300,16 +381,19 @@ export default {
return [ return [
{ label: '项目名称', value: data.name }, { label: '项目名称', value: data.name },
{ label: '项目法人单位', value: data.xmfrdwxz }, { label: '项目法人单位', value: data.xmfrdwxz },
{ label: '项目法人单位性质', value: this.xmfrdwxzMap[data.nature] || '未知' }, { label: '项目法人单位性质', value: this.xmfrdwxzMap[data.nature] || '' },
{ label: '施工单位', value: data.sgdw }, { label: '施工单位', value: data.sgdw },
{ label: '设计单位', value: data.sjdw }, { label: '设计单位', value: data.sjdw },
{ label: '总投资额(万元)', value: data.ztze }, { label: '总投资额(万元)', value: data.ztze },
{ label: '所属功能区', value: this.ssgnqMap[data.ssgnq] || '未知' }, { label: '所属功能区', value: this.ssgnqMap[data.ssgnq] || '' },
{ label: '建设起止时间', value: `${data.begainTime}${data.endTime}` }, {
{ label: '现状分类', value: this.xzflMap[data.xzfl] || '未知' }, label: '建设起止时间',
value: `${data.begainTime ? data.begainTime : ''}${data.endTime ? data.endTime : ''}`
},
{ label: '现状分类', value: this.xzflMap[data.xzfl] || '' },
{ label: '建设地点', value: data.jsdd }, { label: '建设地点', value: data.jsdd },
{ label: '重点发展产业', value: data.prioritize }, { label: '重点发展产业', value: data.prioritize },
{ label: '建设模式', value: this.jsmsMap[data.jsms] || '未知' }, { label: '建设模式', value: this.jsmsMap[data.jsms] || '' },
{ label: '项目标签', value: data.label }, { label: '项目标签', value: data.label },
{ label: '项目负责人', value: data.projectLeader }, { label: '项目负责人', value: data.projectLeader },
{ label: '联系方式', value: data.phone }, { label: '联系方式', value: data.phone },
@ -349,14 +433,19 @@ export default {
return true; return true;
}, },
// //
//
prepareFormData(formData) { prepareFormData(formData) {
// begainTime endTime //
const [begainTime, endTime] = this.formatDateRange(formData.begainTime); const formatDate = (date) => {
if (!date) return '';
// Date
return date instanceof Date ? date.toISOString().split('T')[0] : date;
};
return { return {
...formData, // ...formData,
begainTime, // begainTime: formatDate(formData.begainTime), // begainTime
endTime, // endTime: formatDate(formData.endTime), // endTime
createBy: '', createBy: '',
createId: 0, createId: 0,
createTime: '', createTime: '',
@ -365,23 +454,22 @@ export default {
updateTime: '', updateTime: '',
}; };
}, },
//
formatDateRange(dateRange) {
if (!dateRange || dateRange.length !== 2) return ['', '']; //
// YYYY-MM-DD // formatDateRange(dateRange) {
const formatDate = (date) => { // if (!dateRange || dateRange.length !== 2) return ['', '']; //
if (!date) return ''; // // YYYY-MM-DD
// Date Date // const formatDate = (date) => {
const d = date instanceof Date ? date : new Date(date); // if (!date) return '';
return d.toISOString().split('T')[0]; // YYYY-MM-DD // // Date Date
}; // const d = date instanceof Date ? date : new Date(date);
// return d.toISOString().split('T')[0]; // YYYY-MM-DD
// };
return [ // return [
formatDate(dateRange[0]), // // formatDate(dateRange[0]), //
formatDate(dateRange[1]) // // formatDate(dateRange[1]) //
]; // ];
}, // },
// //
handleAttachmentSuccess(response, file) { handleAttachmentSuccess(response, file) {
this.form.fj = response.url; this.form.fj = response.url;

@ -13,7 +13,8 @@
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"> style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
新增 新增
</el-button> </el-button>
<el-button type="primary" size="medium" plain v-if="action === 'fill' || !action" <el-button
type="primary" size="medium" plain v-if="buildings.length !== 0 && (action === 'fill' || !action)"
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)"> @click="handleEdit(selectedBuilding)">
<img src="../../../assets/images/detailsicon/icon-bj@2x.png" alt="编辑" <img src="../../../assets/images/detailsicon/icon-bj@2x.png" alt="编辑"
@ -21,12 +22,16 @@
编辑 编辑
</el-button> </el-button>
<el-button type="primary" size="medium" plain v-if="action === 'fill' || !action" <el-button type="primary" size="medium" plain v-if="action === 'fill' || !action"
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="handleImport"
>
<i class="el-icon-download" style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"></i> <i class="el-icon-download" style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"></i>
导入 导入
</el-button> </el-button>
<el-button type="primary" size="medium" plain v-if="action === 'fill' || !action" <el-button type="primary" size="medium" plain v-if="action === 'fill' || !action"
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="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;"> style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
导出 导出
@ -35,17 +40,20 @@
</div> </div>
<!-- 栋数楼栋名称 --> <!-- 栋数楼栋名称 -->
<div class="tagdiv"> <div class="tagdiv">
<div class="tagitem" v-for="building in buildings" :key="building.id" @click="selectBuilding(building.id)" <div v-if="buildings.length === 0" class="no-data"
:class="getTagItemClass(building)"> style="width: 100%; display: flex;align-items: center;justify-content: center;color: gray;">
暂无数据
</div>
<div class="tagitem" v-for="building in buildings" :key="building.id" @click="selectBuilding(building)"
:class="[getTagItemClass(building), { 'active-tag': selectedBuilding && selectedBuilding.id === building.id }]">
<img src="@/assets/images/detailsicon/icon-楼栋@2x.png" alt=""> <img src="@/assets/images/detailsicon/icon-楼栋@2x.png" alt="">
<span>{{ building.name }}</span> <span>{{ building.name }}</span>
<img src="@/assets/images/detailsicon/icon-gb@2x.png" <img src="@/assets/images/detailsicon/icon-gb@2x.png" v-if="action === 'fill' || !action" alt=""
v-if="action === 'fill' || !action" @click.stop="handleDelete(building.id)">
alt="" @click.stop="handleDelete(building.id)">
</div> </div>
</div> </div>
<!-- 内容区 --> <!-- 内容区 -->
<div class="content" v-if="selectedBuilding"> <div class="content" v-if="buildings.length > 0">
<div class="descriptionsdiv"> <div class="descriptionsdiv">
<el-descriptions class="margin-top" :column="4" border> <el-descriptions class="margin-top" :column="4" border>
<el-descriptions-item> <el-descriptions-item>
@ -221,7 +229,7 @@ export default {
xmId: { xmId: {
type: [Number, String], type: [Number, String],
required: true required: true
}, },
action: { action: {
type: String, type: String,
required: true required: true
@ -255,7 +263,8 @@ export default {
updateTime: '', updateTime: '',
xmId: 0, xmId: 0,
zj: 0 zj: 0
} },
rules:[]
}; };
}, },
created() { created() {
@ -276,28 +285,28 @@ export default {
addBuildingTag() { addBuildingTag() {
this.dialogVisible = true; this.dialogVisible = true;
this.buildingForm = { this.buildingForm = {
bzcmj: 0, bzcmj: '',
createBy: '', createBy: '',
createId: 0, createId: '',
createTime: '', createTime: '',
floor: 0, floor: '',
fourYscg: 0, fourYscg: '',
fourYslmhz: 0, fourYslmhz: '',
id: 0, id: '',
name: '', name: '',
scdmhz: 0, scdmhz: '',
scgd: 0, scgd: '',
sfwzyld: 2, sfwzyld: 2,
sfydzk: 2, sfydzk: 2,
sfyqcpd: 2, sfyqcpd: 2,
totalBuildingHeight: 0, totalBuildingHeight: '',
twoAndFourCg: 0, twoAndFourCg: '',
twoAndThreeLmhz: 0, twoAndThreeLmhz: '',
updateBy: '', updateBy: '',
updateId: 0, updateId: '',
updateTime: '', updateTime: '',
xmId: this.xmId, xmId: this.xmId,
zj: 0 zj: ''
}; };
}, },
fetchBuildings() { fetchBuildings() {
@ -308,29 +317,19 @@ export default {
if (response.code === 200 && response.data) { if (response.code === 200 && response.data) {
this.buildings = Object.values(response.data); // this.buildings = Object.values(response.data); //
console.log('Buildings data after assignment:', this.buildings); console.log('Buildings data after assignment:', this.buildings);
//
if (this.buildings.length > 0) {
this.selectedBuilding = this.buildings[0];
}
} else { } else {
console.error('数据格式不正确:', response); console.error('数据格式不正确:', response);
} }
}) })
.catch(error => {
console.error('数据获取失败:', error);
});
}, },
selectBuilding(id) {
console.log('Selected building ID:', id); selectBuilding(building) {
getjzxxById(id) this.selectedBuilding = building; // 使building
.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() { handleAddBuilding() {
const api = this.buildingForm.id ? updatejzxx : addjzxx; // ID const api = this.buildingForm.id ? updatejzxx : addjzxx; // ID
@ -473,6 +472,37 @@ export default {
cursor: pointer; cursor: pointer;
} }
.tagitem {
width: 6.25rem;
height: 2rem;
background: #FAFAFA;
border-radius: 2.13rem 2.13rem 2.13rem 2.13rem;
display: flex;
justify-content: space-around;
align-items: center;
cursor: pointer;
border: 1px solid transparent;
/* 添加透明边框保持布局稳定 */
transition: all 0.3s ease;
/* 添加过渡效果 */
}
.tagitem.active-tag {
border: 1px solid #2B62F1;
/* 选中时的蓝色边框 */
box-shadow: 0 0 0 2px rgba(43, 98, 241, 0.2);
/* 可选的外发光效果 */
}
.tagitem:hover {
background: #f0f0f0;
/* 鼠标悬停时的背景色变化 */
}
.important-building {
background-color: rgba(43, 98, 241, 0.1);
}
.important-building { .important-building {
background-color: rgba(43, 98, 241, 0.1); background-color: rgba(43, 98, 241, 0.1);
} }

@ -64,7 +64,7 @@
</el-button> </el-button>
</div> </div>
<!-- 表格显示区 --> <!-- 表格显示区 -->
<div class="contenttwo"> <div class="contenttwo">
<div class="descriptionsdiv"> <div class="descriptionsdiv">
<el-table :data="tableData" style="width: 98%"> <el-table :data="tableData" style="width: 98%">
<el-table-column prop="id" label="序号" width="200"> <el-table-column prop="id" label="序号" width="200">
@ -173,7 +173,7 @@ export default {
headers: { headers: {
Authorization: "Bearer " + getToken() Authorization: "Bearer " + getToken()
}, },
url: process.env.VUE_APP_BASE_API + "/api/enterprise/import" // url: process.env.VUE_APP_BASE_API + "/api/enterprise/import"
} }
}; };
}, },

@ -31,6 +31,10 @@
<div v-if="image.isOnline" class="online-status online">线</div> <div v-if="image.isOnline" class="online-status online">线</div>
<div v-else class="online-status offline">离线</div> <div v-else class="online-status offline">离线</div>
</div> </div>
<div v-if="images.length === 0" class="no-data"
style="width: 100%; display: flex;align-items: center;justify-content: center;color: gray;">
暂无数据
</div>
</div> </div>
</div> </div>
</template> </template>
@ -46,17 +50,23 @@ export default {
data() { data() {
return { return {
images: [ images: [
{ src: 'https://picsum.photos/300/200?random=1', isOnline: true }, // { src: 'https://picsum.photos/300/200?random=1', isOnline: true },
{ src: 'https://picsum.photos/300/200?random=2', isOnline: false }, // { src: 'https://picsum.photos/300/200?random=2', isOnline: false },
{ src: 'https://picsum.photos/300/200?random=3', isOnline: true }, // { src: 'https://picsum.photos/300/200?random=3', isOnline: true },
] ]
}; };
}, },
methods: { methods: {
removeImage(index) { removeImage(index) {
if (confirm('确定要删除该实况吗?')) { this.$confirm('确定要删除该实况吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.images.splice(index, 1); this.images.splice(index, 1);
} }).catch(() => {
//
});
} }
} }
}; };

@ -38,6 +38,10 @@
<div class="iconguanbi2" @click="handleEditMemo(memo)"> <img <div class="iconguanbi2" @click="handleEditMemo(memo)"> <img
src="../../../assets/images/detailsicon/icon-bj@2x.png" alt=""></div> src="../../../assets/images/detailsicon/icon-bj@2x.png" alt=""></div>
</div> </div>
<div v-if="memos.length === 0" class="no-data"
style="width: 100%; display: flex;align-items: center;justify-content: center;color: gray;">
暂无数据
</div>
</div> </div>
</div> </div>

@ -15,33 +15,31 @@
<div class="content"> <div class="content">
<div class="descriptionsdiv"> <div class="descriptionsdiv">
<el-table :data="tableData" style="width: 100%"> <el-table :data="tableData" style="width: 100%">
<el-table-column prop="month" label="进度月份" width="180"> <el-table-column prop="month" label="进度月份" width="200">
</el-table-column> </el-table-column>
<el-table-column prop="status" label="状态" width="120" align="center"> <el-table-column prop="status" label="状态" width="200" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="getStatusColor(scope.row.status)">{{ scope.row.status }}</span> <span :style="getStatusColor(scope.row.status)">{{ scope.row.status }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="monthlyInvestment" label="当月完成投资" width="210" align="center"> <el-table-column prop="monthlyInvestment" label="当月完成投资" width="220" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="scope.row.isEditing" v-model.number="scope.row.monthlyInvestment" style="width: 100%;"></el-input> <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> <span v-else>{{ scope.row.monthlyInvestment }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="cumulativeInvestment" label="累计完成投资" width="220" align="center"> <el-table-column prop="cumulativeInvestment" label="累计完成投资" width="280" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="scope.row.isEditing" v-model.number="scope.row.cumulativeInvestment" style="width: 100%;"></el-input> <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> <span v-else>{{ scope.row.cumulativeInvestment }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="cumulativeArea" label='截止目前累计建成面积(平方米)' width="260" align="center"> <el-table-column prop="cumulativeArea" label='截止目前累计建成面积(平方米)' width="280" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="scope.row.isEditing" v-model.number="scope.row.cumulativeArea" style="width: 100%;"></el-input> <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> <span v-else>{{ scope.row.cumulativeArea }}</span>
</template> </template>
</el-table-column> </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"> <el-table-column prop="progressDetails" label='项目进展详情' width="180" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="scope.row.isEditing" v-model="scope.row.progressDetails" style="width: 100%;"></el-input> <el-input v-if="scope.row.isEditing" v-model="scope.row.progressDetails" style="width: 100%;"></el-input>
@ -72,46 +70,7 @@ export default {
data() { data() {
return { return {
tableData: [ tableData: [
{
month: '2016-05',
status: '未更新',
monthlyInvestment: 1000,
cumulativeInvestment: 1000,
cumulativeArea: 1000,
loanAmount: 500,
progressDetails: '项目进展详情1',
isEditing: false,
},
{
month: '2016-06',
status: '已更新',
monthlyInvestment: 1000,
cumulativeInvestment: 2000,
cumulativeArea: 1500,
loanAmount: 600,
progressDetails: '项目进展详情2',
isEditing: false,
},
{
month: '2016-07',
status: '未更新',
monthlyInvestment: 1000,
cumulativeInvestment: 3000,
cumulativeArea: 2000,
loanAmount: 700,
progressDetails: '项目进展详情3',
isEditing: false,
},
{
month: '2016-08',
status: '已更新',
monthlyInvestment: 1000,
cumulativeInvestment: 4000,
cumulativeArea: 2500,
loanAmount: 800,
progressDetails: '项目进展详情4',
isEditing: false,
}
], ],
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 10,

@ -7,27 +7,26 @@
<span>其他信息</span> <span>其他信息</span>
</div> </div>
<div class="topright" v-if="action === 'fill' || !action"> <div class="topright" v-if="action === 'fill' || !action">
<el-button type="primary" size="medium" plain v-if="checkRole(['admin','common'])" <el-button type="primary" size="medium" plain v-if="checkRole(['admin', 'common'])"
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="openDialog('add')"> style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="openDialog('add')">
<img src="../../../assets/images/detailsicon/icon-bj@2x.png" alt="新增" <img src="../../../assets/images/detailsicon/icon-bj@2x.png" alt="新增"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"> style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
新增 新增
</el-button> </el-button>
<el-button type="primary" size="medium" plain <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="toggleEditMode"
@click="toggleEditMode"
:loading="saveLoading"> :loading="saveLoading">
<img src="../../../assets/images/detailsicon/icon-bj@2x.png" alt="编辑" <img src="../../../assets/images/detailsicon/icon-bj@2x.png" alt="编辑"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"> style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
{{ isEditMode ? '保存' : '编辑' }} {{ isEditMode ? '保存' : '编辑' }}
</el-button> </el-button>
<el-button type="primary" size="medium" plain <el-button type="primary" size="medium" plain v-if="checkRole(['admin', 'common'])"
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="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;"> style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
导出 导出
</el-button> </el-button>
<el-button type="primary" size="medium" plain <el-button type="primary" size="medium" plain v-if="checkRole(['admin', 'common'])"
style="border: none;background-color: rgba(242,83,83,0.1);color: #F25353;" @click="deleteData"> style="border: none;background-color: rgba(242,83,83,0.1);color: #F25353;" @click="deleteData">
<img src="../../../assets/images/detailsicon/icon-delet@2x.png" alt="删除" <img src="../../../assets/images/detailsicon/icon-delet@2x.png" alt="删除"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;"> style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
@ -71,7 +70,7 @@
</template> </template>
<script> <script>
import { checkPermi, checkRole } from "@/utils/permission"; import { checkPermi, checkRole } from "@/utils/permission";
export default { export default {
props: { props: {
@ -83,6 +82,10 @@ export default {
action: { action: {
type: String, type: String,
required: true required: true
},
xmId:{
type: Number,
default: 0
} }
}, },
created() { created() {
@ -104,7 +107,7 @@ export default {
methods: { methods: {
checkPermi, checkPermi,
checkRole, checkRole,
// //
openDialog(type) { openDialog(type) {
if (type === 'add') { if (type === 'add') {
@ -116,7 +119,7 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
} }
}, },
// //
toggleEditMode() { toggleEditMode() {
if (this.isEditMode) { if (this.isEditMode) {
@ -129,7 +132,7 @@ export default {
this.editedData = JSON.parse(JSON.stringify(this.anotherInfo)); this.editedData = JSON.parse(JSON.stringify(this.anotherInfo));
} }
}, },
// //
handleFieldChange(item) { handleFieldChange(item) {
const index = this.editedData.findIndex(i => i.zdname === item.zdname); const index = this.editedData.findIndex(i => i.zdname === item.zdname);
@ -137,20 +140,20 @@ export default {
this.editedData[index] = { ...item }; this.editedData[index] = { ...item };
} }
}, },
// //
saveChanges() { saveChanges() {
this.saveLoading = true; this.saveLoading = true;
try { try {
// //
const updatedData = this.editedData.map(item => ({ const updatedData = this.editedData.map(item => ({
...item, ...item,
})); }));
// //
this.$emit('update-info', updatedData); this.$emit('update-info', updatedData);
// 退 // 退
this.isEditMode = false; this.isEditMode = false;
} catch (error) { } catch (error) {
@ -159,7 +162,17 @@ export default {
this.saveLoading = false; this.saveLoading = false;
} }
}, },
/**导出 */
handleExport() {
this.download(
"/gysl/projectOtherInfo/export",
{
xmId: this.xmId,
...this.anotherInfo,
},
`其他信息${new Date().getTime()}.xlsx`
);
},
// //
submitForm() { submitForm() {
const newItem = { const newItem = {
@ -168,13 +181,13 @@ export default {
createTime: new Date().toISOString(), createTime: new Date().toISOString(),
// //
}; };
// //
this.$emit('add-info', newItem); this.$emit('add-info', newItem);
this.dialogVisible = false; this.dialogVisible = false;
}, },
// //
deleteData() { deleteData() {
this.$confirm('确定要删除这些信息吗?', '提示', { this.$confirm('确定要删除这些信息吗?', '提示', {
@ -187,7 +200,7 @@ export default {
this.$message({ this.$message({
type: 'info', type: 'info',
message: '已取消删除' message: '已取消删除'
}); });
}); });
} }
} }

@ -18,7 +18,7 @@
<!-- 展示区域 --> <!-- 展示区域 -->
<div class="image-container"> <div class="image-container">
<div v-for="(item, index) in projectList" :key="index" class="image-box" > <div v-for="(item, index) in projectList" :key="index" class="image-box">
<img :src="item.img" alt="项目图片" class="image"> <img :src="item.img" alt="项目图片" class="image">
<div class="close-button" @click="removeImage(index)"> <div class="close-button" @click="removeImage(index)">
<img src="../../../assets/images/detailsicon/icon-关闭@2x.png" alt=""> <img src="../../../assets/images/detailsicon/icon-关闭@2x.png" alt="">
@ -32,6 +32,10 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="projectList.length === 0" class="no-data"
style="width: 100%; display: flex;align-items: center;justify-content: center;color: gray;">
暂无数据
</div>
<!-- 新增弹窗 --> <!-- 新增弹窗 -->
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="50%"> <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="50%">
@ -82,7 +86,7 @@
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm" :loading="loading">{{ isEditMode ? '保存' : '确 定' <el-button type="primary" @click="submitForm" :loading="loading">{{ isEditMode ? '保存' : '确 定'
}}</el-button> }}</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 新增详情弹窗 --> <!-- 新增详情弹窗 -->
@ -191,7 +195,6 @@ export default {
// //
handleItemClick(item) { handleItemClick(item) {
// //
event.stopPropagation();
// //
const isActionButton = event.target.closest('.close-button') || const isActionButton = event.target.closest('.close-button') ||
@ -227,8 +230,7 @@ export default {
}, },
// //
async removeImage(index,event) { async removeImage(index, event) {
event.stopPropagation();
try { try {
await this.$confirm('确定要删除该项目巡礼吗?', '提示', { await this.$confirm('确定要删除该项目巡礼吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -501,7 +503,7 @@ export default {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi; font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 500; font-weight: 500;
font-size: 1.13rem; font-size: 1.13rem;
color: #FFFFFF; color: black;
line-height: 1.56rem; line-height: 1.56rem;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
@ -512,7 +514,7 @@ export default {
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi; font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
font-weight: 400; font-weight: 400;
font-size: 0.75rem; font-size: 0.75rem;
color: rgba(255, 255, 255, 0.8); color: black;
line-height: 1rem; line-height: 1rem;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
@ -536,7 +538,8 @@ export default {
width: 1.2rem; width: 1.2rem;
height: 1.2rem; height: 1.2rem;
} }
.dianjibox{
.dianjibox {
width: 18rem; width: 18rem;
height: 11rem; height: 11rem;
/* background-color: red; */ /* background-color: red; */

@ -21,7 +21,7 @@
<div class="tablehead"> <div class="tablehead">
<img src="@/assets/images/icon-pjdj@2x.png" alt=""> <img src="@/assets/images/icon-pjdj@2x.png" alt="">
<span>评价等级</span> <span>评价等级</span>
<span style="margin-top: .3rem;">12/60</span> <span style="margin-top: .3rem;"></span>
</div> </div>
<div class="tablebody"> <div class="tablebody">
<div class="table-container"> <div class="table-container">

@ -21,7 +21,7 @@
</el-button> </el-button>
</div> </div>
</div> </div>
<!-- 编辑/新增对话框 --> <!-- 编辑/新增对话框 -->
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="500px"> <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="500px">
<el-form :model="form" label-width="120px" :rules="rules" ref="formRef"> <el-form :model="form" label-width="120px" :rules="rules" ref="formRef">

@ -15,7 +15,9 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="getInfo(scope.row, 'fill')" <el-button size="mini" type="text" @click="getInfo(scope.row, 'fill')"
v-if="statusMap[scope.row.status] === '待填报'">填报</el-button> v-if="statusMap[scope.row.status] === '待填报'">填报</el-button>
<el-button size="mini" type="text" @click="getInfo(scope.row, 'detail')">详情</el-button> <el-button size="mini" type="text" @click="getInfo(scope.row, 'detail')"
v-if="statusMap[scope.row.status] !== '待填报'"
>详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -60,7 +62,7 @@ export default {
}, },
xzflMap: { xzflMap: {
1: '已建', 1: '已建',
2: '建', 2: '建',
3: '拟建' 3: '拟建'
}, },
// //

@ -69,7 +69,7 @@ export default {
formatter: function (name) { formatter: function (name) {
// //
const item = this.chartData.find(item => item.name === name); const item = this.chartData.find(item => item.name === name);
return `${name} ${item.value} (${item.percent}%)`; return `${name} ${item.value}`;
}.bind(this) }.bind(this)
}, },
series: [ series: [

@ -1,96 +1,146 @@
<template> <template>
<div class="projectList"> <div>
<el-table :data="tableData" style="width: 100%"> <!-- 表格内容区 -->
<el-table-column prop="name" label="项目名称" width="170"> <div class="tablebox">
<template slot-scope="scope"> <!-- 标签行 -->
<span style="color: #2B62F1;">{{ scope.row.name }}</span> <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" stripe>
</template> <el-table-column label="项目名称" align="center" width="150" >
</el-table-column> <template slot-scope="scope">
<el-table-column prop="ssgnq" label="所在区域"> <span style="color: #2B62F1;cursor: pointer;" @click="getInfo(scope.row, 'detail')">{{ scope.row.name }}</span>
</el-table-column> </template>
<el-table-column prop="ztze" label='总投资额(万元)' width="88"> </el-table-column>
</el-table-column> <el-table-column label="总投资额(万元)" align="center" prop="ztze" />
<el-table-column prop="zydmj" label='建筑面积(万平方米)' width="88"> <el-table-column label="所在区域" align="center" width="100" prop="ssgnq">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="status" label="状态" width="70"> <span>{{ ssgnqMap[scope.row.ssgnq] }}</span>
<template slot-scope="scope"> </template>
<span :style="getStatusColor(scope.row.status)">{{ scope.row.status }}</span> </el-table-column>
</template> <el-table-column label="总用地面积(平方米)" align="center" width="100" prop="zydmj" />
</el-table-column> <el-table-column label="状态" align="center" width="100" prop="xzfl">
</el-table> <template slot-scope="scope">
</div> <span :style="{ color: xzflColors[xzflMap[scope.row.xzfl]] }">{{
xzflMap[scope.row.xzfl] }}</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template> </template>
<script> <script>
import { xmlist } from '@/api/ManageApi' import { getBasicInformationPage } from "@/api/ManageApi/index";
import { checkPermi, checkRole } from "@/utils/permission";
export default { export default {
data() { name: "TableContent",
return { dicts: ["xzfl"],
tableData: [], data() {
ssgnqMap:{ return {
1:'高贸区', //
2:'科创区', loading: true,
3:'度假区', //
4:'商务区', ids: [],
5:'苏相合作区' //
} single: true,
} //
}, multiple: true,
created() { //
this.getxmList(); showSearch: true,
}, //
methods: { total: 0,
async getxmList() { //
const response = await xmlist(); postList: [],
if (response && response.code === 200 && response.data.records) { //
this.tableData = this.processData(response.data.records); xzflColors: {
} '在建': '#6EDABE',
'拟建': '#FFBF6B',
'已建': '#2B62F1'
},
//
ssgnqMap: {
1: '高贸区',
2: '科创区',
3: '度假区',
4: '商务区',
5: '苏相合作区'
},
xzflMap: {
1: '已建',
2: '在建',
3: '拟建'
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
xzfl: '',
name: '',
xmfrdwxz: '',
dateRange: '', //
status: ''
},
};
}, },
processData(data) { created() {
return data.map(item => ({ this.getList();
name: item.name,
ssgnq: this.getRegion(item.ssgnq),
ztze: item.ztze,
zydmj: item.zydmj || 0,
status: this.getStatus(item.xzfl)
}));
}, },
getStatus(xzfl) { methods: {
switch (xzfl) { checkPermi,
case 1: checkRole,
return '已建'; /** 查询项目列表 */
case 2: getList() {
return '在建'; this.loading = true;
case 3:
return '拟建'; //
default: const params = {
return '未知'; ...this.queryParams,
} begainTime: this.queryParams.dateRange ? this.queryParams.dateRange[0] : undefined,
}, endTime: this.queryParams.dateRange ? this.queryParams.dateRange[1] : undefined
getRegion(ssgnq) { };
return this.ssgnqMap[ssgnq] || '未知区域';
console.log('【查询参数】', params); //
getBasicInformationPage(params).then((response) => {
this.postList = response.data.records;
this.total = response.data.total;
this.loading = false;
}).catch(error => {
console.error('查询失败:', error);
this.loading = false;
});
},
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 详情按钮操作 */
getInfo(row, type) {
this.$store.commit("SET_CRUMBS", this.$route.meta.title + "详情");
const id = row.id || this.ids[0];
this.$router.push({ path: `/manage-info/${id}`, query: { action: type } });
},
}, },
getStatusColor(status) { };
switch (status) {
case '在建':
return 'color: #2DD29F;';
case '拟建':
return 'color: #F08445;';
case '已建':
return 'color: #2B62F1;';
default:
return 'color: #000000;';
}
}
}
}
</script> </script>
<style scoped> <style scoped>
.projectList { .tablebox {
padding: 0 .5rem 0rem 0; background-color: #fff;
height: 15rem; border-radius: .5rem;
overflow-y: auto; margin: .5rem;
}
.tablehead {
display: flex;
justify-content: space-between;
align-items: center;
}
.tablebtntwo {
margin-top: 1rem;
margin-bottom: 1rem;
} }
</style> </style>

@ -12,11 +12,13 @@
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="8">
<el-form-item label="项目建设起止时间"> <el-form-item label="建设起止时间">
<el-date-picker v-model="queryParams.dateRange" type="daterange" format="yyyy-MM-dd" <el-date-picker v-model="queryParams.begainTime" type="date" placeholder="开始日期"
value-format="yyyy-MM-dd" :style="{ width: '100%' }" start-placeholder="开始日期" style="width: 11rem;"></el-date-picker>
end-placeholder="结束日期" range-separator="至" clearable @change="handleQuery"></el-date-picker> ~
<el-date-picker v-model="queryParams.endTime" type="date" placeholder="结束日期"
style="width: 10.5rem;"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
@ -104,7 +106,9 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="getInfo(scope.row, 'fill')" <el-button size="mini" type="text" @click="getInfo(scope.row, 'fill')"
v-if="statusMap[scope.row.status] === '待填报'">填报</el-button> v-if="statusMap[scope.row.status] === '待填报'">填报</el-button>
<el-button size="mini" type="text" @click="getInfo(scope.row, 'detail')">详情</el-button> <el-button size="mini" type="text" @click="getInfo(scope.row, 'detail')"
v-if="statusMap[scope.row.status] !== '待填报'"
>详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -151,7 +155,7 @@ export default {
}, },
xzflMap: { xzflMap: {
1: '已建', 1: '已建',
2: '建', 2: '建',
3: '拟建' 3: '拟建'
}, },
// //

@ -7,21 +7,23 @@
label-width="200"> label-width="200">
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="项目名称" prop="postName" style="width: 100%;"> <el-form-item label="项目名称" style="width: 100%;">
<el-input v-model="queryParams.postName" placeholder="请输入项目名称" clearable <el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="8">
<el-form-item label="项目建设起止时间" prop=""> <el-form-item label="建设起止时间">
<el-date-picker type="daterange" format="yyyy-MM-dd" value-format="yyyy-MM-dd" <el-date-picker v-model="queryParams.startTime" type="date" placeholder="开始日期"
:style="{ width: '100%' }" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 11rem;"></el-date-picker>
range-separator="至" clearable v-model="queryParams.dateRange"></el-date-picker> ~
<el-date-picker v-model="queryParams.endTime" type="date" placeholder="结束日期"
style="width: 10.5rem;"></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.postCode" 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>
@ -94,10 +96,19 @@
</div> </div>
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" stripe> <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" stripe>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="id" /> <el-table-column label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" prop="name" width="200" /> <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="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="xmfrdwxz" 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 }} {{ scope.row.begainTime }} {{ scope.row.endTime }}
@ -149,9 +160,9 @@ export default {
postList: [], postList: [],
// //
statusColors: { statusColors: {
'审核通过': '#6EDABE', '审核通过': '#6EDABE',
'待填报': '#FFBF6B', '待填报': '#FFBF6B',
'待审核': '#7693D8' '待审核': '#7693D8'
}, },
// //
statusMap: { statusMap: {
@ -159,14 +170,20 @@ export default {
2: '待审核', 2: '待审核',
3: '审核通过' 3: '审核通过'
}, },
xzflMap: {
1: '已建',
2: '在建',
3: '拟建'
},
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
postCode: undefined, xzfl: undefined,
postName: undefined, name: undefined,
xmfrdwxz: undefined, xmfrdwxz: undefined,
dateRange: [], dateRange: [],
startTime: undefined,
status: undefined status: undefined
}, },
// //
@ -186,15 +203,51 @@ export default {
checkPermi, checkPermi,
checkRole, checkRole,
/** 查询项目列表 */ /** 查询项目列表 */
/** 查询项目列表 */
getList() { getList() {
this.loading = true; this.loading = true;
getBasicInformationPage(this.queryParams).then((response) => {
//
const params = {
pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize,
...(this.queryParams.name && { name: this.queryParams.name }),
...(this.queryParams.xzfl && { xzfl: this.queryParams.xzfl }),
...(this.queryParams.xmfrdwxz && { xmfrdwxz: this.queryParams.xmfrdwxz }),
...(this.queryParams.status && { status: this.queryParams.status })
};
//
if (this.queryParams.startTime) {
params.startTime = this.formatDate(this.queryParams.startTime);
}
if (this.queryParams.endTime) {
params.endTime = this.formatDate(this.queryParams.endTime);
}
console.log('最终查询参数:', params); //
getBasicInformationPage(params).then((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(() => {
this.loading = false;
}); });
}, },
//
formatDate(date) {
if (!date) return null;
const d = new Date(date);
let month = '' + (d.getMonth() + 1);
let day = '' + d.getDate();
const year = d.getFullYear();
if (month.length < 2) month = '0' + month;
if (day.length < 2) day = '0' + day;
return [year, month, day].join('-');
},
/** 导入按钮操作 */ /** 导入按钮操作 */
handleImport() { handleImport() {
this.upload.open = true; this.upload.open = true;
@ -267,9 +320,19 @@ export default {
this.$router.push({ path: `/manage-info/${id}` }); this.$router.push({ path: `/manage-info/${id}` });
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
/** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.queryParams = {
this.handleQuery(); pageNum: 1,
pageSize: 10,
xzfl: undefined,
name: undefined,
xmfrdwxz: undefined,
startTime: undefined,
endTime: undefined,
status: undefined
};
this.getList();
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */

@ -88,12 +88,12 @@ export default {
form: {}, form: {},
// //
rules: { rules: {
// postName: [ postName: [
// { required: true, message: '', trigger: 'blur' } { required: true, message: '评价要素不能为空', trigger: 'blur' }
// ], ],
// postCode: [ postCode: [
// { required: true, message: '', trigger: 'blur' } { required: true, message: '评分规则不能为空', trigger: 'blur' }
// ] ]
} }
}; };
}, },

@ -9,11 +9,14 @@
<el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="8">
<el-form-item label="项目建设起止时间"> <el-form-item label="建设起止时间">
<el-date-picker type="daterange" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :style="{ width: '100%' }" <el-date-picker v-model="queryParams.begainTime" type="month" placeholder="开始日期" value-format="yyyy-MM"
start-placeholder="开始日期" end-placeholder="结束日期" range-separator="至" clearable style="width: 11rem;" :clearable="true">
v-model="queryParams.dateRange"> </el-date-picker>
~
<el-date-picker v-model="queryParams.endTime" type="month" placeholder="结束日期" value-format="yyyy-MM"
style="width: 10.5rem;" :clearable="true">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -44,7 +47,8 @@
</div> </div>
<!-- 表格内容区 --> <!-- 表格内容区 -->
<div class="tablebox"> <div class="tablebox">
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange"
@sort-change="handleSortChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="id" /> <el-table-column label="序号" align="center" prop="id" />
<el-table-column label="项目名称" align="center" prop="name" /> <el-table-column label="项目名称" align="center" prop="name" />
@ -59,15 +63,16 @@
{{ scope.row.begainTime }} {{ scope.row.endTime }} {{ scope.row.begainTime }} {{ scope.row.endTime }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="项目评价" align="center" width="130"> <el-table-column label="项目评价" align="center" width="130" sortable="custom" prop="pjdj">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.pjdj }} / {{ total }} {{ scope.row.pjdj }} / {{ total }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-view" @click="handleInfo(scope.row)"></el-button> <el-button size="mini" type="text" @click="handleInfo(scope.row, 'detail')">详情</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"></el-button> <el-button size="mini" type="text" style="color: #F25353;" v-if="checkRole(['admin'])"
@click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -141,6 +146,8 @@
<script> <script>
import { getProjectEvaluationList, updateProjectEvaluationList } from '@/api/ManageApi/index.js'; import { getProjectEvaluationList, updateProjectEvaluationList } from '@/api/ManageApi/index.js';
import { checkPermi, checkRole } from "@/utils/permission"; //
export default { export default {
dicts: [ dicts: [
@ -151,7 +158,7 @@ export default {
// //
xzflMap: { xzflMap: {
'1': '已建', '1': '已建',
'2': '建', '2': '建',
'3': '拟建' '3': '拟建'
}, },
postList: [], postList: [],
@ -163,7 +170,9 @@ export default {
name: '', name: '',
dateRange: '', dateRange: '',
xzfl: '', xzfl: '',
pjdj: '' pjdj: '',
begainTime: null,
endTime: null
}, },
showSearch: true, showSearch: true,
dialogVisible: false, dialogVisible: false,
@ -189,6 +198,15 @@ export default {
}; };
}, },
methods: { methods: {
checkPermi,
checkRole,
handleSortChange({ prop, order }) {
if (order === 'ascending') {
this.postList.sort((a, b) => a[prop] - b[prop]);
} else if (order === 'descending') {
this.postList.sort((a, b) => b[prop] - a[prop]);
}
},
handleQuery() { handleQuery() {
this.getList(); this.getList();
}, },
@ -197,7 +215,8 @@ export default {
current: 1, current: 1,
size: 10, size: 10,
name: '', name: '',
dateRange: '', begainTime: '',
endTime: '',
xzfl: '', xzfl: '',
pjdj: '' pjdj: ''
}; };
@ -205,19 +224,25 @@ export default {
}, },
getList() { getList() {
this.loading = true; this.loading = true;
const params = { const params = {
...this.queryParams, current: this.queryParams.current,
begainTime: this.queryParams.dateRange ? this.queryParams.dateRange[0] : undefined, size: this.queryParams.size,
endTime: this.queryParams.dateRange ? this.queryParams.dateRange[1] : undefined ...(this.queryParams.name && { name: this.queryParams.name }),
...(this.queryParams.xzfl && { xzfl: this.queryParams.xzfl }),
...(this.queryParams.pjdj && { pjdj: this.queryParams.pjdj }),
//
...(this.queryParams.begainTime && { begainTime: this.queryParams.begainTime }),
...(this.queryParams.endTime && { endTime: this.queryParams.endTime })
}; };
console.log('最终查询参数:', params); //
getProjectEvaluationList(params) getProjectEvaluationList(params)
.then(response => { .then(response => {
this.postList = response.data.records; this.postList = response.data.records;
this.total = response.data.total; this.total = response.data.total;
}) })
.catch(error => {
console.error('获取项目评价清单失败:', error);
})
.finally(() => { .finally(() => {
this.loading = false; this.loading = false;
}); });
@ -225,12 +250,10 @@ export default {
handleSelectionChange(selection) { handleSelectionChange(selection) {
// //
}, },
handleInfo(row) { handleInfo(row, type) {
this.infoForm = { this.$store.commit("SET_CRUMBS", this.$route.meta.title + "详情");
...row, const id = row.id || this.ids[0];
dateRange: [row.begainTime, row.endTime] this.$router.push({ path: `/manage-info/${id}`, query: { action: type } });
};
this.infoDialogVisible = true;
}, },
handleUpdate(row) { handleUpdate(row) {
this.editForm = { this.editForm = {

@ -4,7 +4,7 @@
</div> </div>
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<img src="@/assets/images/logo@2x.png" alt=""> <img src="@/assets/images/logo@2x.png" alt="">
<div class="title">苏州工业园区工业上楼项目系统</div> <div class="title">苏州工业园区工业上楼管理系统</div>
<div class="logintabs"> <div class="logintabs">
<!-- @tab-click="handleClick" --> <!-- @tab-click="handleClick" -->
<el-tabs <el-tabs

@ -30,71 +30,54 @@
</div> </div>
<!-- 规划信息 --> <!-- 规划信息 -->
<div id="programme"> <div id="programme">
<Programme <Programme :action="action" :planInfo="planInformation"
:action="action" @update-data="handleDataUpdate('planInformation', $event)">
:planInfo="planInformation" @update-data="handleDataUpdate('planInformation', $event)">
</Programme> </Programme>
</div> </div>
<!-- 建筑信息 --> <!-- 建筑信息 -->
<div id="buildings"> <div id="buildings">
<Buildings <Buildings :action="action" :xmId="projectId"></Buildings>
:action="action"
:xmId="projectId"></Buildings>
</div> </div>
<!-- 要素模型信息 --> <!-- 要素模型信息 -->
<div id="models"> <div id="models">
<Models <Models :action="action" :wysmxInfo="wysmxInformations"
:action="action" @updata-data="handleDataUpdate('wysmxInformations', $event)">
:wysmxInfo="wysmxInformations" @updata-data="handleDataUpdate('wysmxInformations', $event)">
</Models> </Models>
</div> </div>
<!-- 月度进展信息 --> <!-- 月度进展信息 -->
<div id="months"> <div id="months">
<Months <Months :action="action"></Months>
:action="action"></Months>
</div> </div>
<!-- 企业入驻信息 --> <!-- 企业入驻信息 -->
<div id="companyenter"> <div id="companyenter">
<Companyenter <Companyenter :id="projectId" :action="action" :qyrzInfo="qyrzInformation"
:id="projectId" @update-data="handleDataUpdate('qyrzInformation', $event)">
:action="action"
:qyrzInfo="qyrzInformation" @update-data="handleDataUpdate('qyrzInformation', $event)">
</Companyenter> </Companyenter>
</div> </div>
<!-- 项目画像 --> <!-- 项目画像 -->
<div id="projectpicture"> <div id="projectpicture">
<Projectpicture <Projectpicture :action="action" :id="projectId"></Projectpicture>
:action="action" :id="projectId"></Projectpicture>
</div> </div>
<!-- 项目图例 --> <!-- 项目图例 -->
<div id="projectpicturetwo"> <div id="projectpicturetwo">
<Projectpicturetwo22 <Projectpicturetwo22 :action="action" :xmId="projectId"> </Projectpicturetwo22>
:action="action"
:xmId="projectId"> </Projectpicturetwo22>
</div> </div>
<!-- 项目巡礼 --> <!-- 项目巡礼 -->
<div id="projectgift"> <div id="projectgift">
<Projectgift <Projectgift :action="action" :xmId="projectId"></Projectgift>
:action="action"
:xmId="projectId"></Projectgift>
</div> </div>
<!-- 现场实况 --> <!-- 现场实况 -->
<div id="liver"> <div id="liver">
<Liver <Liver :action="action"></Liver>
:action="action"
></Liver>
</div> </div>
<!-- 项目备忘录 --> <!-- 项目备忘录 -->
<div id="memo"> <div id="memo">
<Memo <Memo :action="action" :xmId="projectId"></Memo>
:action="action"
:xmId="projectId"></Memo>
</div> </div>
<!-- 其他信息 --> <!-- 其他信息 -->
<div class="bottombox" id="others"> <div class="bottombox" id="others">
<Others <Others :action="action" :xmId="projectId" :anotherInfo="projectOtherInfos"
:action="action" @update-data="handleDataUpdate('projectOtherInfos', $event)">
:anotherInfo="projectOtherInfos" @update-data="handleDataUpdate('projectOtherInfos', $event)">
</Others> </Others>
</div> </div>
<div class="footer"> <div class="footer">
@ -230,7 +213,8 @@ export default {
yczmj: 0 yczmj: 0
}, },
// buildingInformation: [], // buildingInformation: [],
projectRemarks: [] projectRemarks: [],
loading: false,
}; };
}, },
created() { created() {
@ -287,6 +271,7 @@ export default {
}, },
// //
submitAll() { submitAll() {
this.loading = true; //
const submitData = this.prepareSubmitData(); const submitData = this.prepareSubmitData();
// 便 // 便
@ -299,10 +284,14 @@ export default {
this.$message.success('数据提交成功'); this.$message.success('数据提交成功');
this.isContainerVisible = false; this.isContainerVisible = false;
this.isSubmitted = true; this.isSubmitted = true;
this.$router.push('/manage');
}) })
.catch(error => { .catch(error => {
console.error('提交失败:', error); console.error('提交失败:', error);
this.$message.error('数据提交失败'); this.$message.error('数据提交失败');
})
.finally(() => {
this.loading = false;
}); });
}, },
@ -310,9 +299,6 @@ export default {
aduitAll() { aduitAll() {
const submitData = this.prepareSubmitData(); const submitData = this.prepareSubmitData();
// 便
console.log('提交的数据结构:', JSON.stringify(submitData, null, 2));
auditBasicInformation(submitData) auditBasicInformation(submitData)
.then(response => { .then(response => {
console.log('提交成功:', response); console.log('提交成功:', response);
@ -320,10 +306,6 @@ export default {
this.isContainerVisible = false; this.isContainerVisible = false;
this.isSubmitted = true; this.isSubmitted = true;
}) })
.catch(error => {
console.error('提交失败:', error);
this.$message.error('数据提交失败');
});
}, },
// //
@ -407,7 +389,7 @@ export default {
} }
.custom-menu { .custom-menu {
margin: 1rem; margin: 1rem 0rem;
display: flex; display: flex;
gap: 1rem; gap: 1rem;
border: none; border: none;
@ -453,10 +435,10 @@ export default {
#back-to-top { #back-to-top {
position: fixed; position: fixed;
bottom: 5px; bottom: 40%;
right: 5px; right: 5px;
z-index: 99; z-index: 99;
font-size: 18px; font-size: 23px;
} }
.footer { .footer {

@ -1,11 +1,12 @@
<template> <template>
<div> <div>
<!-- 企业端 --> <!-- 企业端 -->
<div v-if="checkRole(['admin', 'company'])"> <div v-if="showCompanySection">
<!-- <div> -->
<qiyeduan /> <qiyeduan />
</div> </div>
<!-- 政务端 --> <!-- 政务端 -->
<div v-if="checkRole(['admin', 'common'])"> <div v-if="checkRole(['common'])">
<zhengwuduan /> <zhengwuduan />
</div> </div>
</div> </div>
@ -21,6 +22,14 @@ export default {
methods: { methods: {
checkPermi, checkPermi,
checkRole checkRole
},
computed: {
showCompanySection() {
const isCompany = this.checkRole(['company']);
const isCommon = this.checkRole(['common']);
//
return isCompany && !isCommon;
}
} }
} }
</script> </script>

@ -11,11 +11,13 @@
@keyup.enter.native="handleQuery" /> @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="8">
<el-form-item label="项目建设起止时间" prop=""> <el-form-item label="建设起止时间">
<el-date-picker type="daterange" format="yyyy-MM-dd" value-format="yyyy-MM-dd" :style="{ width: '100%' }" <el-date-picker v-model="queryParams.begainTime" type="date" placeholder="开始日期"
start-placeholder="开始日期" end-placeholder="结束日期" range-separator="至" clearable style="width: 11rem;"></el-date-picker>
v-model="queryParams.dateRange"></el-date-picker> ~
<el-date-picker v-model="queryParams.endTime" type="date" placeholder="结束日期"
style="width: 10.5rem;"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
@ -139,7 +141,7 @@ export default {
}, },
xzflMap: { xzflMap: {
1: '已建', 1: '已建',
2: '建', 2: '建',
3: '拟建' 3: '拟建'
}, },
// //

@ -1,6 +1,7 @@
<template> <template>
<div> <div>
<div v-if="checkRole(['admin', 'common'])"> <!-- 政务端 -->
<div v-if="checkRole(['common'])">
<div class="headerbox"> <div class="headerbox">
<el-form size="small" :inline="true" label-width="7rem"> <el-form size="small" :inline="true" label-width="7rem">
<el-row style="margin-top: 1rem;"> <el-row style="margin-top: 1rem;">
@ -35,20 +36,18 @@
<div v-for="(element, index) in tableData" :key="index" class="tablebox"> <div v-for="(element, index) in tableData" :key="index" class="tablebox">
<div class="boxheader"> <div class="boxheader">
<div class="headerone"> <div class="headerone">
<!-- 关键要素/重要要素 -->
<div>{{ element.type == 1 ? '关键要素' : '重要要素' }}</div> <div>{{ element.type == 1 ? '关键要素' : '重要要素' }}</div>
<!-- 关键要素/重要要素的名称 -->
<div>{{ element.name }}</div> <div>{{ element.name }}</div>
</div> </div>
<!-- 对要素的类型和名称进行编辑 -->
<div class="headertwo"> <div class="headertwo">
<el-button type="primary" icon="el-icon-edit" size="mini"
@click="handleDeleteElement(element)">删除要素</el-button>
<el-button type="primary" icon="el-icon-edit" size="mini" <el-button type="primary" icon="el-icon-edit" size="mini"
@click="handleUpdate(element)">编辑要素</el-button> @click="handleUpdate(element)">编辑要素</el-button>
<el-button type="primary" icon="el-icon-plus" <el-button type="primary" icon="el-icon-plus"
@click="showAddIndicatorDialog(element)">新增指标</el-button> @click="showAddIndicatorDialog(element)">新增指标</el-button>
</div> </div>
</div> </div>
<!-- 每个要素对应的指标和详细要求的展示这里编辑和删除只是删除这个指标不删除要素 -->
<el-table :data="element.indicators" style="width: 100%"> <el-table :data="element.indicators" style="width: 100%">
<el-table-column label="序号" width="180"> <el-table-column label="序号" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
@ -60,16 +59,16 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" <el-button size="mini" type="text"
@click="handleUpdateIndicator(scope.row)">编辑</el-button> @click="handleUpdateIndicator(element, scope.row)">编辑指标</el-button>
<el-button size="mini" type="text" @click="handleDelete(scope.row)" <el-button size="mini" type="text" @click="handleDelete(element, scope.row)"
style="color: #F25353;">删除</el-button> style="color: #F25353;">删除指标</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
<!-- 这是新增要素/编辑要素弹窗 --> <!-- 新增/编辑要素弹窗 -->
<el-dialog :title="form.id ? '编辑要素' : '新增要素'" :visible.sync="dialogVisible" width="30%"> <el-dialog :title="form.id ? '编辑要素' : '新增要素'" :visible.sync="dialogVisible" width="30%">
<el-form :model="form" label-width="80px"> <el-form :model="form" label-width="80px">
<el-form-item label="类型"> <el-form-item label="类型">
@ -88,7 +87,7 @@
</span> </span>
</el-dialog> </el-dialog>
<!-- 这是新增指标/编辑指标弹窗 --> <!-- 新增/编辑指标弹窗 -->
<el-dialog :title="indicatorForm.id ? '编辑指标' : '新增指标'" :visible.sync="indicatorDialogVisible" width="30%"> <el-dialog :title="indicatorForm.id ? '编辑指标' : '新增指标'" :visible.sync="indicatorDialogVisible" width="30%">
<el-form :model="indicatorForm" label-width="80px"> <el-form :model="indicatorForm" label-width="80px">
<el-form-item label="具体指标"> <el-form-item label="具体指标">
@ -104,8 +103,8 @@
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
<!-- 企业端 -->
<div v-if="checkRole(['admin', 'company'])"> <div v-if="showCompanySection">
<tianbao /> <tianbao />
</div> </div>
</div> </div>
@ -129,13 +128,12 @@ export default {
dialogVisible: false, dialogVisible: false,
indicatorDialogVisible: false, indicatorDialogVisible: false,
form: { form: {
id: 0, id: null,
type: '', type: '',
name: '', name: '',
tableData: [],
}, },
indicatorForm: { indicatorForm: {
id: 0, id: null,
jtzb: '', jtzb: '',
xxyq: '', xxyq: '',
elementId: null elementId: null
@ -149,9 +147,11 @@ export default {
// //
getUserInfo() { getUserInfo() {
const user = this.$store.state.user || {};
return { return {
name: this.$store.state.user?.name || 'admin', name: user.name || 'admin',
userId: this.$store.state.user?.userId || 1 userId: user.userId || 1,
userName: user.userName || 'admin'
}; };
}, },
@ -160,9 +160,9 @@ export default {
getAllElements(this.searchForm).then(response => { getAllElements(this.searchForm).then(response => {
this.tableData = response.data.map(item => ({ this.tableData = response.data.map(item => ({
...item, ...item,
indicators: item.list || [] // listindicators indicators: item.list || []
})); }));
}); })
}, },
// //
@ -177,7 +177,7 @@ export default {
// //
resetForm() { resetForm() {
this.form = { this.form = {
id: 0, id: null,
type: '', type: '',
name: '' name: ''
}; };
@ -186,7 +186,7 @@ export default {
// //
resetIndicatorForm() { resetIndicatorForm() {
this.indicatorForm = { this.indicatorForm = {
id: 0, id: null,
jtzb: '', jtzb: '',
xxyq: '', xxyq: '',
elementId: null elementId: null
@ -198,21 +198,18 @@ export default {
const user = this.getUserInfo(); const user = this.getUserInfo();
const payload = { const payload = {
...this.form, ...this.form,
createBy:'', createBy: user.userName,
createId: 0, createId: user.userId,
updateBy: '', updateBy: user.userName,
updateId: 0 updateId: user.userId
}; };
console.log('提交要素数据格式:', JSON.stringify(payload, null, 2)); const api = this.form.id ? editElemention : addElement;
api(payload).then(response => {
addElement(payload).then(response => { this.$message.success(this.form.id ? '编辑成功' : '新增成功');
this.$message.success('操作成功');
this.dialogVisible = false; this.dialogVisible = false;
this.fetchElements(); this.fetchElements();
}).catch(error => { })
this.$message.error('操作失败');
});
}, },
// //
@ -226,6 +223,20 @@ export default {
this.dialogVisible = true; this.dialogVisible = true;
}, },
//
handleDeleteElement(element) {
this.$confirm('确定删除该要素及其所有指标吗?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteElemention([element.id]).then(() => {
this.$message.success('删除成功');
this.fetchElements();
})
});
},
// //
showAddIndicatorDialog(element) { showAddIndicatorDialog(element) {
this.currentElement = element; this.currentElement = element;
@ -239,38 +250,39 @@ export default {
const user = this.getUserInfo(); const user = this.getUserInfo();
const payload = { const payload = {
...this.indicatorForm, ...this.indicatorForm,
name: this.currentElement.name, name: this.currentElement.name,
type: this.currentElement.type, type: this.currentElement.type,
createBy: '', createBy: user.userName,
createId: 0, createId: user.userId,
updateBy: '', updateBy: user.userName,
updateId: 0 updateId: user.userId
}; };
console.log('提交指标数据格式:', JSON.stringify(payload, null, 2));
// // id
const api = this.indicatorForm.id ? editElemention : addElement; const api = this.indicatorForm.id ? editElemention : addElement;
api(payload).then(response => { api(payload).then(response => {
this.$message.success('操作成功'); this.$message.success(this.indicatorForm.id ? '指标编辑成功' : '指标新增成功');
this.indicatorDialogVisible = false; this.indicatorDialogVisible = false;
this.fetchElements(); this.fetchElements();
}) }).catch(error => {
this.$message.error('操作失败: ' + (error.message || '未知错误'));
});
}, },
// //
handleUpdateIndicator(indicator) { handleUpdateIndicator(element, indicator) {
this.currentElement = element;
this.indicatorForm = { this.indicatorForm = {
...indicator, ...indicator,
elementId: this.currentElement?.id elementId: element.id
}; };
this.indicatorDialogVisible = true; this.indicatorDialogVisible = true;
}, },
// //
handleDelete(indicator) { handleDelete(element, indicator) {
this.$confirm('确定删除该指标吗?', '提示', { this.$confirm('确定删除该指标吗?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
@ -279,11 +291,18 @@ export default {
this.$message.success('删除成功'); this.$message.success('删除成功');
this.fetchElements(); this.fetchElements();
}).catch(error => { }).catch(error => {
this.$message.error('删除失败'); this.$message.error('删除失败: ' + (error.message || error));
}); });
}); });
} }
}, },
computed: {
showCompanySection() {
const isCompany = this.checkRole(['company']);
const isCommon = this.checkRole(['common']);
return isCompany && !isCommon;
}
},
mounted() { mounted() {
this.fetchElements(); this.fetchElements();
} }
@ -323,13 +342,4 @@ export default {
.headertwo { .headertwo {
display: flex; display: flex;
} }
.form-container {
max-width: 1500px;
margin: 20px auto;
padding: 20px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
</style> </style>

@ -28,7 +28,7 @@
<div class="mainarea" style="height: 22rem; overflow: auto;"> <div class="mainarea" style="height: 22rem; overflow: auto;">
<div class="mainareaitem" v-for="(item, index) in postList" :key="index"> <div class="mainareaitem" v-for="(item, index) in postList" :key="index">
<div class="itemleft"> <div class="itemleft">
<div class="xmmctitle">{{ item.name }}</div> <div class="xmmctitle" @click="getInfo(item, 'detail')">{{ item.name }}</div>
<div class="lefttwo"> <div class="lefttwo">
<div>现状分类{{ xzflMap[item.xzfl] }}</div> <div>现状分类{{ xzflMap[item.xzfl] }}</div>
<div>总投资额{{ item.ztze }}</div> <div>总投资额{{ item.ztze }}</div>
@ -85,7 +85,7 @@ export default {
}, },
xzflMap: { xzflMap: {
1: '已建', 1: '已建',
2: '建', 2: '建',
3: '拟建' 3: '拟建'
}, },
// //
@ -96,6 +96,12 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
/** 详情按钮操作 */
getInfo(row, type) {
this.$store.commit("SET_CRUMBS", this.$route.meta.title + "详情");
const id = row.id || this.ids[0];
this.$router.push({ path: `/manage-info/${id}`, query: { action: type } });
},
getStatusClass(status) { getStatusClass(status) {
const statusClasses = { const statusClasses = {
1: 'status-red', // 1: 'status-red', //
@ -238,6 +244,7 @@ export default {
.xmmctitle { .xmmctitle {
color: #2B62F1; color: #2B62F1;
cursor: pointer;
} }
.lefttwo { .lefttwo {

@ -31,13 +31,13 @@ module.exports = {
// webpack-dev-server 相关配置 // webpack-dev-server 相关配置
devServer: { devServer: {
host: '0.0.0.0', host: '0.0.0.0',
public:'192.168.0.119', // public:'192.168.0.119',
port: port, port: port,
open: true, open: true,
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://39.101.188.84:7071/`, target: `http://192.168.0.112:7071/`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save