main
wangqiujuan0808 2023-12-01 19:26:56 +08:00
commit e9baf27589
3 changed files with 14 additions and 8 deletions

View File

@ -1260,7 +1260,7 @@ export default {
curQmodel: null,
};
},
created() {
mounted() {
console.log("create");
console.log(QModelX);
let _this = this;
@ -1281,7 +1281,8 @@ export default {
this.curQmodel = qmodelobj;
_this.$emit("callFather_before", this.curQmodel);
var viewerDemo = new QMViewer(this.curQmodel, this.forGis);
// this._data.viewerDemo = viewerDemo;
// 12.1
this.viewerDemo = viewerDemo;
qmodelobj.viewerDemo = viewerDemo;
this.updateClientRects(false);
if (this.forGis) {
@ -1325,7 +1326,7 @@ export default {
leftBarControl.addEventListener("click", this.delayResize);
});
},
mounted() {},
// mounted() {},
beforeRouteLeave(to, form, next) {
// var pnt= document.getElementById('qmodel-div').parentNode;
window.removeEventListener("resize", this.handleResize, false);
@ -1365,7 +1366,7 @@ export default {
modelRect.top = modelRect.top + padding;
modelRect.width = modelRect.width - padding;
modelRect.height = modelRect.height - padding;
// this._data.viewerDemo.updateClientRects(modelRect, updateCanvas);
this.viewerDemo.updateClientRects(modelRect, updateCanvas);
},
handleResize() {
this.updateClientRects(true);

View File

@ -2,6 +2,7 @@ import auth from '@/plugins/auth'
import router, { constantRoutes, dynamicRoutes } from '@/router'
import { getRouters } from '@/api/menu'
import Layout from '@/layout/index'
import LayoutMain from '@/layoutMain/index'
import ParentView from '@/components/ParentView'
import InnerLink from '@/layout/components/InnerLink'
@ -73,6 +74,10 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
route.component = loadView(route.component)
}
}
// 特殊修改BIM模块风格
if(route.path === '/bim') {
route.component = LayoutMain;
}
if (route.children != null && route.children && route.children.length) {
route.children = filterAsyncRouter(route.children, route, type)
} else {

View File

@ -13,7 +13,7 @@
</template>
<script setup name="Index">
import useTagsViewStore from '@/store/modules/tagsView'
import useTagsViewStore from "@/store/modules/tagsView";
const router = useRouter();
import usePermissionStore from "@/store/modules/permission";
const permissionStore = usePermissionStore();
@ -23,9 +23,9 @@ const sidebarRouters = computed(() =>
})
);
const gotoPage = (item) => {
useTagsViewStore().delAllViews();
localStorage.setItem('CURRENT_MENU', item.path);
router.push(item.path + '/' + item.children[0].path)
useTagsViewStore().delAllViews();
localStorage.setItem("CURRENT_MENU", item.path);
router.push(item.path + "/" + item.children[0].path);
};
</script>