zhaowei
2025-01-02 e817cabe45b7546e921d21aba3ab74cd04190a8d
1、定时任务页面新增查看日志功能
2、部门管理页面调整字段
已添加2个文件
已修改3个文件
733 ■■■■ 文件已修改
src/views/system/DepartList.vue 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/QuartzJobList.vue 82 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/modules/DepartModal.vue 88 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/modules/QuartzJobDetails.vue 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/modules/QuartzJobListModal.vue 422 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/DepartList.vue
@@ -88,40 +88,40 @@
                  placeholder="无">
                </a-tree-select>
              </a-form-model-item>
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orgCode" label="机构编码">
                <a-input disabled placeholder="请输入机构编码" v-model="model.orgCode" />
              </a-form-model-item>
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orgCategory" label="机构类型">
                <template v-if="orgCategoryDisabled">
                  <a-radio-group v-model="model.orgCategory" placeholder="请选择机构类型">
                    <a-radio value="1">
                      å…¬å¸
                    </a-radio>
                  </a-radio-group>
                </template>
                <template v-else>
                  <a-radio-group v-model="model.orgCategory" placeholder="请选择机构类型">
                    <a-radio value="2">
                      éƒ¨é—¨
                    </a-radio>
                    <a-radio value="3">
                      å²—位
                    </a-radio>
                  </a-radio-group>
                </template>
              </a-form-model-item>
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="部门负责人">
                <j-select-multi-user v-model="model.directorUserIds" valueKey="id"></j-select-multi-user>
              </a-form-model-item>
              <!--<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orgCode" label="机构编码">-->
                <!--<a-input disabled placeholder="请输入机构编码" v-model="model.orgCode" />-->
              <!--</a-form-model-item>-->
              <!--<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orgCategory" label="机构类型">-->
                <!--<template v-if="orgCategoryDisabled">-->
                  <!--<a-radio-group v-model="model.orgCategory" placeholder="请选择机构类型">-->
                    <!--<a-radio value="1">-->
                      <!--公司-->
                    <!--</a-radio>-->
                  <!--</a-radio-group>-->
                <!--</template>-->
                <!--<template v-else>-->
                  <!--<a-radio-group v-model="model.orgCategory" placeholder="请选择机构类型">-->
                    <!--<a-radio value="2">-->
                      <!--部门-->
                    <!--</a-radio>-->
                    <!--<a-radio value="3">-->
                      <!--岗位-->
                    <!--</a-radio>-->
                  <!--</a-radio-group>-->
                <!--</template>-->
              <!--</a-form-model-item>-->
              <!--<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="部门负责人">-->
                <!--<j-select-multi-user v-model="model.directorUserIds" valueKey="id"></j-select-multi-user>-->
              <!--</a-form-model-item>-->
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="排序">
                <a-input-number v-model="model.departOrder" />
              </a-form-model-item>
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="手机号" prop="mobile">
                <a-input placeholder="请输入手机号" v-model="model.mobile" />
              </a-form-model-item>
              <a-form-model-item  :labelCol="labelCol" :wrapperCol="wrapperCol"  label="地址">
                <a-input placeholder="请输入地址" v-model="model.address"/>
              </a-form-model-item>
              <!--<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="手机号" prop="mobile">-->
                <!--<a-input placeholder="请输入手机号" v-model="model.mobile" />-->
              <!--</a-form-model-item>-->
              <!--<a-form-model-item  :labelCol="labelCol" :wrapperCol="wrapperCol"  label="地址">-->
                <!--<a-input placeholder="请输入地址" v-model="model.address"/>-->
              <!--</a-form-model-item>-->
              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="备注">
                <a-textarea placeholder="请输入备注" v-model="model.memo"/>
              </a-form-model-item>
