📖 操作日志的界面实现

(cherry picked from commit 1eefa02c4c)
pull/420/head
YunaiV 2023-12-30 21:25:08 +08:00 committed by shizhong
parent e2359633dd
commit 6fe6e51b2f
3 changed files with 8 additions and 15 deletions

View File

@ -50,7 +50,7 @@ export type OperateLogV2VO = {
creator: string
creatorName: string
createTime: Date
// 数据扩展-渲染时使用
// 数据扩展渲染时使用
title: string // 操作标题(如果为空则取 name 值)
colSize: number // 变更记录行数
contentStrList: string[]

View File

@ -157,10 +157,6 @@ export const APP_LINK_GROUP_LIST = [
name: '分销中心',
path: '/pages/commission/index'
},
{
name: '申请分销商',
path: '/pages/commission/apply'
},
{
name: '推广商品',
path: '/pages/commission/goods'
@ -169,10 +165,6 @@ export const APP_LINK_GROUP_LIST = [
name: '分销订单',
path: '/pages/commission/order'
},
{
name: '分享记录',
path: '/pages/commission/share-log'
},
{
name: '我的团队',
path: '/pages/commission/team'
@ -193,10 +185,6 @@ export const APP_LINK_GROUP_LIST = [
{
name: '申请提现',
path: '/pages/pay/withdraw'
},
{
name: '提现记录',
path: '/pages/pay/withdraw-log'
}
]
},

View File

@ -49,10 +49,13 @@ import { formatDate } from '@/utils/formatTime'
import { DICT_TYPE, getDictLabel, getDictObj } from '@/utils/dict'
import { ElTag } from 'element-plus'
defineOptions({ name: 'OperateLogV2' })
const props = defineProps<{
logList: OperateLogV2VO[] //
}>()
defineOptions({ name: 'OperateLogV2' })
const logDataList = ref<OperateLogV2VO[]>([]) //
/** 获得 userType 颜色 */
const getUserTypeColor = (type: number) => {
@ -69,7 +72,7 @@ const getUserTypeColor = (type: number) => {
}
return '#409EFF'
}
const logDataList = ref<OperateLogV2VO[]>([]) //
// tag
const renderTags = (content: string) => {
let newStr = unref(content).slice() //
@ -89,6 +92,7 @@ const renderTags = (content: string) => {
})
return [newStr.split(fg), matchStr]
}
const initLog = () => {
logDataList.value = props.logList.map((logItem) => {
const keyValue = renderTags(logItem.action)
@ -105,6 +109,7 @@ const initLog = () => {
return logItem
})
}
watch(
() => props.logList.length,
(newObj) => {