|
|
|
@ -26,10 +26,10 @@
|
|
|
|
|
|
|
|
|
|
<!-- 操作工具栏 --> |
|
|
|
|
<el-row :gutter="10" class="mb8"> |
|
|
|
|
<el-col :span="1.5"> |
|
|
|
|
<!-- <el-col :span="1.5"> |
|
|
|
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" |
|
|
|
|
v-hasPermi="['farm:log-msg:create']">新增</el-button> |
|
|
|
|
</el-col> |
|
|
|
|
</el-col> --> |
|
|
|
|
<el-col :span="1.5"> |
|
|
|
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" |
|
|
|
|
v-hasPermi="['farm:log-msg:export']">导出</el-button> |
|
|
|
@ -41,8 +41,14 @@
|
|
|
|
|
<el-table v-loading="loading" :data="list"> |
|
|
|
|
<el-table-column label="" align="center" prop="id" /> |
|
|
|
|
<el-table-column label="类型" align="center" prop="type" /> |
|
|
|
|
<el-table-column label="操作" align="center" prop="operation" /> |
|
|
|
|
<el-table-column label="标题" align="center" prop="title" /> |
|
|
|
|
<el-table-column label="用户id" align="center" prop="userId" /> |
|
|
|
|
<el-table-column label="任务内容" align="center" prop="msg" /> |
|
|
|
|
<el-table-column label="用户" align="center" prop="userId"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ userConver(scope.row.userId)}}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ parseTime(scope.row.createTime) }}</span> |
|
|
|
@ -86,6 +92,7 @@
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { createLogMsg, updateLogMsg, deleteLogMsg, getLogMsg, getLogMsgPage, exportLogMsgExcel } from "@/api/farm/logMsg"; |
|
|
|
|
import {listUser} from "@/api/system/user"; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
name: "LogMsg", |
|
|
|
@ -120,7 +127,9 @@ export default {
|
|
|
|
|
form: {}, |
|
|
|
|
// 表单校验 |
|
|
|
|
rules: { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
systemUserList:[] |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
@ -138,8 +147,17 @@ export default {
|
|
|
|
|
this.list = response.data.list; |
|
|
|
|
this.total = response.data.total; |
|
|
|
|
this.loading = false; |
|
|
|
|
this.getSysUserList(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getSysUserList(){ |
|
|
|
|
listUser({ |
|
|
|
|
pageNo:1, |
|
|
|
|
pageSize:200 |
|
|
|
|
}).then(res=>{ |
|
|
|
|
this.systemUserList = res.data.list; |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
/** 取消按钮 */ |
|
|
|
|
cancel() { |
|
|
|
|
this.open = false; |
|
|
|
@ -230,6 +248,10 @@ export default {
|
|
|
|
|
this.$download.excel(response, '${table.classComment}.xls'); |
|
|
|
|
this.exportLoading = false; |
|
|
|
|
}).catch(() => {}); |
|
|
|
|
}, |
|
|
|
|
userConver(userId){ |
|
|
|
|
let sa = this.systemUserList.filter(user => user.id == userId)[0]; |
|
|
|
|
return sa == undefined ? userId : sa.nickname; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|