Browse Source

安防人员图片加载优化

tianyabing 2 years ago
parent
commit
b4b33f7a23
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/components/security/person/components/securityPersonDuty.vue

+ 7 - 0
src/components/security/person/components/securityPersonDuty.vue

@@ -40,6 +40,13 @@ export default {
       apiSecurityPerson.getPersonDuty({
         type: type
       }).then(res=>{
+        if (res) {
+          res.forEach(item => {
+            if (item.photo.indexOf('/')===0) {
+              item.photo = '/ioc-api'+item.photo;
+            }
+          })
+        }
         this.dutyPerson = res;
         this.oriDutyPerson = JSON.parse(JSON.stringify(this.dutyPerson));
         this.loading = false;