From 0b961b4117a5d804f031f9db9dd5e8d203ba6840 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Nov 2020 13:49:46 +0800 Subject: [PATCH] =?UTF-8?q?workspace=20=E4=BB=A3=E7=A0=81=E7=B2=BE?= =?UTF-8?q?=E7=AE=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/tool.js | 9 ++ src/views/main_web/workspace/workspace.vue | 106 +++++++++------------ 2 files changed, 55 insertions(+), 60 deletions(-) diff --git a/src/utils/tool.js b/src/utils/tool.js index 9cba2cbc..fe1b38d8 100644 --- a/src/utils/tool.js +++ b/src/utils/tool.js @@ -34,6 +34,15 @@ export const notify = { offset: 100, duration: 2500, }); + }, + info: (message, title = '温馨提示') => { + Vue.prototype.$notify({ + title, + message, + type: 'info', + offset: 100, + duration: 2500, + }); } } diff --git a/src/views/main_web/workspace/workspace.vue b/src/views/main_web/workspace/workspace.vue index 8cd35e5c..6a0fdcb9 100644 --- a/src/views/main_web/workspace/workspace.vue +++ b/src/views/main_web/workspace/workspace.vue @@ -492,13 +492,7 @@ ? ' toumin' : '') " - v-if=" - file.extension != 'jpg' && - file.extension != 'png' && - file.extension != 'bmp' && - file.extension != 'gif' && - file.extension != 'jpeg' - " + v-if="!oneOf(file.extension, ['jpg','png','bmp','gif','jpeg'])" @contextmenu.prevent.stop=" rightShowMenu($event, file, 1) " @@ -515,13 +509,7 @@ ? ' toumin' : '') " - v-if=" - file.extension == 'jpg' || - file.extension == 'png' || - file.extension == 'bmp' || - file.extension == 'gif' || - file.extension == 'jpeg' - " + v-if="oneOf(file.extension, ['jpg','png','bmp','gif','jpeg'])" @contextmenu.prevent.stop=" rightShowMenu($event, file, 1) " @@ -1185,9 +1173,7 @@
下载中
-
- 文件未开启协同 -
+
文件未开启协同
{{ file.folderName }} @@ -3255,38 +3241,38 @@ export default { /** * 打开文件时更新文件状态及编辑人 */ - setModifyStatus(file) { - var thisApp = this; - file.status = 1; // 设置为编辑中 - file.modifyUserID = sessionStorage.userId; - this.$axios({ - method: "put", - url: encodeURI(process.env.API_HOST + "archives/update/status"), - data: file, - }) - .then(function (response) { - if (response.data.state == 1) { - thisApp.$notify({ - title: "恭喜您", - message: response.data.message, - type: "success", - offset: 100, - duration: 2500, - }); - } else { - thisApp.$notify({ - title: "温馨提示", - message: response.data.message, - type: "info", - offset: 100, - duration: 5000, - }); - } - }) - .catch(function (error) { - console.log(error); - }); - }, + // setModifyStatus(file) { + // var thisApp = this; + // file.status = 1; // 设置为编辑中 + // file.modifyUserID = sessionStorage.userId; + // this.$axios({ + // method: "put", + // url: encodeURI(process.env.API_HOST + "archives/update/status"), + // data: file, + // }) + // .then(function (response) { + // if (response.data.state == 1) { + // thisApp.$notify({ + // title: "恭喜您", + // message: response.data.message, + // type: "success", + // offset: 100, + // duration: 2500, + // }); + // } else { + // thisApp.$notify({ + // title: "温馨提示", + // message: response.data.message, + // type: "info", + // offset: 100, + // duration: 5000, + // }); + // } + // }) + // .catch(function (error) { + // console.log(error); + // }); + // }, async updateFileWorkStatus(file, workStatus, message) { // const params = { // FolderId: file.folderId, @@ -5129,17 +5115,17 @@ export default { /** * 上传文件成功时触发 */ - uploadAppFileSuccess: function (file) { - this.newAppInstance.alias = file.filePath; - this.newAppInstance.fileName = file.fileName; - this.$notify({ - title: "温馨提示", - message: "恭喜您,实例文件上传成功!", - type: "success", - offset: 30, - duration: 2000, - }); - }, + // uploadAppFileSuccess: function (file) { + // this.newAppInstance.alias = file.filePath; + // this.newAppInstance.fileName = file.fileName; + // this.$notify({ + // title: "温馨提示", + // message: "恭喜您,实例文件上传成功!", + // type: "success", + // offset: 30, + // duration: 2000, + // }); + // }, /** * 加载我的应用实例数据 */