|
|
@@ -7,6 +7,7 @@ import { getUserGeo, getUserGeoList } from "@/api/dataScreen/stockCooperative/in |
|
|
import { getInfo } from "@/api/login"; |
|
|
import { getInfo } from "@/api/login"; |
|
|
import { getResourceListByDeptId, listResource } from "@/api/asset/resource.js"; |
|
|
import { getResourceListByDeptId, listResource } from "@/api/asset/resource.js"; |
|
|
import Legend from '@/components/legend/index.vue'; |
|
|
import Legend from '@/components/legend/index.vue'; |
|
|
|
|
|
import { attachmentList } from "@/api/common/uploadAttachment.js"; |
|
|
let gis = null; |
|
|
let gis = null; |
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
@@ -14,10 +15,13 @@ export default { |
|
|
}, |
|
|
}, |
|
|
data () { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
|
|
|
//资产信息详情弹窗 |
|
|
|
|
|
showPermanentDetail: false, |
|
|
LegendData: [ |
|
|
LegendData: [ |
|
|
{ |
|
|
{ |
|
|
iconStyle: { |
|
|
iconStyle: { |
|
|
background: 'rgba(38,252,128,0.45)', |
|
|
background: 'rgba(38,252,128,0.45)', |
|
|
|
|
|
borderColor: '#26FC80', |
|
|
border: '2px solid #26FC80' |
|
|
border: '2px solid #26FC80' |
|
|
}, |
|
|
}, |
|
|
name: '自用' |
|
|
name: '自用' |
|
|
@@ -25,6 +29,7 @@ export default { |
|
|
{ |
|
|
{ |
|
|
iconStyle: { |
|
|
iconStyle: { |
|
|
background: 'rgba(232,246,0,0.45)', |
|
|
background: 'rgba(232,246,0,0.45)', |
|
|
|
|
|
borderColor: '#E8F600', |
|
|
border: '2px solid #E8F600' |
|
|
border: '2px solid #E8F600' |
|
|
}, |
|
|
}, |
|
|
name: '闲置' |
|
|
name: '闲置' |
|
|
@@ -32,6 +37,7 @@ export default { |
|
|
{ |
|
|
{ |
|
|
iconStyle: { |
|
|
iconStyle: { |
|
|
background: 'rgba(16,252,252,0.45)', |
|
|
background: 'rgba(16,252,252,0.45)', |
|
|
|
|
|
borderColor: '#10FCFC', |
|
|
border: '2px solid #10FCFC' |
|
|
border: '2px solid #10FCFC' |
|
|
}, |
|
|
}, |
|
|
name: '出租' |
|
|
name: '出租' |
|
|
@@ -39,6 +45,7 @@ export default { |
|
|
{ |
|
|
{ |
|
|
iconStyle: { |
|
|
iconStyle: { |
|
|
background: 'rgba(198,0,255,0.45)', |
|
|
background: 'rgba(198,0,255,0.45)', |
|
|
|
|
|
borderColor: '#C600FF', |
|
|
border: '2px solid #C600FF' |
|
|
border: '2px solid #C600FF' |
|
|
}, |
|
|
}, |
|
|
name: '其他' |
|
|
name: '其他' |
|
|
@@ -63,7 +70,6 @@ export default { |
|
|
gis = new GisUtils('map2') |
|
|
gis = new GisUtils('map2') |
|
|
gis.addTianDiTuLayer() |
|
|
gis.addTianDiTuLayer() |
|
|
gis.addAnnotationLayer() |
|
|
gis.addAnnotationLayer() |
|
|
const initZoom = 11; |
|
|
|
|
|
// // 获取资源列表 |
|
|
// // 获取资源列表 |
|
|
this.getResourceList(deptId); |
|
|
this.getResourceList(deptId); |
|
|
//初始加载当前用户级别的geojson数据 |
|
|
//初始加载当前用户级别的geojson数据 |
|
|
@@ -138,17 +144,10 @@ export default { |
|
|
rotation: undefined, // 缩放完成view视图旋转弧度 |
|
|
rotation: undefined, // 缩放完成view视图旋转弧度 |
|
|
duration: 1000, // 缩放持续时间,默认不需要设置 |
|
|
duration: 1000, // 缩放持续时间,默认不需要设置 |
|
|
}); |
|
|
}); |
|
|
//根据镇级deptID获取下级部门集合,并创建坐标点 |
|
|
|
|
|
getUserGeoList(feature.get('deptId')).then((res) => { |
|
|
|
|
|
if (res.code == 200) { |
|
|
|
|
|
let content = res.data; |
|
|
|
|
|
if (this.villagePointLayer) { |
|
|
|
|
|
gis.getMapContainer().removeLayer(this.villagePointLayer); |
|
|
|
|
|
this.villagePointLayer = ""; |
|
|
|
|
|
} |
|
|
|
|
|
this.villagePointLayer = this.addDeptLayer(content, require('./icon/green.png')); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
this.listDialogHidden('detail'); |
|
|
|
|
|
this.openPermanentDialog(feature.values_.detail); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
@@ -162,6 +161,99 @@ export default { |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
listDialogHidden (type) { |
|
|
|
|
|
if (type == 'detail') { |
|
|
|
|
|
//合同信息详情弹窗 |
|
|
|
|
|
this.showInfoDetail = false; |
|
|
|
|
|
//资源信息详情弹窗 |
|
|
|
|
|
this.showResourceDetail = false; |
|
|
|
|
|
//资产信息详情弹窗 |
|
|
|
|
|
this.showPermanentDetail = false; |
|
|
|
|
|
//农业补贴详情弹窗 |
|
|
|
|
|
this.showSubsidyFundsDetail = false; |
|
|
|
|
|
//重大事项详情弹窗 |
|
|
|
|
|
this.showMajorEventDetail = false; |
|
|
|
|
|
//零工公开详情弹窗 |
|
|
|
|
|
this.showTempWorkerDetail = false; |
|
|
|
|
|
//三务公开详情弹窗 |
|
|
|
|
|
this.showAffairsDetail = false; |
|
|
|
|
|
} else { |
|
|
|
|
|
//三务公开列表弹窗 |
|
|
|
|
|
this.showAffairs = false; |
|
|
|
|
|
//零工公开列表弹窗 |
|
|
|
|
|
this.showTempWorker = false; |
|
|
|
|
|
//重大事项列表弹窗 |
|
|
|
|
|
this.showMajorEvent = false; |
|
|
|
|
|
//农业补贴列表弹窗 |
|
|
|
|
|
this.showSubsidyFunds = false; |
|
|
|
|
|
//资产信息列表弹窗 |
|
|
|
|
|
this.showPermanent = false; |
|
|
|
|
|
//资源信息列表弹窗 |
|
|
|
|
|
this.showResource = false; |
|
|
|
|
|
//合同信息列表弹窗 |
|
|
|
|
|
this.showInfo = false; |
|
|
|
|
|
//合同信息详情弹窗 |
|
|
|
|
|
this.showInfoDetail = false; |
|
|
|
|
|
//资源信息详情弹窗 |
|
|
|
|
|
this.showResourceDetail = false; |
|
|
|
|
|
//资产信息详情弹窗 |
|
|
|
|
|
this.showPermanentDetail = false; |
|
|
|
|
|
//农业补贴详情弹窗 |
|
|
|
|
|
this.showSubsidyFundsDetail = false; |
|
|
|
|
|
//重大事项详情弹窗 |
|
|
|
|
|
this.showMajorEventDetail = false; |
|
|
|
|
|
//零工公开详情弹窗 |
|
|
|
|
|
this.showTempWorkerDetail = false; |
|
|
|
|
|
//三务公开详情弹窗 |
|
|
|
|
|
this.showAffairsDetail = false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
openPermanentDialog (data) { |
|
|
|
|
|
console.log(data, 999); |
|
|
|
|
|
data.fileList = []; |
|
|
|
|
|
let parmasData = { |
|
|
|
|
|
tableId: data.id, |
|
|
|
|
|
tableName: 't_asset_permanent', |
|
|
|
|
|
bizPath: 'asset', |
|
|
|
|
|
}; |
|
|
|
|
|
attachmentList(parmasData).then((res) => { |
|
|
|
|
|
if (res.code == 200) { |
|
|
|
|
|
let UattachmentList = res.rows; |
|
|
|
|
|
for (let i = 0; i < UattachmentList.length; i++) { |
|
|
|
|
|
let fileName = UattachmentList[i].fileName; |
|
|
|
|
|
let subIndex = fileName.lastIndexOf("."); |
|
|
|
|
|
let ext = fileName.substring(subIndex + 1, fileName.length); |
|
|
|
|
|
let urls = ""; |
|
|
|
|
|
let type = ""; |
|
|
|
|
|
if (ext == "xlsx" || ext == "xls") { |
|
|
|
|
|
urls = require("@/assets/images/icon_excel.jpg"); |
|
|
|
|
|
type = 'excel'; |
|
|
|
|
|
} else if (ext == "doc" || ext == "docx") { |
|
|
|
|
|
urls = require("@/assets/images/icon_word.jpg"); |
|
|
|
|
|
type = 'word'; |
|
|
|
|
|
} else if (ext == "pdf") { |
|
|
|
|
|
urls = require("@/assets/images/icon_pdf.jpg"); |
|
|
|
|
|
type = 'pdf'; |
|
|
|
|
|
} else if (ext == "zip") { |
|
|
|
|
|
urls = require("@/assets/images/icon_zip.jpg"); |
|
|
|
|
|
type = 'zip'; |
|
|
|
|
|
} else { |
|
|
|
|
|
urls = '/api' + UattachmentList[i].fileUrl; |
|
|
|
|
|
type = 'image'; |
|
|
|
|
|
} |
|
|
|
|
|
data.fileList.push({ |
|
|
|
|
|
url: urls, |
|
|
|
|
|
urlApi: '/api' + UattachmentList[i].fileUrl, |
|
|
|
|
|
type: type |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
this.showPermanentDetail = true; |
|
|
|
|
|
this.permanentDetail = data; |
|
|
|
|
|
console.log(22222, this.permanentDetail); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
// 创建矢量数据源 |
|
|
// 创建矢量数据源 |
|
|
addDeptLayer (nextDeptSet, locationIcon) { |
|
|
addDeptLayer (nextDeptSet, locationIcon) { |
|
|
let features = []; |
|
|
let features = []; |
|
|
@@ -175,7 +267,6 @@ export default { |
|
|
// 获取资源列表 |
|
|
// 获取资源列表 |
|
|
getResourceList (deptId) { |
|
|
getResourceList (deptId) { |
|
|
getResourceListByDeptId(deptId).then(response => { |
|
|
getResourceListByDeptId(deptId).then(response => { |
|
|
console.log(22222, response); |
|
|
|
|
|
if (response.data && response.data.length > 0) { |
|
|
if (response.data && response.data.length > 0) { |
|
|
this.addResourceLayer(response.data); |
|
|
this.addResourceLayer(response.data); |
|
|
} |
|
|
} |
|
|
@@ -186,13 +277,12 @@ export default { |
|
|
let features = []; |
|
|
let features = []; |
|
|
resourceList.forEach(item => { |
|
|
resourceList.forEach(item => { |
|
|
if (item.theGeom != null && item.theGeom !== '') { |
|
|
if (item.theGeom != null && item.theGeom !== '') { |
|
|
let fs = gis.getFeature3(item) |
|
|
|
|
|
|
|
|
const { useType } = item |
|
|
|
|
|
let color = this.LegendData[useType - 1 + ''] |
|
|
|
|
|
let fs = gis.getFeature3(item, color.iconStyle.background, color.iconStyle.borderColor) |
|
|
features.push(fs); |
|
|
features.push(fs); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gis.getVectorLayerByFs(features) |
|
|
gis.getVectorLayerByFs(features) |
|
|
gis.mapSetFit(features) |
|
|
gis.mapSetFit(features) |
|
|
}, |
|
|
}, |
|
|
|