Merge branch 'master' of https://gitee.com/yudaocode/yudao-ui-admin-vue3 into dev
This commit is contained in:
commit
8f8edc9565
@ -8,11 +8,15 @@ export interface ApiAccessLogVO {
|
|||||||
applicationName: string
|
applicationName: string
|
||||||
requestMethod: string
|
requestMethod: string
|
||||||
requestParams: string
|
requestParams: string
|
||||||
|
responseBody: string
|
||||||
requestUrl: string
|
requestUrl: string
|
||||||
userIp: string
|
userIp: string
|
||||||
userAgent: string
|
userAgent: string
|
||||||
|
operateModule: string
|
||||||
|
operateName: string
|
||||||
|
operateType: number
|
||||||
beginTime: Date
|
beginTime: Date
|
||||||
endTIme: Date
|
endTime: Date
|
||||||
duration: number
|
duration: number
|
||||||
resultCode: number
|
resultCode: number
|
||||||
resultMsg: string
|
resultMsg: string
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
import request from '@/config/axios'
|
|
||||||
|
|
||||||
export interface UReportDataVO {
|
|
||||||
id: number
|
|
||||||
name: string
|
|
||||||
status: number
|
|
||||||
content: string
|
|
||||||
remark: string
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询Ureport2报表分页
|
|
||||||
export const getUReportDataPage = async (params) => {
|
|
||||||
return await request.get({ url: `/report/ureport-data/page`, params })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询Ureport2报表详情
|
|
||||||
export const getUReportData = async (id: number) => {
|
|
||||||
return await request.get({ url: `/report/ureport-data/get?id=` + id })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增Ureport2报表
|
|
||||||
export const createUReportData = async (data: UReportDataVO) => {
|
|
||||||
return await request.post({ url: `/report/ureport-data/create`, data })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改Ureport2报表
|
|
||||||
export const updateUReportData = async (data: UReportDataVO) => {
|
|
||||||
return await request.put({ url: `/report/ureport-data/update`, data })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除Ureport2报表
|
|
||||||
export const deleteUReportData = async (id: number) => {
|
|
||||||
return await request.delete({ url: `/report/ureport-data/delete?id=` + id })
|
|
||||||
}
|
|
||||||
|
|
||||||
// 导出Ureport2报表 Excel
|
|
||||||
export const exportUReportData = async (params) => {
|
|
||||||
return await request.download({ url: `/report/ureport-data/export-excel`, params })
|
|
||||||
}
|
|
@ -2,30 +2,6 @@ import request from '@/config/axios'
|
|||||||
|
|
||||||
export type OperateLogVO = {
|
export type OperateLogVO = {
|
||||||
id: number
|
id: number
|
||||||
userNickname: string
|
|
||||||
traceId: string
|
|
||||||
userId: number
|
|
||||||
module: string
|
|
||||||
name: string
|
|
||||||
type: number
|
|
||||||
content: string
|
|
||||||
exts: Map<String, Object>
|
|
||||||
requestMethod: string
|
|
||||||
requestUrl: string
|
|
||||||
userIp: string
|
|
||||||
userAgent: string
|
|
||||||
javaMethod: string
|
|
||||||
javaMethodArgs: string
|
|
||||||
startTime: Date
|
|
||||||
duration: number
|
|
||||||
resultCode: number
|
|
||||||
resultMsg: string
|
|
||||||
resultData: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type OperateLogV2VO = {
|
|
||||||
id: number
|
|
||||||
userNickname: string
|
|
||||||
traceId: string
|
traceId: string
|
||||||
userType: number
|
userType: number
|
||||||
userId: number
|
userId: number
|
||||||
@ -42,11 +18,6 @@ export type OperateLogV2VO = {
|
|||||||
creator: string
|
creator: string
|
||||||
creatorName: string
|
creatorName: string
|
||||||
createTime: Date
|
createTime: Date
|
||||||
// 数据扩展,渲染时使用
|
|
||||||
title: string // 操作标题(如果为空则取 name 值)
|
|
||||||
colSize: number // 变更记录行数
|
|
||||||
contentStrList: string[]
|
|
||||||
tagsContentList: string[]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询操作日志列表
|
// 查询操作日志列表
|
||||||
@ -54,6 +25,6 @@ export const getOperateLogPage = (params: PageParam) => {
|
|||||||
return request.get({ url: '/system/operate-log/page', params })
|
return request.get({ url: '/system/operate-log/page', params })
|
||||||
}
|
}
|
||||||
// 导出操作日志
|
// 导出操作日志
|
||||||
export const exportOperateLog = (params) => {
|
export const exportOperateLog = (params: any) => {
|
||||||
return request.download({ url: '/system/operate-log/export', params })
|
return request.download({ url: '/system/operate-log/export', params })
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { OperateLogV2VO } from '@/api/system/operatelog'
|
import { OperateLogVO } from '@/api/system/operatelog'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import { DICT_TYPE, getDictLabel, getDictObj } from '@/utils/dict'
|
import { DICT_TYPE, getDictLabel, getDictObj } from '@/utils/dict'
|
||||||
import { ElTag } from 'element-plus'
|
import { ElTag } from 'element-plus'
|
||||||
@ -31,7 +31,7 @@ import { ElTag } from 'element-plus'
|
|||||||
defineOptions({ name: 'OperateLogV2' })
|
defineOptions({ name: 'OperateLogV2' })
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
logList: OperateLogV2VO[] // 操作日志列表
|
logList: OperateLogVO[] // 操作日志列表
|
||||||
}
|
}
|
||||||
|
|
||||||
withDefaults(defineProps<Props>(), {
|
withDefaults(defineProps<Props>(), {
|
||||||
|
@ -112,7 +112,6 @@ export enum DICT_TYPE {
|
|||||||
SYSTEM_ROLE_TYPE = 'system_role_type',
|
SYSTEM_ROLE_TYPE = 'system_role_type',
|
||||||
SYSTEM_DATA_SCOPE = 'system_data_scope',
|
SYSTEM_DATA_SCOPE = 'system_data_scope',
|
||||||
SYSTEM_NOTICE_TYPE = 'system_notice_type',
|
SYSTEM_NOTICE_TYPE = 'system_notice_type',
|
||||||
SYSTEM_OPERATE_TYPE = 'system_operate_type',
|
|
||||||
SYSTEM_LOGIN_TYPE = 'system_login_type',
|
SYSTEM_LOGIN_TYPE = 'system_login_type',
|
||||||
SYSTEM_LOGIN_RESULT = 'system_login_result',
|
SYSTEM_LOGIN_RESULT = 'system_login_result',
|
||||||
SYSTEM_SMS_CHANNEL_CODE = 'system_sms_channel_code',
|
SYSTEM_SMS_CHANNEL_CODE = 'system_sms_channel_code',
|
||||||
@ -135,6 +134,7 @@ export enum DICT_TYPE {
|
|||||||
INFRA_CODEGEN_FRONT_TYPE = 'infra_codegen_front_type',
|
INFRA_CODEGEN_FRONT_TYPE = 'infra_codegen_front_type',
|
||||||
INFRA_CODEGEN_SCENE = 'infra_codegen_scene',
|
INFRA_CODEGEN_SCENE = 'infra_codegen_scene',
|
||||||
INFRA_FILE_STORAGE = 'infra_file_storage',
|
INFRA_FILE_STORAGE = 'infra_file_storage',
|
||||||
|
INFRA_OPERATE_TYPE = 'infra_operate_type',
|
||||||
|
|
||||||
// ========== BPM 模块 ==========
|
// ========== BPM 模块 ==========
|
||||||
BPM_MODEL_FORM_TYPE = 'bpm_model_form_type',
|
BPM_MODEL_FORM_TYPE = 'bpm_model_form_type',
|
||||||
|
@ -64,7 +64,7 @@ import BusinessDetailsHeader from './BusinessDetailsHeader.vue'
|
|||||||
import BusinessDetailsInfo from './BusinessDetailsInfo.vue'
|
import BusinessDetailsInfo from './BusinessDetailsInfo.vue'
|
||||||
import PermissionList from '@/views/crm/permission/components/PermissionList.vue' // 团队成员列表(权限)
|
import PermissionList from '@/views/crm/permission/components/PermissionList.vue' // 团队成员列表(权限)
|
||||||
import { BizTypeEnum } from '@/api/crm/permission'
|
import { BizTypeEnum } from '@/api/crm/permission'
|
||||||
import { OperateLogV2VO } from '@/api/system/operatelog'
|
import { OperateLogVO } from '@/api/system/operatelog'
|
||||||
import { getOperateLogPage } from '@/api/crm/operateLog'
|
import { getOperateLogPage } from '@/api/crm/operateLog'
|
||||||
import BusinessForm from '@/views/crm/business/BusinessForm.vue'
|
import BusinessForm from '@/views/crm/business/BusinessForm.vue'
|
||||||
import CrmTransferForm from '@/views/crm/permission/components/TransferForm.vue'
|
import CrmTransferForm from '@/views/crm/permission/components/TransferForm.vue'
|
||||||
@ -113,7 +113,7 @@ const transfer = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 获取操作日志 */
|
/** 获取操作日志 */
|
||||||
const logList = ref<OperateLogV2VO[]>([]) // 操作日志列表
|
const logList = ref<OperateLogVO[]>([]) // 操作日志列表
|
||||||
const getOperateLog = async (contactId: number) => {
|
const getOperateLog = async (contactId: number) => {
|
||||||
if (!contactId) {
|
if (!contactId) {
|
||||||
return
|
return
|
||||||
|
@ -57,7 +57,7 @@ import PermissionList from '@/views/crm/permission/components/PermissionList.vue
|
|||||||
import CrmTransferForm from '@/views/crm/permission/components/TransferForm.vue'
|
import CrmTransferForm from '@/views/crm/permission/components/TransferForm.vue'
|
||||||
import FollowUpList from '@/views/crm/followup/index.vue'
|
import FollowUpList from '@/views/crm/followup/index.vue'
|
||||||
import { BizTypeEnum } from '@/api/crm/permission'
|
import { BizTypeEnum } from '@/api/crm/permission'
|
||||||
import type { OperateLogV2VO } from '@/api/system/operatelog'
|
import type { OperateLogVO } from '@/api/system/operatelog'
|
||||||
import { getOperateLogPage } from '@/api/crm/operateLog'
|
import { getOperateLogPage } from '@/api/crm/operateLog'
|
||||||
|
|
||||||
defineOptions({ name: 'CrmClueDetail' })
|
defineOptions({ name: 'CrmClueDetail' })
|
||||||
@ -103,7 +103,7 @@ const handleTransform = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 获取操作日志 */
|
/** 获取操作日志 */
|
||||||
const logList = ref<OperateLogV2VO[]>([]) // 操作日志列表
|
const logList = ref<OperateLogVO[]>([]) // 操作日志列表
|
||||||
const getOperateLog = async () => {
|
const getOperateLog = async () => {
|
||||||
const data = await getOperateLogPage({
|
const data = await getOperateLogPage({
|
||||||
bizType: BizTypeEnum.CRM_CLUE,
|
bizType: BizTypeEnum.CRM_CLUE,
|
||||||
|
@ -49,7 +49,7 @@ import ContactDetailsInfo from '@/views/crm/contact/detail/ContactDetailsInfo.vu
|
|||||||
import BusinessList from '@/views/crm/business/components/BusinessList.vue' // 商机列表
|
import BusinessList from '@/views/crm/business/components/BusinessList.vue' // 商机列表
|
||||||
import PermissionList from '@/views/crm/permission/components/PermissionList.vue' // 团队成员列表(权限)
|
import PermissionList from '@/views/crm/permission/components/PermissionList.vue' // 团队成员列表(权限)
|
||||||
import { BizTypeEnum } from '@/api/crm/permission'
|
import { BizTypeEnum } from '@/api/crm/permission'
|
||||||
import { OperateLogV2VO } from '@/api/system/operatelog'
|
import { OperateLogVO } from '@/api/system/operatelog'
|
||||||
import { getOperateLogPage } from '@/api/crm/operateLog'
|
import { getOperateLogPage } from '@/api/crm/operateLog'
|
||||||
import ContactForm from '@/views/crm/contact/ContactForm.vue'
|
import ContactForm from '@/views/crm/contact/ContactForm.vue'
|
||||||
import CrmTransferForm from '@/views/crm/permission/components/TransferForm.vue'
|
import CrmTransferForm from '@/views/crm/permission/components/TransferForm.vue'
|
||||||
@ -88,7 +88,7 @@ const transfer = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 获取操作日志 */
|
/** 获取操作日志 */
|
||||||
const logList = ref<OperateLogV2VO[]>([]) // 操作日志列表
|
const logList = ref<OperateLogVO[]>([]) // 操作日志列表
|
||||||
const getOperateLog = async (contactId: number) => {
|
const getOperateLog = async (contactId: number) => {
|
||||||
if (!contactId) {
|
if (!contactId) {
|
||||||
return
|
return
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||||
import { OperateLogV2VO } from '@/api/system/operatelog'
|
import { OperateLogVO } from '@/api/system/operatelog'
|
||||||
import * as ContractApi from '@/api/crm/contract'
|
import * as ContractApi from '@/api/crm/contract'
|
||||||
import ContractDetailsInfo from './ContractDetailsInfo.vue'
|
import ContractDetailsInfo from './ContractDetailsInfo.vue'
|
||||||
import ContractDetailsHeader from './ContractDetailsHeader.vue'
|
import ContractDetailsHeader from './ContractDetailsHeader.vue'
|
||||||
@ -94,7 +94,7 @@ const getContractData = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 获取操作日志 */
|
/** 获取操作日志 */
|
||||||
const logList = ref<OperateLogV2VO[]>([]) // 操作日志列表
|
const logList = ref<OperateLogVO[]>([]) // 操作日志列表
|
||||||
const getOperateLog = async (contractId: number) => {
|
const getOperateLog = async (contractId: number) => {
|
||||||
if (!contractId) {
|
if (!contractId) {
|
||||||
return
|
return
|
||||||
|
@ -93,7 +93,7 @@ import PermissionList from '@/views/crm/permission/components/PermissionList.vue
|
|||||||
import CrmTransferForm from '@/views/crm/permission/components/TransferForm.vue'
|
import CrmTransferForm from '@/views/crm/permission/components/TransferForm.vue'
|
||||||
import FollowUpList from '@/views/crm/followup/index.vue'
|
import FollowUpList from '@/views/crm/followup/index.vue'
|
||||||
import { BizTypeEnum } from '@/api/crm/permission'
|
import { BizTypeEnum } from '@/api/crm/permission'
|
||||||
import type { OperateLogV2VO } from '@/api/system/operatelog'
|
import type { OperateLogVO } from '@/api/system/operatelog'
|
||||||
import { getOperateLogPage } from '@/api/crm/operateLog'
|
import { getOperateLogPage } from '@/api/crm/operateLog'
|
||||||
import CustomerDistributeForm from '@/views/crm/customer/pool/CustomerDistributeForm.vue'
|
import CustomerDistributeForm from '@/views/crm/customer/pool/CustomerDistributeForm.vue'
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ const handlePutPool = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 获取操作日志 */
|
/** 获取操作日志 */
|
||||||
const logList = ref<OperateLogV2VO[]>([]) // 操作日志列表
|
const logList = ref<OperateLogVO[]>([]) // 操作日志列表
|
||||||
const getOperateLog = async () => {
|
const getOperateLog = async () => {
|
||||||
if (!customerId.value) {
|
if (!customerId.value) {
|
||||||
return
|
return
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||||
import { OperateLogV2VO } from '@/api/system/operatelog'
|
import { OperateLogVO } from '@/api/system/operatelog'
|
||||||
import * as ProductApi from '@/api/crm/product'
|
import * as ProductApi from '@/api/crm/product'
|
||||||
import ProductDetailsHeader from '@/views/crm/product/detail/ProductDetailsHeader.vue'
|
import ProductDetailsHeader from '@/views/crm/product/detail/ProductDetailsHeader.vue'
|
||||||
import ProductDetailsInfo from '@/views/crm/product/detail/ProductDetailsInfo.vue'
|
import ProductDetailsInfo from '@/views/crm/product/detail/ProductDetailsInfo.vue'
|
||||||
@ -40,7 +40,7 @@ const getProductData = async (id: number) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 获取操作日志 */
|
/** 获取操作日志 */
|
||||||
const logList = ref<OperateLogV2VO[]>([]) // 操作日志列表
|
const logList = ref<OperateLogVO[]>([]) // 操作日志列表
|
||||||
const getOperateLog = async (productId: number) => {
|
const getOperateLog = async (productId: number) => {
|
||||||
if (!productId) {
|
if (!productId) {
|
||||||
return
|
return
|
||||||
|
@ -34,7 +34,7 @@ import ReceivableDetailsHeader from './ReceivableDetailsHeader.vue'
|
|||||||
import ReceivableDetailsInfo from './ReceivableDetailsInfo.vue'
|
import ReceivableDetailsInfo from './ReceivableDetailsInfo.vue'
|
||||||
import PermissionList from '@/views/crm/permission/components/PermissionList.vue' // 团队成员列表(权限)
|
import PermissionList from '@/views/crm/permission/components/PermissionList.vue' // 团队成员列表(权限)
|
||||||
import { BizTypeEnum } from '@/api/crm/permission'
|
import { BizTypeEnum } from '@/api/crm/permission'
|
||||||
import { OperateLogV2VO } from '@/api/system/operatelog'
|
import { OperateLogVO } from '@/api/system/operatelog'
|
||||||
import { getOperateLogPage } from '@/api/crm/operateLog'
|
import { getOperateLogPage } from '@/api/crm/operateLog'
|
||||||
import ReceivableForm from '@/views/crm/receivable/ReceivableForm.vue'
|
import ReceivableForm from '@/views/crm/receivable/ReceivableForm.vue'
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ const openForm = (type: string, id?: number) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 获取操作日志 */
|
/** 获取操作日志 */
|
||||||
const logList = ref<OperateLogV2VO[]>([]) // 操作日志列表
|
const logList = ref<OperateLogVO[]>([]) // 操作日志列表
|
||||||
const getOperateLog = async (receivableId: number) => {
|
const getOperateLog = async (receivableId: number) => {
|
||||||
if (!receivableId) {
|
if (!receivableId) {
|
||||||
return
|
return
|
||||||
|
@ -37,7 +37,7 @@ import ReceivablePlanDetailsHeader from './ReceivablePlanDetailsHeader.vue'
|
|||||||
import ReceivablePlanDetailsInfo from './ReceivablePlanDetailsInfo.vue'
|
import ReceivablePlanDetailsInfo from './ReceivablePlanDetailsInfo.vue'
|
||||||
import PermissionList from '@/views/crm/permission/components/PermissionList.vue' // 团队成员列表(权限)
|
import PermissionList from '@/views/crm/permission/components/PermissionList.vue' // 团队成员列表(权限)
|
||||||
import { BizTypeEnum } from '@/api/crm/permission'
|
import { BizTypeEnum } from '@/api/crm/permission'
|
||||||
import { OperateLogV2VO } from '@/api/system/operatelog'
|
import { OperateLogVO } from '@/api/system/operatelog'
|
||||||
import { getOperateLogPage } from '@/api/crm/operateLog'
|
import { getOperateLogPage } from '@/api/crm/operateLog'
|
||||||
import ReceivablePlanForm from '@/views/crm/receivable/plan/ReceivablePlanForm.vue'
|
import ReceivablePlanForm from '@/views/crm/receivable/plan/ReceivablePlanForm.vue'
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ const openForm = (type: string, id?: number) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 获取操作日志 */
|
/** 获取操作日志 */
|
||||||
const logList = ref<OperateLogV2VO[]>([]) // 操作日志列表
|
const logList = ref<OperateLogVO[]>([]) // 操作日志列表
|
||||||
const getOperateLog = async (receivablePlanId: number) => {
|
const getOperateLog = async (receivablePlanId: number) => {
|
||||||
if (!receivablePlanId) {
|
if (!receivablePlanId) {
|
||||||
return
|
return
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
<el-descriptions-item label="请求参数">
|
<el-descriptions-item label="请求参数">
|
||||||
{{ detailData.requestParams }}
|
{{ detailData.requestParams }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="请求结果">
|
||||||
|
{{ detailData.responseBody }}
|
||||||
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="请求时间">
|
<el-descriptions-item label="请求时间">
|
||||||
{{ formatDate(detailData.beginTime) }} ~ {{ formatDate(detailData.endTime) }}
|
{{ formatDate(detailData.beginTime) }} ~ {{ formatDate(detailData.endTime) }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@ -36,6 +39,15 @@
|
|||||||
失败 | {{ detailData.resultCode }} | {{ detailData.resultMsg }}
|
失败 | {{ detailData.resultCode }} | {{ detailData.resultMsg }}
|
||||||
</div>
|
</div>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="操作模块">
|
||||||
|
{{ detailData.operateModule }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="操作名">
|
||||||
|
{{ detailData.operateName }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="操作名">
|
||||||
|
<dict-tag :type="DICT_TYPE.INFRA_OPERATE_TYPE" :value="detailData.operateType" />
|
||||||
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
|
@ -91,16 +91,16 @@
|
|||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="日志编号" align="center" prop="id" />
|
<el-table-column label="日志编号" align="center" prop="id" width="100" fix="right" />
|
||||||
<el-table-column label="用户编号" align="center" prop="userId" />
|
<el-table-column label="用户编号" align="center" prop="userId" />
|
||||||
<el-table-column label="用户类型" align="center" prop="userType">
|
<el-table-column label="用户类型" align="center" prop="userType">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.USER_TYPE" :value="scope.row.userType" />
|
<dict-tag :type="DICT_TYPE.USER_TYPE" :value="scope.row.userType" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="应用名" align="center" prop="applicationName" />
|
<el-table-column label="应用名" align="center" prop="applicationName" width="150" />
|
||||||
<el-table-column label="请求方法" align="center" prop="requestMethod" width="80" />
|
<el-table-column label="请求方法" align="center" prop="requestMethod" width="80" />
|
||||||
<el-table-column label="请求地址" align="center" prop="requestUrl" width="250" />
|
<el-table-column label="请求地址" align="center" prop="requestUrl" width="500" />
|
||||||
<el-table-column label="请求时间" align="center" prop="beginTime" width="180">
|
<el-table-column label="请求时间" align="center" prop="beginTime" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ formatDate(scope.row.beginTime) }}</span>
|
<span>{{ formatDate(scope.row.beginTime) }}</span>
|
||||||
@ -114,7 +114,14 @@
|
|||||||
{{ scope.row.resultCode === 0 ? '成功' : '失败(' + scope.row.resultMsg + ')' }}
|
{{ scope.row.resultCode === 0 ? '成功' : '失败(' + scope.row.resultMsg + ')' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作模块" align="center" prop="operateModule" width="180" />
|
||||||
|
<el-table-column label="操作名" align="center" prop="operateName" width="180" />
|
||||||
|
<el-table-column label="操作类型" align="center" prop="operateType">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :type="DICT_TYPE.INFRA_OPERATE_TYPE" :value="scope.row.operateType" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" fixed="right" width="60">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
|
@ -1,113 +0,0 @@
|
|||||||
<template>
|
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible">
|
|
||||||
<el-form
|
|
||||||
ref="formRef"
|
|
||||||
:model="formData"
|
|
||||||
:rules="formRules"
|
|
||||||
label-width="100px"
|
|
||||||
v-loading="formLoading"
|
|
||||||
>
|
|
||||||
<el-form-item label="文件名称" prop="name">
|
|
||||||
<el-input v-model="formData.name" placeholder="请输入文件名称" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="status">
|
|
||||||
<el-select v-model="formData.status" placeholder="请选择状态">
|
|
||||||
<el-option
|
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="文件内容" prop="content">
|
|
||||||
<Editor v-model="formData.content" height="150px" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="formData.remark" placeholder="请输入备注" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
|
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
||||||
</template>
|
|
||||||
</Dialog>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
|
||||||
import * as UReportDataApi from '@/api/report/ureport'
|
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
|
||||||
const message = useMessage() // 消息弹窗
|
|
||||||
|
|
||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
|
||||||
const dialogTitle = ref('') // 弹窗的标题
|
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
|
||||||
const formData = ref({
|
|
||||||
id: undefined,
|
|
||||||
name: undefined,
|
|
||||||
status: undefined,
|
|
||||||
content: undefined,
|
|
||||||
remark: undefined,
|
|
||||||
})
|
|
||||||
const formRules = reactive({
|
|
||||||
name: [{ required: true, message: '文件名称不能为空', trigger: 'blur' }],
|
|
||||||
status: [{ required: true, message: '状态不能为空', trigger: 'change' }],
|
|
||||||
})
|
|
||||||
const formRef = ref() // 表单 Ref
|
|
||||||
|
|
||||||
/** 打开弹窗 */
|
|
||||||
const open = async (type: string, id?: number) => {
|
|
||||||
dialogVisible.value = true
|
|
||||||
dialogTitle.value = t('action.' + type)
|
|
||||||
formType.value = type
|
|
||||||
resetForm()
|
|
||||||
// 修改时,设置数据
|
|
||||||
if (id) {
|
|
||||||
formLoading.value = true
|
|
||||||
try {
|
|
||||||
formData.value = await UReportDataApi.getUReportData(id)
|
|
||||||
} finally {
|
|
||||||
formLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
||||||
|
|
||||||
/** 提交表单 */
|
|
||||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
|
||||||
const submitForm = async () => {
|
|
||||||
// 校验表单
|
|
||||||
await formRef.value.validate()
|
|
||||||
// 提交请求
|
|
||||||
formLoading.value = true
|
|
||||||
try {
|
|
||||||
const data = formData.value as unknown as UReportDataApi.UReportDataVO
|
|
||||||
if (formType.value === 'create') {
|
|
||||||
await UReportDataApi.createUReportData(data)
|
|
||||||
message.success(t('common.createSuccess'))
|
|
||||||
} else {
|
|
||||||
await UReportDataApi.updateUReportData(data)
|
|
||||||
message.success(t('common.updateSuccess'))
|
|
||||||
}
|
|
||||||
dialogVisible.value = false
|
|
||||||
// 发送操作成功的事件
|
|
||||||
emit('success')
|
|
||||||
} finally {
|
|
||||||
formLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 重置表单 */
|
|
||||||
const resetForm = () => {
|
|
||||||
formData.value = {
|
|
||||||
id: undefined,
|
|
||||||
name: undefined,
|
|
||||||
status: undefined,
|
|
||||||
content: undefined,
|
|
||||||
remark: undefined,
|
|
||||||
}
|
|
||||||
formRef.value?.resetFields()
|
|
||||||
}
|
|
||||||
</script>
|
|
@ -1,13 +0,0 @@
|
|||||||
<template>
|
|
||||||
<ContentWrap>
|
|
||||||
<IFrame :src="src" />
|
|
||||||
</ContentWrap>
|
|
||||||
</template>
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { getAccessToken } from '@/utils/auth'
|
|
||||||
|
|
||||||
defineOptions({ name: 'UReportData' })
|
|
||||||
|
|
||||||
const BASE_URL = import.meta.env.VITE_BASE_URL
|
|
||||||
const src = ref(BASE_URL + '/ureport/designer?token=' + getAccessToken())
|
|
||||||
</script>
|
|
@ -1,220 +0,0 @@
|
|||||||
<template>
|
|
||||||
<ContentWrap>
|
|
||||||
<!-- 搜索工作栏 -->
|
|
||||||
<el-form
|
|
||||||
class="-mb-15px"
|
|
||||||
:model="queryParams"
|
|
||||||
ref="queryFormRef"
|
|
||||||
:inline="true"
|
|
||||||
label-width="68px"
|
|
||||||
>
|
|
||||||
<el-form-item label="文件名称" prop="name">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.name"
|
|
||||||
placeholder="请输入文件名称"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
class="!w-240px"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="状态" prop="status">
|
|
||||||
<el-select
|
|
||||||
v-model="queryParams.status"
|
|
||||||
placeholder="请选择状态"
|
|
||||||
clearable
|
|
||||||
class="!w-240px"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.remark"
|
|
||||||
placeholder="请输入备注"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
class="!w-240px"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="创建时间" prop="createTime">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="queryParams.createTime"
|
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
|
||||||
type="daterange"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
|
||||||
class="!w-240px"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
|
||||||
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
@click="openForm('create')"
|
|
||||||
v-hasPermi="['report:ureport-data:create']"
|
|
||||||
>
|
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
@click="handleExport"
|
|
||||||
:loading="exportLoading"
|
|
||||||
v-hasPermi="['report:ureport-data:export']"
|
|
||||||
>
|
|
||||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
|
||||||
</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</ContentWrap>
|
|
||||||
|
|
||||||
<!-- 列表 -->
|
|
||||||
<ContentWrap>
|
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
|
||||||
<el-table-column label="ID" align="center" prop="id" />
|
|
||||||
<el-table-column label="文件名称" align="center" prop="name" />
|
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="文件内容" align="center" prop="content" />
|
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
|
||||||
<el-table-column
|
|
||||||
label="创建时间"
|
|
||||||
align="center"
|
|
||||||
prop="createTime"
|
|
||||||
:formatter="dateFormatter"
|
|
||||||
width="180px"
|
|
||||||
/>
|
|
||||||
<el-table-column label="操作" align="center">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
@click="openForm('update', scope.row.id)"
|
|
||||||
v-hasPermi="['report:ureport-data:update']"
|
|
||||||
>
|
|
||||||
编辑
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
type="danger"
|
|
||||||
@click="handleDelete(scope.row.id)"
|
|
||||||
v-hasPermi="['report:ureport-data:delete']"
|
|
||||||
>
|
|
||||||
删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<!-- 分页 -->
|
|
||||||
<Pagination
|
|
||||||
:total="total"
|
|
||||||
v-model:page="queryParams.pageNo"
|
|
||||||
v-model:limit="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
</ContentWrap>
|
|
||||||
|
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
|
||||||
<UReportDataForm ref="formRef" @success="getList" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
|
||||||
import download from '@/utils/download'
|
|
||||||
import * as UReportDataApi from '@/api/report/ureport'
|
|
||||||
import UReportDataForm from './UReportDataForm.vue'
|
|
||||||
|
|
||||||
defineOptions({ name: 'UReportData' })
|
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
|
||||||
const { t } = useI18n() // 国际化
|
|
||||||
|
|
||||||
const loading = ref(true) // 列表的加载中
|
|
||||||
const list = ref([]) // 列表的数据
|
|
||||||
const total = ref(0) // 列表的总页数
|
|
||||||
const queryParams = reactive({
|
|
||||||
pageNo: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
name: null,
|
|
||||||
status: null,
|
|
||||||
remark: null,
|
|
||||||
createTime: [],
|
|
||||||
})
|
|
||||||
const queryFormRef = ref() // 搜索的表单
|
|
||||||
const exportLoading = ref(false) // 导出的加载中
|
|
||||||
|
|
||||||
/** 查询列表 */
|
|
||||||
const getList = async () => {
|
|
||||||
loading.value = true
|
|
||||||
try {
|
|
||||||
const data = await UReportDataApi.getUReportDataPage(queryParams)
|
|
||||||
list.value = data.list
|
|
||||||
total.value = data.total
|
|
||||||
} finally {
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
const handleQuery = () => {
|
|
||||||
queryParams.pageNo = 1
|
|
||||||
getList()
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
const resetQuery = () => {
|
|
||||||
queryFormRef.value.resetFields()
|
|
||||||
handleQuery()
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 添加/修改操作 */
|
|
||||||
const formRef = ref()
|
|
||||||
const openForm = (type: string, id?: number) => {
|
|
||||||
formRef.value.open(type, id)
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
const handleDelete = async (id: number) => {
|
|
||||||
try {
|
|
||||||
// 删除的二次确认
|
|
||||||
await message.delConfirm()
|
|
||||||
// 发起删除
|
|
||||||
await UReportDataApi.deleteUReportData(id)
|
|
||||||
message.success(t('common.delSuccess'))
|
|
||||||
// 刷新列表
|
|
||||||
await getList()
|
|
||||||
} catch {}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
const handleExport = async () => {
|
|
||||||
try {
|
|
||||||
// 导出的二次确认
|
|
||||||
await message.exportConfirm()
|
|
||||||
// 发起导出
|
|
||||||
exportLoading.value = true
|
|
||||||
const data = await UReportDataApi.exportUReportData(queryParams)
|
|
||||||
download.excel(data, 'Ureport2报表.xls')
|
|
||||||
} catch {
|
|
||||||
} finally {
|
|
||||||
exportLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 初始化 **/
|
|
||||||
onMounted(() => {
|
|
||||||
getList()
|
|
||||||
})
|
|
||||||
</script>
|
|
@ -4,14 +4,14 @@
|
|||||||
<el-descriptions-item label="日志主键" min-width="120">
|
<el-descriptions-item label="日志主键" min-width="120">
|
||||||
{{ detailData.id }}
|
{{ detailData.id }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="链路追踪">
|
<el-descriptions-item label="链路追踪" v-if="detailData.traceId">
|
||||||
{{ detailData.traceId }}
|
{{ detailData.traceId }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="操作人编号">
|
<el-descriptions-item label="操作人编号">
|
||||||
{{ detailData.userId }}
|
{{ detailData.userId }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="操作人名字">
|
<el-descriptions-item label="操作人名字">
|
||||||
{{ detailData.userNickname }}
|
{{ detailData.userName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="操作人 IP">
|
<el-descriptions-item label="操作人 IP">
|
||||||
{{ detailData.userIp }}
|
{{ detailData.userIp }}
|
||||||
@ -20,39 +20,25 @@
|
|||||||
{{ detailData.userAgent }}
|
{{ detailData.userAgent }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="操作模块">
|
<el-descriptions-item label="操作模块">
|
||||||
{{ detailData.module }}
|
{{ detailData.type }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="操作名">
|
<el-descriptions-item label="操作名">
|
||||||
{{ detailData.name }}
|
{{ detailData.subType }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item v-if="detailData.content" label="操作内容">
|
<el-descriptions-item label="操作内容">
|
||||||
{{ detailData.content }}
|
{{ detailData.action }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item v-if="detailData.exts" label="操作拓展参数">
|
<el-descriptions-item v-if="detailData.extra" label="操作拓展参数">
|
||||||
{{ detailData.exts }}
|
{{ detailData.extra }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="请求 URL">
|
<el-descriptions-item label="请求 URL">
|
||||||
{{ detailData.requestMethod }} {{ detailData.requestUrl }}
|
{{ detailData.requestMethod }} {{ detailData.requestUrl }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="Java 方法名">
|
|
||||||
{{ detailData.javaMethod }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="Java 方法参数">
|
|
||||||
{{ detailData.javaMethodArgs }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="操作时间">
|
<el-descriptions-item label="操作时间">
|
||||||
{{ formatDate(detailData.startTime) }}
|
{{ formatDate(detailData.createTime) }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="执行时长">{{ detailData.duration }} ms</el-descriptions-item>
|
<el-descriptions-item label="业务编号">
|
||||||
<el-descriptions-item label="操作结果">
|
{{ detailData.bizId }}
|
||||||
<div v-if="detailData.resultCode === 0">正常</div>
|
|
||||||
<div v-else>失败({{ detailData.resultCode }})</div>
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item v-if="detailData.resultCode === 0" label="操作结果">
|
|
||||||
{{ detailData.resultData }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item v-if="detailData.resultCode > 0" label="失败提示">
|
|
||||||
{{ detailData.resultMsg }}
|
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
@ -10,58 +10,65 @@
|
|||||||
:inline="true"
|
:inline="true"
|
||||||
label-width="68px"
|
label-width="68px"
|
||||||
>
|
>
|
||||||
<el-form-item label="系统模块" prop="module">
|
<el-form-item label="操作人" prop="userId">
|
||||||
<el-input
|
|
||||||
v-model="queryParams.module"
|
|
||||||
placeholder="请输入系统模块"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
class="!w-240px"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="操作人员" prop="userNickname">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.userNickname"
|
|
||||||
placeholder="请输入操作人员"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
class="!w-240px"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="操作类型" prop="type">
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.type"
|
v-model="queryParams.userId"
|
||||||
placeholder="请选择操作类型"
|
multiple
|
||||||
clearable
|
placeholder="请输入操作人员"
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_OPERATE_TYPE)"
|
v-for="user in userList"
|
||||||
:key="dict.value"
|
:key="user.id"
|
||||||
:label="dict.label"
|
:label="user.nickname"
|
||||||
:value="dict.value"
|
:value="user.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="操作状态" prop="success">
|
<el-form-item label="操作模块" prop="type">
|
||||||
<el-select
|
<el-input
|
||||||
v-model="queryParams.success"
|
v-model="queryParams.type"
|
||||||
placeholder="请选择操作状态"
|
placeholder="请输入操作模块"
|
||||||
clearable
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
>
|
/>
|
||||||
<el-option key="true" label="成功" :value="true" />
|
|
||||||
<el-option key="false" label="失败" :value="false" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="操作时间" prop="startTime">
|
<el-form-item label="操作模块" prop="subType">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.subType"
|
||||||
|
placeholder="请输入操作模块"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="操作内容" prop="action">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.action"
|
||||||
|
placeholder="请输入操作名"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
class="!w-240px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="操作时间" prop="createTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="queryParams.startTime"
|
v-model="queryParams.createTime"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||||
|
class="!w-220px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="业务编号" prop="bizId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.bizId"
|
||||||
|
placeholder="请输入业务编号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
class="!w-240px"
|
class="!w-240px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -84,33 +91,21 @@
|
|||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="日志编号" align="center" prop="id" />
|
<el-table-column label="日志编号" align="center" prop="id" width="100" />
|
||||||
<el-table-column label="操作模块" align="center" prop="module" width="180" />
|
<el-table-column label="操作人" align="center" prop="userName" width="120" />
|
||||||
<el-table-column label="操作名" align="center" prop="name" width="180" />
|
<el-table-column label="操作模块" align="center" prop="type" width="120" />
|
||||||
<el-table-column label="操作类型" align="center" prop="type">
|
<el-table-column label="操作名" align="center" prop="subType" width="160" />
|
||||||
<template #default="scope">
|
<el-table-column label="操作内容" align="center" prop="action" />
|
||||||
<dict-tag :type="DICT_TYPE.SYSTEM_OPERATE_TYPE" :value="scope.row.type" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作人" align="center" prop="userNickname" />
|
|
||||||
<el-table-column label="操作结果" align="center" prop="status">
|
|
||||||
<template #default="scope">
|
|
||||||
<span>{{ scope.row.resultCode === 0 ? '成功' : '失败' }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作时间"
|
label="操作时间"
|
||||||
align="center"
|
align="center"
|
||||||
prop="startTime"
|
prop="createTime"
|
||||||
width="180"
|
width="180"
|
||||||
:formatter="dateFormatter"
|
:formatter="dateFormatter"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="执行时长" align="center" prop="startTime">
|
<el-table-column label="业务编号" align="center" prop="bizId" width="120" />
|
||||||
<template #default="scope">
|
<el-table-column label="IP" align="center" prop="userIp" width="120" />
|
||||||
<span>{{ scope.row.duration }} ms</span>
|
<el-table-column label="操作" align="center" fixed="right" width="60">
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center">
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
@ -136,11 +131,12 @@
|
|||||||
<OperateLogDetail ref="detailRef" />
|
<OperateLogDetail ref="detailRef" />
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
|
||||||
import { dateFormatter } from '@/utils/formatTime'
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import download from '@/utils/download'
|
import download from '@/utils/download'
|
||||||
import * as OperateLogApi from '@/api/system/operatelog'
|
import * as OperateLogApi from '@/api/system/operatelog'
|
||||||
import OperateLogDetail from './OperateLogDetail.vue'
|
import OperateLogDetail from './OperateLogDetail.vue'
|
||||||
|
import * as UserApi from '@/api/system/user'
|
||||||
|
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||||
|
|
||||||
defineOptions({ name: 'SystemOperateLog' })
|
defineOptions({ name: 'SystemOperateLog' })
|
||||||
|
|
||||||
@ -152,11 +148,12 @@ const list = ref([]) // 列表的数据
|
|||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
module: undefined,
|
userId: undefined,
|
||||||
userNickname: undefined,
|
|
||||||
type: undefined,
|
type: undefined,
|
||||||
success: undefined,
|
subType: undefined,
|
||||||
startTime: []
|
action: undefined,
|
||||||
|
createTime: [],
|
||||||
|
bizId: undefined
|
||||||
})
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
const exportLoading = ref(false) // 导出的加载中
|
const exportLoading = ref(false) // 导出的加载中
|
||||||
@ -207,7 +204,9 @@ const handleExport = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
getList()
|
await getList()
|
||||||
|
// 获得用户列表
|
||||||
|
userList.value = await UserApi.getSimpleUserList()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
@click="openForm('create')"
|
@click="openForm('create')"
|
||||||
v-hasPermi="['system:notice:create']"
|
v-hasPermi="['system:post:create']"
|
||||||
>
|
>
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -50,7 +50,7 @@
|
|||||||
plain
|
plain
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
:loading="exportLoading"
|
:loading="exportLoading"
|
||||||
v-hasPermi="['infra:config:export']"
|
v-hasPermi="['infra:post:export']"
|
||||||
>
|
>
|
||||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -102,6 +102,9 @@ const open = async (row: RoleApi.RoleVO) => {
|
|||||||
formData.name = row.name
|
formData.name = row.name
|
||||||
formData.code = row.code
|
formData.code = row.code
|
||||||
formData.dataScope = row.dataScope
|
formData.dataScope = row.dataScope
|
||||||
|
|
||||||
|
await nextTick()
|
||||||
|
// 需要在 DOM 渲染完成后,再设置选中状态
|
||||||
row.dataScopeDeptIds?.forEach((deptId: number) => {
|
row.dataScopeDeptIds?.forEach((deptId: number) => {
|
||||||
treeRef.value.setChecked(deptId, true, false)
|
treeRef.value.setChecked(deptId, true, false)
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user