This commit is contained in:
iqudoo
2026-06-05 17:22:32 +08:00
commit eb4e8f1a04
90 changed files with 21224 additions and 0 deletions

View File

@@ -0,0 +1,91 @@
<template>
<div class="record-page">
<ILayoutPage ref="pageRef" :config="config">
<template #bodyCell="{ column, record, type }">
<template v-if="column.dataIndex === 'recordDetail'">
<pre class="log-params">{{ displayParams(taskInfo.taskParams) }}</pre>
<LogContentPreview :content="record.logsContent" />
</template>
</template>
</ILayoutPage>
</div>
</template>
<script setup>
import { ref } from "vue";
import ILayoutPage from "@/iview/ILayoutPage.vue";
import LogContentPreview from "@/components/LogContentPreview.vue";
const props = defineProps({
taskInfo: {
type: Object,
required: true,
},
});
const pageRef = ref(null);
const refreshPage = () => {
pageRef.value.refreshPage();
};
const displayParams = (params) => {
try {
let paramsObj = JSON.parse(params);
return JSON.stringify(paramsObj, null, 2);
} catch (_) {
return params;
}
};
const recordColumns = ref([
{
title: "执行日志",
dataIndex: "recordDetail",
bodySlot: true,
ellipsis: true,
},
]);
const config = ref({
infoPages: [
{
title: "兽药企业信息",
name: "info",
recordApi: "api.system.async.task.info.logs",
recordMap: (record) => {
return record;
},
defaultParams: () => {
return {
guid: props.taskInfo.guid,
};
},
hiddenLabel: true,
columns: recordColumns.value,
},
],
detailPages: [],
formPages: [
],
});
</script>
<style scoped>
.record-page {
width: 100%;
height: 100%;
min-height: 100%;
}
.log-params {
color: #999;
padding: 10px;
font-size: 12px;
white-space: pre-wrap;
word-break: break-all;
background-color: #f5f5f5;
border-radius: 5px;
}
</style>