|
@@ -1,85 +1,105 @@
|
|
|
-<!--
|
|
|
-鉴权行为统计
|
|
|
-@Author: linqian
|
|
|
-@Date: 2021-05-28 08:51
|
|
|
--->
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <!-- 搜索项 -->
|
|
|
- <search-bar ref="searchbar" :conditionForm="conditionForm" @submitSearch="receiveSearch"></search-bar>
|
|
|
- <!-- 表格 -->
|
|
|
- <new-table
|
|
|
- ref="table"
|
|
|
- :tableUrl="authServiceLogStatisticsTableUrl"
|
|
|
- :tableHeader="tableHeader"
|
|
|
- :condition="condition"
|
|
|
- :lazyLoad="true"
|
|
|
- >
|
|
|
- </new-table>
|
|
|
- </div>
|
|
|
+ <div>
|
|
|
+ <!-- 搜索项 -->
|
|
|
+ <search-bar ref="searchbar" :conditionForm="conditionForm" @submitSearch="receiveSearch"></search-bar>
|
|
|
+ <!-- 操作栏 -->
|
|
|
+ <operate-bar @submitPageOpt="receviceOpt">
|
|
|
+ <dg-button type="primary" @click="receviceOpt('饼状图')" icon="el-icon-bangzhu">饼状图</dg-button>
|
|
|
+ </operate-bar>
|
|
|
+ <!-- 表格 -->
|
|
|
+ <new-table
|
|
|
+ ref="table"
|
|
|
+ :tableUrl="authServiceLogStatisticsTableUrl"
|
|
|
+ :tableHeader="tableHeader"
|
|
|
+ :condition="condition"
|
|
|
+ :lazyLoad="true"
|
|
|
+ >
|
|
|
+ </new-table>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import newTable from '@/components/new-table';
|
|
|
-import { authServiceLogStatisticsTableUrl } from '@/api/permiss-log-manage';
|
|
|
-import searchBar from '@/components/search-bar';
|
|
|
-import { searchOpt } from '@/mixins/page-opt';
|
|
|
+import newTable from "@/components/new-table"
|
|
|
+import { authServiceLogStatisticsTableUrl } from "@/api/permiss-log-manage"
|
|
|
+import searchBar from "@/components/search-bar"
|
|
|
+import operateBar from "@/components/operate-bar"
|
|
|
+import { searchOpt } from "@/mixins/page-opt"
|
|
|
+import pieChart from "./pie-chart.vue"
|
|
|
export default {
|
|
|
- components: {
|
|
|
- newTable,
|
|
|
- searchBar
|
|
|
- },
|
|
|
- mixins: [searchOpt],
|
|
|
- data() {
|
|
|
- return {
|
|
|
- authServiceLogStatisticsTableUrl,
|
|
|
- tableHeader: [
|
|
|
- {
|
|
|
- label: '鉴权类型',
|
|
|
- prop: 'type',
|
|
|
- enum: 'AuthenticationTypeEnum'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '鉴权成功次数',
|
|
|
- prop: 'susSize'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '鉴权失败次数',
|
|
|
- prop: 'failSize'
|
|
|
- },
|
|
|
- {
|
|
|
- label: '鉴权总次数',
|
|
|
- prop: 'totalSize'
|
|
|
+ components: {
|
|
|
+ newTable,
|
|
|
+ searchBar,
|
|
|
+ operateBar
|
|
|
+ },
|
|
|
+ mixins: [searchOpt],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ authServiceLogStatisticsTableUrl,
|
|
|
+ tableHeader: [
|
|
|
+ {
|
|
|
+ label: "鉴权类型",
|
|
|
+ prop: "type",
|
|
|
+ enum: "AuthenticationTypeEnum"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "鉴权成功次数",
|
|
|
+ prop: "susSize"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "鉴权失败次数",
|
|
|
+ prop: "failSize"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "鉴权总次数",
|
|
|
+ prop: "totalSize"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ conditionForm: [
|
|
|
+ {
|
|
|
+ label: "鉴权时间",
|
|
|
+ name: "createTime",
|
|
|
+ op: "between",
|
|
|
+ type: "DATE",
|
|
|
+ value: "",
|
|
|
+ valueFormat: "yyyyMMddHHmmss",
|
|
|
+ component: "DgDatePicker",
|
|
|
+ clearable: false
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
- ],
|
|
|
- conditionForm: [
|
|
|
- {
|
|
|
- label: '鉴权时间',
|
|
|
- name: 'createTime',
|
|
|
- op: 'between',
|
|
|
- type: 'DATE',
|
|
|
- value: '',
|
|
|
- valueFormat: 'yyyyMMddHHmmss',
|
|
|
- component: 'DgDatePicker',
|
|
|
- clearable: false
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ const startTime =
|
|
|
+ this.$moment()
|
|
|
+ .subtract("1", "year")
|
|
|
+ .format("YYYYMMDD") + "000000"
|
|
|
+ const endTime = this.$moment().format("YYYYMMDD") + "235959"
|
|
|
+ this.conditionForm[0].value = [startTime, endTime]
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.searchbar.handleSearch()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ receviceOpt(type) {
|
|
|
+ const dataSource = this.$refs.table.$refs.baseTable._data.dataSource
|
|
|
+ if (type == "饼状图") {
|
|
|
+ const layer = this.$dgLayer({
|
|
|
+ title: "饼状图",
|
|
|
+ content: pieChart,
|
|
|
+ props: {
|
|
|
+ dataSource
|
|
|
+ },
|
|
|
+ on: {
|
|
|
+ success(form, type) {}
|
|
|
+ },
|
|
|
+ area: ["600px", "600px"]
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
- ]
|
|
|
- };
|
|
|
- },
|
|
|
- computed: {},
|
|
|
- methods: {},
|
|
|
- created() {
|
|
|
- const startTime = this.$moment().subtract('1', 'year').format('YYYYMMDD') + '000000';
|
|
|
- const endTime = this.$moment().format('YYYYMMDD') + '235959';
|
|
|
- this.conditionForm[0].value = [startTime, endTime];
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.searchbar.handleSearch();
|
|
|
- });
|
|
|
- }
|
|
|
-};
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
-<style lang='scss'>
|
|
|
-</style>
|
|
|
+<style lang="scss"></style>
|