|
|
@@ -195,11 +195,12 @@ var dealTdTextFunc = function (htmlStr) {
|
|
|
};
|
|
|
// 动态获取表格最小宽度设置(最小宽度165px)
|
|
|
var GetMinTableVal = function (TSWidth) {
|
|
|
- return 165 + (TSWidth - 320) * 0.09;
|
|
|
-};
|
|
|
-// 是否需要设置最小宽度
|
|
|
-var IsSetMinWidthFunc = function (ItemHandel) {
|
|
|
- return $(ItemHandel).find(".yaoshi").length > 0 ? true : false;
|
|
|
+ if (TSWidth > 320) {
|
|
|
+ return 165 + (TSWidth - 320) * 0.09;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ return 165;
|
|
|
+ }
|
|
|
};
|
|
|
// 处理表格内的图片宽度
|
|
|
var DealImageWFunc = function (Item, WidthVal) {
|
|
|
@@ -227,7 +228,6 @@ var AdjustTableFunc = function (sWidthVal, isAStatus) {
|
|
|
if ($("table").length == 0) {
|
|
|
return;
|
|
|
}
|
|
|
- isAStatus = (isAStatus == "undefined" || isAStatus == undefined || isAStatus == null) ? 0 : parseInt(isAStatus);
|
|
|
// 添加宽度处理
|
|
|
var ScreenWidth = $(document.body).width();
|
|
|
ScreenWidth = ScreenWidth > sWidthVal ? ScreenWidth : sWidthVal;
|
|
|
@@ -243,9 +243,10 @@ var AdjustTableFunc = function (sWidthVal, isAStatus) {
|
|
|
var RuleFlag = true;
|
|
|
var HasIndex = 0;
|
|
|
RSArrs = [];
|
|
|
- if (isAStatus == 1) {
|
|
|
+ var NewAStatus = (isAStatus == "undefined" || isAStatus == undefined || isAStatus == null) ? 0 : parseInt(isAStatus);
|
|
|
+ if (NewAStatus == 1) {
|
|
|
// 判断是否存在答题点
|
|
|
- isAStatus = $(item).find(".yaoshi").length > 0 ? 1 : 0;
|
|
|
+ NewAStatus = $(item).find(".yaoshi").length > 0 ? 1 : 0;
|
|
|
}
|
|
|
$.each($(item).find("tr"), function (trIndex, trItem) {
|
|
|
$.each($(trItem).find("td"), function (tdIndex, tdItem) {
|
|
|
@@ -277,10 +278,11 @@ var AdjustTableFunc = function (sWidthVal, isAStatus) {
|
|
|
tdWidthVal = ScreenWidth;
|
|
|
}
|
|
|
// 判断是否需要设置最小宽度
|
|
|
- if (tdWidthVal < TempMinWidth && IsSetMinWidthFunc(tdItem) && isAStatus == 1) {
|
|
|
+ if (tdWidthVal < TempMinWidth && NewAStatus == 1) {
|
|
|
tdWidthVal = TempMinWidth;
|
|
|
+ $(tdItem).text(tdWidthVal);
|
|
|
}
|
|
|
- else if (tdWidthVal < 100 && isAStatus == 1) {
|
|
|
+ if (tdWidthVal < 100 && NewAStatus == 1) {
|
|
|
tdWidthVal = 100;
|
|
|
}
|
|
|
if (ArrMaxLen.length < tdIndex + 1) {
|
|
|
@@ -395,7 +397,7 @@ var AdjustTableFunc = function (sWidthVal, isAStatus) {
|
|
|
}
|
|
|
// 替换HTML
|
|
|
var ChildhtmlStr = $(item).prop("outerHTML");
|
|
|
- var htmlStr = "<div class='TableContainer TContain_" + index + "' data-isaflag='" + isAStatus + "'></div>";
|
|
|
+ var htmlStr = "<div class='TableContainer TContain_" + index + "' data-isaflag='" + NewAStatus + "'></div>";
|
|
|
$(item).after(htmlStr);
|
|
|
$(item).remove();
|
|
|
var JqStr = ".TContain_" + index;
|