From 82d7c2b0d6a7b4eee3e4eff9f8af58d6d0c0f56a Mon Sep 17 00:00:00 2001 From: xjs <1294405880@qq.com> Date: Sat, 8 Jan 2022 02:34:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=B4=E6=98=8E=EF=BC=9A1=E3=80=81api?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E9=A1=B5=E9=9D=A2json=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96=E6=98=BE=E7=A4=BA=EF=BC=88=E5=A4=A7=E5=9D=91=EF=BC=89?= =?UTF-8?q?=20=20=20=20=20=202=E3=80=81=E5=9D=911=20=EF=BC=8C=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E4=BD=BF=E7=94=A8fastjson=E8=BD=AC=E6=8D=A2json?= =?UTF-8?q?=E5=88=B0=E5=89=8D=E7=AB=AF=E4=BC=9A=E6=9C=89=E5=8F=8D=E6=96=9C?= =?UTF-8?q?=E6=9D=A0=EF=BC=8C=E5=AF=BC=E8=87=B4=E5=89=8D=E7=AB=AFjsonview?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E8=AF=86=E5=88=AB=E4=B8=8D=E5=87=BAjson?= =?UTF-8?q?=EF=BC=8C=E8=BF=99=E4=B8=AA=E9=97=AE=E9=A2=98=E5=9B=B0=E6=89=B0?= =?UTF-8?q?=E4=BA=86=E5=87=A0=E4=B8=AA=E5=B0=8F=E6=97=B6=EF=BC=8C=E6=9C=80?= =?UTF-8?q?=E5=90=8E=E9=80=9A=E8=BF=87=E5=AE=9A=E4=B9=89=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?data=E9=87=8C=E9=9D=A2=E7=9A=84=E5=80=BC=EF=BC=8C=E7=94=A8JSON.?= =?UTF-8?q?parse()=E8=BD=AC=E6=8D=A2=EF=BC=8C=E6=9C=80=E5=90=8E=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=88=B0=E7=9C=9F=E6=AD=A3=E7=9A=84json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/package.json | 1 + ruoyi-ui/src/main.js | 176 +++++++++--------- .../src/views/business/openapi/log/index.vue | 61 +++++- .../java/com/xjs/common/aop/ApiLogAspect.java | 4 +- 4 files changed, 149 insertions(+), 93 deletions(-) diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index b658f79f..91defe9a 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -55,6 +55,7 @@ "vue": "2.6.12", "vue-count-to": "1.0.13", "vue-cropper": "0.5.5", + "vue-json-viewer": "^2.2.21", "vue-meta": "2.4.0", "vue-router": "3.4.9", "vuedraggable": "2.24.3", diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index ebd94b9d..a8f845e0 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -1,86 +1,90 @@ -import Vue from 'vue' - -import Cookies from 'js-cookie' - -import Element from 'element-ui' -import './assets/styles/element-variables.scss' - -import '@/assets/styles/index.scss' // global css -import '@/assets/styles/ruoyi.scss' // ruoyi css -import App from './App' -import store from './store' -import router from './router' -import directive from './directive' // directive -import plugins from './plugins' // plugins -import { download } from '@/utils/request' - -import './assets/icons' // icon -import './permission' // permission control -import { getDicts } from "@/api/system/dict/data"; -import { getConfigKey } from "@/api/system/config"; -import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"; -// 分页组件 -import Pagination from "@/components/Pagination"; -// 自定义表格工具组件 -import RightToolbar from "@/components/RightToolbar" -// 富文本组件 -import Editor from "@/components/Editor" -// 文件上传组件 -import FileUpload from "@/components/FileUpload" -// 图片上传组件 -import ImageUpload from "@/components/ImageUpload" -// 图片预览组件 -import ImagePreview from "@/components/ImagePreview" -// 字典标签组件 -import DictTag from '@/components/DictTag' -// 头部标签组件 -import VueMeta from 'vue-meta' -// 字典数据组件 -import DictData from '@/components/DictData' - -// 全局方法挂载 -Vue.prototype.getDicts = getDicts -Vue.prototype.getConfigKey = getConfigKey -Vue.prototype.parseTime = parseTime -Vue.prototype.resetForm = resetForm -Vue.prototype.addDateRange = addDateRange -Vue.prototype.selectDictLabel = selectDictLabel -Vue.prototype.selectDictLabels = selectDictLabels -Vue.prototype.download = download -Vue.prototype.handleTree = handleTree - -// 全局组件挂载 -Vue.component('DictTag', DictTag) -Vue.component('Pagination', Pagination) -Vue.component('RightToolbar', RightToolbar) -Vue.component('Editor', Editor) -Vue.component('FileUpload', FileUpload) -Vue.component('ImageUpload', ImageUpload) -Vue.component('ImagePreview', ImagePreview) - -Vue.use(directive) -Vue.use(plugins) -Vue.use(VueMeta) -DictData.install() - -/** - * If you don't want to use mock-server - * you want to use MockJs for mock api - * you can execute: mockXHR() - * - * Currently MockJs will be used in the production environment, - * please remove it before going online! ! ! - */ - -Vue.use(Element, { - size: Cookies.get('size') || 'medium' // set element-ui default size -}) - -Vue.config.productionTip = false - -new Vue({ - el: '#app', - router, - store, - render: h => h(App) -}) +import Vue from 'vue' + +import Cookies from 'js-cookie' + +import Element from 'element-ui' +import './assets/styles/element-variables.scss' + +import '@/assets/styles/index.scss' // global css +import '@/assets/styles/ruoyi.scss' // ruoyi css +import App from './App' +import store from './store' +import router from './router' +import directive from './directive' // directive +import plugins from './plugins' // plugins +import { download } from '@/utils/request' + +import './assets/icons' // icon +import './permission' // permission control +import { getDicts } from "@/api/system/dict/data"; +import { getConfigKey } from "@/api/system/config"; +import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"; +// 分页组件 +import Pagination from "@/components/Pagination"; +// 自定义表格工具组件 +import RightToolbar from "@/components/RightToolbar" +// 富文本组件 +import Editor from "@/components/Editor" +// 文件上传组件 +import FileUpload from "@/components/FileUpload" +// 图片上传组件 +import ImageUpload from "@/components/ImageUpload" +// 图片预览组件 +import ImagePreview from "@/components/ImagePreview" +// 字典标签组件 +import DictTag from '@/components/DictTag' +// 头部标签组件 +import VueMeta from 'vue-meta' +// 字典数据组件 +import DictData from '@/components/DictData' + +// 全局方法挂载 +Vue.prototype.getDicts = getDicts +Vue.prototype.getConfigKey = getConfigKey +Vue.prototype.parseTime = parseTime +Vue.prototype.resetForm = resetForm +Vue.prototype.addDateRange = addDateRange +Vue.prototype.selectDictLabel = selectDictLabel +Vue.prototype.selectDictLabels = selectDictLabels +Vue.prototype.download = download +Vue.prototype.handleTree = handleTree + +// 全局组件挂载 +Vue.component('DictTag', DictTag) +Vue.component('Pagination', Pagination) +Vue.component('RightToolbar', RightToolbar) +Vue.component('Editor', Editor) +Vue.component('FileUpload', FileUpload) +Vue.component('ImageUpload', ImageUpload) +Vue.component('ImagePreview', ImagePreview) + +Vue.use(directive) +Vue.use(plugins) +Vue.use(VueMeta) +DictData.install() + +// json格式化显示 +import JsonViewer from 'vue-json-viewer' +Vue.use(JsonViewer) + +/** + * If you don't want to use mock-server + * you want to use MockJs for mock api + * you can execute: mockXHR() + * + * Currently MockJs will be used in the production environment, + * please remove it before going online! ! ! + */ + +Vue.use(Element, { + size: Cookies.get('size') || 'medium' // set element-ui default size +}) + +Vue.config.productionTip = false + +new Vue({ + el: '#app', + router, + store, + render: h => h(App) +}) diff --git a/ruoyi-ui/src/views/business/openapi/log/index.vue b/ruoyi-ui/src/views/business/openapi/log/index.vue index 68b40951..abc73728 100644 --- a/ruoyi-ui/src/views/business/openapi/log/index.vue +++ b/ruoyi-ui/src/views/business/openapi/log/index.vue @@ -52,13 +52,21 @@ - - - + + +