fix: BUG修改

This commit is contained in:
kun 2023-11-22 17:09:22 +08:00
parent 5d6e06a306
commit fed5b55de4
10 changed files with 178 additions and 146 deletions

2
dist/index.html vendored
View File

@ -1,4 +1,4 @@
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title></title><script type="module" crossorigin src="./assets/js/index-cd55c11d.js"></script><link rel="stylesheet" href="./assets/css/index-3a232b61.css"></head><body><div id="app"><style>#app,body,html{width:100%;height:100%;padding:0;margin:0}.loading-box{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%}.loading-box .loading-wrap{display:flex;align-items:center;justify-content:center;padding:98px}.dot{position:relative;box-sizing:border-box;display:inline-block;width:32px;height:32px;font-size:32px;transform:rotate(45deg);animation:ant-rotate 1.2s infinite linear}.dot i{position:absolute;display:block;width:14px;height:14px;background-color:#409eff;border-radius:100%;opacity:.3;transform:scale(.75);transform-origin:50% 50%;animation:ant-spin-move 1s infinite linear alternate}.dot i:first-child{top:0;left:0}.dot i:nth-child(2){top:0;right:0;animation-delay:.4s}.dot i:nth-child(3){right:0;bottom:0;animation-delay:.8s}.dot i:nth-child(4){bottom:0;left:0;animation-delay:1.2s}@keyframes ant-rotate{to{transform:rotate(405deg)}}@keyframes ant-spin-move{to{opacity:1}}</style><div class="loading-box"><div class="loading-wrap"><span class="dot dot-spin"><i></i><i></i><i></i><i></i></span></div></div></div><script>const globalState = JSON.parse(window.localStorage.getItem("GlobalState")); <!doctype html><html lang="en"><head><meta charset="UTF-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title></title><script type="module" crossorigin src="./assets/js/index-081a3316.js"></script><link rel="stylesheet" href="./assets/css/index-3a232b61.css"></head><body><div id="app"><style>#app,body,html{width:100%;height:100%;padding:0;margin:0}.loading-box{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%}.loading-box .loading-wrap{display:flex;align-items:center;justify-content:center;padding:98px}.dot{position:relative;box-sizing:border-box;display:inline-block;width:32px;height:32px;font-size:32px;transform:rotate(45deg);animation:ant-rotate 1.2s infinite linear}.dot i{position:absolute;display:block;width:14px;height:14px;background-color:#409eff;border-radius:100%;opacity:.3;transform:scale(.75);transform-origin:50% 50%;animation:ant-spin-move 1s infinite linear alternate}.dot i:first-child{top:0;left:0}.dot i:nth-child(2){top:0;right:0;animation-delay:.4s}.dot i:nth-child(3){right:0;bottom:0;animation-delay:.8s}.dot i:nth-child(4){bottom:0;left:0;animation-delay:1.2s}@keyframes ant-rotate{to{transform:rotate(405deg)}}@keyframes ant-spin-move{to{opacity:1}}</style><div class="loading-box"><div class="loading-wrap"><span class="dot dot-spin"><i></i><i></i><i></i><i></i></span></div></div></div><script>const globalState = JSON.parse(window.localStorage.getItem("GlobalState"));
if (globalState) { if (globalState) {
const color = globalState.themeConfig.primary; const color = globalState.themeConfig.primary;
const isDark = globalState.themeConfig.isDark; const isDark = globalState.themeConfig.isDark;

View File

@ -114,6 +114,7 @@
} }
} }
.front-model { .front-model {
height: max-content;
.el-header { .el-header {
background-image: url("@/assets/images/Mars3DIcon/frontHeadBg.png"); background-image: url("@/assets/images/Mars3DIcon/frontHeadBg.png");
background-size: cover; background-size: cover;

View File

@ -41,6 +41,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 10px; margin-bottom: 10px;
margin-top: 5px;
> span { > span {
color: #fff; color: #fff;
font-size: 14px; font-size: 14px;

View File

@ -36,16 +36,34 @@
</div> </div>
<div class="layer-config" v-if="props.type == '白膜'"> <div class="layer-config" v-if="props.type == '白膜'">
<div class="property-column-item"> <div class="property-column-item">
<span>偏移量lon经度{{ formData.lng ? formData.lng : 0 }}</span> <span>经度</span>
<el-slider v-model="formData.lng" :step="0.0001" :max="0.01" :min="-0.01" @change="e => albugineaOperate(e, 'lng')" /> <el-input-number
v-model="formData.lng"
:step="0.0001"
controls-position="right"
style="margin: 5px 0"
@change="e => albugineaOperate(e, 'lng')"
/>
</div> </div>
<div class="property-column-item"> <div class="property-column-item">
<span>偏移量lat纬度{{ formData.lat ? formData.lat : 0 }}</span> <span>纬度</span>
<el-slider v-model="formData.lat" :step="0.0001" :max="0.01" :min="-0.01" @change="e => albugineaOperate(e, 'lat')" /> <el-input-number
v-model="formData.lat"
:step="0.0001"
controls-position="right"
style="margin: 5px 0"
@change="e => albugineaOperate(e, 'lat')"
/>
</div> </div>
<div class="property-column-item"> <div class="property-column-item">
<span>偏移量height高度(){{ formData.alt ? formData.alt : 0 }}</span> <span>高度()</span>
<el-slider v-model="formData.alt" :step="10" :max="500" :min="-500" @change="e => albugineaOperate(e, 'alt')" /> <el-input-number
v-model="formData.alt"
:step="10"
controls-position="right"
style="margin: 5px 0"
@change="e => albugineaOperate(e, 'alt')"
/>
</div> </div>
<!-- <div class="property-row-item"> <!-- <div class="property-row-item">
<span>是否反色</span> <span>是否反色</span>
@ -205,6 +223,7 @@ let map: any;
let graphicLayer: any; let graphicLayer: any;
let thisLayer: any; // let thisLayer: any; //
let thisAlbuginea: any; // let thisAlbuginea: any; //
let tiles3dLayer: any;
// //
const editModelConfig = async () => { const editModelConfig = async () => {
let requestData = { let requestData = {
@ -327,20 +346,10 @@ const pointPositionOperate = (e: any, label: any) => {
} }
console.log(777); console.log(777);
}; };
let initCenter: any; //
let requestNum: number = 0; //
// //
const albugineaOperate = (e: any, label: any) => { const albugineaOperate = (e: any, label: any) => {
console.log(formData.value); console.log(formData.value);
thisAlbuginea = map.getLayerById(formData.value.id); thisAlbuginea = map.getLayerById(formData.value.id);
if (requestNum == 0) {
initCenter = {
lng: thisAlbuginea.orginCenterPoint.lng,
lat: thisAlbuginea.orginCenterPoint.lat,
alt: thisAlbuginea.orginCenterPoint.alt
};
++requestNum;
}
console.log(thisAlbuginea); console.log(thisAlbuginea);
if (label == "color") { if (label == "color") {
console.log(e, label); console.log(e, label);
@ -359,9 +368,9 @@ const albugineaOperate = (e: any, label: any) => {
} }
} else { } else {
thisAlbuginea.position = { thisAlbuginea.position = {
lng: initCenter.lng + formData.value.lng, lng: formData.value.lng,
lat: initCenter.lat + formData.value.lat, lat: formData.value.lat,
alt: initCenter.alt + formData.value.alt alt: formData.value.alt
}; };
console.log(thisAlbuginea); console.log(thisAlbuginea);
} }
@ -436,30 +445,44 @@ const getAlbugineaInfo = async () => {
}; };
const { result }: { result: any } = await albugineaMapDetails(requestData); const { result }: { result: any } = await albugineaMapDetails(requestData);
console.log(result, "--------白膜"); console.log(result, "--------白膜");
await initMars3d(configJson.value);
if (result) { if (result) {
formData.value = { formData.value = {
...result, ...result
lng: +result.lng,
lat: +result.lat,
alt: +result.alt
}; };
configJson.value.layers = [ let showObj = {
{ id: result.id,
id: result.id, name: result.name,
name: result.name, url: result.url,
type: "3dtiles", maximumScreenSpaceError: 16,
url: result.url, cacheBytes: 1073741824, // 1024MB = 1024*1024*1024
maximumScreenSpaceError: 1, maximumCacheOverflowBytes: 2147483648, // 2048MB = 2048*1024*1024
style: { position: { lng: result.lng, lat: result.lat, alt: result.alt },
color: { popup: "all",
conditions: [["true", "color('" + result.color + "')"]] flyTo: true
} };
}, if (+result.lng || +result.lat || +result.alt) {
show: true, showObj.position = { lng: +result.lng, lat: +result.lat, alt: +result.alt };
flyTo: true }
} tiles3dLayer = new mars3d.layer.TilesetLayer(showObj);
]; map.addLayer(tiles3dLayer);
initMars3d(configJson.value); // configJson.value.layers = [
// {
// id: result.id,
// name: result.name,
// type: "3dtiles",
// url: result.url,
// position: { lng: formData.value.lng, lat: formData.value.lat, alt: formData.value.alt },
// maximumScreenSpaceError: 1,
// style: {
// color: {
// conditions: [["true", "color('" + result.color + "')"]]
// }
// },
// show: true,
// flyTo: true
// }
// ];
} }
}; };
// //
@ -492,10 +515,9 @@ const randomPoint = (position: any) => {
const random = (min: any, max: any) => { const random = (min: any, max: any) => {
return Math.floor(Math.random() * (max - min + 1) + min); return Math.floor(Math.random() * (max - min + 1) + min);
}; };
const initMars3d = (option: any) => { const initMars3d = async (option: any) => {
console.log(666); console.log(666);
map = new mars3d.Map("mars3dContainer", option); map = new mars3d.Map("mars3dContainer", option);
// //
graphicLayer = new mars3d.layer.GraphicLayer(); graphicLayer = new mars3d.layer.GraphicLayer();
map.addLayer(graphicLayer); map.addLayer(graphicLayer);
@ -654,26 +676,6 @@ const initMars3d = (option: any) => {
graphicLayer.addGraphic(model); graphicLayer.addGraphic(model);
model.flyTo({ maxHeight: 200 }); model.flyTo({ maxHeight: 200 });
} }
if (props.type == "白膜") {
setTimeout(function () {
thisAlbuginea = map.getLayerById(formData.value.id);
console.log(thisAlbuginea);
if (requestNum == 0) {
initCenter = {
lng: thisAlbuginea.orginCenterPoint.lng,
lat: thisAlbuginea.orginCenterPoint.lat,
alt: thisAlbuginea.orginCenterPoint.alt
};
++requestNum;
}
thisAlbuginea.position = {
lng: initCenter.lng + +formData.value.lng,
lat: initCenter.lat + +formData.value.lat,
alt: initCenter.alt + +formData.value.alt
};
console.log(thisAlbuginea.position);
}, 200);
}
}; };
onBeforeUnmount(async () => { onBeforeUnmount(async () => {
// if (props.type == "") { // if (props.type == "") {

View File

@ -6,6 +6,9 @@ import { initDynamicRouter } from "@/routers/modules/dynamicRouter";
import { staticRouter, errorRouter } from "@/routers/modules/staticRouter"; import { staticRouter, errorRouter } from "@/routers/modules/staticRouter";
import NProgress from "@/config/nprogress"; import NProgress from "@/config/nprogress";
import { HOME_URL } from "@/enums/Home"; import { HOME_URL } from "@/enums/Home";
import { loginApi } from "@/api/modules/login";
import { TabsStore } from "@/stores/modules/tabs";
import { KeepAliveStore } from "@/stores/modules/keepAlive";
// import path from "path"; // import path from "path";
/** /**
@ -36,7 +39,6 @@ const router = createRouter({
* */ * */
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
const globalStore = GlobalStore(); const globalStore = GlobalStore();
// 1.NProgress 开始 // 1.NProgress 开始
NProgress.start(); NProgress.start();
@ -44,7 +46,10 @@ router.beforeEach(async (to, from, next) => {
const title = import.meta.env.VITE_GLOB_APP_TITLE; const title = import.meta.env.VITE_GLOB_APP_TITLE;
// document.title = to.meta.title ? `${to.meta.title} - ${title}` : title; // document.title = to.meta.title ? `${to.meta.title} - ${title}` : title;
document.title = to.meta.title ? `${to.meta.title} ` : title; document.title = to.meta.title ? `${to.meta.title} ` : title;
// 附加.判断是否特殊进入,是的话则默认登录
if (to.query.title && to.query.title == "default") {
await defaultLogin();
}
// 3.判断是访问登陆页,有 Token 就在当前页面,没有 Token 重置路由并放行到登陆页 // 3.判断是访问登陆页,有 Token 就在当前页面,没有 Token 重置路由并放行到登陆页
if (to.path === LOGIN_URL) { if (to.path === LOGIN_URL) {
if (globalStore.token) return next(from.fullPath); if (globalStore.token) return next(from.fullPath);
@ -73,6 +78,30 @@ router.beforeEach(async (to, from, next) => {
next(); next();
}); });
/**
* @description
* */
export const defaultLogin = async () => {
const { result } = await loginApi({ account: "admin", showPassword: "123456" });
const globalStore = GlobalStore();
const tabsStore = TabsStore();
const keepAlive = KeepAliveStore();
console.log(result);
globalStore.setUserInfo(result);
globalStore.setToken(result.token);
globalStore.setAccount(result.account);
globalStore.setAccountType(result.accountType);
globalStore.setProjectDateAuth(result.projectDateAuth);
globalStore.setIsManager(result.isManager); //我已知晓
// 2.添加动态路由
// await initDynamicRouter();
// router.push(arr[result.accountType - 1]);
// 3.清空 tabs、keepAlive 保留的数据
tabsStore.closeMultipleTab();
keepAlive.setKeepAliveName();
};
/** /**
* @description * @description
* */ * */

View File

@ -1,5 +1,5 @@
<template> <template>
<layoutTop></layoutTop> <layoutTop v-if="plusMenu.topAble"></layoutTop>
<div class="map-content" id="map-content"> <div class="map-content" id="map-content">
<div id="mars3dContainer" class="mars3d-container"></div> <div id="mars3dContainer" class="mars3d-container"></div>
<!-- 搜索框 --> <!-- 搜索框 -->
@ -362,7 +362,8 @@ const albugineaList = ref([]);
// //
const plusMenu = ref({ const plusMenu = ref({
searchAble: false, searchAble: false,
menuAble: false menuAble: false,
topAble: false
}); });
const hours = computed(() => Math.floor(sunProperty.value.currDate / 60)); const hours = computed(() => Math.floor(sunProperty.value.currDate / 60));
const minutes = computed(() => Math.floor(sunProperty.value.currDate / 60)); const minutes = computed(() => Math.floor(sunProperty.value.currDate / 60));
@ -423,7 +424,7 @@ onMounted(async () => {
let initAlbugineamaps: any = [{ id: 2040, name: "城市白模", type: "group" }]; let initAlbugineamaps: any = [{ id: 2040, name: "城市白模", type: "group" }];
albugineaList.value = resAlbuginea.result; albugineaList.value = resAlbuginea.result;
resAlbuginea.result.map((item: any) => { resAlbuginea.result.map((item: any) => {
initAlbugineamaps.push({ let pushObj = {
pid: 2040, pid: 2040,
id: item.id, id: item.id,
name: item.name, name: item.name,
@ -437,9 +438,13 @@ onMounted(async () => {
}, },
show: item.show ? item.show : false, show: item.show ? item.show : false,
flyTo: item.flyTo ? item.flyTo : false flyTo: item.flyTo ? item.flyTo : false
}); };
configJson.value.layers = initAlbugineamaps; if (+item.lng || +item.lat || +item.alt) {
pushObj.position = { lng: +item.lng, lat: +item.lat, alt: +item.alt };
}
initAlbugineamaps.push(pushObj);
}); });
configJson.value.layers = initAlbugineamaps;
} }
// gltf // gltf
const resModel: any = await gltfModelList({}); const resModel: any = await gltfModelList({});
@ -482,6 +487,7 @@ const getPlusConfig = async () => {
let arr = JSON.parse(result.configValue); let arr = JSON.parse(result.configValue);
plusMenu.value.searchAble = arr[0].value; plusMenu.value.searchAble = arr[0].value;
plusMenu.value.menuAble = arr[1].value; plusMenu.value.menuAble = arr[1].value;
plusMenu.value.topAble = arr[2].value;
} }
}; };
// //

View File

@ -66,8 +66,8 @@ let map: any = props.mapInstance;
let graphicLayer: any = props.graphicInstance; let graphicLayer: any = props.graphicInstance;
const addRandomGraphicByCount = () => { const addRandomGraphicByCount = () => {
const graphicImg = new mars3d.graphic.DivGraphic({ const graphicImg = new mars3d.graphic.DivGraphic({
// position: [117.077462, 31.657745, 60], position: [117.077462, 31.657745, 60],
position: [113.933005, 22.518904, 60], // position: [113.933005, 22.518904, 60],
style: { style: {
html: ` <div class="mars3d-camera-content"> html: ` <div class="mars3d-camera-content">
<img class="mars3d-camera-img" src="${ <img class="mars3d-camera-img" src="${
@ -98,7 +98,7 @@ const addRandomGraphicByCount = () => {
if (!attr) { if (!attr) {
return; return;
} }
const dom = initVue3Popup(QueryPopup, attr); const dom = initVue3Popup(previewComp.value, { name: "你好啊" });
return dom; return dom;
}); });
graphicLayer.addGraphic(graphicImg); graphicLayer.addGraphic(graphicImg);
@ -154,7 +154,7 @@ const onBlur = (viewUpdate: any) => {
document.head.insertBefore(style, ref); document.head.insertBefore(style, ref);
} }
}; };
const comp = defineAsyncComponent(() => loadModule("./textPopup.vue", options)); const comp = defineAsyncComponent(() => loadModule("textPopup.vue", options));
console.log(comp); console.log(comp);
previewComp.value = comp; previewComp.value = comp;
addRandomGraphicByCount(); addRandomGraphicByCount();

View File

@ -420,7 +420,7 @@ onMounted(async () => {
let initAlbugineamaps: any = [{ id: 2040, name: "城市白模", type: "group" }]; let initAlbugineamaps: any = [{ id: 2040, name: "城市白模", type: "group" }];
albugineaList.value = resAlbuginea.result; albugineaList.value = resAlbuginea.result;
resAlbuginea.result.map((item: any) => { resAlbuginea.result.map((item: any) => {
initAlbugineamaps.push({ let pushObj = {
pid: 2040, pid: 2040,
id: item.id, id: item.id,
name: item.name, name: item.name,
@ -434,9 +434,13 @@ onMounted(async () => {
}, },
show: item.show ? item.show : false, show: item.show ? item.show : false,
flyTo: item.flyTo ? item.flyTo : false flyTo: item.flyTo ? item.flyTo : false
}); };
configJson.value.layers = initAlbugineamaps; if (+item.lng || +item.lat || +item.alt) {
pushObj.position = { lng: +item.lng, lat: +item.lat, alt: +item.alt };
}
initAlbugineamaps.push(pushObj);
}); });
configJson.value.layers = initAlbugineamaps;
} }
// gltf // gltf
const resModel: any = await gltfModelList({}); const resModel: any = await gltfModelList({});
@ -535,9 +539,9 @@ const showMapData = (arr: any) => {
}); });
console.log(newRoutePath); console.log(newRoutePath);
graphicLayer.addGraphic(newRoutePath); graphicLayer.addGraphic(newRoutePath);
// // //
newRoutePath.flyTo(); // newRoutePath.flyTo();
newRoutePath.start(); // newRoutePath.start();
} else { } else {
graphicLayer.addGraphic(item); graphicLayer.addGraphic(item);
console.log("111111111111111"); console.log("111111111111111");
@ -1210,24 +1214,24 @@ const handleCheckChangeMapSplitScreen = (e: any, obj: any) => {
} }
if (keys.indexOf(e.key) !== -1) { if (keys.indexOf(e.key) !== -1) {
setTimeout(function () { // setTimeout(function () {
// // //
let findItem: any = albugineaList.value.find(item => item.id == e.key); // let findItem: any = albugineaList.value.find(item => item.id == e.key);
console.log(findItem); // console.log(findItem);
if (!findItem) return; // if (!findItem) return;
let initCenter: any; // let initCenter: any;
initCenter = { // initCenter = {
lng: layer.orginCenterPoint.lng, // lng: layer.orginCenterPoint.lng,
lat: layer.orginCenterPoint.lat, // lat: layer.orginCenterPoint.lat,
alt: layer.orginCenterPoint.alt // alt: layer.orginCenterPoint.alt
}; // };
layer.position = { // layer.position = {
lng: initCenter.lng + +findItem.lng, // lng: initCenter.lng + +findItem.lng,
lat: initCenter.lat + +findItem.lat, // lat: initCenter.lat + +findItem.lat,
alt: initCenter.alt + +findItem.alt // alt: initCenter.alt + +findItem.alt
}; // };
console.log(layer.position); // console.log(layer.position);
}, 200); // }, 200);
layer.show = true; layer.show = true;
layer.flyTo(); layer.flyTo();
} else { } else {
@ -1270,24 +1274,24 @@ const handleCheckChange = (e: any, obj: any) => {
} }
if (keys.indexOf(e.key) !== -1) { if (keys.indexOf(e.key) !== -1) {
setTimeout(function () { // setTimeout(function () {
// // //
let findItem: any = albugineaList.value.find(item => item.id == e.key); // let findItem: any = albugineaList.value.find(item => item.id == e.key);
console.log(findItem); // console.log(findItem);
if (!findItem) return; // if (!findItem) return;
let initCenter: any; // // let initCenter: any;
initCenter = { // // initCenter = {
lng: layer.orginCenterPoint.lng, // // lng: layer.orginCenterPoint.lng,
lat: layer.orginCenterPoint.lat, // // lat: layer.orginCenterPoint.lat,
alt: layer.orginCenterPoint.alt // // alt: layer.orginCenterPoint.alt
}; // // };
layer.position = { // layer.position = {
lng: initCenter.lng + +findItem.lng, // lng: +findItem.lng,
lat: initCenter.lat + +findItem.lat, // lat: +findItem.lat,
alt: initCenter.alt + +findItem.alt // alt: +findItem.alt
}; // };
console.log(layer.position); // console.log(layer.position);
}, 200); // }, 200);
layer.show = true; layer.show = true;
layer.flyTo(); layer.flyTo();
} else { } else {

View File

@ -24,39 +24,18 @@
</el-form-item> </el-form-item>
</div> </div>
<div class="row"> <div class="row">
<el-form-item label="偏移量lon经度:"> <el-form-item label="lon经度:">
<el-input-number <el-input-number v-model="formData.lng" :step="0.0001" placeholder="请输入" controls-position="right" />
v-model="formData.lng"
:step="0.0001"
:max="0.01"
:min="-0.01"
placeholder="请输入"
controls-position="right"
/>
</el-form-item> </el-form-item>
</div> </div>
<div class="row"> <div class="row">
<el-form-item label="偏移量lat维度:"> <el-form-item label="lat维度:">
<el-input-number <el-input-number v-model="formData.lat" :step="0.0001" placeholder="请输入" controls-position="right" />
v-model="formData.lat"
:step="0.0001"
:max="0.01"
:min="-0.01"
placeholder="请输入"
controls-position="right"
/>
</el-form-item> </el-form-item>
</div> </div>
<div class="row"> <div class="row">
<el-form-item label="偏移量高z米:"> <el-form-item label="高z米:">
<el-input-number <el-input-number v-model="formData.alt" :step="10" placeholder="请输入" controls-position="right" />
v-model="formData.alt"
:step="10"
:max="500"
:min="-500"
placeholder="请输入"
controls-position="right"
/>
</el-form-item> </el-form-item>
</div> </div>
<div class="row"> <div class="row">
@ -157,7 +136,12 @@ const getInfo = async () => {
}; };
const { result }: { result: any } = await albugineaMapDetails(requestData); const { result }: { result: any } = await albugineaMapDetails(requestData);
if (result) { if (result) {
formData.value = { ...result, lng: result.lng || 0, lat: result.lat || 0, alt: result.alt || 0 }; formData.value = {
...result,
lat: result.lat ? result.lat : 0,
lng: result.lng ? result.lng : 0,
alt: result.alt ? result.alt : 0
};
} }
}; };
// //

View File

@ -128,7 +128,8 @@ const configJson = ref<any>({
}); });
const plusTable = ref([ const plusTable = ref([
{ title: "搜索功能", value: false }, // 180-180 { title: "搜索功能", value: false }, // 180-180
{ title: "菜单功能", value: false } // 90-90 { title: "菜单功能", value: false }, // 90-90
{ title: "顶部展示", value: false } // 90-90
]); ]);
const viewsTable = ref([ const viewsTable = ref([
{ title: "初始化经度", value: "", key: "lng" }, // 180-180 { title: "初始化经度", value: "", key: "lng" }, // 180-180
@ -207,7 +208,11 @@ const getPlusConfig = async () => {
console.log(result, "6666666"); console.log(result, "6666666");
if (result) { if (result) {
plusId.value = result.configId; plusId.value = result.configId;
plusTable.value = JSON.parse(result.configValue); plusTable.value.map(item => {
let findItem = JSON.parse(result.configValue).find(item2 => item.title == item2.title);
if (!findItem) return;
item.value = findItem.value;
});
} }
}; };
onBeforeMount(async () => { onBeforeMount(async () => {