main
parent
ec9651b9ce
commit
4b73df6d0e
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
|
|
@ -14,7 +14,7 @@
|
|||
</div>
|
||||
<div class="flex mt-1 ai-c">
|
||||
<img class="mr-1" src="/src/assets/images/chart/equipment/address.png" />
|
||||
<div class="numStyle">{{item.address}}</div>
|
||||
<div class="numStyle" :title="item.address">{{item.address}}</div>
|
||||
</div>
|
||||
<div class="flex mt-1 ai-c">
|
||||
<img class="mr-1 timeicon" src="/src/assets/images/chart/equipment/time.png" />
|
||||
|
|
@ -74,7 +74,6 @@ const {
|
|||
}
|
||||
// 数据callback处理(预览时触发)
|
||||
useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any[]) => {
|
||||
console.log('resData', resData)
|
||||
props.chartConfig.option.sectionDatas = resData;
|
||||
});
|
||||
|
||||
|
|
@ -288,6 +287,9 @@ const handlerFireDetail = (item) => {
|
|||
.numStyle{
|
||||
color: v-bind('datasColor');
|
||||
font-size: v-bind('datasSize+"px"');
|
||||
white-space: nowrap;
|
||||
overflow: hidden; /* 隐藏溢出内容 :ml-search[overflow] */
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.desStyle{
|
||||
color: v-bind('desColor');
|
||||
|
|
|
|||
|
|
@ -9,16 +9,7 @@ export const option = {
|
|||
textColor: '#FFFFFF',
|
||||
textSize1: 12,
|
||||
textColor1: '#CBE6CD',
|
||||
areaOptions:[
|
||||
{
|
||||
label: '选项1',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
label: '选项2',
|
||||
value: '2'
|
||||
},
|
||||
]
|
||||
areaOptions:[]
|
||||
}
|
||||
|
||||
export default class Config extends PublicConfigClass implements CreateComponentType {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,25 @@
|
|||
<template>
|
||||
<div class="go-title-xuncha">
|
||||
<div class="selbox">
|
||||
<n-select
|
||||
<!-- <n-tree-select
|
||||
v-model:value="areaValue"
|
||||
:options="areaOptions"
|
||||
label-field="name"
|
||||
key-field="id"
|
||||
children-field="children"
|
||||
placeholder="请选择行政区划"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/> -->
|
||||
<el-tree-select
|
||||
v-model="areaValue"
|
||||
:data="areaOptions"
|
||||
check-strictly
|
||||
label-field="name"
|
||||
node-key="name"
|
||||
:render-after-expand="false"
|
||||
placeholder="请选择行政区划"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
<div class="searchbox flex ai-c">
|
||||
|
|
@ -83,8 +98,10 @@ const {
|
|||
const areaValue = ref()
|
||||
const searchValue = ref()
|
||||
const dataset = ref([])
|
||||
const optionsData = ref([])
|
||||
|
||||
const getListData=()=>{
|
||||
console.log('areaValue',areaValue)
|
||||
axios({
|
||||
method: "get",
|
||||
url: VITE_GLOB_API_URL + '/api/FireGrid/GetCheckPointList',
|
||||
|
|
@ -101,11 +118,41 @@ const getListData=()=>{
|
|||
dataset.value = rel
|
||||
})
|
||||
}
|
||||
const getAreaListData=(id)=>{
|
||||
axios({
|
||||
method: "get",
|
||||
url: VITE_GLOB_API_URL + '/api/Orgs/LoadChildren',
|
||||
params: {
|
||||
parentId: id
|
||||
},
|
||||
headers: {
|
||||
'X-Token': localStorage.getItem("X-Token")
|
||||
}
|
||||
}).then(res => {
|
||||
let rel = res.data.result
|
||||
rel.forEach(item =>{
|
||||
if(item.level == 1){
|
||||
item.children = []
|
||||
optionsData.value.push(item)
|
||||
getAreaListData(item.id)
|
||||
}
|
||||
if(item.level == 2){
|
||||
optionsData.value.forEach(val =>{
|
||||
if(val.id == item.parentId){
|
||||
val.children.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
props.chartConfig.option.areaOptions = optionsData.value
|
||||
})
|
||||
}
|
||||
const lisClick=(item)=>{
|
||||
EventBus.emit('clockinlistsenddata' , item);
|
||||
}
|
||||
onMounted(() => {
|
||||
getListData()
|
||||
getAreaListData(371300)
|
||||
})
|
||||
|
||||
</script>
|
||||
|
|
@ -258,6 +305,13 @@ onMounted(() => {
|
|||
:deep(.n-base-selection .n-base-selection__border, .n-base-selection .n-base-selection__state-border){
|
||||
border: none;
|
||||
}
|
||||
:deep(.el-select__wrapper){
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
:deep(.el-select__placeholder){
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
/* 整个滚动条的样式 */
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ export const option = {
|
|||
backgroundColors: ["#05231A","#0A392A","#06281D","#00611A"],
|
||||
headerData:["乡镇/村庄","护林员姓名","在线状态","离线时长"],
|
||||
dataset: [
|
||||
{ town: '探沂镇' , name: '刘磊', onlinestatus: true, offlineduration: 10 },
|
||||
{ town: '梁邱镇' , name: '邵泽兰', onlinestatus: false, offlineduration: 10 },
|
||||
{ town: '马庄镇' , name: '邵泽兰', onlinestatus: true, offlineduration: 10 },
|
||||
{ town: '探沂镇' , name: '邵泽兰', onlinestatus: true, offlineduration: 10 },
|
||||
{ town: '梁邱镇' , name: '邵泽兰', onlinestatus: false, offlineduration: 10 },
|
||||
{ town: '探沂镇' , name: '邵泽兰', onlinestatus: false, offlineduration: 10 },
|
||||
{ town: '马庄镇' , name: '邵泽兰', onlinestatus: false, offlineduration: 10 },
|
||||
{ town: '探沂镇' , name: '邵泽兰', onlinestatus: true, offlineduration: 10 },
|
||||
{ town: '探沂镇' , name: '邵泽兰', onlinestatus: true, offlineduration: 10 },
|
||||
{ TownName: '探沂镇' , Name: '刘磊', State: '在线', OnLineTime: 10, Lng: '118.042384', Lat: '35.41264', CreateId: '11' },
|
||||
{ TownName: '梁邱镇' , Name: '邵泽兰', State: '离线', OnLineTime: 10, Lng: '118.142384', Lat: '35.21264', CreateId: '22' },
|
||||
{ TownName: '马庄镇' , Name: '邵泽兰', State: '在线', OnLineTime: 10 },
|
||||
{ TownName: '探沂镇' , Name: '邵泽兰', State: '在线', OnLineTime: 10 },
|
||||
{ TownName: '梁邱镇' , Name: '邵泽兰', State: '离线', OnLineTime: 10 },
|
||||
{ TownName: '探沂镇' , Name: '邵泽兰', State: '离线', OnLineTime: 10 },
|
||||
{ TownName: '马庄镇' , Name: '邵泽兰', State: '离线', OnLineTime: 10 },
|
||||
{ TownName: '探沂镇' , Name: '邵泽兰', State: '在线', OnLineTime: 10 },
|
||||
{ TownName: '探沂镇' , Name: '邵泽兰', State: '在线', OnLineTime: 10 },
|
||||
],
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,22 +5,22 @@
|
|||
<div class="scopedbox headerli">操作</div>
|
||||
</div>
|
||||
<div class="sectionbox">
|
||||
<div class="nodatabox" v-if="dataset.length<1">暂无数据</div>
|
||||
<div class="secli" v-for="item in dataset">
|
||||
<div class="li">
|
||||
<div class="la">{{ item.town }}</div>
|
||||
<div class="la">{{ item.TownName }}</div>
|
||||
</div>
|
||||
<div class="li">
|
||||
<div class="la">{{ item.name }}</div>
|
||||
<div class="la">{{ item.Name }}</div>
|
||||
</div>
|
||||
<div class="li">
|
||||
<span class="onlinecircle" v-if="item.onlinestatus"></span>
|
||||
<span class="onlinecircle" v-if="item.State=='在线'"></span>
|
||||
<span class="outlinecircle" v-else></span>
|
||||
<span v-if="item.onlinestatus">在线</span>
|
||||
<span v-else>离线</span>
|
||||
<span>{{ item.State }}</span>
|
||||
</div>
|
||||
<div class="li">{{ item.offlineduration }}</div>
|
||||
<div class="li">{{ item.OnLineTime }}</div>
|
||||
<div class="li scopedbox">
|
||||
<div class="locationbox flex ai-c jc-c">
|
||||
<div class="locationbox flex ai-c jc-c" @click="goflyaddress(item)">
|
||||
<img class="img" src="/src/assets/images/chart/xunchaguiji/locationicon.png" />
|
||||
<span>位置</span>
|
||||
</div>
|
||||
|
|
@ -36,8 +36,10 @@
|
|||
<script setup lang="ts">
|
||||
import { PropType, toRefs, ref, onMounted } from 'vue'
|
||||
import { CreateComponentType } from '@/packages/index.d'
|
||||
import { useChartDataFetch } from '@/hooks';
|
||||
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore';
|
||||
import * as mars3d from "mars3d";
|
||||
import axios from 'axios'
|
||||
import { getAppEnvConfig } from '@/utils/env'
|
||||
var { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||
|
||||
const props = defineProps({
|
||||
chartConfig: {
|
||||
|
|
@ -47,6 +49,7 @@ const props = defineProps({
|
|||
})
|
||||
|
||||
const { w, h } = toRefs(props.chartConfig.attr)
|
||||
const entityArr = ref([])
|
||||
const {
|
||||
textColors,
|
||||
textSize,
|
||||
|
|
@ -54,11 +57,53 @@ const {
|
|||
dataset,
|
||||
headerData
|
||||
} = toRefs(props.chartConfig.option)
|
||||
const goflyaddress=(e)=>{
|
||||
console.log('eee', e)
|
||||
entityArr.value.forEach(item =>{
|
||||
let graphic = window.graphicLayer.getGraphicById(item);
|
||||
window.graphicLayer.removeGraphic(graphic);
|
||||
})
|
||||
entityArr.value = []
|
||||
handlerAddEntity(e)
|
||||
}
|
||||
// 添加Entity
|
||||
const handlerAddEntity = (data) => {
|
||||
let graphicOptions = {
|
||||
id: data.CreateId,
|
||||
position: [parseFloat(data.Lng), parseFloat(data.Lat)],
|
||||
style: {
|
||||
image: '/src/assets/images/chart/xunchaguiji/jiuyuanrenyuan.png',
|
||||
clampToGround: true,
|
||||
scale: 0.5,
|
||||
}
|
||||
}
|
||||
entityArr.value.push(data.CreateId)
|
||||
let graphic = window.graphicLayer.getGraphicById(data.CreateId);
|
||||
|
||||
graphic = new mars3d.graphic.BillboardEntity(graphicOptions);
|
||||
window.graphicLayer.addGraphic(graphic);
|
||||
window.globalMap.flyToGraphic(graphic,{radius:300});
|
||||
}
|
||||
const getListData=()=>{
|
||||
axios({
|
||||
method: "post",
|
||||
url: VITE_GLOB_API_URL + '/api/FireManagement/GetPointUserOnLine',
|
||||
data: {
|
||||
page: 1,
|
||||
limit: 9999
|
||||
},
|
||||
headers: {
|
||||
'X-Token': localStorage.getItem("X-Token")
|
||||
}
|
||||
}).then(res => {
|
||||
let rel = res.data.result.items.userinfo
|
||||
props.chartConfig.option.dataset = rel
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
// getListData()
|
||||
})
|
||||
|
||||
// 数据callback处理(预览时触发)
|
||||
useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any[]) => {
|
||||
props.chartConfig.option.dataset = resData;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
@ -98,6 +143,12 @@ useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any[]) => {
|
|||
.sectionbox{
|
||||
height: calc(100% - 38px);
|
||||
overflow: auto;
|
||||
.nodatabox{
|
||||
padding: 40px 0;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
}
|
||||
.secli{
|
||||
background: v-bind('backgroundColors[1]');
|
||||
display: flex;
|
||||
|
|
|
|||
Loading…
Reference in New Issue