diff --git a/.env.development b/.env.development index cb3bc29..c3d6537 100644 --- a/.env.development +++ b/.env.development @@ -17,14 +17,14 @@ NODE_ENV = 'development' # 演示平台 # VITE_API_URL = 'http://jxj.zhgdyun.com:9809' # 百色七参数线上地址 -# VITE_API_URL = 'http://101.43.164.214:11111' +VITE_API_URL = 'http://101.43.164.214:11111' # 七参数标准版(测试平台) # VITE_API_URL = 'http://jxj.zhgdyun.com:15551' # 七参数标准版(测试平台) # VITE_API_URL = 'http://182.90.224.237:15551' # agjt # VITE_API_URL = 'http://42.180.188.17:9809' #生产环境 -VITE_API_URL = 'http://42.180.188.17:11211' #测试环境 +# VITE_API_URL = 'http://42.180.188.17:11211' #测试环境 # VITE_API_URL = 'http://jxj.zhgdyun.com:19812' # 苏立信/重庆市南岸区 # VITE_API_URL = 'http://101.43.164.214:11111' diff --git a/src/api/index.ts b/src/api/index.ts index 1e23eaf..6907886 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -76,8 +76,18 @@ class RequestHttp { const globalStore = GlobalStore(); tryHideFullScreenLoading(); // 请求超时 && 网络错误单独判断,没有 response - if (error.message.indexOf("timeout") !== -1) ElMessage.error("请求超时!请您稍后重试"); - if (error.message.indexOf("Network Error") !== -1) ElMessage.error("网络错误!请您稍后重试"); + if (error.message.indexOf("timeout") !== -1) + ElMessage({ + message: "请求超时!请您稍后重试", + grouping: true, + type: "error" + }); + if (error.message.indexOf("Network Error") !== -1) + ElMessage({ + message: "网络错误!请您稍后重试", + grouping: true, + type: "error" + }); if (error.message.indexOf("Request failed with status code 401") !== -1) { // ElMessage.error("登录已过期,请重新登录"); globalStore.resetStore(); @@ -86,7 +96,12 @@ class RequestHttp { // 根据响应的错误状态码,做不同的处理 // if (response) checkStatus(response.status); // 根据响应的错误状态码,抛出异常错误信息 - if (response) ElMessage.error((response.data as AxiosError).message); + if (response) + ElMessage({ + message: (response.data as AxiosError).message, + grouping: true, + type: "error" + }); // 服务器结果都没有返回(可能服务器错误可能客户端断网),断网处理:可以跳转到断网页面 if (!window.navigator.onLine) router.replace("/500"); return Promise.reject(error); diff --git a/src/api/modules/securityManagement.ts b/src/api/modules/securityManagement.ts index a1303c8..0c54d4f 100644 --- a/src/api/modules/securityManagement.ts +++ b/src/api/modules/securityManagement.ts @@ -13,7 +13,9 @@ export const getCountFaultLevel = (params: {}) => { }; // 安全隐患统计 export const getProjectInspectRecordCount = (params: {}) => { - return http.post(BASEURL + `/xmgl/hiddenDangerInspectRecord/getProjectInspectRecordCount`, params, { headers: { noLoading: true } }); + return http.post(BASEURL + `/xmgl/hiddenDangerInspectRecord/getProjectInspectRecordCount`, params, { + headers: { noLoading: true } + }); }; // 责任单位统计 export const getCountResponsibleUnit = (params: {}) => { @@ -21,7 +23,9 @@ export const getCountResponsibleUnit = (params: {}) => { }; // 责任区域分析 export const getCountHiddenDangerInspectRegion = (params: {}) => { - return http.post(BASEURL + `/xmgl/hiddenDangerInspectRecord/countHiddenDangerInspectRegion`, params, { headers: { noLoading: true } }); + return http.post(BASEURL + `/xmgl/hiddenDangerInspectRecord/countHiddenDangerInspectRegion`, params, { + headers: { noLoading: true } + }); }; // -------------- 烟感监测 -------------- @@ -68,7 +72,6 @@ export const getEdgeAlarmTypeEnum = (params: {}) => { return http.get(BASEURL + `/xmgl/frontierProtectionDevAlarm/getFrontierProtectionAlarmTypeEnum`, params); }; - // -------------- 基坑监测 -------------- export const selectDeepExcavationList = (params: {}) => { return http.post(BASEURL + `/xmgl/deepExcavationEngineering/selectDeepExcavationList`, params); @@ -82,8 +85,6 @@ export const selectDeepPointList = (params: {}) => { return http.post(BASEURL + `/xmgl/deepExcavationPlaneFigureCoordinate/list`, params); }; - - // { // "measurePointNumber": "测点编号", // "relaId": "65", @@ -109,3 +110,21 @@ export const getSensorListByMeasurePointNumber = (params: {}) => { export const selectDeepExcavationCurrentDataList = (params: {}) => { return http.post(BASEURL + `/xmgl/deepExcavationCurrentData/selectDeepExcavationCurrentDataList`, params); }; + +// -------------- 临边防护报警 -------------- +// 分页查询临边防护-报警数据 +export const getFrontierProtectionPage = (params: {}) => { + return http.get(BASEURL + `/xmgl/frontierProtectionNoNetData/page`, params); +}; +// 分页查询临边防护-设备实时 +export const getNoNetDevPage = (params: {}) => { + return http.get(BASEURL + `/xmgl/frontierProtectionNoNetDev/page`, params); +}; +// 设备列表数量 +export const getCountFrontier = (params: {}) => { + return http.post(BASEURL + `/xmgl/frontierProtectionNoNetDev/countFrontierProtectionNoNetDev`, params); +}; +// 报警趋势 +export const getTrendData = (params: {}) => { + return http.post(BASEURL + `/xmgl/frontierProtectionNoNetData/getTrendData`, params); +}; diff --git a/src/assets/images/newedgeprotection-bg.png b/src/assets/images/newedgeprotection-bg.png new file mode 100644 index 0000000..bdcd4b1 Binary files /dev/null and b/src/assets/images/newedgeprotection-bg.png differ diff --git a/src/config/config.ts b/src/config/config.ts index 7fdbcd2..1ebdda5 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -23,12 +23,12 @@ export const BAIDU_MAP_KEY: string = ""; export const BASE_IMAGE_URL = import.meta.env.VITE_BASE_IMAGE_URL; // 项目环境标识配置 部署时需更改对应的项目 -// export const COMPANY: string = ""; //标准版 +export const COMPANY: string = ""; //标准版 // export const COMPANY: string = "zhzrf"; //中海·臻如府 // export const COMPANY: string = "zsbf"; //中水北方 // export const COMPANY: string = "as"; //鞍山项目 // export const COMPANY: string = "agjt"; //鞍钢集团 -export const COMPANY: string = "agjtLive"; //鞍钢集团现场大屏 +// export const COMPANY: string = "agjtLive"; //鞍钢集团现场大屏 // export const COMPANY: string = "agjtCommand"; //鞍钢集团指挥部大屏 // export const COMPANY: string = "agjtProjectKanban"; //鞍钢集团项目看板大屏 // export const COMPANY: string = "agjtOverviewScreen"; //鞍钢集团项目总览 diff --git a/src/config/staticMenu.ts b/src/config/staticMenu.ts index 564a69b..c68eebd 100644 --- a/src/config/staticMenu.ts +++ b/src/config/staticMenu.ts @@ -99,6 +99,10 @@ export const commonMenu: Array = [ { menuName: "安全教育", companyPath: "/safeEducation" + }, + { + menuName: "临边防护", + companyPath: "/newEdgeProtection" } ] }, @@ -347,7 +351,7 @@ export const AHSAMenu: Array = [ { menuName: "工程概况", companyPath: "/projectOverview" - }, + } ] }, { @@ -369,7 +373,7 @@ export const AHSAMenu: Array = [ { menuName: "卸料平台", companyPath: "/unloadPlatform" - }, + } ] }, { @@ -470,7 +474,7 @@ export const HFQCMenu: Array = [ { menuName: "AI智能预警", companyPath: "/aIEarlyWarning" - }, + } ] }, { @@ -480,7 +484,7 @@ export const HFQCMenu: Array = [ { menuName: "", companyPath: "/smartSafeHat" - }, + } ] }, { @@ -496,9 +500,9 @@ export const HFQCMenu: Array = [ companyPath: "/wallScaffold" }, { - menuName: "临边防护报警", + menuName: "临边防护", companyPath: "/edgeProtection2" - }, + } // { // menuName: "智能烟感监测", // companyPath: "/smokeSensor" @@ -512,7 +516,7 @@ export const HFQCMenu: Array = [ { menuName: "", companyPath: "/highFormwork" - }, + } ] } ]; //合肥启程项目 @@ -720,7 +724,7 @@ export const ASMenu: Array = [ export const AGJTMenu: Array = [ { moduleName: "工程概况", - modulePath: "/projectOverview", + modulePath: "/projectOverview" // menuList: [ // { // menuName: "工程概况", @@ -730,7 +734,7 @@ export const AGJTMenu: Array = [ }, { moduleName: "劳务管理", - modulePath: "/laborManagement", + modulePath: "/laborManagement" // menuList: [ // { // menuName: "劳务管理", @@ -740,7 +744,7 @@ export const AGJTMenu: Array = [ }, { moduleName: "车辆管理", - modulePath: "/vehicleManagement", + modulePath: "/vehicleManagement" // menuList: [ // { // menuName: "车辆管理", @@ -750,7 +754,7 @@ export const AGJTMenu: Array = [ }, { moduleName: "视频监控", - modulePath: "/videoManagement", + modulePath: "/videoManagement" // menuList: [ // { // menuName: "视频监控", @@ -760,7 +764,7 @@ export const AGJTMenu: Array = [ }, { moduleName: "AI预警", - modulePath: "/aIEarlyWarning", + modulePath: "/aIEarlyWarning" // menuList: [ // { // menuName: "AI预警", @@ -770,7 +774,7 @@ export const AGJTMenu: Array = [ }, { moduleName: "安全管理", - modulePath: "/securityManagement", + modulePath: "/securityManagement" // menuList: [ // { // menuName: "安全管理", @@ -780,7 +784,7 @@ export const AGJTMenu: Array = [ }, { moduleName: "质量管理", - modulePath: "/qualityManagement", + modulePath: "/qualityManagement" // menuList: [ // { // menuName: "质量管理", @@ -862,7 +866,7 @@ export const SLXMenu: Array = [ { menuName: "劳务管理", companyPath: "/laborManagement" - }, + } ] }, { @@ -1068,7 +1072,7 @@ export const ZSBFMenu: Array = [ { menuName: "劳务管理", companyPath: "/laborManagement" - }, + } ] }, { @@ -1236,7 +1240,7 @@ export const ZHZRFMenu: Array = [ { menuName: "", companyPath: "/laborManagement" - }, + } ] }, { @@ -1246,7 +1250,7 @@ export const ZHZRFMenu: Array = [ { menuName: "", companyPath: "/videoManagement" - }, + } ] }, { @@ -1256,7 +1260,7 @@ export const ZHZRFMenu: Array = [ { menuName: "", companyPath: "/vehicleManagement" - }, + } ] }, { @@ -1281,12 +1285,12 @@ export const ZHZRFMenu: Array = [ }, { menuName: "基坑监测", - companyPath: "/foundationPitMonitor", + companyPath: "/foundationPitMonitor" }, { menuName: "配电箱监测", companyPath: "/distributionMonitoring" - }, + } ] }, { @@ -1296,7 +1300,7 @@ export const ZHZRFMenu: Array = [ { menuName: "", companyPath: "/securityManagement" - }, + } ] }, { @@ -1306,7 +1310,7 @@ export const ZHZRFMenu: Array = [ { menuName: "", companyPath: "/qualityManagement" - }, + } ] }, { @@ -1316,10 +1320,9 @@ export const ZHZRFMenu: Array = [ { menuName: "", companyPath: "/aIEarlyWarning" - }, + } ] - }, - + } ]; //中海·臻如府 export const ZKAXMenu: Array = [ @@ -1352,7 +1355,7 @@ export const CQNAMenu: Array = [ }, { moduleName: "绿色施工", - modulePath: "/headNoise", + modulePath: "/headNoise" }, { moduleName: "劳务管理", @@ -1433,4 +1436,4 @@ export const ZKJCMenu: Array = [ } ] } -]; //中科佳成大屏 \ No newline at end of file +]; //中科佳成大屏 diff --git a/src/routers/modules/staticRouter.ts b/src/routers/modules/staticRouter.ts index 1ac7204..fa6504d 100644 --- a/src/routers/modules/staticRouter.ts +++ b/src/routers/modules/staticRouter.ts @@ -24,9 +24,9 @@ export const staticRouter: RouteRecordRaw[] = [ { path: "/large", name: "大屏", - // component: () => import("@/views/sevenLargeScreen/indexL.vue"), //七参数标准版 + component: () => import("@/views/sevenLargeScreen/indexL.vue"), //七参数标准版 // component: () => import("@/views/commandScreen/indexCommand.vue"), //指挥部大屏 - component: () => import("@/views/agjtLiveScreen/indexLive.vue"), //鞍钢现场大屏 + // component: () => import("@/views/agjtLiveScreen/indexLive.vue"), //鞍钢现场大屏 // component: () => import("@/views/overviewScreen/indexCommand.vue"), //总览大屏 // component: () => import("@/views/agjtProjectKanban/indexL.vue"), //鞍钢集团项目看板大屏 // component: () => import("@/views/sevenLargeScreen/indexL_syhy.vue"), // 只有一级路由(盘锦、嘉兴、鄱湖美湾医疗项目需切换至该首页) @@ -138,6 +138,11 @@ export const staticRouter: RouteRecordRaw[] = [ name: "临边防护", component: () => import("@/views/sevenLargeScreen/safetyManagement/edgeProtection/index_wdzs.vue") }, + { + path: "/newEdgeProtection", + name: "临边防护", + component: () => import("@/views/sevenLargeScreen/safetyManagement/newEdgeProtection/index.vue") + }, { path: "/toxicGasMonitor", name: "有毒气体监测", diff --git a/src/styles/reset.css b/src/styles/reset.css new file mode 100644 index 0000000..9d5006c --- /dev/null +++ b/src/styles/reset.css @@ -0,0 +1,23 @@ +@charset "UTF-8"; +/* Reset style sheet */ +/* 因为使用富文本编辑器才注释掉,如果你项目没有使用富文本编辑器,可以取消注释 */ +html, +body, +#app { + width: 100%; + height: 100%; + padding: 0; + margin: 0; + font-family: siyuan; +} + +html .el-message__badge, +body .el-message__badge, +#app .el-message__badge { + display: none; +} + +/* 解决 h1 标签在 webkit 内核浏览器中文字大小失效问题 */ +:-webkit-any(article, aside, nav, section) h1 { + font-size: 2em; +} diff --git a/src/styles/reset.min.css b/src/styles/reset.min.css new file mode 100644 index 0000000..c3e47bb --- /dev/null +++ b/src/styles/reset.min.css @@ -0,0 +1 @@ +html,body,#app{width:100%;height:100%;padding:0;margin:0;font-family:siyuan}html .el-message__badge,body .el-message__badge,#app .el-message__badge{display:none}:-webkit-any(article,aside,nav,section) h1{font-size:2em} diff --git a/src/styles/reset.scss b/src/styles/reset.scss index b49409a..f23d385 100644 --- a/src/styles/reset.scss +++ b/src/styles/reset.scss @@ -1,6 +1,8 @@ /* Reset style sheet */ + /* 因为使用富文本编辑器才注释掉,如果你项目没有使用富文本编辑器,可以取消注释 */ + // html, // body, // div, @@ -89,7 +91,6 @@ // vertical-align: baseline; // border: 0; // } - // /* HTML5 display-role reset for older browsers */ // article, // aside, @@ -130,20 +131,25 @@ html, body, #app { - width: 100%; - height: 100%; - padding: 0; - margin: 0; - font-family: siyuan; + width: 100%; + height: 100%; + padding: 0; + margin: 0; + font-family: siyuan; + .el-message__badge { + display: none; + } } + /* 解决 h1 标签在 webkit 内核浏览器中文字大小失效问题 */ + :-webkit-any(article, aside, nav, section) h1 { - font-size: 2em; + font-size: 2em; } + // input:-webkit-autofill { // box-shadow: inset 0 0 0 2000px pink !important; - // background-color: transparent; // transition: background-color 50000s ease-in-out 0s; -// } +// } \ No newline at end of file diff --git a/src/views/sevenLargeScreen/indexL.vue b/src/views/sevenLargeScreen/indexL.vue index c0ca042..f66f58c 100644 --- a/src/views/sevenLargeScreen/indexL.vue +++ b/src/views/sevenLargeScreen/indexL.vue @@ -1,22 +1,22 @@ @@ -97,7 +108,20 @@ import ScaleBox from "vue3-scale-box"; import { ref, reactive, onMounted, onBeforeUnmount, computed } from "vue"; import { getTaskTimeDetail } from "@/api/modules/schedulePlan"; import { jumpLargeUserInfoApi } from "@/api/modules/login"; -import { JSYCMenu, XJNBMenu, AHSAMenu, HFQCMenu,ASMenu,AGJTMenu,SLXMenu,ZSBFMenu,ZHZRFMenu, ZKAXMenu, CQNAMenu, ZKJCMenu } from "@/config/staticMenu"; +import { + JSYCMenu, + XJNBMenu, + AHSAMenu, + HFQCMenu, + ASMenu, + AGJTMenu, + SLXMenu, + ZSBFMenu, + ZHZRFMenu, + ZKAXMenu, + CQNAMenu, + ZKJCMenu +} from "@/config/staticMenu"; import { COMPANY } from "@/config/config"; import { useRouter } from "vue-router"; @@ -114,31 +138,31 @@ const projectTimeInfo = ref({} as any); const contentWidth = ref(0); const contentHeight = ref(0); const calculateAspectRatio = () => { - const container = document.querySelector('.largeScreen'); + const container = document.querySelector(".largeScreen"); // const containerWidth = document.body.offsetWidth; const containerWidth = document.documentElement.offsetWidth; - // const containerWidth: number = (container).offsetWidth; - // const containerHeight = document.body.offsetHeight; - const containerHeight = document.documentElement.offsetHeight; - // const containerHeight: number = (container).offsetHeight; - console.log(containerWidth, containerHeight) - const aspectRatio = 16 / 9; // 16:9 比例 - const containerAspectRatio = containerWidth / containerHeight; - if (containerAspectRatio > aspectRatio) { - // 以高度为基准,按比例计算宽度 - contentHeight.value = containerHeight; - contentWidth.value = Math.floor(containerHeight * aspectRatio); - } else { - // 以宽度为基准,按比例计算高度 - contentWidth.value = containerWidth; - contentHeight.value = Math.floor(containerWidth / aspectRatio); - } - console.log('contentWidth',contentWidth.value) - console.log('contentHeight',contentHeight.value) + // const containerWidth: number = (container).offsetWidth; + // const containerHeight = document.body.offsetHeight; + const containerHeight = document.documentElement.offsetHeight; + // const containerHeight: number = (container).offsetHeight; + console.log(containerWidth, containerHeight); + const aspectRatio = 16 / 9; // 16:9 比例 + const containerAspectRatio = containerWidth / containerHeight; + if (containerAspectRatio > aspectRatio) { + // 以高度为基准,按比例计算宽度 + contentHeight.value = containerHeight; + contentWidth.value = Math.floor(containerHeight * aspectRatio); + } else { + // 以宽度为基准,按比例计算高度 + contentWidth.value = containerWidth; + contentHeight.value = Math.floor(containerWidth / aspectRatio); + } + console.log("contentWidth", contentWidth.value); + console.log("contentHeight", contentHeight.value); }; -const scaleChange = (data:any) => { +const scaleChange = (data: any) => { store.globalScale = data; -} +}; const getProjectInfo = async () => { getNowDate(); const res: any = await getTaskTimeDetail({ projectSn: store.sn }); @@ -303,6 +327,10 @@ let menuList = ref([ { menuName: "安全教育", companyPath: "/safeEducation" + }, + { + menuName: "临边防护", + companyPath: "/newEdgeProtection" } ] }, @@ -423,9 +451,9 @@ const activeTab = ref(0); const activeTab2 = ref(0); const router = useRouter(); const getAspectRatioStyle = computed(() => ({ - width: `${contentWidth.value}px`, - height: `${contentHeight.value}px` - })) + width: `${contentWidth.value}px`, + height: `${contentHeight.value}px` +})); //获取动态tab const getAllModelMenu = () => { let half = store.projectDateAuth.moduleList; @@ -447,17 +475,18 @@ const navigateTo = (path, type) => { router.push(path.modulePath); } else { activeTab2.value = path.companyPath; - router.push(path.companyPath); + router.push({ + path: path.companyPath + }); } }; onMounted(async () => { - if (window.location.href.indexOf("token") != -1) { console.log("免登录跳转进来了吗----", window.location.href.indexOf("token")); const newToken = window.location.href.split("token=")[1].split("&")[0]; const data: any = await jumpLargeUserInfoApi({ token: newToken }); console.log("跳转请求的数据----", data.result); - if(data.result.sn){ + if (data.result.sn) { store.setSN(data.result.sn); } store.setToken(data.result.token); @@ -519,20 +548,20 @@ onMounted(async () => { document.addEventListener("click", bodyCloseMenus); const subMenus = document.querySelectorAll(".menStyle"); const dataBoardContent = document.querySelector(".dataBoardContent"); - if (subMenus.length >= 5 && COMPANY !== 'hfqc') { + if (subMenus.length >= 5 && COMPANY !== "hfqc") { subMenus[4].style.marginLeft = "30%"; } - if (COMPANY === 'hfqc'){ + if (COMPANY === "hfqc") { subMenus[3].style.marginLeft = "44%"; } - if (COMPANY === 'zhzrf'){ + if (COMPANY === "zhzrf") { // subMenus[4].style.marginLeft = "34%"; } - if(COMPANY === 'agjt'){ - dataBoardContent.style.height = '85%' - dataBoardContent.style.margin = '30px auto 16px auto' + if (COMPANY === "agjt") { + dataBoardContent.style.height = "85%"; + dataBoardContent.style.margin = "30px auto 16px auto"; } - if (COMPANY === 'zkjc'){ + if (COMPANY === "zkjc") { subMenus[1].style.marginLeft = "5%"; subMenus[1].style.marginRight = "auto"; subMenus[2].style.marginRight = "5%"; @@ -540,16 +569,15 @@ onMounted(async () => { } await getProjectInfo(); - calculateAspectRatio(); - window.addEventListener('resize', calculateAspectRatio); + window.addEventListener("resize", calculateAspectRatio); }); let timer = ref(null as any); onBeforeUnmount(() => { clearInterval(timer); document.removeEventListener("click", bodyCloseMenus); - window.removeEventListener('resize', calculateAspectRatio); + window.removeEventListener("resize", calculateAspectRatio); }); function bodyCloseMenus() { @@ -583,15 +611,15 @@ function loginOut() { } //跳转后台 function jumpBgd() { - const envList = ["agjt","zkax","zkjc","hfqc"]; // 环境标识 + const envList = ["agjt", "zkax", "zkjc", "hfqc"]; // 环境标识 // 标准版——跳转演示平台项目后台 if (COMPANY == "") { window.location.replace("http://jxj.zhgdyun.com:100/#/login?token=" + store.token); - }else if(COMPANY === "as"){ + } else if (COMPANY === "as") { window.location.replace("http://182.90.224.237:15551/#/login?token=" + store.token); - }else if(envList.includes(COMPANY)){ + } else if (envList.includes(COMPANY)) { window.location.replace(BASEURL + "/#/login?token=" + store.token); - }else { + } else { // 新项目通用(百色服务器) window.location.replace("http://101.43.164.214:11111/#/login?token=" + store.token); // window.location.replace("http://192.168.34.138:8080/#/login?token=" + store.token); @@ -608,21 +636,24 @@ function jumpBgd() {