|
@@ -23,7 +23,7 @@
|
|
|
<script src="{{Msg "seo" "cdn"}}/js/html5shiv.min.js"></script>
|
|
|
<script src="{{Msg "seo" "cdn"}}/js/respond.min.js"></script>
|
|
|
<![endif]-->
|
|
|
-
|
|
|
+
|
|
|
<style type="text/css">
|
|
|
#_Container_0{
|
|
|
background-color:#FFFFFF;
|
|
@@ -52,10 +52,10 @@ border:1px solid #999999;
|
|
|
#tr11 td img{
|
|
|
border:1px solid #999999;
|
|
|
}
|
|
|
-.delbtn img{
|
|
|
-height:15px;
|
|
|
-width:15px;
|
|
|
-margin-right:-20px;
|
|
|
+.delbtn img{
|
|
|
+height:15px;
|
|
|
+width:15px;
|
|
|
+margin-right:-20px;
|
|
|
margin-top:-8px;
|
|
|
}
|
|
|
.delbtn{
|
|
@@ -65,10 +65,10 @@ margin-top:-8px;
|
|
|
background-color:#00ffff;
|
|
|
cursor:pointer;
|
|
|
}
|
|
|
-.delbtn1 img{
|
|
|
-height:15px;
|
|
|
-width:15px;
|
|
|
-margin-right:-20px;
|
|
|
+.delbtn1 img{
|
|
|
+height:15px;
|
|
|
+width:15px;
|
|
|
+margin-right:-20px;
|
|
|
margin-top:-8px;
|
|
|
}
|
|
|
.delbtn1{
|
|
@@ -89,12 +89,12 @@ margin-top:-8px;
|
|
|
<div class="row" style="width:96%; margin:0 auto; margin-top:10px;">
|
|
|
<div>
|
|
|
{{include "/manage/slider.html"}}
|
|
|
-
|
|
|
+
|
|
|
<div id="content">
|
|
|
<!-- 文章内容 -->
|
|
|
<div id="first" class="container-fluid">
|
|
|
<div style="margin-top:0px;" class="row-fluid">
|
|
|
- <div class="span12">
|
|
|
+ <div class="span12">
|
|
|
<div class="widget-box">
|
|
|
<div class="widget-content nopadding">
|
|
|
<div style="width:90%; margin:auto; margin-bottom:80px;">
|
|
@@ -103,7 +103,7 @@ margin-top:-8px;
|
|
|
<span><button class="btn btn-info" onClick="window.open('{{.T.s_preurl}}')" type="button">预览</button></span>{{end}}
|
|
|
<span style="margin-left:15px;"><button class="btn btn-info" onClick="editarticle();" type="button">编辑</button></span>
|
|
|
<span style="margin-left:15px;"><button class="btn btn-info" onClick="delearticle();" type="button">删除</button></span></div>
|
|
|
-
|
|
|
+
|
|
|
<h4><p style="font-weight:bold; border-bottom:1px dashed #98D6DC; padding-bottom:20px;" class="text-center">{{.T.s_title}}</p></h4>
|
|
|
<div>
|
|
|
<p style="font-size:12px; margin-bottom:30px;" class="text-center">{{if eq .T.s_author ""}}发布人:{{.T.s_editorname}}{{else}}作者:{{.T.s_author}}{{end}} 发布日期: {{if not .T.releasetime}}{{.T.l_createdate}} {{else}} {{.T.releasetime}}{{end}} (文章来源:<a style="font-size:14px; color:#0000FF;" target="_blank" href="{{.T.s_url}}">{{.T.s_source}}</a>)</p> </div>
|
|
@@ -118,7 +118,7 @@ margin-top:-8px;
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<!-- 修改文章 -->
|
|
|
<div id="second" style="display: none;" class="widget-box">
|
|
|
<div class="widget-content nopadding">
|
|
@@ -133,7 +133,7 @@ margin-top:-8px;
|
|
|
<div class="col-sm-4">
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="form-group">
|
|
|
<label id="col-sm-2" class="col-sm-2 control-label" for="name">文章来源:</label>
|
|
|
<div class="col-sm-2">
|
|
@@ -143,7 +143,7 @@ margin-top:-8px;
|
|
|
<input type="text" name="s_url" class="form-control " placeholder="URL" value="{{.T.s_url}}">
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="form-group">
|
|
|
<label id="col-sm-2" class="col-sm-2 control-label" for="name">文章作者:</label>
|
|
|
<div class="col-sm-2">
|
|
@@ -152,7 +152,7 @@ margin-top:-8px;
|
|
|
<div class="col-sm-4 text-center">
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="form-group">
|
|
|
<label id="col-sm-2" class="col-sm-2 control-label" for="name">文章内容:</label>
|
|
|
<div class="col-sm-10">
|
|
@@ -178,15 +178,15 @@ margin-top:-8px;
|
|
|
afterBlur: function(){
|
|
|
this.sync()
|
|
|
}
|
|
|
- });
|
|
|
+ });
|
|
|
}
|
|
|
kindEditInit()
|
|
|
})
|
|
|
- </script>
|
|
|
+ </script>
|
|
|
<input type="text" hidden="none" name="praise" value="{{.T.praise}}"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="form-group">
|
|
|
<label id="col-sm-2" class="col-sm-2 control-label" for="name">关键词:</label>
|
|
|
<div class="col-sm-6">
|
|
@@ -195,7 +195,7 @@ margin-top:-8px;
|
|
|
<div class="col-sm-4">
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="form-group">
|
|
|
<label id="col-sm-2" class="col-sm-2 control-label" for="name">简单描述:</label>
|
|
|
<div class="col-sm-6">
|
|
@@ -205,7 +205,7 @@ margin-top:-8px;
|
|
|
<div class="col-sm-4">
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<!--<div class="form-group" style="display:none;">
|
|
|
<label id="col-sm-2" class="col-sm-2 control-label" for="name">文章摘要:</label>
|
|
|
<div class="col-sm-6">
|
|
@@ -214,62 +214,123 @@ margin-top:-8px;
|
|
|
<div class="col-sm-4">
|
|
|
</div>
|
|
|
</div>-->
|
|
|
-
|
|
|
- <div class="form-group" >
|
|
|
- <label id="col-sm-2" class="col-sm-2 control-label" for="name">头图:</label>
|
|
|
- <div class="col-sm-8">
|
|
|
- <div id="pic">
|
|
|
- <table id="table1"><tr id="tr1"></tr></table>
|
|
|
- </div>
|
|
|
- <input type="hidden" value='{{.T.s_pic}}' name="s_pic" id="imgurl"/>
|
|
|
- <div id="mm" style="position:relative;"><span style="color:#999999; display:inline-block; position:absolute; left:80px; top:5px;"> 图片尺寸750*420</span></div>
|
|
|
- </div>
|
|
|
- <div class="col-sm-2">
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
+
|
|
|
<div class="form-group" >
|
|
|
<label id="col-sm-2" class="col-sm-2 control-label" for="name">示例图片:</label>
|
|
|
<div class="col-sm-8">
|
|
|
<div id="pic1">
|
|
|
<table id="table11"><tr id="tr11"></tr></table>
|
|
|
</div>
|
|
|
- <input type="hidden" value="{{if .T.s_pic1}}{{.T.s_pic1}}{{end}}" name="s_pic1" id="imgurl1"/>
|
|
|
+ <input type="hidden" value="{{if .T.s_pic1}}{{.T.s_pic1}}{{end}}" name="s_pic1" id="imgurl1"/>
|
|
|
<div id="mm1" style="position:relative;"><span style="color:#999999; display:inline-block; position:absolute; left:80px; top:5px;"> 图片尺寸250*250</span></div>
|
|
|
</div>
|
|
|
<div class="col-sm-2">
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="form-group">
|
|
|
<label id="col-sm-2" class="col-sm-2 control-label" for="name">发布时间:</label>
|
|
|
- <div class="col-sm-3">
|
|
|
- <input style="background:#fff url({{Msg "seo" "cdn"}}/images/datePicker.gif) no-repeat right;" id="releasetime" datatype="*"
|
|
|
+ <div class="col-sm-3">
|
|
|
+ <input style="background:#fff url({{Msg "seo" "cdn"}}/images/datePicker.gif) no-repeat right;" id="releasetime" datatype="*"
|
|
|
onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" name="releasetime" class="form-control" placeholder="请输入发布时间!" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="ture" value="{{.T.releasetime}}"/>
|
|
|
</div>
|
|
|
<div class="col-sm-4">
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div class="form-group">
|
|
|
<label id="col-sm-2" class="col-sm-2 control-label" for="name">选择栏目:</label>
|
|
|
<div class="col-sm-2">
|
|
|
- <select name="s_contenttype" class="form-control">
|
|
|
- <option value="qykb" {{if eq .T.s_contenttype "qykb"}} selected="selected" {{end}}> 企业网快报 </option>
|
|
|
- <!--<option value="hyzx" {{if eq .T.s_contenttype "hyzx"}} selected="selected" {{end}}> 行业资讯 </option>
|
|
|
- <option value="mtpj" {{if eq .T.s_contenttype "mtpj"}} selected="selected" {{end}}> 媒体评价 </option>-->
|
|
|
- <option value="zcfg" {{if eq .T.s_contenttype "zcfg"}} selected="selected" {{end}}> 政策法规 </option>
|
|
|
- <option value="zthd" {{if eq .T.s_contenttype "zthd"}} selected="selected" {{end}}> 专题活动 </option>
|
|
|
- <option value="zh" {{if eq .T.s_contenttype "zh"}} selected="selected" {{end}}> 展会 </option>
|
|
|
- <option value="qtlm" {{if eq .T.s_contenttype "qtlm"}} selected="selected" {{end}}> 其他栏目 </option>
|
|
|
- <option value="wxlm" {{if eq .T.s_contenttype "wxlm"}} selected="selected" {{end}}> 微信栏目 </option>
|
|
|
- <option value="zhsk" {{if eq .T.s_contenttype "zhsk"}} selected="selected" {{end}}> 知识库 </option>
|
|
|
- <option value="jybk" {{if eq .T.s_contenttype "jybk"}} selected="selected" {{end}}> 剑鱼博客 </option>
|
|
|
- <option value="appxxtz" {{if eq .T.s_contenttype "appxxtz"}} selected="selected" {{end}}> APP消息通知 </option>
|
|
|
- <option value="gsdt" {{if eq .T.s_contenttype "gsdt"}} selected="selected" {{end}}> 公司动态 </option>
|
|
|
- <option value="hyzc" {{if eq .T.s_contenttype "hyzc"}} selected="selected" {{end}}> 行业政策 </option>
|
|
|
- </select>
|
|
|
- </div>
|
|
|
+ <select name="s_contenttype" id="selectlanmu" class="form-control" onchange="
|
|
|
+ if(this.value != '')
|
|
|
+ setCity(this.options[this.selectedIndex].value);">
|
|
|
+ {{range .T.parentColumn }}
|
|
|
+ <option value="{{.columnCode}}"> {{.columnName}} </option>
|
|
|
+ {{end}}
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-2">
|
|
|
+ <select name="secondClassify" id="classify" class="form-control" style="display: none;" hidden onchange="
|
|
|
+ if(this.value != '')
|
|
|
+ setColumn(this.options[this.selectedIndex].value);">
|
|
|
+ <option value="0">-请选择-</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="col-sm-2">
|
|
|
+ <select name="threeClassify" id="threeClassify" class="form-control" style="display: none;" hidden>
|
|
|
+ <option value="0">-请选择-</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <script>
|
|
|
+
|
|
|
+ var classifyArr = {{.T.childColumn}};
|
|
|
+ $("select[name='s_contenttype'] option[value='" + {{.T.s_contenttype}}+ "']").attr("selected", true);
|
|
|
+
|
|
|
+ function setCity(oneLevel) {
|
|
|
+ console.log("---------",oneLevel);
|
|
|
+ var classify = document.getElementById('classify');
|
|
|
+ var classify_len = classify.options.length;
|
|
|
+ for (var i = 0; i < classify_len; i++) {
|
|
|
+ if (classify_len > 0) {
|
|
|
+ classify.options.remove(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (oneLevel == "0") {
|
|
|
+ var opt = new Option('-请选择-', 0);
|
|
|
+ classify.options.add(opt);
|
|
|
+ } else {
|
|
|
+ $('#threeClassify').css('display','none')
|
|
|
+ if (classifyArr[oneLevel] === undefined){
|
|
|
+ $('#classify').css('display','none')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var pro_len = classifyArr[oneLevel].length;
|
|
|
+ var text_1 = document.getElementById("classify");
|
|
|
+
|
|
|
+ $('#classify').css('display','block')
|
|
|
+ text_1. hidden =false; //显示元素
|
|
|
+ for (i = 0; i < pro_len; i++) {
|
|
|
+ var opt = new Option(classifyArr[oneLevel][i].columnName, classifyArr[oneLevel][i].columnCode);
|
|
|
+ classify.options.add(opt);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("select[name='secondClassify'] option[value='" + {{.T.s_secondclassifytype}}+ "']").attr("selected", true);
|
|
|
+ }
|
|
|
+ setCity({{.T.s_contenttype}})
|
|
|
+ function setColumn(province) {
|
|
|
+ var city = document.getElementById('threeClassify');
|
|
|
+ var city_len = city.options.length;
|
|
|
+ for (var i = 0; i < city_len; i++) {
|
|
|
+ if (city_len > 0) {
|
|
|
+ city.options.remove(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (province == "0") {
|
|
|
+ var opt = new Option('-请选择-', 0);
|
|
|
+ city.options.add(opt);
|
|
|
+ } else {
|
|
|
+ // console.log("子栏目", classifyArr[province])
|
|
|
+ if (classifyArr[province] === undefined){
|
|
|
+ $('#threeClassify').css('display','none')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var province_len = classifyArr[province].length;
|
|
|
+ var text_1 = document.getElementById("threeClassify");
|
|
|
+
|
|
|
+ $('#threeClassify').css('display','block')
|
|
|
+ text_1. hidden =false; //显示元素
|
|
|
+ for (i = 0; i < province_len; i++) {
|
|
|
+ var opt = new Option(classifyArr[province][i].columnName, classifyArr[province][i].columnCode);
|
|
|
+ city.options.add(opt);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log({{.T.s_threeclassifytype}},"00000")
|
|
|
+ $("select[name='threeClassify'] option[value='" + {{.T.s_threeclassifytype}}+ "']").attr("selected", true);
|
|
|
+ }
|
|
|
+ setColumn({{.T.s_secondclassifytype}})
|
|
|
+ </script>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
<label id="col-sm-2" class="col-sm-2 control-label" for="name">修改记录:</label>
|
|
@@ -288,7 +349,7 @@ margin-top:-8px;
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -296,10 +357,10 @@ margin-top:-8px;
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
var img = document.createElement('img');
|
|
|
-var urls = "";
|
|
|
-var urls1 = "";
|
|
|
-var x = 0;
|
|
|
-var y = 0;
|
|
|
+var urls = "";
|
|
|
+var urls1 = "";
|
|
|
+var x = 0;
|
|
|
+var y = 0;
|
|
|
var str='str';
|
|
|
img.className="imgs";
|
|
|
{{if .T.s_pic}}
|
|
@@ -335,7 +396,7 @@ img.className="imgs";
|
|
|
{{end}}
|
|
|
|
|
|
|
|
|
-$(function(){
|
|
|
+$(function(){
|
|
|
var option={
|
|
|
btnname:"图片上传",//按钮名
|
|
|
btnClass:"btn btn-info",
|
|
@@ -382,8 +443,8 @@ $(function(){
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
- $("#mm").upload(option);
|
|
|
-
|
|
|
+ $("#mm").upload(option);
|
|
|
+
|
|
|
})
|
|
|
|
|
|
{{if .T.s_pic1}}
|
|
@@ -418,7 +479,7 @@ $(function(){
|
|
|
}
|
|
|
{{end}}
|
|
|
|
|
|
-$(function(){
|
|
|
+$(function(){
|
|
|
var option={
|
|
|
btnname:"图片上传",//按钮名
|
|
|
btnClass:"btn btn-info",
|
|
@@ -465,12 +526,12 @@ $(function(){
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
- $("#mm1").upload(option);
|
|
|
-
|
|
|
+ $("#mm1").upload(option);
|
|
|
+
|
|
|
})
|
|
|
</script>
|
|
|
<script type="text/javascript">
|
|
|
-//var subcontent = $("<div/>").html($(".summernote").text()).text().substr(0,200);
|
|
|
+//var subcontent = $("<div/>").html($(".summernote").text()).text().substr(0,200);
|
|
|
//$("#s_subcontent").val(subcontent);
|
|
|
function editarticle(){
|
|
|
$("#first").css("display","none");
|
|
@@ -481,7 +542,7 @@ $(function(){
|
|
|
$("#first").css("display","block");
|
|
|
}
|
|
|
var clickCount = 0;
|
|
|
-function updatearticle(){
|
|
|
+function updatearticle(){
|
|
|
if (clickCount > 0){
|
|
|
alert("您已经提交过了!!!");
|
|
|
return ;
|
|
@@ -505,7 +566,7 @@ function updatearticle(){
|
|
|
if (str4 == ''){
|
|
|
alert('文章描述不能为空!')
|
|
|
return
|
|
|
- }
|
|
|
+ }
|
|
|
var str5 = $("#releasetime").val();
|
|
|
if (str5 == ''){
|
|
|
alert('文章发布时间不能为空!')
|
|
@@ -514,42 +575,42 @@ function updatearticle(){
|
|
|
//序列化表格内容为字符串
|
|
|
//$("#s_abstract").val($('#s_description').val());
|
|
|
//$("#s_content").val($('.summernote').code());
|
|
|
- //var subcontent = $("<div/>").html($(".summernote").code()).text().substr(0,200);
|
|
|
+ //var subcontent = $("<div/>").html($(".summernote").code()).text().substr(0,200);
|
|
|
//$("#s_subcontent").val(subcontent);
|
|
|
var Param = $("#updatearticle").serialize();
|
|
|
- $.ajax({
|
|
|
- type:'post',
|
|
|
- url:'/manage/updatearticle',
|
|
|
- data:Param,
|
|
|
- cache:false,
|
|
|
- dataType:'json',
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'/manage/updatearticle',
|
|
|
+ data:Param,
|
|
|
+ cache:false,
|
|
|
+ dataType:'json',
|
|
|
success:function(data){
|
|
|
- Dialog.alert(data.msg,function(){location.href ="/manage/articlelist"});
|
|
|
- }
|
|
|
- });
|
|
|
- clickCount++;
|
|
|
- }
|
|
|
-
|
|
|
- function delearticle(){
|
|
|
+ Dialog.alert(data.msg,function(){location.href ="/manage/articlelist"});
|
|
|
+ }
|
|
|
+ });
|
|
|
+ clickCount++;
|
|
|
+ }
|
|
|
+
|
|
|
+ function delearticle(){
|
|
|
Dialog.confirm('警告:您确认要删除吗?',function(){
|
|
|
- $.ajax({
|
|
|
- type:'post',
|
|
|
- url:'/manage/delearticle',
|
|
|
- data:{_id:'{{.T._id}}',s_contenttype:{{.T.s_contenttype}}},
|
|
|
- cache:false,
|
|
|
- dataType:'json',
|
|
|
+ $.ajax({
|
|
|
+ type:'post',
|
|
|
+ url:'/manage/delearticle',
|
|
|
+ data:{_id:'{{.T._id}}',s_contenttype:{{.T.s_contenttype}}},
|
|
|
+ cache:false,
|
|
|
+ dataType:'json',
|
|
|
success:function(data){
|
|
|
- Dialog.alert(data.msg,function(){location.href ="/manage/articlelist"});
|
|
|
- }
|
|
|
- });
|
|
|
+ Dialog.alert(data.msg,function(){location.href ="/manage/articlelist"});
|
|
|
+ }
|
|
|
+ });
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
-//禁止右键弹出菜单
|
|
|
-//$(document).ready(function() {
|
|
|
+//禁止右键弹出菜单
|
|
|
+//$(document).ready(function() {
|
|
|
//$(document).bind("contextmenu",function(e) {
|
|
|
-//return false;
|
|
|
-//});
|
|
|
+//return false;
|
|
|
+//});
|
|
|
//});
|
|
|
</script>
|
|
|
</body>
|