Bladeren bron

3.0.26debug问题

liuyanpeng 2 jaren geleden
bovenliggende
commit
c7be673680
2 gewijzigde bestanden met toevoegingen van 24 en 3 verwijderingen
  1. 1 1
      package.json
  2. 23 2
      src/components/customer/AssetInstanceSearchDetail.vue

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
   "name": "client-eam-v3",
   "description": "Leanwo Prodog Client",
-  "version": "3.0.25",
+  "version": "3.0.26",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
     "dev": "cross-env webpack serve --config ./webpack.dev.js",

+ 23 - 2
src/components/customer/AssetInstanceSearchDetail.vue

@@ -774,7 +774,11 @@
                       <td>{{ item.position }}</td>
                       <td>{{ item.type }}</td>
                       <td>
-                        <img
+                        <a-image
+                          :width="200"
+                          :src="getImageSrc(item.className,item.image)"
+                        />
+                        <!-- <img
                           :authSrc="
                             showRfidRecordThumbnailImage(
                               item.className,
@@ -788,7 +792,7 @@
                               item.image
                             )
                           "
-                        />
+                        /> -->
                       </td>
                     </tr>
                   </tbody>
@@ -921,6 +925,23 @@ export default {
   },
 
   methods: {
+
+    // 获取图片路径
+    getImageSrc : function(className, imageName) {
+      var protocol = window.location.protocol;
+      var host = window.location.host;
+      var localhostPath = protocol + '//' + host ;
+
+      var accountId = localStorage.getItem('#accountId');
+      if (imageName == null) {
+        return null;
+      }
+      if (imageName != null && imageName[0] == '/') {
+        return localhostPath + '/Files/' + accountId + '/Images/' + className + imageName;
+      } else {
+        return localhostPath + '/Files/' + accountId + '/Images/' + className + '/' + imageName;
+      }
+    },
     getEventOriginalEndDate: function () {
       const _self = this;
       // 前一个月的时间