From 69b6a366bf2d6d698346d2c008af876ea5a81883 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 28 一月 2026 10:27:53 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 admin/src/components/business/OperaInterfaceLogWindow.vue |  102 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 102 insertions(+), 0 deletions(-)

diff --git a/admin/src/components/business/OperaInterfaceLogWindow.vue b/admin/src/components/business/OperaInterfaceLogWindow.vue
new file mode 100644
index 0000000..1533647
--- /dev/null
+++ b/admin/src/components/business/OperaInterfaceLogWindow.vue
@@ -0,0 +1,102 @@
+<template>
+    <el-dialog
+        :title="title"
+        width="60%"
+        :withFooter="false"
+        :visible.sync="visible"
+        :confirm-working="isWorking"
+        append-to-body
+        @confirm="confirm"
+    >
+      <div class="codeEditBox">
+        <json-viewer
+            :value="form.formatContent"
+            :expand-depth="5"
+            copyable
+            boxed
+            :expanded="false"
+            @copied="copyText"
+            sort
+            :show-array-index="false"
+            class="w-100%">
+          <template slot="copy">
+            <i class="el-icon-document-copy" title="澶嶅埗">澶嶅埗浠g爜</i>
+          </template>
+        </json-viewer>
+      </div>
+    </el-dialog>
+</template>
+
+<script>
+import BaseOpera from '@/components/base/BaseOpera'
+import JsonViewer from 'vue-json-viewer'
+
+export default {
+  name: 'OperaInterfaceLogWindow',
+  extends: BaseOpera,
+  components: { JsonViewer },
+  data () {
+    return {
+      // 琛ㄥ崟鏁版嵁
+      form: {
+        content: '',
+        formatContent: {}
+      },
+      // 楠岃瘉瑙勫垯
+      rules: {
+      },
+      copyable: { copyText: 'copy', copiedText: 'copied' }
+    }
+  },
+  created () {
+    this.config({
+      api: '/business/interfaceLog',
+      'field.id': 'id'
+    })
+  },
+  methods: {
+    copyText (val) {
+      this.$message.success('鍐呭宸叉垚鍔熷鍒跺埌鍓垏鏉匡紒')
+    },
+    open (title, target) {
+      this.title = title
+      this.visible = true
+      // 鏂板缓
+      if (target == null) {
+        this.$nextTick(() => {
+          this.$refs.form.resetFields()
+          this.form[this.configData['field.id']] = null
+        })
+        return
+      }
+      // 缂栬緫
+      this.$nextTick(() => {
+        for (const key in this.form) {
+          this.form[key] = target[key]
+        }
+        try {
+          this.form.formatContent = JSON.parse(this.form.content)
+        } catch (e) {
+          this.form.formatContent = this.form.content
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+    .codeEditBox {
+      width: 100%;
+      height: 90%;
+      overflow:auto;
+      display: block;
+      border: 1px solid #dcdee2;
+      overflow-y: auto;
+    }
+    ::v-deep .el-dialog__body{height:70vh;overflow-y: auto}
+    ::v-deep .el-dialog{height:78vh;overflow: hidden}
+    .jv-container {
+      //height: 60vh;
+    }
+</style>

--
Gitblit v1.9.3