hutongqing
2024-11-27 553dfb0714e78ca05a62fcf352cc1da2c0be5b70
更新

1、添加前端强制完成按钮
2、修改字典数据缓存问题
已修改10个文件
已添加5个文件
278 ■■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Client/config/buttons.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Client/src/views/basic/locationInfo.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Client/src/views/quartzJob/deviceInfo.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Client/src/views/quartzJob/deviceProtocol.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Client/src/views/system/Sys_Log.vue 213 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/05ffa60e-9142-41b3-9d1d-6208c682ca6c.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/71c48791-3b71-4064-86d1-e13fb205685c.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/7a1458f8-0596-42c0-8957-d12b8cc9fbca.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ba596010-9901-42ab-9692-7e16dab54f48.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c3887a9d-f738-4fa1-b9b8-dcb27de764cc.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/System/VueDictionaryDTO.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Client/config/buttons.js
@@ -42,7 +42,7 @@
    }
},
{
    name: "任务完成",
    name: "任务强制完成",
    icon: '',
    class: '',
    value: 'TaskCompleted',
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.js
@@ -19,6 +19,21 @@
        onInit() {
            // this.$Notice.success({ title: this.detailOptions.cnName + ',查询结果', desc: '返回的对象:' + JSON.stringify(data) });
            var forceCompleteTaskButton = this.buttons.find((x) => x.value == "TaskCompleted");
            if (forceCompleteTaskButton) {
                forceCompleteTaskButton.onClick = () => {
                    let rows = this.$refs.table.getSelected();
                    if (rows.length == 0 || rows.length > 1) return this.$error("请选择一行数据");
                    this.http
                        .post("/api/Task/ForceCompleteTask?taskNum=" + rows[0].TaskNum, {}, true)
                        .then((x) => {
                            if (!x.status) return this.$message.error(x.message);
                            this.options = x.data;
                            console.log(this.options);
                        });
                }
            }
            var previousButton = this.buttons.find((x) => x.value == "Previous");
            if (previousButton) previousButton.hidden = true;
            var nextButton = this.buttons.find((x) => x.value == "Next");
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Client/src/views/basic/locationInfo.vue
@@ -69,32 +69,23 @@
          required: true,
          field: "locationType",
          type: "select",
          dataKey:"",
          data:[
            {key:1,value:'正常货位'},
            {key:2,value:'暂存位'},
            {key:3,value:'提升机'},
            {key:4,value:'输送线'},
            {key:5,value:'组立机'},
          ]
          dataKey: "locationTypeEnum",
          data: [],
        },
         {
        {
          title: "禁用状态",
          required: true,
          field: "enableStatus",
          type: "select",
          dataKey:"",
          data:[
            {key:0,value:'正常'},
            {key:1,value:'禁用'},
          ]
          dataKey: "enableStatusEnum",
          data: [],
        },
        {
          title: "区域主键",
          required: true,
          field: "areaId",
          type: "string",
          hidden:true,
          hidden: true,
        },
        // {
        //   title: "巷道编号",
@@ -118,7 +109,7 @@
          dataKey: "locationTypeEnum",
          data: [],
        },
         {
        {
          title: "货位状态",
          field: "locationStatus",
          type: "selectList",
@@ -143,12 +134,12 @@
        title: "区域主键",
        type: "string",
        width: 90,
        hidden:true,
        hidden: true,
        align: "left",
        bind: {
          key: "areainfo",
          data: []
        }
          data: [],
        },
      },
      {
        field: "locationCode",
@@ -209,7 +200,7 @@
        type: "string",
        width: 120,
        align: "left",
        bind:{key: "locationTypeEnum", data: []}
        bind: { key: "locationTypeEnum", data: [] },
      },
      {
        field: "locationStatus",
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Client/src/views/quartzJob/deviceInfo.vue
@@ -131,6 +131,7 @@
        type: "string",
        width: 90,
        align: "left",
        sort: true,
      },
      {
        field: "deviceName",
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Client/src/views/quartzJob/deviceProtocol.vue
@@ -120,6 +120,7 @@
        type: "string",
        width: 150,
        align: "left",
        sort: true
      },
      {
        field: "deviceProDataBlock",
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Client/src/views/system/Sys_Log.vue
@@ -4,67 +4,156 @@
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/Sys_Log.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
 <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/system/Sys_Log.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '系统日志',
                name: 'Sys_Log',
                url: "/Sys_Log/",
                sortName: "Id"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"BeginDate":"","Url":"","LogType":[],"Success":[],"UserIP":"","ServiceIP":"","Role_Id":""});
            const searchFormOptions = ref([[{"title":"请求地址","field":"Url","type":"text"},{"title":"用户IP","field":"UserIP","type":"text"},{"title":"服务器IP","field":"ServiceIP","type":"text"}],[{"title":"开始时间","field":"BeginDate","type":"datetime"},{"dataKey":"restatus","data":[],"title":"响应状态","field":"Success","type":"selectList"},{"dataKey":"roles","data":[],"title":"角色ID","field":"Role_Id","type":"select"}],[{"dataKey":"log","data":[],"title":"日志类型","field":"LogType","colSize":12,"type":"checkbox"}]]);
            const columns = ref([{field:'Id',title:'Id',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'BeginDate',title:'开始时间',type:'datetime',width:140,align:'left',sortable:true},
                       {field:'UserName',title:'用户名称',type:'string',width:90,align:'left'},
                       {field:'Url',title:'请求地址',type:'string',width:110,align:'left'},
                       {field:'LogType',title:'日志类型',type:'string',bind:{ key:'log',data:[]},width:80,align:'left'},
                       {field:'Success',title:'响应状态',type:'int',bind:{ key:'restatus',data:[]},width:80,align:'left'},
                       {field:'ElapsedTime',title:'时长',type:'int',width:60,align:'left'},
                       {field:'RequestParameter',title:'请求参数',type:'string',width:70,align:'left'},
                       {field:'ResponseParameter',title:'响应参数',type:'string',width:70,align:'left'},
                       {field:'ExceptionInfo',title:'异常信息',type:'string',width:70,align:'left'},
                       {field:'UserIP',title:'用户IP',type:'string',width:90,align:'left'},
                       {field:'ServiceIP',title:'服务器IP',type:'string',width:90,hidden:true,align:'left'},
                       {field:'BrowserType',title:'浏览器类型',type:'string',width:90,align:'left'},
                       {field:'User_Id',title:'用户ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'Role_Id',title:'角色ID',type:'int',bind:{ key:'roles',data:[]},width:90,hidden:true,align:'left'},
                       {field:'EndDate',title:'结束时间',type:'datetime',width:150,hidden:true,align:'left',sortable:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
  </template>
  <script>
  import extend from "@/extension/system/Sys_Log.js";
  import { ref, defineComponent } from "vue";
  export default defineComponent({
    setup() {
      const table = ref({
        key: "Id",
        footer: "Foots",
        cnName: "系统日志",
        name: "Sys_Log",
        url: "/Sys_Log/",
        sortName: "Id",
      });
      const editFormFields = ref({});
      const editFormOptions = ref([]);
      const searchFormFields = ref({
        BeginDate: "",
        Url: "",
        LogType: [],
        Success: [],
        UserIP: "",
        ServiceIP: "",
        Role_Id: "",
      });
      const searchFormOptions = ref([
        [
          { title: "请求地址", field: "url", type: "like" },
          { title: "用户IP", field: "userIP", type: "like" },
          { title: "开始时间", field: "beginDate", type: "datetime" },
        ],
      ]);
      const columns = ref([
        {
          field: "id",
          title: "Id",
          type: "int",
          width: 90,
          hidden: true,
          readonly: true,
          require: true,
          align: "left",
        },
    });
</script>
        {
          field: "beginDate",
          title: "开始时间",
          type: "datetime",
          width: 140,
          align: "left",
          sortable: true,
        },
        {
          field: "endDate",
          title: "结束时间",
          type: "datetime",
          width: 150,
          hidden: true,
          align: "left",
          sortable: true,
        },
        {
          field: "elapsedTime",
          title: "时长",
          type: "int",
          width: 60,
          align: "left",
        },
        {
          field: "userName",
          title: "用户名称",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "url",
          title: "请求地址",
          type: "string",
          width: 110,
          align: "left",
        },
        {
          field: "success",
          title: "响应状态",
          type: "int",
          bind: { key: "restatus", data: [] },
          width: 80,
          align: "left",
          hidden: true
        },
        {
          field: "requestParam",
          title: "请求参数",
          type: "string",
          width: 70,
          align: "left",
        },
        {
          field: "responseParam",
          title: "响应参数",
          type: "string",
          width: 70,
          align: "left",
        },
        {
          field: "userIP",
          title: "用户IP",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "userId",
          title: "用户ID",
          type: "int",
          width: 90,
          hidden: true,
          align: "left",
        },
      ]);
      const detail = ref({
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: "",
      });
      return {
        table,
        extend,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
      };
    },
  });
  </script>
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/05ffa60e-9142-41b3-9d1d-6208c682ca6c.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/71c48791-3b71-4064-86d1-e13fb205685c.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/7a1458f8-0596-42c0-8957-d12b8cc9fbca.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ba596010-9901-42ab-9692-7e16dab54f48.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c3887a9d-f738-4fa1-b9b8-dcb27de764cc.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/System/VueDictionaryDTO.cs
@@ -12,6 +12,8 @@
        public string Config { get; set; }
        public object Data {  get; set; }
        public object Data { get; set; }
        public bool SaveCache { get; set; } = true;
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/System/Sys_DictionaryController.cs
@@ -89,7 +89,7 @@
                            if (vueDictionaryDTO != null)
                            {
                                vueDictionaryDTOs.Add(vueDictionaryDTO);
                                if (!_cacheService.Exists(item))
                                if (!_cacheService.Exists(item) && vueDictionaryDTO.SaveCache)
                                {
                                    _cacheService.Add(item, vueDictionaryDTO.Serialize());
                                }
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -12,8 +12,8 @@
  "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true
  //连接字符串
  "ConnectionString": "Data Source=10.0.250.20;Initial Catalog=WIDESEAWCS_GD;User ID=sa;Password=STC@123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEAWCS_GD;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=10.0.250.20;Initial Catalog=WIDESEAWCS_GD;User ID=sa;Password=STC@123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEAWCS_GUODIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //跨域
  "Cors": {
    "PolicyName": "CorsIpAccess", //策略名称
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_SystemServices/Sys_DictionaryService.cs
@@ -76,14 +76,15 @@
                        {
                            Config = v.Config,
                            DicNo = v.DicNo,
                            Data = BaseDal.QueryDynamicDataBySql(v.DBSql)
                            Data = BaseDal.QueryDynamicDataBySql(v.DBSql),
                            SaveCache = false,
                        });
                    }
                }
                foreach (var item in selectDics)
                {
                    if (!_cacheService.Exists(item.DicNo))
                    if (!_cacheService.Exists(item.DicNo) && item.SaveCache)
                    {
                        _cacheService.Add(item.DicNo, item.Serialize());
                    }