diff --git a/src/config/config.ts b/src/config/config.ts index 06880ef..e69de29 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -1,45 +0,0 @@ -// ? 全局不动配置项 只做导出不做修改 - -// * 首页地址(默认) -export const HOME_URL: string = "/government"; - -// * 登录页地址(默认) -export const LOGIN_URL: string = "/login"; - -// export const PROJECT_URL: string = "/projectlogon"; - -// * 默认主题颜色 -export const DEFAULT_PRIMARY: string = "#008BFF"; - -// * 路由白名单地址(必须是本地存在的路由 staticRouter.ts) -export const ROUTER_WHITE_LIST: string[] = ["/500", "/projectlogon", "/compLogon"]; - -// * 高德地图 key -export const AMAP_MAP_KEY: string = "142e51d55274a0140e838245345cf9ad"; - -// * 百度地图 key -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 = "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 = "agjtCommand"; //鞍钢集团指挥部大屏 -// export const COMPANY: string = "agjtProjectKanban"; //鞍钢集团项目看板大屏 -export const COMPANY: string = "agjtOverviewScreen"; //鞍钢集团项目总览 -// export const COMPANY: string = "zkjc"; //中科佳成项目 -// export const COMPANY: string = "cqna"; //重庆南岸项目 -// export const COMPANY: string = "slx"; //苏立信项目 -// export const COMPANY: string = "hfqc"; //合肥启程项目 -// export const COMPANY: string = "jsyc"; // 江苏盐城项目 -// export const COMPANY: string = "syhy"; //沈阳合盈盘锦项目 (需要去src\routers\modules\staticRouter.ts更换首页) -// export const COMPANY: string = "jxwjj"; //嘉兴王江泾公用码头项目 (需要去src\routers\modules\staticRouter.ts更换首页) -// export const COMPANY: string = "phmw"; //鄱湖美湾医疗、医美产业集群项目 (需要去src\routers\modules\staticRouter.ts更换首页) -// export const COMPANY: string = "xjnb"; // 新建宁波项目 -// export const COMPANY: string = "ahsa"; // 安徽水安项目 -// export const COMPANY: string = "zkax"; // 中科安信项目 diff --git a/src/views/agjtLiveScreen/liveScreen/centerBottomLeft.vue b/src/views/agjtLiveScreen/liveScreen/centerBottomLeft.vue index 1a8ae94..e44a386 100644 --- a/src/views/agjtLiveScreen/liveScreen/centerBottomLeft.vue +++ b/src/views/agjtLiveScreen/liveScreen/centerBottomLeft.vue @@ -49,6 +49,7 @@ import { selectWorkerTeamAndDepartmentStatisticsApi, } from "@/api/modules/agjtLiveApi"; const store = GlobalStore(); +const BASEURL = import.meta.env.VITE_API_URL //获取劳务实名制信息 const lwInfo1 = ref({} as any) @@ -56,11 +57,14 @@ const lwInfo2 = ref({} as any) async function getLwInfo() { //获取企业Id await getEnterpriseIdApi().then(res => { - // console.log("获取企业id",res.result.id) + let data = { + projectSn: '', + } + if(BASEURL == 'http://182.90.224.237:51234' || BASEURL == 'http://192.168.34.221:9111') data.projectSn = 'BD3137498CB84BF0969979E0342CDBCA' + if(BASEURL == 'http://42.180.188.17:9809' || BASEURL == 'http://42.180.188.17:11211') data.projectSn = '471568F45EB247A3912A0D10EA1BFCEB' selectPersonTypeAndEduStatisticsApi({ enterpriseId: res.result.id, - // projectSn: store.sn, - projectSn: 'BD3137498CB84BF0969979E0342CDBCA' // yh001---ProjectSn + projectSn: data.projectSn, }).then(res1 => { if(res1.success){ if(res1.result){ @@ -69,8 +73,7 @@ async function getLwInfo() { } }) selectWorkerTeamAndDepartmentStatisticsApi({ - // projectSn: store.sn, - projectSn: 'BD3137498CB84BF0969979E0342CDBCA' // yh001---ProjectSn + projectSn: data.projectSn, }).then(res2 => { if(res2.success){ if(res2.result){ diff --git a/src/views/agjtLiveScreen/liveScreen/centerBottomRight.vue b/src/views/agjtLiveScreen/liveScreen/centerBottomRight.vue index ba9686d..4682078 100644 --- a/src/views/agjtLiveScreen/liveScreen/centerBottomRight.vue +++ b/src/views/agjtLiveScreen/liveScreen/centerBottomRight.vue @@ -40,26 +40,22 @@ import { qualityPageApi, } from "@/api/modules/agjtLiveApi"; const store = GlobalStore(); +const BASEURL = import.meta.env.VITE_API_URL //获取质量待办信息 const qualityData = ref([] as any) async function getQualityData() { - - //获取企业Id - await getEnterpriseIdApi().then(res => { + let data = { + page: 1, + pageSize: 9999, + status: 60, + projectSn: '', + } + if(BASEURL == 'http://182.90.224.237:51234' || BASEURL == 'http://192.168.34.221:9111') data.projectSn = 'BD3137498CB84BF0969979E0342CDBCA' + if(BASEURL == 'http://42.180.188.17:9809' || BASEURL == 'http://42.180.188.17:11211') data.projectSn = '471568F45EB247A3912A0D10EA1BFCEB' + qualityPageApi(data).then(res => { if(res.success){ - qualityPageApi({ - page: 1, - pageSize: 9999, - status: 60, - // enterpriseId: res.result.id, - // projectSn: store.sn, - projectSn: 'BD3137498CB84BF0969979E0342CDBCA', // yh001---ProjectSn - }).then(res2 => { - if(res2.success){ - qualityData.value = res2.result.page.records - } - }); + qualityData.value = res.result.page.records } }); }; diff --git a/src/views/agjtLiveScreen/liveScreen/centerTop.vue b/src/views/agjtLiveScreen/liveScreen/centerTop.vue index 024b745..fdea7f5 100644 --- a/src/views/agjtLiveScreen/liveScreen/centerTop.vue +++ b/src/views/agjtLiveScreen/liveScreen/centerTop.vue @@ -39,6 +39,7 @@ import setVideoDialog from "@/components/setVideoDialog.vue"; import { configWeekVideoListApi } from "@/api/modules/agjtLiveApi"; import moment from "moment"; const store = GlobalStore(); +const BASEURL = import.meta.env.VITE_API_URL const videoList = ref([] as any); // ts type Props = { @@ -67,7 +68,7 @@ watch( } ); -const BASEURL = import.meta.env.VITE_API_URL; +// const BASEURL = import.meta.env.VITE_API_URL; // 显示视频 // const showVideo = ref(1 as any); const showVideo = ref(2 as any); @@ -79,13 +80,13 @@ const updateConfig = () => { }; // 获取一周的配置视频数据 const configWeekVideoListFn = async (showLoading: boolean) => { - const res: any = await configWeekVideoListApi( - { - projectSn: store.sn, - type: 3 - }, - showLoading - ); + let data = { + projectSn: '', + type: 3 + } + if(BASEURL == 'http://182.90.224.237:51234' || BASEURL == 'http://192.168.34.221:9111') data.projectSn = 'BD3137498CB84BF0969979E0342CDBCA' + if(BASEURL == 'http://42.180.188.17:9809' || BASEURL == 'http://42.180.188.17:11211') data.projectSn = '471568F45EB247A3912A0D10EA1BFCEB' + const res: any = await configWeekVideoListApi(data, showLoading); if (res.result) { // 星期参数 const today = moment().format("d"); diff --git a/src/views/agjtLiveScreen/liveScreen/index.vue b/src/views/agjtLiveScreen/liveScreen/index.vue index ebfaa36..e4f0570 100644 --- a/src/views/agjtLiveScreen/liveScreen/index.vue +++ b/src/views/agjtLiveScreen/liveScreen/index.vue @@ -43,14 +43,15 @@ import { countTaskProgressApi, } from "@/api/modules/agjtLiveApi"; const store = GlobalStore(); +const BASEURL = import.meta.env.VITE_API_URL const statisticsCount = ref(null as any); const projectData = ref(null as any); //获取项目信息 -const getProjectInfo = async (showLoading: boolean) => { - const res = await getProjectDetail({ projectSn: store.sn },showLoading); - projectData.value = res.result; -}; +// const getProjectInfo = async (showLoading: boolean) => { +// const res = await getProjectDetail({ projectSn: store.sn },showLoading); +// projectData.value = res.result; +// }; //获取项目剩余天数信息 const remainDays = ref('0' as any) @@ -58,12 +59,13 @@ async function countTaskProgress() { //获取企业Id await getEnterpriseIdApi().then(res => { if(res.success){ - // console.log("获取企业id",res.result.id) - countTaskProgressApi({ - enterpriseId: res.result.id, - // projectSn: store.sn - projectSn: 'BD3137498CB84BF0969979E0342CDBCA' // yh001---ProjectSn - }).then(res2 => { + let data = { + enterpriseId: res.result.id, + projectSn: '', + } + if(BASEURL == 'http://182.90.224.237:51234' || BASEURL == 'http://192.168.34.221:9111') data.projectSn = 'BD3137498CB84BF0969979E0342CDBCA' + if(BASEURL == 'http://42.180.188.17:9809' || BASEURL == 'http://42.180.188.17:11211') data.projectSn = '471568F45EB247A3912A0D10EA1BFCEB' + countTaskProgressApi(data).then(res2 => { remainDays.value = res2.result.projectSurplusDayNum.toString() }) } diff --git a/src/views/agjtLiveScreen/liveScreen/leftBottom.vue b/src/views/agjtLiveScreen/liveScreen/leftBottom.vue index f3c88f6..e34a56a 100644 --- a/src/views/agjtLiveScreen/liveScreen/leftBottom.vue +++ b/src/views/agjtLiveScreen/liveScreen/leftBottom.vue @@ -24,6 +24,7 @@ import { getStatBySpecialApi, } from "@/api/modules/agjtLiveApi"; const store = GlobalStore(); +const BASEURL = import.meta.env.VITE_API_URL const isShow = ref(false as any) @@ -38,10 +39,12 @@ const outPie = ref([ //获取特殊作业情况信息 async function getSpecialInfo() { - await getStatBySpecialApi({ - // projectSn: store.sn, - projectSn: 'BD3137498CB84BF0969979E0342CDBCA', // yh001---ProjectSn - }).then(res => { + let data = { + projectSn: '', + } + if(BASEURL == 'http://182.90.224.237:51234' || BASEURL == 'http://192.168.34.221:9111') data.projectSn = 'BD3137498CB84BF0969979E0342CDBCA' + if(BASEURL == 'http://42.180.188.17:9809' || BASEURL == 'http://42.180.188.17:11211') data.projectSn = '471568F45EB247A3912A0D10EA1BFCEB' + await getStatBySpecialApi(data).then(res => { if(res.success){ if(res.result){ //内饼图 diff --git a/src/views/agjtLiveScreen/liveScreen/leftCenter.vue b/src/views/agjtLiveScreen/liveScreen/leftCenter.vue index e9662ac..ad207a6 100644 --- a/src/views/agjtLiveScreen/liveScreen/leftCenter.vue +++ b/src/views/agjtLiveScreen/liveScreen/leftCenter.vue @@ -29,6 +29,7 @@ import { selectAIPageListApi, } from "@/api/modules/agjtLiveApi"; const store = GlobalStore(); +const BASEURL = import.meta.env.VITE_API_URL //是否有数据 const isData = ref(false as any) @@ -39,15 +40,16 @@ async function getAlarmInfo() { //获取企业Id await getEnterpriseIdApi().then(res => { if(res.success){ - // console.log("获取企业id",res.result.id) - selectAIPageListApi({ + let data = { pageNo: 1, pageSize: 1, enterpriseId: res.result.id, isPushed: 1, - // projectSn: store.sn, - projectSn: 'BD3137498CB84BF0969979E0342CDBCA' // yh001---ProjectSn - }).then(res2 => { + projectSn: '', + } + if(BASEURL == 'http://182.90.224.237:51234' || BASEURL == 'http://192.168.34.221:9111') data.projectSn = 'BD3137498CB84BF0969979E0342CDBCA' + if(BASEURL == 'http://42.180.188.17:9809' || BASEURL == 'http://42.180.188.17:11211') data.projectSn = '471568F45EB247A3912A0D10EA1BFCEB' + selectAIPageListApi(data).then(res2 => { if(res2.success){ if(res2.result.records && res2.result.records.length !== 0){ alarmInfo.value = res2.result.records[0] diff --git a/src/views/agjtLiveScreen/liveScreen/leftTop.vue b/src/views/agjtLiveScreen/liveScreen/leftTop.vue index eadc59b..9cdb7b2 100644 --- a/src/views/agjtLiveScreen/liveScreen/leftTop.vue +++ b/src/views/agjtLiveScreen/liveScreen/leftTop.vue @@ -47,18 +47,21 @@ import { getEnterpriseInfoByIdApi, } from "@/api/modules/agjtLiveApi"; const store = GlobalStore(); +const BASEURL = import.meta.env.VITE_API_URL const cbsProjectInfo = ref({} as any) async function getCbsProjectInfo() { + console.log("BASEURL===>",BASEURL) //获取企业Id await getEnterpriseIdApi().then(res => { if(res.success){ - // console.log("获取企业id",res.result.id) - getEnterpriseInfoByIdApi({ - enterpriseId: res.result.id, - // projectSn: store.sn - projectSn: 'BD3137498CB84BF0969979E0342CDBCA' // yh001---ProjectSn - }).then(res2 => { + let data = { + enterpriseId: res.result.id, + projectSn: '', + } + if(BASEURL == 'http://182.90.224.237:51234' || BASEURL == 'http://192.168.34.221:9111') data.projectSn = 'BD3137498CB84BF0969979E0342CDBCA' + if(BASEURL == 'http://42.180.188.17:9809' || BASEURL == 'http://42.180.188.17:11211') data.projectSn = '471568F45EB247A3912A0D10EA1BFCEB' + getEnterpriseInfoByIdApi(data).then(res2 => { cbsProjectInfo.value = res2.result.projectEnterprise }) } diff --git a/src/views/agjtLiveScreen/liveScreen/rightBottom.vue b/src/views/agjtLiveScreen/liveScreen/rightBottom.vue index 55957d6..e2e9d88 100644 --- a/src/views/agjtLiveScreen/liveScreen/rightBottom.vue +++ b/src/views/agjtLiveScreen/liveScreen/rightBottom.vue @@ -51,17 +51,20 @@ import { securityPageApi, } from "@/api/modules/agjtLiveApi"; const store = GlobalStore(); +const BASEURL = import.meta.env.VITE_API_URL //获取安全待办信息 const securityData = ref([] as any) async function getSecurityData() { - await securityPageApi({ + let data = { page: 1, pageSize: 9999, status: 60, - // projectSn: store.sn, - projectSn: 'BD3137498CB84BF0969979E0342CDBCA', // yh001---ProjectSn - }).then(res => { + projectSn: '', + } + if(BASEURL == 'http://182.90.224.237:51234' || BASEURL == 'http://192.168.34.221:9111') data.projectSn = 'BD3137498CB84BF0969979E0342CDBCA' + if(BASEURL == 'http://42.180.188.17:9809' || BASEURL == 'http://42.180.188.17:11211') data.projectSn = '471568F45EB247A3912A0D10EA1BFCEB' + await securityPageApi(data).then(res => { if(res.success){ securityData.value = res.result.page.records } diff --git a/src/views/agjtLiveScreen/liveScreen/rightTop.vue b/src/views/agjtLiveScreen/liveScreen/rightTop.vue index 13a5109..b3efc86 100644 --- a/src/views/agjtLiveScreen/liveScreen/rightTop.vue +++ b/src/views/agjtLiveScreen/liveScreen/rightTop.vue @@ -51,16 +51,21 @@ import { emergencyPageApi } from "@/api/modules/agjtLiveApi"; const store = GlobalStore(); +const BASEURL = import.meta.env.VITE_API_URL //获取应急记录信息 const emergencyData = ref([] as any) async function getEmergencyDataData() { - await emergencyPageApi({ + let data = { page: 1, pageSize: 9999, // inDispositionStatus: '', // 数据类型:字符串,1:待救援、2:救援中、3:已救援 - // projectSn: store.sn, - projectSn: 'BD3137498CB84BF0969979E0342CDBCA', // yh001---ProjectSn + projectSn: '', + } + if(BASEURL == 'http://182.90.224.237:51234' || BASEURL == 'http://192.168.34.221:9111') data.projectSn = 'BD3137498CB84BF0969979E0342CDBCA' + if(BASEURL == 'http://42.180.188.17:9809' || BASEURL == 'http://42.180.188.17:11211') data.projectSn = '471568F45EB247A3912A0D10EA1BFCEB' + await emergencyPageApi({ + }).then(res => { if(res.success){ emergencyData.value = res.result.records