|
|
@ -2,87 +2,54 @@ |
|
|
|
<div class="container"> |
|
|
|
<div class="nav"> |
|
|
|
<ul> |
|
|
|
<li |
|
|
|
v-for="(item, index) in items" |
|
|
|
:key="index" |
|
|
|
@click="selectItem(index)" |
|
|
|
:class="{ active: index === activeIndex }" |
|
|
|
> |
|
|
|
<li v-for="(item, index) in items" :key="index" @click="selectItem(index)" |
|
|
|
:class="{ active: index === activeIndex }"> |
|
|
|
{{ item }} |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
<div class="setting"> |
|
|
|
<div v-if="1 === activeIndex"> |
|
|
|
<div |
|
|
|
class="setting-item" |
|
|
|
style="margin-top: 60px" |
|
|
|
> |
|
|
|
<div class="setting-item" style="margin-top: 60px"> |
|
|
|
<label>存储方式</label> |
|
|
|
<el-select v-model="config.storeType"> |
|
|
|
<el-option |
|
|
|
v-for="(item, key) in storeList" |
|
|
|
:key="key" |
|
|
|
:label="item.title" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
<el-option v-for="(item, key) in storeList" :key="key" :label="item.title" |
|
|
|
:value="item.value" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<template v-if="config.storeType === 'local'"> |
|
|
|
<div class="setting-item"> |
|
|
|
<label>存储地址</label> |
|
|
|
<el-input |
|
|
|
v-model="config.storePath" |
|
|
|
@click="selectFile()" |
|
|
|
placeholder="可为空,为空则取系统默认存储地址:/用户目录/.godoos/os" |
|
|
|
/> |
|
|
|
<el-input v-model="config.storePath" @click="selectFile()" |
|
|
|
placeholder="可为空,为空则取系统默认存储地址:/用户目录/.godoos/os" /> |
|
|
|
</div> |
|
|
|
<div class="setting-item"> |
|
|
|
<label>自定义端口</label> |
|
|
|
<el-input |
|
|
|
v-model="config.netPort" |
|
|
|
placeholder="可为空,为空则取系统默认56780" |
|
|
|
/> |
|
|
|
<el-input v-model="config.netPort" placeholder="可为空,为空则取系统默认56780" /> |
|
|
|
</div> |
|
|
|
<div class="setting-item"> |
|
|
|
<label>自定义路径</label> |
|
|
|
<el-input |
|
|
|
v-model="config.netPath" |
|
|
|
placeholder="自定义web访问路径,英文,不要加斜杠,可为空" |
|
|
|
/> |
|
|
|
<el-input v-model="config.netPath" placeholder="自定义web访问路径,英文,不要加斜杠,可为空" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<template v-if="config.storeType === 'net'"> |
|
|
|
<div class="setting-item"> |
|
|
|
<label>服务器地址</label> |
|
|
|
<el-input |
|
|
|
v-model="config.storenet.url" |
|
|
|
placeholder="可访问的地址,例如http://192.168.1.6:56780 不要加斜杠" |
|
|
|
/> |
|
|
|
<el-input v-model="config.storenet.url" placeholder="可访问的地址,例如http://192.168.1.6:56780 不要加斜杠" /> |
|
|
|
</div> |
|
|
|
<div class="setting-item"> |
|
|
|
<label>允许跨域</label> |
|
|
|
<el-switch |
|
|
|
v-model="config.storenet.isCors" |
|
|
|
active-text="允许" |
|
|
|
inactive-text="不允许" |
|
|
|
style=" |
|
|
|
<el-switch v-model="config.storenet.isCors" active-text="允许" inactive-text="不允许" style=" |
|
|
|
--el-switch-on-color: #13ce66; |
|
|
|
--el-switch-off-color: #ff4949; |
|
|
|
" |
|
|
|
active-value="1" |
|
|
|
inactive-value="" |
|
|
|
/> |
|
|
|
" active-value="1" inactive-value="" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template v-if="config.storeType === 'webdav'"> |
|
|
|
<div class="setting-item"> |
|
|
|
<label>服务器地址</label> |
|
|
|
<el-input |
|
|
|
v-model="config.webdavClient.url" |
|
|
|
placeholder="https://godoos.com/webdav 不要加斜杠" |
|
|
|
/> |
|
|
|
<el-input v-model="config.webdavClient.url" placeholder="https://godoos.com/webdav 不要加斜杠" /> |
|
|
|
</div> |
|
|
|
<div class="setting-item"> |
|
|
|
<label>登陆用户名</label> |
|
|
@ -90,46 +57,30 @@ |
|
|
|
</div> |
|
|
|
<div class="setting-item"> |
|
|
|
<label>登陆密码</label> |
|
|
|
<el-input |
|
|
|
v-model="config.webdavClient.password" |
|
|
|
type="password" |
|
|
|
/> |
|
|
|
<el-input v-model="config.webdavClient.password" type="password" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<div class="setting-item"> |
|
|
|
<label></label> |
|
|
|
<el-button |
|
|
|
@click="submitOsInfo" |
|
|
|
type="primary" |
|
|
|
> |
|
|
|
<el-button @click="submitOsInfo" type="primary"> |
|
|
|
{{ t("confirm") }} |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-if="2 === activeIndex"> |
|
|
|
<div |
|
|
|
class="setting-item" |
|
|
|
style="margin-top: 60px" |
|
|
|
> |
|
|
|
<div class="setting-item" style="margin-top: 60px"> |
|
|
|
<label>编辑器类型</label> |
|
|
|
<el-select v-model="config.editorType"> |
|
|
|
<el-option |
|
|
|
v-for="(item, key) in editorType" |
|
|
|
:key="key" |
|
|
|
:label="item.title" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
<el-option v-for="(item, key) in editorType" :key="key" :label="item.title" |
|
|
|
:value="item.value" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<template v-if="config.editorType === 'onlyoffice'"> |
|
|
|
<div class="setting-item"> |
|
|
|
<label>地址</label> |
|
|
|
<el-input |
|
|
|
v-model="config.onlyoffice.url" |
|
|
|
placeholder="https://godoos.com/onlyoffice 不要加斜杠" |
|
|
|
/> |
|
|
|
<el-input v-model="config.onlyoffice.url" placeholder="https://godoos.com/onlyoffice 不要加斜杠" /> |
|
|
|
</div> |
|
|
|
<!-- <div class="setting-item"> |
|
|
|
<label>私钥</label> |
|
|
@ -138,10 +89,7 @@ |
|
|
|
</template> |
|
|
|
<div class="setting-item"> |
|
|
|
<label></label> |
|
|
|
<el-button |
|
|
|
@click="submitEditInfo" |
|
|
|
type="primary" |
|
|
|
> |
|
|
|
<el-button @click="submitEditInfo" type="primary"> |
|
|
|
{{ t("confirm") }} |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
@ -152,10 +100,7 @@ |
|
|
|
</div> |
|
|
|
<div class="setting-item"> |
|
|
|
<label></label> |
|
|
|
<el-button |
|
|
|
@click="exportBackup" |
|
|
|
type="primary" |
|
|
|
> |
|
|
|
<el-button @click="exportBackup" type="primary"> |
|
|
|
导出 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
@ -164,73 +109,42 @@ |
|
|
|
</div> |
|
|
|
<div class="setting-item"> |
|
|
|
<label></label> |
|
|
|
<el-button |
|
|
|
@click="selectZipfile" |
|
|
|
type="primary" |
|
|
|
> |
|
|
|
<el-button @click="selectZipfile" type="primary"> |
|
|
|
导入 |
|
|
|
</el-button> |
|
|
|
<input |
|
|
|
type="file" |
|
|
|
accept=".zip" |
|
|
|
style="display: none" |
|
|
|
ref="zipFileInput" |
|
|
|
/> |
|
|
|
<input type="file" accept=".zip" style="display: none" ref="zipFileInput" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-if="0 === activeIndex"> |
|
|
|
<div |
|
|
|
class="setting-item" |
|
|
|
style="margin-top: 60px" |
|
|
|
> |
|
|
|
<div class="setting-item" style="margin-top: 60px"> |
|
|
|
<label>用户角色</label> |
|
|
|
<el-select v-model="config.userType"> |
|
|
|
<el-option |
|
|
|
v-for="(item, key) in userTypes" |
|
|
|
:key="key" |
|
|
|
:label="item.title" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
<el-option v-for="(item, key) in userTypes" :key="key" :label="item.title" |
|
|
|
:value="item.value" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<template v-if="config.userType === 'member'"> |
|
|
|
<div class="setting-item"> |
|
|
|
<label>服务器地址</label> |
|
|
|
<el-input |
|
|
|
v-model="config.userInfo.url" |
|
|
|
placeholder="网址或域名,例子:https://godoos.com 不要加斜杠" |
|
|
|
/> |
|
|
|
<el-input v-model="config.userInfo.url" placeholder="网址或域名,例子:https://godoos.com 不要加斜杠" /> |
|
|
|
</div> |
|
|
|
<div class="setting-item"> |
|
|
|
<label>用户名</label> |
|
|
|
<el-input |
|
|
|
v-model="config.userInfo.username" |
|
|
|
placeholder="登录用户名" |
|
|
|
/> |
|
|
|
<el-input v-model="config.userInfo.username" placeholder="登录用户名" /> |
|
|
|
</div> |
|
|
|
<div class="setting-item"> |
|
|
|
<label>密码</label> |
|
|
|
<el-input |
|
|
|
v-model="config.userInfo.password" |
|
|
|
type="password" |
|
|
|
placeholder="登录密码" |
|
|
|
/> |
|
|
|
<el-input v-model="config.userInfo.password" type="password" placeholder="登录密码" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<div class="setting-item"> |
|
|
|
<label></label> |
|
|
|
<el-button |
|
|
|
@click="saveUserInfo" |
|
|
|
type="primary" |
|
|
|
> |
|
|
|
<el-button @click="saveUserInfo" type="primary"> |
|
|
|
{{ t("confirm") }} |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
v-if="4 === activeIndex" |
|
|
|
class="setting-area" |
|
|
|
> |
|
|
|
<div v-if="4 === activeIndex" class="setting-area"> |
|
|
|
<SetFilePwd v-if="config.userType === 'person'"></SetFilePwd> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -277,6 +191,9 @@ |
|
|
|
"备份还原", |
|
|
|
"文件密码箱", |
|
|
|
]; |
|
|
|
if (config.value.userType !== "person") { |
|
|
|
items.pop() |
|
|
|
} |
|
|
|
const editorType = [ |
|
|
|
{ |
|
|
|
title: "系统默认", |
|
|
|