+
@@ -160,6 +154,7 @@
{{$L('重命名')}}
{{$L('复制')}}
{{$L('剪切')}}
+ {{showMultipleChoice?$L('取消多选'):$L('多选')}}
{{$L('共享')}}
{{$L('链接')}}
@@ -461,6 +456,7 @@ export default {
selectFile: [],
fileChecked: [],
shearFiles: [],
+ showMultipleChoice: false
}
},
@@ -928,7 +924,27 @@ export default {
break;
case 'shear':
- this.shearId = item.id;
+ this.showMultipleChoice = true;
+ this.fileChecked[item.id] = true;
+ this.onFileCheckClick(item);
+ for (const item of this.selectFile) {
+ let selected = false;
+ for (const shearFile of this.shearFiles) {
+ if ( shearFile.id === item.id ) {
+ selected = true;
+ break;
+ }
+ }
+ if (!selected)
+ this.shearFiles.push(item);
+ }
+ break;
+
+ case 'multipleChoice':
+ this.showMultipleChoice = !this.showMultipleChoice;
+ if(this.showMultipleChoice === false){
+ this.clearSelect();
+ }
break;
case 'batchShear':
@@ -1063,25 +1079,6 @@ export default {
this.$refs.linkInput.focus({cursor:'all'});
},
- shearTo() {
- if (!this.shearFile) {
- return;
- }
- this.$store.dispatch("call", {
- url: 'file/move',
- data: {
- id: this.shearFile.id,
- pid: this.pid,
- },
- }).then(({data, msg}) => {
- $A.messageSuccess(msg);
- this.shearId = 0;
- this.$store.dispatch("saveFile", data);
- }).catch(({msg}) => {
- $A.modalError(msg);
- });
- },
-
autoBlur(id) {
this.$nextTick(() => {
if (this.$refs['input_' + id]) {
@@ -1361,6 +1358,7 @@ export default {
this.$Modal.remove();
this.selectFile = [];
this.fileChecked = [];
+ this.showMultipleChoice = false;
$A.messageSuccess("已提交至后台处理,请稍后再回来查看结果吧");
}).catch(({msg}) => {
$A.modalError(msg, 301);
@@ -1417,6 +1415,7 @@ export default {
this.shearFiles = [];
this.selectFile = [];
this.fileChecked = [];
+ this.showMultipleChoice = false;
if ( this.tableMode ) // 如果是表格模式,则将表格取消全选
this.$refs.fileListTable.selectAll(false);
},