Commit cc1ffdd9bcac43dd03f54cb86b9f9c2ec75ca835
Merge branch 'fix/workbench-assets-import' into 'main_dev'
fix: 修复静态资源引入问题 See merge request yunteng/thingskit-front!624
Showing
2 changed files
with
13 additions
and
7 deletions
| @@ -103,6 +103,12 @@ | @@ -103,6 +103,12 @@ | ||
| 103 | import { HomeStatisticsRecordType } from '/@/api/dashboard/model'; | 103 | import { HomeStatisticsRecordType } from '/@/api/dashboard/model'; |
| 104 | import { useRole } from '/@/hooks/business/useRole'; | 104 | import { useRole } from '/@/hooks/business/useRole'; |
| 105 | import { unref } from 'vue'; | 105 | import { unref } from 'vue'; |
| 106 | + import productPicture from '/@/assets/images/product.png'; | ||
| 107 | + import devicePicture from '/@/assets/images/device-count.png'; | ||
| 108 | + import alarmPicture from '/@/assets/images/alarm-count.png'; | ||
| 109 | + import msgPicture from '/@/assets/images/msg-count.png'; | ||
| 110 | + import tenantPicture from '/@/assets/images/zh.png'; | ||
| 111 | + import customerPicture from '/@/assets/images/kf.png'; | ||
| 106 | 112 | ||
| 107 | interface RecordType { | 113 | interface RecordType { |
| 108 | value: number; | 114 | value: number; |
| @@ -153,7 +159,7 @@ | @@ -153,7 +159,7 @@ | ||
| 153 | const { deviceInfo, productInfo, alarmInfo, messageInfo, customerInfo, tenantInfo } = record; | 159 | const { deviceInfo, productInfo, alarmInfo, messageInfo, customerInfo, tenantInfo } = record; |
| 154 | 160 | ||
| 155 | const productTotal: StatisticalItemType = { | 161 | const productTotal: StatisticalItemType = { |
| 156 | - images: '/src/assets/images/product.png', | 162 | + images: productPicture, |
| 157 | totals: [{ label: '产品数', value: productInfo?.sumCount }], | 163 | totals: [{ label: '产品数', value: productInfo?.sumCount }], |
| 158 | tooltips: [ | 164 | tooltips: [ |
| 159 | { label: '产品数', value: productInfo?.sumCount }, | 165 | { label: '产品数', value: productInfo?.sumCount }, |
| @@ -163,7 +169,7 @@ | @@ -163,7 +169,7 @@ | ||
| 163 | }; | 169 | }; |
| 164 | 170 | ||
| 165 | const deviceTotal: StatisticalItemType = { | 171 | const deviceTotal: StatisticalItemType = { |
| 166 | - images: '/src/assets/images/device-count.png', | 172 | + images: devicePicture, |
| 167 | totals: [{ label: '设备数', value: deviceInfo?.sumCount }], | 173 | totals: [{ label: '设备数', value: deviceInfo?.sumCount }], |
| 168 | tooltips: [ | 174 | tooltips: [ |
| 169 | { label: '设备数', value: deviceInfo?.sumCount }, | 175 | { label: '设备数', value: deviceInfo?.sumCount }, |
| @@ -173,7 +179,7 @@ | @@ -173,7 +179,7 @@ | ||
| 173 | }; | 179 | }; |
| 174 | 180 | ||
| 175 | const alarmTotal: StatisticalItemType = { | 181 | const alarmTotal: StatisticalItemType = { |
| 176 | - images: '/src/assets/images/alarm-count.png', | 182 | + images: alarmPicture, |
| 177 | totals: [{ label: '告警数', value: alarmInfo?.sumCount }], | 183 | totals: [{ label: '告警数', value: alarmInfo?.sumCount }], |
| 178 | tooltips: [ | 184 | tooltips: [ |
| 179 | { label: '告警数', value: alarmInfo?.sumCount }, | 185 | { label: '告警数', value: alarmInfo?.sumCount }, |
| @@ -183,7 +189,7 @@ | @@ -183,7 +189,7 @@ | ||
| 183 | }; | 189 | }; |
| 184 | 190 | ||
| 185 | const messageTotal: StatisticalItemType = { | 191 | const messageTotal: StatisticalItemType = { |
| 186 | - images: '/src/assets/images/msg-count.png', | 192 | + images: msgPicture, |
| 187 | totals: [ | 193 | totals: [ |
| 188 | { label: '消息数', value: messageInfo?.messageCount }, | 194 | { label: '消息数', value: messageInfo?.messageCount }, |
| 189 | { label: '消息点数', value: messageInfo?.dataPointsCount }, | 195 | { label: '消息点数', value: messageInfo?.dataPointsCount }, |
| @@ -199,7 +205,7 @@ | @@ -199,7 +205,7 @@ | ||
| 199 | }; | 205 | }; |
| 200 | 206 | ||
| 201 | const tenantTotal: StatisticalItemType = { | 207 | const tenantTotal: StatisticalItemType = { |
| 202 | - images: '/src/assets/images/zh.png', | 208 | + images: tenantPicture, |
| 203 | totals: [{ label: '租户总量', value: tenantInfo?.sumCount }], | 209 | totals: [{ label: '租户总量', value: tenantInfo?.sumCount }], |
| 204 | tooltips: [ | 210 | tooltips: [ |
| 205 | { label: '租户总量', value: tenantInfo?.sumCount }, | 211 | { label: '租户总量', value: tenantInfo?.sumCount }, |
| @@ -209,7 +215,7 @@ | @@ -209,7 +215,7 @@ | ||
| 209 | }; | 215 | }; |
| 210 | 216 | ||
| 211 | const customerTotal: StatisticalItemType = { | 217 | const customerTotal: StatisticalItemType = { |
| 212 | - images: '/src/assets/images/kf.png', | 218 | + images: customerPicture, |
| 213 | totals: [{ label: '客户总量', value: customerInfo?.sumCount }], | 219 | totals: [{ label: '客户总量', value: customerInfo?.sumCount }], |
| 214 | tooltips: [ | 220 | tooltips: [ |
| 215 | { label: '客户总量', value: customerInfo?.sumCount }, | 221 | { label: '客户总量', value: customerInfo?.sumCount }, |
| @@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
| 32 | <Card size="small" class="md:w-1/3 w-full !md:mt-0 !mt-4"> | 32 | <Card size="small" class="md:w-1/3 w-full !md:mt-0 !mt-4"> |
| 33 | <main class="flex flex-col"> | 33 | <main class="flex flex-col"> |
| 34 | <div class="flex"> | 34 | <div class="flex"> |
| 35 | - <img class="w-22.5 h-22.5 mb-2.5 mr-2.5" :src="value.images" alt="" /> | 35 | + <img class="!w-22.5 !h-22.5 !mb-2.5 !mr-2.5" :src="value.images" alt="" /> |
| 36 | <div class="flex flex-1"> | 36 | <div class="flex flex-1"> |
| 37 | <div | 37 | <div |
| 38 | class="flex-auto w-full" | 38 | class="flex-auto w-full" |