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() { deleteFileClick() {
this.isFileRightMenuVisible = false; 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: { watch: {


+ 15
- 2
src/views/main_web/workspace/workspace.new.vue Прегледај датотеку

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


Loading…
Откажи
Сачувај