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
bb311e6e
Commit
bb311e6e
authored
Aug 02, 2024
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
档案馆
parent
2cd028f4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
195 additions
and
36 deletions
+195
-36
edoc.js
src/api/kd/edoc.js
+57
-0
index.vue
src/views/edoc/index.vue
+126
-34
videoConfig.vue
src/views/kd/e/video/videoConfig.vue
+12
-2
No files found.
src/api/kd/edoc.js
0 → 100644
View file @
bb311e6e
import
request
from
'
@/utils/request
'
export
default
{
// ID查询
getfileByFolderId
:
(
catalogueId
)
=>
{
return
request
({
url
:
'
api/document
'
,
method
:
'
get
'
,
params
:
{
catalogueId
}
})
},
// page查询
getDataList
:
(
pageParam
)
=>
{
return
request
({
url
:
'
api/document-catalogue/all
'
,
method
:
'
get
'
,
params
:
pageParam
})
},
// 新增
addFileByFolderId
:
(
data
)
=>
{
return
request
({
url
:
'
api/video-mine
'
,
method
:
'
post
'
,
data
})
},
// 修改
set
:
(
iotNormalMachine
)
=>
{
return
request
({
url
:
'
api/video-mine
'
,
method
:
'
put
'
,
data
:
iotNormalMachine
})
},
// 删除
delfileById
:
(
id
)
=>
{
return
request
({
url
:
'
api/document
'
,
method
:
'
delete
'
,
data
:
{
id
}
})
},
// 根据企业查询所属矿山(含停产)enterpriseId
getAllMineByEnterpriseId
:
(
mineSearchParam
)
=>
{
return
request
({
url
:
'
api/mine/all-mine/list
'
,
method
:
'
get
'
,
params
:
mineSearchParam
})
}
}
src/views/edoc/index.vue
View file @
bb311e6e
...
...
@@ -29,19 +29,66 @@
<el-button
:loading=
"crud.status.cu === 2"
type=
"primary"
@
click=
"crud.submitCU"
>
确认
</el-button>
</div>
</el-dialog>
<!-- 新增窗口 -->
<el-dialog
title=
"文件上传"
:visible.sync=
"fileUploadModal"
:close-on-click-modal=
"false"
>
<el-form
ref=
"formInfo"
label-width=
"120px"
>
<el-form-item>
<el-input
v-model=
"fileType"
size=
"small"
clearable
placeholder=
"请输入文件分类"
style=
"width: 200px;"
class=
"filter-item"
/>
</el-form-item>
<el-form-item>
<label
class=
"import-file-dg"
style=
"
color: #1890ff;
display: inline-block;
border: 1px solid #1890ff;
"
>
上传文件
<input
:ref=
"`addhdpic`"
class=
"helloworld"
type=
"file"
hidden
@
change=
"addhdPicChange"
/>
</label>
</el-form-item>
<el-form-item
label=
""
>
<div
v-for=
"(item, index) in addEnterhdPics"
:key=
"item.name + index"
>
{{
item
.
name
}}
</div>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"adddialogform = false"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"confirmUploadFile"
>
确定
</el-button>
</div>
</el-dialog>
<el-row
:gutter=
"15"
>
<!-- 菜单授权 -->
<el-col
:span=
"6"
style=
"margin-bottom: 10px"
>
<el-card
class=
"box-card"
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix"
>
<el-button
v-permission=
"['admin','roles:edit']"
icon=
"el-icon-minus"
size=
"mini"
style=
"float: right; margin-left:6px;"
type=
"danger"
@
click=
"saveMenu"
>
删除
</el-button>
<el-button
icon=
"el-icon-plus"
size=
"mini"
style=
"float: right;
padding: 6px 9px
"
style=
"float: right;"
type=
"primary"
@
click=
"saveMenu"
>
新建文件夹
</el-button>
新建
</el-button>
</div>
<el-tree
ref=
"menu"
...
...
@@ -54,7 +101,8 @@
accordion
show-checkbox
node-key=
"id"
@
check=
"menuChange"
@
check=
"menuChange"
@
node-click=
"menuClick"
/>
</el-card>
</el-col>
...
...
@@ -63,7 +111,7 @@
<el-col
:span=
"16"
>
<el-card
class=
"box-card"
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix"
>
<el-button
type=
"primary"
size=
"mini"
>
上传文件
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"fileUploadModal=true"
>
上传文件
</el-button>
<el-input
v-model=
"query.blurry"
size=
"small"
clearable
placeholder=
"查询文件分类"
style=
"width: 200px;"
class=
"filter-item"
@
keyup.enter.native=
"crud.toQuery"
/>
<date-range-picker
v-model=
"query.createTime"
class=
"date-item"
/>
<el-input
v-model=
"query.blurry"
size=
"small"
clearable
placeholder=
"查询文件名称"
style=
"width: 200px;"
class=
"filter-item"
@
keyup.enter.native=
"crud.toQuery"
/>
...
...
@@ -82,7 +130,15 @@
</el-table-column>
</el-table>
<!--分页组件-->
<pagination
/>
<el-pagination
:current-page=
"currentPage"
:page-sizes=
"[10, 20, 30, 40]"
:page-size=
"currenetPageDegree"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"totalElement"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</el-card>
</el-col>
</el-row>
...
...
@@ -91,7 +147,7 @@
<
script
>
import
crudRoles
from
'
@/api/system/role
'
import
{
get
Depts
,
getDeptSuperior
}
from
'
@/api/system/dept
'
import
{
get
fileByFolderId
,
getFolderList
,
addFileByFolderId
,
delfileById
}
from
'
@/api/kd/edoc
'
import
{
getMenusTree
,
getChild
}
from
'
@/api/system/menu
'
import
CRUD
,
{
presenter
,
header
,
form
,
crud
}
from
'
@crud/crud
'
import
rrOperation
from
'
@crud/RR.operation
'
...
...
@@ -114,6 +170,14 @@
mixins
:
[
presenter
(),
header
(),
form
(
defaultForm
),
crud
()],
data
()
{
return
{
fileType
:
''
,
fileUploadModal
:
false
,
addEnterhdPics
:
[],
currentFolderId
:
''
,
fileDataList
:
[],
totalElement
:
0
,
currentPage
:
0
,
currenetPageDegree
:
10
,
dateScopes
:
[
"
全部
"
,
"
本级及以下
"
,
"
自定义
"
,],
defaultProps
:
{
children
:
'
children
'
,
label
:
'
label
'
,
isLeaf
:
'
leaf
'
},
level
:
3
,
...
...
@@ -135,9 +199,6 @@
}
},
computed
:
{
...
mapGetters
([
'
user
'
])
},
created
()
{
crudRoles
.
getLevel
().
then
(
data
=>
{
...
...
@@ -145,6 +206,49 @@
})
},
methods
:
{
// 当前页的条数变化
handleSizeChange
(
val
)
{
this
.
currenetPageDegree
=
val
;
this
.
getfileByFolderId
();
},
// 当前第几页
handleCurrentChange
(
val
)
{
this
.
currentPage
=
val
;
this
.
getfileByFolderId
();
},
getfileByFolderId
(){
getfileByFolderId
({
catalogueId
:
this
.
currentFolderId
,
page
:
this
.
currentPage
,
size
:
currenetPageDegree
}).
then
((
res
)
=>
{
this
.
fileDataList
=
res
.
body
.
results
this
.
totalElement
=
res
.
body
.
total
})
},
confirmUploadFile
(){
addFileByFolderId
({
fileList
:
this
.
addEnterhdPics
,
catalogueId
:
this
.
currentFolderId
,
classification
:
this
.
fileType
}).
then
((
res
)
=>
{
this
.
$message
.
success
(
'
操作成功
'
)
this
.
getfileByFolderId
()
})
},
addhdPicChange
(
event
)
{
// event.target 是触发事件的 input 元素
const
files
=
event
.
target
.
files
;
// 获取用户选择的文件列表
// 检查是否有文件选择
if
(
files
.
length
>
0
)
{
const
file
=
files
[
0
];
// 选择第一个文件
console
.
log
(
`文件名:
${
file
.
name
}
`
);
console
.
log
(
`文件大小:
${
file
.
size
}
bytes`
);
console
.
log
(
`文件类型:
${
file
.
type
}
`
);
}
this
.
addEnterhdPics
=
this
.
$refs
[
"
addhdpic
"
].
files
;
},
getMenuDatas
(
node
,
resolve
)
{
setTimeout
(()
=>
{
getMenusTree
(
node
.
data
.
id
?
node
.
data
.
id
:
0
).
then
(
res
=>
{
...
...
@@ -157,30 +261,6 @@
})
},
100
)
},
[
CRUD
.
HOOK
.
afterRefresh
]()
{
this
.
$refs
.
menu
.
setCheckedKeys
([])
},
// 新增前初始化部门信息
[
CRUD
.
HOOK
.
beforeToAdd
](
crud
,
form
)
{
this
.
deptDatas
=
[]
form
.
menus
=
null
},
// 编辑前初始化自定义数据权限的部门信息
[
CRUD
.
HOOK
.
beforeToEdit
](
crud
,
form
)
{
this
.
deptDatas
=
[]
const
_this
=
this
form
.
depts
.
forEach
(
function
(
dept
)
{
_this
.
deptDatas
.
push
(
dept
.
id
)
})
// 将角色的菜单清空,避免日志入库数据过长
form
.
menus
=
null
},
// 提交前做的操作
[
CRUD
.
HOOK
.
afterValidateCU
](
crud
)
{
// crud.form.dataScope = '全部'
// crud.form.depts = []
return
true
},
// 触发单选
handleCurrentChange
(
val
)
{
if
(
val
)
{
...
...
@@ -198,6 +278,12 @@
this
.
showButton
=
true
}
},
menuClick
(
data
,
node
,
target
){
console
.
log
(
'
menuClick
'
,
data
,
node
,
target
)
// 传递文件夹ID,获取对应文件夹下的文件数据
this
.
currentFolderId
=
data
.
id
},
menuChange
(
menu
)
{
// 获取该节点的所有子节点,id 包含自身
getChild
(
menu
.
id
).
then
(
childIds
=>
{
...
...
@@ -218,6 +304,12 @@
}
}
this
.
$refs
.
menu
.
setCheckedKeys
(
this
.
menuIds
)
/**
* 1 勾选菜单后
*
*/
})
},
// 保存菜单
...
...
src/views/kd/e/video/videoConfig.vue
View file @
bb311e6e
...
...
@@ -42,7 +42,7 @@
append-to-body
:close-on-click-modal=
"true"
:visible.sync=
"dialog1Show"
title=
"
矿山-摄像头资料
"
title=
"
监控配置
"
width=
"960px"
>
<el-form
...
...
@@ -63,6 +63,7 @@
placeholder=
"请选择"
@
change=
"enterpriseChange"
style=
"width: 400px"
:disabled=
"editState == 3"
>
<el-option
v-for=
"item in options4enterpriseIdList"
...
...
@@ -85,6 +86,7 @@
size=
"small"
class=
"filter-item"
style=
"width: 400px"
:disabled=
"editState == 3"
>
<el-option
v-for=
"(mine, key) in mineList"
...
...
@@ -329,7 +331,7 @@ export default {
methods
:
{
getMineTypeByMineId
(
mineId
){
return
this
.
mineList
.
find
((
item
)
=>
{
return
item
.
id
=
mineId
return
item
.
id
=
==
mineId
})
},
validData
(
data
){
...
...
@@ -347,6 +349,10 @@ export default {
enterpriseId
}).
then
(
response
=>
{
this
.
mineList
=
response
.
body
// this.mineList = response.body.map((item)=>{
// item.id = item.id+''
// return item
// })
// this.dialog1Data.mineId = ''
})
},
...
...
@@ -399,6 +405,10 @@ export default {
const
mineInfo
=
this
.
getMineTypeByMineId
(
this
.
dialog1Data
.
mineId
)
this
.
dialog1Data
.
mineType
=
mineInfo
.
type
this
.
dialog1Data
.
mineName
=
mineInfo
.
name
if
(
mineInfo
.
enterpriseId
!==
this
.
dialog1Data
.
enterpriseId
){
this
.
$message
.
warning
(
'
所属矿山与所属企业不匹配,请重新选择
'
)
return
}
// this.dialog1Data.mineId = "1"; // 地下矿山
if
(
this
.
editState
===
1
)
{
videoConfigApi
...
...
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