Merge commit '1090041fc1035c5781a8c33903f1abc8f8c70e50'

hc_zhufu
Zhufu 2024-05-16 10:08:20 +08:00
commit 0f2c0b7aa6
16 changed files with 1085 additions and 1 deletions

7
src/api/sys/analysis.ts Normal file
View File

@ -0,0 +1,7 @@
import { defHttp, } from '@/utils/http/axios';
enum Api{
uploadShp = '/geoserver/uploadFile',
}
export function uploadShp(params) {
return defHttp.post({ url: Api.uploadShp, data: params, headers: { 'Content-Type': 'multipart/form-data' }});
}

View File

@ -0,0 +1,19 @@
.data-list-component{
.ant-table-thead{
.ant-table-cell{
background-color: #1E5EFF;
color: #fff;
}
}
.ant-table-tbody{
.ant-table-row{
&:nth-child(2n){
background-color: #A4BEFF;
}
&:nth-child(2n+1){
background-color: #D1DEFF;
}
}
}
}

View File

@ -0,0 +1,77 @@
<template>
<div class="data-list-component">
<a-table :columns="columns" :data-source="dataSource" :pagination="false" :bordered="true">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'operation'">
<a-button class="operation-button" shape="round">
操作
</a-button>
</template>
</template>
</a-table>
</div>
</template>
<script setup lang="ts">
import { DeleteOutlined } from '@ant-design/icons-vue'
import { h } from "vue"
import './index.scss'
const columns = [
{
title: '位置',
dataIndex: 'address',
key: 'address',
},
{
title: '是否正常使用',
dataIndex: 'type',
key: 'type',
},
{
title: '所属单位',
dataIndex: 'address',
key: 'address',
},
{
title: 'is_del',
dataIndex: 'is_del',
key: 'is_del',
},
{
title: '操作',
dataIndex: 'operation',
key: 'operation',
},
]
const dataSource = [
{
key: '1',
address: '上海市普陀区金沙江路 1518 弄',
type: '上海市普陀区金沙江路 1517 弄',
is_del: '上海市普陀区金沙江路 1519 弄',
},
{
key: '2',
address: '上海市普陀区金沙江路 1517 弄',
type: '上海市普陀区金沙江路 1519 弄',
is_del: '上海市普陀区金沙江路 1516 弄',
},
]
</script>
<style lang="scss" scoped>
.data-list-component{
position: absolute;
bottom: 20px;
left: 386px;
background-color: #fff;
padding: 13px 13px 8px 13px;
.operation-button{
background-color:#09B66D;
color:#fff;
}
.operation-button:hover,.operation-button:focus{
border-color: #09B66D;
}
}
</style>

View File

@ -0,0 +1,43 @@
.insert-shp-modal{
.ant-tabs-content{
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
.ant-modal-footer{
display: none;
}
.ant-modal-close-x{
font-size: 28px;
}
.select-file-div{
.ant-upload-drag-icon{
margin-top: 20px;
}
.ant-upload-list{
.ant-upload-list-item{
margin-top: 0px;
top: -33px;
margin-left: 7px;
}
}
}
.edit-info-div{
.ant-table-thead{
.ant-table-cell{
background-color: #1E5EFF;
color: #fff;
}
}
.ant-table-tbody{
.ant-table-row{
&:nth-child(2n){
background-color: #A4BEFF;
}
&:nth-child(2n+1){
background-color: #D1DEFF;
}
}
}
}
}

View File

@ -0,0 +1,274 @@
<template>
<a-modal class="insert-shp-modal" width="1290px" :destroyOnClose="true" v-model:open="props.openModal" @cancel="closeModal">
<template #closeIcon>
<CloseCircleOutlined />
</template>
<div class="title">上传shp</div>
<div class="content">
<a-steps
class="steps"
:current="current"
label-placement="vertical"
:items="[
{title: '选择文件',},
{title: '编辑信息',},
{title: '完成',},
]"
></a-steps>
<div class="select-file-div" v-show="current === 0">
<div class="upload-div">
<a-upload-dragger
style="height: 174px; width: 174px;"
class="upload-dragger"
v-model:fileList="fileList"
name="file"
:multiple="false"
:maxCount="1"
:before-upload="beforeUpload"
>
<p class="ant-upload-drag-icon">
<inbox-outlined></inbox-outlined>
</p>
<div style="opacity: 0.7;">
<a-button :icon="h(PlusOutlined)">文件上传</a-button>
</div>
</a-upload-dragger>
</div>
<div class="upload-span">
<div class="upload-span-content">
<div style="opacity: 0.7;">将文件拖拽到这里或点击上传按钮</div>
<div style="color: #1E5EFF;">支持扩展名zip</div>
<div style="opacity: 0.7;">zip中需要包含 .shp .shx .dbf 文件 .shp文件大小小于10MB</div>
</div>
</div>
<div class="upload-form">
<a-form
ref="formRef"
:model="uploadFrom"
:label-col="{ style: { width: '75px' } }"
labelAlign="right"
:rules="uploadFormRules">
<a-form-item label="服务名称" name="serverName">
<a-input v-model:value="uploadFrom.serverName" placeholder="请输入服务名称"/>
</a-form-item>
<a-form-item label="空间参考" name="spaceType">
<!-- <a-input v-model:value="uploadFrom.spaceType" /> -->
<a-select v-model:value="uploadFrom.spaceType" placeholder="请选择空间参考">
<a-select-option value="EPSG:4326">EPSG:4326</a-select-option>
<a-select-option value="EPSG:3857">EPSG:3857</a-select-option>
<a-select-option value="EPSG:900913">EPSG:900913</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="表名" name="tableName">
<a-input v-model:value="uploadFrom.tableName" placeholder="请输入表名"/>
</a-form-item>
</a-form>
<div class="upload-span-button">
<a-button type="primary" :icon="h(PlusOutlined)" @click="submitShp"></a-button>
</div>
</div>
</div>
<div class="edit-info-div" v-show="current === 1">
<a-table :columns="columns" :data-source="dataList" :pagination="false" :bordered="true">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'refName'">
<a-input v-model:value="record.refName" />
</template>
<template v-if="column.key === 'initName'">
<a-input v-model:value="record.initName" />
</template>
<template v-if="column.key === 'operation'">
<a-button shape="round" :icon="h(DeleteOutlined)" @click="deleteListItem(record)">
删除
</a-button>
</template>
</template>
</a-table>
<div class="footer-button">
<a-button @click="current--"></a-button>
<a-button style="margin-left: 25px;" type="primary" @click="current++"></a-button>
</div>
</div>
<div class="submit-success" v-show="current === 2">
<div class="success-content">
<CheckCircleOutlined style="font-size: 100px;color: #1FD286;margin-bottom:30px"/>
<div style="margin-bottom:19px;font-size:26px">导入成功</div>
<div><a-button type="primary">查看数据</a-button></div>
</div>
</div>
</div>
</a-modal>
</template>
<script setup lang="ts">
import { defineEmits, defineProps, ref, h, reactive, onUnmounted, toRaw } from "vue"
import { CloseCircleOutlined, PlusOutlined, DeleteOutlined,CheckCircleOutlined } from "@ant-design/icons-vue"
import './index.scss'
import { InboxOutlined } from '@ant-design/icons-vue';
import { message } from 'ant-design-vue';
import type { UploadChangeParam } from 'ant-design-vue';
import type { UploadProps } from 'ant-design-vue';
// import { uploadShp } from '@/api/sys/analysis.ts'
import axios from 'axios'
const current = ref(0)
const fileList = ref<UploadProps['fileList']>([]);
const props = defineProps(['openModal'])
const emits = defineEmits(['update:openModal'])
const uploadFrom = reactive({
serverName:'',
spaceType:null,
tableName:'',
})
const formRef = ref()
const dataList = ref([])
// todo
const columns = [
{title: 'Shp原始字段',dataIndex: 'name',key: 'name'},
{title: '数据类型',dataIndex: 'type',key: 'type'},
{title: '数据长度',dataIndex: 'length',key: 'length'},
{title: '英文名称',dataIndex: 'refName',key: 'refName'},
{title: '中文名称',dataIndex: 'initName',key: 'initName'},
{title: '操作',dataIndex: 'operation',key: 'operation'},
]
const uploadFormRules = {
serverName: [{ required: true, message: '请输入服务名称', trigger: 'blur' },],
spaceType: [{ required: true, message: '请选择参考系', trigger: 'blur' },],
tableName: [{ required: true, message: '请输入表名', trigger: 'blur' },],
}
const beforeUpload: UploadProps['beforeUpload'] = (file) => {
console.log('beforeUpload',file)
fileList.value = [file];
return false;
};
const submitShp = () => {
formRef.value.validate().then(() => {
if(fileList.value?.length < 1){
message.warning('请选择shp文件')
return
}
let formData = new FormData();
const [proxyFile] = fileList.value
let file = proxyFile.originFileObj
formData.append('file', file)
formData.append('serverName',uploadFrom.serverName)
formData.append('spaceType',uploadFrom.spaceType)
formData.append('tableName',uploadFrom.tableName)
axios.post('http://221.2.83.254:9006/geoserver/uploadFile',formData,{headers: {'Content-Type': 'multipart/form-data'}}).then(res => {
console.log(res)
let data = {
"dataType": "线",
"heads": [
{
"name": "geom",
"length": "",
"type": "geometry"
},
{
"name": "MINGCHENG",
"length": 319,
"type": "varchar"
},
{
"name": "CHANGDU",
"length": 319,
"type": "varchar"
}
],
"styleName": null,
"tableName": "aa"
}
let showData = data.heads.map(item => {
return {...item,refName:item.name.toLowerCase(),initName:item.name}
})
dataList.value = showData
current.value++
}).catch(err => {
console.log(err)
})
}).catch(err => {
console.log(err)
})
}
const closeModal = () => {
emits('update:openModal', false)
formRef.value.resetFields()
fileList.value = []
}
const deleteListItem = (record) => {
dataList.value = dataList.value.filter(item => item.name !== record.name)
}
</script>
<style lang="scss" scoped>
.insert-shp-modal{
.title{
height: 77px;
border-bottom: 1px solid #D7DBEC;
display: flex;
align-items: center;
padding-left: 63px;
font-size: 28px;
}
.content{
padding: 106px;
}
.steps{
// margin-bottom: 80px;
}
.select-file-div{
padding-left: 52px;
padding-top: 80px;
display: flex;
.upload-div{
width:200px;
height:200px;
background: #FFFFFF;
box-shadow: 0px 52px 103px 0px rgba(192,199,218,0.35);
border-radius: 4px;
display: flex;
justify-content: center;
align-items: center;
.upload-dragger{
height: 174px;
}
}
.upload-span{
margin-left: 40px;
display: flex;
flex-direction: column;
justify-content: space-between;
.upload-span-content{
font-size:16px;
margin-top: 8px;
}
}
.upload-form{
flex: 1;
margin-left:40px;
.upload-span-button{
display: flex;
justify-content: flex-end;
}
}
}
.edit-info-div{
padding-top:26px;
.footer-button{
margin-top: 20px;
display: flex;
justify-content: flex-end;
}
}
.submit-success{
.success-content{
width: 200px;
align-items: center;
margin: auto;
display: flex;
flex-direction: column;
}
}
}
</style>

