hwh
2024-08-21 37c4da42e6bc67a0c40ef1d4f2527a5577f86a2e
plc设备信息页面优化
20个文件已修改
1 文件已重命名
1个文件已添加
434 ■■■■■ 已修改文件
Admin.NET/WCS.Application/Entity/WcsDevice.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Entity/WcsPlc.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Entity/WcsStation.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Enum/PLCEnum.cs 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceDto.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceInput.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceOutput.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Service/WcsPlc/Dto/WcsPlcDto.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Service/WcsPlc/Dto/WcsPlcInput.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Service/WcsPlc/Dto/WcsPlcOutput.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Service/WcsPlc/WcsPlcService.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Service/WcsStation/Dto/WcsStationDto.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Service/WcsStation/Dto/WcsStationInput.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Service/WcsStation/Dto/WcsStationOutput.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Util/PLCUtil.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/WCS.Application.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Web/src/views/wcs/wcsDevice/component/editDialog.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Web/src/views/wcs/wcsDevice/index.vue 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Web/src/views/wcs/wcsPlc/component/editDialog.vue 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Web/src/views/wcs/wcsPlc/index.vue 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Web/src/views/wcs/wcsStation/component/editDialog.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Web/src/views/wcs/wcsStation/index.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Admin.NET/WCS.Application/Entity/WcsDevice.cs
@@ -47,8 +47,8 @@
    /// <summary>
    /// 流程字类型
    /// </summary>
    [SugarColumn(ColumnName = "PosType", ColumnDescription = "流程字类型", Length = 10)]
    public string? PosType { get; set; }
    [SugarColumn(ColumnName = "PosType", ColumnDescription = "流程字类型")]
    public PLCDataTypeEnum? PosType { get; set; }
    
    /// <summary>
    /// 显示屏ip地址
Admin.NET/WCS.Application/Entity/WcsPlc.cs
@@ -15,6 +15,13 @@
    public string IP { get; set; }
    /// <summary>
    /// PLC类型
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "PLCType", ColumnDescription = "PLC类型")]
    public PLCEnum PLCType { get; set; }
    /// <summary>
    /// 设备类型
    /// </summary>
    [Required]
Admin.NET/WCS.Application/Entity/WcsStation.cs
File was renamed from Admin.NET/WCS.Application/Entity/WcsplcStation.cs
@@ -29,8 +29,8 @@
    /// <summary>
    /// 流程字类型
    /// </summary>
    [SugarColumn(ColumnName = "PosType", ColumnDescription = "流程字类型", Length = 10)]
    public string? PosType { get; set; }
    [SugarColumn(ColumnName = "PosType", ColumnDescription = "流程字类型")]
    public PLCDataTypeEnum? PosType { get; set; }
    
    /// <summary>
    /// 显示屏ip地址
Admin.NET/WCS.Application/Enum/PLCEnum.cs
@@ -45,3 +45,89 @@
    [Description("工位级别")]
    Station = 2,
}
/// <summary>
/// PLC枚举
/// </summary>
[Description("PLC枚举")]
public enum PLCEnum
{
    //未定义
    [Description("未定义")]
    None = 0,
    //西门子S7-200
    [Description("西门子S7-200")]
    S7_200 = 1,
    //西门子S7-200Smar
    [Description("西门子S7-200Smar")]
    S7_200Smart = 2,
    //西门子S7-300
    [Description("西门子S7-300")]
    S7_300 = 3,
    //西门子S7-400
    [Description("西门子S7-400")]
    S7_400 = 4,
    //西门子S7-1200
    [Description("西门子S7-1200")]
    S7_1200 = 5,
    //西门子S7-1500
    [Description("西门子S7-1500")]
    S7_1500 = 6,
    //ModBusTcp
    [Description("ModBusTcp")]
    ModBusTcp =7,
    //ModBusRtu
    [Description("ModBusRtu")]
    ModBusRtu = 8,
    //ModBusAscii
    [Description("ModBusAscii")]
    ModBusAscii = 9,
    //ModbusRtuOverTcp
    [Description("ModbusRtuOverTcp")]
    ModbusRtuOverTcp = 10,
    //三菱
    [Description("三菱")]
    Mitsubishi = 11,
    //欧姆龙
    [Description("欧姆龙")]
    OmronFins = 12,
    //罗克韦尔
    [Description("罗克韦尔")]
    AllenBradley = 13,
}
/// <summary>
/// PLC数据类型枚举
/// </summary>
[Description("PLC数据类型枚举")]
public enum PLCDataTypeEnum
{
    //Bit
    [Description("Bit")]
    Bit = 1,
    //Byte
    [Description("Byte")]
    Byte = 2,
    //Char
    [Description("Char")]
    Char = 3,
    //Word
    [Description("Word")]
    Word = 4,
    //DWord
    [Description("DWord")]
    DWord = 5,
    //Int
    [Description("Int")]
    Int = 6,
    //DInt
    [Description("DInt")]
    DInt = 7,
    //Real
    [Description("Real")]
    Real = 8,
    //LReal
    [Description("LReal")]
    LReal = 9,
    //String
    [Description("String")]
    String = 10,
}
Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceDto.cs
@@ -1,9 +1,4 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!

namespace WCS.Application;
    /// <summary>
@@ -54,7 +49,7 @@
        /// <summary>
        /// 流程字类型
        /// </summary>
        public string? PosType { get; set; }
        public PLCDataTypeEnum? PosType { get; set; }
        
        /// <summary>
        /// 显示屏ip地址
Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceInput.cs
@@ -47,7 +47,7 @@
        /// <summary>
        /// 流程字类型
        /// </summary>
        public virtual string? PosType { get; set; }
        public virtual PLCDataTypeEnum? PosType { get; set; }
        
        /// <summary>
        /// 显示屏ip地址
Admin.NET/WCS.Application/Service/WcsDevice/Dto/WcsDeviceOutput.cs
@@ -1,9 +1,4 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!

namespace WCS.Application;
/// <summary>
@@ -54,7 +49,7 @@
    /// <summary>
    /// 流程字类型
    /// </summary>
    public string? PosType { get; set; }
    public PLCDataTypeEnum? PosType { get; set; }
    
    /// <summary>
    /// 显示屏ip地址
Admin.NET/WCS.Application/Service/WcsPlc/Dto/WcsPlcDto.cs
@@ -24,6 +24,11 @@
        /// <summary>
        /// 设备类型
        /// </summary>
    public PLCEnum PLCType { get; set; }
    /// <summary>
    /// 设备类型
    /// </summary>
        public PLCTypeEnum Type { get; set; }
        
        /// <summary>
Admin.NET/WCS.Application/Service/WcsPlc/Dto/WcsPlcInput.cs
@@ -1,12 +1,4 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace WCS.Application;
    /// <summary>
@@ -18,6 +10,11 @@
        /// PLCIP地址
        /// </summary>
        public virtual string IP { get; set; }
    /// <summary>
    /// PLC类型
    /// </summary>
    public virtual PLCEnum PLCType { get; set; }
        
        /// <summary>
        /// 设备类型
@@ -52,6 +49,11 @@
        public string? IP { get; set; }
        
        /// <summary>
    /// PLC类型
    /// </summary>
    public PLCEnum? PLCType { get; set; }
    /// <summary>
        /// 设备类型
        /// </summary>
        public PLCTypeEnum? Type { get; set; }
@@ -70,6 +72,12 @@
        public override string IP { get; set; }
        
        /// <summary>
    /// PLC类型
    /// </summary>
    [Required(ErrorMessage = "PLC类型不能为空")]
    public override PLCEnum PLCType { get; set; }
    /// <summary>
        /// 设备类型
        /// </summary>
        [Required(ErrorMessage = "设备类型不能为空")]
Admin.NET/WCS.Application/Service/WcsPlc/Dto/WcsPlcOutput.cs
@@ -1,9 +1,4 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!

