|
|
@@ -1065,6 +1065,28 @@ public class ExcelTabController extends BladeController {
|
|
|
List<WbsFormElement> wbsFormElementList = jdbcTemplate.query("select * from m_wbs_form_element where f_id = ( select id from m_table_info where tab_en_name in ( '" + tableName + "' ) and is_deleted = 0) and is_deleted = 0 and (required = 1 or node_ignore is not null)",
|
|
|
new BeanPropertyRowMapper<>(WbsFormElement.class));
|
|
|
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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ 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>");
|
|
|
+ });
|
|
|
return;
|
|
|
}
|
|
|
Map<String, WbsFormElement> keyMap = wbsFormElementList.stream().collect(Collectors.toMap(WbsFormElement::getEKey, item -> item, (v1, v2) -> v1));
|
|
|
@@ -1075,28 +1097,37 @@ public class ExcelTabController extends BladeController {
|
|
|
if (!keyMap.containsKey(key)) {
|
|
|
WbsFormElement wbsFormElement = keyMap.get(key);
|
|
|
if (wbsFormElement != null && wbsFormElement.getNodeIgnore() != null && wbsFormElement.getNodeIgnore().contains(tableNode.getPId() + "")) {
|
|
|
- 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;
|
|
|
+ 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;
|
|
|
}
|
|
|
}
|
|
|
- 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;
|
|
|
+ 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;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- element.wrap("<div display=\"line\"></div>");
|
|
|
- element.before("<el-tooltip content=\"缺少日期,点击忽略\" placement=\"top\" effect=\"light\">" +
|
|
|
- "<hc-icon name=\"error-warning\"/ style = \"margin-right: 2px;color:#f56c6c;\">" +
|
|
|
+ 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>");
|
|
|
});
|
|
|
Map<String, Object> map = valueMapList.get(0);
|
|
|
@@ -1112,27 +1143,36 @@ public class ExcelTabController extends BladeController {
|
|
|
if (!keyNames.isEmpty()) {
|
|
|
keyNames.forEach(element -> {
|
|
|
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;
|
|
|
+ }
|
|
|
+ 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) + ", false)");
|
|
|
+ parent.attr("@mouseup.left", attr.substring(0, attr.length() - 1) + ", true)");
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- return;
|
|
|
- }
|
|
|
- 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;
|
|
|
- }
|
|
|
}
|
|
|
- element.wrap("<div></div>");
|
|
|
- element.before("<el-tooltip content=\"此项为必填项,点击忽略\" placement=\"top\" effect=\"light\" @click=\"cancelRequiredTips($event, " + wbsFormElement.getEKey() +")\">" +
|
|
|
- "<hc-icon name=\"error-warning\"/ style = \"margin-right: 2px;color:#f56c6c;\">" +
|
|
|
+ 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>");
|
|
|
});
|
|
|
}
|