@@ -445,7 +445,7 @@
            //update-begin---author:wangshuai ---date:20200308  for:[JTC-119]在部门管理菜单下设置部门负责人
            this.currSelected.oldDirectorUserIds = this.oldDirectorUserIds
            //update-end---author:wangshuai ---date:20200308  for:[JTC-119]在部门管理菜单下设置部门负责人
            httpAction(this.url.edit, this.currSelected, 'put').then((res) => {
              if (res.success) {
                this.$message.success('保存成功!')
@@ -565,7 +565,7 @@
        }
      }
      //---- author:os_chengtgen -- date:20190827 --  for:切换父子勾选模式 =======------
    },
    created() {
      this.currFlowId = this.$route.params.id
src/views/system/QuartzJobList.vue
@@ -7,13 +7,13 @@
        <a-row :gutter="24">
          <a-col :md="6" :sm="10">
            <a-form-model-item label="任务类名" prop="jobClassName">
              <a-input placeholder="请输入任务类名" v-model="queryParam.jobClassName"></a-input>
            <a-form-model-item label="任务名称" prop="jobClassName">
              <a-input placeholder="请输入任务名称" v-model="queryParam.jobName"></a-input>
            </a-form-model-item>
          </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 style="width: 100%" 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>
@@ -64,7 +64,6 @@
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        :scroll="{x:true}"
        @change="handleTableChange">
        <!-- å­—符串超长截取省略号显示-->
@@ -77,14 +76,19 @@
        <span slot="action" slot-scope="text, record">
          <a @click="resumeJob(record)" v-if="record.status==-1">启动</a>
          <a @click="pauseJob(record)" v-if="record.status==0">停止</a>
          <a @click="executeImmediately(record)">立即执行</a>
          <a-divider type="vertical" />
          <a @click="handlequartzLog(record)">日志</a>
           <a-divider type="vertical" />
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
            <a-menu slot="overlay">
              <a-menu-item><a @click="executeImmediately(record)">执行一次</a></a-menu-item>
              <a-menu-item>
                  <a @click="resumeJob(record)" v-if="record.status==-1">启动</a>
          <a @click="pauseJob(record)" v-if="record.status==0">停止</a>
              </a-menu-item>
              <a-menu-item><a @click="handleEdit(record)">编辑</a></a-menu-item>
              <a-menu-item>
                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
@@ -106,11 +110,15 @@
    <!-- è¡¨å•区域 -->
    <quartzJob-modal ref="modalForm" @ok="modalFormOk"></quartzJob-modal>
    <!--日志-->
    <quartz-job-list-modal ref="modalFormList" @ok="modalFormOk"></quartz-job-list-modal>
  </a-card>
</template>
<script>
  import QuartzJobModal from './modules/QuartzJobModal'
  import QuartzJobListModal from './modules/QuartzJobListModal'
  import { getAction } from '@/api/manage'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import JEllipsis from "@/components/jeecg/JEllipsis";
@@ -120,6 +128,7 @@
    mixins:[JeecgListMixin],
    components: {
      QuartzJobModal,
      QuartzJobListModal,
      JEllipsis
    },
    data () {
@@ -140,13 +149,13 @@
            }
          },
          {
            title: '任务类名',
            title: '任务名称',
            align:"center",
            dataIndex: 'jobClassName',
            dataIndex: 'jobName',
            sorter: true,
/*            customRender:function (text) {
              return "*"+text.substring(9,text.length);
            }*/
            /*            customRender:function (text) {
                          return "*"+text.substring(9,text.length);
                        }*/
          },
          {
            title: 'cron表达式',
@@ -161,9 +170,8 @@
            scopedSlots: {customRender: 'parameterRender'},
          },
          {
            title: '描述',
            title: '说明',
            align:"center",
            width: 250,
            dataIndex: 'description',
            scopedSlots: {customRender: 'description'},
          },
