Browse Source

企业文章添加媒体属性,增设栏目选项

luyanan 7 years ago
parent
commit
d68d087fd1

+ 5 - 50
cmp-portal/articalIssue.html

@ -6,7 +6,7 @@
6 6
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7 7
<title>发布文章-科袖网</title>
8 8
<link rel="shortcut icon" href="images/favicon.ico "/>
9
<link href="../css/bootstrap.min.css" rel="stylesheet">
9
<link href="css/bootstrap.min.css" rel="stylesheet">
10 10
<link type="text/css" href="../css/webuploader/webuploader.css" rel="stylesheet">
11 11
<link type="text/css" rel="stylesheet" href="../css/datetimepicker.css">
12 12
<link type="text/css" href="css/common.css" rel="stylesheet">
@ -22,22 +22,10 @@
22 22
<div class="setTimeBlock modelContain">
23 23
	<span class="mb_tit">提示</span>
24 24
	<a class="mb_close"></a>
25
	<div class="mb_msg">
26
		<p style="margin: 10px;">请设置文章发布的时间:</p>
27
		        <div class="formTime">
28
		        <!--<div class="form-group">
29
		            <div class='input-group date' id='datetimepicker6'>
30
		                <input type='text' class="form-control" />
31
		                <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
32
		            </div>
33
		        </div>-->
34
		        <div class="form-group">
35
		             <input size="16" type="text" value="" readonly class="form-control form_datetime">
36
		        </div>
37
		</div>
25
	<div class="mb_msg" id="promotTh">
26

38 27
	</div>
39
	<div class="mb_btnbox">
40
		<input class="mb_btn mb_btnOk" type="button" value="确定">
28
	<div class="mb_btnbox" id="promotGt">
41 29
		<input class="mb_btn mb_btnNo" type="button" value="取消">
42 30
	</div>
43 31
</div>
@ -46,7 +34,7 @@
46 34
<input type="hidden" id="hidearticleId" value="" />
47 35
<div id="container">
48 36
	<div class="containerCon">
49
		<div class="contentCon clearfix conBlock">
37
		<div class="contentCon clearfix conBlock" style="padding-top:20px">
50 38
			<div class="leftconBox floatL">
51 39
				<ul class="artAbout">
52 40
					<li>
@ -205,39 +193,6 @@ $(function () {
205 193
		$('html,body').animate({ scrollTop:0});
206 194
	});
207 195
	
208
	var currentdate;
209
    $(".form_datetime").datetimepicker({
210
    	format: 'yyyy-mm-dd hh:ii',
211
    	forceParse: true,
212
    	autoclose: true,
213
       // todayBtn: true
214
    });
215
    function getNowFormatDate() {
216
	    var date = new Date();
217
	    var seperator1 = "-";
218
	    var seperator2 = ":";
219
	    var month = date.getMonth() + 1;
220
	    var strDate = date.getDate();
221
	    var getHours = date.getHours();
222
	    var getMinutes = date.getMinutes();
223
	    if (month >= 1 && month <= 9) {
224
	        month = "0" + month;
225
	    }
226
	    if (strDate >= 0 && strDate <= 9) {
227
	        strDate = "0" + strDate;
228
	    }
229
	    if (getMinutes >= 0 && getMinutes <= 9) {
230
	        getMinutes = "0" + getMinutes;
231
	    }
232
	     if (getHours >= 0 && getHours <= 9) {
233
	        getHours = "0" + getHours;
234
	    }
235
	    var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
236
	            + " " + getHours + seperator2 + getMinutes
237
	           
238
	    return currentdate;
239
	}
240
    $(".form_datetime").val(getNowFormatDate(currentdate));
241 196
});
242 197
//Model模态框打开关闭
243 198


+ 3 - 48
cmp-portal/articalModify.html

@ -26,22 +26,10 @@
26 26
<div class="setTimeBlock modelContain">
27 27
	<span class="mb_tit">提示</span>
28 28
	<a class="mb_close"></a>
29
	<div class="mb_msg">
30
		<p style="margin: 10px;">请设置文章发布的时间:</p>
31
		        <div class="formTime">
32
		        <!--<div class="form-group">
33
		            <div class='input-group date' id='datetimepicker6'>
34
		                <input type='text' class="form-control" />
35
		                <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
36
		            </div>
37
		        </div>-->
38
		        <div class="form-group">
39
		             <input size="16" type="text" value="" readonly class="form-control form_datetime">
40
		        </div>
41
		</div>
29
	<div class="mb_msg" id="promotTh">
30

42 31
	</div>
43
	<div class="mb_btnbox">
44
		<input class="mb_btn mb_btnOk" type="button" value="确定">
32
	<div class="mb_btnbox" id="promotGt">
45 33
		<input class="mb_btn mb_btnNo" type="button" value="取消">
46 34
	</div>
47 35
</div>
@ -206,39 +194,6 @@ $(function () {
206 194
		$('html,body').animate({ scrollTop:0});
207 195
	});
208 196
	
209
	var currentdate;
210
    $(".form_datetime").datetimepicker({
211
    	format: 'yyyy-mm-dd hh:ii',
212
    	forceParse: true,
213
    	autoclose: true,
214
        //todayBtn: true
215
    });
216
    function getNowFormatDate() {
217
	    var date = new Date();
218
	    var seperator1 = "-";
219
	    var seperator2 = ":";
220
	    var month = date.getMonth() + 1;
221
	    var strDate = date.getDate();
222
	    var getHours = date.getHours();
223
	    var getMinutes = date.getMinutes();
224
	    if (month >= 1 && month <= 9) {
225
	        month = "0" + month;
226
	    }
227
	    if (strDate >= 0 && strDate <= 9) {
228
	        strDate = "0" + strDate;
229
	    }
230
	    if (getMinutes >= 0 && getMinutes <= 9) {
231
	        getMinutes = "0" + getMinutes;
232
	    }
233
	     if (getHours >= 0 && getHours <= 9) {
234
	        getHours = "0" + getHours;
235
	    }
236
	    var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
237
	            + " " + getHours + seperator2 + getMinutes
238
	           
239
	    return currentdate;
240
	}
241
    $(".form_datetime").val(getNowFormatDate(currentdate));
242 197
});
243 198
//Model模态框打开关闭
244 199


+ 8 - 3
cmp-portal/css/cmpindex.css

