Commit 1f638826 by liujiani

202108311835

parent a3b72007
......@@ -6998,6 +6998,11 @@
"integrity": "sha1-J8dlOb4U2L0Sghmi1zGwkzeQTnk=",
"dev": true
},
"js-cookie": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.0.tgz",
"integrity": "sha512-oUbbplKuH07/XX2YD2+Q+GMiPpnVXaRz8npE7suhBH9QEkJe2W7mQ6rwuMXHue3fpfcftQwzgyvGzIHyfCSngQ=="
},
"js-message": {
"version": "1.0.7",
"resolved": "https://registry.npm.taobao.org/js-message/download/js-message-1.0.7.tgz",
......
......@@ -11,6 +11,7 @@
"ant-design-vue": "^1.7.6",
"axios": "^0.21.1",
"core-js": "^3.6.5",
"js-cookie": "^3.0.0",
"sortablejs": "^1.14.0",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
......
import { getRequest } from "@/utils/request-gateway";
import {getRequest, postJsonRequest} from "@/utils/request-gateway";
const userApi = {
getOrgList: "/pgislwcenter/mapservice/org/get", // 获取组织机构列表接口
getOrgServeList: "/pgislwcenter/mapservice/ministry/page/get", // 查询地图服务接口_部
getOrgServeList: "/pgislwcenter/mapservice/ministry/maptype/get", // 查询地图服务接口_部
getServeStatus: "/pgislwcenter/mapservice/status/sum/get", // 获取地图服务状态总数接口
getProStatus: "/pgislwcenter/mapservice/province/status/sum/get", // 获取省厅服务状态统计接口
syncServe: "/pgislwcenter/mapservice/syn/lw", // 同步更新联网服务配置接口
updateSyncServe: "/pgislwcenter/mapservice/syn/update", // 根据ID更新地图同步状态接口
updateSort: "/pgislwcenter/mapservice/sort/update", // 更新排序接口
updateAudit: "/pgislwcenter/mapservice/audit/update", // 更新审核状态接口
getUrl: "/pgislwcenter/mapservice/lwurl/get", // 获取全国联网发布地址接口
getTypeSum: "/pgislwcenter/mapservice/province/status/type/sum/get", // 获取省厅服务状态分类统计接口
getStatus: "/pgislwcenter/mapservice/status/type/sum/get", // 获取服务状态分类统计接口
updateSort1: '/pgislwcenter/mapservice/weight/update', // 更新权重值接口
};
// 查询地图服务接口_省
......@@ -45,3 +49,27 @@ export function updateSyncServe(parameter) {
export function updateSort(parameter) {
return getRequest(userApi.updateSort, parameter);
}
// 更新审核状态接口
export function updateAudit(parameter) {
return postJsonRequest(userApi.updateAudit, parameter);
}
// 获取全国联网发布地址接口
export function getUrl(parameter) {
return getRequest(userApi.getUrl, parameter);
}
// 获取全国联网发布地址接口
export function getTypeSum(parameter) {
return getRequest(userApi.getTypeSum, parameter);
}
// 获取全国联网发布地址接口
export function getStatus(parameter) {
return getRequest(userApi.getStatus, parameter);
}
// 更新权重值接口
export function updateSort1(parameter) {
return getRequest(userApi.updateSort1, parameter);
}
......@@ -19,11 +19,14 @@
.ant-modal-title{
font-size: 14px;
color: #F6F6F7;
border-bottom: 1px dashed #3995B9;
border-bottom: 1px solid #004B6C;
padding-bottom: 7px;
}
.ant-form-item{
margin-bottom: 15px;
margin-bottom: 10px;
}
.levelBox{
margin-bottom: 0;
}
.ant-form-item-with-help{
margin-bottom: 0;
......@@ -40,6 +43,20 @@
background: transparent;
color: #D1F0F8;
}
.ant-input-number{
border-color: #015480;
box-shadow: 0px 0px 5px #015480 inset;
background: transparent;
color: #D1F0F8;
width: 100%;
text-align: center;
}
.ant-input-number-input{
text-align: center;
}
.ant-input-number-handler-wrap{
display: none;
}
.ant-input:hover, .ant-input:focus{
border-color: #71FFFD;
background-color: transparent;
......@@ -210,6 +227,13 @@
padding-bottom: 7px;
margin-bottom: 10px;
}
.serveFormItemTitle{
font-size: 14px;
color: #F6F6F7;
padding-bottom: 7px;
margin-bottom: 10px;
margin-left: -24px;
}
.ant-modal-content .ant-table-content .ant-table-body::-webkit-scrollbar {
width: 6px; /*高宽分别对应横竖滚动条的尺寸*/
height: 6px;
......@@ -328,3 +352,22 @@
.ant-table-fixed-right, .ant-table-fixed-right table{
border-radius: 0;
}
.levelBox .ant-form-item-children{
display: flex;
justify-content: space-between;
/*align-items: center;*/
color: #fff;
}
.levelBox .ant-form-item-children .ant-form-item{
display: inline-block;
margin-bottom: 0;
}
form .ant-select.levelBoxItem{
width: 46%;
}
.ant-select-disabled .ant-select-selection {
background: #3b3b3b;
}
.ant-btn{
margin-right: 10px;
}
......@@ -58,7 +58,7 @@ export default {
serveList: [
{
title: '共计服务',
num: '',
num: 0,
bg: require('@/assets/images/gjfwbg.png'),
fontColor: '#B5ECFF',
bgColor: 'rgba(36, 185, 255, .2)',
......@@ -66,7 +66,7 @@ export default {
},
{
title: '正常服务',
num: '',
num: 0,
bg: require('@/assets/images/zcfwbg.png'),
fontColor: '#3CBDC2',
bgColor: 'rgba(82, 255, 255, .2)',
......@@ -74,7 +74,7 @@ export default {
},
{
title: '异常服务',
num: '',
num: 0,
bg: require('@/assets/images/ycfwbg.png'),
fontColor: '#f80d04',
bgColor: 'rgba(240, 80, 74, .2)',
......@@ -89,20 +89,15 @@ export default {
getServeStatus().then(res => {
if (res.result === 'SUCCESS') {
if(res.data.length > 0) {
that.serveList[0].num = res.data[0].total + res.data[1].total
that.serveList[1].num = res.data[1].total
that.serveList[2].num = res.data[0].total
// that.serveList[0].num = that.formatStr((res.data[0].total + res.data[1].total).toString(),4)
// res.data.forEach(item => {
// if(item.status == 0) {
// that.serveList[2].num = that.formatStr((item.total).toString(),4)
// }
// if(item.status == 1) {
// that.serveList[1].num = that.formatStr((item.total).toString(),4)
// }
// })
res.data.forEach(item => {
if(item.status == 0){
that.serveList[2].num = item.total
}
if(item.status == 1){
that.serveList[1].num = item.total
}
})
that.serveList[0].num = that.serveList[1].num + that.serveList[2].num
}
} else {
that.$message.info(res.msg)
......
......@@ -28,6 +28,11 @@
<span style="color: red" v-if="record.status == 0">异常</span>
<span style="color: #10d010" v-else>正常</span>
</span>
<span slot="auditStatus" slot-scope="text, record">
<span style="color: red" v-if="record.auditStatus == 0">未通过</span>
<span style="color: #10d010" v-else-if="record.auditStatus ==1">已通过</span>
<span style="color: #52FFFF" v-else>未审核</span>
</span>
<span slot="action" slot-scope="text, record">
<span class="edit" @click="editServeFunc(record)">编辑</span>
<a-divider type="vertical" />
......@@ -41,6 +46,8 @@
>
<span class="del">删除</span>
</a-popconfirm>
<a-divider type="vertical" />
<span class="test" @click="testServeFunc(record)">测试</span>
</span>
</a-table>
<a-modal
......@@ -61,6 +68,7 @@
:label-col="labelCol"
:wrapper-col="wrapperCol"
>
<div class="serveFormItemTitle">人员信息</div>
<a-form-model-item
label="联系人"
prop="contacts"
......@@ -84,7 +92,8 @@
v-model="serveForm.phone"
/>
</a-form-model-item>
<a-form-model-item
<div class="serveFormItemTitle">注册信息</div>
<!--<a-form-model-item
label="服务名称"
prop="serviceName"
>
......@@ -94,22 +103,13 @@
allowClear
v-model="serveForm.serviceName"
/>
</a-form-model-item>
<a-form-model-item
label="服务地址"
prop="serviceUrl"
>
<a-input class="input"
placeholder="请输入服务地址"
allowClear
v-model="serveForm.serviceUrl"
/>
</a-form-model-item>
</a-form-model-item>-->
<a-form-model-item
label="地图类型"
prop="mapType"
>
<a-select
:disabled="!addFlag"
v-model="serveForm.mapType"
placeholder="请地图类型"
optionFilterProp="label"
......@@ -120,6 +120,16 @@
</a-select>
</a-form-model-item>
<a-form-model-item
label="服务地址"
prop="serviceUrl"
>
<a-input class="input"
placeholder="请输入服务地址"
allowClear
v-model="serveForm.serviceUrl"
/>
</a-form-model-item>
<!--<a-form-model-item
label="边界值"
prop="borderRange"
>
......@@ -128,10 +138,11 @@
allowClear
v-model="serveForm.borderRange"
/>
</a-form-model-item>
</a-form-model-item>-->
<a-form-model-item label="级别" class="levelBox">
<a-form-model-item
label="最小级别"
prop="minValue"
:style="{display: 'inline-block',width:'46%'}"
>
<a-select
v-model="serveForm.minValue"
......@@ -142,9 +153,10 @@
</a-select-option>
</a-select>
</a-form-model-item>
<div style="display: inline-block;line-height: 30px;">-</div>
<a-form-model-item
label="最大级别"
prop="minValue"
prop="maxValue"
:style="{display: 'inline-block',width:'46%'}"
>
<a-select
v-model="serveForm.maxValue"
......@@ -155,6 +167,13 @@
</a-select-option>
</a-select>
</a-form-model-item>
</a-form-model-item>
<div style="color: #ccc;margin-left: -24px;margin-top: 30px">
<div>注意事项:</div>
<div style="text-indent: 0">1、服务地址:</div>
<div style="text-indent: 15px">WMTS类型格式:http://ip:port/项目名称/wmts?layer={地图名称}</div>
<div style="text-indent: 15px">EzMap类型格式:http://ip:port/项目名称/Maps/{地图名称}/EzMap</div>
</div>
</a-form-model>
</a-modal>
<a-modal
......@@ -205,8 +224,13 @@
</div>
</div>
<div class="infoItem" v-if="curServeInfo">
<div class="infoItemTitle">历史信息</div>
<div class="infoItemTitle">服务信息</div>
<div class="infoItemCon">
<div class="titleTab">
<div class="titleTabItem" v-for="(item,index) in tabList" :key="index" @click="tabCur==0?tabCur=1:tabCur=0" :class="index=== tabCur? 'titleTabItemAct': ''">{{item}}</div>
</div>
<div class="conTab">
<div class="conTabItem" v-if="tabCur==0">
<a-table
class="tableClass"
bordered
......@@ -228,18 +252,13 @@
<span v-else-if="record.mapType == 2">影像栅格</span>
<span v-else>矢影叠加</span>
</span>
<span slot="action" slot-scope="text, record">
<a-popconfirm
title="确定删除?"
ok-text="是"
cancel-text="否"
@confirm="delHisFunc(record)"
>
<span class="delHis">删除</span>
</a-popconfirm>
</span>
</a-table>
</div>
<div class="conTabItem" v-if="tabCur==1" style="height: 140px;background: rgba(2, 8, 15, 0.3);padding:5px;color: #fff;overflow: auto;">
{{curServeInfo.cause}}
</div>
</div>
</div>
</div>
</div>
</a-modal>
......@@ -253,6 +272,8 @@ export default {
name: 'proManage',
data() {
return {
tabList: ['历史信息','驳回信息'],
tabCur: 0,
tableLoading: false, // table加载
locale: {
emptyText: '暂无数据'
......@@ -323,11 +344,20 @@ export default {
align: 'center'
},
{
title: '状态',
title: '运行状态',
dataIndex: 'status',
scopedSlots: { customRender: 'status' },
ellipsis: true,
width: 60,
width: 80,
align: 'center',
fixed: 'right'
},
{
title: '审核状态',
dataIndex: 'auditStatus',
scopedSlots: { customRender: 'auditStatus' },
ellipsis: true,
width: 80,
align: 'center',
fixed: 'right'
},
......@@ -335,7 +365,7 @@ export default {
title: '操作',
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
width: 180,
width: 200,
align: 'center',
fixed: 'right'
}
......@@ -433,7 +463,7 @@ export default {
type: '矢影叠加',
}
],
levelList: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20'],
levelList: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20'],
infoVisible: false,
curServeInfo: null,
hisTableLoading: false,
......@@ -457,13 +487,6 @@ export default {
align: 'center'
},
{
title: '地图类型',
dataIndex: 'mapType',
scopedSlots: { customRender: 'mapType' },
ellipsis: true,
align: 'center'
},
{
title: '最小级别',
dataIndex: 'minValue',
ellipsis: true,
......@@ -476,6 +499,13 @@ export default {
align: 'center'
},
{
title: '日期',
dataIndex: 'createTime',
ellipsis: true,
width: 150,
align: 'center'
},
{
title: '操作',
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
......@@ -507,6 +537,13 @@ export default {
this.curServeInfo = record
this.getHisList(record.id)
},
testServeFunc(record){
localStorage.setItem('LW_MAP_INFO',JSON.stringify(record))
let url = this.$router.resolve({
path: "/map"
})
window.open(url.href, '_blank')
},
delServe(record){
const that = this
let params = {
......@@ -595,6 +632,7 @@ export default {
})
},
infoCancle(){
this.tabCur = 0
this.infoVisible = false
this.curServeInfo = null
},
......@@ -657,7 +695,7 @@ export default {
background-color: #346FB7;
}
}
.edit, .info, .del{
.edit, .info, .del, .test{
color: #52FFFF;
cursor: pointer;
}
......@@ -691,4 +729,18 @@ export default {
color: #fff;
}
}
.infoConList{
.titleTab{
display: flex;
.titleTabItem{
padding: 5px 10px;
color: #fff;
background: #968f8f;
cursor: pointer;
}
.titleTabItemAct{
background: #266dca;
}
}
}
</style>
import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from "../views/login";
import NoPermission from "../views/403";
import Home from '../views/home'
import Index from '../views/index'
import Map from '../views/map'
Vue.use(VueRouter)
......@@ -12,32 +7,37 @@ const routes = [
{
path: "/",
name: "Login",
component: Login
component: () => import('@/views/login')
},
{
path: "/403",
name: "NoPermission",
component: NoPermission
component: () => import('@/views/403')
},
{
path: "/login",
name: "Login",
component: Login
component: () => import('@/views/login')
},
{
path: "/home",
name: "home",
component: Home,
component: () => import('@/views/home'),
},
{
path: "/index",
name: "index",
component: Index,
component: () => import('@/views/index')
},
{
path: "/audit",
name: "audit",
component: () => import('@/views/map'),
},
{
path: "/map",
name: "map",
component: Map,
component: () => import('@/views/proMap')
}
]
......
......@@ -194,7 +194,7 @@ export default {
.catch(() => {
this.$message.error("登录失败")
if (type == "form") {
this.$router.push({ path: "/403/" });
this.$router.push({ path: "/403" });
}
})
.finally(() => {
......
<template>
<div class="mapbox">
<div class="toolbox">
<div id="testMap"></div>
<div class="toolbox" v-show="record.auditStatus == 2 && auditOver">
<a-button type="primary" icon="check" @click="pass">通过</a-button>
<a-button type="danger" icon="close" @click="fail">不通过</a-button>
</div>
<div id="testMap"></div>
<a-modal
:bodyStyle="{padding: '10px 40px',margin: '20px 0'}"
title="原因"
:width="600"
centered
:visible="visible"
:confirmLoading="loading"
cancelText="取消"
okText="确认"
@ok="onsubmit"
@cancel="cancle"
>
<a-textarea
v-model="cause"
placeholder="请输入原因"
:auto-size="{ minRows: 5, maxRows: 8 }"
/>
</a-modal>
</div>
</template>
<script>
import { updateAudit } from "@/api/minLevel"
export default {
name: 'mapTest',
data() {
return {}
return {
record: {},
visible: false,
loading: false,
cause: '',
auditOver: true
}
},
methods: {
initMap() {
......@@ -19,18 +44,73 @@
window.testMap = new EzMap('testMap', {
mapInitLevel: 4
});
let wmtslayer = null
let serverUrl = this.record.serviceUrl
if(serverUrl.indexOf('?') != -1){
let serverUrlArr = serverUrl.split('?')
// eslint-disable-next-line no-undef
wmtslayer = new Ez.TileLayer.WMTS(serverUrlArr[1].split('=')[1], serverUrlArr[0]+'?SERVICE=WMTS', {
crs: '4326',
layer: serverUrlArr[1].split('=')[1]
});
window.testMap.addLayer(wmtslayer);
}else{
let serverUrlArr = serverUrl.split('Maps/')
let serverUrlArr1 = serverUrlArr[1].split('/')[0]
// eslint-disable-next-line no-undef
let wmtslayer = new Ez.TileLayer.WMTS('shangluo1', 'http://47.92.249.229:8080/EzServer/WMTS?SERVICE=WMTS', {
wmtslayer = new Ez.TileLayer.WMTS(serverUrlArr1[0], serverUrl, {
crs: '4326',
layer: 'shangluo1'
layer: serverUrlArr1[0]
});
window.testMap.addLayer(wmtslayer);
}
// LINESTRING((110.1166485373685 33.71276920507975,109.9738262717435 33.74023502539225,109.9518536154935 33.65234440039225,109.8090313498685 33.63586490820475,109.7321270529935 33.69628971289225,109.649729592056 33.65234440039225,109.5893047873685 33.75122135351725,109.6002911154935 33.83361881445475,109.5014141623685 33.83361881445475,109.5014141623685 33.99292057226725,109.69367490455602 34.09042423437662,109.74448667213414 34.091797525392245,109.79529843971227 34.06570499609537,109.8406170432279 34.031372720704745,109.8900555197904 33.96957462500162,109.9449871604154 33.959961587892245,109.9394939963529 33.91189640234537,109.99854551002477 33.94210880468912,110.00403867408727 33.880310708985995,110.07544980689977 33.905029947267245,110.06309018775914 33.85147159765787,110.10566220924352 33.85696476172037,110.09742246314977 33.814392740235995,110.1166485373685 33.71276920507975)
// let lineStr = 'LINESTRING(110.1166485373685 33.71276920507975,109.9738262717435 33.74023502539225,109.9518536154935 33.65234440039225,109.8090313498685 33.63586490820475,109.7321270529935 33.69628971289225,109.649729592056 33.65234440039225,109.5893047873685 33.75122135351725,109.6002911154935 33.83361881445475,109.5014141623685 33.83361881445475,109.5014141623685 33.99292057226725,109.69367490455602 34.09042423437662,109.74448667213414 34.091797525392245,109.79529843971227 34.06570499609537,109.8406170432279 34.031372720704745,109.8900555197904 33.96957462500162,109.9449871604154 33.959961587892245,109.9394939963529 33.91189640234537,109.99854551002477 33.94210880468912,110.00403867408727 33.880310708985995,110.07544980689977 33.905029947267245,110.06309018775914 33.85147159765787,110.10566220924352 33.85696476172037,110.09742246314977 33.814392740235995,110.1166485373685 33.71276920507975)'
// let lineStr = this.record.borderRange
// eslint-disable-next-line no-undef
// let format = new ol.format.WKT()
// let feature = format.readFeature(lineStr)
//---------------------wkt格式
// eslint-disable-next-line no-undef
// let source = new ol.source.Vector()
// source.addFeature(feature)
// // eslint-disable-next-line no-undef
// let vectorLayer = new ol.layer.Vector({
// source: source,
// // eslint-disable-next-line no-undef
// style: new ol.style.Style({
// // fill: new ol.style.Fill({
// // color: '#083f6f'
// // }),
// // eslint-disable-next-line no-undef
// stroke: new ol.style.Stroke({
// color: '#075497',
// width: 2
// })
// })
// })
// window.testMap.addLayer(vectorLayer, true)
// window.testMap.getView().fit(feature.getGeometry().getExtent(), window.testMap.getSize());
//---------------------方正格式
// let newStr = feature.getGeometry().getCoordinates().join()
let newStr = this.record.borderRange
// eslint-disable-next-line no-undef
// let wmtslayer =new Ez.VectorLayer.WMTS_SL(
let line = new Ez.g.Polyline(newStr, {
strokeColor: "#075497",
strokeWidth: 2
});
window.testMap.addOverlay(line);
// eslint-disable-next-line no-undef
window.testMap.getView().fit(line.getGeometry().getExtent(), window.testMap.getSize());
// eslint-disable-next-line no-undef
// let wmtslayer = new Ez.VectorLayer.WMTS_SL(
// "guangzhou",
// "http://172.18.71.238:8088/vtserver/wmts",
// {
......@@ -74,10 +154,51 @@
// }
// );
// window.testMap.addLayer(wmtslayer);
},
pass(){
this.updateAuditFunc(1)
},
fail(){
this.visible = true
},
onsubmit(){
this.updateAuditFunc(0)
},
cancle(){
this.visible = false
this.cause = ''
},
updateAuditFunc(status){
const that = this
let params = {
id: this.record.id,
auditStatus: status,
cause: this.cause
}
updateAudit(params).then(res => {
if(res.result === 'SUCCESS'){
that.$message.success('审批成功')
that.auditOver = false
that.$router.go(-1)
}else{
that.$message.error(res.msg)
}
}).catch(() => {
that.$message.error('审批失败')
}).finally(() => {
that.visible = false
})
}
},
mounted() {
this.initMap()
window.onbeforeunload = function () {
localStorage.removeItem('LW_MAP_INFO');
};
},
created (){
this.record = JSON.parse(localStorage.getItem('LW_MAP_INFO'))
}
}
</script>
......@@ -95,7 +216,7 @@
.toolbox{
display: flex;
justify-content: flex-end;
margin-bottom: 10px;
margin-top: 10px;
.ant-btn{
margin-right: 10px;
}
......
<template>
<div class="mapbox">
<div id="testMap"></div>
</div>
</template>
<script>
export default {
name: 'mapTest',
data() {
return {
record: {}
}
},
methods: {
initMap() {
// eslint-disable-next-line no-undef
window.testMap = new EzMap('testMap', {
mapInitLevel: 4
});
let wmtslayer = null
let serverUrl = this.record.serviceUrl
if(serverUrl.indexOf('?') != -1){
let serverUrlArr = serverUrl.split('?')
// eslint-disable-next-line no-undef
wmtslayer = new Ez.TileLayer.WMTS(serverUrlArr[1].split('=')[1], serverUrlArr[0]+'?SERVICE=WMTS', {
crs: '4326',
layer: serverUrlArr[1].split('=')[1]
});
window.testMap.addLayer(wmtslayer);
}else{
let serverUrlArr = serverUrl.split('Maps/')
let serverUrlArr1 = serverUrlArr[1].split('/')[0]
// eslint-disable-next-line no-undef
wmtslayer = new Ez.TileLayer.WMTS(serverUrlArr1[0], serverUrl, {
crs: '4326',
layer: serverUrlArr1[0]
});
window.testMap.addLayer(wmtslayer);
}
// let lineStr = 'LINESTRING(110.1166485373685 33.71276920507975,109.9738262717435 33.74023502539225,109.9518536154935 33.65234440039225,109.8090313498685 33.63586490820475,109.7321270529935 33.69628971289225,109.649729592056 33.65234440039225,109.5893047873685 33.75122135351725,109.6002911154935 33.83361881445475,109.5014141623685 33.83361881445475,109.5014141623685 33.99292057226725,109.69367490455602 34.09042423437662,109.74448667213414 34.091797525392245,109.79529843971227 34.06570499609537,109.8406170432279 34.031372720704745,109.8900555197904 33.96957462500162,109.9449871604154 33.959961587892245,109.9394939963529 33.91189640234537,109.99854551002477 33.94210880468912,110.00403867408727 33.880310708985995,110.07544980689977 33.905029947267245,110.06309018775914 33.85147159765787,110.10566220924352 33.85696476172037,110.09742246314977 33.814392740235995,110.1166485373685 33.71276920507975)'
// let lineStr = this.record.borderRange
// eslint-disable-next-line no-undef
// let format = new ol.format.WKT()
// let feature = format.readFeature(lineStr)
//---------------------wkt格式
// eslint-disable-next-line no-undef
// let source = new ol.source.Vector()
// source.addFeature(feature)
// // eslint-disable-next-line no-undef
// let vectorLayer = new ol.layer.Vector({
// source: source,
// // eslint-disable-next-line no-undef
// style: new ol.style.Style({
// // fill: new ol.style.Fill({
// // color: '#083f6f'
// // }),
// // eslint-disable-next-line no-undef
// stroke: new ol.style.Stroke({
// color: '#075497',
// width: 2
// })
// })
// })
// window.testMap.addLayer(vectorLayer, true)
// window.testMap.getView().fit(feature.getGeometry().getExtent(), window.testMap.getSize());
//---------------------方正格式
// let newStr = feature.getGeometry().getCoordinates().join()
let newStr = this.record.borderRange
// eslint-disable-next-line no-undef
let line = new Ez.g.Polyline(newStr, {
strokeColor: "#075497",
strokeWidth: 2
});
window.testMap.addOverlay(line);
// eslint-disable-next-line no-undef
window.testMap.getView().fit(line.getGeometry().getExtent(), window.testMap.getSize());
// eslint-disable-next-line no-undef
// let wmtslayer =new Ez.VectorLayer.WMTS_SL(
// "guangzhou",
// "http://172.18.71.238:8088/vtserver/wmts",
// {
// layer: "guangzhou",
// projection: "EPSG:4326",
// }
// );
// eslint-disable-next-line no-undef,no-unused-vars
// let json2Style = new Ez.Json2StyleMapbox( wmtslayer, 'http://172.18.71.238:8088/vtserver/styles/guangzhou.json','guangzhou');
// setTimeout(function () {
// window.testMap.addLayer(wmtslayer);
// }, 100);
// eslint-disable-next-line no-undef
// let imagewms = new Ez.Layer.ImageWMS({
// url: 'http://172.18.71.238:8088/vtserver/wmts',
// params: {
// REQUEST:'GetTile',
// SERVICE:'WMTS',
// VERSION:'1.0.0',
// LAYER: 'guangzhou',
// TILEMATRIX:'EPSG:4326',
// TILEMATRIXSET:'EPSG:4326',
// FORMAT: 'plication/x-protobuf;type=mapbox-vector'
// }
// });
// window.testMap.addLayer(imagewms);
// eslint-disable-next-line no-undef
// let wmtslayer = new Ez.TileLayer.WMTS(
// "test",
// 'http://172.18.71.238:8088/vtserver/wmts?REQUEST=GetTile&SERVICE=WMTS',
// {
// type: "wmts",
// crs: "4326",
// format: "tile",
// layer: "guangzhou",
// matrixSet: "c",
// style: "default",
// wrapX: false
// }
// );
// window.testMap.addLayer(wmtslayer);
}
},
mounted() {
this.initMap()
window.onbeforeunload = function () {
localStorage.removeItem('LW_MAP_INFO');
};
},
created (){
this.record = JSON.parse(localStorage.getItem('LW_MAP_INFO'))
}
}
</script>
<style scoped lang="less">
.mapbox{
width: 100%;
height: 100%;
padding: 10px;
overflow: hidden;
background-image: url("~@/assets/images/bgcon.png");
background-size: 100% 100%;
background-repeat: no-repeat;
display: flex;
flex-direction: column;
.toolbox{
display: flex;
justify-content: flex-end;
margin-top: 10px;
.ant-btn{
margin-right: 10px;
}
}
#testMap{
width: 100%;
flex: 1;
}
}
</style>
......@@ -20,7 +20,7 @@ module.exports = {
proxy: {
"/pgislwcenter": {
// target: "http://172.18.110.218:7676",
target: "http://172.18.116.38:7676/",
target: "http://172.18.116.38:7676",
ws: true,
pathRewrite: {
"^/pgislwcenter": ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment