在资产管理、SKU管理和分类管理中新增操作日志查看功能,支持查看各实体的操作历史记录,同时新增操作日志API接口定义包含查询参数和日志信息类型
This commit is contained in:
@@ -44,16 +44,18 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200" fixed="right">
|
||||
<el-table-column label="操作" width="250" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button size="small" class="op-btn-add" text type="primary" @click="onOpenAddCategory(scope.row)">新增</el-button>
|
||||
<el-button size="small" text type="primary" @click="onOpenEditCategory(scope.row)">修改</el-button>
|
||||
<el-button size="small" text type="info" @click="onViewLog(scope.row)">日志</el-button>
|
||||
<el-button size="small" text type="danger" @click="onRowDel(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<EditCategory ref="editCategoryRef" @getCategoryList="getCategoryList" />
|
||||
<OperationLogDialog ref="operationLogRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -67,6 +69,7 @@ export default {
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||
import EditCategory from './component/editCategory.vue';
|
||||
import OperationLogDialog from '../component/operationLogDialog.vue';
|
||||
import { getCategoryTree, deleteCategory, updateCategoryStatus,listCategories } from '/@/api/assets/category';
|
||||
|
||||
interface CategoryRow {
|
||||
@@ -82,6 +85,7 @@ interface CategoryRow {
|
||||
}
|
||||
|
||||
const editCategoryRef = ref();
|
||||
const operationLogRef = ref();
|
||||
const tableData = reactive({
|
||||
data: [] as CategoryRow[],
|
||||
loading: false,
|
||||
@@ -169,6 +173,11 @@ const onStatusChange = (row: CategoryRow) => {
|
||||
});
|
||||
};
|
||||
|
||||
// 查看日志
|
||||
const onViewLog = (row: CategoryRow) => {
|
||||
operationLogRef.value?.openDialog(row.id);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getCategoryList();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user