-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
331 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
<template> | ||
<div class="library"> | ||
<header> | ||
<div class="back" @click="back"> | ||
<i class="el-icon-fa-angle-left"></i><span>返回</span> | ||
</div> | ||
<div class="title"> | ||
<i class="el-icon-fa-cloud-upload"></i> | ||
<span>分享中心</span> | ||
</div> | ||
</header> | ||
<box-card class="file-list" title="上传并分享" noPadding> | ||
<upload-box v-show="!fileList.length" ref="uploader" | ||
:fileList="fileList" | ||
:updateFiles="commitFiles"> | ||
</upload-box> | ||
<div class="file-item" v-for="(file, index) in fileList" | ||
:key="`${file.name}_${index}`"> | ||
<div class="file-info"> | ||
<figure class="file"> | ||
<img :src="fileIcon[file.raw.extension]" alt="format"/> | ||
<figcaption class="description"> | ||
<div class="name">原始名:{{file.name}}</div> | ||
<div class="attribute">上传成功,共{{file.pageInfo && file.pageInfo.pageCount}}页</div> | ||
</figcaption> | ||
</figure> | ||
<div class="share-name"> | ||
<span class="input-tip">分享名称</span> | ||
<el-input class="input" v-model="file.share.rename"></el-input> | ||
</div> | ||
<footer class="footer"> | ||
<el-button class="footer-button" type="primary" @click="shareFile(file)">分 享</el-button> | ||
<el-button class="footer-button" @click="deleteFile(file)">删 除</el-button> | ||
</footer> | ||
</div> | ||
<div class="file-tags"> | ||
<span class="tag-tip">请指定文档所属的 学校科目 或 专题</span> | ||
<div> | ||
<span class="input-tip">学校学院</span> | ||
<el-input class="input" v-model="file.share.institute"></el-input> | ||
</div> | ||
<div> | ||
<span class="input-tip">适用年级</span> | ||
<el-input class="input" v-model="file.share.semester"></el-input> | ||
</div> | ||
<div> | ||
<span class="input-tip">专业科目</span> | ||
<el-input class="input" v-model="file.share.major"></el-input> | ||
</div> | ||
<div> | ||
<span class="input-tip">指定专题</span> | ||
<el-input class="input" v-model="file.share.subject"></el-input> | ||
</div> | ||
</div> | ||
</div> | ||
</box-card> | ||
<box-card class="documents" title="分享记录"> | ||
<el-menu :default-active="docsType" class="selector-tabs" mode="horizontal" @select="changeDocsType"> | ||
<el-menu-item index="ratified" class="selector-item">已审核 (0)</el-menu-item> | ||
<el-menu-item index="to-ratify" class="selector-item">待审核 (0)</el-menu-item> | ||
</el-menu> | ||
<div class="empty-tip">暂时没有文档记录</div> | ||
</box-card> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { mapState, mapMutations } from 'vuex' | ||
import { icons } from '@/assets/img/print' | ||
import * as types from '@/store/mutation-types' | ||
import boxCard from '$@/Stateless/BoxCard/index' | ||
import uploadBox from '$@/Business/UploadBox' | ||
export default { | ||
name: 'share-view', | ||
components: { boxCard, uploadBox }, | ||
props: {}, | ||
data () { | ||
return { | ||
docsType: 'ratified', | ||
fileIcon: icons, | ||
} | ||
}, | ||
computed: { | ||
...mapState('share', ['fileList']), | ||
}, | ||
watch: {}, | ||
mounted () {}, | ||
methods: { | ||
...mapMutations('share', { | ||
commitFiles: types.UPDATE_FILES | ||
}), | ||
back () { | ||
this.$router.back() | ||
}, | ||
async changeDocsType (type) { | ||
console.log('docs type', type) | ||
}, | ||
shareFile (file) { | ||
console.log(file.raw.md5) | ||
console.log(file.share) | ||
this.deleteFile(file) | ||
}, | ||
deleteFile (file) { | ||
this.$refs.uploader.transmitRemove(file) | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="stylus" rel="stylesheet/stylus" scoped> | ||
@import "./share-view" | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './ShareView' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
@import "~@/style/import" | ||
|
||
.library | ||
margin: 10px auto 20px | ||
width: 1080px | ||
height: 100% | ||
header | ||
display: flex | ||
align-items: center | ||
justify-content: flex-start | ||
margin: 0 auto 10px | ||
border-radius: 4px | ||
padding: 8px | ||
width: 1080px | ||
height: 56px | ||
font-size: 16px | ||
background-color: #fff | ||
box-shadow: 0 0 4px 1px #ddd | ||
.back | ||
display: inline-block | ||
border-radius: 6px 0 0 6px | ||
border-right: solid 1px #bbb | ||
padding: 8px | ||
width: 80px | ||
text-align: center | ||
vertical-align: middle | ||
color: gray-text | ||
transition: border .2s ease, background-color .2s ease | ||
i | ||
font-size: 20px | ||
vertical-align: middle | ||
color: #bbb | ||
span | ||
margin-left: 4px | ||
vertical-align: middle | ||
&:hover | ||
cursor: pointer | ||
border-color: #eee | ||
background-color: #eee | ||
|
||
.title | ||
display: inline-block | ||
margin-left: 12px | ||
vertical-align: middle | ||
i | ||
border-radius: 50% | ||
padding: 0 6px | ||
width: 32px | ||
line-height: 32px | ||
font-size: 18px | ||
color: #fff | ||
vertical-align: middle | ||
background-color: blue-dark | ||
span | ||
display: inline-block | ||
margin-left: 4px | ||
font-size: 18px | ||
color: deep-black | ||
vertical-align: middle | ||
|
||
.documents | ||
selector-tabs() | ||
.selector-tabs | ||
margin: 6px auto 20px | ||
.empty-tip | ||
padding: 40px 0 | ||
font-size: 24px | ||
text-align: center | ||
color: shallow-text-gray | ||
|
||
|
||
.file-list .file-item | ||
padding: 10px 20px | ||
.file-info, .file-tags | ||
display: inline-block | ||
vertical-align: top | ||
.file-info | ||
margin: 10px 0 0 15px | ||
width: 460px | ||
.file | ||
img | ||
max-width: 72px | ||
vertical-align: middle | ||
.description | ||
display: inline-block | ||
margin-left: 10px | ||
vertical-align: middle | ||
.name | ||
overflow: hidden | ||
max-width: 360px | ||
font-size: 15px | ||
white-space: nowrap | ||
text-overflow: ellipsis | ||
color: deep-black | ||
.attribute | ||
margin-top: 20px | ||
font-size: 14px | ||
color: shallow-text-gray | ||
.share-name | ||
margin: 15px 0 0 10px | ||
.file-tags | ||
margin: 4px 0 0 20px | ||
.tag-tip | ||
color: blue-dark | ||
display: block | ||
margin-bottom: 6px | ||
font-size: 14px | ||
& > div | ||
margin-bottom: 6px | ||
.input-tip | ||
display: inline-block | ||
border-left: 3px solid blue-dark | ||
padding-left: 8px | ||
width: 80px | ||
line-height: 28px | ||
font-size: 16px | ||
color: blue-dark | ||
.input | ||
display: inline-block | ||
width: 320px | ||
|
||
.footer | ||
display: flex | ||
align-items: center | ||
justify-content: center | ||
margin: 0 | ||
width: 100% | ||
height: 60px | ||
text-align: center | ||
.footer-button | ||
margin: 0 20px | ||
padding: 0 | ||
width: 120px | ||
height: 32px | ||
transition: all .2s ease-out | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.