Merge branch 'v4' of github.com:jumpserver/lina into v4

This commit is contained in:
ibuler
2024-06-13 17:11:47 +08:00
18 changed files with 90 additions and 71 deletions

View File

@@ -268,7 +268,7 @@ export default {
}
// 由于在新增时有些 Select 会存在初始值,而有些没有,就会导致动态类名判断出现相反的情况
// 此处强制设置没有初始值的动态类名
if (this.iValue.length === 0) this.transformed = false
if (Array.isArray(this.iValue) && this.iValue.length === 0) this.transformed = false
this.$nextTick(() => {
// 因为elform存在问题这个来清楚验证

View File

@@ -27,21 +27,24 @@
</el-col>
<el-col :md="4" :sm="24" class="buttons">
<div class="opera">
<el-button
:disabled="disablePre"
class="el-transfer__button"
icon="el-icon-arrow-left"
size="mini"
@click="deleteData"
/>
<el-button
:disabled="disableNex"
class="el-transfer__button"
icon="el-icon-arrow-right"
size="mini"
type="primary"
@click="addData"
/>
<svg-icon v-if="transferOnCheck" class="arrow" icon-class="arrow" />
<templae v-else>
<el-button
:disabled="disablePre"
class="el-transfer__button"
icon="el-icon-arrow-left"
size="mini"
@click="deleteData"
/>
<el-button
:disabled="disableNex"
class="el-transfer__button"
icon="el-icon-arrow-right"
size="mini"
type="primary"
@click="addData"
/>
</templae>
</div>
</el-col>
<el-col :md="10" :sm="24">
@@ -422,13 +425,22 @@ export default {
.buttons {
vertical-align: middle;
}
.opera {
position: relative;
display: inline-block;
vertical-align: middle;
text-align: center;
margin: 180px 8px;
display: flex;
justify-content: center;
align-items: center;
margin-left: 10px;
width: calc(100% - 5px);
height: 415px;
.arrow {
width: 1.25em;
height: 1.25em;
color: #888888;
}
@media screen and (max-width: 992px) {
margin: 8px 8px;
text-align:start

View File

@@ -241,7 +241,7 @@ export default {
.el-col, div {
.my-card {
min-width: 330px;
height: 250px;
//height: 250px;
width: 100%;
position: relative;
margin-bottom: 20px;

View File

@@ -99,7 +99,7 @@ export default {
if (routeQuery && typeof routeQuery === 'object') {
detailRoute.query = this.formatterArgs.routeQuery
if (detailRoute.query.tab) {
detailRoute.query = detailRoute.query.tab
detailRoute.name = detailRoute.query.tab
}
}
return detailRoute

View File

@@ -12,10 +12,9 @@
@input="treeSearchHandle"
>
<span slot="suffix">
<svg-icon
class="icon"
icon-class="close"
style="font-size: 12px;"
<i
class="el-icon-close"
style="font-size: 12px; cursor: pointer"
@click="onClose"
/>
</span>
@@ -409,6 +408,11 @@ export default {
&:hover {
::v-deep .tree-action-btn {
display: inline;
&:hover {
box-shadow: none;
color: var(--color-text-primary) !important;
}
}
}
@@ -610,14 +614,25 @@ div.rMenu li {
border-radius: 4px;
background: #fafafa;
padding-right: 32px;
color: var(--color-text-primary)
}
& ::v-deep .el-input__suffix {
padding-right: 8px;
.el-input__suffix-inner:hover {
color: var(--color-text-primary);
}
}
& ::v-deep .el-input__prefix {
padding-left: 6px;
display: flex;
.el-input__icon {
display: flex;
justify-content: center;
align-items: center;
}
}
& ::v-deep .el-input__suffix-inner {

View File

@@ -10,9 +10,8 @@ import store from '@/store'
Vue.use(VueI18n)
const cookieLang = VueCookie.get('django_language')
const storeLang = VueCookie.get('lang')
const browserLang = navigator.systemLanguage || navigator.language
let lang = cookieLang || storeLang || browserLang || 'en'
const browserLang = navigator.systemLanguage || navigator.language || navigator.userLanguage
let lang = cookieLang || browserLang || 'en'
if (lang === 'zh-hant') {
lang = 'zh_hant'
} else {

1
src/icons/svg/arrow.svg Normal file
View File

@@ -0,0 +1 @@
<svg t="1718268187955" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7725" width="40" height="40"><path d="M14.278687 494.72555121L312.91147481 788.51184055l0-172.82492782L711.08852519 615.68691273 711.08852519 788.51184055 1009.721313 494.72555121 711.08852519 235.48815945l0 172.82492782-398.17705038 0 0-172.82492782-298.63278781 259.23739176z" fill="#2c2c2c" p-id="7726"></path></svg>

After

Width:  |  Height:  |  Size: 435 B

View File

@@ -2,10 +2,10 @@
<Dialog
:title="title"
:visible.sync="iVisible"
top="1vh"
:width="width"
:show-cancel="false"
:show-confirm="false"
top="1vh"
>
<GenericListTable :table-config="tableConfig" :header-actions="headerActions" />
</Dialog>
@@ -54,7 +54,3 @@ export default {
}
}
</script>
<style scoped>
</style>

View File

@@ -63,9 +63,6 @@ export default {
},
mounted() {
this.changeMomentLang()
const userLang = localStorage.getItem('lang')
document.documentElement.lang = userLang
},
methods: {
changeLang() {
@@ -86,17 +83,13 @@ export default {
},
changeLangTo(item) {
this.$i18n.locale = item.code
localStorage.setItem('lang', item.code)
this.$cookie.set(this.LANG_COOKIE_NAME, item.cookieCode)
this.$cookie.set(this.LANG_COOKIE_NAME, item.cookieCode, { expires: 365 })
window.location.reload()
},
getLangCode() {
let langCode = this.$cookie.get(this.LANG_COOKIE_NAME)
if (!langCode) {
langCode = localStorage.lang
}
if (!langCode) {
langCode = navigator.language || navigator.userLanguage
langCode = navigator.systemLanguage || navigator.language || navigator.userLanguage
}
if (langCode === 'zh-hant') {
langCode = 'zh_hant'

View File

@@ -40,7 +40,8 @@ export default {
props: {
object: {
type: Object,
default: () => {}
default: () => {
}
}
},
data() {
@@ -212,7 +213,7 @@ export default {
name: 'AssetDetail',
params: { id: this.object.asset.id }
}
return <router-link to={route} >{ value }</router-link>
return <router-link to={route}>{value?.name}</router-link>
},
su_from: (item, value) => {
return <span>{value?.name ? value?.name + `(${value?.username})` : ''}</span>

View File

@@ -206,10 +206,13 @@ export default {
}
}
}
},
watch: {
$route: {
handler(newVal) {
newVal.fullPath.includes('/console/perms/asset-permissions/') && (this.GenericListTableDialogConfig.visible = false)
}
}
}
}
</script>
<style scoped>
</style>

View File

@@ -19,7 +19,3 @@ export default {
}
}
</script>
<style>
</style>

View File

@@ -324,7 +324,3 @@ export default {
}
}
</script>
<style>
</style>

View File

@@ -8,7 +8,9 @@
</el-col>
<el-col :span="2" @click.native="handleClick($event)">
<el-dropdown>
<el-link :underline="false" type="primary"><i class="el-icon-more el-icon--right" /></el-link>
<el-link :underline="false" type="primary">
<i class="el-icon-more el-icon--right" style="color: var(--color-text-primary)" />
</el-link>
<el-dropdown-menu default="dropdown">
<el-dropdown-item v-for="action in actions" :key="action.name" @click.native="action.callback">
<i v-if="action.icon" :class="action.icon" /> {{ action.name }}
@@ -18,15 +20,15 @@
</el-col>
</el-row>
<el-divider />
<el-row :gutter="20" style="height: 80%;">
<el-row :gutter="20">
<el-col :span="6" class="image">
<el-image :src="cloudImage" fit="contain" />
</el-col>
<el-col :span="18">
<InfoPanel :content="iTask.regions.length" :title="$tc('TotalSyncRegion')" />
<InfoPanel :content="iTask.instance_count || 0" :title="$tc('TotalSyncAsset')" />
<InfoPanel :content="iTask.strategy.length" :title="$tc('TotalSyncStrategy')" />
<InfoPanel :content="toSafeLocalDateStr(object.date_created)" :title="$tc('DateJoined')" />
<!-- <InfoPanel :content="iTask.strategy.length" :title="$tc('TotalSyncStrategy')" /> -->
<!-- <InfoPanel :content="toSafeLocalDateStr(object.date_created)" :title="$tc('DateJoined')" /> -->
<InfoPanel :content="toSafeLocalDateStr(iTask.date_last_sync)" :title="$tc('DateLastSync')" />
</el-col>
</el-row>
@@ -168,11 +170,12 @@ export default {
.account-panel {
display: flex;
flex-direction: column;
height: 100%;
//height: 100%;
cursor: pointer;
& .el-row:first-of-type {
height: 30px !important;
padding: 0;
.el-col-22 {
padding-left: 0 !important;
@@ -199,6 +202,7 @@ export default {
display: flex;
align-items: center;
margin: 0 !important;
padding: 25px 0;
}
.el-divider--horizontal {

View File

@@ -8,7 +8,7 @@
:title="$tc('CloudSyncConfig')"
:visible.sync="iVisible"
v-bind="$attrs"
width="70%"
width="1051px"
v-on="$listeners"
>
<el-row style="padding: 10px">
@@ -103,6 +103,10 @@ export default {
</script>
<style scoped lang="scss">
::v-deep .el-dialog {
min-width: 1051px !important;
max-width: 1051px !important;
}
::v-deep .el-step {
.el-step__head {
&.is-process {

View File

@@ -59,7 +59,7 @@ export default {
}
html:lang(en) .panel-item span {
min-width: 160px;
min-width: 100px;
}
html:lang(ja) .panel-item span {

View File

@@ -32,7 +32,7 @@ export default {
hidden: !this.$store.getters.hasValidLicense
},
{
title: this.$t('AppOps'),
title: this.$t('JobCenter'),
name: 'Ops'
},
{

View File

@@ -48,7 +48,8 @@ export default {
replaceRule: '(https?:\/\/[^:@]+:)([^@]+)(@.+)'
},
rules: [RequiredChange],
helpText: this.$t('EsUrl')
helpText: this.$t('EsUrl'),
helpTextAsPlaceholder: false
},
INDEX: {
rules: [Required],
@@ -83,10 +84,8 @@ export default {
}
}
},
computed: {
},
methods: {
}
computed: {},
methods: {}
}
</script>