revive 4 роки тому
джерело
коміт
6e73938d7a
2 змінених файлів з 16 додано та 3 видалено
  1. +1
    -1
      src/views/main_web/workspace/components/file-item.vue
  2. +15
    -2
      src/views/main_web/workspace/workspace.new.vue

+ 1
- 1
src/views/main_web/workspace/components/file-item.vue Переглянути файл

@@ -327,7 +327,7 @@ export default {
},
deleteFileClick() {
this.isFileRightMenuVisible = false;
this.$emit('deleteFileClick', this.file.id, this.file.createUserId, this.file.archName);
this.$emit('deleteFileClick', this.file.id, this.file.createUserId, this.file.archName, this.file.ipfsCid);
}
},
watch: {


+ 15
- 2
src/views/main_web/workspace/workspace.new.vue Переглянути файл

@@ -1153,7 +1153,14 @@ export default {
tempName = targetFile.archName + ` - 副本(${ ++ nowNum})`;
isExists = this.workFileList.find(file => file.archName === tempName);
}
copyFile.archName = tempName;
let hour = '0' + new Date().getHours();
let minute ='0' + new Date().getMinutes();
let seconds = '0' + new Date().getSeconds();
hour = hour.substr(hour.length-2);
minute = minute.substr(minute.length-2);
seconds = seconds.substr(seconds.length-2);
copyFile.archName = tempName + '-' + hour + minute + seconds;
copyFile.modifyUserId = sessionStorage.userId;
copyFile.modifyTime = new Date();
copyFile.createUserId = sessionStorage.userId;
@@ -1163,7 +1170,7 @@ export default {
const addFileRes = await services.addFile(copyFile);
this.fetchFolderFiles();
},
deleteFileClick(fileId, createUserId, archName) {
deleteFileClick(fileId, createUserId, archName, ipfscid) {
var thisApp = this;
if (createUserId != sessionStorage.userId) {
thisApp.$notify({
@@ -1189,6 +1196,12 @@ export default {
offset: 100,
duration: 2500,
});
for(let key in thisApp.localFileHashMap) {
if(thisApp.localFileHashMap[key] === ipfscid) {
delete thisApp.localFileHashMap[key];
break;
}
}
thisApp.fetchFolderFiles();
}
})


Завантаження…
Відмінити
Зберегти