fix: BUG修改

This commit is contained in:
kun 2023-06-29 22:26:35 +08:00
parent e8d1f3e505
commit 222eacd61c
15 changed files with 152 additions and 21 deletions

View 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

View File

@ -10,12 +10,20 @@ window._AMapSecurityConfig = {
};
const amap = (async function (Loader, AMAP_MAP_KEY) {
return Loader.load({
return await Loader.load({
key: AMAP_MAP_KEY,
version: "2.0",
plugins: ["AMap.PlaceSearch", "AMap.AutoComplete", "AMap.Geocoder"]
});
})(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
@ -24,6 +32,11 @@ const amap = (async function (Loader, AMAP_MAP_KEY) {
async function initAMap() {
try {
const AMap = await amap;
// const AMap = AMapLoader.load({
// key: AMAP_MAP_KEY,
// version: "2.0",
// plugins: ["AMap.PlaceSearch", "AMap.AutoComplete", "AMap.Geocoder"]
// });
return AMap;
} catch (err) {
console.log(err);

View File

@ -85,29 +85,29 @@
}
.el-pager li {
background-color: transparent;
color: var(--el-color-primary);
border: 1px solid var(--el-color-primary);
color: $primary-light-text-color;
border: 1px solid $primary-light-border-color;
height: 26px;
}
.el-pager li:active {
color: var(--el-color-primary);
color: $primary-light-text-color;
border: none;
height: 26px;
}
.el-pager li.is-active {
background-color: var(--el-color-primary);
color: #fff;
background-color: $primary-light-bg-color;
color: $primary-light-text-color;
}
.el-pagination__total {
color: var(--el-color-primary);
color: $primary-light-text-color;
}
.btn-prev,
.btn-next,
.btn-prev:disabled,
.btn-next:disabled {
color: var(--el-color-primary);
color: $primary-light-text-color;
background-color: transparent;
border: 1px solid var(--el-color-primary);
border: 1px solid $primary-light-bg-color;
height: 26px;
}
}

View File

@ -49,7 +49,7 @@ const gridRef = ref();
width: 200px;
}
.card {
background-color: #092945;
background-color: $primary-light-bg-color;
box-shadow: none;
}
// :deep(.el-form-item--default) {

View File

@ -11,8 +11,8 @@ import { ref, reactive, nextTick, computed } from "vue";
import { useTheme } from "@/hooks/useTheme";
const { changePrimary } = useTheme();
const changePrimaryVal = (val: string) => {
const body = document.body as HTMLElement;
body.setAttribute("style", `filter: opacity(0.7);background-color: ${val};`);
// const body = document.body as HTMLElement;
// body.setAttribute("style", `filter: opacity(0.7);background-color: ${val};`);
// body.setAttribute("style", "filter: invert(80%)");
changePrimary(val);
};

View File

@ -20,6 +20,14 @@ export const staticRouter: RouteRecordRaw[] = [
title: "登录"
}
},
{
path: "/load",
name: "load",
component: () => import("@/views/loading/index.vue"),
meta: {
title: "加载"
}
},
{
path: "/home",
name: "home",

View File

@ -385,6 +385,14 @@
margin-right: 14%;
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 {
// background-color: #008bff !important;
background-color: rgb(0 139 255 / 10%) !important;

View File

@ -1,2 +1,14 @@
/* 全局 css 变量 */
$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;

View File

@ -355,7 +355,7 @@ onMounted(async () => {
height: 78px !important;
}
:deep(.content) {
height: calc(100% - 100px) !important;
height: calc(100% - 150px) !important;
}
.leftProject {
// padding: 5px 8px;

View File

@ -10,7 +10,7 @@
height: 78px !important;
}
:deep(.content) {
height: calc(100% - 100px) !important;
height: calc(100% - 150px) !important;
}
.leftProject {
// padding: 5px 8px;

View File

@ -10,7 +10,7 @@
height: 78px !important;
}
:deep(.content) {
height: calc(100% - 100px) !important;
height: calc(100% - 170px) !important;
}
.leftProject {
// padding: 5px 8px;
@ -168,9 +168,9 @@
.btn-next,
.btn-prev:disabled,
.btn-next:disabled {
color: var(--el-color-primary);
color: white;
background-color: transparent;
border: 1px solid var(--el-color-primary);
border: 1px solid #087ba4;
height: 26px;
}
}

View File

@ -42,8 +42,8 @@
/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch">查询</el-button>
<el-button style="background-color: #ffb750; color: #fff">刷新</el-button>
<el-button class="btnStyle" type="primary" @click="handleSearch">查询</el-button>
<el-button class="btnStyle">刷新</el-button>
</el-form-item>
</el-form>
<!-- </div> -->

View File

@ -136,6 +136,7 @@ import initAMap from "@/components/AMap/AMap";
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
import MapTopData from "@/components/MapTopData/index.vue";
import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government/AIwaring";
import { setTimeout } from "timers/promises";
const router = useRouter();
const globalStore = GlobalStore();
@ -388,12 +389,11 @@ watch(
);
onMounted(async () => {
await mapData();
// getAIengPage();
getStatisticsList();
getproList();
await getAIproPage();
await mapData();
onSearch(records.value[0]);
// addMarker();
});

View 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. tabskeepAlive
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>