lcw
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
<template>
|
||||
<div class="homeBox">
|
||||
<!-- <GdMap></GdMap> -->
|
||||
<!-- 头部 -->
|
||||
|
||||
<Head></Head>
|
||||
<!-- 左边 -->
|
||||
<div class="home-aside asideL">
|
||||
<div class="asideL-top">
|
||||
|
||||
<DbCount></DbCount>
|
||||
</div>
|
||||
<div class="asideL-Bottom">
|
||||
@ -16,116 +17,175 @@
|
||||
<QblyType></QblyType>
|
||||
</div>
|
||||
<div class="commom-aside">
|
||||
<QbfkCount></QbfkCount>
|
||||
<!-- <GroupWarning /> -->
|
||||
<TextType></TextType>
|
||||
<!-- <QbfkCount></QbfkCount> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 右边 -->
|
||||
<div class="home-aside asideR">
|
||||
<div class="commom-aside-big">
|
||||
<SituationAssessment />
|
||||
<Calendar />
|
||||
</div>
|
||||
<div class="commom-aside-big">
|
||||
<GroupWarning />
|
||||
<Experience />
|
||||
|
||||
</div>
|
||||
<div class="commom-aside-small">
|
||||
<Experience />
|
||||
<SituationAssessment />
|
||||
</div>
|
||||
</div>
|
||||
<!-- 中间 -->
|
||||
<div class="home-center">
|
||||
<div class="middle-top"><Yszs /></div>
|
||||
<div class="flex middle-bottom mt10">
|
||||
<div class="mr10" style="width: 50%;"><DeployControl /></div>
|
||||
<div class="flex-1" style="flex: 1;"><ZdryWarning /></div>
|
||||
<div class="middle-top">
|
||||
<Yszs />
|
||||
</div>
|
||||
<div class="flex middle-bottom mt10">
|
||||
<div style="width: 100%;border: 1px sienna;position: relative">
|
||||
<GdMap></GdMap>
|
||||
</div>
|
||||
<div class="flex-1" style="width: 340px;position: absolute;z-index: 100;right: 0;">
|
||||
<DeployControl />
|
||||
</div>
|
||||
<!-- <div class="mr10" style="width: 30%;"><DeployControl /></div> -->
|
||||
<!-- <div class="flex-1" style="flex: 1;"><ZdryWarning /></div> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- 底部 -->
|
||||
<div class="home-foot-t">
|
||||
<Bkcz></Bkcz>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 左边弹窗 -->
|
||||
<LeftDialog></LeftDialog>
|
||||
|
||||
<Fxq :initial-position="{ x: position.x, y: position.y }">
|
||||
<el-badge value="0" class="item badge-top-left">
|
||||
<div class='fxq fxq1'>
|
||||
<div class="title" @click.stop="opneMsg('xtxx')"> <img src="@/assets/images/xtxx.png" /> 系统消息</div>
|
||||
</div>
|
||||
</el-badge>
|
||||
<!-- <div class='fxq fxq2'>
|
||||
<div class="title" @click.stop="opneMsg('tztg')"> <img src="@/assets/images/tztg.png" /> 通知通报</div>
|
||||
</div>
|
||||
<div class='fxq fxq3'>
|
||||
<div class="title"> <img src="@/assets/images/xxxt.png" /> 消息协同</div>
|
||||
</div> -->
|
||||
</Fxq>
|
||||
<Information v-model='showDialog' :title='title'>
|
||||
<systemMessages :dict="{ BD_D_XXLX, BD_D_XXLY }" :idEntityCard='idEntityCard' :xxlx="showMsgLx" />
|
||||
</Information>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, getCurrentInstance, reactive } from 'vue'
|
||||
import { ref, getCurrentInstance, reactive, onMounted } from 'vue'
|
||||
import LeftDialog from './dialog/leftDialog'
|
||||
import GdMap from "@/components/GdMap/index.vue";
|
||||
import Head from './layout/head.vue'
|
||||
import DbCount from './model/dbCount.vue'
|
||||
import QbfkCount from './model/qbfkCount.vue'
|
||||
import QbsbCount from './model/qbsbCount.vue'
|
||||
import QblyType from './model/qblyType.vue'
|
||||
import TextType from './model/textType.vue'
|
||||
import Bkcz from './model/bkcz.vue'
|
||||
import ZdryWarning from './model/zdryWarning.vue'
|
||||
import GroupWarning from './model/groupWarning.vue'
|
||||
import Yszs from './model/yszs.vue'
|
||||
import DeployControl from './model/deployControl.vue';
|
||||
import SituationAssessment from './model/situationAssessment.vue'
|
||||
import Experience from './model/experience.vue'
|
||||
import Fxq from './model/fxq.vue'
|
||||
import Information from './model/information.vue'
|
||||
import systemMessages from './model/mesgSwitch/systemMessages.vue'
|
||||
import { getItem } from '@/utils/storage.js'
|
||||
import { queryXxTj} from '@/api/commit.js'
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { BD_D_XXLX, BD_D_XXLY } = proxy.$dict('BD_D_XXLX', 'BD_D_XXLY'); //获取字典数据
|
||||
const idEntityCard = getItem('idEntityCard')
|
||||
const position = reactive({
|
||||
x: window.innerWidth - 120,
|
||||
y: window.innerHeight - 100
|
||||
})
|
||||
import Calendar from './model/calendar.vue'
|
||||
|
||||
//消息
|
||||
const title = ref('系统消息')
|
||||
const showDialog = ref(false)
|
||||
const showMsgLx = ref('')
|
||||
const opneMsg = (val) => {
|
||||
showDialog.value = true
|
||||
showMsgLx.value = val
|
||||
switch (val) {
|
||||
case 'xtxx':
|
||||
title.value = '系统消息'
|
||||
break;
|
||||
case 'tztg':
|
||||
title.value = '通知通告'
|
||||
break;
|
||||
case 'xxxt':
|
||||
title.value = '消息协同'
|
||||
break;
|
||||
import { getItem, setItem} from "@/utils/storage";
|
||||
import emitter from "@/utils/eventBus.js";
|
||||
import { bm ,centralPoint} from '@/views/backOfficeSystem/IntelligentControl/DeploymentArea/xzqh.js'
|
||||
import SwitchSysDialog from '@/components/SwitchSysDialog.vue'
|
||||
|
||||
|
||||
const changeXzqh = (val,trg) => {
|
||||
setTimeout(() => {
|
||||
// 先移除已有的边界
|
||||
emitter.emit('removeBj')
|
||||
if (trg) {
|
||||
console.log("多个");
|
||||
// 如果传入的是多个区域数据(二维数组)
|
||||
const features = val.map((area, index) => ({
|
||||
geometry: {
|
||||
type: "Polygon",
|
||||
coordinates: [area] // 确保格式正确
|
||||
},
|
||||
properties: {
|
||||
},
|
||||
type: "Feature"
|
||||
}))
|
||||
// 循环为每个区域创建单独的多边形,这样可以设置不同的样式
|
||||
features.forEach((feature, index) => {
|
||||
emitter.emit('setBoundarys', {
|
||||
data: {
|
||||
type: "FeatureCollection",
|
||||
features: [feature]
|
||||
},
|
||||
color: '#cf1010',
|
||||
fillColor: 'rgba(255, 255, 255,0)',
|
||||
})
|
||||
})
|
||||
} else {
|
||||
|
||||
// 保持原来的逻辑,处理单个区域
|
||||
emitter.emit('setBoundarys', {
|
||||
data: {
|
||||
type: "FeatureCollection",
|
||||
features: [
|
||||
{
|
||||
geometry: {
|
||||
type: "Polygon",
|
||||
coordinates: [val] // 使用正确的GeoJSON格式
|
||||
},
|
||||
properties: {},
|
||||
type: "Feature"
|
||||
}
|
||||
]
|
||||
},
|
||||
color: '#cf1010',
|
||||
fillColor: 'rgba(255, 255, 255,0)',
|
||||
})
|
||||
}
|
||||
}, 3000)
|
||||
}
|
||||
const getDepId = () => {
|
||||
const deptId = getItem('deptId')
|
||||
const deptLevel = deptId[0].deptLevel ? deptId[0].deptLevel : null
|
||||
const deptCode = deptId[0].deptCode ? deptId[0].deptCode : null
|
||||
if (deptLevel.startsWith('2')) {
|
||||
const data = Object.values(bm).map(item => item);
|
||||
changeXzqh(data,true)
|
||||
} else {
|
||||
switch (deptCode) {
|
||||
case '54040200000'://巴宜区
|
||||
changeXzqh(bm[542621])
|
||||
break;
|
||||
case '54042400000'://波密县
|
||||
changeXzqh(bm[542625])
|
||||
break;
|
||||
case '54042500000'://察隅县
|
||||
changeXzqh(bm[542626])
|
||||
break;
|
||||
case '54042100000'://工布江达县
|
||||
changeXzqh(bm[542622])
|
||||
break;
|
||||
case '54042600000'://朗县
|
||||
changeXzqh(bm[542627])
|
||||
break;
|
||||
case '54042200000'://米林县
|
||||
changeXzqh(bm[542623])
|
||||
break;
|
||||
case '54042300000'://墨脱县
|
||||
changeXzqh(bm[542624])
|
||||
break;
|
||||
default:
|
||||
const data = Object.values(bm).map(item => item);
|
||||
changeXzqh(data,true)
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
const queryXxTjList = () => {
|
||||
queryXxTj({}).then((res) => {
|
||||
console.log(res);
|
||||
|
||||
}).catch((err) => {
|
||||
|
||||
});
|
||||
const makerCenter = () => {
|
||||
const dw = require("@/assets/point/dingwei.png")
|
||||
const coords = centralPoint.map(item => {
|
||||
return { jd: item.point[0], wd: item.point[1], jzMc: item.name }
|
||||
})
|
||||
emitter.emit("addPointArea", { coords, icon: dw, flag: "hm", size: '14px', showTitle: true, offset: [0, -25] });
|
||||
}
|
||||
queryXxTjList()
|
||||
onMounted(() => {
|
||||
getDepId()
|
||||
makerCenter()
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -189,4 +249,36 @@ queryXxTjList()
|
||||
left: -10px;
|
||||
transform: translateY(-50%) translateX(-50%);
|
||||
}
|
||||
|
||||
.badge-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
transition: all 0.3s ease;
|
||||
max-height: 200px;
|
||||
/* 默认展开的最大高度 */
|
||||
min-height: 45px;
|
||||
/* 确保收缩时有足够空间显示第一个图标 */
|
||||
}
|
||||
|
||||
.badge-content:not(.expanded) {
|
||||
max-height: 45px;
|
||||
}
|
||||
|
||||
/* 收缩时只显示第一个图标,隐藏其他内容 */
|
||||
.badge-content:not(.expanded)> :not(:first-child) {
|
||||
opacity: 0;
|
||||
max-height: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.badge-container {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user