mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-25 14:34:46 +00:00
@@ -12,7 +12,7 @@
|
||||
<el-link :href="announcement.link" target="_blank" class="link-more">
|
||||
{{ $t('common.ViewMore') }}
|
||||
</el-link>
|
||||
<i class="fa fa-share-square-o" />
|
||||
<i class="fa fa-external-link" />
|
||||
</span>
|
||||
</el-alert>
|
||||
</template>
|
||||
|
||||
@@ -84,7 +84,9 @@ export default {
|
||||
extraQuery: this.extraQuery
|
||||
})
|
||||
const formatterArgs = {
|
||||
'columnsMeta.actions.formatterArgs.canUpdate': 'change',
|
||||
'columnsMeta.actions.formatterArgs.canUpdate': () => {
|
||||
return this.hasActionPerm('change') && !this.currentOrgIsRoot
|
||||
},
|
||||
'columnsMeta.actions.formatterArgs.canDelete': 'delete',
|
||||
'columnsMeta.actions.formatterArgs.canClone': () => {
|
||||
return this.hasActionPerm('add') && !this.currentOrgIsRoot
|
||||
@@ -96,11 +98,8 @@ export default {
|
||||
const notSet = _.get(config, arg) === undefined
|
||||
const isFunction = typeof action === 'function'
|
||||
if (notSet) {
|
||||
if (isFunction) {
|
||||
_.set(config, arg, action())
|
||||
} else {
|
||||
_.set(config, arg, this.hasActionPerm(action))
|
||||
}
|
||||
const hasActionPerm = isFunction ? action() : this.hasActionPerm(action)
|
||||
_.set(config, arg, hasActionPerm)
|
||||
}
|
||||
}
|
||||
this.$log.debug('Header actions', this.headerActions)
|
||||
|
||||
@@ -124,6 +124,7 @@ export default {
|
||||
// 获取url中的查询条件,判断是不是包含在当前查询条件里
|
||||
checkInTableColumns() {
|
||||
const searchFieldOptions = {}
|
||||
const queryInfoValues = this.options.map((i) => i.value)
|
||||
const routeQuery = this.getUrlQuery ? this.$route?.query : {}
|
||||
const routeQueryKeysLength = Object.keys(routeQuery).length
|
||||
if (routeQueryKeysLength < 1) return searchFieldOptions
|
||||
@@ -141,7 +142,9 @@ export default {
|
||||
continue
|
||||
}
|
||||
|
||||
searchFieldOptions[key] = this.getInQueryInfoFields(key, value)
|
||||
if (queryInfoValues.includes(key)) {
|
||||
searchFieldOptions[key] = this.getInQueryInfoFields(key, value)
|
||||
}
|
||||
}
|
||||
return searchFieldOptions
|
||||
},
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div style="line-height: 34px;text-align: center">{{ Label }}</div>
|
||||
</el-col>
|
||||
<el-col :md="14" :sm="24">
|
||||
<el-input v-model="SecretKey" />
|
||||
<el-input v-model="SecretKey" :show-password="showPassword" />
|
||||
<span class="help-tips help-block">{{ HelpText }}</span>
|
||||
</el-col>
|
||||
<el-col :md="4" :sm="24">
|
||||
@@ -42,6 +42,15 @@ export default {
|
||||
visible: false
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
showPassword() {
|
||||
if (this.ConfirmType === 'password') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
visible(val) {
|
||||
if (!val) {
|
||||
|
||||
@@ -250,6 +250,7 @@
|
||||
},
|
||||
"common": {
|
||||
"ChangeViewHelpText": "Click to change view",
|
||||
"Component": "component",
|
||||
"PrivateCloud": "Private cloud",
|
||||
"PublicCloud": "Public cloud",
|
||||
"Correlation": "Correlation",
|
||||
@@ -434,7 +435,8 @@
|
||||
"Help": "Help",
|
||||
"Logout": "Logout",
|
||||
"Profile": "Profile",
|
||||
"Support": "Support",
|
||||
"TechnicalSupport": "Technical support",
|
||||
"ToolsDownload": "Tools download",
|
||||
"UserPage": "User page",
|
||||
"View": "View",
|
||||
"EnterpriseEdition": "Enterprise edition"
|
||||
|
||||
@@ -255,6 +255,7 @@
|
||||
},
|
||||
"common": {
|
||||
"ChangeViewHelpText": "クリックしてさまざまなビューにアクセス",
|
||||
"Component": "コンポーネント",
|
||||
"PrivateCloud": "プライベートクラウド",
|
||||
"PublicCloud": "パブリッククラウド",
|
||||
"Correlation": "関連",
|
||||
@@ -446,7 +447,8 @@
|
||||
"Help": "ヘルプ",
|
||||
"Logout": "ログインを終了する",
|
||||
"Profile": "個人情報",
|
||||
"Support": "サポート",
|
||||
"TechnicalSupport": "テクニカルサポート",
|
||||
"ToolsDownload": "ツールのダウンロード",
|
||||
"UserPage": "ユーザービュー",
|
||||
"View": "ビュー",
|
||||
"EnterpriseEdition": "企業版"
|
||||
|
||||
@@ -447,7 +447,8 @@
|
||||
"Help": "帮助",
|
||||
"Logout": "退出登录",
|
||||
"Profile": "个人信息",
|
||||
"Support": "支持",
|
||||
"TechnicalSupport": "技术支持",
|
||||
"ToolsDownload": "工具下载",
|
||||
"UserPage": "用户视图",
|
||||
"View": "视图",
|
||||
"EnterpriseEdition": "企业版"
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="docs">{{ $t('common.nav.Docs') }}</el-dropdown-item>
|
||||
<el-dropdown-item command="support">{{ $t('common.nav.Support') }}</el-dropdown-item>
|
||||
<el-dropdown-item command="support">{{ $t('common.nav.TechnicalSupport') }}</el-dropdown-item>
|
||||
<el-dropdown-item command="toolsDownload">{{ $t('common.nav.ToolsDownload') }}</el-dropdown-item>
|
||||
<el-dropdown-item v-if="!hasLicence" command="enterprise">{{ $t('common.nav.EnterpriseEdition') }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
@@ -43,6 +44,9 @@ export default {
|
||||
case 'enterprise':
|
||||
window.open('https://jumpserver.org/enterprise.html', '_blank')
|
||||
break
|
||||
case 'toolsDownload':
|
||||
window.open('/core/download/', '_blank')
|
||||
break
|
||||
default:
|
||||
window.open(this.URLSite.HELP_DOCUMENT_URL, '_blank')
|
||||
break
|
||||
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
},
|
||||
actions: {
|
||||
formatterArgs: {
|
||||
canClone: vm.$hasPerm('assets.add_platform'),
|
||||
canClone: () => vm.$hasPerm('assets.add_platform'),
|
||||
canUpdate: ({ row }) => !row.internal && vm.$hasPerm('assets.change_platform'),
|
||||
canDelete: ({ row }) => !row.internal && vm.$hasPerm('assets.delete_platform')
|
||||
}
|
||||
@@ -34,7 +34,10 @@ export default {
|
||||
hasRightActions: true,
|
||||
hasMoreActions: false,
|
||||
hasBulkDelete: false,
|
||||
createRoute: 'PlatformCreate'
|
||||
createRoute: 'PlatformCreate',
|
||||
canCreate: () => {
|
||||
return this.$hasPerm('assets.add_platform')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
<template>
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="title">
|
||||
<span>{{ $t('common.Announcement') }}</span>
|
||||
</div>
|
||||
<ul class="content">
|
||||
<li v-if="announcement.content" class="item">
|
||||
<p class="item-title">【{{ announcement.subject }}】</p>
|
||||
<p class="item-content">{{ announcement.content }}</p>
|
||||
<span v-if="announcement.link">
|
||||
<el-link :href="announcement.link" target="_blank" class="item-url">
|
||||
{{ $t('common.ViewMore') }}
|
||||
</el-link>
|
||||
<i class="fa fa-share-square-o icon-url" />
|
||||
</span>
|
||||
</li>
|
||||
<li v-else class="other">{{ $t('common.noAnnouncement') }}</li>
|
||||
</ul>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Announcement',
|
||||
data() {
|
||||
return {
|
||||
content: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'publicSettings'
|
||||
]),
|
||||
announcement() {
|
||||
const ann = this.publicSettings?.ANNOUNCEMENT || {}
|
||||
return {
|
||||
id: ann?.ID,
|
||||
subject: ann?.SUBJECT || '',
|
||||
content: ann?.CONTENT || '',
|
||||
link: ann?.LINK
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
ul,li {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none
|
||||
}
|
||||
.box-card {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.title {
|
||||
font-weight: 500;
|
||||
}
|
||||
.content {
|
||||
width: 100%;
|
||||
.item {
|
||||
margin-bottom: 16px;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
.item-title {
|
||||
display: inline-block;
|
||||
color: #8b9db6;
|
||||
text-align: center;
|
||||
font-size: 15px;
|
||||
vertical-align: middle;
|
||||
margin-left: -10px;
|
||||
}
|
||||
.item-content {
|
||||
white-space: pre-wrap;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.item-url {
|
||||
color: #8b9db6!important;
|
||||
}
|
||||
.other {
|
||||
text-align: center;
|
||||
}
|
||||
.icon-url {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -65,6 +65,7 @@ export default {
|
||||
},
|
||||
need_update_password: {
|
||||
type: 'checkbox-group',
|
||||
component: null, // 覆盖默认生成的 component
|
||||
el: {
|
||||
style: 'margin-top: -20px;margin-bottom: -10px'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user