zhaowei
2 天以前 57fdca64e4e6d2573f116917b87c4c9155053c23
定时任务日志信息字段展示与样式调整
已修改3个文件
69 ■■■■■ 文件已修改
src/views/system/QuartzJobList.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/modules/QuartzJobDetails.vue 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/modules/QuartzJobListModal.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/QuartzJobList.vue
@@ -13,7 +13,7 @@
          </a-col>
          <a-col :md="6" :sm="10">
            <a-form-model-item label="任务状态" prop="status">
              <a-select style="width: 220px" v-model="queryParam.status" placeholder="请选择状态">
              <a-select v-model="queryParam.status" placeholder="请选择状态">
                <a-select-option value="">全部</a-select-option>
                <a-select-option value="0">正常</a-select-option>
                <a-select-option value="-1">停止</a-select-option>
src/views/system/modules/QuartzJobDetails.vue
@@ -1,16 +1,10 @@
<template>
  <a-modal :title="title" width="100%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
           cancelText="关闭">
  <j-modal :title="title" width="100%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
           :okButtonProps="{ class:{'jee-hidden': true} }" cancelText="关闭">
    <a-card :bordered="false">
      <div>
        <pre>
           {{textContent}}
        </pre>
      </div>
      <a-textarea :rows="3" v-model="textContent" readOnly/>
    </a-card>
  </a-modal>
  </j-modal>
</template>
<script>
@@ -19,32 +13,26 @@
  export default {
    name: 'QuartzJobDetails',
    // mixins: [JeecgListMixin],
    components: {
    },
    props: {
    },
    components: {},
    props: {},
    data() {
      return {
        title:'',
        visible:false,
        textContent:'',
        title: '',
        visible: false,
        textContent: ''
      }
    },
    created() {
    },
    watch: {
    },
    watch: {},
    methods: {
        showDetails(record){
          // console.log(record)
          this.visible = true
          this.textContent = record.exceptionDetail
        },
      showDetails(record) {
        // console.log(record)
        this.visible = true
        this.textContent = record.exceptionDetail
      },
      close() {
        this.$emit('close')
        this.visible = false
@@ -54,8 +42,8 @@
      },
      handleOk() {
        this.close()
      },
    },
      }
    }
  }
</script>
<style>
src/views/system/modules/QuartzJobListModal.vue
@@ -20,12 +20,11 @@
              </a-form-item>
            </a-col>
            <a-col :md="4" :sm="4">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </a-col>
            <a-col :md="2" :sm="2">
              <a-button type="primary" icon="download" @click="handleExportXls('执行日志导出')">导出</a-button>
              <a-space>
                <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
                <a-button type="primary" @click="searchReset" icon="reload">重置</a-button>
                <a-button type="primary" icon="download" @click="handleExportXls('执行日志导出')">导出</a-button>
              </a-space>
            </a-col>
          </a-row>
        </a-form>
@@ -46,9 +45,7 @@
            <a-tag v-if="isSuccess==-1" color="red">失败</a-tag>
          </template>
          <span slot="action" slot-scope="text, record">
             <a v-if="record.isSuccess == -1" @click="executeImmediately(record)">查看详情</a>
             <a @click="executeImmediately(record)">查看详情</a>
        </span>
        </a-table>
      </div>
@@ -67,7 +64,7 @@
  import JDictSelectTag from '@/components/dict/JDictSelectTag'
  import {
    deleteAction,
    requestPut,
    requestPut,
    getAction,
    downFile,
    postAction
@@ -173,7 +170,7 @@
          },
          {
            title: '报错信息',
            title: '日志信息',
            dataIndex: 'action',
            align:"center",
            scopedSlots: { customRender: 'action' },
@@ -251,7 +248,7 @@
      },
      executeImmediately:function (record) {
        this.$refs.modalForm.showDetails(record);
        this.$refs.modalForm.title = "报错信息";
        this.$refs.modalForm.title = "日志信息";
        this.$refs.modalForm.disableSubmit = false;
      },
      handleExportXls(fileName){