diff --git a/src/api/asset/permanent.js b/src/api/asset/permanent.js index 19a2d1e..87a51c3 100644 --- a/src/api/asset/permanent.js +++ b/src/api/asset/permanent.js @@ -187,7 +187,13 @@ export function getPermanentListByDeptId (deptId) { method: 'get', }) } - +export function getPermanentListNew (query) { + return request({ + url: '/api/asset/permanent/list', + method: 'get', + params: query + }) +} // 从凭证生成 export function genFromVoucher (data) { return request({ diff --git a/src/api/asset/resource.js b/src/api/asset/resource.js index 5ee1645..6401ab6 100644 --- a/src/api/asset/resource.js +++ b/src/api/asset/resource.js @@ -101,6 +101,15 @@ export function getResourceListByDeptId (deptId) { }) } +// 根据deptId查询资源列表 +export function getResourceListNew (query) { + return request({ + url: '/api/asset/resource/list', + method: 'get', + params: query + }) +} + // 清空空间字段 export function clearTheGeom (id) { return request({ diff --git a/src/components/pannel/index.html b/src/components/pannel/index.html index 53a8d85..a2a57f8 100644 --- a/src/components/pannel/index.html +++ b/src/components/pannel/index.html @@ -7,8 +7,9 @@
-

{{title}}

+

{{title}}

+
diff --git a/src/views/property/main-gis/asset-details/index.html b/src/views/property/main-gis/asset-details/index.html index 21a2c62..10ac3b6 100644 --- a/src/views/property/main-gis/asset-details/index.html +++ b/src/views/property/main-gis/asset-details/index.html @@ -56,13 +56,12 @@

附件

- - - - - - +

