PageSourceSearch

https://dongning.gov.cn/mdjdnsrmzf/xhtml/pc2023/js/lyhf.js

js dongning.gov.cn collected 2026-10-02 16:47:49 UTC 4,073 bytes, 147 lines download raw bytes

1var deptId=''
2var lyhfFun = {
3	_data: {
4		"pageNum": 1,
5		"pageSize": 10,
6		"sortMap": {
7			"replyTime": "desc"
8		},
9		"params": {
10			"deptId": ''
11		},
12	},
13	hasYjzj: false,
14	yjzjParams: {
15		"sortMap": { "startTime": "desc" },
16	},
17	// 获取列表数据
18	getLyhfData: function getLyhfData(){
19		var postData = lyhfFun._data;
20		var SiteIDCode = $.trim($('meta[name="SiteIDCode"]').attr('content'));
21
22		if(window._hdSiteIds) {
23			postData.params.siteId = window._hdSiteIds[SiteIDCode]
24deptId=postData.params.deptId
25			delete postData.params.deptId
26		}
27
28		var d = getKeyVal(postData);
29		ajaxFun.getData('/communication/api-mailbox/frontMail/mailList', JSON.stringify($.extend({}, postData, d)), renderList, 'application/json');
30	
31		function renderList(json) {
32			var htm = '';
33			if(json && json.rows.length>0){
34				// 排序
35				var sjson = json.rows.sort(function(a, b) {
36					return b.id - a.id;
37				});
38				
39				$.each(sjson, function(i, e) {
40					var status = "";
41					if(Number(e.mailInfoStatus) == 1002) {
42						status = "已办结";
43					} else {
44						status = "待处理";
45					}
46	
47					htm += '<li>\
48								<span class="col-1">'+(i+1)+'</span>\
49								<span class="col-2"><a href="/'+ websiteCode +'/ldxx/hdjl_detail.shtml?id=' + e.id + '" target="_blank" title="' + e.title + '">' + e.title + '</a></span>\
50								<span class="col-3">' + e.replyTime.substr(0, 10) + '</span>\
51							</li>';
52				});
53			}else{
54				htm = '<li style="text-align: center;">暂无数据!</li>'
55			}
56
57			$('#data-lyhf').html(htm);
58	
59		}
60	},
61	// 获取部门id
62	requestDepId: function requestDepId(flag) {
63		var _params = {
64			parentId: ''
65		};
66		var _hdSiteName = _hdSiteName || "";
67		$.ajax({
68			url: '/communication/api-base/department/deptTree',
69			type: 'POST',
70			data: JSON.stringify(_params),
71			dataType: 'json',
72			contentType: 'application/json',
73			success: function(res) {
74				if(res.data.length > 0) {
75					var _txt = $.trim($('meta[name="SiteName"]').attr('content')).replace(/\d/g, '');
76					$.each(res.data, function(i, v) {
77
78						if(_txt == $.trim(v.label) && flag == 1) {
79							lyhfFun._data.params.deptId = v.value;
80							lyhfFun.getLyhfData();
81							if(lyhfFun.hasYjzj){
82								lyhfFun.getYjzj();
83							}
84							return false;
85						}
86
87						if(lyhfFun._data.params.deptId == '' && v.children!= null){
88							$.each(v.children,function(i,e){
89								if(_txt == $.trim(e.label) || _hdSiteName == $.trim(e.label)){
90									lyhfFun._data.params.deptId = e.value;
91									lyhfFun.getLyhfData();
92									if(lyhfFun.hasYjzj){
93										lyhfFun.getYjzj();
94									}
95									return false;
96								}
97							})
98						}
99
100					})
101				}
102			},
103			error: function(err) {
104				console.log(err);
105			}
106		})
107	},
108	// 意见征集
109	getYjzj: function() {
110delete lyhfFun._data.params.siteId 
111			lyhfFun._data.params.deptId=deptId
112		var _data = $.extend(lyhfFun._data, lyhfFun.yjzjParams)
113
114    var d = getKeyVal(_data);
115    var data = JSON.stringify($.extend({}, _data, d));
116	
117    $.ajax({
118      url: '/communication/api-collect/frontArticle/pageList',
119      type: "post",
120      data: data,
121      contentType: 'application/json',
122      success: function success(res) {
123        if (res.status == 'success' && res.data && res.data.rows) {
124					var json = res.data.rows;
125					var htm = '';
126					if(json.length>0){
127						$.each(json, function (i, e) {
128							var stateHtm = e.isSurvey == 2 ? '<span class="state ing">进行中</span>' : '<span class="state">已结束</span>';
129							var titClass = _data.pageSize == 5 ? ' class=" elli-m"' : ' class=" elli-s"';
130							var href = e.collectType == 0 ? '/'+ websiteCode +'/yjzj/yjzjly.shtml?id=' + e.id : e.outJoin;
131
132							htm += '<li>'+ stateHtm +'\
133									<a'+ titClass +' target="_blank" href="'+ href +'" title="'+ e.title +'">'+ e.title +'</a>\
134									<span class="time">征集时间:'+ e.startTime +'至'+ e.endTime +'</span>\
135								</li>';
136						});
137					} else {
138						htm = '<li style="text-align:center;padding-left:0;">暂无数据!</li>';
139					}
140					$('#yjzjList').html(htm);
141        }
142      }
143    });
144  },
145}
146
147

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.