Ver código fonte

fix: 移除静态默认数据,使用接口返回数据兜底

统一优化三个页面的运行数据组件,删除硬编码的默认模拟数据,改为使用接口返回数据结合空值兜底的逻辑,同时清理了分布组件里的静态默认配置数据
huoyi 3 semanas atrás
pai
commit
2d0e08953b

+ 3 - 9
src/views/portraitManagement/components/ProfileBasicDistribution.vue

@@ -38,21 +38,15 @@ const props = defineProps({
38 38
 })
39 39
 
40 40
 const defaultGenderData = [
41
-  { value: 6, name: '女', itemStyle: { color: '#ff6b9d' } },
42
-  { value: 8, name: '男', itemStyle: { color: '#4da6ff' } }
41
+ 
43 42
 ]
44 43
 
45 44
 const defaultNationData = [
46
-  { value: 1, name: '回族', itemStyle: { color: '#ff9f43' } },
47
-  { value: 8, name: '汉族', itemStyle: { color: '#4da6ff' } },
48
-  { value: 5, name: '其他', itemStyle: { color: '#a55eea' } }
45
+  
49 46
 ]
50 47
 
51 48
 const defaultPoliticalData = [
52
-  { value: 1, name: '党员', itemStyle: { color: '#ff6b6b' } },
53
-  { value: 2, name: '共青团员', itemStyle: { color: '#ffd93d' } },
54
-  { value: 5, name: '群众', itemStyle: { color: '#6bcb77' } },
55
-  { value: 6, name: '其他', itemStyle: { color: '#4d96ff' } }
49
+  
56 50
 ]
57 51
 
58 52
 

+ 1 - 9
src/views/portraitManagement/deptProfile/component/runData.vue

@@ -100,15 +100,7 @@ const channelCheckData = ref([])
100 100
 const invokerCountLanePeakThroughput = () => {
101 101
   countLanePeakThroughput(props.queryParams).then(res => {
102 102
     if (res.code === 200 && res.data) {
103
-      channelCheckData.value =  [
104
-        { recordDate: '05-14', throughputRate: 68 },
105
-        { recordDate: '05-15', throughputRate: 72 },
106
-        { recordDate: '05-16', throughputRate: 65 },
107
-        { recordDate: '05-17', throughputRate: 80 },
108
-        { recordDate: '05-18', throughputRate: 75 },
109
-        { recordDate: '05-19', throughputRate: 82 },
110
-        { recordDate: '05-20', throughputRate: 78 }
111
-      ]
103
+      channelCheckData.value =  res.data || []
112 104
     }
113 105
     
114 106
   })

+ 2 - 10
src/views/portraitManagement/groupProfile/component/runData.vue

@@ -100,17 +100,9 @@ const channelCheckData = ref([])
100 100
 const invokerCountLanePeakThroughput = () => {
101 101
   countLanePeakThroughput(props.queryParams).then(res => {
102 102
     if (res.code === 200 && res.data) {
103
-      channelCheckData.value =  [
104
-        { recordDate: '05-14', throughputRate: 68 },
105
-        { recordDate: '05-15', throughputRate: 72 },
106
-        { recordDate: '05-16', throughputRate: 65 },
107
-        { recordDate: '05-17', throughputRate: 80 },
108
-        { recordDate: '05-18', throughputRate: 75 },
109
-        { recordDate: '05-19', throughputRate: 82 },
110
-        { recordDate: '05-20', throughputRate: 78 }
111
-      ]
103
+      channelCheckData.value = res.data || []
112 104
     }
113
-    
105
+
114 106
   })
115 107
 }
116 108
 

+ 1 - 11
src/views/portraitManagement/teamProfile/component/runData.vue

@@ -103,17 +103,7 @@ const invokerCountLanePeakThroughput = () => {
103 103
     if (res.code === 200 && res.data) {
104 104
       channelCheckData.value = res.data || []
105 105
     }
106
-    if (!channelCheckData.value.length) {
107
-      channelCheckData.value = [
108
-        { recordDate: '05-14', throughputRate: 68 },
109
-        { recordDate: '05-15', throughputRate: 72 },
110
-        { recordDate: '05-16', throughputRate: 65 },
111
-        { recordDate: '05-17', throughputRate: 80 },
112
-        { recordDate: '05-18', throughputRate: 75 },
113
-        { recordDate: '05-19', throughputRate: 82 },
114
-        { recordDate: '05-20', throughputRate: 78 }
115
-      ]
116
-    }
106
+    
117 107
   })
118 108
 }
119 109