庞东旭 11 часов назад
Родитель
Сommit
3fc2d316b9
20 измененных файлов: 394 добавлений и 45 удалений
  1. +27
    -1
      infoport/discussions.html
  2. +2
    -0
      infoport/discussionsDetail.html
  3. +12
    -0
      infoport/discussionsDetail_02.html
  4. +1
    -1
      infoport/discussionsDetail_03_zy.html
  5. +1
    -1
      infoport/discussionsDetail_08.html
  6. +1
    -1
      infoport/discussionsDetail_10.html
  7. +107
    -0
      infoport/discussionsDetail_11.html
  8. Двоичные данные
      infoport/static/images/index_code_btn_11.png
  9. +4
    -0
      infoport/static/js/api/index.js
  10. +41
    -0
      infoport/static/js/project/discussions.js
  11. +16
    -6
      infoport/static/js/project/discussionsDetail.js
  12. +2
    -2
      infoport/static/js/project/discussionsDetail_01.js
  13. +33
    -11
      infoport/static/js/project/discussionsDetail_02.js
  14. +2
    -2
      infoport/static/js/project/discussionsDetail_03.js
  15. +3
    -3
      infoport/static/js/project/discussionsDetail_03_zy.js
  16. +9
    -9
      infoport/static/js/project/discussionsDetail_06.js
  17. +5
    -5
      infoport/static/js/project/discussionsDetail_07.js
  18. +1
    -1
      infoport/static/js/project/discussionsDetail_08.js
  19. +2
    -2
      infoport/static/js/project/discussionsDetail_10.js
  20. +125
    -0
      infoport/static/js/project/discussionsDetail_11.js

+ 27
- 1
infoport/discussions.html Просмотреть файл

@@ -115,7 +115,8 @@
<img src="./static/images/index_code_btn_7.png" alt="" onclick="changeList('7')">
<img src="./static/images/index_code_btn_8.png" alt="" onclick="changeList('8')">
<img src="./static/images/index_code_btn_9.png" alt="" onclick="changeList('9')">
<img src="./static/images/index_code_btn_10.png" alt="" onclick="changeList('10')">
<img src="./static/images/index_code_btn_11.png" alt="" onclick="changeList('11')">
<!-- <img src="./static/images/index_code_btn_10.png" alt="" onclick="changeList('10')">-->
</div>
</div>

@@ -366,6 +367,31 @@
</div>
</div>

<div class="new_list" id="new_list_11" style="display: none;">
<div class="new_list_tit">
<img src="static/images/list_icon_02.png" alt="" style="display: block;">
<p>专项公示</p>
<p id="nowDateNYR11" style="margin-left: auto;">2023.03.15</p>
</div>

<div id="review_box11" style="height: 44vh;overflow-y: scroll;margin-top: 2.5vh;">
<div class="new_list_ul" id="newListContent11">
<script id="newListData11" type="text/html">
{{each newList12 as value i}}
<div class="new_list_li">
<a href="discussionsDetail_11.html?id={{value.id}}">{{value.openName}}</a>
<p>{{value.specialPublicityType}}</p>
<p>有异议:{{value.differCount}}</p>
<p>无异议:{{value.agreeCount}}</p>
<p>{{value.openAt}}</p>
</div>
{{/each}}
</script>
</div>
<div class="new_list_ul" id="newListContent_ul_11"></div>
</div>
</div>

</div>

</div>


+ 2
- 0
infoport/discussionsDetail.html Просмотреть файл

@@ -29,6 +29,8 @@
</div>
<div class="new_content_content" id="jueyiAt"></div>
<div class="new_content_content" id="jueyiPic"></div>
<div class="new_content_content" id="shishiguochengAt"></div>
<div class="new_content_content" id="shishiguochengPic"></div>
<div class="new_content_content" id="shishiAt"></div>
<div class="new_content_content" id="shishiPic"></div>
<div class="new_content_content" id="remark"></div>


+ 12
- 0
infoport/discussionsDetail_02.html Просмотреть файл

@@ -40,6 +40,18 @@
<div class="new_content_content" id="buildingTime"></div>
<div class="new_content_content" id="startTime"></div>
<div class="new_content_content" id="endTime"></div>

