正式环境

main
严飞永 4 weeks ago
parent 2302cedee6
commit 658e3f9b60

@ -10,7 +10,7 @@ ENV = 'production'
# VUE_APP_BASE_API = 'http://114.216.202.175:8008'
# 公司测试环境
VUE_APP_BASE_API = 'http://39.101.188.84:7071'
# VUE_APP_BASE_API = 'http://39.101.188.84:7071'
# 正式环境
# VUE_APP_BASE_API = '/api'
VUE_APP_BASE_API = '/api'

@ -8,7 +8,7 @@
</div>
<div class="right-menu">
<!-- <bearicon /> -->
<!-- <div class="avatar-container right-menu-item hover-effect" style="display: flex;">
<div class="avatar-container right-menu-item hover-effect" style="display: flex;">
<div class="avatar-wrapper">
<div v-if="checkRole(['common','gov'])">
<span>{{ name }}</span>
@ -21,8 +21,8 @@
<router-link to="/user/profile" style="margin-left: 10px;margin-top: 1px;" v-if="checkRole(['admin'])">
<i class="el-icon-user-solid"></i>
</router-link>
</div> -->
<el-dropdown
</div>
<!-- <el-dropdown
class="avatar-container right-menu-item hover-effect"
trigger="click"
>
@ -37,14 +37,11 @@
<router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item>
</router-link>
<!-- <el-dropdown-item @click.native="setting = true">
<span>布局设置</span>
</el-dropdown-item> -->
<el-dropdown-item divided @click.native="logout">
<span>退出登录</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown> -->
</div>
</div>
</template>
@ -66,7 +63,7 @@ export default {
return {
username: "",
messages: [],
counts: 0, //
counts: 0,
};
},
computed: {

@ -13,7 +13,7 @@ import { governmentGetInfo } from "@/api/login/index";
NProgress.configure({ showSpinner: false });
const whiteList = ["/login", "/entLogin", "/register"]; // 白名单路径
const whiteList = ["/login", "/entLogin", "/register"];
const isWhiteList = (path) => {
return whiteList.some((pattern) => isPathMatch(pattern, path));
@ -25,14 +25,15 @@ router.beforeEach((to, from, next) => {
}
NProgress.start();
const search = window.location.search || window.location.hash.split("?")[1] || "";
const search =
window.location.search || window.location.hash.split("?")[1] || "";
const params = new URLSearchParams(search);
const userToken = params.get("userToken");
const signature = params.get("signature");
const timespan = params.get("timespan");
// =============================
// 🔑 新增:处理 clienttoken 登录逻辑
// 🔑 新增:处理 clienttoken 登录企业单点登录逻辑
// =============================
if (window.location.href.includes("clienttoken=")) {
const reg = /[?&]clienttoken=([^&#]+)/;
@ -41,21 +42,27 @@ router.beforeEach((to, from, next) => {
if (clienttoken) {
// 清除 clienttoken 避免死循环
let modifiedUrl = window.location.href.replace(/[?&]clienttoken=[^&#]+/, '');
if (modifiedUrl.endsWith('?') || modifiedUrl.endsWith('&')) {
modifiedUrl = modifiedUrl.slice(0, -1); // 去掉末尾多余的符号
let modifiedUrl = window.location.href.replace(
/[?&]clienttoken=[^&#]+/,
""
);
if (modifiedUrl.endsWith("?") || modifiedUrl.endsWith("&")) {
modifiedUrl = modifiedUrl.slice(0, -1);
}
// 如果 roles 还未加载,则拉取用户信息
if (store.getters.roles.length === 0) {
isRelogin.show = true;
store.dispatch("SingleSignOnGetInfo", { clientToken: clienttoken })
store
.dispatch("SingleSignOnGetInfo", { clientToken: clienttoken })
.then(() => {
isRelogin.show = false;
console.log("✅ 单点登录成功");
console.log("当前 token:", getToken());
console.log("当前角色:", store.getters.roles);
// 清除 URL 中的 clienttoken 并刷新页面
window.history.replaceState({}, '', modifiedUrl);
window.history.replaceState({}, "", modifiedUrl);
// 获取用户权限并生成路由
return store.dispatch("GenerateRoutes");
@ -67,12 +74,13 @@ router.beforeEach((to, from, next) => {
.catch((err) => {
// console.error("单点登录失败:", err);
store.dispatch("LogOut").then(() => {
// Message.error("单点登录失败,请重试");
window.location.href = "https://qytt.sipac.gov.cn/ecobrainportal/index.html";
Message.error("单点登录失败,请重试");
// window.location.href =
// "https://qytt.sipac.gov.cn/ecobrainportal/index.html";
});
});
return;
return;
}
}
}
@ -85,7 +93,7 @@ router.beforeEach((to, from, next) => {
return;
}
if (userToken && signature && timespan && to.path !== "/login") {
if (userToken && signature && timespan && !isPathMatch("/login", to.path)) {
next({
path: "/login",
query: { userToken, signature, timespan },
@ -150,22 +158,26 @@ router.beforeEach((to, from, next) => {
// =============================
// 🔐 原始本地登录逻辑
// =============================
const token = getToken();
if (token) {
if (getToken()) {
to.meta.title && store.dispatch("settings/setTitle", to.meta.title);
if (to.path === "/login") {
/* has token*/
if (to.path === "/entLogin") {
next({ path: "/" });
NProgress.done();
} else if (isWhiteList(to.path)) {
next();
} else if (whiteList.indexOf(to.path) !== -1) {
next({ path: "/" });
NProgress.done();
// next();
} else {
if (store.getters.roles.length === 0) {
isRelogin.show = true;
// 判断当前用户是否已拉取完user_info信息
store
.dispatch("GetInfo")
.then(() => {
isRelogin.show = false;
store.dispatch("GenerateRoutes").then((accessRoutes) => {
// 根据roles权限生成可访问的路由表
router.addRoutes(accessRoutes);
next({ ...to, replace: true });
});
@ -173,7 +185,7 @@ router.beforeEach((to, from, next) => {
.catch((err) => {
store.dispatch("LogOut").then(() => {
Message.error(err);
next("/");
next({ path: "/" });
});
});
} else {
@ -181,14 +193,16 @@ router.beforeEach((to, from, next) => {
}
}
} else {
if (isWhiteList(to.path)) {
// 没有token
if (whiteList.indexOf(to.path) !== -1) {
// 在免登录白名单,直接进入
next();
} else {
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`);
next(`/entLogin?redirect=${encodeURIComponent(to.fullPath)}`);
NProgress.done();
}
}
});
router.afterEach(() => {
NProgress.done();
});
});

@ -44,9 +44,14 @@ export const constantRoutes = [
{
path: "/login",
// 正式环境登录页
// component: () => import("@/views/login"),
component: () => import("@/views/login"),
// 测试
component: () => import("@/views/login_v1"),
// component: () => import("@/views/login_v1"),
hidden: true,
},
{
path: "/entLogin",
component: () => import("@/views/entLogin"),
hidden: true,
},
{

@ -54,31 +54,189 @@
<div class="content">
<div class="picturediv">
<!-- 图片展示 -->
<img
v-if="basicInfo.fj"
:src="baseUrl + basicInfo.fj"
alt="项目代表性照片"
/>
<el-carousel :autoplay="false" height="26rem">
<el-carousel-item v-for="(url, index) in carouselImages" :key="index">
<img
:src="url"
alt="项目图片"
style="
width: 100%;
height: 100%;
object-fit: contain;
object-position: center;
"
/>
</el-carousel-item>
</el-carousel>
</div>
<div class="descriptionsdiv">
<el-descriptions class="margin-top" :column="3" border>
<el-descriptions-item
v-for="(item, index) in descriptions"
:key="index"
:span="
item.label === '项目法人单位简介' || item.label === '所属细分产业'
? 3
: 1
"
>
<el-descriptions-item>
<template slot="label">
<span v-if="item.required" style="color: red; margin-right: 4px"
>*</span
>
{{ item.label }}
<span style="color: red">*</span> 项目名称
</template>
{{ basicInfo.name }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 项目法人单位
</template>
{{ basicInfo.xmfrdwxz }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 项目法人单位性质
</template>
<dict-tag :options="dict.type.xmfrdwxz" :value="basicInfo.nature" />
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 施工单位
</template>
{{ basicInfo.sgdw }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 设计单位
</template>
{{ basicInfo.sjdw }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 总投资额万元
</template>
{{ basicInfo.ztze }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 所属功能区
</template>
<dict-tag :options="dict.type.ssgnq" :value="basicInfo.ssgnq" />
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 建设起止时间
</template>
{{ basicInfo.begainTime }} {{ basicInfo.endTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 现状分类
</template>
<dict-tag :options="dict.type.xzfl" :value="basicInfo.xzfl" />
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 建设地点
</template>
{{ basicInfo.jsdd }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 重点发展产业
</template>
{{ basicInfo.prioritize }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 建设模式
</template>
<dict-tag :options="dict.type.jsms" :value="basicInfo.jsms" />
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 项目标签
</template>
{{ basicInfo.label }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 项目负责人
</template>
{{ basicInfo.projectLeader }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 联系方式
</template>
{{ basicInfo.phone }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 施工许可证发放时间
</template>
{{ basicInfo.issuingTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 竣工验收时间
</template>
{{ basicInfo.acceptanceTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 建设进度
</template>
{{ basicInfo.jsjd }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 统一社会信用代码
</template>
{{ basicInfo.tyshxydm }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 计划投资额(亿元)
</template>
{{ basicInfo.jhtze }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span> 所属产业目录
</template>
<dict-tag :options="dict.type.shangloumulu" :value="basicInfo.ml" />
</el-descriptions-item>
<el-descriptions-item :span="3">
<template slot="label">
<span style="color: red">*</span> 所属细分产业
</template>
<dict-tag :options="dict.type.bqlx" :value="basicInfo.xfcy" />
</el-descriptions-item>
<el-descriptions-item :span="3">
<template slot="label">
<span style="color: red">*</span> 项目法人单位简介
</template>
{{ basicInfo.unitIntroduction }}
</el-descriptions-item>
{{ item.value }}
<el-descriptions-item :span="3">
<template slot="label">
<span style="color: red">*</span> 项目简介
</template>
{{ basicInfo.introduction }}
</el-descriptions-item>
</el-descriptions>
</div>
@ -409,7 +567,7 @@
placeholder="请输入项目简介"
></el-input>
</el-form-item>
<el-form-item label="项目代表性照片">
<el-form-item label="项目代表性照片" prop="fj">
<ImageUpload v-model="form.fj" />
</el-form-item>
</el-form>
@ -465,19 +623,6 @@ export default {
},
data() {
return {
requiredFields: [
"项目名称",
"项目法人单位",
"项目法人单位性质",
"建设模式",
"项目负责人",
"总投资额(万元)",
"联系方式",
"所属功能区",
"建设起止时间",
"现状分类",
"统一社会信用代码",
],
baseUrl: process.env.VUE_APP_BASE_API,
descriptions: [],
dialogImageUrl: "",
@ -529,6 +674,12 @@ export default {
trigger: "change",
},
],
sgdw: [
{ required: true, message: "施工单位不能为空", trigger: "blur" },
],
sjdw: [
{ required: true, message: "设计单位不能为空", trigger: "blur" },
],
ztze: [
{ required: true, message: "总投资额不能为空", trigger: "blur" },
{ type: "number", message: "总投资额必须是数字", trigger: "blur" },
@ -553,9 +704,18 @@ export default {
xzfl: [
{ required: true, message: "现状分类不能为空", trigger: "change" },
],
jsdd: [
{ required: true, message: "建设地点不能为空", trigger: "blur" },
],
prioritize: [
{ required: true, message: "重点发展产业不能为空", trigger: "blur" },
],
jsms: [
{ required: true, message: "建设模式不能为空", trigger: "change" },
],
label: [
{ required: true, message: "项目标签不能为空", trigger: "blur" },
],
projectLeader: [
{ required: true, message: "项目负责人不能为空", trigger: "blur" },
],
@ -567,8 +727,55 @@ export default {
trigger: "blur",
},
],
issuingTime: [
{
required: true,
message: "施工许可证发放时间不能为空",
trigger: "blur",
},
],
acceptanceTime: [
{ required: true, message: "竣工验收时间不能为空", trigger: "blur" },
],
jsjd: [
{ required: true, message: "建设进度不能为空", trigger: "blur" },
],
tyshxydm: [
{
required: true,
message: "统一社会信用代码不能为空",
trigger: "blur",
},
{
pattern: /^[a-zA-Z0-9]{18}$/,
message: "请输入正确格式的18位统一社会信用代码",
trigger: "blur",
},
],
jhtze: [
{
required: true,
message: "计划投资额(亿元)不能为空",
trigger: "blur",
},
],
ml: [
{
required: true,
message: "所属产业目录不能为空",
trigger: "change",
},
],
xfcy: [
{
required: true,
message: "所属细分产业不能为空",
trigger: "change",
},
],
unitIntroduction: [
{
required: true,
max: 1000,
message: "项目法人单位简介长度不能超过1000个字",
trigger: "blur",
@ -576,61 +783,48 @@ export default {
],
introduction: [
{
required: true,
max: 1000,
message: "项目简介长度不能超过1000个字",
trigger: "blur",
},
],
tyshxydm: [
{ required: true, message: "请填写", trigger: "blur" },
fj: [
{
pattern: /^[a-zA-Z0-9]{18}$/,
message: "请输入正确格式的18位统一社会信用代码",
trigger: "blur",
required: true,
message: "请上传至少一张项目代表性照片",
trigger: "change",
},
{
validator: (rule, value, callback) => {
if (
!value ||
value.split(",").filter((url) => url.trim() !== "").length === 0
) {
callback(new Error("请上传至少一张项目代表性照片"));
} else {
callback();
}
},
trigger: "change",
},
],
},
// select
ssgnqMap: {
1: "高端制造与国际贸易区",
2: "独墅湖科教创新区",
3: "阳澄湖半岛旅游度假区",
4: "金鸡湖商务区",
5: "苏相合作区",
},
xmfrdwxzMap: {
1: "国企",
2: "外资企业",
3: "民营企业",
4: "其他",
},
jsmsMap: {
1: "工地实施",
2: "利用存量用地改扩建",
},
xzflMap: {
1: "已建",
2: "在建",
3: "拟建",
},
mlMap: {
1: "重点鼓励上楼",
2: "有条件上楼",
},
xfMap: {
1: "新一代信息技术",
2: "高端装备制造",
3: "生物医药及大健康",
4: "纳米技术应用及新材料",
5: "人工智能及数字产业",
6: "新能源及绿色产业",
},
};
},
watch: {
basicInfo: {
handler(newVal) {
this.descriptions = this.formatDescriptions(newVal);
//
if (newVal.fj) {
this.carouselImages = newVal.fj
.split(",")
.map((url) => this.baseUrl + url.trim());
} else {
this.carouselImages = [];
}
//
this.form = {
...newVal,
begainTime: newVal.begainTime ? new Date(newVal.begainTime) : "",
@ -651,7 +845,7 @@ export default {
this.form.latitude = location.lat; //
this.mapDialogVisible = false; //
},
/** 导出按钮操作 */
/* 导出按钮操作 */
handleExport() {
this.download(
"/gysl/basicInformation/export",
@ -661,47 +855,6 @@ export default {
`基本信息导出${new Date().getTime()}.xlsx`
);
},
//
formatDescriptions(data) {
const requiredFields = this.requiredFields;
return [
{ label: "项目名称", value: data.name },
{ label: "项目法人单位", value: data.xmfrdwxz },
{
label: "项目法人单位性质",
value: this.xmfrdwxzMap[data.nature] || "",
},
{ label: "施工单位", value: data.sgdw },
{ label: "设计单位", value: data.sjdw },
{ label: "总投资额(万元)", value: data.ztze },
{ label: "所属功能区", value: this.ssgnqMap[data.ssgnq] || "" },
{
label: "建设起止时间",
value: `${data.begainTime ? data.begainTime : ""}${
data.endTime ? data.endTime : ""
}`,
},
{ label: "现状分类", value: this.xzflMap[data.xzfl] || "" },
{ label: "建设地点", value: data.jsdd },
{ label: "重点发展产业", value: data.prioritize },
{ label: "建设模式", value: this.jsmsMap[data.jsms] || "" },
{ label: "项目标签", value: data.label },
{ label: "项目负责人", value: data.projectLeader },
{ label: "联系方式", value: data.phone },
{ label: "施工许可证发放时间", value: data.issuingTime },
{ label: "竣工验收时间", value: data.acceptanceTime },
{ label: "建设进度", value: data.jsjd },
{ label: "统一社会信用代码", value: data.tyshxydm },
{ label: "计划投资额(亿元)", value: data.jhtze },
{ label: "所属产业目录", value: this.mlMap[data.ml] || "" },
{ label: "所属细分产业", value: this.xfMap[data.xfcy] || "" },
{ label: "项目法人单位简介", value: data.unitIntroduction },
{ label: "项目简介", value: data.introduction },
].map((item) => ({
...item,
required: requiredFields.includes(item.label),
}));
},
//
edit() {
this.dialogVisible = true;
@ -741,7 +894,7 @@ export default {
return {
...formData,
begainTime: formatDate(formData.begainTime), // begainTime
endTime: formatDate(formData.endTime),
endTime: formatDate(formData.endTime),
createBy: "",
createId: 0,
createTime: "",
@ -840,8 +993,8 @@ export default {
}
.picturediv {
width: 18.31rem;
height: 25rem;
width: 24.4rem;
height: 26rem;
position: relative;
overflow: hidden;
}
@ -859,7 +1012,7 @@ export default {
}
.descriptionsdiv {
width: calc(100% - 18.31rem);
width: calc(100% - 25rem);
margin-left: 1rem;
height: auto;
}

@ -18,7 +18,8 @@
style="
border: none;
background-color: rgba(43, 98, 241, 0.1);
color: #2b62f1;"
color: #2b62f1;
"
@click="addBuildingTag"
>
<img
@ -130,70 +131,113 @@
<el-descriptions class="margin-top" :column="4" border>
<el-descriptions-item>
<template slot="label">
<span style="color: red;">*</span>
是否为重要楼栋</template>
<span style="color: red">*</span>是否为重要楼栋
</template>
{{ getTextForBoolean(selectedBuilding.sfwzyld) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red;">*</span>层数</template>
<span style="color: red">*</span>层数
</template>
{{ selectedBuilding.floor }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red;">*</span>总建筑高度</template>
<span style="color: red">*</span>总建筑高度
</template>
{{ selectedBuilding.totalBuildingHeight }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red;">*</span>首层高度平方米</template>
<template slot="label">
<span style="color: red">*</span>首层高度
</template>
{{ selectedBuilding.scgd }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">2至4层层高</template>
<template slot="label">
<span style="color: red">*</span>2至4层层高
</template>
{{ selectedBuilding.twoAndFourCg }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">4层以上层高()</template>
<template slot="label">
<span style="color: red">*</span>4层以上层高()
</template>
{{ selectedBuilding.fourYscg }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red;">*</span>首层地面荷载(/)</template>
<template slot="label">
<span style="color: red">*</span>首层地面荷载(/平方米)
</template>
{{ selectedBuilding.scdmhz }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">二至三层楼面荷载(/平方米)</template>
<template slot="label">
<span style="color: red">*</span>二至三层楼面荷载(/平方米)
</template>
{{ selectedBuilding.twoAndThreeLmhz }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red;">*</span>标准层面积(千平方米)</template>
<template slot="label">
<span style="color: red">*</span>标准层面积(千平方米)
</template>
{{ selectedBuilding.bzcmj }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">柱距</template>
<template slot="label">
<span style="color: red">*</span>柱距
</template>
{{ selectedBuilding.zj }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">是否有吊装口</template>
<template slot="label">
<span style="color: red">*</span>是否有吊装口
</template>
{{ getTextForBoolean(selectedBuilding.sfydzk) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">是否有汽车盘道</template>
<template slot="label">
<span style="color: red">*</span>是否有汽车盘道
</template>
{{ getTextForBoolean(selectedBuilding.sfyqcpd) }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">四层及以上楼面荷载(/平方米)</template>
<template slot="label">
<span style="color: red">*</span>四层及以上楼面荷载(/平方米)
</template>
{{ selectedBuilding.fourYslmhz }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 地基基础等级</template>
<template slot="label">
<span style="color: red">*</span>地基基础等级
</template>
{{ selectedBuilding.djjcdj }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 吊车情况</template>
<template slot="label">
<span style="color: red">*</span>吊车情况
</template>
{{ selectedBuilding.dcqk }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 货梯情况</template>
<template slot="label">
<span style="color: red">*</span>货梯情况
</template>
{{ selectedBuilding.htqk }}
</el-descriptions-item>
</el-descriptions>
@ -275,7 +319,7 @@
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="2至4层层高" porp="twoAndFourCg">
<el-form-item label="2至4层层高" prop="twoAndFourCg">
<el-input
v-model="buildingForm.twoAndFourCg"
placeholder="请输入2至4层层高"
@ -547,6 +591,14 @@ export default {
trigger: "blur",
},
],
fourYscg: [
{
required: true,
message: "请输入4层以上层高",
trigger: "blur",
},
],
zj: [{ required: true, message: "请输入柱距", trigger: "blur" }],
scdmhz: [
{
required: true,
@ -554,6 +606,13 @@ export default {
trigger: "blur",
},
],
twoAndThreeLmhz: [
{
required: true,
message: "请输入二至三层楼面荷载(吨/平方米)",
trigger: "blur",
},
],
bzcmj: [
{
required: true,
@ -561,6 +620,28 @@ export default {
trigger: "blur",
},
],
sfydzk: [
{ required: true, message: "请选择是否有吊装口", trigger: "change" },
],
sfyqcpd: [
{
required: true,
message: "请选择是否有汽车盘道",
trigger: "change",
},
],
fourYslmhz: [
{
required: true,
message: "请输入四层及以上楼面荷载(吨/平方米)",
trigger: "blur",
},
],
djjcdj: [
{ required: true, message: "请输入地基基础等级", trigger: "blur" },
],
dcqk: [{ required: true, message: "请输入吊车情况", trigger: "blur" }],
htqk: [{ required: true, message: "请输入货梯情况", trigger: "blur" }],
},
};
},

@ -128,7 +128,7 @@
<span v-else>{{ scope.row.jyfw }}</span>
</template>
</el-table-column>
<el-table-column prop="zzjgdm" label='组织机构代码'>
<!-- <el-table-column prop="zzjgdm" label='组织机构代码'>
<template slot-scope="scope">
<el-input v-if="scope.row.isEditing" v-model.number="scope.row.zzjgdm"></el-input>
<span v-else>{{ scope.row.zzjgdm }}</span>
@ -139,7 +139,7 @@
<el-input v-if="scope.row.isEditing" v-model.number="scope.row.swdjhm"></el-input>
<span v-else>{{ scope.row.swdjhm }}</span>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.isEditing" size="medium" type="text" icon="el-icon-check"

@ -3,28 +3,70 @@
<!-- 顶部信息 -->
<div class="containertop">
<div class="topleft">
<img src="@/assets/images/detailsicon/1.png" alt="">
<img src="@/assets/images/detailsicon/1.png" alt="" />
<span>其他信息</span>
</div>
<div class="topright" v-if="action === 'fill' || !action || action === 'okay'">
<el-button type="primary" size="medium" plain v-if="checkRole(['admin', 'common','gov'])"
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="新增"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
<div
class="topright"
v-if="action === 'fill' || !action || action === 'okay'"
>
<el-button
type="primary"
size="medium"
plain
v-if="checkRole(['admin', 'common', 'gov'])"
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="新增"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px"
/>
新增
</el-button>
<el-button type="primary" size="medium" plain v-if="action === 'fill' || !action || action === 'okay'"
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="toggleEditMode"
:loading="saveLoading">
<img src="@/assets/images/detailsicon/icon-bj@2x.png" alt="编辑"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
{{ isEditMode ? '保存' : '编辑' }}
<el-button
type="primary"
size="medium"
plain
v-if="action === 'fill' || !action || action === 'okay'"
style="
border: none;
background-color: rgba(43, 98, 241, 0.1);
color: #2b62f1;
"
@click="toggleEditMode"
:loading="saveLoading"
>
<img
src="@/assets/images/detailsicon/icon-bj@2x.png"
alt="编辑"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px"
/>
{{ isEditMode ? "保存" : "编辑" }}
</el-button>
<el-button type="primary" size="medium" plain v-if="checkRole(['admin', 'common','gov'])"
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
type="primary"
size="medium"
plain
v-if="checkRole(['admin', 'common', 'gov'])"
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>
@ -33,16 +75,30 @@
<div class="tagdiv">
<div class="descriptionsdiv">
<el-descriptions class="margin-top" :column="5" border>
<el-descriptions-item v-for="(item, index) in anotherInfo" :key="index" :label="item.zdname">
<el-descriptions-item
v-for="(item, index) in anotherInfo"
:key="index"
:label="item.zdname"
>
<template v-if="isEditMode">
<el-input v-model="item.zdinfor" size="small" @change="handleFieldChange(item)"
style="width:7rem;"></el-input>
<el-input
v-model="item.zdinfor"
size="small"
@change="handleFieldChange(item)"
style="width: 7rem"
></el-input>
</template>
<template v-else>
{{ item.zdinfor }}
</template>
<el-button v-if="checkRole(['admin', 'common','gov']) && isEditMode" type="text" size="small" @click="handleDeleteField(item)"
style="margin-left: 1rem;color: #F25353;">删除</el-button>
<el-button
v-if="checkRole(['admin', 'common', 'gov']) && isEditMode"
type="text"
size="small"
@click="handleDeleteField(item)"
style="margin-left: 1rem; color: #f25353"
>删除</el-button
>
</el-descriptions-item>
</el-descriptions>
</div>
@ -52,10 +108,16 @@
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="30%">
<el-form :model="form" label-width="80px">
<el-form-item label="字段名称">
<el-input v-model="form.zdname" placeholder="请输入字段名称"></el-input>
<el-input
v-model="form.zdname"
placeholder="请输入字段名称"
></el-input>
</el-form-item>
<el-form-item label="字段内容">
<el-input v-model="form.zdinfor" placeholder="请输入字段内容 "></el-input>
<el-input
v-model="form.zdinfor"
placeholder="请输入字段内容 "
></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -75,29 +137,29 @@ export default {
anotherInfo: {
type: Array,
required: true,
default: () => []
default: () => [],
},
action: {
type: String,
required: true
required: true,
},
xmId: {
type: Number,
default: 0
}
default: 0,
},
},
created() { },
created() {},
data() {
return {
dialogVisible: false, //
dialogTitle: '', //
dialogTitle: "", //
form: {
zdname: '',
zdinfor: ''
zdname: "",
zdinfor: "",
},
isEditMode: false, //
saveLoading: false, //
editedData: [] //
editedData: [], //
};
},
methods: {
@ -106,11 +168,11 @@ export default {
//
openDialog(type) {
if (type === 'add') {
this.dialogTitle = '新增信息';
if (type === "add") {
this.dialogTitle = "新增信息";
this.form = {
zdname: '',
zdinfor: ''
zdname: "",
zdinfor: "",
};
this.dialogVisible = true;
}
@ -131,7 +193,7 @@ export default {
//
handleFieldChange(item) {
const index = this.editedData.findIndex(i => i.zdname === item.zdname);
const index = this.editedData.findIndex((i) => i.zdname === item.zdname);
if (index !== -1) {
this.editedData[index] = { ...item };
}
@ -139,26 +201,28 @@ export default {
//
saveChanges() {
this.editedData = JSON.parse(JSON.stringify(this.anotherInfo));
this.saveLoading = true;
try {
//
const updatedData = this.editedData.map(item => ({
const updatedData = this.editedData.map((item) => ({
...item,
}));
//
this.$emit('update-info', updatedData);
this.$emit("update-info", updatedData);
// anotherInfo
this.anotherInfo = updatedData;
// 退
this.isEditMode = false;
this.$message.success('保存成功');
this.$message.success("保存成功");
} catch (error) {
console.error('保存失败:', error);
this.$message.error('保存失败: ' + (error.message || '请检查网络连接'));
console.error("保存失败:", error);
this.$message.error("保存失败: " + (error.message || "请检查网络连接"));
} finally {
this.saveLoading = false;
}
@ -175,91 +239,58 @@ export default {
},
//
async handleDeleteField(item) {
this.$confirm(`确定要删除字段 "${item.zdname}" 吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
try {
// API
await deletexmqt([item.id]);
// editedData
if (this.isEditMode) {
this.editedData = this.editedData.filter(i => i.id !== item.id);
}
// anotherInfo
this.anotherInfo = this.anotherInfo.filter(i => i.id !== item.id);
//
this.$emit('delete-info', item.id);
this.$message.success('删除成功');
} catch (error) {
this.$message.error('删除失败: ' + (error.message || '请检查网络连接'));
const confirmed = await this.$confirm(
`确定要删除字段 "${item.zdname}" 吗?`,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
}).catch(() => {
this.$message.info('已取消删除');
});
).catch(() => false);
if (!confirmed) {
this.$message.info("已取消删除");
return;
}
try {
// 1.
await deletexmqt([item.id]);
// 2.
this.$emit("refresh-data");
this.$message.success("删除成功");
} catch (error) {
this.$message.error("删除失败: " + (error.message || "请检查网络连接"));
}
},
//
async submitForm() {
if (!this.form.zdname || !this.form.zdinfor) {
this.$message.warning('请填写完整的字段名称和内容');
return;
}
try {
//
const requestData = {
xmId: this.xmId, // 使ID
xmId: this.xmId,
zdname: this.form.zdname,
zdinfor: this.form.zdinfor,
// 使
createBy: "",
createId: 0,
createTime: "",
updateBy: "",
updateId: 0,
updateTime: ""
};
// API
const response = await addxmqt(requestData);
console.log('新增成功:', response);
// anotherInfo
this.anotherInfo.push({
id: response.data.id,
zdname: this.form.zdname,
zdinfor: this.form.zdinfor
});
console.log("新增成功:", response);
//
this.$emit("refresh-data");
//
this.dialogVisible = false;
this.$message.success('新增成功');
this.$message.success("新增成功");
} catch (error) {
this.$message.error('新增失败: ' + (error.message || '请检查网络连接'));
this.$message.error("新增失败: " + (error.message || "请检查网络连接"));
}
},
//
deleteData() {
this.$confirm('确定要删除这些信息吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$emit('delete-info');
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
}
}
}
},
};
</script>
<style scoped>
@ -267,7 +298,7 @@ export default {
display: flex;
flex-direction: column;
width: 100%;
background-color: #FFFFFF;
background-color: #ffffff;
box-shadow: 0rem 0.13rem 0.63rem 0rem rgba(177, 177, 177, 0.1);
border-radius: 0.5rem 0.5rem 0.5rem 0.5rem;
}
@ -278,19 +309,19 @@ export default {
}
.containertop {
height: auto;
display: flex;
justify-content: space-between;
padding: .5rem;
border-bottom: 1px solid #E5E5E5;
height: auto;
display: flex;
justify-content: space-between;
padding: 0.5rem;
border-bottom: 1px solid #e5e5e5;
}
.topleft {
height: 2rem;
width: 8rem;
display: flex;
gap: 0.4rem;
align-items: center;
height: 2rem;
width: 8rem;
display: flex;
gap: 0.4rem;
align-items: center;
}
.topleft img {
@ -304,7 +335,7 @@ export default {
font-family: aliregular;
font-weight: 500;
font-size: 1rem;
color: #3D424C;
color: #3d424c;
line-height: 1rem;
text-align: right;
font-style: normal;
@ -340,4 +371,4 @@ export default {
justify-content: space-between;
margin-top: 1rem;
}
</style>
</style>

@ -3,26 +3,68 @@
<!-- 顶部信息 -->
<div class="containertop">
<div class="topleft">
<img src="@/assets/images/detailsicon/1.png" alt="">
<img src="@/assets/images/detailsicon/1.png" alt="" />
<span>规划信息</span>
</div>
<div class="topright" v-if="action === 'fill' || !action || action === 'okay'">
<el-button v-if="!isEditing" type="primary" size="medium" plain
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="edit">
<img src="@/assets/images/detailsicon/icon-bj@2x.png" alt="编辑"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
<div
class="topright"
v-if="action === 'fill' || !action || action === 'okay'"
>
<el-button
v-if="!isEditing"
type="primary"
size="medium"
plain
style="
border: none;
background-color: rgba(43, 98, 241, 0.1);
color: #2b62f1;
"
@click="edit"
>
<img
src="@/assets/images/detailsicon/icon-bj@2x.png"
alt="编辑"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px"
/>
编辑
</el-button>
<el-button v-else type="primary" size="medium" plain
style="border: none;background-color: rgba(43,98,241,0.1);color: #2B62F1;" @click="save">
<img src="@/assets/images/detailsicon/icon-bj@2x.png" alt="保存"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px;">
<el-button
v-else
type="primary"
size="medium"
plain
style="
border: none;
background-color: rgba(43, 98, 241, 0.1);
color: #2b62f1;
"
@click="save"
>
<img
src="@/assets/images/detailsicon/icon-bj@2x.png"
alt="保存"
style="width: 0.6rem; height: 0.6rem; margin-right: 4px"
/>
保存
</el-button>
<el-button type="primary" size="medium" plain v-if="checkRole(['admin', 'common','gov'])"
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
type="primary"
size="medium"
plain
v-if="checkRole(['admin', 'common', 'gov'])"
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>
@ -33,100 +75,200 @@
<el-descriptions class="margin-top" :column="4" border>
<el-descriptions-item>
<template slot="label">
<span style="color: red;">*</span>
总用地面积(平方米)
<span style="color: red">*</span>总用地面积(平方米)
</template>
<el-input v-if="isEditing" v-model="form.zydmj" style="width: 100%;"></el-input>
<el-input
v-if="isEditing"
v-model="form.zydmj"
style="width: 100%"
/>
<span v-else>{{ form.zydmj }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red;">*</span>
容积率
<span style="color: red">*</span>容积率
</template>
<el-input v-if="isEditing" v-model="form.rjl" style="width: 100%;"></el-input>
<el-input v-if="isEditing" v-model="form.rjl" style="width: 100%" />
<span v-else>{{ form.rjl }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red;">*</span>
总建筑面积平方米
<span style="color: red">*</span>总建筑面积平方米
</template>
<el-input v-if="isEditing" v-model="form.zjzmj" style="width: 100%;"></el-input>
<el-input
v-if="isEditing"
v-model="form.zjzmj"
style="width: 100%"
/>
<span v-else>{{ form.zjzmj }}</span>
</el-descriptions-item>
<el-descriptions-item label="标准层建筑面积(平方米)">
<el-input v-if="isEditing" v-model="form.bzcjzmj" style="width: 100%;"></el-input>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span>标准层建筑面积平方米
</template>
<el-input
v-if="isEditing"
v-model="form.bzcjzmj"
style="width: 100%"
/>
<span v-else>{{ form.bzcjzmj }}</span>
</el-descriptions-item>
<el-descriptions-item label="计容积率建筑面积(平方米)">
<el-input v-if="isEditing" v-model="form.jrjljzmj" style="width: 100%;"></el-input>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span>计容积率建筑面积(平方米)
</template>
<el-input
v-if="isEditing"
v-model="form.jrjljzmj"
style="width: 100%"
/>
<span v-else>{{ form.jrjljzmj }}</span>
</el-descriptions-item>
<el-descriptions-item label="建筑密度(%)">
<el-input v-if="isEditing" v-model="form.jzmd" style="width: 100%;"></el-input>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span>建筑密度(%)
</template>
<el-input
v-if="isEditing"
v-model="form.jzmd"
style="width: 100%"
/>
<span v-else>{{ form.jzmd }}</span>
</el-descriptions-item>
<el-descriptions-item label="绿地率(%)">
<el-input v-if="isEditing" v-model="form.ldl" style="width: 100%;"></el-input>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span>绿地率(%)
</template>
<el-input v-if="isEditing" v-model="form.ldl" style="width: 100%" />
<span v-else>{{ form.ldl }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red;">*</span>
建筑栋数
<span style="color: red">*</span>建筑栋数
</template>
<el-input v-if="isEditing" v-model="form.jzds" style="width: 100%;"></el-input>
<el-input
v-if="isEditing"
v-model="form.jzds"
style="width: 100%"
/>
<span v-else>{{ form.jzds }}</span>
</el-descriptions-item>
<el-descriptions-item label="地上建筑面积(平方米)">
<el-input v-if="isEditing" v-model="form.dsjzmj" style="width: 100%;"></el-input>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span>地上建筑面积(平方米)
</template>
<el-input
v-if="isEditing"
v-model="form.dsjzmj"
style="width: 100%"
/>
<span v-else>{{ form.dsjzmj }}</span>
</el-descriptions-item>
<el-descriptions-item label="地下建筑面积(平方米)">
<el-input v-if="isEditing" v-model="form.dxjzmj" style="width: 100%;"></el-input>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span>地下建筑面积(平方米)
</template>
<el-input
v-if="isEditing"
v-model="form.dxjzmj"
style="width: 100%"
/>
<span v-else>{{ form.dxjzmj }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red;">*</span>
最高建筑层数
<span style="color: red">*</span>最高建筑层数
</template>
<el-input v-if="isEditing" v-model="form.zgjzcs" style="width: 100%;"></el-input>
<el-input
v-if="isEditing"
v-model="form.zgjzcs"
style="width: 100%"
/>
<span v-else>{{ form.zgjzcs }}</span>
</el-descriptions-item>
<el-descriptions-item label="最高建筑高度(米)">
<el-input v-if="isEditing" v-model="form.zgjzgd" style="width: 100%;"></el-input>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span>最高建筑高度()
</template>
<el-input
v-if="isEditing"
v-model="form.zgjzgd"
style="width: 100%"
/>
<span v-else>{{ form.zgjzgd }}</span>
</el-descriptions-item>
<el-descriptions-item label="机动车停车位(辆)">
<el-input v-if="isEditing" v-model="form.jdctcw" style="width: 100%;"></el-input>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span>机动车停车位()
</template>
<el-input
v-if="isEditing"
v-model="form.jdctcw"
style="width: 100%"
/>
<span v-else>{{ form.jdctcw }}</span>
</el-descriptions-item>
<el-descriptions-item label="非机动车停车位(辆)">
<el-input v-if="isEditing" v-model="form.fjdctcw" style="width: 100%;"></el-input>
<el-descriptions-item>
<template slot="label">
<span style="color: red">*</span>非机动车停车位()
</template>
<el-input
v-if="isEditing"
v-model="form.fjdctcw"
style="width: 100%"
/>
<span v-else>{{ form.fjdctcw }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<span style="color: red;">*</span>
防火等级
<span style="color: red">*</span>防火等级
</template>
<el-input v-if="isEditing" v-model="form.fhdj" style="width: 100%;"></el-input>
<el-input
v-if="isEditing"
v-model="form.fhdj"
style="width: 100%"
/>
<span v-else>{{ form.fhdj }}</span>
</el-descriptions-item>
<!-- 非必填 -->
<el-descriptions-item label="规划文件">
<div v-if="isEditing">
<span v-if="form.ghwj">{{ form.ghwj.split('/').pop() }}</span>
<el-tooltip class="item" effect="dark" content="支持pdf或word文件大小不得超过50MB" placement="top-start">
<el-button type="text" icon="el-icon-upload" @click="showFileDialog">
<span v-if="form.ghwj">{{ form.ghwj.split("/").pop() }}</span>
<el-tooltip
class="item"
effect="dark"
content="支持pdf或word文件大小不得超过50MB"
placement="top-start"
>
<el-button
type="text"
icon="el-icon-upload"
@click="showFileDialog"
>
<span v-if="form.ghwj"></span>
<span v-else></span>
</el-button>
</el-tooltip>
</div>
<span v-else>
<a v-if="form.ghwj" :href="form.ghwj" target="_blank">{{ form.ghwj.split('/').pop() }}</a>
<a v-if="form.ghwj" :href="form.ghwj" target="_blank">{{
form.ghwj.split("/").pop()
}}</a>
<span v-else></span>
</span>
</el-descriptions-item>
@ -138,14 +280,16 @@
<FileUpload @file-uploaded="handleFileUploaded" v-model="form.ghwj" />
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="dialogVisible = false"
> </el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
import FileUpload from '@/components/FileUpload2'
import FileUpload from "@/components/FileUpload2";
import { checkPermi, checkRole } from "@/utils/permission";
export default {
@ -153,20 +297,20 @@ export default {
props: {
size: {
type: String,
default: ''
default: "",
},
planInfo: {
type: Object,
required: true
required: true,
},
xmId: {
type: Number,
required: true
required: true,
},
action: {
type: String,
required: true
}
required: true,
},
},
data() {
return {
@ -191,17 +335,15 @@ export default {
jdctcw: 0,
fjdctcw: 0,
fhdj: null,
ghwj: '',
createBy: '',
ghwj: "",
createBy: "",
createId: 0,
createTime: null,
updateBy: '',
updateBy: "",
updateId: 0,
updateTime: null,
},
rules: {
}
rules: {},
};
},
watch: {
@ -210,8 +352,8 @@ export default {
this.form = { ...newVal };
},
immediate: true,
deep: true
}
deep: true,
},
},
methods: {
checkPermi,
@ -221,7 +363,7 @@ export default {
this.download(
"/gysl/planInformation/export",
{
xmId: this.form.xmId
xmId: this.form.xmId,
},
`规划信息${new Date().getTime()}.xlsx`
);
@ -229,24 +371,39 @@ export default {
//
edit() {
this.isEditing = true;
document.addEventListener('click', this.handleClickOutside);
document.addEventListener("click", this.handleClickOutside);
},
//
save() {
if (this.validateForm()) {
const formData = this.prepareFormData(this.form);
//
this.$emit('update-data', formData);
this.$emit("update-data", formData);
this.isEditing = false;
document.removeEventListener('click', this.handleClickOutside);
document.removeEventListener("click", this.handleClickOutside);
}
},
//
validateForm() {
const requiredFields = ['zydmj', 'rjl', 'zjzmj', 'jzds', 'zgjzcs', 'fhdj'];
const requiredFields = [
"zydmj",
"rjl",
"zjzmj",
"bzcjzmj",
"jrjljzmj",
"jzmd",
"ldl",
"jzds",
"dsjzmj",
"dxjzmj",
"zgjzcs",
"jdctcw",
"fjdctcw",
"fhdj",
];
for (const field of requiredFields) {
if (!this.form[field]) {
this.$message.error('请填写完整的规划信息');
this.$message.error("请填写完整的规划信息");
return false;
}
}
@ -256,12 +413,12 @@ export default {
prepareFormData(formData) {
return {
...formData,
createBy: '',
createBy: "",
createId: 0,
createTime: '',
updateBy: '',
createTime: "",
updateBy: "",
updateId: 0,
updateTime: ''
updateTime: "",
};
},
//
@ -274,11 +431,14 @@ export default {
},
handleClickOutside(event) {
const saveButton = this.$el.querySelector('.el-button:contains("保存")');
if (!this.$el.contains(event.target) || saveButton.contains(event.target)) {
if (
!this.$el.contains(event.target) ||
saveButton.contains(event.target)
) {
return;
}
}
}
},
},
};
</script>
@ -287,7 +447,7 @@ export default {
display: flex;
flex-direction: column;
width: 100%;
background-color: #FFFFFF;
background-color: #ffffff;
box-shadow: 0rem 0.13rem 0.63rem 0rem rgba(177, 177, 177, 0.1);
border-radius: 0.5rem 0.5rem 0.5rem 0.5rem;
}
@ -301,9 +461,9 @@ export default {
height: auto;
display: flex;
justify-content: space-between;
padding: .7rem 0;
padding: .5rem;
border-bottom: 1px solid #E5E5E5;
padding: 0.7rem 0;
padding: 0.5rem;
border-bottom: 1px solid #e5e5e5;
}
.topleft {
@ -325,7 +485,7 @@ export default {
font-family: aliregular;
font-weight: 500;
font-size: 1rem;
color: #3D424C;
color: #3d424c;
line-height: 1rem;
text-align: right;
font-style: normal;
@ -337,4 +497,4 @@ export default {
margin-left: 1rem;
height: auto;
}
</style>
</style>

@ -55,7 +55,7 @@
<!-- 类型1轮播图 -->
<div v-if="legend.type1 && legend.type1.images && legend.type1.images.length > 0">
<div class="fixed-carousel-container">
<el-carousel height="12.44rem" indicator-position="outside" class="fixed-carousel">
<el-carousel height="12.44rem" :autoplay=false indicator-position="outside" class="fixed-carousel">
<el-carousel-item v-for="(img, imgIndex) in legend.type1.images"
:key="'type1-' + imgIndex">
<div class="carousel-item-wrapper">
@ -70,7 +70,7 @@
<!-- 类型2轮播图 -->
<div v-if="legend.type2 && legend.type2.images && legend.type2.images.length > 0">
<div class="fixed-carousel-container">
<el-carousel height="12.44rem" indicator-position="outside" class="fixed-carousel">
<el-carousel height="12.44rem" :autoplay=false indicator-position="outside" class="fixed-carousel">
<el-carousel-item v-for="(img, imgIndex) in legend.type2.images"
:key="'type2-' + imgIndex">
<div class="carousel-item-wrapper">

@ -47,7 +47,7 @@
</div>
<div class="dialog-content">
<!-- @click="goToDetail" -->
<div class="dialog-title" @click="goToDetail">{{ selectedProject.name }}</div>
<div class="dialog-title">{{ selectedProject.name }}</div>
<div class="dialog-info">
<p><span class="label">状态:</span>
<span class="value" :style="{ color: xzflColors[xzflMap[selectedProject.xzfl]] }">
@ -150,7 +150,6 @@ export default {
zoom: 11,
minZoom: 10,
maxZoom: 20,
// zoomControl: true,
chinaCRS: 'GCJ02'
},
map: null
@ -498,7 +497,7 @@ export default {
/* 所有容器 */
.container {
position: relative;
height: 22rem;
height: 100%;
}
.mapareaone {

@ -0,0 +1,357 @@
<template>
<div class="login">
<div class="loginleft">
</div>
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<img src="@/assets/images/logo@2x.png" alt="">
<div class="title">苏州工业园区工业上楼管理系统</div>
<div class="logintabs">
<el-tabs v-model="activeName" :stretch="true" color="#216CDC">
<el-tab-pane label="企业用户登录" name="first"></el-tab-pane>
<el-tab-pane label="政务人员登录" name="second"></el-tab-pane>
</el-tabs>
</div>
<!-- <el-form-item prop="username" class="loginitem" style="margin-top: 1rem;">
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
</el-input>
</el-form-item>
<el-form-item prop="password" class="loginitem">
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码"
@keyup.enter.native="handleLogin">
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
</el-input>
</el-form-item> -->
<!-- <el-form-item prop="code" v-if="captchaEnabled" class="loginitem">
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%"
@keyup.enter.native="handleLogin">
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
</el-input>
<div class="login-code">
<img :src="codeUrl" @click="getCode" class="login-code-img" style="width: 8.56rem;" />
</div>
</el-form-item> -->
<!-- <el-checkbox v-model="loginForm.rememberMe" style="margin:1rem 18.6rem 25px 0px;"></el-checkbox> -->
<el-form-item style="width:24rem;;margin-top: 1rem;">
<!-- <el-button :loading="loading" size="medium" type="primary" style="width:100%;background: #2B62F1;"
@click.native.prevent="handleLogin">
<span v-if="!loading"> </span>
<span v-else> ...</span>
</el-button> -->
<el-button v-if="showGovernmentLoginButton" size="medium" type="primary" class="tongyidenglu"
style="width:100%;background: #2B62F1;" @click.native.prevent="handleGovernmentLogin">
<span>政务统一身份认证登录</span>
</el-button>
<el-button v-if="showEnterpriseLoginButton" size="medium" type="primary" class="tongyidenglu"
style="width:100%;background: #2B62F1;" @click.native.prevent="handleEnterpriseLogin">
<span>企业统一身份认证登录</span>
</el-button>
</el-form-item>
<div style="font-size: 0.88rem;color: #333;">主办单位苏州工业园区经济发展委员会</div>
</el-form>
<!-- 底部 -->
<div class="el-login-footer">
<span></span>
</div>
</div>
</template>
<script>
import { getCodeImg } from '@/api/login'
import Cookies from 'js-cookie'
import { encrypt, decrypt } from '@/utils/jsencrypt'
import forge from 'node-forge'
export default {
name: 'Login',
data() {
return {
codeUrl: '',
activeName: 'second',
loginForm: {
username: '',
password: '',
rememberMe: false,
code: '',
uuid: '',
loginRole: 2
},
loginRules: {
username: [
{ required: true, trigger: 'blur', message: '请输入您的账号' }
],
password: [
{ required: true, trigger: 'blur', message: '请输入您的密码' }
],
code: [{ required: true, trigger: 'change', message: '请输入验证码' }]
},
loading: false,
captchaEnabled: true,
register: false,
redirect: undefined,
a1: `MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAl8bS1kYTiMhIS5MZU253bc0ukaxrA1lfCziABFxQrC2c09tMrQGjuH6V1x2ofNBMGhOD9uWN/qkAQy/HwOe/NKUqCw6N0ov6guSrqMDW/BdZ3Bl0rmM1/95jTC1xffFFvej7xWNffIbaPI+bJ4WLX9NViNi9HmT0BRNzJ4d2R86LPPCa+bxLaPjsh2R2tBkbLkUot9769aJaPPiwPCZHMkuQenjHSmpWL0okleqMH8EGX7j6A5A/4IUXPMNKMMzkiSRpsIJ65GJmDAbnR3ZXRfC8MzVBBJB6zr5N0F4N9xZfF+JS/Yx726tCu+rA6GDCyTxtQ/wnKpPdwFP5nUWCWQIDAQAB`
}
},
watch: {
$route: {
handler: function (route) {
this.redirect = route.query && route.query.redirect;
},
immediate: true
},
activeName(newVal) {
if (newVal === 'first') {
this.loginForm.loginRole = 2
} else if (newVal === 'second') {
this.loginForm.loginRole = 1
}
}
},
computed: {
showGovernmentLoginButton() {
return this.activeName === 'second'
},
showEnterpriseLoginButton() {
return this.activeName === 'first'
}
},
created() {
// this.getCode()
// this.getCookie()
location.href = process.env.VUE_APP_BASE_API + "/system/singlelogin/login"
},
methods: {
getCode() {
getCodeImg().then(res => {
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
if (this.captchaEnabled) {
this.codeUrl = "data:image/gif;base64," + res.img;
this.loginForm.uuid = res.uuid;
}
});
},
getCookie() {
const username = Cookies.get('username')
const password = Cookies.get('password')
const rememberMe = Cookies.get('rememberMe')
this.loginForm = {
username: username === undefined ? this.loginForm.username : username,
password: password === undefined ? this.loginForm.password : decrypt(password),
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
}
},
handleLogin() {
this.$refs.loginForm.validate(valid => {
if (valid) {
this.loading = true;
if (this.loginForm.rememberMe) {
Cookies.set("username", this.loginForm.username, { expires: 30 });
Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
} else {
Cookies.remove("username");
Cookies.remove("password");
Cookies.remove('rememberMe');
}
// 2048 RSA
const lines = [];
lines.push('-----BEGIN PUBLIC KEY-----');
for (let i = 0; i < this.a1.length; i += 64) {
lines.push(this.a1.slice(i, i + 64));
}
lines.push('-----END PUBLIC KEY-----');
lines.join('\n')
const publicKey = forge.pki.publicKeyFromPem(lines.join('\n'));
//
var dataBytes = forge.util.encodeUtf8(this.loginForm.password);
//
var encryptedBytes = publicKey.encrypt(dataBytes, 'RSA-OAEP', {
md: forge.md.sha256.create(),
mgf1: {
md: forge.md.sha1.create()
}
});
// Base64
var encryptedBase64 = forge.util.encode64(encryptedBytes);
//
const loginData = {
username: this.loginForm.username,
password: encryptedBase64,
code: this.loginForm.code,
uuid: this.loginForm.uuid,
loginRole: this.activeName === 'first' ? 2 : 1
};
this.$store.dispatch('Login', loginData)
.then(() => {
this.$router.push({ path: this.redirect || '/' }).catch(() => { });
})
.catch((error) => {
this.loading = false;
if (this.captchaEnabled) {
this.getCode();
}
console.error('登录失败:', error);
});
}
});
},
handleGovernmentLogin() {
window.location.href = 'https://qyt.sipac.gov.cn/sipsg-enterprise-mobile-manage/#/login'
},
handleEnterpriseLogin() {
location.href = process.env.VUE_APP_BASE_API + "/system/singlelogin/login";
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .el-tabs__active-bar {
width: 2rem !important;
margin-left: 3rem;
background-color: #216CDC;
height: 0.21rem;
border-radius: 0.16rem;
}
::v-deep .el-tabs__header {
border-bottom: none !important;
}
::v-deep .el-tabs__item {
font-size: 1rem;
padding: 0 20px;
color: #3D424C;
font-family: Alibaba PuHuiTi;
font-weight: 400;
color: #3D424C;
}
::v-deep .el-tabs__item.is-active {
color: #216CDC;
}
::v-deep .el-tabs__nav-wrap::after {
display: none !important;
}
.tongyidenglu {
margin-top: 1rem;
margin-left: 0rem;
}
.login {
display: flex;
justify-content: center;
align-items: center;
border-radius: 6px 0 0 6px;
height: 100%;
background-image: url('../assets/images/loginbackground.png');
background-size: cover;
}
.loginleft {
width: 35rem;
height: 40rem;
background-image: url('../assets/images/loginleft.png');
background-size: 100% 100%;
background-repeat: no-repeat;
}
.title {
width: 29.13rem;
height: 1.94rem;
font-family: Alibaba PuHuiTi;
font-weight: 500;
font-size: 2rem;
color: #292C33;
line-height: 3.5rem;
text-align: center;
margin-top: 1rem;
}
.loginitem {
width: 24rem;
}
.login-form {
border-radius: 0 6px 6px 0;
background: #ffffff;
width: 50rem;
height: 40rem;
padding: 25px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
img {
width: 6.56rem;
height: 3.56rem;
}
.el-input {
height: 38px;
input {
height: 38px;
}
}
.input-icon {
height: 39px;
width: 14px;
margin-left: 2px;
}
}
.login-tip {
font-size: 13px;
text-align: center;
color: #bfbfbf;
}
.logintabs {
margin-top: 2.88rem;
width: 18rem;
}
.login-code {
width: 35%;
height: 1.8rem;
float: right;
img {
cursor: pointer;
vertical-align: middle;
}
}
.el-login-footer {
height: 40px;
line-height: 40px;
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
color: #333;
font-family: Arial;
font-size: 12px;
letter-spacing: 1px;
}
.login-code-img {
height: 38px;
}
.el-tabs__item.is-active {
color: #216CDC;
position: relative;
padding-bottom: 0.5rem;
}
</style>

@ -6,10 +6,10 @@
<div class="containerheadone" id="listtop">
<Title :basicInfo="basicInformation"></Title>
<div style="display: flex; gap: 5%; width: auto">
<div v-if="checkRole(['common','gov']) && action === 'okay'">
<div v-if="checkRole(['common', 'gov']) && action === 'okay'">
<el-button
type="primary"
v-if="checkRole(['common','gov'])"
v-if="checkRole(['common', 'gov'])"
@click="aduitAlltwo"
>保存</el-button
>
@ -125,12 +125,19 @@
:action="action"
:xmId="projectId"
:anotherInfo="projectOtherInfos"
@refresh-data="fetchOtherInfo"
@update-data="handleDataUpdate('projectOtherInfos', $event)"
>
</Others>
</div>
<div class="footer" v-if="checkRole(['common','gov']) && action === 'fill'">
<el-button type="primary" v-if="checkRole(['common','gov'])" @click="aduitAll"
<div
class="footer"
v-if="checkRole(['common', 'gov']) && action === 'fill'"
>
<el-button
type="primary"
v-if="checkRole(['common', 'gov'])"
@click="aduitAll"
>审核通过</el-button
>
</div>
@ -321,6 +328,20 @@ export default {
},
},
methods: {
async fetchOtherInfo() {
try {
const response = await getzwBasicInformationById(this.projectId);
const data = response.data;
// projectOtherInfos
this.projectOtherInfos = data.projectOtherInfos || [];
// this.$message.success("");
} catch (error) {
console.error("获取其他信息失败", error);
this.$message.error("获取其他信息失败");
}
},
checkPermi,
checkRole,
loadData() {
@ -482,12 +503,12 @@ export default {
this.scrollTimeout = setTimeout(() => {
const scrollPosition = container.scrollTop;
if (scrollPosition > this.lastScrollTop) {
this.scrollDirection = 'down';
this.scrollDirection = "down";
} else {
this.scrollDirection = 'up';
this.scrollDirection = "up";
}
this.lastScrollTop = scrollPosition;
const offset = this.scrollDirection === 'down' ? 500 : 200;
const offset = this.scrollDirection === "down" ? 500 : 200;
const adjustedScrollPosition = scrollPosition + offset;
for (let i = this.sections.length - 1; i >= 0; i--) {
const element = document.getElementById(this.sections[i].id);
@ -505,7 +526,7 @@ export default {
},
handleMenuClick() {
if (this.$refs.menuRef) {
this.$refs.menuRef.$el.blur();
this.$refs.menuRef.$el.blur();
}
},
},

@ -119,6 +119,7 @@
:action="action"
:xmId="projectId"
:anotherInfo="projectOtherInfos"
@refresh-data="fetchOtherInfo"
@update-data="handleDataUpdate('projectOtherInfos', $event)"
>
</Others>
@ -313,6 +314,20 @@ export default {
}
},
methods: {
async fetchOtherInfo() {
try {
const response = await getzwBasicInformationById(this.projectId);
const data = response.data;
// projectOtherInfos
this.projectOtherInfos = data.projectOtherInfos || [];
// this.$message.success("");
} catch (error) {
console.error("获取其他信息失败", error);
this.$message.error("获取其他信息失败");
}
},
checkPermi,
checkRole,
loadData() {
@ -514,7 +529,6 @@ export default {
//
const submitData = this.prepareSubmitData();
// console.log(':', JSON.stringify(submitData, null, 2));
fillBasicInformation(submitData)
.then((response) => {
this.$message.success("提交成功");

@ -702,6 +702,15 @@ export default {
this.queryParams.current = 1;
this.getList();
},
/** 详情按钮操作 */
getInfo(row, type) {
this.$store.commit("SET_CRUMBS", "项目详情");
const id = row.id || this.ids[0];
this.$router.push({
path: `/manage-info/${id}`,
query: { action: type },
});
},
},
};
</script>

@ -71,12 +71,7 @@
</el-row>
</div>
<div class="table-wrapper">
<el-table
v-loading="loading"
:data="postList"
stripe
height="100%"
>
<el-table v-loading="loading" :data="postList" stripe height="100%">
<el-table-column label="序号" align="center">
<template slot-scope="scope">
{{
@ -91,7 +86,7 @@
width="200"
/>
<el-table-column
label="统一信用代码"
label="统一社会信用代码"
align="center"
prop="uscc"
width="200"
@ -123,9 +118,15 @@
fixed="right"
>
<template slot-scope="scope">
<el-button type="text" @click="getAdd(scope.row, 'detail')"
<el-button type="text" @click="getinfo(scope.row, 'detail')"
>详情</el-button
>
<el-button
type="text"
@click="getedit(scope.row, 'detail')"
style="color: #67c23a"
>编辑</el-button
>
<el-button
type="text"
@click="handleDelete(scope.row)"
@ -151,12 +152,18 @@
:title="dialogTitle"
:visible.sync="dialogFormVisible"
width="50%"
@close="handleDialogClose"
>
<!-- 在新增/编辑弹窗的el-form中 -->
<el-form ref="form" :model="form" label-width="200px">
<el-row>
<el-col :span="12">
<el-form-item label="企业名称">
<el-input v-model="form.epname" placeholder="请输入企业名称" />
<el-input
v-model="form.epname"
placeholder="请输入企业名称"
:disabled="isDetail"
/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -164,17 +171,18 @@
<el-input
v-model="form.uscc"
placeholder="请输入统一社会信用代码"
:disabled="isDetail"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="标签代码">
<el-input
v-model="form.catalogueid"
placeholder="请输入标签代码"
:disabled="isDetail"
/>
</el-form-item>
</el-col>
@ -183,6 +191,7 @@
<el-input
v-model="form.lablenotes"
placeholder="请输入标签注释"
:disabled="isDetail"
/>
</el-form-item>
</el-col>
@ -191,31 +200,43 @@
<el-row>
<el-col :span="12">
<el-form-item label="标签状态">
<el-input v-model="form.status" placeholder="请输入标签状态" />
<el-input
v-model="form.status"
placeholder="请输入标签状态"
:disabled="isDetail"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer">
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="submitForm"></el-button>
<el-button type="primary" @click="submitForm">
{{ isDetail ? "确定" : "保存" }}
</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getCybqInformationPage, getSpanById, addCybq, updateSpan,deleteSpan} from "@/api/ManageApi/index";
import {
getCybqInformationPage,
getSpanById,
addCybq,
updateSpan,
deleteSpan,
} from "@/api/ManageApi/index";
import { checkPermi, checkRole } from "@/utils/permission";
export default {
dicts: ["xzfl"],
data() {
return {
isDetail: false,
//
dialogFormVisible: false,
dialogTitle: '',
dialogTitle: "",
form: {
id: null,
epname: "",
@ -229,7 +250,7 @@ export default {
codekey: "",
sceneid: "",
status: "",
bqbjdw: ""
bqbjdw: "",
},
//
@ -291,63 +312,100 @@ export default {
codekey: "",
sceneid: "",
status: "",
bqbjdw: ""
bqbjdw: "",
};
this.dialogFormVisible = true;
},
/** 编辑按钮点击(即“详情”) */
getAdd(row) {
/** 获取详情 */
getinfo(row) {
this.dialogTitle = "产业标签详情";
getSpanById(row.id)
.then((response) => {
const data = response.data;
this.form = {
id: data.id,
epname: data.epname,
uscc: data.uscc,
catalogueid: data.catalogueid,
state: data.state,
yhlx: data.yhlx,
lablenotes: data.lablenotes,
status: data.status,
dw_timestamp: data.dw_timestamp,
codekey: data.codekey,
sceneid: data.sceneid,
status: data.status,
bqbjdw: data.bqbjdw,
};
//
this.isDetail = true;
this.dialogFormVisible = true;
})
.catch(() => {
this.$message.error("获取数据失败");
});
},
getedit(row) {
this.dialogTitle = "编辑产业标签";
getSpanById(row.id).then(response => {
const data = response.data;
this.form = {
id: data.id,
epname: data.epname,
uscc: data.uscc,
catalogueid: data.catalogueid,
state: data.state,
yhlx: data.yhlx,
lablenotes: data.lablenotes,
status: data.status,
dw_timestamp: data.dw_timestamp,
codekey: data.codekey,
sceneid: data.sceneid,
status: data.status,
bqbjdw: data.bqbjdw
};
this.dialogFormVisible = true;
}).catch(() => {
this.$message.error("获取数据失败");
});
getSpanById(row.id)
.then((response) => {
const data = response.data;
this.form = {
id: data.id,
epname: data.epname,
uscc: data.uscc,
catalogueid: data.catalogueid,
state: data.state,
yhlx: data.yhlx,
lablenotes: data.lablenotes,
status: data.status,
dw_timestamp: data.dw_timestamp,
codekey: data.codekey,
sceneid: data.sceneid,
status: data.status,
bqbjdw: data.bqbjdw,
};
this.dialogFormVisible = true;
})
.catch(() => {
});
},
/** 提交表单(新增或修改) */
submitForm() {
if (this.isDetail) {
this.dialogFormVisible = false;
return;
}
const apiRequest = this.form.id ? updateSpan : addCybq;
apiRequest(this.form)
.then(() => {
this.$message.success(this.form.id ? '更新成功' : '新增成功');
this.$message.success(this.form.id ? "更新成功" : "新增成功");
this.getList(); //
this.dialogFormVisible = false;
})
.catch(() => {
this.$message.error(this.form.id ? '更新失败' : '新增失败');
this.$message.error(this.form.id ? "更新失败" : "新增失败");
});
},
handleDialogClose() {
this.isDetail = false;
},
/** 删除按钮点击 */
handleDelete(row) {
this.$confirm("是否确认删除所选数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
deleteSpan([row.id]).then(() => {
this.$message.success("删除成功");
this.getList();
});
}).catch(() => {});
type: "warning",
})
.then(() => {
deleteSpan([row.id]).then(() => {
this.$message.success("删除成功");
this.getList();
});
})
.catch(() => {});
},
/** 搜索与重置 */
@ -368,8 +426,8 @@ export default {
status: undefined,
};
this.getList();
}
}
},
},
};
</script>
<style scoped lang="scss">

@ -1,5 +1,5 @@
<template>
<!-- 这是测试的页面 -->
<!-- 正式的统计页面 -->
<div class="dashboard-container">
<!-- 1 -->
<div class="dashboard-row">
@ -24,14 +24,14 @@
<MapArea />
</div>
<div class="dashboard-col narrow">
<div class="itemhead" style="margin: 0.5rem 0 0 0">
<div class="itemhead" style="margin: .5rem 0 0 0;">
<span>功能区</span>
</div>
<div class="relaitem">
<FunctionArea :years="years" />
</div>
<div class="itemhead" style="margin: 0">
<div class="itemhead" style="margin: 0;">
<span>投资主体</span>
</div>
<div class="relaitem">
@ -58,36 +58,12 @@
<Cydxml />
</div>
</div>
<div class="dashboard-col" style="height: 11rem">
<div class="itemhead">
<!-- <span>产业导向细分产业分析</span> -->
<span>年度任务完成情况</span>
</div>
<div class="relaitem" style="height: 9rem">
<!-- <Cydxxfgl /> -->
<Ndwcqk />
</div>
</div>
</div>
<!-- 4 -->
<div class="dashboard-row">
<div class="dashboard-col">
<div class="itemhead">
<span>储备项目统计分析</span>
</div>
<div class="relaitem">
<Cbxm />
</div>
</div>
<div class="dashboard-col">
<div class="dashboard-col" style="height: 11rem;">
<div class="itemhead">
<span>产业导向细分产业分析</span>
<!-- <span>年度任务完成情况</span> -->
</div>
<div class="relaitem">
<div class="relaitem" style="height: 9rem;">
<Cydxxfgl />
<!-- <Ndwcqk /> -->
</div>
</div>
</div>
@ -95,19 +71,16 @@
</template>
<script>
import AllArea from "@/views/components/analysis/all.vue";
import FunctionArea from "@/views/components/analysis/function.vue";
import InvestArea from "@/views/components/analysis/invest.vue";
import Message from "@/views/components/analysis/message.vue";
import ProjectList from "@/views/components/analysis/projectList.vue";
import MapArea from "@/views/components/analysis/map.vue";
import Cyeshuju from "@/views/components/analysis/chanyeshuju.vue";
import Cydxml from "@/views/components/analysis/chanyedxml.vue";
import Cydxxfgl from "@/views/components/analysis/chanyexfgl.vue";
import Cbxm from "@/views/components/analysis/chubeixm.vue";
import Ndwcqk from "@/views/components/analysis/ndwcqk.vue";
import { investall, fungong ,getNewSysLogininfor} from "@/api/ManageApi/index";
import Cookies from "js-cookie";
import AllArea from '@/views/components/analysis/all.vue'
import FunctionArea from '@/views/components/analysis/function.vue'
import InvestArea from '@/views/components/analysis/invest.vue'
import Message from '@/views/components/analysis/message.vue'
import ProjectList from '@/views/components/analysis/projectList.vue'
import MapArea from '@/views/components/analysis/map.vue'
import Cyeshuju from '@/views/components/analysis/chanyeshuju.vue'
import Cydxml from '@/views/components/analysis/chanyedxml.vue'
import Cydxxfgl from '@/views/components/analysis/chanyexfgl.vue'
import { investall, fungong } from '@/api/ManageApi/index'
export default {
components: {
@ -119,68 +92,30 @@ export default {
MapArea,
Cyeshuju,
Cydxml,
Cydxxfgl,
Cbxm,
Ndwcqk,
Cydxxfgl
},
data() {
return {
years: new Date().getFullYear().toString(),
allnumber: {
touzinumber: 0,
touzinumber: 0
},
functionnumber: {
functionnumber: 0,
},
};
},
mounted() {
getNewSysLogininfor()
.then(res => {
const lastLoginTime = res.data?.loginTime;
if (!lastLoginTime) {
return;
functionnumber: 0
}
if (!res.data) {
if (Cookies.get("newSysLogininfor") != 2) {
this.$confirm(
`您上次登录时间为${lastLoginTime},建议修改密码`,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}
)
.then(() => {
Cookies.set("newSysLogininfor", 2);
})
.catch(() => {
Cookies.set("newSysLogininfor", 2);
});
}
}
})
.catch(err => {
console.error('获取登录信息失败:', err);
});
};
},
methods: {
handleYearChange(years) {
this.years = years;
console.log("index.vue: handleYearChange called with years:", years);
},
async getData() {
const response = await investall();
if (response && response.data) {
const totalCount = response.data.reduce(
(sum, item) => sum + item.count,
0
);
const totalCount = response.data.reduce((sum, item) => sum + item.count, 0);
this.allnumber = {
touzinumber: totalCount,
touzinumber: totalCount
};
}
},
@ -188,22 +123,22 @@ export default {
const response2 = await fungong();
if (response2 && response2.data) {
const totalCount2 = response2.data.reduce(
(sum, item) => sum + item.count,
0
(sum, item) => sum + item.count, 0
);
this.functionnumber = {
functionnumber: totalCount2,
};
functionnumber: totalCount2
}
}
},
}
},
created() {
this.getData();
this.getfuncdata();
},
}
};
</script>
<style scoped>
.dashboard-container {
display: flex;
@ -219,17 +154,19 @@ export default {
display: flex;
flex: 1;
gap: 0.5rem;
}
.dashboard-rowtwo {
display: flex;
height: auto;
flex: 2;
gap: 0.5rem;
}
.dashboard-col {
flex: 1;
background-color: #ffffff;
background-color: #FFFFFF;
border-radius: 0.5rem;
display: flex;
flex-direction: column;
@ -246,22 +183,12 @@ export default {
.itemhead {
width: 100%;
border-left: 0.25rem solid #2b62f1;
border-left: 0.25rem solid #2B62F1;
margin: 0.5rem 0;
margin: 0.5rem 0;
height: 1.25rem;
display: flex;
align-items: center;
justify-content: space-between;
.top {
width: auto;
display: flex;
margin-bottom: 10px;
font-size: 0.88rem;
color: gray !important;
justify-content: flex-end;
}
}
.relaitem {
@ -284,7 +211,7 @@ export default {
font-family: DINbold;
font-weight: 500;
font-size: 1.25rem;
color: #292c33;
color: #292C33;
text-align: left;
font-style: normal;
text-transform: none;
@ -294,7 +221,7 @@ export default {
font-family: alibold;
font-weight: 400;
font-size: 0.68rem;
color: #9e9e9e;
color: #9E9E9E;
text-align: left;
font-style: normal;
text-transform: none;
@ -305,7 +232,7 @@ export default {
font-family: alibold;
font-weight: 600;
font-size: 1rem;
color: #3d424c;
color: #3D424C;
line-height: 1.69rem;
text-align: left;
font-style: normal;
@ -314,7 +241,7 @@ export default {
.mainarea {
flex: 1;
padding: 0 0 0 0.5rem;
padding: 0 0 0 .5rem;
overflow: auto;
}
@ -328,4 +255,4 @@ export default {
.bgcicon {
padding: 0 !important;
}
</style>
</style>

@ -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.108: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