diff --git a/src/api/index.js b/src/api/index.js index 4a96e6e..dfa4f15 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -24,3 +24,11 @@ export function getIndustry (query) { params: query }) } + +export function getIndustryList (query) { + return request({ + url: '/api/asset/industry/listNoParams', + method: 'get', + params: query + }) +} diff --git a/src/views/industry/main-gis/index.js b/src/views/industry/main-gis/index.js index 9a1de79..f2c6f14 100644 --- a/src/views/industry/main-gis/index.js +++ b/src/views/industry/main-gis/index.js @@ -11,7 +11,7 @@ import { attachmentList } from "@/api/common/uploadAttachment.js"; import { treeselect, getDept, listDeptExcludeChild } from "@/api/system/dept"; import { getConfigKey } from "@/api/system/config"; import { treeselectByDeptId } from "@/api/system/dept"; -import { getThreeList } from "@/api/index"; +import { getIndustryList } from "@/api/index"; import Popover from '../popover/index.vue'; let gis = null; @@ -56,35 +56,59 @@ export default { LegendData: [ { iconStyle: { - background: 'rgba(38,252,128,0.45)', - borderColor: '#26FC80', - border: '2px solid #26FC80' + background: 'rgba(33,149,254,0.45)', + borderColor: '#2195fe', + border: '2px solid #2195fe' }, - name: '自用' + name: '养殖类' }, { iconStyle: { - background: 'rgba(232,246,0,0.45)', - borderColor: '#E8F600', - border: '2px solid #E8F600' + background: 'rgba(4,226,111,0.45)', + borderColor: '#04e26f', + border: '2px solid #04e26f' }, - name: '闲置' + name: '种植类' }, { iconStyle: { - background: 'rgba(16,252,252,0.45)', - borderColor: '#10FCFC', - border: '2px solid #10FCFC' + background: 'rgba(247,204,58,0.45)', + borderColor: '#f7cc3a', + border: '2px solid #f7cc3a' }, - name: '出租' + name: '经济林木类' }, { iconStyle: { - background: 'rgba(198,0,255,0.45)', - borderColor: '#C600FF', - border: '2px solid #C600FF' + background: 'rgba(247,126,63,0.45)', + borderColor: '#f77e3f', + border: '2px solid #f77e3f' }, - name: '其他' + name: '文化旅游类' + }, + { + iconStyle: { + background: 'rgba(63,247,236,0.45)', + borderColor: '#3ff7ec', + border: '2px solid #3ff7ec' + }, + name: '农机类' + }, + { + iconStyle: { + background: 'rgba(234,64,204,0.45)', + borderColor: '#ea40cc', + border: '2px solid #ea40cc' + }, + name: '加工销售类' + }, + { + iconStyle: { + background: 'rgba(247,76,63,0.45)', + borderColor: '#f74c3f', + border: '2px solid #f74c3f' + }, + name: '其他类' } ], threeAssetTypeOptions: [], @@ -468,7 +492,7 @@ export default { }, // 获取资源列表 getResourceList (deptId) { - getThreeList({ deptId: deptId }).then(response => { + getIndustryList({ deptId: deptId }).then(response => { if (response.rows && response.rows.length > 0) { this.addResourceLayer(response.rows); } @@ -484,9 +508,10 @@ export default { let features = []; resourceList.forEach(item => { if (item.theGeom != null && item.theGeom !== '') { - const { threeAssetType } = item - // console.log(222, threeAssetType, item); - let color = this.LegendData[threeAssetType - 1 + ''] + const { industryType } = item + console.log(222, industryType); + // console.log(222, item); + let color = this.LegendData[industryType - 1 + ''] let fs = gis.getFeature3(item, color.iconStyle.background, color.iconStyle.borderColor) features.push(fs); } @@ -496,9 +521,9 @@ export default { }, // 获取资产列表 getPermanentList (deptId) { - getThreeList({ deptId: deptId }).then(response => { - if (response.data && response.data.length > 0) { - this.addPermanentLayer(response.data); + getIndustryList({ deptId: deptId }).then(response => { + if (response.rows && response.rows.length > 0) { + this.addPermanentLayer(response.rows); } }); },