''
liukangdong
2024-06-11 f49cf1c04d06333ace67926430c651ca3cc1752f
admin/src/views/business/interfaceLog.vue
@@ -23,6 +23,11 @@
                    end-placeholder="结束日期">
                </el-date-picker>
            </el-form-item>
            <el-radio-group v-model="searchForm.radio" size="small" @input="changeRadio">
                <el-radio-button label="0">当天</el-radio-button>
                <el-radio-button label="1">近7天</el-radio-button>
                <el-radio-button label="2">近30天</el-radio-button>
            </el-radio-group>
            <section>
                <el-button type="primary" @click="search">搜索</el-button>
                <el-button @click="reset">重置</el-button>
@@ -78,6 +83,7 @@
  import TableLayout from '@/layouts/TableLayout'
  import Pagination from '@/components/common/Pagination'
  import OperaInterfaceLogWindow from '@/components/business/OperaInterfaceLogWindow'
import { timeForMat } from '@/utils/util'
  export default {
    name: 'InterfaceLog',
    extends: BaseTable,
@@ -89,7 +95,8 @@
          name: '',
          type: '',
          endDate: '',
          startDate: ''
        startDate: '',
        radio: '0'
        },
        time: []
      }
@@ -101,12 +108,29 @@
        'field.id': 'id',
        'field.main': 'id'
      })
      this.search()
    this.changeRadio('0')
    },
    methods: {
    changeRadio (e) {
      if (e === '0') {
        this.searchForm.startTime = timeForMat(0)[0]
        this.searchForm.endTime = timeForMat(0)[1]
        this.time = timeForMat(0)
      } else if (e === '1') {
        this.searchForm.startTime = timeForMat(6)[0]
        this.searchForm.endTime = timeForMat(6)[1]
        this.time = timeForMat(6)
      } else if (e === '2') {
        this.searchForm.startTime = timeForMat(29)[0]
        this.searchForm.endTime = timeForMat(29)[1]
        this.time = timeForMat(29)
      }
      this.search()
    },
      seleTime (e) {
        this.searchForm.startDate = e[0]
        this.searchForm.endDate = e[1]
      this.searchForm.radio = null
        this.search()
      },
      reset () {