Explorar el Código

feat:优化iconfont+qiun-data-charts

zhangxin hace 1 mes
padre
commit
a287705487

+ 0 - 1
App.vue

@@ -225,6 +225,5 @@
225 225
 	}
226 226
 
227 227
 	@import "@/uni_modules/uview-ui/index.scss";
228
-	@import "@/common/iconfont/iconfont.css";
229 228
 	/*每个页面公共css */
230 229
 </style>

+ 0 - 33
common/iconfont/iconfont.css

@@ -1,33 +0,0 @@
1
-/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
2
-@font-face {
3
-  font-family: 'iconfont';
4
-  /* Project id 5096589 */
5
-  src: url('/common/iconfont/iconfont.ttf') format('ttf'),
6
-    url('//at.alicdn.com/t/c/font_5096589_rab6h2csv4.woff2?t=1766568458540') format('woff2'),
7
-    url('//at.alicdn.com/t/c/font_5096589_rab6h2csv4.woff?t=1766568458540') format('woff'),
8
-    url('//at.alicdn.com/t/c/font_5096589_rab6h2csv4.ttf?t=1766568458540') format('truetype');
9
-}
10
-
11
-.iconfont {
12
-  font-family: "iconfont" !important;
13
-  font-size: 16px;
14
-  font-style: normal;
15
-  -webkit-font-smoothing: antialiased;
16
-  -moz-osx-font-smoothing: grayscale;
17
-}
18
-
19
-.icon-crm-tubiao-zhexiantu:before {
20
-  content: "\eb96";
21
-}
22
-
23
-.icon-crm-jiangbei:before {
24
-  content: "\e604";
25
-}
26
-
27
-.icon-crm-tongji:before {
28
-  content: "\e649";
29
-}
30
-
31
-.icon-crm-dayin:before {
32
-  content: "\e841";
33
-}

BIN
common/iconfont/iconfont.ttf


+ 50 - 79
pages/person/cards/index.vue

@@ -23,7 +23,7 @@
23 23
             <!-- 条数统计 -->
24 24
             <view class="card_item card_item_full">
25 25
                 <view class="card_header count">
26
-                    <i class="iconfont icon-crm-tongji" style="font-size: 30rpx;color: #4c8afe;"></i>
26
+                    <img src="../../../static/icons/statistics.png" alt="" width="16px" height="16px">
27 27
                     <text class="card_title">条数统计</text>
28 28
                 </view>
29 29
                 <view class="card_content">
@@ -74,7 +74,7 @@
74 74
                     <view class="ranking_stats">
75 75
                         <view class="ranking_info">
76 76
                             <view class="ranking_icon">
77
-                                <i class="iconfont icon-crm-jiangbei" style="font-size: 30rpx;color: #ca8a04;"></i>
77
+                                <img src="../../../static/icons/trophy.png" alt="" width="16px" height="16px">
78 78
                             </view>
79 79
                             <view class="ranking_info_text">
80 80
                                 <text class="card_title">当前排名</text>
@@ -98,7 +98,7 @@
98 98
             <!-- 折线图 -->
99 99
             <view class="card_item">
100 100
                 <view class="chart_header">
101
-                    <i class="iconfont icon-crm-tubiao-zhexiantu" style="font-size: 30rpx;color: #6b7280;"></i>
101
+                    <img src="../../../static/icons/line.png" alt="" width="16px" height="16px">
102 102
                     <text class="card_title">近7天排名折线图</text>
103 103
                 </view>
104 104
                 <view class="charts_box">
@@ -152,79 +152,35 @@ export default {
152 152
                 level: '-',
153 153
                 score: '-'
154 154
             },
