From af15096c2336e2916076231af13caa7d92974949 Mon Sep 17 00:00:00 2001 From: liudl <673013083@qq.com> Date: 星期五, 17 一月 2025 10:14:17 +0800 Subject: [PATCH] ` --- Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs | 6 ++++-- Web/src/views/wcs/wcsDevice/index.vue | 9 +++++++++ Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceInput.cs | 5 +++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceInput.cs b/Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceInput.cs index 9414df3..ff1cd39 100644 --- a/Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceInput.cs +++ b/Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceInput.cs @@ -132,6 +132,11 @@ public string? StationNum { get; set; } /// <summary> + /// 浜や簰绫诲瀷 + /// </summary> + public DeviceTypeEnum? DeviceType { get; set; } + + /// <summary> /// 鎻忚堪 /// </summary> public string? Text { get; set; } diff --git a/Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs b/Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs index aef96fc..55efc00 100644 --- a/Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs +++ b/Admin.NET/WCS.Application/Service/WcsDevice/WcsDeviceService.cs @@ -6,6 +6,7 @@ using System.Drawing.Drawing2D; using WCS.Application.Entity; using WCS.Application.Service.WcsDevice.Dto; +using static SKIT.FlurlHttpClient.Wechat.Api.Models.CgibinComponentApiGetAuthorizerInfoResponse.Types.Authorizer.Types; namespace WCS.Application; @@ -115,7 +116,7 @@ modPlc = plcList.FirstOrDefault(m => m.Text == "1灞傛墭鐩樿緭閫佺嚎"); if (modPlc == null) throw Oops.Bah($"鏈煡璇㈠埌{input.Layer}妤煎眰PLC淇℃伅"); - DbNum = ""; + DbNum = "DB1100"; break; case "2": modPlc = plcList.FirstOrDefault(m => m.Text == "2灞傛墭鐩樿緭閫佺嚎"); @@ -127,7 +128,7 @@ modPlc = plcList.FirstOrDefault(m => m.Text == "3灞傛墭鐩樿緭閫佺嚎"); if (modPlc == null) throw Oops.Bah($"鏈煡璇㈠埌{input.Layer}妤煎眰PLC淇℃伅"); - DbNum = ""; + DbNum = "DB1100"; break; default: throw Oops.Bah("妤煎眰淇℃伅閿欒"); @@ -747,6 +748,7 @@ .WhereIF(input.PlcId > 0, u => u.PlcId == input.PlcId) .WhereIF(!string.IsNullOrWhiteSpace(input.StationNum), u => u.StationNum.Contains(input.StationNum.Trim())) .WhereIF(!string.IsNullOrWhiteSpace(input.Text), u => u.Text.Contains(input.Text.Trim())) + .WhereIF(input.DeviceType.HasValue, u => u.DeviceType == input.DeviceType) //澶勭悊澶栭敭鍜孴reeSelector鐩稿叧瀛楁鐨勮繛鎺� .LeftJoin<WcsPlc>((u, plcid) => u.PlcId == plcid.Id) .Select((u, plcid) => new WcsDeviceOutput diff --git a/Web/src/views/wcs/wcsDevice/index.vue b/Web/src/views/wcs/wcsDevice/index.vue index adb1201..7c4cc10 100644 --- a/Web/src/views/wcs/wcsDevice/index.vue +++ b/Web/src/views/wcs/wcsDevice/index.vue @@ -20,6 +20,15 @@ </el-form-item> </el-col> <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> + <el-form-item label="涓氬姟绫诲瀷"> + <el-select clearable="" filterable="" v-model="queryParams.deviceType" placeholder="涓氬姟绫诲瀷"> + <el-option v-for="(item,index) in dl('DeviceTypeEnum')" :key="index" :value="item.value" :label="`${item.name} (${item.code}) [${item.value}] `" /> + + </el-select> + + </el-form-item> + </el-col> + <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI"> <el-form-item label="宸ヤ綅鍙�"> <el-input v-model="queryParams.stationNum" clearable="" placeholder="璇疯緭鍏ュ伐浣嶅彿" /> -- Gitblit v1.8.0