From 08dd2afd7a9614dad029e94918516b068d413cac Mon Sep 17 00:00:00 2001 From: huanghongfeng <huanghongfeng@hnkhzn.com> Date: 星期四, 04 七月 2024 17:46:41 +0800 Subject: [PATCH] 大屏 --- 代码管理/PCS/WCS_Client/package.json | 6 代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/equipment/GetWheelDate.cs | 83 ++++++++++ 代码管理/PCS/WCS_Client/src/api/http.js | 2 代码管理/PCS/WCS_Server/WIDESEA_WCS/Common/equipment/Wheel_info_trace.cs | 2 代码管理/大屏/src/views/centerRight4.vue | 6 代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/PipelineJob.cs | 5 代码管理/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ReadplcController.cs | 9 + 代码管理/WMS/WMS_Server/WIDESEA_WebApi/Controllers/LargescreenController.cs | 21 ++ 代码管理/大屏/src/main.js | 3 代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/One_two_unitJob.cs | 123 +++------------ 代码管理/大屏/src/views/centerRight3.vue | 14 代码管理/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/VK4Job.cs | 4 代码管理/大屏/src/views/index.vue | 4 代码管理/大屏/src/views/bottomRight.vue | 4 代码管理/PCS/WCS_Server/WIDESEA_Comm/PLCDBItem/Oiling_machine.cs | 81 ++++++++++ 代码管理/WMS/WMS_Client/package.json | 4 代码管理/PCS/WCS_Server/WIDESEA_WebApi/appsettings.json | 2 代码管理/大屏/src/components/echart/bottom/bottomLeftChart/chart.vue | 39 +++- 代码管理/太重PDA/pages/feeding/feeding.vue | 54 +++-- 19 files changed, 305 insertions(+), 161 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/package.json" index 03914ee..7676557 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/package.json" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/package.json" @@ -3,20 +3,22 @@ "version": "0.1.0", "private": true, "scripts": { - "serve": "SET NODE_OPTIONS= && vue-cli-service serve", + "serve": "SET NODE_OPTIONS= && vue-cli-service serve", "build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build", "test:unit": "vue-cli-service test:unit", "lint": "vue-cli-service lint" -}, + }, "dependencies": { "@element-plus/icons-vue": "^2.1.0", "@microsoft/signalr": "^6.0.4", + "@vue/reactivity": "^3.4.31", "ali-oss": "^6.17.1", "axios": "^0.21.1", "core-js": "^3.6.5", "echarts": "^5.0.2", "element-plus": "^2.2.14", "less": "^4.1.1", + "lodash": "^4.17.21", "vue": "^3.2.37", "vue-draggable-next": "^2.0.1", "vue-router": "^4.0.0-0", diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/api/http.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/api/http.js" index f6b7a14..8ecd457 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/api/http.js" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Client/src/api/http.js" @@ -12,7 +12,7 @@ let loadingInstance; let loadingStatus = false; if (process.env.NODE_ENV == 'development') { - axios.defaults.baseURL = 'http://192.168.12.101:8099/'; + axios.defaults.baseURL = 'http://127.0.0.1:8099/'; } else if (process.env.NODE_ENV == 'debug') { axios.defaults.baseURL = 'http://192.168.12.101:8099/'; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_Comm/PLCDBItem/Oiling_machine.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_Comm/PLCDBItem/Oiling_machine.cs" new file mode 100644 index 0000000..bf130bf --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_Comm/PLCDBItem/Oiling_machine.cs" @@ -0,0 +1,81 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WIDESEA_Comm.PLCDBItem +{ + public class Oiling_machine + { + /// <summary> + /// 瀵硅薄闆嗗悎 + /// </summary> + public static List<Oiling_machine> Oiling_machineDBItem = new List<Oiling_machine>(); + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鑷姩妯″紡 + /// </summary> + public bool R_Automatic_mode{ get; set; } + + /// <summary> + /// 鎵嬪姩妯″紡 + /// </summary> + public bool R_Manual_mode { get; set; } + + /// <summary> + /// 鑷姩杩愯涓� + /// </summary> + public bool R_AutoRunning { get; set; } + + /// <summary> + /// 1锛氭棤鏁呴殰锛� 0锛氭湁鏁呴殰 + /// </summary> + public bool R_NO_FAULT { get; set; } + + /// <summary> + /// 璁惧涓婄數 + /// </summary> + public bool R_state_power_on { get; set; } + + /// <summary> + /// + /// </summary> + public bool R_state_automatic_se_lected { get; set; } + + /// <summary> + /// 鎬ュ仠淇″彿 + /// </summary> + public bool R_EstopOK { get; set; } + + /// <summary> + /// 杞﹁疆鍒拌揪鍠锋补閾炬潯 + /// </summary> + public bool R_WheelOnPosition { get; set; } + + /// <summary> + /// 杞﹁疆SN鍙� + /// </summary> + public string R_Wheel_SN { get; set; } + + /// <summary> + /// 杞﹁疆绫诲瀷 + /// </summary> + public Int16 R_Wheel_Type { get; set; } + + /// <summary> + /// + /// </summary> + public byte R_Part_Status { get; set; } + + /// <summary> + /// + /// </summary> + public byte R_Part_Process { get; set; } + } +} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/equipment/GetWheelDate.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/equipment/GetWheelDate.cs" index 25dbade..ea73bc1 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/equipment/GetWheelDate.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/equipment/GetWheelDate.cs" @@ -6,6 +6,7 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using WIDESEA_Comm; +using WIDESEA_Comm.PLCDBItem; using WIDESEA_Core.Extensions; using WIDESEA_WCS.WCSClient; @@ -397,5 +398,87 @@ } return gantryDBItems; } + + + /// <summary> + /// 鑾峰彇娑傛补鏈轰俊鎭� + /// </summary> + /// <param name="client"></param> + /// <returns></returns> + public static List<Oiling_machine> GetOiling_machine(PLCClient client) + { + List<Oiling_machine> gantryDBItems = new List<Oiling_machine>(); + PropertyInfo[] propertyInfos = typeof(Oiling_machine).GetProperties(); + var groups = client.itemGroups.Where(x => x.opratortype == "oiler").OrderBy(x => x.Methods).ThenBy(x => x.name).GroupBy(x => x.Methods).ToList(); + foreach (var key in groups) + { + try + { + Oiling_machine StackerDBItem = new Oiling_machine(); + foreach (var propertyInfo in propertyInfos) + { + if (propertyInfo.Name == "Name") + { + StackerDBItem.Name = key.Key; + } + else + { + DBItemGroup group = key.FirstOrDefault(x => x.name == propertyInfo.Name); + if (group != null) + { + var readData = DBExtension.Read(group, client); + switch (propertyInfo.Name) + { + case "R_Automatic_mode": + StackerDBItem.R_Automatic_mode = Convert.ToBoolean(readData); + break; + case "R_Manual_mode": + StackerDBItem.R_Manual_mode = Convert.ToBoolean(readData); + break; + case "R_AutoRunning": + StackerDBItem.R_AutoRunning = Convert.ToBoolean(readData); + break; + case "R_NO_FAULT": + StackerDBItem.R_NO_FAULT = Convert.ToBoolean(readData); + break; + case "R_state_power_on": + StackerDBItem.R_state_power_on = Convert.ToBoolean(readData); + break; + case "R_state_automatic_se_lected": + StackerDBItem.R_state_automatic_se_lected = Convert.ToBoolean(readData); + break; + case "R_EstopOK": + StackerDBItem.R_EstopOK = Convert.ToBoolean(readData); + break; + case "R_WheelOnPosition": + StackerDBItem.R_WheelOnPosition = Convert.ToBoolean(readData); + break; + case "R_Wheel_SN": + StackerDBItem.R_Wheel_SN = Convert.ToString(readData); + break; + case "R_Wheel_Type": + StackerDBItem.R_Wheel_Type = Convert.ToInt16(readData); + break; + case "R_Part_Status": + StackerDBItem.R_Part_Status = Convert.ToByte(readData); + break; + case "R_Part_Process": + StackerDBItem.R_Part_Process = Convert.ToByte(readData); + break; + } + } + } + } + gantryDBItems.Add(StackerDBItem); + } + catch (Exception ex) + { + + } + + } + return gantryDBItems; + } + } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/equipment/Wheel_info_trace.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/equipment/Wheel_info_trace.cs" index a1ab343..ff78ce1 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/equipment/Wheel_info_trace.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Common/equipment/Wheel_info_trace.cs" @@ -87,6 +87,8 @@ info.trace_billetID = Work.billetID.ToString(); } traceRepository.Add(info, true); + + client.Write(key.FirstOrDefault(x => x.name == "oi_on").dbAddress, (byte)0);//淇″彿澶嶄綅 } #endregion diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/One_two_unitJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/One_two_unitJob.cs" index dbafe1e..b6aa078 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/One_two_unitJob.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/One_two_unitJob.cs" @@ -105,19 +105,20 @@ VOLContext context = new VOLContext(); Idt_plcinfodetailRepository repository = new dt_plcinfodetailRepository(context); List<dt_plcinfodetail> plcinfodetail = new List<dt_plcinfodetail>(); - string name = "VK5"; - for (int i = 1; i <= 2; i++) + string name = "Pipeline"; + for (int i = 1; i <= 3; i++) { dt_plcinfodetail dt_Plcinfodetail1 = new dt_plcinfodetail() { plcdetail_id = Guid.NewGuid(), plcdetail_iotype = name, - plcdetail_db = "DB603", - plcdetail_value = (0 + (i - 1) * 144).ToString(), - plcdetail_valtype = "byte", - plcdetail_name = "oi_on", - plcdetail_opratortype = "labeller", - plcdetail_remark = "鐢宠", + plcdetail_db = "DB29", + plcdetail_value = (21 + (i - 1) * 80).ToString(), + plcdetail_valtype = "string", + plcdetail_len = 20, + plcdetail_name = "R_Wheel_SN", + plcdetail_opratortype = "oiler", + plcdetail_remark = "Wheel_SN", plcdetail_number = i + "鍗曞厓", }; plcinfodetail.Add(dt_Plcinfodetail1); @@ -125,13 +126,12 @@ { plcdetail_id = Guid.NewGuid(), plcdetail_iotype = name, - plcdetail_db = "DB603", - plcdetail_value = (2 + (i - 1) * 144).ToString(), - plcdetail_len = 20, - plcdetail_valtype = "string", - plcdetail_name = "o_wp_id", - plcdetail_opratortype = "labeller", - plcdetail_remark = "杞﹁疆SN鍙�", + plcdetail_db = "DB29", + plcdetail_value = (22 + (i - 1) * 80).ToString(), + plcdetail_valtype = "int16", + plcdetail_name = "R_Wheel_Type", + plcdetail_opratortype = "oiler", + plcdetail_remark = "Wheel_Type", plcdetail_number = i + "鍗曞厓", }; plcinfodetail.Add(dt_Plcinfodetail2); @@ -139,13 +139,12 @@ { plcdetail_id = Guid.NewGuid(), plcdetail_iotype = name, - plcdetail_db = "DB603", - plcdetail_value = (24 + (i - 1) * 144).ToString(), - plcdetail_len = 20, - plcdetail_valtype = "string", - plcdetail_name = "i_job_id", - plcdetail_opratortype = "labeller", - plcdetail_remark = "宸ュ崟缂栧彿", + plcdetail_db = "DB29", + plcdetail_value = (24 + (i - 1) * 80).ToString(), + plcdetail_valtype = "byte", + plcdetail_name = "R_Part_Status", + plcdetail_opratortype = "oiler", + plcdetail_remark = "Part_Status", plcdetail_number = i + "鍗曞厓", }; plcinfodetail.Add(dt_Plcinfodetail3); @@ -153,85 +152,15 @@ { plcdetail_id = Guid.NewGuid(), plcdetail_iotype = name, - plcdetail_db = "DB603", - plcdetail_value = (22 + (i - 1) * 144).ToString(), + plcdetail_db = "DB29", + plcdetail_value = (25 + (i - 1) * 80).ToString(), plcdetail_valtype = "byte", - plcdetail_name = "i_status", - plcdetail_opratortype = "labeller", - plcdetail_remark = "鐘舵��", + plcdetail_name = "R_Part_Process", + plcdetail_opratortype = "oiler", + plcdetail_remark = "Part_Process", plcdetail_number = i + "鍗曞厓", }; plcinfodetail.Add(dt_Plcinfodetail4); - dt_plcinfodetail dt_Plcinfodetail5 = new dt_plcinfodetail() - { - plcdetail_id = Guid.NewGuid(), - plcdetail_iotype = name, - plcdetail_db = "DB603", - plcdetail_value = (44 + (i - 1) * 144).ToString(), - plcdetail_len = 20, - plcdetail_valtype = "string", - plcdetail_name = "i_heat_id", - plcdetail_opratortype = "labeller", - plcdetail_remark = "鐐変唬鍙�", - plcdetail_number = i + "鍗曞厓", - }; - plcinfodetail.Add(dt_Plcinfodetail5); - dt_plcinfodetail dt_Plcinfodetail6 = new dt_plcinfodetail() - { - plcdetail_id = Guid.NewGuid(), - plcdetail_iotype = name, - plcdetail_db = "DB603", - plcdetail_value = (64 + (i - 1) * 144).ToString(), - plcdetail_len = 20, - plcdetail_valtype = "string", - plcdetail_name = "i_billet_id", - plcdetail_opratortype = "labeller", - plcdetail_remark = "閽㈠澂鍙�", - plcdetail_number = i + "鍗曞厓", - }; - plcinfodetail.Add(dt_Plcinfodetail6); - dt_plcinfodetail dt_Plcinfodetail7 = new dt_plcinfodetail() - { - plcdetail_id = Guid.NewGuid(), - plcdetail_iotype = name, - plcdetail_db = "DB603", - plcdetail_value = (84 + (i - 1) * 144).ToString(), - plcdetail_len = 20, - plcdetail_valtype = "string", - plcdetail_name = "i_batch_id", - plcdetail_opratortype = "labeller", - plcdetail_remark = "鐑鐞嗘壒娆�", - plcdetail_number = i + "鍗曞厓", - }; - plcinfodetail.Add(dt_Plcinfodetail7); - dt_plcinfodetail dt_Plcinfodetail8 = new dt_plcinfodetail() - { - plcdetail_id = Guid.NewGuid(), - plcdetail_iotype = name, - plcdetail_db = "DB603", - plcdetail_value = (104 + (i - 1) * 144).ToString(), - plcdetail_len = 20, - plcdetail_valtype = "string", - plcdetail_name = "i_drawing_id", - plcdetail_opratortype = "labeller", - plcdetail_remark = "鍥惧彿", - plcdetail_number = i + "鍗曞厓", - }; - plcinfodetail.Add(dt_Plcinfodetail8); - dt_plcinfodetail dt_Plcinfodetail9 = new dt_plcinfodetail() - { - plcdetail_id = Guid.NewGuid(), - plcdetail_iotype = name, - plcdetail_db = "DB603", - plcdetail_value = (124 + (i - 1) * 144).ToString(), - plcdetail_len = 20, - plcdetail_valtype = "string", - plcdetail_name = "i_wheel_type", - plcdetail_opratortype = "labeller", - plcdetail_remark = "i_wheel_type", - plcdetail_number = i + "鍗曞厓", - }; - plcinfodetail.Add(dt_Plcinfodetail9); } repository.AddRange(plcinfodetail, true); } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/PipelineJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/PipelineJob.cs" index 084430e..272670b 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/PipelineJob.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/PipelineJob.cs" @@ -12,6 +12,7 @@ using System.Xml.Linq; using WIDESEA_Comm; using WIDESEA_Comm.LogInfo; +using WIDESEA_Comm.PLCDBItem; using WIDESEA_Comm.TaskNo; using WIDESEA_Core.BaseProvider; using WIDESEA_Core.EFDbContext; @@ -58,6 +59,10 @@ pipeline.Loadinglevel(client); pipeline.AutoEmptyTray(client); pipeline.StationState(client); + + #region 鏁版嵁閲囬泦 + Oiling_machine.Oiling_machineDBItem = GetDate.GetOiling_machine(client); + #endregion } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/VK4Job.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/VK4Job.cs" index 3ca6c7a..1f608fa 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/VK4Job.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WCS/Jobs/equipment/VK4Job.cs" @@ -45,9 +45,9 @@ info_interaction.labeller(client); #endregion #region 杞﹁疆淇℃伅杩芥函 - Wheel_info_trace.Wheel_online(client); + /*Wheel_info_trace.Wheel_online(client); Wheel_info_trace.Wheel_machine(client); - Wheel_info_trace.Wheel_offline(client); + Wheel_info_trace.Wheel_offline(client);*/ #endregion #region 淇℃伅閲囬泦 WheelDBItem.VK4WheelDBItem = GetDate.GetWheelDate(client); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ReadplcController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ReadplcController.cs" index 8d2e5af..baee244 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ReadplcController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/Controllers/ReadplcController.cs" @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; using WIDESEA_Comm; +using WIDESEA_Comm.PLCDBItem; using WIDESEA_Core.EFDbContext; using WIDESEA_Core.Extensions; using WIDESEA_Core.Utilities; @@ -39,7 +40,8 @@ { var DBIems = WheelDBItem.VK4WheelDBItem; //鑾峰彇杈婇亾锛岃緭閫佺嚎淇℃伅 var DBIems2 = VKDBItem.VK4DBItem; //VK4鐘舵�佷俊鎭璞¢泦鍚� - // VK4妗佹灦鏈烘鎵嬪璞¢泦鍚� + + var DBIems3 = Oiling_machine.Oiling_machineDBItem; if (DBIems.Count == 0) { @@ -767,6 +769,7 @@ } #endregion + #region pcs骞抽潰鍥惧簱浣嶄俊鎭� [HttpPost("dt_stationinfolist")] public IActionResult dt_stationinfolist() { @@ -796,5 +799,9 @@ } return Ok(responseData); } + #endregion + + + } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/appsettings.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/appsettings.json" index 1ecb410..96cdbf0 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/appsettings.json" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/PCS/WCS_Server/WIDESEA_WebApi/appsettings.json" @@ -16,7 +16,7 @@ "Connection": { "DBType": "MsSql", //MySql/MsSql/PgSql //鏁版嵁搴撶被鍨嬶紝濡傛灉浣跨敤鐨勬槸sqlserver姝ゅ搴旇缃负MsSql //sqlserver杩炴帴瀛楃涓睵@ssw0rd - "DbConnectionString": "Data Source=192.168.12.101;Initial Catalog=WIDESEA_DB;Persist Security Info=True;User ID=sa;Password=123456;Connect Timeout=500;", + "DbConnectionString": "Data Source=.;Initial Catalog=WIDESEA_DB_TY_TY;Persist Security Info=True;User ID=sa;Password=123456;Connect Timeout=500;", //"DbConnectionString": "Data Source=.;Initial Catalog=WIDESEA_DB;Persist Security Info=True;User ID=sa;Password=P@ssw0rd;Connect Timeout=500;", //mysql杩炴帴瀛楃涓�(鍗囩骇EFCore3.1鍒版椂宸插皢mysql杩炴帴瀛楃涓蹭慨鏀�,2019-12-20) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/package.json" index 2e83fbf..8369ac2 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/package.json" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/package.json" @@ -7,16 +7,18 @@ "build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build", "test:unit": "vue-cli-service test:unit", "lint": "vue-cli-service lint" -}, + }, "dependencies": { "@element-plus/icons-vue": "^2.1.0", "@microsoft/signalr": "^6.0.4", + "@vue/reactivity": "^3.4.31", "ali-oss": "^6.17.1", "axios": "^0.21.1", "core-js": "^3.6.5", "echarts": "^5.0.2", "element-plus": "^2.2.14", "less": "^4.1.1", + "lodash": "^4.17.21", "vue": "^3.2.37", "vue-draggable-next": "^2.0.1", "vue-router": "^4.0.0-0", diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WebApi/Controllers/LargescreenController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WebApi/Controllers/LargescreenController.cs" index 39848cc..6f72987 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WebApi/Controllers/LargescreenController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WebApi/Controllers/LargescreenController.cs" @@ -171,7 +171,7 @@ var data3 = db2.Find(_ => true).Where(x => x.stationCode.Contains("A") || x.stationCode.Contains("B") || x.stationCode.Contains("C") || x.stationCode.Contains("D01")).ToList(); //搴撳尯鍥惧彿鏁伴噺,澶栧姞绌烘墭鏁伴噺 - var Number_wheels = data3.Where(_ => true) + var Number_wheels1 = data3.Where(_ => true) .GroupBy(s => new { stationType = string.IsNullOrEmpty(s.stationType) ? s.tray_type : s.stationType, @@ -183,6 +183,7 @@ tray_type = g.Key.tray_type }).ToList(); + var Number_wheels = Number_wheels1.Where(x => x.stationType != "LargeTray" && x.stationType != "SmallTray").ToList(); #endregion @@ -262,9 +263,23 @@ x.Key.stationType, combined_heatNumber = string.Join(", ", x.Select(y => y.heatNumber).Distinct()) }) - .Where(x => !string.IsNullOrEmpty(x.stationType) && !string.IsNullOrEmpty(x.combined_heatNumber)) .OrderBy(x => x.Area) .ThenBy(x => x.line) + .GroupBy(x => x.line) // 浣跨敤 GroupBy 鎸� Line 瀛楁鍒嗙粍 + .Select(group => + { + // 鎵惧埌姣忎釜鍒嗙粍涓涓�涓� stationType 涓嶄负绌虹殑鍏冪礌 + var firstWithStationType = group.FirstOrDefault(x => !string.IsNullOrEmpty(x.stationType)); + if (firstWithStationType != null) + { + return firstWithStationType; + } + else + { + // 濡傛灉鍒嗙粍涓兘鏄� stationType 涓虹┖锛屽垯杩斿洖绗竴涓厓绱狅紙姝ゆ椂鍗充负 stationType 涓虹┖鐨勶級 + return group.First(); + } + }) .ToList(); dataList = dataList.Concat(data).ToList(); @@ -325,7 +340,7 @@ Idt_agvtaskRepository db = new dt_agvtaskRepository(volContext); var dataList = db.Find(_ => true).OrderByDescending(x => x.agv_createtime).ToList(); - var data = dataList.Where(x => x.agv_tasktype != "Queue").Take(15).ToList(); + var data = dataList.Where(x => x.agv_taskstate != "闃熷垪" && x.agv_taskstate != "Queue" && x.agv_taskstate != "鏆傚仠" && x.agv_taskstate != "Pause").ToList(); if (data.Count <= 15) { data = dataList.Take(15).ToList(); diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/components/echart/bottom/bottomLeftChart/chart.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/components/echart/bottom/bottomLeftChart/chart.vue" index ba8bd9c..5cc6fb6 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/components/echart/bottom/bottomLeftChart/chart.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/components/echart/bottom/bottomLeftChart/chart.vue" @@ -1,18 +1,14 @@ <template> <div> <!-- 骞村害寮�宸ョ巼 --> - <Echart - :options="options" - id="bottomLeftChart" - height="480px" - ></Echart> + <Echart :options="options" id="bottomLeftChart" height="480px"></Echart> </div> </template> <script> import Echart from '@/common/echart' export default { - data () { + data() { return { options: {}, }; @@ -28,7 +24,7 @@ }, watch: { cdata: { - handler (newData) { + handler(newData) { this.options = { title: { text: "", @@ -50,11 +46,9 @@ color: "#B4B4B4" }, top: "0%", - left:"15%" - }, grid: { - x: "8%", + x: "12%", width: "90%", y: "4%" }, @@ -113,14 +107,22 @@ { name: "鍑哄簱閲�", type: "bar", - barWidth: 40, + barWidth: 25, itemStyle: { normal: { barBorderRadius: 5, color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ { offset: 0, color: "#956FD4" }, { offset: 1, color: "#3EACE5" } - ]) + ]), + label: { + show: true, // 鏄剧ず鏍囩 + position: 'top', // 鏍囩浣嶇疆锛屽彲浠ヨ缃� 'top', 'insideTop', 'inside', 'insideBottom' 绛� + formatter: '{c}', // 鏍囩鍐呭鏍煎紡鍣紝{c} 琛ㄧず鏁版嵁鍊� + fontSize: 14, // 鏍囩鏂囧瓧澶у皬锛岄粯璁や负 12 + fontWeight: 'bold', // 鏍囩鏂囧瓧绮楃粏锛岄粯璁や负 'normal' + color: '#ffffff' // 鏍囩鏂囧瓧棰滆壊锛岄粯璁や负 '#333' + } } }, data: newData.barData @@ -128,8 +130,7 @@ { name: "鍏ュ簱閲�", type: "bar", - barGap: "-100%", - barWidth: 40, + barWidth: 25, itemStyle: { normal: { barBorderRadius: 5, @@ -137,7 +138,15 @@ { offset: 0, color: "rgba(156,107,211,0.8)" }, { offset: 0.2, color: "rgba(156,107,211,0.5)" }, { offset: 1, color: "rgba(156,107,211,0.2)" } - ]) + ]), + label: { + show: true, // 鏄剧ず鏍囩 + position: 'top', // 鏍囩浣嶇疆锛屽彲浠ヨ缃� 'top', 'insideTop', 'inside', 'insideBottom' 绛� + formatter: '{c}', // 鏍囩鍐呭鏍煎紡鍣紝{c} 琛ㄧず鏁版嵁鍊� + fontSize: 14, // 鏍囩鏂囧瓧澶у皬锛岄粯璁や负 12 + fontWeight: 'bold', // 鏍囩鏂囧瓧绮楃粏锛岄粯璁や负 'normal' + color: '#ffffff' // 鏍囩鏂囧瓧棰滆壊锛岄粯璁や负 '#333' + } } }, z: -12, diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/main.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/main.js" index ab606c4..e137a8e 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/main.js" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/main.js" @@ -21,7 +21,8 @@ Vue.prototype.$http = axios.create({ timeout: 20000, - baseURL: 'http://192.168.12.101:8098', + //baseURL: 'http://192.168.12.101:8098', + baseURL: 'http://localhost:8098', }); //5.x 寮曠敤鏂瑰紡涓烘寜闇�寮曠敤 //甯屾湜浣跨敤5.x鐗堟湰鐨勮瘽,闇�瑕佸湪package.json涓洿鏂扮増鏈彿,骞跺垏鎹㈠紩鐢ㄦ柟寮� diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/bottomRight.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/bottomRight.vue" index 91f849b..0f7313a 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/bottomRight.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/bottomRight.vue" @@ -1,6 +1,6 @@ <template> <div id="bottomRight" > - <div class="bg-color-black" style="width: 100%;"> + <div class="bg-color-black" > <!-- <div class="d-flex pt-2 pl-2"> <span> <icon name="chart-area" class="text-icon"></icon> @@ -33,7 +33,7 @@ <style lang="scss" class> $box-height: 520px; -$box-width: 895px; +$box-width: 600px; #bottomRight { padding: 14px 16px; height: $box-height; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/centerRight3.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/centerRight3.vue" index 467f33e..d5ce323 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/centerRight3.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/centerRight3.vue" @@ -1,7 +1,7 @@ <template> <div id="centerRight1"> - <div class="bg-color-black" style="width: 100%;"> + <div class="bg-color-black" > <div class="d-flex pt-2 pl-2"> <span> <icon name="chart-line" class="text-icon"></icon> @@ -45,26 +45,26 @@ this.changeNumber() setInterval(() => { this.changeNumber() - },10000) + },100) }, changeNumber() { - this.$http.post("/api/Largescreen/Current_agvtask", "鏌ヨ涓�...") + this.$http.post('/api/Largescreen/Current_agvtask') .then(response => { let GetAGVTaskData = [] if(response.data<=0){ - let data = ["<span class='colorRed'>鏆傛棤鏁版嵁</span>","<span class='colorRed'>鏆傛棤鏁版嵁</span>","<span class='colorRed'>鏆傛棤鏁版嵁</span>","<span class='colorRed'>鏆傛棤鏁版嵁</span>","<span class='colorRed'>鏆傛棤鏁版嵁</span>","<span class='colorRed'>鏆傛棤鏁版嵁</span>","<span class='colorRed'>鏆傛棤鏁版嵁</span>"] + let data = ["<span class='colorRed'>鏆傛棤鏁版嵁</span>","<span class='colorRed'>鏆傛棤鏁版嵁</span>","<span class='colorRed'>鏆傛棤鏁版嵁</span>","<span class='colorRed'>鏆傛棤鏁版嵁</span>","<span class='colorRed'>鏆傛棤鏁版嵁</span>"] GetAGVTaskData.push(data) }else{ response.data.forEach(element => { let data = [element.agv_tasknum,"<span class='colorRed'>"+element.agv_fromaddress+"</span>" , "<span class='colorGrass'>" + element.agv_toaddress + "</span>",element.agv_taskstate, - element.agv_tasktype,element.agv_createtime,element.agv_realesstime] + element.agv_tasktype] GetAGVTaskData.push(data) }); } this.config.data = GetAGVTaskData; this.config = { - header: ['浠诲姟鍙�', '璧风偣鍦板潃', '缁堢偣鍦板潃', '浠诲姟鐘舵��','浠诲姟绫诲瀷','鍒涘缓鏃堕棿','涓嬪彂鏃堕棿'], + header: ['浠诲姟鍙�', '璧风偣鍦板潃', '缁堢偣鍦板潃', '浠诲姟鐘舵��','浠诲姟绫诲瀷'], data: GetAGVTaskData, rowNum: 10, //琛ㄦ牸琛屾暟 headerHeight: 35, @@ -87,7 +87,7 @@ <style lang="scss" scoped> $box-height: 600px; -$box-width: 97%; +$box-width: 100%; #centerRight1 { padding: 16px; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/centerRight4.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/centerRight4.vue" index 4070a0f..4fafef7 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/centerRight4.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/centerRight4.vue" @@ -46,7 +46,7 @@ this.GetLocationData(); setInterval(() => { this.GetLocationData() - },60000) + },100) }, GetLocationData(){ var _this=this; @@ -68,7 +68,7 @@ oddRowBGC: '#0f1325', //濂囨暟琛� evenRowBGC: '#171c33', //鍋舵暟琛� index: true, - columnWidth: [50,130,100,60,270], + columnWidth: [50,130,100,60,960], align: ['center'], } }).catch((x)=>{ @@ -81,7 +81,7 @@ <style lang="scss" scoped> $box-height: 520px; -$box-width: 630px; +$box-width: 850px; #centerRight1 { padding: 10px; padding-top: 20px; diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/index.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/index.vue" index 0e5869a..791eedb 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/index.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\247\345\261\217/src/views/index.vue" @@ -81,9 +81,9 @@ <!-- 绗洓琛屾暟鎹� --> <div class="content-box"> - <dv-border-box-13 style="width: 400px;"> + <dv-border-box-12 style="width: 465px;"> <bottomLeft /> - </dv-border-box-13> + </dv-border-box-12> <div> <dv-border-box-12> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\252\351\207\215PDA/pages/feeding/feeding.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\252\351\207\215PDA/pages/feeding/feeding.vue" index d3b4a09..c05d7b1 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\252\351\207\215PDA/pages/feeding/feeding.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\345\244\252\351\207\215PDA/pages/feeding/feeding.vue" @@ -53,14 +53,14 @@ this.barcode = e.detail.value; } else { var len = this.barcode.split(',').length; - if (len <= 4) { + if (len <= 5) { this.barcode = this.barcode + ','; } - else if(len < 5){ + else if(len < 6){ this.barcode = this.barcode; } else { - this.$t.message.toast('鏁伴噺鏈�澶氫负5涓�'); + this.$t.message.toast('鏁伴噺鏈�澶氫负6涓�'); this.isfill=true; return; } @@ -86,26 +86,34 @@ this.$t.message.toast('璇烽�夋嫨涓嬫枡鍙o紒') return; } - - this.$u.post("/api/ToWms/OutsourceInbound", { - MainData: { - dataSN: this.barcode, - stationNo: this.stationNo, - creator: uni.getStorageSync('jo_user').userName, - } - }).then(res => { - if (res.status) { - this.barcode = '', - this.station = '', - this.stationNo = '', - this.$t.message.toast('鍛煎彨AGV鎴愬姛锛岃绛夊緟AGV鍙栬揣'); - } else { - this.$t.message.toast(res.message); - } - console.log(res); - }).catch(err => { - - }) + + uni.showModal({ + title: '纭', + content: '杞﹁疆淇℃伅锛�'+this.barcode+',鏄惁鍛煎彨AGV锛�', + success: (res) => { + if (res.confirm) { + // this.$u.post("/api/ToWms/OutsourceInbound", { + // MainData: { + // dataSN: this.barcode, + // stationNo: this.stationNo, + // creator: uni.getStorageSync('jo_user').userName, + // } + // }).then(res => { + // if (res.status) { + // this.barcode = '', + // this.station = '', + // this.stationNo = '', + // this.$t.message.toast('鍛煎彨AGV鎴愬姛锛岃绛夊緟AGV鍙栬揣'); + // } else { + // this.$t.message.toast(res.message); + // } + // console.log(res); + // }).catch(err => { + + // }) + } + } + }); } } } -- Gitblit v1.9.3