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