From 5e851678cc02257bbbd179446de36082430ca5bc Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期一, 13 四月 2026 15:12:04 +0800
Subject: [PATCH] feat(MES): 添加Mes_Log扩展逻辑

---
 Code/WMS/WIDESEA_WMSClient/src/views/system/Mes_Log.vue |  149 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 149 insertions(+), 0 deletions(-)

diff --git a/Code/WMS/WIDESEA_WMSClient/src/views/system/Mes_Log.vue b/Code/WMS/WIDESEA_WMSClient/src/views/system/Mes_Log.vue
new file mode 100644
index 0000000..f74319b
--- /dev/null
+++ b/Code/WMS/WIDESEA_WMSClient/src/views/system/Mes_Log.vue
@@ -0,0 +1,149 @@
+<!--
+*Author锛歋ystem
+ *Contact锛�-
+ *浠g爜鐢辨鏋剁敓鎴�,浠讳綍鏇存敼閮藉彲鑳藉鑷磋浠g爜鐢熸垚鍣ㄨ鐩�
+ *涓氬姟璇峰湪@/extension/system/Mes_Log.jsx姝ゅ缂栧啓
+ -->
+<template>
+  <div class="mes-log-page">
+    <!-- 缁熻鍗$墖鍖哄煙 -->
+    <mes-log-statistics ref="statistics" />
+
+    <!-- 鏃ュ織鍒楄〃 -->
+    <view-grid
+      ref="grid"
+      :columns="columns"
+      :detail="detail"
+      :editFormFields="editFormFields"
+      :editFormOptions="editFormOptions"
+      :searchFormFields="searchFormFields"
+      :searchFormOptions="searchFormOptions"
+      :table="table"
+      :extend="extend"
+    />
+  </div>
+</template>
+
+<script>
+import extend from "@/extension/system/Mes_Log.jsx";
+import MesLogStatistics from "@/components/MesLogStatistics.vue";
+import { ref, defineComponent } from "vue";
+
+export default defineComponent({
+  name: "Mes_Log",
+  components: {
+    MesLogStatistics
+  },
+  setup() {
+    const table = ref({
+      key: "Id",
+      cnName: "MES鎺ュ彛鏃ュ織",
+      name: "Mes_Log",
+      url: "/MesLog/",
+      sortName: "Id"
+    });
+
+    const columns = ref([
+      { field: "id", title: "ID", width: 80, hidden: true },
+      {
+        field: "apiType",
+        title: "鎺ュ彛绫诲瀷",
+        width: 130,
+        bind: { key: "mesApiType", data: [] }
+      },
+      {
+        field: "isSuccess",
+        title: "鐘舵��",
+        width: 80,
+        bind: { key: "mesApiStatus", data: [] }
+      },
+      {
+        field: "requestJson",
+        title: "璇锋眰鍐呭",
+        width: 200,
+        formatter: (row) => {
+          if (!row.requestJson) return '-';
+          const preview = row.requestJson.length > 50
+            ? row.requestJson.substring(0, 50) + '...'
+            : row.requestJson;
+          return `<span style="color: #409EFF; cursor: pointer;">${preview}</span>`;
+        }
+      },
+      {
+        field: "responseJson",
+        title: "鍝嶅簲鍐呭",
+        width: 200,
+        formatter: (row) => {
+          if (!row.responseJson) return '-';
+          const preview = row.responseJson.length > 50
+            ? row.responseJson.substring(0, 50) + '...'
+            : row.responseJson;
+          return `<span style="color: #409EFF; cursor: pointer;">${preview}</span>`;
+        }
+      },
+      { field: "errorMessage", title: "閿欒淇℃伅", width: 250 },
+      { field: "elapsedMs", title: "鑰楁椂(ms)", width: 100, sortable: true },
+      { field: "createDate", title: "璋冪敤鏃堕棿", width: 160, sortable: true },
+      { field: "creator", title: "鎿嶄綔浜�", width: 100 }
+    ]);
+
+    const detail = ref({
+      cnName: "MES鏃ュ織璇︽儏",
+      columns: [],
+      sortName: "Id",
+      key: "Id"
+    });
+
+    const editFormFields = ref({});
+    const editFormOptions = ref([]);
+
+    const searchFormFields = ref({
+      apiType: "",
+      isSuccess: "",
+      dateRange: "",
+      creator: "",
+      elapsedRange: "",
+      errorKeyword: "",
+      jsonKeyword: ""
+    });
+
+    const searchFormOptions = ref([
+      [
+        { field: "apiType", title: "鎺ュ彛绫诲瀷", type: "select",dataKey: "mesApiType", data: [] },
+        { field: "isSuccess", title: "鐘舵��", type: "select" ,dataKey: "mesApiStatus", data: []},
+        { field: "dateRange", title: "鏃堕棿鑼冨洿", type: "datetimeRange" }
+      ],
+      [
+        { field: "creator", title: "鎿嶄綔浜�", type: "text" },
+        {
+          field: "elapsedRange",
+          title: "鑰楁椂鑼冨洿(ms)",
+          type: "numberRange",
+          placeholder: ["鏈�灏�", "鏈�澶�"]
+        }
+      ],
+      [
+        { field: "errorKeyword", title: "閿欒鍏抽敭瀛�", type: "text" },
+        { field: "jsonKeyword", title: "JSON鍐呭鍏抽敭瀛�", type: "text" }
+      ]
+    ]);
+
+    return {
+      table,
+      columns,
+      detail,
+      editFormFields,
+      editFormOptions,
+      searchFormFields,
+      searchFormOptions,
+      extend
+    };
+  }
+});
+</script>
+
+<style scoped>
+.mes-log-page {
+  padding: 16px;
+}
+</style>

--
Gitblit v1.9.3