diff --git a/Frontend/_operation.html b/Frontend/_operation.html index 64adb49..aaf5212 100644 --- a/Frontend/_operation.html +++ b/Frontend/_operation.html @@ -443,6 +443,7 @@ pageAct.selSysSub = []; pageAct.selSysMain = []; pageAct.imageFile = []; + let pageInit = true; sysList(); @@ -508,6 +509,11 @@ initDate(); event(); $('div.image-full-show').css("display", "none"); + + if (pageInit) { + $("#selAllSys").click(); + pageInit = false; + } }); function loadOpeFirmTable() { diff --git a/FrontendWebApi/ApiControllers/OperationController.cs b/FrontendWebApi/ApiControllers/OperationController.cs index 6d7541d..f62c885 100644 --- a/FrontendWebApi/ApiControllers/OperationController.cs +++ b/FrontendWebApi/ApiControllers/OperationController.cs @@ -808,10 +808,7 @@ namespace FrontendWebApi.ApiControllers sWhere += $@" and ofi.device_system_category_layer2 in @main_system_tag"; } - if (ofl.sub_system_tag != null) - { - sWhere += $@" and ofi.device_system_category_layer3 in @sub_system_tag"; - } + sWhere += $@" and ofi.device_system_category_layer3 in @sub_system_tag"; var sqlString = @$"select ofi.*, v2.system_key from operation_firm ofi @@ -1058,17 +1055,14 @@ namespace FrontendWebApi.ApiControllers if (ofl.main_system_tag != null) { sWhere += $@" and opr.device_system_category_layer2 in @main_system_tag"; - - } - if (ofl.sub_system_tag != null) - { - sWhere += $@" and opr.device_system_category_layer3 in @sub_system_tag"; } + if (ofl.serial_number != null) { sWhere += $@" and opr.formId like '%{ofl.serial_number}%'"; } - + + sWhere += $@" and opr.device_system_category_layer3 in @sub_system_tag"; var sqlString = $@"select opr.* , concat(d.device_floor_tag, ' ', d.full_name) as device_name, ui.full_name as user_full_name from operation_record opr left join device d on opr.fix_do_code = d.device_number and d.deleted = 0 and d.device_area_tag = SUBSTRING_INDEX(opr.fix_do_code, '_', 1)