jack 7 years ago
parent
commit
710f796250
4 changed files with 13 additions and 20 deletions
  1. 1 9
      js/patentImport.js
  2. 1 1
      js/patentList.js
  3. 10 9
      js/patentShow.js
  4. 1 1
      patentShow.html

+ 1 - 9
js/patentImport.js

64

64

65
	function resourceHtml($data) {
65
	function resourceHtml($data) {
66
		for(var i = 0; i < $data.length; i++) {
66
		for(var i = 0; i < $data.length; i++) {
67
			var imgSrc = "../images/default-resource.jpg";
68
			var oSpec = "",
67
			var oSpec = "",
69
				comp = "";
68
				comp = "";
70
			if($data[i].img) {
71
				imgSrc = "/data/resource/" + $data[i].img;
72
			}
73
			if($data[i].authors) {
69
			if($data[i].authors) {
74
				oSpec = "发明人:" + $data[i].authors;
70
				oSpec = "发明人:" + $data[i].authors;
75

71

77
			if($data[i].code) {
73
			if($data[i].code) {
78
				comp = "专利号:" + $data[i].code;
74
				comp = "专利号:" + $data[i].code;
79
			}
75
			}
80
			var oImg = "";
81
			if($data[i].img) {
82
				oImg = $data[i].img;
83
			}
84
			var oT, oText,cs;
76
			var oT, oText,cs;
85
			if($data[i].professorId.substring(0,1)!="#") {
77
			if($data[i].professorId.substring(0,1)!="#") {
86
				oT = "importSpan-2";
78
				oT = "importSpan-2";
93
			}
85
			}
94
			var oString = '<li>' +
86
			var oString = '<li>' +
95
				'<a class="flexCenter">' +
87
				'<a class="flexCenter">' +
96
				'<div class="madiaHead resouseHead" style="background-image: url(' + imgSrc + ');"></div>' +
88
				'<div class="madiaHead patentHead"></div>' +
97
				'<div class="madiaInfo">' +
89
				'<div class="madiaInfo">' +
98
				'<p class="h1Font ellipsisSty">' + $data[i].name + '</p>' +
90
				'<p class="h1Font ellipsisSty">' + $data[i].name + '</p>' +
99
				'<p class="h2Font ellipsisSty">' + oSpec + '</p>' +
91
				'<p class="h2Font ellipsisSty">' + oSpec + '</p>' +

+ 1 - 1
js/patentList.js

70
 			
70
 			
71
	 	var oStr='<li '+oLi+'>'+
71
	 	var oStr='<li '+oLi+'>'+
72
				'<a href="'+oHtml+'?patentId='+$data[i].id+'" target="_blank">'+
72
				'<a href="'+oHtml+'?patentId='+$data[i].id+'" target="_blank">'+
73
					'<div class="madiaHead resouseHead"></div>'	+						
73
					'<div class="madiaHead patentHead"></div>'	+						
74
						'<div class="madiaInfo">'+					
74
						'<div class="madiaInfo">'+					
75
							'<p class="h1Font ellipsisSty">'+$data[i].name+'</p>'+						
75
							'<p class="h1Font ellipsisSty">'+$data[i].name+'</p>'+						
76
							'<ul class="h2Font clearfix">'+
76
							'<ul class="h2Font clearfix">'+

+ 10 - 9
js/patentShow.js

54
		$.MsgBox.Alert('提示', "服务器链接超时");
54
		$.MsgBox.Alert('提示', "服务器链接超时");
55
	}
55
	}
56
	Patent.prototype.keyword = function($key) {
56
	Patent.prototype.keyword = function($key) {
57
		console.log($key)
58
		for(var i in $key.split(",")) {
57
		for(var i in $key.split(",")) {
59
			if(this.flag == 1) {
58
			if(this.flag == 1) {
60
				$("#paperSList").append("<li>" + $key.split(",")[i] + "<div class='closeThis'></div></li>");
59
				$("#paperSList").append("<li>" + $key.split(",")[i] + "<div class='closeThis'></div></li>");
65
		}
64
		}
66
	}
65
	}
67
	Patent.prototype.patentMess = function($data, $obj) {
66
	Patent.prototype.patentMess = function($data, $obj) {
68
		console.log($data);
69
		if($obj.flag == 1) {
67
		if($obj.flag == 1) {
70
			$(".advertItem,.tagList").hide();
68
			$(".advertItem,.tagList").hide();
71
			hotKey(".oinput", 10);
69
			hotKey(".oinput", 10);
103
		}
101
		}
104
		var weibotitle = $data.name;
102
		var weibotitle = $data.name;
105
		var weibourl = window.location.href;
103
		var weibourl = window.location.href;
106
		var weibopic = "http://" + window.location.host + "/images/default-resource.jpg";
104
		var weibopic = "http://" + window.location.host + "/images/default-patent.jpg";
107
		$("#weibo").attr("href", "http://service.weibo.com/share/share.php?appkey=3677230589&title=" + encodeURIComponent(weibotitle) + "&url=" + encodeURIComponent(weibourl) + "&pic=" + encodeURIComponent(weibopic) + "&content=utf-8" + "&ralateUid=6242830109&searchPic=false&style=simple");
105
		$("#weibo").attr("href", "http://service.weibo.com/share/share.php?appkey=3677230589&title=" + encodeURIComponent(weibotitle) + "&url=" + encodeURIComponent(weibourl) + "&pic=" + encodeURIComponent(weibopic) + "&content=utf-8" + "&ralateUid=6242830109&searchPic=false&style=simple");
108
	}
106
	}
109
	Patent.prototype.patentAuth = function($data, $obj) {
107
	Patent.prototype.patentAuth = function($data, $obj) {
110
		console.log($data);
111
		if($data.length < 4) {
108
		if($data.length < 5) {
112
			$(".lastBtn").hide();
109
			$(".lastBtn").hide();
110
			$("#faM").addClass('removeHe');
113
		} else {
111
		} else {
114
			$(".lastBtn").find("span").text($data.length);
112
			$(".lastBtn").find("span").text($data.length);
115
		}
113
		}
136
		}
134
		}
137
	}
135
	}
138
	Patent.prototype.profess = function($data, $obj) {
136
	Patent.prototype.profess = function($data, $obj) {
139
		console.log($data);
140
		var img;
137
		var img;
141
		var oClass = autho($data.authType, $data.orgAuth, $data.authStatus);
138
		var oClass = autho($data.authType, $data.orgAuth, $data.authStatus);
142
		var csAuto, oId;
139
		var csAuto, oId;
217
		$("#delete").on("click", function() {
214
		$("#delete").on("click", function() {
218
			$.MsgBox.Confirm("提示", "确认删除该专利?", $obj.delePatent);
215
			$.MsgBox.Confirm("提示", "确认删除该专利?", $obj.delePatent);
219
		});
216
		});
217
		$(".lastBtn").on("click", function() {
218
			$(this).hide().parent().addClass('removeHe');
219
		});
220
		$(".tagList").on("click","li",function() {
221
			location.href = "searchNew.html?searchContent=" + $(this).text() + "&tagflag=5";
222
		});
220
	}
223
	}
221
	Patent.prototype.pageview = function() {};
224
	Patent.prototype.pageview = function() {};
222
	Patent.prototype.captiureSubInd = function(subIndu) {
225
	Patent.prototype.captiureSubInd = function(subIndu) {
230
			};
233
			};
231
			industryAll = industryAll.substring(0, industryAll.length - 1);
234
			industryAll = industryAll.substring(0, industryAll.length - 1);
232
		}
235
		}
233
		console.log(industryAll)
234
		return industryAll;
236
		return industryAll;
235
	}
237
	}
236
	Patent.prototype.pubPatent = function() {
238
	Patent.prototype.pubPatent = function() {
237
		var $key = oPent.captiureSubInd("paperSList");
239
		var $key = oPent.captiureSubInd("paperSList");
238
		console.log($key)
239
		oPent.ajax({
240
		oPent.ajax({
240
			url: "/ajax/ppatent/kw",
241
			url: "/ajax/ppatent/kw",
241
			data: {
242
			data: {
247
		});
248
		});
248
	}
249
	}
249
	Patent.prototype.pubsucess = function() {
250
	Patent.prototype.pubsucess = function() {
250
		$.MsgBox.Alert('提示', '资源发布成功!');
251
		$.MsgBox.Alert('提示', '专利发布成功!');
251
		$("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain');
252
		$("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain');
252
		location.href = "patentList.html"
253
		location.href = "patentList.html"
253
	}
254
	}

+ 1 - 1
patentShow.html

99
					<div class="form-item aboutPa">
99
					<div class="form-item aboutPa">
100
						<div class="aboutTit">发明人</div>
100
						<div class="aboutTit">发明人</div>
101
						<div class="form-result">
101
						<div class="form-result">
102
							<ul class="clearfix" id="faM">
102
							<ul class="authorBox clearfix" id="faM">
103
								<li class="lastBtn">
103
								<li class="lastBtn">
104
									<div>查看全部作者(<span>6</span>)</div>
104
									<div>查看全部作者(<span>6</span>)</div>
105
								</li>
105
								</li>