| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="起止时间" prop="startDate"> |
| | | <el-date-picker |
| | | <!-- <el-date-picker |
| | | @change="seleTime" |
| | | v-model="time" |
| | | type="datetimerange" |
| | |
| | | range-separator="至" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间"> |
| | | </el-date-picker> |
| | | </el-date-picker> --> |
| | | <el-date-picker type="datetime" v-model="searchForm.startDate" value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="请选择开始时间" @change="changeRadio" /> |
| | | <el-date-picker type="datetime" v-model="searchForm.endDate" value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="请选择结束时间" @change="changeRadio" /> |
| | | </el-form-item> |
| | | <el-radio-group v-model="searchForm.radio" size="small" @input="changeRadio"> |
| | | <el-radio-button label="0">当天</el-radio-button> |
| | |
| | | </el-form> |
| | | <!-- 表格和分页 --> |
| | | <template v-slot:table-wrap> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | > |
| | | <el-table v-loading="isWorking.search" :data="tableData.list" stripe> |
| | | <el-table-column prop="name" label="接口名称" min-width="180px"></el-table-column> |
| | | <el-table-column prop="url" label="地址信息" min-width="180px"></el-table-column> |
| | | <el-table-column label="类型" min-width="100px"> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="request" label="请求参数" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaInterfaceLogWindow.open('请求参数', {content: row.request})">查看</el-button> |
| | | <el-button type="text" |
| | | @click="$refs.operaInterfaceLogWindow.open('请求参数', { content: row.request })">查看</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="repose" label="响应参数" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaInterfaceLogWindow.open('响应参数', {content: row.repose})">查看</el-button> |
| | | <el-button type="text" |
| | | @click="$refs.operaInterfaceLogWindow.open('响应参数', { content: row.repose })">查看</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createDate" label="创建时间" min-width="100px"></el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"> |
| | | </pagination> |
| | | </template> |
| | | <!-- 新建/修改 --> |
| | |
| | | if (e === '0') { |
| | | this.searchForm.startDate = timeForMat(0)[0] |
| | | this.searchForm.endDate = timeForMat(0)[1] |
| | | this.time = timeForMat(0) |
| | | } else if (e === '1') { |
| | | this.searchForm.startDate = timeForMat(6)[0] |
| | | this.searchForm.endDate = timeForMat(6)[1] |
| | | this.time = timeForMat(6) |
| | | } else if (e === '2') { |
| | | this.searchForm.startDate = timeForMat(29)[0] |
| | | this.searchForm.endDate = timeForMat(29)[1] |
| | | this.time = timeForMat(29) |
| | | } else { |
| | | this.searchForm.radio = '' |
| | | } |
| | | if (this.searchForm.startDate && this.searchForm.endDate && new Date(this.searchForm.startDate).getTime() > new Date(this.searchForm.endDate).getTime()) { |
| | | this.$message.error('开始时间不能大于结束时间') |
| | | this.searchForm.startDate = '' |
| | | return |
| | | } |
| | | this.search() |
| | | }, |