Commit 060c243e by wusiyi

feat: 操作符管理添加操作日志

parent 99b35126
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
@current-change="onCurrentChange"></el-pagination> @current-change="onCurrentChange"></el-pagination>
</div> </div>
<!-- 弹出层 --> <!-- 新增/编辑 -->
<el-dialog <el-dialog
:close-on-click-modal="false" :close-on-click-modal="false"
:title="is_title == 1 ? '新增' : '编辑'" :title="is_title == 1 ? '新增' : '编辑'"
...@@ -55,12 +55,24 @@ ...@@ -55,12 +55,24 @@
</el-button> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 操作日志 -->
<el-dialog
title="操作日志"
:close-on-click-modal="false"
:visible.sync="noteVisible"
width="500px">
<ul style="color: #333; font-size: 12px; height: 400px; overflow: auto">
<li v-for="(item, index) in logList" :key="index" style="height: 30px">
({{ index + 1 }})、{{ item.userName + ':' + item.msg }}
</li>
</ul>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import axios from '../../common/api/axios' import axios from '../../common/api/axios'
import CustomForm from '@/common/components/base/CustomForm.vue' import CustomForm from '@/common/components/base/CustomForm.vue'
import { mapState } from 'vuex'
import tableVue from '@/common/components/base/tableView.vue' import tableVue from '@/common/components/base/tableView.vue'
export default { export default {
name: 'system_users', name: 'system_users',
...@@ -71,10 +83,8 @@ export default { ...@@ -71,10 +83,8 @@ export default {
data() { data() {
return { return {
is_title: 1, is_title: 1,
ishowForm: false, noteVisible: false,
select: '',
sourceData: [], sourceData: [],
serviceNameList: [],
formData: {}, formData: {},
queryFormData: {}, queryFormData: {},
queryformConfig: [ queryformConfig: [
...@@ -220,14 +230,12 @@ export default { ...@@ -220,14 +230,12 @@ export default {
} }
], ],
dialogVisible: false, dialogVisible: false,
formId: null,
paginationOptions: { paginationOptions: {
pageSize: 100, pageSize: 100,
currentPage: 1, currentPage: 1,
total: 0 total: 0
}, },
details: [],
loading: false loading: false
} }
}, },
...@@ -235,7 +243,6 @@ export default { ...@@ -235,7 +243,6 @@ export default {
this.getList() this.getList()
}, },
computed: { computed: {
...mapState(['reqMenu', 'employee']),
usersTableColumns() { usersTableColumns() {
return [ return [
{ {
...@@ -315,6 +322,13 @@ export default { ...@@ -315,6 +322,13 @@ export default {
onClick={(e) => this.addDialog(item.id, e)}></i> onClick={(e) => this.addDialog(item.id, e)}></i>
</span> </span>
<span title="操作日志" class="icon-view ">
<i
style="color:#409EFF"
class="el-icon-document"
onClick={(e) => this.showLog(item, e)}></i>
</span>
<span title="删除" class="icon-view "> <span title="删除" class="icon-view ">
<i <i
style="color:#F56C6C" style="color:#F56C6C"
...@@ -325,19 +339,6 @@ export default { ...@@ -325,19 +339,6 @@ export default {
) )
} }
] ]
},
funcRoleList() {
if (this.roleList.length > 0) {
return this.roleList.filter((item) => item.type === 'FUNCTION_ROLE')
}
return []
},
dataRoleList() {
if (this.roleList.length > 0) {
return this.roleList.filter((item) => item.type === 'DATA_ROLE')
}
return []
} }
}, },
watch: { watch: {
...@@ -364,14 +365,6 @@ export default { ...@@ -364,14 +365,6 @@ export default {
} }
}, },
setempNo(id) {
for (const iterator of this.employee) {
if (iterator.id === id) {
this.addcurrencyform.empNumber = iterator.empNumber
break
}
}
},
search() { search() {
this.getList() this.getList()
}, },
...@@ -380,7 +373,7 @@ export default { ...@@ -380,7 +373,7 @@ export default {
this.formId = val.row.id this.formId = val.row.id
} }
}, },
// 修改新增 // 修改新增 打开
async addDialog(id, e) { async addDialog(id, e) {
e && e.stopPropagation() e && e.stopPropagation()
this.ishowForm = true this.ishowForm = true
...@@ -397,6 +390,7 @@ export default { ...@@ -397,6 +390,7 @@ export default {
this.dialogVisible = true this.dialogVisible = true
} catch (error) {} } catch (error) {}
}, },
// 表单校验
async checkData() { async checkData() {
const [isValid, postData] = await Promise.all([ const [isValid, postData] = await Promise.all([
new Promise((resolve) => { new Promise((resolve) => {
...@@ -429,7 +423,7 @@ export default { ...@@ -429,7 +423,7 @@ export default {
return { isValid, postData } return { isValid, postData }
}, },
// 新增 // 新增/修改 确认
async addServiceManagement() { async addServiceManagement() {
const isAdd = this.is_title === 1 const isAdd = this.is_title === 1
const url = isAdd const url = isAdd
...@@ -505,6 +499,22 @@ export default { ...@@ -505,6 +499,22 @@ export default {
}) })
.catch(() => {}) .catch(() => {})
}, },
// 操作日志
async showLog(data, e) {
try {
const url = '/operationFeeManagement/listLog'
const res = await axios.get(url, { params: { id: data.id } })
if (res.code !== 200) return
if (res.data.length > 0) {
this.logList = res.data
this.noteVisible = true
} else {
this.$message.warning('暂无数据')
}
} catch (e) {
console.error(e)
}
},
async closedFn() { async closedFn() {
this.dialogVisible = false this.dialogVisible = false
...@@ -524,34 +534,4 @@ export default { ...@@ -524,34 +534,4 @@ export default {
.table_wrap { .table_wrap {
flex: 1; flex: 1;
} }
.circle {
display: inline-block;
height: 10px;
width: 10px;
border-radius: 5px;
margin-right: 5px;
}
.my-table >>> .first {
background-color: red !important;
color: #fff !important;
}
/* 选中按钮的背景色和边框色 */
::v-deep .el-radio-button.is-checked .el-radio-button__inner {
background-color: #1565c0 !important;
border-color: #1565c0 !important;
color: #fff !important;
}
::v-deep .el-radio-button__orig-radio:checked + .el-radio-button__inner {
background-color: #1565c0 !important;
border-color: #1565c0 !important;
color: #fff !important;
}
/* 鼠标悬浮时的颜色 */
::v-deep .el-radio-button__inner:hover {
border-color: #1565c0 !important;
color: #1565c0 !important;
}
</style> </style>
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