Commit c30a6e70 authored by wanglianghe's avatar wanglianghe
parents 3c5f6fde 1cbba058
...@@ -284,15 +284,23 @@ ...@@ -284,15 +284,23 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('操作日志')" name="five"> <el-tab-pane :label="$t('操作日志')" name="five">
<el-table :data="logs"> <el-table :data="logs">
<el-table-column :label="$t('时间')"> <el-table-column :label="$t('时间')" width="150">
<template slot-scope="{row}">{{ parseTime(row.createTime) }}</template> <template slot-scope="{row}">{{ parseTime(row.createTime) }}</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作人')" prop="creatorName"> </el-table-column> <el-table-column :label="$t('操作人')" prop="creatorName" width="150"> </el-table-column>
<el-table-column :label="$t('操作人类型')"> <el-table-column :label="$t('操作人类型')" width="100">
<template slot-scope="{row}">{{ row.userType == 1 ? $t('会员') : $t('管理员') }}</template> <template slot-scope="{row}">{{ row.userType == 1 ? $t('会员') : $t('管理员') }}</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作描述')" prop="msg"></el-table-column> <el-table-column :label="$t('操作描述')" prop="msg" width="300"></el-table-column>
<el-table-column :label="$t('备注')" prop="note"></el-table-column> <el-table-column :label="$t('备注')" prop="note">
<template slot-scope="{row}">
<div v-if="row.note">
<div v-for="item in parseLogNote(row.note)">
{{$t('【{name}】从【{orgValue}】修改为【{newValue}', item)}}
</div>
</div>
</template>
</el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -624,7 +632,7 @@ export default { ...@@ -624,7 +632,7 @@ export default {
}, },
// 加载操作日志 // 加载操作日志
loadLogs(){ loadLogs(){
operateLogPage({orderId: this.orderIdDICT_TYPE, page: 1, rows: 10000}).then(res => { operateLogPage({orderId: this.orderId, page: 1, rows: 10000}).then(res => {
this.logs = res.data.list this.logs = res.data.list
}) })
}, },
...@@ -639,6 +647,11 @@ export default { ...@@ -639,6 +647,11 @@ export default {
getOrderWarehouseIn(this.order.id).then(res => { getOrderWarehouseIn(this.order.id).then(res => {
this.orderWarehouseIn = res.data this.orderWarehouseIn = res.data
}) })
},
// 解析日志node字段
parseLogNote(note){
if(!note) return []
return JSON.parse(note)
} }
} }
}; };
......
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