1
lzhe
2024-06-05 dcf9c9e0410fe1186239e3f8d6f7bdc789c08010
src/views/setting/task/logs.vue
@@ -9,12 +9,13 @@
<template>
   <el-container>
      <el-main  style="padding:0 20px;">
      <el-main style="padding:0 20px;">
         <scTable ref="table" :data="data" stripe>
            <el-table-column label="执行时间" prop="time" width="200"></el-table-column>
            <el-table-column label="执行结果" prop="state" width="100">
               <template #default="scope">
                  <span v-if="scope.row.state==200" style="color: #67C23A;"><el-icon><el-icon-success-filled /></el-icon></span>
                  <span v-if="scope.row.state == 200"
                     style="color: #67C23A;"><el-icon><el-icon-success-filled /></el-icon></span>
                  <span v-else style="color: #F56C6C;"><el-icon><el-icon-circle-close-filled /></el-icon></span>
               </template>
            </el-table-column>
@@ -28,18 +29,20 @@
   </el-container>
   <el-drawer title="日志" v-model="logsVisible" :size="500" direction="rtl" destroy-on-close>
      <el-main  style="padding:0 20px 20px 20px;">
         <pre style="font-size: 12px;color: #999;padding:20px;background: #333;font-family: consolas;line-height: 1.5;overflow: auto;">{{demoLog}}</pre>
      <el-main style="padding:0 20px 20px 20px;">
         <pre
            style="font-size: 12px;color: #999;padding:20px;background: #333;font-family: consolas;line-height: 1.5;overflow: auto;">
         {{ demoLog }}</pre>
      </el-main>
   </el-drawer>
</template>
<script>
   export default {
      data() {
         return {
            logsVisible: false,
            demoLog: `2021-07-07 12:35:00 [com.xxl.job.core.thread.JobThread#run]-[124]-[Thread-308]
export default {
   data() {
      return {
         logsVisible: false,
         demoLog: `2021-07-07 12:35:00 [com.xxl.job.core.thread.JobThread#run]-[124]-[Thread-308]
----------- xxl-job job execute start -----------
----------- Param:
2021-07-07 12:35:00 [com.heronshn.reservation.jobhandler.AqshMasterDataSendHandler#execute]-[31]-[Thread-308] aqshMasterDataSendHandler start
@@ -54,55 +57,54 @@
----------- xxl-job job callback finish.
[Load Log Finish]`,
            data: [
               {
                  time: "2021-07-07 00:00:00",
                  state: "500",
                  logs: ""
               },
               {
                  time: "2021-07-06 00:00:00",
                  state: "200",
                  logs: ""
               },
               {
                  time: "2021-07-05 00:00:00",
                  state: "200",
                  logs: ""
               },
               {
                  time: "2021-07-04 00:00:00",
                  state: "200",
                  logs: ""
               },
               {
                  time: "2021-07-03 00:00:00",
                  state: "200",
                  logs: ""
               },
               {
                  time: "2021-07-02 00:00:00",
                  state: "200",
                  logs: ""
               },
               {
                  time: "2021-07-01 00:00:00",
                  state: "200",
                  logs: ""
               }
            ]
         }
      },
      mounted() {
         data: [
            {
               time: "2021-07-07 00:00:00",
               state: "500",
               logs: ""
            },
            {
               time: "2021-07-06 00:00:00",
               state: "200",
               logs: ""
            },
            {
               time: "2021-07-05 00:00:00",
               state: "200",
               logs: ""
            },
            {
               time: "2021-07-04 00:00:00",
               state: "200",
               logs: ""
            },
            {
               time: "2021-07-03 00:00:00",
               state: "200",
               logs: ""
            },
            {
               time: "2021-07-02 00:00:00",
               state: "200",
               logs: ""
            },
            {
               time: "2021-07-01 00:00:00",
               state: "200",
               logs: ""
            }
         ]
      }
   },
   mounted() {
      },
      methods: {
         show(){
            this.logsVisible = true;
         }
   },
   methods: {
      show() {
         this.logsVisible = true;
      }
   }
}
</script>
<style>
</style>
<style></style>