解决频繁报错弹窗,新增判断

This commit is contained in:
黄焱
2024-03-15 10:10:17 +08:00
parent 2352f862ee
commit f639e59b91
2 changed files with 7 additions and 5 deletions

View File

@@ -19,7 +19,9 @@ const filedRequiredList = {
'brand_id': { multiple: false, noLabel: false },
'type_id': { multiple: false, noLabel: false },
'taper_type_id': { multiple: false, noLabel: false },
'eq_maintenance_id': { multiple: false, noLabel: false },
'overhaul_id': { multiple: false, noLabel: false },
'overhaul_period': { multiple: false, noLabel: false },
'maintenance_equipment_category_id': { multiple: false, noLabel: false },
'maintenance_type': { multiple: false, noLabel: false },
@@ -147,7 +149,7 @@ $(function () {
dom.each(function () {
const requiredDom = $(this).parent().prev().find('label')
let t = requiredDom.html()
if (t.indexOf('c*') < 0) {
if (t && t.indexOf('c*') < 0) {
t = '<i class="c*" style="color: red;margin-left: -4px">*</i>' + t
}
requiredDom.html(t)