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
61b5d3e2
Commit
61b5d3e2
authored
Dec 01, 2020
by
fangshupeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跟新进度
parent
7d4012e4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
509 additions
and
144 deletions
+509
-144
index.js
VSSCMP_WEIXIN/teacher/src/api/index.js
+2
-0
schoolBasedResourcesApi.js
VSSCMP_WEIXIN/teacher/src/api/schoolBasedResourcesApi.js
+40
-0
main.js
VSSCMP_WEIXIN/teacher/src/main.js
+3
-0
Index.vue
...ages/education/schoolBasedResources/myResources/Index.vue
+40
-30
MyUpload.vue
...s/education/schoolBasedResources/myResources/MyUpload.vue
+201
-94
Share.vue
...ages/education/schoolBasedResources/myResources/Share.vue
+90
-9
ActionMenu.vue
...choolBasedResources/myResources/components/ActionMenu.vue
+88
-0
FileList.vue
.../schoolBasedResources/myResources/components/FileList.vue
+42
-8
FolderList.vue
...choolBasedResources/myResources/components/FolderList.vue
+3
-3
No files found.
VSSCMP_WEIXIN/teacher/src/api/index.js
View file @
61b5d3e2
...
...
@@ -4,6 +4,7 @@ import loginApi from './loginApi' // 登录
import
aliOssApi
from
'./aliOssApi'
// ali-oss
import
homeApi
from
'./homeApi'
import
commonApi
from
'./commonApi'
import
schoolBasedResourcesApi
from
'./schoolBasedResourcesApi'
import
education
from
'./education'
// 教务管理
...
...
@@ -15,5 +16,6 @@ export default {
wxCommonApi
,
aliOssApi
,
homeApi
,
schoolBasedResourcesApi
,
...
education
}
VSSCMP_WEIXIN/teacher/src/api/schoolBasedResourcesApi.js
0 → 100644
View file @
61b5d3e2
import
http
from
'@/request/http.js'
export
default
{
// 获取学校文件夹和个人文件夹List
GetFolderList
()
{
return
http
.
get
(
'/api/Education/SchoolResource/MyResource/GetFolderList'
)
},
// 获取我的收藏分享列表
GetCollectShareList
(
params
)
{
return
http
.
post
(
'/api/Education/SchoolResource/MyResource/GetCollectShareList'
,
params
)
},
// 获取文档列表
GetFileList
(
params
)
{
return
http
.
post
(
'/api/Education/SchoolResource/GetFileList'
,
params
)
},
// 文件分享
fileShare
(
params
)
{
return
http
.
post
(
'/api/Education/SchoolResource/MyResource/FileShare'
,
params
)
},
// 删除文件
deleteFile
(
params
)
{
return
http
.
get
(
'/api/Education/SchoolResource/FileInfo/DeleteFile'
,
{
params
:
params
})
},
// 修改文件名称
updateFileName
(
params
)
{
return
http
.
get
(
'/api/Education/SchoolResource/FileInfo/UpdateFileName'
,
{
params
:
params
})
},
// 获取学校文件夹List
GetSchoolFolderList
()
{
return
http
.
get
(
'/api/Education/SchoolResource/SchoolFolderInfo/GetSchoolFolderList'
)
},
// 获取学校文件夹对象
getSchoolFolderInfo
(
params
)
{
return
http
.
get
(
'/api/Education/SchoolResource/SchoolFolderInfo/Get'
,
{
params
:
params
})
},
// 根据文件ID获取分享信息
GetFileShareInfoByFileId
(
params
)
{
return
http
.
get
(
'/api/Education/SchoolResource/MyResource/GetFileShareInfoByFileId'
,
{
params
:
params
})
}
}
VSSCMP_WEIXIN/teacher/src/main.js
View file @
61b5d3e2
...
...
@@ -29,6 +29,9 @@ import fundebugVue from 'fundebug-vue' // 导入api接口
// import VConsole from 'vconsole'
// new VConsole()
const
bus
=
new
Vue
()
// eventBus 事件总线
Vue
.
prototype
.
$EventBus
=
bus
// 将事件总线挂载到vue的原型上
Vue
.
prototype
.
$api
=
api
Vue
.
prototype
.
$common
=
common
// 将common挂载到vue的原型上
Vue
.
prototype
.
$handleResponse
=
handleResponse
...
...
VSSCMP_WEIXIN/teacher/src/pages/education/schoolBasedResources/myResources/Index.vue
View file @
61b5d3e2
<
template
>
<div
class=
"container"
>
<div
class=
"container"
style=
"position: relative;"
>
<v-header
:title=
"title"
:isShowPrevPage=
"isShowPrevPage"
>
<span
slot=
"action"
class=
"header-slot pull-right"
></span>
</v-header>
...
...
@@ -9,6 +9,7 @@
<router-view></router-view>
</div>
</div>
<action-menu
v-show=
"!currentIsFirstLevel"
/>
<tab-bar
:menus=
"tabBarMenus"
></tab-bar>
</div>
</
template
>
...
...
@@ -20,13 +21,15 @@ export default {
components
:
{
VHeader
:
()
=>
import
(
'@/common/header/VHeader'
),
Tabs
:
()
=>
import
(
'@/common/tab/Tabs'
),
TabBar
:
()
=>
import
(
'@/common/tabBar/TabBar'
)
TabBar
:
()
=>
import
(
'@/common/tabBar/TabBar'
),
ActionMenu
:
()
=>
import
(
'./components/ActionMenu'
)
},
data
()
{
return
{
title
:
'标题'
,
isShowPrevPage
:
true
,
showTabs
:
false
,
// 是否显示Tabs组件
title
:
'校本资源'
,
isShowPrevPage
:
false
,
currentIsFirstLevel
:
true
,
// 当前列表是不是第一层文件夹
showTabs
:
true
,
// 是否显示Tabs组件
tabsMenus
:
[
{
label
:
'我上传的'
,
...
...
@@ -56,42 +59,49 @@ export default {
scroll
:
''
}
},
methods
:
{
initDataFromRoute
(
route
)
{
/* 根据路由参数来显示对应数据 */
this
.
tabBarMenus
[
0
].
belongTo
=
route
.
meta
.
belongTo
console
.
log
(
this
.
tabBarMenus
[
0
].
belongTo
)
if
(
route
.
meta
.
showTabs
)
{
this
.
showTabs
=
true
}
else
{
this
.
showTabs
=
false
}
if
(
route
.
meta
.
hidePrevPage
)
{
this
.
isShowPrevPage
=
false
}
else
{
this
.
isShowPrevPage
=
true
}
if
(
route
.
query
.
title
)
{
this
.
title
=
route
.
query
.
title
}
else
{
this
.
title
=
route
.
meta
.
title
}
}
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
scroll
=
new
BScroll
(
this
.
$refs
.
contentWrapper
,
{
click
:
true
})
})
this
.
$EventBus
.
$on
(
'intoLayer'
,
this
.
folderIntoLayer
)
},
created
()
{
this
.
initDataFromRoute
(
this
.
$route
)
//
this.initDataFromRoute(this.$route)
},
watch
:
{
$route
(
to
,
from
)
{
this
.
initDataFromRoute
(
to
)
// $route (to, from) {
// this.initDataFromRoute(to)
// }
},
methods
:
{
folderIntoLayer
(
currentIsFirstLevel
,
title
)
{
/* 当页面进入对应层次文件夹进行改变操作 */
this
.
title
=
title
this
.
showTabs
=
currentIsFirstLevel
this
.
currentIsFirstLevel
=
currentIsFirstLevel
}
// initDataFromRoute (route) {
// /* 根据路由参数来显示对应数据 */
// this.tabBarMenus[0].belongTo = route.meta.belongTo
// console.log(this.tabBarMenus[0].belongTo)
// if (route.meta.showTabs) {
// this.showTabs = true
// } else {
// this.showTabs = false
// }
// if (route.meta.hidePrevPage) {
// this.isShowPrevPage = false
// } else {
// this.isShowPrevPage = true
// }
// if (route.query.title) {
// this.title = route.query.title
// } else {
// this.title = route.meta.title
// }
// }
}
}
</
script
>
...
...
VSSCMP_WEIXIN/teacher/src/pages/education/schoolBasedResources/myResources/MyUpload.vue
View file @
61b5d3e2
This diff is collapsed.
Click to expand it.
VSSCMP_WEIXIN/teacher/src/pages/education/schoolBasedResources/myResources/Share.vue
View file @
61b5d3e2
...
...
@@ -8,21 +8,27 @@
<x-button
class=
"add-btn"
plain
@
click
.
native=
"teacherSelectorShow = true"
><i
class=
"iconfont"
>

</i>
添加分享教师
</x-button>
<div
class=
"share-header"
>
<span
class=
"dashed"
></span>
<span
class=
"person-count"
>
已分享名单(
100
人)
</span>
<span
class=
"person-count"
>
已分享名单(
{{
shareList
.
length
}}
人)
</span>
<span
class=
"dashed"
></span>
</div>
<div
class=
"search-ctn"
>
<searchs></searchs>
</div>
<div
class=
"share-list"
>
<x-button
class=
"person"
v-for=
"(person, index) of
10
"
:key=
"index"
mini
>
<x-button
class=
"person"
v-for=
"(person, index) of
shareList
"
:key=
"index"
mini
>
<div
class=
"name-ctn"
>
<span
class=
"name"
>
张飞
</span>
<
i
class=
"iconfont"
>

</i
>
<span
class=
"name"
>
{{
person
.
realname
}}
</span>
<
!--
<i
class=
"iconfont"
>

</i>
--
>
</div>
</x-button>
</div>
<teacher-selector
:show=
"teacherSelectorShow"
@
handleSubmit=
"teacherSelectorShow = false"
></teacher-selector>
<teacher-selector
:is-multiple=
"true"
:userlist=
"shareList"
:show=
"teacherSelectorShow"
@
handleSubmit=
"changeAndShare"
@
close=
"teacherSelectorShow = false"
/>
</div>
</div>
</div>
...
...
@@ -43,19 +49,90 @@ export default {
return
{
title
:
'分享文档'
,
scroll
:
''
,
teacherSelectorShow
:
false
shareList
:
[],
teacherSelectorShow
:
false
,
fileId
:
''
// 文件id
}
},
methods
:
{
},
created
()
{
},
mounted
()
{
this
.
fileId
=
this
.
$route
.
query
.
file_id
this
.
getShareList
()
this
.
$nextTick
(()
=>
{
this
.
scroll
=
new
BScroll
(
this
.
$refs
.
contentWrapper
,
{
click
:
true
})
})
},
methods
:
{
getShareList
()
{
/* 获取该文件已经分享的名单 */
let
data
=
{
file_info_id
:
this
.
fileId
}
this
.
$api
.
schoolBasedResourcesApi
.
GetFileShareInfoByFileId
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
Status
)
{
let
data
=
res
.
data
.
Data
if
(
data
&&
data
.
teacher_user_ids
)
{
let
teacherList
=
this
.
stringToUserList
(
data
.
teacher_user_ids
,
data
.
teacher_user_names
)
this
.
shareList
=
teacherList
}
else
{
this
.
shareList
=
[]
}
}
})
},
changeAndShare
(
list
)
{
/* 选人并分享 */
let
userList
=
this
.
userListToString
(
list
)
let
params
=
{
file_info_id
:
this
.
fileId
,
teacher_user_ids
:
userList
.
userIds
,
teacher_user_names
:
userList
.
userNames
}
this
.
$api
.
schoolBasedResourcesApi
.
fileShare
(
params
).
then
(
res
=>
{
if
(
res
.
data
.
Status
===
true
)
{
this
.
$vux
.
toast
.
show
({
text
:
'分享成功'
})
this
.
getShareList
()
}
else
{
this
.
$vux
.
toast
.
show
({
text
:
res
.
data
.
ResponseError
.
LongMessage
,
type
:
'cancel'
})
}
})
this
.
teacherSelectorShow
=
false
},
userListToString
(
userList
)
{
/* 把分享用户数组转为字符串 */
let
data
=
{
userIds
:
''
,
userNames
:
''
}
for
(
let
i
=
0
;
i
<
userList
.
length
;
i
++
)
{
if
(
i
===
0
)
{
data
.
userIds
+=
userList
[
i
].
id
data
.
userNames
+=
userList
[
i
].
realname
}
else
{
data
.
userIds
+=
','
+
userList
[
i
].
id
data
.
userNames
+=
','
+
userList
[
i
].
realname
}
}
return
data
},
stringToUserList
(
ids
,
names
)
{
/* 把分享用户字符串转为数组 */
let
idsStr
=
ids
.
split
(
','
)
let
namesStr
=
names
.
split
(
','
)
let
userList
=
[]
for
(
let
i
=
0
;
i
<
idsStr
.
length
;
i
++
)
{
userList
.
push
({
id
:
idsStr
[
i
],
realname
:
namesStr
[
i
]
})
}
return
userList
}
}
}
</
script
>
...
...
@@ -116,7 +193,11 @@ export default {
align-items: center;
.name {
padding-top: 2px;
font-size: 15px;
font-size: 14px;
width: 100%;
overflow: hidden;
// text-overflow:ellipsis;
// white-space: nowrap;
}
.iconfont {
font-size: 17px;
...
...
VSSCMP_WEIXIN/teacher/src/pages/education/schoolBasedResources/myResources/components/ActionMenu.vue
0 → 100644
View file @
61b5d3e2
<
template
>
<div
class=
"action-popover"
style=
"position:fixed;bottom:60px"
>
<popover
placement=
"top"
style=
"margin: 20px;"
>
<div
class=
"popover-ctn popover-demo-content"
slot=
"content"
>
<div
class=
"action-in-content"
style=
"margin-bottom: 5px"
@
click=
"backLayer(1)"
>
<div
class=
"action-item-ctn"
>
<i
class=
"iconfont"
>

</i>
</div>
<p>
返回上一级目录
</p>
</div>
<div
class=
"action-in-content"
@
click=
"backLayer(0)"
>
<div
class=
"action-item-ctn"
>
<i
class=
"iconfont"
>

</i>
</div>
<p>
回到主界面
</p>
</div>
</div>
<div
class=
"fixed-menu btn btn-default"
>
<i
class=
"iconfont"
>

</i>
</div>
</popover>
</div>
</
template
>
<
script
>
import
{
Popover
,
Icon
}
from
'vux'
export
default
{
name
:
'Popovers'
,
components
:
{
Popover
,
Icon
},
data
()
{
return
{
value
:
''
}
},
methods
:
{
backLayer
(
layer
)
{
this
.
$EventBus
.
$emit
(
'backLayer'
,
layer
)
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.popover-ctn {
background: rgb(252, 252, 252);
box-shadow: 5px 5px 5px #888888;
padding: 15px 5px 5px 5px;
.action-in-content {
display: flex;
.action-item-ctn {
width:35px;
height:35px;
padding:5px;
border-radius: 50px;
background: #59acfa;
text-align: center;
i {
font-size: 20px;
line-height: 25px;
color: white
}
}
p {
line-height: 35px;
margin-left: 5px;
}
}
}
.fixed-menu {
width:40px;
height:40px;
border: none;
margin:0 0 0 40px;
padding:5px;
border-radius: 50px;
background: #59acfa;
i {
font-size: 23px;
line-height: 30px;
color: white;
}
}
</
style
>
VSSCMP_WEIXIN/teacher/src/pages/education/schoolBasedResources/myResources/components/FileList.vue
View file @
61b5d3e2
...
...
@@ -10,16 +10,16 @@
<span
class=
"radio-item"
>
分享给我的
</span>
-->
</div>
<group
class=
"cellgroup-ctn"
>
<cell
v-show=
"mode !== 'favorShare' || radioValue === 'all' || item.fileType === radioValue"
v-for=
"(item, index) of list"
:key=
"index"
:title=
"item.name"
@
click
.
native=
"showBtns(item)"
>
<cell
v-show=
"mode !== 'favorShare' || radioValue === 'all' || item.fileType === radioValue"
v-for=
"(item, index) of list"
:key=
"index"
:title=
"item.
file_
name"
@
click
.
native=
"showBtns(item)"
>
<i
slot=
"icon"
class=
"iconfont"
>

</i>
<div
slot=
"after-title"
class=
"after-title-ctn"
>
<p
v-if=
"mode === 'favorShare'"
class=
"document-descript"
>
某某某 2020-08-13 12:00
</p>
<div
v-show=
"item.showFunBtn"
class=
"btns-ctn"
@
click
.
stop
>
<div
v-show=
"item.showFunBtn
|| false
"
class=
"btns-ctn"
@
click
.
stop
>
<span
class=
"btn-item"
@
click=
"handleOpen(item)"
>
打开
</span>
<span
class=
"btn-item"
>
下载
</span>
<span
class=
"btn-item"
v-if=
"mode === 'myUpload'"
@
click=
"
renameDialog = true
"
>
重命名
</span>
<span
class=
"btn-item"
v-if=
"mode === 'myUpload'"
@
click=
"
clickRenameBtn(item)
"
>
重命名
</span>
<span
class=
"btn-item"
v-if=
"mode === 'myUpload'"
@
click=
"handleShare(item)"
>
分享
</span>
<span
class=
"btn-item"
style=
"color:#D9001B"
v-if=
"mode === 'myUpload' || (mode === 'favorShare' && item.fileType === 'shareToMe')"
@
click=
"
deleteDialog = true
"
>
删除
</span>
<span
class=
"btn-item"
style=
"color:#D9001B"
v-if=
"mode === 'myUpload' || (mode === 'favorShare' && item.fileType === 'shareToMe')"
@
click=
"
selectDeleteItem(item)
"
>
删除
</span>
<span
class=
"btn-item"
style=
"color:#D9001B"
v-if=
"mode === 'favorShare' && item.fileType === 'myFavor'"
>
取消收藏
</span>
<span
class=
"btn-item"
style=
"color:#D9001B"
v-if=
"mode === 'favorShare' && item.fileType === 'myShare'"
>
取消分享
</span>
</div>
...
...
@@ -38,7 +38,7 @@
<x-input
class=
"rename-input"
v-model=
"renameValue"
placeholder=
"请输入名称..."
></x-input>
<div
class=
"btn-ctn"
>
<x-button
class=
"reset"
mini
plain
@
click
.
native=
"renameDialog = false"
>
取消
</x-button>
<x-button
class=
"inquire"
mini
@
click
.
native=
"
renameDialog = fals
e"
>
确定
</x-button>
<x-button
class=
"inquire"
mini
@
click
.
native=
"
handleUpdat
e"
>
确定
</x-button>
</div>
</div>
</x-dialog>
...
...
@@ -55,7 +55,7 @@
<p
class=
"tips"
>
删除后不可恢复,确认要删除此文档吗
</p>
<div
class=
"btn-ctn"
>
<x-button
class=
"reset"
mini
plain
@
click
.
native=
"deleteDialog = false"
>
取消
</x-button>
<x-button
class=
"inquire"
mini
@
click
.
native=
"
deleteDialog = fals
e"
>
确定
</x-button>
<x-button
class=
"inquire"
mini
@
click
.
native=
"
handleDelet
e"
>
确定
</x-button>
</div>
</div>
</x-dialog>
...
...
@@ -81,6 +81,12 @@ export default {
return
[]
}
}
// fileParent: {
// type: Object,
// default: () => {
// return {}
// }
// }
},
components
:
{
Group
,
...
...
@@ -92,6 +98,8 @@ export default {
data
()
{
return
{
radioValue
:
'all'
,
// 类型框的值 (all: 全部,myFavor:我收藏的,myShare:我分享的,shareToMe:分享给我的)
deleteItem
:
{},
// 储存选中删除的对象
renameItem
:
{},
// 储存选中重命名的对象
radioOption
:
[
{
label
:
'全部'
,
...
...
@@ -115,6 +123,8 @@ export default {
deleteDialog
:
false
}
},
mounted
()
{
},
methods
:
{
showBtns
(
item
)
{
this
.
$emit
(
'handleClickItem'
,
item
)
...
...
@@ -126,9 +136,33 @@ export default {
handleShare
(
item
)
{
/* 分享文档 */
this
.
$emit
(
'handleShare'
,
item
)
},
clickRenameBtn
(
item
)
{
/* 点击重命名按钮 */
this
.
renameValue
=
item
.
file_name
this
.
renameItem
=
item
this
.
renameDialog
=
true
},
handleUpdate
()
{
/* 修改文件名称 */
let
data
=
{
b_id
:
this
.
renameItem
.
file_info_id
,
file_name
:
this
.
renameValue
}
this
.
$emit
(
'updateFileName'
,
data
)
},
selectDeleteItem
(
item
)
{
/* 选择删除对象并弹窗确认 */
this
.
deleteItem
=
item
this
.
deleteDialog
=
true
},
handleDelete
()
{
/* 删除文件 */
let
data
=
{
b_id
:
this
.
deleteItem
.
file_info_id
}
this
.
$emit
(
'handleDeleteFile'
,
data
)
}
},
mounted
()
{
}
}
</
script
>
...
...
VSSCMP_WEIXIN/teacher/src/pages/education/schoolBasedResources/myResources/components/FolderList.vue
View file @
61b5d3e2
<
template
>
<div>
<group
:title=
"listTitle"
class=
"cellgroup-ctn"
>
<cell
v-for=
"(item, index) of list"
:key=
"index"
:title=
"item.
titl
e"
@
click
.
native=
"folderClick(item)"
>
<group
:title=
"listTitle
=== ''?'':`$
{listTitle}(${list.length})`
" class="cellgroup-ctn">
<cell
v-for=
"(item, index) of list"
:key=
"index"
:title=
"item.
folder_nam
e"
@
click
.
native=
"folderClick(item)"
>
<i
slot=
"icon"
class=
"iconfont"
>

</i>
<div
slot=
"after-title"
class=
"descript"
>
{{
item
.
descript
}}
我上传了
{{
item
.
file_count
}}
个文档
</div>
</cell>
</group>
...
...
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