jack 7 years ago
parent
commit
455f86ad1c
4 changed files with 432 additions and 335 deletions
  1. 5 29
      cmp-portal/js/cmp-updateinfo.js
  2. 238 206
      cmp-portal/js/public/common.js
  3. 125 98
      js/common.js
  4. 64 2
      patentShow.html

+ 5 - 29
cmp-portal/js/cmp-updateinfo.js

@ -162,32 +162,7 @@ $(document).ready(function() {
162 162
		$(this).parent().remove();
163 163

164 164
	})
165
	/*添加*/
166
	$("button:contains('添加')").click(function() {
167
		var oValue = $(this).siblings("input").val().trim();
168
		var oJudge = $(this).parent().siblings().find("ul.ulspace li");
169
		if(!oValue) {
170
			$.MsgBox.Alert('提示', '请先填写内容');
171
			return;
172
		}
173
		if(oValue.length > 10) {
174
			$.MsgBox.Alert('提示', '添加内容不能超过10个字');
175
			return;
176
		}
177
		for(var i = 0; i < oJudge.length; i++) {
178
			if(oValue == oJudge[i].innerText) {
179
				$.MsgBox.Alert('提示', '添加内容不能重复');
180
				return;
181
			}
182
		}
183
		$(this).parent().siblings().find("ul.ulspace").append('<li>' + oValue + '<div class="closeThis"></div></li>');
184
		$(this).hide();
185
		$(this).siblings("input").val("");
186
		if(oJudge.length == 4) {
187
			$(this).val("").parents(".col-w-12").hide();
188
		}
189
		$(this).siblings(".keydrop").find("ul").html("");
190
	})
165
	hotKey(".oinput",10,5);
191 166

192 167
	/*保存*/
