|
@@ -1,5 +1,240 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- Hello {{ route.meta.title }}
|
|
|
+ <div class="log-container">
|
|
|
+ <div class="list-filter">
|
|
|
+ <el-form :ref="formName" inline label-width="110px">
|
|
|
+ <el-row>
|
|
|
+ <el-form-item prop="createUser" label="操作人姓名">
|
|
|
+ <el-input v-model="formData.createUser" class="filter-item" clearable placeholder="请输入" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="createBy" label="身份证号">
|
|
|
+ <el-input v-model="formData.createBy" class="filter-item" clearable placeholder="请输入" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="createOrgName" label="操作人单位名称">
|
|
|
+ <el-input v-model="formData.createOrgName" class="filter-item" clearable placeholder="请输入" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-form-item prop="title" label="操作类型">
|
|
|
+ <el-input v-model="formData.title" class="filter-item" clearable placeholder="请输入" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="moduleName" label="功能模块名称">
|
|
|
+ <el-select v-model="formData.moduleName" clearable placeholder="请选择">
|
|
|
+ <el-option v-for="(item) in moduleData" :key="item.id" :label="item.label" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="createTime" label="操作日期">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="formData.createTime"
|
|
|
+ type="daterange"
|
|
|
+ value-format="yyyyMMdd"
|
|
|
+ range-separator="-"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="截止日期"
|
|
|
+ unlink-panels
|
|
|
+ clearable
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-form-item class="filter-btn">
|
|
|
+ <el-button type="primary" @click="searchTable">查询</el-button>
|
|
|
+ <el-button type="danger" @click="resetForm">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <div class="list-table">
|
|
|
+ <el-table v-loading="loading" :data="tableData" fit border stripe height="calc(100% - 32px)">
|
|
|
+ <el-table-column type="index" label="序号" width="50" />
|
|
|
+ <el-table-column prop="createUser" label="操作人姓名" width="120" show-overflow-tooltip />
|
|
|
+ <el-table-column prop="createBy" label="操作人身份证号" show-overflow-tooltip />
|
|
|
+ <el-table-column prop="createOrgName" label="操作人单位名称" width="180" show-overflow-tooltip />
|
|
|
+ <el-table-column prop="moduleName" label="功能模块名称" width="200" show-overflow-tooltip />
|
|
|
+ <el-table-column prop="createTime" label="操作时间" width="160" />
|
|
|
+ <el-table-column prop="title" label="操作类型" width="160" />
|
|
|
+ <el-table-column prop="remoteAddr" label="终端IP" width="160" />
|
|
|
+ <el-table-column label="操作" align="center" width="160" class-name="action-column">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="viewItem(scope.row.id)">详情</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div v-if="total > 0" class="page">
|
|
|
+ <el-pagination
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :current-page="current"
|
|
|
+ :total="total"
|
|
|
+ :page-sizes="pageSizeAll"
|
|
|
+ :page-size="size"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+
|
|
|
+import { isNull, hasValidRecords, formatDictData } from '@/utils/convert'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'Log',
|
|
|
+ components: { },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // table
|
|
|
+ current: 1,
|
|
|
+ size: 20,
|
|
|
+ total: 0,
|
|
|
+ pageSizeAll: [10, 20, 50, 100, 200, 500],
|
|
|
+ tableData: [],
|
|
|
+ multipleSelection: [],
|
|
|
+ // filter
|
|
|
+ formName: 'filterForm',
|
|
|
+ formData: {
|
|
|
+ title: '',
|
|
|
+ content: '',
|
|
|
+ messageType: '',
|
|
|
+ deptCode: '',
|
|
|
+ publishDate: null
|
|
|
+ },
|
|
|
+ // select
|
|
|
+ moduleData: [],
|
|
|
+ // others
|
|
|
+ loading: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getTypeData()
|
|
|
+ this.searchTable()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 改变每页显示条数
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.current = 1
|
|
|
+ this.size = val
|
|
|
+ this.getTablelist()
|
|
|
+ },
|
|
|
+ // 切换第几页
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.current = val
|
|
|
+ this.getTablelist()
|
|
|
+ },
|
|
|
+ // 重置搜索项
|
|
|
+ resetForm() {
|
|
|
+ this.$refs[this.formName].resetFields()
|
|
|
+ this.getTablelist()
|
|
|
+ },
|
|
|
+ handleSelectionChange(val) {
|
|
|
+ this.multipleSelection = val
|
|
|
+ },
|
|
|
+ // 点击搜索按钮
|
|
|
+ searchTable() {
|
|
|
+ this.current = 1
|
|
|
+ this.getTablelist()
|
|
|
+ },
|
|
|
+ // 获取table数据
|
|
|
+ getTablelist() {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '开发中'
|
|
|
+ })
|
|
|
+ // this.loading = true
|
|
|
+ // const params = {
|
|
|
+ // current: this.current,
|
|
|
+ // size: this.size,
|
|
|
+ // delFlag: 0,
|
|
|
+ // title: this.formData.title,
|
|
|
+ // content: this.formData.content,
|
|
|
+ // messageType: this.formData.messageType,
|
|
|
+ // deptCode: this.formData.deptCode
|
|
|
+ // }
|
|
|
+ // if (this.formData.publishDate) {
|
|
|
+ // params.publishTimeStart = this.formData.publishDate[0] + '000000'
|
|
|
+ // params.publishTimeEnd = this.formData.publishDate[1] + '000000'
|
|
|
+ // }
|
|
|
+ // fetchTableList(params).then(response => {
|
|
|
+ // this.loading = false
|
|
|
+ // if (hasValidRecords(response)) {
|
|
|
+ // this.tableData = response.data.records
|
|
|
+ // this.total = response.data.total
|
|
|
+ // } else {
|
|
|
+ // this.tableData = []
|
|
|
+ // this.total = 0
|
|
|
+ // }
|
|
|
+ // }).catch(error => {
|
|
|
+ // console.log(error)
|
|
|
+ // this.loading = false
|
|
|
+ // this.$message({
|
|
|
+ // type: 'error',
|
|
|
+ // duration: 0,
|
|
|
+ // showClose: true,
|
|
|
+ // message: '获取信息列表出错: ' + error.message
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ },
|
|
|
+ viewItem(id) {
|
|
|
+ this.$refs['infoView'].open(id)
|
|
|
+ },
|
|
|
+ getTypeData() {
|
|
|
+ // fetchDictData(this.dictType).then(response => {
|
|
|
+ // if (!isNull(response.data)) {
|
|
|
+ // this.typeData = response.data
|
|
|
+ // } else {
|
|
|
+ // this.typeData = []
|
|
|
+ // }
|
|
|
+ // }).catch(error => {
|
|
|
+ // console.log(error)
|
|
|
+ // this.topLoading = false
|
|
|
+ // this.$message({
|
|
|
+ // type: 'error',
|
|
|
+ // duration: 0,
|
|
|
+ // showClose: true,
|
|
|
+ // message: '获取信息类型出错: ' + error.message
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.log-container {
|
|
|
+ min-width: 1430px;
|
|
|
+ .list-filter, .list-table{
|
|
|
+ padding: 10px 0 0 10px;
|
|
|
+ background-color: #fff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .list-filter {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ // height: 125px;
|
|
|
+
|
|
|
+ .filter-btn {
|
|
|
+ width: 1400px;
|
|
|
+ text-align: right;
|
|
|
+ margin-bottom: 5px !important;
|
|
|
+ margin-top: -12px !important;
|
|
|
+ }
|
|
|
+ ::v-deep {
|
|
|
+ .el-input__inner {
|
|
|
+ width: 350px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .list-table {
|
|
|
+ height: calc(100% - 177px);
|
|
|
+ }
|
|
|
+
|
|
|
+ .list-btn {
|
|
|
+ height: 40px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .page {
|
|
|
+ height: 32px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|