庞东旭 3 дней назад
Родитель
Сommit
35573eeaa3
6 измененных файлов: 227 добавлений и 21 удалений
  1. Двоичные данные
      src/assets/images/location/mark.png
  2. +59
    -2
      src/components/Map/MapGisLine.vue
  3. +59
    -2
      src/components/Map/MapGisTagDTGCopy.vue
  4. +37
    -5
      src/views/sunVillage_info/fixedAssets.vue
  5. +36
    -6
      src/views/sunVillage_info/resource.vue
  6. +36
    -6
      src/views/sunVillage_info/three.vue

Двоичные данные
src/assets/images/location/mark.png Просмотреть файл

До После
Ширина: 48  |  Высота: 48  |  Размер: 482 B

+ 59
- 2
src/components/Map/MapGisLine.vue Просмотреть файл

@@ -115,7 +115,7 @@ export default {
console.log('定位失败: ' + error.message); console.log('定位失败: ' + error.message);
getQueryLand().then(callback); getQueryLand().then(callback);
}, },
{ enableHighAccuracy: true, timeout: 10000 }
{ enableHighAccuracy: true, timeout: 5000 }
); );
return; return;
} }
@@ -124,6 +124,22 @@ export default {
console.log('使用地区坐标定位'); console.log('使用地区坐标定位');
getQueryLand().then(callback); getQueryLand().then(callback);
}, },
getDeptLocation(callback) {
getQueryLand().then((response) => {
if (response.code == 200) {
let InsertCode = response.data;
if (InsertCode != null) {
var lat = InsertCode.lat;
var lng = InsertCode.lng;
if(lat !=null && lng !=null && lat !="" && lng !=""){
callback(response);
return;
}
}
}
this.getCurrentLocation(callback);
});
},
//地图查看 //地图查看
drawingPaceCountryLine() { drawingPaceCountryLine() {
//加载地图编辑 //加载地图编辑
@@ -132,6 +148,45 @@ export default {
//var hc_land; //var hc_land;
var draw; // global so we can remove it later var draw; // global so we can remove it later
var vector_drawing; var vector_drawing;

var mark_layer = null;
function addMark(lng, lat) {
if(!mark_layer)
{
mark_layer = new ol.layer.Vector({
source: new ol.source.Vector(),
});
map.addLayer(mark_layer);
}
else
mark_layer.getSource().clear();

let newFeature = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([lng, lat])), //几何信息
//name: "标注点",
});
newFeature.setStyle(new ol.style.Style({
image: new ol.style.Icon({
//设置图标偏移
anchor: [0.5, 0.5],
//标注样式的起点位置
anchorOrigin: "top-right",
//X方向单位:分数
anchorXUnits: "fraction",
//Y方向单位:像素
anchorYUnits: "fraction",
//偏移起点位置的方向
offsetOrigin: "top-right",
//透明度
opacity: 0.9,
//图片路径
src: require('../../assets/images/location/mark.png'),
}),
zIndex: 9999,
}));
mark_layer.getSource().addFeature(newFeature);
}

if (that.message != null && that.message != "" if (that.message != null && that.message != ""
&& that.message != undefined) { && that.message != undefined) {
document.getElementById(that.uuidMap).innerHTML = ''; document.getElementById(that.uuidMap).innerHTML = '';
@@ -359,6 +414,7 @@ export default {
}else { }else {
Zb =[115.452752, 31.789033]; Zb =[115.452752, 31.789033];
} }
addMark(lng,lat);
map.getView().animate({ map.getView().animate({
// 只设置需要的属性即可 // 只设置需要的属性即可
center: ol.proj.fromLonLat(Zb), // 中心点 center: ol.proj.fromLonLat(Zb), // 中心点
@@ -398,7 +454,7 @@ export default {
}); });
//获取坐标是否存在 //获取坐标是否存在
var Zb; var Zb;
this.getCurrentLocation((response) => {
this.getDeptLocation((response) => {
if (response.code == 200) { if (response.code == 200) {
let InsertCode = response.data; let InsertCode = response.data;
if (InsertCode != null) { if (InsertCode != null) {
@@ -524,6 +580,7 @@ export default {
}else { }else {
Zb =[115.452752, 31.789033]; Zb =[115.452752, 31.789033];
} }
addMark(lng,lat);
map.getView().animate({ map.getView().animate({
// 只设置需要的属性即可 // 只设置需要的属性即可
center: ol.proj.fromLonLat(Zb), // 中心点 center: ol.proj.fromLonLat(Zb), // 中心点


+ 59
- 2
src/components/Map/MapGisTagDTGCopy.vue Просмотреть файл

@@ -111,7 +111,7 @@
console.log('定位失败: ' + error.message); console.log('定位失败: ' + error.message);
getQueryLand().then(callback); getQueryLand().then(callback);
}, },
{ enableHighAccuracy: true, timeout: 10000 }
{ enableHighAccuracy: true, timeout: 5000 }
); );
return; return;
} }
@@ -120,6 +120,22 @@
console.log('使用地区坐标定位'); console.log('使用地区坐标定位');
getQueryLand().then(callback); getQueryLand().then(callback);
}, },
getDeptLocation(callback) {
getQueryLand().then((response) => {
if (response.code == 200) {
let InsertCode = response.data;
if (InsertCode != null) {
var lat = InsertCode.lat;
var lng = InsertCode.lng;
if(lat !=null && lng !=null && lat !="" && lng !=""){
callback(response);
return;
}
}
}
this.getCurrentLocation(callback);
});
},
//地图查看 //地图查看
pointPaceCountryDarw() { pointPaceCountryDarw() {
//加载地图编辑 //加载地图编辑
@@ -128,6 +144,45 @@
//var hc_land; //var hc_land;
var draw; // global so we can remove it later var draw; // global so we can remove it later
var vector_drawing; var vector_drawing;

var mark_layer = null;
function addMark(lng, lat) {
if(!mark_layer)
{
mark_layer = new ol.layer.Vector({
source: new ol.source.Vector(),
});
map.addLayer(mark_layer);
}
else
mark_layer.getSource().clear();

let newFeature = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([lng, lat])), //几何信息
//name: "标注点",
});
newFeature.setStyle(new ol.style.Style({
image: new ol.style.Icon({
//设置图标偏移
anchor: [0.5, 0.5],
//标注样式的起点位置
anchorOrigin: "top-right",
//X方向单位:分数
anchorXUnits: "fraction",
//Y方向单位:像素
anchorYUnits: "fraction",
//偏移起点位置的方向
offsetOrigin: "top-right",
//透明度
opacity: 0.9,
//图片路径
src: require('../../assets/images/location/mark.png'),
}),
zIndex: 9999,
}));
mark_layer.getSource().addFeature(newFeature);
}

//矢量标注样式设置函数,设置image为图标ol.style.Icon //矢量标注样式设置函数,设置image为图标ol.style.Icon
function createLabelStyle() { function createLabelStyle() {
return new ol.style.Style({ return new ol.style.Style({
@@ -399,6 +454,7 @@
}else { }else {
Zb =[115.452752, 31.789033]; Zb =[115.452752, 31.789033];
} }
addMark(lng,lat);
map.getView().animate({ map.getView().animate({
// 只设置需要的属性即可 // 只设置需要的属性即可
center: ol.proj.fromLonLat(Zb), // 中心点 center: ol.proj.fromLonLat(Zb), // 中心点
@@ -440,7 +496,7 @@
//获取坐标是否存在 //获取坐标是否存在
var Zb; var Zb;
//开始定位当前位置 //开始定位当前位置
this.getCurrentLocation(res => {
this.getDeptLocation(res => {
if (res.code == 200) { if (res.code == 200) {
let lat = res.data.lat; let lat = res.data.lat;
let lng = res.data.lng; let lng = res.data.lng;
@@ -601,6 +657,7 @@
}else { }else {
Zb =[115.452752, 31.789033]; Zb =[115.452752, 31.789033];
} }
addMark(lng,lat);
map.getView().animate({ map.getView().animate({
// 只设置需要的属性即可 // 只设置需要的属性即可
center: ol.proj.fromLonLat(Zb), // 中心点 center: ol.proj.fromLonLat(Zb), // 中心点


+ 37
- 5
src/views/sunVillage_info/fixedAssets.vue Просмотреть файл

@@ -9,11 +9,8 @@
<div class="search_block"> <div class="search_block">
<i class="icon"></i> <i class="icon"></i>
<input type="text" class="ipt" v-model="queryParams.name" :placeholder="searchPlaceholder" @input="getSearchList"> <input type="text" class="ipt" v-model="queryParams.name" :placeholder="searchPlaceholder" @input="getSearchList">
<selector :visible.sync="typeVisible" v-model="queryParams.operationType" :columns="operation_type" clear value-key="dictValue" label-key="dictLabel" @confirm="refresh" @cancel="refresh">
<template>
<van-icon name="filter-o" color="#1989fa" class="filter-icon" @click="openAssetType" />
</template>
</selector>

<van-icon name="filter-o" color="#1989fa" class="filter-icon" @click="openAssetType" />
</div> </div>
<div class="total">共{{listLength}}个资产</div> <div class="total">共{{listLength}}个资产</div>
</div> </div>
@@ -74,6 +71,34 @@
</div> </div>
</van-popup> </van-popup>


<van-popup v-model="typeVisible" lock-scroll closeable position="top" >
<div style="padding: 0.2rem 0.3rem 0.3rem;">
<van-cell-group>
<van-cell>
<div style="text-align: center; font-size: 18px;">筛选</div>
</van-cell>
<van-cell>
<van-checkbox v-model="queryParams.noMap" :border="false">未上图</van-checkbox>
</van-cell>
<van-cell>
<van-checkbox v-model="queryParams.params.noAttachment" :border="false">无附件</van-checkbox>
</van-cell>
<field-select
v-model="queryParams.operationType"
label="经营属性"
value-key="dictLabel"
data-key="dictValue"
placeholder="选择经营属性"
:columns="operation_type"
:clearable="true"
/>
</van-cell-group>
<div style="padding: 0.2rem 0.5rem 0;">
<van-button round type="primary" block @click="refresh">搜索</van-button>
</div>
</div>
</van-popup>

</div> </div>
</template> </template>
<script> <script>
@@ -90,9 +115,11 @@
import request from '@/utils/request' import request from '@/utils/request'
import MapGisTag from "@/components/Map/MapGisTagDTGCopy"; import MapGisTag from "@/components/Map/MapGisTagDTGCopy";
import Selector from "@/components/common/Selector.vue"; import Selector from "@/components/common/Selector.vue";
import FieldSelect from "@/components/form/FieldSelect.vue";
export default { export default {
name: "certificateList", name: "certificateList",
components: { components: {
FieldSelect,
Selector, Selector,
MapGisTag MapGisTag
}, },
@@ -114,6 +141,10 @@
isAsc:'desc', isAsc:'desc',
name:'', name:'',
operationType: null, operationType: null,
noMap: false,
params: {
noAttachment: false,
},
}, },
uploadFiles1:[], uploadFiles1:[],
projectId:'', projectId:'',
@@ -304,6 +335,7 @@
this.typeVisible = true; this.typeVisible = true;
}, },
refresh() { refresh() {
this.typeVisible = false;
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.listLength = 0; this.listLength = 0;
this.applicationList = []; this.applicationList = [];


+ 36
- 6
src/views/sunVillage_info/resource.vue Просмотреть файл

@@ -9,11 +9,7 @@
<div class="search_block"> <div class="search_block">
<i class="icon"></i> <i class="icon"></i>
<input type="text" class="ipt" v-model="queryParams.name" :placeholder="searchPlaceholder" @input="getSearchList"> <input type="text" class="ipt" v-model="queryParams.name" :placeholder="searchPlaceholder" @input="getSearchList">
<selector :visible.sync="typeVisible" v-model="queryParams.resourceType" :columns="resource_type" clear value-key="dictValue" label-key="dictLabel" @confirm="refresh" @cancel="refresh">
<template>
<van-icon name="filter-o" color="#1989fa" class="filter-icon" @click="openResourceType" />
</template>
</selector>
<van-icon name="filter-o" color="#1989fa" class="filter-icon" @click="openResourceType" />
</div> </div>
<div class="total">共{{listLength}}个资源</div> <div class="total">共{{listLength}}个资源</div>
</div> </div>
@@ -69,6 +65,34 @@
<van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" multiple /> <van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" multiple />
</div> </div>
</van-popup> </van-popup>

<van-popup v-model="typeVisible" lock-scroll closeable position="top" >
<div style="padding: 0.2rem 0.3rem 0.3rem;">
<van-cell-group>
<van-cell>
<div style="text-align: center; font-size: 18px;">筛选</div>
</van-cell>
<van-cell>
<van-checkbox v-model="queryParams.noMap" :border="false">未上图</van-checkbox>
</van-cell>
<van-cell>
<van-checkbox v-model="queryParams.params.noAttachment" :border="false">无附件</van-checkbox>
</van-cell>
<field-select
v-model="queryParams.resourceType"
label="资源分类"
value-key="dictLabel"
data-key="dictValue"
placeholder="选择资源分类"
:columns="resource_type"
:clearable="true"
/>
</van-cell-group>
<div style="padding: 0.2rem 0.5rem 0;">
<van-button round type="primary" block @click="refresh">搜索</van-button>
</div>
</div>
</van-popup>
</div> </div>
</template> </template>
<script> <script>
@@ -85,9 +109,10 @@
import request from '@/utils/request' import request from '@/utils/request'
import MapGisLine from "@/components/Map/MapGisLine"; import MapGisLine from "@/components/Map/MapGisLine";
import Selector from "@/components/common/Selector.vue"; import Selector from "@/components/common/Selector.vue";
import FieldSelect from "@/components/form/FieldSelect.vue";
export default { export default {
name: "certificateList", name: "certificateList",
components: {Selector, MapGisLine,},
components: {FieldSelect, Selector, MapGisLine,},
data() { data() {
return { return {
theGeom:'', theGeom:'',
@@ -110,6 +135,10 @@
translate_dict:1, translate_dict:1,
name:'', name:'',
resourceType: null, resourceType: null,
noMap: false,
params: {
noAttachment: false,
},
}, },
uploadFiles1:[], uploadFiles1:[],
projectId:'', projectId:'',
@@ -291,6 +320,7 @@
this.typeVisible = true; this.typeVisible = true;
}, },
refresh() { refresh() {
this.typeVisible = false;
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.listLength = 0; this.listLength = 0;
this.applicationList = []; this.applicationList = [];


+ 36
- 6
src/views/sunVillage_info/three.vue Просмотреть файл

@@ -8,11 +8,7 @@
<div class="search_info"> <div class="search_info">
<div class="search_block"> <div class="search_block">
<van-search class="search_block searchHeight" v-model="queryParams.zcmc" @input="getSearchList" :placeholder="searchPlaceholder" /> <van-search class="search_block searchHeight" v-model="queryParams.zcmc" @input="getSearchList" :placeholder="searchPlaceholder" />
<selector :visible.sync="typeVisible" v-model="queryParams.threeAssetType" :columns="threeAssetTypeOptions" clear value-key="dictValue" label-key="dictLabel" @confirm="refresh" @cancel="refresh">
<template>
<van-icon name="filter-o" color="#1989fa" class="filter-icon" @click="openThreeAssetType" />
</template>
</selector>
<van-icon name="filter-o" color="#1989fa" class="filter-icon" @click="openThreeAssetType" />
</div> </div>
<div class="total">共{{listLength}}个资产</div> <div class="total">共{{listLength}}个资产</div>
</div> </div>
@@ -68,6 +64,34 @@
<van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" multiple /> <van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" multiple />
</div> </div>
</van-popup> </van-popup>

<van-popup v-model="typeVisible" lock-scroll closeable position="top" >
<div style="padding: 0.2rem 0.3rem 0.3rem;">
<van-cell-group>
<van-cell>
<div style="text-align: center; font-size: 18px;">筛选</div>
</van-cell>
<van-cell>
<van-checkbox v-model="queryParams.params.noMap" :border="false">未上图</van-checkbox>
</van-cell>
<van-cell>
<van-checkbox v-model="queryParams.params.noAttachment" :border="false">无附件</van-checkbox>
</van-cell>
<field-select
v-model="queryParams.threeAssetType"
label="三清类型"
value-key="dictLabel"
data-key="dictValue"
placeholder="选择三清类型"
:columns="threeAssetTypeOptions"
:clearable="true"
/>
</van-cell-group>
<div style="padding: 0.2rem 0.5rem 0;">
<van-button round type="primary" block @click="refresh">搜索</van-button>
</div>
</div>
</van-popup>
</div> </div>
</template> </template>
<script> <script>
@@ -84,9 +108,10 @@
import request from '@/utils/request' import request from '@/utils/request'
import MapGisLine from "@/components/Map/MapGisLine"; import MapGisLine from "@/components/Map/MapGisLine";
import Selector from "@/components/common/Selector.vue"; import Selector from "@/components/common/Selector.vue";
import FieldSelect from "@/components/form/FieldSelect.vue";
export default { export default {
name: "certificateList", name: "certificateList",
components: {Selector, MapGisLine,},
components: {FieldSelect, Selector, MapGisLine,},
data() { data() {
return { return {
theGeom:'', theGeom:'',
@@ -109,6 +134,10 @@
translate_dict:1, translate_dict:1,
zcmc:'', zcmc:'',
threeAssetType: null, threeAssetType: null,
params: {
noMap: false,
noAttachment: false,
},
}, },
uploadFiles1:[], uploadFiles1:[],
projectId:'', projectId:'',
@@ -272,6 +301,7 @@
this.typeVisible = true; this.typeVisible = true;
}, },
refresh() { refresh() {
this.typeVisible = false;
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.listLength = 0; this.listLength = 0;
this.applicationList = []; this.applicationList = [];


Загрузка…
Отмена
Сохранить