19
19
></svg-icon >
20
20
{{ item.label }}
21
21
</v-contextmenu-item >
22
- <v-contextmenu-submenu v-if =" item.child" :title =" item.label" >
22
+ <v-contextmenu-submenu v-if =" item.child" :disabled = " item.homeDisable && (!path || path.length < 2) " : title =" item.label" >
23
23
<!-- 二级菜单 -->
24
24
<div v-for =" itemSecond of item.child" :key =" itemSecond.operation" >
25
25
<v-contextmenu-item
@@ -2268,7 +2268,9 @@ export default {
2268
2268
goBack () {
2269
2269
if (this .pathList .length <= 1 ) {
2270
2270
const queryTagId = this .$route .query .tagId ? ` &tagId=${ this .$route .query .tagId } ` : ' '
2271
- this .$router .push (` /?vmode=${ this .vmode } &path=${ encodeURI (this .path )}${ queryTagId} ` );
2271
+ const keyword = this .$route .query .keyword ? ` &keyword=${ this .$route .query .keyword } ` : ' '
2272
+ const basePath = this .getBasePath ()
2273
+ this .$router .push (` /?vmode=${ this .vmode } &path=${ encodeURI (this .path )}${ queryTagId}${ basePath}${ keyword} ` );
2272
2274
return ;
2273
2275
}
2274
2276
this .lastLink ();
@@ -2309,10 +2311,12 @@ export default {
2309
2311
2310
2312
if (! unPushLink) {
2311
2313
const queryTagId = this .$route .query .tagId ? ` &tagId=${ this .$route .query .tagId } ` : ' '
2314
+ const basePath = this .getBasePath ()
2315
+ const keyword = this .$route .query .keyword ? ` &keyword=${ this .$route .query .keyword } ` : ' '
2312
2316
if (! this .$route .query .path ) {
2313
- this .$router .push (` ?vmode=${ this .vmode } &path=${ encodeURI (this .path )}${ queryFolder ? ' &folder=' + queryFolder : ' ' }${ queryTagId} ` );
2317
+ this .$router .push (` ?vmode=${ this .vmode } &path=${ encodeURI (this .path )}${ queryFolder ? ' &folder=' + queryFolder : ' ' }${ queryTagId}${ basePath }${ keyword } ` );
2314
2318
} else {
2315
- this .$router .push (` ?vmode=${ this .vmode } &path=${ encodeURI (this .path )}${ queryFolder ? ' &folder=' + queryFolder : ' ' }${ queryTagId} ` );
2319
+ this .$router .push (` ?vmode=${ this .vmode } &path=${ encodeURI (this .path )}${ queryFolder ? ' &folder=' + queryFolder : ' ' }${ queryTagId}${ basePath }${ keyword } ` );
2316
2320
}
2317
2321
}
2318
2322
if (! unRefresh) {
@@ -2321,6 +2325,13 @@ export default {
2321
2325
}
2322
2326
}
2323
2327
},
2328
+ getBasePath () {
2329
+ let basePath = this .$route .query .basePath ? ` &basePath=${ this .$route .query .basePath } ` : ' '
2330
+ if (! this .path || this .path .length < 2 ) {
2331
+ return ' '
2332
+ }
2333
+ return basePath
2334
+ },
2324
2335
// 新建文档
2325
2336
newDocument () {
2326
2337
window .open (` /setting/website/manager-articles?operation=new` , " _blank" );
@@ -2541,7 +2552,9 @@ export default {
2541
2552
}
2542
2553
this .editingIndex = - 1 ;
2543
2554
const queryTagId = this .$route .query .tagId ? ` &tagId=${ this .$route .query .tagId } ` : ' '
2544
- this .$router .push (` ?vmode=${ this .vmode } &path=${ this .path }${ this .$route .query .folder ? ' &folder=' + this .$route .query .folder : ' ' }${ queryTagId} ` );
2555
+ const basePath = this .getBasePath ()
2556
+ const keyword = this .$route .query .keyword ? ` &keyword=${ this .$route .query .keyword } ` : ' '
2557
+ this .$router .push (` ?vmode=${ this .vmode } &path=${ this .path }${ this .$route .query .folder ? ' &folder=' + this .$route .query .folder : ' ' }${ queryTagId}${ basePath}${ keyword} ` );
2545
2558
// 改变拖拽目标
2546
2559
this .rowDrop ();
2547
2560
// 画矩形选取
@@ -2713,9 +2726,10 @@ export default {
2713
2726
this .pathList .push (item1);
2714
2727
}
2715
2728
const queryTagId = this .$route .query .tagId ? ` &tagId=${ this .$route .query .tagId } ` : ' '
2729
+ const basePath = this .getBasePath ()
2716
2730
const keyword = key ? ` &keyword=${ key} ` : ' '
2717
2731
const path = this .path ? encodeURI (this .path ) : " /" ;
2718
- this .$router .push (` ?vmode=${ this .vmode } &path=${ path}${ keyword}${ queryTagId} ` );
2732
+ this .$router .push (` ?vmode=${ this .vmode } &path=${ path}${ keyword}${ queryTagId}${ basePath } ` );
2719
2733
api .searchFile ({
2720
2734
userId: this .$store .state .user .userId ,
2721
2735
username: this .$store .state .user .name ,
@@ -4049,6 +4063,7 @@ export default {
4049
4063
if (row .isFolder ) {
4050
4064
this .editingIndex = - 1 ;
4051
4065
const queryTagId = this .$route .query .tagId ? ` &tagId=${ this .$route .query .tagId } ` : ' '
4066
+ const keyword = this .$route .query .keyword ? ` &keyword=${ this .$route .query .keyword } ` : ' '
4052
4067
// 打开文件夹
4053
4068
if (this .listModeSearch ) {
4054
4069
const item = {};
@@ -4057,9 +4072,8 @@ export default {
4057
4072
item[" row" ] = row;
4058
4073
this .pathList .push (item);
4059
4074
this .pagination .pageIndex = 1 ;
4060
- const keyword = this .$route .query .keyword ? ` &keyword=${ this .$route .query .keyword } ` : ' '
4061
4075
const folder = row .id ? ` &folder=${ row .id } ` : ' '
4062
- this .$router .push (` ?vmode=${ this .vmode }${ keyword}${ folder}${ queryTagId} ` );
4076
+ this .$router .push (` ?vmode=${ this .vmode }${ keyword}${ folder}${ queryTagId}${ basePath } ` );
4063
4077
this .searchFileAndOpenDir (row);
4064
4078
} else {
4065
4079
let notHomePage = this .$route .path .length > 1
@@ -4083,7 +4097,8 @@ export default {
4083
4097
if (row .mountFileId ) {
4084
4098
localStorage .setItem (this .path , row .mountFileId )
4085
4099
}
4086
- this .$router .push (` ?vmode=${ this .vmode } &path=${ path}${ row .mountFileId ? ' &folder=' + row .mountFileId : ' ' }${ queryTagId}${ this .basePath .length > 1 ? ' &basePath=' + this .basePath : ' ' } ` );
4100
+ const basePath = this .basePath .length > 1 ? ' &basePath=' + this .basePath : ' '
4101
+ this .$router .push (` ?vmode=${ this .vmode } &path=${ path}${ row .mountFileId ? ' &folder=' + row .mountFileId : ' ' }${ queryTagId}${ basePath}${ keyword} ` );
4087
4102
this .openDir (row);
4088
4103
}
4089
4104
} else {
0 commit comments