View File

@ -0,0 +1,143 @@
<template>
<div class="LayerComponent">
<div class="title">图层</div>
<div class="insert-layer">
<a-button class="add-layer-button" type="primary" :icon="h(PlusOutlined)" @click="openInsertShpModal"></a-button>
<span class="clear-layer-button">清空</span>
</div>
<div class="show-current-layer">
<div class="current-layer-div">
<div class="current-layer-title">当前图层</div>
<div class="create-new-layer-button" @click="changeClick"></div>
</div>
</div>
<div class="show-layers">
<div class="show-layer-item" v-for="item in 10" :key='item'>
<a-checkbox/>
<a-image
:width="119"
:height="87"
style="margin-left: 10px;border-radius: 5px;"
src="https://gw.alipayobjects.com/zos/antfincdn/cV16ZqzMjW/photo-1473091540282-9b846e7965e3.webp"
:preview="false"
:fallback="errorImage"/>
<div class="layer-item-text">
<div class="item-title">名称 {{ 111 }}</div>
<div class="item-control">
<a-button type="primary" size="small" style="background-color:#09B66D;margin-right: 7px;">查看数据</a-button>
<a-button type="primary" size="small" style="background-color: #0081FF;">操作</a-button>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { PlusOutlined } from '@ant-design/icons-vue'
import { h, defineEmits } from "vue"
import { errorImage } from "../util.ts"
const emits = defineEmits(["changeOpenModal","changeOpenInsertShpModal"])
const changeClick = () => {
emits("changeOpenModal",true)
}
const openInsertShpModal = () => {
console.log(111)
emits("changeOpenInsertShpModal",true)
}
</script>
<style lang="scss" scoped>
.LayerComponent{
position: absolute;
top: 0;
left: 0;
width: 356px;
height: 100%;
background-color: #E0E5ED;
.title{
height:61px;
font-size: 26px;
display: flex;
justify-content: center;
align-items: center;
}
.insert-layer{
height:61px;
background-color: #fff;
padding-left: 16px;
padding-right: 14px;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
.add-layer-button{
background-color: #0081FF;
}
.clear-layer-button{
user-select: none;
cursor: pointer;
}
}
.show-current-layer{
padding-left: 15px;
padding-right: 15px;
.current-layer-div{
height: 37px;
display: flex;
user-select: none;;
.current-layer-title{
background-color: #fff;
flex: 1;
display: flex;
align-items: center;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
.current-layer-title::before{
content: "";
display: block;
width: 7px;
height: 7px;
background-color: #09B66D;
border-radius: 50%;
margin: 6px;
}
.create-new-layer-button{
width: 106px;
background-color: #0081FF;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
cursor: pointer;
}
}
}
.show-layers{
height: calc(100% - 179px);
padding-top: 14px;
padding-left: 15px;
padding-right: 15px;
overflow: auto;
.show-layer-item{
background-color: #fff;
height: 133px;
border-radius: 5px;
padding: 23px 10px;
display: flex;
margin-bottom: 14px;
.layer-item-text{
margin-left: 20px;
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}
}
}
}
</style>

View File

@ -0,0 +1,46 @@
<template>
<div class="LayerControl">
<a-button type="primary" class="blue line-up" :icon="h(EditOutlined)">绘制</a-button>
<a-button type="primary" class="blue line-up" :icon="h(FormOutlined)">编辑</a-button>
<a-button type="primary" class="blue last-line-up" :icon="h(BlockOutlined)">合并</a-button>
<a-button type="primary" class="orange line-up" :icon="h(SplitCellsOutlined)">分割</a-button>
<a-button type="primary" class="orange last-line-up" :icon="h(DeleteOutlined)">删除</a-button>
<a-button type="primary" class="green line-up" :icon="h(DragOutlined)">移动</a-button>
<a-button type="primary" class="green line-up" :icon="h(RollbackOutlined)">撤回</a-button>
<a-button type="primary" class="green" :icon="h(CloseCircleOutlined)">取消</a-button>
</div>
</template>
<script setup lang="ts">
import { EditOutlined, FormOutlined, BlockOutlined,
SplitCellsOutlined, DragOutlined, DeleteOutlined, RollbackOutlined, CloseCircleOutlined, } from "@ant-design/icons-vue"
import { h } from "vue"
</script>
<style lang="scss" scoped>
.LayerControl{
position: absolute;
top: 20px;
left: 386px;
background-color: #fff;
padding: 13px 13px 8px 13px;
button{
margin-bottom: 5px;
}
}
.blue{
background-color: #0081FF;
}
.orange{
background-color: #FF8A48;
}
.green{
background-color: #09B66D;
}
.line-up{
margin-right: 10px;
}
.last-line-up{
margin-right: 15px
}
</style>

View File

@ -0,0 +1,69 @@
<template>
<div class="OfflineFile">
<a-upload-dragger
style="margin-bottom: 45px"
v-model:fileList="fileList"
name="file"
:multiple="true"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
@change="handleChange"
@drop="handleDrop"
>
<p class="ant-upload-drag-icon">
<inbox-outlined></inbox-outlined>
</p>
<p class="ant-upload-text">点击或拖拽文件到此处</p>
</a-upload-dragger>
<div class="upload-button">
<div class="upload-button-title">上传文件</div>
<div class="upload-button-subtitle">点击或拖拽文件到此处</div>
<div><a-button type="primary" :icon="h(UploadOutlined)" size="large">上传数据</a-button></div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, h, } from 'vue';
import { InboxOutlined, UploadOutlined } from '@ant-design/icons-vue';
import { message } from 'ant-design-vue';
import type { UploadChangeParam } from 'ant-design-vue';
const fileList = ref([]);
const handleChange = (info: UploadChangeParam) => {
const status = info.file.status;
if (status !== 'uploading') {
console.log(info.file, info.fileList);
}
if (status === 'done') {
message.success(`${info.file.name} file uploaded successfully.`);
} else if (status === 'error') {
message.error(`${info.file.name} file upload failed.`);
}
};
function handleDrop(e: DragEvent) {
console.log(e);
}
</script>
<style lang="scss" scoped>
.OfflineFile{
padding: 87px 378px;
.upload-button{
display: flex;
flex-direction: column;
align-items: center;
user-select: none;
.upload-button-title{
font-size: 26px;
color: #000;
margin-bottom: 8px;
}
.upload-button-subtitle{
font-size: 18px;
color: #000;
margin-bottom: 8px;
opacity: 0.5;
margin-bottom: 26px;
}
}
}
</style>

