Pārlūkot izejas kodu

饼状图修改

ljr-395181403 1 gadu atpakaļ
vecāks
revīzija
bbb188ec4d

+ 11 - 1
src/pages/statistics-manage/auth-behavior-statistic/index.vue

@@ -19,6 +19,7 @@
 </template>
 
 <script>
+import baseApi from "@/api/jz-base"
 import newTable from "@/components/new-table"
 import { authServiceLogStatisticsTableUrl } from "@/api/permiss-log-manage"
 import searchBar from "@/components/search-bar"
@@ -65,10 +66,15 @@ export default {
                     component: "DgDatePicker",
                     clearable: false
                 }
-            ]
+            ],
+            AuthenticationTypeEnum: []
         }
     },
     created() {
+        baseApi.fetchEnum("AuthenticationTypeEnum").then(res => {
+            this.AuthenticationTypeEnum = res.data
+        })
+
         const startTime =
             this.$moment()
                 .subtract("1", "year")
@@ -84,6 +90,10 @@ export default {
     methods: {
         receviceOpt(type) {
             const dataSource = this.$refs.table.$refs.baseTable._data.dataSource
+            dataSource.forEach(e => {
+                e.typeName = this.AuthenticationTypeEnum.filter(f => f.value === e.type)[0].label
+            })
+
             if (type == "饼状图") {
                 const layer = this.$dgLayer({
                     title: "饼状图",

+ 1 - 1
src/pages/statistics-manage/auth-behavior-statistic/pie-chart.vue

@@ -48,7 +48,7 @@ export default {
     mounted() {
         const tempDataSource = this.dataSource.map(m => {
             return {
-                name: m.type,
+                name: m.typeName,
                 value: m.totalSize
             }
         })