|
@@ -5,148 +5,121 @@
|
|
|
-->
|
|
|
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <!-- 搜索项 -->
|
|
|
- <el-form ref="ruleForm" inline :model="form">
|
|
|
- <el-form-item label="用户姓名">
|
|
|
- <el-input v-model="form.userName.value" placeholder="请输入用户姓名" clearable></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="用户身份证号码">
|
|
|
- <el-input v-model="form.userIdcard.value" placeholder="请输入用户身份证号码" clearable></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="鉴权类型">
|
|
|
- <dg-select
|
|
|
- v-model="form.authenticationType.value"
|
|
|
- placeholder="请选择鉴权类型"
|
|
|
- enum="AuthenticationTypeEnum"
|
|
|
- clearable
|
|
|
- style="width: 9rem"
|
|
|
- >
|
|
|
- </dg-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="鉴权时间">
|
|
|
- <dg-date-picker
|
|
|
- v-model="form.createTime.value"
|
|
|
- type="daterange"
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- clearable
|
|
|
- value-format="yyyyMMddHHmmss"
|
|
|
- style="width: 16rem"
|
|
|
- :unlink-panels="true"
|
|
|
- :default-time="['00:00:00', '23:59:59']"
|
|
|
- >
|
|
|
- </dg-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="鉴权结果">
|
|
|
- <dg-select v-model="form.state.value" placeholder="请选择鉴权结果" enum="AuthResultEnum" clearable style="width: 9rem">
|
|
|
- </dg-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <dg-button type="primary" @click="handleSearch" icon="el-icon-search">查询</dg-button>
|
|
|
- <dg-button type="primary" @click="handleReset" icon="el-icon-refresh-right">重置</dg-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <!-- 表格 -->
|
|
|
- <Table ref="myTable" :url="authServiceLogTableUrl" :headerData="authServiceLogTableHeader" :condition="form" :sort="sort">
|
|
|
- <dg-table-column label="操作" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div class="u-table__operation">
|
|
|
- <el-tooltip content="详情" effect="dark" placement="top-end">
|
|
|
- <i class="el-icon-document" @click="handleViewDetail(scope.row)"></i>
|
|
|
- </el-tooltip>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </dg-table-column>
|
|
|
- </Table>
|
|
|
- </div>
|
|
|
+ <div>
|
|
|
+ <!-- 搜索项 -->
|
|
|
+ <search-bar ref="searchbar" :conditionForm="conditionForm" @submitSearch="receiveSearch"></search-bar>
|
|
|
+ <!-- 表格 -->
|
|
|
+ <new-table
|
|
|
+ ref="table"
|
|
|
+ :tableUrl="authServiceLogTableUrl"
|
|
|
+ :tableHeader="authServiceLogTableHeader"
|
|
|
+ :condition="condition"
|
|
|
+ :sortProps="sort"
|
|
|
+ :lazyLoad="true"
|
|
|
+ :tableOptList="tableOptList"
|
|
|
+ @submitTableOpt="receviceOpt"
|
|
|
+ >
|
|
|
+ </new-table>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import Table from "@/pages/common/table";
|
|
|
-import detail from "./log-detail/auth-service";
|
|
|
-import { authServiceLogTableHeader } from "./DataConfig";
|
|
|
-import { authServiceLogTableUrl } from "@/api/permiss-log-manage";
|
|
|
+import searchBar from '@/components/search-bar';
|
|
|
+import newTable from '@/pages/common/new-table';
|
|
|
+import { authServiceLogTableHeader, authServiceLogDetail } from './DataConfig';
|
|
|
+import { authServiceLogTableUrl, getAuthServiceLogDetail } from '@/api/permiss-log-manage';
|
|
|
+import { searchOpt, detailOpt } from '@/mixins/page-opt';
|
|
|
export default {
|
|
|
- components: {
|
|
|
- Table
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- authServiceLogTableHeader,
|
|
|
- authServiceLogTableUrl,
|
|
|
- form: {
|
|
|
- userName: {
|
|
|
- value: "",
|
|
|
- op: "like"
|
|
|
- },
|
|
|
- userIdcard: {
|
|
|
- value: "",
|
|
|
- op: "like"
|
|
|
- },
|
|
|
- authenticationType: {
|
|
|
- value: "",
|
|
|
- op: "="
|
|
|
- },
|
|
|
- createTime: {
|
|
|
- value: [],
|
|
|
- op: "between",
|
|
|
- type: "DATE",
|
|
|
- format: "yyyyMMddHHmmss"
|
|
|
- },
|
|
|
- state: {
|
|
|
- value: "",
|
|
|
- op: "="
|
|
|
- }
|
|
|
- },
|
|
|
- sort: {
|
|
|
- createTime: "DESC"
|
|
|
- }
|
|
|
- };
|
|
|
- },
|
|
|
- computed: {},
|
|
|
- methods: {
|
|
|
- /**
|
|
|
- * 详情
|
|
|
- */
|
|
|
- handleViewDetail(row) {
|
|
|
- const layer = this.$dgLayer({
|
|
|
- title: `详情`,
|
|
|
- shade: [0.4, "#FFF"],
|
|
|
- content: detail,
|
|
|
- props: {
|
|
|
- id: row.id
|
|
|
- },
|
|
|
- on: {
|
|
|
- success() {
|
|
|
- layer.close(layer.dialogIndex);
|
|
|
- }
|
|
|
- },
|
|
|
- area: ["800px", "500px"]
|
|
|
- });
|
|
|
+ components: {
|
|
|
+ newTable,
|
|
|
+ searchBar
|
|
|
+ },
|
|
|
+ mixins: [searchOpt, detailOpt],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ authServiceLogTableHeader,
|
|
|
+ authServiceLogTableUrl,
|
|
|
+ conditionForm: [
|
|
|
+ {
|
|
|
+ label: '用户姓名',
|
|
|
+ name: 'userName',
|
|
|
+ op: 'like',
|
|
|
+ component: 'ElInput'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '用户身份证号码',
|
|
|
+ name: 'userIdcard',
|
|
|
+ op: 'like',
|
|
|
+ component: 'ElInput'
|
|
|
},
|
|
|
- /**
|
|
|
- * 查询
|
|
|
- */
|
|
|
- handleSearch() {
|
|
|
- this.$refs.myTable.handleSearchClick();
|
|
|
+ {
|
|
|
+ label: '鉴权类型',
|
|
|
+ name: 'authenticationType',
|
|
|
+ op: '=',
|
|
|
+ component: 'DgSelect',
|
|
|
+ attr: {
|
|
|
+ enum: 'AuthenticationTypeEnum',
|
|
|
+ style: 'width: 9rem'
|
|
|
+ }
|
|
|
},
|
|
|
- /**
|
|
|
- * 重置
|
|
|
- */
|
|
|
- handleReset() {
|
|
|
- for (const key in this.form) {
|
|
|
- this.form[key].value = "";
|
|
|
- }
|
|
|
+
|
|
|
+ {
|
|
|
+ label: '鉴权时间',
|
|
|
+ name: 'createTime',
|
|
|
+ op: 'between',
|
|
|
+ type: 'DATE',
|
|
|
+ value: '',
|
|
|
+ valueFormat: 'yyyyMMddHHmmss',
|
|
|
+ component: 'DgDatePicker',
|
|
|
+ attr: {
|
|
|
+ style: 'width: 16rem'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '鉴权结果',
|
|
|
+ name: 'state',
|
|
|
+ op: '=',
|
|
|
+ component: 'DgSelect',
|
|
|
+ attr: {
|
|
|
+ enum: 'AuthResultEnum',
|
|
|
+ style: 'width: 9rem'
|
|
|
+ }
|
|
|
}
|
|
|
+ ],
|
|
|
+ sort: {
|
|
|
+ createTime: 'DESC'
|
|
|
+ },
|
|
|
+ tableOptList: ['详情']
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {},
|
|
|
+ methods: {
|
|
|
+ receviceOpt(opt, row) {
|
|
|
+ const otherParams = {
|
|
|
+ config: authServiceLogDetail,
|
|
|
+ labelWidth: '140px',
|
|
|
+ area: ['800px', '500px']
|
|
|
+ };
|
|
|
+ this.handleViewDetail(row.id, otherParams);
|
|
|
},
|
|
|
- created() {
|
|
|
- const startTime = this.$moment().subtract("1", "year").format("YYYYMMDD")+"000000";
|
|
|
- const endTime = this.$moment().format("YYYYMMDD")+"235959";
|
|
|
- this.form.createTime.value = [startTime, endTime];
|
|
|
- },
|
|
|
- mounted() {}
|
|
|
+ getDetail(id) {
|
|
|
+ return new Promise((resolve) => {
|
|
|
+ getAuthServiceLogDetail(id).then((res) => {
|
|
|
+ resolve(res.data.content);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ const startTime = this.$moment().subtract('1', 'year').format('YYYYMMDD') + '000000';
|
|
|
+ const endTime = this.$moment().format('YYYYMMDD') + '235959';
|
|
|
+ this.conditionForm.find((item) => item.name == 'createTime').value = [startTime, endTime];
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.searchbar.handleSearch();
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|