View File

@ -0,0 +1,219 @@
<template>
<div class="serve-resource">
<div class="list">
<div class="header">
<a-select
v-model:value="data"
style="width: 142px;margin-right: 20px">
<a-select-option value="vector-data">矢量数据</a-select-option>
</a-select>
<a-input-search
style="width: 362px;margin-right: 20px"
v-model:value="key"
placeholder="请输入服务关键词"
enter-button
/>
<a-select
v-model:value="sort"
style="width: 142px">
<a-select-option value="default">默认排序</a-select-option>
</a-select>
</div>
<div class="content">
<div class="show-item" v-for="item in 10" :key="item">
<div class="info">
<a-image
:width="119"
:height="87"
style="border-radius:4px"
src="https://gw.alipayobjects.com/zos/antfincdn/cV16ZqzMjW/photo-1473091540282-9b846e7965e3.webp"
:preview="false"
:fallback="errorImage"
/>
<div class="show-text">
<div class="title">名称 {{ "费县行政边界" }}</div>
<div class="sub-title">描述 {{ "山东省临沂市费县行政边界" }}</div>
</div>
</div>
<div class="button">
<a-button type="primary">
<template #icon>
<PlusOutlined />
</template>
</a-button>
</div>
</div>
</div>
<div class="footer">
<a-pagination
v-model:current="current"
v-model:page-size="pageSize"
:total="85"
:show-total="total => `共 ${total} 条`"/>
</div>
</div>
<div class="information">
<div style="margin-bottom: 16px">
<a-image
style="border-radius:4px"
:width="'100%'"
:height="266"
src="https://www.antdv.com/#error"
:fallback="errorImage"
/>
</div>
<div class="show-info">
<div class="title">
<div class="first"></div>
<div class="last"></div>
</div>
<div style="position:absolute;height:32px;top:24px;display:flex;align-items:center;margin-left:14px">服务基本信息</div>
<div class="serve-text">
<div class="serve-info">
<div><span class="info-title">服务URL:</span><span class="info-content">{{ "http://t0.tianuditu.gov.cn/shuishen_w/wmts" }}</span></div>
<div><span class="info-title">服务名称:</span><span class="info-content">{{ "http://t0.tianuditu.gov.cn/shuishen_w/wmts" }}</span></div>
<div><span class="info-title">服务简介:</span><span class="info-content">{{ "http://t0.tianuditu.gov.cn/shuishen_w/wmts" }}</span></div>
<div><span class="info-title">关键字:</span><span class="info-content">{{ "http://t0.tianuditu.gov.cn/shuishen_w/wmts" }}</span></div>
<div><span class="info-title">服务类型:</span><span class="info-content">{{ "http://t0.tianuditu.gov.cn/shuishen_w/wmts" }}</span></div>
<div><span class="info-title">覆盖范围:</span><span class="info-content">{{ "http://t0.tianuditu.gov.cn/shuishen_w/wmts" }}</span></div>
<div><span class="info-title">坐标系:</span><span class="info-content">{{ "http://t0.tianuditu.gov.cn/shuishen_w/wmts" }}</span></div>
<div><span class="info-title">投影类型:</span><span class="info-content">{{ "http://t0.tianuditu.gov.cn/shuishen_w/wmts" }}</span></div>
<div><span class="info-title">使用权限:</span><span class="info-content">{{ "http://t0.tianuditu.gov.cn/shuishen_w/wmts" }}</span></div>
<div><span class="info-title">发布时间:</span><span class="info-content">{{ "http://t0.tianuditu.gov.cn/shuishen_w/wmts" }}</span></div>
<div><span class="info-title">服务预览:</span><span class="info-content">{{ "http://t0.tianuditu.gov.cn/shuishen_w/wmts" }}</span></div>
</div>
<div class="serve-image">
<div style="margin-bottom: 11px;"><span style="opacity: 0.41;">预览图:</span></div>
<a-image
style="border-radius:4px"
:width="'100%'"
:height="227"
src="https://www.antdv.com/#error"
:fallback="errorImage"/>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { PlusOutlined } from '@ant-design/icons-vue'
import { errorImage } from '../../util.js'
import { ref } from "vue"
const data = ref('vector-data')
const sort = ref('default')
const key = ref('')
const current = ref()
const pageSize = ref()
</script>
<style lang="scss" scoped>
.serve-resource{
display: flex;
justify-content: space-between;
padding: 28px 46px;
background-color: #E0E5ED;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
.list{
width: calc(50% - 19px)
}
.header{
display: flex;
margin-bottom: 14px;
}
.content{
max-height: 565px;
overflow: auto;
margin-bottom: 8px;
.show-item{
background-color: #fff;
height: 119px;
border-radius: 4px;
padding: 16px 30px 16px 16px;
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 3px;
.info{
display: flex;
.show-text{
margin-left: 15px;
display: flex;
flex-direction: column;
justify-content: center;
.title{
color: #191919;
font-size: 14px;
font-weight: 600;
margin-bottom: 3px;
}
.sub-title{
color: #191919;
font-size: 12px;
}
}
}
}
}
.footer{
display: flex;
justify-content: flex-end;
}
.information{
width: calc(50% - 19px);
.show-info{
background-color:#fff;
height: 369px;
border-radius: 10px;
padding: 24px 29px;
position:relative;
.title{
display: flex;
height:32px;
margin-bottom: 16px;
.first{
width: 3px;
height: 100%;
background-color: #0081FF;
}
.last{
background: linear-gradient(270deg, rgba(0, 183, 255, 0) 0%, #0081FF 100%);
opacity: 0.14;
flex: 1;
}
}
.serve-text{
display: flex;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 12px;
color: #303030;
.serve-info{
width: 60%;
padding-left: 12px;
.info-title{
display: inline-block;
opacity: 0.41;
width: 60px;
min-width: 60px;
}
.info-content{
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
& > div{
margin-bottom: 7px;
display: flex;
}
}
.serve-image{
width: 40%;
}
}
}
}
}
</style>

View File

@ -0,0 +1,56 @@
<template>
<div class="ThirdPartyServe">
<div class="title-style">服务名称</div>
<a-input style="margin-bottom: 20px;" class="input-style" v-model:value="name" placeholder="请输入服务名称" size="large"/>
<div class="title-style">服务类型</div>
<a-select
class="input-style"
style="margin-bottom: 20px;"
v-model:value="type"
placeholder="请选择服务类型"
size="large"
>
<a-select-option value="aa">WMTS OGC Web服务</a-select-option>
<a-select-option value="bb">WMS OGC Web服务</a-select-option>
<a-select-option value="cc">ArcGIS REST服务</a-select-option>
<a-select-option value="dd">矢量瓦片服务服务(Mapbox)</a-select-option>
<a-select-option value="ee">X,Y,Z瓦片服务</a-select-option>
</a-select>
<div class="title-style">服务地址</div>
<a-textarea style="margin-bottom: 20px;" v-model:value="address" placeholder="请输入服务地址" :rows="3" size="large"/>
<div class="title-style">要素类型</div>
<a-input style="margin-bottom: 68px" class="input-style" v-model:value="elementType" placeholder="请输入要素类型" size="large"/>
<div class="footer">
<div class="footer-button">
<a-button style="width: 147px;margin-right: 25px" size="large">取消</a-button>
<a-button style="width: 147px;" type="primary" size="large">确定</a-button>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { ref } from "vue"
const name = ref("")
const type = ref("aa")
const address = ref("")
const elementType = ref("")
</script>
<style lang="scss" scoped>
.ThirdPartyServe{
padding: 60px 256px;
.title-style{
font-size: 20px;
color: #000000;
margin-bottom: 9px;
}
.input-style{
width: 663px;
}
.footer{
display: flex;
justify-content: flex-end;
}
}
</style>

View File

@ -0,0 +1,18 @@
.map-resource-modal{
.ant-tabs-nav-wrap{
margin-left: 46px;
}
.ant-tabs-nav{
margin-bottom: 0px;
}
.ant-tabs-content{
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
.ant-modal-footer{
display: none;
}
.ant-modal-close-x{
font-size: 28px;
}
}

View File

@ -0,0 +1,27 @@
<template>
<a-modal class="map-resource-modal" width="1446px" v-model:open="props.openModal" @cancel="emits('update:openModal', false)">
<template #closeIcon>
<CloseCircleOutlined />
</template>
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="服务资源" ><ServeResource /></a-tab-pane>
<!-- <a-tab-pane key="2" tab="第三方服务"><ThirdPartyServe /></a-tab-pane>
<a-tab-pane key="3" tab="离线文件"><OfflineFile /></a-tab-pane> -->
</a-tabs>
</a-modal>
</template>
<script setup lang="ts">
import {CloseCircleOutlined } from '@ant-design/icons-vue'
import { defineProps, defineEmits, ref} from "vue"
import ServeResource from './ServeResource/index.vue'
import ThirdPartyServe from './ThirdPartyServe/index.vue'
import OfflineFile from './OfflineFile/index.vue'
import './index.scss'
const props = defineProps(['openModal'])
const emits = defineEmits(['changeOpenModal','update:openModal'])
const activeKey = ref('1')
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,8 @@
.right-show-info{
.ant-drawer-header{
display: none;;
}
.ant-drawer-body{
padding: 0;
}
}

View File

@ -0,0 +1,54 @@
<template>
<a-drawer class="right-show-info" placement="right" :open="open" @close="()=>open=false">
<div class="title">
<div class="tag"></div>
<div class="title-text">操作</div>
</div>
<div class="content">
<a-descriptions bordered :column="1">
<a-descriptions-item label="位置">Cloud Database</a-descriptions-item>
<a-descriptions-item label="是否正常使用">Prepaid</a-descriptions-item>
<a-descriptions-item label="所属单位">Prepaid</a-descriptions-item>
<a-descriptions-item label="序号">Prepaid</a-descriptions-item>
</a-descriptions>
</div>
</a-drawer>
</template>
<script setup lang="ts">
import { ref } from "vue"
import './index.scss'
const open = ref(true)
</script>
<style lang="scss" scoped>
.right-show-info {
position: absolute;
top: 0;
right: 0;
width: 356px;
height: 100%;
background-color: #FFF;
.title{
height: 61px;
padding-left: 26px;
display:flex;
align-items: center;
border-bottom: 1px solid #D9E2F2;
.tag{
width: 3px;
height: 23px;
background-color:#0081FF;
margin-right: 19px;
}
.title-text{
color: #141D27 ;
font-size: 24px;
}
}
.content{
height: calc(100% - 61px);
padding: 25px;
}
}
</style>

View File

@ -11,11 +11,17 @@
/>
<img v-show="nextMapControl.length > 0" @click="handlerUnDraw" src="/del.png" title="清除" />
</div>
<LayerComponent @changeOpenModal="changeOpenModal" @changeOpenInsertShpModal="changeOpenInsertShpModal"/>
<LayerControl />
<UseModal v-model:openModal="openModal" @changeOpenModal="changeOpenModal"/>
<InsertShp v-model:openModal="insertShpModal" />
<DataListComponent />
<RightShowInfo />
</div>
</template>
<script lang="ts" setup>
import { onMounted, onUnmounted, defineProps, reactive } from 'vue';
import { onMounted, onUnmounted, defineProps, reactive, ref, h } from 'vue';
import mapboxgl, { Map } from 'mapbox-gl';
import U from 'mapbox-gl-utils';
import 'mapbox-gl/dist/mapbox-gl.css';
@ -23,6 +29,23 @@
import { MapboxConfig, MapboxDefaultStyle, MapControlConfig } from './src/config';
import { MP } from './src/MP';
import { DrawingType } from '@/enums/mapEnum';
import LayerComponent from './LayerComponent/index.vue'
import LayerControl from './LayerControl/index.vue'
import UseModal from './Modal/index.vue'
import InsertShp from './InsertShp/index.vue'
import DataListComponent from './DataListComponent/index.vue'
import RightShowInfo from './RightShowInfo/index.vue'
const openModal = ref(false);
const insertShpModal = ref(false)
const changeOpenModal = (value) => {
openModal.value = value
}
const changeOpenInsertShpModal = (value) => {
console.log(2222222)
insertShpModal.value = value
console.log(insertShpModal.value)
}
// map
interface MapboxOptionsInterface {

View File

@ -0,0 +1 @@
export const errorImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpA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