diff --git a/src/api/model/user.js b/src/api/model/user.js
index 6cdf90a..c333644 100644
--- a/src/api/model/user.js
+++ b/src/api/model/user.js
@@ -86,6 +86,13 @@ export default {
return await http.post(this.url, params);
},
},
+ log:{
+ url: `${config.API_URL}/user.log.list`,
+ name: "用户操作日志",
+ get: async function (params) {
+ return await http.post(this.url, params);
+ },
+ },
subscribe:{
list:{
url: `${config.API_URL}/messages.subscribe.list`,
diff --git a/src/views/userCenter/user/logs.vue b/src/views/userCenter/user/logs.vue
index c0363a8..24bffb5 100644
--- a/src/views/userCenter/user/logs.vue
+++ b/src/views/userCenter/user/logs.vue
@@ -1,15 +1,18 @@
-
-
-
-
-
-
- 成功
-
-
+
+
+
+
+
+
+
@@ -17,24 +20,58 @@
export default {
data() {
return {
- data: [
- {
- title: "修改用户 lolowan",
- ip: "211.187.11.18",
- code: "成功",
- time: "2022-10-10 08:41:17"
- },
- {
- title: "用户登录",
- ip: "211.187.11.18",
- code: "成功",
- time: "2022-10-10 08:21:51"
- }
- ]
+ size:"small",
+ list:{
+ apiObj: this.$API.user.log,
+ column: [],
+ },
+
+ searchList:[
+ {name:'操作日期',type:'date',code:'created_at'},
+ {name:'操作功能',type:'multiple',code:'type', data:[], placeholder:"请选择功能",show:true},
+ {name:'关键字',type:'text',code:['remark','ip','location','creator_name'],keyword:true,show:true},
+ ],
+ params: {},
}
+ },
+ mounted() {
+
+ },
+ methods:{
+ getSelectData(item){
+ let {data,params} = item;
+ this.params = params;
+ if(data.code == "type"){
+ this.getTypeList(data,params)
+ }
+ },
+ async getTypeList(data,params) {
+ const res = await this.$API.system.log.operation.post(params);
+ if(res.code == 200){
+ res.data.forEach(item=>{
+ item.id = item.type;
+ item.label = item.log_title;
+ })
+ this.searchList.forEach(item=>{
+ if(item.code == data.code){
+ item.data = res.data;
+ }
+ })
+ }
+ },
+
+ upSearch(){
+ this.$refs.table.upData(this.params);
+ },
+ reset(){
+ this.params = {};
+ this.$refs.scSearch.reload();
+ this.$refs.table.reload();
+ },
}
}
-