<div id="attachmentListContent" style="margin-top: 2vh;">
<script id="attachmentListData" type="text/html">
{{each attachmentList as value i}}
<a href="/api{{value.fileUrl}}" target="downloadFile" style="display: flex;align-items:center;margin-top: 1vh;">
<img src="../static/images/file_icon.png" width="32" style="margin-right: 10px;" alt="">
{{value.fileName}}
</a>
{{/each}}
</script>
</div>

</div>
<div class="new_content_right">
<div class="new_content_right_tit">合同公开列表</div>


+ 1
- 1
infoport/discussionsDetail_03_zy.html Просмотреть файл

@@ -38,7 +38,7 @@
<div class="new_content_right_main" id="newListContent">
<script id="newListData" type="text/html">
{{each newList as value i}}
<p><a href="discussionsDetail_03.html?id={{value.id}}">{{value.openName}}</a></p>
<p><a href="discussionsDetail_03_zy.html?id={{value.id}}">{{value.openName}}</a></p>
{{/each}}
</script>
</div>


+ 1
- 1
infoport/discussionsDetail_08.html Просмотреть файл

@@ -37,7 +37,7 @@
<div class="new_content_right_main" id="newListContent">
<script id="newListData" type="text/html">
{{each newList as value i}}
<p><a href="discussionsDetail_03.html?id={{value.id}}">{{value.openName}}</a></p>
<p><a href="discussionsDetail_08.html?id={{value.id}}">{{value.openName}}</a></p>
{{/each}}
</script>
</div>


+ 1
- 1
infoport/discussionsDetail_10.html Просмотреть файл

@@ -38,7 +38,7 @@
<div class="new_content_right_main" id="newListContent">
<script id="newListData" type="text/html">
{{each newList as value i}}
<p><a href="discussionsDetail_03.html?id={{value.id}}">{{value.otherName}}</a></p>
<p><a href="discussionsDetail_10.html?id={{value.id}}">{{value.otherName}}</a></p>
{{/each}}
</script>
</div>


+ 107
- 0
infoport/discussionsDetail_11.html Просмотреть файл

@@ -0,0 +1,107 @@
<!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/newDetail.css" rel="stylesheet" type="text/css" />
</head>

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

<div class="new_content">
<div class="new_content_left">
<div class="new_content_left_tit">
<a href="discussions.html"><i></i></a>
<p id="openName"></p>
</div>
<div class="new_content_left_come">
<p id="creatBy"></p>
<p id="creatTime"></p>
</div>
<div class="new_content_content" id="openNy"></div>
<div class="new_content_content" id="openPic"></div>
<div class="new_content_content" id="specialPublicityType"></div>
<div class="new_content_content" id="differCount"></div>
<div class="new_content_content" id="agreeCount"></div>
<div class="new_content_content" id="qrcode"></div>
<div class="new_content_content" id="remark"></div>
</div>
<div class="new_content_right">
<div class="new_content_right_tit">专项公示列表</div>
<div class="new_content_right_main" id="newListContent">
<script id="newListData" type="text/html">
{{each newList as value i}}
<p><a href="discussionsDetail_11.html?id={{value.id}}">{{value.openName}}</a></p>
{{/each}}
</script>
</div>
</div>
</div>



<div class="footer_main" style="margin-top:0;" >

<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}}-->
<img src="static/images/link_00.png" alt="">
<!-- <a href=""><img src="static/images/link_01.png" alt="" ></a>-->
<!-- <a href=""><img src="static/images/link_02.png" alt=""></a>-->
{{each webList.botoom1 as value i}}
<a href="{{value.contentUrl}}" style="background: url('static/images/{{value.contentIcon}}.png') no-repeat center;background-size: 100% 100%;" target="_blank">
<!-- <img src="static/images/{{value.contentIcon}}.png" alt="" >-->
<p class="link_tt">{{value.contentValue}}</p>
</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>

<img src="" id="ewm" alt="">

</div>


<div id="dialogOp" style="display: none;width: 100vw;height: 100vh;position:absolute;top: 0;left: 0;">
<div onclick="closeDia()" style="width: 100vw;height: 100vh;position:absolute;top: 0;left: 0;background: rgba(0,0,0,.5);"></div>
<img src="" id="dialogImg" style="position:absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);height: 70vh;" alt=""/>
</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/discussionsDetail_11.js" defer type="text/javascript"></script>
</html>

Двоичные данные
infoport/static/images/index_code_btn_11.png Просмотреть файл