namespace WCS.Application;
/// <summary>
@@ -22,6 +17,11 @@
    public string IP { get; set; }
    
    /// <summary>
    /// PLC类型
    /// </summary>
    public PLCEnum PLCType { get; set; }
    /// <summary>
    /// 设备类型
    /// </summary>
    public PLCTypeEnum Type { get; set; }
Admin.NET/WCS.Application/Service/WcsPlc/WcsPlcService.cs
@@ -1,11 +1,4 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
using Admin.NET.Core.Service;
using Microsoft.AspNetCore.Http;

namespace WCS.Application;
/// <summary>
@@ -35,6 +28,7 @@
            .WhereIF(!string.IsNullOrEmpty(input.SearchKey), u =>
                u.IP.Contains(input.SearchKey)
            )
            .WhereIF(input.PLCType.HasValue, u => u.PLCType == input.PLCType)
            .WhereIF(!string.IsNullOrWhiteSpace(input.IP), u => u.IP.Contains(input.IP.Trim()))
            .WhereIF(input.Type.HasValue, u => u.Type == input.Type)
            .Select<WcsPlcOutput>();
Admin.NET/WCS.Application/Service/WcsStation/Dto/WcsStationDto.cs
@@ -34,7 +34,7 @@
        /// <summary>
        /// 流程字类型
        /// </summary>
        public string? PosType { get; set; }
        public PLCDataTypeEnum? PosType { get; set; }
        
        /// <summary>
        /// 显示屏ip地址
Admin.NET/WCS.Application/Service/WcsStation/Dto/WcsStationInput.cs
@@ -32,7 +32,7 @@
        /// <summary>
        /// 流程字类型
        /// </summary>
        public virtual string? PosType { get; set; }
        public virtual PLCDataTypeEnum? PosType { get; set; }
        
        /// <summary>
        /// 显示屏ip地址
Admin.NET/WCS.Application/Service/WcsStation/Dto/WcsStationOutput.cs
@@ -1,9 +1,4 @@
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!

namespace WCS.Application;
/// <summary>
@@ -39,7 +34,7 @@
    /// <summary>
    /// 流程字类型
    /// </summary>
    public string? PosType { get; set; }
    public PLCDataTypeEnum? PosType { get; set; }
    
    /// <summary>
    /// 显示屏ip地址
Admin.NET/WCS.Application/Util/PLCUtil.cs
New file
@@ -0,0 +1,12 @@
using IoTClient.Clients.PLC;
using IoTClient.Common.Enums;
namespace WCS.Application;
public class PLCUtil
{
    public PLCUtil()
    {
        SiemensClient client = new SiemensClient(SiemensVersion.S7_200Smart, "127.0.0.1", 102);
    }
}
Admin.NET/WCS.Application/WCS.Application.csproj
@@ -118,6 +118,10 @@
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="IoTClient" Version="1.0.40" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Admin.NET.Core\Admin.NET.Core.csproj" />
    <ProjectReference Include="..\Plugins\Admin.NET.Plugin.ApprovalFlow\Admin.NET.Plugin.ApprovalFlow.csproj" />
    <ProjectReference Include="..\Plugins\Admin.NET.Plugin.DingTalk\Admin.NET.Plugin.DingTalk.csproj" />
Web/src/views/wcs/wcsDevice/component/editDialog.vue
@@ -15,7 +15,8 @@
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="PlcId" prop="plcId">
                            <el-select clearable filterable v-model="ruleForm.plcId" placeholder="请选择PlcId">
                                <el-option v-for="(item,index) in wcsPlcPlcIdDropdownList" :key="index" :value="item.value" :label="item.label" />
                                <el-option v-for="(item, index) in wcsPlcPlcIdDropdownList" :key="index"
                                    :value="item.value" :label="item.label" />
                                
                            </el-select>
                            
