Browse Source

添加纠错反馈、需求搜索状态筛选、发现链接方式改变

luyanan 7 years ago
parent
commit
6c2b0f18fb
9 changed files with 47 additions and 146 deletions
  1. 1 0
      cmp-portal/css/cmpindex.css
  2. 1 1
      cmp-portal/js/cmp-needList.js
  3. 2 1
      css/genindex.css
  4. 1 1
      css/workspace.css
  5. 0 3
      demandShow.html
  6. 33 0
      js/demandShow.js
  7. 4 4
      js/discover.js
  8. 1 1
      js/myDemand.js
  9. 4 135
      js/needList.js

+ 1 - 0
cmp-portal/css/cmpindex.css

@ -433,6 +433,7 @@ ul.tagList>li .h2Font{color:#666}
433 433
.itemListBolck .itemListCon .madiaInfo{padding-left:140px;min-height: 80px;padding-top:15px;}
434 434
.itemListCon.form-item ul .h1Font{font-size:18px;margin-bottom:6px;line-height:24px;}
435 435
.itemListCon .draftLable{font-size:14px; color:#e03b43;line-height:24px;}
436
.itemListCon .overLable{font-size:14px;color:#14b521;line-height:24px;}
436 437
.itemListCon .form-result>ul>li .madiaEdit>li{float: left;margin-right: 28px;}
437 438
.itemListCon .form-result>ul>li .madiaEdit .editThis{display:inline-block;width:60px;height:32px;background:url(../images/g_article_button_xiugai_lan_hig.png);background-size:cover;cursor:pointer;}
438 439
.itemListCon .form-result>ul>li .madiaEdit .deteleThis2{display:inline-block;width:32px;height:32px;background:url(../../images/g_article_button_shanchu_hig.png);background-size:cover;cursor:pointer;}

+ 1 - 1
cmp-portal/js/cmp-needList.js

@ -120,7 +120,7 @@ $(document).ready(function() {
120 120
		if($data.state==0){
121 121
			statusU='<li><span class="draftLable">已于 '+TimeTr($data.invalidDay)+' 过期</span></li>'
122 122
		}else if($data.state==2){
123
			statusU='<li><span style="color:#14b521;">已于 '+TimeTr($data.modifyTime)+' 完成</span></li>'
123
			statusU='<li><span class="overLable">已于 '+TimeTr($data.modifyTime)+' 完成</span></li>'
124 124
		}else if($data.state==3){
125 125
			statusU='<li><span>已于 '+TimeTr($data.modifyTime)+' 关闭</span></li>'
126 126
		}

+ 2 - 1
css/genindex.css

@ -495,7 +495,8 @@ ul.tagList>li .h2Font{color:#666}
495 495
496 496
.itemListBolck .itemListCon .madiaInfo{padding-left:140px;min-height: 80px;padding-top:15px;}
497 497
.itemListCon.form-item ul .h1Font{font-size:18px;margin-bottom:6px;line-height:24px;}
498
.itemListCon .draftLable{font-size:14px; color:#e03b43;line-height:24px;}
498
.itemListCon .draftLable{font-size:14px;color:#e03b43;line-height:24px;}
499
.itemListCon .overLable{font-size:14px;color:#14b521;line-height:24px;}
499 500
.itemListCon .form-result>ul>li .madiaEdit>li{float: left;margin-right: 28px;}
500 501
.itemListCon .form-result>ul>li .madiaEdit .editThis{display:inline-block;width:60px;height:32px;background:url(../images/g_article_button_xiugai_hig.png);background-size:cover;cursor:pointer;}
501 502
.itemListCon .form-result>ul>li .madiaEdit .deteleThis2{display:inline-block;width:32px;height:32px;background:url(../images/g_article_button_shanchu_hig.png);background-size:cover;cursor:pointer;}

+ 1 - 1
css/workspace.css

@ -210,7 +210,7 @@ body,html{background: #f4f6f8;}
210 210
.workhandle span{ padding:2px 20px;border:1px #d7d7d7 solid;margin: 2px;}
211 211
.workhandle .complain{display:none;}/* 更多操作按钮... */
212 212
.workhandle .coultstate{color: #fff;}
213
.workhandle .coultstate.coulstAim{border-radius: 6px 0 0 6px;}
213
.workhandle .coultstate.coulstAim{border-radius: 6px 0 0 6px;display: none;}
214 214
.workhandle .coultstate i{font-style: normal;}
215 215
.workhandle .status-1{background:#FF9900;border: solid 1px #FF9900;}/*进行中*//*咨询状态*/
216 216
.workhandle .status-2{background:#dd524d;border: solid 1px #dd524d;}/*待评价/新咨询*/

+ 0 - 3
demandShow.html

@ -10,9 +10,6 @@
10 10
<link type="text/css" href="css/common.css" rel="stylesheet">
11 11
<link type="text/css" href="css/genindex.css" rel="stylesheet">
12 12
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
13
<style type="text/css">
14
	#feedback{display: none;}
15
</style>
16 13
</head>
17 14

18 15
<body>

+ 33 - 0
js/demandShow.js

@ -272,4 +272,37 @@ $(document).ready(function() {
272 272
			}
273 273
		})
274 274
	}
275
	
276
	//纠错反馈
277
	$(".correctSubmit").on("click",function(){
278
		var cntCon=$(this).siblings(".correctCon").val();
279
		var cntUser="";
280
		if(userid && userid != null && userid != "null") {
281
			cntUser = userid;
282
		}
283
		if(cntCon.length>500){
284
			$.MsgBox.Alert('提示', '纠错反馈内容不得超过500个字');
285
			return;
286
		}else{
287
			$.ajax({
288
				"url": "/ajax/feedback/error/demand",
289
				"type": "POST",
290
				"dataType": "json",
291
				"async": true,
292
				"data": {
293
					"id": demandId,
294
					"cnt":cntCon,
295
					"user":cntUser
296
				},
297
				"success": function(data) {
298
					if(data.success) {
299
						backSuccessed();
300
					}
301
				},
302
				"error": function() {
303
					$.MsgBox.Alert('提示', '链接服务器超时')
304
				}
305
			});
306
		}
307
	})
275 308
})

+ 4 - 4
js/discover.js

@ -102,7 +102,7 @@ $(function() {
102 102
						var oLeng=$data.length<5?$data.length:5;
103 103
						for(var i=0;i<oLeng;i++) {
104 104
							var listLi=$('<li class="flexCenter"></li>').appendTo($("#importNews"));
105
							var str='<a href="articalShow.html?articleId='+$data[i].articleId+'"><p class="h2Font ellipsisSty-2"><em class="circlePre"></em>'+$data[i].articleTitle+'</p>'+
105
							var str='<a target="_blank" href="articalShow.html?articleId='+$data[i].articleId+'"><p class="h2Font ellipsisSty-2"><em class="circlePre"></em>'+$data[i].articleTitle+'</p>'+
106 106
								'<span class="smalltip">'+commenTime($data[i].publishTime)+'</span></a></li>'
107 107
							$(str).appendTo(listLi);
108 108
							exculdeId2s.push($data[i].articleId);
@ -130,7 +130,7 @@ $(function() {
130 130
						var oLeng=$data.length<10?$data.length:10;
131 131
						for(var i=0;i<oLeng;i++) {
132 132
							var listLi=$('<li class="flexCenter"></li>').appendTo($("#hotNews"));
133
							var str='<a href="articalShow.html?articleId='+$data[i].articleId+'"><p class="h2Font ellipsisSty-2">'+$data[i].articleTitle+'</p></a>'
133
							var str='<a target="_blank" href="articalShow.html?articleId='+$data[i].articleId+'"><p class="h2Font ellipsisSty-2">'+$data[i].articleTitle+'</p></a>'
134 134
							$(str).appendTo(listLi);		
135 135
						}
136 136
					}
@ -221,7 +221,7 @@ $(function() {
221 221
			columTag='<span class="columTag">'+columnType[dataStr.colNum].shortName+'</span>';
222 222
		}
223 223
		var strAdd = '';
224
		strAdd += '<a traget="_blank" href="articalShow.html?articleId='+ dataStr.articleId +'" class="flexCenter urlgo">';
224
		strAdd += '<a target="_blank" href="articalShow.html?articleId='+ dataStr.articleId +'" class="flexCenter urlgo">';
225 225
		strAdd += '<div class="lefthead articalhead" style="background-image:url('+ madiaHead +')">'+columTag+'</div>';
226 226
		strAdd += '<div class="centercon centercon2"><p class="h1font ellipsisSty-2">'+ dataStr.articleTitle +'</p>';
227 227
		strAdd += '<div class="h2font showInfo clearfix">';
@ -256,7 +256,7 @@ $(function() {
256 256
			}
257 257
		}
258 258
		var strAdd = '';
259
		strAdd += '<a traget="_blank" href="articalShow.html?articleId='+ dataStr.articleId +'" class="flexCenter urlgo">';
259
		strAdd += '<a target="_blank" href="articalShow.html?articleId='+ dataStr.articleId +'" class="flexCenter urlgo">';
260 260
		strAdd += '<div class="lefthead articalhead" style="background-image:url('+ madiaHead +')"></div>';
261 261
		strAdd += '<div class="centercon centercon2"><p class="h1font ellipsisSty-2">'+ dataStr.articleTitle +'</p>';
262 262
		strAdd += '<div class="h2font showInfo clearfix">';

+ 1 - 1
js/myDemand.js

@ -223,7 +223,7 @@ $(document).ready(function() {
223 223
		if($data.state==0){
224 224
			statusU='<li><span class="draftLable">已于 '+TimeTr($data.invalidDay)+' 过期</span></li>'
225 225
		}else if($data.state==2){
226
			statusU='<li><span style="color:#14b521;">已于 '+TimeTr($data.modifyTime)+' 完成</span></li>'
226
			statusU='<li><span class="overLable">已于 '+TimeTr($data.modifyTime)+' 完成</span></li>'
227 227
		}else if($data.state==3){
228 228
			statusU='<li><span>已于 '+TimeTr($data.modifyTime)+' 关闭</span></li>'
229 229
		}

+ 4 - 135
js/needList.js

@ -18,10 +18,12 @@ $(document).ready(function() {
18 18
			type: "GET",
19 19
			timeout: 10000,
20 20
			dataType: "json",
21
			traditional:true,
21 22
			data: {
23
				"state":"1",
22 24
				"key":$("#needKey").val(),
23 25
				"pageNo": pageNo,
24
				"pageSize":pageSize,
26
				"pageSize":pageSize
25 27
			},
26 28
			beforeSend: function() {
27 29
				$("#demandList").append('<img src="../images/loading.gif" class="loading" />');
@ -30,6 +32,7 @@ $(document).ready(function() {
30 32
				if(data.success) {
31 33
					$("#demandList").html(" ");
32 34
					var $info = data.data.data;
35
					console.log(data)
33 36
					if($info.length > 0){
34 37
						for(var i = 0; i < $info.length; i++) {
35 38
							var liStr=$("<li></li>").appendTo("#demandList");
@ -100,138 +103,4 @@ $(document).ready(function() {
100 103
			}
101 104
		});
102 105
	}
103
//	function demandHtml($data) {
104
//		for(var i = 0; i < $data.length; i++) {
105
//			var $obje = $data[i].professor;
106
//			var personStr = personalInformation($obje);
107
//			var demandAim = "技术咨询",
108
//				demandType = "企业需求";
109
//			var oImg = "",
110
//				oTime = "";
111
//			if($data[i].demandAim == 2) {
112
//				demandAim = "寻找资源"
113
//			} else if($data[i].demandAim == 3) {
114
//				demandAim = "其他需求"
115
//			}
116
//			if($data[i].demandType == 1) {
117
//				demandType = "个人需求"
118
//			}
119
//			if($obje.hasHeadImage) {
120
//				oImg = "/images/head/" + $obje.id + "_l.jpg";
121
//			} else {
122
//				oImg = "images/default-photo.jpg"
123
//			}
124
//			//认证
125
//			var oSty=autho($obje.authType,$obje.orgAuth,$obje.authStatus);
126
//			typeTname = oSty.sty;
127
//			
128
//			oTime = $data[i]["createTime"].substr(0, 4) + "年" + $data[i].createTime.substr(4, 2) + "月" + $data[i].createTime.substr(6, 2) + "日" +
129
//				$data[i].createTime.substr(8, 2) + ":" + $data[i].createTime.substr(10, 2);
130
//			var dataString = "<div class='workselectitem'><table width='100%'>"
131
//			dataString += "<tbody><tr><td width='14%' class='messagebox'>"
132
//			dataString += "<a class='workhead workitimg userRadius'>"
133
//			dataString += "<img class='headPhoto' src='" + oImg + "'  width='100%' height='100%'></a></td>"
134
//			dataString += "<td style='position:relative;top:20px;' width='86%'>"
135
//			dataString += "<div class='workinfor worksitcon'><h4><a class='named'>" + $obje.name + "</a>"
136
//			dataString += "<a class='authiconNew " + typeTname + "' title='"+oSty.title+"' style='top:9px;'></a><input type='text' class='assessStar' style='display: none;'></h4><h6 class='h3Font'>"
137
//			dataString += "<span>" + personStr + "</span>"
138
//			dataString += "<h6 style='position:relative;'>"
139
//			dataString += "<div class='titList'>需求主题:<em class='h4Font'>" + $data[i].demandTitle + "</em></div>"
140
//			dataString += "<span class='lasttime rightTime'>" + oTime + "</span>"
141
//			dataString += "<div style='height:70px;'><p class='ellipsisSty-2 rebackcon' >" + $data[i].demandContent + "</p></div></div>"
142
//			dataString += "<div class='workhandle'><div class='rightopert floatR'>"
143
//			dataString += "<span class='replybtn' demanid='" + $data[i].demandId + "'>查看</span></div>"
144
//			dataString += "<div class='leftstate floatR'>"
145
//			dataString += "<span class='coultstate status-4'><i>" + demandAim + "</i></span></div>"
146
//			dataString += "<div class='leftstate floatR'>"
147
//			dataString += "<span class='coultstate coulstAim status-4'><i>" + demandType + "</i></span>"
148
//			dataString += "</div></div></td></tr></tbody></table></div>"
149
//			$("#demandList").append(dataString);
150
//		}
151
//	}
152
	/*职位职称所在机构,部门,地址等等*/
153
//	function personalInformation($person) {
154
//		var arr1 = [$person.title, $person.office, $person.department, $person.orgName, $person.address];
155
//		var arr = new Array();
156
//		var arr2 = new Array();
157
//		var n = 0;
158
//		for(var i = 0; i < arr1.length; i++) {
159
//			if(arr1[i]) {
160
//				arr.push(arr1[i]);
161
//				if(arr1[i] == arr1[arr1.length - 1]) {
162
//					n = 1;
163
//				}
164
//			}
165
//		}
166
//		if(n == 1) {
167
//			for(var i = 0; i < arr.length-1; i++) {
168
//				arr2.push(arr[i]);
169
//			}
170
//			return arr2.join()+ " | " + arr[arr.length - 1]; 
171
//		} else {
172
//			return arr.join();
173
//		}
174
//
175
//	}
176

177
	/*检索排序*/
178
//	function selcet(i) {
179
//		$(".selcet" + i).on('click', function(e) {
180
//			var option = $(this).find(".option" + i);
181
//			option.css("display", "block")
182
//			var o_this = $(this);
183
//			o_this.find("li").click(function() {
184
//				o_this.find("li").removeClass("workcurrent");
185
//				$(this).addClass("workcurrent");
186
//				o_this.find("span").text($(this).text());
187
//				option.css("display", "none");
188
//				if($(this).text() == "技术咨询") {
189
//					oDemandAim = 1;
190
//					$(".tcdPageCode").remove();
191
//					$("#shoudao").append('<div class="tcdPageCode"></div>');
192
//					demandList(true, 5, 1, oDemandAim, oSortType);
193
//				} else if($(this).text() == "资源合作") {
194
//					oDemandAim = 2;
195
//					$(".tcdPageCode").remove();
196
//					$("#shoudao").append('<div class="tcdPageCode"></div>');
197
//					demandList(true, 5, 1, oDemandAim, oSortType);
198
//				} else if($(this).text() == "其他需求") {
199
//					oDemandAim = 3;
200
//					$(".tcdPageCode").remove();
201
//					$("#shoudao").append('<div class="tcdPageCode"></div>');
202
//					demandList(true, 5, 1, oDemandAim, oSortType);
203
//				} else if($(this).text() == "不限") {
204
//					oDemandAim = "";
205
//					$(".tcdPageCode").remove();
206
//					$("#shoudao").append('<div class="tcdPageCode"></div>');
207
//					demandList(true, 5, 1, oDemandAim, oSortType);
208
//				} else if($(this).text() == "按最早发布时间排序") {
209
//					oSortType = 1;
210
//					$(".tcdPageCode").remove();
211
//					$("#shoudao").append('<div class="tcdPageCode"></div>');
212
//					demandList(true, 5, 1, oDemandAim, oSortType);
213
//				} else if($(this).text() == "按最新发布时间排序") {
214
//					oSortType = 0;
215
//					$(".tcdPageCode").remove();
216
//					$("#shoudao").append('<div class="tcdPageCode"></div>');
217
//					demandList(true, 5, 1, oDemandAim, oSortType);
218
//				}
219
//				return false;
220
//			});
221
//			$("body").click(function(e) {
222
//				if($(".option4")[0].style.display == "block" || $(".option3")[0].style.display == "block") {
223
//					$(".option4")[0].style.display = "none";
224
//					$(".option3")[0].style.display = "none";
225
//				}
226
//			});
227
//			return false;
228
//		})
229
//	}
230
//	selcet(3);
231
//	selcet(4);
232
//	/*进入needSure.html*/
233
//	$("#demandList").on("click", ".replybtn", function() {
234
//		var demand = $(this).attr("demanid");
235
//		location.href = "needSure.html?demandId=" + demand;
236
//	})
237 106
})