Commit ef716990 by 吕明尚

Merge remote-tracking branch 'origin/main'

parents aa7750e7 bb6ab9c0
import request from '@/utils/request'
// 查询扫呗接口调用日志列表
export function listLog(query) {
return request({
url: '/system/saobei/log/list',
method: 'get',
params: query
})
}
// 查询扫呗接口调用日志详细
export function getLog(id) {
return request({
url: '/system/saobei/log/' + id,
method: 'get'
})
}
// 新增扫呗接口调用日志
export function addLog(data) {
return request({
url: '/system/saobei/log',
method: 'post',
data: data
})
}
// 修改扫呗接口调用日志
export function updateLog(data) {
return request({
url: '/system/saobei/log',
method: 'put',
data: data
})
}
// 删除扫呗接口调用日志
export function delLog(id) {
return request({
url: '/system/saobei/log/' + id,
method: 'delete'
})
}
import request from '@/utils/request'
export function statistics() {
return request({
url: '/system/home/statistics',
method: 'get',
})
}
<template>
<el-row :gutter="40" class="panel-group">
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="handleSetLineChartData('newVisitis')">
<div class="card-panel-icon-wrapper icon-people">
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
访客
</div>
<count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" />
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="handleSetLineChartData('messages')">
<div class="card-panel-icon-wrapper icon-message">
<svg-icon icon-class="message" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
消息
</div>
<count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" />
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="handleSetLineChartData('purchases')">
<div class="card-panel-icon-wrapper icon-money">
<svg-icon icon-class="money" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
金额
</div>
<count-to :start-val="0" :end-val="9280" :duration="3200" class="card-panel-num" />
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="handleSetLineChartData('shoppings')">
<div class="card-panel-icon-wrapper icon-shopping">
<svg-icon icon-class="shopping" class-name="card-panel-icon" />
</div>
<div class="card-panel-description">
<div class="card-panel-text">
订单
</div>
<count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num" />
</div>
</div>
</el-col>
</el-row>
</template>
<script>
import CountTo from 'vue-count-to'
export default {
components: {
CountTo
},
methods: {
handleSetLineChartData(type) {
this.$emit('handleSetLineChartData', type)
}
}
}
</script>
<style lang="scss" scoped>
.panel-group {
margin-top: 18px;
.card-panel-col {
margin-bottom: 32px;
}
.card-panel {
height: 108px;
cursor: pointer;
font-size: 12px;
position: relative;
overflow: hidden;
color: #666;
background: #fff;
box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
border-color: rgba(0, 0, 0, .05);
&:hover {
.card-panel-icon-wrapper {
color: #fff;
}
.icon-people {
background: #40c9c6;
}
.icon-message {
background: #36a3f7;
}
.icon-money {
background: #f4516c;
}
.icon-shopping {
background: #34bfa3
}
}
.icon-people {
color: #40c9c6;
}
.icon-message {
color: #36a3f7;
}
.icon-money {
color: #f4516c;
}
.icon-shopping {
color: #34bfa3
}
.card-panel-icon-wrapper {
float: left;
margin: 14px 0 0 14px;
padding: 16px;
transition: all 0.38s ease-out;
border-radius: 6px;
}
.card-panel-icon {
float: left;
font-size: 48px;
}
.card-panel-description {
float: right;
font-weight: bold;
margin: 26px;
margin-left: 0px;
.card-panel-text {
line-height: 18px;
color: rgba(0, 0, 0, 0.45);
font-size: 16px;
margin-bottom: 12px;
}
.card-panel-num {
font-size: 20px;
}
}
}
}
@media (max-width:550px) {
.card-panel-description {
display: none;
}
.card-panel-icon-wrapper {
float: none !important;
width: 100%;
height: 100%;
margin: 0 !important;
.svg-icon {
display: block;
margin: 14px auto !important;
float: none !important;
}
}
}
</style>
<template>
<div class="dashboard-editor-container">
<panel-group @handleSetLineChartData="handleSetLineChartData" />
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
<line-chart :chart-data="lineChartData" />
</el-row>
<panel-group />
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
......@@ -25,54 +21,32 @@
</el-col>
</el-row>
</div>
</template>
<script>
import PanelGroup from './dashboard/PanelGroup'
import LineChart from './dashboard/LineChart'
import RaddarChart from './dashboard/RaddarChart'
import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart'
const lineChartData = {
newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165],
actualData: [120, 82, 91, 154, 162, 140, 145]
},
messages: {
expectedData: [200, 192, 120, 144, 160, 130, 140],
actualData: [180, 160, 151, 106, 145, 150, 130]
},
purchases: {
expectedData: [80, 100, 121, 104, 105, 90, 100],
actualData: [120, 90, 100, 138, 142, 130, 130]
},
shoppings: {
expectedData: [130, 140, 141, 142, 145, 150, 160],
actualData: [120, 82, 91, 154, 162, 140, 130]
}
}
export default {
name: 'Index',
components: {
PanelGroup,
LineChart,
RaddarChart,
PieChart,
BarChart
},
data() {
return {
lineChartData: lineChartData.newVisitis
}
},
methods: {
handleSetLineChartData(type) {
this.lineChartData = lineChartData[type]
}
}
}
</script>
......
<template>
<div class="dashboard-editor-container">
<panel-group @handleSetLineChartData="handleSetLineChartData" />
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
<line-chart :chart-data="lineChartData" />
</el-row>
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<raddar-chart />
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<pie-chart />
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<bar-chart />
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import PanelGroup from './dashboard/PanelGroup'
import LineChart from './dashboard/LineChart'
import RaddarChart from './dashboard/RaddarChart'
import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart'
const lineChartData = {
newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165],
actualData: [120, 82, 91, 154, 162, 140, 145]
},
messages: {
expectedData: [200, 192, 120, 144, 160, 130, 140],
actualData: [180, 160, 151, 106, 145, 150, 130]
},
purchases: {
expectedData: [80, 100, 121, 104, 105, 90, 100],
actualData: [120, 90, 100, 138, 142, 130, 130]
},
shoppings: {
expectedData: [130, 140, 141, 142, 145, 150, 160],
actualData: [120, 82, 91, 154, 162, 140, 130]
}
}
export default {
name: 'Index',
components: {
PanelGroup,
LineChart,
RaddarChart,
PieChart,
BarChart
},
data() {
return {
lineChartData: lineChartData.newVisitis
}
},
methods: {
handleSetLineChartData(type) {
this.lineChartData = lineChartData[type]
}
}
}
</script>
<style lang="scss" scoped>
.dashboard-editor-container {
padding: 32px;
background-color: rgb(240, 242, 245);
position: relative;
.chart-wrapper {
background: #fff;
padding: 16px 16px 0;
margin-bottom: 32px;
}
}
@media (max-width:1024px) {
.chart-wrapper {
padding: 8px;
}
}
</style>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="接口类型" prop="serviceId">
<el-input
v-model="queryParams.serviceId"
placeholder="请输入接口类型"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="扫呗订单号" prop="outTradeNo">
<el-input
v-model="queryParams.outTradeNo"
placeholder="请输入扫呗平台唯一订单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="响应结果" prop="result">
<el-input
v-model="queryParams.result"
placeholder="请输入响应结果:01成功,02失败,00异常无响应"
clearable
@keyup.enter.native="handleQuery"
/>
</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-form-item>
</el-form>
<el-table v-loading="loading" :data="logList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="版本号" align="center" prop="payVer" />
<el-table-column label="支付方式" align="center" prop="payType" />
<el-table-column label="接口类型" align="center" prop="serviceId" />
<el-table-column label="商户号" align="center" prop="merchantNo" />
<el-table-column label="终端号" align="center" prop="terminalId" />
<el-table-column label="终端流水号" align="center" prop="terminalTrace" />
<el-table-column label="终端交易时间" align="center" prop="terminalTime" />
<el-table-column label="扫呗订单号" align="center" prop="outTradeNo" />
<el-table-column label="响应结果" align="center" prop="result" />
<el-table-column label="响应结果描述" align="center" prop="resultMsg" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>详情</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['system:log:remove']"-->
<!-- >删除</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="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="版本号" prop="payVer">
<el-input v-model="form.payVer" placeholder="请输入版本号" />
</el-form-item>
<el-form-item label="接口类型" prop="serviceId">
<el-input v-model="form.serviceId" placeholder="请输入接口类型" />
</el-form-item>
<el-form-item label="商户号" prop="merchantNo">
<el-input v-model="form.merchantNo" placeholder="请输入商户号" />
</el-form-item>
<el-form-item label="终端号" prop="terminalId">
<el-input v-model="form.terminalId" placeholder="请输入终端号" />
</el-form-item>
<el-form-item label="用户手机端IP" prop="terminalIp">
<el-input v-model="form.terminalIp" placeholder="请输入用户手机端IP" />
</el-form-item>
<el-form-item label="终端流水号" prop="terminalTrace">
<el-input v-model="form.terminalTrace" placeholder="请输入终端流水号" />
</el-form-item>
<el-form-item label="终端交易时间" prop="terminalTime">
<el-input v-model="form.terminalTime" placeholder="请输入终端交易时间" />
</el-form-item>
<el-form-item label="扫呗订单号" prop="outTradeNo">
<el-input v-model="form.outTradeNo" placeholder="请输入扫呗平台唯一订单号" />
</el-form-item>
<el-form-item label="请求参数" prop="requestParams">
<el-input v-model="form.requestParams" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="响应参数" prop="responseParams">
<el-input v-model="form.responseParams" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="响应结果" prop="result">
<el-input v-model="form.result" placeholder="请输入响应结果:01成功,02失败,00异常无响应" />
</el-form-item>
<el-form-item label="响应结果描述" prop="resultMsg">
<el-input v-model="form.resultMsg" placeholder="请输入响应结果描述" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="标记" prop="flag">
<el-input v-model="form.flag" placeholder="请输入标记" />
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<script>
import { listLog, getLog, delLog, addLog, updateLog } from "@/api/system/saobeiApiLog";
export default {
name: "SaobeiApiLog",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 扫呗接口调用日志表格数据
logList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
payVer: null,
payType: null,
serviceId: null,
merchantNo: null,
terminalId: null,
terminalIp: null,
terminalTrace: null,
terminalTime: null,
outTradeNo: null,
requestParams: null,
responseParams: null,
result: null,
resultMsg: null,
flag: null
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询扫呗接口调用日志列表 */
getList() {
this.loading = true;
listLog(this.queryParams).then(response => {
this.logList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
payVer: null,
payType: null,
serviceId: null,
merchantNo: null,
terminalId: null,
terminalIp: null,
terminalTrace: null,
terminalTime: null,
outTradeNo: null,
requestParams: null,
responseParams: null,
result: null,
resultMsg: null,
createTime: null,
createBy: null,
updateBy: null,
updateTime: null,
remark: null,
flag: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getLog(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "日志详情";
});
},
}
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment