更改环境和统计分析布局

yfy
严飞永 1 week ago
parent af9b2125d6
commit 920c391d95

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

@ -8,7 +8,7 @@ export function getBasicInformationPage(params) {
params
})
}
//标签管理 查询所有数据
//产业标签 查询所有数据
export function getCybqInformationPage(params) {
return request({
url:'/gysl/Cybq/page',
@ -16,6 +16,13 @@ export function getCybqInformationPage(params) {
params
})
}
//产业标签 通过主键查询单条数据
export function getSpanById(id) {
return request({
url: `/gysl/Cybq/${id}`,
method: "get",
});
}
// 通过主键查询单条所有数据(企业端)
export function getBasicInformationById(id) {

@ -36,3 +36,23 @@ export function deletespan(idList) {
},
});
}
// 月度进展信息修改
export function updateProjectProgress(data) {
return request({
url: "/gysl/projectProgress/edit",
method: "put",
data,
});
}
// 月度进展信息删除
export function deletemonth(idList) {
return request({
url: "/gysl/projectProgress/delete",
method: "delete",
params: {
idList: idList.join(","), // 将数组转换为逗号分隔的字符串
},
});
}

@ -1,24 +1,13 @@
<template>
<div :class="{'has-logo':showLogo}" style="padding: 0 1rem ;">
<div :class="{ 'has-logo': showLogo }" style="padding: 0 1rem ;">
<logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
:collapse="isCollapse"
text-color="#3D424D"
:unique-opened="true"
active-text-color="white"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item
v-for="(route, index) in sidebarRouters"
:key="route.path + index"
:item="route"
:base-path="route.path"
/>
<div>
<el-menu :default-active="activeMenu" :collapse="isCollapse" text-color="#3D424D" :unique-opened="true"
active-text-color="white" :collapse-transition="false" mode="vertical">
<sidebar-item v-for="(route, index) in sidebarRouters" :key="route.path + index" :item="route"
:base-path="route.path" />
</el-menu>
</el-scrollbar>
</div>
</div>
</template>