@@ -25,7 +26,9 @@
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="设备级别" prop="level">
                            <el-select clearable v-model="ruleForm.level" placeholder="请选择设备级别">
                                <el-option v-for="(item,index) in dl('DeviceLevelEnum')" :key="index" :value="Number(item.value)" :label="`${item.name} (${item.code}) [${item.value}]`"></el-option>
                                <el-option v-for="(item, index) in dl('DeviceLevelEnum')" :key="index"
                                    :value="Number(item.value)"
                                    :label="`${item.name} (${item.code}) [${item.value}]`"></el-option>
                                
                            </el-select>
                            
@@ -34,49 +37,60 @@
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="DB区域" prop="dbNumber">
                            <el-input v-model="ruleForm.dbNumber" placeholder="请输入DB区域" maxlength="10" show-word-limit clearable />
                            <el-input v-model="ruleForm.dbNumber" placeholder="请输入DB区域" maxlength="10" show-word-limit
                                clearable />
                            
                        </el-form-item>
                        
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="工位号" prop="stationNum">
                            <el-input v-model="ruleForm.stationNum" placeholder="请输入工位号" maxlength="4" show-word-limit clearable />
                            <el-input v-model="ruleForm.stationNum" placeholder="请输入工位号" maxlength="4" show-word-limit
                                clearable />
                            
                        </el-form-item>
                        
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="PLC偏移量" prop="plcPos">
                            <el-input v-model="ruleForm.plcPos" placeholder="请输入PLC偏移量" maxlength="10" show-word-limit clearable />
                            <el-input v-model="ruleForm.plcPos" placeholder="请输入PLC偏移量" maxlength="10" show-word-limit
                                clearable />
                            
                        </el-form-item>
                        
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="WCS偏移量" prop="wcsPos">
                            <el-input v-model="ruleForm.wcsPos" placeholder="请输入WCS偏移量" maxlength="10" show-word-limit clearable />
                            <el-input v-model="ruleForm.wcsPos" placeholder="请输入WCS偏移量" maxlength="10" show-word-limit
                                clearable />
                            
                        </el-form-item>
                        
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="流程字类型" prop="posType">
                            <el-input v-model="ruleForm.posType" placeholder="请输入流程字类型" maxlength="10" show-word-limit clearable />
                            <el-select clearable v-model="ruleForm.posType" placeholder="请选择流程字类型">
                                <el-option v-for="(item, index) in dl('PLCDataTypeEnum')" :key="index"
                                    :value="Number(item.value)"
                                    :label="`${item.name} (${item.code}) [${item.value}]`"></el-option>
                            </el-select>
                            
                        </el-form-item>
                        
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="显示屏ip地址" prop="ledIP">
                            <el-input v-model="ruleForm.ledIP" placeholder="请输入显示屏ip地址" maxlength="50" show-word-limit clearable />
                            <el-input v-model="ruleForm.ledIP" placeholder="请输入显示屏ip地址" maxlength="50" show-word-limit
                                clearable />
                            
                        </el-form-item>
                        
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="描述" prop="text">
                            <el-input v-model="ruleForm.text" placeholder="请输入描述" maxlength="20" show-word-limit clearable />
                            <el-input v-model="ruleForm.text" placeholder="请输入描述" maxlength="20" show-word-limit
                                clearable />
                            
                        </el-form-item>
                        
@@ -189,7 +203,3 @@
    //将属性或者函数暴露给父组件
    defineExpose({ openDialog });
</script>
Web/src/views/wcs/wcsDevice/index.vue
@@ -12,7 +12,8 @@
          <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10" v-if="showAdvanceQueryUI">
            <el-form-item label="PlcId">
              <el-select clearable="" filterable="" v-model="queryParams.plcId" placeholder="请选择PlcId">
                <el-option v-for="(item,index) in wcsPlcPlcIdDropdownList" :key="index" :value="item.value" :label="item.label" />
                <el-option v-for="(item, index) in wcsPlcPlcIdDropdownList" :key="index" :value="item.value"
                  :label="item.label" />
                
              </el-select>
              