@ -44,6 +44,7 @@ a.worksubmenu.cmpBg{color: #FFFFFF;}
44 44
.needUlist li{position:relative;overflow: hidden;padding:4px 0;margin:6px 0;}
45 45
.needUlist li:after{content: '';background: #E6E6E6;height:1px;position: absolute;bottom: 0;right: 0;left:64px;}
46 46
.needUlist li:last-child:after{background: none;}
47
.needUlist li .leftlogo>.h4Font{display: inline-block;width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
47 48
.staffDlist{overflow: hidden;}
48 49
.staffDlist h2{float:left;width: 58px; text-align: right;line-height: 60px;}
49 50
.staffDlist dl{width: 78%;float: right;}
@ -368,7 +369,7 @@ ul.artAbout .frmadd{width:auto;position:absolute;right:0;top:0;background: #28b8
368 369
369 370
.form-result{margin:18px -15px 0 -15px;}
370 371
.form-result>ul>li{position:relative;padding:12px 15px;min-height: 76px;}
371
.form-result>ul>li .deleteThis{display:none;position:absolute;top:50%;margin-top:-16px;right:28px;width:32px;height:32px;background:url(../../images/g_article_button_shanchu_hig.png);background-size:cover;cursor:pointer;}
372
.form-result>ul>li .deleteThis{display:none;position:absolute;top:50%;margin-top:-16px;right:14px;width:32px;height:32px;background:url(../../images/g_article_button_shanchu_hig.png);background-size:cover;cursor:pointer;}
372 373
.form-result>ul>li:hover{background: #EEEEEE;}
373 374
.form-result>ul>li:hover .deleteThis{display:block;}
374 375
@ -426,6 +427,8 @@ ul.tagList>li .h2Font{color:#666}
426 427
.itemListBolck .itemListCon .form-result{margin:20px 0 30px;border-top:1px solid #E5E5E5;}
427 428
.itemListBolck .itemListCon .madiaHead{width:120px;height:80px;margin-top:-40px;}
428 429
.itemListBolck .itemListCon .madiaInfo>ul>li{float: left;margin-left:20px;}
430
.itemListBolck .itemListCon .madiaInfo .column{color:#666;}
431
.itemListBolck .itemListCon .madiaInfo>ul>li>.column{border:1px solid #28b8fa;padding:2px 4px;font-size: 12px;color:#28b8fa;border-radius:4px;}
429 432
.itemListBolck .itemListCon .madiaInfo>ul>li:first-child{margin-left:0;}
430 433
.itemListBolck .itemListCon .madiaInfo{padding-left:140px;min-height: 80px;padding-top:15px;}
431 434
.itemListCon.form-item ul .h1Font{font-size:18px;}
@ -449,8 +452,10 @@ ul.tagList>li .h2Font{color:#666}
449 452
.setTimeBlock{z-index: 999999; width: 400px; position: fixed; background-color: white; border-radius: 6px; box-shadow: rgb(102, 102, 102) 1px 1px 20px 4px;top:50%;left:50%;margin:-167px 0 0 -200px;}
450 453
.setTimeBlock .mb_tit{display: block; font-size: 18px; color: rgb(255, 255, 255); background-color:#28b8fa; line-height: 60px; text-align: center; border-radius: 6px 6px 0 0; }
451 454
.setTimeBlock .mb_close{display: block; position: absolute; right: 20px; top: 18px; background: url(../../images/sign_icon_guanbi_nor.png) center center no-repeat; width: 20px; height: 20px; cursor: pointer;}
452
.setTimeBlock .mb_msg{position: relative; padding: 30px 20px 20px; line-height: 24px; text-align: center; font-size: 16px;}
453
.setTimeBlock .formTime{padding:10px 24px;}
455
.setTimeBlock .mb_msg{position: relative; padding: 30px 40px 20px; line-height: 24px; text-align: center; font-size: 16px;}
456
.setTimeBlock .mb_msg .mb-list{margin:6px 6px 12px 6px}
457
.setTimeBlock .mb_msg .mb-list p{margin:6px;}
458
/*.setTimeBlock .formTime,.setTimeBlock .form-control{padding:10px 24px;}*/
454 459
.setTimeBlock .mb_btnbox{margin: 0px auto 30px; text-align: center; position: relative;}
455 460
.setTimeBlock .mb_btn{width: 100px; font-size: 14px; height: 32px; color: white; border: none; background-image: none; padding: 0px; margin: 0px 10px; border-radius: 6px;}
456 461
.setTimeBlock .mb_btnOk{ background-color:#28b8fa;}

+ 2 - 2
cmp-portal/css/common.css

@ -196,7 +196,7 @@ button.btnModelBig:hover{
196 196
.nodatabox .noContip{font-size:18px;color: #999;line-height:40px;}
197 197
.nodatabox .keyword{font-size:22px; padding:0 6px;color:#555555;}
198 198
/***********************缺省页面*******************/
199
#container{margin-top:90px;}
199
#container{padding-top:90px;}
200 200
.containerCon{width:1120px;padding:0 10px;position:relative; margin:auto;}
201 201
.containerCon:before,.containerCon:after{display:table;content:" "}
202 202
.containerCon:after{clear: both;}
@ -221,7 +221,7 @@ footer .weixincode{background-image: url(../images/home_bg_guanzhu_nor.png);}
221 221
footer .weixincode span{background-image:url(../images/home_code_weixin.jpg);background-size: cover;}
222 222

223 223
/*新版header*/
224
header{ position:fixed; top:0;left:0;right: 0; z-index:1000;font-size:16px;line-height:32px;}
224
header{ position:fixed; top:0;left:0;right: 0; z-index:1012;font-size:16px;line-height:32px;}
225 225
header .navheader{background:#FFFFFF;height:62px;border-bottom: 2px solid #e5e5e5;}
226 226
header .navheader.navhdown{background: rgba(256,256,256,1);border-color:#E5E5E5;box-shadow: 0px 2px 12px 0px rgba(204, 204, 204, 0.6);-webkit-box-shadow: 0px 2px 12px 0px rgba(204, 204, 204, 0.6);}
227 227
header .navheader.navhdown li a{color:#666;}

+ 52 - 11
cmp-portal/js/articalIssue.js

@ -5,6 +5,7 @@ $(function() {
5 5
	var articleId;
6 6
	var fa = false;
7 7
    var orgId = $.cookie("orgId");
8
    var colMgr = $.cookie("colMgr");
8 9
    if(orgId == "" || orgId == null || orgId == "null"){
9 10
    	location.href = "cmp-settled-log.html";
10 11
    }
@ -339,12 +340,37 @@ $(function() {
339 340
		});
340 341
		return $.unique(resourcesarray);
341 342
	}
342

343
	
344
	var seleClum ='<div class="mb-list mb-listL"><p>请选择文章发布的栏目:</p>'+
345
		'<select class="form-control form-column" id="seletColum"></select></div>';
346
	var seleTime = '<div class="mb-list mb-listR"><p>请设置文章发布的时间:</p>'+
347
		'<div class="formTime"><div class="form-group">'+
348
        '<input size="16" type="text" value="" readonly class="form-control form_datetime">'+
349
    	'</div></div></div>';
343 350
	//文章发布
344 351
	$("#release").on("click", function() {
345 352
		noTitleImg();
346 353
		if(imgflase && titleflase) {
347
			$.MsgBox.Confirm("提示", "确认发布该文章?", newsAdd);
354
			console.log(colMgr)
355
			if(colMgr=="true"){
356
				$(".blackcover2").fadeIn();
357
				var btnOk='<input class="mb_btn mb_btnOk mb_btnOkpub" type="button" value="确定">'
358
				$(".mb_btnOk").remove(); $("#promotGt").prepend(btnOk);
359
				$(".modelContain").show(); $("body").addClass("modelOpen");
360
				$(".mb-listR").remove();
361
				$(".mb-listL").remove();
362
				$("#promotTh").prepend(seleClum);
363
				fillColum(7);//填充select栏目
364
				$(".mb_btnOkpub").on("click", function() {
365
					$(".blackcover2").fadeOut();
366
					$(".modelContain").hide();
367
					$("body").removeClass("modelOpen");
368
					$.MsgBox.Confirm("提示", "确认发布该文章?", newsAdd);
369
				})
370
			}else{
371
				$.MsgBox.Confirm("提示", "确认发布该文章?", newsAdd);
372
			}
373
			
348 374
		}
349 375
	})
350 376

@ -353,17 +379,29 @@ $(function() {
353 379
		noTitleImg();
354 380
		if(imgflase && titleflase) {
355 381
			$(".blackcover2").fadeIn();
356
			$(".modelContain").show();
357
			$("body").addClass("modelOpen");
358
			$(".mb_btnOk").on("click", function() {
382
			var btnOk='<input class="mb_btn mb_btnOk mb_btnOkset" type="button" value="确定">'
383
			$(".mb_btnOk").remove(); $("#promotGt").prepend(btnOk);
384
			$(".modelContain").show(); $("body").addClass("modelOpen");
385
			$(".mb-listR").remove(); $("#promotTh").append(seleTime);//时间选择器
386
			$(".mb-listR .form_datetime").datetimepicker({
387
				format: 'yyyy-mm-dd hh:ii',
388
				forceParse: true,
389
				autoclose: true,
390
			});
391
			$(".mb-listR .form_datetime").val(getNowFormatDate(currentdate));
392
			if(colMgr=="true"){
393
				$(".mb-listL").remove();
394
				$("#promotTh").prepend(seleClum);
395
				fillColum(7);//填充select栏目
396
			}
397
			$(".mb_btnOkset").on("click", function() {
359 398
				var publishTime = $(".form_datetime").val();
360 399
				console.log(st6(publishTime));
361 400
				setTimeIssue(st6(publishTime));
362

363 401
			})
364 402
		}
365 403
	})
366

404
	
367 405
	//文章存草稿
368 406
	$("#draft").on("click", function() {
369 407
		noTitleImg();
@ -400,12 +438,15 @@ function getAttrId() {
400 438
		$data.articleContent = ue.getContent();
401 439
		$data.professors = experarray;
402 440
		$data.resources = resourcesarray;
441
		if(colMgr=="true"){
442
			$data.colNum = $("#seletColum").val();
443
			if(publishTime!="") {
444
				$data.publishTime = publishTime;
445
			}
446
		}
403 447
		if($("#hidearticleId").val().length != 0) {
404 448
			$data.articleId = $("#hidearticleId").val();
405 449
		}
406
		if($(".form_datetime").val().length != 0) {
407
			$data.publishTime = publishTime;
408
		}
409 450
		console.log($data);
410 451
	}
411 452

@ -633,7 +674,7 @@ function getAttrId() {
633 674
				return;
634 675
			}
635 676
		}
636
		$(this).parents(".form-drop").siblings(".form-result").find("ul").append('<li style="min-height:40px;" data-id="'+$(this).attr("data-id")+'">' + oValue + '<div class="deleteThis" style="right:0px;"></div></li>');
677
		$(this).parents(".form-drop").siblings(".form-result").find("ul").append('<li class="ellipsisSty" style="min-height:40px;padding-right:42px;" data-id="'+$(this).attr("data-id")+'">' + oValue + '<div class="deleteThis"></div></li>');
637 678
		$(this).parents(".form-drop").siblings("input").val("");
638 679
		if(oJudge.length == 4) {
639 680
			$(this).parents(".form-drop").siblings("input").val("");

+ 66 - 30
cmp-portal/js/articalModify.js

@ -6,6 +6,7 @@ $(function() {
6 6
    var modifyTimeval;
7 7
    var settime = false;
8 8
	var orgId = $.cookie("orgId");
9
	var colMgr = $.cookie("colMgr");
9 10
	if(orgId == "" || orgId == null || orgId == "null"){
10 11
    	location.href = "cmp-settled-log.html";
11 12
    }
@ -388,7 +389,7 @@ $(function() {
388 389
					var itemlist = '';
389 390
					var itemlist = '<li id="usid">';
390 391
						itemlist += '<div class="madiaHead useHead" id="userimg"></div>';
391
						itemlist += '<div class="madiaInfo">';
392
						itemlist += '<div class="madiaInfo" style="padding-right:42px">';
392 393
						itemlist += '<p class="ellipsisSty"><span class="h1Font" id="name"></span><span class="h2Font" style="margin-left:10px;" id="title"></span></p>';
393 394
						itemlist += '<p class="h2Font ellipsisSty" id="orgName"></p>';
394 395
						itemlist += '</div><div class="deleteThis"></div></li>';
@ -444,7 +445,7 @@ $(function() {
444 445
				if (data.success && data.data){
445 446
					var itemlist = '<li id="usid">';
446 447
						itemlist += '<div class="madiaHead resouseHead" id="userimg"></div>';
447
						itemlist += '<div class="madiaInfo">';
448
						itemlist += '<div class="madiaInfo" style="padding-right:42px">';
448 449
						itemlist += '<p class="h1Font ellipsisSty" id="resourceName"></p>';
449 450
						itemlist += '<p class="h2Font" id="name"></p>';
450 451
						itemlist += '</div><div class="deleteThis"></div></li>';
@ -506,12 +507,60 @@ $(function() {
506 507
		return $.unique(resourcesarray);
507 508
	}
508 509

509
	
510
	var seleClum ='<div class="mb-list mb-listL"><p>请选择文章发布的栏目:</p>'+
511
		'<select class="form-control form-column" id="seletColum"></select></div>';
512
	var seleTime = '<div class="mb-list mb-listR"><p>请设置文章发布的时间:</p>'+
513
		'<div class="formTime"><div class="form-group">'+
514
        '<input size="16" type="text" value="" readonly class="form-control form_datetime">'+
515
    	'</div></div></div>';
510 516
	//文章发布
511
	$("#release").on("click",function(){
517
	$("#release").on("click", function() {
512 518
		noTitleImg();
513
		if(titleflase){
514
			$.MsgBox.Confirm("提示","确认发布该文章?",newsAdd);	
519
		if(titleflase) {
520
			$(".blackcover2").fadeIn();
521
			var btnOk='<input class="mb_btn mb_btnOk mb_btnOkpub" type="button" value="确定">'
522
			$(".mb_btnOk").remove(); $("#promotGt").prepend(btnOk);
523
			$(".modelContain").show(); $("body").addClass("modelOpen");
524
			$(".mb-listR").remove();
525
			if(colMgr=="true"){
526
				$(".mb-listL").remove();
527
				$("#promotTh").prepend(seleClum);
528
				fillColum(7);//填充select栏目
529
			}
530
			$(".mb_btnOkpub").on("click", function() {
531
				$(".blackcover2").fadeOut();
532
				$(".modelContain").hide();
533
				$("body").removeClass("modelOpen");
534
				$.MsgBox.Confirm("提示", "确认发布该文章?", newsAdd);
535
			})
536
		}
537
	})
538

539
	//定时文章发布
540
	$("#setTimeIssue").on("click", function() {
541
		noTitleImg();
542
		if(titleflase) {
543
			$(".blackcover2").fadeIn();
544
			var btnOk='<input class="mb_btn mb_btnOk mb_btnOkset" type="button" value="确定">'
545
			$(".mb_btnOk").remove(); $("#promotGt").prepend(btnOk);
546
			$(".modelContain").show(); $("body").addClass("modelOpen");
547
			$(".mb-listR").remove(); $("#promotTh").append(seleTime);//时间选择器
548
			$(".mb-listR .form_datetime").datetimepicker({
549
				format: 'yyyy-mm-dd hh:ii',
550
				forceParse: true,
551
				autoclose: true,
552
			});
553
			$(".mb-listR .form_datetime").val(getNowFormatDate(currentdate));
554
			if(colMgr=="true"){
555
				$(".mb-listL").remove();
556
				$("#promotTh").prepend(seleClum);
557
				fillColum(7);//填充select栏目
558
			}
559
			$(".mb_btnOkset").on("click", function() {
560
				var publishTime = $(".form_datetime").val();
561
				console.log(st6(publishTime));
562
				setTimeIssue(st6(publishTime));
563
			})
515 564
		}
516 565
	})
517 566
	
@ -536,21 +585,7 @@ $(function() {
536 585
		$.MsgBox.Confirm("提示","确认删除该文章?",newsDelet);
537 586
	})
538 587
	
539
	//定时文章发布
540
	$("#setTimeIssue").on("click", function() {
541
		//$(".form_datetime").val(timeGeshi(modifyTimeval));
542
		noTitleImg();
543
		if(titleflase) {
544
			$(".blackcover2").fadeIn();
545
			$(".modelContain").show();
546
			$("body").addClass("modelOpen");
547
			$(".mb_btnOk").on("click", function() {
548
				var modifyTimeval = $(".form_datetime").val();
549
				settime = true;
550
				setTimeIssue(st6(modifyTimeval),settime);
551
			})
552
		}
553
	})
588
	
554 589
	function getAttrId() {
555 590
		var arr=[];
556 591
		this.each(function(){
@ -559,23 +594,24 @@ $(function() {
559 594
		return arr;
560 595
	}
561 596
	/*获取数据*/
562
	function getdata(publishTime,settime) {
563
		expertli();//相关专家
564
		resourcesli();//相关咨询
565
	    $data.articleId = articleId;
597
	function getdata(publishTime) {
598
		expertli(); //相关专家
599
		resourcesli(); //相关咨询
566 600
		$data.orgId = orgId;
567 601
		if($("#companys li").length) {
568 602
			$data.orgs = getAttrId.call($("#companys li"));
569 603
		}
570
		
571 604
		$data.articleTitle = $("#newstitle").val();
572 605
		$data.subject = captiureSubInd("keyWordlist .delkeylist");
573 606
		$data.articleImg = $("#uploader").attr("data-id");
574 607
		$data.articleContent = ue.getContent();
575 608
		$data.professors = experarray;
576 609
		$data.resources = resourcesarray;
577
		if(settime) {
578
			$data.publishTime = publishTime;
610
		if(colMgr=="true"){
611
			$data.colNum = $("#seletColum").val();
612
			if(publishTime!="") {
613
				$data.publishTime = publishTime;
614
			}
579 615
		}
580 616
		console.log($data);
581 617
	}
@ -807,7 +843,7 @@ relatCompanies("#company");
807 843
				return;
808 844
			}
809 845
		}
810
		$(this).parents(".form-drop").siblings(".form-result").find("ul").append('<li style="min-height:40px;" data-id="'+$(this).attr("data-id")+'">' + oValue + '<div class="deleteThis" style="right:0px;"></div></li>');
846
		$(this).parents(".form-drop").siblings(".form-result").find("ul").append('<li class="ellipsisSty" style="min-height:40px;padding-right:42px;" data-id="'+$(this).attr("data-id")+'">' + oValue + '<div class="deleteThis"></div></li>');
811 847
		$(this).parents(".form-drop").siblings("input").val("");
812 848
		if(oJudge.length == 4) {
813 849
			$(this).parents(".form-drop").siblings("input").val("");
@ -853,7 +889,7 @@ relatCompanies("#company");
853 889
			success: function(data) {
854 890
				if(data.success) {
855 891
					var oValue=data.data.forShort?data.data.forShort:data.data.name;
856
				this.append('<li style="min-height:40px;" data-id="'+data.data.id+'">' + oValue + '<div class="deleteThis" style="right:0px;"></div></li>')	
892
				this.append('<li class="ellipsisSty" style="min-height:40px;padding-right:42px;" data-id="'+data.data.id+'">' + oValue + '<div class="deleteThis"></div></li>')	
857 893
				
858 894
				}
859 895
			},

+ 9 - 2
cmp-portal/js/cmp-articalList.js

@ -1,5 +1,6 @@
1 1
/*文章个人列表*/
2 2
var orgId = $.cookie("orgId");
3
var colMgr = $.cookie("colMgr");
3 4
if(orgId == "" || orgId == null || orgId == "null"){
4 5
	location.href = "cmp-settled-log.html";
5 6
}
@ -62,7 +63,7 @@ function articalList(pageSize, pageNo, isbind, num) {
62 63
				for(var i = 0; i < data.data.data.length; i++) {
63 64
					if(data.data.data[i].status == 1) {
64 65
						var li = '<li class="newbox"><a href="" target="_blank" class="newurl">';
65
						var li2 = '<ul class="h2Font clearfix"><li><span class="time"></span></li><li><span id="pageViews"></span></li><li><span id="articleAgree"></span></li><li><span id="comment"></span></li></ul>';
66
						var li2 = '<ul class="h2Font clearfix"><li><span class="column"></span></li><li><span class="time"></span></li><li><span id="pageViews"></span></li><li><span id="articleAgree"></span></li><li><span id="comment"></span></li></ul>';
66 67
						var li3 = '';
67 68
						var li4 = '';
68 69
					} else if(data.data.data[i].status == 0) {
@ -73,7 +74,7 @@ function articalList(pageSize, pageNo, isbind, num) {
73 74
					} else if(data.data.data[i].status == 2) {
74 75
						var li = '<li class="newbox draftList"><a href="" class="newurl">';
75 76
						var li2 = '<ul class="h2Font clearfix"><li><span class="time"></span></li></ul>';
76
						var li3 = '<span class="draftLable" id="dsfbtime"></span>';
77
						var li3 = '<span class="draftLable" id="dsfbtime"></span><span class="column" style="margin-left:20px;"></span>';
77 78
						var li4 = '<li><a class="editThis" target="_blank"></a></li>';
78 79
					}
79 80
					var itemlist = li;
@ -97,6 +98,12 @@ function articalList(pageSize, pageNo, isbind, num) {
97 98
					if(datalist.articleImg) {
98 99
						$itemlist.find("#artimg").attr("style", "background-image: url(/data/article/" + datalist.articleImg + ");");
99 100
					}
101
					if(datalist.colNum>2){
102
						$itemlist.find(".column").text(columnType[datalist.colNum].fullName);
103
					}else{
104
						$itemlist.find(".column").css({"border":"none","padding":"0"})
105
						$itemlist.find(".time").parent().css("margin-left","0");
106
					}
100 107
					if(datalist.status == 1) {//发布
101 108
						$itemlist.find(".time").text("发布于 " + TimeTr(datalist.publishTime));
102 109
						$itemlist.find(".newurl").attr("href", "../articalShow.html?articleId=" + datalist.articleId);

+ 1 - 0
cmp-portal/js/cmp-workspaces.js

@ -14,6 +14,7 @@ $(document).ready(function() {
14 14
			beforeSend: function() {},
15 15
			success: function(data, textState) {
16 16
				if(data.success) {
17
					$.cookie("colMgr",data.data.colMgr);
17 18
					var $data = data.data;
18 19
					var otext, oguimo;
19 20
					console.log(data);

+ 1 - 1
cmp-portal/js/public/bootstrap-datetimepicker.js

@ -638,7 +638,7 @@
638 638
        top = offset.top + this.height;
639 639
      }
640 640
	  
641
	  top = top - containerOffset.top+40;
641
	  top = top - containerOffset.top+42;
642 642
643 643
      left = left - containerOffset.left;
644 644

+ 74 - 0
cmp-portal/js/public/common.js

@ -410,3 +410,77 @@ function TimeTr(dealtime) {
410 410
	}
411 411
	return formatTime;
412 412
}
413
414
//栏目
415
var columnType = {
416
	"1":{
417
		fullName:"个人原创",
418
		shortName:"原创"
419
	},
420
	"2":{
421
		fullName:"企业原创",
422
		shortName:"原创"
423
	},
424
	"3":{
425
		fullName:"前沿动态",
426
		shortName:"前沿"
427
	},
428
	"4":{
429
		fullName:"学术经验",
430
		shortName:"经验"
431
	},
432
	"5":{
433
		fullName:"分析检测",
434
		shortName:"检测"
435
	},
436
	"6":{
437
		fullName:"会议培训",
438
		shortName:"会议"
439
	},
440
	"7":{
441
		fullName:"科袖访谈",
442
		shortName:"访谈"
443
	},
444
	"8":{
445
		fullName:"招聘招生",
446
		shortName:"招聘"
447
	},
448
	"9":{
449
		fullName:"重大新闻",
450
		shortName:"新闻"
451
	}	
452
}
453
 function fillColum(allnum){//填充栏目选项
454
	var zCount=allnum+3;
455
	for(var i=3;i<zCount;i++){
456
		var colum=$('<option value="'+i+'">'+columnType[i].fullName+'</option>')
457
		$(".form-column").append(colum);
458
	}
459
}
460
461
var currentdate;
462
function getNowFormatDate() {
463
    var date = new Date();
464
    var seperator1 = "-";
465
    var seperator2 = ":";
466
    var month = date.getMonth() + 1;
467
    var strDate = date.getDate();
468
    var getHours = date.getHours();
469
    var getMinutes = date.getMinutes();
470
    if (month >= 1 && month <= 9) {
471
        month = "0" + month;
472
    }
473
    if (strDate >= 0 && strDate <= 9) {
474
        strDate = "0" + strDate;
475
    }
476
    if (getMinutes >= 0 && getMinutes <= 9) {
477
        getMinutes = "0" + getMinutes;
478
    }
479
     if (getHours >= 0 && getHours <= 9) {
480
        getHours = "0" + getHours;
481
    }
482
    var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
483
            + " " + getHours + seperator2 + getMinutes
484
           
485
    return currentdate;
486
}