@ -335,7 +335,6 @@ export default {
checkPermi,
checkRole,
/** 导出 */
/** 导出 */
handleExport() {
this.download(
"/gysl/buildingInformation/export",

@ -6,9 +6,13 @@
<img src="../../../assets/images/detailsicon/1.png" alt="">
<span>月度进展信息</span>
</div>
<div class="topright" style="visibility: hidden;">
<el-button></el-button>
<el-button></el-button>
<div class="topright" v-if="action === 'fill' || !action || action === 'okay'">
<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="handleExport">
<img src="../../../assets/images/detailsicon/icon-dc@2x.png" alt="导出"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
导出
</el-button>
</div>
</div>
<!-- 内容区 -->
@ -22,21 +26,21 @@
<span :style="getStatusColor(scope.row.status)">{{ scope.row.status }}</span>
</template>
</el-table-column>
<el-table-column prop="monthlyInvestment" label="当月完成投资" align="center">
<el-table-column prop="monthDoneAmount" label="当月完成投资" align="center">
<template slot-scope="scope">
<el-input v-if="scope.row.isEditing" v-model.number="scope.row.monthlyInvestment"
<el-input v-if="scope.row.isEditing" v-model.number="scope.row.monthDoneAmount"
style="width: 100%;"></el-input>
<span v-else>{{ scope.row.monthlyInvestment }}</span>
<span v-else>{{ scope.row.monthDoneAmount }}</span>
</template>
</el-table-column>
<el-table-column prop="cumulativeInvestment" label="累计完成投资" align="center">
<el-table-column prop="totalDoneAmount" label="累计完成投资" align="center">
<template slot-scope="scope">
<el-input v-if="scope.row.isEditing" v-model.number="scope.row.cumulativeInvestment"
<el-input v-if="scope.row.isEditing" v-model.number="scope.row.totalDoneAmount"
style="width: 100%;"></el-input>
<span v-else>{{ scope.row.cumulativeInvestment }}</span>
<span v-else>{{ scope.row.totalDoneAmount }}</span>
</template>
</el-table-column>
<el-table-column prop="cumulativeArea" label='截止目前累计建成面积(平方米)' align="center">
<el-table-column prop="cumulativeArea" label='截止目前累计建成面积(平方米)' align="center">
<template slot-scope="scope">
<el-input v-if="scope.row.isEditing" v-model.number="scope.row.cumulativeArea"
style="width: 100%;"></el-input>
@ -49,13 +53,12 @@
<span v-else>{{ scope.row.progressDetails }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.isEditing" type="text" icon="el-icon-check"
<el-button v-if="scope.row.isEditing" type="text" icon="el-icon-check"
@click="handleSave(scope.row)">保存</el-button>
<el-button v-else type="text" icon="el-icon-edit"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button type="text" icon="el-icon-delete" style="color: #F25353;"
<el-button v-else type="text" icon="el-icon-edit" @click="handleEdit(scope.row)"></el-button>
<el-button type="text" icon="el-icon-delete" style="color: #F25353;"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
@ -72,7 +75,11 @@
</template>
<script>
// import { getMonthInformationPage } from "@/api/ManageApi/index";
//
import { getMonthInformationPage } from "@/api/ManageApi/index";
//Apitwo
import { updateProjectProgress, deletemonth } from "@/api/manageApitwo/index";
import { checkPermi, checkRole } from "@/utils/permission";
export default {
props: {
@ -87,13 +94,25 @@ export default {
},
data() {
return {
tableData: [],
tableData: [],
current: 1,
size: 10,
total: 0,
};
},
methods: {
checkPermi,
checkRole,
/** 导出 */
handleExport() {
this.download(
"/gysl/projectProgress/export",
{
xmId: this.xmId
},
`月度信息${new Date().getTime()}.xlsx`
);
},
getStatusColor(status) {
switch (status) {
case "未更新":
@ -101,37 +120,82 @@ export default {
case "已更新":
return "color: #2B62F1;";
default:
return "";
return "";
}
},
handleEdit(row) {
row.originalData = { ...row };
row.isEditing = true;
},
handleSave(row) {
row.isEditing = false;
console.log("保存:", row);
this.$message({
type: "success",
message: "保存成功!",
});
async handleSave(row) {
try {
const updateData = {
id: row.id,
monthDoneAmount: row.monthDoneAmount,
totalDoneAmount: row.totalDoneAmount,
cumulativeArea: row.cumulativeArea,
progressDetails: row.progressDetails,
};
const response = await updateProjectProgress(updateData);
if (response.code === 200) {
this.$message({
type: "success",
message: "更新成功!",
});
row.isEditing = false;
row.status = "已更新";
this.getMonthInformationPage();
} else {
this.$message.error(response.msg || "更新失败");
Object.assign(row, row.originalData);
}
} catch (error) {
console.error("更新失败:", error);
this.$message.error("更新失败");
Object.assign(row, row.originalData);
} finally {
delete row.originalData;
}
},
handleDelete(row) {
this.$confirm("你确定要删除此条记录吗?", "提示", {
this.$confirm("确定要删除此条月度进展记录吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
if (Array.isArray(this.tableData)) {
const index = this.tableData.indexOf(row);
if (index !== -1) {
this.tableData.splice(index, 1);
.then(async () => {
try {
//
const response = await deletemonth([row.id]);
if (response.code === 200) {
this.$message({
type: "success",
message: "删除成功!",
});
//
const index = this.tableData.findIndex(item => item.id === row.id);
if (index !== -1) {
this.tableData.splice(index, 1);
}
//
this.total -= 1;
//
if (this.tableData.length === 0 && this.current > 1) {
this.current -= 1;
this.getMonthInformationPage();
}
} else {
this.$message.error(response.msg || "删除失败");
}
} catch (error) {
console.error("删除失败:", error);
this.$message.error("删除失败,请稍后重试");
}
this.$message({
type: "success",
message: "删除成功!",
});
})
.catch(() => {
this.$message({
@ -140,26 +204,26 @@ export default {
});
});
},
// async getMonthInformationPage() {
// try {
// const response = await getMonthInformationPage({ xmId: this.xmId });
// if (Array.isArray(response.data.records) && response.data.records.length > 0) {
// this.tableData = response.data.records;
// this.total = response.data.total || 0;
// } else {
// //
// this.tableData = [];
// this.total = 0;
// }
// } catch (error) {
// console.error(":", error);
// this.$message.error("");
// }
// },
async getMonthInformationPage() {
try {
const response = await getMonthInformationPage({ xmId: this.xmId });
if (Array.isArray(response.data.records) && response.data.records.length > 0) {
this.tableData = response.data.records;
this.total = response.data.total || 0;
} else {
//
this.tableData = [];
this.total = 0;
}
} catch (error) {
console.error("获取月度进展信息失败:", error);
this.$message.error("获取月度进展信息失败");
}
},
},
created() {
// this.getMonthInformationPage();
this.getMonthInformationPage();
},
};
</script>
@ -174,6 +238,7 @@ export default {
border-radius: 0.5rem 0.5rem 0.5rem 0.5rem;
}
.content {
padding: 1rem;
display: flex;
@ -189,6 +254,7 @@ export default {
.topleft {
width: 8rem;
height: 2rem;
display: flex;
gap: 0.4rem;
align-items: center;
@ -200,16 +266,16 @@ export default {
}
.topleft span {
width: auto;
height: 1rem;
font-family: aliregular;
font-weight: 500;
font-size: 1rem;
color: #3D424C;
line-height: 1rem;
text-align: right;
font-style: normal;
text-transform: none;
width: auto;
height: 1rem;
font-family: aliregular;
font-weight: 500;
font-size: 1rem;
color: #3D424C;
line-height: 1rem;
text-align: right;
font-style: normal;
text-transform: none;
}
.picturediv {

@ -1,11 +1,6 @@
<template>
<!-- 功能区 -->
<div style="width: 100%; height: 100%;">
<div class="itemsall">
<span>{{ functionnumber }}</span>
<span>项目总数</span>
</div>
<div ref="chart" style="width: 30rem; height: 100%;"></div>
<div ref="chart" style="width: 100%; height: 100%;"></div>
</div>
</template>
@ -83,16 +78,43 @@ export default {
}
},
legend: {
orient: 'vertical', //
right: '0%', //
top: 'center', //
itemGap: 10, //
orient: 'vertical',
right: '10%',
top: 'center',
itemGap: 10,
formatter: function (name) {
//
const item = this.chartData.find(item => item.name === name);
return `${name} ${item.value}`;
}.bind(this),
},
graphic: [
{
type: 'text',
left: '29%',
top: '40%',
style: {
text: this.functionnumber.toString(),
textAlign: 'center',
fill: '#292C33',
fontSize: '1.25rem',
fontFamily: 'DINbold',
fontWeight: '500'
}
},
{
type: 'text',
left: '26%',
top: '55%',
style: {
text: '项目总数',
textAlign: 'center',
fill: '#9E9E9E',
fontSize: '0.68rem',
fontFamily: 'alibold',
fontWeight: '400'
}
}
],
series: [
{
name: '项目分布',
@ -101,7 +123,7 @@ export default {
center: ['30%', '50%'],
data: this.chartData,
label: {
show: false //
show: false
},
emphasis: {
itemStyle: {
@ -121,33 +143,5 @@ export default {
</script>
<style scoped>
.itemsall {
position: absolute;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
top: 35%;
left: 23%;
}
.itemsall span:nth-child(1) {
font-family: DINbold;
font-weight: 500;
font-size: 1.25rem;
color: #292C33;
text-align: left;
font-style: normal;
text-transform: none;
}
.itemsall span:nth-child(2) {
font-family: alibold;
font-weight: 400;
font-size: 0.68rem;
color: #9E9E9E;
text-align: left;
font-style: normal;
text-transform: none;
}
</style>

@ -1,11 +1,6 @@
<template>
<!-- 投资主体 -->
<div style="width: 100%; height: 100%;">
<div class="itemsall">
<span>{{ functionnumber }}</span>
<span>项目总数</span>
</div>
<div ref="chart" style="width: 30rem; height: 100%;"></div>
<div ref="chart" style="width: 100%; height: 100%;"></div>
</div>
</template>
@ -58,10 +53,13 @@ export default {
processData(data) {
const names = ['国企', '民企', '外企', '其他'];
const counts = data.map(item => item.count);
const total = counts.reduce((sum, count) => sum + count, 0);
return names.map((name, index) => ({
value: counts[index] || 0,
name: name,
itemStyle: { color: ['#36C3FB', '#5B76F9', '#FAC858', '#50DFB3'][index] },
percent: total > 0 ? ((counts[index] || 0) / total * 100).toFixed(2) : '0.00'
}));
},
renderChart() {
@ -69,11 +67,12 @@ export default {
const myChart = echarts.init(chartDom);
const option = {
tooltip: {
trigger: 'item'
trigger: 'item',
formatter: ({name, value, percent}) => `${name}: ${value}个 (${percent}%)`
},
legend: {
orient: 'vertical',
right: '18.5%',
right: '27.7%',
top: 'center',
itemGap: 18,
formatter: function (name) {
@ -81,6 +80,34 @@ export default {
return `${name} ${item.value}`;
}.bind(this)
},
graphic: [
{
type: 'text',
left: '29%',
top: '40%',
style: {
text: this.functionnumber.toString(),
textAlign: 'center',
fill: '#292C33',
fontSize: 20,
fontFamily: 'DINbold',
fontWeight: '500'
}
},
{
type: 'text',
left: '26%',
top: '55%',
style: {
text: '项目总数',
textAlign: 'center',
fill: '#9E9E9E',
fontSize: '0.68rem',
fontFamily: 'alibold',
fontWeight: '400'
}
}
],
series: [
{
name: '项目分布',
@ -109,33 +136,4 @@ export default {
</script>
<style scoped>
.itemsall {
position: absolute;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
top: 35%;
left: 23%;
}
.itemsall span:nth-child(1) {
font-family: DINbold;
font-weight: 500;
font-size: 1.25rem;
color: #292C33;
text-align: left;
font-style: normal;
text-transform: none;
}
.itemsall span:nth-child(2) {
font-family: alibold;
font-weight: 400;
font-size: 0.68rem;
color: #9E9E9E;
text-align: left;
font-style: normal;
text-transform: none;
}
</style>

@ -67,8 +67,8 @@ export default {
codeUrl: '',
activeName: 'second',
loginForm: {
username: 'admin',
password: 'admin123',
username: '',
password: '',
rememberMe: false,
code: '',
uuid: '',

@ -34,9 +34,8 @@
<el-row>
<el-col :span="8">
<el-form-item>
<el-button type="primary" icon="el-icon-search"
@click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery"></el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-col>
</el-row>
@ -57,9 +56,9 @@
<el-table-column label="用户类型" align="center" width="130" prop="yhlx" />
<el-table-column label="标签注释" align="center" width="180" prop="bqzs" />
<el-table-column label="标签状态" align="center" prop="bqzt" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button type="text" @click="getAdd(scope.row, 'detail')">详情</el-button>
<el-button type="text" @click="getAdd(scope.row, 'detail')">详情</el-button>
</template>
</el-table-column>
</el-table>
@ -99,12 +98,12 @@
<el-row>
<el-col :span="12">
<el-form-item label="标签值编码:">
<span>{{ detailData.yhlx }}</span>
<span>{{ detailData.bqzbm }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="有效状态:">
<span>{{ detailData.bqzs }}</span>
<span>{{ detailData.state }}</span>
</el-form-item>
</el-col>
</el-row>
@ -112,12 +111,12 @@
<el-row>
<el-col :span="12">
<el-form-item label="标签注释:">
<span>{{ detailData.bqzt }}</span>
<span>{{ detailData.bqzs }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="用户类型:">
<span>{{ detailData.bqzs }}</span>
<span>{{ detailData.yhlx }}</span>
</el-form-item>
</el-col>
</el-row>
@ -130,7 +129,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="标签标记单位:">
<span>{{ detailData.bqzs }}</span>
<span>{{ detailData.bqbjdw }}</span>
</el-form-item>
</el-col>
</el-row>
@ -143,12 +142,10 @@
</el-col>
<el-col :span="12">
<el-form-item label="数据来源名称:">
<span>{{ detailData.bqzs }}</span>
<span>{{ detailData.sjlymc }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">关闭</el-button>
@ -158,7 +155,7 @@
</template>
<script>
import { getCybqInformationPage } from "@/api/ManageApi/index";
import { getCybqInformationPage, getSpanById } from "@/api/ManageApi/index";
import { checkPermi, checkRole } from "@/utils/permission";
export default {
@ -191,19 +188,6 @@ export default {
endTime: undefined,
status: undefined,
},
//
defaultData: [
{
id: 0,
name: '默认企业名称',
tyshxydm: '123456789012345678',
bqdm: 'DEFAULT',
state: '有效',
yhlx: '企业用户',
bqzs: '默认标签注释',
bqzt: '默认标签状态'
}
],
//
dialogVisible: false,
//
@ -222,7 +206,6 @@ export default {
//api
getCybqInformationPage(this.queryParams).then((response) => {
//
this.postList = [...response.data.records];
this.total = response.data.total;
this.loading = false;
@ -237,9 +220,17 @@ export default {
},
/** 详情按钮操作 */
getAdd(row, type) {
this.detailData = row;
this.dialogVisible = true;
/** 详情按钮操作 */
getAdd(row) {
this.loading = true;
getSpanById(row.id).then((response) => {
this.detailData = response.data;
this.dialogVisible = true;
this.loading = false;
}).catch((error) => {
this.$message.error("获取详情失败:" + error.message);
this.loading = false;
});
},
/** 重置按钮操作 */
resetQuery() {

@ -107,7 +107,7 @@ export default {
methods: {
handleYearChange(years) {
this.years = years;
console.log("index.vue: handleYearChange called with years:", years); //
console.log("index.vue: handleYearChange called with years:", years);
},
async getData() {
const response = await investall();
@ -153,13 +153,14 @@ export default {
display: flex;
flex: 1;
gap: 0.5rem;
}
.dashboard-rowtwo {
display: flex;
flex: 3;
gap: 0.5rem;
flex-wrap: nowrap;
}
.dashboard-col {
@ -254,21 +255,5 @@ export default {
padding: 0 !important;
}
/* Responsive adjustments */
@media (max-width: 1200px) {
.dashboard-row {
flex-direction: column;
}
.dashboard-col.wide,
.dashboard-col.narrow {
flex: 1;
}
.itemsall {
top: 2rem;
left: 50%;
transform: translateX(-50%);
}
}
</style>

@ -410,7 +410,7 @@ export default {
}
.left-scrollbar .el-scrollbar__wrap {
box-sizing: border-box;
overflow-x: hidden !important;
overflow: hidden !important;
margin-bottom: 0 !important;
}
.center-tabs{
@ -483,7 +483,7 @@ export default {
}
.left-scrollbar .el-scrollbar__view{
overflow-x: hidden;
overflow: hidden;
}
.el-rate{

@ -27,7 +27,7 @@ module.exports = {
// 默认情况下Vue CLI 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。
// 例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
publicPath: process.env.NODE_ENV === "production" ? "/demo/Gyyq-Upstairs" : "/",
publicPath: process.env.NODE_ENV === "production" ? "" : "/",
// 在npm run build 或 yarn build 时 生成文件的目录名称要和baseUrl的生产环境路径一致默认dist
outputDir: 'dist',
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
@ -47,7 +47,7 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://192.168.0.110:7071/`,
target: `http://39.101.188.84:7071/`,
// target: `http://39.101.188.84:7071/`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save