Skip to content

Commit 1eefa02

Browse files
committed
📖 操作日志的界面实现
1 parent 631c105 commit 1eefa02

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

src/api/system/operatelog/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export type OperateLogV2VO = {
4242
creator: string
4343
creatorName: string
4444
createTime: Date
45-
// 数据扩展-渲染时使用
45+
// 数据扩展渲染时使用
4646
title: string // 操作标题(如果为空则取 name 值)
4747
colSize: number // 变更记录行数
4848
contentStrList: string[]

src/components/AppLinkInput/data.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,6 @@ export const APP_LINK_GROUP_LIST = [
157157
name: '分销中心',
158158
path: '/pages/commission/index'
159159
},
160-
{
161-
name: '申请分销商',
162-
path: '/pages/commission/apply'
163-
},
164160
{
165161
name: '推广商品',
166162
path: '/pages/commission/goods'
@@ -169,10 +165,6 @@ export const APP_LINK_GROUP_LIST = [
169165
name: '分销订单',
170166
path: '/pages/commission/order'
171167
},
172-
{
173-
name: '分享记录',
174-
path: '/pages/commission/share-log'
175-
},
176168
{
177169
name: '我的团队',
178170
path: '/pages/commission/team'
@@ -193,10 +185,6 @@ export const APP_LINK_GROUP_LIST = [
193185
{
194186
name: '申请提现',
195187
path: '/pages/pay/withdraw'
196-
},
197-
{
198-
name: '提现记录',
199-
path: '/pages/pay/withdraw-log'
200188
}
201189
]
202190
},

src/components/OperateLogV2/src/OperateLogV2.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,13 @@ import { formatDate } from '@/utils/formatTime'
4949
import { DICT_TYPE, getDictLabel, getDictObj } from '@/utils/dict'
5050
import { ElTag } from 'element-plus'
5151
52+
defineOptions({ name: 'OperateLogV2' })
53+
5254
const props = defineProps<{
5355
logList: OperateLogV2VO[] // 操作日志列表
5456
}>()
55-
defineOptions({ name: 'OperateLogV2' })
57+
58+
const logDataList = ref<OperateLogV2VO[]>([]) // 操作日志列表
5659
5760
/** 获得 userType 颜色 */
5861
const getUserTypeColor = (type: number) => {
@@ -69,7 +72,7 @@ const getUserTypeColor = (type: number) => {
6972
}
7073
return '#409EFF'
7174
}
72-
const logDataList = ref<OperateLogV2VO[]>([]) // 操作日志列表
75+
7376
// 提取 tag 所需内容和位置
7477
const renderTags = (content: string) => {
7578
let newStr = unref(content).slice() // 去掉引用
@@ -89,6 +92,7 @@ const renderTags = (content: string) => {
8992
})
9093
return [newStr.split(fg), matchStr]
9194
}
95+
9296
const initLog = () => {
9397
logDataList.value = props.logList.map((logItem) => {
9498
const keyValue = renderTags(logItem.action)
@@ -105,6 +109,7 @@ const initLog = () => {
105109
return logItem
106110
})
107111
}
112+
108113
watch(
109114
() => props.logList.length,
110115
(newObj) => {

0 commit comments

Comments
 (0)