155
-            chartData: {
156
-                categories: [],
157
-                series: [
158
-                    {
159
-                        name: "核心数据",
160
-                        data: [],
161
-                        color: "#1890ff"
162
-                    }
163
-                ]
164
-            },
155
+            chartData: {},
165 156
             opts: {
166
-                padding: [5, 0, 10, -20],
167
-                backgroundColor: "#ffffff",
157
+                color: ["#1890FF"],
158
+                padding: [10, 10, 0, 0],
159
+                dataLabel: false,
160
+                dataPointShape: false,
161
+                enableScroll: false,
162
+                legend: {
163
+                    show: false
164
+                },
168 165
                 xAxis: {
169
-                    axisLine: { show: true, color: "#e5e5e5", width: 1 },
170
-                    gridLine: { show: true, color: "#f5f5f5", width: 1 },
171
-                    label: { fontSize: 24, color: "#666666", margin: 15 },
172
-                    tickLine: { show: false },
173
-                    lineStyle: {
174
-                        type: 'solid'
175
-                    },
176
-                    axisLabel: {
177
-                        padding: [0, 0, 0, -20]
178
-                    }
166
+                    disableGrid: true
179 167
                 },
180 168
                 yAxis: {
181
-                    axisLine: { show: true, color: "#e5e5e5", width: 1 },
182
-                    gridLine: { show: true, color: "#f5f5f5", width: 1 },
183
-                    label: { fontSize: 24, color: "#666666", margin: 15 },
184
-                    tickLine: { show: false },
185
-                    splitNumber: 4,
186
-                    min: 0,
187
-                    max: 200
169
+                    gridType: "dash",
170
+                    dashLength: 2,
171
+                    axisLabel:{
172
+                        show: false
173
+                    }
188 174
                 },
189
-                series: {
175
+                extra: {
190 176
                     line: {
191
-                        width: 6, // 折线宽度,确保可见
192
-                        smooth: true, // 先设为直线,便于调试,后续可改为true
193
-                        showSymbol: true, // 显示数据点,确保折线锚点可见
194
-                        symbol: "circle",
195
-                        symbolSize: 24,
196
-                        symbolColor: "#ffffff",
197
-                        symbolBorderColor: "#1890ff",
198
-                        symbolBorderWidth: 8,
199
-                        area: {
200
-                            show: false,
201
-                            color: "linear-gradient(to bottom, rgba(24,144,255,0.2), rgba(24,144,255,0))"
202
-                        }
177
+                        type: "curve",
178
+                        width: 3,
179
+                        activeType: "hollow",
180
+                        linearType: "custom",
181
+                        onShadow: true,
182
+                        animation: "horizontal"
203 183
                     }
204
-                },
205
-                // 提示框:确保悬浮正常显示
206
-                tooltip: {
207
-                    show: true,
208
-                    backgroundColor: "rgba(0,0,0,0.7)",
209
-                    borderRadius: 6,
210
-                    padding: [8, 12],
211
-                    labelFontSize: 22,
212
-                    labelColor: "#ffffff"
213
-                },
214
-                legend: {
215
-                    show: false,
216
-                    position: "top-right",
217
-                    fontSize: 24,
218
-                    color: "#666666",
219
-                    margin: [0, 20, 0, 0]
220
-                },
221
-                title: {
222
-                    show: false,
223
-                    name: "趋势折线图",
224
-                    fontSize: 28,
225
-                    color: "#333333",
226
-                    align: "left",
227
-                    margin: [0, 0, 15, 0]
228 184
                 }
229 185
             },
230 186
             clueList: [],
@@ -234,9 +190,9 @@ export default {
234 190
     methods: {
235 191
         getCardData() {
236 192
             uni.$u.api.getPersonCards({ userId: this.$store.state.user.userInfo.userId }).then(res => {
237
-              if (res.code === 200) {
238
-                this.cardData = res.data;
239
-              }
193
+                if (res.code === 200) {
194
+                    this.cardData = res.data;
195
+                }
240 196
             });
241 197
         },
242 198
         getClueList() {
@@ -246,13 +202,26 @@ export default {
246 202
                 }
247 203
             });
248 204
         },
249
-        getChartData() {
250
-            uni.$u.api.getPersonRanking({ userId: this.$store.state.user.userInfo.userId }).then(res => {
251
-                if (res.code === 200) {
252
-                    this.chartData.categories = res.data.map(item => item.x);
253
-                    this.chartData.series[0].data = res.data.map(item => item.y);
205
+        async getChartData() {
206
+            const res = await uni.$u.api.getPersonRanking({ userId: this.$store.state.user.userInfo.userId });
207
+            if (res.code === 200) {
208
+                let data = {
209
+                    categories: res.data.map(item => item.x),
210
+                    series: [
211
+                        {
212
+                            name: "近7天排名",
213
+                            data: res.data.map(item => item.y),
214
+                            setShadow: [
215
+                                3,
216
+                                8,
217
+                                15,
218
+                                "#1890FF"
219
+                            ],
220
+                        }
221
+                    ]
254 222
                 }
255
-            });
223
+                this.chartData = JSON.parse(JSON.stringify(data))
224
+            }
256 225
         },
257 226
         // 跳转私有线索页面
258 227
         toPrivateClue() {
@@ -262,7 +231,9 @@ export default {
262 231
     mounted() {
263 232
         this.getCardData();
264 233
         this.getClueList();
265
-        this.getChartData();
234
+        this.$nextTick(() => {
235
+            this.getChartData();
236
+        })
266 237
     },
267 238
 
268 239
 };

+ 2 - 0
pages/person/cards/styles/index.scss

@@ -212,6 +212,8 @@
212 212
     color: #6b7280;
213 213
     font-size: 24rpx;
214 214
     font-weight: 600;
215
+    display: flex;
216
+    align-items: center;
215 217
     .card_title{
216 218
       margin-left: 10rpx;
217 219
     }

+ 1 - 1
pages/wareHouse/components/detail.vue

@@ -190,7 +190,7 @@
190 190
                 <text class="bar_text">{{ lockStatus === '1' ? '解锁' : '锁单' }}</text>
191 191
             </view>
192 192
             <view class="bar_item">
193
-                <i class="iconfont icon-crm-dayin" style="font-size:46rpx;color: #9ca3af;"></i>
193
+                <img src="../../../static//icons/print.png" alt="" width="20px" height="20px">
194 194
                 <text class="bar_text">打印</text>
195 195
             </view>
196 196
             <view :class="['bar_item', { 'disabled': lockStatus === '1' }]" @click="handleOpenOrder">

BIN
static/icons/line.png


BIN
static/icons/print.png


BIN
static/icons/statistics.png


BIN
static/icons/trophy.png