diff --git a/src/components/Minder/minder.vue b/src/components/Minder/minder.vue
index 8c4b06c..c21ced8 100644
--- a/src/components/Minder/minder.vue
+++ b/src/components/Minder/minder.vue
@@ -178,7 +178,7 @@ export default {
return
}
let request = 'previewText'
- if (this.hasReadOnly) {
+ if (!this.$store.state.user.token) {
request = 'sharePreviewText'
}
this.content = null
@@ -411,6 +411,7 @@ export default {
relativePath: encodeURI(this.file.path + this.file.name),
userId: this.$store.state.user.userId,
username: this.$store.state.user.name,
+ mountFileId: this.$store.state.user.userId !== this.file.userId ? this.file.id : '',
contentText: value
}).then(() => {
this.saveBtnUpdating = false
diff --git a/src/components/ShareDialog/index.vue b/src/components/ShareDialog/index.vue
index b4b26c3..d0b966b 100644
--- a/src/components/ShareDialog/index.vue
+++ b/src/components/ShareDialog/index.vue
@@ -10,14 +10,15 @@
:audio-cover-url="audioCoverUrl">
-
+
-
+
-
+
@@ -45,8 +46,8 @@
-
-
+
+
@@ -71,6 +72,17 @@
readonly="readonly" v-model="extractionCode">
提取码
+
+
+
+
+ 上传
+ 修改
+ 删除
+
+
+
+
@@ -180,6 +192,7 @@ export default {
expiresDateOption: 1,
isPrivacy: false,
expiresDate: '',
+ operationPermissionList: undefined
},
shareLink: "",
qrCodeshareLink: "",
@@ -187,18 +200,32 @@ export default {
shareOptionConfig: {
shared: false,
linkLabel: "选择有效期",
- }
+ },
+ filename: '',// 文件名
+ }
+ },
+ computed: {
+ filenamePath() {
+ return this.filename.slice(0, this.filename.lastIndexOf('/'))
}
},
watch: {
status(visible) {
if (visible) {
+ this.filename = this.file.name
this.shareDialogVisible = true
if (this.file.shareId) {
+ api.getFileInfoById({
+ id: this.file.fileId
+ }).then(res => {
+ this.filename = res.data.path + this.file.name
+ })
+
this.shareOptionConfig.shared = true
this.shareOptionConfig.linkLabel = '分享链接'
this.setShareLink(this.getShareLink(this.file.shareId))
this.shareOption.isPrivacy = this.file.isPrivacy
+ this.shareOption.operationPermissionList = this.file.operationPermissionList || []
if (this.file.expireDate) {
this.shareOption.expiresDate = moment(this.file.expireDate).format('x')
}
@@ -215,9 +242,12 @@ export default {
}
},
methods: {
- setShareLink(sahreLink) {
- this.shareLink = sahreLink
- QRCode.toDataURL(sahreLink)
+ permissionActionChange() {
+ this.createShare()
+ },
+ setShareLink(shareLink) {
+ this.shareLink = shareLink
+ QRCode.toDataURL(shareLink)
.then(url => {
this.qrCodeshareLink = url
})
@@ -247,6 +277,7 @@ export default {
submitShare() {
this.$refs.form.validate((valid) => {
if (valid) {
+ this.shareOption.operationPermissionList = undefined
this.createShare()
} else {
console.log('error submit!!');
@@ -279,16 +310,18 @@ export default {
fileId: this.file.fileId,
isFolder: this.file.isFolder,
expireDate: expireDate,
- isPrivacy: this.shareOption.isPrivacy
+ isPrivacy: this.shareOption.isPrivacy,
+ operationPermissionList: this.shareOption.operationPermissionList
}).then(res => {
if (res.data) {
- let {shareId, extractionCode} = res.data
+ let {shareId, extractionCode, operationPermissionList} = res.data
this.setShareLink(this.getShareLink(shareId))
this.generateShareLinkLoading = false
this.shareOptionConfig.shared = true
this.shareOption.expiresDateOption = 2
this.shareOptionConfig.linkLabel = "分享链接"
this.extractionCode = extractionCode
+ this.shareOption.operationPermissionList = operationPermissionList || []
this.$emit('onSuccess', shareId)
if (update) {
if (!expireDate) {
@@ -385,13 +418,14 @@ export default {
}
> > > .el-form-item__label {
+ text-align: left;
line-height: 32px;
}
.shared-expires-text {
text-align: right;
line-height: 32px;
- padding-right: 5px;
+ padding-right: 10px;
}
}
@@ -428,5 +462,9 @@ export default {
text-align: center;
padding: 0 10px;
}
+
+ >>> .el-collapse {
+ border-top: 0;
+ }
}
diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue
index f8a5fd8..2a164ae 100644
--- a/src/components/ShowFile/ShowFile.vue
+++ b/src/components/ShowFile/ShowFile.vue
@@ -1,23 +1,42 @@
-
+
-
-
+
+
{{ item.label }}
-
-
+
+
{{ itemSecond.label }}
-
+
@@ -26,20 +45,41 @@
-
-
+
+
-
+
-
-
-
+
+
+
-
+
@@ -56,31 +96,40 @@
-
-
-
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+ :class="{
+ 'al-file-sort-item-icon': true,
+ 'el-icon-top': sortable.order === 'ascending',
+ 'el-icon-bottom': sortable.order === 'descending'
+ }"
+ >
名称
-
+
+ :class="{
+ 'al-file-sort-item-icon': true,
+ 'el-icon-top': sortable.order === 'ascending',
+ 'el-icon-bottom': sortable.order === 'descending'
+ }"
+ >
大小
-
+
+ :class="{
+ 'al-file-sort-item-icon': true,
+ 'el-icon-top': sortable.order === 'ascending',
+ 'el-icon-bottom': sortable.order === 'descending'
+ }"
+ >
日期
-
+
@@ -142,38 +236,55 @@
获取更多数据...
- {{ !finished ? '已加载 ' + getSummaries3 : '已全部加载 ' + getSummaries3 }}
+ {{
+ !finished
+ ? "已加载 " + getSummaries3
+ : "已全部加载 " + getSummaries3
+ }}
-