dianlixunjian
徐景良 2024-07-04 15:53:59 +08:00
parent 5e1a6c921d
commit 6568dce13a
10 changed files with 210 additions and 45 deletions

View File

@ -18,6 +18,8 @@ enum Api {
TestRetry = '/testRetry',
Login = '/api/Check/Login',
Logout = '/api/Check/Logout',
GetConfig = "/api/ShpLayerSource/LoadSettingConfig",
UpdateConfig = "/api/ShpLayerSource/UpdateSettingConfig",
}
/**
@ -105,6 +107,26 @@ export function getGeom(params:GetGeomParams) {
}
export function getConfig(params) {
return defHttp.get(
{
url: Api.GetConfig,
params,
}
)
}
export function updateConfig(params) {
return defHttp.post(
{
url: Api.UpdateConfig,
params,
}
);
}
export function deleteLayer(params) {
return defHttp.delete(
{

View File

@ -29,7 +29,7 @@
<!-- 根据输入坐标定位 -->
<div class="position-by-lnglat">
<div class="to-location" @click="handlerSelectView">
<div class="to-location" @click="handlerToPosition">
</div>
<div class="draw-polygon" @click="LocationShow = true">
@ -192,7 +192,7 @@
watch(
()=>props.mapConfig,
(newVal,oldVal)=>{
// handlerLoadMapLayer();
handlerLoadMapLayer();
}
)
@ -288,17 +288,17 @@
//
const handlerLoadMapLayer = ()=>{
if(switchLayerControler){
var allLayers = map.getStyle().layers;
allLayers.forEach(function(layer){
console.log("layerEEEEEE",layer);
console.log(layer.id);
// map.removeLayer(layer.id);
});
// var allLayers = map.getStyle().layers;
// allLayers.forEach(function(layer){
// console.log("layerEEEEEE",layer);
// console.log(layer.id);
// // map.removeLayer(layer.id);
// });
// var allSources = Object.keys(map.style.sourceCaches);
// allSources.forEach(function(sourceId){
// map.removeSource(sourceId);
// });
// map.removeControl(switchLayerControler);
map.removeControl(switchLayerControler);
}
let configlayers = {};
let baseLayers = [];
@ -638,8 +638,10 @@
isOpen.value = e;
};
const currentPosition = ref(null);
//
const handlerLocation = (lngLat) => {
currentPosition.value = lngLat
map.flyTo({
center: lngLat,
zoom: 17,
@ -651,6 +653,21 @@
},
});
};
//
const handlerToPosition = ()=>{
if(currentPosition.value){
map.flyTo({
center: currentPosition.value,
zoom: 17,
speed: 10, //
curve: 1, // 线
easing(t) {
//
return t;
},
});
}
}
//
const handlerEdit = (info) => {
@ -1213,7 +1230,7 @@
}
.position-by-lnglat{
width:29px;
width:58px;
height:29px;
background:#fff;
position:absolute;
@ -1221,7 +1238,6 @@
right:131px;
border-radius:3px;
.to-location{
display:none;
width:29px;
height:29px;
float:left;

View File

@ -38,7 +38,7 @@
import AuditProgress from './AuditProgress/index.vue';
import MapList from './MapList/index.vue';
import { getLoadTaskCount } from '@/api/bootstraps/index';
import { getGeom } from '@/api/sys/layerManagement';
import { getGeom,getConfig } from '@/api/sys/layerManagement';
import { getDetail } from '@/api/sys/WFSchemeInfo';
import { useMessage } from '@/hooks/web/useMessage';
@ -47,7 +47,10 @@
const MapboxMap = defineAsyncComponent(() => import('@/components/MapboxMaps/MapComponent.vue'));
const MapboxComponent = ref();
const mapConfig = ref({ isShowMap: false });
getConfig({code:"mapsetting"}).then(res=>{
mapConfig.value = JSON.parse(res.codeValue)
console.log("resresres",mapConfig.value);
})
const showParent = ref(true);
const year = ref();
const batch = ref('');

View File

@ -50,12 +50,18 @@
import { getLoadDroneCaseInfoCount, getLoadDroneCaseInfoDetail } from '@/api/bootstraps/index.ts';
import { batchOptions, yearOptions } from '@/views/demo/bootstraps/curbspotcity/util.ts';
import { getChildrenTree } from '@/api/demo/system.ts';
import { getGeom } from '@/api/sys/layerManagement';
import { getGeom,getConfig } from '@/api/sys/layerManagement';
const MapboxMap = defineAsyncComponent(() => import('@/components/MapboxMaps/MapComponent.vue'));
const MapboxComponent = ref();
const mapConfig = ref({ isShowMap: false });
getConfig({code:"mapsetting"}).then(res=>{
mapConfig.value = JSON.parse(res.codeValue)
console.log("resresres",mapConfig.value);
})
const showInfo = ref(false);
const year = ref<number>();
const batch = ref();

View File

@ -1,32 +1,58 @@
<template>
<a-descriptions
:column="2"
bordered
:contentStyle="{
'text-align': 'center',
'min-width': '250px',
'word-break': 'break-all'
}">
<a-descriptions-item label="id">{{ id }}</a-descriptions-item>
<a-descriptions-item label="案件编号">{{ case_no }}</a-descriptions-item>
<a-descriptions-item label="案件名称">{{ case_name }}</a-descriptions-item>
<a-descriptions-item label="案件描述">{{ case_description }}</a-descriptions-item>
<a-descriptions-item label="图斑编号">{{ geomid }}</a-descriptions-item>
<a-descriptions-item label="案件地址">{{ address }}</a-descriptions-item>
<a-descriptions-item label="总面积">{{ area? area: '-' }} </a-descriptions-item>
<a-descriptions-item label="耕地面积">{{ gengdi_area? gengdi_area: '-' }} </a-descriptions-item>
<a-descriptions-item label="国土空间规划面积">{{ guotukongjianguihua_area? guotukongjianguihua_area: '-' }} </a-descriptions-item>
<a-descriptions-item label="农用地面积">{{ nongyongdi_area? nongyongdi_area: '-' }} </a-descriptions-item>
<a-descriptions-item label="生态保护红线面积">{{ shengtaibaohuhongxian_area? shengtaibaohuhongxian_area: '-' }} </a-descriptions-item>
<a-descriptions-item label="永久基本农田面积">{{ yongjiujibennongtian_area? yongjiujibennongtian_area: '-' }} </a-descriptions-item>
<a-descriptions-item label="重点区域面积">{{ zhongdianquyu_area? zhongdianquyu_area: '-' }} </a-descriptions-item>
<a-descriptions-item label="创建时间">{{ createtime }}</a-descriptions-item>
</a-descriptions>
<div class="detail-container">
<div class="map-container">
<MapboxMap
:mapConfig="mapConfig"
@handlerDrawComplete="handlerDrawComplete"
@mapOnLoad="onMapboxLoad"
ref="MapboxComponent"
/>
</div>
<div class="info-container">
<a-descriptions
:column="2"
bordered
:contentStyle="{
'text-align': 'center',
'min-width': '250px',
'word-break': 'break-all'
}">
<a-descriptions-item label="id">{{ id }}</a-descriptions-item>
<a-descriptions-item label="案件编号">{{ case_no }}</a-descriptions-item>
<a-descriptions-item label="案件名称">{{ case_name }}</a-descriptions-item>
<a-descriptions-item label="案件描述">{{ case_description }}</a-descriptions-item>
<a-descriptions-item label="图斑编号">{{ geomid }}</a-descriptions-item>
<a-descriptions-item label="案件地址">{{ address }}</a-descriptions-item>
<a-descriptions-item label="总面积">{{ area? area: '-' }} </a-descriptions-item>
<a-descriptions-item label="耕地面积">{{ gengdi_area? gengdi_area: '-' }} </a-descriptions-item>
<a-descriptions-item label="国土空间规划面积">{{ guotukongjianguihua_area? guotukongjianguihua_area: '-' }} </a-descriptions-item>
<a-descriptions-item label="农用地面积">{{ nongyongdi_area? nongyongdi_area: '-' }} </a-descriptions-item>
<a-descriptions-item label="生态保护红线面积">{{ shengtaibaohuhongxian_area? shengtaibaohuhongxian_area: '-' }} </a-descriptions-item>
<a-descriptions-item label="永久基本农田面积">{{ yongjiujibennongtian_area? yongjiujibennongtian_area: '-' }} </a-descriptions-item>
<a-descriptions-item label="重点区域面积">{{ zhongdianquyu_area? zhongdianquyu_area: '-' }} </a-descriptions-item>
<a-descriptions-item label="创建时间">{{ createtime }}</a-descriptions-item>
</a-descriptions>
</div>
</div>
</template>
<script setup lang="ts">
import { defineProps } from "vue"
import { defineProps,ref, } from "vue"
import MapboxMap from '@/components/MapboxMaps/MapComponent.vue'
import {getConfig} from '@/api/sys/layerManagement'
import { getGeom } from '@/api/sys/layerManagement';
const MapboxComponent = ref();
const mapConfig = ref({})
getConfig({code:"mapsetting"}).then(res=>{
mapConfig.value = JSON.parse(res.codeValue)
console.log("resresres",mapConfig.value);
})
const props = defineProps(["showInfoData"])
console.log("showInfoData123",props.showInfoData);
const {
address,
area,
@ -43,6 +69,67 @@ const {
yongjiujibennongtian_area,
zhongdianquyu_area
} = props.showInfoData
function onMapboxLoad(){
changeTask();
}
function changeTask() {
let getGeomPrams = {
TableName: 'drone_shp_data ',
FieldName: 'gid',
FieldValue: props.showInfoData.geomid,
page: 1,
limit: 999,
key: null,
};
if ( props.showInfoData.geomid) {
getGeom(getGeomPrams).then((res) => {
let geoms = [];
if (res) {
if (res.items?.length > 0) {
res.items.forEach((item, index) => {
let geom = {
key: item.gid,
mapgeom: item.geometry,
};
geoms.push(geom);
});
}
// MapboxComponent.value.handlerDraw(status,mapgemoList.value, false);
MapboxComponent.value.handlerDraw('Details', geoms, false);
} else {
createMessage.error('当前数据没有图斑!');
}
});
} else {
createMessage.error('当前数据没有图斑!');
}
}
</script>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
.detail-container{
width:100%;
height:100%;
padding:20px;
}
.detail-container::after{
content:"";
display: block;
clear:both;
height:0;
visibility: none;
}
.map-container{
float: left;
width:500px;
height:600px;
margin-right:20px;
}
.info-container{
float:left;
width: calc( 100% - 520px);
}
</style>

View File

@ -52,11 +52,16 @@ import MapList from './MapList/index.vue'
import { getLoadDroneCaseInfoCount, getLoadDroneCaseInfoDetail } from '@/api/bootstraps/index.ts'
import { batchOptions, yearOptions} from '@/views/demo/bootstraps/curbspotcity/util.ts'
import { getChildrenTree } from '@/api/demo/system.ts'
import { getGeom } from '@/api/sys/layerManagement';
import { getGeom,getConfig } from '@/api/sys/layerManagement';
const MapboxMap = defineAsyncComponent(() => import('@/components/MapboxMaps/MapComponent.vue'));
const MapboxComponent = ref();
const mapConfig = ref({ isShowMap: false });
getConfig({code:"mapsetting"}).then(res=>{
mapConfig.value = JSON.parse(res.codeValue)
})
const showInfo = ref(false)
const year = ref<number>()

View File

@ -8,8 +8,6 @@
size="small"
style="padding:0px 15px"
>
<a-row :gutter="12">
<a-col :span="12" >
<a-card title="基本设置" class="card-item">
@ -163,6 +161,8 @@
</a-collapse-panel>
</a-collapse>
</a-card>
<a-button type="primary" size="middle" style="margin-top:12px;" @click="saveMapConfig"></a-button>
</Form>
</div>
@ -185,8 +185,20 @@
import { Form, FormItem, message, Switch,TableProps } from 'ant-design-vue';
import { PageWrapper } from '@/components/Page';
import { ShpLayerSourceLoadPage, GetTableAndViewColumnList } from '@/api/demo/formScheme';
import{fun_GetForm} from '@/api/demo/formModule'
import {updateConfig,getConfig} from '@/api/sys/layerManagement'
import { EditOutlined, DeleteOutlined, PercentageOutlined ,PlusOutlined} from '@ant-design/icons-vue';
import SelectLayer from '@/components/MapboxMaps/Modal/ServeResource/index.vue'
import { useMessage } from '@/hooks/web/useMessage';
const { createMessage } = useMessage();
const mapConfig = ref({});
getConfig({code:"mapsetting"}).then(res=>{
mapConfig.value = JSON.parse(res.codeValue)
})
// const mapConfig = reactive({
// baseConfig:{
// state:true,
@ -200,7 +212,7 @@
// minZoom:3,
// maxZoom:18
// },
interface BaseLayerDataType {
key: string | number;
name: string;
@ -667,9 +679,8 @@
}
]
};
const mapConfig = ref(config.table.maps);
// const mapConfig = ref(config.table.maps);
console.log("mapConfig2",mapConfig.value);
watch(
() => config.table.maps,
@ -851,6 +862,16 @@
}
}
const saveMapConfig = ()=>{
let form = {
code:"mapsetting",
codeValue:JSON.stringify(mapConfig.value)
}
updateConfig(form).then(res=>{
createMessage.success("保存成功!");
})
}
</script>
<style lang="less" scoped>

View File

@ -114,6 +114,8 @@ import { debug } from 'console';
isSubmitClick.value = false;
});
console.log("editData123",editData);
debugger
//
function formNextClick() {
console.log('click')

View File

@ -115,6 +115,7 @@
}
// -
function handleEdit(record: Recordable) {
console.log("record",record);
formModalVisible.value = true;
openModal(true, {
isEdit: true,

View File

@ -366,6 +366,8 @@
auditNameVal.value = auditNode.auditName;
}
}
let currentNode;
if (auditNode.isInherit) {
currentNode = wfData.find((t) => t.type == 'bpmn:StartEvent');