До После
Ширина: 170  |  Высота: 66  |  Размер: 11 KiB

+ 4
- 0
infoport/static/js/api/index.js Просмотреть файл

@@ -139,3 +139,7 @@ var tempWorkerPublicDetail = '/open/villageAffairs/public/tempWorkerPublicDetail
var otherPublicList = '/open/villageAffairs/public/otherPublicList'

var otherPublicDetail = '/open/villageAffairs/public/otherPublicDetail'

var specialPublicityList = '/open/villageAffairs/public/specialPublicityList'

var specialPublicityDetail = '/open/villageAffairs/public/specialPublicityDetail'

+ 41
- 0
infoport/static/js/project/discussions.js Просмотреть файл

@@ -22,6 +22,7 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
newList9:[],
newList10:[],
newList11:[],
newList12:[],
pageNum1: 1,
pageNum2: 1,
pageNum3: 1,
@@ -33,6 +34,7 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
pageNum9: 1,
pageNum10: 1,
pageNum11: 1,
pageNum12: 1,
},
};
var tools = new Tools();
@@ -169,6 +171,16 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
changeList('10');
}
});

var ulbox11 = document.getElementById("review_box11");
ulbox11.scrollTop = 0; // 开始无滚动时设为0

ulbox11.addEventListener('scroll', function() {
if (ulbox11.scrollHeight - ulbox11.scrollTop === ulbox11.clientHeight) {
module.data.pageNum12 += 1;
changeList('11');
}
});
};

module.newsList4 = function (data) {
@@ -351,6 +363,7 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
$('#new_list_8').css('display','none');
$('#new_list_9').css('display','none');
$('#new_list_10').css('display','none');
$('#new_list_11').css('display','none');
switch (type) {

case '1':
@@ -466,6 +479,18 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
otherType: 13
}, module.newsList10 , true);
break;

case '11':
$('#new_list_11').css('display','block');
$("#nowDateNYR11").html(new Date().getFullYear()+'-'+(new Date().getMonth()+1)+'-'+new Date().getDate());
tools.doGet(specialPublicityList, {
pageNum:module.data.pageNum12,
translate_dict:"1",
pageSize:10,
bookId: JSON.parse(tools.getCookie('user')).bookId,
deptId: JSON.parse(tools.getCookie('user')).deptId,
}, module.newsList12 , true);
break;
default:
break;

@@ -536,6 +561,22 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
}
}

module.newsList12 = function (data) {
if (data.code == 200) {
var content = data.rows;
if (module.data.newList12.length >= data.total){
return;
}else{
for (let i = 0 ; i < content.length ; i++){
module.data.newList12.push(content[i]);
}
}
// module.data.newList3 = content;
var newListData11 = template('newListData11', module.data);
$("#newListContent_ul_11").html(newListData11);
}
}

