Token修改
commit
27804036dd
|
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
|
||||
<div class="mapContainer" :id="'mapContainer' + mapRandom">
|
||||
<div class="refresh-button">
|
||||
<ReloadOutlined @click="onrefresh" />
|
||||
|
|
@ -28,7 +27,7 @@ import { on } from '@/utils/domUtils';
|
|||
import { parse } from 'path';
|
||||
|
||||
defineOptions({ name: 'ImageUpload' });
|
||||
const mapRandom = ref(parseInt(Math.random()*100000).toString())
|
||||
const mapRandom = ref(parseInt(Math.random() * 100000).toString());
|
||||
|
||||
const emit = defineEmits(['change', 'update:value', 'delete']);
|
||||
const props = defineProps({
|
||||
|
|
@ -55,13 +54,12 @@ import { on } from '@/utils/domUtils';
|
|||
let map: Map;
|
||||
|
||||
onMounted(() => {
|
||||
// mapboxgl.accessToken = "pk.eyJ1IjoieHVqaW5nbGlhbmciLCJhIjoiY2w3bzFzZnZqMjdieTN1cG92N2I1d2huOSJ9.aQqMz4S-cTziUYizIH_gNg"
|
||||
mapboxgl.accessToken = "123"
|
||||
mapboxgl.accessToken = "pk.eyJ1IjoieHVqaW5nbGlhbmciLCJhIjoiY2w3bzFzZnZqMjdieTN1cG92N2I1d2huOSJ9.aQqMz4S-cTziUYizIH_gNg"
|
||||
map = initMap();
|
||||
map.on("load",function(){
|
||||
map.on('load', function () {
|
||||
refreshLocation();
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.value,
|
||||
|
|
@ -131,39 +129,38 @@ import { on } from '@/utils/domUtils';
|
|||
|
||||
const refreshLocation = () => {
|
||||
map.addSource('points', {
|
||||
'type': 'geojson',
|
||||
'data': {
|
||||
'type': 'FeatureCollection',
|
||||
'features': [
|
||||
type: 'geojson',
|
||||
data: {
|
||||
type: 'FeatureCollection',
|
||||
features: [
|
||||
{
|
||||
'type': 'Feature',
|
||||
'properties': {},
|
||||
'geometry': {
|
||||
'type': 'Point',
|
||||
'coordinates': [118.298906,35.135013]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
type: 'Feature',
|
||||
properties: {},
|
||||
geometry: {
|
||||
type: 'Point',
|
||||
coordinates: [118.298906, 35.135013],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
// Add a circle layer
|
||||
map.addLayer({
|
||||
'id': 'circle',
|
||||
'type': 'circle',
|
||||
'source': 'points',
|
||||
'paint': {
|
||||
id: 'circle',
|
||||
type: 'circle',
|
||||
source: 'points',
|
||||
paint: {
|
||||
'circle-color': '#409EFF',
|
||||
'circle-radius': 6,
|
||||
'circle-stroke-width': 3,
|
||||
'circle-stroke-color': '#ffffff'
|
||||
}
|
||||
'circle-stroke-color': '#ffffff',
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const onrefresh = () => {
|
||||
|
||||
createMessage.success(t('component.map.refreshSuccess'));
|
||||
}
|
||||
};
|
||||
|
||||
function getBase64<T extends string | ArrayBuffer | null>(file: File) {
|
||||
return new Promise<T>((resolve, reject) => {
|
||||
|
|
@ -177,7 +174,7 @@ import { on } from '@/utils/domUtils';
|
|||
}
|
||||
|
||||
const handlePreview = async (file: UploadFile) => {
|
||||
console.log("fileEEEEE",file);
|
||||
console.log('fileEEEEE', file);
|
||||
if (!file.url && !file.preview) {
|
||||
file.preview = await getBase64<string>(file.originFileObj!);
|
||||
}
|
||||
|
|
@ -255,7 +252,6 @@ import { on } from '@/utils/domUtils';
|
|||
});
|
||||
return props.multiple ? list : list.length > 0 ? list[0] : '';
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
|
|
|
|||
|
|
@ -1821,7 +1821,7 @@
|
|||
AddDroneTask({ geomid: geomidStr, caseno: props.caseno }).then((res) => {
|
||||
if (res) {
|
||||
message.success('成功提交云查询');
|
||||
// useCloudQuery.setIdentification(true);
|
||||
useCloudQuery.setIdentification(true);
|
||||
} else {
|
||||
message.error('提交云查询失败');
|
||||
useCloudQuery.setIdentification(false);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
export enum MapboxConfig {
|
||||
ACCESS_TOKEN = 'pk.eyJ1IjoieHVqaW5nbGlhbmciLCJhIjoiY2w3bzFzZnZqMjdieTN1cG92N2I1d2huOSJ9.aQqMz4S-cTziUYizIH_gNg',
|
||||
// ACCESS_TOKEN = 'pk.eyJ1IjoieHVqaW5nbGlhbmciLCJhIjoiY2w3bzFzZnZqMjdieTN1cG92N2I1d2huOSJ9.aQqMz4S-cTziUYizIH_gNg'
|
||||
// ACCESS_TOKEN = "1234",
|
||||
TDT_TOKEN = 'b6585bc41ee16251dbe6b1af64f375d9',
|
||||
// add more config options here
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</template>
|
||||
</BasicTable>
|
||||
<a-modal width="75%" v-model:open="openModal" title="线索审核" :destroyOnClose="true" :footer="null">
|
||||
<InfoModal :infoData="infoData.info" @handleOk="handleOk" :control="false"/>
|
||||
<InfoModal :infoData="infoData.info" @handleOk="handleOk" @closeModal="closeModal" :control="false"/>
|
||||
</a-modal>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
|
|
@ -75,4 +75,7 @@ function handleAudit(record) {
|
|||
const handleOk = () => {
|
||||
console.log('infoData',infoData.value)
|
||||
}
|
||||
const closeModal = () => {
|
||||
openModal.value = false
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</template>
|
||||
</BasicTable>
|
||||
<a-modal width="75%" v-model:open="openModal" title="线索审核" :destroyOnClose="true" :footer="null">
|
||||
<InfoModal :infoData="infoData.info" @handleOk="handleOk" :control="false"/>
|
||||
<InfoModal :infoData="infoData.info" @handleOk="handleOk" @closeModal="closeModal" :control="false"/>
|
||||
</a-modal>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
|
|
@ -75,4 +75,7 @@ function handleAudit(record) {
|
|||
const handleOk = () => {
|
||||
console.log('infoData',infoData.value)
|
||||
}
|
||||
const closeModal = () => {
|
||||
openModal.value = false
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</template>
|
||||
</BasicTable>
|
||||
<a-modal width="75%" v-model:open="openModal" title="线索审核" :destroyOnClose="true" :footer="null">
|
||||
<InfoModal :infoData="infoData.info" @handleOk="handleOk" :control="false"/>
|
||||
<InfoModal :infoData="infoData.info" @handleOk="handleOk" @closeModal="closeModal" :control="false"/>
|
||||
</a-modal>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
|
|
@ -75,4 +75,7 @@ function handleAudit(record) {
|
|||
const handleOk = () => {
|
||||
console.log('infoData',infoData.value)
|
||||
}
|
||||
const closeModal = () => {
|
||||
openModal.value = false
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</template>
|
||||
</BasicTable>
|
||||
<a-modal width="75%" v-model:open="openModal" title="线索审核" :destroyOnClose="true" :footer="null">
|
||||
<InfoModal :infoData="infoData.info" @handleOk="handleOk" :control="false"/>
|
||||
<InfoModal :infoData="infoData.info" @handleOk="handleOk" @closeModal="closeModal" :control="false"/>
|
||||
</a-modal>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
|
|
@ -75,4 +75,7 @@ function handleAudit(record) {
|
|||
const handleOk = () => {
|
||||
console.log('infoData',infoData.value)
|
||||
}
|
||||
const closeModal = () => {
|
||||
openModal.value = false
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</template>
|
||||
</BasicTable>
|
||||
<a-modal width="75%" v-model:open="openModal" title="线索审核" :destroyOnClose="true" :footer="null">
|
||||
<InfoModal :infoData="infoData.info" @handleOk="handleOk" :control="false"/>
|
||||
<InfoModal :infoData="infoData.info" @handleOk="handleOk" @closeModal="closeModal" :control="false"/>
|
||||
</a-modal>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
|
|
@ -75,4 +75,7 @@ function handleAudit(record) {
|
|||
const handleOk = () => {
|
||||
console.log('infoData',infoData.value)
|
||||
}
|
||||
const closeModal = () => {
|
||||
openModal.value = false
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</template>
|
||||
</BasicTable>
|
||||
<a-modal width="75%" v-model:open="openModal" title="线索审核" :destroyOnClose="true" :footer="null">
|
||||
<InfoModal :infoData="infoData.info" @handleOk="handleOk" :control="false"/>
|
||||
<InfoModal :infoData="infoData.info" @handleOk="handleOk" @closeModal="closeModal" :control="false"/>
|
||||
</a-modal>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
|
|
@ -75,4 +75,7 @@ function handleAudit(record) {
|
|||
const handleOk = () => {
|
||||
console.log('infoData',infoData.value)
|
||||
}
|
||||
const closeModal = () => {
|
||||
openModal.value = false
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -284,7 +284,6 @@
|
|||
...querys,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(283, res);
|
||||
if (res.items.length > 0) {
|
||||
handlerUpdateTaskLayerData(res.items);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -256,11 +256,10 @@
|
|||
let filter_yingxiang: any = [];
|
||||
let filter_hangfei: any = [];
|
||||
|
||||
console.log(243, checkedKeys);
|
||||
// console.log(243, checkedKeys);
|
||||
|
||||
if (checkedKeys_now.length == 0) {
|
||||
// 清除全部图层
|
||||
mapboxComponentRef.value.clearTaskLayer('GeoserverManagementRaster');
|
||||
tableData1?.forEach((data) => {
|
||||
mapboxComponentRef.value.clearTaskLayer(data.dataTable);
|
||||
});
|
||||
|
|
@ -268,6 +267,10 @@
|
|||
mapboxComponentRef.value.clearTaskLayer(data.layerName);
|
||||
});
|
||||
mapboxComponentRef.value.clearTaskLayer('AchievementManageRaster');
|
||||
// 历史记录清零
|
||||
filter_tuceng_old = [];
|
||||
filter_yingxiang_old = [];
|
||||
filter_hangfei_old = [];
|
||||
} else {
|
||||
let checkedKeys_move = checkedKeys_now.filter(
|
||||
(item) => !uniqueKeysArray.concat(['1', '2', '3']).includes(item),
|
||||
|
|
@ -293,7 +296,9 @@
|
|||
if (checkedKey == data.id) {
|
||||
// 时间轴筛选数据
|
||||
// console.log(endTime, data);
|
||||
if (
|
||||
if (dayjs(startTime).format('YYYY-MM-DD') == dayjs(endTime).format('YYYY-MM-DD')) {
|
||||
filter_yingxiang.push(data);
|
||||
} else if (
|
||||
// dayjs(startTime).isBefore(data.createTime) &&
|
||||
dayjs(endTime).isAfter(dayjs(data.dateDir))
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ export const items_excel = [
|
|||
export const servicesColumns: BasicColumn[] = [
|
||||
{
|
||||
title: '地址',
|
||||
dataIndex: 'serverUrl',
|
||||
dataIndex: 'url',
|
||||
width: 220,
|
||||
},
|
||||
{
|
||||
|
|
@ -162,294 +162,92 @@ export const MAPBOX_TOKEN = "pk.eyJ1IjoieHVqaW5nbGlhbmciLCJhIjoiY2w3bzFzZnZqMjdi
|
|||
|
||||
export const TINADITU_TOKEN = "b6585bc41ee16251dbe6b1af64f375d9";
|
||||
|
||||
export const defaultData ={
|
||||
'serverName': '土地分类800M',
|
||||
'spatialRef': 'EPSG:4326',
|
||||
'dataSourceType': 'shp',
|
||||
'dataType': '面',
|
||||
'dataTable': 'tudifenlei_1',
|
||||
'shpPath': '20240912\\2024091208530044090088.zip',
|
||||
'appendPath': '20240912\\2024091208565311250121.sld',
|
||||
'headers': [
|
||||
export const defaultPaint =
|
||||
{
|
||||
'name': 'Geometry',
|
||||
'type': 'geometry(GEOMETRY, 4326)',
|
||||
'length': 0,
|
||||
'refName': 'geometry',
|
||||
'initName': null,
|
||||
'key': '9ba30ab8fe474468ad40bf409395d9ec'
|
||||
},
|
||||
{
|
||||
'name':'OBJECTID',
|
||||
'type':'numeric',
|
||||
'length': 10,
|
||||
'refName':'objectid',
|
||||
'initName': null,
|
||||
'key':'a65e2754879c405b9e65009378c20a3a'
|
||||
},
|
||||
{
|
||||
'name':'BSM',
|
||||
'type':'varchar',
|
||||
'length': 18,
|
||||
'refName':'bsm',
|
||||
'initName': null,
|
||||
'key':'98d31727112842bd9cbf0cfbfc1573be'
|
||||
},
|
||||
{
|
||||
'name':'YSDM',
|
||||
'type':'varchar',
|
||||
'length': 10,
|
||||
'refName':'ysdm',
|
||||
'initName': null,
|
||||
'key':'e02a883fe14e44e49421a6153e698837'
|
||||
},
|
||||
{
|
||||
'name':'TBYBH',
|
||||
'type':'varchar',
|
||||
'length': 18,
|
||||
'refName':'tbybh',
|
||||
'initName': null,
|
||||
'key':'8f3ac30c0f4d4fe4ac8bce7f66b0763e'
|
||||
},
|
||||
{
|
||||
'name':'TBBH',
|
||||
'type':'varchar',
|
||||
'length': 8,
|
||||
'refName':'tbbh',
|
||||
'initName': null,
|
||||
'key':'ba628a5432024ee2a38551da35505623'
|
||||
},
|
||||
{
|
||||
'name':'DLBM',
|
||||
'type':'varchar',
|
||||
'length': 5,
|
||||
'refName':'dlbm',
|
||||
'initName': null,
|
||||
'key':'e4c7a3b02a614060a0e179bc7b853267'
|
||||
},
|
||||
{
|
||||
'name':'DLMC',
|
||||
'type':'varchar',
|
||||
'length': 60,
|
||||
'refName':'dlmc',
|
||||
'initName': null,
|
||||
'key':'d6eecd9f2820426c9197c522b7a492a5'
|
||||
},
|
||||
{
|
||||
'name':'QSXZ',
|
||||
'type':'varchar',
|
||||
'length': 2,
|
||||
'refName':'qsxz',
|
||||
'initName': null,
|
||||
'key':'bb0b777486d247fd8f058b2ffe9941e3'
|
||||
},
|
||||
{
|
||||
'name':'QSDWDM',
|
||||
'type':'varchar',
|
||||
'length': 19,
|
||||
'refName':'qsdwdm',
|
||||
'initName': null,
|
||||
'key':'68b917da21b24cd6b9b0689c00d37cc8'
|
||||
},
|
||||
{
|
||||
'name':'QSDWMC',
|
||||
'type':'varchar',
|
||||
'length': 254,
|
||||
'refName':'qsdwmc',
|
||||
'initName': null,
|
||||
'key':'d6bd11baa76d40cfb77d79537fcdce87'
|
||||
},
|
||||
{
|
||||
'name':'ZLDWDM',
|
||||
'type':'varchar',
|
||||
'length': 19,
|
||||
'refName':'zldwdm',
|
||||
'initName': null,
|
||||
'key':'607da001aff34e018e696e25871e3b3d'
|
||||
},
|
||||
{
|
||||
'name':'ZLDWMC',
|
||||
'type':'varchar',
|
||||
'length': 254,
|
||||
'refName':'zldwmc',
|
||||
'initName': null,
|
||||
'key':'4f281fa729d942ae93312452b108419f'
|
||||
},
|
||||
{
|
||||
'name':'TBMJ',
|
||||
'type':'varchar',
|
||||
'length': 19,
|
||||
'refName':'tbmj',
|
||||
'initName': null,
|
||||
'key':'2d57075e983443d6a1543da9eea5f6ad'
|
||||
},
|
||||
{
|
||||
'name':'KCDLBM',
|
||||
'type':'varchar',
|
||||
'length': 5,
|
||||
'refName':'kcdlbm',
|
||||
'initName': null,
|
||||
'key':'f796b47b06bc47329c5608657a4f1b56'
|
||||
},
|
||||
{
|
||||
'name':'KCXS',
|
||||
'type':'varchar',
|
||||
'length': 19,
|
||||
'refName':'kcxs',
|
||||
'initName': null,
|
||||
'key':'a6450d82d6844fba94c6fad7abecc65f'
|
||||
},
|
||||
{
|
||||
'name':'KCMJ',
|
||||
'type':'varchar',
|
||||
'length': 19,
|
||||
'refName':'kcmj',
|
||||
'initName': null,
|
||||
'key':'1dc2d316e76744b39f2c30113a20f41e'
|
||||
},
|
||||
{
|
||||
'name':'TBDLMJ',
|
||||
'type':'varchar',
|
||||
'length': 19,
|
||||
'refName':'tbdlmj',
|
||||
'initName': null,
|
||||
'key':'b4883bae1f4a4d05b8051a21c564da4d'
|
||||
},
|
||||
{
|
||||
'name':'GDLX',
|
||||
'type':'varchar',
|
||||
'length': 2,
|
||||
'refName':'gdlx',
|
||||
'initName': null,
|
||||
'key':'3ce8d0c33ae34841895e8858ae12cdd5'
|
||||
},
|
||||
{
|
||||
'name':'XZDWKD',
|
||||
'type':'varchar',
|
||||
'length': 19,
|
||||
'refName':'xzdwkd',
|
||||
'initName': null,
|
||||
'key':'50da80fe782c491db587f7c90a72fd5a'
|
||||
},
|
||||
{
|
||||
'name':'TBXHDM',
|
||||
'type':'varchar',
|
||||
'length': 10,
|
||||
'refName':'tbxhdm',
|
||||
'initName': null,
|
||||
'key':'e6827e45e0f84ce2ac86987c12418b4d'
|
||||
},
|
||||
{
|
||||
'name':'TBXHMC',
|
||||
'type':'varchar',
|
||||
'length': 20,
|
||||
'refName':'tbxhmc',
|
||||
'initName': null,
|
||||
'key':'4bf92ecfc5c940ae9932b23935804409'
|
||||
},
|
||||
{
|
||||
'name':'ZZSXDM',
|
||||
'type':'varchar',
|
||||
'length': 6,
|
||||
'refName':'zzsxdm',
|
||||
'initName': null,
|
||||
'key':'bf5e0882becb44e28cf7298a43b6d228'
|
||||
},
|
||||
{
|
||||
'name':'ZZSXMC',
|
||||
'type':'varchar',
|
||||
'length': 20,
|
||||
'refName':'zzsxmc',
|
||||
'initName': null,
|
||||
'key':'c9a8c18c6c224b5395ef093486828e7f'
|
||||
},
|
||||
{
|
||||
'name':'GDDB',
|
||||
'type':'numeric',
|
||||
'length': 10,
|
||||
'refName':'gddb',
|
||||
'initName': null,
|
||||
'key':'d0a1369f55174189b27e229568418655'
|
||||
},
|
||||
{
|
||||
'name':'CZCSXM',
|
||||
'type':'varchar',
|
||||
'length': 4,
|
||||
'refName':'czcsxm',
|
||||
'initName': null,
|
||||
'key':'feabd673566b45189c1175cc8d797291'
|
||||
},
|
||||
{
|
||||
'name':'SJNF',
|
||||
'type':'numeric',
|
||||
'length': 10,
|
||||
'refName':'sjnf',
|
||||
'initName': null,
|
||||
'key':'d2aac801f5d14c608d77595fc776824e'
|
||||
},
|
||||
{
|
||||
'name':'MSSM',
|
||||
'type':'varchar',
|
||||
'length': 2,
|
||||
'refName':'mssm',
|
||||
'initName': null,
|
||||
'key':'5b21cdfc6abf4accb47890e36a17d7d5'
|
||||
},
|
||||
{
|
||||
'name':'GDPDJB',
|
||||
'type':'varchar',
|
||||
'length': 2,
|
||||
'refName':'gdpdjb',
|
||||
'initName': null,
|
||||
'key':'50f885d39abe46f68ba97e1f4a013f85'
|
||||
},
|
||||
{
|
||||
'name':'FRDBS',
|
||||
'type':'varchar',
|
||||
'length': 1,
|
||||
'refName':'frdbs',
|
||||
'initName': null,
|
||||
'key':'ce963ef7e22046bcb43ad4ce0fb644f0'
|
||||
},
|
||||
{
|
||||
'name':'HDMC',
|
||||
'type':'varchar',
|
||||
'length': 100,
|
||||
'refName':'hdmc',
|
||||
'initName': null,
|
||||
'key':'bd58262d73b54b94b97306d76510af79'
|
||||
},
|
||||
{
|
||||
'name':'BZ',
|
||||
'type':'varchar',
|
||||
'length': 254,
|
||||
'refName':'bz',
|
||||
'initName': null,
|
||||
'key':'e2a0a24cb5874af6a1f198195f24c9c3'
|
||||
},
|
||||
{
|
||||
'name':'乡镇',
|
||||
'type':'varchar',
|
||||
'length': 50,
|
||||
'refName':'乡镇',
|
||||
'initName': null,
|
||||
'key':'a61a833703e7487c9b76219da5518ab7'
|
||||
},
|
||||
{
|
||||
'name':'Shape_Leng',
|
||||
'type':'varchar',
|
||||
'length': 19,
|
||||
'refName':'shape_leng',
|
||||
'initName': null,
|
||||
'key':'73bfa4144db64bf299c0d10d9870d8cc'
|
||||
},
|
||||
{
|
||||
'name':'Shape_Area',
|
||||
'type':'varchar',
|
||||
'length': 19,
|
||||
'refName':'shape_area',
|
||||
'initName': null,
|
||||
'key':'f5be14198b3d4e959cee958f59d3fceb'
|
||||
}
|
||||
]
|
||||
}
|
||||
'fill-opacity': 1,
|
||||
'fill-color': [
|
||||
'case',
|
||||
['==', ['get', 'dlmc'], '采矿用地'],
|
||||
'#30123b',
|
||||
['==', ['get', 'dlmc'], '城镇村道路用地'],
|
||||
'#38266a',
|
||||
['==', ['get', 'dlmc'], '城镇住宅用地'],
|
||||
'#3e3892',
|
||||
['==', ['get', 'dlmc'], '干渠'],
|
||||
'#424ab4',
|
||||
['==', ['get', 'dlmc'], '高教用地'],
|
||||
'#455dd0',
|
||||
['==', ['get', 'dlmc'], '工业用地'],
|
||||
'#476de5',
|
||||
['==', ['get', 'dlmc'], '公路用地'],
|
||||
'#448ffe',
|
||||
['==', ['get', 'dlmc'], '公用设施用地'],
|
||||
'#3e3892',
|
||||
['==', ['get', 'dlmc'], '公园与绿地'],
|
||||
'#3c9ffd',
|
||||
['==', ['get', 'dlmc'], '沟渠'],
|
||||
'#31aff5',
|
||||
['==', ['get', 'dlmc'], '灌木林地'],
|
||||
'#26bfe8',
|
||||
['==', ['get', 'dlmc'], '广场用地'],
|
||||
'#1cced7',
|
||||
['==', ['get', 'dlmc'], '果园'],
|
||||
'#18dbc6',
|
||||
['==', ['get', 'dlmc'], '旱地'],
|
||||
'#1be5b5',
|
||||
['==', ['get', 'dlmc'], '河流水面'],
|
||||
'#27eea4',
|
||||
['==', ['get', 'dlmc'], '机场用地'],
|
||||
'#3af490',
|
||||
['==', ['get', 'dlmc'], '机关团体新闻出版用地'],
|
||||
'#52fa7a',
|
||||
['==', ['get', 'dlmc'], '交通服务场站用地'],
|
||||
'#6bfe64',
|
||||
['==', ['get', 'dlmc'], '科教文卫用地'],
|
||||
'#85ff51',
|
||||
['==', ['get', 'dlmc'], '坑塘水面'],
|
||||
'#9bfe41',
|
||||
['==', ['get', 'dlmc'], '裸土地'],
|
||||
'#adfb38',
|
||||
['==', ['get', 'dlmc'], '内陆滩涂'],
|
||||
'#bef434',
|
||||
['==', ['get', 'dlmc'], '农村道路'],
|
||||
'#ceeb34',
|
||||
['==', ['get', 'dlmc'], '农村宅基地'],
|
||||
'#dde037',
|
||||
['==', ['get', 'dlmc'], '其他草地'],
|
||||
'#ead439',
|
||||
['==', ['get', 'dlmc'], '其他林地'],
|
||||
'#f4c73a',
|
||||
['==', ['get', 'dlmc'], '其他园地'],
|
||||
'#fbb938',
|
||||
['==', ['get', 'dlmc'], '乔木林地'],
|
||||
'#fea933',
|
||||
['==', ['get', 'dlmc'], '商业服务业设施用地'],
|
||||
'#fe972b',
|
||||
['==', ['get', 'dlmc'], '设施农用地'],
|
||||
'#fc8323',
|
||||
['==', ['get', 'dlmc'], '水工建筑用地'],
|
||||
'#f76f1a',
|
||||
['==', ['get', 'dlmc'], '水浇地'],
|
||||
'#f15c13',
|
||||
['==', ['get', 'dlmc'], '水库水面'],
|
||||
'#e84b0c',
|
||||
['==', ['get', 'dlmc'], '水田'],
|
||||
'#de3e08',
|
||||
['==', ['get', 'dlmc'], '特殊用地'],
|
||||
'#d23105',
|
||||
['==', ['get', 'dlmc'], '铁路用地'],
|
||||
'#c42503',
|
||||
['==', ['get', 'dlmc'], '物流仓储用地'],
|
||||
'#b31b01',
|
||||
['==', ['get', 'dlmc'], '养殖坑塘'],
|
||||
'#a11201',
|
||||
['==', ['get', 'dlmc'], '竹林地'],
|
||||
'#8d0a01',
|
||||
['==', ['get', 'dlmc'], ''],
|
||||
'#7a0403',
|
||||
'#7a0403',
|
||||
],
|
||||
'fill-outline-color': '#232323',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import { WktToGeojson } from '@/components/MapboxMaps/src/WktGeojsonTransform';
|
||||
import mapboxgl, { Map, Popup } from 'mapbox-gl';
|
||||
import { getGeomData } from '@/api/demo/system';
|
||||
import { MAPBOX_TOKEN, TINADITU_TOKEN } from './clound.data';
|
||||
import { MAPBOX_TOKEN, TINADITU_TOKEN, defaultPaint } from './clound.data';
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
import axios from 'axios';
|
||||
|
||||
|
|
@ -119,11 +119,6 @@
|
|||
}
|
||||
if (layerName && map.getLayer(layerName)) {
|
||||
map.moveLayer(layerName, '');
|
||||
if (layerName == 'GeoserverManagementRaster') {
|
||||
if (map.getLayer('countyLayer')) {
|
||||
map.moveLayer('countyLayer', 'GeoserverManagementRaster');
|
||||
}
|
||||
}
|
||||
if (layerName == 'AchievementManageRaster') {
|
||||
if (map.getLayer('clusters')) {
|
||||
map.moveLayer('AchievementManageRaster', 'clusters');
|
||||
|
|
@ -191,11 +186,7 @@
|
|||
}
|
||||
|
||||
if (layerName && map.getLayer(layerName)) {
|
||||
if (layerName == 'GeoserverManagementRaster') {
|
||||
if (map.getLayer('streetLayer')) {
|
||||
map.moveLayer('streetLayer', 'GeoserverManagementRaster');
|
||||
}
|
||||
} else if (layerName == 'AchievementManageRaster') {
|
||||
if (layerName == 'AchievementManageRaster') {
|
||||
if (map.getLayer('clusters')) {
|
||||
map.moveLayer('AchievementManageRaster', 'clusters');
|
||||
}
|
||||
|
|
@ -214,50 +205,16 @@
|
|||
|
||||
// 图层管理-图层
|
||||
function GeoserverManagementRaster(chooseRows, lngLat, zoom, isMove) {
|
||||
// 清除图层
|
||||
// clearTaskLayer('GeoserverManagementRaster');
|
||||
// if (isMove) {
|
||||
// handlerLocation(lngLat, zoom);
|
||||
// }
|
||||
// let tiles: any = [];
|
||||
// chooseRows.forEach((chooseRow) => {
|
||||
// let tile =
|
||||
// 'http://192.168.10.131:8080/geoserver/my_workspace/wms?service=WMS&version=1.1.0&request=GetMap&layers=my_workspace:' +
|
||||
// chooseRow.dataTable +
|
||||
// '&styles=&bbox={bbox-epsg-3857}&width=256&height=256&srs=EPSG:3857' +
|
||||
// '&format=image/png&TRANSPARENT=TRUE';
|
||||
// tiles.push(tile);
|
||||
// });
|
||||
// map.addSource('GeoserverManagementRaster' , {
|
||||
// type: 'raster',
|
||||
// tiles: tiles,
|
||||
// tileSize: 256,
|
||||
// });
|
||||
// map.addLayer({
|
||||
// id: 'GeoserverManagementRaster',
|
||||
// type: 'raster',
|
||||
// source: 'GeoserverManagementRaster' ,
|
||||
// layout: {
|
||||
// visibility: 'visible',
|
||||
// },
|
||||
// });
|
||||
// map.on('click', 'GeoserverManagementRaster', (e) => {
|
||||
// console.log(e);
|
||||
// });
|
||||
// if (map.getLayer('streetLayer')) {
|
||||
// map.moveLayer('GeoserverManagementRaster', 'streetLayer');
|
||||
// }
|
||||
|
||||
// console.log(chooseRows);
|
||||
if (isMove) {
|
||||
handlerLocation(lngLat, zoom);
|
||||
}
|
||||
chooseRows?.forEach((chooseRow) => {
|
||||
// chooseRow.dataTable = 'pingyi304086660120221229';
|
||||
map.addSource(chooseRow.dataTable, {
|
||||
type: 'vector',
|
||||
tiles: [
|
||||
VITE_GLOB_API_URL_VAR.value + '/api/ShpGeoLayer/QueryVectorTileByTable?z={z}&x={x}&y={y}&table=' +
|
||||
VITE_GLOB_API_URL_VAR.value +
|
||||
'/api/ShpGeoLayer/QueryVectorTileByTable?z={z}&x={x}&y={y}&table=' +
|
||||
chooseRow.dataTable,
|
||||
// '&field=id,',
|
||||
],
|
||||
|
|
@ -272,94 +229,7 @@
|
|||
type: 'fill',
|
||||
source: chooseRow.dataTable,
|
||||
'source-layer': chooseRow.dataTable,
|
||||
paint: {
|
||||
'fill-opacity': 1,
|
||||
'fill-color': [
|
||||
'case',
|
||||
['==', ['get', 'dlmc'], '采矿用地'],
|
||||
'#30123b',
|
||||
['==', ['get', 'dlmc'], '城镇村道路用地'],
|
||||
'#38266a',
|
||||
['==', ['get', 'dlmc'], '城镇住宅用地'],
|
||||
'#3e3892',
|
||||
['==', ['get', 'dlmc'], '干渠'],
|
||||
'#424ab4',
|
||||
['==', ['get', 'dlmc'], '高教用地'],
|
||||
'#455dd0',
|
||||
['==', ['get', 'dlmc'], '工业用地'],
|
||||
'#476de5',
|
||||
['==', ['get', 'dlmc'], '公路用地'],
|
||||
'#448ffe',
|
||||
['==', ['get', 'dlmc'], '公用设施用地'],
|
||||
'#3e3892',
|
||||
['==', ['get', 'dlmc'], '公园与绿地'],
|
||||
'#3c9ffd',
|
||||
['==', ['get', 'dlmc'], '沟渠'],
|
||||
'#31aff5',
|
||||
['==', ['get', 'dlmc'], '灌木林地'],
|
||||
'#26bfe8',
|
||||
['==', ['get', 'dlmc'], '广场用地'],
|
||||
'#1cced7',
|
||||
['==', ['get', 'dlmc'], '果园'],
|
||||
'#18dbc6',
|
||||
['==', ['get', 'dlmc'], '旱地'],
|
||||
'#1be5b5',
|
||||
['==', ['get', 'dlmc'], '河流水面'],
|
||||
'#27eea4',
|
||||
['==', ['get', 'dlmc'], '机场用地'],
|
||||
'#3af490',
|
||||
['==', ['get', 'dlmc'], '机关团体新闻出版用地'],
|
||||
'#52fa7a',
|
||||
['==', ['get', 'dlmc'], '交通服务场站用地'],
|
||||
'#6bfe64',
|
||||
['==', ['get', 'dlmc'], '科教文卫用地'],
|
||||
'#85ff51',
|
||||
['==', ['get', 'dlmc'], '坑塘水面'],
|
||||
'#9bfe41',
|
||||
['==', ['get', 'dlmc'], '裸土地'],
|
||||
'#adfb38',
|
||||
['==', ['get', 'dlmc'], '内陆滩涂'],
|
||||
'#bef434',
|
||||
['==', ['get', 'dlmc'], '农村道路'],
|
||||
'#ceeb34',
|
||||
['==', ['get', 'dlmc'], '农村宅基地'],
|
||||
'#dde037',
|
||||
['==', ['get', 'dlmc'], '其他草地'],
|
||||
'#ead439',
|
||||
['==', ['get', 'dlmc'], '其他林地'],
|
||||
'#f4c73a',
|
||||
['==', ['get', 'dlmc'], '其他园地'],
|
||||
'#fbb938',
|
||||
['==', ['get', 'dlmc'], '乔木林地'],
|
||||
'#fea933',
|
||||
['==', ['get', 'dlmc'], '商业服务业设施用地'],
|
||||
'#fe972b',
|
||||
['==', ['get', 'dlmc'], '设施农用地'],
|
||||
'#fc8323',
|
||||
['==', ['get', 'dlmc'], '水工建筑用地'],
|
||||
'#f76f1a',
|
||||
['==', ['get', 'dlmc'], '水浇地'],
|
||||
'#f15c13',
|
||||
['==', ['get', 'dlmc'], '水库水面'],
|
||||
'#e84b0c',
|
||||
['==', ['get', 'dlmc'], '水田'],
|
||||
'#de3e08',
|
||||
['==', ['get', 'dlmc'], '特殊用地'],
|
||||
'#d23105',
|
||||
['==', ['get', 'dlmc'], '铁路用地'],
|
||||
'#c42503',
|
||||
['==', ['get', 'dlmc'], '物流仓储用地'],
|
||||
'#b31b01',
|
||||
['==', ['get', 'dlmc'], '养殖坑塘'],
|
||||
'#a11201',
|
||||
['==', ['get', 'dlmc'], '竹林地'],
|
||||
'#8d0a01',
|
||||
['==', ['get', 'dlmc'], ''],
|
||||
'#7a0403',
|
||||
'#7a0403',
|
||||
],
|
||||
'fill-outline-color': '#232323',
|
||||
},
|
||||
paint: chooseRow.style ? JSON.parse(chooseRow.style) : defaultPaint,
|
||||
});
|
||||
map.on('click', chooseRow.dataTable, function (e) {
|
||||
// 显示弹窗
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
<div>
|
||||
<BasicTable @register="servicesTable">
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'serverUrl'">
|
||||
<span class="content-full">{{ record.serverUrl }}</span>
|
||||
<template v-if="column.key === 'url'">
|
||||
<span class="content-full">{{ record.url }}</span>
|
||||
</template>
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
// 复制到剪贴板
|
||||
const copyToClipboard = async (record) => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(record.serverUrl);
|
||||
await navigator.clipboard.writeText(record.url);
|
||||
createMessage.success('文本已复制到剪贴板');
|
||||
} catch (err) {
|
||||
createMessage.error('无法复制文本');
|
||||
|
|
@ -71,16 +71,15 @@
|
|||
|
||||
// 设置表格值
|
||||
function setServerUrl(chooseRow) {
|
||||
if (chooseRow.value) {
|
||||
setTableData(chooseRow.value);
|
||||
} else if (chooseRow.serverUrl) {
|
||||
let data: any = [];
|
||||
data.push({ serverUrl: chooseRow.serverUrl });
|
||||
if (chooseRow.serverUrl) {
|
||||
data.push({ url: chooseRow.serverUrl });
|
||||
}
|
||||
if (chooseRow.pbfUrl) {
|
||||
data.push({ url: chooseRow.pbfUrl });
|
||||
}
|
||||
services.value = data;
|
||||
setTableData(services.value);
|
||||
} else {
|
||||
setTableData([]);
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, h } from 'vue';
|
||||
import { ref, reactive, watch } from 'vue';
|
||||
// vben
|
||||
import { PermissionBtn } from '@/components/PermissionBtn/index';
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
|
|
@ -92,10 +92,10 @@
|
|||
import { PlusOutlined, DeleteOutlined } from '@ant-design/icons-vue';
|
||||
import { ShpGeoLayerParseShpInfo } from '@/api/demo/system';
|
||||
import { CheckTableExist } from '@/api/database/index';
|
||||
|
||||
import axios from 'axios';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
|
||||
const { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
|
|
@ -112,6 +112,15 @@
|
|||
'setSldUploadType',
|
||||
]);
|
||||
|
||||
watch(
|
||||
() => props.uploadForm,
|
||||
() => {
|
||||
if (props.isEdit) {
|
||||
uploadFrom.value = props.uploadForm;
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
const uploadFormRules = reactive({
|
||||
serverName: [{ required: true, message: '请输入服务名称', trigger: 'blur' }],
|
||||
spatialRef: [{ required: true, message: '请选择空间参考', trigger: 'blur' }],
|
||||
|
|
@ -251,6 +260,7 @@
|
|||
const tucengCustomRequest = (options) => {
|
||||
if (isSldUpload) {
|
||||
const formData = new FormData();
|
||||
readAndParseSLDFile(options.file);
|
||||
formData.append('files', options.file);
|
||||
// 假设 Token 存储在 localStorage 中
|
||||
const token = localStorage.getItem('X-Token');
|
||||
|
|
@ -258,6 +268,7 @@
|
|||
const headers = {
|
||||
'X-Token': token,
|
||||
};
|
||||
|
||||
axios
|
||||
.post(VITE_GLOB_API_URL + '/api/Files/Upload', formData, { headers })
|
||||
.then((response) => {
|
||||
|
|
@ -270,6 +281,7 @@
|
|||
.catch((error) => {
|
||||
options.onError(error);
|
||||
});
|
||||
console.log(uploadFrom.value);
|
||||
}
|
||||
};
|
||||
// 步骤1-删除图层样式
|
||||
|
|
@ -285,6 +297,140 @@
|
|||
tucengFileName.value = '';
|
||||
};
|
||||
|
||||
// 读取文件内容
|
||||
const readAndParseSLDFile = async (file) => {
|
||||
const reader = new FileReader();
|
||||
reader.onload = (e) => {
|
||||
const sldContent = e.target.result;
|
||||
const styles = parseSLD(sldContent);
|
||||
assemblyPaint(styles);
|
||||
// uploadFrom.value.style = styles;
|
||||
};
|
||||
reader.onerror = (error) => {
|
||||
console.error('Error reading the file:', error);
|
||||
};
|
||||
reader.readAsText(file);
|
||||
};
|
||||
// 解析sld文件
|
||||
const parseSLD = (sldFileContent) => {
|
||||
const parser = new DOMParser();
|
||||
const xmlDoc = parser.parseFromString(sldFileContent, 'application/xml');
|
||||
const namedLayers = xmlDoc.querySelectorAll('NamedLayer');
|
||||
const styles: any = [];
|
||||
|
||||
namedLayers.forEach((namedLayer) => {
|
||||
const userStyles = namedLayer.querySelectorAll('UserStyle');
|
||||
userStyles.forEach((userStyle) => {
|
||||
userStyle.children?.forEach((element) => {
|
||||
if (element && element.nodeName == 'se:FeatureTypeStyle') {
|
||||
element.children.forEach((featureTypeStyle) => {
|
||||
let style: any = {};
|
||||
const rules = featureTypeStyle.children;
|
||||
rules.forEach((rule) => {
|
||||
// se:Name
|
||||
if (rule.nodeName == 'se:Name') {
|
||||
style.ruleName = rule.textContent;
|
||||
}
|
||||
|
||||
// ogc:Filter
|
||||
if (rule.nodeName == 'ogc:Filter') {
|
||||
const ogcFilter = rule.children;
|
||||
if (ogcFilter[0].nodeName == 'ogc:PropertyIsEqualTo') {
|
||||
ogcFilter[0].children.forEach((item) => {
|
||||
if (item.nodeName == 'ogc:PropertyName') {
|
||||
style.ogcPropertyName = item.textContent.toLowerCase();
|
||||
}
|
||||
if (item.nodeName == 'ogc:Literal') {
|
||||
style.ogcLiteral = item.textContent;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// se:PolygonSymbolizer
|
||||
if (rule.nodeName == 'se:PolygonSymbolizer') {
|
||||
const sePolygonSymbolizers = rule.children;
|
||||
const fillParams: any = [];
|
||||
const strokeParams: any = [];
|
||||
sePolygonSymbolizers.forEach((sePolygonSymbolizer) => {
|
||||
if (sePolygonSymbolizer.nodeName == 'se:Fill') {
|
||||
const fills = sePolygonSymbolizer.children;
|
||||
fills.forEach((fill) => {
|
||||
if (fill.nodeName == 'se:SvgParameter') {
|
||||
fillParams[fill.getAttribute('name')] = fill.textContent;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (sePolygonSymbolizer.nodeName == 'se:Stroke') {
|
||||
const fills = sePolygonSymbolizer.children;
|
||||
fills.forEach((fill) => {
|
||||
if (fill.nodeName == 'se:SvgParameter') {
|
||||
strokeParams[fill.getAttribute('name')] = fill.textContent;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
style.seFill = fillParams;
|
||||
style.seStroke = strokeParams;
|
||||
styles.push(style);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
return styles;
|
||||
};
|
||||
// 生成paint
|
||||
const assemblyPaint = (styles) => {
|
||||
let result: any = {};
|
||||
// fill-opacity
|
||||
result['fill-opacity'] = styles[0].seFill['fill-opacity']
|
||||
? parseFloat(styles[0].seFill['fill-opacity'])
|
||||
: 1;
|
||||
|
||||
// fill-color
|
||||
let onlyFillColor: any = [];
|
||||
const fillColor = styles.map((style) => {
|
||||
const { ruleName, ogcPropertyName, ogcLiteral, seFill, seStroke } = style;
|
||||
onlyFillColor.push(seFill['fill']);
|
||||
if (ogcLiteral) {
|
||||
return [['==', ['get', ogcPropertyName], ogcLiteral], seFill['fill']];
|
||||
} else {
|
||||
return seFill['fill'];
|
||||
}
|
||||
});
|
||||
result['fill-color'] = ['case', ...fillColor.flat()];
|
||||
|
||||
onlyFillColor = [...new Set(onlyFillColor)];
|
||||
if (onlyFillColor.length == 1) {
|
||||
result['fill-color'] = onlyFillColor[0];
|
||||
}
|
||||
|
||||
// fill-outline-color
|
||||
let onlyFillOutlineColor: any = [];
|
||||
const fillOutlineColor = styles.map((style) => {
|
||||
const { ruleName, ogcPropertyName, ogcLiteral, seFill, seStroke } = style;
|
||||
onlyFillOutlineColor.push(seStroke['stroke']);
|
||||
if (ogcLiteral) {
|
||||
return [['==', ['get', ogcPropertyName], ogcLiteral], seStroke['stroke']];
|
||||
} else {
|
||||
return seStroke['stroke'];
|
||||
}
|
||||
});
|
||||
result['fill-outline-color'] = ['case', ...fillOutlineColor.flat()];
|
||||
|
||||
onlyFillOutlineColor = [...new Set(onlyFillOutlineColor)];
|
||||
if (onlyFillOutlineColor.length == 1) {
|
||||
result['fill-outline-color'] = onlyFillOutlineColor[0];
|
||||
}
|
||||
|
||||
// style
|
||||
uploadFrom.value.style = JSON.stringify(result);
|
||||
console.log(uploadFrom.value.style);
|
||||
};
|
||||
|
||||
defineExpose({
|
||||
submit1,
|
||||
clearValidation,
|
||||
|
|
|
|||
|
|
@ -97,13 +97,7 @@
|
|||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click="
|
||||
if (jiexi_loading) {
|
||||
createMessage.info('文件解析中,不能回到上一步');
|
||||
} else {
|
||||
current = 0;
|
||||
}
|
||||
"
|
||||
@click="jiexi_loading ? createMessage.info('文件解析中,不能回到上一步') : (current = 0)"
|
||||
v-if="uploadFrom.dataSourceType == 'shp' && current == 1"
|
||||
>
|
||||
上一步
|
||||
|
|
@ -234,7 +228,7 @@
|
|||
st = st.split(' ');
|
||||
let chooseRows: any = [];
|
||||
chooseRows.push(nowChooseRow);
|
||||
mapboxComponentRef.value.GeoserverManagementRaster(chooseRows, [st[0], st[1]], 10, true);
|
||||
mapboxComponentRef.value.GeoserverManagementRaster(chooseRows, [st[0], st[1]], 9, true);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
|
|
@ -283,6 +277,7 @@
|
|||
appendPath: '',
|
||||
// appendFileName: '',
|
||||
headers: [] as any,
|
||||
style: '',
|
||||
};
|
||||
const uploadFrom = ref(uploadFromAdd);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,9 @@
|
|||
<PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
|
||||
<BasicTable class="w-4/4 xl:w-5/5" @register="registerTable">
|
||||
<template #toolbar>
|
||||
<a-button type="primary" @click="downloadTemplate">模板下载</a-button>
|
||||
<a-upload
|
||||
:accept="'.xlsx,.csv,.xls'"
|
||||
:accept="'.xlsx,.csv,.xls,.shp'"
|
||||
:showUploadList="false"
|
||||
:custom-request="customRequest"
|
||||
>
|
||||
|
|
@ -206,6 +207,9 @@ const customRequest = (file) => {
|
|||
// });
|
||||
// })
|
||||
}
|
||||
const downloadTemplate = () => {
|
||||
window.open('http://www.baidu.com')
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</template>
|
||||
</BasicTable>
|
||||
<a-modal width="75%" v-model:open="openModal" title="线索审核" :destroyOnClose="true" :footer="null">
|
||||
<InfoModal :infoData="infoData.info" @handleOk="handleOk" :control="false"/>
|
||||
<InfoModal :infoData="infoData.info" @handleOk="handleOk" @closeModal="closeModal" :control="false"/>
|
||||
</a-modal>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
|
|
@ -75,4 +75,7 @@ function handleAudit(record) {
|
|||
const handleOk = () => {
|
||||
console.log('infoData',infoData.value)
|
||||
}
|
||||
const closeModal = () => {
|
||||
openModal.value = false
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue