|
|
@@ -1,6 +1,16 @@
|
|
|
<!-- eslint-disable vue/multi-word-component-names -->
|
|
|
<template>
|
|
|
<div class="company-home">
|
|
|
+
|
|
|
+ <template v-if="appStore.getSimpleMapParams.isLeaf" >
|
|
|
+ <div class="company-title">
|
|
|
+ <span class="title-text">
|
|
|
+ <!-- {{ departName }} -->
|
|
|
+ <!-- 先注释掉,写死name -->
|
|
|
+ XX集团神木XX矿业有限公司
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<!-- 渲染所有模块 -->
|
|
|
<ModulePrimary
|
|
|
v-for="cfg in cfgs"
|
|
|
@@ -31,12 +41,13 @@
|
|
|
import ModulePrimary from '/@/components/Configurable/ModulePrimary.vue';
|
|
|
import { useGlobSetting } from '/@/hooks/setting';
|
|
|
import { useAppStore } from '/@/store/modules/app';
|
|
|
- // import { useMineDepartmentStore } from '/@/store/modules/mine';
|
|
|
+ import { useMineDepartmentStore } from '/@/store/modules/mine';
|
|
|
|
|
|
const { title = '老空区永久密闭监测与分析系统' } = useGlobSetting();
|
|
|
const { data, updateData } = useInitPage(title);
|
|
|
const appStore = useAppStore();
|
|
|
- // const mineStore = useMineDepartmentStore();
|
|
|
+ const mineStore = useMineDepartmentStore();
|
|
|
+ let departName = '';
|
|
|
|
|
|
const cfgs = computed(() => configs.value);
|
|
|
const { configs } = useInitConfigs();
|
|
|
@@ -183,6 +194,12 @@
|
|
|
if (params.isLeaf) {
|
|
|
fetchLeafData();
|
|
|
configs.value = testConfigSealedMine; // 解构触发响应式更新
|
|
|
+
|
|
|
+ const depart = mineStore.findDepartById(params.deptId, mineStore.getDepartTree);
|
|
|
+ if (depart) {
|
|
|
+ departName = depart.departName;
|
|
|
+ console.log('自动填充矿区名称:', depart.departName);
|
|
|
+ }
|
|
|
} else {
|
|
|
fetchHomeData();
|
|
|
configs.value = testConfigSealedGoaf; // 解构触发响应式更新
|
|
|
@@ -216,6 +233,26 @@
|
|
|
// 允许点击穿透以支持下面的地图进行交互
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
+ .company-title {
|
|
|
+ position: absolute;
|
|
|
+ background-image: url(/src/assets/images/sealedGoaf/title-bg.png);
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ width: 230px;
|
|
|
+ height: 52px;
|
|
|
+ left: 230px;
|
|
|
+ padding: 14px 20px;
|
|
|
+
|
|
|
+ .title-text {
|
|
|
+ /* 子元素负责文本溢出处理 */
|
|
|
+ display: block;
|
|
|
+ width: 100%;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ text-align: center; /* 根据需求调整对齐方式 */
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
:deep(.ant-select-selection-item) {
|
|
|
display: flex;
|