Selaa lähdekoodia

workspace 代码精简

master
unknown 4 vuotta sitten
vanhempi
commit
0b961b4117
2 muutettua tiedostoa jossa 55 lisäystä ja 60 poistoa
  1. +9
    -0
      src/utils/tool.js
  2. +46
    -60
      src/views/main_web/workspace/workspace.vue

+ 9
- 0
src/utils/tool.js Näytä tiedosto

@@ -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,
});
}
}



+ 46
- 60
src/views/main_web/workspace/workspace.vue Näytä tiedosto

@@ -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 @@
<div class="minifont">下载中</div>
</span>
</div>
<div class="eidtTip" v-if="file.status == 1">
文件未开启协同
</div>
<div class="eidtTip" v-if="file.status == 1">文件未开启协同</div>
<span class="yiyunwenjian_infodesc">{{
file.folderName
}}</span>
@@ -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,
// });
// },
/**
* 加载我的应用实例数据
*/


Ladataan…
Peruuta
Tallenna