@@ -27,11 +28,15 @@
          <el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="4" class="mb10">
            <el-form-item >
              <el-button-group style="display: flex; align-items: center;">
                <el-button type="primary"  icon="ele-Search" @click="handleQuery" v-auth="'wcsDevice:page'"> 查询 </el-button>
                <el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'wcsDevice:page'"> 查询
                </el-button>
                      <el-button icon="ele-Refresh" @click="() => queryParams = {}"> 重置 </el-button>
                        <el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> 高级查询 </el-button>
                        <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 隐藏 </el-button>
                <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddWcsDevice" v-auth="'wcsDevice:add'"> 新增 </el-button>
                <el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI"
                  style="margin-left:5px;"> 高级查询 </el-button>
                <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI"
                  style="margin-left:5px;"> 隐藏 </el-button>
                <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddWcsDevice"
                  v-auth="'wcsDevice:add'"> 新增 </el-button>
                
              </el-button-group>
            </el-form-item>
@@ -41,14 +46,8 @@
      </el-form>
    </el-card>
    <el-card class="full-table" shadow="hover" style="margin-top: 5px">
      <el-table
                :data="tableData"
                style="width: 100%"
                v-loading="loading"
                tooltip-effect="light"
                                row-key="id"
                @sort-change="sortChange"
                border="">
      <el-table :data="tableData" style="width: 100%" v-loading="loading" tooltip-effect="light" row-key="id"
        @sort-change="sortChange" border="">
        <el-table-column type="index" label="序号" width="55" align="center"/>
        <el-table-column prop="plcId" label="PlcId"  show-overflow-tooltip="">
          <template #default="scope">
@@ -59,14 +58,20 @@
        </el-table-column>
          <el-table-column prop="level" label="设备级别"  show-overflow-tooltip="" >
            <template #default="scope">
              <el-tag :type="dv('DeviceLevelEnum', scope.row.level)?.tagType"> {{dv('DeviceLevelEnum', scope.row.level)?.name}}</el-tag>
            <el-tag :type="dv('DeviceLevelEnum', scope.row.level)?.tagType"> {{ dv('DeviceLevelEnum',
              scope.row.level)?.name}}</el-tag>
            </template>
          </el-table-column>
        <el-table-column prop="dbNumber" label="DB区域"  show-overflow-tooltip="" />
        <el-table-column prop="stationNum" label="工位号"  show-overflow-tooltip="" />
        <el-table-column prop="plcPos" label="PLC偏移量"  show-overflow-tooltip="" />
        <el-table-column prop="wcsPos" label="WCS偏移量"  show-overflow-tooltip="" />
        <el-table-column prop="posType" label="流程字类型"  show-overflow-tooltip="" />
        <el-table-column prop="posType" label="流程字类型" show-overflow-tooltip="">
          <template #default="scope">
            <el-tag :type="dv('PLCDataTypeEnum', scope.row.posType)?.tagType"> {{ dv('PLCDataTypeEnum',
              scope.row.posType)?.name}}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="ledIP" label="显示屏ip地址"  show-overflow-tooltip="" />
        <el-table-column prop="text" label="描述"  show-overflow-tooltip="" />
        <el-table-column label="修改记录" width="80" align="center" show-overflow-tooltip>
