开放日志修改
This commit is contained in:
@@ -19,9 +19,8 @@
|
||||
<FormItem label="调用参数:">
|
||||
<pre class="json-pre">{{ formatJson(row?.requestParams) }}</pre>
|
||||
</FormItem>
|
||||
<FormItem label="数据:">
|
||||
<a v-if="row?.id" href="javascript:;" class="download-link" @click.prevent="handleDownload">下载</a>
|
||||
<span v-else>-</span>
|
||||
<FormItem label="响应结果:">
|
||||
<pre class="json-pre">{{ formatJson(row?.responseData) }}</pre>
|
||||
</FormItem>
|
||||
<FormItem label="创建时间:">
|
||||
<span>{{ formatTime(row?.createTime) }}</span>
|
||||
@@ -36,7 +35,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import useCurrentInstance from '@/utils/hook/useCurrentInstance';
|
||||
import Utils from '@/utils';
|
||||
|
||||
interface Props {
|
||||
@@ -55,8 +53,6 @@ const show = computed({
|
||||
set: val => emit('update:modelValue', val),
|
||||
});
|
||||
|
||||
const { $conf } = useCurrentInstance();
|
||||
|
||||
const appText = computed(() => {
|
||||
if (!props.row?.callerAppName && !props.row?.callerAppKey) return '-';
|
||||
const name = props.row.callerAppName || '-';
|
||||
@@ -85,11 +81,6 @@ function formatTime(val: any): string {
|
||||
if (!val) return '-';
|
||||
return Utils.dateFormat(val, 'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
|
||||
function handleDownload() {
|
||||
if (!props.row?.id) return;
|
||||
location.href = `${$conf.serviceHost}/api/oapilog/Download/${props.row.id}`;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -124,13 +115,5 @@ function handleDownload() {
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.download-link {
|
||||
color: #577afb;
|
||||
|
||||
&:hover {
|
||||
color: #3d5afe;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user