提交 8b6631b5 编写于 作者: U unknown

excel导入

上级 e3e90b21
......@@ -18,8 +18,12 @@
<tr>
<td class="editTableTitle">组织对象:</td>
<td class="editTableValue">
<input name="isName" type="radio" value="true" text{($.isName)===true?'checked':''}/>
<input name="isName" type="radio" value="false" text{($.isName)!==true?'checked':''}/>
<input name="isName" type="radio" value="true" text{($.isName)===true?'checked':''} onclick="if(this.checked){
$('text{$.pid}cmsNamePropertyArea').setStyle('display', '');
}"/>
<input name="isName" type="radio" value="false" text{($.isName)!==true?'checked':''} onclick="if(this.checked){
$('text{$.pid}cmsNamePropertyArea').setStyle('display', 'none');
}"/>
</td>
</tr>
</table>
......@@ -106,27 +110,6 @@
<input name="isSummary" type="radio" value="false" text{($.isSummary)!==false?'checked':''}/>
</td>
</tr>
<tr>
<td class="editTableTitle">是否为创建人:</td>
<td class="editTableValue">
<input name="isPublisher" type="radio" value="true" text{($.isPublisher)==true?'checked':''}/>
<input name="isPublisher" type="radio" value="false" text{($.isPublisher)!==false?'checked':''}/>
</td>
</tr>
<tr>
<td class="editTableTitle">是否作者:</td>
<td class="editTableValue">
<input name="isAuthor" type="radio" value="true" text{($.isAuthor)==true?'checked':''}/>
<input name="isAuthor" type="radio" value="false" text{($.isAuthor)!==false?'checked':''}/>
</td>
</tr>
<tr>
<td class="editTableTitle">是否读者:</td>
<td class="editTableValue">
<input name="isReader" type="radio" value="true" text{($.isReader)==true?'checked':''}/>
<input name="isReader" type="radio" value="false" text{($.isReader)!==false?'checked':''}/>
</td>
</tr>
<tr>
<td class="editTableTitle">是否置顶:</td>
<td class="editTableValue">
......@@ -135,6 +118,32 @@
</td>
</tr>
</table>
<div style="display:text{(($.isName)==true)?'block':'none'}" id="text{$.pid}cmsNamePropertyArea">
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
<tr>
<td class="editTableTitle">是否为创建人:</td>
<td class="editTableValue">
<input name="isPublisher" type="radio" value="true" text{($.isPublisher)==true?'checked':''}/>
<input name="isPublisher" type="radio" value="false" text{($.isPublisher)!==false?'checked':''}/>
</td>
</tr>
<tr>
<td class="editTableTitle">是否为作者:</td>
<td class="editTableValue">
<input name="isAuthor" type="radio" value="true" text{($.isAuthor)==true?'checked':''}/>
<input name="isAuthor" type="radio" value="false" text{($.isAuthor)!==false?'checked':''}/>
</td>
</tr>
<tr>
<td class="editTableTitle">是否为读者:</td>
<td class="editTableValue">
<input name="isReader" type="radio" value="true" text{($.isReader)==true?'checked':''}/>
<input name="isReader" type="radio" value="false" text{($.isReader)!==false?'checked':''}/>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
......
......@@ -114,7 +114,14 @@ MWF.xApplication.query.Query.Importer = MWF.QImporter = new Class({
getOrgColIndexArray : function(){
var orgColIndexArray = [];
this.json.data.selectList.each(function(columnJson, index){
if( columnJson.isName )orgColIndexArray.push( index );
if( columnJson.isName ) {
orgColIndexArray.push(index);
}
// }else if( this.json.type === "cms" ){
// if( columnJson.isPublisher || columnJson.isAuthor || columnJson.isReader ){
// orgColIndexArray.push( index );
// }
// }
}.bind(this));
return orgColIndexArray;
},
......@@ -278,7 +285,7 @@ MWF.xApplication.query.Query.Importer = MWF.QImporter = new Class({
d = this.groupMapImported[str];
break;
default:
var d = this.identityMapImported[str] ||
d = this.identityMapImported[str] ||
this.personMapImported[str] ||
this.unitMapImported[str] ||
this.groupMapImported[str];
......@@ -598,7 +605,7 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
}
if( this.importer.json.type === "cms" ){
this.parseCMSDocument()
this.parseCMSDocument_FromExcel( columnJson, i, data )
}
}
......@@ -621,6 +628,10 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
});
d[names[names.length -1]] = data;
}
if( this.importer.json.type === "cms" ){
this.parseCMSDocument_CalculateField( fieldJson, data )
}
}
}.bind(this));
......@@ -629,31 +640,36 @@ MWF.xApplication.query.Query.Importer.Row = new Class({
this.importer.fireEvent("afterCreateRowData", [null, this]);
},
parseCMSDocument : function( columnJson, colIndex, data ){
var columnText = this.importer.lp.importValidationColumnText;
var columnTextExcel = this.importer.lp.importValidationColumnTextExcel;
parseCMSDocument_FromExcel : function( columnJson, i, data ){
var lp = this.importer.lp;
var columnText = lp.importValidationColumnText;
var columnTextExcel = lp.importValidationColumnTextExcel;
var colInfor = columnText.replace( "{n}", i+1 );
var colInforExcel = columnTextExcel.replace( "{n}", this.importer.excelUtils.index2ColName( i ) );
if( columnJson.isTitle ){
if( data.length > 70 ){
this.errorTextList.push(colInfor + data + "作为标题长度不能超过70个字" + lp.fullstop );
this.errorTextListExcel.push( colInforExcel + data + "作为标题长度不能超过70个字" + lp.fullstop );
}
}
if( columnJson.isSummary ){
if( data.length > 70 ){
this.errorTextList.push(colInfor + data + "作为摘要长度不能超过70个字" + lp.fullstop );
this.errorTextListExcel.push( colInforExcel + data + "作为摘要长度不能超过70个字" + lp.fullstop );
}
}
if( columnJson.isPublisher ){
if( columnJson.isName ){
if( columnJson.isPublisher ){
}
if( columnJson.isAuthor ){
}
if( columnJson.isAuthor ){
}
if( columnJson.isReader ){
}
if( columnJson.isReader ){
}
}
if( columnJson.isTop ){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册