Browse Source

2024-01-30

codeMan 1 year ago
parent
commit
3e5013f2ce

+ 18 - 2
src/SManagement/archives/components/Drawer.vue

@@ -1,7 +1,7 @@
 <template>
   <el-drawer title="详情" :visible.sync="isFileInfoPanlShow" :with-header="true">
     <p class="title">{{currentSelectFile.siteid}}</p>
-    <p class="people">浏览数:{{currentSelectFile.readcount}}</p>
+    <p class="people">浏览数:{{count}}</p>
     <file-item :itemStyle="itemStyle" 
                :fileData="[currentSelectFile]"
                :isDownLoad="true">
@@ -25,8 +25,25 @@ export default {
         title:16,
         descript: 14
       },
+      count:0
     };
   },
+  watch: {
+    isFileInfoPanlShow: {
+      async handler (newvalue,oldvalue) {
+        if (newvalue) {
+          let res = await this.$api.requested({
+            "classname": "saletool.salematerial.salematerial",
+            "method": "selectDetail",
+            "content": {
+                "attachmentid": this.currentSelectFile.attachmentid
+            }
+          })
+          this.count = res.data.readcount
+        }
+      }
+    }
+  },
   components: {
     FileItem
   },
@@ -38,7 +55,6 @@ export default {
     }
   },
   computed: {},
-  watch: {},
   created() {
 
   },

+ 1 - 0
src/SManagement/archives_ad/index.vue

@@ -101,6 +101,7 @@ export default {
       if (deleteList.length != 0) this.handleDelete(deleteList);
       this.fileData = res.data
       this.params.content.sort = res.sort
+      console.log(this.fileData);
     },
     /* 改变分类ID */
     changeTypeId(id) {

+ 1 - 1
src/utils/matchingFeilType.js

@@ -39,7 +39,7 @@ export default {
     },
     getSpecifiedImage (obj, getType = false) {
         let type = getType ? 'compressed' : 'thumbnail';
-        let imgObj = obj.subfiles.find(v => v.type == type);
+        let imgObj = obj.subfiles.length ? obj.subfiles.find(v => v.type == type) : ''
         return imgObj.url;
     }
 }