|
@ -58,28 +58,38 @@ $(document).ready(function(){
|
58
|
58
|
}
|
59
|
59
|
getRecourceMe(1,true);
|
60
|
60
|
function resourceHtml($data) {
|
|
61
|
console.log($data);
|
61
|
62
|
for(var i = 0; i < $data.length; i++) {
|
62
|
63
|
var imgSrc = "../images/default-resource.jpg";
|
63
|
|
var oSpec="",orgName="",domain="";
|
|
64
|
var oSpec="",orgName="",domain="",subject="",orgName="",spec="",comp="",parameter="";
|
64
|
65
|
if($data[i].img) {
|
65
|
66
|
imgSrc = "/data/resource/" + $data[i].img;
|
66
|
67
|
}
|
67
|
68
|
if($data[i].spec) {
|
68
|
|
oSpec="厂商型号:"+$data[i].spec
|
|
69
|
oSpec="厂商型号:"+$data[i].spec;
|
|
70
|
spec=$data[i].spec;
|
69
|
71
|
}
|
70
|
72
|
if($data[i].orgName) {
|
71
|
73
|
orgName="所属机构:"+$data[i].orgName;
|
|
74
|
orgName=$data[i].orgName;
|
72
|
75
|
}
|
73
|
76
|
if($data[i].domain) {
|
74
|
77
|
domain="关键词:"+$data[i].domain;
|
|
78
|
subject=$data[i].domain
|
|
79
|
}
|
|
80
|
if($data[i].comp) {
|
|
81
|
comp=$data[i].comp;
|
75
|
82
|
}
|
76
|
83
|
var oImg="";
|
77
|
84
|
if($data[i].img) {
|
78
|
85
|
oImg=$data[i].img;
|
79
|
86
|
}
|
|
87
|
if($data[i].parameter){
|
|
88
|
parameter=$data[i].parameter
|
|
89
|
}
|
80
|
90
|
var oName1=$data[i].name;
|
81
|
91
|
var oId=$data[i].id;
|
82
|
|
var oIndu=$data[i].majorFunc
|
|
92
|
var oIndu=$data[i].majorFunc;
|
83
|
93
|
$.ajax({
|
84
|
94
|
"url": "/ajax/resource/isImportRes",
|
85
|
95
|
"type": "GET",
|
|
@ -105,7 +115,7 @@ function resourceHtml($data) {
|
105
|
115
|
'</div>' +
|
106
|
116
|
'</a>' +
|
107
|
117
|
'<div class="importBtn">' +
|
108
|
|
'<span class="importResource '+oT+'" data-id="'+oId+'" data-name="'+oName1+'" data-indu="'+oIndu+'" flag="1" data-img="'+oImg+'">'+oText+'</span>' +
|
|
118
|
'<span class="importResource '+oT+'" data-id="'+oId+'" data-parameter="'+parameter+'" data-comp="'+comp+'" data-spec="'+spec+'" data-orgName="'+orgName+'" data-subject="'+subject+'" data-name="'+oName1+'" data-indu="'+oIndu+'" flag="1" data-img="'+oImg+'">'+oText+'</span>' +
|
109
|
119
|
/*'<span class="importSpan-2">再次导入</span>' +
|
110
|
120
|
'<span class="importSpan-3">已导入</span>' +*/
|
111
|
121
|
'</div>' +
|
|
@ -154,6 +164,11 @@ function resourceHtml($data) {
|
154
|
164
|
|
155
|
165
|
},
|
156
|
166
|
"data": {
|
|
167
|
subject:$(this).attr("data-subject"),
|
|
168
|
orgName:$(this).attr("data-orgName"),
|
|
169
|
comp:$(this).attr("data-comp"),
|
|
170
|
spec:$(this).attr("data-spec"),
|
|
171
|
parameter:$(this).attr("data-parameter"),
|
157
|
172
|
resourceTmpId:$(this).attr("data-id"),
|
158
|
173
|
resourceName:$(this).attr("data-name"),
|
159
|
174
|
professorId:userid,
|