diff --git a/src/views/login.vue b/src/views/login.vue index 41118314..bbee1e1a 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -250,7 +250,7 @@ export default { checkPwdTip: "", //检测提示 phoneCode: "", //手机验证码 isRemember: false, //记住密码 - isClient: false //是否是客户端 + isClient: true //是否是客户端 }; }, beforeRouteLeave(to, from, next) { diff --git a/src/views/main_web/cloud.vue b/src/views/main_web/cloud.vue index ab20ed21..4fac84a3 100644 --- a/src/views/main_web/cloud.vue +++ b/src/views/main_web/cloud.vue @@ -413,7 +413,7 @@ mapAddress:'北京天安门', showImage:false, imageUrl:'', - isClient:false, //是否是客户端 + isClient:true, //是否是客户端 //结束 // end }; diff --git a/src/views/main_web/projnotice.vue b/src/views/main_web/projnotice.vue index d8a8103b..b2fc1d64 100644 --- a/src/views/main_web/projnotice.vue +++ b/src/views/main_web/projnotice.vue @@ -85,7 +85,7 @@ showOffice: false, // 预览Office文件 officeUrl: "", // PDF URL isShowDefault:false, - isClient: false,//是否是客户端 + isClient: true,//是否是客户端 }; }, mounted: function () { diff --git a/src/views/main_web/workspace.vue b/src/views/main_web/workspace.vue index a8d52ee2..71e5d9a9 100644 --- a/src/views/main_web/workspace.vue +++ b/src/views/main_web/workspace.vue @@ -2279,7 +2279,7 @@ export default { dialogNewSuperMapVisible: false, newSuperMap: { showName: "", description: "" }, mapAddress: "北京天安门", - isClient: false, // 是否是客户端 + isClient: true, // 是否是客户端 /**新建文件分组 start*/ dialogNewFolderGroup: false, //新建文件分组组弹窗 //文件分组数据 @@ -2348,6 +2348,12 @@ export default { window["refreshFiles"] = () => { this.refreshPages(); }; + window["tipUser"] = () => { + this.tipUser(); + }; + window["setFileStatusSure"] = () => { + this.setFileStatusSure(); + }; window.addEventListener("scroll", this.onscroll, true); this.loadProjManager(); this.loadSettings(); @@ -2702,6 +2708,14 @@ export default { return; } if (type == 1) { + if(thisApp.isClient && (state ==0 || state == 2)) + { + // 启动客户端判断 + thisApp.setFile=file; + thisApp.setState=state; + back.getFileStatus(file.archID,sessionStorage.userId) + return; + } file.status = state; thisApp .$axios({ @@ -2815,6 +2829,14 @@ export default { } else { // state :0/2/3 if (type == 1) { + if(thisApp.isClient && (state ==0 || state == 2)) + { + // 启动客户端判断 + thisApp.setFile=file; + thisApp.setState=state; + back.getFileStatus(file.archID,sessionStorage.userId) + return; + } file.status = state; thisApp .$axios({ @@ -2828,7 +2850,7 @@ export default { if (response.data.state == 1) { thisApp.$notify({ title: "恭喜您", - message: message, + message: "操作成功", type: "success", offset: 100, duration: 2500 @@ -2908,6 +2930,70 @@ export default { console.log(error); }); }, + /** + * 客户端验证确定可以修改文件状态 + */ + setFileStatusSure(){ + var thisApp=this; + if(thisApp.setFile.alias == "") + { + this.$notify({ + title: "温馨提示", + message: "文件正在同步中,请稍后操作", + type: "info", + offset: 100, + duration: 2500 + }); + return; + } + thisApp.setFile.status = thisApp.setState; + thisApp + .$axios({ + method: "put", + url: encodeURI( + process.env.API_HOST + "archives/update/status" + ), + data: thisApp.setFile + }) + .then(function(response) { + if (response.data.state == 1) { + thisApp.$notify({ + title: "恭喜您", + message: message, + type: "success", + offset: 100, + duration: 2500 + }); + thisApp.refreshPages(); + if (thisApp.fileindex == 1 && file.commonStatus == 1) { + thisApp.loadListCommonFiles(); + } + } else { + thisApp.$notify({ + title: "温馨提示", + message: response.data.message, + type: "info", + offset: 100, + duration: 5000 + }); + } + }) + .catch(function(error) { + console.log(error); + }); + }, + /** + * 不能改变状态时提示用户 + */ + tipUser(){ + this.$notify({ + title: "温馨提示", + message: "文件正在同步中,请稍后操作", + type: "info", + offset: 100, + duration: 2500 + }); + }, /** * @description: 应用列表鼠标滑入 * @return: