dai 4 years ago
parent
commit
9eb4b5ee3c
  1. 116
      src/views/modules/base/community/buildTable.vue
  2. 6
      src/views/modules/base/community/community.vue
  3. 188
      src/views/modules/base/community/communityTable.vue
  4. 37
      src/views/modules/base/community/roomTable.vue
  5. 79
      src/views/modules/communityParty/elegant/index.vue
  6. 3
      src/views/modules/visual/basicinfo/basicInfoMain.vue
  7. 2
      src/views/modules/visual/communityGovern/distributionAnalyze.vue
  8. 1
      src/views/modules/visual/communityGovern/processAnalyze.vue
  9. 6
      src/views/modules/visual/components/screen-map/index.vue

116
src/views/modules/base/community/buildTable.vue

@ -39,23 +39,41 @@
type="green" type="green"
size="small" size="small"
@click="handleAdd">新增楼宇</el-button> @click="handleAdd">新增楼宇</el-button>
<el-button style="float:left"
<el-button style=";margin-left:10px"
type="blue" type="blue"
size="small" size="small"
@click="handleExportModule">下载楼宇模板</el-button> @click="handleExportModule('building')">下载楼宇模板</el-button>
<el-upload ref="upload"
<el-upload style=""
ref="upload_building"
:multiple='false' :multiple='false'
:show-file-list='false' :show-file-list='false'
:before-upload="beforeUpload" :before-upload="((file)=>{beforeUpload(file, 'building')})"
action="" action=""
accept=".xls,.xlsx" accept=".xls,.xlsx"
:limit="1" :http-request="(()=>{uploadFile( 'building')})">
:on-exceed="handleExceed"
:http-request="uploadFile">
<el-button style="margin-left:10px" <el-button style="margin-left:10px"
size="small" size="small"
type="red">导入楼宇数据</el-button> type="red">导入楼宇数据</el-button>
</el-upload> </el-upload>
<el-button style=";margin-left:10px"
type="blue"
size="small"
@click="handleExportModule('room')">下载房屋模板</el-button>
<el-upload style=""
ref="upload_room"
:multiple='false'
:show-file-list='false'
:before-upload="((file)=>{beforeUpload(file, 'room')})"
action=""
accept=".xls,.xlsx"
:http-request="(()=>{uploadFile( 'room')})">
<el-button style="margin-left:10px"
size="small"
type="red">导入房屋数据</el-button>
</el-upload>
</div> </div>
<div class="div_table"> <div class="div_table">
@ -197,7 +215,7 @@ export default {
if (fromTree) { if (fromTree) {
this.agencyObj = treeObj this.agencyObj = treeObj
} }
console.log(this.agencyObj)
const url = "/gov/org/building/buildinglist" const url = "/gov/org/building/buildinglist"
let params = { let params = {
pageSize: this.pageSize, pageSize: this.pageSize,
@ -246,6 +264,7 @@ export default {
this.$refs.ref_form.initForm('edit', row, this.agencyObj) this.$refs.ref_form.initForm('edit', row, this.agencyObj)
}) })
}, },
handleToNextLevel (row) { handleToNextLevel (row) {
this.$emit('toNextLevel', row, 'building') this.$emit('toNextLevel', row, 'building')
}, },
@ -355,11 +374,20 @@ export default {
}, },
handleExportModule () { handleExportModule (type) {
let title = '' let title = ''
title = '楼栋模板' let url = ""
if (type === 'building') {
title = '楼宇导入模板'
url = '/gov/org/building/exporttemplate'
} else if (type === 'room') {
title = '房屋导入模板'
url = '/gov/org/house/exporttemplate'
}
const url = "/gov/org/building/exporttemplate"
let params = {} let params = {}
app.ajax.exportFilePost( app.ajax.exportFilePost(
@ -375,8 +403,9 @@ export default {
); );
}, },
// //
beforeUpload (file) { beforeUpload (file, type) {
this.files = file; this.files = file;
const isText = file.type === 'application/vnd.ms-excel' const isText = file.type === 'application/vnd.ms-excel'
@ -384,6 +413,8 @@ export default {
if (!isText && !isTextComputer) { if (!isText && !isTextComputer) {
this.$message.error('请选择正确格式的文件') this.$message.error('请选择正确格式的文件')
this.files = null
this.fileName = ''
return false return false
} else { } else {
this.fileName = file.name; this.fileName = file.name;
@ -396,34 +427,58 @@ export default {
this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`) this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`)
}, },
async uploadFile () { async uploadFile (type) {
this.loading = true
if (this.fileName == "") { if (this.fileName == "") {
this.$message.warning('请选择要上传的文件!')
return false return false
} }
this.loading = true
//
this.$refs['upload'].clearFiles()
var url = '/gov/org/building/import' //
let url = ''
let params = {}
let fileFormData = new FormData(); let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip fileFormData.append('file', this.files);//filenamefiletest.zip
fileFormData.append('orgId', this.agencyObj.id);//filenamefiletest.zip
fileFormData.append('orgType', this.agencyObj.level);//filenamefiletest.zip
const { data, code, msg } = await requestPost(url, fileFormData) // params.file = fileFormData
if (code === 0) { // params.orgId = this.agencyObj.id
// params.orgType = this.agencyObj.level
if (type === 'building') {
this.$refs['upload_building'].clearFiles()
// url = 'http://192.168.51.26:8080/api/gov/org/building/buildingimport'
url = '/gov/org/building/buildingimport'
this.$message({
type: "success",
message: "导入成功"
});
this.$emit('refreshTree')
this.loadTable()
} else {
this.$message.error(msg)
}
} else if (type === 'room') {
this.$refs['upload_room'].clearFiles()
// url = 'http://192.168.51.26:8080/api/gov/org/house/houseimport'
url = '/gov/org/house/houseimport'
}
this.startLoading()
window.app.ajax.post2(url, fileFormData,
(data, rspMsg) => {
this.endLoading()
if (data.code === 0 || data.code > 8000) {
// this.$message({
// type: "success",
// message: ""
// });
this.$message.success(rspMsg)
this.$emit('refreshTree')
this.loadTable()
} else {
this.$message.error(rspMsg)
}
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
}, { headers: { 'Content-Type': 'multipart/form-data' } })
}, },
@ -510,6 +565,7 @@ export default {
} }
.div_btn { .div_btn {
display: flex;
margin-top: 20px; margin-top: 20px;
} }

6
src/views/modules/base/community/community.vue

@ -27,7 +27,7 @@
<div :style="{height:rowHeight}" <div :style="{height:rowHeight}"
class="div_table"> class="div_table">
<build-table v-if="selTreeObj.level==='neighbourHood'" <build-table v-if="selTreeObj.level==='neighborHood'"
ref="ref_neighTable" ref="ref_neighTable"
@toNextLevel="toNextLevel" @toNextLevel="toNextLevel"
@refreshTree="refreshTree"></build-table> @refreshTree="refreshTree"></build-table>
@ -151,7 +151,7 @@ export default {
if (obj.level === 'building') {// if (obj.level === 'building') {//
this.$refs['ref_buildingTable'].loadTable(true, this.selTreeObj) this.$refs['ref_buildingTable'].loadTable(true, this.selTreeObj)
} else if (obj.level === 'neighbourHood') {// } else if (obj.level === 'neighborHood') {//
this.$refs['ref_neighTable'].loadTable(true, this.selTreeObj) this.$refs['ref_neighTable'].loadTable(true, this.selTreeObj)
} else { } else {
@ -200,7 +200,7 @@ export default {
obj.communityId = communityNode.data.id obj.communityId = communityNode.data.id
obj.communityName = communityNode.data.label obj.communityName = communityNode.data.label
} else if (obj.level === 'neighbourHood') {// } else if (obj.level === 'neighborHood') {//
let gridNode = this.$refs.ref_tree.getNode(obj.pid) let gridNode = this.$refs.ref_tree.getNode(obj.pid)
let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid) let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid)

188
src/views/modules/base/community/communityTable.vue

@ -39,62 +39,61 @@
type="green" type="green"
size="small" size="small"
@click="handleAdd">新增小区</el-button> @click="handleAdd">新增小区</el-button>
<el-button style="" <div class="btn_upload"
type="blue" v-if="agencyObj.level==='community'||agencyObj.level==='grid'">
size="small" <el-button style=""
@click="handleExportModule">下载小区模板</el-button> type="blue"
<el-upload ref="upload"
style=""
:multiple='false'
:show-file-list='false'
:before-upload="((file)=>{beforeUpload(file, 'community')})"
action=""
accept=".xls,.xlsx"
:http-request="uploadFile">
<el-button style="margin-left:10px"
size="small" size="small"
type="red">导入小区数据</el-button> @click="handleExportModule('community')">下载小区模板</el-button>
</el-upload>
<el-upload ref="upload_community"
<el-button style=";margin-left:10px" style=""
type="blue" :multiple='false'
size="small" :show-file-list='false'
@click="handleExportModule">下载楼宇模板</el-button> :before-upload="((file)=>{beforeUpload(file, 'community')})"
action=""
<el-upload style="" accept=".xls,.xlsx"
ref="upload" :http-request="(()=>{uploadFile( 'community')})">
:multiple='false' <el-button style="margin-left:10px"
:show-file-list='false' size="small"
:before-upload="((file)=>{beforeUpload(file, 'building')})" type="red">导入小区数据</el-button>
action="" </el-upload>
accept=".xls,.xlsx"
:limit="1" <el-button style=";margin-left:10px"
:on-exceed="handleExceed" type="blue"
:http-request="uploadFile">
<el-button style="margin-left:10px"
size="small" size="small"
type="red">导入楼宇数据</el-button> @click="handleExportModule('building')">下载楼宇模板</el-button>
</el-upload>
<el-button style=";margin-left:10px" <el-upload style=""
type="blue" ref="upload_building"
size="small" :multiple='false'
@click="handleExportModule">下载房屋模板</el-button> :show-file-list='false'
:before-upload="((file)=>{beforeUpload(file, 'building')})"
<el-upload style="" action=""
ref="upload" accept=".xls,.xlsx"
:multiple='false' :http-request="(()=>{uploadFile( 'building')})">
:show-file-list='false' <el-button style="margin-left:10px"
:before-upload="((file)=>{beforeUpload(file, 'room')})" size="small"
action="" type="red">导入楼宇数据</el-button>
accept=".xls,.xlsx" </el-upload>
:limit="1" <el-button style=";margin-left:10px"
:on-exceed="handleExceed" type="blue"
:http-request="uploadFile">
<el-button style="margin-left:10px"
size="small" size="small"
type="red">导入房屋数据</el-button> @click="handleExportModule('room')">下载房屋模板</el-button>
</el-upload>
<el-upload style=""
ref="upload_room"
:multiple='false'
:show-file-list='false'
:before-upload="((file)=>{beforeUpload(file, 'room')})"
action=""
accept=".xls,.xlsx"
:http-request="(()=>{uploadFile( 'room')})">
<el-button style="margin-left:10px"
size="small"
type="red">导入房屋数据</el-button>
</el-upload>
</div>
</div> </div>
@ -241,9 +240,9 @@ export default {
if (fromTree) { if (fromTree) {
this.agencyObj = treeObj this.agencyObj = treeObj
} }
console.log(this.agencyObj)
const url = "/gov/org/neighborhood/neighborhoodlist" const url = "/gov/org/neighborhood/neighborhoodlist"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/neighborhood/neighborhoodlist"
let params = { let params = {
pageSize: this.pageSize, pageSize: this.pageSize,
pageNo: this.pageNo, pageNo: this.pageNo,
@ -401,11 +400,22 @@ export default {
}, },
handleExportModule () { handleExportModule (type) {
let title = '' let title = ''
title = '小区模板' let url = ""
if (type === 'community') {
title = '小区导入模板'
url = '/gov/org/neighborhood/exporttemplate'
} else if (type === 'building') {
title = '楼宇导入模板'
url = '/gov/org/building/exporttemplate'
} else if (type === 'room') {
title = '房间导入模板'
url = '/gov/org/house/exporttemplate'
}
const url = "/gov/org/neighborhood/exporttemplate"
let params = {} let params = {}
app.ajax.exportFilePost( app.ajax.exportFilePost(
@ -441,11 +451,10 @@ export default {
}, },
// //
handleExceed (files, fileList) { handleExceed (files, fileList) {
this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`) this.$message.warning(`当前限制选择 1 个文件,请删除后继续上传`)
}, },
async uploadFile () { async uploadFile (type) {
if (this.fileName == "") { if (this.fileName == "") {
@ -454,25 +463,53 @@ export default {
this.loading = true this.loading = true
// //
this.$refs['upload'].clearFiles() let url = ''
var url = '/gov/org/neighborhood/import'
let fileFormData = new FormData(); let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip fileFormData.append('file', this.files);//filenamefiletest.zip
fileFormData.append('orgId', this.agencyObj.id);//filenamefiletest.zip
fileFormData.append('orgType', this.agencyObj.level === 'grid' ? 'grid' : 'agency');//filenamefiletest.zip
const { data, code, msg } = await requestPost(url, fileFormData)
if (code === 0) {
this.$message({
type: "success", if (type === 'community') {
message: "导入成功" this.$refs['upload_community'].clearFiles()
}); url = '/gov/org/icneighborhood/neighborhoodimport'
this.$emit('refreshTree')
this.loadTable()
} else { } else if (type === 'building') {
// debugger this.$refs['upload_building'].clearFiles()
// this.$message.error(msg) url = '/gov/org/building/buildingimport'
} else if (type === 'room') {
this.$refs['upload_room'].clearFiles()
url = '/gov/org/house/houseimport'
} }
this.startLoading()
window.app.ajax.post2(url, fileFormData,
(data, rspMsg) => {
this.endLoading()
if (data.code === 0 || data.code > 8000) {
// this.$message({
// type: "success",
// message: ""
// });
this.$message.success(rspMsg)
this.$emit('refreshTree')
this.loadTable()
} else {
this.$message.error(rspMsg)
}
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
}, { headers: { 'Content-Type': 'multipart/form-data' } })
}, },
@ -560,6 +597,11 @@ export default {
.div_btn { .div_btn {
display: flex; display: flex;
margin-top: 20px; margin-top: 20px;
.btn_upload {
margin-left: 10px;
display: flex;
}
} }
.el-row { .el-row {

37
src/views/modules/base/community/roomTable.vue

@ -210,6 +210,7 @@ export default {
if (fromTree) { if (fromTree) {
this.agencyObj = treeObj this.agencyObj = treeObj
} }
const url = "/gov/org/house/houselist" const url = "/gov/org/house/houselist"
let params = { let params = {
@ -416,21 +417,33 @@ export default {
// //
this.$refs['upload'].clearFiles() this.$refs['upload'].clearFiles()
var url = '/gov/org/house/import' var url = '/gov/org/house/houseimport'
let fileFormData = new FormData(); let fileFormData = new FormData();
fileFormData.append('file', this.files);//filenamefiletest.zip fileFormData.append('file', this.files);//filenamefiletest.zip
fileFormData.append('orgId', this.agencyObj.id);//filenamefiletest.zip
fileFormData.append('orgType', this.agencyObj.level);//filenamefiletest.zip
const { data, code, msg } = await requestPost(url, fileFormData) this.startLoading()
if (code === 0) { window.app.ajax.post2(url, fileFormData,
this.$message({ (data, rspMsg) => {
type: "success", this.endLoading()
message: "导入成功" if (data.code === 0 || data.code > 8000) {
}); // this.$message({
this.$emit('refreshTree') // type: "success",
this.loadTable() // message: ""
} else { // });
this.$message.error(msg) this.$message.success(rspMsg)
} this.$emit('refreshTree')
this.loadTable()
} else {
this.$message.error(rspMsg)
}
},
(rspMsg, data) => {
this.endLoading()
this.$message.error(rspMsg)
}, { headers: { 'Content-Type': 'multipart/form-data' } })
}, },

79
src/views/modules/communityParty/elegant/index.vue

@ -13,15 +13,26 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="分类类别" prop="categoryId">
<el-select v-model="searchForm.categoryId" filterable placeholder="请选择" clearable>
<el-option
v-for="item in optionsC"
:key="item.categoryId"
:label="item.categoryName"
:value="item.categoryId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="党员姓名" prop="name"> <el-form-item label="党员姓名" prop="name">
<el-select v-model="searchForm.name" filterable placeholder="请选择" clearable> <!-- <el-select v-model="searchForm.name" filterable placeholder="请选择" clearable>
<el-option <el-option
v-for="item in demandOptions" v-for="item in demandOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select> -->
<el-input v-model="searchForm.name" placeholder="请输入" class="input-width" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="主要事迹" prop="mainDeed"> <el-form-item label="主要事迹" prop="mainDeed">
<el-input v-model="searchForm.mainDeed" placeholder="请输入" class="input-width" clearable></el-input> <el-input v-model="searchForm.mainDeed" placeholder="请输入" class="input-width" clearable></el-input>
@ -139,6 +150,26 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="disabled" label="分类类别" prop="categoryId">
<el-select v-model="form.categoryId" filterable :disabled="disabled" placeholder="请选择" class="input-width" clearable>
<el-option
v-for="item in optionsC"
:key="item.categoryId"
:label="item.categoryName"
:value="item.categoryId">
</el-option>
</el-select>
</el-form-item>
<el-form-item v-else label="分类类别" prop="categoryId">
<el-select v-model="form.categoryId" filterable :disabled="disabled" placeholder="请选择" class="input-width" clearable>
<el-option
v-for="item in optionsEditC"
:key="item.categoryId"
:label="item.categoryName"
:value="item.categoryId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="党员姓名" prop="name"> <el-form-item label="党员姓名" prop="name">
<el-input v-model="form.name" placeholder="请输入" :disabled="disabled" class="input-width" clearable></el-input> <el-input v-model="form.name" placeholder="请输入" :disabled="disabled" class="input-width" clearable></el-input>
</el-form-item> </el-form-item>
@ -215,6 +246,8 @@ export default {
value: '', value: '',
optionsEditG: [], optionsEditG: [],
optionsG: [], optionsG: [],
optionsC: [],
optionsEditC: [],
options: [ options: [
{ {
label: '是', label: '是',
@ -238,6 +271,12 @@ export default {
columnName: 'gridName', columnName: 'gridName',
width: '300', width: '300',
options: [] options: []
}, {
label: '分类类别',
align: 'center',
columnName: 'categoryName',
width: '200',
options: []
}, { }, {
label: '主要事迹', label: '主要事迹',
columnName: 'mainDeed', columnName: 'mainDeed',
@ -249,6 +288,7 @@ export default {
customerId: '', customerId: '',
searchForm: { searchForm: {
gridId: '', gridId: '',
categoryId: '',
mainDeed: '', mainDeed: '',
name: '' name: ''
}, },
@ -256,11 +296,13 @@ export default {
agencyId: '', agencyId: '',
gridId: '', gridId: '',
name: '', name: '',
categoryId: '',
mainDeed: '', mainDeed: '',
imageList: [] imageList: []
}, },
rules: { rules: {
gridId: [{ required: true, message: '网格不能为空', trigger: 'blur' }], gridId: [{ required: true, message: '网格不能为空', trigger: 'blur' }],
categoryId: [{ required: true, message: '分类类别不能为空', trigger: 'blur' }],
name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }], name: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
mainDeed: [{ required: true, message: '主要事迹不能为空', trigger: 'blur' }], mainDeed: [{ required: true, message: '主要事迹不能为空', trigger: 'blur' }],
} }
@ -272,6 +314,8 @@ export default {
this.getTableData() this.getTableData()
this.getGridList('query') this.getGridList('query')
this.getGridList('addorupdate') this.getGridList('addorupdate')
this.getCateList('query')
this.getCateList('addorupdate')
}, 200) }, 200)
this.pageLoading = true this.pageLoading = true
}, },
@ -439,6 +483,7 @@ export default {
this.handleSearch() this.handleSearch()
}, },
handleAdd() { handleAdd() {
this.dialogVisible = true this.dialogVisible = true
}, },
@ -527,6 +572,12 @@ export default {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} else { } else {
this.form = { ...res.data } this.form = { ...res.data }
const _arr = this.optionsEditC.map(item => item.categoryId)
if (!_arr.includes(res.data.categoryId) && !this.disabled) this.form.categoryId = ''
// this.optionsEditC.forEach(item => {
// if (item.categoryId === res.data.categoryId)
// })
this.dialogVisible = true this.dialogVisible = true
} }
}) })
@ -555,6 +606,30 @@ export default {
return this.$message.error('网络错误') return this.$message.error('网络错误')
}) })
}, },
async getCateList(type) {
const { user } = await this.$store.state
console.log('user---ppp', user)
const params = {
customerId: this.customerId,
type
}
// addorupdate query
await this.$http
.post('/resi/partymember/stylecategorydict/select-list', params)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
console.log('获取查询详情成功', res.data)
if (type === 'query') this.optionsC = res.data
else this.optionsEditC = res.data
}
})
.catch(() => {
return this.$message.error('网络错误')
})
},
async getTableData() { async getTableData() {
this.tableLoading = true this.tableLoading = true
const { user } = await this.$store.state const { user } = await this.$store.state

3
src/views/modules/visual/basicinfo/basicInfoMain.vue

@ -113,6 +113,7 @@ import { defaults as defaultInteractions, Select, DoubleClickZoom } from 'ol/int
import { getCenter, boundingExtent } from 'ol/extent.js'; import { getCenter, boundingExtent } from 'ol/extent.js';
import { Circle as CircleStyle, Icon, Fill, Stroke, Style, Text } from 'ol/style.js'; import { Circle as CircleStyle, Icon, Fill, Stroke, Style, Text } from 'ol/style.js';
import nextTick from 'dai-js/tools/nextTick'
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { Loading } from 'element-ui'; //Loading import { Loading } from 'element-ui'; //Loading
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
@ -257,6 +258,8 @@ const vueGis = {
// //
this.initMap() this.initMap()
await nextTick(300)
this.addParentLayer() this.addParentLayer()
this.loadParentPolygon() this.loadParentPolygon()
// //

2
src/views/modules/visual/communityGovern/distributionAnalyze.vue

@ -475,6 +475,7 @@ export default {
}, },
// 线 // 线
async getLineChart () { async getLineChart () {
if (!this.showNoData) { if (!this.showNoData) {
this.$refs.lineChart.clear() this.$refs.lineChart.clear()
this.$refs.lineChart.showLoading() this.$refs.lineChart.showLoading()
@ -527,6 +528,7 @@ export default {
//线 //线
loadCategoryData () { loadCategoryData () {
this.xaxis = [] this.xaxis = []
this.series = [] this.series = []
this.legend = [] this.legend = []

1
src/views/modules/visual/communityGovern/processAnalyze.vue

@ -424,6 +424,7 @@ export default {
}, },
loadMap () { loadMap () {
if (this.isfirstInit) { if (this.isfirstInit) {
//mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray //mapInfo, polygonArray, polIconUrlArray, iconArrays, iconUrlArray
// this.$refs.map.loadMap(this.agencyInfo, null, null, this.projectList, this.iconUrlArray, this.iconTextStyle, 3000) // this.$refs.map.loadMap(this.agencyInfo, null, null, this.projectList, this.iconUrlArray, this.iconTextStyle, 3000)

6
src/views/modules/visual/components/screen-map/index.vue

@ -227,6 +227,7 @@ const vueGis = {
// //
async refreshMap (polygonArray, iconArrays) { async refreshMap (polygonArray, iconArrays) {
this.polygonArray = polygonArray this.polygonArray = polygonArray
this.iconArrays = iconArrays this.iconArrays = iconArrays
@ -354,9 +355,10 @@ const vueGis = {
if (this.iconArrays && this.iconArrays.length > 0) { if (this.iconArrays && this.iconArrays.length > 0) {
let iconFeatures = []; let iconFeatures = [];
let iconArraysNew = []
this.iconArrays.forEach((oneIcon, index) => { this.iconArrays.forEach((oneIcon, index) => {
// //
let iconItem = new Feature({ let iconItem = new Feature({
geometry: new Point([oneIcon.longitude, oneIcon.latitude]), geometry: new Point([oneIcon.longitude, oneIcon.latitude]),
id: oneIcon.id, id: oneIcon.id,
@ -377,6 +379,7 @@ const vueGis = {
}); });
iconItem.setStyle(iconStyle); iconItem.setStyle(iconStyle);
if (this.distanceMax) { if (this.distanceMax) {
if (this.computedDistance(oneIcon.longitude, oneIcon.latitude, this.distanceMax)) { if (this.computedDistance(oneIcon.longitude, oneIcon.latitude, this.distanceMax)) {
iconFeatures.push(iconItem); iconFeatures.push(iconItem);
@ -414,7 +417,6 @@ const vueGis = {
// console.log(distance) // console.log(distance)
return (distance < max || distance === max) return (distance < max || distance === max)
// debugger // debugger
// return // return
// var wgs84Sphere = new ol.Sphere(6378137); // var wgs84Sphere = new ol.Sphere(6378137);

Loading…
Cancel
Save