|
@@ -1215,6 +1215,16 @@ public class ExcelTabController extends BladeController {
|
|
|
for (int j = 0; j < tds.size(); j++) {
|
|
|
{
|
|
|
Element data = tds.get(j);
|
|
|
+ Boolean isText = false;
|
|
|
+ //判断高度
|
|
|
+ String style = data.attr("style");
|
|
|
+ if (StringUtils.isNotBlank(style)){
|
|
|
+ String substring = style.substring(style.lastIndexOf(":") + 1);
|
|
|
+ String height = substring.substring(0, substring.length() - 3);
|
|
|
+ if (Integer.parseInt(height) > 90){
|
|
|
+ isText = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
String trHtml = data.html();
|
|
|
int colspan = data.attr("COLSPAN").equals("") ? 0 : Integer.parseInt(data.attr("COLSPAN"));
|
|
|
int rowspan = data.attr("ROWSPAN").equals("") ? 0 : Integer.parseInt(data.attr("ROWSPAN"));
|
|
@@ -1510,7 +1520,7 @@ public class ExcelTabController extends BladeController {
|
|
|
|
|
|
} else {
|
|
|
if (index_state) { // 区域内
|
|
|
- if (rowspan >= 1) {
|
|
|
+ if (rowspan >= 1 || isText) {
|
|
|
data.empty().append("<el-input type='textarea' @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' @contextmenu.prevent.native='contextmenuClick(" + parm + ")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' :rows=" + rowspan * 2 + " placeholder=''> </el-input>");
|
|
|
} else {
|
|
|
data.empty().append("<el-input type='text' @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' @contextmenu.prevent.native='contextmenuClick(" + parm + ")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder=''> </el-input>");
|
|
@@ -1518,7 +1528,7 @@ public class ExcelTabController extends BladeController {
|
|
|
} else { // 区域外
|
|
|
if (j == 0) {
|
|
|
if (colspan == maxCol && i >= 1) {
|
|
|
- if (rowspan >= 1) {
|
|
|
+ if (rowspan >= 1 || isText) {
|
|
|
data.empty().append("<el-input @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' type='textarea' @contextmenu.prevent.native='contextmenuClick(" + parm + ")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' :rows=" + rowspan * 2 + " placeholder=''> </el-input>");
|
|
|
} else {
|
|
|
data.empty().append("<el-input @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' type='text' @contextmenu.prevent.native='contextmenuClick(" + parm + ")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder=''> </el-input>");
|
|
@@ -1527,7 +1537,7 @@ public class ExcelTabController extends BladeController {
|
|
|
} else {
|
|
|
Element bforData = tds.get(j - 1);
|
|
|
if (!bforData.text().isEmpty() || bforData.html().indexOf("hc-form-checkbox-group") >= 0) {
|
|
|
- if (rowspan >= 1) {
|
|
|
+ if (rowspan >= 1 || isText) {
|
|
|
data.empty().append("<el-input @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' type='textarea' @contextmenu.prevent.native='contextmenuClick(" + parm + ")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' :rows=" + rowspan * 2 + " placeholder=''> </el-input>");
|
|
|
} else {
|
|
|
data.empty().append("<el-input @keydown.shift.up='keyupShiftUp' @keydown.shift.down='keyupShiftDown' @keydown.shift.left='keyupShiftLeft' @keydown.shift.right='keyupShiftRight' type='text' @contextmenu.prevent.native='contextmenuClick(" + parm + ")' @mouseup.right='RightClick(" + parm + ")' trIndex=" + i + " tdIndex=" + j + " x1=" + x1 + " x2=" + x2 + " y1=" + y1 + " y2=" + y2 + " style='width:100%;height:100%;' placeholder=''> </el-input>");
|