Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZiBoYingJI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kimber
ZiBoYingJI
Commits
bcd6b81e
Commit
bcd6b81e
authored
Aug 02, 2024
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电子档案 文件夹列表、文件夹新增、上传文件、文件删除 、文件列表
parent
bb311e6e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
265 additions
and
76 deletions
+265
-76
edoc.js
src/api/kd/edoc.js
+34
-21
index.vue
src/views/edoc/index.vue
+231
-55
No files found.
src/api/kd/edoc.js
View file @
bcd6b81e
import
request
from
'
@/utils/request
'
import
request
from
'
@/utils/request
'
export
default
{
export
default
{
// ID查询
// 获取所有目录
getfileByFolderId
:
(
catalogueId
)
=>
{
return
request
({
url
:
'
api/document
'
,
method
:
'
get
'
,
params
:
{
catalogueId
}
})
},
// page查询
getDataList
:
(
pageParam
)
=>
{
getDataList
:
(
pageParam
)
=>
{
return
request
({
return
request
({
url
:
'
api/document-catalogue/all
'
,
url
:
'
api/document-catalogue/all
'
,
...
@@ -17,31 +9,52 @@ export default {
...
@@ -17,31 +9,52 @@ export default {
params
:
pageParam
params
:
pageParam
})
})
},
},
// 新增目录
// 新增
addFolder
:
(
data
)
=>
{
addFileByFolderId
:
(
data
)
=>
{
return
request
({
return
request
({
url
:
'
api/
video-min
e
'
,
url
:
'
api/
document-catalogu
e
'
,
method
:
'
post
'
,
method
:
'
post
'
,
data
data
})
})
},
},
// 修改
// 新增目录
set
:
(
iotNormalMachine
)
=>
{
delFolder
:
(
ids
)
=>
{
return
request
({
url
:
'
api/document-catalogue
'
,
method
:
'
delete
'
,
data
:
ids
})
},
// 修改文件夹名称: (iotNormalMachine) => {
updateFolder
:
(
data
)
=>
{
return
request
({
return
request
({
url
:
'
api/
video-min
e
'
,
url
:
'
api/
document-catalogu
e
'
,
method
:
'
put
'
,
method
:
'
put
'
,
data
:
iotNormalMachine
data
})
},
// 查看目录文件列表
getfileByFolderId
:
(
params
)
=>
{
return
request
({
url
:
'
api/document/catalogueId
'
,
method
:
'
get
'
,
params
})
},
// 新增目录-文件
addFileByFolderId
:
(
data
)
=>
{
return
request
({
url
:
'
api/document
'
,
method
:
'
post
'
,
data
})
})
},
},
// 删除
// 删除
del
fileById
:
(
id
)
=>
{
del
FileById
:
(
ids
)
=>
{
return
request
({
return
request
({
url
:
'
api/document
'
,
url
:
'
api/document
'
,
method
:
'
delete
'
,
method
:
'
delete
'
,
data
:
{
data
:
ids
id
}
})
})
},
},
// 根据企业查询所属矿山(含停产)enterpriseId
// 根据企业查询所属矿山(含停产)enterpriseId
...
...
src/views/edoc/index.vue
View file @
bcd6b81e
...
@@ -29,6 +29,25 @@
...
@@ -29,6 +29,25 @@
<el-button
:loading=
"crud.status.cu === 2"
type=
"primary"
@
click=
"crud.submitCU"
>
确认
</el-button>
<el-button
:loading=
"crud.status.cu === 2"
type=
"primary"
@
click=
"crud.submitCU"
>
确认
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<el-dialog
title=
"文件夹"
:visible.sync=
"folderModal"
:close-on-click-modal=
"false"
width=
"500px"
>
<el-form
ref=
"folderForm"
label-width=
"120px"
:model=
"folderForm"
:rules=
"folderRules"
>
<el-form-item
label=
"名称"
prop=
"name"
>
<el-input
v-model=
"folderForm.name"
size=
"small"
clearable
placeholder=
"请输入名称"
style=
"width: 200px;"
class=
"filter-item"
/>
</el-form-item>
<el-form-item
label=
"顺序"
prop=
"order"
>
<el-input
v-model=
"folderForm.order"
size=
"small"
clearable
placeholder=
"请输入顺序"
style=
"width: 200px;"
class=
"filter-item"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"folderModal = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"confirmFolder"
>
确定
</el-button>
</div>
</el-dialog>
<!-- 新增窗口 -->
<!-- 新增窗口 -->
<el-dialog
<el-dialog
title=
"文件上传"
title=
"文件上传"
...
@@ -65,7 +84,7 @@
...
@@ -65,7 +84,7 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"
adddialogform
= false"
>
取消
</el-button>
<el-button
@
click=
"
fileUploadModal
= false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"confirmUploadFile"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"confirmUploadFile"
>
确定
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
@@ -79,18 +98,36 @@
...
@@ -79,18 +98,36 @@
size=
"mini"
size=
"mini"
style=
"float: right; margin-left:6px;"
style=
"float: right; margin-left:6px;"
type=
"danger"
type=
"danger"
@
click=
"
saveMenu
"
>
@
click=
"
delFolder
"
>
删除
</el-button>
删除
</el-button>
<el-button
icon=
"el-icon-plus"
size=
"mini"
style=
"float: right;"
type=
"primary"
@
click=
"updateFolder"
>
修改
</el-button>
<el-button
<el-button
icon=
"el-icon-plus"
icon=
"el-icon-plus"
size=
"mini"
size=
"mini"
style=
"float: right;"
style=
"float: right;"
type=
"primary"
type=
"primary"
@
click=
"
saveMenu
"
>
@
click=
"
addFolder
"
>
新建
</el-button>
添加
</el-button>
</div>
</div>
<el-tree
<el-tree
ref=
"menu"
:data=
"menus"
:props=
"defaultProps"
check-strictly
accordion
show-checkbox
node-key=
"id"
@
check=
"menuChange"
@
node-click=
"menuClick"
/>
<!--
<el-tree
ref=
"menu"
ref=
"menu"
lazy
lazy
:data=
"menus"
:data=
"menus"
...
@@ -103,7 +140,7 @@
...
@@ -103,7 +140,7 @@
node-key=
"id"
node-key=
"id"
@
check=
"menuChange"
@
check=
"menuChange"
@
node-click=
"menuClick"
@
node-click=
"menuClick"
/>
/>
-->
</el-card>
</el-card>
</el-col>
</el-col>
...
@@ -117,15 +154,15 @@
...
@@ -117,15 +154,15 @@
<el-input
v-model=
"query.blurry"
size=
"small"
clearable
placeholder=
"查询文件名称"
style=
"width: 200px;"
class=
"filter-item"
@
keyup.enter.native=
"crud.toQuery"
/>
<el-input
v-model=
"query.blurry"
size=
"small"
clearable
placeholder=
"查询文件名称"
style=
"width: 200px;"
class=
"filter-item"
@
keyup.enter.native=
"crud.toQuery"
/>
<el-button
type=
"primary"
size=
"mini"
>
查询
</el-button>
<el-button
type=
"primary"
size=
"mini"
>
查询
</el-button>
</div>
</div>
<el-table
ref=
"table"
style=
"width: 100%;"
:data=
"
crud.data
"
>
<el-table
ref=
"table"
style=
"width: 100%;"
:data=
"
fileDataList
"
>
<el-table-column
type=
""
width=
"55"
/>
<el-table-column
type=
""
width=
"55"
/>
<el-table-column
prop=
"
n
ame"
label=
"文件名称"
/>
<el-table-column
prop=
"
originallyN
ame"
label=
"文件名称"
/>
<el-table-column
label=
"文件分类"
prop=
"
level
"
width=
"100"
/>
<el-table-column
label=
"文件分类"
prop=
"
classification
"
width=
"100"
/>
<el-table-column
:show-overflow-tooltip=
"true"
width=
"200px"
prop=
"createTime"
label=
"录入时间"
/>
<el-table-column
width=
"200px"
prop=
"createTime"
label=
"录入时间"
/>
<el-table-column
v-if=
"checkPer(['admin','roles:edit','roles:del'])"
label=
"操作"
width=
"230px"
align=
"center"
>
<el-table-column
label=
"操作"
width=
"230px"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"success"
size=
"mini"
>
下载
</el-button>
<el-button
type=
"success"
size=
"mini"
@
click=
"downFileById(scope.row)"
>
下载
</el-button>
<el-button
type=
"danger"
size=
"mini"
>
删除
</el-button>
<el-button
type=
"danger"
size=
"mini"
@
click=
"delFileById(scope.row)"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -147,7 +184,9 @@
...
@@ -147,7 +184,9 @@
<
script
>
<
script
>
import
crudRoles
from
'
@/api/system/role
'
import
crudRoles
from
'
@/api/system/role
'
import
{
getfileByFolderId
,
getFolderList
,
addFileByFolderId
,
delfileById
}
from
'
@/api/kd/edoc
'
// import edoc{ getfileByFolderId, getFolderList, addFileByFolderId, delfileById } from '@/api/kd/edoc'
import
edocApi
from
'
@/api/kd/edoc
'
import
{
getMenusTree
,
getChild
}
from
'
@/api/system/menu
'
import
{
getMenusTree
,
getChild
}
from
'
@/api/system/menu
'
import
CRUD
,
{
presenter
,
header
,
form
,
crud
}
from
'
@crud/crud
'
import
CRUD
,
{
presenter
,
header
,
form
,
crud
}
from
'
@crud/crud
'
import
rrOperation
from
'
@crud/RR.operation
'
import
rrOperation
from
'
@crud/RR.operation
'
...
@@ -159,10 +198,11 @@
...
@@ -159,10 +198,11 @@
import
{
LOAD_CHILDREN_OPTIONS
}
from
'
@riophae/vue-treeselect
'
import
{
LOAD_CHILDREN_OPTIONS
}
from
'
@riophae/vue-treeselect
'
import
DateRangePicker
from
'
@/components/DateRangePicker
'
import
DateRangePicker
from
'
@/components/DateRangePicker
'
import
{
mapGetters
}
from
'
vuex
'
import
{
mapGetters
}
from
'
vuex
'
import
{
getToken
}
from
'
@/utils/auth
'
const
defaultForm
=
{
id
:
null
,
name
:
null
,
depts
:
[],
description
:
null
,
dataScope
:
'
全部
'
,
level
:
3
}
const
defaultForm
=
{
id
:
null
,
name
:
null
,
depts
:
[],
description
:
null
,
dataScope
:
'
全部
'
,
level
:
3
}
export
default
{
export
default
{
name
:
'
Role
'
,
name
:
'
Folder
'
,
components
:
{
Treeselect
,
pagination
,
crudOperation
,
rrOperation
,
udOperation
,
DateRangePicker
},
components
:
{
Treeselect
,
pagination
,
crudOperation
,
rrOperation
,
udOperation
,
DateRangePicker
},
cruds
()
{
cruds
()
{
return
CRUD
({
title
:
'
角色
'
,
url
:
'
api/roles
'
,
sort
:
'
level,asc
'
,
crudMethod
:
{
...
crudRoles
}})
return
CRUD
({
title
:
'
角色
'
,
url
:
'
api/roles
'
,
sort
:
'
level,asc
'
,
crudMethod
:
{
...
crudRoles
}})
...
@@ -170,16 +210,22 @@
...
@@ -170,16 +210,22 @@
mixins
:
[
presenter
(),
header
(),
form
(
defaultForm
),
crud
()],
mixins
:
[
presenter
(),
header
(),
form
(
defaultForm
),
crud
()],
data
()
{
data
()
{
return
{
return
{
folderModal
:
false
,
folderForm
:
{
name
:
''
,
order
:
0
,
},
fileType
:
''
,
fileType
:
''
,
fileUploadModal
:
false
,
fileUploadModal
:
false
,
addEnterhdPics
:
[],
addEnterhdPics
:
[],
currentFolderId
:
''
,
currentFolderId
:
''
,
currentCheckedFolderId
:
''
,
fileDataList
:
[],
fileDataList
:
[],
totalElement
:
0
,
totalElement
:
0
,
currentPage
:
0
,
currentPage
:
0
,
currenetPageDegree
:
10
,
currenetPageDegree
:
10
,
dateScopes
:
[
"
全部
"
,
"
本级及以下
"
,
"
自定义
"
,],
dateScopes
:
[
"
全部
"
,
"
本级及以下
"
,
"
自定义
"
,],
defaultProps
:
{
children
:
'
children
'
,
label
:
'
label
'
,
isLeaf
:
'
leaf
'
},
defaultProps
:
{
children
:
'
children
'
,
label
:
'
name
'
,
isLeaf
:
'
leaf
'
},
level
:
3
,
level
:
3
,
currentId
:
0
,
currentName
:
''
,
menuLoading
:
false
,
showButton
:
false
,
currentId
:
0
,
currentName
:
''
,
menuLoading
:
false
,
showButton
:
false
,
menus
:
[],
menuIds
:
[],
depts
:
[],
deptDatas
:
[],
// 多选时使用
menus
:
[],
menuIds
:
[],
depts
:
[],
deptDatas
:
[],
// 多选时使用
...
@@ -188,52 +234,176 @@
...
@@ -188,52 +234,176 @@
edit
:
[
'
admin
'
,
'
roles:edit
'
],
edit
:
[
'
admin
'
,
'
roles:edit
'
],
del
:
[
'
admin
'
,
'
roles:del
'
]
del
:
[
'
admin
'
,
'
roles:del
'
]
},
},
rules
:
{
folderRules
:
{
order
:
[
{
required
:
true
,
message
:
'
请输入顺序
'
,
trigger
:
'
blur
'
}
],
name
:
[
name
:
[
{
required
:
true
,
message
:
'
请输入名称
'
,
trigger
:
'
blur
'
}
{
required
:
true
,
message
:
'
请输入名称
'
,
trigger
:
'
blur
'
}
],
permission
:
[
{
required
:
true
,
message
:
'
请输入权限
'
,
trigger
:
'
blur
'
}
]
]
}
}
}
}
},
},
computed
:
{
computed
:
{
},
},
mounted
(){
this
.
getDataList
()
// 获取所有文件夹
},
created
()
{
created
()
{
crudRoles
.
getLevel
().
then
(
data
=>
{
//
crudRoles.getLevel().then(data => {
this
.
level
=
data
.
level
//
this.level = data.level
})
//
})
},
},
methods
:
{
methods
:
{
// 当前页的条数变化
// 当前页的条数变化
handleSizeChange
(
val
)
{
handleSizeChange
(
val
)
{
this
.
currenetPageDegree
=
val
;
this
.
currenetPageDegree
=
val
;
this
.
getfileByFolderId
();
this
.
getfileByFolderId
();
},
},
// 当前第几页
// 当前第几页
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
this
.
currentPage
=
val
;
this
.
currentPage
=
val
;
this
.
getfileByFolderId
();
this
.
getfileByFolderId
();
},
getDataList
(){
edocApi
.
getDataList
({
}).
then
((
res
)
=>
{
this
.
menus
=
res
.
body
})
},
confirmFolder
(){
if
(
!
this
.
currentFolderId
){
this
.
$message
.
warning
(
'
请选择文件夹
'
)
return
}
this
.
$refs
[
'
folderForm
'
].
validate
(
valid
=>
{
if
(
valid
)
{
edocApi
.
addFolder
({
...
this
.
folderForm
,
pid
:
this
.
currentFolderId
,
}).
then
((
res
)
=>
{
this
.
$message
.
success
(
'
操作成功
'
)
this
.
getDataList
()
})
}
})
},
addFolder
(){
this
.
folderModal
=
true
this
.
folderForm
=
{
name
:
''
,
order
:
''
}
},
delFolder
(){
if
(
!
this
.
currentCheckedFolderId
){
this
.
$message
.
warning
(
'
请勾选要操作的文件夹
'
)
return
}
this
.
$confirm
(
"
确定要删除吗?
"
,
"
提示
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
,
}).
then
(
()
=>
{
edocApi
.
delFolder
([
this
.
currentCheckedFolderId
]).
then
((
res
)
=>
{
this
.
$message
.
success
(
'
操作成功
'
)
this
.
getDataList
()
})
},
()
=>
{
this
.
$message
({
type
:
"
info
"
,
message
:
"
已取消删除
"
,
});
}
);
},
downFileById
(
row
)
{
this
.
isExportLoading
=
true
;
// 导出信息
axios
.
defaults
.
headers
.
common
[
"
Authorization
"
]
=
getToken
();
axios
({
url
:
process
.
env
.
VUE_APP_BASE_API
+
"
/api/thCompany/export
"
,
responseType
:
"
blob
"
,
method
:
"
get
"
,
params
:
{
county
:
localStorage
.
getItem
(
"
county
"
)
},
}).
then
((
res
)
=>
{
console
.
log
(
res
,
"
export
"
);
let
data
=
res
.
data
;
let
dis
=
res
.
headers
[
"
content-disposition
"
];
let
url
=
URL
.
createObjectURL
(
data
);
let
fileName
=
dis
.
split
(
"
attachment;filename*=utf-8''
"
)[
1
];
this
.
down
(
url
,
fileName
);
this
.
isExportLoading
=
false
;
});
},
down
(
fileUrl
,
fileName
)
{
// 下载模板
fileName
=
decodeURIComponent
(
fileName
);
let
a
=
document
.
createElement
(
"
a
"
);
a
.
setAttribute
(
"
href
"
,
fileUrl
);
a
.
setAttribute
(
"
download
"
,
fileName
);
document
.
body
.
appendChild
(
a
);
a
.
click
();
document
.
body
.
removeChild
(
a
);
},
delFileById
(
row
){
this
.
$confirm
(
"
确定要删除吗?
"
,
"
提示
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
,
}).
then
(
()
=>
{
edocApi
.
delFileById
([
row
.
id
]).
then
((
res
)
=>
{
this
.
$message
.
success
(
'
操作成功
'
)
this
.
getfileByFolderId
(
this
.
currentFolderId
)
})
},
()
=>
{
this
.
$message
({
type
:
"
info
"
,
message
:
"
已取消删除
"
,
});
}
);
},
updateFolder
(){
},
},
getfileByFolderId
(){
getfileByFolderId
(){
getfileByFolderId
({
edocApi
.
getfileByFolderId
({
catalogueId
:
this
.
currentFolderId
,
catalogueId
:
this
.
currentFolderId
,
page
:
this
.
currentPage
,
page
:
this
.
currentPage
,
size
:
currenetPageDegree
size
:
this
.
currenetPageDegree
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
this
.
fileDataList
=
res
.
body
.
results
this
.
fileDataList
=
res
.
body
.
results
this
.
totalElement
=
res
.
body
.
total
this
.
totalElement
=
res
.
body
.
total
})
})
},
},
confirmUploadFile
(){
confirmUploadFile
(){
addFileByFolderId
({
if
(
!
this
.
currentFolderId
){
fileList
:
this
.
addEnterhdPics
,
this
.
$message
.
warning
(
'
请选择文件夹
'
)
catalogueId
:
this
.
currentFolderId
,
return
classification
:
this
.
fileType
}
}).
then
((
res
)
=>
{
if
(
!
this
.
addEnterhdPics
.
length
){
this
.
$message
.
warning
(
'
请上传文件
'
)
return
}
const
formData
=
new
FormData
();
// console.log(this.formInfo.hdstatus1, "haStatus");
formData
.
append
(
'
fileList
'
,
this
.
addEnterhdPics
[
0
]);
formData
.
append
(
'
catalogueId
'
,
this
.
currentFolderId
);
formData
.
append
(
'
classification
'
,
this
.
fileType
);
edocApi
.
addFileByFolderId
(
formData
).
then
((
res
)
=>
{
this
.
$message
.
success
(
'
操作成功
'
)
this
.
$message
.
success
(
'
操作成功
'
)
this
.
getfileByFolderId
()
this
.
getfileByFolderId
()
this
.
fileUploadModal
=
false
})
})
},
},
addhdPicChange
(
event
)
{
addhdPicChange
(
event
)
{
...
@@ -247,7 +417,8 @@
...
@@ -247,7 +417,8 @@
console
.
log
(
`文件大小:
${
file
.
size
}
bytes`
);
console
.
log
(
`文件大小:
${
file
.
size
}
bytes`
);
console
.
log
(
`文件类型:
${
file
.
type
}
`
);
console
.
log
(
`文件类型:
${
file
.
type
}
`
);
}
}
this
.
addEnterhdPics
=
this
.
$refs
[
"
addhdpic
"
].
files
;
this
.
addEnterhdPics
=
[
files
[
0
]]
},
},
getMenuDatas
(
node
,
resolve
)
{
getMenuDatas
(
node
,
resolve
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -282,35 +453,40 @@
...
@@ -282,35 +453,40 @@
console
.
log
(
'
menuClick
'
,
data
,
node
,
target
)
console
.
log
(
'
menuClick
'
,
data
,
node
,
target
)
// 传递文件夹ID,获取对应文件夹下的文件数据
// 传递文件夹ID,获取对应文件夹下的文件数据
this
.
currentFolderId
=
data
.
id
this
.
currentFolderId
=
data
.
id
this
.
getfileByFolderId
()
},
},
menuChange
(
menu
)
{
menuChange
(
data
,
node
,
target
)
{
// 获取该节点的所有子节点,id 包含自身
console
.
log
(
'
menuChange
'
,
data
,
node
,
target
)
getChild
(
menu
.
id
).
then
(
childIds
=>
{
const
menu
=
data
// 判断是否在 menuIds 中,如果存在则删除,否则添加
this
.
currentCheckedFolderId
=
node
.
checkedKeys
.
length
?
node
.
checkedKeys
[
0
]
:
''
if
(
this
.
menuIds
.
indexOf
(
menu
.
id
)
!==
-
1
)
{
for
(
let
i
=
0
;
i
<
childIds
.
length
;
i
++
)
{
// // 获取该节点的所有子节点,id 包含自身
const
index
=
this
.
menuIds
.
indexOf
(
childIds
[
i
])
// getChild(menu.id).then(childIds => {
if
(
index
!==
-
1
)
{
// // 判断是否在 menuIds 中,如果存在则删除,否则添加
this
.
menuIds
.
splice
(
index
,
1
)
// if (this.menuIds.indexOf(menu.id) !== -1) {
}
// for (let i = 0; i
<
childIds
.
length
;
i
++
)
{
}
// const index = this.menuIds.indexOf(childIds[i])
}
else
{
// if (index !== -1) {
for
(
let
i
=
0
;
i
<
childIds
.
length
;
i
++
)
{
// this.menuIds.splice(index, 1)
const
index
=
this
.
menuIds
.
indexOf
(
childIds
[
i
])
// }
if
(
index
===
-
1
)
{
// }
this
.
menuIds
.
push
(
childIds
[
i
])
// } else {
}
// for (let i = 0; i
<
childIds
.
length
;
i
++
)
{
}
// const index = this.menuIds.indexOf(childIds[i])
}
// if (index === -1) {
this
.
$refs
.
menu
.
setCheckedKeys
(
this
.
menuIds
)
// this.menuIds.push(childIds[i])
// }
// }
// }
// this.$refs.menu.setCheckedKeys(this.menuIds)
/**
//
/**
* 1 勾选菜单后
//
* 1 勾选菜单后
*
//
*
*/
//
*/
})
//
})
},
},
// 保存菜单
// 保存菜单
saveMenu
()
{
saveMenu
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment