| @ -0,0 +1,9 @@ | |||
| import request from '@/utils/request' | |||
| export function systemLog_list(query) { | |||
| return request({ | |||
| url: '/system/business/systemLog/list', | |||
| method: 'get', | |||
| params: query | |||
| }) | |||
| } | |||
| @ -0,0 +1,10 @@ | |||
| export default { | |||
| //日志管理 | |||
| czrz: 'User Action Log', | |||
| dlrz: 'User Login Log', | |||
| dc: 'Export Excel', | |||
| czr: 'User', | |||
| czlx: 'Action', | |||
| czxq: 'Detail', | |||
| czsj: 'Datetime' | |||
| } | |||
| @ -0,0 +1,10 @@ | |||
| export default { | |||
| //日志管理 | |||
| czrz: '操作日志', | |||
| dlrz: '登录日志', | |||
| dc: '导出Excel', | |||
| czr: '操作人', | |||
| czlx: '操作类型', | |||
| czxq: '操作详情', | |||
| czsj: '操作时间' | |||
| } | |||
| @ -0,0 +1,138 @@ | |||
| <template> | |||
| <div class="system-log-list"> | |||
| <div class="ytbd-search"> | |||
| <el-form :model="searchForm" ref="searchForm" :inline="true" label-width="80px"> | |||
| <el-form-item :label="$t('page.system.systemLog.czr')" prop="qmrMc"> | |||
| <el-input v-model="searchForm.qmrMc" :placeholder="$t('form.placeholderInput')" clearable | |||
| style="width: 150px" /> | |||
| </el-form-item> | |||
| <el-form-item :label="$t('page.system.systemLog.czsj')"> | |||
| <el-date-picker v-model="daterange" clearable type="daterange" range-separator="-" :start-placeholder="$t('page.business.study.study.startDate')" | |||
| :end-placeholder="$t('page.business.study.study.endDate')" value-format="yyyy-MM-dd" @change="search" style="width: 200px" /> | |||
| </el-form-item> | |||
| <el-form-item prop="jcmc" :label="$t('page.system.systemLog.czlx')"> | |||
| <el-select | |||
| v-model="searchForm.jcmc" | |||
| :placeholder="$t('form.placeholderSelect')" | |||
| clearable | |||
| style="width: 150px" | |||
| @change="search" | |||
| > | |||
| <el-option :label="$t('page.business.study.study.sqgd')" :value="$t('page.business.study.study.sqgd')" /> | |||
| <el-option :label="$t('page.business.study.study.tygd')" :value="$t('page.business.study.study.tygd')" /> | |||
| <el-option :label="$t('page.business.study.study.jjgd')" :value="$t('page.business.study.study.jjgd')" /> | |||
| <el-option :label="$t('page.business.study.study.sqjd')" :value="$t('page.business.study.study.sqjd')" /> | |||
| <el-option :label="$t('page.business.study.study.tyjd')" :value="$t('page.business.study.study.tyjd')" /> | |||
| <el-option :label="$t('page.business.study.study.jjjd')" :value="$t('page.business.study.study.jjjd')" /> | |||
| <el-option :label="$t('page.business.study.study.sqjy')" :value="$t('page.business.study.study.sqjy')" /> | |||
| <el-option :label="$t('page.business.study.study.tyjy')" :value="$t('page.business.study.study.tyjy')" /> | |||
| <el-option :label="$t('page.business.study.study.jjjy')" :value="$t('page.business.study.study.jjjy')" /> | |||
| <el-option :label="$t('page.business.study.study.qrgh')" :value="$t('page.business.study.study.qrgh')" /> | |||
| </el-select> | |||
| </el-form-item> | |||
| <el-form-item :label="$t('page.system.systemLog.czxq')" prop="jcnr"> | |||
| <el-input v-model="searchForm.jcnr" :placeholder="$t('form.placeholderInput')" clearable | |||
| style="width: 200px" /> | |||
| </el-form-item> | |||
| <el-form-item> | |||
| <el-button type="primary" icon="el-icon-search" @click="search">{{ $t('page.business.study.study.search') }}</el-button> | |||
| <el-button icon="el-icon-refresh" @click="reset">{{ $t('form.reset') }}</el-button> | |||
| </el-form-item> | |||
| </el-form> | |||
| </div> | |||
| <div class="ytbd-content"> | |||
| <el-table v-loading="loading" :data="list"> | |||
| <el-table-column :label="$t('page.system.systemLog.czr')" prop="qmrMc" width="200" /> | |||
| <el-table-column :label="$t('page.system.systemLog.czlx')" :prop="$i18n.locale === 'zh_CN'?'jcmc':'jcmcEn'" width="200" /> | |||
| <el-table-column :label="$t('page.system.systemLog.czxq')" align="center" :prop="$i18n.locale === 'zh_CN'?'jcnr':'jcnrEn'" /> | |||
| <el-table-column :label="$t('page.business.archive.czsj')" align="center" prop="createTime" width="200" /> | |||
| </el-table> | |||
| <pagination v-show="total > 0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" | |||
| @pagination="getList" /> | |||
| </div> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { systemLog_list } from "@/api/business/systemLog/systemLog" | |||
| export default { | |||
| name: 'Czrz', | |||
| props: { | |||
| }, | |||
| computed: { | |||
| }, | |||
| data() { | |||
| return { | |||
| daterange:[], | |||
| searchForm: { | |||
| pageNum: 1, | |||
| pageSize: 10, | |||
| qmrMc: '', | |||
| jcmc: '', | |||
| jcnr: '', | |||
| startDate:'', | |||
| endDate:'', | |||
| }, | |||
| loading: false, | |||
| total: 0, | |||
| list: [], | |||
| } | |||
| }, | |||
| created() { | |||
| this.getList() | |||
| }, | |||
| methods: { | |||
| search() { | |||
| this.searchForm.pageNum = 1 | |||
| this.getList() | |||
| }, | |||
| reset() { | |||
| this.searchForm.qmrMc = '' | |||
| this.searchForm.jcmc = '' | |||
| this.searchForm.jcnr = '' | |||
| this.searchForm.startDate = '' | |||
| this.searchForm.endDate = '' | |||
| this.daterange = [] | |||
| this.search() | |||
| }, | |||
| getList() { | |||
| this.loading = true | |||
| this.searchForm.startDate = this.daterange && this.daterange.length > 0 ? this.daterange[0] : '' | |||
| this.searchForm.endDate = this.daterange && this.daterange.length > 1 ? this.daterange[1] : '' | |||
| systemLog_list(this.searchForm).then(response => { | |||
| this.list = response.rows | |||
| this.total = response.total | |||
| this.loading = false | |||
| }) | |||
| }, | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| .system-log-list { | |||
| .ytbd-search { | |||
| background: #fff; | |||
| padding: 20px; | |||
| padding-bottom: 0; | |||
| margin-bottom: 10px; | |||
| .right-btn { | |||
| text-align: right | |||
| } | |||
| } | |||
| .ytbd-content { | |||
| padding: 20px; | |||
| background: #fff; | |||
| .add-box { | |||
| margin-bottom: 10px; | |||
| } | |||
| } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,138 @@ | |||
| <template> | |||
| <div class="system-log-list"> | |||
| <div class="ytbd-search"> | |||
| <el-form :model="searchForm" ref="searchForm" :inline="true" label-width="110px"> | |||
| <el-form-item :label="$t('page.system.systemLog.czr')" prop="qmrMc"> | |||
| <el-input v-model="searchForm.qmrMc" :placeholder="$t('form.placeholderInput')" clearable | |||
| style="width: 200px" /> | |||
| </el-form-item> | |||
| <el-form-item :label="$t('page.system.systemLog.czsj')"> | |||
| <el-date-picker v-model="daterange" clearable type="daterange" range-separator="-" :start-placeholder="$t('page.business.study.study.startDate')" | |||
| :end-placeholder="$t('page.business.study.study.endDate')" value-format="yyyy-MM-dd" @change="search" style="width: 220px" /> | |||
| </el-form-item> | |||
| <el-form-item prop="jcmc" :label="$t('page.system.systemLog.czlx')"> | |||
| <el-select | |||
| v-model="searchForm.jcmc" | |||
| :placeholder="$t('form.placeholderSelect')" | |||
| clearable | |||
| style="width: 200px" | |||
| @change="search" | |||
| > | |||
| <el-option :label="$t('page.business.study.study.sqgd')" :value="$t('page.business.study.study.sqgd')" /> | |||
| <el-option :label="$t('page.business.study.study.tygd')" :value="$t('page.business.study.study.tygd')" /> | |||
| <el-option :label="$t('page.business.study.study.jjgd')" :value="$t('page.business.study.study.jjgd')" /> | |||
| <el-option :label="$t('page.business.study.study.sqjd')" :value="$t('page.business.study.study.sqjd')" /> | |||
| <el-option :label="$t('page.business.study.study.tyjd')" :value="$t('page.business.study.study.tyjd')" /> | |||
| <el-option :label="$t('page.business.study.study.jjjd')" :value="$t('page.business.study.study.jjjd')" /> | |||
| <el-option :label="$t('page.business.study.study.sqjy')" :value="$t('page.business.study.study.sqjy')" /> | |||
| <el-option :label="$t('page.business.study.study.tyjy')" :value="$t('page.business.study.study.tyjy')" /> | |||
| <el-option :label="$t('page.business.study.study.jjjy')" :value="$t('page.business.study.study.jjjy')" /> | |||
| <el-option :label="$t('page.business.study.study.qrgh')" :value="$t('page.business.study.study.qrgh')" /> | |||
| </el-select> | |||
| </el-form-item> | |||
| <el-form-item :label="$t('page.system.systemLog.czxq')" prop="jcnr"> | |||
| <el-input v-model="searchForm.jcnr" :placeholder="$t('form.placeholderInput')" clearable | |||
| style="width: 200px" /> | |||
| </el-form-item> | |||
| <el-form-item> | |||
| <el-button type="primary" icon="el-icon-search" @click="search">{{ $t('page.business.study.study.search') }}</el-button> | |||
| <el-button icon="el-icon-refresh" @click="reset">{{ $t('form.reset') }}</el-button> | |||
| </el-form-item> | |||
| </el-form> | |||
| </div> | |||
| <div class="ytbd-content"> | |||
| <el-table v-loading="loading" :data="list"> | |||
| <el-table-column :label="$t('page.system.systemLog.czr')" :prop="$i18n.locale === 'zh_CN'?'qmcMc':'qmcMc'" /> | |||
| <el-table-column :label="$t('page.system.systemLog.czlx')" :prop="$i18n.locale === 'zh_CN'?'jcmc':'jcmcEn'" /> | |||
| <el-table-column :label="$t('page.system.systemLog.czxq')" align="center" :prop="$i18n.locale === 'zh_CN'?'jcnr':'jcnrEn'" width="150" /> | |||
| <el-table-column :label="$t('page.business.archive.czsj')" align="center" prop="createTime" width="200" /> | |||
| </el-table> | |||
| <pagination v-show="total > 0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" | |||
| @pagination="getList" /> | |||
| </div> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { systemLog_list } from "@/api/business/systemLog/systemLog" | |||
| export default { | |||
| name: 'Czrz', | |||
| props: { | |||
| }, | |||
| computed: { | |||
| }, | |||
| data() { | |||
| return { | |||
| daterange:[], | |||
| searchForm: { | |||
| pageNum: 1, | |||
| pageSize: 10, | |||
| qmrMc: '', | |||
| jcmc: '', | |||
| jcnr: '', | |||
| startDate:'', | |||
| endDate:'', | |||
| }, | |||
| loading: false, | |||
| total: 0, | |||
| list: [], | |||
| } | |||
| }, | |||
| created() { | |||
| this.getList() | |||
| }, | |||
| methods: { | |||
| search() { | |||
| this.searchForm.pageNum = 1 | |||
| this.getList() | |||
| }, | |||
| reset() { | |||
| this.searchForm.qmrMc = '' | |||
| this.searchForm.jcmc = '' | |||
| this.searchForm.jcnr = '' | |||
| this.searchForm.startDate = '' | |||
| this.searchForm.endDate = '' | |||
| this.daterange = [] | |||
| this.search() | |||
| }, | |||
| getList() { | |||
| this.loading = true | |||
| this.searchForm.startDate = this.daterange && this.daterange.length > 0 ? this.daterange[0] : '' | |||
| this.searchForm.endDate = this.daterange && this.daterange.length > 1 ? this.daterange[1] : '' | |||
| systemLog_list(this.searchForm).then(response => { | |||
| this.list = response.rows | |||
| this.total = response.total | |||
| this.loading = false | |||
| }) | |||
| }, | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| .system-log-list { | |||
| .ytbd-search { | |||
| background: #fff; | |||
| padding: 20px; | |||
| padding-bottom: 0; | |||
| margin-bottom: 10px; | |||
| .right-btn { | |||
| text-align: right | |||
| } | |||
| } | |||
| .ytbd-content { | |||
| padding: 20px; | |||
| background: #fff; | |||
| .add-box { | |||
| margin-bottom: 10px; | |||
| } | |||
| } | |||
| } | |||
| </style> | |||
| @ -0,0 +1,102 @@ | |||
| <template> | |||
| <div class="study-enter"> | |||
| <div class="content-list"> | |||
| <div class="search-box"> | |||
| <div class="search-item" :class="active === item.key ? 'active' : ''" v-for="(item, index) in tabList" | |||
| :key="index" @click="changeTab(item)"> | |||
| {{ $t(item.name) }} | |||
| </div> | |||
| </div> | |||
| <div class="content-box"> | |||
| <czrz v-if="active === 'czrz'" /> | |||
| <dlrz v-if="active === 'dlrz'" /> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { checkPermi } from "@/utils/permission"; | |||
| import czrz from './comp/czrz.vue' | |||
| import dlrz from './comp/dlrz.vue' | |||
| export default { | |||
| name: 'SystemLogList', | |||
| props: {}, | |||
| components: { czrz,dlrz}, | |||
| computed: {}, | |||
| filters: {}, | |||
| data() { | |||
| return { | |||
| tabList: [], | |||
| active: '', | |||
| study: {}, | |||
| } | |||
| }, | |||
| created() { | |||
| this.initTab() | |||
| }, | |||
| methods: { | |||
| checkPermi, | |||
| initTab(){ | |||
| this.tabList = [] | |||
| if(this.checkPermi(['business:systemLog:operate'])){ | |||
| this.tabList.push({ key: 'czrz', name: 'page.system.systemLog.czrz' }) | |||
| } | |||
| if(this.checkPermi(['business:archive:record:gspdaTab'])){ | |||
| this.tabList.push({ key: 'dlrz', name: 'page.system.systemLog.dlrz' }) | |||
| } | |||
| this.active = this.$route.params.tab && _.findIndex(this.tabList,(o)=>{return o.key===this.$route.params.tab})>-1 ? this.$route.params.tab: this.tabList.length>0 ? this.tabList[0].key :'' | |||
| }, | |||
| changeTab(item) { | |||
| if (this.active !== item.key) { | |||
| this.active = item.key | |||
| } | |||
| } | |||
| } | |||
| } | |||
| </script> | |||
| <style lang="scss" scoped> | |||
| .study-enter { | |||
| margin: 10px 10px; | |||
| .search-box { | |||
| background: #fff; | |||
| padding: 0; | |||
| border-radius: 3px; | |||
| margin-bottom: 10px; | |||
| display: flex; | |||
| flex-direction: row; | |||
| align-items: center; | |||
| .search-item { | |||
| padding: 10px 20px; | |||
| font-size: 14px; | |||
| cursor: pointer; | |||
| &.active { | |||
| background: #1890ff; | |||
| color: #fff; | |||
| } | |||
| &:hover { | |||
| background: #46a6ff; | |||
| color: #fff; | |||
| } | |||
| &:first-child { | |||
| border-top-left-radius: 3px; | |||
| border-bottom-left-radius: 3px; | |||
| } | |||
| &:last-child { | |||
| border-top-right-radius: 3px; | |||
| border-bottom-right-radius: 3px; | |||
| } | |||
| } | |||
| } | |||
| .content-box {} | |||
| } | |||
| </style> | |||