From 3300f811726041a3175784324eb2be9458e80e09 Mon Sep 17 00:00:00 2001
From: hanbaoshan <hanbaoshan@aiotlink.com>
Date: 星期三, 21 十月 2020 10:37:10 +0800
Subject: [PATCH] 左侧目录树图标对齐
---
src/pages/cameraAccess/components/DataStackInfo.vue | 26 +++++++++++++++++++++-----
1 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/src/pages/cameraAccess/components/DataStackInfo.vue b/src/pages/cameraAccess/components/DataStackInfo.vue
index a2ce20f..4bd21d6 100644
--- a/src/pages/cameraAccess/components/DataStackInfo.vue
+++ b/src/pages/cameraAccess/components/DataStackInfo.vue
@@ -140,9 +140,9 @@
<el-image
v-if="row.type==2"
style="width: 30x; height: 30px"
- :src="`/files/${row.identifier}.jpg`"
+ :src="`/files/${row.path.substr(row.path.lastIndexOf('/')+1)}`"
fit="fill"
- :preview-src-list="[`/files/${row.identifier}.jpg`]"
+ :preview-src-list="[`/files/${row.path.substr(row.path.lastIndexOf('/')+1)}`]"
>
<div slot="error" :class="snapshotClass"></div>
</el-image>
@@ -413,6 +413,16 @@
beforeDestroy() {
this.taskUid = 0;
},
+ watch:{
+ 'fileList.length':{
+ handler(n,o){
+ //鏁版嵁鏍堟枃浠舵暟閲忓彉鏇�
+ //鏇存柊鐙珛鍦烘櫙鏁版嵁鏍堟枃浠�
+ console.log(this.$root.$children[0].$children[1].$refs['sepRule'])
+ this.$root.$children[0].$children[1].$refs['sepRule'].getStackFiles();
+ }
+ }
+ },
methods: {
preview(row) {
this.previewDialog = true;
@@ -421,7 +431,7 @@
this.videoUrl = "/files/" + row.identifier + ".mp4"
}else if(row.type===2){
- this.imgUrl = "/files/" + row.identifier + ".jpg"
+ this.imgUrl = "/files/" + row.path.substr(row.path.lastIndexOf('/')+1)
}
},
// 娓呯┖杈撳叆妗�
@@ -445,7 +455,7 @@
this.fileList = [];
},
selectDir(node) {
- debugger
+
if (node.id === "") {
return
}
@@ -492,6 +502,7 @@
findAllFileByStackId({ name: this.searchInput, stackId: this.form.id, page: this.page, size: this.size, type: 0 }).then(rsp => {
if (rsp && rsp.success && rsp.data.total > 0) {
this.fileList = rsp.data.dataList;
+
this.total = rsp.data.total;
// 瀹氭椂鍒锋柊浼氭竻绌洪�変腑鐘舵�侊紝鍦ㄨ繖閲屾仮澶�
@@ -593,6 +604,9 @@
})
if (res && res.success) {
this.fetchFileList();
+ //鏇存柊鐙珛鍦烘櫙鏁版嵁鏍堟枃浠�
+ console.log(this.$root.$children[0].$children[1].$refs['sepRule'])
+ this.$root.$children[0].$children[1].$refs['sepRule'].getStackFiles();
this.$notify({
type: "success",
message: "鏂囦欢鎺掑簭鎴愬姛锛�"
@@ -631,6 +645,7 @@
cmd.cb(cmd.data);
},
handleFileDelete(rows, multi = false) {
+ let _this = this;
let ids = this.multipleSelection;
if (!multi) {
ids = [rows.id];
@@ -652,7 +667,8 @@
type: "error",
message: "鏂囦欢宸插垹闄�"
})
- })
+ });
+
}).catch(() => { })
},
handleFileMove(row) {
--
Gitblit v1.8.0