function roll(t) {
var ul1 = document.getElementById("newListContent");
var ul2 = document.getElementById("newListContent2");


+ 16
- 6
infoport/static/js/project/discussionsDetail.js Просмотреть файл

@@ -47,9 +47,9 @@ define(['jquery', "template", "Tools"], function ($, template, Tools) {
if (data.code == 200) {
var content = data.data;
$('#name')[0].innerHTML = content.openName;
$('#jueyiAt')[0].innerHTML = '決议公开日期:'+content.jueyiAt;
$('#jueyiAt')[0].innerHTML = '决议公开日期:'+(content.jueyiAt || '');

$('#jueyiPic')[0].innerHTML = '议公开图片:<br/>';
$('#jueyiPic')[0].innerHTML = '议公开图片:<br/>';
if (content.jueyiPic){
let arr = content.jueyiPic.split(',');
for (let i = 0;i < arr.length; i++){
@@ -57,17 +57,27 @@ define(['jquery', "template", "Tools"], function ($, template, Tools) {
}
}

$('#shishiPic')[0].innerHTML = '实施公开图片:<br/>';
$('#shishiPic')[0].innerHTML = '实施结果公开图片:<br/>';
if (content.shishiPic){
let arr2 = content.jueyiPic.split(',');
let arr2 = content.shishiPic.split(',');
for (let i = 0;i < arr2.length; i++){
$('#shishiPic')[0].innerHTML += '<img onclick="openDialog(\'/api'+arr2[i]+'\')" src="/api'+arr2[i]+'" style="width: 200px;height: 150px;margin-right: 10px;">';
}
}

$('#shishiAt')[0].innerHTML = '实施公开日期:'+content.shishiAt;
$('#shishiAt')[0].innerHTML = '实施结果公开日期:' + ( content.shishiAt || '' );

$('#remark')[0].innerHTML = '备注:'+content.remark;
$('#shishiguochengPic')[0].innerHTML = '实施过程公开图片:<br/>';
if (content.shishiguochengPic){
let arr3 = content.shishiguochengPic.split(',');
for (let i = 0;i < arr3.length; i++){
$('#shishiguochengPic')[0].innerHTML += '<img onclick="openDialog(\'/api'+arr3[i]+'\')" src="/api'+arr3[i]+'" style="width: 200px;height: 150px;margin-right: 10px;">';
}
}

$('#shishiguochengAt')[0].innerHTML = '实施过程公开日期:' + ( content.shishiguochengAt || '' );

$('#remark')[0].innerHTML = '备注:'+(content.remark || '');

}
}


+ 2
- 2
infoport/static/js/project/discussionsDetail_01.js Просмотреть файл

@@ -96,7 +96,7 @@ define(['jquery', "template", "Tools"], function ($, template, Tools) {
}
}

$('#shishiPic')[0].innerHTML = '件:<br/>';
$('#shishiPic')[0].innerHTML = '公开文件:<br/>';

if (content.openFile){
let arr2 = content.openFile.split(',');
@@ -105,7 +105,7 @@ define(['jquery', "template", "Tools"], function ($, template, Tools) {
}
}

$('#remark')[0].innerHTML = '备注:'+content.remark;
$('#remark')[0].innerHTML = '备注:' + (content.remark || '');

}
}


+ 33
- 11
infoport/static/js/project/discussionsDetail_02.js Просмотреть файл

@@ -61,17 +61,39 @@ define(['jquery', "template", "Tools"], function ($, template, Tools) {
var content = data.rows[0];
$('#name').html(content.name);
$('#code').html('合同编码:' + content.code);
$('#biddingType').html('合同类型:'+content.assetType);
$('#secondParty').html('合同乙方:'+content.secondParty);
$('#settleType').html('结款方式:'+content.settleType);
$('#totalAmount').html('合同金额:'+content.totalAmount + '元');
$('#settledAmount').html('已结款:'+content.settledAmount + '元');
$('#receivedAmount').html('下次应结:'+content.receivedAmount + '元');
$('#num').html('数量:'+content.num);
$('#unit').html('单位:'+content.unit);
$('#buildingTime').html('签订日期:'+content.buildingTime);
$('#startTime').html('开始日期:'+content.startTime);
$('#endTime').html('结束日期:'+content.endTime);
$('#biddingType').html('合同类型:'+(content.assetType || ''));
$('#secondParty').html('合同乙方:'+(content.secondParty || ''));
$('#settleType').html('结款方式:'+(content.settleType || ''));
$('#totalAmount').html('合同金额:'+(content.totalAmount || '') + '元');
$('#settledAmount').html('已结款:'+(content.settledAmount || '') + '元');
$('#receivedAmount').html('下次应结:'+(content.receivedAmount || '') + '元');
$('#num').html('数量:'+(content.num || ''));
$('#unit').html('单位:'+(content.unit || ''));
$('#buildingTime').html('签订日期:'+(content.buildingTime || ''));
$('#startTime').html('开始日期:'+(content.startTime || ''));
$('#endTime').html('结束日期:'+(content.endTime || ''));
//新闻列表
tools.doGet(attachmentList, {
tableId: content.id,
tableName: 't_contraction_info',
bizPath: 'contraction',
}, module.NewsInformation , true);
}
}
module.NewsInformation = function (data) {
console.log(data)
if (data.code == 200) {
var content = data.rows;
let list = [];
content.map(rr=>{
list.push({
fileUrl:rr.fileUrl,
fileName:rr.fileName
})
})
module.data.attachmentList = list;
var attachmentListData = template('attachmentListData', module.data);
$("#attachmentListContent").html(attachmentListData);
}
}



+ 2
- 2
infoport/static/js/project/discussionsDetail_03.js Просмотреть файл

@@ -78,8 +78,8 @@ define(['jquery', "template", "Tools"], function ($, template, Tools) {
}
}

$('#content')[0].innerHTML = '内容:'+content.content;
$('#remark')[0].innerHTML = '备注:'+content.remark;
$('#content')[0].innerHTML = '内容:'+(content.content || '');
$('#remark')[0].innerHTML = '备注:'+(content.remark || '');

}
}


+ 3
- 3
infoport/static/js/project/discussionsDetail_03_zy.js Просмотреть файл

@@ -75,12 +75,12 @@ define(['jquery', "template", "Tools"], function ($, template, Tools) {
if (content.openFile){
let arr2 = content.openFile.split(',');
for (let i = 0;i < arr2.length; i++){
$('#openFile')[0].innerHTML += '<a style="color: #2a39fb;" href="/api'+arr2[i]+'">'+arr2[i].substr(27,arr2[i].length)+'</a>';
$('#openFile')[0].innerHTML += '<a style="color: #2a39fb;display: block;" href="/api'+arr2[i]+'">'+arr2[i].substr(27,arr2[i].length)+'</a>';
}
}

$('#content')[0].innerHTML = '内容:'+content.content;
$('#remark')[0].innerHTML = '备注:'+content.remark;
$('#content')[0].innerHTML = '内容:'+(content.content || '');
$('#remark')[0].innerHTML = '备注:'+(content.remark || '');

}
}


+ 9
- 9
infoport/static/js/project/discussionsDetail_06.js Просмотреть файл

@@ -60,15 +60,15 @@ define(['jquery', "template", "Tools"], function ($, template, Tools) {
if (data.code == 200) {
var content = data.rows[0];
$('#name').html(content.name);
$('#code').html('资产编码:' + content.code);
$('#biddingType').html('资产类别:'+content.assetType);
$('#operationType').html('经营属性:'+content.operationType);
$('#secondParty').html('构建时间:'+content.buildTime);
$('#location').html('坐落位置:'+content.location);
$('#settleType').html('使用情况:'+content.useType);
$('#totalAmount').html('数量/建筑面积:'+content.netValue);
$('#settledAmount').html('计量单位:'+content.unit);
$('#receivedAmount').html('原值:'+content.originalValue);
$('#code').html('资产编码:' + (content.code || ''));
$('#biddingType').html('资产类别:'+(content.assetType || ''));
$('#operationType').html('经营属性:'+(content.operationType || ''));
$('#secondParty').html('构建时间:'+(content.buildTime || ''));
$('#location').html('坐落位置:'+(content.location || ''));
$('#settleType').html('使用情况:'+(content.useType || ''));
$('#totalAmount').html('数量/建筑面积:'+(content.netValue || ''));
$('#settledAmount').html('计量单位:'+(content.unit || ''));
$('#receivedAmount').html('原值:'+(content.originalValue || ''));
}
}



+ 5
- 5
infoport/static/js/project/discussionsDetail_07.js Просмотреть файл

@@ -58,16 +58,16 @@ define(['jquery', "template", "Tools"], function ($, template, Tools) {
if (data.code == 200) {
var content = data.rows[0];
$('#name').html(content.name);
$('#code').html('资源编码:' + content.code);
$('#biddingType').html('资源分类:'+content.resourceSort);
$('#secondParty').html('资源类型:'+content.resourceType);
$('#code').html('资源编码:' + (content.code || ''));
$('#biddingType').html('资源分类:'+(content.resourceSort || ''));
$('#secondParty').html('资源类型:'+(content.resourceType || ''));
$('#location').html('坐落位置:'+(content.location || ''));
$('#east').html('东至:'+(content.east || ''));
$('#west').html('西至:'+(content.west || ''));
$('#south').html('南至:'+(content.south || ''));
$('#north').html('北至:'+(content.north || ''));
$('#settleType').html('面积:'+content.totalArea + '亩');
$('#totalAmount').html('使用情况:'+content.useType);
$('#settleType').html('面积:'+(content.totalArea || '') + '亩');
$('#totalAmount').html('使用情况:'+(content.useType || ''));
}
}



+ 1
- 1
infoport/static/js/project/discussionsDetail_08.js Просмотреть файл

@@ -80,7 +80,7 @@ define(['jquery', "template", "Tools"], function ($, template, Tools) {
}
}

$('#remark')[0].innerHTML = '备注:'+content.remark;
$('#remark')[0].innerHTML = '备注:'+(content.remark || '');

}
}


+ 2
- 2
infoport/static/js/project/discussionsDetail_10.js Просмотреть файл

@@ -78,8 +78,8 @@ define(['jquery', "template", "Tools"], function ($, template, Tools) {
}
}

$('#content')[0].innerHTML = '内容:'+content.openContent;
$('#remark')[0].innerHTML = '备注:'+content.remark;
$('#content')[0].innerHTML = '内容:'+(content.openContent || '');
$('#remark')[0].innerHTML = '备注:'+(content.remark || '');

}
}


