@@ -30,9 +30,9 @@ | |||||
--> | --> | ||||
<router-view | <router-view | ||||
ref="mainpage" | ref="mainpage" | ||||
:class="{setMarginTop, 'workspace-bigbody': $route.path.indexOf('/workspace') >=0}" | |||||
class="mt-40" | |||||
:class="{'mt-60': setMarginTop,'workspace-bigbody': $route.path.indexOf('/workspace') >=0}" | |||||
id="bigbody" | id="bigbody" | ||||
class="mt-48" | |||||
></router-view> | ></router-view> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -71,7 +71,7 @@ export default { | |||||
}, | }, | ||||
computed: { | computed: { | ||||
setMarginTop() { | setMarginTop() { | ||||
return this.isClient ? 'mt-60' : 'mt-40'; | |||||
return this.isClient || this.$route.name == 'workspace'; | |||||
} | } | ||||
}, | }, | ||||
mounted: function () { | mounted: function () { | ||||
@@ -182,4 +182,5 @@ jmnode { | |||||
.mt-60 { | .mt-60 { | ||||
margin: 60px 0 0 0; | margin: 60px 0 0 0; | ||||
} | } | ||||
</style> | </style> |
@@ -1,24 +1,25 @@ | |||||
<template> | <template> | ||||
<div class="app-header" :class="{ white: theme === 'white' || isWindowScrollIng , black: theme === 'black', 'black-bg-color': isWindowScrollIng && theme === 'black' }"> | <div class="app-header" :class="{ white: theme === 'white' || isWindowScrollIng , black: theme === 'black', 'black-bg-color': isWindowScrollIng && theme === 'black' }"> | ||||
<div class="app-header-top" v-if="isClient"> | |||||
<div class="top-left"> | |||||
<div class="app-header-top" v-if="isClient" :style="adjustPadding"> | |||||
<div class="top-left" :class="{'hide-state': true}"> | |||||
<div class="dot"></div> | <div class="dot"></div> | ||||
<div class="state" :class="{white: theme === 'white', black: theme === 'black'}">在线</div> | |||||
<div class="state" :class="{'white-color': theme === 'white', black: theme === 'black'}">在线</div> | |||||
</div> | </div> | ||||
<div class="top-right"> | |||||
<div class="top-right hide-state"> | |||||
<div class="min" @click.stop="shrinkBrowserWindow"> | <div class="min" @click.stop="shrinkBrowserWindow"> | ||||
<img src="/static/img/窗口缩小.svg" alt="" class="min-icon"/> | <img src="/static/img/窗口缩小.svg" alt="" class="min-icon"/> | ||||
</div> | </div> | ||||
<div class="max" @click.stop="enlargeBrowserWindow"> | |||||
<div v-if="!isMaxWindowNow" class="unmax-icon" ></div> | |||||
<img v-else src="/static/img/缩放窗口.svg" alt="" class="to-max-icon"> | |||||
<div class="max"> | |||||
<div v-if="!isMaxWindowNow" class="unmax-icon" @click.stop="enlargeBrowserWindow"></div> | |||||
<img v-else src="/static/img/缩放窗口.svg" alt="" class="to-max-icon" @click.stop="unmaxBrowserWindow"> | |||||
</div> | </div> | ||||
<div class="close" @click.stop="closeBrowserWindow"> | <div class="close" @click.stop="closeBrowserWindow"> | ||||
<img src="/static/img/窗口关闭.svg" alt="" class="close-icon"/> | <img src="/static/img/窗口关闭.svg" alt="" class="close-icon"/> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="app-header-content" > | |||||
<div v-else-if="isWorkspaceTopBar" class="app-header-top"></div> | |||||
<div class="app-header-content" :class="{'adjust-content-pos': isWorkspaceTopBar && !isClient}"> | |||||
<div class="app-header-content-left"> | <div class="app-header-content-left"> | ||||
<slot name="left"> | <slot name="left"> | ||||
<i class="yiyun_icon app-header-back-btn" :class="{ icon_topback_left: theme === 'white' || theme === 'basis', icon_topback_left_baise: theme === 'black' }" @click="navBack()" v-show="showBackBtn" /> | <i class="yiyun_icon app-header-back-btn" :class="{ icon_topback_left: theme === 'white' || theme === 'basis', icon_topback_left_baise: theme === 'black' }" @click="navBack()" v-show="showBackBtn" /> | ||||
@@ -56,15 +57,33 @@ export default { | |||||
title: String, | title: String, | ||||
// 右侧 | // 右侧 | ||||
showUserCenter: Boolean, | showUserCenter: Boolean, | ||||
// 是否显示左边的状态 | |||||
isShowLeftState: { | |||||
type: Boolean, | |||||
default() { | |||||
return true; | |||||
} | |||||
}, | |||||
//是否是协作空间的顶部导航栏 | |||||
isWorkspaceTopBar: Boolean, | |||||
}, | }, | ||||
data() { | data() { | ||||
return { | return { | ||||
isWindowScrollIng: false, | isWindowScrollIng: false, | ||||
isClient: system.isClient, | isClient: system.isClient, | ||||
isMaxWindowNow: true, | |||||
isMaxWindowNow: false, | |||||
}; | }; | ||||
}, | }, | ||||
mounted: function () { | |||||
computed: { | |||||
adjustPadding() { | |||||
return this.showUserCenter ? {padding: `0 70px 0 45px`} : {padding: `0 64px 0 45px`} | |||||
} | |||||
}, | |||||
created() { | |||||
this.isMaxWindowNow = this.$cookie.get('isMaxWindowNow') === 'true' ? Boolean(this.$cookie.get('isMaxWindowNow')) : false; | |||||
}, | |||||
mounted() { | |||||
// 监听滚动事件 视情况判断是否要增加可以不监听滚动的入参 | // 监听滚动事件 视情况判断是否要增加可以不监听滚动的入参 | ||||
window.addEventListener("scroll", this.handleScroll.bind(this), true); | window.addEventListener("scroll", this.handleScroll.bind(this), true); | ||||
}, | }, | ||||
@@ -74,11 +93,13 @@ export default { | |||||
}, | }, | ||||
enlargeBrowserWindow() { | enlargeBrowserWindow() { | ||||
this.isMaxWindowNow = !this.isMaxWindowNow; | this.isMaxWindowNow = !this.isMaxWindowNow; | ||||
if(!this.isMaxWindowNow) { | |||||
system.unmaxBrowserWindow(); | |||||
} else { | |||||
system.enlargeBrowserWindow(); | |||||
} | |||||
this.$cookie.set('isMaxWindowNow', this.isMaxWindowNow);//这里也需要存储 因为影响到别的地方组件isMaxWindowNow的初始化 | |||||
system.enlargeBrowserWindow(); | |||||
}, | |||||
unmaxBrowserWindow() { | |||||
this.isMaxWindowNow = !this.isMaxWindowNow; | |||||
this.$cookie.set('isMaxWindowNow', this.isMaxWindowNow); | |||||
system.unmaxBrowserWindow(); | |||||
}, | }, | ||||
closeBrowserWindow() { | closeBrowserWindow() { | ||||
system.closeBrowserWindow(); | system.closeBrowserWindow(); | ||||
@@ -107,6 +128,9 @@ export default { | |||||
</script> | </script> | ||||
<style lang="scss" scoped> | <style lang="scss" scoped> | ||||
.hide-state { | |||||
visibility: hidden; | |||||
} | |||||
@mixin setOnelineHeight($v) { | @mixin setOnelineHeight($v) { | ||||
height: $v; | height: $v; | ||||
line-height: $v; | line-height: $v; | ||||
@@ -114,6 +138,9 @@ export default { | |||||
.black { | .black { | ||||
color: #fff !important; | color: #fff !important; | ||||
} | } | ||||
.white-color { | |||||
background-color: rgba(252, 252, 252, 1); | |||||
} | |||||
.white { | .white { | ||||
background-color: rgba(252, 252, 252, 1); | background-color: rgba(252, 252, 252, 1); | ||||
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.2); | box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.2); | ||||
@@ -219,4 +246,9 @@ export default { | |||||
.black-bg-color { | .black-bg-color { | ||||
background-color:#32323c; | background-color:#32323c; | ||||
} | } | ||||
.adjust-content-pos { | |||||
position: relative; | |||||
top: -10px; | |||||
} | |||||
</style> | </style> |
@@ -66,6 +66,12 @@ const system = { | |||||
const { ipcRenderer } = global.electron; | const { ipcRenderer } = global.electron; | ||||
await ipcRenderer.invoke('close-browser-window'); | await ipcRenderer.invoke('close-browser-window'); | ||||
}), | }), | ||||
// 判断当前窗口是否是最大化的状态 | |||||
isMaxWindowNow: safeCall(async () => { | |||||
const { ipcRenderer } = global.electron; | |||||
const res = await ipcRenderer.invoke('is-max-window-now'); | |||||
return res; | |||||
}), | |||||
// 保存客户端配置 | // 保存客户端配置 | ||||
initClientConfig: safeCall((path, errorHandler = identity) => { | initClientConfig: safeCall((path, errorHandler = identity) => { | ||||
const config = io('initClientConfig'); | const config = io('initClientConfig'); | ||||
@@ -1,4 +1,3 @@ | |||||
import { fetchApi } from '@/utils/request'; | import { fetchApi } from '@/utils/request'; | ||||
import { platform, PLATFORM_TYPE, AccessCode } from '@/utils/access'; | import { platform, PLATFORM_TYPE, AccessCode } from '@/utils/access'; | ||||
import { firstCharToLowerCase } from '@/utils/tool'; | import { firstCharToLowerCase } from '@/utils/tool'; | ||||
@@ -14,7 +13,7 @@ const initialState = () => ({ | |||||
currentCompanyId: undefined, | currentCompanyId: undefined, | ||||
avator: undefined, | avator: undefined, | ||||
userInfo: {}, | userInfo: {}, | ||||
client:system.isClient ? '桌面端':'WEB端' | |||||
client: system.isClient ? '桌面端' : 'WEB端', | |||||
}); | }); | ||||
const getBootstrapState = () => { | const getBootstrapState = () => { | ||||
@@ -23,7 +22,7 @@ const getBootstrapState = () => { | |||||
const sessionState = JSON.parse(sessionStorage.getItem('user')); | const sessionState = JSON.parse(sessionStorage.getItem('user')); | ||||
const currentCompanyId = sessionStorage.getItem('companyId'); | const currentCompanyId = sessionStorage.getItem('companyId'); | ||||
const currentPlatform = JSON.parse(sessionStorage.getItem('platform') || '{}'); | const currentPlatform = JSON.parse(sessionStorage.getItem('platform') || '{}'); | ||||
//sessionStorage.getItem('companyName'); | |||||
//sessionStorage.getItem('companyName'); | |||||
if (sessionState && sessionState.accountId) { | if (sessionState && sessionState.accountId) { | ||||
state.isLogin = true; | state.isLogin = true; | ||||
Object.assign(state, sessionState); | Object.assign(state, sessionState); | ||||
@@ -35,8 +34,7 @@ const getBootstrapState = () => { | |||||
state = initialState(); | state = initialState(); | ||||
} | } | ||||
return state; | return state; | ||||
} | |||||
}; | |||||
export default { | export default { | ||||
state: getBootstrapState(), | state: getBootstrapState(), | ||||
@@ -48,18 +46,18 @@ export default { | |||||
sessionStorage.CompanyName = JSON.parse(sessionStorage.platform).orgName; | sessionStorage.CompanyName = JSON.parse(sessionStorage.platform).orgName; | ||||
sessionStorage.accountName = JSON.parse(sessionStorage.user).accountName; | sessionStorage.accountName = JSON.parse(sessionStorage.user).accountName; | ||||
const params={ | |||||
API:'authentication/login', | |||||
Action:'登录', | |||||
CompanyName:sessionStorage.CompanyName, | |||||
Subject:sessionStorage.accountName, | |||||
Source:sessionStorage.client, | |||||
} | |||||
fetchApi('operation/record',params) | |||||
const params = { | |||||
API: 'authentication/login', | |||||
Action: '登录', | |||||
CompanyName: sessionStorage.CompanyName, | |||||
Subject: sessionStorage.accountName, | |||||
Source: sessionStorage.client, | |||||
}; | |||||
fetchApi('operation/record', params); | |||||
}, | }, | ||||
async login(UserName, PassWord) { | async login(UserName, PassWord) { | ||||
const loginRes = await fetchApi('authentication/login', { UserName, PassWord }); | const loginRes = await fetchApi('authentication/login', { UserName, PassWord }); | ||||
const loginSucc = loginRes.Code === 0; | const loginSucc = loginRes.Code === 0; | ||||
if (!loginSucc) { | if (!loginSucc) { | ||||
return loginRes; | return loginRes; | ||||
@@ -97,27 +95,34 @@ export default { | |||||
const isSuperAdmin = backgroundPermission === 3; | const isSuperAdmin = backgroundPermission === 3; | ||||
const isCompanyAdmin = backgroundPermission === 2; | const isCompanyAdmin = backgroundPermission === 2; | ||||
// | |||||
if (isSuperAdmin) { // todo 服务商查询企业列表并生成platformList | |||||
// | |||||
if (isSuperAdmin) { | |||||
// todo 服务商查询企业列表并生成platformList | |||||
// todo 暂时将模板控制台加入到超管账号中 | // todo 暂时将模板控制台加入到超管账号中 | ||||
platformList.push( | platformList.push( | ||||
platform(PLATFORM_TYPE.MANAGE_CENTER, companyId, 'LOCKING 总后台', undefined, []), | |||||
platform(PLATFORM_TYPE.MANAGE_CENTER, companyId, 'LOCKING 总后台', undefined, []) | |||||
// platform(PLATFORM_TYPE.TEMPLATE_CONSOLE, CompanyId, undefined, false, '模版控制台'), | // platform(PLATFORM_TYPE.TEMPLATE_CONSOLE, CompanyId, undefined, false, '模版控制台'), | ||||
); | ); | ||||
} else { // 企业生成自己的企业平台权限 | |||||
} else { | |||||
// 企业生成自己的企业平台权限 | |||||
const companyInfoRes = await fetchApi('company/queryFrontDeskCompanyById', { id: companyId }); | const companyInfoRes = await fetchApi('company/queryFrontDeskCompanyById', { id: companyId }); | ||||
if (companyInfoRes.Code !== 0) { | if (companyInfoRes.Code !== 0) { | ||||
return companyInfoRes; | return companyInfoRes; | ||||
} | } | ||||
const { Data = {} } = companyInfoRes; | const { Data = {} } = companyInfoRes; | ||||
const { company: { LogoUrl, CompanyName } } = Data; | |||||
const { | |||||
company: { LogoUrl, CompanyName }, | |||||
} = Data; | |||||
const accessList = []; | const accessList = []; | ||||
if (isCompanyAdmin) { accessList.push(AccessCode.CompanyConsole); } | |||||
if (permission === 1) { accessList.push(AccessCode.ProjectManager); } | |||||
if (isCompanyAdmin) { | |||||
accessList.push(AccessCode.CompanyConsole); | |||||
} | |||||
if (permission === 1) { | |||||
accessList.push(AccessCode.ProjectManager); | |||||
} | |||||
platformList.push(platform(PLATFORM_TYPE.COMPANY, companyId, CompanyName, LogoUrl, accessList)); | platformList.push(platform(PLATFORM_TYPE.COMPANY, companyId, CompanyName, LogoUrl, accessList)); | ||||
} | } | ||||
// 存储 | // 存储 | ||||
this.state.isLogin = true; | this.state.isLogin = true; | ||||
Object.assign(this.state, loginData); | Object.assign(this.state, loginData); | ||||
@@ -129,19 +134,20 @@ export default { | |||||
return { | return { | ||||
Code: loginRes.Code, | Code: loginRes.Code, | ||||
Data: loginData, | Data: loginData, | ||||
} | |||||
}; | |||||
}, | }, | ||||
logout() { | |||||
async logout() { | |||||
this.state = initialState(); | this.state = initialState(); | ||||
const params = { | |||||
API: 'authentication/loginOut', | |||||
Action: '注销', | |||||
CompanyName: sessionStorage.CompanyName, | |||||
Subject: sessionStorage.accountName, | |||||
Source: sessionStorage.client, | |||||
}; | |||||
await fetchApi('operation/record', params); | |||||
fetchApi('authentication/loginOut'); | fetchApi('authentication/loginOut'); | ||||
const params={ | |||||
API:'authentication/loginOut', | |||||
Action:'注销', | |||||
CompanyName:sessionStorage.CompanyName, | |||||
Subject:sessionStorage.accountName, | |||||
Source:sessionStorage.client, | |||||
} | |||||
fetchApi('operation/record',params) | |||||
sessionStorage.clear(); | sessionStorage.clear(); | ||||
} | |||||
} | |||||
}, | |||||
}; |
@@ -1,6 +1,6 @@ | |||||
<template> | <template> | ||||
<div class="new-proj"> | <div class="new-proj"> | ||||
<TopHeader | |||||
<TopHeader class="new-proj-header" | |||||
theme="basis" | theme="basis" | ||||
showBackBtn | showBackBtn | ||||
backBtnTitle="完成项目编辑" | backBtnTitle="完成项目编辑" | ||||
@@ -403,8 +403,8 @@ export default { | |||||
<style lang="scss" scoped> | <style lang="scss" scoped> | ||||
.header{ | .header{ | ||||
box-shadow: none; | |||||
} | |||||
box-shadow: none; | |||||
} | |||||
.proj_manage{ | .proj_manage{ | ||||
width: 100%; | width: 100%; | ||||
@@ -15,6 +15,9 @@ | |||||
style="width:100%;height:98%;width:calc(100vw);height:calc(100vh);position: absolute;top:0" | style="width:100%;height:98%;width:calc(100vw);height:calc(100vh);position: absolute;top:0" | ||||
class="login_bg" | class="login_bg" | ||||
></iframe> | ></iframe> | ||||
<div class="header-wrap"> | |||||
<app-header theme="black" :isShowLeftState="false"/> | |||||
</div> | |||||
<div class="LoginTitleWel"> | <div class="LoginTitleWel"> | ||||
<div class="logintitlefirst"> | <div class="logintitlefirst"> | ||||
<span>欢迎使用</span> | <span>欢迎使用</span> | ||||
@@ -228,14 +231,21 @@ | |||||
width: 5px; | width: 5px; | ||||
} | } | ||||
</style> | </style> | ||||
<style scoped> | |||||
.header-wrap { | |||||
width: 100vh; | |||||
} | |||||
</style> | |||||
<script> | <script> | ||||
import BtnSmsCode from "@/components/BtnSmsCode/BtnSmsCode.vue"; | import BtnSmsCode from "@/components/BtnSmsCode/BtnSmsCode.vue"; | ||||
import system from '@/services/system'; | import system from '@/services/system'; | ||||
import AppHeader from '@/components/app-header/app-header.vue'; | |||||
// import { platform, PLATFORM_TYPE } from "@/utils/access"; | // import { platform, PLATFORM_TYPE } from "@/utils/access"; | ||||
export default { | export default { | ||||
components: { | components: { | ||||
BtnSmsCode, | BtnSmsCode, | ||||
AppHeader, | |||||
}, | }, | ||||
data() { | data() { | ||||
return { | return { | ||||
@@ -110,7 +110,7 @@ | |||||
<i | <i | ||||
class="gray-icon icon font_family " | class="gray-icon icon font_family " | ||||
title="文件已经被修改 点击进行文件更新" | title="文件已经被修改 点击进行文件更新" | ||||
@click="commitFile(file)" | |||||
@click.stop="commitFile" | |||||
/> | /> | ||||
</div> | </div> | ||||
<!-- 蓝色更新图标 协同文件列表中当本地文件和云端文件不同时 出现 --> | <!-- 蓝色更新图标 协同文件列表中当本地文件和云端文件不同时 出现 --> | ||||
@@ -145,11 +145,21 @@ | |||||
:style="{ top: fileRightMenuTop + 'px', left: fileRightMenuLeft + 'px'}" | :style="{ top: fileRightMenuTop + 'px', left: fileRightMenuLeft + 'px'}" | ||||
> | > | ||||
<ul class="rightMenu fileRightMenu"> | <ul class="rightMenu fileRightMenu"> | ||||
<li v-if="fileInLocal && isClient && !otherUserIsWorking" @click.stop="openfileBtnClick">打开</li> | |||||
<li v-else-if="!fileInLocal && isClient" class="function-disabled" title="请先下载文件再打开">打开</li> | |||||
<li v-else-if="fileInLocal && isClient && otherUserIsWorking" class="function-disabled" title="文件工作中无法打开">打开</li> | |||||
<li v-if="fileInLocal && isClient && !otherUserIsWorking" @click.stop="openFileWith">打开方式</li> | |||||
<!-- 工作文件打开 --> | |||||
<li v-if="fileInLocal && isClient && !otherUserIsWorking && isInWorkFolder" @click.stop="openfileBtnClick">打开</li> | |||||
<!-- 工作文件 他人正在工作的话就无法打开 --> | |||||
<li v-else-if="fileInLocal && isClient && otherUserIsWorking && isInWorkFolder" class="function-disabled" title="文件工作中无法打开">打开</li> | |||||
<!-- 协作文件打开 协作文件打开和打开方式不受他人是否工作中的影响--> | |||||
<li v-if="fileInLocal && isClient && !isInWorkFolder" @click.stop="openfileBtnClick">打开</li> | |||||
<li v-if="!fileInLocal && isClient" class="function-disabled" title="请先下载文件再打开">打开</li> | |||||
<!-- 工作文件打开方式 --> | |||||
<li v-if="fileInLocal && isClient && !otherUserIsWorking && isInWorkFolder" @click.stop="openFileWith">打开方式</li> | |||||
<!-- 协作文件打开方式 --> | |||||
<li v-if="fileInLocal && isClient && !isInWorkFolder" @click.stop="openFileWith">打开方式</li> | |||||
<li v-else-if="(!fileInLocal || otherUserIsWorking) && isClient" class="function-disabled">打开方式</li> | <li v-else-if="(!fileInLocal || otherUserIsWorking) && isClient" class="function-disabled">打开方式</li> | ||||
<li v-if="isClient && isInWorkFolder" @click.stop="copyFileBtnClick">创建文件副本</li> | <li v-if="isClient && isInWorkFolder" @click.stop="copyFileBtnClick">创建文件副本</li> | ||||
<li v-if="isClient && isInWorkFolder && !otherUserIsWorking" @click.stop="deleteFileClick">移动到回收站</li> | <li v-if="isClient && isInWorkFolder && !otherUserIsWorking" @click.stop="deleteFileClick">移动到回收站</li> | ||||
<li v-if="isClient && isInWorkFolder && otherUserIsWorking" class="function-disabled" title="文件工作中无法删除">移动到回收站</li> | <li v-if="isClient && isInWorkFolder && otherUserIsWorking" class="function-disabled" title="文件工作中无法删除">移动到回收站</li> | ||||
@@ -256,7 +266,6 @@ export default { | |||||
type: Object, | type: Object, | ||||
default: () => ({}), | default: () => ({}), | ||||
}, | }, | ||||
commitFile: Function, | |||||
showFileMilestone: Function, | showFileMilestone: Function, | ||||
localFileHashMap: { | localFileHashMap: { | ||||
type: Object, | type: Object, | ||||
@@ -347,6 +356,9 @@ export default { | |||||
} | } | ||||
}, | }, | ||||
methods: { | methods: { | ||||
commitFile() { | |||||
this.$emit('commitFile'); | |||||
}, | |||||
oneOf, | oneOf, | ||||
// 打开方式 | // 打开方式 | ||||
openFileWith() { | openFileWith() { | ||||
@@ -217,6 +217,7 @@ | |||||
</div> | </div> | ||||
</div> --> | </div> --> | ||||
<div class="has-prev-node"></div> | |||||
<div class="worklinkBtngroup use-flex2 set-transition" :style="setTranslate"> | <div class="worklinkBtngroup use-flex2 set-transition" :style="setTranslate"> | ||||
<template v-for="(currFolder, index) in listUserFolders"> | <template v-for="(currFolder, index) in listUserFolders"> | ||||
<button ref="nowFolderEl" | <button ref="nowFolderEl" | ||||
@@ -241,6 +242,7 @@ | |||||
</button> | </button> | ||||
</template> | </template> | ||||
</div> | </div> | ||||
<div class="has-next-node"></div> | |||||
<!-- <i | <!-- <i | ||||
class="icon font_family icon-icon_shezhi-jihuo rota90 workbtn workderct" | class="icon font_family icon-icon_shezhi-jihuo rota90 workbtn workderct" | ||||
v-show="!isShowworklink" | v-show="!isShowworklink" | ||||
@@ -298,10 +300,6 @@ export default { | |||||
const x1 = this.nowFolderEl.offsetLeft; | const x1 = this.nowFolderEl.offsetLeft; | ||||
const x2 = this.allFolderWrapEl.clientWidth/2 - this.nowFolderEl.clientWidth/2; | const x2 = this.allFolderWrapEl.clientWidth/2 - this.nowFolderEl.clientWidth/2; | ||||
this.moveX = x1-x2; | this.moveX = x1-x2; | ||||
console.log('x1', x1); | |||||
console.log('allWidth', this.allFolderWrapEl.clientWidth); | |||||
console.log('nowFolderEl', this.nowFolderEl.clientWidth); | |||||
console.log('moveX', this.moveX); | |||||
} | } | ||||
}, | }, | ||||
mounted() { | mounted() { | ||||
@@ -518,7 +516,16 @@ export default { | |||||
.set-transition { | .set-transition { | ||||
transition: transform .5s ease; | transition: transform .5s ease; | ||||
} | } | ||||
.workline-wrap { | |||||
background-color: #F0F0F0; | |||||
} | |||||
// .has-next-node, .has-prev-node { | |||||
// width: 16px; | |||||
// height: 16px; | |||||
// border-radius: 4px; | |||||
// background-color: rgba(250, 250, 250, 1); | |||||
// margin: 0 8px; | |||||
// } | |||||
// 最多显示7个字符 多余的用省略号表示 | // 最多显示7个字符 多余的用省略号表示 | ||||
.now-folder-text { | .now-folder-text { | ||||
max-width: 157px; | max-width: 157px; | ||||
@@ -3,10 +3,9 @@ | |||||
<app-header | <app-header | ||||
backBtnTitle="退出" | backBtnTitle="退出" | ||||
:title="showTitle" | :title="showTitle" | ||||
:isShowTopBar="true" | |||||
:isWorkspaceTopBar="true" | |||||
:showUserCenter="true" | :showUserCenter="true" | ||||
class="app-header-style" | |||||
:class="{'set-bg': isShowSearchPage}" | |||||
class="app-header-style workspace-header" | |||||
v-if="!showWorkline" | v-if="!showWorkline" | ||||
> | > | ||||
<!-- <template #center> | <!-- <template #center> | ||||
@@ -26,7 +25,7 @@ | |||||
<template #center> | <template #center> | ||||
<!-- 工作链 --> | <!-- 工作链 --> | ||||
<WorkLine class="my-workline" | <WorkLine class="my-workline" | ||||
:class="{'adjust-workline-pos': isClient}" | |||||
:class="{'adjust-workline-pos-client': isClient, 'adjust-workline-pos-web': !isClient}" | |||||
:isShowlink="showWorkline" | :isShowlink="showWorkline" | ||||
:listUserFolders="nodeFolders" | :listUserFolders="nodeFolders" | ||||
:nowFolderIndex="nowFolderIndex" | :nowFolderIndex="nowFolderIndex" | ||||
@@ -55,6 +54,7 @@ | |||||
<div class="out-wrap"> | <div class="out-wrap"> | ||||
<div class="search-res-page-wrap"> | <div class="search-res-page-wrap"> | ||||
<div class="list-group" v-if="currentBtnIndex == 0"> | <div class="list-group" v-if="currentBtnIndex == 0"> | ||||
<!-- 工作文件 --> | |||||
<FileItem | <FileItem | ||||
class="lisy-group-item" | class="lisy-group-item" | ||||
v-for="file in searchWorkFileList" | v-for="file in searchWorkFileList" | ||||
@@ -64,7 +64,7 @@ | |||||
:showFileMilestone="showFileMilestone" | :showFileMilestone="showFileMilestone" | ||||
:nodeFolder="currentNodeFolder" | :nodeFolder="currentNodeFolder" | ||||
:currentFolder="currentFolder" | :currentFolder="currentFolder" | ||||
:commitFile="commitFile" | |||||
@commitFile="commitFile(file)" | |||||
@dblclickFile="fileClick(file)" | @dblclickFile="fileClick(file)" | ||||
@filePreview="filePreview" | @filePreview="filePreview" | ||||
@openFileWith="openFileWith(file)" | @openFileWith="openFileWith(file)" | ||||
@@ -81,6 +81,7 @@ | |||||
<div class="no-file-tips" v-if="searchWorkFileList && searchWorkFileList.length == 0">搜索不到与“{{searchContent}}”相关的文件</div> | <div class="no-file-tips" v-if="searchWorkFileList && searchWorkFileList.length == 0">搜索不到与“{{searchContent}}”相关的文件</div> | ||||
</div> | </div> | ||||
<div class="list-group" v-else-if="currentBtnIndex == 1"> | <div class="list-group" v-else-if="currentBtnIndex == 1"> | ||||
<!-- 协作文件 --> | |||||
<FileItem | <FileItem | ||||
v-for="file in searchCoopFileList" | v-for="file in searchCoopFileList" | ||||
:key="file.id" | :key="file.id" | ||||
@@ -130,7 +131,7 @@ | |||||
class="section_item section_item_aside_fl" | class="section_item section_item_aside_fl" | ||||
> | > | ||||
<span | <span | ||||
class="yiyun_text-title-workspace ml-4" | |||||
class="yiyun_text-title-workspace ml-4-mt-20" | |||||
> | > | ||||
<el-breadcrumb class="folder_breadcrumb" separator-class="el-icon-arrow-right"> | <el-breadcrumb class="folder_breadcrumb" separator-class="el-icon-arrow-right"> | ||||
<el-breadcrumb-item @click.native="clickBreadcrumb(-1, 0)">工作文件</el-breadcrumb-item> | <el-breadcrumb-item @click.native="clickBreadcrumb(-1, 0)">工作文件</el-breadcrumb-item> | ||||
@@ -179,7 +180,7 @@ | |||||
:showFileMilestone="showFileMilestone" | :showFileMilestone="showFileMilestone" | ||||
:nodeFolder="currentNodeFolder" | :nodeFolder="currentNodeFolder" | ||||
:currentFolder="currentFolder" | :currentFolder="currentFolder" | ||||
:commitFile="commitFile" | |||||
@commitFile="commitFile(file)" | |||||
@dblclickFile="fileClick(file)" | @dblclickFile="fileClick(file)" | ||||
@filePreview="filePreview" | @filePreview="filePreview" | ||||
@openFileWith="openFileWith(file)" | @openFileWith="openFileWith(file)" | ||||
@@ -629,7 +630,7 @@ export default { | |||||
exchangeNodeListsInCoop: [],//存储与当前节点具有交换关系的节点列表 | exchangeNodeListsInCoop: [],//存储与当前节点具有交换关系的节点列表 | ||||
reverseLocalFileHashMap: {},//键名是 ipfscid 键值是localFileHashMap的键名 | reverseLocalFileHashMap: {},//键名是 ipfscid 键值是localFileHashMap的键名 | ||||
currentBtnIndex: 0,//0 是工作文件按钮 1是协作文件按钮 | |||||
currentBtnIndex: -1,//0 是工作文件按钮 1是协作文件按钮 | |||||
titleList: ['工作文件', '协作文件'], | titleList: ['工作文件', '协作文件'], | ||||
isShowSearchBar: false,//控制搜索框显示隐藏 | isShowSearchBar: false,//控制搜索框显示隐藏 | ||||
searchContent: '',//搜索的文件名称 | searchContent: '',//搜索的文件名称 | ||||
@@ -1527,7 +1528,7 @@ export default { | |||||
/** | /** | ||||
* 提交本地文件 | * 提交本地文件 | ||||
*/ | */ | ||||
async commitFile(file) { | |||||
async commitFile(file) { | |||||
if(!this.isClient) return; | if(!this.isClient) return; | ||||
const { folderName, levelId, id: folderId } = this.currentNodeFolder; | const { folderName, levelId, id: folderId } = this.currentNodeFolder; | ||||
const { archName, extension, id: fileId, relativePath } = file; | const { archName, extension, id: fileId, relativePath } = file; | ||||
@@ -1551,6 +1552,10 @@ export default { | |||||
this.addLocalFileRecord(fileStoreKey, IpfsCid); | this.addLocalFileRecord(fileStoreKey, IpfsCid); | ||||
this.removeFileLoadingState(fileId); | this.removeFileLoadingState(fileId); | ||||
this.workFileList = this.workFileList.map(iFile => iFile.id === file.id ? { ...iFile, ipfsCid: IpfsCid, workStatus: NOT_WORKING } : iFile); | this.workFileList = this.workFileList.map(iFile => iFile.id === file.id ? { ...iFile, ipfsCid: IpfsCid, workStatus: NOT_WORKING } : iFile); | ||||
// 同步搜索栏中展示的工作文件状态 | |||||
if(this.currentBtnIndex == 0 && this.isShowSearchPage) { | |||||
this.searchWorkFileList = this.searchWorkFileList.map(iFile => iFile.id === file.id ? { ...iFile, ipfsCid: IpfsCid, workStatus: NOT_WORKING } : iFile); | |||||
} | |||||
}, | }, | ||||
(progressData) => { | (progressData) => { | ||||
const { process, hash, size, currentSize, currentUnit, unit } = progressData; | const { process, hash, size, currentSize, currentUnit, unit } = progressData; | ||||
@@ -1577,7 +1582,7 @@ export default { | |||||
// 若文件在协作文件中,则不更改状态 | // 若文件在协作文件中,则不更改状态 | ||||
const { archName, extension, id: fileId, nodeName } = file; | const { archName, extension, id: fileId, nodeName } = file; | ||||
const isCooperationFile = !!nodeName; | const isCooperationFile = !!nodeName; | ||||
if(isCooperationFile) { system.openFile(filePath); return; } | |||||
if(isCooperationFile) { system.clientOpenFileWith(filePath); return; } | |||||
// 将文件状态设置为编辑中 | // 将文件状态设置为编辑中 | ||||
const flagRes = await services.changeFileWorkStatus(fileId, 2); | const flagRes = await services.changeFileWorkStatus(fileId, 2); | ||||
if(flagRes.Code !== 0) return; | if(flagRes.Code !== 0) return; | ||||
@@ -1750,6 +1755,11 @@ export default { | |||||
} | } | ||||
}, | }, | ||||
watch: { | watch: { | ||||
isShowSearchBar(val) { | |||||
if(!val) { | |||||
this.currentBtnIndex = -1;//防止下次搜索还没有出入文字 闪烁上次的结果 | |||||
} | |||||
}, | |||||
searchContent() { | searchContent() { | ||||
this.searchForFile(); | this.searchForFile(); | ||||
}, | }, | ||||
@@ -1802,7 +1812,9 @@ export default { | |||||
position: relative; | position: relative; | ||||
top: 2px; | top: 2px; | ||||
} | } | ||||
.app-header-style { | |||||
background-color: #f0f0f0; | |||||
} | |||||
.app-header-style .app-header-content-right { | .app-header-style .app-header-content-right { | ||||
display: flex; | display: flex; | ||||
} | } | ||||
@@ -1980,8 +1992,15 @@ export default { | |||||
text-align: center; | text-align: center; | ||||
} | } | ||||
.adjust-workline-pos { | |||||
.adjust-workline-pos-client { | |||||
position: relative; | position: relative; | ||||
top: -12px; | top: -12px; | ||||
} | } | ||||
.adjust-workline-pos-web { | |||||
position: relative; | |||||
top: -10px; | |||||
} | |||||
.ml-4-mt-20 { | |||||
margin: 20px 0 0 4px; | |||||
} | |||||
</style> | </style> |
@@ -119,6 +119,12 @@ export default { | |||||
}) | }) | ||||
return; | return; | ||||
} | } | ||||
// 如果是客户端的话 要判断一下当前的窗口是否是最大化状态 | |||||
if(system.isClient) { | |||||
const isMaxWindowNow = await system.isMaxWindowNow(); | |||||
this.$cookie.set('isMaxWindowNow', isMaxWindowNow); | |||||
} | |||||
} | } | ||||
this.$store.setCurrentPlatform(platformInfo); | this.$store.setCurrentPlatform(platformInfo); | ||||