|
|
@@ -1067,25 +1067,18 @@ public class ExcelTabController extends BladeController {
|
|
|
if (CollectionUtil.isEmpty(wbsFormElementList)) {
|
|
|
Elements elements = tableHtml.select("el-date-picker");
|
|
|
elements.forEach(element -> {
|
|
|
- if (element.hasAttr("@mouseup.left")) {
|
|
|
- element.attr("@mouseup.left", element.attr("@mouseup.left").substring(0, element.attr("@mouseup.left").length() - 1) + ", true)");
|
|
|
- } else {
|
|
|
- Elements parents = element.parents();
|
|
|
- for (Element parent : parents) {
|
|
|
- if (parent.hasAttr("@mouseup.left")) {
|
|
|
- String attr = parent.attr("@mouseup.left");
|
|
|
- parent.attr("@mouseup.left", attr.substring(0, attr.length() - 1) + ", true)");
|
|
|
- break;
|
|
|
+ Elements parents = element.parents();
|
|
|
+ parents.forEach(parent -> {
|
|
|
+ if (parent.tagName().equals("td")) {
|
|
|
+ if (parent.hasAttr("style")) {
|
|
|
+ parent.attr("style", parent.attr("style") + "position: relative;");
|
|
|
+ } else {
|
|
|
+ parent.attr("style", "position: relative;");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ });
|
|
|
String keyname = element.attr("keyname");
|
|
|
- String key = keyname.split("__")[0];
|
|
|
- element.wrap("<div style=\"position: relative;width: 100%;\"></div>");
|
|
|
- element.before("<el-tooltip placement=\"top\" enterable=\"true\" effect=\"light\" popper-class=\"custom-tooltip-color-class\">" +
|
|
|
- "<template #content><span style=\"cursor: pointer; color: #f56c6c;\" @click=\"cancelRequiredTips($event, '" + key + "')\">缺少日期,点击忽略</span></template>" +
|
|
|
- "<hc-icon name=\"error-warning\" style = \"margin-right: 5px;color:#f56c6c;position: absolute;cursor: pointer;z-index: 1;left: 1px;top: 8px;\">" +
|
|
|
- "</el-tooltip>");
|
|
|
+ element.before("<hc-tooltip :tipsStatus=\"" + true + "\" text=\"缺少日期\" keyname=\""+keyname +"\" @leftClick=\"changeTipsStatus\" typeKey=\"" + keyname.split("__")[0] + "\"/>");
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
@@ -1094,41 +1087,24 @@ public class ExcelTabController extends BladeController {
|
|
|
elements.forEach(element -> {
|
|
|
String keyname = element.attr("keyname");
|
|
|
String key = keyname.split("__")[0];
|
|
|
+ boolean flag = true;
|
|
|
if (!keyMap.containsKey(key)) {
|
|
|
WbsFormElement wbsFormElement = keyMap.get(key);
|
|
|
if (wbsFormElement != null && wbsFormElement.getNodeIgnore() != null && wbsFormElement.getNodeIgnore().contains(tableNode.getPId() + "")) {
|
|
|
- if (element.hasAttr("@mouseup.left")) {
|
|
|
- element.attr("@mouseup.left", element.attr("@mouseup.left").substring(0, element.attr("@mouseup.left").length() - 1) + ", false)");
|
|
|
- } else {
|
|
|
- Elements parents = element.parents();
|
|
|
- for (Element parent : parents) {
|
|
|
- if (parent.hasAttr("@mouseup.left")) {
|
|
|
- String attr = parent.attr("@mouseup.left");
|
|
|
- parent.attr("@mouseup.left", attr.substring(0, attr.length() - 1) + ", false)");
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return;
|
|
|
+ flag = false;
|
|
|
}
|
|
|
}
|
|
|
- if (element.hasAttr("@mouseup.left")) {
|
|
|
- element.attr("@mouseup.left", element.attr("@mouseup.left").substring(0, element.attr("@mouseup.left").length() - 1) + ", true)");
|
|
|
- } else {
|
|
|
- Elements parents = element.parents();
|
|
|
- for (Element parent : parents) {
|
|
|
- if (parent.hasAttr("@mouseup.left")) {
|
|
|
- String attr = parent.attr("@mouseup.left");
|
|
|
- parent.attr("@mouseup.left", attr.substring(0, attr.length() - 1) + ", true)");
|
|
|
- break;
|
|
|
+ Elements parents = element.parents();
|
|
|
+ parents.forEach(parent -> {
|
|
|
+ if (parent.tagName().equals("td")) {
|
|
|
+ if (parent.hasAttr("style")) {
|
|
|
+ parent.attr("style", parent.attr("style") + "position: relative;");
|
|
|
+ } else {
|
|
|
+ parent.attr("style", "position: relative;");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- element.wrap("<div style=\"position: relative;width: 100%;\"></div>");
|
|
|
- element.before("<el-tooltip placement=\"top\" enterable=\"true\" effect=\"light\" popper-class=\"custom-tooltip-color-class\">" +
|
|
|
- "<template #content><span style=\"cursor: pointer; color: #f56c6c;\" @click=\"cancelRequiredTips($event, '" + key + "')\">缺少日期,点击忽略</span></template>" +
|
|
|
- "<hc-icon name=\"error-warning\" style = \"margin-right: 5px;color:#f56c6c;position: absolute;cursor: pointer;z-index: 1;left: 1px;top: 8px;\">" +
|
|
|
- "</el-tooltip>");
|
|
|
+ });
|
|
|
+ element.before("<hc-tooltip :tipsStatus=\"" + flag + "\" text=\"缺少日期\" keyname=\""+keyname +"\" @leftClick=\"changeTipsStatus\" typeKey=\"" + key + "\"/>");
|
|
|
});
|
|
|
Map<String, Object> map = valueMapList.get(0);
|
|
|
DataStructureFormatUtils.parseDataByKey( map);
|
|
|
@@ -1142,38 +1118,22 @@ public class ExcelTabController extends BladeController {
|
|
|
Elements keyNames = tableHtml.getElementsByAttributeValueContaining("keyname", wbsFormElement.getEKey());
|
|
|
if (!keyNames.isEmpty()) {
|
|
|
keyNames.forEach(element -> {
|
|
|
+ boolean flag = true;
|
|
|
if (wbsFormElement.getNodeIgnore() != null && wbsFormElement.getNodeIgnore().contains(tableNode.getPId() + "")) {
|
|
|
- if (element.hasAttr("@mouseup.left")) {
|
|
|
- element.attr("@mouseup.left", element.attr("@mouseup.left").substring(0, element.attr("@mouseup.left").length() - 1) + ", false)");
|
|
|
- } else {
|
|
|
- Elements parents = element.parents();
|
|
|
- for (Element parent : parents) {
|
|
|
- if (parent.hasAttr("@mouseup.left")) {
|
|
|
- String attr = parent.attr("@mouseup.left");
|
|
|
- parent.attr("@mouseup.left", attr.substring(0, attr.length() - 1) + ", false)");
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- return;
|
|
|
+ flag = false;
|
|
|
}
|
|
|
- if (element.hasAttr("@mouseup.left")) {
|
|
|
- element.attr("@mouseup.left", element.attr("@mouseup.left").substring(0, element.attr("@mouseup.left").length() - 1) + ", true)");
|
|
|
- } else {
|
|
|
- Elements parents = element.parents();
|
|
|
- for (Element parent : parents) {
|
|
|
- if (parent.hasAttr("@mouseup.left")) {
|
|
|
- String attr = parent.attr("@mouseup.left");
|
|
|
- parent.attr("@mouseup.left", attr.substring(0, attr.length() - 1) + ", true)");
|
|
|
- break;
|
|
|
+ Elements parents = element.parents();
|
|
|
+ parents.forEach(parent -> {
|
|
|
+ if (parent.tagName().equals("td")) {
|
|
|
+ if (parent.hasAttr("style")) {
|
|
|
+ parent.attr("style", parent.attr("style") + "position: relative;");
|
|
|
+ } else {
|
|
|
+ parent.attr("style", "position: relative;");
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- element.wrap("<div style=\"position: relative;width: 100%;\"></div>");
|
|
|
- element.before("<el-tooltip placement=\"top\" enterable=\"true\" effect=\"light\" popper-class=\"custom-tooltip-color-class\">" +
|
|
|
- "<template #content><span style=\"cursor: pointer; color: #f56c6c;\" @click=\"cancelRequiredTips($event, '" + wbsFormElement.getEKey() + "')\">此项为必填项,点击忽略</span></template>" +
|
|
|
- "<hc-icon name=\"error-warning\" style = \"margin-right: 5px;color:#f56c6c;position: absolute;cursor: pointer;z-index: 1;left: 1px;top: 8px;\">" +
|
|
|
- "</el-tooltip>");
|
|
|
+ });
|
|
|
+ String keynameAttr = element.attr("keyname");
|
|
|
+ element.before("<hc-tooltip :tipsStatus=\"" + flag + "\" text=\"此项为必填项\" keyname=\""+keynameAttr +"\" @leftClick=\"changeTipsStatus\" typeKey=\"" + wbsFormElement.getEKey() + "\"/>");
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
@@ -5698,8 +5658,10 @@ public class ExcelTabController extends BladeController {
|
|
|
WbsFormElement element = list.get(0);
|
|
|
if (element.getNodeIgnore() == null || !element.getNodeIgnore().contains(table.getPId() + "")) {
|
|
|
element.setNodeIgnore(element.getNodeIgnore() == null ? "" : element.getNodeIgnore() + "," + table.getPId());
|
|
|
- wbsFormElementService.update(Wrappers.<WbsFormElement>lambdaUpdate().eq(WbsFormElement::getId, element.getId()).set(WbsFormElement::getNodeIgnore, element.getNodeIgnore()));
|
|
|
+ } else {
|
|
|
+ element.setNodeIgnore(element.getNodeIgnore().replace(table.getPId() + "", ""));
|
|
|
}
|
|
|
+ wbsFormElementService.update(Wrappers.<WbsFormElement>lambdaUpdate().eq(WbsFormElement::getId, element.getId()).set(WbsFormElement::getNodeIgnore, element.getNodeIgnore()));
|
|
|
return R.data(true);
|
|
|
}
|
|
|
}
|