diff --git a/src/views/property/main-gis/asset-details/index.js b/src/views/property/main-gis/asset-details/index.js index 9ac9e2b..f390d0b 100644 --- a/src/views/property/main-gis/asset-details/index.js +++ b/src/views/property/main-gis/asset-details/index.js @@ -22,6 +22,11 @@ export default { mounted () { }, methods: { + openImage (url) { + this.$emit('openImage',url) + // this.dialogImageUrl = url; + // this.dialogVisible = true; + }, close () { this.$emit('close') } diff --git a/src/views/property/main-gis/index.html b/src/views/property/main-gis/index.html index d7db27e..8b5ab33 100644 --- a/src/views/property/main-gis/index.html +++ b/src/views/property/main-gis/index.html @@ -8,7 +8,7 @@
- +
- \ No newline at end of file +
+
+ +
+ + diff --git a/src/views/property/main-gis/index.js b/src/views/property/main-gis/index.js index 9e061f5..e16592a 100644 --- a/src/views/property/main-gis/index.js +++ b/src/views/property/main-gis/index.js @@ -3,7 +3,7 @@ import GisUtils from '@/utils/gis.js'; import { treeselect, getDept, listDeptExcludeChild } from "@/api/system/dept"; import { getInfo } from "@/api/login"; import { getConfigKey } from "@/api/system/config"; -import { getPermanentListByDeptId, listPermanent } from "@/api/asset/permanent.js"; +import { getPermanentListByDeptId, listPermanent, getPermanentListNew } from "@/api/asset/permanent.js"; import { getResourceListByDeptId, listResource } from "@/api/asset/resource.js"; let gis = null; @@ -249,27 +249,27 @@ 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]; - resp.data.map(resm => { - if (res.user.parentDeptName == resm.deptName) { - deptOptions.unshift(resm.deptId) - deptOptions.unshift(resm.parentId) - } - }) - this.addrText = [100,...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; + // listDeptExcludeChild(res.user.loginDeptId).then((resp) => { + // let deptOptions = [res.user.loginDeptId]; + // resp.data.map(resm => { + // if (res.user.parentDeptName == resm.deptName) { + // deptOptions.unshift(resm.deptId) + // deptOptions.unshift(resm.parentId) + // } + // }) + // this.addrText = [100,...deptOptions]; + // }); + this.queryParams.deptId = res.user.deptId; + this.tempWorkerOpenQueryParams.deptId = res.user.deptId; + this.majorEventOpenQueryParams.deptId = res.user.deptId; + this.subsidyFundsQueryParams.deptId = res.user.deptId; + this.permanentQueryParams.deptId = res.user.deptId; + this.resourceListQueryParams.deptId = res.user.deptId; + this.contractionByPermanentQueryParams.deptId = res.user.deptId; //列表请求 this.getAllList(); // 加载地图 - this.initMap(res.user.loginDeptId); + this.initMap(res.user.deptId); // 获取村边界的图层名称 this.getVillageBorderLayerName(); @@ -279,6 +279,7 @@ export default { }, methods: { openImage (url) { + console.log(url) this.dialogImageUrl = url; this.dialogVisible = true; }, @@ -409,7 +410,7 @@ export default { gis.getMapContainer().removeLayer(this.resourceLayer); this.resourceLayer = ''; // 获取资源列表 - this.getResourceList(deptId); + // this.getResourceList(deptId); let node = this.$refs["cascader"].panel.getNodeByValue(value); this.drawMap(node, isLocated); const dept = node.data; @@ -441,9 +442,9 @@ export default { }, // 获取资产列表 getPermanentList (deptId) { - getPermanentListByDeptId(deptId).then(response => { - if (response.data && response.data.length > 0) { - this.addPermanentLayer(response.data); + getPermanentListNew({deptId: deptId}).then(response => { + if (response.rows && response.rows.length > 0) { + this.addPermanentLayer(response.rows); } }); }, diff --git a/src/views/property/main-gis/index.scss b/src/views/property/main-gis/index.scss index a16efb9..6d2e92e 100644 --- a/src/views/property/main-gis/index.scss +++ b/src/views/property/main-gis/index.scss @@ -67,7 +67,26 @@ } } } - +.imgBox{ + position: absolute; + left: 0; + top: 0; + z-index: 999999; + width: 100vw; + height: 100%; + .box_bg{ + background-color: rgba(0,0,0,0.5); + width: 100%; + height: 100%; + } + img{ + height: 60vh; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%,-50%); + } +} //选择地址 .a .select_address { height: 30px; diff --git a/src/views/resources/main-gis/index.js b/src/views/resources/main-gis/index.js index 08ae111..48d102a 100644 --- a/src/views/resources/main-gis/index.js +++ b/src/views/resources/main-gis/index.js @@ -5,7 +5,7 @@ import { } from 'ol/proj' import { getPermanentListByDeptId, listPermanent } from "@/api/asset/permanent.js"; import { getInfo } from "@/api/login"; -import { getResourceListByDeptId, listResource } from "@/api/asset/resource.js"; +import { getResourceListByDeptId, listResource, getResourceListNew } from "@/api/asset/resource.js"; import Legend from '@/components/legend/index.vue'; import { attachmentList } from "@/api/common/uploadAttachment.js"; import { treeselect, getDept, listDeptExcludeChild } from "@/api/system/dept"; @@ -238,28 +238,27 @@ export default { getInfo().then(res => { 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]; - resp.data.map(resm => { - if (res.user.parentDeptName == resm.deptName) { - deptOptions.unshift(resm.deptId) - deptOptions.unshift(resm.parentId) - } - }) - this.addrText = [100,...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; + // listDeptExcludeChild(res.user.deptId).then((resp) => { + // let deptOptions = [res.user.deptId]; + // resp.data.map(resm => { + // if (res.user.parentDeptName == resm.deptName) { + // deptOptions.unshift(resm.deptId) + // deptOptions.unshift(resm.parentId) + // } + // }) + // this.addrText = [100,...deptOptions]; + // }); + this.queryParams.deptId = res.user.deptId; + this.tempWorkerOpenQueryParams.deptId = res.user.deptId; + this.majorEventOpenQueryParams.deptId = res.user.deptId; + this.subsidyFundsQueryParams.deptId = res.user.deptId; + this.permanentQueryParams.deptId = res.user.deptId; + this.resourceListQueryParams.deptId = res.user.deptId; + this.contractionByPermanentQueryParams.deptId = res.user.deptId; //列表请求 this.getAllList(); // 加载地图 - this.initMap(res.user.loginDeptId); + this.initMap(res.user.deptId); // 获取村边界的图层名称 this.getVillageBorderLayerName(); @@ -349,7 +348,7 @@ export default { gis.getMapContainer().removeLayer(this.permanentLayer); this.permanentLayer = ''; // 获取资产列表 - this.getPermanentList(deptId); + // this.getPermanentList(deptId); gis.getMapContainer().removeLayer(this.resourceLayer); this.resourceLayer = ''; // 获取资源列表 @@ -515,9 +514,9 @@ export default { }, // 获取资源列表 getResourceList (deptId) { - getResourceListByDeptId(deptId).then(response => { - if (response.data && response.data.length > 0) { - this.addResourceLayer(response.data); + getResourceListNew({deptId:deptId}).then(response => { + if (response.rows && response.rows.length > 0) { + this.addResourceLayer(response.rows); } }); }, @@ -528,8 +527,11 @@ export default { if (item.theGeom != null && item.theGeom !== '') { const { useType } = item let color = this.LegendData[useType - 1 + ''] - let fs = gis.getFeature3(item, color.iconStyle.background, color.iconStyle.borderColor) - features.push(fs); + console.log(color) + if (color){ + let fs = gis.getFeature3(item, color.iconStyle.background, color.iconStyle.borderColor) + features.push(fs); + } } }); gis.getVectorLayerByFs(features)