| @@ -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({ | |||
| @@ -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({ | |||
| @@ -7,8 +7,9 @@ | |||
| <div class="header row align_item_center"> | |||
| <div v-if="title" class="title_bk row align_item_center"> | |||
| <i class="icon"></i> | |||
| <p @click="titleClick">{{title}}</p> | |||
| <p @click="titleClick" style="cursor:pointer">{{title}}</p> | |||
| </div> | |||
| <!-- style="cursor: pointer" :style="'cursor':titleClick?"--> | |||
| <div class="more"> | |||
| <slot name="header"></slot> | |||
| <div v-show="flexIble" class="flexIble hover_pointer" :class="[isOpen ? 'flexIble_open' : '']" @click="open"></div> | |||
| @@ -56,13 +56,12 @@ | |||
| <div> | |||
| <p>附件</p> | |||
| <p> | |||
| <block v-for="(item,index) in permanentDetail.fileList"> | |||
| <a :href="item.urlApi" v-if="item.type != 'image'"> | |||
| <img :src="item.url" style="width: 3vw;height: 3vw;margin-right: 0.5vw;" alt=""> | |||
| </a> | |||
| <img v-else :src="item.url" style="width: 3vw;height: 3vw;margin-right: 0.3vw;" alt="" | |||
| @click="openImage(item.url)"> | |||
| </block> | |||
| <template v-for="(item,index) in permanentDetail.attachments"> | |||
| <!-- <a :href="item.urlApi" v-if="item.type != 'image'">--> | |||
| <!-- <img :src="item.url" style="width: 3vw;height: 3vw;margin-right: 0.5vw;" alt="">--> | |||
| <!-- </a> v-else--> | |||
| <img :src="'/api' + item.thumUrl" style="width: 3vw;height: 3vw;margin-right: 0.3vw;" alt="" @click="openImage(item.fileUrl)"> | |||
| </template> | |||
| </p> | |||
| </div> | |||
| </div> | |||
| @@ -22,6 +22,11 @@ export default { | |||
| mounted () { | |||
| }, | |||
| methods: { | |||
| openImage (url) { | |||
| this.$emit('openImage',url) | |||
| // this.dialogImageUrl = url; | |||
| // this.dialogVisible = true; | |||
| }, | |||
| close () { | |||
| this.$emit('close') | |||
| } | |||
| @@ -8,7 +8,7 @@ | |||
| </div> | |||
| </Legend> | |||
| <div class="mask" style="position: absolute; width: 100%; height: 100%;pointer-events: none;"></div> | |||
| <AssetDetails @close="listDialogHidden('detail')" v-if="showPermanentDetail.show" :data="showPermanentDetail.id"></AssetDetails> | |||
| <AssetDetails @close="listDialogHidden('detail')" @openImage="openImage" v-if="showPermanentDetail.show" :data="showPermanentDetail.id"></AssetDetails> | |||
| <!--选择地址--> | |||
| <div class="select_address"> | |||
| <el-cascader :options="addrOptions" v-model="addrText" :props="deptTreeProps" popper-class="header-cascader-drop" | |||
| @@ -20,4 +20,9 @@ | |||
| </el-cascader> | |||
| </div> | |||
| </div> | |||
| <div class="imgBox" v-if="dialogVisible"> | |||
| <div class="box_bg" @click="dialogVisible = false"></div> | |||
| <img :src="'/api' + dialogImageUrl" alt=""> | |||
| </div> | |||
| </div> | |||
| @@ -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); | |||
| } | |||
| }); | |||
| }, | |||
| @@ -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; | |||
| @@ -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) | |||