@@ -74,33 +79,22 @@
            <ModifyRecord :data="scope.row" />
          </template>
        </el-table-column>
        <el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('wcsDevice:update') || auth('wcsDevice:delete')">
        <el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip=""
          v-if="auth('wcsDevice:update') || auth('wcsDevice:delete')">
          <template #default="scope">
            <el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditWcsDevice(scope.row)" v-auth="'wcsDevice:update'"> 编辑 </el-button>
            <el-button icon="ele-Delete" size="small" text="" type="primary" @click="delWcsDevice(scope.row)" v-auth="'wcsDevice:delete'"> 删除 </el-button>
            <el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditWcsDevice(scope.row)"
              v-auth="'wcsDevice:update'"> 编辑 </el-button>
            <el-button icon="ele-Delete" size="small" text="" type="primary" @click="delWcsDevice(scope.row)"
              v-auth="'wcsDevice:delete'"> 删除 </el-button>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
                v-model:currentPage="tableParams.page"
                v-model:page-size="tableParams.pageSize"
                :total="tableParams.total"
                :page-sizes="[10, 20, 50, 100, 200, 500]"
                size="small"
                background=""
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                layout="total, sizes, prev, pager, next, jumper"
    />
      <printDialog
        ref="printDialogRef"
        :title="printWcsDeviceTitle"
        @reloadTable="handleQuery" />
      <editDialog
        ref="editDialogRef"
        :title="editWcsDeviceTitle"
        @reloadTable="handleQuery"
      />
      <el-pagination v-model:currentPage="tableParams.page" v-model:page-size="tableParams.pageSize"
        :total="tableParams.total" :page-sizes="[10, 20, 50, 100, 200, 500]" size="small" background=""
        @size-change="handleSizeChange" @current-change="handleCurrentChange"
        layout="total, sizes, prev, pager, next, jumper" />
      <printDialog ref="printDialogRef" :title="printWcsDeviceTitle" @reloadTable="handleQuery" />
      <editDialog ref="editDialogRef" :title="editWcsDeviceTitle" @reloadTable="handleQuery" />
    </el-card>
  </div>
</template>
@@ -217,4 +211,3 @@
    width: 100%;
}
</style>
Web/src/views/wcs/wcsPlc/component/editDialog.vue
@@ -14,7 +14,20 @@
                    </el-form-item>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="PLCIP地址" prop="ip">
                            <el-input v-model="ruleForm.ip" placeholder="请输入PLCIP地址" maxlength="20" show-word-limit clearable />
                            <el-input v-model="ruleForm.ip" placeholder="请输入PLCIP地址" maxlength="20" show-word-limit
                                clearable />
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="PLC类型" prop="plcType">
                            <el-select clearable v-model="ruleForm.plcType" placeholder="请选择PLC类型">
                                <el-option v-for="(item, index) in dl('PLCEnum')" :key="index"
                                    :value="Number(item.value)"
                                    :label="`${item.name} (${item.code}) [${item.value}]`"></el-option>
                            </el-select>
                            
                        </el-form-item>
                        
@@ -22,7 +35,9 @@
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="设备类型" prop="type">
                            <el-select clearable v-model="ruleForm.type" placeholder="请选择设备类型">
                                <el-option v-for="(item,index) in dl('PLCTypeEnum')" :key="index" :value="Number(item.value)" :label="`${item.name} (${item.code}) [${item.value}]`"></el-option>
                                <el-option v-for="(item, index) in dl('PLCTypeEnum')" :key="index"
                                    :value="Number(item.value)"
                                    :label="`${item.name} (${item.code}) [${item.value}]`"></el-option>
                                
                            </el-select>
                            
@@ -31,14 +46,16 @@
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="仓库号" prop="wareHouseNo">
                            <el-input v-model="ruleForm.wareHouseNo" placeholder="请输入仓库号" maxlength="20" show-word-limit clearable />
                            <el-input v-model="ruleForm.wareHouseNo" placeholder="请输入仓库号" maxlength="20" show-word-limit
                                clearable />
                            
                        </el-form-item>
                        
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="描述" prop="text">
                            <el-input v-model="ruleForm.text" placeholder="请输入描述" maxlength="100" show-word-limit clearable />
                            <el-input v-model="ruleForm.text" placeholder="请输入描述" maxlength="100" show-word-limit
                                clearable />
                            
                        </el-form-item>
                        
@@ -143,7 +160,3 @@
    //将属性或者函数暴露给父组件
    defineExpose({ openDialog });
</script>
Web/src/views/wcs/wcsPlc/index.vue
@@ -16,9 +16,20 @@
            </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="PLC类型">
              <el-select clearable="" v-model="queryParams.plcType" placeholder="请选择PLC类型">
                <el-option v-for="(item, index) in dl('PLCEnum')" :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-select clearable="" v-model="queryParams.type" placeholder="请选择设备类型">
                <el-option v-for="(item,index) in dl('PLCTypeEnum')" :key="index" :value="item.value" :label="`${item.name} (${item.code}) [${item.value}] `" />
                <el-option v-for="(item, index) in dl('PLCTypeEnum')" :key="index" :value="item.value"
                  :label="`${item.name} (${item.code}) [${item.value}] `" />
                
              </el-select>
              
@@ -29,9 +40,12 @@
              <el-button-group style="display: flex; align-items: center;">
                <el-button type="primary"  icon="ele-Search" @click="handleQuery" v-auth="'wcsPlc:page'"> 查询 </el-button>
                      <el-button icon="ele-Refresh" @click="() => queryParams = {}"> 重置 </el-button>
                        <el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI" style="margin-left:5px;"> 高级查询 </el-button>
                        <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI" style="margin-left:5px;"> 隐藏 </el-button>
                <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddWcsPlc" v-auth="'wcsPlc:add'"> 新增 </el-button>
                <el-button icon="ele-ZoomIn" @click="changeAdvanceQueryUI" v-if="!showAdvanceQueryUI"
                  style="margin-left:5px;"> 高级查询 </el-button>
                <el-button icon="ele-ZoomOut" @click="changeAdvanceQueryUI" v-if="showAdvanceQueryUI"
                  style="margin-left:5px;"> 隐藏 </el-button>
                <el-button type="primary" style="margin-left:5px;" icon="ele-Plus" @click="openAddWcsPlc"
                  v-auth="'wcsPlc:add'"> 新增 </el-button>
                
              </el-button-group>
            </el-form-item>
@@ -41,19 +55,20 @@
      </el-form>
    </el-card>
    <el-card class="full-table" shadow="hover" style="margin-top: 5px">
      <el-table
                :data="tableData"
                style="width: 100%"
                v-loading="loading"
                tooltip-effect="light"
                                row-key="id"
                @sort-change="sortChange"
                border="">
      <el-table :data="tableData" style="width: 100%" v-loading="loading" tooltip-effect="light" row-key="id"
        @sort-change="sortChange" border="">
        <el-table-column type="index" label="序号" width="55" align="center"/>
        <el-table-column prop="ip" label="PLCIP地址"  show-overflow-tooltip="" />
        <el-table-column prop="plcType" label="PLC类型" show-overflow-tooltip="">
          <template #default="scope">
            <el-tag :type="dv('PLCEnum', scope.row.plcType)?.tagType"> {{ dv('PLCEnum',
              scope.row.plcType)?.name}}</el-tag>
          </template>
        </el-table-column>
          <el-table-column prop="type" label="设备类型"  show-overflow-tooltip="" >
            <template #default="scope">
              <el-tag :type="dv('PLCTypeEnum', scope.row.type)?.tagType"> {{dv('PLCTypeEnum', scope.row.type)?.name}}</el-tag>
            <el-tag :type="dv('PLCTypeEnum', scope.row.type)?.tagType"> {{ dv('PLCTypeEnum',
              scope.row.type)?.name }}</el-tag>
            </template>
          </el-table-column>
        <el-table-column prop="wareHouseNo" label="仓库号"  show-overflow-tooltip="" />
