Sfoglia il codice sorgente

乳山信息港

RongCheng
庞东旭 1 anno fa
parent
commit
0ee59853f7
5 ha cambiato i file con 339 aggiunte e 21 eliminazioni
  1. +15
    -20
      infoport/resourceNew.html
  2. +163
    -0
      infoport/resourceNewDetail.html
  3. +5
    -0
      infoport/static/js/api/index.js
  4. +1
    -1
      infoport/static/js/project/resourceNew.js
  5. +155
    -0
      infoport/static/js/project/resourceNewDetail.js

+ 15
- 20
infoport/resourceNew.html Vedi File

@@ -137,7 +137,7 @@
<div class="dialog_header"> <div class="dialog_header">
<p><img src="static/images/dialog_icon_1.png" alt=""></p> <p><img src="static/images/dialog_icon_1.png" alt=""></p>
<p class="name">基本信息</p> <p class="name">基本信息</p>
<p class="bigWin" onclick="window.location='resourceDetail.html?id='+{{propertyDetail.id}}"><img src="static/images/dialog_icon_2.png" alt=""></p>
<p class="bigWin" onclick="window.location='resourceNewDetail.html?id='+{{propertyDetail.id}}"><img src="static/images/dialog_icon_2.png" alt=""></p>
<p class="phoneIcon"><img src="static/images/dialog_icon_3.png" alt=""></p> <p class="phoneIcon"><img src="static/images/dialog_icon_3.png" alt=""></p>
<i class="sanjiao-left"></i> <i class="sanjiao-left"></i>
<p class="phone">{{phone}} {{leader}}</p> <p class="phone">{{phone}} {{leader}}</p>
@@ -152,31 +152,26 @@
<td>{{propertyDetail.townName}}</td> <td>{{propertyDetail.townName}}</td>
<td>村</td> <td>村</td>
<td>{{propertyDetail.deptName}}</td> <td>{{propertyDetail.deptName}}</td>
<td>地块代码</td>
<td>{{propertyDetail.dkbm}}</td>
</tr>

<tr>
<td>地块类别</td>
<td>{{propertyDetail.dklb}}</td>
<td>土地利用类型</td>
<td>{{propertyDetail.tdlylx}}</td>
<td>地力等级</td>
<td>{{propertyDetail.dldj}}</td>
<td>资源编码</td>
<td>{{propertyDetail.code}}</td>
</tr> </tr>


<tr> <tr>
<td>土地用途</td>
<td>{{propertyDetail.tdyt}}</td>
<td>是否基本农田</td>
<td>{{propertyDetail.sfjbnt}}</td>
<td>实测面积</td>
<td>{{propertyDetail.scmjm}}(亩)</td>
<td>资源名称</td>
<td>{{propertyDetail.name}}</td>
<td>资源分类</td>
<td>{{propertyDetail.resourceType}}</td>
<td>资源类型</td>
<td>{{propertyDetail.resourceSort}}</td>
</tr> </tr>


<tr> <tr>
<td>流转状态</td>
<td>{{propertyDetail.dkzt}}</td>
<td>面积/亩</td>
<td>{{propertyDetail.totalArea}}</td>
<td>使用情况</td>
<td>{{propertyDetail.status}}</td>
<td></td>
<td></td>
</tr> </tr>


</table> </table>


+ 163
- 0
infoport/resourceNewDetail.html Vedi File

@@ -0,0 +1,163 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="zh-CN" xml:lang="zh-CN">

<head>
<meta charset="utf-8">
<title>农村资源信息港</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="" />
<meta name="description" cxontent="" />
<link href="static/css/main.css" rel="stylesheet" type="text/css" />
<link href="static/css/index.css" rel="stylesheet" type="text/css" />
<link href="static/css/homesteadDetail.css" rel="stylesheet" type="text/css" />
<link href="../static/css/ol/ol.css" rel="stylesheet" type="text/css" />
<script src="../static/js/common/ol.js"></script>
</head>

<body>
<div class="main" id="page">

<div class="header flex_dom flex_item_between flex_item_mid">
<p id="titContent">
<script id="titData" type="text/html">
{{webList.top.contentValue}}
</script>
</p>
<div class="wid25 flex_dom flex_item_between flex_item_mid">
<div class="header_nav">
<a href="index.html">
<div>
<i class="i1"></i>
</div>
<p>新闻资讯</p>
</a>
</div>
<div class="header_nav">
<a href="property.html">
<div>
<i class="i2"></i>
</div>
<p>资产信息</p>
</a>
</div>
<div class="header_nav active">
<a href="resourceNew.html">
<div>
<i class="i3"></i>
<img src="static/images/nav_bg.png" class="i_bg xuanzhuan" alt="">
</div>
<p>资源信息</p>
</a>
</div>
<div class="header_nav">
<a href="homestead.html">
<div>
<i class="i4"></i>
</div>
<p>宅基地信息</p>
</a>
</div>
</div>
</div>