193 168
	$("button:contains('保存')").click(function() {
@ -239,10 +214,10 @@ $(document).ready(function() {
239 214
		}
240 215
		$info.forShort = $("#businessAbbreviation").val();
241 216
		if($("#orgType").find("option:selected").text() != "请选择最符合的一项") {
242
			$info.orgType = $("#orgType").find("option:selected").text()
217
			$info.orgType = $("#orgType").find("option:selected").val()
243 218
		}
244 219
		if($("#qualificationList").find("option:selected").text() != "请选择员工数量范围") {
245
			$info.orgSize = $("#qualificationList").find("option:selected").text();
220
			$info.orgSize = $("#qualificationList").find("option:selected").val();
246 221
		}
247 222
		if($("#inteAddress").val().trim()) {
248 223
			if($("#inteAddress").val().trim().length > 20) {
@ -277,7 +252,7 @@ $(document).ready(function() {
277 252
			}
278 253
		}
279 254
		if($("#mail").val().trim()) {
280
			if($("#mail").val().trim().indexOf("@")) {
255
			if($("#mail").val().trim().indexOf("@")!=-1) {
281 256
				$info.email = $("#mail").val();
282 257
			} else {
283 258
				$.MsgBox.Alert('提示', '邮箱格式不正确');
@ -299,6 +274,7 @@ $(document).ready(function() {
299 274
			beforeSend: function() {},
300 275
			success: function(data, textState) {
301 276
				if(data.success) {
277
					return;
302 278
					$.MsgBox.Alert('提示', '修改成功');
303 279
					$("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain');
304 280
					setTimeout(function() {

+ 238 - 206
cmp-portal/js/public/common.js

@ -1,41 +1,43 @@
1
$(document).ready(function(){
1
$(document).ready(function() {
2 2
	$(".unlogin").removeClass("displayNone");
3
	
3
4 4
	var footerHeight = $("footer").outerHeight(true);
5
	$('#container').css("padding-bottom", footerHeight +"px" );
5
	$('#container').css("padding-bottom", footerHeight + "px");
6 6
	//窗口大小变更事件
7 7
	$(window).resize(function() {
8
		footerHeight=$("footer").outerHeight(true);
9
		$('#container').css("padding-bottom", footerHeight +"px" );
8
		footerHeight = $("footer").outerHeight(true);
9
		$('#container').css("padding-bottom", footerHeight + "px");
10 10
		//console.log(footerHeight)
11 11
	});
12
	
12
13 13
	$(document).scroll(function() {
14 14
		var top = $(document).scrollTop();
15
		if (top == 0) {
15
		if(top == 0) {
16 16
			$(".navheader").removeClass("navhdown");
17 17
		} else {
18 18
			$(".navheader").addClass("navhdown");
19 19
		}
20 20
	})
21 21
	//退出登录转态
22
	$("#exitLogin").on("click",function(){
22
	$("#exitLogin").on("click", function() {
23 23
		exit();
24 24
	})
25 25
	//判断登录转态
26 26
	var orgId = $.cookie("orgId");
27
	if (orgId && orgId != "null" && orgId != null) {
27
	if(orgId && orgId != "null" && orgId != null) {
28 28
		$(".unlogin").addClass("displayNone");
29 29
		$(".onlogin").removeClass("displayNone");
30 30
		$.ajax("/ajax/image/hasOrgLogo", {
31
			data:{"id":orgId},
31
			data: {
32
				"id": orgId
33
			},
32 34
			type: "GET",
33 35
			dataType: 'json',
34 36
			async: false,
35 37
			success: function($data) {
36
				if($data.success){
37
					if($data.data){
38
						$("#imglogo").attr("src","/images/org/"+orgId+".jpg");
38
				if($data.success) {
39
					if($data.data) {
40
						$("#imglogo").attr("src", "/images/org/" + orgId + ".jpg");
39 41
					}
40 42
				}
41 43
			},
@ -43,106 +45,111 @@ $(document).ready(function(){
43 45
				$.MsgBox.Alert('提示', '服务器请求失败')
44 46
			},
45 47
		});
46
	}else{
48
	} else {
47 49
		$(".unlogin").removeClass("displayNone");
48 50
		$(".onlogin").addClass("displayNone");
49 51
	}
50 52
});
51 53
//Model模态框打开关闭
52
function modelOpen(){
54
function modelOpen() {
53 55
	$(".blackcover").fadeIn();
54 56
	$(".modelContain").slideDown();
55 57
	$("body").addClass("modelOpen");
56 58
}
57
function modelClose(){
59
60
function modelClose() {
58 61
	$(".modelContain").slideUp();
59 62
	$(".blackcover").fadeOut();
60 63
	$("body").removeClass("modelOpen");
61 64
}
62 65
63
function exit(){
64
	$.cookie('orgId', null,{path:"/"}); 
65
	$.cookie('orgAuth', null,{path:"/"}); 
66
	$.cookie('orgEmail', null,{path:"/"}); 
67
	$.cookie('orgName', null,{path:"/"}); 
68
	$.cookie('orgType', null,{path:"/"}); 
69
	location.href="cmp-settled-log.html"	
66
function exit() {
67
	$.cookie('orgId', null, {
68
		path: "/"
69
	});
70
	$.cookie('orgAuth', null, {
71
		path: "/"
72
	});
73
	$.cookie('orgEmail', null, {
74
		path: "/"
75
	});
76
	$.cookie('orgName', null, {
77
		path: "/"
78
	});
79
	$.cookie('orgType', null, {
80
		path: "/"
81
	});
82
	location.href = "cmp-settled-log.html"
70 83
}
71 84
72
73
74
75 85
//截取url传值
76
function GetQueryString(name) { 
77
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 	
78
	var r = window.location.search.substr(1).match(reg);  //��ȡurl��"?"�����ַ�����ƥ��
86
function GetQueryString(name) {
87
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
88
	var r = window.location.search.substr(1).match(reg); //��ȡurl��"?"�����ַ�����ƥ��
79 89
80
	var context = ""; 
81
	if (r != null) 
82
		 context = r[2]; 
83
	reg = null; 
84
	r = null; 
85
	return context == null || context == "" || context == "undefined" ? "" : decodeURI(context); 
90
	var context = "";
91
	if(r != null)
92
		context = r[2];
93
	reg = null;
94
	r = null;
95
	return context == null || context == "" || context == "undefined" ? "" : decodeURI(context);
86 96
}
87 97
88 98
//转换格式
89
function changeTime(dealtime){
90
	   var s = dealtime;
91
	   //console.log(s);
92
	   if(dealtime.length==8){
93
	   	var y = s.substr(0,4);
94
	   var m = s.substr(4,2);
95
	   var d = s.substr(6,2);			  
96
	   var formatTime = y+"-"+m+"-"+d;
99
function changeTime(dealtime) {
100
	var s = dealtime;
101
	//console.log(s);
102
	if(dealtime.length == 8) {
103
		var y = s.substr(0, 4);
104
		var m = s.substr(4, 2);
105
		var d = s.substr(6, 2);
106
		var formatTime = y + "-" + m + "-" + d;
97 107
		return formatTime;
98
	   }
99
	   else
100
	   {
101
	   	var y = s.substr(0,4);
102
	   var m = s.substr(4,2);
103
	   var d = s.substr(6,2);
104
	   var h = s.substr(8,2);
105
	   var minute = s.substr(10,2);
106
	   var formatTime = y+"-"+m+"-"+d+" "+h+":"+minute;
108
	} else {
109
		var y = s.substr(0, 4);
110
		var m = s.substr(4, 2);
111
		var d = s.substr(6, 2);
112
		var h = s.substr(8, 2);
113
		var minute = s.substr(10, 2);
114
		var formatTime = y + "-" + m + "-" + d + " " + h + ":" + minute;
107 115
		return formatTime;
108
	   }
109
	   
110 116
	}
117
118
}
111 119
//过滤特殊字符  
112
function replaceStr(s) 
113
{ 
120
function replaceStr(s) {
114 121
	var pattern = new RegExp("-");
115
	var rs = ""; 
116
	for (var i = 0; i < s.length; i++) { 
117
		rs = rs+s.substr(i, 1).replace(pattern, ''); 
118
	} 
119
	return rs; 
120
} 	
122
	var rs = "";
123
	for(var i = 0; i < s.length; i++) {
124
		rs = rs + s.substr(i, 1).replace(pattern, '');
125
	}
126
	return rs;
127
}
121 128
122 129
//根据用户输入的Email跳转到相应的电子邮箱首页  
123
var hash={  
124
    'qq.com': 'http://mail.qq.com',  
125
    'gmail.com': 'http://mail.google.com',  
126
    'sina.com': 'http://mail.sina.com.cn',  
127
    '163.com': 'http://mail.163.com',  
128
    '126.com': 'http://mail.126.com',  
129
    'yeah.net': 'http://www.yeah.net/',  
130
    'sohu.com': 'http://mail.sohu.com/',  
131
    'tom.com': 'http://mail.tom.com/',  
132
    'sogou.com': 'http://mail.sogou.com/',  
133
    '139.com': 'http://mail.10086.cn/',  
134
    'hotmail.com': 'http://www.hotmail.com',  
135
    'live.com': 'http://login.live.com/',  
136
    'live.cn': 'http://login.live.cn/',  
137
    'live.com.cn': 'http://login.live.com.cn',  
138
    '189.com': 'http://webmail16.189.cn/webmail/',  
139
    'yahoo.com.cn': 'http://mail.cn.yahoo.com/',  
140
    'yahoo.cn': 'http://mail.cn.yahoo.com/',  
141
    'eyou.com': 'http://www.eyou.com/',  
142
    '21cn.com': 'http://mail.21cn.com/',  
143
    '188.com': 'http://www.188.com/',
144
    'ustb.edu.cn': 'http://mail.ustb.edu.cn/',
145
    'foxmail.coom': 'http://www.foxmail.com'  
130
var hash = {
131
	'qq.com': 'http://mail.qq.com',
132
	'gmail.com': 'http://mail.google.com',
133
	'sina.com': 'http://mail.sina.com.cn',
134
	'163.com': 'http://mail.163.com',
135
	'126.com': 'http://mail.126.com',
136
	'yeah.net': 'http://www.yeah.net/',
137
	'sohu.com': 'http://mail.sohu.com/',
138
	'tom.com': 'http://mail.tom.com/',
139
	'sogou.com': 'http://mail.sogou.com/',
140
	'139.com': 'http://mail.10086.cn/',
141
	'hotmail.com': 'http://www.hotmail.com',
142
	'live.com': 'http://login.live.com/',
143
	'live.cn': 'http://login.live.cn/',
144
	'live.com.cn': 'http://login.live.com.cn',
145
	'189.com': 'http://webmail16.189.cn/webmail/',
146
	'yahoo.com.cn': 'http://mail.cn.yahoo.com/',
147
	'yahoo.cn': 'http://mail.cn.yahoo.com/',
148
	'eyou.com': 'http://www.eyou.com/',
149
	'21cn.com': 'http://mail.21cn.com/',
150
	'188.com': 'http://www.188.com/',
151
	'ustb.edu.cn': 'http://mail.ustb.edu.cn/',
152
	'foxmail.coom': 'http://www.foxmail.com'
146 153
};
147 154
/*标志*/
148 155
function autho() {
@ -163,7 +170,7 @@ function autho() {
163 170
					"sty": "authicon-real",
164 171
					"title": "实名认证用户"
165 172
				}
166
			}else{
173
			} else {
167 174
				return {
168 175
					"sty": "e",
169 176
					"title": " "
@ -198,146 +205,171 @@ $(document).on("click", "#City li a", function() {
198 205
	}
199 206
});
200 207
208
function hotKey(sel,fontSizeNum,keyNum) {
201 209
202
$(".oinput").bind({
203
	paste: function(e) {
204
		var pastedText;
205
		if (window.clipboardData  &&  window.clipboardData.getData)  {  // IE
206
			            
207
			pastedText  = $(this).val() +  window.clipboardData.getData('Text');          
208
209
		else  {            
210
			pastedText  = $(this).val() +  e.originalEvent.clipboardData.getData('Text'); //e.clipboardData.getData('text/plain');
211
			          
212
		}
213
		$(this).val(pastedText.substring(0, 10));
214
215
		var $this = $(this);
216
		setTimeout(function() {
217
			if($this.val().trim()) {
218
				$this.siblings("button").show();
219
			} else {
220
				$this.siblings("button").hide();
221
			}
222
		}, 1);
223
		e.preventDefault();
224
	},
225
	cut: function(e) {
226
		var $this = $(this);
227
		setTimeout(function() {
228
			if($this.val().trim()) {
229
				$this.siblings("button").show();
230
			} else {
231
				$this.siblings("button").hide();
210
	$(sel).bind({
211
		paste: function(e) {
212
			var pastedText;
213
			if (window.clipboardData  &&  window.clipboardData.getData)  {  // IE
214
				            
215
				pastedText  = $(this).val() +  window.clipboardData.getData('Text');          
216
			
217
			else  {            
218
				pastedText  = $(this).val() +  e.originalEvent.clipboardData.getData('Text'); //e.clipboardData.getData('text/plain');
219
				          
232 220
			}
233
		}, 1);
234
	},
235
	blur:function(){
236
		var $this=$(this);
237
	setTimeout(function(){
238
		$this.siblings(".keydrop").hide();
239
	},500)
240
	},
241
	focus:function(){
242
		$(this).siblings(".keydrop").show();
243
	},
244
	keyup: function(e) {
245
		if($(this).val().trim()) {
246
			$(this).siblings("button").show();
247
			var lNum = $.trim($(this).val()).length;
248
			if(lNum > 10) {
249
				$(this).val($(this).val().substr(0, 10));
250
			} else if(0 < lNum && lNum < 10) {
251
				var $this = $(this)
252
				$("#addKeyword").show();
253
				$.ajax({
254
					"url": "/ajax/dataDict/qaHotKey",
255
					"type": "GET",
256
					"success": function(data) {
257
						console.log(data);
258
						if(data.success) {
259
							if(data.data.length == 0) {
221
			$(this).val(pastedText);
222
223
			var $this = $(this);
224
			setTimeout(function() {
225
				if($this.val().trim()) {
226
					$this.siblings("button").show();
227
				} else {
228
					$this.siblings("button").hide();
229
				}
230
			}, 1);
231
			e.preventDefault();
232
		},
233
		cut: function(e) {
234
			var $this = $(this);
235
			setTimeout(function() {
236
				if($this.val().trim()) {
237
					$this.siblings("button").show();
238
				} else {
239
					$this.siblings("button").hide();
240
				}
241
			}, 1);
242
		},
243
		blur: function() {
244
			var $this = $(this);
245
			setTimeout(function() {
246
				$this.siblings(".keydrop").hide();
247
			}, 500)
248
		},
249
		focus: function() {
250
			$(this).siblings(".keydrop").show();
251
		},
252
		keyup: function(e) {
253
			if($(this).val().trim()) {
254
				$(this).siblings("button").show();
255
				var lNum = $.trim($(this).val()).length;
256
				if(0 < lNum) {
257
					var $this = $(this)
258
					$("#addKeyword").show();
259
					$.ajax({
260
						"url": "/ajax/dataDict/qaHotKey",
261
						"type": "GET",
262
						"success": function(data) {
263
							console.log(data);
264
							if(data.success) {
265
								if(data.data.length == 0) {
266
									$this.siblings(".keydrop").addClass("displayNone");
267
									$this.siblings(".keydrop").find("ul").html("");
268
								} else {
269
									$this.siblings(".keydrop").removeClass("displayNone");
270
									var oSr = "";
271
									for(var i = 0; i < data.data.length; i++) {
272
										oSr += '<li>' + data.data[i].caption + '<div class="closeThis"></div></li>';
273
									}
274
									$this.siblings(".keydrop").find("ul").html(oSr);
275
								}
276
							} else {
260 277
								$this.siblings(".keydrop").addClass("displayNone");
261 278
								$this.siblings(".keydrop").find("ul").html("");
262
							} else {
263
								$this.siblings(".keydrop").removeClass("displayNone");
264
								var oSr = "";
265
								for(var i = 0; i < data.data.length; i++) {
266
									oSr += '<li>' + data.data[i].caption + '<div class="closeThis"></div></li>';
267
								}
268
								$this.siblings(".keydrop").find("ul").html(oSr);
269 279
							}
270
						} else {
271
							$this.siblings(".keydrop").addClass("displayNone");
272
							$this.siblings(".keydrop").find("ul").html("");
280
						},
281
						"data": {
282
							"key": $(this).val()
283
						},
284
						dataType: "json",
285
						'error': function() {
286
							$.MsgBox.Alert('提示', '服务器连接超时!');
273 287
						}
274
					},
275
					"data": {
276
						"key": $(this).val()
277
					},
278
					dataType: "json",
279
					'error': function() {
280
						$.MsgBox.Alert('提示', '服务器连接超时!');
281
					}
282
				});
288
					});
289
				}
290
			} else {
291
				$(this).siblings("button").hide();
292
				$(this).siblings(".keydrop").addClass("displayNone");
293
				$(this).siblings(".keydrop").find("ul").html("");
283 294
			}
284
		} else {
285
			$(this).siblings("button").hide();
286
			$(this).siblings(".keydrop").addClass("displayNone");
287
			$(this).siblings(".keydrop").find("ul").html("");
288 295
		}
289
	}
290
})
291
$(".keydrop").on("click","li",function(){
292
	var oValue = $(this).text();
293
	var oJudge = $(this).parents(".col-w-12").siblings().find("ul.ulspace li");
294
	for(var i = 0; i < oJudge.length; i++) {
295
		if(oValue == oJudge[i].innerText) {
296
			$.MsgBox.Alert('提示', '添加内容不能重复');
297
			return;
296
	})
297
	$(".keydrop").on("click", "li", function() {
298
		var oValue = $(this).text();
299
		var oJudge = $(this).parents(".col-w-12").siblings().find("ul.ulspace li");
300
		for(var i = 0; i < oJudge.length; i++) {
301
			if(oValue == oJudge[i].innerText) {
302
				$.MsgBox.Alert('提示', '添加内容不能重复');
303
				return;
304
			}
298 305
		}
299
	}
300
	$(this).parents(".col-w-12").siblings().find("ul.ulspace").append('<li>' + oValue + '<div class="closeThis"></div></li>');
301
	$(this).parents(".keydrop").siblings("input").val("");
302
	$(this).parents(".keydrop").siblings("button").hide();
303
	if(oJudge.length == 4) {
306
		$(this).parents(".col-w-12").siblings().find("ul.ulspace").append('<li>' + oValue + '<div class="closeThis"></div></li>');
304 307
		$(this).parents(".keydrop").siblings("input").val("");
305
		$(this).parents(".col-w-12").hide();
306
	}
307
	$(this).parent("ul").html("")
308
})
309
308
		$(this).parents(".keydrop").siblings("button").hide();
309
		if(oJudge.length == keyNum-1) {
310
			$(this).parents(".keydrop").siblings("input").val("");
311
			$(this).parents(".col-w-12").hide();
312
		}
313
		$(this).parent("ul").html("")
314
	})
315
	/*添加*/
316
	$("button:contains('添加')").click(function() {
317
		var oValue = $(this).siblings("input").val().trim();
318
		var oJudge = $(this).parent().siblings().find("ul.ulspace li");
319
		if(!oValue) {
320
			$.MsgBox.Alert('提示', '请先填写内容');
321
			return;
322
		}
323
		if(oValue.length > fontSizeNum) {
324
			$.MsgBox.Alert('提示', '添加内容不能超过'+fontSizeNum+'个字');
325
			return;
326
		}
327
		for(var i = 0; i < oJudge.length; i++) {
328
			if(oValue == oJudge[i].innerText) {
329
				$.MsgBox.Alert('提示', '添加内容不能重复');
330
				return;
331
			}
332
		}
333
		$(this).parent().siblings().find("ul.ulspace").append('<li>' + oValue + '<div class="closeThis"></div></li>');
334
		$(this).hide();
335
		$(this).siblings("input").val("");
336
		if(oJudge.length == keyNum-1) {
337
			$(this).val("").parents(".col-w-12").hide();
338
		}
339
		$(this).siblings(".keydrop").find("ul").html("");
340
	})
341
}
310 342
/*时间转换*/
311 343
function TimeTr(dealtime) {
312
	var myDate = new Date(); 
344
	var myDate = new Date();
313 345
	var s = dealtime;
314 346
	var y = s.substr(0, 4);
315 347
	var m = s.substr(4, 2);
316 348
	var d = s.substr(6, 2);
317 349
	var h = s.substr(8, 2);
318 350
	var minute = s.substr(10, 2);
319
	var formatTime = m.replace(/\b(0+)/gi, "") + "月" + d.replace(/\b(0+)/gi, "")+ "日 " + h + ":" + minute;
320
	if(y != myDate.getFullYear()){
321
		formatTime = y + "年" + m.replace(/\b(0+)/gi, "") + "月" + d.replace(/\b(0+)/gi, "")+ "日 " + h + ":" + minute;
351
	var formatTime = m.replace(/\b(0+)/gi, "") + "月" + d.replace(/\b(0+)/gi, "") + "日 " + h + ":" + minute;
352
	if(y != myDate.getFullYear()) {
353
		formatTime = y + "年" + m.replace(/\b(0+)/gi, "") + "月" + d.replace(/\b(0+)/gi, "") + "日 " + h + ":" + minute;
322 354
	}
323 355
	return formatTime;
324 356
}
325 357
/*时间格式转换*/
326
//function timeTran(otm) {
327
//	var month, day, hour, minu;
328
//	var monFirst = otm.substring(4, 5);
329
//	var dayFirst = otm.substring(6, 7);
330
//	if(monFirst == "0") {
331
//		month = otm.substring(5, 6)
332
//	} else {
333
//		month = otm.substring(4, 6)
334
//	}
335
//	if(dayFirst == "0") {
336
//		day = otm.substring(7, 8);
337
//	} else {
338
//		day = otm.substring(6, 8);
339
//	}
340
//	hour = otm.substring(8, 10);
341
//	minu = otm.substring(10, 12);
342
//	return month + "月" + day + "日 " + hour + ":" + minu;
358
//function timeTran(otm) {
359
//	var month, day, hour, minu;
360
//	var monFirst = otm.substring(4, 5);
361
//	var dayFirst = otm.substring(6, 7);
362
//	if(monFirst == "0") {
363
//		month = otm.substring(5, 6)
364
//	} else {
365
//		month = otm.substring(4, 6)
366
//	}
367
//	if(dayFirst == "0") {
368
//		day = otm.substring(7, 8);
369
//	} else {
370
//		day = otm.substring(6, 8);
371
//	}
372
//	hour = otm.substring(8, 10);
373
//	minu = otm.substring(10, 12);
374
//	return month + "月" + day + "日 " + hour + ":" + minu;
343 375
//}

+ 125 - 98
js/common.js

@ -674,111 +674,138 @@ var orgTypeShow={"2":"上市企业","3":"国有企业","4":"合资企业","5":"
674 674
//学位
675 675
var eduDegree={"1":"博士","2":"硕士","3":"学士","4":"大专","5":"其他"}
676 676
677
$(".oinput").bind({
678
	paste: function(e) {
679
		var pastedText;
680
		if (window.clipboardData  &&  window.clipboardData.getData)  {  // IE
681
			            
682
			pastedText  = $(this).val() +  window.clipboardData.getData('Text');          
683
		} 
684
		else  {            
685
			pastedText  = $(this).val() +  e.originalEvent.clipboardData.getData('Text'); //e.clipboardData.getData('text/plain');
686
			          
687
		}
688
		$(this).val(pastedText.substring(0, 10));
689
690
		var $this = $(this);
691
		setTimeout(function() {
692
			if($this.val().trim()) {
693
				$this.siblings("button").show();
694
			} else {
695
				$this.siblings("button").hide();
696
			}
697
		}, 1);
698
		e.preventDefault();
699
	},
700
	cut: function(e) {
701
		var $this = $(this);
702
		setTimeout(function() {
703
			if($this.val().trim()) {
704
				$this.siblings("button").show();
705
			} else {
706
				$this.siblings("button").hide();
677
function hotKey(sel,fontSizeNum,keyNum) {
678
679
	$(sel).bind({
680
		paste: function(e) {
681
			var pastedText;
682
			if (window.clipboardData  &&  window.clipboardData.getData)  {  // IE
683
				            
684
				pastedText  = $(this).val() +  window.clipboardData.getData('Text');          
685
			
686
			else  {            
687
				pastedText  = $(this).val() +  e.originalEvent.clipboardData.getData('Text'); //e.clipboardData.getData('text/plain');
688
				          
707 689
			}
708
		}, 1);
709
	},
710
	blur:function(){
711
		var $this=$(this);
712
	setTimeout(function(){
713
		$this.siblings(".keydrop").hide();
714
	},500)
715
	},
716
	focus:function(){
717
		$(this).siblings(".keydrop").show();
718
	},
719
	keyup: function(e) {
720
		if($(this).val().trim()) {
721
			$(this).siblings("button").show();
722
			var lNum = $.trim($(this).val()).length;
723
			if(lNum > 10) {
724
				$(this).val($(this).val().substr(0, 10));
725
			} else if(0 < lNum && lNum < 10) {
726
				var $this = $(this)
727
				$("#addKeyword").show();
728
				$.ajax({
729
					"url": "/ajax/dataDict/qaHotKey",
730
					"type": "GET",
731
					"success": function(data) {
732
						console.log(data);
733
						if(data.success) {
734
							if(data.data.length == 0) {
690
			$(this).val(pastedText);
691
692
			var $this = $(this);
693
			setTimeout(function() {
694
				if($this.val().trim()) {
695
					$this.siblings("button").show();
696
				} else {
697
					$this.siblings("button").hide();
698
				}
699
			}, 1);
700
			e.preventDefault();
701
		},
702
		cut: function(e) {
703
			var $this = $(this);
704
			setTimeout(function() {
705
				if($this.val().trim()) {
706
					$this.siblings("button").show();
707
				} else {
708
					$this.siblings("button").hide();
709
				}
710
			}, 1);
711
		},
712
		blur: function() {
713
			var $this = $(this);
714
			setTimeout(function() {
715
				$this.siblings(".keydrop").hide();
716
			}, 500)
717
		},
718
		focus: function() {
719
			$(this).siblings(".keydrop").show();
720
		},
721
		keyup: function(e) {
722
			if($(this).val().trim()) {
723
				$(this).siblings("button").show();
724
				var lNum = $.trim($(this).val()).length;
725
				if(0 < lNum) {
726
					var $this = $(this)
727
					$("#addKeyword").show();
728
					$.ajax({
729
						"url": "/ajax/dataDict/qaHotKey",
730
						"type": "GET",
731
						"success": function(data) {
732
							console.log(data);
733
							if(data.success) {
734
								if(data.data.length == 0) {
735
									$this.siblings(".keydrop").addClass("displayNone");
736
									$this.siblings(".keydrop").find("ul").html("");
737
								} else {
738
									$this.siblings(".keydrop").removeClass("displayNone");
739
									var oSr = "";
740
									for(var i = 0; i < data.data.length; i++) {
741
										oSr += '<li>' + data.data[i].caption + '<div class="closeThis"></div></li>';
742
									}
743
									$this.siblings(".keydrop").find("ul").html(oSr);
744
								}
745
							} else {
735 746
								$this.siblings(".keydrop").addClass("displayNone");
736 747
								$this.siblings(".keydrop").find("ul").html("");
737
							} else {
738
								$this.siblings(".keydrop").removeClass("displayNone");
739
								var oSr = "";
740
								for(var i = 0; i < data.data.length; i++) {
741
									oSr += '<li>' + data.data[i].caption + '<div class="closeThis"></div></li>';
742
								}
743
								$this.siblings(".keydrop").find("ul").html(oSr);
744 748
							}
745
						} else {
746
							$this.siblings(".keydrop").addClass("displayNone");
747
							$this.siblings(".keydrop").find("ul").html("");
749
						},
750
						"data": {
751
							"key": $(this).val()
752
						},
753
						dataType: "json",
754
						'error': function() {
755
							$.MsgBox.Alert('提示', '服务器连接超时!');
748 756
						}
749
					},
750
					"data": {
751
						"key": $(this).val()
752
					},
753
					dataType: "json",
754
					'error': function() {
755
						$.MsgBox.Alert('提示', '服务器连接超时!');
756
					}
757
				});
757
					});
758
				}
759
			} else {
760
				$(this).siblings("button").hide();
761
				$(this).siblings(".keydrop").addClass("displayNone");
762
				$(this).siblings(".keydrop").find("ul").html("");
758 763
			}
759
		} else {
760
			$(this).siblings("button").hide();
761
			$(this).siblings(".keydrop").addClass("displayNone");
762
			$(this).siblings(".keydrop").find("ul").html("");
763 764
		}
764
	}
765
})
766
$(".keydrop").on("click","li",function(){
767
	var oValue = $(this).text();
768
	var oJudge = $(this).parents(".col-w-12").siblings().find("ul.ulspace li");
769
	for(var i = 0; i < oJudge.length; i++) {
770
		if(oValue == oJudge[i].innerText) {
771
			$.MsgBox.Alert('提示', '添加内容不能重复');
772
			return;
765
	})
766
	$(".keydrop").on("click", "li", function() {
767
		var oValue = $(this).text();
768
		var oJudge = $(this).parents(".col-w-12").siblings().find("ul.ulspace li");
769
		for(var i = 0; i < oJudge.length; i++) {
770
			if(oValue == oJudge[i].innerText) {
771
				$.MsgBox.Alert('提示', '添加内容不能重复');
772
				return;
773
			}
773 774
		}
774
	}
775
	$(this).parents(".col-w-12").siblings().find("ul.ulspace").append('<li>' + oValue + '<div class="closeThis"></div></li>');
776
	$(this).parents(".keydrop").siblings("input").val("");
777
	$(this).parents(".keydrop").siblings("button").hide();
778
	if(oJudge.length == 4) {
775
		$(this).parents(".col-w-12").siblings().find("ul.ulspace").append('<li>' + oValue + '<div class="closeThis"></div></li>');
779 776
		$(this).parents(".keydrop").siblings("input").val("");
780
		$(this).parents(".col-w-12").hide();
781
	}
782
	$(this).parent("ul").html("")
783
})
777
		$(this).parents(".keydrop").siblings("button").hide();
778
		if(oJudge.length == keyNum-1) {
779
			$(this).parents(".keydrop").siblings("input").val("");
780
			$(this).parents(".col-w-12").hide();
781
		}
782
		$(this).parent("ul").html("")
783
	})
784
	/*添加*/
785
	$("button:contains('添加')").click(function() {
786
		var oValue = $(this).siblings("input").val().trim();
787
		var oJudge = $(this).parent().siblings().find("ul.ulspace li");
788
		if(!oValue) {
789
			$.MsgBox.Alert('提示', '请先填写内容');
790
			return;
791
		}
792
		if(oValue.length > fontSizeNum) {
793
			$.MsgBox.Alert('提示', '添加内容不能超过'+fontSizeNum+'个字');
794
			return;
795
		}
796
		for(var i = 0; i < oJudge.length; i++) {
797
			if(oValue == oJudge[i].innerText) {
798
				$.MsgBox.Alert('提示', '添加内容不能重复');
799
				return;
800
			}
801
		}
802
		$(this).parent().siblings().find("ul.ulspace").append('<li>' + oValue + '<div class="closeThis"></div></li>');
803
		$(this).hide();
804
		$(this).siblings("input").val("");
805
		if(oJudge.length == keyNum-1) {
806
			$(this).val("").parents(".col-w-12").hide();
807
		}
808
		$(this).siblings(".keydrop").find("ul").html("");
809
	})
810
}
784 811

+ 64 - 2
patentShow.html

@ -32,6 +32,9 @@
32 32
				margin-top:-3px;
33 33
				margin-left:12px;
34 34
			}
35
			.paentBaseMess{
36
				overflow: hidden;
37
			}
35 38
			.paentBaseMess li{
36 39
				width:350px;
37 40
				float:left;
@ -58,9 +61,49 @@
58 61
				left:0;
59 62
				
60 63
			}
61
			.paentContent{
64
			#paentContent {
62 65
				width:100%;
63 66
			}
67
			#paentContent p{
68
				font-size:14px;
69
				line-height:28px;
70
				padding:6px 0px 24px 0px;
71
				color:#666;
72
			}
73
			.paentBaseMess li div span {
74
				cursor:pointer;
75
				margin-right:10px;
76
				display: inline-block;
77
				border-radius:15px;
78
				border:1px solid #e5e5e5;
79
				padding:5px 10px;
80
			}
81
			.author {
82
				overflow:hidden;
83
			}
84
			.author .authorTitle {
85
				font-size:18px;
86
				color:#666;
87
				font-weight:800;
88
				margin-bottom:30px;
89
			}
90
			.author .authorList li {
91
				padding:20px;
92
				border:1px solid #e5e5e5;
93
				
94
			}
95
			.author .authorList li div{
96
				float:left;
97
			}
98
			.author .authorList li .prohead {
99
				    background-image: url(../images/default-photo.jpg);
100
    				border-radius: 50%;
101
    				width:50px;
102
    				height:50px;
103
    				border: 1px solid #999;
104
    				background-position: center;
105
				}
106
			
64 107
		</style>
65 108
		<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
66 109
	</head>
@ -95,7 +138,7 @@
95 138
							<li><em>申请日&nbsp;:&nbsp;</em><span>2017年2月8号</span></li>
96 139
							<li><em>公开日&nbsp;:&nbsp;</em><span>2017年2月8号</span></li>
97 140
							<li><em>申请人&nbsp;:&nbsp;</em><span>重庆悠悠新材料有限公司</span></li>
98
							<li class="paentContent"><em>摘要&nbsp;:&nbsp;</em>
141
							<li id="paentContent"><em>摘要&nbsp;:&nbsp;</em>
99 142
							<p>	
100 143
								本发明公开了基于环保的理念设计的新材料加工设备本体和用于新材料加工设备轧机自动模式和手动模式
101 144
								换辊;主液压、辅助液压系统操作;支撑辊润滑、齿轮辊润滑系统操作;电机冷却风机系统操作;轧机段主
@ -104,8 +147,27 @@
104 147
								控;轧制力是否稳定异常监控;轧机、卷取机电流、前滑值、张力偏差、调平等异常监控;BUR润滑温度、液位异常
105 148
								监控;测厚仪是否需要校正异常监控;测厚仪出现重故障监控点;计算辊印产生的位置;板型异常控制;等等
106 149
							</p>
150
							<div>
151
								<span>金属材料金属材料金属</span>
152
								<span>金属材料</span>
153
								<span>金属材料</span>
154
								<span>金属材料金属材料金属</span>
155
								<span>金属材料</span>
156
							</div>
107 157
							</li>
108 158
						</ul>
159
						<div class="author">
160
							<div class="authorTitle">发明人</div>
161
							<ul class="authorList">
162
								<li>
163
									<div class="prohead"></div>
164
									<div>
165
										<p class="h1Font"><span>张大大</span><em class="authiconNew authicon-pro" title="科袖认证专家"></em></p>
166
										<p>教授级高工,董事长兼,北京科袖科技有限公司</p>
167
									</div>
168
								</li>
169
							</ul>
170
						</div>
109 171
					</div>
110 172
					<div class="rightconBox floatR">
111 173
						<ul class="advertItem">