v3.26.0 【优化】分页请求2次;【优化】菜单展开单个代码优化;【优化】操作记录返回结果;【优化】json viewer升级;【优化】S3协议优化;【优化】代码生成字典优化;

This commit is contained in:
zhuoda
2025-08-10 13:02:01 +08:00
parent 8135e0ec10
commit d2c55e35ff
109 changed files with 309 additions and 266 deletions

View File

@@ -149,7 +149,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryData"
@showSizeChange="queryData"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -78,7 +78,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="ajaxQuery"
@showSizeChange="ajaxQuery"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -63,7 +63,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryEmployee"
@showSizeChange="queryEmployee"
:show-total="showTableTotal"
/>
</div>

View File

@@ -75,7 +75,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="ajaxQuery"
@showSizeChange="ajaxQuery"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -102,7 +102,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="ajaxQuery"
@showSizeChange="ajaxQuery"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -53,7 +53,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryViewRecord"
@showSizeChange="queryViewRecord"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -72,7 +72,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryNoticeList"
@showSizeChange="queryNoticeList"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -122,7 +122,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryNoticeList"
@showSizeChange="queryNoticeList"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -107,7 +107,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryData"
@showSizeChange="queryData"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -74,7 +74,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="ajaxQuery"
@showSizeChange="ajaxQuery"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -66,7 +66,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="ajaxQuery"
@showSizeChange="ajaxQuery"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -98,7 +98,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="ajaxQuery"
@showSizeChange="ajaxQuery"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -64,7 +64,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryList"
@showSizeChange="queryList"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -103,7 +103,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryData"
@showSizeChange="queryData"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -79,7 +79,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="ajaxQuery"
@showSizeChange="ajaxQuery"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -88,7 +88,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryHelpDocList"
@showSizeChange="queryHelpDocList"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -49,7 +49,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryViewRecord"
@showSizeChange="queryViewRecord"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -117,7 +117,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryJobList"
@showSizeChange="queryJobList"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -71,7 +71,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryLogList"
@showSizeChange="queryLogList"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -136,7 +136,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryJobList"
@showSizeChange="queryJobList"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -102,7 +102,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="onSearch"
@showSizeChange="onSearch"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -89,7 +89,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="ajaxQuery"
@showSizeChange="ajaxQuery"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -47,7 +47,6 @@
v-model:pageSize="queryParam.pageSize"
:total="total"
@change="queryList"
@showSizeChange="queryList"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -78,7 +78,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryData"
@showSizeChange="queryData"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -12,6 +12,10 @@
<div class="info-box">
<a-row class="smart-margin-top10">
<a-col :span="16">
<a-row class="detail-info">
<a-col :span="12"> 用户id{{ detail.operateUserId }}</a-col>
<a-col :span="12"> 用户名称 {{ detail.operateUserName }}</a-col>
</a-row>
<a-row class="detail-info">
<a-col :span="12"> 请求url {{ detail.url }}</a-col>
<a-col :span="12"> 请求日期 {{ detail.createTime }}</a-col>
@@ -21,8 +25,7 @@
<a-col :span="12"> IP地区 {{ detail.ipRegion }}</a-col>
</a-row>
<a-row class="detail-info">
<a-col :span="12"> 用户id{{ detail.operateUserId }}</a-col>
<a-col :span="12"> 用户名称 {{ detail.operateUserName }}</a-col>
<a-col :span="12"> 客户端 {{ detail.os }} / {{ detail.browser }} {{ detail.device ? '/' + detail.device : detail.device }}</a-col>
</a-row>
</a-col>
<a-col :span="8">
@@ -32,21 +35,26 @@
</a-typography-text>
</a-col>
</a-row>
</div>
<div class="info-box">
<h4>请求明细</h4>
<a-col :span="24"> 方法 {{ detail.method }}</a-col>
<a-col :span="24"> 说明 {{ detail.module }} - {{ detail.content }}</a-col>
<a-row class="detail-info">
<a-col :span="24"> 方法 {{ detail.method }}</a-col>
</a-row>
<a-row class="detail-info">
<a-col :span="24"> 说明 {{ detail.module }} - {{ detail.content }}</a-col>
</a-row>
</div>
<div class="info-box">
<h4>请求参数</h4>
<JsonViewer :value="detail.param ? JSON.parse(detail.param) : ''" theme="jv-dark" copyable boxed sort />
<JsonViewer :value="detail.param ? JSON.parse(detail.param) : ''" :expanded="true" :expandDepth="10" copyable boxed sort theme="light" />
</div>
<div class="info-box" v-if="detail.successFlag">
<h4>返回结果</h4>
<JsonViewer :value="detail.response ? JSON.parse(detail.response) : ''" :expanded="true" :expandDepth="10" copyable boxed sort theme="light" />
</div>
<div class="info-box" v-if="detail.failReason">
<h4>请求失败原因</h4>
<div>
<a-card>
{{ detail.failReason }}
</div>
</a-card>
</div>
</a-modal>
</template>
@@ -57,6 +65,7 @@
import { operateLogApi } from '/@/api/support/operate-log-api';
import { smartSentry } from '/@/lib/smart-sentry';
import { SmartLoading } from '/@/components/framework/smart-loading';
import uaparser from 'ua-parser-js';
defineExpose({
show,
@@ -87,11 +96,16 @@
param: '',
url: '',
});
async function getDetail(operateLogId) {
try {
SmartLoading.show();
let res = await operateLogApi.detail(operateLogId);
detail = Object.assign(detail, res.data);
let ua = uaparser(res.data.userAgent);
detail.browser = ua.browser.name;
detail.os = ua.os.name;
detail.device = ua.device.vendor ? ua.device.vendor + ua.device.model : '';
} catch (e) {
smartSentry.captureError(e);
} finally {
@@ -107,10 +121,11 @@
font-size: 20px;
font-weight: bold;
}
.info-box {
border-bottom: 1px solid #f0f0f0;
padding: 10px 8px;
}
.detail-info {
.ant-col {
line-height: 1.46;
@@ -118,6 +133,7 @@
padding-right: 5px;
}
}
.detail-right-title {
text-align: right;
color: grey;

View File

@@ -14,7 +14,7 @@
<a-input style="width: 150px" v-model:value="queryForm.keywords" placeholder="模块/操作内容" />
</a-form-item>
<a-form-item label="请求关键字" class="smart-query-form-item">
<a-input style="width: 220px" v-model:value="queryForm.requestKeywords" placeholder="请求地址/请求方法/请求参数" />
<a-input style="width: 270px" v-model:value="queryForm.requestKeywords" placeholder="请求地址/请求方法/请求参数/返回结果" />
</a-form-item>
<a-form-item label="用户名称" class="smart-query-form-item">
<a-input style="width: 100px" v-model:value="queryForm.userName" placeholder="用户名称" />
@@ -24,7 +24,7 @@
<a-range-picker @change="changeCreateDate" v-model:value="createDateRange" :presets="defaultChooseTimeRange" style="width: 240px" />
</a-form-item>
<a-form-item label="快速筛选" class="smart-query-form-item">
<a-form-item label="状态:" class="smart-query-form-item">
<a-radio-group v-model:value="queryForm.successFlag" @change="onSearch">
<a-radio-button :value="undefined">全部</a-radio-button>
<a-radio-button :value="true">成功</a-radio-button>
@@ -51,18 +51,23 @@
</a-row>
</a-form>
<a-card size="small" :bordered="false" :hoverable="true" style="height: 100%">
<a-card size="small" :bordered="false" :hoverable="true" >
<a-row justify="end">
<TableOperator class="smart-margin-bottom5" v-model="columns" :tableId="TABLE_ID_CONST.SUPPORT.CONFIG" :refresh="ajaxQuery" />
</a-row>
<a-table size="small" :loading="tableLoading" :dataSource="tableData" :columns="columns" bordered rowKey="operateLogId" :pagination="false">
<template #bodyCell="{ text, record, column }">
<template v-if="column.dataIndex === 'response'">
<a-typography-text v-if="text && text.ok">{{ text ? text.msg : '-' }}</a-typography-text>
<a-typography-text v-else type="warning">{{ text ? text.msg : '-' }}</a-typography-text>
</template>
<template v-if="column.dataIndex === 'successFlag'">
<a-tag :color="text ? 'success' : 'error'">{{ text ? '成功' : '失败' }}</a-tag>
<a-tag :color="text ? 'success' : 'error'">{{ text ? '成功' : '报错' }}</a-tag>
</template>
<template v-if="column.dataIndex === 'userAgent'">
<div>{{ record.browser }} / {{ record.os }} / {{ record.device }}</div>
<div>{{ record.os }} / {{ record.browser }} {{ record.device ? '/' + record.device : record.device }}</div>
</template>
<template v-if="column.dataIndex === 'operateUserType'">
@@ -88,7 +93,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="ajaxQuery"
@showSizeChange="ajaxQuery"
:show-total="(total) => `${total}`"
/>
</div>
@@ -135,14 +139,15 @@
ellipsis: true,
},
{
title: 'IP',
dataIndex: 'ip',
title: '返回结果',
dataIndex: 'response',
ellipsis: true,
},
{
title: 'IP地区',
dataIndex: 'ipRegion',
ellipsis: true,
width: 150,
},
{
title: '客户端',
@@ -150,20 +155,15 @@
ellipsis: true,
},
{
title: '请求方法',
dataIndex: 'method',
ellipsis: true,
},
{
title: '请求结果',
dataIndex: 'successFlag',
width: 80,
},
{
title: '时间',
title: '操作时间',
dataIndex: 'createTime',
width: 150,
},
{
title: '状态',
dataIndex: 'successFlag',
width: 60,
},
{
title: '操作',
dataIndex: 'action',
@@ -212,6 +212,10 @@
let responseModel = await operateLogApi.queryList(queryForm);
for (const e of responseModel.data.list) {
if(e.response){
e.response = JSON.parse(e.response);
}
if (!e.userAgent) {
continue;
}

View File

@@ -32,7 +32,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="ajaxQuery"
@showSizeChange="ajaxQuery"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -63,7 +63,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="ajaxQuery"
@showSizeChange="ajaxQuery"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -75,7 +75,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="ajaxQuery"
@showSizeChange="ajaxQuery"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -68,7 +68,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="ajaxQuery"
@showSizeChange="ajaxQuery"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -94,7 +94,6 @@
v-model:pageSize="params.pageSize"
:total="total"
@change="queryEmployee"
@showSizeChange="queryEmployee"
:show-total="showTableTotal"
/>
</div>

View File

@@ -8,23 +8,24 @@
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
-->
<template>
<a-modal :open="visible" width="600px" :bodyStyle="{height:'480px'}" title="" :closable="false" :maskClosable="true">
<a-row><div style="font-weight:bolder;margin: 0 auto;font-size: 16px">助力卓大抖音1000个粉丝开播写代码🎉🎉</div> </a-row>
<a-row><div style="font-weight:bolder;margin: 20px auto;font-size: 15px">和1024创新实验室一起热爱代码热爱生活永远年轻永远前行🎉🎉</div> </a-row>
<a-modal :open="visible" width="600px" :bodyStyle="{height:'360px'}" title="" :closable="false" :maskClosable="true">
<a-row><div style="font-weight:bolder;margin: 0 auto;font-size: 16px;color: red;">重磅更新国产数据库支持🎉🎉</div> </a-row>
<a-row><div style="font-weight:bolder;margin: 10px auto;font-size: 16px;color: red;">支持达梦人大金仓华为高斯GaussDB 🎉🎉</div> </a-row>
<br />
<div class="app-qr-box">
<div class="app-qr">
<a-image
:width="300"
:width="200"
style="border-radius: 15px;"
src="https://img.smartadmin.1024lab.net/wechat/douyin.png"
src="https://img.smartadmin.1024lab.net/wechat/zhuoda-wechat.jpg"
/>
<span class="qr-desc strong"> 打开抖音APP-点击左上角侧边栏-点击扫一扫-进行关注</span>
<span class="qr-desc strong"> 添加卓大微信备注对应数据库 达梦</span>
</div>
</div>
<template #footer>
<a-button type="primary" @click="hide">知道了</a-button>
<a-button type="default" @click="hide">知道了</a-button>
<a-button danger type="default" @click="goto" target="_blank" href="https://smartadmin.vip/views/other/china-db/">去看看国产数据库了解一下</a-button>
</template>
</a-modal>
</template>
@@ -36,6 +37,9 @@ defineExpose({
});
const visible = ref(true);
function goto(){
}
function show() {
visible.value = true;
}
@@ -64,8 +68,7 @@ defineExpose({
display: flex;
margin-top: 20px;
align-items: center;
font-size: 13px;
color: red;
font-size: 15px;
text-align: center;
overflow-x: hidden;
> img {

View File

@@ -108,7 +108,7 @@
let lunarMonth = lunar.getMonthInChinese();
let lunarDay = lunar.getDayInChinese();
//节气
let jieqi = lunar.getPrevJieQi().getName();
let jieqi = lunar.getJieQi();
let next = lunar.getNextJieQi();
let nextJieqi = next.getName() + ' ' + next.getSolar().toYmd();

View File

@@ -86,7 +86,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryData"
@showSizeChange="queryData"
:show-total="(total) => `${total}`"
/>
</div>

View File

@@ -68,7 +68,6 @@
v-model:pageSize="queryForm.pageSize"
:total="total"
@change="queryRoleEmployee"
@showSizeChange="queryRoleEmployee"
:show-total="showTableTotal"
/>
</div>