@@ -63,33 +78,22 @@
            <ModifyRecord :data="scope.row" />
          </template>
        </el-table-column>
        <el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip="" v-if="auth('wcsPlc:update') || auth('wcsPlc:delete')">
        <el-table-column label="操作" width="140" align="center" fixed="right" show-overflow-tooltip=""
          v-if="auth('wcsPlc:update') || auth('wcsPlc:delete')">
          <template #default="scope">
            <el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditWcsPlc(scope.row)" v-auth="'wcsPlc:update'"> 编辑 </el-button>
            <el-button icon="ele-Delete" size="small" text="" type="primary" @click="delWcsPlc(scope.row)" v-auth="'wcsPlc:delete'"> 删除 </el-button>
            <el-button icon="ele-Edit" size="small" text="" type="primary" @click="openEditWcsPlc(scope.row)"
              v-auth="'wcsPlc:update'"> 编辑 </el-button>
            <el-button icon="ele-Delete" size="small" text="" type="primary" @click="delWcsPlc(scope.row)"
              v-auth="'wcsPlc:delete'"> 删除 </el-button>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
                v-model:currentPage="tableParams.page"
                v-model:page-size="tableParams.pageSize"
                :total="tableParams.total"
                :page-sizes="[10, 20, 50, 100, 200, 500]"
                size="small"
                background=""
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                layout="total, sizes, prev, pager, next, jumper"
    />
      <printDialog
        ref="printDialogRef"
        :title="printWcsPlcTitle"
        @reloadTable="handleQuery" />
      <editDialog
        ref="editDialogRef"
        :title="editWcsPlcTitle"
        @reloadTable="handleQuery"
      />
      <el-pagination v-model:currentPage="tableParams.page" v-model:page-size="tableParams.pageSize"
        :total="tableParams.total" :page-sizes="[10, 20, 50, 100, 200, 500]" size="small" background=""
        @size-change="handleSizeChange" @current-change="handleCurrentChange"
        layout="total, sizes, prev, pager, next, jumper" />
      <printDialog ref="printDialogRef" :title="printWcsPlcTitle" @reloadTable="handleQuery" />
      <editDialog ref="editDialogRef" :title="editWcsPlcTitle" @reloadTable="handleQuery" />
    </el-card>
  </div>
</template>
@@ -200,4 +204,3 @@
    width: 100%;
}
</style>
Web/src/views/wcs/wcsStation/component/editDialog.vue
@@ -38,7 +38,10 @@
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="流程字类型" prop="posType">
                            <el-input v-model="ruleForm.posType" placeholder="请输入流程字类型" maxlength="10" show-word-limit clearable />
                            <el-select clearable v-model="ruleForm.posType" placeholder="请选择流程字类型">
                                <el-option v-for="(item,index) in dl('PLCDataTypeEnum')" :key="index" :value="Number(item.value)" :label="`${item.name} (${item.code}) [${item.value}]`"></el-option>
                            </el-select>
                            
                        </el-form-item>
                        
@@ -80,7 +83,7 @@
    import type { FormRules } from "element-plus";
    import { addWcsStation, updateWcsStation, detailWcsStation } from "/@/api/wcs/wcsStation";
    import { getWcsDeviceDeviceIdDropdown } from '/@/api/wcs/wcsStation';
    import { getDictDataItem as di, getDictDataList as dl } from '/@/utils/dict-utils';
    //父级传递来的参数
    var props = defineProps({
        title: {
Web/src/views/wcs/wcsStation/index.vue
@@ -57,8 +57,13 @@
        </el-table-column>
        <el-table-column prop="stationNum" label="工位号" show-overflow-tooltip="" />
        <el-table-column prop="plcPos" label="偏移量" show-overflow-tooltip="" />
        <el-table-column prop="posType" label="流程字类型" show-overflow-tooltip="" />
        <el-table-column prop="plcPos" label="偏移量" show-overflow-tooltip="" /> <el-table-column prop="posType"
          label="流程字类型" show-overflow-tooltip="">
          <template #default="scope">
            <el-tag :type="dv('PLCDataTypeEnum', scope.row.posType)?.tagType"> {{ dv('PLCDataTypeEnum',
              scope.row.posType)?.name}}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="ledIP" label="显示屏ip地址" show-overflow-tooltip="" />
        <el-table-column prop="text" label="描述" show-overflow-tooltip="" />
        <el-table-column label="修改记录" width="80" align="center" show-overflow-tooltip>
@@ -90,7 +95,7 @@
import { ref } from "vue";
import { ElMessageBox, ElMessage } from "element-plus";
import { auth } from '/@/utils/authFunction';
import { getDictLabelByVal as dv } from '/@/utils/dict-utils';
import ModifyRecord from '/@/components/table/modifyRecord.vue';
import printDialog from '/@/views/system/print/component/hiprint/preview.vue'