Browse Source

资源编辑

XMTT 7 years ago
parent
commit
c3eb6e0c2e

+ 1 - 1
css/model/sys/resourceIssue.css

@ -1441,7 +1441,7 @@ ul.artAbout .frmadd {
1441 1441
    right: -12px;
1442 1442
    width: 28px;
1443 1443
    height: 28px;
1444
    background: url("../images/g_article_button_guanbi_hig.png") 0% 0% / cover;
1444
    background: url("/images/g_article_button_guanbi_hig.png") 0% 0% / cover;
1445 1445
    cursor: pointer;
1446 1446
}
1447 1447

+ 3 - 0
html/model/sys/resourceinfo/index.html

@ -54,6 +54,9 @@
54 54
            <div class="btn opt-subject">
55 55
                设置关键词
56 56
            </div>
57
            <div class="btn opt-edit">
58
                编辑资源
59
            </div>
57 60
            <div class="btn opt-del">
58 61
                删除
59 62
            </div>

+ 20 - 0
js/model/sys/resourceinfo/index.js

@ -122,6 +122,26 @@ spa_define(function () {
122 122
                    }
123 123
                });
124 124
125
                root.find(".opt-edit").on("click", function() {
126
                    var $resource = root.find("td.opt-check>i.checked");
127
                    if($resource.length) {
128
                        if($resource.length > 1) {
129
                            util.alert("只能选择一个资源");
130
                        } else {
131
                            // $.util.get("../ajax/article/id/"+$resource.attr("articleId"),null,function(rd){
132
                            //     if(rd){
133
                            //         window.open('http://www.ekexiu.com:81/html/model/resourceinfo/resourceIssue.html?resourceId=' + $resource.attr("resourceId"));
134
                            window.open('http://'+window.location.host+'/html/model/sys/resourceinfo/resourceIssue.html?resourceId=' + $resource.attr("resourceId"));
135
                            //     }else{
136
                            //         util.alertMsg("文章不存在", function(){pdg.reload();});
137
                            //     }
138
                            // },{});
139
                        }
140
                    } else {
141
                        util.alert("请选择一个资源");
142
                    }
143
                });
144
125 145
126 146
            }, mainDestory: function () {
127 147

+ 13 - 13
js/model/sys/resourceinfo/resourceIssue.js

@ -50,7 +50,7 @@ $(document).ready(function() {
50 50
					"url": "/ajax/resource/queryOne",
51 51
					"type": "GET",
52 52
					"success": function(data) {
53
						console.log(data);
53
						// console.log(data);
54 54
						if(data.success) {
55 55
							$("#uploadDd").siblings().remove();
56 56
							$("#fileList").append("<dd></dd><dd></dd>");
@ -205,7 +205,7 @@ $(document).ready(function() {
205 205
206 206
	});
207 207
	uploader.onError = function(code) {
208
		console.log(code)
208
		// console.log(code)
209 209
		$.MsgBox.Alert('提示', '请上传jpg、jpeg、png格式的图片,大小不超过2M')
210 210
	};
211 211
	uploader.on('uploadSuccess', function(file, data) {
@ -259,7 +259,7 @@ $(document).ready(function() {
259 259
			var ti=$(this).val();
260 260
			hbur=ti;
261 261
			var lNum=$.trim($(this).val()).length;
262
			console.log(lNum);
262
			// console.log(lNum);
263 263
			if(lNum > 15) {
264 264
				$(this).val($(this).val().substr(0, 15));
265 265
			} else if(0 < lNum&& lNum < 15) {
@ -272,7 +272,7 @@ $(document).ready(function() {
272 272
						"url": "/ajax/article/qaHotKey",
273 273
						"type": "GET",
274 274
						"success": function(data) {
275
							console.log(data);
275
							// console.log(data);
276 276
							if(data.success) {
277 277
								if(hburEnd == tt){
278 278
									if(data.data.length==0) {
@ -381,10 +381,10 @@ $(document).ready(function() {
381 381
				$(this).val($(this).val().substr(0, 50));
382 382
			} else if(0 < $(this).val().length < 50) {
383 383
					$.ajax({
384
					"url": "/ajax/org/querylimit",
384
					"url": "/ajax/sys/org/querylimit",
385 385
					"type": "GET",
386 386
					"success": function(data) {
387
						console.log(data);
387
						// console.log(data);
388 388
						if(data.success) {
389 389
							if(data.data==null) {
390 390
								$("#department ul").html("");
@ -411,11 +411,11 @@ $(document).ready(function() {
411 411
		var oSum="";
412 412
		for( i in $html) {
413 413
			var oImg="";
414
			console.log($html[i].hasOrgLogo)
414
			// console.log($html[i].hasOrgLogo)
415 415
			if($html[i].hasOrgLogo) {
416
				oImg="/images/org/" + $html[i].id + ".jpg"
416
				oImg="http://www.ekexiu.com/images/org/" + $html[i].id + ".jpg"
417 417
			}else{
418
				oImg="../images/default-icon.jpg"
418
				oImg="http://www.ekexiu.com/images/default-icon.jpg"
419 419
			}
420 420
			oSum+='<li class="orgList"><img src="'+oImg+'" class="floatL" /><p class="h2Font floatL">'+$html[i].name+'</p></li>'
421 421
		}
@ -488,7 +488,7 @@ $(document).ready(function() {
488 488
					"url": "/ajax/resource/delete",
489 489
					"type": "POST",
490 490
					"success": function(data) {
491
						console.log(data)
491
						// console.log(data)
492 492
						if(data.success) {							
493 493
								location.href="resourceList.html"						
494 494
						}
@ -532,7 +532,7 @@ $(document).ready(function() {
532 532
			$data.resourceName = $("#resourceName").val();//资源名字
533 533
			$data.cooperationNotes = $("#remarkContent").val();//合作备注
534 534
			$data.subject = captiureSubInd("keywordList p");
535
			console.log($data.subject);
535
			// console.log($data.subject);
536 536
			$data.supportedServices=$("#application").val();
537 537
			$data.orgName=$("#organizationName").val();
538 538
			$data.spec=$("#modelNumber").val();
@ -541,7 +541,7 @@ $(document).ready(function() {
541 541
			$data.fns=temp;
542 542
			$data.imageIds=array;
543 543
			//$data.imageIds:资源图片ID NULL 字符串数组
544
			console.log(temp);
544
			// console.log(temp);
545 545
			$.ajax({
546 546
					"url": oUrl,
547 547
					"type": "POST",
@ -549,7 +549,7 @@ $(document).ready(function() {
549 549
						$(".operateBlock").find("li").removeClass("disableLi");
550 550
					},
551 551
					"success": function(data) {
552
						console.log(data)
552
						// console.log(data)
553 553
						if(data.success) {
554 554
							if(pa2==1) {
555 555
								resourceId=data.data;