|
@@ -78,6 +78,7 @@
|
|
|
}
|
|
|
.content-edit .bk-literature li{
|
|
|
list-style-type: none;
|
|
|
+ margin-left: -190px;
|
|
|
padding: 8px 16px;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
@@ -515,26 +516,27 @@
|
|
|
// })
|
|
|
var status = $("input[name='status']:checked").val();
|
|
|
// 计算空数据条数
|
|
|
+ debugger
|
|
|
var propertyArr = [];
|
|
|
var name = $("#name").val();
|
|
|
- var alias = $("#alias").val();
|
|
|
- var discription = $("#discription").val();
|
|
|
+ // var alias = $("#alias").val();
|
|
|
+ // var discription = $("#discription").val();
|
|
|
var shopId = $("#shopId").val();
|
|
|
- var param0 = $('input[name="paramList[0].name"]').val();
|
|
|
+ // var param0 = $('input[name="paramList[0].name"]').val();
|
|
|
var seoKeyword = $("#seoKeyword").val();
|
|
|
var publishTime = $('input[name="publishTime"]').val();
|
|
|
var basePv = $("#basePv").val();
|
|
|
var typeId = $("#typeId").val();
|
|
|
|
|
|
propertyArr[0] = name;
|
|
|
- propertyArr[1] = discription;
|
|
|
- propertyArr[2] = param0;
|
|
|
- propertyArr[3] = seoKeyword;
|
|
|
- propertyArr[4] = shopId;
|
|
|
- propertyArr[5] = publishTime;
|
|
|
- propertyArr[6] = basePv;
|
|
|
- propertyArr[7] = typeId;
|
|
|
- propertyArr[8] = alias;
|
|
|
+ // propertyArr[1] = discription;
|
|
|
+ // propertyArr[1] = param0;
|
|
|
+ propertyArr[1] = seoKeyword;
|
|
|
+ propertyArr[2] = shopId;
|
|
|
+ propertyArr[3] = publishTime;
|
|
|
+ propertyArr[4] = basePv;
|
|
|
+ propertyArr[5] = typeId;
|
|
|
+ // propertyArr[8] = alias;
|
|
|
// propertyArr[9] = image;
|
|
|
// alert("1111111111111111");
|
|
|
var emptyNum = 0;
|
|
@@ -549,8 +551,8 @@
|
|
|
// 检测敏感词
|
|
|
var propertyMap = new Map();
|
|
|
propertyMap.set("name", name);
|
|
|
- propertyMap.set("alias", alias);
|
|
|
- propertyMap.set("discription", discription);
|
|
|
+ // propertyMap.set("alias", alias);
|
|
|
+ // propertyMap.set("discription", discription);
|
|
|
// propertyMap.set("productLink", productLink);
|
|
|
for (var i = 0; i <= 9; i++) {
|
|
|
var paramName = "\"paramList[" + i + "].name\"";
|
|
@@ -916,12 +918,12 @@
|
|
|
<div class="control-group" style="margin-left: 100px;margin-top: 30px">
|
|
|
<label class="red">*</label>
|
|
|
<label class="control-label keyClass">输入网址:</label>
|
|
|
- <input id="website" style="margin-left: 45px" htmlEscape="false" class="input-xlarge " placeholder="请以http(s)开头"/>
|
|
|
+ <input id="website" required="true" style="margin-left: 45px" htmlEscape="false" class="input-xlarge " placeholder="请以http(s)开头"/>
|
|
|
</div>
|
|
|
<div class="control-group" style="margin-left: 100px;margin-top: 30px">
|
|
|
<label class="red">*</label>
|
|
|
<label class="control-label keyClass">文章名字:</label>
|
|
|
- <input id="articleName" style="margin-left: 45px" htmlEscape="false" class="input-xlarge " placeholder="请输入文章名字"/>
|
|
|
+ <input id="articleName" required="true" style="margin-left: 45px" htmlEscape="false" class="input-xlarge " placeholder="请输入文章名字"/>
|
|
|
</div>
|
|
|
<div class="control-group" style="margin-left: 100px;margin-top: 30px">
|
|
|
<label class="red">*</label>
|
|
@@ -1537,18 +1539,44 @@
|
|
|
}
|
|
|
|
|
|
function createReferenceItem(referenceData){
|
|
|
+ var text=null
|
|
|
if(referenceData.referenceType == 1){
|
|
|
- var text = `
|
|
|
- `
|
|
|
+ text = "<div class=\"controls applicationsan\">"+
|
|
|
+ <%--"<span class=\"del\">[${statusIndex.index}]</span>"+--%>
|
|
|
+ "<span class=\"del\"><a href=\""+referenceData.website+"\" target=\"_blank\">${videoFile.articleName}(文章名称)</a></span>"+
|
|
|
+ "<span class=\"del\">\""+referenceData.websiteName+"\"(网站名称)</span>"+
|
|
|
+ "<span class=\"del\">\""+referenceData.publishTimeStr+"\"(发表日期)</span>"+
|
|
|
+ "<span class=\"del\">\""+referenceData.acitationTimeStr+"\"(引文日期)</span>"+
|
|
|
+ <%--"<a onclick=\"saveMataInfo(${videoFile.id})\">引用资料</a>"+--%>
|
|
|
+ "</div>"
|
|
|
}
|
|
|
if(referenceData.referenceType == 2){
|
|
|
-
|
|
|
+ text= "<div class=\"controls applicationsan\">"+
|
|
|
+ "<span class=\"del\">\""+referenceData.author+"\"(作者)</span>"+
|
|
|
+ "<span class=\"del\">\""+referenceData.workName+"\"(著作名)</span>"+
|
|
|
+ "<span class=\"del\">\""+referenceData.publicationPlace+"\"(出版地)</span>"+
|
|
|
+ "<span class=\"del\">\""+referenceData.press+"\"(出版社)</span>"+
|
|
|
+ "<span class=\"del\">\""+referenceData.publicationYearStr+"\"(出版年)</span>"+
|
|
|
+ "<span class=\"del\">\""+referenceData.acitationWeb+"\"(引文页码)</span>"+
|
|
|
+ "</div>"
|
|
|
}
|
|
|
if(referenceData.referenceType == 3){
|
|
|
-
|
|
|
- }
|
|
|
+ text= "<div class=\"controls applicationsan\">"+
|
|
|
+ "<span class=\"del\">\""+referenceData.referenceDescription+"\"(参考资料说明)</span>"+
|
|
|
+ "<span class=\"del\">\""+referenceData.imageDescription+"\"(图片描述)</span>"+
|
|
|
+ "<div class=\"conList\">"+
|
|
|
+ "<img id=\"imgaa\" src=\""+referenceData.imageUrl+"\"height=\"50px\" width=\"50px\" >(图片)</input>"+
|
|
|
+ "</div>"+
|
|
|
+ "</div>"
|
|
|
+ }
|
|
|
+ return text;
|
|
|
}
|
|
|
$(function(){
|
|
|
+ var refren='${cmBaikeProduct.referenceList}'
|
|
|
+ if(''==refren|| null==refren){
|
|
|
+ }else{
|
|
|
+ referenceList=JSON.parse(refren)
|
|
|
+ }
|
|
|
//初始化 义项名,词条概述
|
|
|
createContentEdit('#bk-name','${cmBaikeProduct.alias}')
|
|
|
createContentEdit('#discription','${cmBaikeProduct.discription}')
|
|
@@ -1563,27 +1591,9 @@
|
|
|
if(referenceEditTyp === 'add'){
|
|
|
markCount++
|
|
|
var result = setRefrenceData({})
|
|
|
- var con=null;
|
|
|
- if(result.referenceType == 1){
|
|
|
- <%-- con="<div class=\"controls applicationsan\" style=\"margin-top: 5px\">"+--%>
|
|
|
- <%-- "<span class=\"del\">[${statusIndex.index}]</span>"+--%>
|
|
|
- <%-- "<span class="del"><a href="${videoFile.website}" target="_blank">${videoFile.articleName}(文章名称)</a></span>"+--%>
|
|
|
- <%-- "<span class="del">${videoFile.websiteName}(网站名称)</span>"+--%>
|
|
|
- <%-- "<span class="del">${videoFile.publishTime}(发表日期)</span>"+--%>
|
|
|
- <%-- "<span class="del">${videoFile.acitationTime}(引文日期)</span>"+--%>
|
|
|
- <%-- "“<a onclick="saveMataInfo(${videoFile.id})">引用资料</a>"+--%>
|
|
|
- <%--"</div>"--%>
|
|
|
- }
|
|
|
- if(result.referenceType == 2){
|
|
|
-
|
|
|
- }
|
|
|
- if(result.referenceType == 3){
|
|
|
-
|
|
|
- }
|
|
|
- createReferenceItem(result)
|
|
|
+ var con=createReferenceItem(result)
|
|
|
result.ctrlId = currentContentEdit.confirm(con)
|
|
|
referenceList.push(result)
|
|
|
- console.log(referenceList);
|
|
|
$(this).parents('#dig').hide()
|
|
|
initRefrenceFormData({})
|
|
|
}else{
|
|
@@ -1602,8 +1612,8 @@
|
|
|
$(this).parents('#dig').hide()
|
|
|
initRefrenceFormData({})
|
|
|
})
|
|
|
- var referenceList = [{ctrlId: 'FDIEKABKKNJEEJAN'}] // referenceList[0].reyt = 1 // referenceList:'[{"type": 1}]'
|
|
|
- console.log('${cmBaikeProduct.materialInfo}')
|
|
|
+ <%-- referenceList = [{ctrlId: 'FDIEKABKKNJEEJAN'}] // referenceList[0].reyt = 1 // referenceList:'[{"type": 1}]'--%>
|
|
|
+ <%--console.log('${cmBaikeProduct.materialInfo}')--%>
|
|
|
// 初始化编辑框引用资料列表
|
|
|
contentEditMap.forEach(function(item){
|
|
|
item.edit.ctridList.forEach(function(ctrlId){
|
|
@@ -1611,6 +1621,8 @@
|
|
|
return ref.ctrlId == ctrlId
|
|
|
})
|
|
|
if(!data) return
|
|
|
+<%-- <c:forEach items="${cmBaikeProduct.materialInfo}" var="videoFile" varStatus="statusIndex">--%>
|
|
|
+<%-- </c:forEach>--%>
|
|
|
var text = createReferenceItem(data)
|
|
|
item.addLiteratureItem(ctrlId, text)
|
|
|
})
|