|
@@ -44,8 +44,14 @@ define([ "require", "utils/Utils", "modules/Modal", "utils/Messages", "utils/Enu
|
|
|
return resultStr;
|
|
|
}
|
|
|
}, getEmptyString = function(key) {
|
|
|
- return options.getEmptyString ? options.getEmptyString(key) : "N/A";
|
|
|
+ return options.getEmptyString ? options.getEmptyString(key) : "空";
|
|
|
}, getValue = function(val, key) {
|
|
|
+ if("false"===val||false===val){
|
|
|
+ return "否";
|
|
|
+ }
|
|
|
+ else if ("true"===val||true===val){
|
|
|
+ return "是";
|
|
|
+ }
|
|
|
if (options && options.getValue && (val = options.getValue(val, key)), _.isUndefined(val) || _.isNull(val)) return getEmptyString(key);
|
|
|
if (!_.isNumber(val) && _.isNaN(parseInt(val)) || !formatIntVal) {
|
|
|
var newVal = val;
|
|
@@ -115,6 +121,7 @@ define([ "require", "utils/Utils", "modules/Modal", "utils/Messages", "utils/Enu
|
|
|
return (_.isUndefined(sortBy) || 1 == sortBy) && (valueObjectKeysList = _.sortBy(valueObjectKeysList)),
|
|
|
valueObjectKeysList.map(function(key) {
|
|
|
if ("profileData" != key) {
|
|
|
+ console.log("key",key)
|
|
|
var keyValue = valueObject[key], listCount = showListCount && _.isArray(keyValue) && keyValue.length > 0 ? " (" + numberFormat(keyValue.length) + ")" : "", defEntity = _.find(attributeDefs, {
|
|
|
name: key
|
|
|
});
|
|
@@ -134,7 +141,7 @@ define([ "require", "utils/Utils", "modules/Modal", "utils/Messages", "utils/Enu
|
|
|
var val = "";
|
|
|
if (val = _.isObject(valueObject[key]) ? keyValue : "guid" === key || "__guid" === key ? options.guidHyperLink === !1 ? getValue(keyValue, key) : '<a title="' + key + '" href="#!/detailPage/' + _.escape(keyValue) + '">' + getValue(keyValue, key) + "</a>" : getValue(keyValue, key),
|
|
|
isTable) {
|
|
|
- var value = val, appendClass = "N/A" == value ? "hide-row" : "", htmlTag = '<div class="scroll-y">' + value + "</div>";
|
|
|
+ var value = val, appendClass = "空" == value ? "hide-row" : "", htmlTag = '<div class="scroll-y">' + value + "</div>";
|
|
|
if (_.isObject(valueObject[key]) && !_.isEmpty(valueObject[key])) {
|
|
|
var matchedLinkString = val.match(/href|value-loader\w*/g), matchedJson = val.match(/json-value|json-string\w*/g), isMatchJSONStringIsSingle = (val.match(/json-key\w*/g),
|
|
|
matchedLinkString && matchedLinkString.length <= 5, matchedJson && 1 == matchedJson.length), expandCollapseButton = "";
|
|
@@ -144,10 +151,10 @@ define([ "require", "utils/Utils", "modules/Modal", "utils/Messages", "utils/Enu
|
|
|
htmlTag = '<pre class="' + className + '">' + expandCollapseButton + "<code>" + val + "</code></pre>";
|
|
|
}
|
|
|
}
|
|
|
- table += '<tr class="' + appendClass + '"><td>' + (_.escape(key) + listCount) + "</td><td>" + htmlTag + "</td></tr>";
|
|
|
+ table += '<tr class="' + appendClass + '"><td>' + (Utils.toChinese(_.escape(key))+ listCount) + "</td><td>" + htmlTag + "</td></tr>";
|
|
|
} else table += "<span>" + val + "</span>";
|
|
|
}
|
|
|
- }), table && table.length > 0 ? table : '<tr class="empty"><td colspan="22"><span>No Record found!</span></td></tr>';
|
|
|
+ }), table && table.length > 0 ? table : '<tr class="empty"><td colspan="22"><span>没有记录!</span></td></tr>';
|
|
|
}, CommonViewFunction.tagForTable = function(obj) {
|
|
|
var traits = obj.classifications, tagHtml = "", addTag = "", popTag = "", count = 0, entityName = Utils.getName(obj);
|
|
|
return traits && traits.map(function(tag) {
|