| ¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | // this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | } |
| | | } |
| | | }; |
| | | export default extension; |
| | |
| | | path: '/task', |
| | | name: 'task', |
| | | component: () => import('@/views/taskinfo/task.vue') |
| | | }, { |
| | | }, { |
| | | path: '/task_Hty', |
| | | name: 'task_Hty', |
| | | component: () => import('@/views/taskinfo/task_Hty.vue') |
| | | },{ |
| | | }, { |
| | | path: '/router', |
| | | name: 'router', |
| | | component: () => import('@/views/basicinfo/router.vue') |
| | |
| | | meta: { |
| | | keepAlive: false |
| | | } |
| | | |
| | | }, |
| | | { |
| | | path: '/StationManager', |
| | | name: 'StationManager', |
| | | component: () => import('@/views/basicinfo/Dt_StationManager.vue'), |
| | | meta: { |
| | | keepAlive: false |
| | | } |
| | | |
| | | }, |
| | | ] |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | *Authorï¼jxx |
| | | *Contactï¼283591387@qq.com |
| | | *代ç ç±æ¡æ¶çæ,任使´æ¹é½å¯è½å¯¼è´è¢«ä»£ç çæå¨è¦ç |
| | | *ä¸å¡è¯·å¨@/extension/widesea_wms/basicinfo/Dt_AreaInfo.jsæ¤å¤ç¼å |
| | | --> |
| | | <template> |
| | | <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions" |
| | | :table="table" :extend="extend"> |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/basicinfo/Dt_StationManager.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: 'stationID', |
| | | footer: "Foots", |
| | | cnName: 'ç«å°ç®¡ç', |
| | | name: 'basicinfo/StationManager', |
| | | url: "/StationManager/", |
| | | sortName: "stationID" |
| | | }); |
| | | const editFormFields = ref({ |
| | | stationID:"", |
| | | stationType:"", |
| | | stationPLC:"", |
| | | roadway:"", |
| | | stationStatus:"", |
| | | stationRemark:"", |
| | | stationChildCode:"", |
| | | stationArea:"", |
| | | stationLocation:"", |
| | | stationStatus:"", |
| | | stationEquipMES:"", |
| | | stationModel:"", |
| | | stationTCLocation:"" |
| | | }); |
| | | |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { "title": "ç«å°ç¶æ", "field": "stationStatus", type: "select",dataKey: "enanleEnum",data: [], }, |
| | | |
| | | ] |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | // "iD":"", |
| | | // "toArea": "", |
| | | // "fromArea": "", |
| | | // "barcodeType": "", |
| | | // "productLine": "", |
| | | // "inLineNum": "", |
| | | // "cacheNum":"" |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { "title": "ç«å°ç±»å", "field": "stationType", type: "text" }, |
| | | { "title": "å··é", "field": "roadway", type: "text" }, |
| | | { "title": "ç«å°åºå", "field": "stationArea", type: "text" }, |
| | | ] |
| | | // , |
| | | // [ |
| | | // { "title": "ç«å°èç¹", "field": "stationChildCode", type: "text" }, |
| | | // { "title": "å¨éæ°é", "field": "inLineNum", type: "text" }, |
| | | // { "title": "å¯ç¼åæ°é", "field": "cacheNum", type: "text" }, |
| | | // ] |
| | | ]); |
| | | const columns = ref([{ field: 'stationID', title: '主é®', type: 'int', sort: true, hidden: true, width: 110, readonly: true, require: true, align: 'left' }, |
| | | { field: 'stationType', title: 'ç«å°ç±»å', type: 'int', sort: true, width: 110, require: true, align: 'left', sort: true }, |
| | | { field: 'stationPLC', title: 'ç«å°PLC', type: 'string', sort: true, width: 110, align: 'left' }, |
| | | { field: 'roadway', title: 'å··é', type: 'string', sort: true, width: 110, align: 'left' }, |
| | | { field: 'stationStatus', title: 'ç«å°ç¶æ', type: 'string', sort: true, width: 110, align: 'left', bind: { key: "enanleEnum", data: [] }}, |
| | | { field: 'stationRemark', title: 'ç«å°å¤æ³¨', type: 'string', sort: true, width: 110, align: 'left', }, |
| | | { field: 'stationChildCode', title: 'ç«å°èç¹', type: 'int', sort: true, width: 110, align: 'left' }, |
| | | { field: 'stationArea', title: 'ç«å°åºå', type: 'int', sort: true, width: 100, align: 'left' }, |
| | | { field: 'stationLocation', title: 'å åæºå°å', type: 'int', sort: true, width: 100, align: 'left' }, |
| | | { field: 'creater', title: 'å建人', type: 'string', sort: true, width: 110, align: 'left' }, |
| | | { field: 'createDate', title: 'å建æ¶é´', type: 'datetime', sort: true, width: 150, align: 'left', sort: true }, |
| | | { field: 'modifier', title: 'ä¿®æ¹äºº', type: 'string', sort: true, width: 100, align: 'left' }, |
| | | { field: 'modifyDate', title: 'ä¿®æ¹æ¶é´', type: 'datetime', sort: true, width: 150, align: 'left', sort: true }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "#detailTable", |
| | | columns: [], |
| | | sortName: "", |
| | | key: "" |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_Common.TaskEnum |
| | | { |
| | | public enum EnanleEnum |
| | | { |
| | | /// <summary> |
| | | /// å¯ç¨ |
| | | /// </summary> |
| | | [Description("å¯ç¨")] |
| | | Enanle = 1, |
| | | |
| | | /// <summary> |
| | | /// ç¦ç¨ |
| | | /// </summary> |
| | | [Description("ç¦ç¨")] |
| | | Disable =0 |
| | | } |
| | | } |
| | |
| | | if (sugarColumn == null) |
| | | return "请é
ç½®SugarColumn屿§"; |
| | | //忽ç¥ä¸ä¸»é®çåæ®µä¸åéªè¯ |
| | | if (property.Name.ToUpper() == keyName.ToUpper() || (ignoreFields != null && ignoreFields.Contains(property.Name)) || sugarColumn.IsOnlyIgnoreInsert || sugarColumn.IsOnlyIgnoreUpdate || sugarColumn.IsIgnore) |
| | | if (property.Name == keyName.FirstLetterToLower() || (ignoreFields != null && ignoreFields.Contains(property.Name)) || sugarColumn.IsOnlyIgnoreInsert || sugarColumn.IsOnlyIgnoreUpdate || sugarColumn.IsIgnore) |
| | | continue; |
| | | |
| | | //ä¸å¨ç¼è¾ä¸çåï¼æ¯å¦ä¹è¦å¿
å¡« |
| | | if (!dic.ContainsKey(property.Name.ToUpper())) |
| | | if (!dic.ContainsKey(property.Name.FirstLetterToLower())) |
| | | { |
| | | if (!sugarColumn.IsNullable) |
| | | { |
| | |
| | | } |
| | | continue; |
| | | } |
| | | if(dic[property.Name.ToUpper()] != null) |
| | | if(dic[property.Name.FirstLetterToLower()] != null) |
| | | { |
| | | string str = dic[property.Name.ToUpper()].ToString(); |
| | | string str = dic[property.Name.FirstLetterToLower()].ToString(); |
| | | //å°ææç©ºå¼è®¾ç½®ä¸ºnull |
| | | if (str == string.Empty) |
| | | dic[property.Name.ToUpper()] = null; |
| | | dic[property.Name.FirstLetterToLower()] = null; |
| | | } |
| | | |
| | | } |
| | |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "横移æºéå£")] |
| | | public string stationTCLocation { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å¯ç¨ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å¯ç¨ç¶æ")] |
| | | public string stationStatus { get; set; } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.DataProtection.KeyManagement; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime; |
| | | using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; |
| | | using Quartz.Util; |
| | | using SqlSugar; |
| | | using System.ComponentModel; |
| | | using System.Reflection; |
| | | using WIDESEAWCS_BasicInfoService; |
| | | using WIDESEAWCS_Common; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.BaseController; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_DTO.BasicInfo; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob.Models; |
| | | using WIDESEAWCS_QuartzJob.Repository; |
| | | using WIDESEAWCS_QuartzJob.Service; |
| | | |
| | | namespace WIDESEAWCS_Server.Controllers.BasicInfo |
| | | { |
| | | [Route("api/StationManager")] |
| | | [ApiController] |
| | | public class StationManagerController : ApiBaseController<IDt_StationManagerService, Dt_StationManager> |
| | | { |
| | | public StationManagerController(IDt_StationManagerService service) : base(service) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | case "enanleEnum": |
| | | { |
| | | List<object> data = new List<object>(); |
| | | Type type = typeof(EnanleEnum); |
| | | List<int> enums = Enum.GetValues(typeof(EnanleEnum)).Cast<int>().ToList(); |
| | | int index = 0; |
| | | foreach (var item in enums) |
| | | { |
| | | FieldInfo? fieldInfo = typeof(EnanleEnum).GetField(((EnanleEnum)item).ToString()); |
| | | DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>(); |
| | | if (description != null) |
| | | { |
| | | data.Add(new { key = item.ToString(), value = description.Description }); |
| | | } |
| | | else |
| | | { |
| | | data.Add(new { key = item.ToString(), value = item.ToString() }); |
| | | } |
| | | index++; |
| | | } |
| | | |
| | | result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data }; |
| | | } |
| | | break; |
| | | } |
| | | return result; |
| | | } |
| | |
| | | "Microsoft.AspNetCore": "Warning" |
| | | } |
| | | }, |
| | | "dics": "deviceType,devicePlcType,jobAssembly,jobClassName,deviceStatus,taskType,taskState,inOutType", |
| | | "dics": "deviceType,devicePlcType,jobAssembly,jobClassName,deviceStatus,taskType,taskState,inOutType,enanleEnum", |
| | | "AllowedHosts": "*", |
| | | "ConnectionStringsEncryption": false, |
| | | "MainDB": "DB_WIDESEA", //å½å项ç®ç主åºï¼æå¯¹åºçè¿æ¥å符串çEnabledå¿
须为true |
| | |
| | | //"ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCS2F08;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=True", |
| | | //"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WCSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | |
| | | "ConnectionString": "Data Source=.\\LIULEI;Initial Catalog=LP_WIDESEAWCS;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=.;Initial Catalog=LP_WIDESEAWCS;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | |
| | | //"ConnectionString": "Data Source=.;Initial Catalog=ZCLDY_WIDESEAWCS;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=.\\LIULEI;Initial Catalog=MX_LDY_WCS;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |