diff --git a/Backend/Controllers/BuildMenuController.cs b/Backend/Controllers/BuildMenuController.cs index 0cf4590..cd98d76 100644 --- a/Backend/Controllers/BuildMenuController.cs +++ b/Backend/Controllers/BuildMenuController.cs @@ -149,44 +149,81 @@ namespace Backend.Controllers {"@building_tag", buildMenu.building_tag}, {"@main_system_tag",buildMenu.main_system_tag }, {"@sub_system_tag", buildMenu.sub_system_tag}, - {"@drawing",buildMenu.drawing }, + {"@left_drawing",buildMenu.left_drawing }, + {"@right_drawing",buildMenu.right_drawing }, {"@created_by",myUserInfo.Userinfo_guid }, - {"@planimetric_click",buildMenu.planimetric_click} + {"@left_planimetric_click",buildMenu.left_planimetric_click}, + {"@right_planimetric_click",buildMenu.right_planimetric_click} }; - if (buildMenu.drawing == 2) + if (buildMenu.left_drawing == 2) { - if (buildMenu.system_url != null && buildMenu.system_url.CompareTo("http://") < 0 && buildMenu.system_url.CompareTo("https://") < 0) + if (buildMenu.left_system_url != null && buildMenu.left_system_url.CompareTo("http://") < 0 && buildMenu.left_system_url.CompareTo("https://") < 0) { //未包含http || https 抓該棟ip + port var building_where = @"deleted = 0 AND building_tag = @Building_tag"; var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); - buildMenu.system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.system_url); + buildMenu.left_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.left_system_url); } - dictionary.Add("@system_url", buildMenu.system_url); + dictionary.Add("@left_system_url", buildMenu.left_system_url); } - else if (buildMenu.drawing == 4) + else if (buildMenu.left_drawing == 4) { - if (buildMenu.system_url != null && buildMenu.system_url.CompareTo("http://") < 0 && buildMenu.system_url.CompareTo("https://") < 0) + if (buildMenu.left_system_url != null && buildMenu.left_system_url.CompareTo("http://") < 0 && buildMenu.left_system_url.CompareTo("https://") < 0) { //未包含http || https 抓該棟ip + port var building_where = @"deleted = 0 AND building_tag = @Building_tag"; var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); - buildMenu.system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.system_url); + buildMenu.left_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.left_system_url); } - dictionary.Add("@riser_diagram_url", buildMenu.riser_diagram_url); - dictionary.Add("@icon_click", buildMenu.icon_click); - dictionary.Add("@icon_click_url", buildMenu.icon_click_url); - dictionary.Add("@icon_click_url_width", buildMenu.icon_click_url_width); - dictionary.Add("@icon_click_url_height", buildMenu.icon_click_url_height); + dictionary.Add("@left_riser_diagram_url", buildMenu.left_riser_diagram_url); + dictionary.Add("@left_icon_click", buildMenu.left_icon_click); + dictionary.Add("@left_icon_click_url", buildMenu.left_icon_click_url); + dictionary.Add("@left_icon_click_url_width", buildMenu.left_icon_click_url_width); + dictionary.Add("@left_icon_click_url_height", buildMenu.left_icon_click_url_height); } - else if (buildMenu.drawing == 1) + else if (buildMenu.left_drawing == 1) { - dictionary.Add("@planimetric_floor_guid", buildMenu.planimetric_floor_guid); + dictionary.Add("@planimetric_floor_guid", buildMenu.left_planimetric_floor_guid); + } + + if (buildMenu.right_drawing == 2) + { + if (buildMenu.right_system_url != null && buildMenu.right_system_url.CompareTo("http://") < 0 && buildMenu.right_system_url.CompareTo("https://") < 0) + { + //未包含http || https 抓該棟ip + port + var building_where = @"deleted = 0 AND building_tag = @Building_tag"; + var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); + + buildMenu.right_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.right_system_url); + } + + dictionary.Add("@right_system_url", buildMenu.right_system_url); + } + else if (buildMenu.right_drawing == 4) + { + if (buildMenu.right_system_url != null && buildMenu.right_system_url.CompareTo("http://") < 0 && buildMenu.right_system_url.CompareTo("https://") < 0) + { + //未包含http || https 抓該棟ip + port + var building_where = @"deleted = 0 AND building_tag = @Building_tag"; + var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); + + buildMenu.right_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.right_system_url); + } + + dictionary.Add("@right_riser_diagram_url", buildMenu.right_riser_diagram_url); + dictionary.Add("@right_icon_click", buildMenu.right_icon_click); + dictionary.Add("@right_icon_click_url", buildMenu.right_icon_click_url); + dictionary.Add("@right_icon_click_url_width", buildMenu.right_icon_click_url_width); + dictionary.Add("@right_icon_click_url_height", buildMenu.right_icon_click_url_height); + } + else if (buildMenu.right_drawing == 1) + { + dictionary.Add("@right_planimetric_floor_guid", buildMenu.right_planimetric_floor_guid); } await backendRepository.AddOneByCustomTable(dictionary, "building_menu"); @@ -233,44 +270,82 @@ namespace Backend.Controllers { var dictionary = new Dictionary() { - {"@drawing",buildMenu.drawing }, + {"@left_drawing",buildMenu.left_drawing }, + {"@right_drawing",buildMenu.right_drawing }, {"@updated_by",myUserInfo.Userinfo_guid }, {"@updated_at",DateTime.Now }, - {"@planimetric_click",buildMenu.planimetric_click} + {"@left_planimetric_click",buildMenu.left_planimetric_click}, + {"@right_planimetric_click",buildMenu.right_planimetric_click} }; - if (buildMenu.drawing == 2) + + if (buildMenu.left_drawing == 2) { - if (buildMenu.system_url != null && buildMenu.system_url.CompareTo("http://") < 0 && buildMenu.system_url.CompareTo("https://") < 0) + if (buildMenu.left_system_url != null && buildMenu.left_system_url.CompareTo("http://") < 0 && buildMenu.left_system_url.CompareTo("https://") < 0) { //未包含http || https 抓該棟ip + port var building_where = @"deleted = 0 AND building_tag = @Building_tag"; var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); - buildMenu.system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.system_url); + buildMenu.left_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.left_system_url); } - dictionary.Add("@system_url", buildMenu.system_url); + dictionary.Add("@left_system_url", buildMenu.left_system_url); } - else if (buildMenu.drawing == 4) + else if (buildMenu.left_drawing == 4) { - if (buildMenu.system_url != null && buildMenu.system_url.CompareTo("http://") < 0 && buildMenu.system_url.CompareTo("https://") < 0) + if (buildMenu.left_system_url != null && buildMenu.left_system_url.CompareTo("http://") < 0 && buildMenu.left_system_url.CompareTo("https://") < 0) { //未包含http || https 抓該棟ip + port var building_where = @"deleted = 0 AND building_tag = @Building_tag"; var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); - buildMenu.system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.system_url); + buildMenu.left_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.left_system_url); } - dictionary.Add("@riser_diagram_url", buildMenu.riser_diagram_url); - dictionary.Add("@icon_click", buildMenu.icon_click); - dictionary.Add("@icon_click_url", buildMenu.icon_click_url); - dictionary.Add("@icon_click_url_width", buildMenu.icon_click_url_width); - dictionary.Add("@icon_click_url_height", buildMenu.icon_click_url_height); + dictionary.Add("@left_riser_diagram_url", buildMenu.left_riser_diagram_url); + dictionary.Add("@left_icon_click", buildMenu.left_icon_click); + dictionary.Add("@left_icon_click_url", buildMenu.left_icon_click_url); + dictionary.Add("@left_icon_click_url_width", buildMenu.left_icon_click_url_width); + dictionary.Add("@left_icon_click_url_height", buildMenu.left_icon_click_url_height); } - else if (buildMenu.drawing == 1) + else if (buildMenu.left_drawing == 1) { - dictionary.Add("@planimetric_floor_guid", buildMenu.planimetric_floor_guid); + dictionary.Add("@left_planimetric_floor_guid", buildMenu.left_planimetric_floor_guid); + } + + if (buildMenu.right_drawing == 2) + { + if (buildMenu.right_system_url != null && buildMenu.right_system_url.CompareTo("http://") < 0 && buildMenu.right_system_url.CompareTo("https://") < 0) + { + //未包含http || https 抓該棟ip + port + var building_where = @"deleted = 0 AND building_tag = @Building_tag"; + var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); + + buildMenu.right_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.right_system_url); + } + + dictionary.Add("@right_system_url", buildMenu.right_system_url); + } + else if (buildMenu.right_drawing == 4) + { + if (buildMenu.right_system_url != null && buildMenu.right_system_url.CompareTo("http://") < 0 && buildMenu.right_system_url.CompareTo("https://") < 0) + { + //未包含http || https 抓該棟ip + port + var building_where = @"deleted = 0 AND building_tag = @Building_tag"; + var building = await backendRepository.GetOneAsync("building", building_where, new { Building_tag = buildMenu.building_tag }); + + buildMenu.right_system_url = string.Format("http://{0}:{1}{2}", building.Ip_address, building.Ip_port, buildMenu.right_system_url); + } + + dictionary.Add("@right_riser_diagram_url", buildMenu.right_riser_diagram_url); + dictionary.Add("@right_icon_click", buildMenu.right_icon_click); + dictionary.Add("@right_icon_click_url", buildMenu.right_icon_click_url); + dictionary.Add("@right_icon_click_url_width", buildMenu.right_icon_click_url_width); + dictionary.Add("@right_icon_click_url_height", buildMenu.right_icon_click_url_height); + } + else if (buildMenu.right_drawing == 1) + { + dictionary.Add("@right_planimetric_floor_guid", buildMenu.right_planimetric_floor_guid); } await backendRepository.UpdateOneByCustomTable(dictionary, "building_menu", $"building_tag = '{buildMenu.building_tag}' and main_system_tag = '{buildMenu.main_system_tag}' and sub_system_tag = '{buildMenu.sub_system_tag}'"); @@ -297,15 +372,19 @@ namespace Backend.Controllers try { buildMenuTables = await backendRepository.GetAllAsync($@"select bm.*, - case drawing when 1 then '樓層平面圖' when 2 then '系統圖' when 4 then '昇位圖' end drawing_name, - case icon_click when 1 then '開' when 0 then '關' end icon_click_name, - case planimetric_click when 1 then '開' when 0 then '關' end planimetric_click_name, - mv.system_key main_system_guid_name, sv.system_key sub_system_guid_name,ff.full_name floor_guid_name - from building_menu bm - left join variable mv on bm.main_system_tag = mv.system_value and mv.system_type = @main_system_type and mv.deleted = 0 - left join variable sv on bm.sub_system_tag = sv.system_value and sv.system_type = @sub_system_type and sv.deleted = 0 - left join floor ff on ff.floor_guid = bm.planimetric_floor_guid - where bm.building_tag = @building_tag and bm.main_system_tag in @MainList ORDER BY mv.system_priority ASC, sv.system_priority ASC, sv.created_at DESC ", + case left_drawing when 1 then '樓層平面圖' when 2 then '系統圖' when 4 then '昇位圖' end left_drawing_name, + case left_icon_click when 1 then '開' when 0 then '關' end left_icon_click_name, + case left_planimetric_click when 1 then '開' when 0 then '關' end left_planimetric_click_name, + case right_drawing when 1 then '樓層平面圖' when 2 then '系統圖' when 4 then '昇位圖' end right_drawing_name, + case right_icon_click when 1 then '開' when 0 then '關' end right_icon_click_name, + case right_planimetric_click when 1 then '開' when 0 then '關' end right_planimetric_click_name, + mv.system_key main_system_guid_name, sv.system_key sub_system_guid_name,lf.full_name left_floor_guid_name, rf.full_name right_floor_guid_name + from building_menu bm + left join variable mv on bm.main_system_tag = mv.system_value and mv.system_type = @main_system_type and mv.deleted = 0 + left join variable sv on bm.sub_system_tag = sv.system_value and sv.system_type = @sub_system_type and sv.deleted = 0 + left join floor lf on lf.floor_guid = bm.left_planimetric_floor_guid + left join floor rf on rf.floor_guid = bm.right_planimetric_floor_guid + where bm.building_tag = @building_tag and bm.main_system_tag in @MainList ORDER BY mv.system_priority ASC, sv.system_priority ASC, sv.created_at DESC ", new { building_tag = post.building_tag, MainList = post.MainList, main_system_type = main_system_type, sub_system_type = sub_system_type }); apiResult.Code = "0000"; @@ -331,7 +410,7 @@ namespace Backend.Controllers try { var BuildMenu = await backendRepository.GetOneAsync( - $@"select *, sv.system_key sub_system_guid_name + $@"select bm.*, sv.system_key sub_system_guid_name from building_menu bm left join variable sv on bm.sub_system_tag = sv.system_value and sv.system_type = @sub_system_type where bm.building_tag = @building_tag and bm.main_system_tag = @main_system_tag and bm.sub_system_tag = @sub_system_tag" @@ -356,7 +435,7 @@ namespace Backend.Controllers try { await backendRepository.PurgeOneByGuidWithCustomDBNameAndTable("building_menu", $"building_tag = '{post.building_tag}' and main_system_tag = '{post.main_system_tag}' and sub_system_tag = '{post.sub_system_tag}'"); - var subV = await backendRepository.GetOneAsync(@$"select * from variable where system_value = @sub_system_tag and system_type = sub_system_type and deleted = 0", new { sub_system_tag = post.sub_system_tag, sub_system_type = sub_system_type }); + var subV = await backendRepository.GetOneAsync(@$"select * from variable where system_value = @sub_system_tag and system_type = @sub_system_type and deleted = 0", new { sub_system_tag = post.sub_system_tag, sub_system_type = sub_system_type }); var authcode = await backendRepository.GetOneAsync(@$"select AuthCode from auth_page where building_tag = @building_tag and ShowView = @sub_id", new {post.building_tag, subV.id}); if (authcode != null) { @@ -395,7 +474,7 @@ namespace Backend.Controllers from sub_system_floor ssf where ssf.building_tag = @building_tag and ssf.main_system_tag = @main_system_tag and ssf.sub_system_tag = @sub_system_tag and deleted = 0 and status = 0 ) sf - left join floor f on sf.floor_tag = f.full_name + left join floor f on sf.floor_tag = f.full_name and sf.building_tag = f.building_tag left join variable mv on sf.main_system_tag = mv.system_value and mv.system_type = @main_system_type and mv.deleted = 0 left join variable sv on sf.sub_system_tag = sv.system_value and sv.system_type = @sub_system_type and sv.deleted = 0 ORDER BY mv.system_priority, sv.system_priority, f.priority", param); diff --git a/Backend/Controllers/SystemCategoryController.cs b/Backend/Controllers/SystemCategoryController.cs index 70ffcde..1cdcb5a 100644 --- a/Backend/Controllers/SystemCategoryController.cs +++ b/Backend/Controllers/SystemCategoryController.cs @@ -316,8 +316,19 @@ namespace Backend.Controllers var systemSub = await backendRepository.GetOneAsync("variable", sWhere, param); + sWhere = @$"deleted = 0 AND system_type = @sub_system_type AND system_value = @system_value"; + param = new { sub_system_type = sub_system_type, system_value = post.system_value }; + var subV = await backendRepository.GetOneAsync("variable", sWhere, param); + if (systemSub == null) { + if (subV != null) + { + apiResult.Code = "0001"; + apiResult.Msg = "不可新增相同的系統小類代號。"; + return apiResult; + } + //新增 //產生一組GUID //獲取最新的大類 @@ -344,6 +355,13 @@ namespace Backend.Controllers } else { + if (subV != null) + { + apiResult.Code = "0001"; + apiResult.Msg = "不可修改成相同的系統小類代號。"; + return apiResult; + } + Dictionary systemSubDic = new Dictionary() { @@ -449,7 +467,7 @@ namespace Backend.Controllers di.full_name FROM device_item di INNER JOIN variable sv on di.device_name_tag = sv.system_value - WHERE v.deleted = 0 AND sv.id = @id AND di.deleted = 0"; + WHERE sv.deleted = 0 AND sv.id = @id AND di.deleted = 0"; var deviceItems = await backendRepository.GetAllAsync(sdeviceItem, new { id = id }); if (deviceItems.Count > 0) @@ -515,7 +533,6 @@ namespace Backend.Controllers { "@is_show_riserDiagram", device_Item.is_show_riserDiagram}, { "@is_controll", device_Item.is_controll}, { "@is_bool", device_Item.is_bool}, - { "@is_link", device_Item.is_link}, { "@created_by", myUserInfo.Userinfo_guid}, }; await backendRepository.AddOneByCustomTable(Device_itemDic, "device_item"); @@ -534,7 +551,6 @@ namespace Backend.Controllers { "@is_show_riserDiagram", device_Item.is_show_riserDiagram}, { "@is_controll", device_Item.is_controll}, { "@is_bool", device_Item.is_bool}, - { "@is_link", device_Item.is_link}, { "@updated_by", myUserInfo.Userinfo_guid}, { "@updated_at", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}, }; diff --git a/Backend/Models/BuildMenu.cs b/Backend/Models/BuildMenu.cs index 4173361..ed61c61 100644 --- a/Backend/Models/BuildMenu.cs +++ b/Backend/Models/BuildMenu.cs @@ -10,15 +10,24 @@ namespace Backend.Models public string building_tag { get; set; } public string main_system_tag { get; set; } public string sub_system_tag { get; set; } - public byte drawing { get; set; } - public byte icon_click { get; set; } - public string icon_click_url { get; set; } - public int icon_click_url_width { get; set; } - public int icon_click_url_height { get; set; } - public string system_url { get; set; } - public string riser_diagram_url { get; set; } - public byte planimetric_click { get; set; } - public string planimetric_floor_guid { get; set; } + public byte left_drawing { get; set; } + public byte left_icon_click { get; set; } + public string left_icon_click_url { get; set; } + public int left_icon_click_url_width { get; set; } + public int left_icon_click_url_height { get; set; } + public string left_system_url { get; set; } + public string left_riser_diagram_url { get; set; } + public byte left_planimetric_click { get; set; } + public string left_planimetric_floor_guid { get; set; } + public byte right_drawing { get; set; } + public byte right_icon_click { get; set; } + public string right_icon_click_url { get; set; } + public int right_icon_click_url_width { get; set; } + public int right_icon_click_url_height { get; set; } + public string right_system_url { get; set; } + public string right_riser_diagram_url { get; set; } + public byte right_planimetric_click { get; set; } + public string right_planimetric_floor_guid { get; set; } } public class BuildMenuAddSub: BuildMenu { @@ -26,9 +35,7 @@ namespace Backend.Models } public class SubListIn { - public string main { get; set; } public string main_system_tag { get; set; } - public string build { get; set; } public string building_tag { get; set; } } public class BuildMenuTablePost @@ -40,14 +47,16 @@ namespace Backend.Models { public string main_system_guid_name { get; set; } public string sub_system_guid_name { get; set; } - public string drawing_name { get; set; } - public string icon_click_name { get; set; } - public string planimetric_click_name { get; set; } + public string left_drawing_name { get; set; } + public string right_drawing_name { get; set; } + public string left_icon_click_name { get; set; } + public string left_planimetric_click_name { get; set; } + public string right_icon_click_name { get; set; } + public string right_planimetric_click_name { get; set; } public string floor_guid_name { get; set; } } public class MenuIn : SubListIn { - public string sub { get; set; } public string sub_system_tag { get; set; } } public class BuildMenuFloor : Actor diff --git a/Backend/Views/BuildMenu/Index.cshtml b/Backend/Views/BuildMenu/Index.cshtml index a116028..0a4592f 100644 --- a/Backend/Views/BuildMenu/Index.cshtml +++ b/Backend/Views/BuildMenu/Index.cshtml @@ -51,10 +51,14 @@ 序 系統大類 系統小類 - 預設頁面 - 是否顯示
平面圖 - 昇位圖
詳細資料設定 - 昇位圖
詳細資料URL + 左邊預設頁面 + 左邊是否顯示
平面圖 + 左邊昇位圖
詳細資料設定 + 左邊昇位圖
詳細資料URL + 右邊預設頁面 + 右邊是否顯示
平面圖 + 右邊昇位圖
詳細資料設定 + 右邊昇位圖
詳細資料URL @*昇位圖URL*@ 功能 @@ -218,12 +222,12 @@

- - - - - - + + + + + +
@@ -455,13 +459,13 @@ "data": "sub_system_guid_name" }, { - "data": "drawing_name" + "data": "left_drawing_name" }, { - "data": "planimetric_click_name" + "data": "left_planimetric_click_name" }, { - "data": "icon_click", + "data": null, "render": function (data, type, row, meta) { var str = []; if (2 & parseInt(data) > 0) { @@ -474,7 +478,29 @@ } }, { - "data": "icon_click_url" + "data": "left_icon_click_url" + }, + { + "data": "right_drawing_name" + }, + { + "data": "right_planimetric_click_name" + }, + { + "data": null, + "render": function (data, type, row, meta) { + var str = []; + if (2 & parseInt(data) > 0) { + str.push("點擊開關") + } + if (1 & parseInt(data) > 0) { + str.push("顯示詳細資料") + } + return str.join(";"); + } + }, + { + "data": "right_icon_click_url" }, { "data": null, @@ -507,11 +533,17 @@ } else { $.each(this.data, function (k, rel) { rel.sub_system_guid_name = "" + rel.sub_system_guid_name + "" - if (rel.drawing == 2) { - rel.drawing_name = rel.drawing_name + "
" + '點擊連結' + if (rel.left_drawing == 2) { + rel.left_drawing_name = rel.left_drawing_name + "
" + '點擊連結' } - if (rel.drawing == 1) { - rel.drawing_name = rel.drawing_name + "
" + '[' + rel.floor_guid_name + ']' + if (rel.left_drawing == 1) { + rel.left_drawing_name = rel.left_drawing_name + "
" + '[' + rel.floor_guid_name + ']' + } + if (rel.right_drawing == 2) { + rel.right_drawing_name = rel.right_drawing_name + "
" + '點擊連結' + } + if (rel.right_drawing == 1) { + rel.right_drawing_name = rel.right_drawing_name + "
" + '[' + rel.floor_guid_name + ']' } }) } @@ -754,6 +786,17 @@ $('#build_menu_icon_click_url_width_height_modal_div').hide(); } }); + + $('#build_menu_icon_click_onoff_modal_div_r').on("click", "input[type=checkbox]", function () { + if ($(this).prop("checked") && $(this).val() == 1) { + $('#build_menu_icon_click_url_modal_div_r').show(); + $('#build_menu_icon_click_url_width_height_modal_div_r').show(); + } else { + $('#build_menu_icon_click_url_modal_div_r').hide(); + $('#build_menu_icon_click_url_width_height_modal_div_r').hide(); + } + }); + //#region 更改大類更換小類 $('#build_menu_main_modal').on("change", function () { GetSubList($('#build_menu_main_modal').val()); @@ -782,10 +825,16 @@ return; } - var icon_click = 0; + var left_icon_click = 0; + var right_icon_click = 0; $.each($("input[name='icon_click[]']"), function (index, item) { if (item.checked) { - icon_click += parseInt(item.value); + left_icon_click += parseInt(item.value); + } + }); + $.each($("input[name='icon_click[]_r']"), function (index, item) { + if (item.checked) { + right_icon_click += parseInt(item.value); } }); @@ -794,15 +843,24 @@ building_tag: $('#build_menu_building_modal').val(), main_system_tag: $('#build_menu_main_modal').val(), sub_system_tag: $('#build_menu_sub_modal').val(), - drawing: $('input[name="drawing"]:checked').val(), - system_url: $('#build_menu_systemurl_modal').val(), - icon_click: icon_click, - icon_click_url: $('#build_menu_icon_click_url_modal').val(), - icon_click_url_width: $('#build_menu_icon_click_url_width_modal').val(), - icon_click_url_height: $('#build_menu_icon_click_url_height_modal').val(), - planimetric_click: $('input[name="planimetric_click"]:checked').val(), - riser_diagram_url: $('#build_menu_riser_diagram_url_modal').val(), - planimetric_floor_guid: $('#build_menu_planimetric_floor_modal').val() + left_drawing: $('input[name="drawing"]:checked').val(), + left_system_url: $('#build_menu_systemurl_modal').val(), + left_icon_click: left_icon_click, + left_icon_click_url: $('#build_menu_icon_click_url_modal').val(), + left_icon_click_url_width: $('#build_menu_icon_click_url_width_modal').val(), + left_icon_click_url_height: $('#build_menu_icon_click_url_height_modal').val(), + left_planimetric_click: $('input[name="planimetric_click"]:checked').val(), + left_riser_diagram_url: $('#build_menu_riser_diagram_url_modal').val(), + left_planimetric_floor_guid: $('#build_menu_planimetric_floor_modal').val(), + right_drawing: $('input[name="drawing_r"]:checked').val(), + right_system_url: $('#build_menu_systemurl_modal_r').val(), + right_icon_click: right_icon_click, + right_icon_click_url: $('#build_menu_icon_click_url_modal_r').val(), + right_icon_click_url_width: $('#build_menu_icon_click_url_width_modal_r').val(), + right_icon_click_url_height: $('#build_menu_icon_click_url_height_modal_r').val(), + right_planimetric_click: $('input[name="planimetric_click_r"]:checked').val(), + right_riser_diagram_url: $('#build_menu_riser_diagram_url_modal_r').val(), + right_planimetric_floor_guid: $('#build_menu_planimetric_floor_modal_r').val() }; $.post(url, send_data, function (rel) { if (rel.code != "0000") { @@ -838,35 +896,65 @@ $('#build_menu_sub_modal').attr('disabled', true); $('#build_menu_sub_modal').append($("
-
-
- - -
-
-