@@ -186,7 +194,7 @@
            scopedSlots: { customRender: 'action' },
          }
        ],
        url: {
        url: {
          list: "/sys/quartzJob/list",
          delete: "/sys/quartzJob/delete",
          deleteBatch: "/sys/quartzJob/deleteBatch",
@@ -205,7 +213,11 @@
    },
    methods: {
      handlequartzLog: function (record) {
        this.$refs.modalFormList.openPage(record);
        this.$refs.modalFormList.title = "执行日志";
        this.$refs.modalFormList.disableSubmit = false;
      },
      //筛选需要重写handleTableChange
      handleTableChange(pagination, filters, sorter) {
        //分页、排序、筛选变化时触发
@@ -215,7 +227,7 @@
          this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
        }
        //这种筛选方式只支持单选
        // update-begin-author:liusq date:20210624 for:前台定时任务无法翻页  #2666
        if(filters && Object.keys(filters).length>0 && filters.status){
          this.filters.status = filters.status[0];
@@ -233,11 +245,19 @@
          onOk: function(){
            getAction(that.url.pause,{id:record.id}).then((res)=>{
              if(res.success){
                that.$message.success(res.message);
                // that.$message.success(res.message);
                that.$notification.success({
                  message:'消息',
                  description:res.message
                });
                that.loadData();
                that.onClearSelected();
              }else{
                that.$message.warning(res.message);
                // that.$message.warning(res.message);
                that.$notification.warning({
                  message:'消息',
                  description:res.message
                });
              }
            });
          }
@@ -253,11 +273,19 @@
          onOk: function(){
            getAction(that.url.resume,{id:record.id}).then((res)=>{
              if(res.success){
                that.$message.success(res.message);
                // that.$message.success(res.message);
                that.$notification.success({
                  message:'消息',
                  description:res.message
                });
                that.loadData();
                that.onClearSelected();
              }else{
                that.$message.warning(res.message);
                // that.$message.warning(res.message);
                that.$notification.warning({
                  message:'消息',
                  description:res.message
                });
              }
            });
          }
@@ -272,11 +300,19 @@
          onOk: function(){
            getAction(that.url.execute,{id:record.id}).then((res)=>{
              if(res.success){
                that.$message.success(res.message);
                // that.$message.success(res.message);
                that.$notification.success({
                  message:'消息',
                  description:res.message
                });
                that.loadData();
                that.onClearSelected();
              }else{
                that.$message.warning(res.message);
                // that.$message.warning(res.message);
                that.$notification.warning({
                  message:'消息',
                  description:res.message
                });
              }
            });
          }
src/views/system/modules/DepartModal.vue
@@ -31,50 +31,50 @@
          :disabled="condition">
        </a-tree-select>
        </a-form-model-item>
        <a-form-model-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="机构类型">
         <template v-if="seen">
            <a-radio-group v-model="model.orgCategory" placeholder="请选择机构类型">
              <a-radio value="1">
                å…¬å¸
              </a-radio>
            </a-radio-group>
          </template>
          <template v-else>
            <a-radio-group v-model="model.orgCategory" placeholder="请选择机构类型">
              <a-radio value="2">
                éƒ¨é—¨
              </a-radio>
              <a-radio value="3">
                å²—位
              </a-radio>
            </a-radio-group>
       </template>
        </a-form-model-item>
        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="部门负责人">
          <j-select-multi-user v-model="model.directorUserIds" valueKey="id"></j-select-multi-user>
        </a-form-model-item>
        <a-form-model-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          prop="mobile"
          label="电话">
          <a-input placeholder="请输入电话" v-model="model.mobile"/>
        </a-form-model-item>
        <a-form-model-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="传真">
          <a-input placeholder="请输入传真" v-model="model.fax"/>
        </a-form-model-item>
        <a-form-model-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
          label="地址">
          <a-input placeholder="请输入地址" v-model="model.address"/>
        </a-form-model-item>
        <!--<a-form-model-item-->
          <!--:labelCol="labelCol"-->
          <!--:wrapperCol="wrapperCol"-->
          <!--label="机构类型">-->
         <!--<template v-if="seen">-->
            <!--<a-radio-group v-model="model.orgCategory" placeholder="请选择机构类型">-->
              <!--<a-radio value="1">-->
                <!--公司-->
              <!--</a-radio>-->
            <!--</a-radio-group>-->
          <!--</template>-->
          <!--<template v-else>-->
            <!--<a-radio-group v-model="model.orgCategory" placeholder="请选择机构类型">-->
              <!--<a-radio value="2">-->
                <!--部门-->
              <!--</a-radio>-->
              <!--<a-radio value="3">-->
                <!--岗位-->
              <!--</a-radio>-->
            <!--</a-radio-group>-->
       <!--</template>-->
        <!--</a-form-model-item>-->
        <!--<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="部门负责人">-->
          <!--<j-select-multi-user v-model="model.directorUserIds" valueKey="id"></j-select-multi-user>-->
        <!--</a-form-model-item>-->
        <!--<a-form-model-item-->
          <!--:labelCol="labelCol"-->
          <!--:wrapperCol="wrapperCol"-->
          <!--prop="mobile"-->
          <!--label="电话">-->
          <!--<a-input placeholder="请输入电话" v-model="model.mobile"/>-->
        <!--</a-form-model-item>-->
        <!--<a-form-model-item-->
          <!--:labelCol="labelCol"-->
          <!--:wrapperCol="wrapperCol"-->
          <!--label="传真">-->
          <!--<a-input placeholder="请输入传真" v-model="model.fax"/>-->
        <!--</a-form-model-item>-->
        <!--<a-form-model-item-->
          <!--:labelCol="labelCol"-->
          <!--:wrapperCol="wrapperCol"-->
          <!--label="地址">-->
          <!--<a-input placeholder="请输入地址" v-model="model.address"/>-->
        <!--</a-form-model-item>-->
        <a-form-model-item
          :labelCol="labelCol"
          :wrapperCol="wrapperCol"
src/views/system/modules/QuartzJobDetails.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,75 @@
<template>
  <a-modal :title="title" width="100%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
           cancelText="关闭">
    <a-card :bordered="false">
      <div>
        <pre>
           {{textContent}}
        </pre>
      </div>
    </a-card>
  </a-modal>
</template>
<script>
  export default {
    name: 'QuartzJobDetails',
    // mixins: [JeecgListMixin],
    components: {
    },
    props: {
    },
    data() {
      return {
        title:'',
        visible:false,
        textContent:'',
      }
    },
    created() {
    },
    watch: {
    },
    methods: {
        showDetails(record){
          // console.log(record)
          this.visible = true
          this.textContent = record.exceptionDetail
        },
      close() {
        this.$emit('close')
        this.visible = false
      },
      handleCancel() {
        this.close()
      },
      handleOk() {
        this.close()
      },
    },
  }
</script>
<style>
  @import '~@assets/less/common.less';
  .frozenRowClass {
    color: #c9c9c9;
  }
  .success {
    color: green;
  }
  .error {
    color: red;
  }
</style>
src/views/system/modules/QuartzJobListModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,422 @@
<template>
  <a-modal :title="title" width="100%" :visible="visible" :maskClosable="false" @ok="handleOk" @cancel="handleCancel"
           cancelText="关闭">
    <a-card :bordered="false">
      <!-- æŸ¥è¯¢åŒºåŸŸ -->
      <div class="table-page-search-wrapper">
        <a-form layout="inline" @keyup.enter.native="searchQuery">
          <a-row :gutter="24">
            <a-col :md="6" :sm="6">
              <a-form-item label="任务名称">
                <a-input placeholder="请输入任务名称" v-model="queryParam.jobName"></a-input>
              </a-form-item>
            </a-col>
            <a-col :md="6" :sm="6">
              <a-form-item label="时间">
                <a-range-picker show-time @change="dateParamChange" :disabledDate="disabledDate" format="YYYY-MM-DD HH:mm:ss" v-model="dates"/>
              </a-form-item>
            </a-col>
            <a-col :md="4" :sm="4">
              <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>
      </div>
      <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
      <div class="table-operator">
        <!--<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>-->
      </div>
      <!-- table区域-begin -->
      <div>
        <a-table ref="table" size="middle" bordered rowKey="index" :scroll="{  y: 400 }" :columns="columns"
                 :dataSource="dataSource" :pagination="ipagination" :loading="loading"
                 @change="handleTableChange">
          <!-- çŠ¶æ€æ¸²æŸ“æ¨¡æ¿ -->
          <template slot="customRenderStatus" slot-scope="isSuccess">
            <a-tag v-if="isSuccess==0" color="green">成功</a-tag>
            <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>
        </span>
        </a-table>
      </div>
      <!-- table区域-end -->
      <quartz-job-details ref="modalForm"></quartz-job-details>
    </a-card>
  </a-modal>
</template>
<script>
  import { filterObj } from '@/utils/util';
  import {
    ajaxGetSelectItems
  } from '@/api/api'
  import JDictSelectTag from '@/components/dict/JDictSelectTag'
  import {
    deleteAction,
    requestPut,
    getAction,
    downFile,
    postAction
  } from '@/api/manage'
  import {
    JeecgListMixin
  } from '@/mixins/JeecgListMixin'
  import JInput from '@/components/jeecg/JInput'
  import JEllipsis from '@/components/jeecg/JEllipsis'
  import Tooltip from 'ant-design-vue/es/tooltip'
  import JDate from '@/components/jeecg/JDate'
  import moment from 'moment'
  import QuartzJobDetails from './QuartzJobDetails'
  export default {
    name: 'QuartzJobListModal',
    // mixins: [JeecgListMixin],
    components: {
      JDictSelectTag,
      JEllipsis,
      JInput,
      Tooltip,
      JDate,
      QuartzJobDetails
    },
    props: {
      status: {
        type: Number,
        default: 1
      }
    },
    data() {
      return {
        title:'',
        visible:false,
        /* æŸ¥è¯¢æ¡ä»¶-请不要在queryParam中声明非字符串值的属性 */
        queryParam: {},
        /* æ•°æ®æº */
        dataSource:[],
        /* åˆ†é¡µå‚æ•° */
        ipagination:{
          current: 1,
          pageSize: 10,
          pageSizeOptions: ['10', '20', '30'],
          showTotal: (total, range) => {
            return range[0] + "-" + range[1] + " å…±" + total + "条"
          },
          showQuickJumper: true,
          showSizeChanger: true,
          total: 0
        },
        /* æŽ’序参数 */
        isorter:{
          column: 'createTime',
          order: 'desc',
        },
        /* ç­›é€‰å‚æ•° */
        filters: {},
        /* table加载状态 */
        loading:false,
        /* table选中keys*/
        selectedRowKeys: [],
        /* table选中records*/
        selectionRows: [],
        /* æŸ¥è¯¢æŠ˜å  */
        toggleSearchStatus:false,
        /* é«˜çº§æŸ¥è¯¢æ¡ä»¶ç”Ÿæ•ˆçŠ¶æ€ */
        superQueryFlag:false,
        /* é«˜çº§æŸ¥è¯¢æ¡ä»¶ */
        superQueryParams: '',
        /** é«˜çº§æŸ¥è¯¢æ‹¼æŽ¥æ–¹å¼ */
        superQueryMatchType: 'and',
        columns: [
          {
            title: '#',
            dataIndex: '',
            key: 'rowIndex',
            width: 60,
            align: "center",
            customRender: function (t, r, index) {
              return parseInt(index) + 1;
            }
          },
          // {
          //   title: '任务名称',
          //   align: 'center',
          //   dataIndex: 'jobClassName',
          // },
          // {
          //   title: 'cron表达式',
          //   align: 'center',
          //   dataIndex: 'cronExpression',
          // },
          {
            title: '任务名称',
            align: 'center',
            dataIndex: 'jobName'
          },
          {
            title: '参数',
            align: 'center',
            dataIndex: 'parameter'
          },
          {
            title: '报错信息',
            dataIndex: 'action',
            align:"center",
            scopedSlots: { customRender: 'action' },
          },
          {
            title: '成功标志',
            align: 'center',
            dataIndex: 'isSuccess',
            scopedSlots: { customRender: 'customRenderStatus' },
            filterMultiple: false,
            filters: [
              { text: '成功', value: '0' },
              { text: '失败', value: '-1' },
            ]
          },
          {
            title: '执行时间(毫秒)',
            align: 'center',
            dataIndex: 'executionTime',
            customRender:(t,r,index) =>{
              var milliseconds = parseInt(t)
                let hours = Math.floor(milliseconds / 3600000);
                milliseconds = milliseconds % 3600000;
                let minutes = Math.floor(milliseconds / 60000);
                milliseconds = milliseconds % 60000;
                let seconds = Math.floor(milliseconds / 1000);
                milliseconds = milliseconds % 1000;
                if(hours == 0){
                  if(minutes == 0){
                    if(seconds == 0) {
                      return `${milliseconds}毫秒`
                    }else{
                      return `${seconds}秒 ${milliseconds}毫秒`
                    }
                  }else{
                    return `${minutes}分钟 ${seconds}秒 ${milliseconds}毫秒`;
                  }
                }else{
                  return `${hours}小时 ${minutes}分钟 ${seconds}秒 ${milliseconds}毫秒`;
                }
            }
          },
          {
            title: '任务执行时间',
            align: 'center',
            dataIndex: 'createTime'
          },
        ],
        sectionPData: [],
        sectionData: [],
        url: {
          list: '/sys/quartzLog/list',
          exportXlsUrl:'/sys/quartzLog/exportXls'
        },
        value:undefined,
        valueProduct:undefined,
        dates: [],
      }
    },
    created() {
    },
    watch: {
    },
    methods: {
      searchReset() {
        let id =  this.queryParam.jobId
        this.queryParam = {}
        this.dates = []
        this.queryParam.jobId = id
        this.loadData(1);
      },
      executeImmediately:function (record) {
        this.$refs.modalForm.showDetails(record);
        this.$refs.modalForm.title = "报错信息";
        this.$refs.modalForm.disableSubmit = false;
      },
      handleExportXls(fileName){
        if(!fileName || typeof fileName != "string"){
          fileName = "导出文件"
        }
        let param = this.getQueryParams();
        if(this.selectedRowKeys && this.selectedRowKeys.length>0){
          param['selections'] = this.selectedRowKeys.join(",")
        }
        console.log("导出参数",param)
        downFile(this.url.exportXlsUrl,param).then((data)=>{
          if (!data) {
            this.$message.warning("文件下载失败")
            return
          }
          if (typeof window.navigator.msSaveBlob !== 'undefined') {
            window.navigator.msSaveBlob(new Blob([data],{type: 'application/vnd.ms-excel'}), fileName+'.xls')
          }else{
            let url = window.URL.createObjectURL(new Blob([data],{type: 'application/vnd.ms-excel'}))
            let link = document.createElement('a')
            link.style.display = 'none'
            link.href = url
            link.setAttribute('download', fileName+'.xls')
            document.body.appendChild(link)
            link.click()
            document.body.removeChild(link); //下载完成移除元素
            window.URL.revokeObjectURL(url); //释放掉blob对象
          }
        })
      },
      disabledDate(current) {
        return current && current > moment().subtract('days', 1);
      },
      dateParamChange(v1, v2) {
        this.queryParam.startTime = v2[0]
        this.queryParam.endTime = v2[1]
      },
      handleTableChange(pagination, filters, sorter) {
        // this.onClearSelected()
        //分页、排序、筛选变化时触发
        //TODO ç­›é€‰
        console.log(pagination)
        if (Object.keys(sorter).length > 0) {
          this.isorter.column = sorter.field;
          this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
        }
        this.ipagination = pagination;
        this.loadData();
      },
      openPage(record) {
        // console.log(record)
        this.visible = true
        this.dataSource = [];
        this.queryParam = {
          jobId: record.id
        };
        this.loadData();
      },
      getQueryParams() {
        //获取查询条件
        let sqp = {}
        if(this.superQueryParams){
          sqp['superQueryParams']=encodeURI(this.superQueryParams)
          sqp['superQueryMatchType'] = this.superQueryMatchType
        }
        var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters);
        param.field = this.getQueryField();
        param.pageNo = this.ipagination.current;
        param.pageSize = this.ipagination.pageSize;
        param.jobId = this.queryParam.jobId;
        param.startTime = this.queryParam.startTime;
        param.endTime =  this.queryParam.endTime;
        //获取用户定制的参数属性
        // if (this.getCustomQueryParams) {
        //   param = this.getCustomQueryParams(param);
        //   if(!param){
        //     return false;
        //   }
        // }
        return filterObj(param);
      },
      getQueryField() {
        //TODO å­—段权限控制
        var str = "id,";
        this.columns.forEach(function (value) {
          str += "," + value.dataIndex;
        });
        return str;
      },
      loadData(arg) {
        if(!this.url.list){
          this.$message.error("请设置url.list属性!")
          return
        }
        //加载数据 è‹¥ä¼ å…¥å‚æ•°1则加载第一页的内容
        if (arg === 1) {
          this.ipagination.current = 1;
        }
        var params = this.getQueryParams();//查询条件
        if(!params){
          return false;
        }
        this.loading = true;
        // params.id = this.queryParam.id
        getAction(this.url.list, params).then((res) => {
          if (res.success) {
            // console.log(res)
            //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
            this.dataSource = res.result.records||res.result;
            if(res.result.total)
            {
              this.ipagination.total = res.result.total;
            }else{
              this.ipagination.total = 0;
            }
            //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
          }else{
            // this.$message.warning(res.message)
            this.$notification.warning({
              message:'消息',
              description:res.message
            });
          }
        }).finally(() => {
          this.loading = false
        })
      },
      modalFormOk(val) {
        // æ–°å¢ž/修改 æˆåŠŸæ—¶ï¼Œé‡è½½åˆ—è¡¨
        this.loadData();
        this.selectedRowKeys = [val.id];
      },
      searchQuery() {
        this.loadData();
      },
      close() {
        this.$emit('close')
        this.visible = false
      },
      handleCancel() {
        this.close()
      },
      handleOk() {
        this.close()
      },
    },
  }
</script>
<style>
  @import '~@assets/less/common.less';
  .frozenRowClass {
    color: #c9c9c9;
  }
  .success {
    color: green;
  }
  .error {
    color: red;
  }
</style>