@@ -137,7 +137,7 @@
type: "html",
proportion: '1',
};
$component.html(getComponentRowHtml({ name: "富文本" , text: "富文本" }));
$component.html(getComponentRowHtml({ name: "富文本", text: "富文本" }));
},
property: function ($component) {
var dfop = $component[0].dfop;
@@ -421,6 +421,7 @@
table: '',
field: "",
proportion: '1',
verify: '',
dataSource: '0', // 0数据字典1数据源
dataSourceId: '',
@@ -431,7 +432,7 @@
},
property: function ($component) {
var dfop = $component[0].dfop;
var $html = setComponentPropertyHtml($component);
var $html = setComponentPropertyHtml($component,verifyDatalist2 );
var _html = '';
_html += '<div class="lr-component-title">数据来源</div>';
_html += '<div class="lr-component-control"><div id="lr_component_dataSource"></div></div>';
@@ -459,7 +460,7 @@
setDatasource(dfop);
},
renderTable: function (compont, $row) {//使用表单的时候渲染成table
var $compont = $('<div class="radio"></div>');
var $compont = $('<div id="' + compont.id + '" class="radio"></div>');
/*获取数据字典或者数据源数据*/
if (compont.dataSource == '0') {
learun.clientdata.getAllAsync('dataItem', {
@@ -488,7 +489,7 @@
return $compont;
},
renderQuery: function (compont, $row) {
var $compont = $('<div class="radio"></div>');
var $compont = $('<div id="' + compont.id + '" class="radio"></div>');
/*获取数据字典或者数据源数据*/
if (compont.dataSource == '0') {
learun.clientdata.getAllAsync('dataItem', {
@@ -530,17 +531,18 @@
table: '',
field: "",
proportion: '1',
verify: '',
dataSource: '0', // 0数据字典1数据源
dataSourceId: '',
itemCode:'',
itemCode: '',
dfvalue: '' // 默认值
};
$component.html(getComponentRowHtml({ name: $component[0].dfop.title, text: "多选项" }));
},
property: function ($component) {
var dfop = $component[0].dfop;
var $html = setComponentPropertyHtml($component);
var $html = setComponentPropertyHtml($component, verifyDatalist2 );
var _html = '';
_html += '<div class="lr-component-title">数据来源</div>';
_html += '<div class="lr-component-control"><div id="lr_component_dataSource"></div></div>';
@@ -567,7 +569,7 @@
setDatasource(dfop);
},
renderTable: function (compont, $row) {//使用表单的时候渲染成table
var $compont = $('<div class="checkbox"></div>');
var $compont = $('<div id="' + compont.id + '" class="checkbox"></div>');
/*获取数据字典或者数据源数据*/
if (compont.dataSource == '0') {
learun.clientdata.getAllAsync('dataItem', {
@@ -597,7 +599,7 @@
return $compont;
},
renderQuery: function (compont, $row) {
var $compont = $('<div class="checkbox"></div>');
var $compont = $('<div id="' + compont.id + '" class="checkbox"></div>');
/*获取数据字典或者数据源数据*/
if (compont.dataSource == '0') {
learun.clientdata.getAllAsync('dataItem', {
@@ -643,7 +645,7 @@
dataSource: '0', // 0数据字典1数据源
dataSourceId: '',
itemCode:'',
itemCode: '',
dfvalue: '' // 默认值
};
$component.html(getComponentRowHtml({ name: $component[0].dfop.title, text: "下拉框" }));
@@ -1000,7 +1002,7 @@
_html += '<div class="lr-component-title lrrelation">单位组织控件级联-上一级</div>';
_html += '<div class="lr-component-control lrrelation"><div id="lr_component_relation"></div></div>';
$html.append(_html);
// 设置多语言
$html.find('.lr-component-title').each(function () {
@@ -1024,11 +1026,11 @@
data: organizes,
value: 'id',
text: 'text',
select: function (item,type) {
select: function (item, type) {
if (!!item) {
dfop.relation = item.id;
}
else if (type !== 'refresh'){
else if (type !== 'refresh') {
dfop.relation = '';
}
}
@@ -1148,7 +1150,7 @@
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree',
param: {}
});
}
}
break;
case "company"://公司
$compont.lrCompanySelect({});
@@ -1337,7 +1339,7 @@
}
}
if (compont.isHide == '1') {
$row.hide();
}
@@ -1350,18 +1352,18 @@
$row.append($compont);
switch (compont.dataType) {
case 'company':
$compont.lrCompanySelect({ type: 'multiple' })
break;
case 'department':
$compont.lrDepartmentSelect();
break;
case 'user':
$compont.lrUserSelect({ type: '1' })
break;
case 'role':
$compont.lrPostSelect({ type: 'treemultiple' });
break;
case 'company':
$compont.lrCompanySelect({ type: 'multiple' })
break;
case 'department':
$compont.lrDepartmentSelect();
break;
case 'user':
$compont.lrUserSelect({ type: '1' })
break;
case 'role':
$compont.lrPostSelect({ type: 'treemultiple' });
break;
}
if (compont.isHide == '1') {
$row.hide();
@@ -1633,7 +1635,7 @@
var $compont = $('<div id="' + compont.id + '"></div>');
$row.append($compont);
compont.hideData = [];
var headData = toGirdheadData(compont.fieldsData, compont.hideData, $compont);
if (!!compont.preloadDb && !!compont.preloadTable) {
$compont.jfGrid({
@@ -1783,8 +1785,7 @@
}
}
});
if (!!designerDfop.dbTable && designerDfop.dbTable.length > 0)
{
if (!!designerDfop.dbTable && designerDfop.dbTable.length > 0) {
$('#lr_component_table').lrselectSet(dfop.table || designerDfop.dbTable[0].name);
}
// 标题设置
@@ -1851,7 +1852,7 @@
};
// 数据字典选择初始化、数据源选择初始化
function setDatasource(dfop) {
$('#lr_component_dfvalue').lrselect({
$('#lr_component_dfvalue').lrselect({
allowSearch: true,
select: function (item) {
if (!!item) {
@@ -1872,7 +1873,7 @@
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataItem/GetClassifyTree',
type: 'tree',
value:'value',
value: 'value',
select: function (item) {
if (!!item) {
if (dfop.dataSourceId != item.id) {
@@ -1918,7 +1919,7 @@
vlist[1] = item.value;
dfop.dataSourceId = String(vlist);
if (vlist[2] != '') {
learun.clientdata.getAllAsync('sourceData', {
code: vlist[0],
callback: function (dataes) {
@@ -1972,12 +1973,12 @@
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetList',
value: 'F_Code',
text: 'F_Name',
title:'F_Name',
title: 'F_Name',
select: function (item) {
if (item) {
if (dfop.dataSourceId != '') {
var vlist = dfop.dataSourceId.split(',');
if (vlist.length <3 || vlist[0] != item.F_Code) {
if (vlist.length < 3 || vlist[0] != item.F_Code) {
vlist[1] = '';
vlist[2] = '';
dfop.dataSourceId = item.F_Code + ',,';
@@ -1989,7 +1990,7 @@
dfop.dfvalue = '';
}
//$('#lr_component_dfvalue').lrselectRefresh({ url: '', data: [] });
//获取字段数据
learun.httpAsync('GET', top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataColName', { code: item.F_Code }, function (data) {
@@ -2009,7 +2010,7 @@
data: fieldData,
placeholder: false
});
$('#lr_component_dataSourceId2').lrselectSet(vlist[2] ||fieldData[0].value);
$('#lr_component_dataSourceId2').lrselectSet(vlist[2] || fieldData[0].value);
});
}
else {
@@ -2034,7 +2035,7 @@
$('#lr_component_dataItemCode').lrselectSet(dfop.itemCode);
}
else {
var valuelist = dfop.dataSourceId.split(',');
var valuelist = dfop.dataSourceId.split(',');
$('#lr_component_dataSourceId').lrselectSet(valuelist[0]);
}
@@ -2191,7 +2192,7 @@
delete pIds[item['id']];
}
}
});
for (var id in pIds) {
_fn(resdata, id);
@@ -2213,8 +2214,7 @@
return resdata;
}
// html编码
function htmlEncode(text)
{
function htmlEncode(text) {
text = text || "";
text = text.replace(/%/g, "{@bai@}");
text = text.replace(/ /g, "{@kong@}");