|
|
@@ -85,7 +85,7 @@ var GetPadVal = function (THandel) {
|
|
|
return parseFloat(PadValArr[0]) * 2;
|
|
|
}
|
|
|
};
|
|
|
-// 获取最大字符长度的字符串(起决定宽度的字符串/将字符去除HTML标签)(使用)
|
|
|
+// 获取最大字符长度的字符串(起决定宽度的字符串/将字符去除HTML标签)
|
|
|
var removeHtmlFunc = function (htmlStr, TdWidthVal) {
|
|
|
var ReArr = {
|
|
|
TextStr: "",
|
|
|
@@ -177,74 +177,9 @@ var removeHtmlFunc = function (htmlStr, TdWidthVal) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // 旧处理
|
|
|
- //pattStr = new RegExp(/(<(p){1}.*?>).*?(<\/\2>)/ig);
|
|
|
- //matchesArr = htmlStr.match(pattStr);
|
|
|
- //if (matchesArr != undefined && matchesArr.length > 0) {
|
|
|
- // // 清除匹配的P标签
|
|
|
- // for (var i = 0; i < matchesArr.length; i++) {
|
|
|
- // htmlStr = htmlStr.replace(matchesArr[i], "");
|
|
|
- // }
|
|
|
- //}
|
|
|
- // // 判断是否存在p标签
|
|
|
- //if (matchesArr != null || (matchesArr != undefined && matchesArr.length > 0)) {
|
|
|
- // if (htmlStr != null && htmlStr != "") {
|
|
|
- // // p标签混排
|
|
|
- // htmlStr = "<p>" + htmlStr + "</p>";
|
|
|
- // matchesArr.push(htmlStr);
|
|
|
- // htmlStr = null;
|
|
|
- // }
|
|
|
- // pattStr = new RegExp(/(<(p|b|span|u){1}.*?>).*?(<\/\2>)/i);
|
|
|
- // for (var i = 0; i < matchesArr.length; i++) {
|
|
|
- // var NewhtmlStr = matchesArr[i];
|
|
|
- // while (pattStr.test(NewhtmlStr)) {
|
|
|
- // var TmatchesArr = NewhtmlStr.match(pattStr);
|
|
|
- // if (TmatchesArr.length > 0) {
|
|
|
- // // 存在P标签
|
|
|
- // NewhtmlStr = NewhtmlStr.replace(TmatchesArr[1], "").replace(TmatchesArr[3], "");
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (i == 0 || (htmlStr.length < NewhtmlStr.length)) {
|
|
|
- // htmlStr = NewhtmlStr;
|
|
|
- // }
|
|
|
- // }
|
|
|
- //}
|
|
|
- //else {
|
|
|
- // pattStr = new RegExp(/(<(b|span|u){1}.*?>).*?(<\/\2>)/i);
|
|
|
- // if (pattStr.test(htmlStr)) {
|
|
|
- // while (pattStr.test(htmlStr)) {
|
|
|
- // var matchesArr = htmlStr.match(pattStr);
|
|
|
- // if (matchesArr.length > 0) {
|
|
|
- // htmlStr = htmlStr.replace(matchesArr[1], "").replace(matchesArr[3], "");
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- //}
|
|
|
ReArr.TextStr = htmlStr;
|
|
|
return ReArr;
|
|
|
};
|
|
|
-// 获取最大字符长度的字符串(起决定宽度的字符串/将字符去除HTML标签)(替换,不用)
|
|
|
-var dealTdTextFunc = function (htmlStr) {
|
|
|
- var ReStr = "";
|
|
|
- var ReNumber = 0;
|
|
|
- var pattStr = new RegExp(/<P.*?<\/P>/i);
|
|
|
- if (pattStr.test(htmlStr)) {
|
|
|
- while (pattStr.test(htmlStr)) {
|
|
|
- var matchesArr = htmlStr.match(pattStr);
|
|
|
- $("#pContrainId").html(matchesArr[0]);
|
|
|
- htmlStr = htmlStr.replace(matchesArr[0], "");
|
|
|
- if (ReNumber <= $("#pContrainId").text().length) {
|
|
|
- ReNumber = $("#pContrainId").text().length;
|
|
|
- ReStr = $("#pContrainId").text();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- else {
|
|
|
- $("#pContrainId").html(htmlStr);
|
|
|
- ReStr = $("#pContrainId").text();
|
|
|
- }
|
|
|
- return ReStr;
|
|
|
-};
|
|
|
// 动态获取表格最小宽度设置(最小宽度165px)
|
|
|
var GetMinTableVal = function (TSWidth) {
|
|
|
if (TSWidth > 320) {
|