wangsixiang
5 months ago
13 changed files with 1021 additions and 255 deletions
@ -0,0 +1,201 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px"> |
|||
<el-form-item label="接口名称" prop="interfaceName"> |
|||
<el-input |
|||
v-model="queryParams.interfaceName" |
|||
placeholder="请输入任务名称" |
|||
clearable |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="接口所属" prop="interfaceOwnership"> |
|||
<el-select v-model="queryParams.interfaceOwnership" placeholder="请选择接口所属" clearable> |
|||
<el-option |
|||
v-for="dict in dict.type.interface_ownership" |
|||
:key="dict.value" |
|||
:label="dict.label" |
|||
:value="dict.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="操作状态" prop="operationStatus"> |
|||
<el-select v-model="queryParams.operationStatus" placeholder="请选择操作状态" clearable> |
|||
<el-option |
|||
v-for="dict in dict.type.operation_status" |
|||
:key="dict.value" |
|||
:label="dict.label" |
|||
:value="dict.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="时间范围" prop="dateTime"> |
|||
<el-date-picker |
|||
v-model="queryParams.dateTime" |
|||
type="datetimerange" |
|||
format="yyyy-MM-dd HH:mm:ss" |
|||
value-format="yyyy-MM-dd HH:mm:ss" |
|||
range-separator="-" |
|||
@change="handleProcessingTime " |
|||
start-placeholder="开始日期" |
|||
end-placeholder="结束日期"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
|||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
|||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
|
|||
<el-table :data="interfaceData"> |
|||
<el-table-column label="接口名称" align="center" prop="interfaceName"/> |
|||
<el-table-column label="接口所属" align="center" prop="interfaceOwnership"> |
|||
<template slot-scope="scope"> |
|||
<dict-tag :options="dict.type.interface_ownership" :value="scope.row.interfaceOwnership"/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="操作人" align="center" prop="operatorName"/> |
|||
<el-table-column label="操作状态" align="center" prop="operationStatus"> |
|||
<template slot-scope="scope"> |
|||
<dict-tag :options="dict.type.operation_status" :value="scope.row.operationStatus"/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="操作时间" align="center" prop="operationTime"/> |
|||
<el-table-column label="操作"> |
|||
<template slot-scope="scope"> |
|||
<el-button |
|||
type="text" |
|||
@click="handleDetails(scope.row)">详情 |
|||
</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<pagination |
|||
v-show="total>0" |
|||
:total="total" |
|||
:page.sync="queryParams.pageNum" |
|||
:limit.sync="queryParams.pageSize" |
|||
@pagination="getList" |
|||
/> |
|||
|
|||
|
|||
<el-dialog |
|||
title="结果详细" |
|||
:visible.sync="openView" |
|||
width="700px" |
|||
style="margin-top: 30px;margin-bottom: 30px;height: 750px" |
|||
append-to-body |
|||
@close="handleClose"> |
|||
<el-input |
|||
type="textarea" |
|||
readonly |
|||
autosize |
|||
v-model="interfaceResult"> |
|||
</el-input> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button @click="handleClose">关 闭</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import request from "@/utils/request"; |
|||
|
|||
export default { |
|||
components: {}, |
|||
name: "Interface", |
|||
dicts: ['operation_status', 'interface_ownership'], |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 是否显示详细弹出层 |
|||
openView: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
interfaceOwnership: undefined, |
|||
interfaceName: undefined, |
|||
operationStatus: undefined, |
|||
dateTime: undefined, |
|||
startTime: undefined, |
|||
endTime: undefined |
|||
}, |
|||
interfaceData: [], |
|||
interfaceResult: undefined, |
|||
// 表单参数 |
|||
form: {}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
/** 查询外部接口监测列表 */ |
|||
getList() { |
|||
request({ |
|||
url: `/externalInterface/list`, |
|||
method: "get", |
|||
params: this.queryParams, |
|||
}).then((result) => { |
|||
this.total = result.total |
|||
this.interfaceData = result.rows |
|||
}) |
|||
}, |
|||
/** 搜索 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList() |
|||
}, |
|||
/** 重置 */ |
|||
resetQuery() { |
|||
this.resetForm("queryForm"); |
|||
this.handleQuery(); |
|||
}, |
|||
/** 详情按钮 */ |
|||
handleDetails(row) { |
|||
this.openView = true |
|||
try { |
|||
// 尝试解析为JSON对象 |
|||
this.interfaceResult = JSON.stringify(JSON.parse(row.operationResult), null, 2) |
|||
} catch (error) { |
|||
// 解析失败,返回原始字符串 |
|||
this.interfaceResult = row.operationResult |
|||
} |
|||
|
|||
}, |
|||
/** 详情弹窗关闭 */ |
|||
handleClose() { |
|||
this.openView = false |
|||
this.interfaceResult = undefined |
|||
}, |
|||
|
|||
/** 处理时间选择器组件 */ |
|||
handleProcessingTime() { |
|||
if (this.queryParams.dateTime.length > 0) { |
|||
this.queryParams.startTime = this.queryParams.dateTime[0] |
|||
this.queryParams.endTime = this.queryParams.dateTime[1] |
|||
} |
|||
}, |
|||
|
|||
/** 导出按钮操作 */ |
|||
handleExport() { |
|||
this.download('/externalInterface/export', { |
|||
...this.queryParams |
|||
}, '外部接口监测.xlsx') |
|||
} |
|||
|
|||
} |
|||
}; |
|||
</script> |
@ -0,0 +1,74 @@ |
|||
package com.zc.business.domain.export; |
|||
|
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
|
|||
/** |
|||
* 导出收费站统计分析table对象 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-13 |
|||
*/ |
|||
public class SelectTollStationAnalysis extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
|
|||
/** 收费站名称 */ |
|||
@Excel(name = "收费站名称") |
|||
private String facilityName; |
|||
|
|||
/** 封闭 */ |
|||
@Excel(name = "封闭") |
|||
private String facilityClose; |
|||
/** 限行 */ |
|||
@Excel(name = "限行") |
|||
private String facilityRestriction; |
|||
/** 合计 */ |
|||
@Excel(name = "合计") |
|||
private String sum; |
|||
|
|||
public String getFacilityName() { |
|||
return facilityName; |
|||
} |
|||
|
|||
public void setFacilityName(String facilityName) { |
|||
this.facilityName = facilityName; |
|||
} |
|||
|
|||
public String getFacilityClose() { |
|||
return facilityClose; |
|||
} |
|||
|
|||
public void setFacilityClose(String facilityClose) { |
|||
this.facilityClose = facilityClose; |
|||
} |
|||
|
|||
public String getFacilityRestriction() { |
|||
return facilityRestriction; |
|||
} |
|||
|
|||
public void setFacilityRestriction(String facilityRestriction) { |
|||
this.facilityRestriction = facilityRestriction; |
|||
} |
|||
|
|||
public String getSum() { |
|||
return sum; |
|||
} |
|||
|
|||
public void setSum(String sum) { |
|||
this.sum = sum; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this) |
|||
.append("facilityName", facilityName) |
|||
.append("facilityClose", facilityClose) |
|||
.append("facilityRestriction", facilityRestriction) |
|||
.append("sum", sum) |
|||
.toString(); |
|||
} |
|||
} |
Loading…
Reference in new issue