fix: BUG修改
This commit is contained in:
parent
e8d1f3e505
commit
222eacd61c
14
src/api/modules/huizhou.ts
Normal file
14
src/api/modules/huizhou.ts
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import { ResPage, User } from "@/api/types/common";
|
||||||
|
// import { BASEURL } from "@/api/config/servicePort";
|
||||||
|
import http from "@/api";
|
||||||
|
|
||||||
|
const BASEURL = import.meta.env.VITE_API_URL;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name 惠州项目
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 分析token
|
||||||
|
export const userAnalysis = (params: any) => {
|
||||||
|
return http.post(BASEURL + `/xmgl/systemUser/analysis`, params);
|
||||||
|
};
|
||||||
BIN
src/assets/images/123.gif
Normal file
BIN
src/assets/images/123.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 269 KiB |
@ -10,12 +10,20 @@ window._AMapSecurityConfig = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const amap = (async function (Loader, AMAP_MAP_KEY) {
|
const amap = (async function (Loader, AMAP_MAP_KEY) {
|
||||||
return Loader.load({
|
return await Loader.load({
|
||||||
key: AMAP_MAP_KEY,
|
key: AMAP_MAP_KEY,
|
||||||
version: "2.0",
|
version: "2.0",
|
||||||
plugins: ["AMap.PlaceSearch", "AMap.AutoComplete", "AMap.Geocoder"]
|
plugins: ["AMap.PlaceSearch", "AMap.AutoComplete", "AMap.Geocoder"]
|
||||||
});
|
});
|
||||||
})(AMapLoader, AMAP_MAP_KEY);
|
})(AMapLoader, AMAP_MAP_KEY);
|
||||||
|
// let amap = new Promise((resolve, reject) => {
|
||||||
|
// let responseData = AMapLoader.load({
|
||||||
|
// key: AMAP_MAP_KEY,
|
||||||
|
// version: "2.0",
|
||||||
|
// plugins: ["AMap.PlaceSearch", "AMap.AutoComplete", "AMap.Geocoder"]
|
||||||
|
// });
|
||||||
|
// resolve(responseData);
|
||||||
|
// });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 初始化 AMap,等待地图加载完成
|
* @description: 初始化 AMap,等待地图加载完成
|
||||||
@ -24,6 +32,11 @@ const amap = (async function (Loader, AMAP_MAP_KEY) {
|
|||||||
async function initAMap() {
|
async function initAMap() {
|
||||||
try {
|
try {
|
||||||
const AMap = await amap;
|
const AMap = await amap;
|
||||||
|
// const AMap = AMapLoader.load({
|
||||||
|
// key: AMAP_MAP_KEY,
|
||||||
|
// version: "2.0",
|
||||||
|
// plugins: ["AMap.PlaceSearch", "AMap.AutoComplete", "AMap.Geocoder"]
|
||||||
|
// });
|
||||||
return AMap;
|
return AMap;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
|||||||
@ -85,29 +85,29 @@
|
|||||||
}
|
}
|
||||||
.el-pager li {
|
.el-pager li {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: var(--el-color-primary);
|
color: $primary-light-text-color;
|
||||||
border: 1px solid var(--el-color-primary);
|
border: 1px solid $primary-light-border-color;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
}
|
}
|
||||||
.el-pager li:active {
|
.el-pager li:active {
|
||||||
color: var(--el-color-primary);
|
color: $primary-light-text-color;
|
||||||
border: none;
|
border: none;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
}
|
}
|
||||||
.el-pager li.is-active {
|
.el-pager li.is-active {
|
||||||
background-color: var(--el-color-primary);
|
background-color: $primary-light-bg-color;
|
||||||
color: #fff;
|
color: $primary-light-text-color;
|
||||||
}
|
}
|
||||||
.el-pagination__total {
|
.el-pagination__total {
|
||||||
color: var(--el-color-primary);
|
color: $primary-light-text-color;
|
||||||
}
|
}
|
||||||
.btn-prev,
|
.btn-prev,
|
||||||
.btn-next,
|
.btn-next,
|
||||||
.btn-prev:disabled,
|
.btn-prev:disabled,
|
||||||
.btn-next:disabled {
|
.btn-next:disabled {
|
||||||
color: var(--el-color-primary);
|
color: $primary-light-text-color;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: 1px solid var(--el-color-primary);
|
border: 1px solid $primary-light-bg-color;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,7 +49,7 @@ const gridRef = ref();
|
|||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
.card {
|
.card {
|
||||||
background-color: #092945;
|
background-color: $primary-light-bg-color;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
// :deep(.el-form-item--default) {
|
// :deep(.el-form-item--default) {
|
||||||
|
|||||||
@ -11,8 +11,8 @@ import { ref, reactive, nextTick, computed } from "vue";
|
|||||||
import { useTheme } from "@/hooks/useTheme";
|
import { useTheme } from "@/hooks/useTheme";
|
||||||
const { changePrimary } = useTheme();
|
const { changePrimary } = useTheme();
|
||||||
const changePrimaryVal = (val: string) => {
|
const changePrimaryVal = (val: string) => {
|
||||||
const body = document.body as HTMLElement;
|
// const body = document.body as HTMLElement;
|
||||||
body.setAttribute("style", `filter: opacity(0.7);background-color: ${val};`);
|
// body.setAttribute("style", `filter: opacity(0.7);background-color: ${val};`);
|
||||||
// body.setAttribute("style", "filter: invert(80%)");
|
// body.setAttribute("style", "filter: invert(80%)");
|
||||||
changePrimary(val);
|
changePrimary(val);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -20,6 +20,14 @@ export const staticRouter: RouteRecordRaw[] = [
|
|||||||
title: "登录"
|
title: "登录"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/load",
|
||||||
|
name: "load",
|
||||||
|
component: () => import("@/views/loading/index.vue"),
|
||||||
|
meta: {
|
||||||
|
title: "加载"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/home",
|
path: "/home",
|
||||||
name: "home",
|
name: "home",
|
||||||
|
|||||||
@ -385,6 +385,14 @@
|
|||||||
margin-right: 14%;
|
margin-right: 14%;
|
||||||
background: rgb(0 0 0 / 10%);
|
background: rgb(0 0 0 / 10%);
|
||||||
}
|
}
|
||||||
|
.btnStyle {
|
||||||
|
background-color: #087ba4;
|
||||||
|
border-color: #087ba4;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.darkStyle {
|
||||||
|
background-color: #087ba4;
|
||||||
|
}
|
||||||
.el-table__body tr:hover > td {
|
.el-table__body tr:hover > td {
|
||||||
// background-color: #008bff !important;
|
// background-color: #008bff !important;
|
||||||
background-color: rgb(0 139 255 / 10%) !important;
|
background-color: rgb(0 139 255 / 10%) !important;
|
||||||
|
|||||||
@ -1,2 +1,14 @@
|
|||||||
/* 全局 css 变量 */
|
/* 全局 css 变量 */
|
||||||
$primary-color: var(--el-color-primary);
|
$primary-color: var(--el-color-primary);
|
||||||
|
|
||||||
|
// light主题
|
||||||
|
$primary-light-main-color: #087ba4;
|
||||||
|
$primary-light-bg-color: #087ba4;
|
||||||
|
$primary-light-border-color: #087ba4;
|
||||||
|
$primary-light-text-color: white;
|
||||||
|
|
||||||
|
// dark主题
|
||||||
|
$primary-dark-main-color: #092945;
|
||||||
|
$primary-dark-bg-color: #092945;
|
||||||
|
$primary-dark-border-color: #087ba4;
|
||||||
|
$primary-dark-text-color: #087ba4;
|
||||||
|
|||||||
@ -355,7 +355,7 @@ onMounted(async () => {
|
|||||||
height: 78px !important;
|
height: 78px !important;
|
||||||
}
|
}
|
||||||
:deep(.content) {
|
:deep(.content) {
|
||||||
height: calc(100% - 100px) !important;
|
height: calc(100% - 150px) !important;
|
||||||
}
|
}
|
||||||
.leftProject {
|
.leftProject {
|
||||||
// padding: 5px 8px;
|
// padding: 5px 8px;
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
height: 78px !important;
|
height: 78px !important;
|
||||||
}
|
}
|
||||||
:deep(.content) {
|
:deep(.content) {
|
||||||
height: calc(100% - 100px) !important;
|
height: calc(100% - 150px) !important;
|
||||||
}
|
}
|
||||||
.leftProject {
|
.leftProject {
|
||||||
// padding: 5px 8px;
|
// padding: 5px 8px;
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
height: 78px !important;
|
height: 78px !important;
|
||||||
}
|
}
|
||||||
:deep(.content) {
|
:deep(.content) {
|
||||||
height: calc(100% - 100px) !important;
|
height: calc(100% - 170px) !important;
|
||||||
}
|
}
|
||||||
.leftProject {
|
.leftProject {
|
||||||
// padding: 5px 8px;
|
// padding: 5px 8px;
|
||||||
@ -168,9 +168,9 @@
|
|||||||
.btn-next,
|
.btn-next,
|
||||||
.btn-prev:disabled,
|
.btn-prev:disabled,
|
||||||
.btn-next:disabled {
|
.btn-next:disabled {
|
||||||
color: var(--el-color-primary);
|
color: white;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: 1px solid var(--el-color-primary);
|
border: 1px solid #087ba4;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,8 +42,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="handleSearch">查询</el-button>
|
<el-button class="btnStyle" type="primary" @click="handleSearch">查询</el-button>
|
||||||
<el-button style="background-color: #ffb750; color: #fff">刷新</el-button>
|
<el-button class="btnStyle">刷新</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
|
|||||||
@ -136,6 +136,7 @@ import initAMap from "@/components/AMap/AMap";
|
|||||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||||
import MapTopData from "@/components/MapTopData/index.vue";
|
import MapTopData from "@/components/MapTopData/index.vue";
|
||||||
import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government/AIwaring";
|
import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government/AIwaring";
|
||||||
|
import { setTimeout } from "timers/promises";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
@ -388,12 +389,11 @@ watch(
|
|||||||
);
|
);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await mapData();
|
|
||||||
// getAIengPage();
|
// getAIengPage();
|
||||||
getStatisticsList();
|
getStatisticsList();
|
||||||
getproList();
|
getproList();
|
||||||
await getAIproPage();
|
await getAIproPage();
|
||||||
|
await mapData();
|
||||||
onSearch(records.value[0]);
|
onSearch(records.value[0]);
|
||||||
// addMarker();
|
// addMarker();
|
||||||
});
|
});
|
||||||
|
|||||||
76
src/views/loading/index.vue
Normal file
76
src/views/loading/index.vue
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
<template>
|
||||||
|
<div class="main">
|
||||||
|
<div class="bg_gif"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="load">
|
||||||
|
import { onMounted } from "vue";
|
||||||
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
import { userAnalysis } from "@/api/modules/huizhou";
|
||||||
|
import { ElMessage } from "element-plus";
|
||||||
|
import { GlobalStore } from "@/stores";
|
||||||
|
import { TabsStore } from "@/stores/modules/tabs";
|
||||||
|
import { KeepAliveStore } from "@/stores/modules/keepAlive";
|
||||||
|
import { initDynamicRouter } from "@/routers/modules/dynamicRouter";
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const globalStore = GlobalStore();
|
||||||
|
const tabsStore = TabsStore();
|
||||||
|
const keepAlive = KeepAliveStore();
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
tokenIdentify();
|
||||||
|
});
|
||||||
|
|
||||||
|
const tokenIdentify = async () => {
|
||||||
|
const res = await userAnalysis({
|
||||||
|
ssoToken: route.query.token
|
||||||
|
});
|
||||||
|
if (res.result) {
|
||||||
|
let responseData = res.result;
|
||||||
|
globalStore.setToken(responseData.token);
|
||||||
|
globalStore.setAccount(responseData.account);
|
||||||
|
globalStore.setAccountType(responseData.accountType);
|
||||||
|
globalStore.setProjectDateAuth(responseData.projectDateAuth);
|
||||||
|
globalStore.setIsManager(responseData.isManager); //我已知晓
|
||||||
|
// 2.添加动态路由
|
||||||
|
// await initDynamicRouter();
|
||||||
|
// router.push(arr[result.accountType - 1]);
|
||||||
|
// 3.清空 tabs、keepAlive 保留的数据
|
||||||
|
tabsStore.closeMultipleTab();
|
||||||
|
keepAlive.setKeepAliveName();
|
||||||
|
|
||||||
|
if (responseData.accountType === 2) {
|
||||||
|
globalStore.setPath("/goverment/huizhou/largeScreen/largeScreenTwo/index");
|
||||||
|
await initDynamicRouter({ moduleId: "1670639811581595650" });
|
||||||
|
globalStore.moduleId = "1670639811581595650";
|
||||||
|
// globalStore.moduleName = val.moduleName;
|
||||||
|
} else if (responseData.accountType == 4) {
|
||||||
|
globalStore.setPath("/hz-project/projectMonitor/safetyManagement/index");
|
||||||
|
await initDynamicRouter({ moduleId: "1670603312504918018" });
|
||||||
|
globalStore.moduleId = "1670603312504918018";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ElMessage.error("登录错误!");
|
||||||
|
}
|
||||||
|
console.log(res);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.main {
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #0e111f;
|
||||||
|
|
||||||
|
.bg_gif {
|
||||||
|
width: 30%;
|
||||||
|
height: 520px;
|
||||||
|
background: url("@/assets/images/123.gif") no-repeat;
|
||||||
|
background-size: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
x
Reference in New Issue
Block a user