From 2a7135f1f6ff6656c1a84bfd6d0a56d34311af39 Mon Sep 17 00:00:00 2001
From: helloxujingliang <3225043@qq.com>
Date: Wed, 10 Jul 2024 08:25:00 +0800
Subject: [PATCH 1/7] merge
---
src/components/MapboxMaps/MapComponent.vue | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/components/MapboxMaps/MapComponent.vue b/src/components/MapboxMaps/MapComponent.vue
index 3257d929..19e191f1 100644
--- a/src/components/MapboxMaps/MapComponent.vue
+++ b/src/components/MapboxMaps/MapComponent.vue
@@ -285,10 +285,13 @@
function handlerLayerChange(){
var allLayers = map.getStyle().layers;
- allLayers.forEach(function(layer){
- map.moveLayer('detailsLayer', layer.id);
- map.moveLayer('detailsLayerLine', layer.id);
+ map.moveLayer('detailsLayerLine', allLayers[allLayers.length-1].id);
+ allLayers.forEach(function(layer){
});
+ // allLayers.forEach(function(layer){
+ // console.log("layersssss",layer.id);
+ // // map.moveLayer('detailsLayer', layer.id);
+ // });
}
// 地图图层控制
const handlerLoadMapLayer = ()=>{
@@ -353,6 +356,7 @@
handlerLayerChange()
}
}
+ console.log("layersssss",layers);
baseLayers.push(layers)
});
configlayers["地图底图"] = {
@@ -369,6 +373,9 @@
layerGroups:configlayers
});
map.addControl(switchLayerControler,"top-left");
+
+
+ handlerLayerChange()
}
// 销毁地图
@@ -392,7 +399,6 @@
'tileSize': 512,
'maxzoom': 14
});
-
map.setTerrain({ 'source': 'mapbox-dem', 'exaggeration': 1.5 });
}
// 移除地图实例
From ee54ca392b183981482945bc0607cc39336b7ceb Mon Sep 17 00:00:00 2001
From: helloxujingliang <3225043@qq.com>
Date: Wed, 10 Jul 2024 11:10:12 +0800
Subject: [PATCH 2/7] merege
---
src/components/MapboxMaps/MapComponent.vue | 1 +
src/views/demo/bootstraps/mapconfig/index.vue | 549 ++++++++++++++++++
src/views/demo/tiankongdi/auditinfo/index.vue | 1 -
.../demo/tiankongdi/changearea/index.vue | 2 +
.../MapList/ShowInfoModal/index.vue | 2 +
src/views/demo/workflow/task/process/look.vue | 3 +-
6 files changed, 555 insertions(+), 3 deletions(-)
create mode 100644 src/views/demo/bootstraps/mapconfig/index.vue
diff --git a/src/components/MapboxMaps/MapComponent.vue b/src/components/MapboxMaps/MapComponent.vue
index 19e191f1..864e796c 100644
--- a/src/components/MapboxMaps/MapComponent.vue
+++ b/src/components/MapboxMaps/MapComponent.vue
@@ -285,6 +285,7 @@
function handlerLayerChange(){
var allLayers = map.getStyle().layers;
+ if(map.getLayer("detailsLayerLine"))
map.moveLayer('detailsLayerLine', allLayers[allLayers.length-1].id);
allLayers.forEach(function(layer){
});
diff --git a/src/views/demo/bootstraps/mapconfig/index.vue b/src/views/demo/bootstraps/mapconfig/index.vue
new file mode 100644
index 00000000..928cd7ea
--- /dev/null
+++ b/src/views/demo/bootstraps/mapconfig/index.vue
@@ -0,0 +1,549 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/demo/tiankongdi/auditinfo/index.vue b/src/views/demo/tiankongdi/auditinfo/index.vue
index 28cabef5..7c734077 100644
--- a/src/views/demo/tiankongdi/auditinfo/index.vue
+++ b/src/views/demo/tiankongdi/auditinfo/index.vue
@@ -45,7 +45,6 @@
import { getGeom,getConfig } from '@/api/sys/layerManagement';
import { getDetail } from '@/api/sys/WFSchemeInfo';
import { useMessage } from '@/hooks/web/useMessage';
-
const { createMessage } = useMessage();
const MapboxMap = defineAsyncComponent(() => import('@/components/MapboxMaps/MapComponent.vue'));
diff --git a/src/views/demo/tiankongdi/changearea/index.vue b/src/views/demo/tiankongdi/changearea/index.vue
index 742893d5..90303f32 100644
--- a/src/views/demo/tiankongdi/changearea/index.vue
+++ b/src/views/demo/tiankongdi/changearea/index.vue
@@ -51,6 +51,8 @@
import { batchOptions, yearOptions } from '@/views/demo/tiankongdi/curbspotcity/util.ts';
import { getChildrenTree } from '@/api/demo/system.ts';
import { getGeom,getConfig } from '@/api/sys/layerManagement';
+ import { useMessage } from '@/hooks/web/useMessage';
+ const { createMessage } = useMessage();
const MapboxMap = defineAsyncComponent(() => import('@/components/MapboxMaps/MapComponent.vue'));
const MapboxComponent = ref();
diff --git a/src/views/demo/tiankongdi/curbspotcity/MapList/ShowInfoModal/index.vue b/src/views/demo/tiankongdi/curbspotcity/MapList/ShowInfoModal/index.vue
index a7e5c133..cc9b4e77 100644
--- a/src/views/demo/tiankongdi/curbspotcity/MapList/ShowInfoModal/index.vue
+++ b/src/views/demo/tiankongdi/curbspotcity/MapList/ShowInfoModal/index.vue
@@ -104,6 +104,8 @@ import { defineProps,ref, } from "vue"
import MapboxMap from '@/components/MapboxMaps/MapComponent.vue'
import {getConfig} from '@/api/sys/layerManagement'
import { getGeom } from '@/api/sys/layerManagement';
+import { useMessage } from '@/hooks/web/useMessage';
+const { createMessage } = useMessage();
const MapboxComponent = ref();
const mapConfig = ref({})
diff --git a/src/views/demo/workflow/task/process/look.vue b/src/views/demo/workflow/task/process/look.vue
index d2774532..715da411 100644
--- a/src/views/demo/workflow/task/process/look.vue
+++ b/src/views/demo/workflow/task/process/look.vue
@@ -148,11 +148,10 @@
import { designerDataType, logsType } from './processModel';
import { auditInfo } from './page';
import { getGeom } from '@/api/sys/layerManagement';
- import { useMessage } from '@/hooks/web/useMessage';
import { storeToRefs } from 'pinia';
import ImagePreview from "@/components/Upload/src/components/image_preview.vue";
import { userFormFileStore } from '@/store/modules/formFileUrl';
-
+ import { useMessage } from '@/hooks/web/useMessage';
const { createMessage } = useMessage();
const MapboxMap = defineAsyncComponent(() => import('@/components/MapboxMaps/MapComponent.vue'));
const mapConfig = ref({ isShowMap: false });
From c49d7010ae971c80babb142dd9ad0f3ca560345b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=BB=95=E5=B5=A9?= <17854119262@163.com>
Date: Wed, 10 Jul 2024 14:54:00 +0800
Subject: [PATCH 3/7] =?UTF-8?q?=E8=BF=9D=E6=B3=95=E8=A1=8C=E4=B8=BA?=
=?UTF-8?q?=E6=83=85=E5=86=B5=E7=BB=9F=E8=AE=A1=E6=98=8E=E7=BB=86=E8=A1=A8?=
=?UTF-8?q?-=E5=AF=BC=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/demo/caseoffence/index.data.ts | 2 +-
src/views/demo/caseoffence/index.vue | 58 ++++++++++++++++++++++--
2 files changed, 55 insertions(+), 5 deletions(-)
diff --git a/src/views/demo/caseoffence/index.data.ts b/src/views/demo/caseoffence/index.data.ts
index 189ef566..f688384e 100644
--- a/src/views/demo/caseoffence/index.data.ts
+++ b/src/views/demo/caseoffence/index.data.ts
@@ -12,7 +12,7 @@ export const columns: BasicColumn[] = [
title: '县区',
dataIndex: 'countyname',
width: 150,
- // fixed: 'left',
+ fixed: 'left',
},
{
title: '下发图斑',
diff --git a/src/views/demo/caseoffence/index.vue b/src/views/demo/caseoffence/index.vue
index 3f99fbd6..125ca283 100644
--- a/src/views/demo/caseoffence/index.vue
+++ b/src/views/demo/caseoffence/index.vue
@@ -154,14 +154,17 @@
import { PermissionBtn } from '@/components/PermissionBtn/index';
import { PageWrapper } from '@/components/Page';
import { cloneDeep } from 'lodash-es';
- import { getCaseOffence } from '@/api/demo/system';
+ import { getCaseOffence, postCaseOffenceToExcel } from '@/api/demo/system';
import { columns, searchFormSchema } from './index.data';
import { useMessage } from '@/hooks/web/useMessage';
- import { MinusOutlined, CloseOutlined, CloudDownloadOutlined } from '@ant-design/icons-vue';
- import dayjs from 'dayjs';
import { RecordList } from './page';
+ import { MinusOutlined, CloseOutlined, CloudDownloadOutlined } from '@ant-design/icons-vue';
+ import { getAppEnvConfig } from '@/utils/env';
+ import axios from 'axios';
+ import dayjs from 'dayjs';
const { createMessage } = useMessage();
+ const { VITE_GLOB_API_URL } = getAppEnvConfig();
// 页面表格
const searchParams = ref();
@@ -177,9 +180,9 @@
showIndexColumn: false,
striped: false,
bordered: true,
- showSummary: true,
canResize: false,
useSearchForm: true,
+ // showTableSetting: true,
pagination: false,
size: 'small',
handleSearchInfoFn(info) {
@@ -265,6 +268,18 @@
// 标签页面的搜索条件
currentListQuery.listQuery = searchForm;
}
+ function onEdit(targetKey: string) {
+ tablist.splice(parseInt(targetKey), 1);
+ if (tablist.length == 0) {
+ showRecordList.value = false;
+ }
+ if (parseInt(targetKey) > 1) {
+ activeKey.value = (parseInt(targetKey) - 1).toString();
+ } else {
+ activeKey.value = '0';
+ }
+ currentListQuery.listQuery = tablist[activeKey.value].listQuery;
+ }
function handleTabChange(e) {
currentListQuery.listQuery = tablist[e].listQuery;
}
@@ -280,6 +295,41 @@
}
showRecordList.value = false;
}
+
+ // 直接下载接口返回的二进制流
+ function handleExport() {
+ let params = {
+ startTime: dayjs(searchParams.value?.startTime).format('YYYY-MM'),
+ endTime: dayjs(searchParams.value?.endTime).format('YYYY-MM'),
+ };
+ axios({
+ method: 'post',
+ url: VITE_GLOB_API_URL + '/api/DroneCaseInfoSingle/CaseOffenceToExcel',
+ params: params,
+ headers: {
+ 'X-Token': localStorage.getItem('X-Token'),
+ },
+ responseType: 'blob',
+ }).then((res) => {
+ let fileName = '无人机发现违法行为情况统计明细表' + new Date().getTime() + '.xls';
+ const elink = document.createElement('a');
+ elink.download = fileName;
+ elink.style.display = 'none';
+ elink.href = URL.createObjectURL(res.data);
+ document.body.appendChild(elink);
+ elink.click();
+ URL.revokeObjectURL(elink.href);
+ document.body.removeChild(elink);
+ });
+ }
+ // 按键分类
+ const buttonClick = async (type) => {
+ switch (type) {
+ case 'btnExport':
+ handleExport();
+ break;
+ }
+ };