From d8c72373e7d5c7b024350af3202cd53c0272ac28 Mon Sep 17 00:00:00 2001
From: chenjinsong <523037378@qq.com>
Date: Mon, 5 Jun 2023 17:52:00 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=84=E7=90=86user=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E7=8A=B6=E6=80=81=E5=BC=80=E5=85=B3=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../table/administration/UserTable.vue | 4 +-
src/views/administration/User.vue | 38 +++++++++++++++++++
src/views/charts2/ChartList.vue | 4 +-
3 files changed, 42 insertions(+), 4 deletions(-)
diff --git a/src/components/table/administration/UserTable.vue b/src/components/table/administration/UserTable.vue
index 62726ff9..cea8a368 100644
--- a/src/components/table/administration/UserTable.vue
+++ b/src/components/table/administration/UserTable.vue
@@ -50,14 +50,14 @@
-
+
{{scope.row[item.prop]}}
diff --git a/src/views/administration/User.vue b/src/views/administration/User.vue
index 30984e51..a6e00929 100644
--- a/src/views/administration/User.vue
+++ b/src/views/administration/User.vue
@@ -63,6 +63,7 @@ import dataListMixin from '@/mixins/data-list'
import userTable from '@/components/table/administration/UserTable'
import userBox from '@/components/rightBox/settings/UserBox'
import { api } from '@/utils/api'
+import {get} from '@/utils/http'
export default {
name: 'User',
@@ -88,6 +89,43 @@ export default {
},
tableId: 'userTable'
}
+ },
+ methods: {
+ getTableData (params, isAll, isClearType) {
+ if (isAll) {
+ this.searchLabel = null
+ } else if (isClearType) {
+ // this.searchLabel.tagType = ''
+ this.searchLabel.type = ''// 换新接口需要修改的属性名称
+ }
+ if (params) {
+ this.searchLabel = { ...this.searchLabel, ...params }
+ }
+ this.searchLabel = { ...this.searchLabel, ...this.pageObj }
+ this.tools.loading = true
+ delete this.searchLabel.total
+ let listUrl = this.url
+ if (this.listUrl) {
+ listUrl = this.listUrl
+ }
+ get(listUrl, this.searchLabel).then(response => {
+ this.tools.loading = false
+ if (response.code === 200) {
+ for (let i = 0; i < response.data.list.length; i++) {
+ response.data.list[i].status = response.data.list[i].status + ''
+ }
+ this.tableData = response.data.list
+ this.pageObj.total = response.data.total
+ } else {
+ console.error(response)
+ if (response.message) {
+ this.$message.error(response.message)
+ } else {
+ this.$message.error('Something went wrong...')
+ }
+ }
+ })
+ }
}
}
diff --git a/src/views/charts2/ChartList.vue b/src/views/charts2/ChartList.vue
index ad9bf205..6ee36ef0 100644
--- a/src/views/charts2/ChartList.vue
+++ b/src/views/charts2/ChartList.vue
@@ -157,9 +157,9 @@ export default {
mounted () {
this.timeoutFunc = setTimeout(() => {
this.handleDynamicChartHeight()
- }, 400)
+ }, 500)
this.handleDynamicChartHeight()
- this.debounceFunc = _.debounce(this.handleDynamicChartHeight, 400)
+ this.debounceFunc = _.debounce(this.handleDynamicChartHeight, 500)
window.addEventListener('resize', this.debounceFunc)
},
beforeUnmount () {