From 5fdf2847acbd899888ec36c5e1ec7ed64c35d378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com> Date: Thu, 10 Jul 2025 17:32:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 8 +++ src/main.js | 3 + src/utils/common.js | 15 ++++- src/views/sanqing/index.html | 1 - src/views/sanqing/main-gis/index.html | 3 +- src/views/sanqing/main-gis/index.js | 83 +++++++++++++++++++++++---- src/views/sanqing/popover/index.html | 69 +++++++++++++--------- src/views/sanqing/popover/index.js | 15 ++++- src/views/sanqing/popover/index.scss | 20 +++++++ 9 files changed, 173 insertions(+), 44 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index fbea89b..1d992f7 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -7,3 +7,11 @@ export function getStatistic (query) { params: query }) } + +export function getThreeList (query) { + return request({ + url: '/api/asset/three/listNoParams', + method: 'get', + params: query + }) +} diff --git a/src/main.js b/src/main.js index e5ab2e8..cf6a776 100644 --- a/src/main.js +++ b/src/main.js @@ -13,6 +13,7 @@ import message from '@/utils/message.js'; // import '@/permission'; // permission control import VScaleScreen from 'v-scale-screen'; import { getDicts } from "@/api/system/dict/data"; +import { selectDictLabel } from "@/utils/common"; // 过滤器 Object.keys(filters).forEach(key => { Vue.filter(key, filters[key]); @@ -37,6 +38,8 @@ Vue.use(ElementUI); // Vue.use(Dropdown); Vue.use(VScaleScreen); +Vue.prototype.selectDictLabel = selectDictLabel + // 全局方法挂载 Vue.prototype.getDicts = getDicts new Vue({ diff --git a/src/utils/common.js b/src/utils/common.js index c7b1834..926eae5 100644 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -11,7 +11,7 @@ export function startAnim (ev) { /** * 生成uuid - * @returns + * @returns */ export function generateUUID () { var d = new Date().getTime(); //Timestamp @@ -140,3 +140,16 @@ export function getDay (_date, fmt) { } return fmt; } + +// 回显数据字典 +export function selectDictLabel(datas, value) { + + var actions = []; + Object.keys(datas).some((key) => { + if (datas[key].dictValue == ('' + value)) { + actions.push(datas[key].dictLabel); + return true; + } + }) + return actions.join(''); +} diff --git a/src/views/sanqing/index.html b/src/views/sanqing/index.html index db8b5e5..2c4317f 100644 --- a/src/views/sanqing/index.html +++ b/src/views/sanqing/index.html @@ -11,7 +11,6 @@
- diff --git a/src/views/sanqing/main-gis/index.html b/src/views/sanqing/main-gis/index.html index 0ded639..1f44ff8 100644 --- a/src/views/sanqing/main-gis/index.html +++ b/src/views/sanqing/main-gis/index.html @@ -7,7 +7,7 @@ -
+
{{resourceDetail.name}}详情
@@ -84,6 +84,7 @@
+
diff --git a/src/views/sanqing/main-gis/index.js b/src/views/sanqing/main-gis/index.js index a839162..b34b02f 100644 --- a/src/views/sanqing/main-gis/index.js +++ b/src/views/sanqing/main-gis/index.js @@ -11,10 +11,14 @@ 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 Popover from '../popover/index.vue'; let gis = null; export default { components: { - Legend + Legend, + Popover }, data () { return { @@ -178,6 +182,7 @@ export default { checkStrictly: true, }, addrOptions: [], + resourceDetail: {}, //资产信息详情弹窗 showResourceDetail: false, mapGeoServerUrl: "", // geoserver地址 @@ -221,11 +226,35 @@ export default { name: '其他' } ], + threeAssetTypeOptions: [], + threeJtzyzcTypeOptions: [], + threeNysssbTypeOptions: [], + threeNhTypeOptions: [], + natureOwnershipTypeOptions: [], + sysYesNoOptions: [], }; }, computed: { }, created () { + this.getDicts("three_asset_type").then((response) => { + this.threeAssetTypeOptions = response.data; + }); + this.getDicts("three_jtzyzc_type").then((response) => { + this.threeJtzyzcTypeOptions = response.data; + }); + this.getDicts("three_nysssb_type").then((response) => { + this.threeNysssbTypeOptions = response.data; + }); + this.getDicts("three_nh_type").then((response) => { + this.threeNhTypeOptions = response.data; + }); + this.getDicts("nature_ownership").then((response) => { + this.natureOwnershipTypeOptions = response.data; + }); + this.getDicts("sys_yes_no").then((response) => { + this.sysYesNoOptions = response.data; + }); this.getGeoServerUrl(); }, mounted () { @@ -251,14 +280,13 @@ export default { this.resourceListQueryParams.deptId = res.user.loginDeptId; this.contractionByPermanentQueryParams.deptId = res.user.loginDeptId; //列表请求 - this.getAllList(); + this.getAllList(res.user.deptId); // 加载地图 this.initMap(res.user.loginDeptId); // 获取村边界的图层名称 this.getVillageBorderLayerName(); }); - }) // treeselect().then((resp) => { // this.addrOptions = resp.data @@ -435,6 +463,22 @@ 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 == '2' ? + 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); + feature.values_.detail.sfwtdg = this.selectDictLabel(this.sysYesNoOptions, feature.values_.detail.sfwtdg); + feature.values_.detail.sfnzcsy = this.selectDictLabel(this.sysYesNoOptions, feature.values_.detail.sfnzcsy); + this.listDialogHidden('detail'); this.openResourceDialog(feature.values_.detail); } @@ -500,9 +544,10 @@ export default { }, openResourceDialog (data) { data.fileList = []; + console.log(data) let parmasData = { tableId: data.id, - tableName: 't_asset_resource', + tableName: 't_asset_three', bizPath: 'asset', }; attachmentList(parmasData).then((res) => { @@ -554,19 +599,25 @@ export default { }, // 获取资源列表 getResourceList (deptId) { - getResourceListByDeptId(deptId).then(response => { - if (response.data && response.data.length > 0) { - this.addResourceLayer(response.data); + getThreeList({ deptId: deptId }).then(response => { + if (response.rows && response.rows.length > 0) { + this.addResourceLayer(response.rows); } }); + // getResourceListByDeptId(deptId).then(response => { + // if (response.data && response.data.length > 0) { + // this.addResourceLayer(response.data); + // } + // }); }, // 添加资源图层 addResourceLayer (resourceList) { let features = []; resourceList.forEach(item => { if (item.theGeom != null && item.theGeom !== '') { - const { useType } = item - let color = this.LegendData[useType - 1 + ''] + const { 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); } @@ -576,13 +627,13 @@ export default { }, // 获取资产列表 getPermanentList (deptId) { - getPermanentListByDeptId(deptId).then(response => { + getThreeList({ deptId: deptId }).then(response => { if (response.data && response.data.length > 0) { this.addPermanentLayer(response.data); } }); }, - getAllList () { + getAllList (deptId) { //三务公开 // this.getList(null); // //零工公开 @@ -599,6 +650,16 @@ export default { // this.getContractionByPermanentList(); // //资金情况 // this.getFundAndBankAmountByDeptIdArray(); + //this.getThreeList(deptId); + }, + getThreeList(deptId){ + + getThreeList({ deptId: deptId }).then(response => { + + }); }, + closePopover(){ + this.showResourceDetail = false; + } } }; diff --git a/src/views/sanqing/popover/index.html b/src/views/sanqing/popover/index.html index b5588c1..f81ac0b 100644 --- a/src/views/sanqing/popover/index.html +++ b/src/views/sanqing/popover/index.html @@ -1,79 +1,94 @@
-

B镇详情×

+

B镇详情×

资产编码

-

11111111

+

{{data.zcdm}}

资产名称

-

11111111

+

{{data.zcmc}}

三清类型

-

11111111

+

{{data.threeAssetType}}

资产类型

-

11111111

+

{{data.threeDetailType}}

-

用地面积

-

11111111

+

用地面积(亩)

+

{{data.ydmj}}

建筑面积(㎡)

-

11111111

+

{{data.jzmj}}

所在组

-

11111111

+

{{data.szz}}

权属性质

-

11111111

+

{{data.natureOwnership}}

权属是否存在争议

-

11111111

+

{{data.qssfczzy}}

权属主体

-

11111111

+

{{data.qszt}}

是否委托代管

-

11111111

+

{{data.sfwtdg}}

联系电话

-

11111111

+

{{data.lxdh}}

23年盘活方式

-

11111111

+

{{data.phfs23}}

23年效益(万元)

-

11111111

+

{{data.xy23}}

24年盘活方式

-

11111111

+

{{data.phfs24}}

24年效益(万元)

-

11111111

+

{{data.xy24}}

盘活情况

-

11111111

+

{{data.phqk}}

资产闲置原因

-

11111111

+

{{data.xzyy}}

是否能正常使用

-

11111111

+

{{data.sfnzcsy}}

完善后使用

-

11111111

+

{{data.wshsy}}

不能使用

-

11111111

+

{{data.bnsy}}

盘活措施

-

11111111

+

{{data.phcs}}

盘活时限

-

11111111

+

{{data.phsx}}

资产统计年度

-

11111111

+

{{data.zctjnd}}

备注

-

11111111

+

{{data.bz}}

+
+
+

附件

+

+ + + + + + +

+
+
+
+
diff --git a/src/views/sanqing/popover/index.js b/src/views/sanqing/popover/index.js index 1d731dd..a425c1a 100644 --- a/src/views/sanqing/popover/index.js +++ b/src/views/sanqing/popover/index.js @@ -1,15 +1,17 @@ export default { props: { data: { - type: Array, + type: Object, default: function () { - return [] + return {} } } }, data () { return { - + fileList: [], + fileUrl:'', + showImg:false, }; }, created () { @@ -17,5 +19,12 @@ export default { mounted () { }, methods: { + closePopover(){ + this.$emit('closePopover'); + }, + openImage(url){ + this.fileUrl = url; + this.showImg = true; + } } }; diff --git a/src/views/sanqing/popover/index.scss b/src/views/sanqing/popover/index.scss index d485f40..30a870c 100644 --- a/src/views/sanqing/popover/index.scss +++ b/src/views/sanqing/popover/index.scss @@ -26,6 +26,7 @@ span{ margin-left: auto; font-size: 24px; + cursor: pointer; } } div{ @@ -43,3 +44,22 @@ } } } + +.imgBox{ + position: fixed; + z-index: 999999; + width: 100vw; + height: 100vh; + .box_bg{ + background-color: rgba(0,0,0,0.5); + width: 100%; + height: 100vh; + } + img{ + height: 60vh; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%,-50%); + } +}