diff --git a/src/views/sanqing/main-gis/index.js b/src/views/sanqing/main-gis/index.js index cc0c478..6658907 100644 --- a/src/views/sanqing/main-gis/index.js +++ b/src/views/sanqing/main-gis/index.js @@ -38,145 +38,6 @@ export default { status: null, translate_dict: 1, }, - - //零工公开请求参数 - tempWorkerOpenQueryParams: { - // 分页 - pageNum: 1, - pageSize: 10, - // 查询排序 - //orderByColumn: "id", - //isAsc: "desc", - bookId: null, - deptId: null, - deptName: null, - openNy: null, - openYear: null, - openName: null, - openFile: null, - openPic: null, - remark: null, - translate_dict: 1, - }, - - //重大事项公开请求参数 - majorEventOpenQueryParams: { - // 分页 - pageNum: 1, - pageSize: 10, - // 查询排序 - //orderByColumn: "id", - //isAsc: "desc", - bookId: null, - deptId: null, - deptName: null, - openNy: null, - openYear: null, - openDate: null, - openName: null, - openFile: null, - openPic: null, - content: null, - remark: null, - translate_dict: 1, - }, - - //补贴资金管理请求参数 - subsidyFundsQueryParams: { - // 分页 - pageNum: 1, - pageSize: 10, - // 查询排序 - orderByColumn: "id", - isAsc: "desc", - year: null, - areaName: null, - name: null, - idCard: null, - itemName: null, - releaseDate: null, - translate_dict: 1, - }, - - //固定资产请求参数 - permanentQueryParams: { - pageNum: 1, - pageSize: 10, - code: null, - name: null, - assetType: null, - operationType: null, - addType: null, - useType: null, - assetStatus: '1', - translate_dict: 1, - }, - - //资源资产请求参数 - resourceListQueryParams: { - pageNum: 1, - pageSize: 10, - bookId: null, - deptId: null, - code: null, - name: null, - resourceType: null, - /*farmingResourceType: null, - buildResourceType: null, - unusedResourceType: null,*/ - resourceSort: null, - totalArea: null, - location: null, - east: null, - west: null, - south: null, - north: null, - sumArea: null, - groupArea: null, - groupValue: null, - rentArea: null, - rentValue: null, - rentLessee: null, - rentStartTime: null, - rentEndTime: null, - otherArea: null, - otherValue: null, - farmerArea: null, - circulationArea: null, - circulationValue: null, - investmentArea: null, - investmentValue: null, - investmentLessee: null, - investmentStartTime: null, - investmentEndTime: null, - status: null, - translate_dict: 1, - }, - //合同信息请求参数 - contractionByPermanentQueryParams: { - pageNum: 1, - pageSize: 10, - bookId: null, - deptId: null, - code: null, - name: null, - assetType: null, - firstParty: null, - secondParty: null, - collectionPay: null, - contractionSource: null, - totalAmount: null, - receivedAmount: null, - settledAmount: null, - buildingTime: null, - startTime: null, - endTime: null, - num: null, - unit: null, - price: null, - contractionStatus: null, - translate_dict: 1, - }, addrText: [100,], deptTreeProps: { checkStrictly: true, @@ -232,6 +93,9 @@ export default { threeNhTypeOptions: [], natureOwnershipTypeOptions: [], sysYesNoOptions: [], + fileList: [], + fileUrl:'', + showImg:false, }; }, computed: { @@ -262,8 +126,10 @@ export default { treeselectByDeptId({ deptId: res.user.deptId }).then((resp) => { this.addrOptions = resp.data; this.headerTitle = res.user.deptName + '阳光村务一张图'; - listDeptExcludeChild(res.user.loginDeptId).then((resp) => { - let deptOptions = [res.user.loginDeptId]; + //loginDeptId + listDeptExcludeChild(res.user.deptId).then((resp) => { + //loginDeptId + let deptOptions = [res.user.deptId]; resp.data.map(resm => { if (res.user.parentDeptName == resm.deptName) { deptOptions.unshift(resm.deptId) @@ -272,17 +138,11 @@ export default { }) this.addrText = deptOptions; }); - this.queryParams.deptId = res.user.loginDeptId; - this.tempWorkerOpenQueryParams.deptId = res.user.loginDeptId; - this.majorEventOpenQueryParams.deptId = res.user.loginDeptId; - this.subsidyFundsQueryParams.deptId = res.user.loginDeptId; - this.permanentQueryParams.deptId = res.user.loginDeptId; - this.resourceListQueryParams.deptId = res.user.loginDeptId; - this.contractionByPermanentQueryParams.deptId = res.user.loginDeptId; + this.queryParams.deptId = res.user.deptId;//loginDeptId //列表请求 - this.getAllList(res.user.deptId); + // this.getAllList(res.user.deptId); // 加载地图 - this.initMap(res.user.loginDeptId); + this.initMap(res.user.deptId); // 获取村边界的图层名称 this.getVillageBorderLayerName(); @@ -351,27 +211,7 @@ export default { selectAddress (value) { const deptId = value[value.length - 1]; this.queryParams.deptId = deptId; - this.tempWorkerOpenQueryParams.deptId = deptId; - this.majorEventOpenQueryParams.deptId = deptId; - this.subsidyFundsQueryParams.deptId = deptId; - this.permanentQueryParams.deptId = deptId; - this.resourceListQueryParams.deptId = deptId; - this.contractionByPermanentQueryParams.deptId = deptId; - this.infoTotal = undefined; - this.resourceTotal = undefined; - this.permanentTotal = undefined; - this.subsidyFundsTotal = undefined; - this.majorEventOpenTotal = undefined; - this.tempWorkerOpenTotal = undefined; - this.affairsTotal = undefined; - this.affairsList = []; - this.tempWorkerOpenList = []; - this.majorEventOpenList = []; - this.subsidyFundsList = []; - this.permanentList = []; - this.resourceList = []; - this.infoList = []; - this.getAllList(); + this.getAllList(deptId); gis.getMapContainer().removeLayer(this.villageBorder); this.villageBorder = ''; @@ -414,12 +254,13 @@ export default { // 加载地图 initMap (deptId) { gis = new GisUtils('map2') + // // 获取资源列表 + this.getResourceList(deptId); gis.addTianDiTuLayer() gis.addAnnotationLayer() - let dept2 = this.addrOptions[0]; //console.log(this.addrOptions, 'this.addrOptions'); - // console.log(dept2, 888); + console.log(dept2.deptLevel) if (dept2.deptLevel === '5') { // 登录身份为市级领导 this.userRole = 'cityLeader'; @@ -434,7 +275,7 @@ export default { this.currentDeptLevel = '4'; // 添加乡镇边界 this.addTownBorder(dept2.children.map(item => item.id)); - // gis.getView().setZoom(11); + gis.getView().setZoom(13); } else if (dept2.deptLevel === '3') { // 登录身份为镇级领导 this.userRole = 'townLeader'; @@ -444,13 +285,13 @@ export default { this.addVillageBorder(dept2.children.map(item => item.id)); gis.getView().setZoom(13); } - debugger // 添加坐标点图层 if (dept2.children) { this.addDeptLayer(dept2.children); } - // // 获取资源列表 - this.getResourceList(deptId); + + // gis.getMapContainer().getView().setCenter(fromLonLat([dept2.lng, dept2.lat])); + gis.getMapContainer().on("click", (evt) => { let feature = gis.getMapContainer().forEachFeatureAtPixel( evt.pixel, @@ -466,14 +307,16 @@ export default { duration: 1000, // 缩放持续时间,默认不需要设置 }); } else { + + feature.values_.detail.threeDetailType = - feature.values_.detail.threeAssetType == '1' ? - this.selectDictLabel(this.threeJtzyzcTypeOptions, feature.values_.detail.threeDetailType) : + feature.values_.detail.threeAssetType == '1' ? + this.selectDictLabel(this.threeJtzyzcTypeOptions, feature.values_.detail.threeDetailType): feature.values_.detail.threeAssetType == '2' ? - this.selectDictLabel(this.threeNysssbTypeOptions, feature.values_.detail.threeDetailType) : - feature.values_.detail.threeAssetType == '3' ? - this.selectDictLabel(this.threeNhTypeOptions, feature.values_.detail.threeDetailType) : '' - ; + this.selectDictLabel(this.threeNysssbTypeOptions, feature.values_.detail.threeDetailType): + feature.values_.detail.threeAssetType == '3' ? + this.selectDictLabel(this.threeNhTypeOptions, feature.values_.detail.threeDetailType):'' + ; feature.values_.detail.threeAssetType = this.selectDictLabel(this.threeAssetTypeOptions, feature.values_.detail.threeAssetType); feature.values_.detail.natureOwnership = this.selectDictLabel(this.natureOwnershipTypeOptions, feature.values_.detail.natureOwnership); feature.values_.detail.qssfczzy = this.selectDictLabel(this.sysYesNoOptions, feature.values_.detail.qssfczzy); @@ -596,7 +439,7 @@ export default { features.push(fs); }); gis.getVectorLayerByFs(features) - // gis.mapSetFit(features) + gis.mapSetFit(features) }, // 获取资源列表 getResourceList (deptId) { @@ -617,7 +460,7 @@ export default { resourceList.forEach(item => { if (item.theGeom != null && item.theGeom !== '') { const { threeAssetType } = item - // console.log(222, threeAssetType, item); + console.log(222, threeAssetType, item); let color = this.LegendData[threeAssetType - 1 + ''] let fs = gis.getFeature3(item, color.iconStyle.background, color.iconStyle.borderColor) features.push(fs); @@ -635,32 +478,14 @@ export default { }); }, getAllList (deptId) { - //三务公开 - // this.getList(null); - // //零工公开 - // this.getTempWorkerOpenList(); - // //重大事项公开 - // this.getMajorEventOpenList(); - // //补贴资金管理 - // this.getSubsidyFundsList(); - // //固定资产 - // this.getPermanentListList(); - // //资源资产 - // this.getResourceListList(); - // //合同信息 - // this.getContractionByPermanentList(); - // //资金情况 - // this.getFundAndBankAmountByDeptIdArray(); - //this.getThreeList(deptId); + this.$emit('getData',deptId); }, - getThreeList (deptId) { - - getThreeList({ deptId: deptId }).then(response => { - - }); - }, - closePopover () { + closePopover(){ this.showResourceDetail = false; + }, + openImage(url){ + this.fileUrl = url; + this.showImg = true; } } }; diff --git a/src/views/sanqing/main-gis/index.scss b/src/views/sanqing/main-gis/index.scss index 8c02b67..6ed1f43 100644 --- a/src/views/sanqing/main-gis/index.scss +++ b/src/views/sanqing/main-gis/index.scss @@ -54,8 +54,7 @@ top: 40px; z-index: 302; - box-shadow: inset 0 0 10px 2px rgba(27, 123, 204, 0.8); - /* 添加内发光效果 */ + box-shadow: inset 0 0 10px 2px rgba(27, 123, 204, 0.8); /* 添加内发光效果 */ //
//
@@ -244,25 +243,23 @@ } -.imgBox { +.imgBox{ position: absolute; left: 0; top: 0; z-index: 999999; width: 100vw; height: 100%; - - .box_bg { - background-color: rgba(0, 0, 0, 0.5); + .box_bg{ + background-color: rgba(0,0,0,0.5); width: 100%; height: 100%; } - - img { + img{ height: 60vh; position: absolute; top: 50%; left: 50%; - transform: translate(-50%, -50%); + transform: translate(-50%,-50%); } -} \ No newline at end of file +}