<div class="homeDetail" id="propertyDetailContent">
<script id="propertyDetailData" type="text/html">
<div class="detail_header">
<p class="detail_tit">详细信息</p>
<p class="bigWin" onclick="history.back()"><img src="static/images/back.png" alt=""></p>
<p class="phoneIcon"><img src="static/images/dialog_icon_3.png" alt=""></p>
<i class="sanjiao-left"></i>
<p class="phone">{{phone}} {{leader}}</p>
</div>

<div class="dialog_table">

<div class="dialog_table_left" style="width: 100%;">
<div class="dialog_header">
<p><img src="static/images/dialog_icon_1.png" alt=""></p>
<p class="name">基本信息</p>
</div>

<div class="dialog_main">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>镇</td>
<td>{{propertyDetail.townName}}</td>
<td>村</td>
<td>{{propertyDetail.deptName}}</td>
<td>资源编码</td>
<td>{{propertyDetail.code}}</td>
<td>资源名称</td>
<td>{{propertyDetail.name}}</td>
<td>资源分类</td>
<td>{{propertyDetail.resourceType}}</td>
</tr>

<tr>
<td>资源类型</td>
<td>{{propertyDetail.resourceSort}}</td>
<td>面积/亩</td>
<td>{{propertyDetail.totalArea}}</td>
<td>使用情况</td>
<td>{{propertyDetail.status}}</td>
</tr>

</table>
</div>

</div>

</div>
<div style="
width: calc(100% - 4vh);
margin: 0 auto;
overflow: hidden;
"
>
<div class="dialog_header">
<p><img src="static/images/map_icon.png" alt=""></p>
<p class="name">地图</p>
</div>
<div id="container"></div>
</div>
</script>
</div>

<div class="footer" id="webContent">

<script id="webData" type="text/html">
<div class="footer_link">
<p class="footer_link_tit">友情链接</p>
{{each webList.botoom1 as value i}}
<a class="hotFile" target="_blank" href="{{value.contentUrl}}">{{value.contentValue}}</a>
{{/each}}
</div>

<div class="footer_link_filings">
{{each webList.botoom2 as value i}}
<div class="footer_link_filings_left">
<p style="background-image: url('static/images/{{value.contentIcon}}')">{{value.contentTitle}}</p>
<a href="#">{{value.contentValue}}</a>
</div>
{{/each}}
</div>

<div class="footer_link_company">
{{each webList.botoom3 as value i}}
<div>
<p>{{value.contentTitle}}</p>
<a target="{{value.contentUrl ? '_blank' : '_self' }}" href="{{value.contentUrl ? value.contentUrl : 'javascript:void(0)' }}">{{value.contentValue}}</a>
</div>
{{/each}}
</div>
</script>

</div>


</div>
</body>
<script src="./static/js/common/require.js" data-main="./static/js/common/main.js?t=101" id="require-page" target-module="./static/js/project/resourceNewDetail.js" defer type="text/javascript"></script>
</html>

+ 5
- 0
infoport/static/js/api/index.js Vedi File

@@ -74,6 +74,11 @@ var assetresourceList = '/open/assetresource/list' //查询资源列表
*/ */
var resourceGet = '/open/resource/get/' //查询资源详情 var resourceGet = '/open/resource/get/' //查询资源详情


/*
@purl /open/resource/list
*/
var assetresourceGet = '/open/assetresource/get/' //查询资源详情

/* /*
@purl /open/house/zjdzdxx/list @purl /open/house/zjdzdxx/list
*/ */


+ 1
- 1
infoport/static/js/project/resourceNew.js Vedi File

@@ -130,7 +130,7 @@ define(['jquery', "template", "Tools", "paging", 'dateTime', 'swiper'], function
} }


openDialog = function(id){ openDialog = function(id){
tools.doGet(resourceGet+id, {translate_dict: 1}, module.assetDetail , true);
tools.doGet(assetresourceGet+id, {translate_dict: 1}, module.assetDetail , true);
} }


closeDialog = function(id){ closeDialog = function(id){


+ 155
- 0
infoport/static/js/project/resourceNewDetail.js Vedi File

@@ -0,0 +1,155 @@
/**
* Created by Administrator on 2021/4/5.
*/
define(['jquery', "template", "Tools", "paging", 'dateTime', 'swiper'], function ($, template, Tools) {
//数据存储
var module = {
data: {
propertyList:'',
map: '', // 地图图层
},
};
var tools = new Tools();

module.init = function (page) {
tools.doGet(assetresourceGet+getQueryVariable('id'), {translate_dict: 1}, module.assetDetail , true);
tools.doGet(webList, {}, module.webList , true);
// var map = new BMapGL.Map('container'); // 创建Map实例
// map.centerAndZoom(new BMapGL.Point(116.320938,39.950026), 18); // 初始化地图,设置中心点坐标和地图级别
// map.enableScrollWheelZoom(false); // 开启鼠标滚轮缩放
};

module.useContent = function (data) {
if (data.code == 200) {
module.data.phone = data.data.phone;
module.data.leader = data.data.leader;
var propertyDetailData = template('propertyDetailData', module.data);
$("#propertyDetailContent").html(propertyDetailData);
setTimeout(() => {
initMap(data.data);
}, 500);
}
}

initMap = function (dept) {
document.getElementById("container").innerHTML = "";
// 定义地图投影
let projection = new ol.proj.Projection({
code: "EPSG:3857",
units: "degrees",
});
// 定义地图图层
let aerial = new ol.layer.Tile({
source: new ol.source.XYZ({
url: "http://t{0-7}.tianditu.com/img_w/wmts?" +
"SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles" +
"&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=cc4aba6e967096098249efa069733067",
}),
isGroup: true,
name: "卫星影像图",
});
let yingxzi = new ol.layer.Tile({
source: new ol.source.XYZ({
url: "http://t{0-7}.tianditu.com/DataServer?T=cia_w&x={x}&y={y}&l={z}&tk=cc4aba6e967096098249efa069733067",
}),
isGroup: true,
name: "天地图文字标注--卫星影像图",
});
//加载地图
module.data.map = new ol.Map({
controls: ol.control.defaults({attribution: false, zoom: false, rotate: false}).extend([]),
layers: [aerial, yingxzi],
projection: projection,
target: "container",
view: new ol.View({
center: ol.proj.fromLonLat([dept.lng, dept.lat]), // 地图中心坐标
zoom: 16,
minZoom: 1, //地图缩小限制
maxZoom: 18, //地图放大限制
}),
/*interactions: ol.interaction.defaults({
doubleClickZoom: false, // 双击放大地图
// mouseWheelZoom: false, // 鼠标滚轮放大地图
// shiftDragZoom: false, // shift + 鼠标左键拖拽 放大地图
})*/
});

if (module.data.propertyDetail && module.data.propertyDetail.theGeomJson) {
const resourceDetail = new ol.layer.Vector({
source: new ol.source.Vector({
features: new ol.format.GeoJSON().readFeatures(module.data.propertyDetail.theGeomJson),
}),
name: 'resourceDetail',
style: new ol.style.Style({
fill: new ol.style.Fill({
//矢量图层填充颜色,以及透明度
color: "rgba(255, 255, 0, 0.3)",
}),
stroke: new ol.style.Stroke({
//边界样式
color: "#ffff00",
width: 2,
}),
})
});
module.data.map.addLayer(resourceDetail);
module.data.map.getView().setCenter(ol.extent.getCenter(resourceDetail.getSource().getExtent()));
}
}

module.webList = function (data) {
if (data.code == 200) {
var content = data.data;
module.data.webList = content;
var webData = template('webData', module.data);
$("#webContent").html(webData);
var titData = template('titData', module.data);
$("#titContent").html(titData);
}
}

module.assetDetail = function(data){
if (data.code == 200) {
var content = data.data;
module.data.propertyDetail = content;
tools.doGet(attachmentList, {
tableId:content.id,
tableName: 't_asset_resource',
bizPath: 'asset'
}, module.attachmentDetail , true);
tools.doGet(treeselectSecond+content.deptId, {}, module.useContent , true);
// var propertyDetailData = template('propertyDetailData', module.data);
// $("#propertyDetailContent").html(propertyDetailData);
// $('#dialog').css('display','block');
}
}

module.attachmentDetail = function(data){
if (data.code == 200) {
var content = data.rows;
var attachmentList = [];
content.map(res=>{
if (res.fileName.indexOf('png')>-1||res.fileName.indexOf('jpg')>-1){
attachmentList.push(res);
}
})
module.data.attachment = attachmentList;
var propertyDetailData = template('propertyDetailData', module.data);
$("#propertyDetailContent").html(propertyDetailData);
$('#dialog').css('display','block');
}
}

//获取地址栏参数
function getQueryVariable(variable){
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if(pair[0] == variable){return pair[1];}
}
return(false);
}

return module;
});

Caricamento…
Annulla
Salva