Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
V
VS_OUTSOURCE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
赵炳峰
VS_OUTSOURCE
Commits
34c9189c
Commit
34c9189c
authored
Nov 26, 2020
by
fangshupeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新进度2020.11.26
parent
eddc58b7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
424 additions
and
123 deletions
+424
-123
index.js
VSSCMP_WEB/src/api/index.js
+2
-0
platBaseApi.js
VSSCMP_WEB/src/api/platBaseApi.js
+11
-0
schoolBasedResourcesApi.js
VSSCMP_WEB/src/api/schoolBasedResourcesApi.js
+20
-0
ossPaths.js
VSSCMP_WEB/src/assets/ossPaths.js
+2
-1
Index.vue
...ges/education/schoolBasedResources/folderManage/Index.vue
+12
-1
Index.vue
...ages/education/schoolBasedResources/myResources/Index.vue
+16
-23
MyUpload.vue
...s/education/schoolBasedResources/myResources/MyUpload.vue
+192
-29
BigFolder.vue
...schoolBasedResources/myResources/components/BigFolder.vue
+2
-2
Material.vue
.../schoolBasedResources/myResources/components/Material.vue
+10
-2
MyuploadCtxMenu.vue
...BasedResources/myResources/components/MyuploadCtxMenu.vue
+104
-38
SmallFolder.vue
...hoolBasedResources/myResources/components/SmallFolder.vue
+3
-3
UploadFile.vue
...choolBasedResources/myResources/components/UploadFile.vue
+50
-24
No files found.
VSSCMP_WEB/src/api/index.js
View file @
34c9189c
...
...
@@ -2,12 +2,14 @@ import loginApi from './loginApi.js' // 登录
import
aliOssApi
from
'./aliOssApi'
// ali-oss
import
commonApi
from
'./commonApi'
// 公共接口
import
education
from
'./education'
// 教务管理
import
platBaseApi
from
'./platBaseApi'
// 教务管理
import
schoolBasedResourcesApi
from
'./schoolBasedResourcesApi'
// 校本资源管理API
export
default
{
loginApi
,
aliOssApi
,
commonApi
,
platBaseApi
,
...
education
,
schoolBasedResourcesApi
}
VSSCMP_WEB/src/api/platBaseApi.js
0 → 100644
View file @
34c9189c
import
http
from
'@/request/http.js'
export
default
{
// 获取组织架构
getOrganizeTreeWithUser
:
()
=>
http
.
post
(
'/api/Organize/OrganizeTreeWithUser'
),
// 获取自定义分组
getCustomGroupWithPeople
:
()
=>
http
.
get
(
'/api/CustomGroup/GetCustomGroupWithPeople'
),
// 获取学生端组织架构
getGradeStructureWithStudent
:
()
=>
http
.
post
(
'/api/Student/GradeStructureWithStudent'
),
// 获取学生端组织架构(根据角色)
getGradeStructureWithStudentByPermission
:
params
=>
http
.
post
(
'/api/Student/GradeStructureWithStudentByPermission'
,
params
)
}
VSSCMP_WEB/src/api/schoolBasedResourcesApi.js
View file @
34c9189c
...
...
@@ -28,5 +28,25 @@ export default {
// 获取文档列表
GetFileList
(
params
)
{
return
http
.
post
(
'/api/Education/SchoolResource/GetFileList'
,
JSON
.
stringify
(
params
))
},
// 文件分享
fileShare
(
params
)
{
return
http
.
post
(
'/api/Education/SchoolResource/MyResource/FileShare'
,
JSON
.
stringify
(
params
))
},
// 上传文件
uploadFile
(
params
)
{
return
http
.
post
(
'/api/Education/SchoolResource/FileInfo/UploadFile'
,
JSON
.
stringify
(
params
))
},
// 新增编辑个人文件夹
CreateOrUpdateFolder
(
params
)
{
return
http
.
post
(
'/api/Education/SchoolResource/PersonalFolderInfo/CreateOrUpdate'
,
JSON
.
stringify
(
params
))
},
// 删除个人文件夹
deleteFolder
(
params
)
{
return
http
.
get
(
'/api/Education/SchoolResource/PersonalFolderInfo/Delete'
,
{
params
:
params
})
},
// 获取学校文件夹List
GetSchoolFolderList
()
{
return
http
.
post
(
'/api/Education/SchoolResource/SchoolFolderInfo/GetSchoolFolderList'
)
}
}
VSSCMP_WEB/src/assets/ossPaths.js
View file @
34c9189c
...
...
@@ -47,7 +47,8 @@ const ossPaths = {
materialManage
:
`
${
schoolCode
}
/wechatManage/materialManage`
,
// 素材管理
wechatSet
:
`
${
schoolCode
}
/wechatManage/wechatSet`
},
message
:
`
${
schoolCode
}
/Message`
// 短信中心
message
:
`
${
schoolCode
}
/Message`
,
// 短信中心
schoolBasedResources
:
`
${
schoolCode
}
/schoolBasedResources`
// 校本资源
}
...
...
VSSCMP_WEB/src/pages/education/schoolBasedResources/folderManage/Index.vue
View file @
34c9189c
...
...
@@ -184,9 +184,20 @@ export default {
}
},
mounted
()
{
this
.
currentFileList
=
this
.
fileListData
.
firstLevelData
this
.
getFolderList
()
},
methods
:
{
getFolderList
()
{
this
.
$api
.
schoolBasedResourcesApi
.
GetSchoolFolderList
().
then
(
res
=>
{
this
.
$handleResponse
(
res
).
then
(
data
=>
{
console
.
log
(
data
)
// this.folderListData = data
// this.currentFileList = data
// this.breadcrumb = [{ label: '首页', listData: data, parent: { b_id: '0' }, currentIsFiLe: false }]
// this.initFromBreadcrumb(data)
})
})
},
backCrumb
(
index
)
{
this
.
isFileMode
=
false
let
breadcrumb
=
this
.
breadcrumb
...
...
VSSCMP_WEB/src/pages/education/schoolBasedResources/myResources/Index.vue
View file @
34c9189c
<
template
>
<div
class=
"container"
>
<v-header
:title=
"'我的资源'"
:is-show-prev-page=
"
isShowPrevPag
e"
></v-header>
<v-header
:title=
"'我的资源'"
:is-show-prev-page=
"
fals
e"
></v-header>
<nav-menu
:menus=
"menus"
></nav-menu>
<keep-alive>
<router-view></router-view>
...
...
@@ -42,32 +42,25 @@ export default {
}
},
mounted
()
{
this
.
getFolderList
()
},
created
()
{
this
.
initDataFromRoute
(
this
.
$route
)
// this.getFolderList()
},
// created () {
// this.initDataFromRoute(this.$route)
// },
watch
:
{
$route
(
to
,
from
)
{
this
.
initDataFromRoute
(
to
)
}
//
$route (to, from) {
//
this.initDataFromRoute(to)
//
}
},
methods
:
{
getFolderList
()
{
this
.
$api
.
schoolBasedResourcesApi
.
GetFolderList
().
then
(
res
=>
{
this
.
$handleResponse
(
res
).
then
(
data
=>
{
console
.
log
(
data
)
})
})
},
initDataFromRoute
(
route
)
{
/* 根据路由参数来显示对应数据 */
if
(
route
.
query
.
parent_id
)
{
// 有参数说明不是首页,显示返回上一页
this
.
isShowPrevPage
=
true
}
else
{
this
.
isShowPrevPage
=
false
}
}
// initDataFromRoute (route) {
// /* 根据路由参数来显示对应数据 */
// if (route.query.parent_id) { // 有参数说明不是首页,显示返回上一页
// this.isShowPrevPage = true
// } else {
// this.isShowPrevPage = false
// }
// }
}
}
</
script
>
...
...
VSSCMP_WEB/src/pages/education/schoolBasedResources/myResources/MyUpload.vue
View file @
34c9189c
This diff is collapsed.
Click to expand it.
VSSCMP_WEB/src/pages/education/schoolBasedResources/myResources/components/BigFolder.vue
View file @
34c9189c
...
...
@@ -69,8 +69,8 @@ export default {
fileDrop
(
event
,
file
)
{
this
.
borderHover
=
false
let
fileData
=
event
.
dataTransfer
.
files
let
row
=
this
.
file
this
.
$emit
(
'
u
ploadFile'
,
fileData
,
row
)
let
row
=
file
this
.
$emit
(
'
dragU
ploadFile'
,
fileData
,
row
)
}
}
}
...
...
VSSCMP_WEB/src/pages/education/schoolBasedResources/myResources/components/Material.vue
View file @
34c9189c
...
...
@@ -20,7 +20,7 @@
<div
class=
"menus-title"
>
<span>
{{
item
.
user_name
}}
</span>
<span
class=
"upload-count"
v-show=
"!taskMode"
>
{{
item
.
total_count
}}
</span>
<div
class=
"progress-ctn"
v-
show
=
"taskMode"
>
<div
class=
"progress-ctn"
v-
if
=
"taskMode"
>
<div
style=
"flex: 1;margin-top: 7px;"
>
<el-progress
:show-text=
"false"
:percentage=
"item.upload_count / item.total_count"
></el-progress>
</div>
...
...
@@ -33,7 +33,8 @@
v-for=
"(innerItem, innerIndex) of item.fileChildren"
:key=
"innerIndex"
:index=
"(index+1)+'-'+(innerIndex+1)"
@
contextmenu
.
native
.
prevent
.
stop=
"showMenu($event,item)"
>
@
contextmenu
.
native
.
prevent
.
stop=
"showMenu($event,innerItem)"
@
dblclick
.
native=
"showFileOL(innerItem)"
>
<span
v-show=
"taskMode"
class=
"point"
></span>
{{ innerItem.file_name }}
</el-menu-item>
</el-menu-item-group>
...
...
@@ -42,6 +43,7 @@
</div>
</div>
<div
class=
"right-document"
>
<iframe
:src=
"documentUrl"
width=
"100%"
height=
"100%"
name=
"topFrame"
noresize=
"noresize"
frameborder=
"0"
id=
"topFrame"
></iframe>
</div>
<!-- 右键菜单栏 -->
...
...
@@ -88,6 +90,7 @@ export default {
value
:
'allItem'
,
label
:
'全部学期'
}],
documentUrl
:
''
,
// 文档在线预览地址
deleteVisible
:
false
,
// 删除确认弹框
coordinate
:
{
// 菜单栏坐标
menuX
:
'0px'
,
...
...
@@ -105,6 +108,11 @@ export default {
this
.
coordinate
.
menuY
=
MouseEvent
.
pageY
+
'px'
document
.
addEventListener
(
'click'
,
this
.
foo
)
// 给整个document添加监听鼠标事件,点击任何位置执行foo方法
},
showFileOL
(
file
)
{
/* 双击预览文档 */
let
url
=
'https://onlinepreview.vschool100.cn/onlinePreview?url='
+
encodeURIComponent
(
file
.
file_path
)
this
.
documentUrl
=
url
},
listOpen
(
index
)
{
let
listIndex
=
parseInt
(
index
)
-
1
this
.
$emit
(
'getMaterialFile'
,
listIndex
)
...
...
VSSCMP_WEB/src/pages/education/schoolBasedResources/myResources/components/MyuploadCtxMenu.vue
View file @
34c9189c
This diff is collapsed.
Click to expand it.
VSSCMP_WEB/src/pages/education/schoolBasedResources/myResources/components/SmallFolder.vue
View file @
34c9189c
...
...
@@ -13,7 +13,7 @@
<template
slot-scope=
"scope"
>
<div
class=
"is-folder"
>
<i
:class=
"currentIsFiLe?'el-icon-document': 'el-icon-folder'+' file-icon'"
></i>
<span
style=
"margin-left: 10px"
>
{{
scope
.
row
.
file_name
}}
</span>
<span
style=
"margin-left: 10px"
>
{{
scope
.
row
.
file_name
||
scope
.
row
.
folder_name
}}
</span>
</div>
</
template
>
</el-table-column>
...
...
@@ -22,12 +22,12 @@
label=
"类型"
width=
"170"
>
<
template
slot-scope=
"scope"
>
{{
folderTypeOptions
[
scope
.
row
.
file_type
]
}}
{{
folderTypeOptions
[
scope
.
row
.
file_type
||
scope
.
row
.
folder_type
]
}}
</
template
>
</el-table-column>
<el-table-column
v-if=
"mode != 'favor' && !currentIsFiLe"
prop=
"
uploadC
ount"
prop=
"
file_c
ount"
label=
"我上传的数量"
width=
"170"
>
</el-table-column>
...
...
VSSCMP_WEB/src/pages/education/schoolBasedResources/myResources/components/UploadFile.vue
View file @
34c9189c
<
template
>
<el-dialog
title=
"请选择目标文件夹(必选)"
:visible
.
sync=
"
selectFolderV
isible"
:visible
.
sync=
"
v
isible"
width=
"500px"
>
<div
class=
"folder-select"
>
<div
class=
"folder-line select-first"
>
<div
class=
"folder-select"
v-for=
"firstLevel of listData"
:key=
"firstLevel.b_id"
>
<!-- 第一层 -->
<div
:class=
"
{canSelect: !(firstLevel.children
&&
firstLevel.children.length > 0)}" class="folder-line select-first" @click="upload(firstLevel)">
<i
class=
"el-icon-folder folder-icon"
></i>
<span
class=
"folderName"
>
一年级文案
</span>
<span
class=
"folderName"
>
{{
firstLevel
.
folder_name
}}
</span>
</div>
<div
v-for=
"(item, index) of 3"
:key=
"index"
class=
"folder-line select-second canSelect"
>
<i
class=
"el-icon-folder folder-icon"
></i>
<span
class=
"folderName"
@
click=
"upload"
>
语文文案
</span>
</div>
</div>
<div
class=
"folder-select"
>
<div
class=
"folder-line select-first"
>
<i
class=
"el-icon-folder folder-icon"
></i>
<span
class=
"folderName"
>
二年级文案
</span>
</div>
<div
v-for=
"(item, index) of 3"
:key=
"index"
class=
"folder-line select-second canSelect"
>
<i
class=
"el-icon-folder folder-icon"
></i>
<span
class=
"folderName"
@
click=
"upload"
>
语文文案
</span>
<div
v-if=
"firstLevel.children && firstLevel.children.length > 0"
>
<!-- 第二层 -->
<div
v-for=
"secondLevel of firstLevel.children"
:key=
"secondLevel.b_id"
class=
"select-padding"
>
<div
:class=
"
{canSelect: !(secondLevel.children
&&
secondLevel.children.length > 0)}" class="folder-line" @click="upload(secondLevel)">
<i
class=
"el-icon-folder folder-icon"
></i>
<span
class=
"folderName"
>
{{
secondLevel
.
folder_name
}}
</span>
</div>
<div
v-if=
"secondLevel.children && secondLevel.children.length > 0"
>
<!-- 第三层 -->
<div
v-for=
"thirdLevel of secondLevel.children"
:key=
"thirdLevel.b_id"
class=
"select-padding"
@
click=
"upload(thirdLevel)"
>
<div
class=
"folder-line canSelect"
>
<i
class=
"el-icon-folder folder-icon"
></i>
<span
class=
"folderName"
>
{{
thirdLevel
.
folder_name
}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</el-dialog>
...
...
@@ -30,23 +35,44 @@
export
default
{
name
:
'UploadFile'
,
props
:
{
listData
:
{
type
:
Array
,
default
:
()
=>
{
return
[]
}
},
selectFolderVisible
:
{
type
:
Boolean
,
default
:
false
}
},
computed
:
{
visible
:
{
get
()
{
return
this
.
selectFolderVisible
},
set
(
value
)
{
this
.
$emit
(
'closeSelectFolderVisible'
)
}
}
},
data
()
{
return
{
}
},
methods
:
{
upload
()
{
this
.
$message
({
message
:
'上传成功'
,
type
:
'success'
})
this
.
$emit
(
'uploadSuccess'
)
upload
(
file
)
{
if
(
!
(
file
.
children
&&
file
.
children
.
length
>
0
))
{
this
.
$emit
(
'selectUploadFile'
,
file
)
}
// this.$message({
// message: '上传成功',
// type: 'success'
// })
}
// close () {
// this.$emit('closeSelectFolderVisible')
// }
}
}
</
script
>
...
...
@@ -73,7 +99,7 @@ export default {
padding-left: 10px;
}
.select-
second
{
.select-
padding
{
padding-left: 60px;
}
}
...
...
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