+ 125
- 0
infoport/static/js/project/discussionsDetail_11.js Просмотреть файл

@@ -0,0 +1,125 @@
/**
* Created by Administrator on 2021/4/5.
*/
define(['jquery', "template", "Tools"], function ($, template, Tools) {
//数据存储
var module = {
data: {
//服务器地址
serverApi:'',
//焦点图数据
focusList: [],
communicateList: [],
specialPublicityTypeOptions: [],
},
};
var tools = new Tools();

module.init = function (page) {
//新闻列表
tools.doGet(specialPublicityList, {
pageNum:module.data.pageNum12,
translate_dict:"1",
pageSize:10,
bookId: JSON.parse(tools.getCookie('user')).bookId,
deptId: JSON.parse(tools.getCookie('user')).deptId,
}, module.newsList , true);
tools.doGet(webList, {}, module.webList , true);
tools.doGet(webDeptType+"/special_publicity_type", {}, module.deptType,true);
};

//标的物类型
module.deptType = function (data) {
if (data.code == 200) {
var content = data.data ;
module.data.specialPublicityTypeOptions = content;
//新闻详情
tools.doGet(specialPublicityDetail, {
id:getQueryVariable('id'),
bookId: JSON.parse(tools.getCookie('user')).bookId,
deptId: JSON.parse(tools.getCookie('user')).deptId
}, module.newsDetail , true);
}
}

//获取地址栏参数
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);
}

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);
$('#ewm').attr('src', 'static/images/'+content.top.bz);
}
}

module.newsDetail = function (data) {
if (data.code == 200) {
var content = data.data;
content.specialPublicityType = module.selectDictLabel(module.data.specialPublicityTypeOptions,content.specialPublicityType);
$('#openName')[0].innerHTML = content.openName;
$('#openNy')[0].innerHTML = '公示年月:'+content.openAt;
$('#openPic')[0].innerHTML = '公示图片:<br/>';
if (content.openPic){
let arr = content.openPic.split(',');
for (let i = 0;i < arr.length; i++){
$('#openPic')[0].innerHTML += '<img onclick="openDialog(\'/api'+arr[i]+'\')" src="/api'+arr[i]+'" style="width: 200px;height: 150px;margin-right: 10px;">';
}
}
$('#qrcode')[0].innerHTML = '二维码图片:<br/>';
if (content.qrcode){
let arr2 = content.qrcode.split(',');
for (let i = 0;i < arr2.length; i++){
$('#qrcode')[0].innerHTML += '<img onclick="openDialog(\'/api'+arr2[i]+'\')" src="/api'+arr2[i]+'" style="width: 200px;height: 150px;margin-right: 10px;">';
}
}
$('#specialPublicityType')[0].innerHTML = '公示类型:'+(content.specialPublicityType || '');
$('#differCount')[0].innerHTML = '有异议数:'+(content.differCount || '');
$('#agreeCount')[0].innerHTML = '无异议数:'+(content.agreeCount || '');
$('#remark')[0].innerHTML = '备注:'+(content.remark || '');

}
}

openDialog = function (src){
$("#dialogOp").css('display','block');
$('#dialogImg').attr('src', src);
}

closeDia = function (){
$("#dialogOp").css('display','none');
$('#dialogImg').attr('src', '');
}

module.newsList = function (data) {
if (data.code == 200) {
var content = data.rows;
module.data.newList = content;
var newListData = template('newListData', module.data);
$("#newListContent").html(newListData);
}
}

module.selectDictLabel = function (datas, value) {
var actions = [];
Object.keys(datas).some((key) => {
if (datas[key].dictValue == ('' + value)) {
actions.push(datas[key].dictLabel);
return true;
}
})
return actions.join('');
}

return module;
});

Загрузка…
Отмена
Сохранить